@servicetitan/anvil2 1.50.1 → 1.50.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 +22 -0
- package/dist/{Calendar-CAYitkfM.js → Calendar-BeFARXwq.js} +2 -2
- package/dist/{Calendar-CAYitkfM.js.map → Calendar-BeFARXwq.js.map} +1 -1
- package/dist/{Calendar-C9oxHTGG.js → Calendar-M9v994mm.js} +2 -2
- package/dist/{Calendar-C9oxHTGG.js.map → Calendar-M9v994mm.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-DbBeuNdW.js → Checkbox-BwFY38z1.js} +3 -2
- package/dist/Checkbox-BwFY38z1.js.map +1 -0
- package/dist/{Checkbox-zAKOGEBl.js → Checkbox-Chck2V5C.js} +2 -2
- package/dist/{Checkbox-zAKOGEBl.js.map → Checkbox-Chck2V5C.js.map} +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/{Combobox-DGAa9vgU.js → Combobox-BTTWNSW1.js} +285 -175
- package/dist/Combobox-BTTWNSW1.js.map +1 -0
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-DQ9FFuV8.js → DataTable-hXWouflx.js} +6 -6
- package/dist/{DataTable-DQ9FFuV8.js.map → DataTable-hXWouflx.js.map} +1 -1
- package/dist/{DateField-BT9jJRp5.js → DateField-B8JdMu94.js} +6 -6
- package/dist/{DateField-BT9jJRp5.js.map → DateField-B8JdMu94.js.map} +1 -1
- package/dist/DateField.js +1 -1
- package/dist/{DateFieldRange-ZAic_9mt.js → DateFieldRange-DWAgi_T9.js} +7 -7
- package/dist/{DateFieldRange-ZAic_9mt.js.map → DateFieldRange-DWAgi_T9.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-DAtR8ImE.js → DateFieldSingle-CQ6X-bVX.js} +7 -7
- package/dist/{DateFieldSingle-DAtR8ImE.js.map → DateFieldSingle-CQ6X-bVX.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-DXO_MPwA.js → DateFieldYearless-D6-NfIHu.js} +4 -4
- package/dist/{DateFieldYearless-DXO_MPwA.js.map → DateFieldYearless-D6-NfIHu.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-Cg6bbPIi.js → DateFieldYearlessRange-CQM0vibm.js} +4 -4
- package/dist/{DateFieldYearlessRange-Cg6bbPIi.js.map → DateFieldYearlessRange-CQM0vibm.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-9B9d7-hF.js → DaysOfTheWeek-BR-mg77X.js} +3 -3
- package/dist/{DaysOfTheWeek-9B9d7-hF.js.map → DaysOfTheWeek-BR-mg77X.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-BwabBKoZ.js → Dialog-Ba2oIATn.js} +8 -8
- package/dist/Dialog-Ba2oIATn.js.map +1 -0
- package/dist/Dialog.js +2 -2
- package/dist/{DialogCancelButton-sTEfx5kf.js → DialogCancelButton-CBHyI0CI.js} +2 -2
- package/dist/{DialogCancelButton-sTEfx5kf.js.map → DialogCancelButton-CBHyI0CI.js.map} +1 -1
- package/dist/{Drawer-GXeoK-r9.js → Drawer-CWogbC68.js} +7 -7
- package/dist/{Drawer-GXeoK-r9.js.map → Drawer-CWogbC68.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/{DrawerContext-Cs3k160L.js → DrawerContext-rJvgnn3O.js} +2 -2
- package/dist/{DrawerContext-Cs3k160L.js.map → DrawerContext-rJvgnn3O.js.map} +1 -1
- package/dist/FieldDialog-BHgkQOhh.js +519 -0
- package/dist/FieldDialog-BHgkQOhh.js.map +1 -0
- package/dist/{FieldLabel-jqlQ1Ldh.js → FieldLabel-BWOIFXgt.js} +7 -4
- package/dist/FieldLabel-BWOIFXgt.js.map +1 -0
- package/dist/FieldLabel.js +1 -1
- package/dist/{InputMask-CJC9xZHG.js → InputMask-BzY1DJoV.js} +3 -3
- package/dist/{InputMask-CJC9xZHG.js.map → InputMask-BzY1DJoV.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-D8mfK8Lu.js → ListView-C5OBwbHe.js} +6 -4
- package/dist/ListView-C5OBwbHe.js.map +1 -0
- package/dist/ListView.js +1 -1
- package/dist/{Menu-Cn2JJe1Y.js → Menu-69JwGxYh.js} +2 -2
- package/dist/{Menu-Cn2JJe1Y.js.map → Menu-69JwGxYh.js.map} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MultiSelectField.d.ts +2 -0
- package/dist/MultiSelectField.js +2 -0
- package/dist/MultiSelectField.js.map +1 -0
- package/dist/MultiSelectFieldSync-B3HNQf7R.js +873 -0
- package/dist/MultiSelectFieldSync-B3HNQf7R.js.map +1 -0
- package/dist/MultiSelectFieldSync.css +259 -0
- package/dist/{NumberField-CjWLnD9X.js → NumberField-CcH25bnO.js} +3 -3
- package/dist/{NumberField-CjWLnD9X.js.map → NumberField-CcH25bnO.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-DEbpjQw0.js → Page-B5HZSjSl.js} +5 -5
- package/dist/{Page-DEbpjQw0.js.map → Page-B5HZSjSl.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-BR8MiRaA.js → Pagination-CkdBaQx6.js} +2 -2
- package/dist/{Pagination-BR8MiRaA.js.map → Pagination-CkdBaQx6.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CCXrzBul.js → Popover-D9SmGQTh.js} +6 -5
- package/dist/{Popover-CCXrzBul.js.map → Popover-D9SmGQTh.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-BpKEr6cO.js → ProgressBar-BABkqVmW.js} +2 -2
- package/dist/{ProgressBar-BpKEr6cO.js.map → ProgressBar-BABkqVmW.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-jj0-1dOg.js → Radio-Cds2laHA.js} +2 -2
- package/dist/{Radio-jj0-1dOg.js.map → Radio-Cds2laHA.js.map} +1 -1
- package/dist/Radio.js +2 -2
- package/dist/{RadioGroup-Bxy415eu.js → RadioGroup-COVlUmwy.js} +3 -3
- package/dist/{RadioGroup-Bxy415eu.js.map → RadioGroup-COVlUmwy.js.map} +1 -1
- package/dist/{SelectCard-CjbsPKZ4.js → SelectCard-C-Kjk5eS.js} +3 -3
- package/dist/{SelectCard-CjbsPKZ4.js.map → SelectCard-C-Kjk5eS.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/SelectFieldSync-0CL0RTpg.js +679 -0
- package/dist/SelectFieldSync-0CL0RTpg.js.map +1 -0
- package/dist/{SelectTrigger-D4AjiMKp.js → SelectTrigger-C1U-PlLz.js} +6 -3
- package/dist/SelectTrigger-C1U-PlLz.js.map +1 -0
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-D9GuxPxR.js → SelectTriggerBase-RHD4FTQE.js} +3 -3
- package/dist/{SelectTriggerBase-D9GuxPxR.js.map → SelectTriggerBase-RHD4FTQE.js.map} +1 -1
- package/dist/SelectTriggerBase.css +65 -59
- package/dist/SelectTriggerBase.module-B0NFRlQP.js +36 -0
- package/dist/SelectTriggerBase.module-B0NFRlQP.js.map +1 -0
- package/dist/Table.js +1 -1
- package/dist/{TextField-Qv6OqiKQ.js → TextField-BYGSTwkL.js} +2 -2
- package/dist/{TextField-Qv6OqiKQ.js.map → TextField-BYGSTwkL.js.map} +1 -1
- package/dist/{TextField-DNuEXKyN.js → TextField-BZ3h2mqU.js} +3 -3
- package/dist/{TextField-DNuEXKyN.js.map → TextField-BZ3h2mqU.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-DdLD4imO.js → Textarea-Cb0Qs2FH.js} +8 -3
- package/dist/Textarea-Cb0Qs2FH.js.map +1 -0
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-C39hYluo.js → TimeField-DBtJYC7t.js} +4 -4
- package/dist/{TimeField-C39hYluo.js.map → TimeField-DBtJYC7t.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-DJ4tNy-0.js → Toaster-Cerf91qp.js} +2 -2
- package/dist/{Toaster-DJ4tNy-0.js.map → Toaster-Cerf91qp.js.map} +1 -1
- package/dist/{Toaster-DyDVYq4x.js → Toaster-DDrGllhh.js} +3 -3
- package/dist/{Toaster-DyDVYq4x.js.map → Toaster-DDrGllhh.js.map} +1 -1
- package/dist/{Toolbar-Vw9V1RHr.js → Toolbar-K9UFfyvX.js} +127 -41
- package/dist/Toolbar-K9UFfyvX.js.map +1 -0
- package/dist/Toolbar.js +1 -1
- package/dist/{Tooltip-CBy7srE2.js → Tooltip-CkfkiQPz.js} +2 -2
- package/dist/{Tooltip-CBy7srE2.js.map → Tooltip-CkfkiQPz.js.map} +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/{YearlessDateInputWithPicker-DMGx3gE2.js → YearlessDateInputWithPicker-BIkxKxPi.js} +4 -4
- package/dist/{YearlessDateInputWithPicker-DMGx3gE2.js.map → YearlessDateInputWithPicker-BIkxKxPi.js.map} +1 -1
- package/dist/beta/components/MultiSelectField/MultiSelectField.d.ts +27 -0
- package/dist/beta/components/MultiSelectField/MultiSelectFieldSync.d.ts +63 -0
- package/dist/beta/components/MultiSelectField/index.d.ts +3 -0
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldInput.d.ts +79 -0
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldList.d.ts +26 -0
- package/dist/beta/components/MultiSelectField/internal/useComboMultiple.d.ts +44 -0
- package/dist/beta/components/MultiSelectField/stories/MultiSelectField.stories.data.d.ts +19 -0
- package/dist/beta/components/MultiSelectField/types.d.ts +311 -0
- package/dist/beta/components/SelectField/internal/FieldDialog/FieldDialog.d.ts +3 -1
- package/dist/beta/components/SelectField/internal/FieldPopover/FieldPopover.d.ts +1 -0
- package/dist/beta/components/SelectField/internal/SelectFieldInput.d.ts +3 -1
- package/dist/beta/components/SelectField/internal/SelectFieldLabel.d.ts +11 -3
- package/dist/beta/components/SelectField/internal/SelectFieldListItem.d.ts +2 -1
- package/dist/beta/components/SelectField/types.d.ts +19 -1
- package/dist/beta/components/index.d.ts +1 -0
- package/dist/beta.js +7 -5
- package/dist/beta.js.map +1 -1
- package/dist/components/Button/Button.figma.d.ts +1 -0
- package/dist/components/Combobox/ComboboxTypes.d.ts +1 -1
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyTrigger.d.ts +2 -2
- package/dist/components/FieldLabel/FieldLabel.d.ts +5 -1
- package/dist/components/FieldLabel/internal/FieldLabelMoreInfoIcon.d.ts +3 -1
- package/dist/components/Icon/Icons.figma.d.ts +11 -0
- package/dist/components/ListView/ListView.d.ts +2 -9
- package/dist/components/ListView/internal/types.d.ts +12 -0
- package/dist/components/SelectTrigger/SelectTrigger.d.ts +1 -1
- package/dist/components/Switch/Switch.figma.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/index.js +34 -34
- package/dist/internal/components/Label/Label.d.ts +13 -3
- package/dist/internal/hooks/useOnClickOutside/useOnClickOutside.d.ts +8 -7
- package/dist/types/props.d.ts +5 -0
- package/dist/{useInitialFocus-BpmW7pDB.js → useInitialFocus-D_ESGka7.js} +3 -3
- package/dist/{useInitialFocus-BpmW7pDB.js.map → useInitialFocus-D_ESGka7.js.map} +1 -1
- package/dist/useOnClickOutside-Zw5vzxSq.js +71 -0
- package/dist/useOnClickOutside-Zw5vzxSq.js.map +1 -0
- package/dist/useOpenCloseTransitionStates-CiTYrLGi.js +68 -0
- package/dist/useOpenCloseTransitionStates-CiTYrLGi.js.map +1 -0
- package/dist/{usePopoverSupport-CCSCHnit.js → usePopoverSupport-CldZmxFl.js} +2 -2
- package/dist/{usePopoverSupport-CCSCHnit.js.map → usePopoverSupport-CldZmxFl.js.map} +1 -1
- package/dist/{utils-Bkbn9cyk.js → utils-u8cyv323.js} +2 -2
- package/dist/{utils-Bkbn9cyk.js.map → utils-u8cyv323.js.map} +1 -1
- package/package.json +4 -3
- package/dist/Checkbox-DbBeuNdW.js.map +0 -1
- package/dist/Combobox-DGAa9vgU.js.map +0 -1
- package/dist/Dialog-BwabBKoZ.js.map +0 -1
- package/dist/FieldLabel-jqlQ1Ldh.js.map +0 -1
- package/dist/ListView-D8mfK8Lu.js.map +0 -1
- package/dist/SelectFieldSync-D4VdOXoY.js +0 -1134
- package/dist/SelectFieldSync-D4VdOXoY.js.map +0 -1
- package/dist/SelectTrigger-D4AjiMKp.js.map +0 -1
- package/dist/SelectTriggerBase.module-Ce49lamD.js +0 -35
- package/dist/SelectTriggerBase.module-Ce49lamD.js.map +0 -1
- package/dist/Textarea-DdLD4imO.js.map +0 -1
- package/dist/Toolbar-Vw9V1RHr.js.map +0 -1
- package/dist/useOnClickOutside-BDzuUjmY.js +0 -147
- package/dist/useOnClickOutside-BDzuUjmY.js.map +0 -1
- /package/dist/{SelectFieldSync.css → FieldDialog.css} +0 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { AriaAttributes, CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { CheckState, LayoutUtilProps, Size } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for the MultiSelectField cache.
|
|
5
|
+
* @property enabled - Whether caching is enabled. Defaults to true.
|
|
6
|
+
* @property maxSize - Maximum number of cached entries before clearing the cache. Defaults to 50.
|
|
7
|
+
*/
|
|
8
|
+
export type MultiSelectFieldCacheOptions = {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
maxSize?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Imperative handle for the MultiSelectField component.
|
|
14
|
+
* @property clearCache - Clears the options cache.
|
|
15
|
+
*/
|
|
16
|
+
export type MultiSelectFieldHandle = {
|
|
17
|
+
clearCache: () => void;
|
|
18
|
+
};
|
|
19
|
+
export type MultiSelectFieldGroupByValue = string | number;
|
|
20
|
+
export type MultiSelectFieldOption = {
|
|
21
|
+
id: string | number;
|
|
22
|
+
label: string;
|
|
23
|
+
searchText?: string;
|
|
24
|
+
group?: MultiSelectFieldGroupByValue;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
content?: {
|
|
27
|
+
title?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type MultiSelectFieldGroupedOption = MultiSelectFieldOption & {
|
|
32
|
+
group: MultiSelectFieldGroupByValue;
|
|
33
|
+
};
|
|
34
|
+
export type MultiSelectFieldUngroupedOption = Omit<MultiSelectFieldOption, "group"> & {
|
|
35
|
+
group?: never;
|
|
36
|
+
};
|
|
37
|
+
export type MultiSelectFieldOptionsResult = MultiSelectFieldOption[] | Promise<MultiSelectFieldOption[]>;
|
|
38
|
+
export type MultiSelectFieldEagerLoader = (searchValue: string) => MultiSelectFieldOptionsResult;
|
|
39
|
+
export type MultiSelectFieldOffsetLazyResult = {
|
|
40
|
+
options: MultiSelectFieldUngroupedOption[];
|
|
41
|
+
hasMore?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export type MultiSelectFieldOffsetLazyLoader = (searchValue: string, offset: number, limit: number) => MultiSelectFieldOffsetLazyResult | Promise<MultiSelectFieldOffsetLazyResult>;
|
|
44
|
+
export type MultiSelectFieldPageLazyResult = {
|
|
45
|
+
options: MultiSelectFieldUngroupedOption[];
|
|
46
|
+
hasMore?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export type MultiSelectFieldPageLazyLoader = (searchValue: string, pageNumber: number, pageSize: number) => MultiSelectFieldPageLazyResult | Promise<MultiSelectFieldPageLazyResult>;
|
|
49
|
+
export type MultiSelectFieldGroupLazyResult = {
|
|
50
|
+
options: MultiSelectFieldGroupedOption[];
|
|
51
|
+
hasMore?: boolean;
|
|
52
|
+
};
|
|
53
|
+
export type MultiSelectFieldGroupLazyLoader = (searchValue: string, previousGroupKey: MultiSelectFieldGroupByValue | null) => MultiSelectFieldGroupLazyResult | Promise<MultiSelectFieldGroupLazyResult>;
|
|
54
|
+
export type MultiSelectFieldSearchProps = {
|
|
55
|
+
/**
|
|
56
|
+
* The current search value.
|
|
57
|
+
* Not a preferred usage. You likely don't need to control the searchValue yourself.
|
|
58
|
+
*/
|
|
59
|
+
searchValue?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Callback when the search value changes.
|
|
62
|
+
* Not a preferred usage. Lean on the searchValue in the loadOptions function instead.
|
|
63
|
+
*/
|
|
64
|
+
onSearchChange?: (searchValue: string) => void;
|
|
65
|
+
/**
|
|
66
|
+
* The number of milliseconds to debounce the search input.
|
|
67
|
+
*/
|
|
68
|
+
debounceMs?: number;
|
|
69
|
+
};
|
|
70
|
+
export type MultiSelectFieldLabeledPinnedOptions = {
|
|
71
|
+
options: MultiSelectFieldOption[] | ((searchValue: string) => MultiSelectFieldOption[] | Promise<MultiSelectFieldOption[]>);
|
|
72
|
+
label: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* There are a number of ways to configure pinned options.
|
|
76
|
+
* 1. An array of options
|
|
77
|
+
* 2. A function that returns a list of options (or Promise thereof) based on the search value
|
|
78
|
+
* 3. A labeled pinned options object (e.g. "Favorites", "Recent", "AI Suggestions", etc.)
|
|
79
|
+
* 4. An array of labeled pinned options objects (e.g. [{"label": "Favorites", "options": [...]}])
|
|
80
|
+
*/
|
|
81
|
+
export type MultiSelectFieldPinnedOptions = MultiSelectFieldOption[] | ((searchValue: string) => MultiSelectFieldOption[] | Promise<MultiSelectFieldOption[]>) | MultiSelectFieldLabeledPinnedOptions | MultiSelectFieldLabeledPinnedOptions[];
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use CheckState from "@servicetitan/anvil2" instead.
|
|
84
|
+
*/
|
|
85
|
+
export type MultiSelectFieldCheckState = CheckState;
|
|
86
|
+
type MultiSelectFieldCommonProps = {
|
|
87
|
+
/**
|
|
88
|
+
* The id of the multi-select field.
|
|
89
|
+
*/
|
|
90
|
+
id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The label of the multi-select field.
|
|
93
|
+
*/
|
|
94
|
+
label: string;
|
|
95
|
+
/**
|
|
96
|
+
* The placeholder of the multi-select field.
|
|
97
|
+
*/
|
|
98
|
+
placeholder?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The size of the multi-select field.
|
|
101
|
+
*/
|
|
102
|
+
size?: Extract<Size, "small" | "medium" | "large">;
|
|
103
|
+
/**
|
|
104
|
+
* The selected options. Must be controlled state.
|
|
105
|
+
*/
|
|
106
|
+
value: MultiSelectFieldOption[];
|
|
107
|
+
/**
|
|
108
|
+
* The callback to call when the selected options change.
|
|
109
|
+
* @param options - The new array of selected options.
|
|
110
|
+
*/
|
|
111
|
+
onSelectedOptionsChange: (options: MultiSelectFieldOption[]) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Defines the initial loading behavior of the options. Controls when loadOptions is called.
|
|
114
|
+
* @default "auto"
|
|
115
|
+
* @description "auto" default behavior, currently equivalent to "immediate".
|
|
116
|
+
* @description "immediate" will load the initial options when the component is mounted.
|
|
117
|
+
* @description "open" will load the initial options if/when the user opens the dropdown.
|
|
118
|
+
*/
|
|
119
|
+
initialLoad?: "auto" | "immediate" | "open";
|
|
120
|
+
/**
|
|
121
|
+
* The options to pin to the top of the list.
|
|
122
|
+
*/
|
|
123
|
+
pinned?: MultiSelectFieldPinnedOptions;
|
|
124
|
+
/**
|
|
125
|
+
* Configuration for caching loadOptions results.
|
|
126
|
+
* Caching is enabled by default. Set `{ enabled: false }` to disable.
|
|
127
|
+
*/
|
|
128
|
+
cache?: MultiSelectFieldCacheOptions;
|
|
129
|
+
/**
|
|
130
|
+
* The way to display the menu.
|
|
131
|
+
* @default "auto"
|
|
132
|
+
* @description "auto" will display the menu as a popover on mobile and a dialog on desktop.
|
|
133
|
+
* @description "popover" will always display the menu as a popover.
|
|
134
|
+
* @description "dialog" will always display the menu as a dialog.
|
|
135
|
+
*/
|
|
136
|
+
displayMenuAs?: "auto" | "popover" | "dialog";
|
|
137
|
+
/**
|
|
138
|
+
* Error state for the field. Can be a boolean, string message, or ReactElement.
|
|
139
|
+
* When truthy, displays error styling and message.
|
|
140
|
+
*/
|
|
141
|
+
error?: ReactElement | string | boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Visually hides the label while keeping it accessible to screen readers.
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
hideLabel?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Hint text displayed below the input field.
|
|
149
|
+
*/
|
|
150
|
+
hint?: ReactElement | string;
|
|
151
|
+
/**
|
|
152
|
+
* Custom ReactNode to render as the label, overriding the default label text.
|
|
153
|
+
* The `label` prop is still required for accessibility purposes.
|
|
154
|
+
*/
|
|
155
|
+
labelNode?: ReactNode;
|
|
156
|
+
/**
|
|
157
|
+
* Description text displayed below the input field.
|
|
158
|
+
*/
|
|
159
|
+
description?: ReactElement | string;
|
|
160
|
+
/**
|
|
161
|
+
* aria-live behavior for error messages.
|
|
162
|
+
* @default "assertive"
|
|
163
|
+
*/
|
|
164
|
+
errorAriaLive?: AriaAttributes["aria-live"];
|
|
165
|
+
/**
|
|
166
|
+
* Whether the field is required. Shows a red asterisk (*) next to the label.
|
|
167
|
+
*/
|
|
168
|
+
required?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the field is disabled.
|
|
171
|
+
* When disabled, the input is still focusable but menu items cannot be selected.
|
|
172
|
+
*/
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Whether the field is read-only.
|
|
176
|
+
* When read-only, the input is still focusable but menu items cannot be selected.
|
|
177
|
+
*/
|
|
178
|
+
readOnly?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Content to display before the input field.
|
|
181
|
+
*/
|
|
182
|
+
prefix?: string | ReactElement;
|
|
183
|
+
/**
|
|
184
|
+
* Content to display after the input field.
|
|
185
|
+
*/
|
|
186
|
+
suffix?: string | ReactElement;
|
|
187
|
+
/**
|
|
188
|
+
* Configuration for the "Select All" option at the top of the list.
|
|
189
|
+
* When provided, a "Select All" option will be shown.
|
|
190
|
+
*/
|
|
191
|
+
selectAll?: {
|
|
192
|
+
/**
|
|
193
|
+
* The label to display for the "Select All" option.
|
|
194
|
+
* @default "Select All"
|
|
195
|
+
*/
|
|
196
|
+
label?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Callback when the "Select All" option is clicked.
|
|
199
|
+
* The parent component is responsible for handling the select/deselect all logic.
|
|
200
|
+
*/
|
|
201
|
+
onClick: () => void;
|
|
202
|
+
/**
|
|
203
|
+
* isChecked state for the "Select All" option.
|
|
204
|
+
* @default false
|
|
205
|
+
*/
|
|
206
|
+
isChecked: boolean | MultiSelectFieldCheckState;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* When true, restricts the field to a single row height.
|
|
210
|
+
* Overflow chips will be collapsed into a "+N" indicator.
|
|
211
|
+
* @default false
|
|
212
|
+
*/
|
|
213
|
+
singleRow?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Maximum number of chips to display before showing a "+N" indicator.
|
|
216
|
+
* Applies regardless of fixedHeight setting.
|
|
217
|
+
* @default 10
|
|
218
|
+
*/
|
|
219
|
+
maxChips?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Custom CSS class name for the wrapper element.
|
|
222
|
+
*/
|
|
223
|
+
className?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Custom inline styles for the wrapper element.
|
|
226
|
+
*/
|
|
227
|
+
style?: CSSProperties;
|
|
228
|
+
} & MultiSelectFieldSearchProps & LayoutUtilProps;
|
|
229
|
+
type MultiSelectFieldGroupingProps = {
|
|
230
|
+
/**
|
|
231
|
+
* Function to convert a group value to a display label.
|
|
232
|
+
* Only used when options have a `group` property.
|
|
233
|
+
* @param groupValue - The group value from the option's `group` property
|
|
234
|
+
* @returns The formatted group label
|
|
235
|
+
*/
|
|
236
|
+
groupToString?: (groupValue: MultiSelectFieldGroupByValue) => string;
|
|
237
|
+
};
|
|
238
|
+
type MultiSelectFieldNonGroupingProps = {
|
|
239
|
+
/**
|
|
240
|
+
* Incompatible with non-group lazy loading.
|
|
241
|
+
*/
|
|
242
|
+
groupToString?: never;
|
|
243
|
+
/**
|
|
244
|
+
* Incompatible with non-group lazy loading.
|
|
245
|
+
*/
|
|
246
|
+
groupSorter?: never;
|
|
247
|
+
};
|
|
248
|
+
export type MultiSelectFieldPropsLazyPage = MultiSelectFieldCommonProps & {
|
|
249
|
+
/**
|
|
250
|
+
* Lazy loading mode using page-based pagination.
|
|
251
|
+
* Options will be loaded on demand when the user scrolls to the bottom of the list.
|
|
252
|
+
* This mode only supports flat options (i.e. cannot be used with grouped options).
|
|
253
|
+
*/
|
|
254
|
+
lazy: "page";
|
|
255
|
+
lazyOptions?: {
|
|
256
|
+
pageSize?: number;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Function to load the options.
|
|
260
|
+
*/
|
|
261
|
+
loadOptions: MultiSelectFieldPageLazyLoader;
|
|
262
|
+
} & MultiSelectFieldNonGroupingProps;
|
|
263
|
+
export type MultiSelectFieldPropsLazyOffset = MultiSelectFieldCommonProps & {
|
|
264
|
+
/**
|
|
265
|
+
* Lazy loading mode using offset-based pagination.
|
|
266
|
+
* Options will be loaded on demand when the user scrolls to the bottom of the list.
|
|
267
|
+
* This mode only supports flat options (i.e. cannot be used with grouped options).
|
|
268
|
+
*/
|
|
269
|
+
lazy: "offset";
|
|
270
|
+
lazyOptions?: {
|
|
271
|
+
limit?: number;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Function to load the options.
|
|
275
|
+
*/
|
|
276
|
+
loadOptions: MultiSelectFieldOffsetLazyLoader;
|
|
277
|
+
} & MultiSelectFieldNonGroupingProps;
|
|
278
|
+
export type MultiSelectFieldPropsLazyGroup = MultiSelectFieldCommonProps & {
|
|
279
|
+
/**
|
|
280
|
+
* Lazy loading mode using incremental group loading.
|
|
281
|
+
* Groups will be loaded on demand when the user scrolls to the bottom of the list.
|
|
282
|
+
* This mode supports grouped options.
|
|
283
|
+
*/
|
|
284
|
+
lazy: "group";
|
|
285
|
+
lazyOptions?: object;
|
|
286
|
+
/**
|
|
287
|
+
* Function to load the options.
|
|
288
|
+
*/
|
|
289
|
+
loadOptions: MultiSelectFieldGroupLazyLoader;
|
|
290
|
+
} & MultiSelectFieldGroupingProps;
|
|
291
|
+
export type MultiSelectFieldPropsEager = MultiSelectFieldCommonProps & {
|
|
292
|
+
/**
|
|
293
|
+
* Whether the options are lazy loaded. If true, the options will be loaded on demand when the user scrolls to the bottom of the list.
|
|
294
|
+
* @default false
|
|
295
|
+
*/
|
|
296
|
+
lazy?: false;
|
|
297
|
+
/**
|
|
298
|
+
* Function to load the options.
|
|
299
|
+
*/
|
|
300
|
+
loadOptions: MultiSelectFieldEagerLoader;
|
|
301
|
+
};
|
|
302
|
+
export type MultiSelectFieldPropsLazy = MultiSelectFieldPropsLazyPage | MultiSelectFieldPropsLazyOffset | MultiSelectFieldPropsLazyGroup;
|
|
303
|
+
export type MultiSelectFieldProps = MultiSelectFieldPropsLazy | MultiSelectFieldPropsEager;
|
|
304
|
+
export type MultiSelectFieldDownshiftItem = {
|
|
305
|
+
id: string | number;
|
|
306
|
+
type: "option" | "pinned-option" | "select-all";
|
|
307
|
+
original: MultiSelectFieldOption;
|
|
308
|
+
disabled?: boolean;
|
|
309
|
+
checkState?: MultiSelectFieldCheckState;
|
|
310
|
+
};
|
|
311
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { FocusableElement } from '../../../../..';
|
|
2
|
+
export declare const FieldDialog: ({ id, isOpen, onClose, field, children, title, initialFocusResolver, }: {
|
|
2
3
|
id: string;
|
|
3
4
|
isOpen: boolean;
|
|
4
5
|
onClose: () => void;
|
|
5
6
|
title: string;
|
|
6
7
|
field: React.ReactNode;
|
|
7
8
|
children: React.ReactNode;
|
|
9
|
+
initialFocusResolver?: (focusables: FocusableElement[]) => FocusableElement;
|
|
8
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,7 @@ import { ReactElement, RefObject } from 'react';
|
|
|
8
8
|
* @property {boolean} [disableToggleButton] - Hides the toggle button when true
|
|
9
9
|
* @property {boolean} [disabled] - Disables the input entirely
|
|
10
10
|
* @property {boolean} [readOnly] - Cannot be modified but remains interactive
|
|
11
|
+
* @property {boolean} [required] - Marks the input as required for form validation
|
|
11
12
|
* @property {boolean} [error] - Shows error styling on the input when true
|
|
12
13
|
* @property {() => void} [onClear] - Callback fired when the clear button is clicked
|
|
13
14
|
* @property {string} [id] - HTML id attribute for the input element
|
|
@@ -26,6 +27,7 @@ export type SelectFieldInputProps = {
|
|
|
26
27
|
disableToggleButton?: boolean;
|
|
27
28
|
disabled?: boolean;
|
|
28
29
|
readOnly?: boolean;
|
|
30
|
+
required?: boolean;
|
|
29
31
|
error?: boolean;
|
|
30
32
|
onClear?: () => void;
|
|
31
33
|
id?: string;
|
|
@@ -59,6 +61,6 @@ export type SelectFieldInputProps = {
|
|
|
59
61
|
* />
|
|
60
62
|
*/
|
|
61
63
|
export declare const SelectFieldInput: {
|
|
62
|
-
({ placeholder, size, disableClearButton, disableToggleButton, disabled, readOnly, error, onClear, id, inputWrapperRef, htmlInputWrapperProps, inputProps, toggleButtonProps, prefix, suffix, }: SelectFieldInputProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
({ placeholder, size, disableClearButton, disableToggleButton, disabled, readOnly, required, error, onClear, id, inputWrapperRef, htmlInputWrapperProps, inputProps, toggleButtonProps, prefix, suffix, }: SelectFieldInputProps): import("react/jsx-runtime").JSX.Element;
|
|
63
65
|
displayName: string;
|
|
64
66
|
};
|
|
@@ -8,14 +8,20 @@ type GetLabelProps = UseComboboxPropGetters<SelectFieldDownshiftItem>["getLabelP
|
|
|
8
8
|
* @property {GetLabelProps} getLabelProps - Downshift getter function that returns accessibility props for the label
|
|
9
9
|
* @property {boolean} [required] - Whether the field is required. Shows a red asterisk (*) when true.
|
|
10
10
|
* @property {ReactNode} [moreInfo] - Additional information to display in a tooltip
|
|
11
|
-
* @property {boolean} [openMoreInfo] -
|
|
11
|
+
* @property {boolean} [openMoreInfo] - @deprecated: Use `moreInfoOpen` instead.
|
|
12
|
+
* @property {boolean} [moreInfoOpen] - Controls the open state of the more info tooltip
|
|
13
|
+
* @property {boolean} [hideLabel] - Visually hides the label while keeping it accessible to screen readers
|
|
14
|
+
* @property {ReactNode} [labelNode] - Custom ReactNode to render as the label, overriding the default label text
|
|
12
15
|
*/
|
|
13
16
|
export type SelectFieldLabelProps = {
|
|
14
17
|
label: string;
|
|
15
18
|
getLabelProps: GetLabelProps;
|
|
16
|
-
|
|
19
|
+
hideLabel?: boolean;
|
|
20
|
+
labelNode?: ReactNode;
|
|
17
21
|
moreInfo?: ReactNode;
|
|
18
22
|
openMoreInfo?: boolean;
|
|
23
|
+
moreInfoOpen?: boolean;
|
|
24
|
+
required?: boolean;
|
|
19
25
|
};
|
|
20
26
|
/**
|
|
21
27
|
* Internal label component for the SelectField that renders an accessible label element.
|
|
@@ -26,6 +32,8 @@ export type SelectFieldLabelProps = {
|
|
|
26
32
|
* - Supports screen readers with proper labeling
|
|
27
33
|
* - Optional required field indicator with red asterisk
|
|
28
34
|
* - Help tooltip with info icon for additional context
|
|
35
|
+
* - Can visually hide the label while maintaining accessibility
|
|
36
|
+
* - Supports custom label content via labelNode
|
|
29
37
|
*
|
|
30
38
|
* @example
|
|
31
39
|
* <SelectFieldLabel
|
|
@@ -35,5 +43,5 @@ export type SelectFieldLabelProps = {
|
|
|
35
43
|
* moreInfo="Choose from available options"
|
|
36
44
|
* />
|
|
37
45
|
*/
|
|
38
|
-
export declare const SelectFieldLabel: ({ label, getLabelProps,
|
|
46
|
+
export declare const SelectFieldLabel: ({ label, getLabelProps, hideLabel, labelNode, moreInfo, openMoreInfo, moreInfoOpen, required, }: SelectFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
47
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseComboboxPropGetters } from 'downshift';
|
|
2
2
|
import { SelectFieldDownshiftItem } from '../types';
|
|
3
|
+
import { CheckState } from '../../../../types';
|
|
3
4
|
type GetItemProps = UseComboboxPropGetters<SelectFieldDownshiftItem>["getItemProps"];
|
|
4
5
|
export type SelectFieldListItemProps = {
|
|
5
6
|
item: SelectFieldDownshiftItem;
|
|
@@ -8,7 +9,7 @@ export type SelectFieldListItemProps = {
|
|
|
8
9
|
disabled: boolean;
|
|
9
10
|
getItemProps: GetItemProps;
|
|
10
11
|
selectionType: "single" | "multiple";
|
|
11
|
-
checked:
|
|
12
|
+
checked: CheckState;
|
|
12
13
|
};
|
|
13
14
|
export declare const SelectFieldListItem: ({ item, index, highlighted, disabled, getItemProps, selectionType, checked, }: SelectFieldListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AriaAttributes, ReactElement } from 'react';
|
|
1
|
+
import { AriaAttributes, CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { LayoutUtilProps, Size } from '../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the SelectField cache.
|
|
@@ -155,10 +155,20 @@ type SelectFieldCommonSelectFieldProps = {
|
|
|
155
155
|
* When truthy, displays error styling and message.
|
|
156
156
|
*/
|
|
157
157
|
error?: ReactElement | string | boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Visually hides the label while keeping it accessible to screen readers.
|
|
160
|
+
* @default false
|
|
161
|
+
*/
|
|
162
|
+
hideLabel?: boolean;
|
|
158
163
|
/**
|
|
159
164
|
* Hint text displayed below the input field.
|
|
160
165
|
*/
|
|
161
166
|
hint?: ReactElement | string;
|
|
167
|
+
/**
|
|
168
|
+
* Custom ReactNode to render as the label, overriding the default label text.
|
|
169
|
+
* The `label` prop is still required for accessibility purposes.
|
|
170
|
+
*/
|
|
171
|
+
labelNode?: ReactNode;
|
|
162
172
|
/**
|
|
163
173
|
* Description text displayed below the input field.
|
|
164
174
|
*/
|
|
@@ -190,6 +200,14 @@ type SelectFieldCommonSelectFieldProps = {
|
|
|
190
200
|
* Content to display after the input field.
|
|
191
201
|
*/
|
|
192
202
|
suffix?: string | ReactElement;
|
|
203
|
+
/**
|
|
204
|
+
* Custom CSS class name for the wrapper element.
|
|
205
|
+
*/
|
|
206
|
+
className?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Custom inline styles for the wrapper element.
|
|
209
|
+
*/
|
|
210
|
+
style?: CSSProperties;
|
|
193
211
|
} & SelectFieldSearchProps & SelectFieldAddNewOptionProps & LayoutUtilProps;
|
|
194
212
|
type SelectFieldGroupingProps = {
|
|
195
213
|
/**
|
package/dist/beta.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { D as DataTable, a as chipsFormatter, c as createColumnHelper, b as currencyFormatter, p as percentFormatter } from './DataTable-
|
|
2
|
-
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-
|
|
3
|
-
export { u as useCalendarBetaProps } from './Calendar-
|
|
4
|
-
export { C as Calendar } from './Calendar-
|
|
5
|
-
export { S as SelectField, a as SelectFieldSync
|
|
1
|
+
export { D as DataTable, a as chipsFormatter, c as createColumnHelper, b as currencyFormatter, p as percentFormatter } from './DataTable-hXWouflx.js';
|
|
2
|
+
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-K9UFfyvX.js';
|
|
3
|
+
export { u as useCalendarBetaProps } from './Calendar-BeFARXwq.js';
|
|
4
|
+
export { C as Calendar } from './Calendar-M9v994mm.js';
|
|
5
|
+
export { S as SelectField, a as SelectFieldSync } from './SelectFieldSync-0CL0RTpg.js';
|
|
6
|
+
export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-B3HNQf7R.js';
|
|
7
|
+
export { u as useAdaptiveView } from './FieldDialog-BHgkQOhh.js';
|
|
6
8
|
//# sourceMappingURL=beta.js.map
|
package/dist/beta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beta.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"beta.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -287,7 +287,7 @@ export type ComboboxContentProps<Item> = Omit<ComponentPropsWithoutRef<"div">, "
|
|
|
287
287
|
* Props for the ComboboxTrigger component
|
|
288
288
|
* @template Item - The type of items in the combobox
|
|
289
289
|
*/
|
|
290
|
-
export type ComboboxTriggerProps<Item = any> = Omit<TextFieldProps, "disabled" | "readOnly" | "showCounter"> & Pick<LabelProps, "required" | "moreInfo" | "openMoreInfo"> & LayoutUtilProps & {
|
|
290
|
+
export type ComboboxTriggerProps<Item = any> = Omit<TextFieldProps, "disabled" | "readOnly" | "showCounter"> & Pick<LabelProps, "required" | "moreInfo" | "openMoreInfo" | "moreInfoOpen"> & LayoutUtilProps & {
|
|
291
291
|
/**
|
|
292
292
|
* Should be a positive integer.
|
|
293
293
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextFieldProps } from '../../../TextField/internal/TextField';
|
|
2
2
|
import { LabelProps } from '../../../../internal/components/Label';
|
|
3
|
-
type ComboboxLegacyTriggerProps = Omit<TextFieldProps, "disabled" | "readOnly"> & Pick<LabelProps, "required" | "moreInfo" | "openMoreInfo"> & {
|
|
3
|
+
type ComboboxLegacyTriggerProps = Omit<TextFieldProps, "disabled" | "readOnly"> & Pick<LabelProps, "required" | "moreInfo" | "openMoreInfo" | "moreInfoOpen"> & {
|
|
4
4
|
/**
|
|
5
5
|
* Should be a positive integer.
|
|
6
6
|
*/
|
|
@@ -13,7 +13,7 @@ type ComboboxLegacyTriggerProps = Omit<TextFieldProps, "disabled" | "readOnly">
|
|
|
13
13
|
};
|
|
14
14
|
export type ComboboxLegacySearchFieldProps = ComboboxLegacyTriggerProps;
|
|
15
15
|
export type ComboboxLegacySelectTriggerProps = ComboboxLegacyTriggerProps;
|
|
16
|
-
export declare const ComboboxLegacyTrigger: ({ className, label, size, error, hint, description, required, moreInfo, openMoreInfo, prefix, suffix, maxRows, id, disabled, readOnly, ...rest }: ComboboxLegacyTriggerProps & {
|
|
16
|
+
export declare const ComboboxLegacyTrigger: ({ className, label, size, error, hint, description, required, moreInfo, openMoreInfo, moreInfoOpen, prefix, suffix, maxRows, id, disabled, readOnly, ...rest }: ComboboxLegacyTriggerProps & {
|
|
17
17
|
variant?: "combobox" | "select";
|
|
18
18
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export declare const ComboboxLegacySearchField: (props: ComboboxLegacyTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,11 +13,15 @@ type FieldLabelOwnProps<E extends ElementType = ElementType> = {
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
/** Additional information to display in a tooltip */
|
|
15
15
|
moreInfo?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated: Use `moreInfoOpen` instead.
|
|
18
|
+
*/
|
|
19
|
+
openMoreInfo?: TooltipProps["open"];
|
|
16
20
|
/**
|
|
17
21
|
* Controls the open state of the more info tooltip.
|
|
18
22
|
* @default false
|
|
19
23
|
*/
|
|
20
|
-
|
|
24
|
+
moreInfoOpen?: TooltipProps["open"];
|
|
21
25
|
};
|
|
22
26
|
/**
|
|
23
27
|
* Props for the FieldLabel component.
|
|
@@ -5,10 +5,12 @@ import { FieldLabelProps } from '../FieldLabel';
|
|
|
5
5
|
* @param props - Component props
|
|
6
6
|
* @param props.moreInfo - The content to display in the tooltip
|
|
7
7
|
* @param props.openMoreInfo - Controls the tooltip open state
|
|
8
|
+
* @param props.moreInfoOpen - Controls the tooltip open state
|
|
8
9
|
* @param props.listenForHover - Whether to listen for hover events
|
|
9
10
|
*/
|
|
10
|
-
export declare const FieldLabelMoreInfoIcon: ({ moreInfo, openMoreInfo, listenForHover, }: {
|
|
11
|
+
export declare const FieldLabelMoreInfoIcon: ({ moreInfo, openMoreInfo, moreInfoOpen, listenForHover, }: {
|
|
11
12
|
moreInfo: FieldLabelProps["moreInfo"];
|
|
12
13
|
openMoreInfo: FieldLabelProps["openMoreInfo"];
|
|
14
|
+
moreInfoOpen: FieldLabelProps["moreInfoOpen"];
|
|
13
15
|
listenForHover?: boolean;
|
|
14
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Figma Code Connect for Icons
|
|
3
|
+
*
|
|
4
|
+
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
5
|
+
* Generated by: FIGMA_ACCESS_TOKEN=xxx pnpm figma:generate-icon-connect
|
|
6
|
+
*
|
|
7
|
+
* This file connects 2281 icons to their Figma components.
|
|
8
|
+
* Each icon is imported and connected so that Figma Dev Mode and MCP
|
|
9
|
+
* can generate valid, copy-paste ready code.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { LayoutUtilProps } from '../../types';
|
|
3
|
-
import {
|
|
3
|
+
import { ListViewWithItems, ListViewWithOutItems } from './internal/types';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the ListView component
|
|
6
6
|
* @template T - The type of additional properties for items
|
|
7
7
|
* @extends LayoutUtilProps
|
|
8
8
|
*/
|
|
9
|
-
export type ListViewProps<T> = LayoutUtilProps &
|
|
10
|
-
/** Currently indeterminate items (controlled) */
|
|
11
|
-
indeterminate?: unknown[];
|
|
12
|
-
/** Callback when selection changes */
|
|
13
|
-
onSelectionChange?: (value: unknown[]) => void;
|
|
14
|
-
/** Currently selected items (controlled) */
|
|
15
|
-
selected?: ItemType<T>[];
|
|
16
|
-
} & (ListViewWithItems<T> | ListViewWithOutItems);
|
|
9
|
+
export type ListViewProps<T> = LayoutUtilProps & (ListViewWithItems<T> | ListViewWithOutItems);
|
|
17
10
|
declare const ListViewElement: {
|
|
18
11
|
<T>(props: ListViewProps<T>, ref: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
19
12
|
displayName: string;
|
|
@@ -19,10 +19,16 @@ export type ListViewWithItems<T> = Omit<ComponentPropsWithoutRef<"div">, "childr
|
|
|
19
19
|
items: ItemType<T>[];
|
|
20
20
|
/** Default selected items (uncontrolled) */
|
|
21
21
|
defaultSelected?: ItemType<T>[];
|
|
22
|
+
/** Currently selected items (controlled) */
|
|
23
|
+
selected?: ItemType<T>[];
|
|
22
24
|
/** Optional render function for items */
|
|
23
25
|
children?: ({ items }: {
|
|
24
26
|
items: ItemType<T>[];
|
|
25
27
|
}) => ReactNode;
|
|
28
|
+
/** Callback when selection changes */
|
|
29
|
+
onSelectionChange?: (value: ItemType<T>[]) => void;
|
|
30
|
+
/** Currently indeterminate items (controlled) */
|
|
31
|
+
indeterminate?: ItemType<T>[];
|
|
26
32
|
};
|
|
27
33
|
/**
|
|
28
34
|
* Props for the ListView component without items array
|
|
@@ -31,6 +37,12 @@ export type ListViewWithItems<T> = Omit<ComponentPropsWithoutRef<"div">, "childr
|
|
|
31
37
|
export type ListViewWithOutItems = ComponentPropsWithoutRef<"div"> & {
|
|
32
38
|
/** Default selected items (uncontrolled) */
|
|
33
39
|
defaultSelected?: string[];
|
|
40
|
+
/** Currently selected items (controlled) */
|
|
41
|
+
selected?: string[];
|
|
42
|
+
/** Callback when selection changes */
|
|
43
|
+
onSelectionChange?: (value: string[]) => void;
|
|
44
|
+
/** Currently indeterminate items (controlled) */
|
|
45
|
+
indeterminate?: string[];
|
|
34
46
|
};
|
|
35
47
|
/**
|
|
36
48
|
* Option object for internal focus and selection management
|
|
@@ -5,7 +5,7 @@ import { DataTrackingId, DistributiveOmit } from '../../types';
|
|
|
5
5
|
import { FieldLabelProps } from '../FieldLabel';
|
|
6
6
|
import { IconProps } from '../Icon';
|
|
7
7
|
import { SelectTriggerBaseProps } from './internal/SelectTriggerBase';
|
|
8
|
-
export type SelectTriggerProps<Item> = DistributiveOmit<SelectTriggerBaseProps<Item>, "prefix" | "selectedItem" | "selectedItems" | "onChange"> & Pick<FieldLabelProps, "required" | "moreInfo" | "openMoreInfo"> & Pick<UseDownshiftComboboxProps<Item>, "itemToString" | "itemToKey"> & DataTrackingId & {
|
|
8
|
+
export type SelectTriggerProps<Item> = DistributiveOmit<SelectTriggerBaseProps<Item>, "prefix" | "selectedItem" | "selectedItems" | "onChange"> & Pick<FieldLabelProps, "required" | "moreInfo" | "openMoreInfo" | "moreInfoOpen"> & Pick<UseDownshiftComboboxProps<Item>, "itemToString" | "itemToKey"> & DataTrackingId & {
|
|
9
9
|
prefix?: string | {
|
|
10
10
|
icon: DistributiveOmit<IconProps, "size">;
|
|
11
11
|
} | {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,7 +6,7 @@ import { TextareaAutosizeConditionalProps, TextareaState } from './types';
|
|
|
6
6
|
/**
|
|
7
7
|
* Props for the Textarea component
|
|
8
8
|
*/
|
|
9
|
-
export type TextareaProps = Omit<ComponentPropsWithoutRef<"textarea">, "onChange"> & LayoutUtilProps & DataTrackingId & MaxLengthCounterProps & TextareaAutosizeConditionalProps & Pick<FieldLabelProps, "moreInfo" | "openMoreInfo"> & {
|
|
9
|
+
export type TextareaProps = Omit<ComponentPropsWithoutRef<"textarea">, "onChange"> & LayoutUtilProps & DataTrackingId & MaxLengthCounterProps & TextareaAutosizeConditionalProps & Pick<FieldLabelProps, "moreInfo" | "openMoreInfo" | "moreInfoOpen"> & {
|
|
10
10
|
/**
|
|
11
11
|
* Sets error style on textarea.
|
|
12
12
|
* If string or ReactElement provided, places it under the label and sets error style.
|