Skip to content

Commit dc312a2

Browse files
committed
Merge branch 'v1/contrib' into bugfix/imports
2 parents 6447b59 + 8464fca commit dc312a2

File tree

7 files changed

+1684
-999
lines changed

7 files changed

+1684
-999
lines changed

package-lock.json

Lines changed: 1638 additions & 978 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@
6767
"@lerna-lite/version": "2.5.1",
6868
"@open-wc/testing": "3.2.0",
6969
"@rollup/plugin-node-resolve": "15.1.0",
70-
"@storybook/addon-a11y": "7.2.2",
71-
"@storybook/addon-actions": "7.2.2",
72-
"@storybook/addon-essentials": "7.2.2",
73-
"@storybook/addon-links": "7.2.2",
74-
"@storybook/blocks": "7.2.2",
75-
"@storybook/web-components": "7.2.2",
76-
"@storybook/web-components-vite": "7.2.2",
70+
"@storybook/addon-a11y": "7.4.5",
71+
"@storybook/addon-actions": "7.4.5",
72+
"@storybook/addon-essentials": "7.4.5",
73+
"@storybook/addon-links": "7.4.5",
74+
"@storybook/blocks": "7.4.5",
75+
"@storybook/web-components": "7.4.5",
76+
"@storybook/web-components-vite": "7.4.5",
7777
"@types/chai": "4.3.5",
7878
"@typescript-eslint/eslint-plugin": "6.6.0",
7979
"@typescript-eslint/parser": "6.0.0",
@@ -86,21 +86,21 @@
8686
"element-internals-polyfill": "1.3.5",
8787
"esbuild": "0.17.18",
8888
"eslint": "8.45.0",
89-
"eslint-config-prettier": "8.9.0",
89+
"eslint-config-prettier": "9.0.0",
9090
"eslint-import-resolver-typescript": "3.5.5",
9191
"eslint-plugin-html": "7.1.0",
9292
"eslint-plugin-import": "2.27.5",
9393
"eslint-plugin-lit": "1.8.3",
9494
"eslint-plugin-lit-a11y": "4.1.0",
95-
"eslint-plugin-storybook": "0.6.13",
95+
"eslint-plugin-storybook": "0.6.14",
9696
"eslint-plugin-wc": "1.5.0",
9797
"github-markdown-css": "5.2.0",
9898
"glob": "8.1.0",
9999
"husky": "8.0.3",
100100
"lint-staged": "13.2.3",
101101
"npm-check-updates": "16.10.16",
102102
"plop": "3.1.2",
103-
"postcss": "8.4.26",
103+
"postcss": "8.4.31",
104104
"postcss-advanced-variables": "3.0.1",
105105
"postcss-cli": "10.1.0",
106106
"postcss-color-function": "4.1.0",
@@ -123,7 +123,7 @@
123123
"rollup-plugin-import-css": "3.3.1",
124124
"rollup-plugin-minify-html-literals": "1.2.6",
125125
"rollup-plugin-postcss": "4.0.2",
126-
"storybook": "7.2.2",
126+
"storybook": "7.4.5",
127127
"tsc-files": "1.1.4",
128128
"turbo": "^1.10.12",
129129
"typescript": "5.2.2",

packages/uui-input/lib/uui-input.element.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export class UUIInputElement extends FormControlMixin(
5858
var(--uui-input-border-color, var(--uui-color-border));
5959
6060
--uui-button-height: 100%;
61+
--auto-width-text-margin-right: 0;
62+
--auto-width-text-margin-left: 0;
6163
}
6264
6365
#control {
@@ -75,6 +77,8 @@ export class UUIInputElement extends FormControlMixin(
7577
z-index: -1;
7678
height: 0px;
7779
padding: 0 var(--uui-size-space-3);
80+
margin: 0 var(--auto-width-text-margin-right) 0
81+
var(--auto-width-text-margin-left);
7882
}
7983
8084
:host([auto-width]) #input {
@@ -407,7 +411,7 @@ export class UUIInputElement extends FormControlMixin(
407411
}
408412

409413
private renderInputWithAutoWidth() {
410-
html`<div id="control">
414+
return html`<div id="control">
411415
${this.renderInput()}${this.renderAutoWidthBackground()}
412416
</div>`;
413417
}

packages/uui-input/lib/uui-input.story.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ export const AutoWidth: Story = {
314314
.name=${props.name}
315315
.placeholder=${props.placeholder}
316316
.value=${props.value}
317-
.autoWidth=${props.autoWidth}>
317+
?auto-width=${props.autoWidth}>
318318
</uui-input>
319319
<br /><br />
320320
<uui-input
@@ -329,15 +329,31 @@ export const AutoWidth: Story = {
329329
.name=${props.name}
330330
.placeholder=${props.placeholder}
331331
.value=${props.value}
332-
.autoWidth=${props.autoWidth}>
332+
?auto-width=${props.autoWidth}>
333333
<uui-input
334334
slot="prepend"
335335
placeholder="Prepend auto-width"
336-
.autoWidth=${props.autoWidth}></uui-input>
336+
?auto-width=${props.autoWidth}></uui-input>
337337
<uui-input
338338
slot="append"
339339
placeholder="Append auto-width false"></uui-input>
340-
</uui-input>`,
340+
</uui-input>
341+
342+
<br /><br />
343+
<uui-input
344+
.min=${props.min}
345+
.max=${props.max}
346+
.step=${props.step}
347+
.disabled=${props.disabled}
348+
.readonly=${props.readonly}
349+
.error=${props.error}
350+
.label=${props.label}
351+
.type=${props.type}
352+
.name=${props.name}
353+
style="--auto-width-text-margin-right: 50px"
354+
placeholder="--auto-width-text-margin-right: 50px"
355+
.value=${props.value}
356+
?auto-width=${props.autoWidth}></uui-input>`,
341357
args: {
342358
autoWidth: true,
343359
placeholder: 'Start typing...',

packages/uui-modal/lib/uui-modal.element.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export class UUIModalElement extends LitElement {
1818

1919
private _transitionDuration = 250;
2020

21-
@property()
21+
@property({ type: Number, attribute: 'transition-duration' })
2222
public get transitionDuration() {
2323
return this._transitionDuration;
2424
}
25-
public set transitionDuration(value) {
25+
public set transitionDuration(value: number) {
2626
this._transitionDuration = value;
2727
this.style.setProperty(
2828
'--uui-modal-transition-duration',
@@ -45,7 +45,6 @@ export class UUIModalElement extends LitElement {
4545
event?.stopImmediatePropagation();
4646

4747
const openEvent = new CustomEvent('open', {
48-
bubbles: true,
4948
cancelable: true,
5049
});
5150

@@ -60,7 +59,6 @@ export class UUIModalElement extends LitElement {
6059
event?.stopImmediatePropagation();
6160

6261
const closeEvent = new CustomEvent('close', {
63-
bubbles: true,
6462
cancelable: true,
6563
});
6664
this.dispatchEvent(closeEvent);
@@ -80,6 +78,9 @@ export class UUIModalElement extends LitElement {
8078
this.isClosing = true;
8179
this.isOpen = false;
8280
this._dialogElement?.close();
81+
82+
this.dispatchEvent(new CustomEvent('close-end'));
83+
8384
this.remove();
8485
}
8586

packages/uui-modal/lib/uui-modal.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ Dispatched on first render. This will set open to true and show the modal. Can b
9191
Dispatched when the modal is closed. Can be cancelled if you want to prevent the modal from closing. But then you'll have to manually call `_closeModal()` when you want to close the modal.
9292
This is used in the `uui-modal-sidebar` to wait for the animation to finish before removing the modal from the DOM.
9393

94+
#### `close-end`
95+
96+
This event is triggered before removing the component from the DOM, either after animations or delays or when `_closeModal()` is manually invoked.
97+
9498
### CSS Variables
9599

96100
---

packages/uui-tabs/lib/uui-tab.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class UUITabElement extends ActiveMixin(LabelMixin('', LitElement)) {
4040
min-height: var(--uui-size-12);
4141
min-width: 70px;
4242
padding: var(--uui-size-2)
43-
var(--uui-tab-padding-horizontal, var(--uui-size-4));
43+
var(--uui-tab-padding-horizontal, var(--uui-size-5));
4444
border: none;
4545
font-size: inherit;
4646
background: none;

0 commit comments

Comments
 (0)