@jobber/components 6.101.4 → 6.101.5-JOB-140604-4487daa.55

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 (177) hide show
  1. package/dist/Autocomplete/Autocomplete.types.d.ts +11 -51
  2. package/dist/Autocomplete/components/MenuList.d.ts +3 -2
  3. package/dist/Autocomplete/components/PersistentRegion.d.ts +3 -2
  4. package/dist/Autocomplete/hooks/useAutocompleteListNav.d.ts +3 -2
  5. package/dist/Autocomplete/index.cjs +95 -51
  6. package/dist/Autocomplete/index.mjs +97 -53
  7. package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +14 -1
  8. package/dist/Autocomplete/useAutocomplete.d.ts +4 -3
  9. package/dist/Autocomplete/utils/interactionUtils.d.ts +14 -0
  10. package/dist/Card-cjs.js +1 -1
  11. package/dist/Card-es.js +1 -1
  12. package/dist/Checkbox/Checkbox.rebuilt.d.ts +2 -2
  13. package/dist/Checkbox/Checkbox.types.d.ts +24 -18
  14. package/dist/Checkbox/index.cjs +9 -2
  15. package/dist/Checkbox/index.mjs +9 -2
  16. package/dist/Chip/Chip.d.ts +1 -2
  17. package/dist/Chip/hooks/useChildComponent.d.ts +4 -3
  18. package/dist/Chip/index.cjs +1 -1
  19. package/dist/Chip-cjs.js +5 -4
  20. package/dist/Chip-es.js +5 -4
  21. package/dist/ChipDismissible-cjs.js +4 -4
  22. package/dist/ChipDismissible-es.js +5 -5
  23. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
  24. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
  25. package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +1 -1
  26. package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +1 -1
  27. package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +1 -1
  28. package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
  29. package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
  30. package/dist/Chips/index.cjs +2 -2
  31. package/dist/Chips/index.mjs +2 -2
  32. package/dist/Combobox/Combobox.d.ts +2 -1
  33. package/dist/Combobox/Combobox.types.d.ts +2 -2
  34. package/dist/Combobox/ComboboxProvider.d.ts +3 -3
  35. package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +1 -1
  36. package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +2 -1
  37. package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +2 -1
  38. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +2 -1
  39. package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +2 -1
  40. package/dist/Combobox/hooks/useCombobox.d.ts +1 -1
  41. package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +2 -2
  42. package/dist/Combobox/hooks/useComboboxContent.d.ts +2 -1
  43. package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +1 -1
  44. package/dist/ComboboxActivator-cjs.js +2 -2
  45. package/dist/ComboboxActivator-es.js +3 -3
  46. package/dist/ComboboxTrigger-cjs.js +1 -1
  47. package/dist/ComboboxTrigger-es.js +2 -2
  48. package/dist/DataList/DataList.types.d.ts +2 -2
  49. package/dist/DataList/DataList.utils.d.ts +2 -2
  50. package/dist/DataList/components/DataListHeader/index.cjs +1 -0
  51. package/dist/DataList/components/DataListHeader/index.mjs +1 -0
  52. package/dist/DataList/components/DataListHeaderTile/components/DataListSortingOptions.d.ts +2 -2
  53. package/dist/DataList/components/DataListItem/DataListItemInternal.d.ts +2 -2
  54. package/dist/DataList/components/DataListItem/index.cjs +1 -0
  55. package/dist/DataList/components/DataListItem/index.mjs +1 -0
  56. package/dist/DataList/components/DataListItems/index.cjs +1 -0
  57. package/dist/DataList/components/DataListItems/index.mjs +1 -0
  58. package/dist/DataList/components/DataListLayout/index.cjs +1 -0
  59. package/dist/DataList/components/DataListLayout/index.mjs +1 -0
  60. package/dist/DataList/components/DataListSearch/index.cjs +2 -12
  61. package/dist/DataList/components/DataListSearch/index.mjs +2 -12
  62. package/dist/DataList/hooks/useGetItemActions.d.ts +1 -1
  63. package/dist/DataList/index.cjs +1 -8
  64. package/dist/DataList/index.mjs +1 -8
  65. package/dist/DataListActions-cjs.js +4 -2
  66. package/dist/DataListActions-es.js +4 -2
  67. package/dist/DataListItem-cjs.js +8 -7
  68. package/dist/DataListItem-es.js +9 -8
  69. package/dist/DataListSort-cjs.js +1 -1
  70. package/dist/DataListSort-es.js +2 -2
  71. package/dist/DataTable/SortIcon.d.ts +2 -1
  72. package/dist/DataTable/components/DataTableSortableHeader.d.ts +1 -1
  73. package/dist/DataTable/index.cjs +3 -2
  74. package/dist/DataTable/index.mjs +3 -2
  75. package/dist/DatePicker/DatePicker.d.ts +5 -1
  76. package/dist/DatePicker/index.cjs +2 -2
  77. package/dist/DatePicker/index.mjs +2 -2
  78. package/dist/DatePicker/useFocusOnSelectedDate.d.ts +1 -2
  79. package/dist/DatePicker-cjs.js +4 -2
  80. package/dist/DatePicker-es.js +5 -3
  81. package/dist/FormField/FormFieldAffix.d.ts +2 -2
  82. package/dist/FormField/FormFieldTypes.d.ts +3 -5
  83. package/dist/FormField/FormFieldWrapper.d.ts +5 -1
  84. package/dist/FormField/hooks/useFormFieldFocus.d.ts +1 -1
  85. package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +9 -4
  86. package/dist/FormField-cjs.js +35 -31
  87. package/dist/FormField-es.js +35 -31
  88. package/dist/InputDate/InputDate.types.d.ts +12 -7
  89. package/dist/InputDate/index.cjs +35 -12
  90. package/dist/InputDate/index.mjs +35 -12
  91. package/dist/InputDate/useInputDateActivatorActions.d.ts +4 -8
  92. package/dist/InputEmail/InputEmail.types.d.ts +10 -20
  93. package/dist/InputEmail/hooks/useInputEmailActions.d.ts +10 -4
  94. package/dist/InputEmail/index.cjs +43 -60
  95. package/dist/InputEmail/index.mjs +44 -61
  96. package/dist/InputFile-cjs.js +5 -2
  97. package/dist/InputFile-es.js +5 -2
  98. package/dist/InputGroup-cjs.js +5 -2
  99. package/dist/InputGroup-es.js +5 -2
  100. package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +7 -15
  101. package/dist/InputNumber/index.cjs +7 -5
  102. package/dist/InputNumber/index.mjs +7 -5
  103. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +12 -28
  104. package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +9 -4
  105. package/dist/InputPhoneNumber/index.cjs +37 -36
  106. package/dist/InputPhoneNumber/index.mjs +38 -37
  107. package/dist/InputText/InputText.d.ts +2 -2
  108. package/dist/InputText/InputText.types.d.ts +30 -25
  109. package/dist/InputText/index.cjs +54 -62
  110. package/dist/InputText/index.mjs +55 -63
  111. package/dist/InputText/useInputTextActions.d.ts +11 -5
  112. package/dist/InputText/useTextAreaResize.d.ts +2 -2
  113. package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
  114. package/dist/InputTime/InputTime.types.d.ts +13 -4
  115. package/dist/InputTime/hooks/useInputTimeActions.d.ts +21 -0
  116. package/dist/InputTime/index.cjs +90 -30
  117. package/dist/InputTime/index.mjs +93 -33
  118. package/dist/InternalChipDismissible-cjs.js +3 -3
  119. package/dist/InternalChipDismissible-es.js +4 -4
  120. package/dist/List/index.cjs +2 -2
  121. package/dist/List/index.mjs +2 -2
  122. package/dist/Menu/Menu.d.ts +2 -4
  123. package/dist/Menu/Menu.types.d.ts +21 -5
  124. package/dist/Menu-cjs.js +9 -9
  125. package/dist/Menu-es.js +9 -9
  126. package/dist/Modal/Modal.types.d.ts +3 -3
  127. package/dist/Modal/ModalContext.rebuilt.d.ts +2 -2
  128. package/dist/MultiSelect/DropDownMenu.d.ts +1 -1
  129. package/dist/MultiSelect/index.cjs +1 -0
  130. package/dist/MultiSelect/index.mjs +1 -0
  131. package/dist/MultiSelect-cjs.js +13 -7
  132. package/dist/MultiSelect-es.js +13 -7
  133. package/dist/RadioGroup/RadioGroup.d.ts +2 -1
  134. package/dist/RadioGroup/RadioOption.d.ts +1 -1
  135. package/dist/RecurringSelect/index.cjs +3 -2
  136. package/dist/RecurringSelect/index.mjs +3 -2
  137. package/dist/Select/Select.types.d.ts +7 -3
  138. package/dist/Select/hooks/useSelectActions.d.ts +5 -5
  139. package/dist/Select/index.cjs +27 -42
  140. package/dist/Select/index.mjs +29 -44
  141. package/dist/StatusLabel/StatusLabel.d.ts +2 -1
  142. package/dist/Tabs/hooks/useTabsOverflow.d.ts +2 -2
  143. package/dist/Tabs-cjs.js +4 -2
  144. package/dist/Tabs-es.js +5 -3
  145. package/dist/Tooltip/useTooltipPositioning.d.ts +1 -1
  146. package/dist/_baseEach-cjs.js +12 -12
  147. package/dist/_baseEach-es.js +1 -1
  148. package/dist/_baseFlatten-cjs.js +2 -2
  149. package/dist/_baseFlatten-es.js +1 -1
  150. package/dist/{_baseGet-cjs.js → _getAllKeys-cjs.js} +181 -181
  151. package/dist/{_baseGet-es.js → _getAllKeys-es.js} +182 -182
  152. package/dist/debounce-es.js +1 -1
  153. package/dist/filterDataAttributes-cjs.js +26 -0
  154. package/dist/filterDataAttributes-es.js +24 -0
  155. package/dist/floating-ui.react-cjs.js +115 -0
  156. package/dist/floating-ui.react-es.js +115 -1
  157. package/dist/helpers-cjs.js +1 -1
  158. package/dist/helpers-es.js +1 -1
  159. package/dist/index.cjs +4 -3
  160. package/dist/index.mjs +3 -2
  161. package/dist/omit-cjs.js +14 -14
  162. package/dist/omit-es.js +1 -1
  163. package/dist/sharedHelpers/filterDataAttributes.d.ts +17 -0
  164. package/dist/sharedHelpers/types.d.ts +231 -0
  165. package/dist/showToast-cjs.js +2 -2
  166. package/dist/showToast-es.js +2 -2
  167. package/dist/styles.css +32 -23
  168. package/dist/useChildComponent-cjs.js +1 -1
  169. package/dist/useChildComponent-es.js +1 -1
  170. package/dist/useScrollToActive-cjs.js +3 -3
  171. package/dist/useScrollToActive-es.js +2 -2
  172. package/dist/utils/mergeRefs.d.ts +2 -2
  173. package/package.json +2 -2
  174. package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +0 -32
  175. package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +0 -71
  176. package/dist/InputText/useInputTextFormField.d.ts +0 -352
  177. package/dist/Select/hooks/useSelectFormField.d.ts +0 -34
@@ -1044,6 +1044,12 @@ function isVirtualPointerEvent(event) {
1044
1044
  // iOS VoiceOver returns 0.333• for width/height.
1045
1045
  event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';
1046
1046
  }
1047
+ function isMouseLikePointerType(pointerType, strict) {
1048
+ // On some Linux machines with Chromium, mouse inputs return a `pointerType`
1049
+ // of "pen": https://github.com/floating-ui/floating-ui/issues/2015
1050
+ const values = ['mouse', 'pen'];
1051
+ return values.includes(pointerType);
1052
+ }
1047
1053
 
1048
1054
  var isClient$1 = typeof document !== 'undefined';
1049
1055
 
@@ -4541,6 +4547,114 @@ const FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(p
4541
4547
  });
4542
4548
  });
4543
4549
 
4550
+ function isButtonTarget(event) {
4551
+ return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';
4552
+ }
4553
+ function isAnchorTarget(event) {
4554
+ return isHTMLElement(event.target) && event.target.tagName === 'A';
4555
+ }
4556
+ function isSpaceIgnored(element) {
4557
+ return isTypeableElement(element);
4558
+ }
4559
+ /**
4560
+ * Opens or closes the floating element when clicking the reference element.
4561
+ * @see https://floating-ui.com/docs/useClick
4562
+ */
4563
+ function useClick(context, props) {
4564
+ if (props === void 0) {
4565
+ props = {};
4566
+ }
4567
+ const {
4568
+ open,
4569
+ onOpenChange,
4570
+ dataRef,
4571
+ elements: {
4572
+ domReference
4573
+ }
4574
+ } = context;
4575
+ const {
4576
+ enabled = true,
4577
+ event: eventOption = 'click',
4578
+ toggle = true,
4579
+ ignoreMouse = false,
4580
+ keyboardHandlers = true,
4581
+ stickIfOpen = true
4582
+ } = props;
4583
+ const pointerTypeRef = React.useRef();
4584
+ const didKeyDownRef = React.useRef(false);
4585
+ const reference = React.useMemo(() => ({
4586
+ onPointerDown(event) {
4587
+ pointerTypeRef.current = event.pointerType;
4588
+ },
4589
+ onMouseDown(event) {
4590
+ const pointerType = pointerTypeRef.current;
4591
+
4592
+ // Ignore all buttons except for the "main" button.
4593
+ // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
4594
+ if (event.button !== 0) return;
4595
+ if (eventOption === 'click') return;
4596
+ if (isMouseLikePointerType(pointerType) && ignoreMouse) return;
4597
+ if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {
4598
+ onOpenChange(false, event.nativeEvent, 'click');
4599
+ } else {
4600
+ // Prevent stealing focus from the floating element
4601
+ event.preventDefault();
4602
+ onOpenChange(true, event.nativeEvent, 'click');
4603
+ }
4604
+ },
4605
+ onClick(event) {
4606
+ const pointerType = pointerTypeRef.current;
4607
+ if (eventOption === 'mousedown' && pointerTypeRef.current) {
4608
+ pointerTypeRef.current = undefined;
4609
+ return;
4610
+ }
4611
+ if (isMouseLikePointerType(pointerType) && ignoreMouse) return;
4612
+ if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {
4613
+ onOpenChange(false, event.nativeEvent, 'click');
4614
+ } else {
4615
+ onOpenChange(true, event.nativeEvent, 'click');
4616
+ }
4617
+ },
4618
+ onKeyDown(event) {
4619
+ pointerTypeRef.current = undefined;
4620
+ if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {
4621
+ return;
4622
+ }
4623
+ if (event.key === ' ' && !isSpaceIgnored(domReference)) {
4624
+ // Prevent scrolling
4625
+ event.preventDefault();
4626
+ didKeyDownRef.current = true;
4627
+ }
4628
+ if (isAnchorTarget(event)) {
4629
+ return;
4630
+ }
4631
+ if (event.key === 'Enter') {
4632
+ if (open && toggle) {
4633
+ onOpenChange(false, event.nativeEvent, 'click');
4634
+ } else {
4635
+ onOpenChange(true, event.nativeEvent, 'click');
4636
+ }
4637
+ }
4638
+ },
4639
+ onKeyUp(event) {
4640
+ if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {
4641
+ return;
4642
+ }
4643
+ if (event.key === ' ' && didKeyDownRef.current) {
4644
+ didKeyDownRef.current = false;
4645
+ if (open && toggle) {
4646
+ onOpenChange(false, event.nativeEvent, 'click');
4647
+ } else {
4648
+ onOpenChange(true, event.nativeEvent, 'click');
4649
+ }
4650
+ }
4651
+ }
4652
+ }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);
4653
+ return React.useMemo(() => enabled ? {
4654
+ reference
4655
+ } : {}, [enabled, reference]);
4656
+ }
4657
+
4544
4658
  const bubbleHandlerKeys = {
4545
4659
  pointerdown: 'onPointerDown',
4546
4660
  mousedown: 'onMouseDown',
@@ -5908,4 +6022,4 @@ function useTransitionStyles(context, props) {
5908
6022
  };
5909
6023
  }
5910
6024
 
5911
- export { FloatingPortal as F, arrow as a, autoUpdate as b, size as c, useDismiss as d, useListNavigation as e, flip as f, useInteractions as g, useFloatingParentNodeId as h, useFloatingNodeId as i, FloatingTree as j, FloatingNode as k, limitShift as l, autoPlacement as m, useRole as n, offset as o, FloatingFocusManager as p, FloatingOverlay as q, useTransitionStyles as r, shift as s, FloatingArrow as t, useFloating as u };
6025
+ export { FloatingPortal as F, arrow as a, autoUpdate as b, size as c, useDismiss as d, useListNavigation as e, flip as f, useInteractions as g, useFloatingParentNodeId as h, useFloatingNodeId as i, FloatingTree as j, FloatingNode as k, limitShift as l, autoPlacement as m, useRole as n, offset as o, FloatingFocusManager as p, FloatingOverlay as q, useClick as r, shift as s, useTransitionStyles as t, useFloating as u, FloatingArrow as v };
@@ -23,7 +23,7 @@ var jobberHooks__namespace = /*#__PURE__*/_interopNamespaceDefault(jobberHooks);
23
23
 
24
24
  const mockContainerWidth = (exactWidth) => {
25
25
  jest.spyOn(jobberHooks__namespace, "useResizeObserver").mockReturnValue([
26
- { current: null },
26
+ { current: document.createElement("div") },
27
27
  {
28
28
  width: 1200,
29
29
  height: 800,
@@ -2,7 +2,7 @@ import * as jobberHooks from '@jobber/hooks';
2
2
 
3
3
  const mockContainerWidth = (exactWidth) => {
4
4
  jest.spyOn(jobberHooks, "useResizeObserver").mockReturnValue([
5
- { current: null },
5
+ { current: document.createElement("div") },
6
6
  {
7
7
  width: 1200,
8
8
  height: 800,
package/dist/index.cjs CHANGED
@@ -112,6 +112,7 @@ require('react/jsx-runtime');
112
112
  require('react-dom');
113
113
  require('classnames');
114
114
  require('./maxHeight-cjs.js');
115
+ require('./filterDataAttributes-cjs.js');
115
116
  require('./tslib.es6-cjs.js');
116
117
  require('color');
117
118
  require('react-router-dom');
@@ -121,9 +122,9 @@ require('./useChildComponent-cjs.js');
121
122
  require('./InternalChipDismissible-cjs.js');
122
123
  require('./useScrollToActive-cjs.js');
123
124
  require('./_baseFlatten-cjs.js');
124
- require('./_baseGet-cjs.js');
125
- require('./_getTag-cjs.js');
125
+ require('./_getAllKeys-cjs.js');
126
126
  require('./isSymbol-cjs.js');
127
+ require('./_getTag-cjs.js');
127
128
  require('./_baseEach-cjs.js');
128
129
  require('./debounce-cjs.js');
129
130
  require('./ComboboxContent-cjs.js');
@@ -219,7 +220,7 @@ exports.Cluster = Cluster.Cluster;
219
220
  exports.Container = Container.Container;
220
221
  exports.Cover = Cover.Cover;
221
222
  exports.Checkbox = Checkbox_index.Checkbox;
222
- exports.Chip = Chip.ChipNamespace;
223
+ exports.Chip = Chip.Chip;
223
224
  exports.ChipDismissible = ChipDismissible.ChipDismissible;
224
225
  exports.ChipSelectable = ChipDismissible.ChipSelectable;
225
226
  exports.Icon = Icon.Icon;
package/dist/index.mjs CHANGED
@@ -110,6 +110,7 @@ import 'react/jsx-runtime';
110
110
  import 'react-dom';
111
111
  import 'classnames';
112
112
  import './maxHeight-es.js';
113
+ import './filterDataAttributes-es.js';
113
114
  import './tslib.es6-es.js';
114
115
  import 'color';
115
116
  import 'react-router-dom';
@@ -119,9 +120,9 @@ import './useChildComponent-es.js';
119
120
  import './InternalChipDismissible-es.js';
120
121
  import './useScrollToActive-es.js';
121
122
  import './_baseFlatten-es.js';
122
- import './_baseGet-es.js';
123
- import './_getTag-es.js';
123
+ import './_getAllKeys-es.js';
124
124
  import './isSymbol-es.js';
125
+ import './_getTag-es.js';
125
126
  import './_baseEach-es.js';
126
127
  import './debounce-es.js';
127
128
  import './ComboboxContent-es.js';
package/dist/omit-cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _commonjsHelpers = require('./_commonjsHelpers-cjs.js');
4
- var _baseGet = require('./_baseGet-cjs.js');
4
+ var _getAllKeys = require('./_getAllKeys-cjs.js');
5
5
  var identity = require('./identity-cjs.js');
6
6
  var keysIn$3 = require('./keysIn-cjs.js');
7
7
  var _getTag = require('./_getTag-cjs.js');
@@ -35,7 +35,7 @@ function arrayEach$1(array, iteratee) {
35
35
  var _arrayEach = arrayEach$1;
36
36
 
37
37
  var copyObject$4 = keysIn$3._copyObject,
38
- keys$1 = _baseGet.keys_1;
38
+ keys$1 = _getAllKeys.keys_1;
39
39
 
40
40
  /**
41
41
  * The base implementation of `_.assign` without support for multiple sources
@@ -71,7 +71,7 @@ function baseAssignIn$1(object, source) {
71
71
  var _baseAssignIn = baseAssignIn$1;
72
72
 
73
73
  var copyObject$2 = keysIn$3._copyObject,
74
- getSymbols$1 = _baseGet._getSymbols;
74
+ getSymbols$1 = _getAllKeys._getSymbols;
75
75
 
76
76
  /**
77
77
  * Copies own symbols of `source` to `object`.
@@ -87,10 +87,10 @@ function copySymbols$1(source, object) {
87
87
 
88
88
  var _copySymbols = copySymbols$1;
89
89
 
90
- var arrayPush = _baseGet._arrayPush,
90
+ var arrayPush = _getAllKeys._arrayPush,
91
91
  getPrototype = keysIn$3._getPrototype,
92
- getSymbols = _baseGet._getSymbols,
93
- stubArray = _baseGet.stubArray_1;
92
+ getSymbols = _getAllKeys._getSymbols,
93
+ stubArray = _getAllKeys.stubArray_1;
94
94
 
95
95
  /* Built-in method references for those with the same name as other `lodash` methods. */
96
96
  var nativeGetSymbols = Object.getOwnPropertySymbols;
@@ -130,7 +130,7 @@ function copySymbolsIn$1(source, object) {
130
130
 
131
131
  var _copySymbolsIn = copySymbolsIn$1;
132
132
 
133
- var baseGetAllKeys = _baseGet._baseGetAllKeys,
133
+ var baseGetAllKeys = _getAllKeys._baseGetAllKeys,
134
134
  getSymbolsIn = _getSymbolsIn,
135
135
  keysIn$1 = keysIn$3.keysIn_1;
136
136
 
@@ -412,7 +412,7 @@ var Stack = identity._Stack,
412
412
  copyArray = keysIn$3._copyArray,
413
413
  copySymbols = _copySymbols,
414
414
  copySymbolsIn = _copySymbolsIn,
415
- getAllKeys = _baseGet._getAllKeys,
415
+ getAllKeys = _getAllKeys._getAllKeys,
416
416
  getAllKeysIn$1 = _getAllKeysIn,
417
417
  getTag = _getTag._getTag,
418
418
  initCloneArray = _initCloneArray,
@@ -423,7 +423,7 @@ var Stack = identity._Stack,
423
423
  isMap = isMap_1,
424
424
  isObject = isObjectLike$2.isObject_1,
425
425
  isSet = isSet_1,
426
- keys = _baseGet.keys_1,
426
+ keys = _getAllKeys.keys_1,
427
427
  keysIn = keysIn$3.keysIn_1;
428
428
 
429
429
  /** Used to compose bitmasks for cloning. */
@@ -625,7 +625,7 @@ function baseSlice$1(array, start, end) {
625
625
 
626
626
  var _baseSlice = baseSlice$1;
627
627
 
628
- var baseGet = _baseGet._baseGet,
628
+ var baseGet = _getAllKeys._baseGet,
629
629
  baseSlice = _baseSlice;
630
630
 
631
631
  /**
@@ -642,10 +642,10 @@ function parent$1(object, path) {
642
642
 
643
643
  var _parent = parent$1;
644
644
 
645
- var castPath$1 = _baseGet._castPath,
645
+ var castPath$1 = _getAllKeys._castPath,
646
646
  last = last_1,
647
647
  parent = _parent,
648
- toKey = _baseGet._toKey;
648
+ toKey = _getAllKeys._toKey;
649
649
 
650
650
  /**
651
651
  * The base implementation of `_.unset`.
@@ -720,10 +720,10 @@ function flatRest$1(func) {
720
720
 
721
721
  var _flatRest = flatRest$1;
722
722
 
723
- var arrayMap = _baseGet._arrayMap,
723
+ var arrayMap = _getAllKeys._arrayMap,
724
724
  baseClone = _baseClone,
725
725
  baseUnset = _baseUnset,
726
- castPath = _baseGet._castPath,
726
+ castPath = _getAllKeys._castPath,
727
727
  copyObject = keysIn$3._copyObject,
728
728
  customOmitClone = _customOmitClone,
729
729
  flatRest = _flatRest,
package/dist/omit-es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
2
- import { k as keys_1, c as _getSymbols, _ as _arrayPush, s as stubArray_1, d as _baseGetAllKeys, e as _getAllKeys, b as _baseGet, f as _castPath, g as _toKey, a as _arrayMap } from './_baseGet-es.js';
2
+ import { k as keys_1, c as _getSymbols, _ as _arrayPush, s as stubArray_1, d as _baseGetAllKeys, e as _getAllKeys, b as _baseGet, f as _castPath, g as _toKey, a as _arrayMap } from './_getAllKeys-es.js';
3
3
  import { c as _Stack } from './identity-es.js';
4
4
  import { _ as _copyObject, k as keysIn_1, e as _getPrototype, f as _cloneArrayBuffer, b as _cloneTypedArray, a as _cloneBufferExports, c as _copyArray, d as _initCloneObject, g as _assignValue, i as isPlainObject_1 } from './keysIn-es.js';
5
5
  import { a as _getTag } from './_getTag-es.js';
@@ -0,0 +1,17 @@
1
+ type DataAttributes = Partial<Record<`data-${string}`, unknown>>;
2
+ /**
3
+ * Filters and returns all data-* attributes from props.
4
+ * This allows components to accept standard HTML data attributes
5
+ * in their natural hyphenated syntax (e.g., data-test-id, data-loading).
6
+ *
7
+ * @param props - The component props object
8
+ * @returns An object containing only the data-* attributes
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * const dataAttrs = filterDataAttributes(props);
13
+ * return <input {...dataAttrs} />;
14
+ * ```
15
+ */
16
+ export declare function filterDataAttributes<T extends object>(props: T): DataAttributes;
17
+ export {};
@@ -1,3 +1,8 @@
1
+ import type { AriaAttributes, ReactNode } from "react";
2
+ import type React from "react";
3
+ import type { XOR } from "ts-xor";
4
+ import type { Clearable } from "@jobber/hooks";
5
+ import type { IconNames } from "../Icon";
1
6
  export interface CommonAtlantisProps {
2
7
  /** Standard HTML data attributes. Accepts anything in a {{"data-key":"value"}} format. */
3
8
  dataAttributes?: {
@@ -10,8 +15,234 @@ export interface CommonAtlantisProps {
10
15
  /** Standard HTML id attribute. */
11
16
  id?: string;
12
17
  }
18
+ /**
19
+ * Core ARIA attributes for input elements.
20
+ * Uses hyphenated naming to match HTML standard syntax.
21
+ * Based on React's canonical ARIA type definitions.
22
+ */
23
+ export interface AriaInputProps {
24
+ /**
25
+ * Defines a string value that labels the current element.
26
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-label}
27
+ */
28
+ readonly "aria-label"?: AriaAttributes["aria-label"];
29
+ /**
30
+ * Identifies the element (or elements) that labels the current element.
31
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-labelledby}
32
+ */
33
+ readonly "aria-labelledby"?: AriaAttributes["aria-labelledby"];
34
+ /**
35
+ * Identifies the element (or elements) that describes the object.
36
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-describedby}
37
+ */
38
+ readonly "aria-describedby"?: AriaAttributes["aria-describedby"];
39
+ /**
40
+ * Identifies the element (or elements) that provide a detailed, extended description.
41
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-details}
42
+ */
43
+ readonly "aria-details"?: AriaAttributes["aria-details"];
44
+ /**
45
+ * ID of the currently active descendant element.
46
+ * Used for composite widgets like combobox or listbox.
47
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-activedescendant}
48
+ */
49
+ readonly "aria-activedescendant"?: AriaAttributes["aria-activedescendant"];
50
+ /**
51
+ * Indicates the element that controls the current element.
52
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-controls}
53
+ */
54
+ readonly "aria-controls"?: AriaAttributes["aria-controls"];
55
+ /**
56
+ * Indicates whether the element is expanded or collapsed.
57
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-expanded}
58
+ */
59
+ readonly "aria-expanded"?: AriaAttributes["aria-expanded"];
60
+ /**
61
+ * Indicates the type of autocomplete interaction.
62
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-autocomplete}
63
+ */
64
+ readonly "aria-autocomplete"?: AriaAttributes["aria-autocomplete"];
65
+ /**
66
+ * Indicates that user input is required before form submission.
67
+ * @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-required}
68
+ */
69
+ readonly "aria-required"?: AriaAttributes["aria-required"];
70
+ }
71
+ /**
72
+ * Focus event handlers for input elements.
73
+ * Generic interface that can be specialized for different element types.
74
+ */
75
+ export interface FocusEvents<Target = HTMLElement> {
76
+ /**
77
+ * Focus event handler.
78
+ */
79
+ readonly onFocus?: (event: React.FocusEvent<Target>) => void;
80
+ /**
81
+ * Blur event handler.
82
+ */
83
+ readonly onBlur?: (event: React.FocusEvent<Target>) => void;
84
+ }
85
+ /**
86
+ * Mouse event handlers for input elements.
87
+ * Generic interface that can be specialized for different element types.
88
+ */
89
+ export interface MouseEvents<Target = HTMLElement> {
90
+ /**
91
+ * Mouse down event handler.
92
+ */
93
+ readonly onMouseDown?: (event: React.MouseEvent<Target>) => void;
94
+ /**
95
+ * Mouse up event handler.
96
+ */
97
+ readonly onMouseUp?: (event: React.MouseEvent<Target>) => void;
98
+ /**
99
+ * Pointer down event handler.
100
+ */
101
+ readonly onPointerDown?: (event: React.PointerEvent<Target>) => void;
102
+ /**
103
+ * Pointer up event handler.
104
+ */
105
+ readonly onPointerUp?: (event: React.PointerEvent<Target>) => void;
106
+ /**
107
+ * Click event handler.
108
+ */
109
+ readonly onClick?: (event: React.MouseEvent<Target>) => void;
110
+ }
111
+ /**
112
+ * Keyboard event handlers for input elements.
113
+ * Generic interface that can be specialized for different element types.
114
+ */
115
+ export interface KeyboardEvents<Target = HTMLElement> {
116
+ /**
117
+ * Key down event handler.
118
+ */
119
+ readonly onKeyDown?: (event: React.KeyboardEvent<Target>) => void;
120
+ /**
121
+ * Key up event handler.
122
+ */
123
+ readonly onKeyUp?: (event: React.KeyboardEvent<Target>) => void;
124
+ }
125
+ /**
126
+ * Curated set of HTML input attributes for rebuilt input components.
127
+ * This provides a whitelist of standard HTML/React props we want to support,
128
+ * avoiding the issues of extending React.InputHTMLAttributes directly.
129
+ * Note: Event handlers and ARIA attributes are separate - use FocusEvents, KeyboardEvents, and AriaInputProps.
130
+ */
131
+ export interface HTMLInputBaseProps extends AriaInputProps {
132
+ /**
133
+ * The unique identifier for the input element.
134
+ */
135
+ readonly id?: string;
136
+ /**
137
+ * The name attribute for the input element.
138
+ */
139
+ readonly name?: string;
140
+ /**
141
+ * Whether the input is disabled.
142
+ */
143
+ readonly disabled?: boolean;
144
+ /**
145
+ * Whether the input is read-only (HTML standard casing).
146
+ */
147
+ readonly readOnly?: boolean;
148
+ /**
149
+ * Whether the input should be auto-focused (React casing).
150
+ */
151
+ readonly autoFocus?: boolean;
152
+ /**
153
+ * Autocomplete behavior for the input (React casing, string values only).
154
+ * Use standard HTML autocomplete values or "on"/"off".
155
+ */
156
+ readonly autoComplete?: string;
157
+ /**
158
+ * Validation pattern (regex) for the input.
159
+ */
160
+ readonly pattern?: string;
161
+ /**
162
+ * Input mode hint for virtual keyboards.
163
+ */
164
+ readonly inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
165
+ /**
166
+ * Role attribute for accessibility.
167
+ */
168
+ readonly role?: string;
169
+ /**
170
+ * Tab index for keyboard navigation.
171
+ */
172
+ readonly tabIndex?: number;
173
+ }
174
+ export interface Affix {
175
+ readonly label?: string;
176
+ readonly icon?: IconNames;
177
+ }
178
+ interface BaseSuffix extends Affix {
179
+ readonly icon: IconNames;
180
+ onClick?(): void;
181
+ }
182
+ export interface Suffix extends BaseSuffix {
183
+ onClick(): void;
184
+ readonly ariaLabel: string;
185
+ }
186
+ /**
187
+ * Common props shared across all rebuilt input components.
188
+ * These are Atlantis-specific features not part of standard HTML inputs.
189
+ */
190
+ export interface RebuiltInputCommonProps {
191
+ /**
192
+ * Text that appears inside the input when empty and floats above the value
193
+ * as a mini label once the user enters a value.
194
+ * When showMiniLabel is false, this text only serves as a standard placeholder and
195
+ * disappears when the user types.
196
+ */
197
+ readonly placeholder?: string;
198
+ /**
199
+ * Error message to display. This also highlights the field red.
200
+ */
201
+ readonly error?: string;
202
+ /**
203
+ * Highlights the field red to indicate an error.
204
+ */
205
+ readonly invalid?: boolean;
206
+ /**
207
+ * Show a spinner to indicate loading.
208
+ */
209
+ readonly loading?: boolean;
210
+ /**
211
+ * Add a clear action on the input that clears the value.
212
+ */
213
+ readonly clearable?: Clearable;
214
+ /**
215
+ * Adjusts the interface to either have small or large spacing.
216
+ */
217
+ readonly size?: "small" | "large";
218
+ /**
219
+ * Adjusts the form field to go inline with content.
220
+ */
221
+ readonly inline?: boolean;
222
+ /**
223
+ * Determines the alignment of the text inside the input.
224
+ */
225
+ readonly align?: "center" | "right";
226
+ /**
227
+ * Adds a prefix label and icon to the field.
228
+ */
229
+ readonly prefix?: Affix;
230
+ /**
231
+ * Adds a suffix label and icon with an optional action to the field.
232
+ */
233
+ readonly suffix?: XOR<Affix, Suffix>;
234
+ /**
235
+ * Further description of the input, can be used for a hint.
236
+ */
237
+ readonly description?: ReactNode;
238
+ /**
239
+ * Version 2 is highly experimental. Avoid using it unless you have talked with Atlantis first.
240
+ */
241
+ readonly version: 2;
242
+ }
13
243
  /** Represents a day of the week as a number where 0 = Sunday, 1 = Monday, etc. */
14
244
  export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
15
245
  export type CommonAllowedElements = "section" | "p" | "article" | "ul" | "li" | "div" | "span" | "dl" | "dd" | "dt";
16
246
  export type Spaces = "none" | "minuscule" | "slim" | "smallest" | "smaller" | "small" | "base" | "large" | "larger" | "largest" | "extravagant";
17
247
  export type GapSpacing = Spaces | (string & NonNullable<unknown>);
248
+ export {};
@@ -84,8 +84,8 @@ function showToast(props) {
84
84
  }
85
85
  const ToastContainer = React.forwardRef(ToastInternal);
86
86
  function ToasterOven(props) {
87
- const toastRef = React.useRef();
88
- React.useEffect(() => toastRef.current.add(props));
87
+ const toastRef = React.useRef(null);
88
+ React.useEffect(() => { var _a; return (_a = toastRef.current) === null || _a === void 0 ? void 0 : _a.add(props); });
89
89
  return React.createElement(ToastContainer, { ref: toastRef });
90
90
  }
91
91
  function ToastInternal(_, ref) {
@@ -82,8 +82,8 @@ function showToast(props) {
82
82
  }
83
83
  const ToastContainer = forwardRef(ToastInternal);
84
84
  function ToasterOven(props) {
85
- const toastRef = useRef();
86
- useEffect(() => toastRef.current.add(props));
85
+ const toastRef = useRef(null);
86
+ useEffect(() => { var _a; return (_a = toastRef.current) === null || _a === void 0 ? void 0 : _a.add(props); });
87
87
  return React__default.createElement(ToastContainer, { ref: toastRef });
88
88
  }
89
89
  function ToastInternal(_, ref) {