@servicetitan/anvil2 2.2.0 → 2.4.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/CHANGELOG.md +36 -0
- package/dist/{Alert-DXoEusod.js → Alert-D9mBPs6z.js} +2 -2
- package/dist/{Alert-DXoEusod.js.map → Alert-D9mBPs6z.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-SAypScAu.js → Announcement-B34cD6BC.js} +2 -2
- package/dist/{Announcement-SAypScAu.js.map → Announcement-B34cD6BC.js.map} +1 -1
- package/dist/Announcement.js +1 -1
- package/dist/{Button-l7pTJdPc.js → Button-DrNDkO2f.js} +2 -2
- package/dist/{Button-l7pTJdPc.js.map → Button-DrNDkO2f.js.map} +1 -1
- package/dist/Button.css +50 -50
- package/dist/Button.js +1 -1
- package/dist/Button.module-DwCq9XU0.js +26 -0
- package/dist/Button.module-DwCq9XU0.js.map +1 -0
- package/dist/{ButtonCompound-CX2kHgWe.js → ButtonCompound-D9VTKcL4.js} +2 -2
- package/dist/{ButtonCompound-CX2kHgWe.js.map → ButtonCompound-D9VTKcL4.js.map} +1 -1
- package/dist/ButtonCompound.js +1 -1
- package/dist/{ButtonLink-CRlyK750.js → ButtonLink-DDtrmbVM.js} +3 -2
- package/dist/ButtonLink-DDtrmbVM.js.map +1 -0
- package/dist/ButtonLink.js +1 -1
- package/dist/{ButtonToggle-BOVP_jEN.js → ButtonToggle-DrFewgOG.js} +3 -3
- package/dist/{ButtonToggle-BOVP_jEN.js.map → ButtonToggle-DrFewgOG.js.map} +1 -1
- package/dist/ButtonToggle.js +1 -1
- package/dist/{Calendar-oNlBgZKB.js → Calendar-CkgpKD7Q.js} +2 -2
- package/dist/{Calendar-oNlBgZKB.js.map → Calendar-CkgpKD7Q.js.map} +1 -1
- package/dist/{Calendar-D0CczOpQ.js → Calendar-CtkL4zYU.js} +3 -3
- package/dist/{Calendar-D0CczOpQ.js.map → Calendar-CtkL4zYU.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-DuzAqrE7.js → Checkbox-CFgjreAl.js} +2 -2
- package/dist/{Checkbox-DuzAqrE7.js.map → Checkbox-CFgjreAl.js.map} +1 -1
- package/dist/{Checkbox-DIY-6agd.js → Checkbox-CxjZpzPp.js} +3 -3
- package/dist/{Checkbox-DIY-6agd.js.map → Checkbox-CxjZpzPp.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Combobox-CSGn20KQ.js → Combobox-Drqb3GVU.js} +4 -4
- package/dist/{Combobox-CSGn20KQ.js.map → Combobox-Drqb3GVU.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-D30sE1Xt.js → DataTable-BLuJ4FtH.js} +311 -51
- package/dist/DataTable-BLuJ4FtH.js.map +1 -0
- package/dist/DataTable.css +9 -5
- package/dist/{DateFieldRange-DBOiqaML.js → DateFieldRange-CvlOeE4v.js} +4 -4
- package/dist/{DateFieldRange-DBOiqaML.js.map → DateFieldRange-CvlOeE4v.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-C4hU55MP.js → DateFieldSingle-9UHxIxIA.js} +4 -4
- package/dist/{DateFieldSingle-C4hU55MP.js.map → DateFieldSingle-9UHxIxIA.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-BXkUiHIR.js → DateFieldYearless-HNydELvO.js} +4 -4
- package/dist/{DateFieldYearless-BXkUiHIR.js.map → DateFieldYearless-HNydELvO.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-CGffFnVT.js → DateFieldYearlessRange-COb8v2CG.js} +4 -4
- package/dist/{DateFieldYearlessRange-CGffFnVT.js.map → DateFieldYearlessRange-COb8v2CG.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-DJEDopC9.js → DaysOfTheWeek-D-WPj18i.js} +3 -3
- package/dist/{DaysOfTheWeek-DJEDopC9.js.map → DaysOfTheWeek-D-WPj18i.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-BbsZMnCA.js → Dialog-DEAR058v.js} +3 -3
- package/dist/{Dialog-BbsZMnCA.js.map → Dialog-DEAR058v.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{DialogCancelButton-GuN5lgR-.js → DialogCancelButton-BfI9K4a4.js} +2 -2
- package/dist/{DialogCancelButton-GuN5lgR-.js.map → DialogCancelButton-BfI9K4a4.js.map} +1 -1
- package/dist/Dnd.js +1 -1
- package/dist/DndSort.js +2 -2
- package/dist/{Drawer-Dhq76ot3.js → Drawer-CnMskBQl.js} +3 -3
- package/dist/{Drawer-Dhq76ot3.js.map → Drawer-CnMskBQl.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-DAiE-Hsc.js → EditCard-CH-JE4ba.js} +2 -2
- package/dist/{EditCard-DAiE-Hsc.js.map → EditCard-CH-JE4ba.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldDialog-CAuhkCZY.js → FieldDialog-C5mwMjrr.js} +120 -35
- package/dist/FieldDialog-C5mwMjrr.js.map +1 -0
- package/dist/FieldMessage-OeP_xSUE.js +132 -0
- package/dist/FieldMessage-OeP_xSUE.js.map +1 -0
- package/dist/FieldMessage.js +1 -1
- package/dist/{Helper-PNGm_U2X.js → Helper-B2UrgJvr.js} +2 -2
- package/dist/{Helper-PNGm_U2X.js.map → Helper-B2UrgJvr.js.map} +1 -1
- package/dist/{InputMask-Ds0W2fKy.js → InputMask-B7ZnJoR5.js} +2 -2
- package/dist/{InputMask-Ds0W2fKy.js.map → InputMask-B7ZnJoR5.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-MMmJDM--.js → ListView-CN8zu-cq.js} +2 -2
- package/dist/{ListView-MMmJDM--.js.map → ListView-CN8zu-cq.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Menu-3LIfRdTk.js → Menu-CpRnsr0v.js} +2 -2
- package/dist/{Menu-3LIfRdTk.js.map → Menu-CpRnsr0v.js.map} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-Bey99LzJ.js → MultiSelectFieldSync-BnPzYM72.js} +876 -255
- package/dist/MultiSelectFieldSync-BnPzYM72.js.map +1 -0
- package/dist/{NumberField-CDkEUfXW.js → NumberField-ecubQsaf.js} +4 -4
- package/dist/{NumberField-CDkEUfXW.js.map → NumberField-ecubQsaf.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-BVxybI-j.js → Page-qOkG6psI.js} +7 -7
- package/dist/{Page-BVxybI-j.js.map → Page-qOkG6psI.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-DIatYUXX.js → Pagination-BuiyhZlJ.js} +14 -7
- package/dist/Pagination-BuiyhZlJ.js.map +1 -0
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-4C5IVk8T.js → Popover-CYWYCj7l.js} +2 -2
- package/dist/{Popover-4C5IVk8T.js.map → Popover-CYWYCj7l.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-BGwp-qnf.js → ProgressBar-CBhVZIzK.js} +2 -2
- package/dist/{ProgressBar-BGwp-qnf.js.map → ProgressBar-CBhVZIzK.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-D7hNws2b.js → Radio-BMFwnzyz.js} +2 -2
- package/dist/{Radio-D7hNws2b.js.map → Radio-BMFwnzyz.js.map} +1 -1
- package/dist/{Radio-BRcpSu-d.js → Radio-DtYoRq3m.js} +3 -3
- package/dist/{Radio-BRcpSu-d.js.map → Radio-DtYoRq3m.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{SearchField-CoeaOip5.js → SearchField-CtdtcrVV.js} +12 -4
- package/dist/SearchField-CtdtcrVV.js.map +1 -0
- package/dist/SearchField.js +1 -1
- package/dist/{SelectCard-Bag44PmE.js → SelectCard-yWBNnm7t.js} +32 -8
- package/dist/SelectCard-yWBNnm7t.js.map +1 -0
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/SelectFieldSync-DCrafdbx.js +1248 -0
- package/dist/SelectFieldSync-DCrafdbx.js.map +1 -0
- package/dist/{SelectTrigger-DgsvUfyl.js → SelectTrigger-Cs5CGc4D.js} +2 -2
- package/dist/{SelectTrigger-DgsvUfyl.js.map → SelectTrigger-Cs5CGc4D.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-OxfNqdIq.js → SelectTriggerBase-Cs827tDp.js} +3 -3
- package/dist/{SelectTriggerBase-OxfNqdIq.js.map → SelectTriggerBase-Cs827tDp.js.map} +1 -1
- package/dist/{Stepper-D8lkCP8Y.js → Stepper-CzVKDg-N.js} +2 -2
- package/dist/{Stepper-D8lkCP8Y.js.map → Stepper-CzVKDg-N.js.map} +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-D0zwZCg4.js → Switch-CEmjmSiL.js} +2 -2
- package/dist/{Switch-D0zwZCg4.js.map → Switch-CEmjmSiL.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/{Tab-CeXt6A_D.js → Tab-DXivEqur.js} +47 -6
- package/dist/Tab-DXivEqur.js.map +1 -0
- package/dist/Tab.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{TextField-Dfzn2HeL.js → TextField-D9VWORek.js} +2 -2
- package/dist/{TextField-Dfzn2HeL.js.map → TextField-D9VWORek.js.map} +1 -1
- package/dist/{TextField-BycenT6H.js → TextField-atI4M79b.js} +3 -3
- package/dist/{TextField-BycenT6H.js.map → TextField-atI4M79b.js.map} +1 -1
- package/dist/TextField.css +29 -25
- package/dist/TextField.js +1 -1
- package/dist/TextField.module-BP-hDP5m.js +22 -0
- package/dist/TextField.module-BP-hDP5m.js.map +1 -0
- package/dist/{Textarea-BwbwJP6z.js → Textarea-D-kPIsIN.js} +2 -2
- package/dist/{Textarea-BwbwJP6z.js.map → Textarea-D-kPIsIN.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-B0WSzSfJ.js → TimeField-DREFzFkw.js} +3 -3
- package/dist/{TimeField-B0WSzSfJ.js.map → TimeField-DREFzFkw.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-9Q_yaKGu.js → Toaster-B652KIzq.js} +4 -4
- package/dist/{Toaster-9Q_yaKGu.js.map → Toaster-B652KIzq.js.map} +1 -1
- package/dist/{Toaster-DHo8dnWH.js → Toaster-Bisc1mlh.js} +2 -2
- package/dist/{Toaster-DHo8dnWH.js.map → Toaster-Bisc1mlh.js.map} +1 -1
- package/dist/{Toolbar-CVOenuCF.js → Toolbar-jfZ-CupZ.js} +77 -63
- package/dist/Toolbar-jfZ-CupZ.js.map +1 -0
- package/dist/Toolbar.css +37 -55
- package/dist/Toolbar.js +1 -1
- package/dist/{YearlessDateInputWithPicker-ztozRk-X.js → YearlessDateInputWithPicker-mW5KykHZ.js} +3 -3
- package/dist/{YearlessDateInputWithPicker-ztozRk-X.js.map → YearlessDateInputWithPicker-mW5KykHZ.js.map} +1 -1
- package/dist/beta/components/MultiSelectField/MultiSelectField.d.ts +1 -10
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldComboboxMode.d.ts +5 -0
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldInput.d.ts +0 -2
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldList.d.ts +3 -7
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldSelectMode.d.ts +6 -0
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldTrigger.d.ts +30 -0
- package/dist/beta/components/MultiSelectField/internal/types.d.ts +67 -0
- package/dist/beta/components/MultiSelectField/internal/useChipLayout.d.ts +19 -0
- package/dist/beta/components/MultiSelectField/internal/useComboMultiple.d.ts +1 -2
- package/dist/beta/components/MultiSelectField/internal/useSelectModeMultiple.d.ts +40 -0
- package/dist/beta/components/MultiSelectField/internal/useToggleSelection.d.ts +21 -0
- package/dist/beta/components/MultiSelectField/types.d.ts +7 -0
- package/dist/beta/components/SelectField/internal/FieldDialog/FieldDialog.d.ts +1 -1
- package/dist/beta/components/SelectField/internal/FieldListBase.d.ts +3 -4
- package/dist/beta/components/SelectField/internal/SelectFieldComboboxMode.d.ts +6 -0
- package/dist/beta/components/SelectField/internal/SelectFieldInput.d.ts +0 -2
- package/dist/beta/components/SelectField/internal/SelectFieldLabel.d.ts +4 -3
- package/dist/beta/components/SelectField/internal/SelectFieldList.d.ts +3 -7
- package/dist/beta/components/SelectField/internal/SelectFieldListItem.d.ts +2 -4
- package/dist/beta/components/SelectField/internal/SelectFieldSelectMode.d.ts +6 -0
- package/dist/beta/components/SelectField/internal/SelectFieldTrigger.d.ts +27 -0
- package/dist/beta/components/SelectField/internal/buildDownshiftItems.d.ts +22 -0
- package/dist/beta/components/SelectField/internal/types.d.ts +57 -0
- package/dist/beta/components/SelectField/internal/useCombo.d.ts +1 -5
- package/dist/beta/components/SelectField/internal/useProcessedOptions.d.ts +19 -0
- package/dist/beta/components/SelectField/internal/useSelectMode.d.ts +34 -0
- package/dist/beta/components/SelectField/types.d.ts +7 -0
- package/dist/beta/components/Table/DataTable/DataTable.d.ts +21 -2
- package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableBooleanCell.d.ts +7 -0
- package/dist/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +4 -0
- package/dist/beta/components/Table/DataTable/types.d.ts +20 -0
- package/dist/beta/components/Table/createColumnHelper.d.ts +18 -7
- package/dist/beta/components/Table/types.d.ts +44 -3
- package/dist/beta/components/Toolbar/Toolbar.d.ts +17 -7
- package/dist/beta/components/Toolbar/ToolbarButton.d.ts +0 -1
- package/dist/beta/components/Toolbar/ToolbarButtonLink.d.ts +0 -1
- package/dist/beta/components/Toolbar/ToolbarButtonToggle.d.ts +0 -1
- package/dist/beta/components/Toolbar/ToolbarSearchField.d.ts +2 -3
- package/dist/beta/components/Toolbar/ToolbarSelect.d.ts +0 -1
- package/dist/beta/components/Toolbar/internal/{ToolbarOverflowContext.d.ts → ToolbarContext.d.ts} +14 -5
- package/dist/beta/components/Toolbar/internal/utils/test.d.ts +5 -3
- package/dist/beta/components/Toolbar/types.d.ts +5 -1
- package/dist/beta.js +7 -7
- package/dist/components/ButtonLink/ButtonLink.d.ts +3 -3
- package/dist/components/Pagination/Pagination.d.ts +3 -0
- package/dist/components/Pagination/internal/PaginationItemsPerPageMenu.d.ts +5 -0
- package/dist/components/SearchField/SearchField.d.ts +8 -26
- package/dist/components/SearchField/internal/SearchField.d.ts +73 -0
- package/dist/components/Tab/Tab.d.ts +41 -2
- package/dist/components/Tab/internal/TabContext.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.d.ts +11 -5
- package/dist/components/Toolbar/ToolbarButton.d.ts +0 -1
- package/dist/components/Toolbar/ToolbarButtonLink.d.ts +0 -1
- package/dist/components/Toolbar/ToolbarButtonToggle.d.ts +0 -1
- package/dist/components/Toolbar/ToolbarSelect.d.ts +0 -1
- package/dist/components/Toolbar/internal/{ToolbarOverflowContext.d.ts → ToolbarContext.d.ts} +14 -5
- package/dist/components/Toolbar/internal/utils/test.d.ts +5 -3
- package/dist/components/Toolbar/types.d.ts +5 -1
- package/dist/{index-DFvIVS57.js → index-ClUtwV8V.js} +2 -2
- package/dist/{index-DFvIVS57.js.map → index-ClUtwV8V.js.map} +1 -1
- package/dist/index.js +81 -70
- package/dist/index.js.map +1 -1
- package/dist/index2.css +17 -23
- package/dist/internal/components/ManualTestLayout/ManualTestLayout.d.ts +16 -0
- package/dist/internal/components/ManualTestLayout/index.d.ts +1 -0
- package/dist/internal/components/index.d.ts +1 -0
- package/dist/{match-sorter.esm-B3vwg1-X.js → match-sorter.esm-adzV1NDp.js} +2 -2
- package/dist/{match-sorter.esm-B3vwg1-X.js.map → match-sorter.esm-adzV1NDp.js.map} +1 -1
- package/dist/{useDrilldown-jbU4Cs5l.js → useDrilldown-hUxMOdnz.js} +2 -2
- package/dist/{useDrilldown-jbU4Cs5l.js.map → useDrilldown-hUxMOdnz.js.map} +1 -1
- package/package.json +5 -4
- package/dist/Button.module-Ck7VrMqw.js +0 -26
- package/dist/Button.module-Ck7VrMqw.js.map +0 -1
- package/dist/ButtonLink-CRlyK750.js.map +0 -1
- package/dist/DataTable-D30sE1Xt.js.map +0 -1
- package/dist/FieldDialog-CAuhkCZY.js.map +0 -1
- package/dist/FieldMessage-DS0COrjp.js +0 -132
- package/dist/FieldMessage-DS0COrjp.js.map +0 -1
- package/dist/MultiSelectFieldSync-Bey99LzJ.js.map +0 -1
- package/dist/Pagination-DIatYUXX.js.map +0 -1
- package/dist/SearchField-CoeaOip5.js.map +0 -1
- package/dist/SelectCard-Bag44PmE.js.map +0 -1
- package/dist/SelectFieldSync-CigqXq3T.js +0 -763
- package/dist/SelectFieldSync-CigqXq3T.js.map +0 -1
- package/dist/Tab-CeXt6A_D.js.map +0 -1
- package/dist/TextField.module-pD1felN8.js +0 -20
- package/dist/TextField.module-pD1felN8.js.map +0 -1
- package/dist/Toolbar-CVOenuCF.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, Ref } from 'react';
|
|
2
2
|
import { LayoutUtilProps } from '../../../../types';
|
|
3
3
|
import { ColumnDef, CustomTableFooterCellProps, TableRow } from '../types';
|
|
4
|
-
import { DataTablePaginationConfig, DataTableRef } from './types';
|
|
5
|
-
export type { DataTableRef };
|
|
4
|
+
import { DataTableEmptyState, DataTablePaginationConfig, DataTableRef } from './types';
|
|
5
|
+
export type { DataTableRef, DataTableEmptyState };
|
|
6
6
|
/**
|
|
7
7
|
* Represents a sorted column configuration for DataTable
|
|
8
8
|
*/
|
|
@@ -38,6 +38,12 @@ export type DataTableProps<T> = LayoutUtilProps & ComponentPropsWithoutRef<"div"
|
|
|
38
38
|
* The default expanded row ids. Can be "all" to expand all rows, or an array of row ids to expand specific rows.
|
|
39
39
|
*/
|
|
40
40
|
defaultExpandedRowIds?: "all" | TableRow<T>["id"][];
|
|
41
|
+
/**
|
|
42
|
+
* Disables the "expand all" action in the table header.
|
|
43
|
+
* When true, users can only expand individual rows.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
disableExpandAll?: boolean;
|
|
41
47
|
/**
|
|
42
48
|
* The default selected row ids.
|
|
43
49
|
*/
|
|
@@ -50,6 +56,12 @@ export type DataTableProps<T> = LayoutUtilProps & ComponentPropsWithoutRef<"div"
|
|
|
50
56
|
* The expanded row ids.
|
|
51
57
|
*/
|
|
52
58
|
expandedRowIds?: "all" | TableRow<T>["id"][];
|
|
59
|
+
/**
|
|
60
|
+
* Disables the "select all" action in the table header.
|
|
61
|
+
* When true, users can only select individual rows.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
disableSelectAll?: boolean;
|
|
53
65
|
/**
|
|
54
66
|
* Whether the table is selectable. Can be a boolean or a function to customize the selection logic.
|
|
55
67
|
* @default false
|
|
@@ -81,6 +93,11 @@ export type DataTableProps<T> = LayoutUtilProps & ComponentPropsWithoutRef<"div"
|
|
|
81
93
|
* The sorted column.
|
|
82
94
|
*/
|
|
83
95
|
sortedColumn?: SortedColumn;
|
|
96
|
+
/**
|
|
97
|
+
* Configuration for the empty state displayed when the table has no data.
|
|
98
|
+
* Only shown when data is empty and the table is not loading.
|
|
99
|
+
*/
|
|
100
|
+
emptyState?: DataTableEmptyState;
|
|
84
101
|
};
|
|
85
102
|
declare function DataTableInner<T>(props: DataTableProps<T>, ref: Ref<DataTableRef>): import("react/jsx-runtime").JSX.Element;
|
|
86
103
|
/**
|
|
@@ -99,6 +116,7 @@ declare function DataTableInner<T>(props: DataTableProps<T>, ref: Ref<DataTableR
|
|
|
99
116
|
* - Default and Strong backgrounds
|
|
100
117
|
* - Pagination support with configurable items per page
|
|
101
118
|
* - Imperative refresh via ref
|
|
119
|
+
* - Customizable empty state with optional SVG illustration and content
|
|
102
120
|
*
|
|
103
121
|
* @param props - The props for the DataTable component
|
|
104
122
|
* @param props.data - The data for the table. Must be an array of objects with an `id` property.
|
|
@@ -115,6 +133,7 @@ declare function DataTableInner<T>(props: DataTableProps<T>, ref: Ref<DataTableR
|
|
|
115
133
|
* @param props.pagination - Pagination configuration. When provided, enables pagination and filters data to show only the current page. When undefined, all data is shown and no pagination controls are rendered.
|
|
116
134
|
* @param props.selectedRowIds - The selected row ids.
|
|
117
135
|
* @param props.sortedColumn - The sorted column.
|
|
136
|
+
* @param props.emptyState - Configuration for the empty state displayed when the table has no data.
|
|
118
137
|
* @param props.style - The style of the table container.
|
|
119
138
|
* @param props.rest - The rest of the props for the DataTable component, spread to the div surrounding the table.
|
|
120
139
|
*
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EditableCellImperativeHandle, BaseEditableCellProps } from './types';
|
|
2
|
+
export type DataTableEditableBooleanCellProps<T> = BaseEditableCellProps<T>;
|
|
3
|
+
export declare const DataTableEditableBooleanCell: (<T>(props: DataTableEditableBooleanCellProps<T> & {
|
|
4
|
+
ref?: React.Ref<EditableCellImperativeHandle>;
|
|
5
|
+
}) => React.ReactElement) & {
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -10,6 +10,10 @@ declare module "@tanstack/react-table" {
|
|
|
10
10
|
* The original column definition, stored for type narrowing and runtime access
|
|
11
11
|
*/
|
|
12
12
|
columnDef?: ColumnDef<TData>;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the header action (expand all / select all) is disabled for this column
|
|
15
|
+
*/
|
|
16
|
+
disableHeaderAction?: boolean;
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { TableRow } from '../types';
|
|
3
|
+
import { Svg } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the empty state displayed when the DataTable has no data
|
|
6
|
+
*/
|
|
7
|
+
export type DataTableEmptyState = {
|
|
8
|
+
/**
|
|
9
|
+
* Optional SVG illustration component to display.
|
|
10
|
+
* Pass a single SVG component, or an object with `light` and `dark` properties
|
|
11
|
+
* to display different illustrations based on the user's color scheme preference.
|
|
12
|
+
*/
|
|
13
|
+
svg?: Svg | {
|
|
14
|
+
light?: Svg;
|
|
15
|
+
dark?: Svg;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Optional content to display below the illustration
|
|
19
|
+
*/
|
|
20
|
+
content?: ReactNode;
|
|
21
|
+
};
|
|
2
22
|
/**
|
|
3
23
|
* Configuration for pagination in DataTable
|
|
4
24
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ColumnDef, ColumnTypeConfig, TextEditConfig, NumberEditConfig, SelectEditConfig, MultiselectEditConfig, TableRow } from './types';
|
|
2
|
+
import { ColumnDef, ColumnTypeConfig, TextEditConfig, NumberEditConfig, SelectEditConfig, MultiselectEditConfig, BooleanEditConfig, TableRow } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Utility type that extracts the element type from an array type
|
|
5
5
|
*/
|
|
@@ -70,9 +70,9 @@ type ReadOnlyColumnConfig<T, K extends keyof T> = BaseColumnConfig<T, K> & {
|
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
72
72
|
* Configuration for text editable columns using editConfig.
|
|
73
|
-
* Valid when T[K] is a string.
|
|
73
|
+
* Valid when T[K] is a string.
|
|
74
74
|
*/
|
|
75
|
-
type TextEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends string
|
|
75
|
+
type TextEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends string ? BaseColumnConfig<T, K> & {
|
|
76
76
|
editConfig: TextEditConfig<T, K>;
|
|
77
77
|
editMode?: undefined;
|
|
78
78
|
onChange?: undefined;
|
|
@@ -107,12 +107,22 @@ type MultiselectEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]>
|
|
|
107
107
|
onChange?: undefined;
|
|
108
108
|
options?: undefined;
|
|
109
109
|
} : never;
|
|
110
|
+
/**
|
|
111
|
+
* Configuration for boolean editable columns using editConfig.
|
|
112
|
+
* Valid when T[K] is a boolean type.
|
|
113
|
+
*/
|
|
114
|
+
type BooleanEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends boolean ? BaseColumnConfig<T, K> & {
|
|
115
|
+
editConfig: BooleanEditConfig<T, K>;
|
|
116
|
+
editMode?: undefined;
|
|
117
|
+
onChange?: undefined;
|
|
118
|
+
options?: undefined;
|
|
119
|
+
} : never;
|
|
110
120
|
/**
|
|
111
121
|
* Configuration for text editable columns (legacy).
|
|
112
|
-
* Valid when T[K] is a string.
|
|
122
|
+
* Valid when T[K] is a string.
|
|
113
123
|
* @deprecated Use editConfig instead: `editConfig: { mode: "text", onChange: ... }`
|
|
114
124
|
*/
|
|
115
|
-
type TextEditableColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends string
|
|
125
|
+
type TextEditableColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends string ? BaseColumnConfig<T, K> & {
|
|
116
126
|
editConfig?: undefined;
|
|
117
127
|
editMode: "text";
|
|
118
128
|
onChange?: (value: string, rowId: string) => void;
|
|
@@ -149,14 +159,15 @@ type MultiselectEditableColumnConfig<T, K extends keyof T> = NonNullable<T[K]> e
|
|
|
149
159
|
* Includes both new editConfig-based and legacy editMode-based configs.
|
|
150
160
|
* TypeScript will enforce that the editMode/editConfig matches the value type constraints.
|
|
151
161
|
*/
|
|
152
|
-
type ColumnConfig<T, K extends keyof T> = ReadOnlyColumnConfig<T, K> | TextEditConfigColumnConfig<T, K> | NumberEditConfigColumnConfig<T, K> | SelectEditConfigColumnConfig<T, K> | MultiselectEditConfigColumnConfig<T, K> | TextEditableColumnConfig<T, K> | SelectEditableColumnConfig<T, K> | MultiselectEditableColumnConfig<T, K>;
|
|
162
|
+
type ColumnConfig<T, K extends keyof T> = ReadOnlyColumnConfig<T, K> | TextEditConfigColumnConfig<T, K> | NumberEditConfigColumnConfig<T, K> | SelectEditConfigColumnConfig<T, K> | MultiselectEditConfigColumnConfig<T, K> | BooleanEditConfigColumnConfig<T, K> | TextEditableColumnConfig<T, K> | SelectEditableColumnConfig<T, K> | MultiselectEditableColumnConfig<T, K>;
|
|
153
163
|
/**
|
|
154
164
|
* Factory function to create column helper function for defining Table columns.
|
|
155
165
|
*
|
|
156
166
|
* This helper provides type safety by enforcing that:
|
|
157
167
|
* - `type` sets display defaults (formatter and alignment) for the column
|
|
158
168
|
* - `editConfig` enables cell editing with proper type constraints
|
|
159
|
-
* - `editConfig.mode: "text"` can only be used with string
|
|
169
|
+
* - `editConfig.mode: "text"` can only be used with string columns
|
|
170
|
+
* - `editConfig.mode: "boolean"` can only be used with boolean columns
|
|
160
171
|
* - `editConfig.mode: "number"` can only be used with number columns
|
|
161
172
|
* - `editConfig.mode: "multiselect"` can only be used with array columns
|
|
162
173
|
* - `editConfig.mode: "select"` options values must match the column's value type
|
|
@@ -44,7 +44,7 @@ type ArrayElement<T> = T extends (infer U)[] ? U : never;
|
|
|
44
44
|
/**
|
|
45
45
|
* Edit mode literals for editable cells.
|
|
46
46
|
*/
|
|
47
|
-
export type EditMode = "text" | "number" | "select" | "multiselect";
|
|
47
|
+
export type EditMode = "text" | "number" | "select" | "multiselect" | "boolean";
|
|
48
48
|
/**
|
|
49
49
|
* Base edit configuration shared by all edit modes.
|
|
50
50
|
* @template T - The row data type
|
|
@@ -143,6 +143,39 @@ export type MultiselectEditConfig<T, K extends keyof T> = BaseEditConfig<T, K> &
|
|
|
143
143
|
label: string;
|
|
144
144
|
}[];
|
|
145
145
|
};
|
|
146
|
+
/**
|
|
147
|
+
* Edit configuration for boolean mode cells.
|
|
148
|
+
* Renders a dropdown menu with predefined true/false options and an optional null option.
|
|
149
|
+
*
|
|
150
|
+
* @template T - The row data type
|
|
151
|
+
* @template K - The column key
|
|
152
|
+
*/
|
|
153
|
+
export type BooleanEditConfig<T, K extends keyof T> = BaseEditConfig<T, K> & {
|
|
154
|
+
/**
|
|
155
|
+
* Boolean edit mode - renders a dropdown with true/false/null options.
|
|
156
|
+
*/
|
|
157
|
+
mode: "boolean";
|
|
158
|
+
/**
|
|
159
|
+
* The label displayed for the `true` option.
|
|
160
|
+
* @default "True"
|
|
161
|
+
*/
|
|
162
|
+
trueLabel?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The label displayed for the `false` option.
|
|
165
|
+
* @default "False"
|
|
166
|
+
*/
|
|
167
|
+
falseLabel?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Whether to include a null option in the dropdown.
|
|
170
|
+
* @default false
|
|
171
|
+
*/
|
|
172
|
+
allowNull?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* The label displayed for the `null` option. Only used when `allowNull` is true.
|
|
175
|
+
* @default "Unset"
|
|
176
|
+
*/
|
|
177
|
+
nullLabel?: string;
|
|
178
|
+
};
|
|
146
179
|
/**
|
|
147
180
|
* Union of all edit configurations.
|
|
148
181
|
* Use with `editConfig` property on column definitions.
|
|
@@ -170,9 +203,17 @@ export type MultiselectEditConfig<T, K extends keyof T> = BaseEditConfig<T, K> &
|
|
|
170
203
|
* options: [{ value: "active", label: "Active" }],
|
|
171
204
|
* onChange: (value, rowId) => save(value, rowId)
|
|
172
205
|
* }
|
|
206
|
+
*
|
|
207
|
+
* // Boolean editing
|
|
208
|
+
* editConfig: {
|
|
209
|
+
* mode: "boolean",
|
|
210
|
+
* trueLabel: "Yes",
|
|
211
|
+
* falseLabel: "No",
|
|
212
|
+
* onChange: (value, rowId) => save(value, rowId)
|
|
213
|
+
* }
|
|
173
214
|
* ```
|
|
174
215
|
*/
|
|
175
|
-
export type EditConfig<T, K extends keyof T> = TextEditConfig<T, K> | NumberEditConfig<T, K> | SelectEditConfig<T, K> | MultiselectEditConfig<T, K>;
|
|
216
|
+
export type EditConfig<T, K extends keyof T> = TextEditConfig<T, K> | NumberEditConfig<T, K> | SelectEditConfig<T, K> | MultiselectEditConfig<T, K> | BooleanEditConfig<T, K>;
|
|
176
217
|
/**
|
|
177
218
|
* The type for a table row
|
|
178
219
|
* @extends T
|
|
@@ -282,7 +323,7 @@ export type ColumnDef<T> = {
|
|
|
282
323
|
* The edit mode of the cells in the column.
|
|
283
324
|
* @deprecated Use `editConfig` instead. Example: `editConfig: { mode: "text", onChange: ... }`
|
|
284
325
|
*/
|
|
285
|
-
editMode?: "text" | "number" | "select" | "multiselect";
|
|
326
|
+
editMode?: "text" | "number" | "select" | "multiselect" | "boolean";
|
|
286
327
|
/**
|
|
287
328
|
* The content of the footer cell. An array will display multiple footer rows
|
|
288
329
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolbarOverflowTypes } from './types';
|
|
1
|
+
import { ToolbarOverflowTypes, ToolbarSize } from './types';
|
|
2
2
|
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
3
3
|
import { LayoutUtilProps } from '../../../types';
|
|
4
4
|
/**
|
|
@@ -25,6 +25,11 @@ export type ToolbarProps = ComponentPropsWithoutRef<"div"> & LayoutUtilProps & {
|
|
|
25
25
|
* Additional items to display in the overflow menu
|
|
26
26
|
*/
|
|
27
27
|
additionalItems?: ReactElement[];
|
|
28
|
+
/**
|
|
29
|
+
* Size of toolbar items
|
|
30
|
+
* @default xsmall
|
|
31
|
+
*/
|
|
32
|
+
size?: ToolbarSize;
|
|
28
33
|
};
|
|
29
34
|
/**
|
|
30
35
|
* Toolbar component for grouping related interactive elements with anvil2 tracking.
|
|
@@ -71,6 +76,11 @@ export declare const ToolbarElement: import('react').ForwardRefExoticComponent<O
|
|
|
71
76
|
* Additional items to display in the overflow menu
|
|
72
77
|
*/
|
|
73
78
|
additionalItems?: ReactElement[];
|
|
79
|
+
/**
|
|
80
|
+
* Size of toolbar items
|
|
81
|
+
* @default xsmall
|
|
82
|
+
*/
|
|
83
|
+
size?: ToolbarSize;
|
|
74
84
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
75
85
|
/**
|
|
76
86
|
* Toolbar component for grouping related interactive elements.
|
|
@@ -129,6 +139,11 @@ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<imp
|
|
|
129
139
|
* Additional items to display in the overflow menu
|
|
130
140
|
*/
|
|
131
141
|
additionalItems?: ReactElement[];
|
|
142
|
+
/**
|
|
143
|
+
* Size of toolbar items
|
|
144
|
+
* @default xsmall
|
|
145
|
+
*/
|
|
146
|
+
size?: ToolbarSize;
|
|
132
147
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
133
148
|
/**
|
|
134
149
|
* ToolbarButton component for standard clickable actions within a toolbar with anvil2 tracking.
|
|
@@ -139,7 +154,6 @@ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<imp
|
|
|
139
154
|
* - Automatic tooltip for icon-only buttons
|
|
140
155
|
* - Overflow menu support
|
|
141
156
|
* - Accessibility enforcement for aria-labels
|
|
142
|
-
* - Small size optimized for toolbar layout
|
|
143
157
|
* - Ghost and primary appearance options
|
|
144
158
|
* - Automatic tracking ID generation for analytics
|
|
145
159
|
*
|
|
@@ -161,7 +175,6 @@ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<imp
|
|
|
161
175
|
* - Consistent styling with other toolbar items
|
|
162
176
|
* - Overflow menu support
|
|
163
177
|
* - Accessibility enforcement for aria-labels
|
|
164
|
-
* - Small size optimized for toolbar layout
|
|
165
178
|
* - Ghost and primary appearance options
|
|
166
179
|
* - Automatic tracking ID generation for analytics
|
|
167
180
|
*
|
|
@@ -178,7 +191,6 @@ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<imp
|
|
|
178
191
|
* - Consistent styling with other toolbar items
|
|
179
192
|
* - Overflow menu support
|
|
180
193
|
* - Accessibility enforcement for aria-labels
|
|
181
|
-
* - Small size optimized for toolbar layout
|
|
182
194
|
* - Ghost and primary appearance options
|
|
183
195
|
* - Automatic tracking ID generation for analytics
|
|
184
196
|
*
|
|
@@ -196,7 +208,6 @@ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<imp
|
|
|
196
208
|
* - Controlled and uncontrolled usage patterns
|
|
197
209
|
* - Automatic overflow menu integration
|
|
198
210
|
* - Accessibility support with proper ARIA labels
|
|
199
|
-
* - Small size optimized for toolbar layout
|
|
200
211
|
* - Ghost and primary appearance options
|
|
201
212
|
* - Dropdown arrow icon indicator
|
|
202
213
|
* - Listbox integration for keyboard navigation
|
|
@@ -287,11 +298,10 @@ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<imp
|
|
|
287
298
|
"aria-label"?: string;
|
|
288
299
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
289
300
|
/**
|
|
290
|
-
* ToolbarSearchField component renders a
|
|
301
|
+
* ToolbarSearchField component renders a search field for use in toolbars.
|
|
291
302
|
*
|
|
292
303
|
* Features:
|
|
293
304
|
* - Renders a search field styled for toolbar usage
|
|
294
|
-
* - Always uses small size for compact layout
|
|
295
305
|
* - Supports all SearchField props except size
|
|
296
306
|
* - Integrates with toolbar layouts and accessibility
|
|
297
307
|
*
|
|
@@ -26,7 +26,6 @@ export type ToolbarButtonProps = WithAriaLabelEnforcement<ToolbarButtonBaseProps
|
|
|
26
26
|
* - Automatic tooltip for icon-only buttons
|
|
27
27
|
* - Overflow menu support
|
|
28
28
|
* - Accessibility enforcement for aria-labels
|
|
29
|
-
* - Small size optimized for toolbar layout
|
|
30
29
|
* - Ghost and primary appearance options
|
|
31
30
|
*
|
|
32
31
|
* @example
|
|
@@ -27,7 +27,6 @@ export type ToolbarButtonLinkProps = WithAriaLabelEnforcement<ToolbarButtonLinkB
|
|
|
27
27
|
* - Automatic tooltip for icon-only links
|
|
28
28
|
* - Overflow menu support
|
|
29
29
|
* - Accessibility enforcement for aria-labels
|
|
30
|
-
* - Small size optimized for toolbar layout
|
|
31
30
|
* - Ghost and primary appearance options
|
|
32
31
|
* - Proper anchor element semantics
|
|
33
32
|
*
|
|
@@ -26,7 +26,6 @@ export type ToolbarButtonToggleProps = WithAriaLabelEnforcement<ToolbarButtonTog
|
|
|
26
26
|
* - Automatic tooltip for icon-only toggles
|
|
27
27
|
* - Overflow menu support
|
|
28
28
|
* - Accessibility enforcement for aria-labels
|
|
29
|
-
* - Small size optimized for toolbar layout
|
|
30
29
|
* - Visual feedback for toggle state
|
|
31
30
|
* - Proper ARIA attributes for toggle semantics
|
|
32
31
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchFieldProps } from '../../../components/SearchField';
|
|
1
|
+
import { SearchFieldProps } from '../../../components/SearchField/internal/SearchField';
|
|
2
2
|
/**
|
|
3
3
|
* Props for the ToolbarSearchField component
|
|
4
4
|
*
|
|
@@ -6,11 +6,10 @@ import { SearchFieldProps } from '../../../components/SearchField';
|
|
|
6
6
|
*/
|
|
7
7
|
export type ToolbarSearchFieldProps = Omit<SearchFieldProps, "size">;
|
|
8
8
|
/**
|
|
9
|
-
* ToolbarSearchField component renders a
|
|
9
|
+
* ToolbarSearchField component renders a search field for use in toolbars.
|
|
10
10
|
*
|
|
11
11
|
* Features:
|
|
12
12
|
* - Renders a search field styled for toolbar usage
|
|
13
|
-
* - Always uses small size for compact layout
|
|
14
13
|
* - Supports all SearchField props except size
|
|
15
14
|
* - Integrates with toolbar layouts and accessibility
|
|
16
15
|
*
|
|
@@ -44,7 +44,6 @@ export type ToolbarSelectProps<T = Record<string, unknown>> = Omit<React.Compone
|
|
|
44
44
|
* - Controlled and uncontrolled usage patterns
|
|
45
45
|
* - Automatic overflow menu integration
|
|
46
46
|
* - Accessibility support with proper ARIA labels
|
|
47
|
-
* - Small size optimized for toolbar layout
|
|
48
47
|
* - Ghost and primary appearance options
|
|
49
48
|
* - Dropdown arrow icon indicator
|
|
50
49
|
* - Listbox integration for keyboard navigation
|
package/dist/beta/components/Toolbar/internal/{ToolbarOverflowContext.d.ts → ToolbarContext.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { ToolbarItemProps, ToolbarOverflowTypes } from '../types';
|
|
2
|
+
import { ToolbarItemProps, ToolbarOverflowTypes, ToolbarSize } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
* Context for sharing toolbar state with child components
|
|
4
|
+
* Context for sharing toolbar state with child components
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type ToolbarContextProps = {
|
|
7
7
|
/**
|
|
8
8
|
* Array of toolbar items that should appear in the overflow menu
|
|
9
9
|
*/
|
|
@@ -28,8 +28,17 @@ export type ToolbarOverFlowContextProps = {
|
|
|
28
28
|
* Overflow behavior type (wrap or collapse)
|
|
29
29
|
*/
|
|
30
30
|
overflow: ToolbarOverflowTypes;
|
|
31
|
+
/**
|
|
32
|
+
* Size of toolbar child components
|
|
33
|
+
*/
|
|
34
|
+
size: ToolbarSize;
|
|
31
35
|
};
|
|
32
36
|
/**
|
|
33
|
-
* Context for managing toolbar overflow
|
|
37
|
+
* Context for managing toolbar state including overflow and size
|
|
38
|
+
*/
|
|
39
|
+
export declare const ToolbarContext: import('react').Context<ToolbarContextProps>;
|
|
40
|
+
/**
|
|
41
|
+
* Hook to access the toolbar size from context
|
|
42
|
+
* @returns The current toolbar size
|
|
34
43
|
*/
|
|
35
|
-
export declare const
|
|
44
|
+
export declare const useToolbarSize: () => ToolbarSize;
|
|
@@ -3,7 +3,7 @@ import { ToolbarOverflowTypes } from '../../types';
|
|
|
3
3
|
export declare const withOverflowItemContext: (children: ReactNode, isInOverflowMenu?: boolean) => import('react').FunctionComponentElement<import('react').ProviderProps<{
|
|
4
4
|
isInOverflowMenu: boolean;
|
|
5
5
|
}>>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const createMockToolbarContext: (overrides?: {}) => {
|
|
7
7
|
overflowItems: never[];
|
|
8
8
|
orderedIds: never[];
|
|
9
9
|
addItem: import('vitest').Mock<(...args: any[]) => any>;
|
|
@@ -12,8 +12,9 @@ export declare const createMockOverflowContext: (overrides?: {}) => {
|
|
|
12
12
|
current: HTMLDivElement;
|
|
13
13
|
};
|
|
14
14
|
overflow: ToolbarOverflowTypes;
|
|
15
|
+
size: "xsmall";
|
|
15
16
|
};
|
|
16
|
-
export declare const
|
|
17
|
+
export declare const withToolbarContext: (children: ReactNode, contextValue?: {
|
|
17
18
|
overflowItems: never[];
|
|
18
19
|
orderedIds: never[];
|
|
19
20
|
addItem: import('vitest').Mock<(...args: any[]) => any>;
|
|
@@ -22,7 +23,8 @@ export declare const withToolbarOverflowContext: (children: ReactNode, contextVa
|
|
|
22
23
|
current: HTMLDivElement;
|
|
23
24
|
};
|
|
24
25
|
overflow: ToolbarOverflowTypes;
|
|
25
|
-
|
|
26
|
+
size: "xsmall";
|
|
27
|
+
}) => import('react').FunctionComponentElement<import('react').ProviderProps<import('../ToolbarContext').ToolbarContextProps>>;
|
|
26
28
|
export declare const mockIntersectionObserver: import('vitest').Mock<(...args: any[]) => any>;
|
|
27
29
|
export declare const observerMap: Map<any, any>;
|
|
28
30
|
export declare const createIntersectionEntry: (element: Element, isIntersecting: boolean) => IntersectionObserverEntry;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { ButtonAppearance } from '../../../types';
|
|
1
|
+
import { ButtonAppearance, Size } from '../../../types';
|
|
2
2
|
import { IconProps } from '../../../components/Icon';
|
|
3
3
|
import { ToolbarButtonProps } from './ToolbarButton';
|
|
4
4
|
import { ToolbarButtonLinkProps } from './ToolbarButtonLink';
|
|
5
5
|
import { ToolbarButtonToggleProps } from './ToolbarButtonToggle';
|
|
6
6
|
import { ToolbarSelectProps } from './ToolbarSelect';
|
|
7
|
+
/**
|
|
8
|
+
* Toolbar size options
|
|
9
|
+
*/
|
|
10
|
+
export type ToolbarSize = Extract<Size, "xsmall" | "small" | "medium" | "large">;
|
|
7
11
|
/**
|
|
8
12
|
* Toolbar overflow options
|
|
9
13
|
*/
|
package/dist/beta.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { C as COLUMN_TYPE_DEFAULTS, D as DataTable, b as booleanFormatter, a as chipsFormatter, c as createColumnHelper, d as currencyFormatter, h as dateFormatPresets, e as dateFormatter, f as dateTimeFormatter, g as getColumnTypeDefaults, n as numberFormatter, p as percentFormatter, r as resolveColumnTypeConfig, t as timeFormatPresets, i as timeFormatter, y as yearlessDateFormatter } 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 } from './SelectFieldSync-
|
|
6
|
-
export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-
|
|
1
|
+
export { C as COLUMN_TYPE_DEFAULTS, D as DataTable, b as booleanFormatter, a as chipsFormatter, c as createColumnHelper, d as currencyFormatter, h as dateFormatPresets, e as dateFormatter, f as dateTimeFormatter, g as getColumnTypeDefaults, n as numberFormatter, p as percentFormatter, r as resolveColumnTypeConfig, t as timeFormatPresets, i as timeFormatter, y as yearlessDateFormatter } from './DataTable-BLuJ4FtH.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-jfZ-CupZ.js';
|
|
3
|
+
export { u as useCalendarBetaProps } from './Calendar-CtkL4zYU.js';
|
|
4
|
+
export { C as Calendar } from './Calendar-CkgpKD7Q.js';
|
|
5
|
+
export { S as SelectField, a as SelectFieldSync } from './SelectFieldSync-DCrafdbx.js';
|
|
6
|
+
export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-BnPzYM72.js';
|
|
7
7
|
export { I as InteractiveCard } from './InteractiveCard-OszQGxGw.js';
|
|
8
|
-
export { u as useAdaptiveView } from './FieldDialog-
|
|
8
|
+
export { u as useAdaptiveView } from './FieldDialog-C5mwMjrr.js';
|
|
9
9
|
//# sourceMappingURL=beta.js.map
|
|
@@ -21,7 +21,7 @@ export type ButtonLinkProps = LayoutUtilProps & ComponentPropsWithoutRef<"a"> &
|
|
|
21
21
|
* The size of the button link.
|
|
22
22
|
* @default medium
|
|
23
23
|
*/
|
|
24
|
-
size?: Extract<Size, "small" | "medium" | "large">;
|
|
24
|
+
size?: Extract<Size, "xsmall" | "small" | "medium" | "large">;
|
|
25
25
|
/**
|
|
26
26
|
* The icons of the button link.
|
|
27
27
|
*/
|
|
@@ -46,7 +46,7 @@ DataTrackingId;
|
|
|
46
46
|
*
|
|
47
47
|
* Features:
|
|
48
48
|
* - Multiple visual appearances (primary, secondary, ghost, danger variants)
|
|
49
|
-
* -
|
|
49
|
+
* - Four size options (xsmall, small, medium, large)
|
|
50
50
|
* - Loading state with spinner animation
|
|
51
51
|
* - Icon support (before, after, or icon-only)
|
|
52
52
|
* - Full accessibility support with proper ARIA attributes
|
|
@@ -77,7 +77,7 @@ export declare const ButtonLink: import('react').ForwardRefExoticComponent<Layou
|
|
|
77
77
|
* The size of the button link.
|
|
78
78
|
* @default medium
|
|
79
79
|
*/
|
|
80
|
-
size?: Extract<Size, "small" | "medium" | "large">;
|
|
80
|
+
size?: Extract<Size, "xsmall" | "small" | "medium" | "large">;
|
|
81
81
|
/**
|
|
82
82
|
* The icons of the button link.
|
|
83
83
|
*/
|
|
@@ -9,6 +9,7 @@ import { PaginationProps as BasePaginationProps } from './internal/Pagination';
|
|
|
9
9
|
* @property {boolean} [showCount] - Whether to display the item count information
|
|
10
10
|
* @property {(page: number) => void} [onPageChange] - Callback when page changes
|
|
11
11
|
* @property {(itemsPerPage: number) => void} [onItemsPerPageChange] - Callback when items per page changes
|
|
12
|
+
* @property {string} [itemsPerPageLabel] - Custom label displayed before the items-per-page selector. Defaults to "Rows per page"
|
|
12
13
|
* @extends Omit<BasePaginationProps, "children">
|
|
13
14
|
* @extends DataTrackingId
|
|
14
15
|
*/
|
|
@@ -20,6 +21,7 @@ export type PaginationProps = Omit<BasePaginationProps, "children"> & DataTracki
|
|
|
20
21
|
showCount?: boolean;
|
|
21
22
|
onPageChange?: (page: number) => void;
|
|
22
23
|
onItemsPerPageChange?: (itemsPerPage: number) => void;
|
|
24
|
+
itemsPerPageLabel?: string;
|
|
23
25
|
};
|
|
24
26
|
/**
|
|
25
27
|
* Pagination component for navigating through paginated content with automatic page array generation.
|
|
@@ -53,4 +55,5 @@ export declare const Pagination: import('react').ForwardRefExoticComponent<Omit<
|
|
|
53
55
|
showCount?: boolean;
|
|
54
56
|
onPageChange?: (page: number) => void;
|
|
55
57
|
onItemsPerPageChange?: (itemsPerPage: number) => void;
|
|
58
|
+
itemsPerPageLabel?: string;
|
|
56
59
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -15,6 +15,11 @@ export type PaginationItemsPerPageMenuProps = {
|
|
|
15
15
|
* @param itemsPerPage The new number of items per page
|
|
16
16
|
*/
|
|
17
17
|
onItemsPerPageChange: (itemsPerPage: number) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Custom label displayed before the items-per-page selector.
|
|
20
|
+
* @default "Rows per page"
|
|
21
|
+
*/
|
|
22
|
+
itemsPerPageLabel?: string;
|
|
18
23
|
};
|
|
19
24
|
/**
|
|
20
25
|
* PaginationItemsPerPageMenu component for selecting the number of items per page.
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SearchFieldProps as CoreSearchFieldProps } from './internal/SearchField';
|
|
2
|
+
import { DistributiveOmit } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the SearchField component
|
|
5
5
|
* @extends Omit<ComponentPropsWithoutRef<"input">, "size" | "prefix" | "required" | "children">
|
|
6
6
|
* @extends LayoutUtilProps
|
|
7
7
|
*/
|
|
8
|
-
export type SearchFieldProps =
|
|
8
|
+
export type SearchFieldProps = DistributiveOmit<CoreSearchFieldProps, "size"> & {
|
|
9
9
|
/**
|
|
10
10
|
* Size of the search field
|
|
11
11
|
* @default "medium"
|
|
12
12
|
*/
|
|
13
|
-
size?: Extract<
|
|
14
|
-
|
|
15
|
-
* Whether the search field is disabled
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Callback when the clear button is clicked or activated via keyboard (Enter/Space)
|
|
21
|
-
*/
|
|
22
|
-
onClear?: () => void;
|
|
23
|
-
} & DataTrackingId;
|
|
13
|
+
size?: Extract<CoreSearchFieldProps["size"], "small" | "medium" | "large">;
|
|
14
|
+
};
|
|
24
15
|
/**
|
|
25
16
|
* SearchField component for text input with search functionality.
|
|
26
17
|
*
|
|
@@ -55,19 +46,10 @@ export type SearchFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" |
|
|
|
55
46
|
* disabled={isLoading}
|
|
56
47
|
* />
|
|
57
48
|
*/
|
|
58
|
-
export declare const SearchField: import('react').ForwardRefExoticComponent<Omit<
|
|
49
|
+
export declare const SearchField: import('react').ForwardRefExoticComponent<Omit<CoreSearchFieldProps, "size"> & {
|
|
59
50
|
/**
|
|
60
51
|
* Size of the search field
|
|
61
52
|
* @default "medium"
|
|
62
53
|
*/
|
|
63
|
-
size?: Extract<
|
|
64
|
-
|
|
65
|
-
* Whether the search field is disabled
|
|
66
|
-
* @default false
|
|
67
|
-
*/
|
|
68
|
-
disabled?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Callback when the clear button is clicked or activated via keyboard (Enter/Space)
|
|
71
|
-
*/
|
|
72
|
-
onClear?: () => void;
|
|
73
|
-
} & DataTrackingId & import('react').RefAttributes<HTMLInputElement>>;
|
|
54
|
+
size?: Extract<CoreSearchFieldProps["size"], "small" | "medium" | "large">;
|
|
55
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|