@servicetitan/anvil2 1.45.1 → 1.46.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.
Files changed (171) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/{Calendar-Dq_of5A3.js → Calendar-BQ5F2ENO.js} +1173 -166
  3. package/dist/Calendar-BQ5F2ENO.js.map +1 -0
  4. package/dist/Calendar.css +83 -47
  5. package/dist/Calendar.js +1 -1
  6. package/dist/{Checkbox-3y2d9mBd.js → Checkbox-DDrmVC-u.js} +2 -2
  7. package/dist/{Checkbox-3y2d9mBd.js.map → Checkbox-DDrmVC-u.js.map} +1 -1
  8. package/dist/{Checkbox-BiOzGpgJ.js → Checkbox-Dl4KTwEJ.js} +3 -3
  9. package/dist/{Checkbox-BiOzGpgJ.js.map → Checkbox-Dl4KTwEJ.js.map} +1 -1
  10. package/dist/Checkbox.js +2 -2
  11. package/dist/{useInfiniteCombobox-BN2uGhBh.js → Combobox-B9nesJuc.js} +19 -186
  12. package/dist/Combobox-B9nesJuc.js.map +1 -0
  13. package/dist/Combobox.js +2 -1
  14. package/dist/Combobox.js.map +1 -1
  15. package/dist/{DateField-B2mnasH5.js → DateField-DXxPsRtf.js} +4 -4
  16. package/dist/{DateField-B2mnasH5.js.map → DateField-DXxPsRtf.js.map} +1 -1
  17. package/dist/DateField.js +1 -1
  18. package/dist/{DateFieldRange-DPbyzuHb.js → DateFieldRange-Xauviu1w.js} +34 -28
  19. package/dist/DateFieldRange-Xauviu1w.js.map +1 -0
  20. package/dist/DateFieldRange.js +1 -1
  21. package/dist/{DateFieldSingle-CfAJDcx9.js → DateFieldSingle-yLnwpVzd.js} +27 -27
  22. package/dist/DateFieldSingle-yLnwpVzd.js.map +1 -0
  23. package/dist/DateFieldSingle.js +1 -1
  24. package/dist/{DateFieldYearless-ydxcsmRV.js → DateFieldYearless-Ba7HiTiI.js} +2 -2
  25. package/dist/{DateFieldYearless-ydxcsmRV.js.map → DateFieldYearless-Ba7HiTiI.js.map} +1 -1
  26. package/dist/DateFieldYearless.js +1 -1
  27. package/dist/{DaysOfTheWeek-BYvE9QK5.js → DaysOfTheWeek-BYSYZySH.js} +2 -2
  28. package/dist/{DaysOfTheWeek-BYvE9QK5.js.map → DaysOfTheWeek-BYSYZySH.js.map} +1 -1
  29. package/dist/DaysOfTheWeek.js +1 -1
  30. package/dist/{Dialog-DpH2Qvbd.js → Dialog-CgkrvrQu.js} +2 -2
  31. package/dist/{Dialog-DpH2Qvbd.js.map → Dialog-CgkrvrQu.js.map} +1 -1
  32. package/dist/Dialog.js +1 -1
  33. package/dist/Dnd.js +1 -1
  34. package/dist/DndSort.js +1 -1
  35. package/dist/{Drawer-DI_k6W2k.js → Drawer-CM4ZbAro.js} +2 -2
  36. package/dist/{Drawer-DI_k6W2k.js.map → Drawer-CM4ZbAro.js.map} +1 -1
  37. package/dist/Drawer.js +1 -1
  38. package/dist/{FieldLabel-BfnCXung.js → FieldLabel-BsbTTyom.js} +3 -14
  39. package/dist/FieldLabel-BsbTTyom.js.map +1 -0
  40. package/dist/FieldLabel.js +1 -1
  41. package/dist/{InputMask-O_qi1p_3.js → InputMask-_F139qFu.js} +2 -2
  42. package/dist/{InputMask-O_qi1p_3.js.map → InputMask-_F139qFu.js.map} +1 -1
  43. package/dist/InputMask.js +1 -1
  44. package/dist/{ListView-jR2ZkBB7.js → ListView-pb3rIcze.js} +2 -2
  45. package/dist/{ListView-jR2ZkBB7.js.map → ListView-pb3rIcze.js.map} +1 -1
  46. package/dist/ListView.js +1 -1
  47. package/dist/{NumberField-1_gRsWT4.js → NumberField-CkZZrkYC.js} +5 -5
  48. package/dist/{NumberField-1_gRsWT4.js.map → NumberField-CkZZrkYC.js.map} +1 -1
  49. package/dist/NumberField.js +1 -1
  50. package/dist/{Page-CY6QRlvb.js → Page-cKXkjMmd.js} +2 -2
  51. package/dist/{Page-CY6QRlvb.js.map → Page-cKXkjMmd.js.map} +1 -1
  52. package/dist/Page.js +1 -1
  53. package/dist/{ProgressBar-BnXuQ6Bx.js → ProgressBar-DXcXZEJ2.js} +2 -2
  54. package/dist/{ProgressBar-BnXuQ6Bx.js.map → ProgressBar-DXcXZEJ2.js.map} +1 -1
  55. package/dist/ProgressBar.js +1 -1
  56. package/dist/{Radio-CwmRUIzo.js → Radio-C89VCMXd.js} +2 -2
  57. package/dist/{Radio-CwmRUIzo.js.map → Radio-C89VCMXd.js.map} +1 -1
  58. package/dist/Radio.js +2 -2
  59. package/dist/{RadioGroup-BNCWIHOG.js → RadioGroup-C_4buUtG.js} +2 -2
  60. package/dist/{RadioGroup-BNCWIHOG.js.map → RadioGroup-C_4buUtG.js.map} +1 -1
  61. package/dist/{SearchField-BKXkoWPs.js → SearchField-Bb0uObwG.js} +2 -2
  62. package/dist/{SearchField-BKXkoWPs.js.map → SearchField-Bb0uObwG.js.map} +1 -1
  63. package/dist/SearchField.js +1 -1
  64. package/dist/{SelectCard-DOGCG0zr.js → SelectCard-BTYZg9TG.js} +3 -3
  65. package/dist/{SelectCard-DOGCG0zr.js.map → SelectCard-BTYZg9TG.js.map} +1 -1
  66. package/dist/SelectCard.js +1 -1
  67. package/dist/{SelectTrigger-BMo0e-F7.js → SelectTrigger-f1hvRrSC.js} +2 -2
  68. package/dist/{SelectTrigger-BMo0e-F7.js.map → SelectTrigger-f1hvRrSC.js.map} +1 -1
  69. package/dist/SelectTrigger.js +1 -1
  70. package/dist/{SelectTriggerBase-BMMxnXrw.js → SelectTriggerBase-DP9fmRSo.js} +2 -2
  71. package/dist/{SelectTriggerBase-BMMxnXrw.js.map → SelectTriggerBase-DP9fmRSo.js.map} +1 -1
  72. package/dist/{TextField-CwgE_JJU.js → TextField-BiHxlzE3.js} +2 -2
  73. package/dist/{TextField-CwgE_JJU.js.map → TextField-BiHxlzE3.js.map} +1 -1
  74. package/dist/{TextField-DlsZEkS0.js → TextField-D8fow9j7.js} +2 -2
  75. package/dist/{TextField-DlsZEkS0.js.map → TextField-D8fow9j7.js.map} +1 -1
  76. package/dist/TextField.js +1 -1
  77. package/dist/{Textarea-DU-SpoDL.js → Textarea-BdVJJlbP.js} +2 -2
  78. package/dist/{Textarea-DU-SpoDL.js.map → Textarea-BdVJJlbP.js.map} +1 -1
  79. package/dist/Textarea.js +1 -1
  80. package/dist/{TimeField-CfhyRfX9.js → TimeField-CmbErrsZ.js} +2 -2
  81. package/dist/{TimeField-CfhyRfX9.js.map → TimeField-CmbErrsZ.js.map} +1 -1
  82. package/dist/TimeField.js +1 -1
  83. package/dist/Toast.js +2 -2
  84. package/dist/{Toaster-BgjT0p8b.js → Toaster-9cpG_tWR.js} +2 -2
  85. package/dist/{Toaster-BgjT0p8b.js.map → Toaster-9cpG_tWR.js.map} +1 -1
  86. package/dist/{Toaster-CfC9wod0.js → Toaster-B7zUwJOt.js} +2 -2
  87. package/dist/{Toaster-CfC9wod0.js.map → Toaster-B7zUwJOt.js.map} +1 -1
  88. package/dist/Toolbar-D4zuUFhb.js +2077 -0
  89. package/dist/Toolbar-D4zuUFhb.js.map +1 -0
  90. package/dist/Toolbar.css +139 -28
  91. package/dist/Toolbar.d.ts +3 -3
  92. package/dist/Toolbar.js +1 -1
  93. package/dist/beta/components/Toolbar/Filters/FilterButton.d.ts +30 -0
  94. package/dist/beta/components/Toolbar/Filters/FilterDateRange.d.ts +37 -0
  95. package/dist/beta/components/Toolbar/Filters/FilterDateSingle.d.ts +30 -0
  96. package/dist/beta/components/Toolbar/Filters/FilterDrawer.d.ts +15 -0
  97. package/dist/beta/components/Toolbar/Filters/FilterGroup.d.ts +25 -0
  98. package/dist/beta/components/Toolbar/Filters/FilterItemWrapper.d.ts +24 -0
  99. package/dist/beta/components/Toolbar/Filters/FilterSelect.d.ts +29 -0
  100. package/dist/beta/components/Toolbar/Filters/FilterToggleButton.d.ts +24 -0
  101. package/dist/beta/components/Toolbar/Filters/internal/FilterGroupContext.d.ts +40 -0
  102. package/dist/beta/components/Toolbar/Filters/internal/types.d.ts +130 -0
  103. package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +40 -0
  104. package/dist/beta/components/Toolbar/Filters/internal/utils/test.d.ts +57 -0
  105. package/dist/beta/components/Toolbar/Toolbar.d.ts +302 -0
  106. package/dist/beta/components/Toolbar/ToolbarButton.d.ts +41 -0
  107. package/dist/beta/components/Toolbar/ToolbarButtonLink.d.ts +43 -0
  108. package/dist/beta/components/Toolbar/ToolbarButtonToggle.d.ts +42 -0
  109. package/dist/beta/components/Toolbar/ToolbarControlGroup.d.ts +20 -0
  110. package/dist/beta/components/Toolbar/ToolbarSearchField.d.ts +20 -0
  111. package/dist/beta/components/Toolbar/ToolbarSelect.d.ts +108 -0
  112. package/dist/beta/components/Toolbar/index.d.ts +9 -0
  113. package/dist/beta/components/Toolbar/internal/ToolbarItemOverflowContext.d.ts +19 -0
  114. package/dist/beta/components/Toolbar/internal/ToolbarItemWrapper.d.ts +40 -0
  115. package/dist/beta/components/Toolbar/internal/ToolbarOverflowContext.d.ts +35 -0
  116. package/dist/beta/components/Toolbar/internal/ToolbarOverflowMenu.d.ts +29 -0
  117. package/dist/beta/components/Toolbar/internal/utils/accessibility.d.ts +26 -0
  118. package/dist/beta/components/Toolbar/internal/utils/test.d.ts +29 -0
  119. package/dist/beta/components/Toolbar/types.d.ts +50 -0
  120. package/dist/beta/components/index.d.ts +1 -0
  121. package/dist/beta/index.d.ts +1 -0
  122. package/dist/beta.d.ts +2 -0
  123. package/dist/beta.js +2 -0
  124. package/dist/beta.js.map +1 -0
  125. package/dist/components/Combobox/ComboboxTypes.d.ts +8 -0
  126. package/dist/components/DateFieldRange/DateFieldRange.d.ts +2 -2
  127. package/dist/components/DateFieldRange/internal/DateFieldRangeCalendar.d.ts +1 -1
  128. package/dist/components/DateFieldRange/internal/useDateFieldRangeState.d.ts +2 -7
  129. package/dist/components/DateFieldSingle/DateFieldSingle.d.ts +2 -2
  130. package/dist/components/DateFieldSingle/internal/useDateFieldSingleState.d.ts +2 -7
  131. package/dist/components/Dialog/index.d.ts +1 -1
  132. package/dist/components/NumberField/NumberField.d.ts +4 -4
  133. package/dist/{indeterminate_check_box-Bg24oeHy.js → indeterminate_check_box-RY9zr3xS.js} +17 -17
  134. package/dist/{indeterminate_check_box-Bg24oeHy.js.map → indeterminate_check_box-RY9zr3xS.js.map} +1 -1
  135. package/dist/indeterminate_check_box.css +72 -66
  136. package/dist/{index-CqdP5W00.js → index-V5Ez2gq_.js} +2 -2
  137. package/dist/{index-CqdP5W00.js.map → index-V5Ez2gq_.js.map} +1 -1
  138. package/dist/index.css +125 -26
  139. package/dist/index.js +773 -41
  140. package/dist/index.js.map +1 -1
  141. package/dist/index2.css +88 -105
  142. package/dist/internal/components/YearSelector/YearSelector.d.ts +67 -0
  143. package/dist/internal/components/YearSelector/index.d.ts +1 -0
  144. package/dist/internal/components/YearSelector/internal/YearItem.d.ts +10 -0
  145. package/dist/internal/components/YearSelector/internal/useYearSelectorKeys.d.ts +19 -0
  146. package/dist/internal/hooks/index.d.ts +1 -0
  147. package/dist/internal/hooks/useContainerQuery/index.d.ts +1 -0
  148. package/dist/internal/hooks/useContainerQuery/useContainerQuery.d.ts +46 -0
  149. package/dist/internal/hooks/useFocusWithin/useFocusWithin.d.ts +11 -16
  150. package/dist/types/PassThroughProps.d.ts +4 -0
  151. package/dist/types/index.d.ts +1 -0
  152. package/dist/{useDateFieldOrchestration-Cqa7dxtr.js → useDateFieldOrchestration-BNJCsRkS.js} +2 -2
  153. package/dist/{useDateFieldOrchestration-Cqa7dxtr.js.map → useDateFieldOrchestration-BNJCsRkS.js.map} +1 -1
  154. package/dist/useFocusWithin-BhhgRXdZ.js +32 -0
  155. package/dist/useFocusWithin-BhhgRXdZ.js.map +1 -0
  156. package/dist/useInfiniteCombobox-WcRgC9p6.js +179 -0
  157. package/dist/useInfiniteCombobox-WcRgC9p6.js.map +1 -0
  158. package/dist/useIntersectionObserver-BEmMDO3P.js +70 -0
  159. package/dist/useIntersectionObserver-BEmMDO3P.js.map +1 -0
  160. package/package.json +3 -1
  161. package/dist/Calendar-Dq_of5A3.js.map +0 -1
  162. package/dist/DateFieldRange-DPbyzuHb.js.map +0 -1
  163. package/dist/DateFieldSingle-CfAJDcx9.js.map +0 -1
  164. package/dist/FieldLabel-BfnCXung.js.map +0 -1
  165. package/dist/Toolbar-DK7tXy_W.js +0 -807
  166. package/dist/Toolbar-DK7tXy_W.js.map +0 -1
  167. package/dist/components/Calendar/internal/CalendarYearSelection.d.ts +0 -25
  168. package/dist/useFocusWithin-BhU7hoAD.js +0 -56
  169. package/dist/useFocusWithin-BhU7hoAD.js.map +0 -1
  170. package/dist/useInfiniteCombobox-BN2uGhBh.js.map +0 -1
  171. /package/dist/{useInfiniteCombobox.css → Combobox.css} +0 -0
@@ -0,0 +1,40 @@
1
+ import { ToolbarItemProps } from '../types';
2
+ /**
3
+ * Props for the ToolbarItemWrapper component
4
+ */
5
+ export type ToolbarItemWrapperProps = {
6
+ /**
7
+ * Toolbar item configuration without ID (ID is generated internally)
8
+ */
9
+ item: Omit<ToolbarItemProps, "id">;
10
+ /**
11
+ * The toolbar item component to wrap
12
+ */
13
+ children: React.ReactNode;
14
+ /** Optional override for the intersection observer root element */
15
+ observerRoot?: Element | null;
16
+ /** Optional override for visibility change handling */
17
+ onVisibilityChange?: (isVisible: boolean) => void;
18
+ /** Optional margin offset for the intersection observer root */
19
+ rootMargin?: string;
20
+ /** Optional class name to apply to the wrapper element */
21
+ className?: string;
22
+ };
23
+ /**
24
+ * ToolbarItemWrapper manages item visibility and focus behavior within a toolbar.
25
+ *
26
+ * Features:
27
+ * - Intersection observation for overflow detection
28
+ * - Automatic overflow menu integration in collapse mode
29
+ * - Focus management and keyboard navigation
30
+ * - ARIA compliance for accessibility
31
+ * - Visibility state management
32
+ * - Proper tab index handling
33
+ * - Context integration with toolbar state
34
+ *
35
+ * @example
36
+ * <ToolbarItemWrapper item={{ itemType: "button", itemProps: buttonProps }}>
37
+ * <ToolbarButton {...buttonProps} />
38
+ * </ToolbarItemWrapper>
39
+ */
40
+ export declare const ToolbarItemWrapper: ({ item, children, observerRoot, onVisibilityChange, rootMargin, className, }: ToolbarItemWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { RefObject } from 'react';
2
+ import { ToolbarItemProps, ToolbarOverflowTypes } from '../types';
3
+ /**
4
+ * Context for sharing toolbar state with child components for overflow handling
5
+ */
6
+ export type ToolbarOverFlowContextProps = {
7
+ /**
8
+ * Array of toolbar items that should appear in the overflow menu
9
+ */
10
+ overflowItems: ToolbarItemProps[];
11
+ /**
12
+ * Function to add an item to the overflow menu
13
+ */
14
+ addItem: (element: ToolbarItemProps) => void;
15
+ /**
16
+ * Function to remove an item from the overflow menu
17
+ */
18
+ removeItem: (element: ToolbarItemProps) => void;
19
+ /**
20
+ * Reference to the toolbar container element
21
+ */
22
+ toolbarRef: RefObject<HTMLDivElement>;
23
+ /**
24
+ * Array of item IDs in their original order
25
+ */
26
+ orderedIds?: string[];
27
+ /**
28
+ * Overflow behavior type (wrap or collapse)
29
+ */
30
+ overflow: ToolbarOverflowTypes;
31
+ };
32
+ /**
33
+ * Context for managing toolbar overflow state and operations
34
+ */
35
+ export declare const ToolbarOverflowContext: import('react').Context<ToolbarOverFlowContextProps>;
@@ -0,0 +1,29 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * Props for the ToolbarOverflowMenu component
4
+ */
5
+ export type ToolbarOverflowMenuProps = {
6
+ /**
7
+ * Additional items to display in the overflow menu
8
+ */
9
+ additionalItems?: ReactElement[];
10
+ /**
11
+ * Direction of the parent toolbar
12
+ * @default horizontal
13
+ */
14
+ direction?: "vertical" | "horizontal";
15
+ };
16
+ /**
17
+ * ToolbarOverflowMenu component displays toolbar items that don't fit in the main toolbar.
18
+ *
19
+ * Features:
20
+ * - Automatic rendering when items overflow in collapse mode
21
+ * - Maintains consistent item ordering with the main toolbar
22
+ * - Preserves item state between toolbar and overflow menu
23
+ * - Provides accessible navigation with keyboard and screen readers
24
+ * - Adapts to both horizontal and vertical toolbar layouts
25
+ * - Context-aware rendering for child components
26
+ * - Proper ARIA menu semantics
27
+ * - Keyboard navigation support
28
+ */
29
+ export declare const ToolbarOverflowMenu: ({ additionalItems, direction, }: ToolbarOverflowMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { KeyboardEvent } from 'react';
2
+ /**
3
+ * Gets all visible focusable elements for a specific toolbar instance.
4
+ * Filters out hidden items and includes the overflow trigger if present.
5
+ */
6
+ export declare function getToolbarElements(toolbarElement: HTMLElement): Element[];
7
+ /**
8
+ * Updates tabindex values for all items in a toolbar.
9
+ * Sets tabindex="0" for the active item and tabindex="-1" for all others.
10
+ */
11
+ export declare function updateToolbarItemsTabIndex(toolbarElement: HTMLElement, activeItem?: Element | number): Element | undefined;
12
+ /**
13
+ * Handles keyboard navigation within the toolbar component following ARIA practices.
14
+ *
15
+ * Navigation behavior:
16
+ * - Left/Right arrows move focus in horizontal toolbars
17
+ * - Up/Down arrows move focus in vertical toolbars
18
+ * - Home/End move to first/last items
19
+ * - Navigation wraps around at the ends
20
+ * - Only visible items are included in navigation
21
+ */
22
+ export declare function handleToolbarKeyDown(event: KeyboardEvent<HTMLElement>, toolbarElement: HTMLElement): void;
23
+ /**
24
+ * Handles keyboard navigation within overflow menu using arrow keys
25
+ */
26
+ export declare const handleMenuKeyboardNavigation: (event: KeyboardEvent<HTMLUListElement>) => void;
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ import { ToolbarOverflowTypes } from '../../types';
3
+ export declare const withOverflowItemContext: (children: ReactNode, isInOverflowMenu?: boolean) => import('react').FunctionComponentElement<import('react').ProviderProps<{
4
+ isInOverflowMenu: boolean;
5
+ }>>;
6
+ export declare const createMockOverflowContext: (overrides?: {}) => {
7
+ overflowItems: never[];
8
+ orderedIds: never[];
9
+ addItem: import('vitest').Mock<(...args: any[]) => any>;
10
+ removeItem: import('vitest').Mock<(...args: any[]) => any>;
11
+ toolbarRef: {
12
+ current: HTMLDivElement;
13
+ };
14
+ overflow: ToolbarOverflowTypes;
15
+ };
16
+ export declare const withToolbarOverflowContext: (children: ReactNode, contextValue?: {
17
+ overflowItems: never[];
18
+ orderedIds: never[];
19
+ addItem: import('vitest').Mock<(...args: any[]) => any>;
20
+ removeItem: import('vitest').Mock<(...args: any[]) => any>;
21
+ toolbarRef: {
22
+ current: HTMLDivElement;
23
+ };
24
+ overflow: ToolbarOverflowTypes;
25
+ }) => import('react').FunctionComponentElement<import('react').ProviderProps<import('../ToolbarOverflowContext').ToolbarOverFlowContextProps>>;
26
+ export declare const mockIntersectionObserver: import('vitest').Mock<(...args: any[]) => any>;
27
+ export declare const observerMap: Map<any, any>;
28
+ export declare const createIntersectionEntry: (element: Element, isIntersecting: boolean) => IntersectionObserverEntry;
29
+ export declare const setupIntersectionObserver: () => void;
@@ -0,0 +1,50 @@
1
+ import { ButtonAppearance } from '../../../types';
2
+ import { IconProps } from '../../../components/Icon';
3
+ import { ToolbarButtonProps } from './ToolbarButton';
4
+ import { ToolbarButtonLinkProps } from './ToolbarButtonLink';
5
+ import { ToolbarButtonToggleProps } from './ToolbarButtonToggle';
6
+ import { ToolbarSelectProps } from './ToolbarSelect';
7
+ /**
8
+ * Toolbar overflow options
9
+ */
10
+ export type ToolbarOverflowTypes = "wrap" | "collapse";
11
+ /**
12
+ * Toolbar item appearance options
13
+ */
14
+ export type ToolbarItemAppearance = Extract<ButtonAppearance, "ghost" | "primary">;
15
+ /**
16
+ * Types of toolbar item
17
+ */
18
+ export type ToolbarItemTypes = "button" | "buttonToggle" | "buttonLink" | "select";
19
+ /**
20
+ * Props for item in the toolbar overflow menu
21
+ */
22
+ export type CombinedToolbarItemProps = ToolbarButtonProps | ToolbarButtonToggleProps | ToolbarButtonLinkProps | ToolbarSelectProps;
23
+ /**
24
+ * Props for a toolbar item
25
+ */
26
+ export type ToolbarItemProps = {
27
+ itemType: ToolbarItemTypes;
28
+ itemProps: CombinedToolbarItemProps;
29
+ id?: string;
30
+ };
31
+ /**
32
+ * TODO:
33
+ * This should actually be on the Button component itself to enforce the accessibility rules.
34
+ * This could be a breaking change though, so we should consider moving this to the Button component in the future.
35
+ *
36
+ * Generic type that adds accessibility requirements to any base props type.
37
+ * This enforces proper accessibility for both buttons and toggles.
38
+ */
39
+ export type WithAriaLabelEnforcement<T> = (T & {
40
+ children?: never;
41
+ icon: IconProps["svg"] | {
42
+ before: IconProps["svg"];
43
+ } | {
44
+ after: IconProps["svg"];
45
+ };
46
+ "aria-label": string;
47
+ }) | (T & {
48
+ children: React.ReactNode;
49
+ "aria-label"?: string;
50
+ });
@@ -0,0 +1 @@
1
+ export * from './Toolbar';
@@ -0,0 +1 @@
1
+ export * from './components';
package/dist/beta.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './beta/index'
2
+ export {}
package/dist/beta.js ADDED
@@ -0,0 +1,2 @@
1
+ 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-D4zuUFhb.js';
2
+ //# sourceMappingURL=beta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beta.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -284,6 +284,14 @@ export type ComboboxTriggerProps<Item = any> = Omit<TextFieldProps, "disabled" |
284
284
  maxRows?: number;
285
285
  /** Allows Combobox/Select to display custom-colored Chips */
286
286
  selectedItemProps?: (item: Item) => Partial<ChipProps>;
287
+ /**
288
+ * Called when the clear (close) button is clicked.
289
+ * @remarks This prop completely replaces the default clear behavior (reset/selectItem).
290
+ * Only use this when you need complete control over the combobox state, such as in
291
+ * FilterSelect components where the implementor manages all item filtering and selection.
292
+ * This should only be used with the disableFilter prop.
293
+ */
294
+ onClear?: () => void;
287
295
  } & {
288
296
  /** @deprecated use disabled in <Combobox /> */
289
297
  disabled?: boolean;
@@ -52,8 +52,8 @@ export type DateFieldRangeProps = Omit<MaskedDateRangeInputProps, "onChange" | "
52
52
  minDate?: string;
53
53
  maxDate?: string;
54
54
  required?: boolean;
55
- onFocus?: (event: FocusEvent) => void;
56
- onBlur?: (event: FocusEvent) => void;
55
+ onFocus?: (event: React.FocusEvent) => void;
56
+ onBlur?: (event: React.FocusEvent) => void;
57
57
  } & DataTrackingId;
58
58
  export declare const DateFieldRange: {
59
59
  (props: DateFieldRangeProps): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { DateTime, WeekdayNumbers } from 'luxon';
2
2
  export type DateFieldRangeCalendarProps = {
3
3
  startDate: DateTime | null;
4
4
  endDate: DateTime | null;
5
- onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
5
+ onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
6
6
  onSelection: ({ startDate, endDate, }: {
7
7
  startDate: DateTime | null;
8
8
  endDate: DateTime | null;
@@ -1,6 +1,5 @@
1
1
  import { DateTime } from 'luxon';
2
- import { RefObject } from 'react';
3
- import { MaskedDateRangeInputChange, MaskedDateRangeInputRef } from './MaskedDateRangeInput';
2
+ import { MaskedDateRangeInputChange } from './MaskedDateRangeInput';
4
3
  export type DateFieldRangeStateChange = {
5
4
  startDate: DateTime | null;
6
5
  endDate: DateTime | null;
@@ -23,10 +22,6 @@ export type DateFieldRangeStateParam = {
23
22
  startDate: DateTime | null;
24
23
  endDate: DateTime | null;
25
24
  } | null;
26
- /**
27
- * The ref to the input component.
28
- */
29
- inputRef: RefObject<MaskedDateRangeInputRef>;
30
25
  /**
31
26
  * The function to call when the state changes.
32
27
  */
@@ -67,4 +62,4 @@ export type DateFieldRangeState = {
67
62
  /**
68
63
  * This is a hook for keeping state in sync between a date input and calendar.
69
64
  */
70
- export declare function useDateFieldRangeState({ valueProp, defaultValueProp, inputRef, onChange, }: DateFieldRangeStateParam): DateFieldRangeState;
65
+ export declare function useDateFieldRangeState({ valueProp, defaultValueProp, onChange, }: DateFieldRangeStateParam): DateFieldRangeState;
@@ -5,8 +5,8 @@ export type DateFieldSingleProps = Omit<MaskedDateInputProps, "onChange" | "valu
5
5
  value?: string | null;
6
6
  defaultValue?: string | null;
7
7
  onChange?: DateFieldSingleChangeHandler;
8
- onFocus?: (event: FocusEvent) => void;
9
- onBlur?: (event: FocusEvent) => void;
8
+ onFocus?: (event: React.FocusEvent) => void;
9
+ onBlur?: (event: React.FocusEvent) => void;
10
10
  mode?: Extract<DateMode, "mm/dd/yyyy" | "dd/mm/yyyy">;
11
11
  disableHint?: boolean;
12
12
  disableCalendar?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { DateTime } from 'luxon';
2
- import { MaskedDateInputChange, MaskedDateInputRef } from './MaskedDateInput';
3
- import { RefObject } from 'react';
2
+ import { MaskedDateInputChange } from './MaskedDateInput';
4
3
  export type DateFieldSingleStateChange = {
5
4
  date: DateTime | null;
6
5
  isInputValid: boolean;
@@ -16,10 +15,6 @@ export type DateFieldSingleStateParam = {
16
15
  * The default (uncontrolled) value of the date field.
17
16
  */
18
17
  defaultValueProp?: DateTime | null;
19
- /**
20
- * The ref to the input field.
21
- */
22
- inputRef: RefObject<MaskedDateInputRef>;
23
18
  /**
24
19
  * Callback for when the date changes.
25
20
  */
@@ -46,4 +41,4 @@ export type DateFieldSingleState = {
46
41
  /**
47
42
  * This is a hook for keeping state in sync between a date input and calendar.
48
43
  */
49
- export declare function useDateFieldSingleState({ valueProp, defaultValueProp, inputRef, onChange, }: DateFieldSingleStateParam): DateFieldSingleState;
44
+ export declare function useDateFieldSingleState({ valueProp, defaultValueProp, onChange, }: DateFieldSingleStateParam): DateFieldSingleState;
@@ -1,4 +1,4 @@
1
- export { Dialog as default, Dialog, type DialogProps, } from './Dialog';
1
+ export { Dialog as default, Dialog, type DialogProps } from './Dialog';
2
2
  export { DialogCancelButton, type DialogCancelButtonProps, } from './DialogCancelButton';
3
3
  export { DialogContent, type DialogContentProps } from './DialogContent';
4
4
  export { DialogFooter, type DialogFooterProps } from './DialogFooter';
@@ -21,8 +21,8 @@ export type NumberFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" |
21
21
  value?: number | null;
22
22
  defaultValue?: number | null;
23
23
  onChange?: (value: number | null) => void;
24
- onFocus?: (event: FocusEvent) => void;
25
- onBlur?: (event: FocusEvent) => void;
24
+ onFocus?: (event: React.FocusEvent) => void;
25
+ onBlur?: (event: React.FocusEvent) => void;
26
26
  hideControls?: boolean;
27
27
  } & DataTrackingId;
28
28
  export declare const NumberField: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "value" | "onBlur" | "onFocus" | "onChange" | "defaultValue" | "prefix" | "inputMode" | "type"> & LayoutUtilProps & Pick<import('../../internal/components').LabelProps, "required" | "moreInfo"> & {
@@ -46,7 +46,7 @@ export declare const NumberField: import('react').ForwardRefExoticComponent<Omit
46
46
  value?: number | null;
47
47
  defaultValue?: number | null;
48
48
  onChange?: (value: number | null) => void;
49
- onFocus?: (event: FocusEvent) => void;
50
- onBlur?: (event: FocusEvent) => void;
49
+ onFocus?: (event: React.FocusEvent) => void;
50
+ onBlur?: (event: React.FocusEvent) => void;
51
51
  hideControls?: boolean;
52
52
  } & DataTrackingId & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,26 +1,26 @@
1
1
  import * as React from 'react';
2
2
 
3
- import './indeterminate_check_box.css';const checkbox = "_checkbox_zshjc_2";
4
- const wrapper = "_wrapper_zshjc_17";
5
- const error = "_error_zshjc_97";
6
- const label = "_label_zshjc_209";
7
- const legend = "_legend_zshjc_241";
8
- const children = "_children_zshjc_253";
3
+ import './indeterminate_check_box.css';const checkbox = "_checkbox_19qga_8";
4
+ const wrapper = "_wrapper_19qga_23";
5
+ const error = "_error_19qga_103";
6
+ const label = "_label_19qga_215";
7
+ const legend = "_legend_19qga_247";
8
+ const children = "_children_19qga_259";
9
9
  const checkboxStyles = {
10
10
  checkbox: checkbox,
11
11
  wrapper: wrapper,
12
- "required-asterisk": "_required-asterisk_zshjc_31",
13
- "focus-label": "_focus-label_zshjc_35",
14
- "icon-wrapper": "_icon-wrapper_zshjc_41",
15
- "helper-wrapper": "_helper-wrapper_zshjc_74",
16
- "icon-indeterminate": "_icon-indeterminate_zshjc_79",
17
- "icon-unchecked": "_icon-unchecked_zshjc_80",
18
- "icon-checked": "_icon-checked_zshjc_81",
12
+ "required-asterisk": "_required-asterisk_19qga_37",
13
+ "focus-label": "_focus-label_19qga_41",
14
+ "icon-wrapper": "_icon-wrapper_19qga_47",
15
+ "helper-wrapper": "_helper-wrapper_19qga_80",
16
+ "icon-indeterminate": "_icon-indeterminate_19qga_85",
17
+ "icon-unchecked": "_icon-unchecked_19qga_86",
18
+ "icon-checked": "_icon-checked_19qga_87",
19
19
  error: error,
20
- "sr-only": "_sr-only_zshjc_195",
21
- "checkbox-group": "_checkbox-group_zshjc_209",
20
+ "sr-only": "_sr-only_19qga_201",
21
+ "checkbox-group": "_checkbox-group_19qga_215",
22
22
  label: label,
23
- "direction-row": "_direction-row_zshjc_209",
23
+ "direction-row": "_direction-row_19qga_215",
24
24
  legend: legend,
25
25
  children: children
26
26
  };
@@ -32,4 +32,4 @@ const SvgCheckBox = (props) => /* @__PURE__ */ React.createElement("svg", { xmln
32
32
  const SvgIndeterminateCheckBox = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 10H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z" }));
33
33
 
34
34
  export { SvgIndeterminateCheckBox as S, SvgCheckBox as a, SvgCheckBoxOutlineBlank as b, checkboxStyles as c };
35
- //# sourceMappingURL=indeterminate_check_box-Bg24oeHy.js.map
35
+ //# sourceMappingURL=indeterminate_check_box-RY9zr3xS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"indeterminate_check_box-Bg24oeHy.js","sources":["../../hammer-icon/mdi/round/check_box_outline_blank.svg","../../hammer-icon/mdi/round/check_box.svg","../../hammer-icon/mdi/round/indeterminate_check_box.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgCheckBoxOutlineBlank = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h12c.55 0 1 .45 1 1v12c0 .55-.45 1-1 1zm1-16H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\" }));\nexport default SvgCheckBoxOutlineBlank;\n","import * as React from \"react\";\nconst SvgCheckBox = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8.29 13.29a.996.996 0 0 1-1.41 0L5.71 12.7a.996.996 0 1 1 1.41-1.41L10 14.17l6.88-6.88a.996.996 0 1 1 1.41 1.41l-7.58 7.59z\" }));\nexport default SvgCheckBox;\n","import * as React from \"react\";\nconst SvgIndeterminateCheckBox = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 10H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z\" }));\nexport default SvgIndeterminateCheckBox;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACK,MAAC,uBAAuB,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+JAA+J,EAAE,CAAC;;ACA1Y,MAAC,WAAW,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,2MAA2M,EAAE,CAAC;;ACA1a,MAAC,wBAAwB,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+IAA+I,EAAE,CAAC;;;;"}
1
+ {"version":3,"file":"indeterminate_check_box-RY9zr3xS.js","sources":["../../hammer-icon/mdi/round/check_box_outline_blank.svg","../../hammer-icon/mdi/round/check_box.svg","../../hammer-icon/mdi/round/indeterminate_check_box.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgCheckBoxOutlineBlank = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h12c.55 0 1 .45 1 1v12c0 .55-.45 1-1 1zm1-16H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\" }));\nexport default SvgCheckBoxOutlineBlank;\n","import * as React from \"react\";\nconst SvgCheckBox = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8.29 13.29a.996.996 0 0 1-1.41 0L5.71 12.7a.996.996 0 1 1 1.41-1.41L10 14.17l6.88-6.88a.996.996 0 1 1 1.41 1.41l-7.58 7.59z\" }));\nexport default SvgCheckBox;\n","import * as React from \"react\";\nconst SvgIndeterminateCheckBox = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 10H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z\" }));\nexport default SvgIndeterminateCheckBox;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACK,MAAC,uBAAuB,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+JAA+J,EAAE,CAAC;;ACA1Y,MAAC,WAAW,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,2MAA2M,EAAE,CAAC;;ACA1a,MAAC,wBAAwB,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+IAA+I,EAAE,CAAC;;;;"}