@jobber/components 6.85.2 → 6.85.3-CLEANUPre-6d043f4.28

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 (277) hide show
  1. package/dist/AtlantisThemeContext/AtlantisThemeContext.d.ts +1 -1
  2. package/dist/AtlantisThemeContext/index.d.ts +1 -1
  3. package/dist/AtlantisThemeContext/types.d.ts +17 -0
  4. package/dist/AtlantisThemeContext-cjs.js +38 -12
  5. package/dist/AtlantisThemeContext-es.js +40 -14
  6. package/dist/Autocomplete/Autocomplete.d.ts +3 -3
  7. package/dist/Autocomplete/Autocomplete.rebuilt.d.ts +8 -0
  8. package/dist/Autocomplete/Autocomplete.types.d.ts +388 -4
  9. package/dist/Autocomplete/components/MenuList.d.ts +37 -0
  10. package/dist/Autocomplete/components/PersistentRegion.d.ts +18 -0
  11. package/dist/Autocomplete/hooks/useAutocompleteListNav.d.ts +22 -0
  12. package/dist/Autocomplete/index.cjs +1335 -37
  13. package/dist/Autocomplete/index.d.ts +32 -2
  14. package/dist/Autocomplete/index.mjs +1326 -21
  15. package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +38 -0
  16. package/dist/Autocomplete/useAutocomplete.d.ts +66 -0
  17. package/dist/Autocomplete/utils/menuModel.d.ts +14 -0
  18. package/dist/Banner/index.cjs +1 -6
  19. package/dist/Banner/index.mjs +1 -6
  20. package/dist/Banner-cjs.js +2 -2
  21. package/dist/Banner-es.js +2 -2
  22. package/dist/Button-cjs.js +2 -2
  23. package/dist/Button-es.js +2 -2
  24. package/dist/Card/CardClickable.d.ts +3 -1
  25. package/dist/Card/CardHeader.d.ts +1 -1
  26. package/dist/Card/index.cjs +2 -4
  27. package/dist/Card/index.mjs +2 -4
  28. package/dist/Card/types.d.ts +19 -1
  29. package/dist/Card-cjs.js +14 -13
  30. package/dist/Card-es.js +14 -13
  31. package/dist/Chip/index.cjs +2 -3
  32. package/dist/Chip/index.mjs +2 -3
  33. package/dist/Chip-cjs.js +3 -3
  34. package/dist/Chip-es.js +3 -3
  35. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -0
  36. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -0
  37. package/dist/Chips/InternalChipDismissible/index.cjs +2 -3
  38. package/dist/Chips/InternalChipDismissible/index.mjs +2 -3
  39. package/dist/Chips/index.cjs +2 -3
  40. package/dist/Chips/index.mjs +2 -3
  41. package/dist/Combobox/Combobox.types.d.ts +3 -1
  42. package/dist/Combobox/components/ComboboxActivator/index.cjs +2 -3
  43. package/dist/Combobox/components/ComboboxActivator/index.mjs +2 -3
  44. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.cjs +1 -1
  45. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.mjs +1 -1
  46. package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.cjs +1 -1
  47. package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.mjs +1 -1
  48. package/dist/Combobox/components/ComboboxContent/index.cjs +2 -3
  49. package/dist/Combobox/components/ComboboxContent/index.mjs +2 -3
  50. package/dist/Combobox/components/ComboboxTrigger/index.cjs +2 -3
  51. package/dist/Combobox/components/ComboboxTrigger/index.mjs +2 -3
  52. package/dist/Combobox/index.cjs +2 -6
  53. package/dist/Combobox/index.mjs +2 -6
  54. package/dist/Combobox-cjs.js +2 -2
  55. package/dist/Combobox-es.js +2 -2
  56. package/dist/ComboboxAction-cjs.js +5 -3
  57. package/dist/ComboboxAction-es.js +5 -3
  58. package/dist/ComboboxContent-cjs.js +3 -4
  59. package/dist/ComboboxContent-es.js +4 -5
  60. package/dist/ComboboxLoadMore-cjs.js +2 -2
  61. package/dist/ComboboxLoadMore-es.js +2 -2
  62. package/dist/ComboboxOption-cjs.js +1 -1
  63. package/dist/ComboboxOption-es.js +1 -1
  64. package/dist/ConfirmationModal/index.cjs +2 -4
  65. package/dist/ConfirmationModal/index.mjs +2 -4
  66. package/dist/ConfirmationModal-cjs.js +2 -2
  67. package/dist/ConfirmationModal-es.js +2 -2
  68. package/dist/ContentBlock/index.cjs +1 -6
  69. package/dist/ContentBlock/index.mjs +1 -6
  70. package/dist/ContentBlock-cjs.js +2 -2
  71. package/dist/ContentBlock-es.js +2 -2
  72. package/dist/Countdown-cjs.js +0 -1
  73. package/dist/Countdown-es.js +0 -1
  74. package/dist/DataDump/index.cjs +2 -4
  75. package/dist/DataDump/index.mjs +2 -4
  76. package/dist/DataList/components/DataListActions/index.cjs +2 -5
  77. package/dist/DataList/components/DataListActions/index.mjs +2 -5
  78. package/dist/DataList/components/DataListActionsMenu/index.cjs +1 -5
  79. package/dist/DataList/components/DataListActionsMenu/index.mjs +1 -5
  80. package/dist/DataList/components/DataListBulkActions/index.cjs +2 -5
  81. package/dist/DataList/components/DataListBulkActions/index.mjs +2 -5
  82. package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +2 -6
  83. package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +2 -6
  84. package/dist/DataList/components/DataListFilters/index.cjs +2 -7
  85. package/dist/DataList/components/DataListFilters/index.mjs +2 -7
  86. package/dist/DataList/components/DataListHeader/DataListHeaderCheckbox.d.ts +1 -2
  87. package/dist/DataList/components/DataListHeader/index.cjs +2 -5
  88. package/dist/DataList/components/DataListHeader/index.mjs +2 -5
  89. package/dist/DataList/components/DataListHeaderTile/components/index.cjs +1 -2
  90. package/dist/DataList/components/DataListHeaderTile/components/index.mjs +1 -2
  91. package/dist/DataList/components/DataListHeaderTile/index.cjs +1 -3
  92. package/dist/DataList/components/DataListHeaderTile/index.mjs +1 -3
  93. package/dist/DataList/components/DataListItem/index.cjs +2 -5
  94. package/dist/DataList/components/DataListItem/index.mjs +2 -5
  95. package/dist/DataList/components/DataListItemActions/index.cjs +2 -5
  96. package/dist/DataList/components/DataListItemActions/index.mjs +2 -5
  97. package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +2 -5
  98. package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +2 -5
  99. package/dist/DataList/components/DataListItems/index.cjs +2 -5
  100. package/dist/DataList/components/DataListItems/index.mjs +2 -5
  101. package/dist/DataList/components/DataListLayout/index.cjs +2 -5
  102. package/dist/DataList/components/DataListLayout/index.mjs +2 -5
  103. package/dist/DataList/components/DataListLayoutActions/index.cjs +2 -5
  104. package/dist/DataList/components/DataListLayoutActions/index.mjs +2 -5
  105. package/dist/DataList/components/DataListLoadMore/index.cjs +1 -1
  106. package/dist/DataList/components/DataListLoadMore/index.mjs +1 -1
  107. package/dist/DataList/components/DataListOverflowFade/index.cjs +1 -1
  108. package/dist/DataList/components/DataListOverflowFade/index.mjs +1 -1
  109. package/dist/DataList/components/DataListSearch/index.cjs +1 -2
  110. package/dist/DataList/components/DataListSearch/index.mjs +1 -2
  111. package/dist/DataList/components/DataListStatusBar/index.cjs +1 -3
  112. package/dist/DataList/components/DataListStatusBar/index.mjs +1 -3
  113. package/dist/DataList/index.cjs +2 -7
  114. package/dist/DataList/index.mjs +2 -7
  115. package/dist/DataListActionsMenu-cjs.js +5 -8
  116. package/dist/DataListActionsMenu-es.js +5 -8
  117. package/dist/DataListHeaderTile-cjs.js +2 -2
  118. package/dist/DataListHeaderTile-es.js +2 -2
  119. package/dist/DataListItem-cjs.js +2 -0
  120. package/dist/DataListItem-es.js +2 -0
  121. package/dist/DataListLoadMore-cjs.js +2 -2
  122. package/dist/DataListLoadMore-es.js +2 -2
  123. package/dist/DataListOverflowFade-cjs.js +3 -3
  124. package/dist/DataListOverflowFade-es.js +3 -3
  125. package/dist/DataListSearch-cjs.js +2 -2
  126. package/dist/DataListSearch-es.js +2 -2
  127. package/dist/DataListSortingOptions-cjs.js +3 -4
  128. package/dist/DataListSortingOptions-es.js +3 -4
  129. package/dist/DataTable/index.cjs +4 -6
  130. package/dist/DataTable/index.mjs +4 -6
  131. package/dist/DataTable/test-utilities/index.cjs +1 -7
  132. package/dist/DataTable/test-utilities/index.mjs +1 -7
  133. package/dist/DataTable-cjs.js +4 -4
  134. package/dist/DataTable-es.js +4 -4
  135. package/dist/DataTableTable-cjs.js +8 -8
  136. package/dist/DataTableTable-es.js +8 -8
  137. package/dist/DatePicker/DatePickerActivator.d.ts +2 -4
  138. package/dist/DatePicker/index.cjs +5 -3
  139. package/dist/DatePicker/index.mjs +5 -3
  140. package/dist/DatePicker-cjs.js +11478 -8531
  141. package/dist/DatePicker-es.js +11483 -8517
  142. package/dist/Disclosure/index.cjs +1 -6
  143. package/dist/Disclosure/index.mjs +1 -6
  144. package/dist/Disclosure-cjs.js +3 -3
  145. package/dist/Disclosure-es.js +3 -3
  146. package/dist/FeatureSwitch/index.cjs +1 -1
  147. package/dist/FeatureSwitch/index.mjs +1 -1
  148. package/dist/FormField/FormFieldWrapper.d.ts +1 -1
  149. package/dist/FormField/hooks/useAtlantisReactHookForm.d.ts +1 -0
  150. package/dist/FormField/index.cjs +1 -0
  151. package/dist/FormField/index.mjs +1 -0
  152. package/dist/FormField-cjs.js +2 -21
  153. package/dist/FormField-es.js +2 -21
  154. package/dist/FormatFile/index.cjs +2 -4
  155. package/dist/FormatFile/index.mjs +2 -4
  156. package/dist/Gallery/index.cjs +2 -7
  157. package/dist/Gallery/index.mjs +2 -7
  158. package/dist/Heading/Heading.d.ts +7 -1
  159. package/dist/Heading-cjs.js +2 -2
  160. package/dist/Heading-es.js +2 -2
  161. package/dist/InlineLabel/InlineLabel.d.ts +1 -1
  162. package/dist/InlineLabel-cjs.js +2 -1
  163. package/dist/InlineLabel-es.js +2 -1
  164. package/dist/InputDate/InputDate.types.d.ts +0 -12
  165. package/dist/InputDate/index.cjs +9 -30
  166. package/dist/InputDate/index.mjs +9 -30
  167. package/dist/InputEmail/index.cjs +1 -0
  168. package/dist/InputEmail/index.mjs +1 -0
  169. package/dist/InputFile/InputFile.d.ts +5 -1
  170. package/dist/InputFile-cjs.js +2 -2
  171. package/dist/InputFile-es.js +2 -2
  172. package/dist/InputNumber/index.cjs +3698 -2959
  173. package/dist/InputNumber/index.mjs +3698 -2959
  174. package/dist/InputPassword/index.cjs +1 -0
  175. package/dist/InputPassword/index.mjs +1 -0
  176. package/dist/InputPassword-cjs.js +1 -0
  177. package/dist/InputPassword-es.js +1 -0
  178. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +1 -1
  179. package/dist/InputPhoneNumber/index.cjs +1 -0
  180. package/dist/InputPhoneNumber/index.mjs +1 -0
  181. package/dist/InputText/InputText.d.ts +2 -2
  182. package/dist/InputText/index.cjs +3 -3
  183. package/dist/InputText/index.mjs +3 -3
  184. package/dist/InputText/useInputTextFormField.d.ts +6 -6
  185. package/dist/InputTime/index.cjs +1 -0
  186. package/dist/InputTime/index.mjs +2 -1
  187. package/dist/InternalChipDismissible-cjs.js +1 -0
  188. package/dist/InternalChipDismissible-es.js +1 -0
  189. package/dist/LightBox/index.cjs +1 -6
  190. package/dist/LightBox/index.mjs +1 -6
  191. package/dist/LightBox-cjs.js +12 -74
  192. package/dist/LightBox-es.js +12 -74
  193. package/dist/List/index.cjs +1 -1
  194. package/dist/List/index.mjs +1 -1
  195. package/dist/Markdown/index.cjs +1 -1
  196. package/dist/Markdown/index.mjs +1 -1
  197. package/dist/Markdown-cjs.js +20540 -18350
  198. package/dist/Markdown-es.js +20541 -18351
  199. package/dist/Menu/index.cjs +2 -4
  200. package/dist/Menu/index.mjs +2 -4
  201. package/dist/Menu-cjs.js +5 -37
  202. package/dist/Menu-es.js +6 -38
  203. package/dist/Modal/Modal.rebuilt.d.ts +1 -1
  204. package/dist/Modal/index.cjs +25 -22
  205. package/dist/Modal/index.mjs +26 -23
  206. package/dist/Page/index.cjs +3 -11
  207. package/dist/Page/index.mjs +3 -11
  208. package/dist/Page-cjs.js +5 -5
  209. package/dist/Page-es.js +5 -5
  210. package/dist/Popover/index.cjs +2 -1
  211. package/dist/Popover/index.mjs +2 -1
  212. package/dist/Popover/usePopover.d.ts +1 -1
  213. package/dist/Popover-cjs.js +2 -2
  214. package/dist/Popover-es.js +3 -3
  215. package/dist/RecurringSelect/index.cjs +2 -0
  216. package/dist/RecurringSelect/index.mjs +2 -0
  217. package/dist/Select/index.cjs +1 -0
  218. package/dist/Select/index.mjs +1 -0
  219. package/dist/SideDrawer/index.cjs +1 -5
  220. package/dist/SideDrawer/index.mjs +1 -5
  221. package/dist/SideDrawer-cjs.js +7 -10
  222. package/dist/SideDrawer-es.js +7 -10
  223. package/dist/Tabs/index.cjs +0 -1
  224. package/dist/Tabs/index.mjs +0 -1
  225. package/dist/Tabs-cjs.js +76 -2
  226. package/dist/Tabs-es.js +76 -2
  227. package/dist/Tooltip/index.cjs +2 -2
  228. package/dist/Tooltip/index.mjs +2 -2
  229. package/dist/Tooltip/useTooltipPositioning.d.ts +1 -1
  230. package/dist/Tooltip-cjs.js +3 -4
  231. package/dist/Tooltip-es.js +4 -5
  232. package/dist/_baseEach-es.js +1 -1
  233. package/dist/_commonjsHelpers-cjs.js +0 -26
  234. package/dist/_commonjsHelpers-es.js +1 -26
  235. package/dist/_isIterateeCall-es.js +1 -1
  236. package/dist/clsx-cjs.js +5 -0
  237. package/dist/clsx-es.js +3 -0
  238. package/dist/debounce-es.js +2 -2
  239. package/dist/floating-ui.react-cjs.js +2106 -2225
  240. package/dist/floating-ui.react-es.js +2105 -2226
  241. package/dist/helpers-cjs.js +21 -2
  242. package/dist/helpers-es.js +1 -1
  243. package/dist/index.cjs +15 -21
  244. package/dist/index.mjs +11 -17
  245. package/dist/isObjectLike-es.js +1 -1
  246. package/dist/isSymbol-es.js +1 -1
  247. package/dist/isTypedArray-es.js +1 -1
  248. package/dist/keysIn-es.js +1 -1
  249. package/dist/omit-es.js +1 -1
  250. package/dist/styles.css +719 -509
  251. package/dist/tslib.es6-cjs.js +3 -3
  252. package/dist/tslib.es6-es.js +3 -3
  253. package/dist/useScrollToActive-cjs.js +3 -45
  254. package/dist/useScrollToActive-es.js +5 -47
  255. package/dist/utils/mockLargeViewport.d.ts +33 -0
  256. package/package.json +13 -19
  257. package/rollup.config.mjs +1 -15
  258. package/dist/Autocomplete-cjs.js +0 -357
  259. package/dist/Autocomplete-es.js +0 -344
  260. package/dist/throttle-cjs.js +0 -80
  261. package/dist/throttle-es.js +0 -77
  262. package/dist/useDebounce-cjs.js +0 -4415
  263. package/dist/useDebounce-es.js +0 -4413
  264. package/dist/useFocusTrap-cjs.js +0 -75
  265. package/dist/useFocusTrap-es.js +0 -73
  266. package/dist/useInView-cjs.js +0 -26
  267. package/dist/useInView-es.js +0 -24
  268. package/dist/useIsMounted-cjs.js +0 -51
  269. package/dist/useIsMounted-es.js +0 -49
  270. package/dist/useOnKeyDown-cjs.js +0 -41
  271. package/dist/useOnKeyDown-es.js +0 -39
  272. package/dist/useRefocusOnActivator-cjs.js +0 -33
  273. package/dist/useRefocusOnActivator-es.js +0 -31
  274. package/dist/useResizeObserver-cjs.js +0 -1131
  275. package/dist/useResizeObserver-es.js +0 -1128
  276. package/dist/useSafeLayoutEffect-cjs.js +0 -14
  277. package/dist/useSafeLayoutEffect-es.js +0 -12
@@ -3,12 +3,7 @@
3
3
  var Disclosure = require('../Disclosure-cjs.js');
4
4
  require('react');
5
5
  require('classnames');
6
- require('../useResizeObserver-cjs.js');
7
- require('../_commonjsHelpers-cjs.js');
8
- require('../throttle-cjs.js');
9
- require('../debounce-cjs.js');
10
- require('../isObjectLike-cjs.js');
11
- require('../isSymbol-cjs.js');
6
+ require('@jobber/hooks');
12
7
  require('../Icon-cjs.js');
13
8
  require('@jobber/design');
14
9
  require('../Typography-cjs.js');
@@ -1,12 +1,7 @@
1
1
  export { D as Disclosure } from '../Disclosure-es.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '../useResizeObserver-es.js';
5
- import '../_commonjsHelpers-es.js';
6
- import '../throttle-es.js';
7
- import '../debounce-es.js';
8
- import '../isObjectLike-es.js';
9
- import '../isSymbol-es.js';
4
+ import '@jobber/hooks';
10
5
  import '../Icon-es.js';
11
6
  import '@jobber/design';
12
7
  import '../Typography-es.js';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var React = require('react');
4
4
  var classnames = require('classnames');
5
- var useResizeObserver = require('./useResizeObserver-cjs.js');
5
+ var jobberHooks = require('@jobber/hooks');
6
6
  var Icon = require('./Icon-cjs.js');
7
7
  var Typography = require('./Typography-cjs.js');
8
8
 
@@ -12,8 +12,8 @@ function Disclosure({ children, title, defaultOpen = false, onToggle, open, UNSA
12
12
  var _a, _b, _c, _d;
13
13
  const [internalOpen, setInternalOpen] = React.useState(defaultOpen || open || false);
14
14
  const isOpen = open !== undefined ? open : internalOpen;
15
- const [titleRef, { exactWidth }] = useResizeObserver.useResizeObserver.useResizeObserver();
16
- const isBelowBreakpoint = exactWidth && exactWidth < useResizeObserver.useResizeObserver.Breakpoints.small;
15
+ const [titleRef, { exactWidth }] = jobberHooks.useResizeObserver();
16
+ const isBelowBreakpoint = exactWidth && exactWidth < jobberHooks.Breakpoints.small;
17
17
  const isTitleString = typeof title === "string";
18
18
  const containerClassNames = classnames(styles.details, UNSAFE_className.container);
19
19
  const summaryClassNames = classnames(styles.summary, UNSAFE_className.summary);
@@ -1,6 +1,6 @@
1
1
  import React__default, { useState } from 'react';
2
2
  import classnames from 'classnames';
3
- import { u as useResizeObserver } from './useResizeObserver-es.js';
3
+ import { useResizeObserver, Breakpoints } from '@jobber/hooks';
4
4
  import { I as Icon } from './Icon-es.js';
5
5
  import { T as Typography } from './Typography-es.js';
6
6
 
@@ -10,8 +10,8 @@ function Disclosure({ children, title, defaultOpen = false, onToggle, open, UNSA
10
10
  var _a, _b, _c, _d;
11
11
  const [internalOpen, setInternalOpen] = useState(defaultOpen || open || false);
12
12
  const isOpen = open !== undefined ? open : internalOpen;
13
- const [titleRef, { exactWidth }] = useResizeObserver.useResizeObserver();
14
- const isBelowBreakpoint = exactWidth && exactWidth < useResizeObserver.Breakpoints.small;
13
+ const [titleRef, { exactWidth }] = useResizeObserver();
14
+ const isBelowBreakpoint = exactWidth && exactWidth < Breakpoints.small;
15
15
  const isTitleString = typeof title === "string";
16
16
  const containerClassNames = classnames(styles.details, UNSAFE_className.container);
17
17
  const summaryClassNames = classnames(styles.summary, UNSAFE_className.summary);
@@ -16,7 +16,7 @@ require('../Icon-cjs.js');
16
16
  require('@jobber/design');
17
17
  require('../Emphasis-cjs.js');
18
18
  require('../Markdown-cjs.js');
19
- require('../index-cjs.js');
19
+ require('react/jsx-runtime');
20
20
  require('../_commonjsHelpers-cjs.js');
21
21
 
22
22
 
@@ -14,5 +14,5 @@ import '../Icon-es.js';
14
14
  import '@jobber/design';
15
15
  import '../Emphasis-es.js';
16
16
  import '../Markdown-es.js';
17
- import '../index-es.js';
17
+ import 'react/jsx-runtime';
18
18
  import '../_commonjsHelpers-es.js';
@@ -1,6 +1,6 @@
1
1
  import type { PropsWithChildren, ReactNode } from "react";
2
2
  import React from "react";
3
- import type { Clearable } from "@jobber/hooks/useShowClear";
3
+ import type { Clearable } from "@jobber/hooks";
4
4
  import type { FormFieldProps } from "./FormFieldTypes";
5
5
  export interface FormFieldWrapperProps extends FormFieldProps {
6
6
  readonly error: string;
@@ -9,6 +9,7 @@ export declare function useAtlantisReactHookForm({ actionsRef, name, defaultValu
9
9
  inputRefs: import("react").RefCallback<any>;
10
10
  useControllerField: {
11
11
  value: any;
12
+ disabled?: boolean;
12
13
  name: string;
13
14
  };
14
15
  setValue: import("react-hook-form").UseFormSetValue<import("react-hook-form").FieldValues>;
@@ -2,6 +2,7 @@
2
2
 
3
3
  var FormField = require('../FormField-cjs.js');
4
4
  require('react');
5
+ require('@jobber/hooks');
5
6
  require('framer-motion');
6
7
  require('@jobber/design');
7
8
  require('classnames');
@@ -1,5 +1,6 @@
1
1
  export { A as AffixIcon, i as AffixLabel, k as FormField, F as FormFieldInputHorizontalWrapper, d as FormFieldInputWrapperStyles, e as FormFieldLabel, f as FormFieldWrapper, g as FormFieldWrapperMain, h as FormFieldWrapperToolbar, u as useAtlantisFormField, a as useAtlantisFormFieldActions, b as useAtlantisFormFieldName, c as useAtlantisReactHookForm, j as useFormFieldWrapperStyles } from '../FormField-es.js';
2
2
  import 'react';
3
+ import '@jobber/hooks';
3
4
  import 'framer-motion';
4
5
  import '@jobber/design';
5
6
  import 'classnames';
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var jobberHooks = require('@jobber/hooks');
4
5
  var framerMotion = require('framer-motion');
5
6
  var design = require('@jobber/design');
6
7
  var classnames = require('classnames');
@@ -13,26 +14,6 @@ var Spinner = require('./Spinner-cjs.js');
13
14
  var tslib_es6 = require('./tslib.es6-cjs.js');
14
15
  var reactHookForm = require('react-hook-form');
15
16
 
16
- var useShowClear$1 = {};
17
-
18
- Object.defineProperty(useShowClear$1, "__esModule", { value: true });
19
- var useShowClear_2 = useShowClear$1.useShowClear = useShowClear;
20
- function useShowClear({ clearable, multiline, focused, hasValue, readonly, disabled = false, }) {
21
- if (multiline && clearable !== "never") {
22
- throw new Error("Multiline inputs can not be clearable");
23
- }
24
- // Do not show if there is no value
25
- if (!hasValue || clearable === "never" || disabled || readonly) {
26
- return false;
27
- }
28
- switch (clearable) {
29
- case "while-editing":
30
- return focused;
31
- case "always":
32
- return true;
33
- }
34
- }
35
-
36
17
  var styles$1 = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","disabled":"Tz9LK9ABKMk-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","small":"Sw5O4I0lMJg-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","emptyPhoneNumber":"MVhuQuzUBUs-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
37
18
 
38
19
  /**
@@ -188,7 +169,7 @@ function FormFieldWrapper({ align, description, descriptionIdentifier, placehold
188
169
  showMiniLabel,
189
170
  });
190
171
  const { focused } = useFormFieldFocus.useFormFieldFocus({ wrapperRef });
191
- const showClear = useShowClear_2({
172
+ const showClear = jobberHooks.useShowClear({
192
173
  clearable,
193
174
  multiline: type === "textarea",
194
175
  focused,
@@ -1,4 +1,5 @@
1
1
  import React__default, { useState, useEffect, useRef, useImperativeHandle, useId } from 'react';
2
+ import { useShowClear } from '@jobber/hooks';
2
3
  import { AnimatePresence, motion } from 'framer-motion';
3
4
  import { tokens } from '@jobber/design';
4
5
  import classnames from 'classnames';
@@ -11,26 +12,6 @@ import { S as Spinner } from './Spinner-es.js';
11
12
  import { _ as __rest } from './tslib.es6-es.js';
12
13
  import { useFormContext, useForm, useController } from 'react-hook-form';
13
14
 
14
- var useShowClear$1 = {};
15
-
16
- Object.defineProperty(useShowClear$1, "__esModule", { value: true });
17
- var useShowClear_2 = useShowClear$1.useShowClear = useShowClear;
18
- function useShowClear({ clearable, multiline, focused, hasValue, readonly, disabled = false, }) {
19
- if (multiline && clearable !== "never") {
20
- throw new Error("Multiline inputs can not be clearable");
21
- }
22
- // Do not show if there is no value
23
- if (!hasValue || clearable === "never" || disabled || readonly) {
24
- return false;
25
- }
26
- switch (clearable) {
27
- case "while-editing":
28
- return focused;
29
- case "always":
30
- return true;
31
- }
32
- }
33
-
34
15
  var styles$1 = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","disabled":"Tz9LK9ABKMk-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","small":"Sw5O4I0lMJg-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","emptyPhoneNumber":"MVhuQuzUBUs-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
35
16
 
36
17
  /**
@@ -186,7 +167,7 @@ function FormFieldWrapper({ align, description, descriptionIdentifier, placehold
186
167
  showMiniLabel,
187
168
  });
188
169
  const { focused } = useFormFieldFocus({ wrapperRef });
189
- const showClear = useShowClear_2({
170
+ const showClear = useShowClear({
190
171
  clearable,
191
172
  multiline: type === "textarea",
192
173
  focused,
@@ -16,17 +16,16 @@ require('../ProgressBar-cjs.js');
16
16
  require('../Button-cjs.js');
17
17
  require('react-router-dom');
18
18
  require('../ConfirmationModal-cjs.js');
19
- require('../useOnKeyDown-cjs.js');
19
+ require('@jobber/hooks');
20
20
  require('../Modal/index.cjs');
21
21
  require('react-dom');
22
22
  require('framer-motion');
23
- require('../useRefocusOnActivator-cjs.js');
24
- require('../useFocusTrap-cjs.js');
25
23
  require('../Heading-cjs.js');
26
24
  require('../ButtonDismiss-cjs.js');
27
25
  require('../noop-cjs.js');
28
26
  require('../_commonjsHelpers-cjs.js');
29
27
  require('../floating-ui.react-cjs.js');
28
+ require('react/jsx-runtime');
30
29
  require('../identity-cjs.js');
31
30
  require('../isTypedArray-cjs.js');
32
31
  require('../isObjectLike-cjs.js');
@@ -39,7 +38,6 @@ require('../_isIterateeCall-cjs.js');
39
38
  require('../_setToString-cjs.js');
40
39
  require('../Markdown-cjs.js');
41
40
  require('../Emphasis-cjs.js');
42
- require('../index-cjs.js');
43
41
 
44
42
 
45
43
 
@@ -14,17 +14,16 @@ import '../ProgressBar-es.js';
14
14
  import '../Button-es.js';
15
15
  import 'react-router-dom';
16
16
  import '../ConfirmationModal-es.js';
17
- import '../useOnKeyDown-es.js';
17
+ import '@jobber/hooks';
18
18
  import '../Modal/index.mjs';
19
19
  import 'react-dom';
20
20
  import 'framer-motion';
21
- import '../useRefocusOnActivator-es.js';
22
- import '../useFocusTrap-es.js';
23
21
  import '../Heading-es.js';
24
22
  import '../ButtonDismiss-es.js';
25
23
  import '../noop-es.js';
26
24
  import '../_commonjsHelpers-es.js';
27
25
  import '../floating-ui.react-es.js';
26
+ import 'react/jsx-runtime';
28
27
  import '../identity-es.js';
29
28
  import '../isTypedArray-es.js';
30
29
  import '../isObjectLike-es.js';
@@ -37,4 +36,3 @@ import '../_isIterateeCall-es.js';
37
36
  import '../_setToString-es.js';
38
37
  import '../Markdown-es.js';
39
38
  import '../Emphasis-es.js';
40
- import '../index-es.js';
@@ -7,12 +7,7 @@ require('classnames');
7
7
  require('../LightBox-cjs.js');
8
8
  require('framer-motion');
9
9
  require('react-dom');
10
- require('../useRefocusOnActivator-cjs.js');
11
- require('../useOnKeyDown-cjs.js');
12
- require('../useFocusTrap-cjs.js');
13
- require('../useIsMounted-cjs.js');
14
- require('../useSafeLayoutEffect-cjs.js');
15
- require('../useDebounce-cjs.js');
10
+ require('@jobber/hooks');
16
11
  require('../ButtonDismiss-cjs.js');
17
12
  require('../Button-cjs.js');
18
13
  require('react-router-dom');
@@ -41,10 +36,10 @@ require('../ConfirmationModal-cjs.js');
41
36
  require('../Modal/index.cjs');
42
37
  require('../noop-cjs.js');
43
38
  require('../floating-ui.react-cjs.js');
39
+ require('react/jsx-runtime');
44
40
  require('../AtlantisPortalContent-cjs.js');
45
41
  require('../Markdown-cjs.js');
46
42
  require('../Emphasis-cjs.js');
47
- require('../index-cjs.js');
48
43
 
49
44
 
50
45
 
@@ -5,12 +5,7 @@ import 'classnames';
5
5
  import '../LightBox-es.js';
6
6
  import 'framer-motion';
7
7
  import 'react-dom';
8
- import '../useRefocusOnActivator-es.js';
9
- import '../useOnKeyDown-es.js';
10
- import '../useFocusTrap-es.js';
11
- import '../useIsMounted-es.js';
12
- import '../useSafeLayoutEffect-es.js';
13
- import '../useDebounce-es.js';
8
+ import '@jobber/hooks';
14
9
  import '../ButtonDismiss-es.js';
15
10
  import '../Button-es.js';
16
11
  import 'react-router-dom';
@@ -39,7 +34,7 @@ import '../ConfirmationModal-es.js';
39
34
  import '../Modal/index.mjs';
40
35
  import '../noop-es.js';
41
36
  import '../floating-ui.react-es.js';
37
+ import 'react/jsx-runtime';
42
38
  import '../AtlantisPortalContent-es.js';
43
39
  import '../Markdown-es.js';
44
40
  import '../Emphasis-es.js';
45
- import '../index-es.js';
@@ -3,6 +3,12 @@ import React from "react";
3
3
  import type { TypographyOptions, TypographyProps } from "../Typography";
4
4
  type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
5
5
  export interface HeadingProps {
6
+ /**
7
+ * Adds a unique identifier to the heading.
8
+ * Useful when the heading needs to be referenced by another element.
9
+ * Not intended for styling.
10
+ */
11
+ readonly id?: string;
6
12
  /**
7
13
  * @default 5
8
14
  */
@@ -31,5 +37,5 @@ export interface HeadingProps {
31
37
  readonly UNSAFE_style?: TypographyProps["UNSAFE_style"];
32
38
  }
33
39
  export type LevelMap = Record<HeadingLevel, TypographyOptions>;
34
- export declare function Heading({ level, children, element, maxLines, UNSAFE_className, UNSAFE_style, }: HeadingProps): React.JSX.Element;
40
+ export declare function Heading({ id, level, children, element, maxLines, UNSAFE_className, UNSAFE_style, }: HeadingProps): React.JSX.Element;
35
41
  export {};
@@ -3,7 +3,7 @@
3
3
  var React = require('react');
4
4
  var Typography = require('./Typography-cjs.js');
5
5
 
6
- function Heading({ level = 5, children, element, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
6
+ function Heading({ id, level = 5, children, element, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
7
7
  const levelMap = {
8
8
  1: {
9
9
  element: "h1",
@@ -51,7 +51,7 @@ function Heading({ level = 5, children, element, maxLines = "unlimited", UNSAFE_
51
51
  larger: 16,
52
52
  unlimited: undefined,
53
53
  };
54
- return (React.createElement(Typography.Typography, Object.assign({}, levelMap[level], { element: element || levelMap[level].element, numberOfLines: maxLineToNumber[maxLines], UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
54
+ return (React.createElement(Typography.Typography, Object.assign({ id: id }, levelMap[level], { element: element || levelMap[level].element, numberOfLines: maxLineToNumber[maxLines], UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
55
55
  }
56
56
 
57
57
  exports.Heading = Heading;
@@ -1,7 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import { T as Typography } from './Typography-es.js';
3
3
 
4
- function Heading({ level = 5, children, element, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
4
+ function Heading({ id, level = 5, children, element, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
5
5
  const levelMap = {
6
6
  1: {
7
7
  element: "h1",
@@ -49,7 +49,7 @@ function Heading({ level = 5, children, element, maxLines = "unlimited", UNSAFE_
49
49
  larger: 16,
50
50
  unlimited: undefined,
51
51
  };
52
- return (React__default.createElement(Typography, Object.assign({}, levelMap[level], { element: element || levelMap[level].element, numberOfLines: maxLineToNumber[maxLines], UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
52
+ return (React__default.createElement(Typography, Object.assign({ id: id }, levelMap[level], { element: element || levelMap[level].element, numberOfLines: maxLineToNumber[maxLines], UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
53
53
  }
54
54
 
55
55
  export { Heading as H };
@@ -6,7 +6,7 @@ interface InlineLabelProps {
6
6
  * The size of the label
7
7
  * @default base
8
8
  */
9
- readonly size?: "base" | "large" | "larger";
9
+ readonly size?: "small" | "base" | "large" | "larger";
10
10
  /**
11
11
  * The color of the label
12
12
  * @default "greyBlue"
@@ -4,11 +4,12 @@ var React = require('react');
4
4
  var classnames = require('classnames');
5
5
  var Typography = require('./Typography-cjs.js');
6
6
 
7
- var styles = {"inlineLabel":"M01SZy5EYFg-","base":"_0L5DuoQQ0N0-","large":"QKOUUH9-Fho-","larger":"GdJFaAMVrfU-","greyBlue":"_1KuDugNaT-o-","red":"bHju-S5Uytc-","orange":"hk1-OlPzFpM-","green":"ekQbbiBSxKk-","success":"YBvJuPW-YEI-","blue":"_5X5w6s0pPdw-","inactive":"lju-nyF9vX0-","navy":"nMlCD9k-Meg-","task":"HVMpHULM2PU-","yellow":"hOJmavXturw-","warning":"kfXKagw-wdE-","lime":"ZrdNg5b18oY-","purple":"df-Q7pKd2iI-","invoice":"WE3Qy5JUsN4-","pink":"-Wiy2k-i7tQ-","quote":"NoDP1qZvkds-","teal":"gc8t5abqWH4-","yellowGreen":"SeLhnnpqK70-","job":"L9FK1YwwCB8-","blueDark":"PZdC-xYFPok-","lightBlue":"_3JD9CXbxRQ8-","informative":"R-kgbH6qPZU-","indigo":"_6juDApQlcS0-","request":"MGcsvmjHlow-","spinning":"dre73387JG8-"};
7
+ var styles = {"inlineLabel":"M01SZy5EYFg-","small":"_8nqeeAapUQU-","base":"_0L5DuoQQ0N0-","large":"QKOUUH9-Fho-","larger":"GdJFaAMVrfU-","greyBlue":"_1KuDugNaT-o-","red":"bHju-S5Uytc-","orange":"hk1-OlPzFpM-","green":"ekQbbiBSxKk-","success":"YBvJuPW-YEI-","blue":"_5X5w6s0pPdw-","inactive":"lju-nyF9vX0-","navy":"nMlCD9k-Meg-","task":"HVMpHULM2PU-","yellow":"hOJmavXturw-","warning":"kfXKagw-wdE-","lime":"ZrdNg5b18oY-","purple":"df-Q7pKd2iI-","invoice":"WE3Qy5JUsN4-","pink":"-Wiy2k-i7tQ-","quote":"NoDP1qZvkds-","teal":"gc8t5abqWH4-","yellowGreen":"SeLhnnpqK70-","job":"L9FK1YwwCB8-","blueDark":"PZdC-xYFPok-","lightBlue":"_3JD9CXbxRQ8-","informative":"R-kgbH6qPZU-","indigo":"_6juDApQlcS0-","request":"MGcsvmjHlow-","spinning":"dre73387JG8-"};
8
8
 
9
9
  function InlineLabel({ size = "base", color = "greyBlue", children, }) {
10
10
  const className = classnames(styles.inlineLabel, styles[size], styles[color]);
11
11
  const sizeMapper = {
12
+ small: "smaller",
12
13
  base: "small",
13
14
  large: "large",
14
15
  larger: "large",
@@ -2,11 +2,12 @@ import React__default from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { T as Typography } from './Typography-es.js';
4
4
 
5
- var styles = {"inlineLabel":"M01SZy5EYFg-","base":"_0L5DuoQQ0N0-","large":"QKOUUH9-Fho-","larger":"GdJFaAMVrfU-","greyBlue":"_1KuDugNaT-o-","red":"bHju-S5Uytc-","orange":"hk1-OlPzFpM-","green":"ekQbbiBSxKk-","success":"YBvJuPW-YEI-","blue":"_5X5w6s0pPdw-","inactive":"lju-nyF9vX0-","navy":"nMlCD9k-Meg-","task":"HVMpHULM2PU-","yellow":"hOJmavXturw-","warning":"kfXKagw-wdE-","lime":"ZrdNg5b18oY-","purple":"df-Q7pKd2iI-","invoice":"WE3Qy5JUsN4-","pink":"-Wiy2k-i7tQ-","quote":"NoDP1qZvkds-","teal":"gc8t5abqWH4-","yellowGreen":"SeLhnnpqK70-","job":"L9FK1YwwCB8-","blueDark":"PZdC-xYFPok-","lightBlue":"_3JD9CXbxRQ8-","informative":"R-kgbH6qPZU-","indigo":"_6juDApQlcS0-","request":"MGcsvmjHlow-","spinning":"dre73387JG8-"};
5
+ var styles = {"inlineLabel":"M01SZy5EYFg-","small":"_8nqeeAapUQU-","base":"_0L5DuoQQ0N0-","large":"QKOUUH9-Fho-","larger":"GdJFaAMVrfU-","greyBlue":"_1KuDugNaT-o-","red":"bHju-S5Uytc-","orange":"hk1-OlPzFpM-","green":"ekQbbiBSxKk-","success":"YBvJuPW-YEI-","blue":"_5X5w6s0pPdw-","inactive":"lju-nyF9vX0-","navy":"nMlCD9k-Meg-","task":"HVMpHULM2PU-","yellow":"hOJmavXturw-","warning":"kfXKagw-wdE-","lime":"ZrdNg5b18oY-","purple":"df-Q7pKd2iI-","invoice":"WE3Qy5JUsN4-","pink":"-Wiy2k-i7tQ-","quote":"NoDP1qZvkds-","teal":"gc8t5abqWH4-","yellowGreen":"SeLhnnpqK70-","job":"L9FK1YwwCB8-","blueDark":"PZdC-xYFPok-","lightBlue":"_3JD9CXbxRQ8-","informative":"R-kgbH6qPZU-","indigo":"_6juDApQlcS0-","request":"MGcsvmjHlow-","spinning":"dre73387JG8-"};
6
6
 
7
7
  function InlineLabel({ size = "base", color = "greyBlue", children, }) {
8
8
  const className = classnames(styles.inlineLabel, styles[size], styles[color]);
9
9
  const sizeMapper = {
10
+ small: "smaller",
10
11
  base: "small",
11
12
  large: "large",
12
13
  larger: "large",
@@ -53,16 +53,4 @@ export interface InputDateProps extends Omit<CommonFormFieldProps, "clearable">,
53
53
  * Text to display instead of a date value
54
54
  */
55
55
  readonly emptyValueLabel?: string;
56
- /**
57
- * Experimental:
58
- * Whether to replace empty/invalid values with the original value on blur.
59
- *
60
- * This solves an immediate UX problem and is likely to change in the future.
61
- * It prevents the input from retaining empty/invalid values when the user tabs
62
- * into it, clears the value, and tabs away. In this scenario, the original
63
- * value will be restored.
64
- *
65
- * @default false
66
- */
67
- readonly restoreLastValueOnBlur?: boolean;
68
56
  }
@@ -2,14 +2,15 @@
2
2
 
3
3
  var React = require('react');
4
4
  var omit = require('../omit-cjs.js');
5
- var DatePicker = require('../DatePicker-cjs.js');
6
5
  var FormField = require('../FormField-cjs.js');
7
6
  require('classnames');
8
7
  require('../tslib.es6-cjs.js');
9
8
  require('react-hook-form');
9
+ require('@jobber/hooks');
10
10
  require('framer-motion');
11
11
  require('@jobber/design');
12
12
  require('../Button-cjs.js');
13
+ var DatePicker = require('../DatePicker-cjs.js');
13
14
  var InputText_index = require('../InputText/index.cjs');
14
15
  require('../_commonjsHelpers-cjs.js');
15
16
  require('../_baseGet-cjs.js');
@@ -22,23 +23,23 @@ require('../keysIn-cjs.js');
22
23
  require('../_baseAssignValue-cjs.js');
23
24
  require('../_baseFlatten-cjs.js');
24
25
  require('../_setToString-cjs.js');
25
- require('../index-cjs.js');
26
- require('react-dom');
27
- require('../useRefocusOnActivator-cjs.js');
28
- require('../Typography-cjs.js');
29
- require('../AtlantisContext-cjs.js');
30
26
  require('../Icon-cjs.js');
31
27
  require('../Text-cjs.js');
28
+ require('../Typography-cjs.js');
32
29
  require('../useFormFieldFocus-cjs.js');
33
30
  require('../InputValidation-cjs.js');
34
31
  require('../Spinner-cjs.js');
35
32
  require('react-router-dom');
36
- require('../useSafeLayoutEffect-cjs.js');
33
+ require('../clsx-cjs.js');
34
+ require('../floating-ui.react-cjs.js');
35
+ require('react/jsx-runtime');
36
+ require('react-dom');
37
+ require('../AtlantisContext-cjs.js');
37
38
 
38
39
  function InputDate$1(inputProps) {
39
40
  const formFieldActionsRef = React.useRef(null);
40
41
  return (React.createElement(DatePicker.DatePicker, { selected: inputProps.value, onChange: inputProps.onChange, disabled: inputProps.disabled, readonly: inputProps.readonly, fullWidth: !inputProps.inline, minDate: inputProps.minDate, maxDate: inputProps.maxDate, smartAutofocus: false, activator: activatorProps => {
41
- const { onChange, onClick, value, pickerRef } = activatorProps;
42
+ const { onChange, onClick, value } = activatorProps;
42
43
  const newActivatorProps = omit.omit(activatorProps, ["activator"]);
43
44
  const [isFocused, setIsFocused] = React.useState(false);
44
45
  const suffix = inputProps.showIcon !== false
@@ -61,31 +62,9 @@ function InputDate$1(inputProps) {
61
62
  React.createElement(FormField.FormField, Object.assign({}, newActivatorProps, inputProps, { value: showEmptyValueLabel ? inputProps.emptyValueLabel || "" : value, placeholder: inputProps.placeholder, onChange: (_, event) => {
62
63
  onChange && onChange(event);
63
64
  }, onBlur: () => {
64
- var _a;
65
65
  inputProps.onBlur && inputProps.onBlur();
66
66
  activatorProps.onBlur && activatorProps.onBlur();
67
67
  setIsFocused(false);
68
- /**
69
- * This is an experimental workaround to solve a specific UX problem we have under certain conditions.
70
- * When you click to focus InputDate, ReactDatePicker becomes visible. If you delete the current date and blur
71
- * the input field by clicking away, ReactDatePicker will automatically set the date to whatever date was
72
- * currently selected.
73
- *
74
- * The above works great and is the expected user experience. ReactDatePicker fills in the empty value for us.
75
- *
76
- * However, there's a specific scenario where ReactDatePicker isn't visible: when you tab into the input date.
77
- * When you tab into it, clear the value, and tab away to blur, ReactDatePicker doesn't automatically fill in
78
- * the empty value because it wasn't visible/active.
79
- *
80
- * To solve this, we need to handle the blur event here and check if the value is empty or invalid. If it is,
81
- * we have to call onChange with the original input value which informs ReactDatePicker that is the current value.
82
- */
83
- if (inputProps.restoreLastValueOnBlur) {
84
- if ((!value || !DatePicker.isValid(value)) && inputProps.value) {
85
- // @ts-expect-error -- ReactDatePicker types don't include setSelected
86
- (_a = pickerRef.current) === null || _a === void 0 ? void 0 : _a.setSelected(inputProps.value);
87
- }
88
- }
89
68
  }, onFocus: () => {
90
69
  inputProps.onFocus && inputProps.onFocus();
91
70
  activatorProps.onFocus && activatorProps.onFocus();
@@ -1,13 +1,14 @@
1
1
  import React__default, { useRef, useState, useEffect, forwardRef } from 'react';
2
2
  import { o as omit } from '../omit-es.js';
3
- import { D as DatePicker, i as isValid } from '../DatePicker-es.js';
4
3
  import { k as FormField } from '../FormField-es.js';
5
4
  import 'classnames';
6
5
  import '../tslib.es6-es.js';
7
6
  import 'react-hook-form';
7
+ import '@jobber/hooks';
8
8
  import 'framer-motion';
9
9
  import '@jobber/design';
10
10
  import '../Button-es.js';
11
+ import { D as DatePicker } from '../DatePicker-es.js';
11
12
  import { InputText } from '../InputText/index.mjs';
12
13
  import '../_commonjsHelpers-es.js';
13
14
  import '../_baseGet-es.js';
@@ -20,23 +21,23 @@ import '../keysIn-es.js';
20
21
  import '../_baseAssignValue-es.js';
21
22
  import '../_baseFlatten-es.js';
22
23
  import '../_setToString-es.js';
23
- import '../index-es.js';
24
- import 'react-dom';
25
- import '../useRefocusOnActivator-es.js';
26
- import '../Typography-es.js';
27
- import '../AtlantisContext-es.js';
28
24
  import '../Icon-es.js';
29
25
  import '../Text-es.js';
26
+ import '../Typography-es.js';
30
27
  import '../useFormFieldFocus-es.js';
31
28
  import '../InputValidation-es.js';
32
29
  import '../Spinner-es.js';
33
30
  import 'react-router-dom';
34
- import '../useSafeLayoutEffect-es.js';
31
+ import '../clsx-es.js';
32
+ import '../floating-ui.react-es.js';
33
+ import 'react/jsx-runtime';
34
+ import 'react-dom';
35
+ import '../AtlantisContext-es.js';
35
36
 
36
37
  function InputDate$1(inputProps) {
37
38
  const formFieldActionsRef = useRef(null);
38
39
  return (React__default.createElement(DatePicker, { selected: inputProps.value, onChange: inputProps.onChange, disabled: inputProps.disabled, readonly: inputProps.readonly, fullWidth: !inputProps.inline, minDate: inputProps.minDate, maxDate: inputProps.maxDate, smartAutofocus: false, activator: activatorProps => {
39
- const { onChange, onClick, value, pickerRef } = activatorProps;
40
+ const { onChange, onClick, value } = activatorProps;
40
41
  const newActivatorProps = omit(activatorProps, ["activator"]);
41
42
  const [isFocused, setIsFocused] = useState(false);
42
43
  const suffix = inputProps.showIcon !== false
@@ -59,31 +60,9 @@ function InputDate$1(inputProps) {
59
60
  React__default.createElement(FormField, Object.assign({}, newActivatorProps, inputProps, { value: showEmptyValueLabel ? inputProps.emptyValueLabel || "" : value, placeholder: inputProps.placeholder, onChange: (_, event) => {
60
61
  onChange && onChange(event);
61
62
  }, onBlur: () => {
62
- var _a;
63
63
  inputProps.onBlur && inputProps.onBlur();
64
64
  activatorProps.onBlur && activatorProps.onBlur();
65
65
  setIsFocused(false);
66
- /**
67
- * This is an experimental workaround to solve a specific UX problem we have under certain conditions.
68
- * When you click to focus InputDate, ReactDatePicker becomes visible. If you delete the current date and blur
69
- * the input field by clicking away, ReactDatePicker will automatically set the date to whatever date was
70
- * currently selected.
71
- *
72
- * The above works great and is the expected user experience. ReactDatePicker fills in the empty value for us.
73
- *
74
- * However, there's a specific scenario where ReactDatePicker isn't visible: when you tab into the input date.
75
- * When you tab into it, clear the value, and tab away to blur, ReactDatePicker doesn't automatically fill in
76
- * the empty value because it wasn't visible/active.
77
- *
78
- * To solve this, we need to handle the blur event here and check if the value is empty or invalid. If it is,
79
- * we have to call onChange with the original input value which informs ReactDatePicker that is the current value.
80
- */
81
- if (inputProps.restoreLastValueOnBlur) {
82
- if ((!value || !isValid(value)) && inputProps.value) {
83
- // @ts-expect-error -- ReactDatePicker types don't include setSelected
84
- (_a = pickerRef.current) === null || _a === void 0 ? void 0 : _a.setSelected(inputProps.value);
85
- }
86
- }
87
66
  }, onFocus: () => {
88
67
  inputProps.onFocus && inputProps.onFocus();
89
68
  activatorProps.onFocus && activatorProps.onFocus();
@@ -5,6 +5,7 @@ var FormField = require('../FormField-cjs.js');
5
5
  require('classnames');
6
6
  var tslib_es6 = require('../tslib.es6-cjs.js');
7
7
  require('react-hook-form');
8
+ require('@jobber/hooks');
8
9
  require('framer-motion');
9
10
  require('@jobber/design');
10
11
  require('../Button-cjs.js');
@@ -3,6 +3,7 @@ import { k as FormField, j as useFormFieldWrapperStyles, b as useAtlantisFormFie
3
3
  import 'classnames';
4
4
  import { _ as __rest } from '../tslib.es6-es.js';
5
5
  import 'react-hook-form';
6
+ import '@jobber/hooks';
6
7
  import 'framer-motion';
7
8
  import '@jobber/design';
8
9
  import '../Button-es.js';