@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.
- package/dist/Autocomplete/index.cjs +0 -2
- package/dist/Autocomplete/index.mjs +0 -2
- package/dist/Autocomplete-cjs.js +4 -5
- package/dist/Autocomplete-es.js +1 -2
- package/dist/Card/index.cjs +1 -2
- package/dist/Card/index.mjs +1 -2
- package/dist/Chip/index.cjs +0 -2
- package/dist/Chip/index.mjs +0 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +0 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +0 -2
- package/dist/Chips/InternalChipDismissible/index.cjs +0 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +0 -2
- package/dist/Chips/index.cjs +0 -2
- package/dist/Chips/index.mjs +0 -2
- package/dist/Combobox/index.cjs +2 -4
- package/dist/Combobox/index.mjs +2 -4
- package/dist/ComboboxPrimitive-cjs.js +29 -30
- package/dist/ComboboxPrimitive-es.js +2 -3
- package/dist/{ComboboxChipRemove-cjs.js → ComboboxSeparator-cjs.js} +501 -455
- package/dist/{ComboboxChipRemove-es.js → ComboboxSeparator-es.js} +500 -456
- package/dist/ConfirmationModal/index.cjs +0 -2
- package/dist/ConfirmationModal/index.mjs +0 -2
- package/dist/DataDump/index.cjs +1 -2
- package/dist/DataDump/index.mjs +1 -2
- package/dist/DataList/components/DataListActions/index.cjs +0 -2
- package/dist/DataList/components/DataListActions/index.mjs +0 -2
- package/dist/DataList/components/DataListBulkActions/index.cjs +0 -2
- package/dist/DataList/components/DataListBulkActions/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/index.mjs +0 -2
- package/dist/DataList/components/DataListHeader/index.cjs +0 -2
- package/dist/DataList/components/DataListHeader/index.mjs +0 -2
- package/dist/DataList/components/DataListItem/index.cjs +0 -2
- package/dist/DataList/components/DataListItem/index.mjs +0 -2
- package/dist/DataList/components/DataListItemActions/index.cjs +0 -2
- package/dist/DataList/components/DataListItemActions/index.mjs +0 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +0 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +0 -2
- package/dist/DataList/components/DataListItems/index.cjs +0 -2
- package/dist/DataList/components/DataListItems/index.mjs +0 -2
- package/dist/DataList/components/DataListLayout/index.cjs +0 -2
- package/dist/DataList/components/DataListLayout/index.mjs +0 -2
- package/dist/DataList/components/DataListLayoutActions/index.cjs +0 -2
- package/dist/DataList/components/DataListLayoutActions/index.mjs +0 -2
- package/dist/DataList/index.cjs +0 -2
- package/dist/DataList/index.mjs +0 -2
- package/dist/DatePicker/index.cjs +0 -2
- package/dist/DatePicker/index.mjs +0 -2
- package/dist/DatePicker-cjs.js +4 -5
- package/dist/DatePicker-es.js +1 -2
- package/dist/Dialog/index.cjs +1 -2
- package/dist/Dialog/index.mjs +1 -2
- package/dist/DrawerDescription-cjs.js +268 -99
- package/dist/DrawerDescription-es.js +270 -103
- package/dist/DrawerTitle-cjs.js +2 -6
- package/dist/DrawerTitle-es.js +3 -7
- package/dist/FieldDescription-cjs.js +184 -181
- package/dist/FieldDescription-es.js +187 -184
- package/dist/FilterPicker/components/FilterPickerActivator/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerActivator/index.mjs +0 -2
- package/dist/FilterPicker/components/FilterPickerContent/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerContent/index.mjs +0 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/index.mjs +0 -2
- package/dist/FilterPicker/index.cjs +0 -2
- package/dist/FilterPicker/index.mjs +0 -2
- package/dist/FilterPickerContent-cjs.js +4 -5
- package/dist/FilterPickerContent-es.js +1 -2
- package/dist/FormatFile/index.cjs +0 -2
- package/dist/FormatFile/index.mjs +0 -2
- package/dist/Gallery/GalleryTypes.d.ts +2 -1
- package/dist/Gallery/index.cjs +19 -2
- package/dist/Gallery/index.d.ts +1 -0
- package/dist/Gallery/index.mjs +19 -2
- package/dist/Gallery-cjs.js +5 -1
- package/dist/Gallery-es.js +5 -1
- package/dist/InputDate/index.cjs +0 -2
- package/dist/InputDate/index.mjs +0 -2
- package/dist/InputNumber/index.cjs +1 -2
- package/dist/InputNumber/index.mjs +1 -2
- package/dist/LightBox/LightBox.d.ts +12 -0
- package/dist/LightBox/LightBox.messages.d.ts +4 -0
- package/dist/LightBox/LightBox.types.d.ts +18 -0
- package/dist/LightBox/index.cjs +19 -2
- package/dist/LightBox/index.d.ts +1 -1
- package/dist/LightBox/index.mjs +19 -2
- package/dist/LightBox-cjs.js +34 -5
- package/dist/LightBox-es.js +34 -5
- package/dist/Menu/index.cjs +1 -2
- package/dist/Menu/index.mjs +1 -2
- package/dist/Menu-cjs.js +4 -5
- package/dist/Menu-es.js +1 -2
- package/dist/MenuSubmenuTrigger-cjs.js +206 -164
- package/dist/MenuSubmenuTrigger-es.js +194 -152
- package/dist/Modal/index.cjs +0 -2
- package/dist/Modal/index.mjs +1 -3
- package/dist/NumberFieldInput-cjs.js +187 -308
- package/dist/NumberFieldInput-es.js +187 -308
- package/dist/Page/index.cjs +1 -2
- package/dist/Page/index.mjs +1 -2
- package/dist/Popover/index.cjs +0 -2
- package/dist/Popover/index.mjs +0 -2
- package/dist/Popover-cjs.js +7 -8
- package/dist/Popover-es.js +1 -2
- package/dist/ScrollAreaViewport-cjs.js +747 -1093
- package/dist/ScrollAreaViewport-es.js +734 -1081
- package/dist/Select/index.cjs +1 -2
- package/dist/Select/index.mjs +1 -2
- package/dist/SelectGroupLabel-cjs.js +207 -306
- package/dist/SelectGroupLabel-es.js +203 -302
- package/dist/Tooltip/index.cjs +0 -2
- package/dist/Tooltip/index.mjs +0 -2
- package/dist/Tooltip-cjs.js +6 -7
- package/dist/Tooltip-es.js +1 -2
- package/dist/dialogReturnFocus-cjs.js +1 -1
- package/dist/dialogReturnFocus-es.js +2 -2
- package/dist/docs/Gallery/Gallery.md +8 -0
- package/dist/docs/LightBox/LightBox.md +17 -3
- package/dist/floating-ui.react-cjs.js +2557 -185
- package/dist/floating-ui.react-es.js +2512 -149
- package/dist/index.cjs +3 -4
- package/dist/index.mjs +3 -4
- package/dist/primitives/BottomSheet/index.cjs +1 -1
- package/dist/primitives/BottomSheet/index.mjs +1 -1
- package/dist/primitives/ComboboxPrimitive/index.cjs +2 -4
- package/dist/primitives/ComboboxPrimitive/index.mjs +2 -4
- package/dist/primitives/SelectPrimitive/index.cjs +0 -2
- package/dist/primitives/SelectPrimitive/index.mjs +0 -2
- package/dist/primitives/index.cjs +2 -3
- package/dist/primitives/index.mjs +2 -3
- package/dist/scrollEdges-cjs.js +1 -11
- package/dist/scrollEdges-es.js +1 -11
- package/dist/scrollable-cjs.js +58 -0
- package/dist/scrollable-es.js +54 -0
- package/dist/styles.css +21 -1
- package/dist/unstyledPrimitives/index.cjs +720 -478
- package/dist/unstyledPrimitives/index.mjs +663 -421
- package/dist/useCompositeListItem-cjs.js +2108 -361
- package/dist/useCompositeListItem-es.js +2076 -331
- package/dist/useLabel-cjs.js +2 -3
- package/dist/useLabel-es.js +2 -3
- package/dist/useRenderElement-cjs.js +9 -7
- package/dist/useRenderElement-es.js +9 -7
- package/dist/useScrollLock-cjs.js +819 -344
- package/dist/useScrollLock-es.js +732 -296
- package/dist/useScrollToActive-cjs.js +4 -5
- package/dist/useScrollToActive-es.js +1 -2
- package/dist/utils/meta/meta.json +1 -0
- package/package.json +3 -3
- package/dist/floating-ui.react-dom-cjs.js +0 -2103
- package/dist/floating-ui.react-dom-es.js +0 -2072
- package/dist/floating-ui.utils-cjs.js +0 -342
- package/dist/floating-ui.utils-es.js +0 -300
package/dist/Tooltip/index.cjs
CHANGED
|
@@ -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
|
|
package/dist/Tooltip/index.mjs
CHANGED
|
@@ -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';
|
package/dist/Tooltip-cjs.js
CHANGED
|
@@ -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
|
-
|
|
22
|
+
floatingUi_react.shift({
|
|
24
23
|
mainAxis: true,
|
|
25
24
|
crossAxis: false,
|
|
26
25
|
padding: TOOLTIP_SHIFT_PADDING,
|
|
27
|
-
limiter:
|
|
26
|
+
limiter: floatingUi_react.limitShift(),
|
|
28
27
|
}),
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
33
|
+
floatingUi_react.hide(),
|
|
35
34
|
],
|
|
36
35
|
elements: {
|
|
37
36
|
reference: referenceElement || null,
|
|
38
37
|
},
|
|
39
|
-
whileElementsMounted:
|
|
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 {
|
package/dist/Tooltip-es.js
CHANGED
|
@@ -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(
|
|
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
|
|
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
|
|
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.
|
|
43
|
-
`LightBox.
|
|
44
|
-
|
|
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 |
|