@servicetitan/anvil2 1.50.0 → 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 +32 -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-hxGMMb8x.js → Combobox-BTTWNSW1.js} +290 -192
- package/dist/Combobox-BTTWNSW1.js.map +1 -0
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-DSySFGWC.js → DataTable-hXWouflx.js} +114 -60
- package/dist/DataTable-hXWouflx.js.map +1 -0
- package/dist/DataTable.css +68 -26
- 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/{SelectFieldSync.css → FieldDialog.css} +6 -5
- 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-DfVnPiNf.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-D8scKtBr.js → SelectTriggerBase-RHD4FTQE.js} +5 -17
- package/dist/SelectTriggerBase-RHD4FTQE.js.map +1 -0
- 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-DEwvVf35.js → Toolbar-K9UFfyvX.js} +326 -171
- package/dist/Toolbar-K9UFfyvX.js.map +1 -0
- package/dist/Toolbar.css +62 -30
- 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/internal/useCombo.d.ts +1 -0
- package/dist/beta/components/SelectField/types.d.ts +19 -1
- package/dist/beta/components/Table/DataTable/internal/cells/DataTableHeaderCell.d.ts +9 -1
- package/dist/beta/components/Table/DataTable/stories/DataTable.story-data.d.ts +1 -0
- package/dist/beta/components/Table/internal/ResizeHandle.d.ts +5 -2
- package/dist/beta/components/Table/internal/getCommonPinningStyles.d.ts +2 -1
- package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +28 -0
- 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/Combobox/internal/ComboboxLegacy/ComboboxLegacyUtils.d.ts +0 -36
- package/dist/components/Combobox/internal/ComboboxUtils.d.ts +0 -57
- 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/index.d.ts +1 -0
- package/dist/internal/hooks/useDownshiftEnvironment/index.d.ts +1 -0
- package/dist/internal/hooks/useDownshiftEnvironment/useDownshiftEnvironment.d.ts +36 -0
- package/dist/internal/hooks/useOnClickOutside/useOnClickOutside.d.ts +8 -7
- package/dist/{match-sorter.esm-CtBw0MrM.js → match-sorter.esm-NrKOPPde.js} +16 -3
- package/dist/match-sorter.esm-NrKOPPde.js.map +1 -0
- 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-hxGMMb8x.js.map +0 -1
- package/dist/DataTable-DSySFGWC.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-BOzavAtv.js +0 -1122
- package/dist/SelectFieldSync-BOzavAtv.js.map +0 -1
- package/dist/SelectTrigger-DfVnPiNf.js.map +0 -1
- package/dist/SelectTriggerBase-D8scKtBr.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-DEwvVf35.js.map +0 -1
- package/dist/match-sorter.esm-CtBw0MrM.js.map +0 -1
- package/dist/useOnClickOutside-BDzuUjmY.js +0 -147
- package/dist/useOnClickOutside-BDzuUjmY.js.map +0 -1
|
@@ -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 {};
|
|
@@ -18,6 +18,7 @@ export type UseComboOptions = {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const useCombo: ({ options, pinnedOptions, selectAll, selectedOption, onSelectedOptionChange, onInputValueChange, onIsOpenChange, displayAs, disableHighlightOnOpen, disabled, }: UseComboOptions) => {
|
|
20
20
|
inputValue: string;
|
|
21
|
+
wrapperDivRef: import('react').RefObject<HTMLDivElement>;
|
|
21
22
|
getToggleButtonProps: <Options>(options?: import('downshift').UseComboboxGetToggleButtonPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetToggleButtonPropsReturnValue, Options>;
|
|
22
23
|
getLabelProps: <Options>(options?: import('downshift').UseComboboxGetLabelPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetLabelPropsReturnValue, Options>;
|
|
23
24
|
getMenuProps: <Options>(options?: import('downshift').UseComboboxGetMenuPropsOptions & Options, otherOptions?: import('downshift').GetPropsCommonOptions) => import('downshift').Overwrite<import('downshift').UseComboboxGetMenuPropsReturnValue, Options>;
|
|
@@ -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
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
1
2
|
import { HeaderContext } from '@tanstack/react-table';
|
|
2
3
|
import { DataTableHeaderCellProps as BaseDataTableHeaderCellProps } from '../../../base/cells/TableHeaderCell';
|
|
3
4
|
/**
|
|
@@ -18,4 +19,11 @@ export type DataTableHeaderCellProps<T> = BaseDataTableHeaderCellProps & {
|
|
|
18
19
|
* @param props.children - The children of the DataTableHeaderCell component
|
|
19
20
|
* @param props.header - The header of the DataTableHeaderCell component
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
+
declare function DataTableHeaderCellInner<T>(props: DataTableHeaderCellProps<T>, forwardedRef: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Data table header cell with focus management and ref forwarding
|
|
25
|
+
*/
|
|
26
|
+
export declare const DataTableHeaderCell: <T>(props: DataTableHeaderCellProps<T> & {
|
|
27
|
+
ref?: Ref<HTMLDivElement>;
|
|
28
|
+
}) => ReturnType<typeof DataTableHeaderCellInner>;
|
|
29
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export declare const expandedRowData: TableRow<TableStoryData>[];
|
|
|
15
15
|
export declare const subComponentsData: TableRow<TableStoryData>[];
|
|
16
16
|
export declare const primaryColumns: import('../..').ColumnDef<TableStoryData>[];
|
|
17
17
|
export declare const groupedColumns: import('../..').ColumnDef<TableStoryData>[];
|
|
18
|
+
export declare const columnsWithMaxWidth: import('../..').ColumnDef<TableStoryData>[];
|
|
18
19
|
export declare const columnsWithoutFooter: import('../..').ColumnDef<TableStoryData>[];
|
|
19
20
|
export type Category = "electronics" | "clothing" | "home" | "garden" | "other";
|
|
20
21
|
export type EditableTableStoryData = {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { Header } from '@tanstack/react-table';
|
|
2
2
|
/**
|
|
3
3
|
* Props for the ResizeHandle component
|
|
4
|
-
* @
|
|
4
|
+
* @property {Header<T, unknown>} header - The header instance from TanStack Table
|
|
5
|
+
* @property {() => void} [onResizeStart] - Callback fired before resize begins, useful for initializing state
|
|
5
6
|
*/
|
|
6
7
|
export type ResizeHandleProps<T> = {
|
|
7
8
|
header: Header<T, unknown>;
|
|
9
|
+
onResizeStart?: () => void;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* Resize handle component resizing table columns
|
|
11
13
|
* @param props - The props for the ResizeHandle component
|
|
12
14
|
* @param props.header - The header of the ResizeHandle component
|
|
15
|
+
* @param props.onResizeStart - Optional callback fired before resize begins
|
|
13
16
|
*/
|
|
14
|
-
export declare function ResizeHandle<T>({ header }: ResizeHandleProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ResizeHandle<T>({ header, onResizeStart, }: ResizeHandleProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { Column } from '@tanstack/react-table';
|
|
3
3
|
/**
|
|
4
|
-
* Get the common styles for
|
|
4
|
+
* Get the common styles for sticky positioning of pinned columns
|
|
5
|
+
* Width is handled by CSS Grid, so only positioning is needed
|
|
5
6
|
*/
|
|
6
7
|
export declare const getCommonPinningStyles: <T>(column: Column<T>) => CSSProperties;
|
|
@@ -38,3 +38,31 @@ export declare const updateSingleFilter: (filters: Filter[], filterId: string, v
|
|
|
38
38
|
* @returns {boolean} True if the values are different
|
|
39
39
|
*/
|
|
40
40
|
export declare const hasChangedFilter: <T>(a: T, b: T) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if the selection value of a filter has changed by comparing references.
|
|
43
|
+
* Uses reference equality (===) to detect if the parent has provided a new value.
|
|
44
|
+
*
|
|
45
|
+
* @param {Filter} existingFilter - The current filter state
|
|
46
|
+
* @param {Filter} newFilter - The incoming filter from props
|
|
47
|
+
* @returns {boolean} True if the selection value reference has changed
|
|
48
|
+
*/
|
|
49
|
+
export declare const hasFilterSelectionChanged: (existingFilter: Filter, newFilter: Filter) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Preserves the selection state from an existing filter into a new filter.
|
|
52
|
+
* Used when filter configuration updates but the selection value reference hasn't changed,
|
|
53
|
+
* allowing us to maintain user selections through configuration updates.
|
|
54
|
+
*
|
|
55
|
+
* @param {Filter} newFilter - The new filter configuration from props
|
|
56
|
+
* @param {Filter} existingFilter - The existing filter with user's selections
|
|
57
|
+
* @returns {Filter} New filter with configuration from newFilter and selection from existingFilter
|
|
58
|
+
*/
|
|
59
|
+
export declare const preserveFilterState: (newFilter: Filter, existingFilter: Filter) => Filter;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a deep clone of filters with updated item references.
|
|
62
|
+
* Ensures that selected items reference the current items array for proper equality checks.
|
|
63
|
+
* Used when initializing draft state to ensure selections use current item references.
|
|
64
|
+
*
|
|
65
|
+
* @param {Filter[]} filters - Array of filter objects to clone
|
|
66
|
+
* @returns {Filter[]} New array with cloned filters and updated item references
|
|
67
|
+
*/
|
|
68
|
+
export declare const cloneFiltersWithItemRefs: (filters: Filter[]) => Filter[];
|
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;
|
|
@@ -32,40 +32,4 @@ export type ComboboxLegacyContextProps<Item = any> = Required<Pick<UseDownshiftC
|
|
|
32
32
|
setHasExactMatch?: Dispatch<SetStateAction<boolean>>;
|
|
33
33
|
};
|
|
34
34
|
export declare const ComboboxLegacyContext: import('react').Context<ComboboxLegacyContextProps<any> | null>;
|
|
35
|
-
export declare const useDownshiftEnvironment: () => {
|
|
36
|
-
ref: MutableRefObject<HTMLDivElement | null>;
|
|
37
|
-
environment: {
|
|
38
|
-
document: Document;
|
|
39
|
-
addEventListener: {
|
|
40
|
-
<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
41
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
42
|
-
};
|
|
43
|
-
removeEventListener: {
|
|
44
|
-
<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
45
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
46
|
-
};
|
|
47
|
-
Node: {
|
|
48
|
-
new (): Node;
|
|
49
|
-
prototype: Node;
|
|
50
|
-
readonly ELEMENT_NODE: 1;
|
|
51
|
-
readonly ATTRIBUTE_NODE: 2;
|
|
52
|
-
readonly TEXT_NODE: 3;
|
|
53
|
-
readonly CDATA_SECTION_NODE: 4;
|
|
54
|
-
readonly ENTITY_REFERENCE_NODE: 5;
|
|
55
|
-
readonly ENTITY_NODE: 6;
|
|
56
|
-
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
57
|
-
readonly COMMENT_NODE: 8;
|
|
58
|
-
readonly DOCUMENT_NODE: 9;
|
|
59
|
-
readonly DOCUMENT_TYPE_NODE: 10;
|
|
60
|
-
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
61
|
-
readonly NOTATION_NODE: 12;
|
|
62
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
63
|
-
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
64
|
-
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
65
|
-
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
66
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
67
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
68
|
-
};
|
|
69
|
-
} | undefined;
|
|
70
|
-
};
|
|
71
35
|
export declare const useComboboxLegacy: <Item = any>() => ComboboxLegacyContextProps<Item>;
|