luxen-ui 0.25.0 → 0.26.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/README.md +1 -0
- package/bin/cli.mjs +16 -1
- package/cdn/custom-elements.json +402 -276
- package/cdn/elements/alert-dialog/alert-dialog.d.ts +3 -2
- package/cdn/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/cdn/elements/alert-dialog/alert-dialog.js.map +1 -1
- package/cdn/elements/avatar/avatar.js +1 -1
- package/cdn/elements/avatar/avatar.js.map +1 -1
- package/cdn/elements/carousel/carousel.js +1 -1
- package/cdn/elements/carousel/carousel.js.map +1 -1
- package/cdn/elements/combobox/combobox.d.ts.map +1 -1
- package/cdn/elements/combobox/combobox.js +2 -1
- package/cdn/elements/combobox/combobox.js.map +1 -1
- package/cdn/elements/dialog/dialog.d.ts +2 -1
- package/cdn/elements/dialog/dialog.d.ts.map +1 -1
- 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/drawer/drawer.d.ts +7 -7
- package/cdn/elements/drawer/drawer.js +1 -1
- package/cdn/elements/drawer/drawer.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 +2 -2
- package/cdn/elements/input-otp/input-otp.js.map +1 -1
- package/cdn/elements/prose-editor/prose-editor.js +1 -1
- package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
- package/cdn/elements/rating/rating.js +1 -1
- package/cdn/elements/rating/rating.js.map +1 -1
- package/cdn/elements/select/select.d.ts.map +1 -1
- package/cdn/elements/select/select.js +2 -1
- package/cdn/elements/select/select.js.map +1 -1
- package/cdn/elements/slider/slider.js +1 -1
- package/cdn/elements/slider/slider.js.map +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.js +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
- package/cdn/elements/table/table.meta.d.ts +55 -0
- package/cdn/elements/table/table.meta.d.ts.map +1 -0
- package/cdn/elements/table/table.meta.js +0 -0
- package/cdn/elements/tag/tag.js +1 -1
- package/cdn/elements/tag/tag.js.map +1 -1
- package/cdn/elements/tree/tree.js +1 -1
- package/cdn/elements/tree/tree.js.map +1 -1
- package/cdn/elements/tree-item/tree-item.js +1 -1
- package/cdn/elements/tree-item/tree-item.js.map +1 -1
- package/cdn/shared/controllers/listbox-nav.d.ts +7 -0
- package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/cdn/shared/controllers/listbox-nav.js +1 -1
- package/cdn/shared/controllers/listbox-nav.js.map +1 -1
- package/cdn/shared/styles/button-core.styles.js +1 -1
- package/cdn/shared/styles/button-core.styles.js.map +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
- package/cdn/shared/styles/picker-core.styles.js +1 -1
- package/cdn/shared/styles/picker-core.styles.js.map +1 -1
- package/cdn/standalone.css +284 -67
- package/cdn/standalone.js +38 -28
- package/cdn/standalone.js.map +1 -1
- package/cdn/styles/base.css +11 -0
- package/cdn/styles/elements/breadcrumb.css +2 -2
- package/cdn/styles/elements/button.css +2 -2
- package/cdn/styles/elements/checkbox.css +2 -2
- package/cdn/styles/elements/close-button/circle.css +2 -2
- package/cdn/styles/elements/close-button/ring.css +2 -2
- package/cdn/styles/elements/close-button/square.css +2 -2
- package/cdn/styles/elements/disclosure.css +1 -1
- package/cdn/styles/elements/input-otp.css +19 -3
- package/cdn/styles/elements/input-stepper/default.css +1 -1
- package/cdn/styles/elements/input-stepper/pill.css +1 -1
- package/cdn/styles/elements/input-stepper/rounded.css +1 -1
- package/cdn/styles/elements/input.css +11 -11
- package/cdn/styles/elements/prose-editor.css +6 -6
- package/cdn/styles/elements/radio-group.css +2 -2
- package/cdn/styles/elements/radio.css +2 -2
- package/cdn/styles/elements/segmented-control.css +1 -1
- package/cdn/styles/elements/select.css +5 -5
- package/cdn/styles/elements/story.css +2 -2
- package/cdn/styles/elements/switch.css +2 -2
- package/cdn/styles/elements/table.css +186 -0
- package/cdn/styles/elements/tabs/enclosed.css +3 -3
- package/cdn/styles/elements/tabs/line.css +3 -3
- package/cdn/styles/elements/textarea.css +5 -5
- package/cdn/styles/preset.css +19 -6
- package/cdn/styles/tokens/aliases.css +5 -3
- package/cdn/styles/tokens/forms.css +3 -3
- package/cdn/styles/tokens.css +8 -6
- package/dist/css/base.css +11 -0
- package/dist/css/elements/breadcrumb.css +2 -2
- package/dist/css/elements/button.css +2 -2
- package/dist/css/elements/checkbox.css +2 -2
- package/dist/css/elements/close-button/circle.css +2 -2
- package/dist/css/elements/close-button/ring.css +2 -2
- package/dist/css/elements/close-button/square.css +2 -2
- package/dist/css/elements/disclosure.css +1 -1
- package/dist/css/elements/input-otp.css +19 -3
- package/dist/css/elements/input-stepper/default.css +1 -1
- package/dist/css/elements/input-stepper/pill.css +1 -1
- package/dist/css/elements/input-stepper/rounded.css +1 -1
- package/dist/css/elements/input.css +11 -11
- package/dist/css/elements/prose-editor.css +6 -6
- package/dist/css/elements/radio-group.css +2 -2
- package/dist/css/elements/radio.css +2 -2
- package/dist/css/elements/segmented-control.css +1 -1
- package/dist/css/elements/select.css +5 -5
- package/dist/css/elements/story.css +2 -2
- package/dist/css/elements/switch.css +2 -2
- package/dist/css/elements/table.css +186 -0
- package/dist/css/elements/tabs/enclosed.css +3 -3
- package/dist/css/elements/tabs/line.css +3 -3
- package/dist/css/elements/textarea.css +5 -5
- package/dist/css/preset.css +19 -6
- package/dist/css/tokens/aliases.css +5 -3
- package/dist/css/tokens/forms.css +3 -3
- package/dist/css/tokens.css +8 -6
- package/dist/custom-elements.json +402 -276
- package/dist/elements/alert-dialog/alert-dialog.d.ts +3 -2
- package/dist/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/elements/alert-dialog/alert-dialog.js +3 -2
- package/dist/elements/avatar/avatar.css +2 -2
- package/dist/elements/carousel/carousel.css +18 -0
- package/dist/elements/combobox/combobox.css +9 -0
- package/dist/elements/combobox/combobox.d.ts.map +1 -1
- package/dist/elements/combobox/combobox.js +1 -0
- package/dist/elements/dialog/dialog.css +12 -0
- package/dist/elements/dialog/dialog.d.ts +2 -1
- package/dist/elements/dialog/dialog.d.ts.map +1 -1
- package/dist/elements/dialog/dialog.js +2 -1
- package/dist/elements/drawer/drawer.css +11 -1
- package/dist/elements/drawer/drawer.d.ts +7 -7
- package/dist/elements/drawer/drawer.js +7 -7
- package/dist/elements/dropdown-item/dropdown-item.css +1 -1
- package/dist/elements/input-otp/input-otp.d.ts +2 -2
- package/dist/elements/input-otp/input-otp.js +2 -2
- package/dist/elements/prose-editor/prose-editor.css +5 -3
- package/dist/elements/rating/rating.css +9 -10
- package/dist/elements/select/select.css +10 -5
- package/dist/elements/select/select.d.ts.map +1 -1
- package/dist/elements/select/select.js +1 -0
- package/dist/elements/slider/slider.css +5 -1
- package/dist/elements/stories-viewer/stories-viewer.css +10 -2
- package/dist/elements/table/table.meta.d.ts +55 -0
- package/dist/elements/table/table.meta.d.ts.map +1 -0
- package/dist/elements/table/table.meta.js +65 -0
- package/dist/elements/tag/tag.css +3 -3
- package/dist/elements/tree/tree.css +3 -3
- package/dist/elements/tree-item/tree-item.css +5 -3
- package/dist/metadata/alert-dialog.json +90 -85
- package/dist/metadata/alert.json +22 -22
- package/dist/metadata/avatar.json +26 -26
- package/dist/metadata/badge.json +13 -13
- package/dist/metadata/breadcrumb.json +9 -9
- package/dist/metadata/button.json +40 -40
- package/dist/metadata/carousel.json +133 -133
- package/dist/metadata/checkbox.json +13 -13
- package/dist/metadata/close-button.json +15 -15
- package/dist/metadata/color-scheme-icon.json +13 -13
- package/dist/metadata/combobox.json +77 -94
- package/dist/metadata/dialog.json +49 -44
- package/dist/metadata/disclosure.json +17 -17
- package/dist/metadata/divider.json +12 -12
- package/dist/metadata/drawer.json +61 -61
- package/dist/metadata/dropdown-item.json +50 -50
- package/dist/metadata/dropdown.json +32 -32
- package/dist/metadata/form-field.json +15 -15
- package/dist/metadata/icon.json +8 -8
- package/dist/metadata/index.json +1761 -1765
- package/dist/metadata/input-group.json +5 -5
- package/dist/metadata/input-otp.json +17 -17
- package/dist/metadata/input-stepper.json +24 -24
- package/dist/metadata/input.json +31 -31
- package/dist/metadata/popover.json +49 -49
- package/dist/metadata/progress.json +15 -15
- package/dist/metadata/prose-editor.json +110 -116
- package/dist/metadata/radio.json +15 -15
- package/dist/metadata/rating.json +25 -47
- package/dist/metadata/segmented-control.json +24 -46
- package/dist/metadata/select.json +81 -98
- package/dist/metadata/skeleton.json +12 -12
- package/dist/metadata/slider.json +60 -78
- package/dist/metadata/spinner.json +5 -5
- package/dist/metadata/sticky-bar.json +13 -13
- package/dist/metadata/stories-viewer.json +105 -105
- package/dist/metadata/stories.json +17 -17
- package/dist/metadata/story.json +41 -41
- package/dist/metadata/switch.json +9 -9
- package/dist/metadata/table.json +88 -0
- package/dist/metadata/tabs.json +26 -26
- package/dist/metadata/tag.json +50 -50
- package/dist/metadata/textarea.json +28 -28
- package/dist/metadata/toast.json +16 -16
- package/dist/metadata/tooltip.json +49 -49
- package/dist/metadata/tree-item.json +73 -73
- package/dist/metadata/tree.json +39 -39
- package/dist/shared/controllers/listbox-nav.d.ts +7 -0
- package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/dist/shared/controllers/listbox-nav.js +12 -0
- package/dist/shared/styles/button-core.css +2 -2
- package/dist/shared/styles/checkbox-appearance.css +2 -2
- package/dist/shared/styles/picker-core.css +13 -10
- package/dist/templates/elements/alert-dialog.md +19 -18
- package/dist/templates/elements/alert.md +4 -4
- package/dist/templates/elements/avatar.md +9 -9
- package/dist/templates/elements/badge.md +4 -4
- package/dist/templates/elements/breadcrumb.md +4 -4
- package/dist/templates/elements/button.md +8 -8
- package/dist/templates/elements/carousel.md +32 -32
- package/dist/templates/elements/checkbox.md +4 -4
- package/dist/templates/elements/close-button.md +2 -2
- package/dist/templates/elements/color-scheme-icon.md +13 -13
- package/dist/templates/elements/combobox.md +19 -19
- package/dist/templates/elements/dialog.md +11 -10
- package/dist/templates/elements/disclosure.md +3 -3
- package/dist/templates/elements/divider.md +2 -2
- package/dist/templates/elements/drawer.md +15 -15
- package/dist/templates/elements/dropdown.md +15 -15
- package/dist/templates/elements/form-field.md +3 -3
- package/dist/templates/elements/icon.md +1 -1
- package/dist/templates/elements/input-otp.md +5 -5
- package/dist/templates/elements/input-stepper.md +4 -4
- package/dist/templates/elements/input.md +15 -8
- package/dist/templates/elements/popover.md +8 -8
- package/dist/templates/elements/progress.md +3 -3
- package/dist/templates/elements/prose-editor.md +38 -39
- package/dist/templates/elements/radio.md +6 -6
- package/dist/templates/elements/rating.md +5 -13
- package/dist/templates/elements/segmented-control.md +4 -4
- package/dist/templates/elements/select.md +23 -23
- package/dist/templates/elements/skeleton.md +2 -2
- package/dist/templates/elements/slider.md +13 -13
- package/dist/templates/elements/spinner.md +1 -1
- package/dist/templates/elements/sticky-bar.md +2 -2
- package/dist/templates/elements/stories-viewer.md +29 -29
- package/dist/templates/elements/stories.md +4 -4
- package/dist/templates/elements/story.md +11 -11
- package/dist/templates/elements/switch.md +5 -5
- package/dist/templates/elements/table.md +210 -0
- package/dist/templates/elements/tabs.md +4 -4
- package/dist/templates/elements/tag.md +14 -14
- package/dist/templates/elements/textarea.md +8 -8
- package/dist/templates/elements/toast.md +4 -4
- package/dist/templates/elements/tooltip.md +9 -9
- package/dist/templates/elements/tree-item.md +18 -18
- package/dist/templates/elements/tree.md +13 -13
- package/dist/templates/foundations/focus.md +303 -0
- package/elements.json +9 -0
- package/package.json +1 -1
- package/postcss-plugin-prefix.js +2 -2
- package/templates/SKILL.md.tpl +1 -0
- package/templates/choosing-elements.md.tpl +1 -0
|
@@ -479,9 +479,9 @@ import 'luxen-ui/dialog';
|
|
|
479
479
|
|
|
480
480
|
### Attributes & Properties
|
|
481
481
|
|
|
482
|
-
- **title**: `string` — Dialog title rendered in the header and used as the dialog's accessible name.
|
|
483
|
-
- **open**: `boolean` (default: `false`) — Whether the dialog is open.
|
|
484
482
|
- **light-dismiss**: `boolean` (default: `false`) — Close when the backdrop is clicked.
|
|
483
|
+
- **open**: `boolean` (default: `false`) — Whether the dialog is open.
|
|
484
|
+
- **title**: `string` — Dialog title rendered in the header and used as the dialog's accessible name.
|
|
485
485
|
- **without-header**: `boolean` (default: `false`) — Hide the header entirely (title and close slot).
|
|
486
486
|
|
|
487
487
|
### Commands
|
|
@@ -509,25 +509,26 @@ Open and close the dialog by toggling its `open` property, or via the [Invoker C
|
|
|
509
509
|
### Slots
|
|
510
510
|
|
|
511
511
|
- **(default)** — Body content.
|
|
512
|
-
- **title** — Custom heading element. Overrides the default `<h2>` rendered from the `title` property. Also provides the dialog's accessible name.
|
|
513
512
|
- **close** — Close button (typically `<button class="l-close">`).
|
|
514
513
|
- **footer** — Footer actions.
|
|
514
|
+
- **title** — Custom heading element. Overrides the default `<h2>` rendered from the `title` property. Also provides the dialog's accessible name.
|
|
515
515
|
|
|
516
516
|
### CSS parts
|
|
517
517
|
|
|
518
|
+
- `body` — The body wrapper around the default slot.
|
|
518
519
|
- `dialog` — The native `<dialog>` element.
|
|
520
|
+
- `footer` — The footer wrapper around the footer slot.
|
|
519
521
|
- `header` — The header wrapper containing the title and close slot.
|
|
520
522
|
- `title` — The dialog title heading.
|
|
521
|
-
- `body` — The body wrapper around the default slot.
|
|
522
|
-
- `footer` — The footer wrapper around the footer slot.
|
|
523
523
|
|
|
524
524
|
### CSS custom properties
|
|
525
525
|
|
|
526
|
-
- `--
|
|
526
|
+
- `--backdrop` (default: `var(--l-backdrop)`) — Backdrop color.
|
|
527
|
+
- `--backdrop-blur` (default: `0`) — Backdrop blur amount (any CSS length). `0` means no blur; set e.g. `4px` for a subtle frost.
|
|
527
528
|
- `--border-radius` (default: `6px`) — Dialog border radius.
|
|
529
|
+
- `--easing` (default: `cubic-bezier(0.32, 0.72, 0, 1)`) — Timing function of the open and close transitions, backdrop included.
|
|
530
|
+
- `--hide-duration` (default: `200ms`) — Close transition duration.
|
|
528
531
|
- `--padding` (default: `1.5rem`) — Padding applied to the header, footer, and inline-padding of the body. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).
|
|
532
|
+
- `--shadow` (default: `none`) — Drop shadow of the dialog panel (any `box-shadow` value). Raise it when the backdrop is light, where the panel edge would otherwise fade into the page.
|
|
529
533
|
- `--show-duration` (default: `200ms`) — Open transition duration.
|
|
530
|
-
- `--
|
|
531
|
-
- `--easing` (default: `cubic-bezier(0.32, 0.72, 0, 1)`) — Timing function of the open and close transitions, backdrop included.
|
|
532
|
-
- `--backdrop` — Backdrop color.
|
|
533
|
-
- `--backdrop-blur` (default: `0`) — Backdrop blur amount (any CSS length). `0` means no blur; set e.g. `4px` for a subtle frost.
|
|
534
|
+
- `--width` (default: `31rem`) — Dialog width.
|
|
@@ -180,12 +180,12 @@ Use the native `name` attribute to create an exclusive accordion — only one it
|
|
|
180
180
|
|
|
181
181
|
### Attributes & Properties
|
|
182
182
|
|
|
183
|
-
- **open** — Native attribute — starts the disclosure expanded.
|
|
184
|
-
- **name** — Native attribute — groups disclosures into an exclusive accordion.
|
|
185
183
|
- **data-marker**: `arrow | plus` — Marker icon: `arrow` rotates 180° when open; `plus` rotates 45° into a cross.
|
|
186
184
|
- **data-marker-placement**: `start | end` — Marker side. Defaults to `end`.
|
|
187
185
|
- **data-variant** — bordered — Adds border, background, and border-radius.
|
|
188
186
|
- **disabled** — Disables interaction (set on `<details>` or `<summary>`).
|
|
187
|
+
- **name** — Native attribute — groups disclosures into an exclusive accordion.
|
|
188
|
+
- **open** — Native attribute — starts the disclosure expanded.
|
|
189
189
|
|
|
190
190
|
### Events
|
|
191
191
|
|
|
@@ -197,5 +197,5 @@ Use the native `name` attribute to create an exclusive accordion — only one it
|
|
|
197
197
|
|
|
198
198
|
### CSS custom properties
|
|
199
199
|
|
|
200
|
-
- `--marker-size` (default: `20px`) — Marker icon size.
|
|
201
200
|
- `--marker-color` (default: `var(--l-color-text-tertiary)`) — Marker icon color ().
|
|
201
|
+
- `--marker-size` (default: `20px`) — Marker icon size.
|
|
@@ -85,11 +85,11 @@ import 'luxen-ui/divider';
|
|
|
85
85
|
|
|
86
86
|
### Attributes & Properties
|
|
87
87
|
|
|
88
|
-
- **orientation**: `DividerOrientation` (default: `'horizontal'`) — The divider's orientation.
|
|
89
88
|
- **label**: `string | undefined` — Optional text label displayed over the divider line.
|
|
89
|
+
- **orientation**: `DividerOrientation` (default: `'horizontal'`) — The divider's orientation.
|
|
90
90
|
|
|
91
91
|
### CSS custom properties
|
|
92
92
|
|
|
93
93
|
- `--color` — The color of the divider line.
|
|
94
|
-
- `--thickness` — The thickness of the divider line.
|
|
95
94
|
- `--spacing` — The spacing between the divider and its neighboring elements.
|
|
95
|
+
- `--thickness` — The thickness of the divider line.
|
|
@@ -532,11 +532,11 @@ import 'luxen-ui/drawer';
|
|
|
532
532
|
|
|
533
533
|
### Attributes & Properties
|
|
534
534
|
|
|
535
|
-
- **placement**: `'start' | 'end' | 'top' | 'bottom' | undefined` — Edge the drawer slides in from. Defaults to the start (inline-start) edge.
|
|
536
535
|
- **inset**: `boolean` (default: `false`) — Detach the drawer from the viewport edges, floating it with a uniform gap and rounded corners.
|
|
537
|
-
- **title**: `string` — Dialog title rendered in the header and used as the dialog's accessible name.
|
|
538
|
-
- **open**: `boolean` (default: `false`) — Whether the dialog is open.
|
|
539
536
|
- **light-dismiss**: `boolean` (default: `false`) — Close when the backdrop is clicked.
|
|
537
|
+
- **open**: `boolean` (default: `false`) — Whether the dialog is open.
|
|
538
|
+
- **placement**: `'start' | 'end' | 'top' | 'bottom' | undefined` — Edge the drawer slides in from. Defaults to the start (inline-start) edge.
|
|
539
|
+
- **title**: `string` — Dialog title rendered in the header and used as the dialog's accessible name.
|
|
540
540
|
- **without-header**: `boolean` (default: `false`) — Hide the header entirely (title and close slot).
|
|
541
541
|
|
|
542
542
|
### Commands
|
|
@@ -564,28 +564,28 @@ Open and close the drawer by toggling its `open` property, or via the [Invoker C
|
|
|
564
564
|
### Slots
|
|
565
565
|
|
|
566
566
|
- **(default)** — Body content.
|
|
567
|
-
- **title** — Custom heading element. Overrides the default `<h2>` rendered from the `title` property. Also provides the dialog's accessible name.
|
|
568
567
|
- **close** — Close button (typically `<button class="l-close">`).
|
|
569
568
|
- **footer** — Footer actions.
|
|
569
|
+
- **title** — Custom heading element. Overrides the default `<h2>` rendered from the `title` property. Also provides the dialog's accessible name.
|
|
570
570
|
|
|
571
571
|
### CSS parts
|
|
572
572
|
|
|
573
|
+
- `body` — The body wrapper around the default slot.
|
|
573
574
|
- `dialog` — The native `<dialog>` element.
|
|
575
|
+
- `footer` — The footer wrapper around the footer slot.
|
|
574
576
|
- `header` — The header wrapper containing the title and close slot.
|
|
575
577
|
- `title` — The drawer title heading.
|
|
576
|
-
- `body` — The body wrapper around the default slot.
|
|
577
|
-
- `footer` — The footer wrapper around the footer slot.
|
|
578
578
|
|
|
579
579
|
### CSS custom properties
|
|
580
580
|
|
|
581
|
-
- `--
|
|
582
|
-
- `--
|
|
583
|
-
- `--
|
|
584
|
-
- `--shadow` — Drop shadow applied to the floating panel when `inset` is set. Set to `none` to remove it.
|
|
585
|
-
- `--show-duration` (default: `200ms`) — Open transition duration.
|
|
586
|
-
- `--hide-duration` (default: `200ms`) — Close transition duration.
|
|
581
|
+
- `--backdrop` (default: `var(--l-backdrop)`) — Backdrop color.
|
|
582
|
+
- `--backdrop-blur` (default: `0`) — Backdrop blur amount (any CSS length). `0` means no blur; set e.g. `4px` for a subtle frost.
|
|
583
|
+
- `--border-radius` (default: `0.375rem`) — Drawer border radius on the inner edges (all corners when `inset`).
|
|
587
584
|
- `--easing` (default: `cubic-bezier(0.32, 0.72, 0, 1)`) — Timing function of the open and close transitions, backdrop included.
|
|
588
|
-
- `--
|
|
589
|
-
- `--
|
|
585
|
+
- `--hide-duration` (default: `200ms`) — Close transition duration.
|
|
586
|
+
- `--inset-gap` (default: `1rem`) — Gap between the drawer and the viewport edges when `inset` is set.
|
|
590
587
|
- `--padding` (default: `1.5rem`) — Padding applied to the header, footer, and inline-padding of the body. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).
|
|
591
|
-
- `--
|
|
588
|
+
- `--shadow` (default: `var(--l-shadow-lg)`) — Drop shadow applied to the floating panel when `inset` is set (an edge drawer casts none). Set to `none` to remove it.
|
|
589
|
+
- `--show-duration` (default: `300ms`) — Open transition duration.
|
|
590
|
+
- `--size` (default: `320px`) — Drawer size on the axis perpendicular to its edge (width for `start`/`end`, height for `top`/`bottom`).
|
|
591
|
+
- `--width` (default: `31rem`) — Dialog width.
|
|
@@ -400,7 +400,7 @@ A display setting belongs in the menu as a `type="checkbox"` item, not as a swit
|
|
|
400
400
|
|
|
401
401
|
A checkbox item puts its check in the leading column, which leaves no room for an icon. Set `check-placement="end"` to move the check to the trailing edge and free that column, so the row keeps its icon **and** shows whether it is on — and its icon lines up with every other row in the menu.
|
|
402
402
|
|
|
403
|
-
[`<l-color-scheme-icon>`](/elements/color-scheme-icon) in the `prefix` slot then morphs from sun to moon as the row toggles. It stays decorative: the row carries the name, the role and the state.
|
|
403
|
+
[`<l-color-scheme-icon>`](https://luxen-ui.com/elements/color-scheme-icon) in the `prefix` slot then morphs from sun to moon as the row toggles. It stays decorative: the row carries the name, the role and the state.
|
|
404
404
|
|
|
405
405
|
```html
|
|
406
406
|
<l-dropdown>
|
|
@@ -441,7 +441,7 @@ A checkbox item puts its check in the leading column, which leaves no room for a
|
|
|
441
441
|
</l-dropdown>
|
|
442
442
|
```
|
|
443
443
|
|
|
444
|
-
The row reflects and changes the page's [color scheme](/overview/color-scheme); the same glyph works in a header button, outside any menu.
|
|
444
|
+
The row reflects and changes the page's [color scheme](https://luxen-ui.com/overview/color-scheme); the same glyph works in a header button, outside any menu.
|
|
445
445
|
|
|
446
446
|
## Accessibility
|
|
447
447
|
|
|
@@ -488,15 +488,15 @@ import 'luxen-ui/dropdown-label';
|
|
|
488
488
|
|
|
489
489
|
### Attributes & Properties
|
|
490
490
|
|
|
491
|
-
- **open**: `boolean` (default: `false`) — Whether the dropdown is open.
|
|
492
|
-
- **placement**: `Placement` (default: `'bottom-start'`) — Preferred placement of the panel.
|
|
493
|
-
- **distance**: `number` (default: `4`) — Distance in pixels from the trigger.
|
|
494
491
|
- **disabled**: `boolean` (default: `false`) — Disables the dropdown trigger.
|
|
492
|
+
- **distance**: `number` (default: `4`) — Distance in pixels from the trigger.
|
|
495
493
|
- **min-width**: `'trigger' | undefined` — Floor the panel's width at the trigger's width. Set to `trigger` so the
|
|
496
494
|
panel is never narrower than the trigger; it still grows with its content.
|
|
497
495
|
Useful for select-like triggers (a date-range or filter button) where the
|
|
498
496
|
panel should line up with the control. Re-applies if the trigger resizes
|
|
499
497
|
while open.
|
|
498
|
+
- **open**: `boolean` (default: `false`) — Whether the dropdown is open.
|
|
499
|
+
- **placement**: `Placement` (default: `'bottom-start'`) — Preferred placement of the panel.
|
|
500
500
|
|
|
501
501
|
### Methods
|
|
502
502
|
|
|
@@ -514,40 +514,40 @@ while open.
|
|
|
514
514
|
|
|
515
515
|
### Slots
|
|
516
516
|
|
|
517
|
-
- **trigger** — The element that triggers the dropdown.
|
|
518
|
-
- **header** — Optional content rendered above the menu items (e.g. a user profile row). Use an `<l-divider>` (or `<hr>`) after it to separate from items.
|
|
519
517
|
- **(default)** — Menu content (`l-dropdown-item` elements). Drop an `<l-divider>` (or `<hr>`) between items to render a section separator, or an `<l-dropdown-label>` to caption a group of items. Nest items with `slot="submenu"` inside an item to create a submenu.
|
|
520
518
|
- **footer** — Optional content rendered below the menu items (e.g. a version label or shortcut row). Use an `<l-divider>` (or `<hr>`) before it to separate from items.
|
|
519
|
+
- **header** — Optional content rendered above the menu items (e.g. a user profile row). Use an `<l-divider>` (or `<hr>`) after it to separate from items.
|
|
520
|
+
- **trigger** — The element that triggers the dropdown.
|
|
521
521
|
|
|
522
522
|
### CSS custom properties
|
|
523
523
|
|
|
524
524
|
- `--background` (default: `var(--l-color-surface-overlay)`) — Panel background color.
|
|
525
525
|
- `--border-radius` (default: `var(--l-popover-border-radius)`) — Panel border radius. (6px).
|
|
526
|
+
- `--hide-duration` (default: `150ms`) — Hide animation duration.
|
|
526
527
|
- `--padding` (default: `var(--l-popover-padding)`) — Panel inner padding. (0.25rem). Slotted `<l-divider>` elements bleed by this amount on each side to span the panel edges.
|
|
527
528
|
- `--shadow` (default: `var(--l-popover-shadow)`) — Panel box shadow.
|
|
528
529
|
- `--show-duration` (default: `150ms`) — Show animation duration.
|
|
529
|
-
- `--hide-duration` (default: `150ms`) — Hide animation duration.
|
|
530
530
|
|
|
531
531
|
### `dropdown-item` Attributes & Properties
|
|
532
532
|
|
|
533
|
-
- **value**: `string` — The value associated with this item.
|
|
534
|
-
- **disabled**: `boolean` (default: `false`) — Disables the item.
|
|
535
|
-
- **type**: `'normal' | 'checkbox'` (default: `'normal'`) — The type of item: `normal` or `checkbox`.
|
|
536
|
-
- **variant**: `'destructive' | undefined` (default: `undefined`) — Visual variant. `destructive` marks a delete-style action in red.
|
|
537
|
-
- **checked**: `boolean` (default: `false`) — Whether the checkbox item is checked.
|
|
538
|
-
- **submenu-open**: `boolean` (default: `false`) — Whether this item's submenu is open. Managed by the parent `l-dropdown`.
|
|
539
533
|
- **check-placement**: `'start' | 'end'` (default: `'start'`) — Which side of a `type="checkbox"` item carries the check mark. `start` (the
|
|
540
534
|
default) puts it in the leading column, where it takes the place of any
|
|
541
535
|
`prefix`. `end` moves it to the trailing edge, freeing that column so the
|
|
542
536
|
item can show its own icon alongside the state.
|
|
537
|
+
- **checked**: `boolean` (default: `false`) — Whether the checkbox item is checked.
|
|
538
|
+
- **disabled**: `boolean` (default: `false`) — Disables the item.
|
|
543
539
|
- **hasSubmenu**: `boolean` — Whether this item has nested `slot="submenu"` items.
|
|
540
|
+
- **submenu-open**: `boolean` (default: `false`) — Whether this item's submenu is open. Managed by the parent `l-dropdown`.
|
|
541
|
+
- **type**: `'normal' | 'checkbox'` (default: `'normal'`) — The type of item: `normal` or `checkbox`.
|
|
542
|
+
- **value**: `string` — The value associated with this item.
|
|
543
|
+
- **variant**: `'destructive' | undefined` (default: `undefined`) — Visual variant. `destructive` marks a delete-style action in red.
|
|
544
544
|
|
|
545
545
|
### `dropdown-item` Slots
|
|
546
546
|
|
|
547
547
|
- **(default)** — Label text.
|
|
548
548
|
- **prefix** — Leading content (e.g. icon). A `type="checkbox"` item ignores it unless `check-placement="end"` frees the leading column.
|
|
549
|
-
- **suffix** — Trailing content.
|
|
550
549
|
- **submenu** — Nested `l-dropdown-item` elements rendered in a submenu panel anchored to this item. Drop an `<hr>` between them for a separator.
|
|
550
|
+
- **suffix** — Trailing content.
|
|
551
551
|
|
|
552
552
|
### `dropdown-label` Slots
|
|
553
553
|
|
|
@@ -132,10 +132,10 @@ import 'luxen-ui/form-field';
|
|
|
132
132
|
|
|
133
133
|
### Attributes & Properties
|
|
134
134
|
|
|
135
|
+
- **invalid**: `boolean` (default: `false`) — Reflected once the control is invalid after interaction (or set to force the invalid state).
|
|
135
136
|
- **layout**: `'inline' | 'stacked' | undefined` — Layout, derived from the control type (`inline` for checkbox/radio/switch, otherwise `stacked`). Set one to force it.
|
|
136
|
-
- **required**: `boolean` (default: `false`) — Reflected when the control is required. Drives the label marker.
|
|
137
137
|
- **optional**: `boolean` (default: `false`) — Reflected when the control is not required.
|
|
138
|
-
- **
|
|
138
|
+
- **required**: `boolean` (default: `false`) — Reflected when the control is required. Drives the label marker.
|
|
139
139
|
- **unstyled**: `boolean` (default: `false`) — Opt out of auto-styling the control; the ARIA wiring is preserved.
|
|
140
140
|
|
|
141
141
|
### Slots
|
|
@@ -144,5 +144,5 @@ import 'luxen-ui/form-field';
|
|
|
144
144
|
|
|
145
145
|
### CSS classes
|
|
146
146
|
|
|
147
|
-
- `.l-hint` — Helper text element. Always visible; linked via `aria-describedby`.
|
|
148
147
|
- `.l-error` — Error message element. Hidden until invalid, then revealed with `role="alert"` and linked via `aria-describedby`.
|
|
148
|
+
- `.l-hint` — Helper text element. Always visible; linked via `aria-describedby`.
|
|
@@ -129,8 +129,8 @@ import 'luxen-ui/icon';
|
|
|
129
129
|
|
|
130
130
|
### Attributes & Properties
|
|
131
131
|
|
|
132
|
-
- **name**: `string` — The icon name in Iconify format (e.g. `mdi:home`, `lucide:check`).
|
|
133
132
|
- **label**: `string | undefined` — Accessible label. When set, the icon becomes meaningful (`role="img"` + `aria-label`). When absent, the icon is decorative.
|
|
133
|
+
- **name**: `string` — The icon name in Iconify format (e.g. `mdi:home`, `lucide:check`).
|
|
134
134
|
|
|
135
135
|
### CSS custom properties
|
|
136
136
|
|
|
@@ -181,11 +181,11 @@ import 'luxen-ui/input-otp';
|
|
|
181
181
|
|
|
182
182
|
Set `--digits` on `<l-input-otp>` to change the digit count.
|
|
183
183
|
|
|
184
|
-
- `--digits` — Number of digit boxes (default: 6). Must match input's maxlength.
|
|
185
|
-
- `--cell-size` — Cell width and height (default: 2.75rem). Font size scales automatically.
|
|
186
|
-
- `--cell-gap` — Space between cells (default: 0.5rem).
|
|
187
184
|
- `--cell-bg-color` — Cell background color (default: a faint ink tint over `--l-form-control-background-color`).
|
|
188
185
|
- `--cell-border-color` — Cell border color (default: `var(--l-form-control-border-color)`).
|
|
189
186
|
- `--cell-border-radius` — Cell border-radius (default: `var(--l-form-control-border-radius)`, like the other text fields).
|
|
190
|
-
- `--cell-focus-color` — Border
|
|
191
|
-
- `--cell-focus-ring` — `box-shadow` of the active cell
|
|
187
|
+
- `--cell-focus-color` (default: `--l-focus-ring-color`) — Border, stroke and halo color of the active (focused) cell.
|
|
188
|
+
- `--cell-focus-ring` — `box-shadow` of the active cell (defaults to the text-field focus halo, `--l-form-control-focus-halo-width` wide; set to `none` to disable).
|
|
189
|
+
- `--cell-gap` — Space between cells (default: 0.5rem).
|
|
190
|
+
- `--cell-size` — Cell width and height (default: 2.75rem). Font size scales automatically.
|
|
191
|
+
- `--digits` — Number of digit boxes (default: 6). Must match input's maxlength.
|
|
@@ -358,13 +358,13 @@ import 'luxen-ui/input-stepper';
|
|
|
358
358
|
|
|
359
359
|
### Attributes & Properties
|
|
360
360
|
|
|
361
|
-
- **
|
|
361
|
+
- **decrement-icon**: `string` (default: `'lucide:minus'`) — Icon name for the decrement button.
|
|
362
|
+
- **increment-icon**: `string` (default: `'lucide:plus'`) — Icon name for the increment button.
|
|
362
363
|
- **max**: `number | undefined` — Maximum allowed value. Falls back to the input's `max` attribute.
|
|
363
|
-
- **
|
|
364
|
+
- **min**: `number | undefined` — Minimum allowed value. Falls back to the input's `min` attribute.
|
|
364
365
|
- **size**: `InputStepperSize` (default: `'md'`) — Control size.
|
|
366
|
+
- **step**: `number | undefined` — Step increment. Falls back to the input's `step` attribute.
|
|
365
367
|
- **with-roller**: `boolean` (default: `false`) — Enable the animated number roller overlay.
|
|
366
|
-
- **decrement-icon**: `string` (default: `'lucide:minus'`) — Icon name for the decrement button.
|
|
367
|
-
- **increment-icon**: `string` (default: `'lucide:plus'`) — Icon name for the increment button.
|
|
368
368
|
|
|
369
369
|
### Events
|
|
370
370
|
|
|
@@ -19,7 +19,7 @@ Inputs let users enter and edit text, numbers, dates, and other single-line valu
|
|
|
19
19
|
</l-form-field>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
[`l-form-field`](/elements/form-field) auto-styles a bare text `<input>` and wires the accessibility (label, hint, error, `aria-*`). Standalone, apply `.l-input` to the input yourself.
|
|
22
|
+
[`l-form-field`](https://luxen-ui.com/elements/form-field) auto-styles a bare text `<input>` and wires the accessibility (label, hint, error, `aria-*`). Standalone, apply `.l-input` to the input yourself.
|
|
23
23
|
|
|
24
24
|
## Options
|
|
25
25
|
|
|
@@ -226,13 +226,13 @@ The CSS covers everything except the password toggle; the JS import upgrades `l-
|
|
|
226
226
|
|
|
227
227
|
### Attributes & Properties
|
|
228
228
|
|
|
229
|
-
- **
|
|
229
|
+
- **aria-invalid** — Set to `true` to force the invalid style (otherwise applied via `:user-invalid`). `l-form-field` manages this automatically.
|
|
230
230
|
- **data-size**: `xs | sm | md | lg | xl` — Control height on the shared `--l-size-control-*` scale (default `md`). Affects only the height, not the label or hint/error.
|
|
231
|
-
- **placeholder** — Native placeholder text.
|
|
232
231
|
- **disabled** — Disables the input.
|
|
233
|
-
- **
|
|
232
|
+
- **placeholder** — Native placeholder text.
|
|
234
233
|
- **readonly** — Makes the input read-only.
|
|
235
|
-
- **
|
|
234
|
+
- **required** — Marks the input as required for form submission.
|
|
235
|
+
- **type**: `text | search | number | password | email | url | tel | date | time` — Native input type. `date`/`time` get custom picker icons; `search` gets a custom clear button.
|
|
236
236
|
|
|
237
237
|
### CSS classes
|
|
238
238
|
|
|
@@ -240,16 +240,23 @@ The CSS covers everything except the password toggle; the JS import upgrades `l-
|
|
|
240
240
|
|
|
241
241
|
### CSS custom properties
|
|
242
242
|
|
|
243
|
-
- `--height` (default: `var(--l-form-control-height)`) — Control height.
|
|
244
243
|
- `--border-radius` (default: `var(--l-form-control-border-radius)`) — Control border radius.
|
|
245
244
|
- `--calendar-icon` — Date picker glyph as a `url()`. Masked, so color is taken from the control, not the image.
|
|
246
|
-
- `--clock-icon` — Time picker glyph as a `url()`.
|
|
247
245
|
- `--clear-icon` — Search clear glyph as a `url()`.
|
|
246
|
+
- `--clock-icon` — Time picker glyph as a `url()`.
|
|
247
|
+
- `--height` (default: `var(--l-form-control-height)`) — Control height.
|
|
248
248
|
- `--l-form-control-icon-size` (default: `1em`) — Glyph size of the date/time picker icon and the search clear (global form-control token). Their hit area is a square of the control height (borders excluded).
|
|
249
249
|
|
|
250
|
-
###
|
|
250
|
+
### `input-group` Attributes & Properties
|
|
251
251
|
|
|
252
252
|
- **password-toggle**: `boolean` (default: `false`) — Inject a show/hide toggle button after the inner `input[type="password"]`.
|
|
253
253
|
- **size**: `'xs' | 'sm' | 'md' | 'lg' | 'xl' | undefined` (default: `md`) — Control size — maps the height to the shared `--l-size-control-*` scale ().
|
|
254
254
|
|
|
255
|
+
### `input-group` CSS classes
|
|
256
|
+
|
|
255
257
|
- `.l-input-group-toggle` — The injected show/hide password button.
|
|
258
|
+
|
|
259
|
+
### `input-group` CSS custom properties
|
|
260
|
+
|
|
261
|
+
- `--border-radius` (default: `var(--l-form-control-border-radius)`) — Corner radius.
|
|
262
|
+
- `--height` (default: `var(--l-form-control-height)`) — Control height.
|
|
@@ -365,30 +365,30 @@ import 'luxen-ui/popover';
|
|
|
365
365
|
|
|
366
366
|
### Attributes & Properties
|
|
367
367
|
|
|
368
|
-
- **for**: `string` — The HTML id of the element triggering the popover.
|
|
369
|
-
- **placement**: `Placement` (default: `'bottom'`) — The preferred placement of the popover.
|
|
370
368
|
- **distance**: `number` (default: `8`) — The distance in pixels from the target element.
|
|
371
|
-
- **
|
|
372
|
-
- **without-arrow**: `boolean` (default: `false`) — Hide the directional arrow.
|
|
369
|
+
- **for**: `string` — The HTML id of the element triggering the popover.
|
|
373
370
|
- **full-width**: `boolean` (default: `false`) — Stretch the popover to the viewport width. Useful for mega menus.
|
|
371
|
+
- **open**: `boolean` (default: `false`) — Whether or not the popover is visible.
|
|
372
|
+
- **placement**: `Placement` (default: `'bottom'`) — The preferred placement of the popover.
|
|
374
373
|
- **trigger**: `string` (default: `'click'`) — Space-separated list of trigger modes: `click`, `hover`, `focus`, `manual`.
|
|
374
|
+
- **without-arrow**: `boolean` (default: `false`) — Hide the directional arrow.
|
|
375
375
|
|
|
376
376
|
### Methods
|
|
377
377
|
|
|
378
378
|
- **show()**
|
|
379
379
|
- **hide()**
|
|
380
|
-
- **toggle()**
|
|
381
380
|
- **reposition()** — Recompute the position against the current trigger. Use it when you move
|
|
382
381
|
the anchor yourself and the panel has to follow. No-op when closed; hides
|
|
383
382
|
if the anchor is gone.
|
|
383
|
+
- **toggle()**
|
|
384
384
|
|
|
385
385
|
### CSS custom properties
|
|
386
386
|
|
|
387
|
+
- `--arrow-size` (default: `8px`) — Arrow size.
|
|
387
388
|
- `--background` (default: `var(--l-color-surface-overlay)`) — Background color.
|
|
388
|
-
- `--color` — Text color. Default: inherited.
|
|
389
389
|
- `--border-radius` (default: `var(--l-popover-border-radius)`) — Border radius. (6px).
|
|
390
|
+
- `--color` — Text color. Default: inherited.
|
|
391
|
+
- `--hide-duration` (default: `150ms`) — Hide animation duration.
|
|
390
392
|
- `--max-width` (default: `320px`) — Maximum width.
|
|
391
393
|
- `--shadow` (default: `var(--l-popover-shadow)`) — Box shadow.
|
|
392
|
-
- `--arrow-size` (default: `8px`) — Arrow size.
|
|
393
394
|
- `--show-duration` (default: `150ms`) — Show animation duration.
|
|
394
|
-
- `--hide-duration` (default: `150ms`) — Hide animation duration.
|
|
@@ -108,8 +108,8 @@ Add `data-orientation="vertical"` attribute.
|
|
|
108
108
|
|
|
109
109
|
### Attributes & Properties
|
|
110
110
|
|
|
111
|
-
- **value** — Current progress between `0` and `1` (omit for indeterminate).
|
|
112
111
|
- **data-orientation** — vertical — Vertical orientation.
|
|
112
|
+
- **value** — Current progress between `0` and `1` (omit for indeterminate).
|
|
113
113
|
|
|
114
114
|
### CSS classes
|
|
115
115
|
|
|
@@ -117,7 +117,7 @@ Add `data-orientation="vertical"` attribute.
|
|
|
117
117
|
|
|
118
118
|
### CSS custom properties
|
|
119
119
|
|
|
120
|
+
- `--indeterminate-animation` — Animation name for the indeterminate state.
|
|
121
|
+
- `--indicator-color` — Fill/indicator color.
|
|
120
122
|
- `--size` (default: `4px`) — Bar thickness.
|
|
121
123
|
- `--track-color` — Track background color.
|
|
122
|
-
- `--indicator-color` — Fill/indicator color.
|
|
123
|
-
- `--indeterminate-animation` — Animation name for the indeterminate state.
|
|
@@ -146,79 +146,78 @@ import 'luxen-ui/prose-editor';
|
|
|
146
146
|
|
|
147
147
|
### Attributes & Properties
|
|
148
148
|
|
|
149
|
+
- **autofocus**: `boolean` (default: `false`) — Focus the editor on creation.
|
|
149
150
|
- **editor**: `Editor` — The Tiptap editor instance. Available after the first render.
|
|
150
|
-
- **initial-html**: `string` — Initial HTML content.
|
|
151
|
-
- **initial-json**: `string` — Initial content as a serialized ProseMirror JSON string.
|
|
152
151
|
- **editor-class**: `string` (default: `'prose'`) — Class applied to the `.ProseMirror` editable element (e.g. for Tailwind Typography `prose`).
|
|
153
|
-
- **toolbar**: `ToolbarCommandName[]` (default: `[]`) — Explicit list of toolbar commands. Overrides `toolbar-preset` when set.
|
|
154
|
-
- **toolbar-preset**: `'default' | 'minimal'` (default: `'default'`) — Built-in toolbar layout used when `toolbar` is not set.
|
|
155
|
-
- **toolbar-placement**: `'top' | 'bottom'` (default: `'top'`) — Where the toolbar sits relative to the content.
|
|
156
|
-
- **autofocus**: `boolean` (default: `false`) — Focus the editor on creation.
|
|
157
|
-
- **placeholder**: `string` — Placeholder shown when the editor is empty.
|
|
158
152
|
- **emoji-data-source**: `string` — URL the emoji picker fetches its data from. Point this at a locally served
|
|
159
153
|
`emojibase-data` JSON to run fully offline (no CDN). Defaults to the
|
|
160
154
|
picker's bundled CDN source.
|
|
155
|
+
- **initial-html**: `string` — Initial HTML content.
|
|
156
|
+
- **initial-json**: `string` — Initial content as a serialized ProseMirror JSON string.
|
|
157
|
+
- **placeholder**: `string` — Placeholder shown when the editor is empty.
|
|
158
|
+
- **toolbar**: `ToolbarCommandName[]` (default: `[]`) — Explicit list of toolbar commands. Overrides `toolbar-preset` when set.
|
|
159
|
+
- **toolbar-placement**: `'top' | 'bottom'` (default: `'top'`) — Where the toolbar sits relative to the content.
|
|
160
|
+
- **toolbar-preset**: `'default' | 'minimal'` (default: `'default'`) — Built-in toolbar layout used when `toolbar` is not set.
|
|
161
161
|
- **validationTarget**: `HTMLElement | undefined`
|
|
162
162
|
|
|
163
163
|
### Methods
|
|
164
164
|
|
|
165
|
-
- **
|
|
166
|
-
- **getJSON()** → `JSONContent` — Get the current content as ProseMirror JSON.
|
|
165
|
+
- **blur()**
|
|
167
166
|
- **clear()** — Remove all content.
|
|
168
167
|
- **focus()**
|
|
169
|
-
- **
|
|
168
|
+
- **getHTML()** → `string` — Get the current content as an HTML string. Empty paragraph resolves to `''`.
|
|
169
|
+
- **getJSON()** → `JSONContent` — Get the current content as ProseMirror JSON.
|
|
170
|
+
- **redo()**
|
|
171
|
+
- **setHorizontalRule()**
|
|
172
|
+
- **toggleBlockquote()**
|
|
170
173
|
- **toggleBold()**
|
|
171
|
-
- **toggleItalic()**
|
|
172
|
-
- **toggleUnderline()**
|
|
173
|
-
- **toggleStrike()**
|
|
174
|
-
- **toggleHighlight()**
|
|
175
|
-
- **toggleHeading(level: 1 | 2 | 3)**
|
|
176
174
|
- **toggleBulletList()**
|
|
177
|
-
- **toggleOrderedList()**
|
|
178
|
-
- **toggleBlockquote()**
|
|
179
175
|
- **toggleCodeBlock()**
|
|
180
|
-
- **
|
|
181
|
-
- **
|
|
182
|
-
- **
|
|
176
|
+
- **toggleHeading(level: 1 | 2 | 3)**
|
|
177
|
+
- **toggleHighlight()**
|
|
178
|
+
- **toggleItalic()**
|
|
183
179
|
- **toggleLink()**
|
|
184
|
-
- **
|
|
180
|
+
- **toggleOrderedList()**
|
|
181
|
+
- **toggleStrike()**
|
|
182
|
+
- **toggleUnderline()**
|
|
183
|
+
- **undo()**
|
|
185
184
|
|
|
186
185
|
### Events
|
|
187
186
|
|
|
188
|
-
- **change** — Fired when the content changes. Bubbles. Properties: `html: string`, `json: JSONContent`.
|
|
189
187
|
- **add-file** — Fired when the attachment toolbar button is clicked.
|
|
188
|
+
- **change** — Fired when the content changes. Bubbles. Properties: `html: string`, `json: JSONContent`.
|
|
190
189
|
|
|
191
190
|
### Slots
|
|
192
191
|
|
|
193
|
-
- **toolbar-start** — Content placed before the generated toolbar buttons.
|
|
194
192
|
- **toolbar-end** — Content placed after the generated toolbar buttons.
|
|
193
|
+
- **toolbar-start** — Content placed before the generated toolbar buttons.
|
|
195
194
|
|
|
196
|
-
### CSS
|
|
195
|
+
### CSS parts
|
|
197
196
|
|
|
198
|
-
- `wrapper` — The editor frame wrapping the toolbar and content.
|
|
199
|
-
- `toolbar` — The toolbar row.
|
|
200
|
-
- `toolbar-button` — Any toolbar button.
|
|
201
197
|
- `divider` — A toolbar divider.
|
|
202
198
|
- `editor` — The container around the editable content.
|
|
199
|
+
- `toolbar` — The toolbar row.
|
|
200
|
+
- `toolbar-button` — Any toolbar button.
|
|
201
|
+
- `wrapper` — The editor frame wrapping the toolbar and content.
|
|
203
202
|
|
|
204
203
|
### CSS custom properties
|
|
205
204
|
|
|
205
|
+
- `--background` — Background color of the editor.
|
|
206
206
|
- `--border-color` — Color of the editor frame border.
|
|
207
207
|
- `--border-color-focus` — Color of the editor frame border while the editable area has focus.
|
|
208
|
-
- `--border-width` — Width of the editor frame border.
|
|
209
208
|
- `--border-radius` — Corner radius of the editor frame.
|
|
210
|
-
- `--
|
|
209
|
+
- `--border-width` — Width of the editor frame border.
|
|
211
210
|
- `--color` — Text color of the editor.
|
|
211
|
+
- `--content-min-height` (default: `8rem`) — Minimum height of the editable content region.
|
|
212
|
+
- `--content-padding` (default: `0.75rem 1rem`) — Padding inside the editable content region.
|
|
213
|
+
- `--placeholder-color` — Placeholder text color.
|
|
212
214
|
- `--toolbar-background` — Background color of the toolbar.
|
|
213
|
-
- `--toolbar-
|
|
214
|
-
- `--toolbar-
|
|
215
|
-
- `--toolbar-divider-color` — Color of toolbar dividers.
|
|
216
|
-
- `--toolbar-button-size` — Size of toolbar buttons.
|
|
217
|
-
- `--toolbar-button-radius` — Corner radius of toolbar buttons.
|
|
215
|
+
- `--toolbar-button-background-active` — Background of active toolbar buttons.
|
|
216
|
+
- `--toolbar-button-background-hover` — Background of hovered toolbar buttons.
|
|
218
217
|
- `--toolbar-button-color` — Icon color of inactive toolbar buttons.
|
|
219
218
|
- `--toolbar-button-color-active` — Icon color of hovered/active toolbar buttons.
|
|
220
|
-
- `--toolbar-button-
|
|
221
|
-
- `--toolbar-button-
|
|
222
|
-
- `--
|
|
223
|
-
- `--
|
|
224
|
-
- `--
|
|
219
|
+
- `--toolbar-button-radius` — Corner radius of toolbar buttons.
|
|
220
|
+
- `--toolbar-button-size` — Size of toolbar buttons.
|
|
221
|
+
- `--toolbar-divider-color` — Color of toolbar dividers.
|
|
222
|
+
- `--toolbar-gap` — Gap between toolbar buttons.
|
|
223
|
+
- `--toolbar-padding` — Padding around the toolbar.
|
|
@@ -31,9 +31,9 @@ Radios let users pick a single option from a set of mutually exclusive choices.
|
|
|
31
31
|
</fieldset>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
[`l-form-field`](/elements/form-field) auto-styles a bare `<input type="radio">` and wires the accessibility (label, hint, error, `aria-*`); standalone, apply `.l-radio` to the input yourself. Radios that share a `name` form a group — selecting one deselects the others, and arrow keys move between them. Wrap the group in a `<fieldset>` with a `<legend>` for the shared question.
|
|
34
|
+
[`l-form-field`](https://luxen-ui.com/elements/form-field) auto-styles a bare `<input type="radio">` and wires the accessibility (label, hint, error, `aria-*`); standalone, apply `.l-radio` to the input yourself. Radios that share a `name` form a group — selecting one deselects the others, and arrow keys move between them. Wrap the group in a `<fieldset>` with a `<legend>` for the shared question.
|
|
35
35
|
|
|
36
|
-
For two opposite options where neither is a sensible default, prefer a single checkbox or a switch. For more than ~5 options, prefer a [select](/elements/select).
|
|
36
|
+
For two opposite options where neither is a sensible default, prefer a single checkbox or a switch. For more than ~5 options, prefer a [select](https://luxen-ui.com/elements/select).
|
|
37
37
|
|
|
38
38
|
## Options
|
|
39
39
|
|
|
@@ -239,12 +239,12 @@ Wrap the group in a `<fieldset class="l-radio-group">` with a `<legend>` so assi
|
|
|
239
239
|
|
|
240
240
|
### Attributes & Properties
|
|
241
241
|
|
|
242
|
-
- **
|
|
243
|
-
- **value** — The value submitted with the form when this radio is the selected one in its group.
|
|
242
|
+
- **aria-invalid** — Set to `true` to force the invalid style (otherwise applied via `:user-invalid`). `l-form-field` manages this automatically.
|
|
244
243
|
- **checked** — Whether the radio is selected.
|
|
245
244
|
- **disabled** — Disables the radio.
|
|
245
|
+
- **name** — Groups radios so only one can be selected at a time. Every radio in a group shares the same `name`.
|
|
246
246
|
- **required** — Marks the group as required for form submission.
|
|
247
|
-
- **
|
|
247
|
+
- **value** — The value submitted with the form when this radio is the selected one in its group.
|
|
248
248
|
|
|
249
249
|
### CSS classes
|
|
250
250
|
|
|
@@ -252,6 +252,6 @@ Wrap the group in a `<fieldset class="l-radio-group">` with a `<legend>` so assi
|
|
|
252
252
|
|
|
253
253
|
### CSS custom properties
|
|
254
254
|
|
|
255
|
-
- `--size` (default: `1.25em`) — Box size.
|
|
256
255
|
- `--accent` (default: `var(--l-form-control-activated-color)`) — Selected fill color.
|
|
257
256
|
- `--dot` — Selected dot icon as a `url()`. Override to swap the SVG (color is baked into the image).
|
|
257
|
+
- `--size` (default: `1.25em`) — Box size.
|
|
@@ -208,7 +208,7 @@ Avatar group + star rating as a trust badge.
|
|
|
208
208
|
- **Role** — In edit mode, uses native `<input type="radio">` elements — built-in semantics
|
|
209
209
|
- **Accessible name** — Provide an associated label via `<label>` or `aria-label` when in edit mode
|
|
210
210
|
- **Non-text contrast** — Star colors must meet non-text contrast ratio against the background
|
|
211
|
-
- **Focus** —
|
|
211
|
+
- **Focus** — Keyboard focus draws the global focus ring around the focused star (`:focus-visible`)
|
|
212
212
|
|
|
213
213
|
### Rules
|
|
214
214
|
|
|
@@ -232,31 +232,23 @@ import 'luxen-ui/rating';
|
|
|
232
232
|
### Attributes & Properties
|
|
233
233
|
|
|
234
234
|
- **edit-mode**: `boolean` (default: `false`)
|
|
235
|
-
- **labels**: `string[]` (default: `[]`)
|
|
236
|
-
- **value**: `number` (default: `0`)
|
|
237
|
-
- **length**: `number` (default: `5`)
|
|
238
235
|
- **getIcon**: `(value: number) => string | undefined` — Optional callback returning a CSS `url()` string for a given position (1-based).
|
|
239
|
-
|
|
240
|
-
### Methods
|
|
241
|
-
|
|
242
|
-
- **edit-mode**: `boolean` (default: `false`)
|
|
243
236
|
- **labels**: `string[]` (default: `[]`)
|
|
244
|
-
- **value**: `number` (default: `0`)
|
|
245
237
|
- **length**: `number` (default: `5`)
|
|
246
|
-
- **
|
|
238
|
+
- **value**: `number` (default: `0`)
|
|
247
239
|
|
|
248
240
|
### Events
|
|
249
241
|
|
|
250
242
|
- **change** — Emitted when the rating value changes in edit mode. Bubbles. Properties: `name: string`, `value: string`, `checked: boolean`, `sourceEvent: Event`.
|
|
251
243
|
|
|
252
|
-
### CSS
|
|
244
|
+
### CSS parts
|
|
253
245
|
|
|
254
246
|
- `label` — The label element shown in edit mode.
|
|
255
247
|
|
|
256
248
|
### CSS custom properties
|
|
257
249
|
|
|
258
|
-
- `--icon-size` (default: `20px`) — The size of each icon.
|
|
259
250
|
- `--active-color` (default: `gold`) — The fill color for rated icons.
|
|
251
|
+
- `--icon` — Custom SVG shape as a `url()`. Defaults to a 5-pointed star.
|
|
252
|
+
- `--icon-size` (default: `20px`) — The size of each icon.
|
|
260
253
|
- `--inactive-color` (default: `#ddd`) — The fill color for empty icons.
|
|
261
254
|
- `--spacing` (default: `0px`) — The spacing between icons.
|
|
262
|
-
- `--icon` — Custom SVG shape as a `url()`. Defaults to a 5-pointed star.
|