@igne-agency/react-web-ui 0.5.0 → 0.6.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/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Combobox as BaseCombobox } from "@base-ui/react/combobox";
|
|
2
2
|
import { type ComponentProps, type ReactNode, type Ref } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { type ButtonProps as AriaButtonProps, type TagProps } from "react-aria-components";
|
|
4
|
+
import { type FieldPendingProps, type FieldState, type OptionsLoad, type OptionsLoadLabels } from "../field/index.ts";
|
|
4
5
|
import { type PagedQuery } from "./combobox-items.ts";
|
|
5
6
|
export type ComboboxRootProps<TItem, TMultiple extends boolean | undefined = false> = Omit<BaseCombobox.Root.Props<TItem, TMultiple>, "autoHighlight"> & Readonly<{
|
|
6
7
|
/** `"always"` highlights the first item whenever the list changes. @default "always" */
|
|
@@ -13,41 +14,124 @@ export type ComboboxControlProps = BaseCombobox.InputGroup.Props & Readonly<{
|
|
|
13
14
|
ref?: Ref<HTMLDivElement>;
|
|
14
15
|
/** The states projected onto the control as `data-*` attributes. */
|
|
15
16
|
state?: FieldState;
|
|
16
|
-
/**
|
|
17
|
-
* The tags, beside the trigger. They show the selection, so the
|
|
18
|
-
* trigger's own value is read but not shown.
|
|
19
|
-
*/
|
|
20
|
-
tags?: ReactNode;
|
|
21
|
-
/** The chevron at the end of the control, such as an expand icon. */
|
|
22
|
-
icon?: ReactNode;
|
|
23
17
|
}>;
|
|
24
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The chevron at the end of the trigger. Its children are the icon; without
|
|
20
|
+
* them it renders nothing.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <Combobox.Icon><ExpandMoreIcon /></Combobox.Icon>
|
|
24
|
+
*/
|
|
25
25
|
declare const ComboboxIcon: ({ className, children, ...props }: BaseCombobox.Icon.Props) => ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The control's box, projecting `state` onto itself and holding the `Chips`
|
|
28
|
+
* and the `Trigger`. The positioner takes it as its `anchor`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* <Combobox.Control ref={anchorRef} state={state}>
|
|
32
|
+
* <Combobox.Trigger>…</Combobox.Trigger>
|
|
33
|
+
* </Combobox.Control>
|
|
34
|
+
*/
|
|
35
|
+
declare const ComboboxControl: ({ className, children, state, ...props }: ComboboxControlProps) => ReactNode;
|
|
36
|
+
export type ComboboxTriggerProps = BaseCombobox.Trigger.Props;
|
|
37
|
+
/**
|
|
38
|
+
* The button that opens the popup, holding the value, `Pending` and `Icon`.
|
|
39
|
+
* The arrow keys move between it and the `Chips` beside it.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <Combobox.Trigger>
|
|
43
|
+
* <Combobox.TriggerValue>{label}</Combobox.TriggerValue>
|
|
44
|
+
* <Combobox.Icon><ExpandMoreIcon /></Combobox.Icon>
|
|
45
|
+
* </Combobox.Trigger>
|
|
46
|
+
*/
|
|
47
|
+
declare const ComboboxTrigger: ({ className, onKeyDown, ...props }: ComboboxTriggerProps) => ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* The value the trigger shows, such as the chosen item or the placeholder.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <Combobox.TriggerValue>{label ?? placeholder}</Combobox.TriggerValue>
|
|
53
|
+
*/
|
|
54
|
+
declare const ComboboxTriggerValue: ({ className, ...props }: ComponentProps<"span">) => ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* The value the trigger is read as while `Chips` show the selection, such as
|
|
57
|
+
* every chosen item joined. Only assistive tech reads it.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <Combobox.SpokenValue>{names.join(", ")}</Combobox.SpokenValue>
|
|
61
|
+
*/
|
|
62
|
+
declare const ComboboxSpokenValue: ({ className, ...props }: ComponentProps<"span">) => ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* What the trigger shows while the control's `state` is pending, such as a
|
|
65
|
+
* spinner. Renders nothing otherwise.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* <Combobox.Pending><Spinner size={1} /></Combobox.Pending>
|
|
69
|
+
*/
|
|
70
|
+
declare const ComboboxPending: (props: FieldPendingProps) => ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* The area beside the trigger that shows the selection of a multiple
|
|
73
|
+
* combobox: a `ChipList`, or a placeholder while nothing is chosen. The arrow
|
|
74
|
+
* keys move from its first and last chip back to the trigger.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* <Combobox.Chips>
|
|
78
|
+
* <Combobox.ChipList …>…</Combobox.ChipList>
|
|
79
|
+
* </Combobox.Chips>
|
|
80
|
+
*/
|
|
81
|
+
declare const ComboboxChips: ({ className, onKeyDownCapture, ...props }: ComponentProps<"div">) => ReactNode;
|
|
82
|
+
export type ComboboxChipListProps<TItem> = Readonly<{
|
|
83
|
+
/** Names the group of chips, such as "Selected statuses". */
|
|
30
84
|
label: string;
|
|
31
85
|
items: readonly TItem[];
|
|
32
|
-
/** A stable identity per item
|
|
86
|
+
/** A stable identity per item, which its `Chip` takes as its `id`. */
|
|
33
87
|
itemKey: (item: TItem) => string;
|
|
34
|
-
/**
|
|
35
|
-
itemLabel: (item: TItem) => string;
|
|
36
|
-
/** The remove control's own name, which the tag's name completes, such as "Remove". */
|
|
37
|
-
removeLabel: string;
|
|
38
|
-
/** The remove control's tooltip for an item, such as "Remove Jan Jansen". */
|
|
39
|
-
removeHint: (item: TItem) => string;
|
|
40
|
-
/** The remove control's icon, such as a cross. */
|
|
41
|
-
removeIcon: ReactNode;
|
|
42
|
-
/** Renders one tag's content. */
|
|
88
|
+
/** Renders one item's `Chip`. */
|
|
43
89
|
children: (item: TItem) => ReactNode;
|
|
44
90
|
/** Called with the items left after a removal. */
|
|
45
91
|
onRemove: (remaining: readonly TItem[]) => void;
|
|
46
92
|
disabled?: boolean;
|
|
47
93
|
readOnly?: boolean;
|
|
94
|
+
className?: string;
|
|
95
|
+
}>;
|
|
96
|
+
/**
|
|
97
|
+
* The chosen values of a multiple combobox as a grid of removable chips, over
|
|
98
|
+
* react-aria's `TagGroup`. Removing the last one returns focus to the trigger.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* <Combobox.ChipList label="Selected statuses" items={chosen} itemKey={status => status} onRemove={setChosen}>
|
|
102
|
+
* {status => <Combobox.Chip key={status} id={status} textValue={status}>{status}</Combobox.Chip>}
|
|
103
|
+
* </Combobox.ChipList>
|
|
104
|
+
*/
|
|
105
|
+
declare const ComboboxChipList: <TItem>({ label, items, itemKey, children, onRemove, disabled, readOnly, className, }: ComboboxChipListProps<TItem>) => ReactNode;
|
|
106
|
+
export type ComboboxChipProps = Omit<TagProps, "className" | "id" | "textValue"> & Readonly<{
|
|
107
|
+
/** The item's key, as `ChipList`'s `itemKey` gives it. */
|
|
108
|
+
id: string;
|
|
109
|
+
/** The item as plain text, which the chip is read as. */
|
|
110
|
+
textValue: string;
|
|
111
|
+
className?: string;
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* One chosen value as a chip, holding its content and a `ChipRemove`.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* <Combobox.Chip id={status} textValue={status}>{status}</Combobox.Chip>
|
|
118
|
+
*/
|
|
119
|
+
declare const ComboboxChip: ({ className, ...props }: ComboboxChipProps) => ReactNode;
|
|
120
|
+
export type ComboboxChipRemoveProps = Omit<AriaButtonProps, "className" | "slot" | "aria-label"> & Readonly<{
|
|
121
|
+
/** The button's own name, which the chip's name completes, such as "Remove". */
|
|
122
|
+
"aria-label": string;
|
|
123
|
+
className?: string;
|
|
48
124
|
}>;
|
|
49
|
-
/**
|
|
50
|
-
|
|
125
|
+
/**
|
|
126
|
+
* The pointer-only button that removes its chip; the keyboard removes with
|
|
127
|
+
* Delete. Its children are the icon, such as a cross.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* <Tooltip content="Remove Open">
|
|
131
|
+
* <Combobox.ChipRemove aria-label="Remove"><CloseIcon /></Combobox.ChipRemove>
|
|
132
|
+
* </Tooltip>
|
|
133
|
+
*/
|
|
134
|
+
declare const ComboboxChipRemove: ({ className, ...props }: ComboboxChipRemoveProps) => ReactNode;
|
|
51
135
|
/** Places the popup against the control, given as its `anchor`. */
|
|
52
136
|
declare const ComboboxPositioner: ({ className, sideOffset, ...props }: BaseCombobox.Positioner.Props) => ReactNode;
|
|
53
137
|
/** The shared popup surface. */
|
|
@@ -71,12 +155,24 @@ declare const ComboboxList: ({ className, query, ...props }: ComboboxListProps)
|
|
|
71
155
|
export type ComboboxOptionProps = BaseCombobox.Item.Props;
|
|
72
156
|
/** One option's row, holding its `OptionIndicator` and `OptionText`. */
|
|
73
157
|
declare const ComboboxOption: ({ className, ...props }: ComboboxOptionProps) => ReactNode;
|
|
74
|
-
export type ComboboxOptionIndicatorProps = BaseCombobox.ItemIndicator.Props
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
158
|
+
export type ComboboxOptionIndicatorProps = BaseCombobox.ItemIndicator.Props;
|
|
159
|
+
/**
|
|
160
|
+
* The mark beside a chosen option. Its children are the mark, such as a tick.
|
|
161
|
+
* Inside an `OptionCheckbox` it is the checkbox's tick, kept mounted.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* <Combobox.OptionIndicator><CheckIcon /></Combobox.OptionIndicator>
|
|
165
|
+
*/
|
|
166
|
+
declare const ComboboxOptionIndicator: ({ className, ...props }: ComboboxOptionIndicatorProps) => ReactNode;
|
|
167
|
+
/**
|
|
168
|
+
* The box an option's `OptionIndicator` sits in, for a multi-value list.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* <Combobox.OptionCheckbox>
|
|
172
|
+
* <Combobox.OptionIndicator><CheckIcon /></Combobox.OptionIndicator>
|
|
173
|
+
* </Combobox.OptionCheckbox>
|
|
174
|
+
*/
|
|
175
|
+
declare const ComboboxOptionCheckbox: ({ className, children, ...props }: ComponentProps<"span">) => ReactNode;
|
|
80
176
|
/** An option's content, beside its indicator. */
|
|
81
177
|
declare const ComboboxOptionText: ({ className, ...props }: ComponentProps<"span">) => ReactNode;
|
|
82
178
|
/** What the popup says when no option is listed. */
|
|
@@ -116,7 +212,7 @@ export type ComboboxBodyProps<TItem> = ComboboxPopupLabels & Readonly<{
|
|
|
116
212
|
query?: PagedQuery<TItem>;
|
|
117
213
|
/** There are no items at all, rather than none matching the search. */
|
|
118
214
|
noOptions: boolean;
|
|
119
|
-
/** Draws each option's mark inside
|
|
215
|
+
/** Draws each option's mark inside an `OptionCheckbox`. */
|
|
120
216
|
multiple?: boolean;
|
|
121
217
|
/** A stable identity per item. */
|
|
122
218
|
itemKey: (item: TItem) => string;
|
|
@@ -132,36 +228,49 @@ export type ComboboxBodyProps<TItem> = ComboboxPopupLabels & Readonly<{
|
|
|
132
228
|
*/
|
|
133
229
|
declare const ComboboxBody: <TItem>({ load, query, noOptions, multiple, itemKey, checkIcon, children, ...labels }: ComboboxBodyProps<TItem>) => ReactNode;
|
|
134
230
|
/** The parts of a combobox. */
|
|
135
|
-
export type ComboboxParts = Omit<typeof BaseCombobox, "Root" | "Icon" | "Positioner" | "Popup" | "Input" | "List" | "Empty" | "Status"> & Readonly<{
|
|
231
|
+
export type ComboboxParts = Omit<typeof BaseCombobox, "Root" | "Icon" | "Trigger" | "Chips" | "Chip" | "ChipRemove" | "Positioner" | "Popup" | "Input" | "List" | "Empty" | "Status"> & Readonly<{
|
|
136
232
|
Root: typeof ComboboxRoot;
|
|
137
233
|
Control: typeof ComboboxControl;
|
|
234
|
+
Trigger: typeof ComboboxTrigger;
|
|
235
|
+
TriggerValue: typeof ComboboxTriggerValue;
|
|
236
|
+
SpokenValue: typeof ComboboxSpokenValue;
|
|
138
237
|
Icon: typeof ComboboxIcon;
|
|
139
|
-
|
|
238
|
+
Chips: typeof ComboboxChips;
|
|
239
|
+
ChipList: typeof ComboboxChipList;
|
|
240
|
+
Chip: typeof ComboboxChip;
|
|
241
|
+
ChipRemove: typeof ComboboxChipRemove;
|
|
140
242
|
Positioner: typeof ComboboxPositioner;
|
|
141
243
|
Popup: typeof ComboboxPopup;
|
|
142
244
|
Search: typeof ComboboxSearch;
|
|
143
245
|
List: typeof ComboboxList;
|
|
144
246
|
Option: typeof ComboboxOption;
|
|
145
247
|
OptionIndicator: typeof ComboboxOptionIndicator;
|
|
248
|
+
OptionCheckbox: typeof ComboboxOptionCheckbox;
|
|
146
249
|
OptionText: typeof ComboboxOptionText;
|
|
147
250
|
Empty: typeof ComboboxEmpty;
|
|
148
251
|
Status: typeof ComboboxStatus;
|
|
149
252
|
StatusArea: typeof ComboboxStatusArea;
|
|
150
253
|
LoadStatus: typeof ComboboxLoadStatus;
|
|
151
254
|
Body: typeof ComboboxBody;
|
|
152
|
-
Pending: typeof
|
|
255
|
+
Pending: typeof ComboboxPending;
|
|
153
256
|
}>;
|
|
154
257
|
/**
|
|
155
258
|
* The styled parts of a base-ui Combobox: a filterable select whose control
|
|
156
259
|
* matches `Select`'s trigger and whose popup is the shared popup surface. Every
|
|
157
|
-
* unstyled base-ui part stays reachable.
|
|
158
|
-
*
|
|
260
|
+
* unstyled base-ui part stays reachable. A multiple combobox shows its
|
|
261
|
+
* selection as `Chips` beside the `Trigger`. `Body` holds what the popup
|
|
262
|
+
* usually does. For the ordinary case, use `ComboboxField`. The positioner takes the
|
|
159
263
|
* control as its `anchor`.
|
|
160
264
|
*
|
|
161
265
|
* @example
|
|
162
266
|
* <Combobox.Root items={statuses}>
|
|
163
|
-
* <Combobox.Control ref={anchorRef}
|
|
164
|
-
* <Combobox.
|
|
267
|
+
* <Combobox.Control ref={anchorRef}>
|
|
268
|
+
* <Combobox.Trigger>
|
|
269
|
+
* <Combobox.TriggerValue>
|
|
270
|
+
* <Combobox.Value>{(status: string | null) => status}</Combobox.Value>
|
|
271
|
+
* </Combobox.TriggerValue>
|
|
272
|
+
* <Combobox.Icon><ExpandMoreIcon /></Combobox.Icon>
|
|
273
|
+
* </Combobox.Trigger>
|
|
165
274
|
* </Combobox.Control>
|
|
166
275
|
* <Combobox.Portal>
|
|
167
276
|
* <Combobox.Positioner anchor={anchorRef}>
|