@jobber/components 9.9.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 (155) 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/GalleryTypes.d.ts +2 -1
  74. package/dist/Gallery/index.cjs +19 -2
  75. package/dist/Gallery/index.d.ts +1 -0
  76. package/dist/Gallery/index.mjs +19 -2
  77. package/dist/Gallery-cjs.js +5 -1
  78. package/dist/Gallery-es.js +5 -1
  79. package/dist/InputDate/index.cjs +0 -2
  80. package/dist/InputDate/index.mjs +0 -2
  81. package/dist/InputNumber/index.cjs +1 -2
  82. package/dist/InputNumber/index.mjs +1 -2
  83. package/dist/LightBox/LightBox.d.ts +12 -0
  84. package/dist/LightBox/LightBox.messages.d.ts +4 -0
  85. package/dist/LightBox/LightBox.types.d.ts +18 -0
  86. package/dist/LightBox/index.cjs +19 -2
  87. package/dist/LightBox/index.d.ts +1 -1
  88. package/dist/LightBox/index.mjs +19 -2
  89. package/dist/LightBox-cjs.js +34 -5
  90. package/dist/LightBox-es.js +34 -5
  91. package/dist/Menu/index.cjs +1 -2
  92. package/dist/Menu/index.mjs +1 -2
  93. package/dist/Menu-cjs.js +4 -5
  94. package/dist/Menu-es.js +1 -2
  95. package/dist/MenuSubmenuTrigger-cjs.js +206 -164
  96. package/dist/MenuSubmenuTrigger-es.js +194 -152
  97. package/dist/Modal/index.cjs +0 -2
  98. package/dist/Modal/index.mjs +1 -3
  99. package/dist/NumberFieldInput-cjs.js +187 -308
  100. package/dist/NumberFieldInput-es.js +187 -308
  101. package/dist/Page/index.cjs +1 -2
  102. package/dist/Page/index.mjs +1 -2
  103. package/dist/Popover/index.cjs +0 -2
  104. package/dist/Popover/index.mjs +0 -2
  105. package/dist/Popover-cjs.js +7 -8
  106. package/dist/Popover-es.js +1 -2
  107. package/dist/ScrollAreaViewport-cjs.js +747 -1093
  108. package/dist/ScrollAreaViewport-es.js +734 -1081
  109. package/dist/Select/index.cjs +1 -2
  110. package/dist/Select/index.mjs +1 -2
  111. package/dist/SelectGroupLabel-cjs.js +207 -306
  112. package/dist/SelectGroupLabel-es.js +203 -302
  113. package/dist/Tooltip/index.cjs +0 -2
  114. package/dist/Tooltip/index.mjs +0 -2
  115. package/dist/Tooltip-cjs.js +6 -7
  116. package/dist/Tooltip-es.js +1 -2
  117. package/dist/dialogReturnFocus-cjs.js +1 -1
  118. package/dist/dialogReturnFocus-es.js +2 -2
  119. package/dist/docs/Gallery/Gallery.md +8 -0
  120. package/dist/docs/LightBox/LightBox.md +17 -3
  121. package/dist/floating-ui.react-cjs.js +2557 -185
  122. package/dist/floating-ui.react-es.js +2512 -149
  123. package/dist/index.cjs +3 -4
  124. package/dist/index.mjs +3 -4
  125. package/dist/primitives/BottomSheet/index.cjs +1 -1
  126. package/dist/primitives/BottomSheet/index.mjs +1 -1
  127. package/dist/primitives/ComboboxPrimitive/index.cjs +2 -4
  128. package/dist/primitives/ComboboxPrimitive/index.mjs +2 -4
  129. package/dist/primitives/SelectPrimitive/index.cjs +0 -2
  130. package/dist/primitives/SelectPrimitive/index.mjs +0 -2
  131. package/dist/primitives/index.cjs +2 -3
  132. package/dist/primitives/index.mjs +2 -3
  133. package/dist/scrollEdges-cjs.js +1 -11
  134. package/dist/scrollEdges-es.js +1 -11
  135. package/dist/scrollable-cjs.js +58 -0
  136. package/dist/scrollable-es.js +54 -0
  137. package/dist/styles.css +21 -1
  138. package/dist/unstyledPrimitives/index.cjs +720 -478
  139. package/dist/unstyledPrimitives/index.mjs +663 -421
  140. package/dist/useCompositeListItem-cjs.js +2108 -361
  141. package/dist/useCompositeListItem-es.js +2076 -331
  142. package/dist/useLabel-cjs.js +2 -3
  143. package/dist/useLabel-es.js +2 -3
  144. package/dist/useRenderElement-cjs.js +9 -7
  145. package/dist/useRenderElement-es.js +9 -7
  146. package/dist/useScrollLock-cjs.js +819 -344
  147. package/dist/useScrollLock-es.js +732 -296
  148. package/dist/useScrollToActive-cjs.js +4 -5
  149. package/dist/useScrollToActive-es.js +1 -2
  150. package/dist/utils/meta/meta.json +1 -0
  151. package/package.json +3 -3
  152. package/dist/floating-ui.react-dom-cjs.js +0 -2103
  153. package/dist/floating-ui.react-dom-es.js +0 -2072
  154. package/dist/floating-ui.utils-cjs.js +0 -342
  155. package/dist/floating-ui.utils-es.js +0 -300
@@ -4,10 +4,8 @@ var Tooltip = require('../Tooltip-cjs.js');
4
4
  require('react');
5
5
  require('classnames');
6
6
  require('../floating-ui.react-cjs.js');
7
- require('../floating-ui.utils-cjs.js');
8
7
  require('react/jsx-runtime');
9
8
  require('react-dom');
10
- require('../floating-ui.react-dom-cjs.js');
11
9
  require('framer-motion');
12
10
  require('@jobber/hooks');
13
11
 
@@ -2,9 +2,7 @@ export { T as Tooltip } from '../Tooltip-es.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '../floating-ui.react-es.js';
5
- import '../floating-ui.utils-es.js';
6
5
  import 'react/jsx-runtime';
7
6
  import 'react-dom';
8
- import '../floating-ui.react-dom-es.js';
9
7
  import 'framer-motion';
10
8
  import '@jobber/hooks';
@@ -5,7 +5,6 @@ var classnames = require('classnames');
5
5
  var floatingUi_react = require('./floating-ui.react-cjs.js');
6
6
  var framerMotion = require('framer-motion');
7
7
  var jobberHooks = require('@jobber/hooks');
8
- var floatingUi_reactDom = require('./floating-ui.react-dom-cjs.js');
9
8
 
10
9
  var styles = {"shadowActivator":"sZQ1M6tj8-c-","tooltipWrapper":"_0o-yEgfXmSQ-","tooltip":"Q1YfFqI71cw-","arrow":"ZP3ev-wT-OI-","top":"jlEmO6f6uHg-","bottom":"z9JQ-DR-QYc-","left":"zWATWgq3bS4-","right":"-tDm6lNCCic-","tooltipMessage":"djrmr4mADlA-","hidden":"p92TIli5Sgw-","spinning":"bobYmlUMnuY-"};
11
10
 
@@ -20,23 +19,23 @@ function useTooltipPositioning({ preferredPlacement, }) {
20
19
  placement: preferredPlacement,
21
20
  strategy: "absolute",
22
21
  middleware: [
23
- floatingUi_reactDom.shift({
22
+ floatingUi_react.shift({
24
23
  mainAxis: true,
25
24
  crossAxis: false,
26
25
  padding: TOOLTIP_SHIFT_PADDING,
27
- limiter: floatingUi_reactDom.limitShift(),
26
+ limiter: floatingUi_react.limitShift(),
28
27
  }),
29
- floatingUi_reactDom.flip({ fallbackPlacements: ["top", "bottom", "left", "right"] }),
30
- floatingUi_reactDom.arrow({
28
+ floatingUi_react.flip({ fallbackPlacements: ["top", "bottom", "left", "right"] }),
29
+ floatingUi_react.arrow({
31
30
  element: arrowElement || null,
32
31
  padding: TOOLTIP_ARROW_PADDING,
33
32
  }),
34
- floatingUi_reactDom.hide(),
33
+ floatingUi_react.hide(),
35
34
  ],
36
35
  elements: {
37
36
  reference: referenceElement || null,
38
37
  },
39
- whileElementsMounted: floatingUi_reactDom.autoUpdate,
38
+ whileElementsMounted: floatingUi_react.autoUpdate,
40
39
  });
41
40
  const isHidden = (_c = (_b = middlewareData.hide) === null || _b === void 0 ? void 0 : _b.referenceHidden) !== null && _c !== void 0 ? _c : false;
42
41
  return {
@@ -1,9 +1,8 @@
1
1
  import React__default, { useRef, useState } from 'react';
2
2
  import classnames from 'classnames';
3
- import { u as useFloating, F as FloatingPortal } from './floating-ui.react-es.js';
3
+ import { u as useFloating, s as shift, f as flip, a as arrow, h as hide, b as autoUpdate, l as limitShift, F as FloatingPortal } from './floating-ui.react-es.js';
4
4
  import { motion } from 'framer-motion';
5
5
  import { useSafeLayoutEffect, useIsMounted } from '@jobber/hooks';
6
- import { s as shift, f as flip, a as arrow, h as hide, b as autoUpdate, l as limitShift } from './floating-ui.react-dom-es.js';
7
6
 
8
7
  var styles = {"shadowActivator":"sZQ1M6tj8-c-","tooltipWrapper":"_0o-yEgfXmSQ-","tooltip":"Q1YfFqI71cw-","arrow":"ZP3ev-wT-OI-","top":"jlEmO6f6uHg-","bottom":"z9JQ-DR-QYc-","left":"zWATWgq3bS4-","right":"-tDm6lNCCic-","tooltipMessage":"djrmr4mADlA-","hidden":"p92TIli5Sgw-","spinning":"bobYmlUMnuY-"};
9
8
 
@@ -237,7 +237,7 @@ DialogBottomSheet.Footer = SharedDialogFooter;
237
237
  DialogBottomSheet.ScrollArea = DialogBottomSheetScrollArea;
238
238
 
239
239
  function DialogModal(props) {
240
- return React.createElement(ScrollAreaViewport.DialogRoot, Object.assign({}, props));
240
+ return React.createElement(DrawerDescription.DialogRoot, Object.assign({}, props));
241
241
  }
242
242
  function DialogModalTrigger(_a) {
243
243
  var { children, render, handle, payload, className, style } = _a, rest = tslib_es6.__rest(_a, ["children", "render", "handle", "payload", "className", "style"]);
@@ -4,7 +4,7 @@ import { useIsSmallScreen } from '@jobber/hooks';
4
4
  import classnames from 'classnames';
5
5
  import { n as normalizeBaseUiButtonProps, i as isAtlantisButtonRenderTarget, s as stripNativeTypeFromButtonRenderTarget, r as renderAtlantisButtonTarget } from './buttonRenderAdapter-es.js';
6
6
  import { B as Button } from './Button-es.js';
7
- import { S as ScrollAreaRoot, f as ScrollAreaViewport, g as DrawerContent, h as DialogRoot, i as DialogTrigger$1, j as DialogPortal, k as DialogViewport } from './ScrollAreaViewport-es.js';
7
+ import { S as ScrollAreaRoot, f as ScrollAreaViewport, g as DrawerContent, h as DialogTrigger$1, i as DialogPortal, j as DialogViewport } from './ScrollAreaViewport-es.js';
8
8
  import { m as mergeProps } from './useRenderElement-es.js';
9
9
  import './OverlaySeparator-es.js';
10
10
  import { a as BottomSheet, B as BottomSheetScrollAreaContext } from './BottomSheet-es.js';
@@ -12,7 +12,7 @@ import './HelperText-es.js';
12
12
  import './SelectPrimitive-es.js';
13
13
  import { H as Heading } from './Heading-es.js';
14
14
  import { D as DrawerTitle, a as DrawerClose, b as DialogTitle$1, c as DialogClose$1 } from './DrawerTitle-es.js';
15
- import { D as DrawerDescription, a as DialogBackdrop, b as DialogPopup, c as DialogDescription, d as createDialogHandle } from './DrawerDescription-es.js';
15
+ import { D as DrawerDescription, a as DialogRoot, b as DialogBackdrop, c as DialogPopup, d as DialogDescription, e as createDialogHandle } from './DrawerDescription-es.js';
16
16
  import { i as isEscapeHandledByModal } from './nestedEscape-es.js';
17
17
 
18
18
  var styles = {"small":"uYYyCR3l6E8-","base":"X1jGz-sLWf4-","large":"_4zFf2PkFhaA-","fullScreen":"nJoCr8oWJ7w-","header":"XFKiCQ8QbQU-","close":"FDOhnO0TT08-","scrollRegion":"_8DjYA23vHXA-","scrollViewport":"Bwr9IUYpLfM-","body":"zp9kx9uue2I-","fullBleed":"EhtwBTy1ai4-","footer":"DRIJhI1knKw-","sheetSurface":"vmcZRwOcNMo-","popup":"mFX7qDCd17I-","backdrop":"NE-BIsVE-hE-","viewport":"hp70o-3Cf-w-","spinning":"Zf-Z8DJcC-Y-"};
@@ -24,6 +24,14 @@ beside each other before wrapping subsequent thumbnails to a new line.
24
24
  Each of the thumbnails the Gallery displays are tab navigatable. A hover state
25
25
  will also slightly dim a particular thumbnail when the cursor hovers over it.
26
26
 
27
+ ## Download formats
28
+
29
+ For previewable images, provide `downloadOptions` on a `GalleryFile` to show a
30
+ Download as action in the LightBox toolbar. Each option has a `label` and `url`;
31
+ an optional `detail` is shown alongside the label. The URL is activated only
32
+ when the user selects that option, allowing applications to create transformed
33
+ formats on demand.
34
+
27
35
  ## Mockup
28
36
 
29
37
 
@@ -15,6 +15,13 @@ The LightBox should only be used when displaying an image at a greater scale is
15
15
  the primary function of opening it. Additional content types would be better
16
16
  suited by using a dialogue or alternative method.
17
17
 
18
+ ## Download formats
19
+
20
+ Images can supply `downloadOptions` with a `label`, `url`, and optional
21
+ `detail`. When the current image has options, the toolbar shows Download as
22
+ beside Open image in new tab. The selected URL is activated only after the user
23
+ chooses a format.
24
+
18
25
 
19
26
  ## Configuration
20
27
 
@@ -39,9 +46,10 @@ components, a more robust solution should be considered.
39
46
 
40
47
  LightBox exposes its internal building blocks as subcomponents:
41
48
  `LightBox.Provider`, `LightBox.Content`, `LightBox.Background`,
42
- `LightBox.Overlay`, `LightBox.Toolbar`, `LightBox.Slides`,
43
- `LightBox.Navigation`, `LightBox.Caption`, and `LightBox.Thumbnails`. This gives
44
- you more control over the LightBox's appearance and behaviour.
49
+ `LightBox.Overlay`, `LightBox.Toolbar`, `LightBox.DownloadAction`,
50
+ `LightBox.OpenInNewTabAction`, `LightBox.Slides`, `LightBox.Navigation`,
51
+ `LightBox.Caption`, and `LightBox.Thumbnails`. This gives you more control over
52
+ the LightBox's appearance and behaviour.
45
53
 
46
54
  The thumbnail strip is itself composed of smaller subcomponents you can use
47
55
  directly: `LightBox.ThumbnailBar`, `LightBox.Thumbnail`, and
@@ -219,6 +227,12 @@ window.HTMLElement.prototype.scrollIntoView = scrollIntoViewMock;
219
227
  |------|------|----------|---------|-------------|
220
228
  | `className` | `string` | No | — | |
221
229
 
230
+ #### LightBox.DownloadAction
231
+
232
+ | Prop | Type | Required | Default | Description |
233
+ |------|------|----------|---------|-------------|
234
+ | `ariaLabel` | `string` | No | `"Download as"` | Accessible label for the action, also used as the tooltip message. |
235
+
222
236
  #### LightBox.Navigation
223
237
 
224
238
  | Prop | Type | Required | Default | Description |