luxen-ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/custom-elements.json +495 -337
- package/cdn/elements/dialog/dialog.d.ts +3 -0
- package/cdn/elements/dialog/dialog.d.ts.map +1 -1
- package/cdn/elements/dialog/dialog.js +10 -6
- package/cdn/elements/dialog/dialog.js.map +1 -1
- package/cdn/elements/dialog/dialog.styles.js +1 -1
- package/cdn/elements/dialog/dialog.styles.js.map +1 -1
- package/cdn/elements/dropdown/dropdown.js +1 -1
- package/cdn/elements/dropdown/dropdown.js.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
- package/cdn/elements/input-otp/input-otp.d.ts +8 -2
- package/cdn/elements/input-otp/input-otp.d.ts.map +1 -1
- package/cdn/elements/input-otp/input-otp.js +1 -1
- package/cdn/elements/input-otp/input-otp.js.map +1 -1
- package/cdn/elements/popover/popover.js +1 -1
- package/cdn/elements/popover/popover.js.map +1 -1
- package/cdn/styles/elements/button.css +1 -1
- package/cdn/styles/elements/input-otp.css +63 -29
- package/cdn/styles/index.css +15 -2
- package/dist/css/elements/button.css +1 -1
- package/dist/css/elements/input-otp.css +63 -29
- package/dist/css/index.css +15 -2
- package/dist/custom-elements.json +495 -337
- package/dist/elements/dialog/dialog.css +10 -0
- package/dist/elements/dialog/dialog.d.ts +3 -0
- package/dist/elements/dialog/dialog.d.ts.map +1 -1
- package/dist/elements/dialog/dialog.js +16 -4
- package/dist/elements/dropdown/dropdown.css +4 -4
- package/dist/elements/dropdown-item/dropdown-item.css +2 -1
- package/dist/elements/input-otp/input-otp.d.ts +8 -2
- package/dist/elements/input-otp/input-otp.d.ts.map +1 -1
- package/dist/elements/input-otp/input-otp.js +14 -5
- package/dist/elements/popover/popover.css +3 -4
- package/dist/skills/luxen-ui/references/dialog.md +79 -1
- package/dist/skills/luxen-ui/references/drawer.md +8 -0
- package/package.json +1 -1
|
@@ -69,18 +69,28 @@ dialog {
|
|
|
69
69
|
line-height: 1.4;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
/* Pin body and footer so the layout stays correct when [without-header]
|
|
73
|
+
removes the header and only two children auto-place into the grid. */
|
|
72
74
|
[part='body'] {
|
|
75
|
+
grid-row: 2;
|
|
73
76
|
padding-inline: var(--padding);
|
|
74
77
|
overflow-y: auto;
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
[part='footer'] {
|
|
81
|
+
grid-row: 3;
|
|
78
82
|
display: flex;
|
|
79
83
|
place-content: end;
|
|
80
84
|
gap: 0.5rem;
|
|
81
85
|
padding: var(--padding);
|
|
82
86
|
}
|
|
83
87
|
|
|
88
|
+
/* Without a header, the body has to provide its own block-start padding
|
|
89
|
+
(normally inherited visually from the header padding above it). */
|
|
90
|
+
:host([without-header]) [part='body'] {
|
|
91
|
+
padding-block-start: var(--padding);
|
|
92
|
+
}
|
|
93
|
+
|
|
84
94
|
::slotted(menu[slot='footer']) {
|
|
85
95
|
display: contents;
|
|
86
96
|
}
|
|
@@ -7,6 +7,7 @@ import { LuxenElement } from '../../shared/luxen-element';
|
|
|
7
7
|
* Invoker commands). There are no public `show()` / `close()` methods.
|
|
8
8
|
*
|
|
9
9
|
* @slot - Body content.
|
|
10
|
+
* @slot title - Custom heading element. Overrides the default `<h2>` rendered from the `title` property.
|
|
10
11
|
* @slot close - Close button (typically `<button class="l-close">`).
|
|
11
12
|
* @slot footer - Footer actions.
|
|
12
13
|
*
|
|
@@ -37,6 +38,8 @@ export declare class LuxenDialog extends LuxenElement {
|
|
|
37
38
|
open: boolean;
|
|
38
39
|
/** Close when the backdrop is clicked. */
|
|
39
40
|
lightDismiss: boolean;
|
|
41
|
+
/** Hide the header entirely (title and close slot). */
|
|
42
|
+
withoutHeader: boolean;
|
|
40
43
|
dialog: HTMLDialogElement;
|
|
41
44
|
private _mouseDownTarget;
|
|
42
45
|
private _commandListener;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/html/elements/dialog/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAwB1D
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/html/elements/dialog/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAwB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,MAAM,CAAC,MAAM,4BAAwB;IAErC,2CAA2C;IAE3C,KAAK,SAAM;IAEX,kCAAkC;IAElC,IAAI,UAAS;IAEb,0CAA0C;IAE1C,YAAY,UAAS;IAErB,uDAAuD;IAEvD,aAAa,UAAS;IAGtB,MAAM,EAAG,iBAAiB,CAAC;IAE3B,OAAO,CAAC,gBAAgB,CAA4B;IAEpD,OAAO,CAAC,gBAAgB,CAEtB;IAIF,iBAAiB;IAKjB,oBAAoB;IAKpB,YAAY;IASZ,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;IA0BrC,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,eAAe,CAAC,CAAY;IAEpC,OAAO,CAAC,aAAa;YAcP,UAAU;IAUxB,OAAO,CAAC,qBAAqB;IAK7B,MAAM;CA0BP"}
|
|
@@ -28,6 +28,7 @@ if (typeof document !== 'undefined' && !(SCROLL_LOCK_SHEET in document)) {
|
|
|
28
28
|
* Invoker commands). There are no public `show()` / `close()` methods.
|
|
29
29
|
*
|
|
30
30
|
* @slot - Body content.
|
|
31
|
+
* @slot title - Custom heading element. Overrides the default `<h2>` rendered from the `title` property.
|
|
31
32
|
* @slot close - Close button (typically `<button class="l-close">`).
|
|
32
33
|
* @slot footer - Footer actions.
|
|
33
34
|
*
|
|
@@ -59,6 +60,8 @@ export class LuxenDialog extends LuxenElement {
|
|
|
59
60
|
this.open = false;
|
|
60
61
|
/** Close when the backdrop is clicked. */
|
|
61
62
|
this.lightDismiss = false;
|
|
63
|
+
/** Hide the header entirely (title and close slot). */
|
|
64
|
+
this.withoutHeader = false;
|
|
62
65
|
this._mouseDownTarget = null;
|
|
63
66
|
this._commandListener = {
|
|
64
67
|
handleEvent: (e) => this._onCommand(e),
|
|
@@ -176,10 +179,16 @@ export class LuxenDialog extends LuxenElement {
|
|
|
176
179
|
part="dialog"
|
|
177
180
|
closedby=${closedby}
|
|
178
181
|
>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
${this.withoutHeader
|
|
183
|
+
? nothing
|
|
184
|
+
: html `
|
|
185
|
+
<header part="header">
|
|
186
|
+
<slot name="title">
|
|
187
|
+
${this.title ? html `<h2 part="title">${this.title}</h2>` : nothing}
|
|
188
|
+
</slot>
|
|
189
|
+
<slot name="close"></slot>
|
|
190
|
+
</header>
|
|
191
|
+
`}
|
|
183
192
|
<div part="body">
|
|
184
193
|
<slot></slot>
|
|
185
194
|
</div>
|
|
@@ -200,6 +209,9 @@ __decorate([
|
|
|
200
209
|
__decorate([
|
|
201
210
|
property({ type: Boolean, reflect: true, attribute: 'light-dismiss' })
|
|
202
211
|
], LuxenDialog.prototype, "lightDismiss", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
property({ type: Boolean, reflect: true, attribute: 'without-header' })
|
|
214
|
+
], LuxenDialog.prototype, "withoutHeader", void 0);
|
|
203
215
|
__decorate([
|
|
204
216
|
query('dialog')
|
|
205
217
|
], LuxenDialog.prototype, "dialog", void 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
--background: var(--l-color-bg-surface, Canvas);
|
|
3
|
-
--radius:
|
|
4
|
-
--shadow: 0 4px
|
|
3
|
+
--radius: 6px;
|
|
4
|
+
--shadow: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -2px rgb(0 0 0 / 6%);
|
|
5
5
|
--show-duration: 150;
|
|
6
6
|
--hide-duration: 150;
|
|
7
7
|
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
width: max-content;
|
|
21
21
|
min-width: anchor-size(width);
|
|
22
|
-
padding:
|
|
22
|
+
padding: 0.25rem;
|
|
23
23
|
margin: 0;
|
|
24
|
-
border: 1px solid var(--l-color-border, light-dark(#e5e7eb, #374151));
|
|
24
|
+
border: 1px solid var(--l-color-border-overlay, light-dark(#e5e7eb, #374151));
|
|
25
25
|
border-radius: var(--radius);
|
|
26
26
|
background: var(--background);
|
|
27
27
|
color: var(--l-color-text-primary, CanvasText);
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
gap: 8px;
|
|
14
|
-
padding:
|
|
14
|
+
padding: 0.375rem 0.5rem;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
outline: none;
|
|
17
|
+
border-radius: 4px;
|
|
17
18
|
font-size: 0.875rem;
|
|
18
19
|
line-height: 1.5;
|
|
19
20
|
color: var(--l-color-text-primary, CanvasText);
|
|
@@ -9,8 +9,13 @@ import { LuxenElement } from '../../shared/luxen-element';
|
|
|
9
9
|
* @customElement l-input-otp
|
|
10
10
|
*
|
|
11
11
|
* @cssproperty --digits - Number of digit boxes (default: 6). Must match input's maxlength.
|
|
12
|
-
* @cssproperty --size - Cell width and height (default: 2.75rem). Font size scales automatically.
|
|
13
|
-
* @cssproperty --gap - Space between cells (default: 0.5rem).
|
|
12
|
+
* @cssproperty --cell-size - Cell width and height (default: 2.75rem). Font size scales automatically.
|
|
13
|
+
* @cssproperty --cell-gap - Space between cells (default: 0.5rem).
|
|
14
|
+
* @cssproperty --cell-bg-color - Cell background color.
|
|
15
|
+
* @cssproperty --cell-border-color - Cell border color.
|
|
16
|
+
* @cssproperty --cell-border-radius - Cell border-radius.
|
|
17
|
+
* @cssproperty --cell-focus-color - Border + ring color of the active (focused) cell.
|
|
18
|
+
* @cssproperty --cell-focus-ring - `box-shadow` of the active cell ring (defaults to a 1px solid ring; set to `none` to disable).
|
|
14
19
|
*/
|
|
15
20
|
export declare class LuxenInputOtp extends LuxenElement {
|
|
16
21
|
createRenderRoot(): this;
|
|
@@ -27,5 +32,6 @@ export declare class LuxenInputOtp extends LuxenElement {
|
|
|
27
32
|
private _teardown;
|
|
28
33
|
private _updateCells;
|
|
29
34
|
private _clearCells;
|
|
35
|
+
private _scheduleUpdateCells;
|
|
30
36
|
}
|
|
31
37
|
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/html/elements/input-otp/input-otp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/html/elements/input-otp/input-otp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,aAAc,SAAQ,YAAY;IACpC,gBAAgB;IAIzB,sFAAsF;IAEtF,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,YAAY,CAAS;IAEpB,iBAAiB;IAKjB,oBAAoB;IAO7B,OAAO,CAAC,MAAM;IA4Dd,OAAO,CAAC,SAAS;IAoBjB,OAAO,CAAC,YAAY,CAyBlB;IAEF,OAAO,CAAC,WAAW,CAIjB;IAEF,OAAO,CAAC,oBAAoB,CAE1B;CACH"}
|
|
@@ -16,8 +16,13 @@ import { LuxenElement } from '../../shared/luxen-element';
|
|
|
16
16
|
* @customElement l-input-otp
|
|
17
17
|
*
|
|
18
18
|
* @cssproperty --digits - Number of digit boxes (default: 6). Must match input's maxlength.
|
|
19
|
-
* @cssproperty --size - Cell width and height (default: 2.75rem). Font size scales automatically.
|
|
20
|
-
* @cssproperty --gap - Space between cells (default: 0.5rem).
|
|
19
|
+
* @cssproperty --cell-size - Cell width and height (default: 2.75rem). Font size scales automatically.
|
|
20
|
+
* @cssproperty --cell-gap - Space between cells (default: 0.5rem).
|
|
21
|
+
* @cssproperty --cell-bg-color - Cell background color.
|
|
22
|
+
* @cssproperty --cell-border-color - Cell border color.
|
|
23
|
+
* @cssproperty --cell-border-radius - Cell border-radius.
|
|
24
|
+
* @cssproperty --cell-focus-color - Border + ring color of the active (focused) cell.
|
|
25
|
+
* @cssproperty --cell-focus-ring - `box-shadow` of the active cell ring (defaults to a 1px solid ring; set to `none` to disable).
|
|
21
26
|
*/
|
|
22
27
|
export class LuxenInputOtp extends LuxenElement {
|
|
23
28
|
constructor() {
|
|
@@ -55,6 +60,9 @@ export class LuxenInputOtp extends LuxenElement {
|
|
|
55
60
|
cell.removeAttribute('data-active');
|
|
56
61
|
}
|
|
57
62
|
};
|
|
63
|
+
this._scheduleUpdateCells = () => {
|
|
64
|
+
requestAnimationFrame(this._updateCells);
|
|
65
|
+
};
|
|
58
66
|
}
|
|
59
67
|
createRenderRoot() {
|
|
60
68
|
return this;
|
|
@@ -111,11 +119,12 @@ export class LuxenInputOtp extends LuxenElement {
|
|
|
111
119
|
this._initialized = true;
|
|
112
120
|
// Populate cells if input already has a value (e.g. disabled with prefilled value)
|
|
113
121
|
this._updateCells();
|
|
114
|
-
// Events
|
|
122
|
+
// Events — focus is deferred so it runs after the click that triggered it
|
|
123
|
+
// (otherwise selectionStart is stale and the active cell flickers).
|
|
115
124
|
this._input.addEventListener('input', this._updateCells);
|
|
116
125
|
this._input.addEventListener('click', this._updateCells);
|
|
117
126
|
this._input.addEventListener('keyup', this._updateCells);
|
|
118
|
-
this._input.addEventListener('focus', this.
|
|
127
|
+
this._input.addEventListener('focus', this._scheduleUpdateCells);
|
|
119
128
|
this._input.addEventListener('blur', this._clearCells);
|
|
120
129
|
}
|
|
121
130
|
_teardown() {
|
|
@@ -124,7 +133,7 @@ export class LuxenInputOtp extends LuxenElement {
|
|
|
124
133
|
this._input.removeEventListener('input', this._updateCells);
|
|
125
134
|
this._input.removeEventListener('click', this._updateCells);
|
|
126
135
|
this._input.removeEventListener('keyup', this._updateCells);
|
|
127
|
-
this._input.removeEventListener('focus', this.
|
|
136
|
+
this._input.removeEventListener('focus', this._scheduleUpdateCells);
|
|
128
137
|
this._input.removeEventListener('blur', this._clearCells);
|
|
129
138
|
// Restore input to direct child
|
|
130
139
|
this._container.replaceWith(this._input);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
--background: var(--l-color-bg-surface, Canvas);
|
|
3
3
|
--color: inherit;
|
|
4
|
-
--border-radius:
|
|
4
|
+
--border-radius: 6px;
|
|
5
5
|
--max-width: 320px;
|
|
6
|
-
--shadow: 0 4px
|
|
6
|
+
--shadow: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -2px rgb(0 0 0 / 6%);
|
|
7
7
|
--arrow-size: 8px;
|
|
8
8
|
--show-duration: 150ms;
|
|
9
9
|
--hide-duration: 150ms;
|
|
10
10
|
|
|
11
|
-
--_border-color: var(--l-color-border, light-dark(#e5e7eb, #374151));
|
|
11
|
+
--_border-color: var(--l-color-border-overlay, light-dark(#e5e7eb, #374151));
|
|
12
12
|
|
|
13
13
|
display: contents;
|
|
14
14
|
}
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
width: max-content;
|
|
22
22
|
max-width: var(--max-width);
|
|
23
|
-
padding: 12px 16px;
|
|
24
23
|
border: 1px solid var(--_border-color);
|
|
25
24
|
border-radius: var(--border-radius);
|
|
26
25
|
background: var(--background);
|
|
@@ -345,6 +345,74 @@ Add `autofocus` to any focusable element inside the dialog to focus it automatic
|
|
|
345
345
|
</l-dialog>
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
+
### Without header
|
|
349
|
+
|
|
350
|
+
Add `without-header` to drop the header row entirely (title and close slot). Useful for confirmation prompts where the body already carries the heading. Provide an accessible heading inside the body and rely on `Escape` or a footer action to close.
|
|
351
|
+
|
|
352
|
+
```html
|
|
353
|
+
<button
|
|
354
|
+
type="button"
|
|
355
|
+
class="l-button"
|
|
356
|
+
command="--show"
|
|
357
|
+
commandfor="dialog-without-header"
|
|
358
|
+
>
|
|
359
|
+
Delete account
|
|
360
|
+
</button>
|
|
361
|
+
|
|
362
|
+
<l-dialog
|
|
363
|
+
id="dialog-without-header"
|
|
364
|
+
without-header
|
|
365
|
+
>
|
|
366
|
+
<div class="grid justify-items-center gap-3 pb-2 text-center">
|
|
367
|
+
<span
|
|
368
|
+
class="flex size-12 items-center justify-center rounded-full bg-red-100 text-red-700 dark:bg-red-950 dark:text-red-300"
|
|
369
|
+
>
|
|
370
|
+
<svg
|
|
371
|
+
class="size-6"
|
|
372
|
+
viewBox="0 0 24 24"
|
|
373
|
+
fill="none"
|
|
374
|
+
stroke="currentColor"
|
|
375
|
+
stroke-width="2"
|
|
376
|
+
stroke-linecap="round"
|
|
377
|
+
stroke-linejoin="round"
|
|
378
|
+
aria-hidden="true"
|
|
379
|
+
>
|
|
380
|
+
<path d="M12 9v4" />
|
|
381
|
+
<path d="M12 17h.01" />
|
|
382
|
+
<path
|
|
383
|
+
d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
|
384
|
+
/>
|
|
385
|
+
</svg>
|
|
386
|
+
</span>
|
|
387
|
+
<h2 class="text-lg font-semibold">Delete your account?</h2>
|
|
388
|
+
<p class="text-sm">
|
|
389
|
+
This action is permanent and cannot be undone. All your data, including projects and billing
|
|
390
|
+
history, will be erased.
|
|
391
|
+
</p>
|
|
392
|
+
</div>
|
|
393
|
+
<menu slot="footer">
|
|
394
|
+
<button
|
|
395
|
+
autofocus
|
|
396
|
+
type="button"
|
|
397
|
+
class="l-button"
|
|
398
|
+
command="--hide"
|
|
399
|
+
commandfor="dialog-without-header"
|
|
400
|
+
>
|
|
401
|
+
Cancel
|
|
402
|
+
</button>
|
|
403
|
+
<button
|
|
404
|
+
type="button"
|
|
405
|
+
class="l-button"
|
|
406
|
+
data-variant="destructive"
|
|
407
|
+
command="--hide"
|
|
408
|
+
commandfor="dialog-without-header"
|
|
409
|
+
>
|
|
410
|
+
Delete account
|
|
411
|
+
</button>
|
|
412
|
+
</menu>
|
|
413
|
+
</l-dialog>
|
|
414
|
+
```
|
|
415
|
+
|
|
348
416
|
## Accessibility
|
|
349
417
|
|
|
350
418
|
### Criteria
|
|
@@ -352,7 +420,7 @@ Add `autofocus` to any focusable element inside the dialog to focus it automatic
|
|
|
352
420
|
| Check | Description |
|
|
353
421
|
|-------|-------------|
|
|
354
422
|
| Role | Rendered as a native `<dialog>` in the shadow root — built-in `dialog` role and modal semantics |
|
|
355
|
-
| Accessible name | The `title` property
|
|
423
|
+
| Accessible name | The `title` property renders as an `<h2>` in the header, or provide a custom heading via `slot="title"` |
|
|
356
424
|
| Focus management | Focus is trapped inside the modal; moves to the first focusable element on open |
|
|
357
425
|
| Focus restoration | Focus returns to the trigger element when the dialog closes |
|
|
358
426
|
| Close button | Consumer provides the close button via `slot="close"` with `aria-label="Close"` |
|
|
@@ -385,12 +453,21 @@ import 'luxen-ui/dialog';
|
|
|
385
453
|
{ Attribute: 'title', Description: 'Dialog title rendered in the header as an `<h2>`' },
|
|
386
454
|
{ Attribute: 'open', Description: 'Whether the dialog is open. Reflects to attribute' },
|
|
387
455
|
{ Attribute: 'light-dismiss', Description: 'Close when the backdrop is clicked' },
|
|
456
|
+
{ Attribute: 'without-header', Description: 'Hide the header entirely (title and close slot)' },
|
|
388
457
|
]" />
|
|
389
458
|
|
|
390
459
|
### Commands
|
|
391
460
|
|
|
392
461
|
Open and close the dialog by toggling its `open` property, or via the [Invoker Commands API](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API) from any light-DOM button. Custom commands must start with `--`.
|
|
393
462
|
|
|
463
|
+
>
|
|
464
|
+
> The Invoker Commands API is [✓ Baseline Newly Available (since 2025-12-12)](https://web-platform-dx.github.io/web-features-explorer/features/invoker-commands/). For older browser versions, load the [`invokers-polyfill`](https://npmx.dev/package/invokers-polyfill) once at app startup:
|
|
465
|
+
>
|
|
466
|
+
> ```js
|
|
467
|
+
> import 'invokers-polyfill';
|
|
468
|
+
> ```
|
|
469
|
+
>
|
|
470
|
+
|
|
394
471
|
<ApiTable :data="[
|
|
395
472
|
{ Command: '--show', Description: 'Sets `open = true`' },
|
|
396
473
|
{ Command: '--hide', Description: 'Sets `open = false`' },
|
|
@@ -409,6 +486,7 @@ Open and close the dialog by toggling its `open` property, or via the [Invoker C
|
|
|
409
486
|
|
|
410
487
|
<ApiTable :data="[
|
|
411
488
|
{ Slot: '(default)', Description: 'Body content' },
|
|
489
|
+
{ Slot: 'title', Description: 'Custom heading element. Overrides the default `<h2>` rendered from the `title` property' },
|
|
412
490
|
{ Slot: 'close', Description: 'Close button (typically `<button class="l-close">`)' },
|
|
413
491
|
{ Slot: 'footer', Description: 'Footer actions' },
|
|
414
492
|
]" />
|
|
@@ -357,6 +357,14 @@ import 'luxen-ui/drawer';
|
|
|
357
357
|
|
|
358
358
|
Open and close the drawer by toggling its `open` property, or via the [Invoker Commands API](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API) from any light-DOM button. Custom commands must start with `--`.
|
|
359
359
|
|
|
360
|
+
>
|
|
361
|
+
> The Invoker Commands API is [✓ Baseline Newly Available (since 2025-12-12)](https://web-platform-dx.github.io/web-features-explorer/features/invoker-commands/). For older browser versions, load the [`invokers-polyfill`](https://npmx.dev/package/invokers-polyfill) once at app startup:
|
|
362
|
+
>
|
|
363
|
+
> ```js
|
|
364
|
+
> import 'invokers-polyfill';
|
|
365
|
+
> ```
|
|
366
|
+
>
|
|
367
|
+
|
|
360
368
|
<ApiTable :data="[
|
|
361
369
|
{ Command: '--show', Description: 'Sets `open = true`' },
|
|
362
370
|
{ Command: '--hide', Description: 'Sets `open = false`' },
|
package/package.json
CHANGED