@domphy/ui 0.21.0 → 0.21.2
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/CHANGELOG.md +16 -0
- package/dist/core-theme-ui.global.js +6 -6
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -30
- package/dist/index.d.ts +56 -30
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -359,14 +359,23 @@ declare function details(props?: {
|
|
|
359
359
|
* dialog, restores focus to the previously focused element on close, sets
|
|
360
360
|
* `aria-modal`, and closes on outside (backdrop) click. Apply to a `<dialog>`.
|
|
361
361
|
*
|
|
362
|
+
* Accessible name/description: pass `labelledBy`/`describedBy` the `id` of a
|
|
363
|
+
* heading/paragraph inside the dialog (Radix Title/Description parity). The
|
|
364
|
+
* native `ariaLabelledby`/`ariaDescribedby` attributes on the host element
|
|
365
|
+
* remain an equivalent escape hatch (the native element always wins).
|
|
366
|
+
*
|
|
362
367
|
* @hostTag dialog
|
|
363
368
|
* @param props.color - Theme color tone for the dialog surface. Defaults to "neutral".
|
|
364
369
|
* @param props.open - Open state (`ValueOrState<boolean>`); set it to true/false to show/hide. Defaults to false.
|
|
365
|
-
* @
|
|
370
|
+
* @param props.labelledBy - `id` of the element labeling the dialog (wired to `aria-labelledby`). Optional.
|
|
371
|
+
* @param props.describedBy - `id` of the element describing the dialog (wired to `aria-describedby`). Optional.
|
|
372
|
+
* @example { dialog: [{ h2: "Confirm", id: "dlg-title" }], $: [dialog({ open, labelledBy: "dlg-title" })] }
|
|
366
373
|
*/
|
|
367
374
|
declare function dialog(props?: {
|
|
368
375
|
color?: ThemeColor;
|
|
369
376
|
open?: ValueOrState<boolean>;
|
|
377
|
+
labelledBy?: string;
|
|
378
|
+
describedBy?: string;
|
|
370
379
|
}): PartialElement;
|
|
371
380
|
|
|
372
381
|
/**
|
|
@@ -449,6 +458,10 @@ declare function empty(props?: {
|
|
|
449
458
|
* caught. Errors during static construction propagate normally — those are
|
|
450
459
|
* programming errors, not runtime data errors.
|
|
451
460
|
*
|
|
461
|
+
* `reset()` restores the original children (including a reactive children
|
|
462
|
+
* function) so the next evaluation runs again — it does not leave the host
|
|
463
|
+
* empty.
|
|
464
|
+
*
|
|
452
465
|
* @hostTag any
|
|
453
466
|
* @param props.fallback - Fallback element or factory `(error, reset) => element`. Defaults to a plain error message div.
|
|
454
467
|
* @param props.onError - Optional callback for logging/telemetry.
|
|
@@ -604,7 +617,7 @@ declare function inputCheckbox(props?: {
|
|
|
604
617
|
/**
|
|
605
618
|
* Styles a native color picker swatch with themed padding, rounded swatch and
|
|
606
619
|
* disabled styling. Apply to an `<input>` element of type `color` (the patch
|
|
607
|
-
*
|
|
620
|
+
* default is `type: "color"`; a native `type` wins).
|
|
608
621
|
*
|
|
609
622
|
* @hostTag input
|
|
610
623
|
* @param props.color - Optional theme color tone used for the disabled state (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -620,7 +633,7 @@ type InputDateTimeMode = "date" | "time" | "week" | "month" | "datetime-local";
|
|
|
620
633
|
/**
|
|
621
634
|
* Styles a native date/time input with themed border, padding, hover, focus,
|
|
622
635
|
* invalid and disabled states. The `mode` selects the input `type`. Apply to
|
|
623
|
-
* an `<input>` element (the patch
|
|
636
|
+
* an `<input>` element (the patch default `type` is the chosen `mode`; a native `type` wins).
|
|
624
637
|
*
|
|
625
638
|
* @hostTag input
|
|
626
639
|
* @param props.mode - Input mode selecting the host `type`: `"date" | "time" | "week" | "month" | "datetime-local"`. Defaults to `"datetime-local"`.
|
|
@@ -637,7 +650,7 @@ declare function inputDateTime(props?: {
|
|
|
637
650
|
/**
|
|
638
651
|
* Styles a native file input with a themed upload button, border, hover, focus
|
|
639
652
|
* and disabled states. Apply to an `<input>` element of type `file` (the patch
|
|
640
|
-
*
|
|
653
|
+
* default is `type: "file"`; a native `type` wins).
|
|
641
654
|
*
|
|
642
655
|
* @hostTag input
|
|
643
656
|
* @param props.color - Optional theme color tone for text/border and the upload button (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -652,7 +665,7 @@ declare function inputFile(props?: {
|
|
|
652
665
|
/**
|
|
653
666
|
* Styles a native number input with themed border, padding, visible spin
|
|
654
667
|
* buttons, hover, focus and disabled states. Apply to an `<input>` element of
|
|
655
|
-
* type `number` (the patch
|
|
668
|
+
* type `number` (the patch default is `type: "number"`; a native `type` wins).
|
|
656
669
|
*
|
|
657
670
|
* @hostTag input
|
|
658
671
|
* @param props.color - Optional theme color tone for text/border (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -678,16 +691,32 @@ declare function inputOTP(): PartialElement;
|
|
|
678
691
|
/**
|
|
679
692
|
* Password input wrapper: a styled `<div>` that inserts an `<input type="password">`
|
|
680
693
|
* and a show/hide toggle button. The outer div carries the focus-ring outline via
|
|
681
|
-
* `:focus-within`. Apply to an empty `<div>`.
|
|
694
|
+
* `:focus-within`. Apply to an empty `<div>`. Host `value`/`name`/`onInput`/
|
|
695
|
+
* `disabled`/`required` are forwarded onto the real input so the field
|
|
696
|
+
* participates in FormData.
|
|
682
697
|
*
|
|
683
698
|
* @hostTag div
|
|
684
699
|
* @param props.color - Base color tone for border/background/text. Defaults to `"neutral"`.
|
|
685
700
|
* @param props.accentColor - Accent outline color on focus-within. Defaults to `"primary"`.
|
|
686
|
-
* @
|
|
701
|
+
* @param props.value - Forwarded onto the inner input. Optional.
|
|
702
|
+
* @param props.name - Forwarded onto the inner input (FormData key). Optional.
|
|
703
|
+
* @param props.onInput - Forwarded onto the inner input. Optional.
|
|
704
|
+
* @param props.disabled - Forwarded onto the inner input. Optional.
|
|
705
|
+
* @param props.required - Forwarded onto the inner input. Optional.
|
|
706
|
+
* @param props.autocomplete - Native autocomplete token. Defaults to `"current-password"`.
|
|
707
|
+
* @param props.ariaLabel - Accessible name for the inner input. Defaults to `"Password"`.
|
|
708
|
+
* @example { div: null, name: "password", $: [inputPassword()] }
|
|
687
709
|
*/
|
|
688
710
|
declare function inputPassword(props?: {
|
|
689
711
|
color?: ValueOrState<ThemeColor>;
|
|
690
712
|
accentColor?: ValueOrState<ThemeColor>;
|
|
713
|
+
value?: ValueOrState<string>;
|
|
714
|
+
name?: string;
|
|
715
|
+
onInput?: (event: Event) => void;
|
|
716
|
+
disabled?: ValueOrState<boolean>;
|
|
717
|
+
required?: boolean;
|
|
718
|
+
autocomplete?: string;
|
|
719
|
+
ariaLabel?: string;
|
|
691
720
|
}): PartialElement;
|
|
692
721
|
|
|
693
722
|
/**
|
|
@@ -723,7 +752,7 @@ declare function inputRange(props?: {
|
|
|
723
752
|
/**
|
|
724
753
|
* Styles a search input with themed border, padding, placeholder color, native
|
|
725
754
|
* search decorations, hover, focus and disabled states. Apply to an `<input>`
|
|
726
|
-
* element of type `search` (the patch
|
|
755
|
+
* element of type `search` (the patch default is `type: "search"`; a native `type` wins).
|
|
727
756
|
*
|
|
728
757
|
* @hostTag input
|
|
729
758
|
* @param props.color - Optional theme color tone for text/border/placeholder (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -836,7 +865,7 @@ declare function linkButton(props?: {
|
|
|
836
865
|
* @param props.color - Surface color tone. Optional `ThemeColor`, defaults to `"neutral"`.
|
|
837
866
|
* @example { ul: [...], $: [list()] }
|
|
838
867
|
*/
|
|
839
|
-
declare function list(
|
|
868
|
+
declare function list(props?: {
|
|
840
869
|
color?: ThemeColor;
|
|
841
870
|
}): PartialElement;
|
|
842
871
|
/**
|
|
@@ -1085,11 +1114,22 @@ declare function progress(props?: {
|
|
|
1085
1114
|
accentColor?: ValueOrState<ThemeColor>;
|
|
1086
1115
|
}): PartialElement;
|
|
1087
1116
|
|
|
1117
|
+
type RatingProps = {
|
|
1118
|
+
value?: ValueOrState<number>;
|
|
1119
|
+
max?: number;
|
|
1120
|
+
onChange?: (value: number) => void;
|
|
1121
|
+
readOnly?: boolean;
|
|
1122
|
+
color?: ThemeColor;
|
|
1123
|
+
};
|
|
1088
1124
|
/**
|
|
1089
1125
|
* Interactive star rating applied to a container `<div>`. Manages its own star
|
|
1090
1126
|
* children: click to set, Arrow keys to adjust, hover to preview. In `readOnly`
|
|
1091
1127
|
* mode stars are non-interactive. Apply to a `<div>` element.
|
|
1092
1128
|
*
|
|
1129
|
+
* Star insert runs in `_onInit` (SSR markup). `onChange`/`readOnly`/`max` and
|
|
1130
|
+
* a plain-number `value` stay live via `behavior()` `update()` so a reused
|
|
1131
|
+
* node picks up the latest factory props.
|
|
1132
|
+
*
|
|
1093
1133
|
* @hostTag div
|
|
1094
1134
|
* @param props.value - Current rating (0 – max). `ValueOrState<number>`, defaults to `0`.
|
|
1095
1135
|
* @param props.max - Total number of stars. Optional `number`, defaults to `5`.
|
|
@@ -1098,13 +1138,7 @@ declare function progress(props?: {
|
|
|
1098
1138
|
* @param props.color - Star color tone. Optional `ThemeColor`, defaults to `"warning"`.
|
|
1099
1139
|
* @example { div: null, $: [rating({ value: ratingState, onChange: (v) => ratingState.set(v) })] }
|
|
1100
1140
|
*/
|
|
1101
|
-
declare function rating(props?:
|
|
1102
|
-
value?: ValueOrState<number>;
|
|
1103
|
-
max?: number;
|
|
1104
|
-
onChange?: (value: number) => void;
|
|
1105
|
-
readOnly?: boolean;
|
|
1106
|
-
color?: ThemeColor;
|
|
1107
|
-
}): PartialElement;
|
|
1141
|
+
declare function rating(props?: RatingProps): PartialElement;
|
|
1108
1142
|
|
|
1109
1143
|
/**
|
|
1110
1144
|
* Circular ring progress indicator rendered via CSS `conic-gradient` and a
|
|
@@ -1212,6 +1246,9 @@ declare function select(props?: {
|
|
|
1212
1246
|
* A clickable select trigger box that renders the currently selected option(s) as removable
|
|
1213
1247
|
* tags and toggles a floating popover (the dropdown content) anchored to itself. Selected
|
|
1214
1248
|
* labels are derived from `options` matching the bound `value`; removing a tag updates the value.
|
|
1249
|
+
* Keyboard: Enter/Space toggle, ArrowDown opens, Escape closes, and printable characters
|
|
1250
|
+
* typeahead-search options (closed: selects the match; open: focuses the matching
|
|
1251
|
+
* `[role=option]` in the panel; a repeated character cycles matches).
|
|
1215
1252
|
*
|
|
1216
1253
|
* @hostTag div
|
|
1217
1254
|
* @param props.multiple - Whether multiple selection is allowed (renders removable tags and
|
|
@@ -1338,17 +1375,6 @@ declare function splitter(props?: {
|
|
|
1338
1375
|
min?: number;
|
|
1339
1376
|
max?: number;
|
|
1340
1377
|
}): PartialElement;
|
|
1341
|
-
/**
|
|
1342
|
-
* The resizable panel inside a `splitter`. Reads the `splitter` context and binds its
|
|
1343
|
-
* width (horizontal) or height (vertical) to the context `size` state, updating reactively as
|
|
1344
|
-
* the handle is dragged. Intended for exactly two panels either side of one `splitterHandle`:
|
|
1345
|
-
* the first `splitterPanel` mounted takes `size`%, and the second takes the complementary
|
|
1346
|
-
* `100 - size`% — so the pair always sums to the full width/height instead of both tracking
|
|
1347
|
-
* the same number (which would make them grow and shrink together instead of trading space).
|
|
1348
|
-
* Warns if used outside a `splitter`. Takes no props.
|
|
1349
|
-
*
|
|
1350
|
-
* @example { div: [...], $: [splitterPanel()] }
|
|
1351
|
-
*/
|
|
1352
1378
|
declare function splitterPanel(): PartialElement;
|
|
1353
1379
|
/**
|
|
1354
1380
|
* The draggable divider inside a `splitter`. Reads the `splitter` context, shows the
|
|
@@ -1476,11 +1502,11 @@ declare function tabs(props?: {
|
|
|
1476
1502
|
/**
|
|
1477
1503
|
* Styles an inline chip/tag (rounded, bordered, optional remove button).
|
|
1478
1504
|
* No host tag check; typically applied to a `<span>`. When `removable` is true,
|
|
1479
|
-
* a close button is inserted that removes the host node on click.
|
|
1505
|
+
* a close button is inserted that removes the host node on click or Enter/Space.
|
|
1480
1506
|
*
|
|
1481
1507
|
* @hostTag span
|
|
1482
1508
|
* @param props.color - Theme color for the chip background/border/text. Optional, accepts a value or state. Defaults to `"neutral"`.
|
|
1483
|
-
* @param props.removable - When true, renders a remove (x) button that removes the tag on click. Optional. Defaults to `false`.
|
|
1509
|
+
* @param props.removable - When true, renders a remove (x) button that removes the tag on click or Enter/Space. Optional. Defaults to `false`.
|
|
1484
1510
|
* @example { span: "Label", $: [tag({ removable: true })] }
|
|
1485
1511
|
*/
|
|
1486
1512
|
declare function tag(props?: {
|
|
@@ -1495,7 +1521,7 @@ declare function tag(props?: {
|
|
|
1495
1521
|
* @hostTag textarea
|
|
1496
1522
|
* @param props.color - Theme color for the border and text. Optional, accepts a value or state. Defaults to `"neutral"`.
|
|
1497
1523
|
* @param props.accentColor - Theme color for hover/focus outline. Optional, accepts a value or state. Defaults to `"primary"`.
|
|
1498
|
-
* @param props.autoResize - When true, grows the textarea height to fit its content on input. Optional. Defaults to `false`.
|
|
1524
|
+
* @param props.autoResize - When true, grows the textarea height to fit its content on input and when `value` updates. Optional. Defaults to `false`.
|
|
1499
1525
|
* @example { textarea: null, $: [textarea({ autoResize: true })] }
|
|
1500
1526
|
*/
|
|
1501
1527
|
declare function textarea(props?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -359,14 +359,23 @@ declare function details(props?: {
|
|
|
359
359
|
* dialog, restores focus to the previously focused element on close, sets
|
|
360
360
|
* `aria-modal`, and closes on outside (backdrop) click. Apply to a `<dialog>`.
|
|
361
361
|
*
|
|
362
|
+
* Accessible name/description: pass `labelledBy`/`describedBy` the `id` of a
|
|
363
|
+
* heading/paragraph inside the dialog (Radix Title/Description parity). The
|
|
364
|
+
* native `ariaLabelledby`/`ariaDescribedby` attributes on the host element
|
|
365
|
+
* remain an equivalent escape hatch (the native element always wins).
|
|
366
|
+
*
|
|
362
367
|
* @hostTag dialog
|
|
363
368
|
* @param props.color - Theme color tone for the dialog surface. Defaults to "neutral".
|
|
364
369
|
* @param props.open - Open state (`ValueOrState<boolean>`); set it to true/false to show/hide. Defaults to false.
|
|
365
|
-
* @
|
|
370
|
+
* @param props.labelledBy - `id` of the element labeling the dialog (wired to `aria-labelledby`). Optional.
|
|
371
|
+
* @param props.describedBy - `id` of the element describing the dialog (wired to `aria-describedby`). Optional.
|
|
372
|
+
* @example { dialog: [{ h2: "Confirm", id: "dlg-title" }], $: [dialog({ open, labelledBy: "dlg-title" })] }
|
|
366
373
|
*/
|
|
367
374
|
declare function dialog(props?: {
|
|
368
375
|
color?: ThemeColor;
|
|
369
376
|
open?: ValueOrState<boolean>;
|
|
377
|
+
labelledBy?: string;
|
|
378
|
+
describedBy?: string;
|
|
370
379
|
}): PartialElement;
|
|
371
380
|
|
|
372
381
|
/**
|
|
@@ -449,6 +458,10 @@ declare function empty(props?: {
|
|
|
449
458
|
* caught. Errors during static construction propagate normally — those are
|
|
450
459
|
* programming errors, not runtime data errors.
|
|
451
460
|
*
|
|
461
|
+
* `reset()` restores the original children (including a reactive children
|
|
462
|
+
* function) so the next evaluation runs again — it does not leave the host
|
|
463
|
+
* empty.
|
|
464
|
+
*
|
|
452
465
|
* @hostTag any
|
|
453
466
|
* @param props.fallback - Fallback element or factory `(error, reset) => element`. Defaults to a plain error message div.
|
|
454
467
|
* @param props.onError - Optional callback for logging/telemetry.
|
|
@@ -604,7 +617,7 @@ declare function inputCheckbox(props?: {
|
|
|
604
617
|
/**
|
|
605
618
|
* Styles a native color picker swatch with themed padding, rounded swatch and
|
|
606
619
|
* disabled styling. Apply to an `<input>` element of type `color` (the patch
|
|
607
|
-
*
|
|
620
|
+
* default is `type: "color"`; a native `type` wins).
|
|
608
621
|
*
|
|
609
622
|
* @hostTag input
|
|
610
623
|
* @param props.color - Optional theme color tone used for the disabled state (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -620,7 +633,7 @@ type InputDateTimeMode = "date" | "time" | "week" | "month" | "datetime-local";
|
|
|
620
633
|
/**
|
|
621
634
|
* Styles a native date/time input with themed border, padding, hover, focus,
|
|
622
635
|
* invalid and disabled states. The `mode` selects the input `type`. Apply to
|
|
623
|
-
* an `<input>` element (the patch
|
|
636
|
+
* an `<input>` element (the patch default `type` is the chosen `mode`; a native `type` wins).
|
|
624
637
|
*
|
|
625
638
|
* @hostTag input
|
|
626
639
|
* @param props.mode - Input mode selecting the host `type`: `"date" | "time" | "week" | "month" | "datetime-local"`. Defaults to `"datetime-local"`.
|
|
@@ -637,7 +650,7 @@ declare function inputDateTime(props?: {
|
|
|
637
650
|
/**
|
|
638
651
|
* Styles a native file input with a themed upload button, border, hover, focus
|
|
639
652
|
* and disabled states. Apply to an `<input>` element of type `file` (the patch
|
|
640
|
-
*
|
|
653
|
+
* default is `type: "file"`; a native `type` wins).
|
|
641
654
|
*
|
|
642
655
|
* @hostTag input
|
|
643
656
|
* @param props.color - Optional theme color tone for text/border and the upload button (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -652,7 +665,7 @@ declare function inputFile(props?: {
|
|
|
652
665
|
/**
|
|
653
666
|
* Styles a native number input with themed border, padding, visible spin
|
|
654
667
|
* buttons, hover, focus and disabled states. Apply to an `<input>` element of
|
|
655
|
-
* type `number` (the patch
|
|
668
|
+
* type `number` (the patch default is `type: "number"`; a native `type` wins).
|
|
656
669
|
*
|
|
657
670
|
* @hostTag input
|
|
658
671
|
* @param props.color - Optional theme color tone for text/border (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -678,16 +691,32 @@ declare function inputOTP(): PartialElement;
|
|
|
678
691
|
/**
|
|
679
692
|
* Password input wrapper: a styled `<div>` that inserts an `<input type="password">`
|
|
680
693
|
* and a show/hide toggle button. The outer div carries the focus-ring outline via
|
|
681
|
-
* `:focus-within`. Apply to an empty `<div>`.
|
|
694
|
+
* `:focus-within`. Apply to an empty `<div>`. Host `value`/`name`/`onInput`/
|
|
695
|
+
* `disabled`/`required` are forwarded onto the real input so the field
|
|
696
|
+
* participates in FormData.
|
|
682
697
|
*
|
|
683
698
|
* @hostTag div
|
|
684
699
|
* @param props.color - Base color tone for border/background/text. Defaults to `"neutral"`.
|
|
685
700
|
* @param props.accentColor - Accent outline color on focus-within. Defaults to `"primary"`.
|
|
686
|
-
* @
|
|
701
|
+
* @param props.value - Forwarded onto the inner input. Optional.
|
|
702
|
+
* @param props.name - Forwarded onto the inner input (FormData key). Optional.
|
|
703
|
+
* @param props.onInput - Forwarded onto the inner input. Optional.
|
|
704
|
+
* @param props.disabled - Forwarded onto the inner input. Optional.
|
|
705
|
+
* @param props.required - Forwarded onto the inner input. Optional.
|
|
706
|
+
* @param props.autocomplete - Native autocomplete token. Defaults to `"current-password"`.
|
|
707
|
+
* @param props.ariaLabel - Accessible name for the inner input. Defaults to `"Password"`.
|
|
708
|
+
* @example { div: null, name: "password", $: [inputPassword()] }
|
|
687
709
|
*/
|
|
688
710
|
declare function inputPassword(props?: {
|
|
689
711
|
color?: ValueOrState<ThemeColor>;
|
|
690
712
|
accentColor?: ValueOrState<ThemeColor>;
|
|
713
|
+
value?: ValueOrState<string>;
|
|
714
|
+
name?: string;
|
|
715
|
+
onInput?: (event: Event) => void;
|
|
716
|
+
disabled?: ValueOrState<boolean>;
|
|
717
|
+
required?: boolean;
|
|
718
|
+
autocomplete?: string;
|
|
719
|
+
ariaLabel?: string;
|
|
691
720
|
}): PartialElement;
|
|
692
721
|
|
|
693
722
|
/**
|
|
@@ -723,7 +752,7 @@ declare function inputRange(props?: {
|
|
|
723
752
|
/**
|
|
724
753
|
* Styles a search input with themed border, padding, placeholder color, native
|
|
725
754
|
* search decorations, hover, focus and disabled states. Apply to an `<input>`
|
|
726
|
-
* element of type `search` (the patch
|
|
755
|
+
* element of type `search` (the patch default is `type: "search"`; a native `type` wins).
|
|
727
756
|
*
|
|
728
757
|
* @hostTag input
|
|
729
758
|
* @param props.color - Optional theme color tone for text/border/placeholder (`ValueOrState<ThemeColor>`). Defaults to `"neutral"`.
|
|
@@ -836,7 +865,7 @@ declare function linkButton(props?: {
|
|
|
836
865
|
* @param props.color - Surface color tone. Optional `ThemeColor`, defaults to `"neutral"`.
|
|
837
866
|
* @example { ul: [...], $: [list()] }
|
|
838
867
|
*/
|
|
839
|
-
declare function list(
|
|
868
|
+
declare function list(props?: {
|
|
840
869
|
color?: ThemeColor;
|
|
841
870
|
}): PartialElement;
|
|
842
871
|
/**
|
|
@@ -1085,11 +1114,22 @@ declare function progress(props?: {
|
|
|
1085
1114
|
accentColor?: ValueOrState<ThemeColor>;
|
|
1086
1115
|
}): PartialElement;
|
|
1087
1116
|
|
|
1117
|
+
type RatingProps = {
|
|
1118
|
+
value?: ValueOrState<number>;
|
|
1119
|
+
max?: number;
|
|
1120
|
+
onChange?: (value: number) => void;
|
|
1121
|
+
readOnly?: boolean;
|
|
1122
|
+
color?: ThemeColor;
|
|
1123
|
+
};
|
|
1088
1124
|
/**
|
|
1089
1125
|
* Interactive star rating applied to a container `<div>`. Manages its own star
|
|
1090
1126
|
* children: click to set, Arrow keys to adjust, hover to preview. In `readOnly`
|
|
1091
1127
|
* mode stars are non-interactive. Apply to a `<div>` element.
|
|
1092
1128
|
*
|
|
1129
|
+
* Star insert runs in `_onInit` (SSR markup). `onChange`/`readOnly`/`max` and
|
|
1130
|
+
* a plain-number `value` stay live via `behavior()` `update()` so a reused
|
|
1131
|
+
* node picks up the latest factory props.
|
|
1132
|
+
*
|
|
1093
1133
|
* @hostTag div
|
|
1094
1134
|
* @param props.value - Current rating (0 – max). `ValueOrState<number>`, defaults to `0`.
|
|
1095
1135
|
* @param props.max - Total number of stars. Optional `number`, defaults to `5`.
|
|
@@ -1098,13 +1138,7 @@ declare function progress(props?: {
|
|
|
1098
1138
|
* @param props.color - Star color tone. Optional `ThemeColor`, defaults to `"warning"`.
|
|
1099
1139
|
* @example { div: null, $: [rating({ value: ratingState, onChange: (v) => ratingState.set(v) })] }
|
|
1100
1140
|
*/
|
|
1101
|
-
declare function rating(props?:
|
|
1102
|
-
value?: ValueOrState<number>;
|
|
1103
|
-
max?: number;
|
|
1104
|
-
onChange?: (value: number) => void;
|
|
1105
|
-
readOnly?: boolean;
|
|
1106
|
-
color?: ThemeColor;
|
|
1107
|
-
}): PartialElement;
|
|
1141
|
+
declare function rating(props?: RatingProps): PartialElement;
|
|
1108
1142
|
|
|
1109
1143
|
/**
|
|
1110
1144
|
* Circular ring progress indicator rendered via CSS `conic-gradient` and a
|
|
@@ -1212,6 +1246,9 @@ declare function select(props?: {
|
|
|
1212
1246
|
* A clickable select trigger box that renders the currently selected option(s) as removable
|
|
1213
1247
|
* tags and toggles a floating popover (the dropdown content) anchored to itself. Selected
|
|
1214
1248
|
* labels are derived from `options` matching the bound `value`; removing a tag updates the value.
|
|
1249
|
+
* Keyboard: Enter/Space toggle, ArrowDown opens, Escape closes, and printable characters
|
|
1250
|
+
* typeahead-search options (closed: selects the match; open: focuses the matching
|
|
1251
|
+
* `[role=option]` in the panel; a repeated character cycles matches).
|
|
1215
1252
|
*
|
|
1216
1253
|
* @hostTag div
|
|
1217
1254
|
* @param props.multiple - Whether multiple selection is allowed (renders removable tags and
|
|
@@ -1338,17 +1375,6 @@ declare function splitter(props?: {
|
|
|
1338
1375
|
min?: number;
|
|
1339
1376
|
max?: number;
|
|
1340
1377
|
}): PartialElement;
|
|
1341
|
-
/**
|
|
1342
|
-
* The resizable panel inside a `splitter`. Reads the `splitter` context and binds its
|
|
1343
|
-
* width (horizontal) or height (vertical) to the context `size` state, updating reactively as
|
|
1344
|
-
* the handle is dragged. Intended for exactly two panels either side of one `splitterHandle`:
|
|
1345
|
-
* the first `splitterPanel` mounted takes `size`%, and the second takes the complementary
|
|
1346
|
-
* `100 - size`% — so the pair always sums to the full width/height instead of both tracking
|
|
1347
|
-
* the same number (which would make them grow and shrink together instead of trading space).
|
|
1348
|
-
* Warns if used outside a `splitter`. Takes no props.
|
|
1349
|
-
*
|
|
1350
|
-
* @example { div: [...], $: [splitterPanel()] }
|
|
1351
|
-
*/
|
|
1352
1378
|
declare function splitterPanel(): PartialElement;
|
|
1353
1379
|
/**
|
|
1354
1380
|
* The draggable divider inside a `splitter`. Reads the `splitter` context, shows the
|
|
@@ -1476,11 +1502,11 @@ declare function tabs(props?: {
|
|
|
1476
1502
|
/**
|
|
1477
1503
|
* Styles an inline chip/tag (rounded, bordered, optional remove button).
|
|
1478
1504
|
* No host tag check; typically applied to a `<span>`. When `removable` is true,
|
|
1479
|
-
* a close button is inserted that removes the host node on click.
|
|
1505
|
+
* a close button is inserted that removes the host node on click or Enter/Space.
|
|
1480
1506
|
*
|
|
1481
1507
|
* @hostTag span
|
|
1482
1508
|
* @param props.color - Theme color for the chip background/border/text. Optional, accepts a value or state. Defaults to `"neutral"`.
|
|
1483
|
-
* @param props.removable - When true, renders a remove (x) button that removes the tag on click. Optional. Defaults to `false`.
|
|
1509
|
+
* @param props.removable - When true, renders a remove (x) button that removes the tag on click or Enter/Space. Optional. Defaults to `false`.
|
|
1484
1510
|
* @example { span: "Label", $: [tag({ removable: true })] }
|
|
1485
1511
|
*/
|
|
1486
1512
|
declare function tag(props?: {
|
|
@@ -1495,7 +1521,7 @@ declare function tag(props?: {
|
|
|
1495
1521
|
* @hostTag textarea
|
|
1496
1522
|
* @param props.color - Theme color for the border and text. Optional, accepts a value or state. Defaults to `"neutral"`.
|
|
1497
1523
|
* @param props.accentColor - Theme color for hover/focus outline. Optional, accepts a value or state. Defaults to `"primary"`.
|
|
1498
|
-
* @param props.autoResize - When true, grows the textarea height to fit its content on input. Optional. Defaults to `false`.
|
|
1524
|
+
* @param props.autoResize - When true, grows the textarea height to fit its content on input and when `value` updates. Optional. Defaults to `false`.
|
|
1499
1525
|
* @example { textarea: null, $: [textarea({ autoResize: true })] }
|
|
1500
1526
|
*/
|
|
1501
1527
|
declare function textarea(props?: {
|