@jobber/components 9.10.0 → 9.10.1

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 (141) hide show
  1. package/dist/Autocomplete/index.cjs +0 -2
  2. package/dist/Autocomplete/index.mjs +0 -2
  3. package/dist/Autocomplete-cjs.js +4 -5
  4. package/dist/Autocomplete-es.js +1 -2
  5. package/dist/Card/index.cjs +1 -2
  6. package/dist/Card/index.mjs +1 -2
  7. package/dist/Chip/index.cjs +0 -2
  8. package/dist/Chip/index.mjs +0 -2
  9. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +0 -2
  10. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +0 -2
  11. package/dist/Chips/InternalChipDismissible/index.cjs +0 -2
  12. package/dist/Chips/InternalChipDismissible/index.mjs +0 -2
  13. package/dist/Chips/index.cjs +0 -2
  14. package/dist/Chips/index.mjs +0 -2
  15. package/dist/Combobox/index.cjs +2 -4
  16. package/dist/Combobox/index.mjs +2 -4
  17. package/dist/ComboboxPrimitive-cjs.js +29 -30
  18. package/dist/ComboboxPrimitive-es.js +2 -3
  19. package/dist/{ComboboxChipRemove-cjs.js → ComboboxSeparator-cjs.js} +501 -455
  20. package/dist/{ComboboxChipRemove-es.js → ComboboxSeparator-es.js} +500 -456
  21. package/dist/ConfirmationModal/index.cjs +0 -2
  22. package/dist/ConfirmationModal/index.mjs +0 -2
  23. package/dist/DataDump/index.cjs +1 -2
  24. package/dist/DataDump/index.mjs +1 -2
  25. package/dist/DataList/components/DataListActions/index.cjs +0 -2
  26. package/dist/DataList/components/DataListActions/index.mjs +0 -2
  27. package/dist/DataList/components/DataListBulkActions/index.cjs +0 -2
  28. package/dist/DataList/components/DataListBulkActions/index.mjs +0 -2
  29. package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +0 -2
  30. package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +0 -2
  31. package/dist/DataList/components/DataListFilters/index.cjs +0 -2
  32. package/dist/DataList/components/DataListFilters/index.mjs +0 -2
  33. package/dist/DataList/components/DataListHeader/index.cjs +0 -2
  34. package/dist/DataList/components/DataListHeader/index.mjs +0 -2
  35. package/dist/DataList/components/DataListItem/index.cjs +0 -2
  36. package/dist/DataList/components/DataListItem/index.mjs +0 -2
  37. package/dist/DataList/components/DataListItemActions/index.cjs +0 -2
  38. package/dist/DataList/components/DataListItemActions/index.mjs +0 -2
  39. package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +0 -2
  40. package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +0 -2
  41. package/dist/DataList/components/DataListItems/index.cjs +0 -2
  42. package/dist/DataList/components/DataListItems/index.mjs +0 -2
  43. package/dist/DataList/components/DataListLayout/index.cjs +0 -2
  44. package/dist/DataList/components/DataListLayout/index.mjs +0 -2
  45. package/dist/DataList/components/DataListLayoutActions/index.cjs +0 -2
  46. package/dist/DataList/components/DataListLayoutActions/index.mjs +0 -2
  47. package/dist/DataList/index.cjs +0 -2
  48. package/dist/DataList/index.mjs +0 -2
  49. package/dist/DatePicker/index.cjs +0 -2
  50. package/dist/DatePicker/index.mjs +0 -2
  51. package/dist/DatePicker-cjs.js +4 -5
  52. package/dist/DatePicker-es.js +1 -2
  53. package/dist/Dialog/index.cjs +1 -2
  54. package/dist/Dialog/index.mjs +1 -2
  55. package/dist/DrawerDescription-cjs.js +268 -99
  56. package/dist/DrawerDescription-es.js +270 -103
  57. package/dist/DrawerTitle-cjs.js +2 -6
  58. package/dist/DrawerTitle-es.js +3 -7
  59. package/dist/FieldDescription-cjs.js +184 -181
  60. package/dist/FieldDescription-es.js +187 -184
  61. package/dist/FilterPicker/components/FilterPickerActivator/index.cjs +0 -2
  62. package/dist/FilterPicker/components/FilterPickerActivator/index.mjs +0 -2
  63. package/dist/FilterPicker/components/FilterPickerContent/index.cjs +0 -2
  64. package/dist/FilterPicker/components/FilterPickerContent/index.mjs +0 -2
  65. package/dist/FilterPicker/components/FilterPickerTrigger/index.cjs +0 -2
  66. package/dist/FilterPicker/components/FilterPickerTrigger/index.mjs +0 -2
  67. package/dist/FilterPicker/index.cjs +0 -2
  68. package/dist/FilterPicker/index.mjs +0 -2
  69. package/dist/FilterPickerContent-cjs.js +4 -5
  70. package/dist/FilterPickerContent-es.js +1 -2
  71. package/dist/FormatFile/index.cjs +0 -2
  72. package/dist/FormatFile/index.mjs +0 -2
  73. package/dist/Gallery/index.cjs +1 -2
  74. package/dist/Gallery/index.mjs +1 -2
  75. package/dist/InputDate/index.cjs +0 -2
  76. package/dist/InputDate/index.mjs +0 -2
  77. package/dist/InputNumber/index.cjs +1 -2
  78. package/dist/InputNumber/index.mjs +1 -2
  79. package/dist/LightBox/index.cjs +1 -2
  80. package/dist/LightBox/index.mjs +1 -2
  81. package/dist/Menu/index.cjs +1 -2
  82. package/dist/Menu/index.mjs +1 -2
  83. package/dist/Menu-cjs.js +4 -5
  84. package/dist/Menu-es.js +1 -2
  85. package/dist/MenuSubmenuTrigger-cjs.js +206 -164
  86. package/dist/MenuSubmenuTrigger-es.js +194 -152
  87. package/dist/Modal/index.cjs +0 -2
  88. package/dist/Modal/index.mjs +1 -3
  89. package/dist/NumberFieldInput-cjs.js +187 -308
  90. package/dist/NumberFieldInput-es.js +187 -308
  91. package/dist/Page/index.cjs +1 -2
  92. package/dist/Page/index.mjs +1 -2
  93. package/dist/Popover/index.cjs +0 -2
  94. package/dist/Popover/index.mjs +0 -2
  95. package/dist/Popover-cjs.js +7 -8
  96. package/dist/Popover-es.js +1 -2
  97. package/dist/ScrollAreaViewport-cjs.js +747 -1093
  98. package/dist/ScrollAreaViewport-es.js +734 -1081
  99. package/dist/Select/index.cjs +1 -2
  100. package/dist/Select/index.mjs +1 -2
  101. package/dist/SelectGroupLabel-cjs.js +207 -306
  102. package/dist/SelectGroupLabel-es.js +203 -302
  103. package/dist/Tooltip/index.cjs +0 -2
  104. package/dist/Tooltip/index.mjs +0 -2
  105. package/dist/Tooltip-cjs.js +6 -7
  106. package/dist/Tooltip-es.js +1 -2
  107. package/dist/dialogReturnFocus-cjs.js +1 -1
  108. package/dist/dialogReturnFocus-es.js +2 -2
  109. package/dist/floating-ui.react-cjs.js +2557 -185
  110. package/dist/floating-ui.react-es.js +2512 -149
  111. package/dist/index.cjs +3 -4
  112. package/dist/index.mjs +3 -4
  113. package/dist/primitives/BottomSheet/index.cjs +1 -1
  114. package/dist/primitives/BottomSheet/index.mjs +1 -1
  115. package/dist/primitives/ComboboxPrimitive/index.cjs +2 -4
  116. package/dist/primitives/ComboboxPrimitive/index.mjs +2 -4
  117. package/dist/primitives/SelectPrimitive/index.cjs +0 -2
  118. package/dist/primitives/SelectPrimitive/index.mjs +0 -2
  119. package/dist/primitives/index.cjs +2 -3
  120. package/dist/primitives/index.mjs +2 -3
  121. package/dist/scrollEdges-cjs.js +1 -11
  122. package/dist/scrollEdges-es.js +1 -11
  123. package/dist/scrollable-cjs.js +58 -0
  124. package/dist/scrollable-es.js +54 -0
  125. package/dist/unstyledPrimitives/index.cjs +720 -478
  126. package/dist/unstyledPrimitives/index.mjs +663 -421
  127. package/dist/useCompositeListItem-cjs.js +2108 -361
  128. package/dist/useCompositeListItem-es.js +2076 -331
  129. package/dist/useLabel-cjs.js +2 -3
  130. package/dist/useLabel-es.js +2 -3
  131. package/dist/useRenderElement-cjs.js +9 -7
  132. package/dist/useRenderElement-es.js +9 -7
  133. package/dist/useScrollLock-cjs.js +819 -344
  134. package/dist/useScrollLock-es.js +732 -296
  135. package/dist/useScrollToActive-cjs.js +4 -5
  136. package/dist/useScrollToActive-es.js +1 -2
  137. package/package.json +3 -3
  138. package/dist/floating-ui.react-dom-cjs.js +0 -2103
  139. package/dist/floating-ui.react-dom-es.js +0 -2072
  140. package/dist/floating-ui.utils-cjs.js +0 -342
  141. package/dist/floating-ui.utils-es.js +0 -300
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var floatingUi_utils = require('./floating-ui.utils-cjs.js');
4
3
  var useScrollLock = require('./useScrollLock-cjs.js');
5
4
  var useCompositeListItem = require('./useCompositeListItem-cjs.js');
6
5
 
@@ -9,7 +8,7 @@ function useRegisteredLabelId(idProp, setLabelId) {
9
8
  useScrollLock.useIsoLayoutEffect(() => {
10
9
  setLabelId(id);
11
10
  return () => {
12
- setLabelId(undefined);
11
+ setLabelId(currentId => currentId === id ? undefined : currentId);
13
12
  };
14
13
  }, [id, setLabelId]);
15
14
  return id;
@@ -42,7 +41,7 @@ function useLabel(params = {}) {
42
41
  return;
43
42
  }
44
43
  const controlElement = useScrollLock.ownerDocument(event.currentTarget).getElementById(resolvedControlId);
45
- if (floatingUi_utils.isHTMLElement(controlElement)) {
44
+ if (useScrollLock.isHTMLElement(controlElement)) {
46
45
  focusElementWithVisible(controlElement);
47
46
  }
48
47
  }
@@ -1,5 +1,4 @@
1
- import { i as isHTMLElement } from './floating-ui.utils-es.js';
2
- import { u as useBaseUiId, a as useIsoLayoutEffect, b as useStableCallback, g as getTarget, o as ownerDocument } from './useScrollLock-es.js';
1
+ import { u as useBaseUiId, c as useIsoLayoutEffect, d as useStableCallback, e as getTarget, o as ownerDocument, i as isHTMLElement } from './useScrollLock-es.js';
3
2
  import { u as useLabelableContext } from './useCompositeListItem-es.js';
4
3
 
5
4
  function useRegisteredLabelId(idProp, setLabelId) {
@@ -7,7 +6,7 @@ function useRegisteredLabelId(idProp, setLabelId) {
7
6
  useIsoLayoutEffect(() => {
8
7
  setLabelId(id);
9
8
  return () => {
10
- setLabelId(undefined);
9
+ setLabelId(currentId => currentId === id ? undefined : currentId);
11
10
  };
12
11
  }, [id, setLabelId]);
13
12
  return id;
@@ -364,7 +364,9 @@ function update(forkRef, refs) {
364
364
  if (typeof cleanupCallback === 'function') {
365
365
  cleanupCallback();
366
366
  } else {
367
- ref(null);
367
+ // Legacy ref with no attach-time cleanup: detach by calling it with `null`.
368
+ // It returns nothing; React 19 cleanups are handled in the branch above.
369
+ void ref(null);
368
370
  }
369
371
  break;
370
372
  }
@@ -536,7 +538,8 @@ function useRenderElementProps(componentProps, params = {}) {
536
538
  /* eslint-disable react-hooks/rules-of-hooks */
537
539
  if (typeof document !== 'undefined') {
538
540
  if (!enabled) {
539
- useMergedRefs(null, null);
541
+ // Called only to keep the hook order stable when disabled; the merged ref is unused.
542
+ void useMergedRefs(null, null);
540
543
  } else if (Array.isArray(ref)) {
541
544
  outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
542
545
  } else {
@@ -562,9 +565,9 @@ function resolveRenderFunctionProps(props) {
562
565
  }
563
566
 
564
567
  // The symbol React uses internally for lazy components
565
- // https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
568
+ // https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
566
569
  //
567
- // TODO delete once https://github.com/facebook/react/issues/32392 is fixed
570
+ // TODO delete once https://github.com/react/react/issues/32392 is fixed
568
571
  const REACT_LAZY_TYPE = Symbol.for('react.lazy');
569
572
  const COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
570
573
  const LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
@@ -579,10 +582,9 @@ function evaluateRenderProp(element, render, props, state) {
579
582
  const mergedProps = mergeProps(props, render.props);
580
583
  mergedProps.ref = props.ref;
581
584
  let newElement = render;
582
-
583
- // Workaround for https://github.com/facebook/react/issues/32392
585
+ // Workaround for https://github.com/react/react/issues/32392
584
586
  // This works because the toArray() logic unwrap lazy element type in
585
- // https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186
587
+ // https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186
586
588
  if (newElement?.$$typeof === REACT_LAZY_TYPE) {
587
589
  const children = React__namespace.Children.toArray(render);
588
590
  newElement = children[0];
@@ -344,7 +344,9 @@ function update(forkRef, refs) {
344
344
  if (typeof cleanupCallback === 'function') {
345
345
  cleanupCallback();
346
346
  } else {
347
- ref(null);
347
+ // Legacy ref with no attach-time cleanup: detach by calling it with `null`.
348
+ // It returns nothing; React 19 cleanups are handled in the branch above.
349
+ void ref(null);
348
350
  }
349
351
  break;
350
352
  }
@@ -516,7 +518,8 @@ function useRenderElementProps(componentProps, params = {}) {
516
518
  /* eslint-disable react-hooks/rules-of-hooks */
517
519
  if (typeof document !== 'undefined') {
518
520
  if (!enabled) {
519
- useMergedRefs(null, null);
521
+ // Called only to keep the hook order stable when disabled; the merged ref is unused.
522
+ void useMergedRefs(null, null);
520
523
  } else if (Array.isArray(ref)) {
521
524
  outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
522
525
  } else {
@@ -542,9 +545,9 @@ function resolveRenderFunctionProps(props) {
542
545
  }
543
546
 
544
547
  // The symbol React uses internally for lazy components
545
- // https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
548
+ // https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
546
549
  //
547
- // TODO delete once https://github.com/facebook/react/issues/32392 is fixed
550
+ // TODO delete once https://github.com/react/react/issues/32392 is fixed
548
551
  const REACT_LAZY_TYPE = Symbol.for('react.lazy');
549
552
  const COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
550
553
  const LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
@@ -559,10 +562,9 @@ function evaluateRenderProp(element, render, props, state) {
559
562
  const mergedProps = mergeProps(props, render.props);
560
563
  mergedProps.ref = props.ref;
561
564
  let newElement = render;
562
-
563
- // Workaround for https://github.com/facebook/react/issues/32392
565
+ // Workaround for https://github.com/react/react/issues/32392
564
566
  // This works because the toArray() logic unwrap lazy element type in
565
- // https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186
567
+ // https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186
566
568
  if (newElement?.$$typeof === REACT_LAZY_TYPE) {
567
569
  const children = React.Children.toArray(render);
568
570
  newElement = children[0];