@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
|
@@ -6,10 +6,8 @@ require('react');
|
|
|
6
6
|
require('../FilterPickerContent-cjs.js');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../floating-ui.react-cjs.js');
|
|
9
|
-
require('../floating-ui.utils-cjs.js');
|
|
10
9
|
require('react/jsx-runtime');
|
|
11
10
|
require('react-dom');
|
|
12
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
13
11
|
require('../FilterPickerContentSearch-cjs.js');
|
|
14
12
|
require('../Icon-cjs.js');
|
|
15
13
|
require('@jobber/design');
|
|
@@ -4,10 +4,8 @@ import 'react';
|
|
|
4
4
|
import '../FilterPickerContent-es.js';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '../floating-ui.react-es.js';
|
|
7
|
-
import '../floating-ui.utils-es.js';
|
|
8
7
|
import 'react/jsx-runtime';
|
|
9
8
|
import 'react-dom';
|
|
10
|
-
import '../floating-ui.react-dom-es.js';
|
|
11
9
|
import '../FilterPickerContentSearch-es.js';
|
|
12
10
|
import '../Icon-es.js';
|
|
13
11
|
import '@jobber/design';
|
|
@@ -8,7 +8,6 @@ var FilterPickerContentList = require('./FilterPickerContentList-cjs.js');
|
|
|
8
8
|
var FilterPickerContentHeader = require('./FilterPickerContentHeader-cjs.js');
|
|
9
9
|
var FilterPickerProvider = require('./FilterPickerProvider-cjs.js');
|
|
10
10
|
var jobberHooks = require('@jobber/hooks');
|
|
11
|
-
var floatingUi_reactDom = require('./floating-ui.react-dom-cjs.js');
|
|
12
11
|
var constants = require('./constants-cjs.js');
|
|
13
12
|
|
|
14
13
|
var styles = {"content":"bog6pntD050-","hidden":"CLGExWp0HOc-","actions":"Tuw6ng4mYhg-","actionPadding":"uC0PW9BRcl4-","spinning":"TWLS2ZoEtnQ-"};
|
|
@@ -65,8 +64,8 @@ function useFilterPickerAccessibility(selectionCallback, filteredOptions, option
|
|
|
65
64
|
handleClose();
|
|
66
65
|
},
|
|
67
66
|
middleware: [
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
floatingUi_react.offset(FILTER_PICKER_OFFSET),
|
|
68
|
+
floatingUi_react.flip({ fallbackPlacements: ["top-start", "bottom-end", "top-end"] }),
|
|
70
69
|
],
|
|
71
70
|
});
|
|
72
71
|
const dismiss = floatingUi_react.useDismiss(context);
|
|
@@ -75,10 +74,10 @@ function useFilterPickerAccessibility(selectionCallback, filteredOptions, option
|
|
|
75
74
|
// set up and tear down autoUpdate manually to avoid unnecessary observers.
|
|
76
75
|
React.useEffect(() => {
|
|
77
76
|
if (open && elements.reference && elements.floating) {
|
|
78
|
-
const cleanup =
|
|
77
|
+
const cleanup = floatingUi_react.autoUpdate(elements.reference, elements.floating, update);
|
|
79
78
|
return cleanup;
|
|
80
79
|
}
|
|
81
|
-
}, [open,
|
|
80
|
+
}, [open, floatingUi_react.autoUpdate, elements, update]);
|
|
82
81
|
React.useEffect(() => {
|
|
83
82
|
focusedIndex.current = null;
|
|
84
83
|
if (open) {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React__default, { useContext, useRef, useEffect, useMemo } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { c as useFloatingParentNodeId, d as useFloatingNodeId, u as useFloating, o as offset, f as flip, e as useDismiss, g as useInteractions, b as autoUpdate, i as FloatingTree, j as FloatingNode, F as FloatingPortal } from './floating-ui.react-es.js';
|
|
4
4
|
import { F as FilterPickerContentSearch } from './FilterPickerContentSearch-es.js';
|
|
5
5
|
import { F as FilterPickerContentList } from './FilterPickerContentList-es.js';
|
|
6
6
|
import { F as FilterPickerContentHeader } from './FilterPickerContentHeader-es.js';
|
|
7
7
|
import { a as FilterPickerContext } from './FilterPickerProvider-es.js';
|
|
8
8
|
import { useRefocusOnActivator, useFocusTrap } from '@jobber/hooks';
|
|
9
|
-
import { o as offset, f as flip, b as autoUpdate } from './floating-ui.react-dom-es.js';
|
|
10
9
|
import { F as FILTER_PICKER_MENU_ID } from './constants-es.js';
|
|
11
10
|
|
|
12
11
|
var styles = {"content":"bog6pntD050-","hidden":"CLGExWp0HOc-","actions":"Tuw6ng4mYhg-","actionPadding":"uC0PW9BRcl4-","spinning":"TWLS2ZoEtnQ-"};
|
|
@@ -28,9 +28,7 @@ require('../ButtonDismiss-cjs.js');
|
|
|
28
28
|
require('../noop-cjs.js');
|
|
29
29
|
require('../_commonjsHelpers-cjs.js');
|
|
30
30
|
require('../floating-ui.react-cjs.js');
|
|
31
|
-
require('../floating-ui.utils-cjs.js');
|
|
32
31
|
require('react/jsx-runtime');
|
|
33
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
34
32
|
require('../identity-cjs.js');
|
|
35
33
|
require('../isTypedArray-cjs.js');
|
|
36
34
|
require('../isObjectLike-cjs.js');
|
|
@@ -26,9 +26,7 @@ import '../ButtonDismiss-es.js';
|
|
|
26
26
|
import '../noop-es.js';
|
|
27
27
|
import '../_commonjsHelpers-es.js';
|
|
28
28
|
import '../floating-ui.react-es.js';
|
|
29
|
-
import '../floating-ui.utils-es.js';
|
|
30
29
|
import 'react/jsx-runtime';
|
|
31
|
-
import '../floating-ui.react-dom-es.js';
|
|
32
30
|
import '../identity-es.js';
|
|
33
31
|
import '../isTypedArray-es.js';
|
|
34
32
|
import '../isObjectLike-es.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IconNames } from "../Icon";
|
|
2
2
|
import type { FileUpload } from "../InputFile";
|
|
3
|
+
import type { PresentedImage } from "../LightBox";
|
|
3
4
|
export type Sizes = "small" | "base" | "large" | "extraLarge";
|
|
4
5
|
export type FileIconsNames = Extract<IconNames, "file" | "excel" | "pdf" | "video" | "word">;
|
|
5
6
|
export interface GalleryProps {
|
|
@@ -23,7 +24,7 @@ export interface GalleryProps {
|
|
|
23
24
|
*/
|
|
24
25
|
onDelete?(file: GalleryFile): void;
|
|
25
26
|
}
|
|
26
|
-
export interface GalleryFile extends Pick<FileUpload, "key" | "name" | "type" | "size" | "progress"> {
|
|
27
|
+
export interface GalleryFile extends Pick<FileUpload, "key" | "name" | "type" | "size" | "progress">, Pick<PresentedImage, "downloadOptions"> {
|
|
27
28
|
/**
|
|
28
29
|
* The thumbnail url of the file.
|
|
29
30
|
*/
|
package/dist/Gallery/index.cjs
CHANGED
|
@@ -22,9 +22,7 @@ require('../Text-cjs.js');
|
|
|
22
22
|
require('../Heading-cjs.js');
|
|
23
23
|
require('../Tooltip-cjs.js');
|
|
24
24
|
require('../floating-ui.react-cjs.js');
|
|
25
|
-
require('../floating-ui.utils-cjs.js');
|
|
26
25
|
require('react/jsx-runtime');
|
|
27
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
28
26
|
require('../AtlantisThemeContext-cjs.js');
|
|
29
27
|
require('../identity-cjs.js');
|
|
30
28
|
require('../isTypedArray-cjs.js');
|
|
@@ -34,6 +32,25 @@ require('../_baseFor-cjs.js');
|
|
|
34
32
|
require('../keysIn-cjs.js');
|
|
35
33
|
require('../_isIterateeCall-cjs.js');
|
|
36
34
|
require('../_setToString-cjs.js');
|
|
35
|
+
require('../Menu-cjs.js');
|
|
36
|
+
require('../useFormFieldFocus-cjs.js');
|
|
37
|
+
require('../maxHeight-cjs.js');
|
|
38
|
+
require('../useRenderElement-cjs.js');
|
|
39
|
+
require('../buttonRenderAdapter-cjs.js');
|
|
40
|
+
require('../OverlaySeparator-cjs.js');
|
|
41
|
+
require('../Separator-cjs.js');
|
|
42
|
+
require('../BottomSheet-cjs.js');
|
|
43
|
+
require('../ScrollAreaViewport-cjs.js');
|
|
44
|
+
require('../useScrollLock-cjs.js');
|
|
45
|
+
require('../scrollEdges-cjs.js');
|
|
46
|
+
require('../scrollable-cjs.js');
|
|
47
|
+
require('../HelperText-cjs.js');
|
|
48
|
+
require('../SelectPrimitive-cjs.js');
|
|
49
|
+
require('../mergeClassName-cjs.js');
|
|
50
|
+
require('../SelectGroupLabel-cjs.js');
|
|
51
|
+
require('../useCompositeListItem-cjs.js');
|
|
52
|
+
require('../DrawerTitle-cjs.js');
|
|
53
|
+
require('../MenuSubmenuTrigger-cjs.js');
|
|
37
54
|
require('../FormatFile-cjs.js');
|
|
38
55
|
require('filesize');
|
|
39
56
|
require('../Thumbnail-cjs.js');
|
package/dist/Gallery/index.d.ts
CHANGED
package/dist/Gallery/index.mjs
CHANGED
|
@@ -20,9 +20,7 @@ import '../Text-es.js';
|
|
|
20
20
|
import '../Heading-es.js';
|
|
21
21
|
import '../Tooltip-es.js';
|
|
22
22
|
import '../floating-ui.react-es.js';
|
|
23
|
-
import '../floating-ui.utils-es.js';
|
|
24
23
|
import 'react/jsx-runtime';
|
|
25
|
-
import '../floating-ui.react-dom-es.js';
|
|
26
24
|
import '../AtlantisThemeContext-es.js';
|
|
27
25
|
import '../identity-es.js';
|
|
28
26
|
import '../isTypedArray-es.js';
|
|
@@ -32,6 +30,25 @@ import '../_baseFor-es.js';
|
|
|
32
30
|
import '../keysIn-es.js';
|
|
33
31
|
import '../_isIterateeCall-es.js';
|
|
34
32
|
import '../_setToString-es.js';
|
|
33
|
+
import '../Menu-es.js';
|
|
34
|
+
import '../useFormFieldFocus-es.js';
|
|
35
|
+
import '../maxHeight-es.js';
|
|
36
|
+
import '../useRenderElement-es.js';
|
|
37
|
+
import '../buttonRenderAdapter-es.js';
|
|
38
|
+
import '../OverlaySeparator-es.js';
|
|
39
|
+
import '../Separator-es.js';
|
|
40
|
+
import '../BottomSheet-es.js';
|
|
41
|
+
import '../ScrollAreaViewport-es.js';
|
|
42
|
+
import '../useScrollLock-es.js';
|
|
43
|
+
import '../scrollEdges-es.js';
|
|
44
|
+
import '../scrollable-es.js';
|
|
45
|
+
import '../HelperText-es.js';
|
|
46
|
+
import '../SelectPrimitive-es.js';
|
|
47
|
+
import '../mergeClassName-es.js';
|
|
48
|
+
import '../SelectGroupLabel-es.js';
|
|
49
|
+
import '../useCompositeListItem-es.js';
|
|
50
|
+
import '../DrawerTitle-es.js';
|
|
51
|
+
import '../MenuSubmenuTrigger-es.js';
|
|
35
52
|
import '../FormatFile-es.js';
|
|
36
53
|
import 'filesize';
|
|
37
54
|
import '../Thumbnail-es.js';
|
package/dist/Gallery-cjs.js
CHANGED
|
@@ -69,7 +69,11 @@ function generateImagesArray(files) {
|
|
|
69
69
|
let imageIndex = 0;
|
|
70
70
|
for (let i = 0; i < files.length; i++) {
|
|
71
71
|
if (Thumbnail.isPreviewableImage(files[i].type)) {
|
|
72
|
-
images.push({
|
|
72
|
+
images.push({
|
|
73
|
+
title: files[i].name,
|
|
74
|
+
url: yield getFileSrc(files[i]),
|
|
75
|
+
downloadOptions: files[i].downloadOptions,
|
|
76
|
+
});
|
|
73
77
|
filesToImageIndex.push(imageIndex);
|
|
74
78
|
imageIndex++;
|
|
75
79
|
}
|
package/dist/Gallery-es.js
CHANGED
|
@@ -67,7 +67,11 @@ function generateImagesArray(files) {
|
|
|
67
67
|
let imageIndex = 0;
|
|
68
68
|
for (let i = 0; i < files.length; i++) {
|
|
69
69
|
if (isPreviewableImage(files[i].type)) {
|
|
70
|
-
images.push({
|
|
70
|
+
images.push({
|
|
71
|
+
title: files[i].name,
|
|
72
|
+
url: yield getFileSrc(files[i]),
|
|
73
|
+
downloadOptions: files[i].downloadOptions,
|
|
74
|
+
});
|
|
71
75
|
filesToImageIndex.push(imageIndex);
|
|
72
76
|
imageIndex++;
|
|
73
77
|
}
|
package/dist/InputDate/index.cjs
CHANGED
|
@@ -7,10 +7,8 @@ require('../AtlantisContext-cjs.js');
|
|
|
7
7
|
require('../DatePicker-cjs.js');
|
|
8
8
|
require('classnames');
|
|
9
9
|
require('../floating-ui.react-cjs.js');
|
|
10
|
-
require('../floating-ui.utils-cjs.js');
|
|
11
10
|
require('react/jsx-runtime');
|
|
12
11
|
require('react-dom');
|
|
13
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
14
12
|
require('@jobber/hooks');
|
|
15
13
|
require('../Typography-cjs.js');
|
|
16
14
|
require('../Button-cjs.js');
|
package/dist/InputDate/index.mjs
CHANGED
|
@@ -5,10 +5,8 @@ import '../AtlantisContext-es.js';
|
|
|
5
5
|
import '../DatePicker-es.js';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import '../floating-ui.react-es.js';
|
|
8
|
-
import '../floating-ui.utils-es.js';
|
|
9
8
|
import 'react/jsx-runtime';
|
|
10
9
|
import 'react-dom';
|
|
11
|
-
import '../floating-ui.react-dom-es.js';
|
|
12
10
|
import '@jobber/hooks';
|
|
13
11
|
import '../Typography-es.js';
|
|
14
12
|
import '../Button-es.js';
|
|
@@ -20,17 +20,16 @@ require('../BottomSheet-cjs.js');
|
|
|
20
20
|
require('../buttonRenderAdapter-cjs.js');
|
|
21
21
|
require('../ScrollAreaViewport-cjs.js');
|
|
22
22
|
require('../useScrollLock-cjs.js');
|
|
23
|
-
require('../floating-ui.utils-cjs.js');
|
|
24
23
|
require('react/jsx-runtime');
|
|
25
24
|
require('react-dom');
|
|
26
25
|
require('../scrollEdges-cjs.js');
|
|
26
|
+
require('../scrollable-cjs.js');
|
|
27
27
|
require('../HelperText-cjs.js');
|
|
28
28
|
require('../Text-cjs.js');
|
|
29
29
|
require('../SelectPrimitive-cjs.js');
|
|
30
30
|
require('../mergeClassName-cjs.js');
|
|
31
31
|
require('../SelectGroupLabel-cjs.js');
|
|
32
32
|
require('../useCompositeListItem-cjs.js');
|
|
33
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
34
33
|
require('../FieldDescription-cjs.js');
|
|
35
34
|
require('../useLabel-cjs.js');
|
|
36
35
|
require('../NumberFieldInput-cjs.js');
|
|
@@ -18,17 +18,16 @@ import '../BottomSheet-es.js';
|
|
|
18
18
|
import '../buttonRenderAdapter-es.js';
|
|
19
19
|
import '../ScrollAreaViewport-es.js';
|
|
20
20
|
import '../useScrollLock-es.js';
|
|
21
|
-
import '../floating-ui.utils-es.js';
|
|
22
21
|
import 'react/jsx-runtime';
|
|
23
22
|
import 'react-dom';
|
|
24
23
|
import '../scrollEdges-es.js';
|
|
24
|
+
import '../scrollable-es.js';
|
|
25
25
|
import '../HelperText-es.js';
|
|
26
26
|
import '../Text-es.js';
|
|
27
27
|
import '../SelectPrimitive-es.js';
|
|
28
28
|
import '../mergeClassName-es.js';
|
|
29
29
|
import '../SelectGroupLabel-es.js';
|
|
30
30
|
import '../useCompositeListItem-es.js';
|
|
31
|
-
import '../floating-ui.react-dom-es.js';
|
|
32
31
|
import '../FieldDescription-es.js';
|
|
33
32
|
import '../useLabel-es.js';
|
|
34
33
|
import '../NumberFieldInput-es.js';
|
|
@@ -21,6 +21,17 @@ declare function LightBoxOverlay({ className }: {
|
|
|
21
21
|
* and a close button. Styled for dark backgrounds.
|
|
22
22
|
*/
|
|
23
23
|
declare function LightBoxToolbar(): React.JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Downloads one of the consumer-provided formats for the currently visible
|
|
26
|
+
* image. Included in the default `LightBox.Toolbar` when options are supplied.
|
|
27
|
+
*/
|
|
28
|
+
declare function LightBoxDownloadAction({ ariaLabel, }: {
|
|
29
|
+
/**
|
|
30
|
+
* Accessible label for the action, also used as the tooltip message.
|
|
31
|
+
* @default "Download as"
|
|
32
|
+
*/
|
|
33
|
+
readonly ariaLabel?: string;
|
|
34
|
+
}): React.JSX.Element | null;
|
|
24
35
|
/**
|
|
25
36
|
* Opens the current image in a new browser tab. Included in the default
|
|
26
37
|
* `LightBox.Toolbar`. Returns `null` if the current image has no `url`.
|
|
@@ -141,6 +152,7 @@ declare namespace LightBox {
|
|
|
141
152
|
var Background: typeof LightBoxBackground;
|
|
142
153
|
var Overlay: typeof LightBoxOverlay;
|
|
143
154
|
var Toolbar: typeof LightBoxToolbar;
|
|
155
|
+
var DownloadAction: typeof LightBoxDownloadAction;
|
|
144
156
|
var OpenInNewTabAction: typeof LightBoxOpenInNewTabAction;
|
|
145
157
|
var Slides: typeof LightBoxSlides;
|
|
146
158
|
var Navigation: typeof LightBoxNavigation;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode, RefObject } from "react";
|
|
2
2
|
import type { PanInfo } from "framer-motion";
|
|
3
|
+
export interface LightBoxDownloadOption {
|
|
4
|
+
/**
|
|
5
|
+
* The label shown in the Download as menu.
|
|
6
|
+
*/
|
|
7
|
+
readonly label: string;
|
|
8
|
+
/**
|
|
9
|
+
* The URL activated when this format is downloaded.
|
|
10
|
+
*/
|
|
11
|
+
readonly url: string;
|
|
12
|
+
/**
|
|
13
|
+
* Supplemental, non-interactive information shown beside the label.
|
|
14
|
+
*/
|
|
15
|
+
readonly detail?: string;
|
|
16
|
+
}
|
|
3
17
|
export interface PresentedImage {
|
|
4
18
|
title?: string;
|
|
5
19
|
caption?: string;
|
|
6
20
|
alt?: string;
|
|
7
21
|
url: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional formats available from the Download as action.
|
|
24
|
+
*/
|
|
25
|
+
downloadOptions?: LightBoxDownloadOption[];
|
|
8
26
|
}
|
|
9
27
|
export interface RequestCloseOptions {
|
|
10
28
|
lastPosition: number;
|
package/dist/LightBox/index.cjs
CHANGED
|
@@ -21,9 +21,7 @@ require('../Text-cjs.js');
|
|
|
21
21
|
require('../Heading-cjs.js');
|
|
22
22
|
require('../Tooltip-cjs.js');
|
|
23
23
|
require('../floating-ui.react-cjs.js');
|
|
24
|
-
require('../floating-ui.utils-cjs.js');
|
|
25
24
|
require('react/jsx-runtime');
|
|
26
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
27
25
|
require('../AtlantisThemeContext-cjs.js');
|
|
28
26
|
require('../identity-cjs.js');
|
|
29
27
|
require('../isTypedArray-cjs.js');
|
|
@@ -33,6 +31,25 @@ require('../_baseFor-cjs.js');
|
|
|
33
31
|
require('../keysIn-cjs.js');
|
|
34
32
|
require('../_isIterateeCall-cjs.js');
|
|
35
33
|
require('../_setToString-cjs.js');
|
|
34
|
+
require('../Menu-cjs.js');
|
|
35
|
+
require('../useFormFieldFocus-cjs.js');
|
|
36
|
+
require('../maxHeight-cjs.js');
|
|
37
|
+
require('../useRenderElement-cjs.js');
|
|
38
|
+
require('../buttonRenderAdapter-cjs.js');
|
|
39
|
+
require('../OverlaySeparator-cjs.js');
|
|
40
|
+
require('../Separator-cjs.js');
|
|
41
|
+
require('../BottomSheet-cjs.js');
|
|
42
|
+
require('../ScrollAreaViewport-cjs.js');
|
|
43
|
+
require('../useScrollLock-cjs.js');
|
|
44
|
+
require('../scrollEdges-cjs.js');
|
|
45
|
+
require('../scrollable-cjs.js');
|
|
46
|
+
require('../HelperText-cjs.js');
|
|
47
|
+
require('../SelectPrimitive-cjs.js');
|
|
48
|
+
require('../mergeClassName-cjs.js');
|
|
49
|
+
require('../SelectGroupLabel-cjs.js');
|
|
50
|
+
require('../useCompositeListItem-cjs.js');
|
|
51
|
+
require('../DrawerTitle-cjs.js');
|
|
52
|
+
require('../MenuSubmenuTrigger-cjs.js');
|
|
36
53
|
|
|
37
54
|
|
|
38
55
|
|
package/dist/LightBox/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { LightBox } from "./LightBox";
|
|
2
|
-
export type { LightBoxProps, LightBoxProviderProps, PresentedImage, } from "./LightBox.types";
|
|
2
|
+
export type { LightBoxDownloadOption, LightBoxProps, LightBoxProviderProps, PresentedImage, } from "./LightBox.types";
|
|
3
3
|
export { useLightBoxContext } from "./LightBoxContext";
|
package/dist/LightBox/index.mjs
CHANGED
|
@@ -19,9 +19,7 @@ import '../Text-es.js';
|
|
|
19
19
|
import '../Heading-es.js';
|
|
20
20
|
import '../Tooltip-es.js';
|
|
21
21
|
import '../floating-ui.react-es.js';
|
|
22
|
-
import '../floating-ui.utils-es.js';
|
|
23
22
|
import 'react/jsx-runtime';
|
|
24
|
-
import '../floating-ui.react-dom-es.js';
|
|
25
23
|
import '../AtlantisThemeContext-es.js';
|
|
26
24
|
import '../identity-es.js';
|
|
27
25
|
import '../isTypedArray-es.js';
|
|
@@ -31,3 +29,22 @@ import '../_baseFor-es.js';
|
|
|
31
29
|
import '../keysIn-es.js';
|
|
32
30
|
import '../_isIterateeCall-es.js';
|
|
33
31
|
import '../_setToString-es.js';
|
|
32
|
+
import '../Menu-es.js';
|
|
33
|
+
import '../useFormFieldFocus-es.js';
|
|
34
|
+
import '../maxHeight-es.js';
|
|
35
|
+
import '../useRenderElement-es.js';
|
|
36
|
+
import '../buttonRenderAdapter-es.js';
|
|
37
|
+
import '../OverlaySeparator-es.js';
|
|
38
|
+
import '../Separator-es.js';
|
|
39
|
+
import '../BottomSheet-es.js';
|
|
40
|
+
import '../ScrollAreaViewport-es.js';
|
|
41
|
+
import '../useScrollLock-es.js';
|
|
42
|
+
import '../scrollEdges-es.js';
|
|
43
|
+
import '../scrollable-es.js';
|
|
44
|
+
import '../HelperText-es.js';
|
|
45
|
+
import '../SelectPrimitive-es.js';
|
|
46
|
+
import '../mergeClassName-es.js';
|
|
47
|
+
import '../SelectGroupLabel-es.js';
|
|
48
|
+
import '../useCompositeListItem-es.js';
|
|
49
|
+
import '../DrawerTitle-es.js';
|
|
50
|
+
import '../MenuSubmenuTrigger-es.js';
|
package/dist/LightBox-cjs.js
CHANGED
|
@@ -14,8 +14,9 @@ var Button = require('./Button-cjs.js');
|
|
|
14
14
|
var Heading = require('./Heading-cjs.js');
|
|
15
15
|
var Tooltip = require('./Tooltip-cjs.js');
|
|
16
16
|
var AtlantisThemeContext = require('./AtlantisThemeContext-cjs.js');
|
|
17
|
+
var Menu = require('./Menu-cjs.js');
|
|
17
18
|
|
|
18
|
-
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","
|
|
19
|
+
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","leftActions":"OunDmtPpa9g-","downloadOptionContent":"TPSJq-8p0vo-","downloadOptionLabel":"vZU6ZSl8QLI-","downloadOptionDetail":"vubHTSF4aYA-","image":"yYFVVScosfQ-","imageArea":"UskuwLHR6fg-","captionWrapper":"OGjhge-r-U4-","title":"tZU2g-NYdIs-","blurOverlay":"GKIdLTmvcvQ-","thumbnailBar":"_3TfQLQEE3GQ-","thumbnailImage":"eBMzUOlcfQ4-","thumbnail":"eapm2zruLn8-","selected":"PeLn2u-QB0k-","spinning":"_8tDoqjgfLcw-"};
|
|
19
20
|
|
|
20
21
|
// A little bit more than the transition's duration
|
|
21
22
|
// We're doing this to prevent a bug from framer-motion
|
|
@@ -188,6 +189,10 @@ const lightBoxMessages = useAtlantisI18n.defineMessages({
|
|
|
188
189
|
en: "Next image",
|
|
189
190
|
es: "Imagen siguiente",
|
|
190
191
|
},
|
|
192
|
+
downloadAs: {
|
|
193
|
+
en: "Download as",
|
|
194
|
+
es: "Descargar como",
|
|
195
|
+
},
|
|
191
196
|
openInNewTab: {
|
|
192
197
|
en: "Open image in new tab",
|
|
193
198
|
es: "Abrir imagen en nueva pestaña",
|
|
@@ -249,12 +254,36 @@ function LightBoxToolbar() {
|
|
|
249
254
|
const { t } = useAtlantisI18n.useAtlantisI18n(lightBoxMessages);
|
|
250
255
|
return (React.createElement(AtlantisThemeContext.AtlantisThemeContextProvider, { dangerouslyOverrideTheme: "dark" },
|
|
251
256
|
React.createElement("div", { className: styles.toolbar },
|
|
252
|
-
React.createElement(
|
|
257
|
+
React.createElement("div", { className: styles.leftActions },
|
|
258
|
+
React.createElement(LightBox.DownloadAction, null),
|
|
259
|
+
React.createElement(LightBoxOpenInNewTabAction, null)),
|
|
253
260
|
React.createElement("div", { className: styles.slideNumber },
|
|
254
261
|
React.createElement(Text.Text, null, `${currentImageIndex + 1}/${images.length}`)),
|
|
255
262
|
React.createElement("div", { className: styles.closeButton },
|
|
256
263
|
React.createElement(ButtonDismiss.ButtonDismiss, { ariaLabel: t("close"), onClick: handleRequestClose })))));
|
|
257
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Downloads one of the consumer-provided formats for the currently visible
|
|
267
|
+
* image. Included in the default `LightBox.Toolbar` when options are supplied.
|
|
268
|
+
*/
|
|
269
|
+
function LightBoxDownloadAction({ ariaLabel, }) {
|
|
270
|
+
var _a;
|
|
271
|
+
const { images, currentImageIndex } = useLightBoxContext();
|
|
272
|
+
const { t } = useAtlantisI18n.useAtlantisI18n(lightBoxMessages);
|
|
273
|
+
const downloadOptions = (_a = images[currentImageIndex]) === null || _a === void 0 ? void 0 : _a.downloadOptions;
|
|
274
|
+
const effectiveAriaLabel = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t("downloadAs");
|
|
275
|
+
if (!(downloadOptions === null || downloadOptions === void 0 ? void 0 : downloadOptions.length))
|
|
276
|
+
return null;
|
|
277
|
+
return (React.createElement(Menu.Menu, null,
|
|
278
|
+
React.createElement(Tooltip.Tooltip, { message: effectiveAriaLabel },
|
|
279
|
+
React.createElement(Menu.Menu.Trigger, null,
|
|
280
|
+
React.createElement(Button.Button, { size: "small", variation: "subtle", type: "secondary", icon: "download", ariaLabel: effectiveAriaLabel }))),
|
|
281
|
+
React.createElement(Menu.Menu.Content, { style: { width: "240px" }, preferredPlacement: "bottom" }, downloadOptions.map(option => (React.createElement(Menu.Menu.Item, { key: `${option.label}-${option.url}`, textValue: [option.label, option.detail].filter(Boolean).join(" "), href: option.url },
|
|
282
|
+
React.createElement(Menu.Menu.ItemLabel, null,
|
|
283
|
+
React.createElement("span", { className: styles.downloadOptionContent },
|
|
284
|
+
React.createElement("span", { className: styles.downloadOptionLabel }, option.label),
|
|
285
|
+
option.detail ? (React.createElement("span", { className: styles.downloadOptionDetail }, option.detail)) : null))))))));
|
|
286
|
+
}
|
|
258
287
|
/**
|
|
259
288
|
* Opens the current image in a new browser tab. Included in the default
|
|
260
289
|
* `LightBox.Toolbar`. Returns `null` if the current image has no `url`.
|
|
@@ -266,9 +295,8 @@ function LightBoxOpenInNewTabAction({ ariaLabel, }) {
|
|
|
266
295
|
const currentImage = images[currentImageIndex];
|
|
267
296
|
if (!(currentImage === null || currentImage === void 0 ? void 0 : currentImage.url))
|
|
268
297
|
return null;
|
|
269
|
-
return (React.createElement(
|
|
270
|
-
React.createElement(
|
|
271
|
-
React.createElement(Button.Button, { size: "small", variation: "subtle", type: "secondary", icon: "export", ariaLabel: effectiveAriaLabel, url: currentImage.url, external: true }))));
|
|
298
|
+
return (React.createElement(Tooltip.Tooltip, { message: effectiveAriaLabel },
|
|
299
|
+
React.createElement(Button.Button, { size: "small", variation: "subtle", type: "secondary", icon: "export", ariaLabel: effectiveAriaLabel, url: currentImage.url, external: true })));
|
|
272
300
|
}
|
|
273
301
|
/**
|
|
274
302
|
* The animated hero image with swipe-to-navigate and slide animation.
|
|
@@ -420,6 +448,7 @@ LightBox.Content = LightBoxContent;
|
|
|
420
448
|
LightBox.Background = LightBoxBackground;
|
|
421
449
|
LightBox.Overlay = LightBoxOverlay;
|
|
422
450
|
LightBox.Toolbar = LightBoxToolbar;
|
|
451
|
+
LightBox.DownloadAction = LightBoxDownloadAction;
|
|
423
452
|
LightBox.OpenInNewTabAction = LightBoxOpenInNewTabAction;
|
|
424
453
|
LightBox.Slides = LightBoxSlides;
|
|
425
454
|
LightBox.Navigation = LightBoxNavigation;
|
package/dist/LightBox-es.js
CHANGED
|
@@ -12,8 +12,9 @@ import { B as Button } from './Button-es.js';
|
|
|
12
12
|
import { H as Heading } from './Heading-es.js';
|
|
13
13
|
import { T as Tooltip } from './Tooltip-es.js';
|
|
14
14
|
import { A as AtlantisThemeContextProvider } from './AtlantisThemeContext-es.js';
|
|
15
|
+
import { M as Menu } from './Menu-es.js';
|
|
15
16
|
|
|
16
|
-
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","
|
|
17
|
+
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","leftActions":"OunDmtPpa9g-","downloadOptionContent":"TPSJq-8p0vo-","downloadOptionLabel":"vZU6ZSl8QLI-","downloadOptionDetail":"vubHTSF4aYA-","image":"yYFVVScosfQ-","imageArea":"UskuwLHR6fg-","captionWrapper":"OGjhge-r-U4-","title":"tZU2g-NYdIs-","blurOverlay":"GKIdLTmvcvQ-","thumbnailBar":"_3TfQLQEE3GQ-","thumbnailImage":"eBMzUOlcfQ4-","thumbnail":"eapm2zruLn8-","selected":"PeLn2u-QB0k-","spinning":"_8tDoqjgfLcw-"};
|
|
17
18
|
|
|
18
19
|
// A little bit more than the transition's duration
|
|
19
20
|
// We're doing this to prevent a bug from framer-motion
|
|
@@ -186,6 +187,10 @@ const lightBoxMessages = defineMessages({
|
|
|
186
187
|
en: "Next image",
|
|
187
188
|
es: "Imagen siguiente",
|
|
188
189
|
},
|
|
190
|
+
downloadAs: {
|
|
191
|
+
en: "Download as",
|
|
192
|
+
es: "Descargar como",
|
|
193
|
+
},
|
|
189
194
|
openInNewTab: {
|
|
190
195
|
en: "Open image in new tab",
|
|
191
196
|
es: "Abrir imagen en nueva pestaña",
|
|
@@ -247,12 +252,36 @@ function LightBoxToolbar() {
|
|
|
247
252
|
const { t } = useAtlantisI18n(lightBoxMessages);
|
|
248
253
|
return (React__default.createElement(AtlantisThemeContextProvider, { dangerouslyOverrideTheme: "dark" },
|
|
249
254
|
React__default.createElement("div", { className: styles.toolbar },
|
|
250
|
-
React__default.createElement(
|
|
255
|
+
React__default.createElement("div", { className: styles.leftActions },
|
|
256
|
+
React__default.createElement(LightBox.DownloadAction, null),
|
|
257
|
+
React__default.createElement(LightBoxOpenInNewTabAction, null)),
|
|
251
258
|
React__default.createElement("div", { className: styles.slideNumber },
|
|
252
259
|
React__default.createElement(Text, null, `${currentImageIndex + 1}/${images.length}`)),
|
|
253
260
|
React__default.createElement("div", { className: styles.closeButton },
|
|
254
261
|
React__default.createElement(ButtonDismiss, { ariaLabel: t("close"), onClick: handleRequestClose })))));
|
|
255
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Downloads one of the consumer-provided formats for the currently visible
|
|
265
|
+
* image. Included in the default `LightBox.Toolbar` when options are supplied.
|
|
266
|
+
*/
|
|
267
|
+
function LightBoxDownloadAction({ ariaLabel, }) {
|
|
268
|
+
var _a;
|
|
269
|
+
const { images, currentImageIndex } = useLightBoxContext();
|
|
270
|
+
const { t } = useAtlantisI18n(lightBoxMessages);
|
|
271
|
+
const downloadOptions = (_a = images[currentImageIndex]) === null || _a === void 0 ? void 0 : _a.downloadOptions;
|
|
272
|
+
const effectiveAriaLabel = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t("downloadAs");
|
|
273
|
+
if (!(downloadOptions === null || downloadOptions === void 0 ? void 0 : downloadOptions.length))
|
|
274
|
+
return null;
|
|
275
|
+
return (React__default.createElement(Menu, null,
|
|
276
|
+
React__default.createElement(Tooltip, { message: effectiveAriaLabel },
|
|
277
|
+
React__default.createElement(Menu.Trigger, null,
|
|
278
|
+
React__default.createElement(Button, { size: "small", variation: "subtle", type: "secondary", icon: "download", ariaLabel: effectiveAriaLabel }))),
|
|
279
|
+
React__default.createElement(Menu.Content, { style: { width: "240px" }, preferredPlacement: "bottom" }, downloadOptions.map(option => (React__default.createElement(Menu.Item, { key: `${option.label}-${option.url}`, textValue: [option.label, option.detail].filter(Boolean).join(" "), href: option.url },
|
|
280
|
+
React__default.createElement(Menu.ItemLabel, null,
|
|
281
|
+
React__default.createElement("span", { className: styles.downloadOptionContent },
|
|
282
|
+
React__default.createElement("span", { className: styles.downloadOptionLabel }, option.label),
|
|
283
|
+
option.detail ? (React__default.createElement("span", { className: styles.downloadOptionDetail }, option.detail)) : null))))))));
|
|
284
|
+
}
|
|
256
285
|
/**
|
|
257
286
|
* Opens the current image in a new browser tab. Included in the default
|
|
258
287
|
* `LightBox.Toolbar`. Returns `null` if the current image has no `url`.
|
|
@@ -264,9 +293,8 @@ function LightBoxOpenInNewTabAction({ ariaLabel, }) {
|
|
|
264
293
|
const currentImage = images[currentImageIndex];
|
|
265
294
|
if (!(currentImage === null || currentImage === void 0 ? void 0 : currentImage.url))
|
|
266
295
|
return null;
|
|
267
|
-
return (React__default.createElement(
|
|
268
|
-
React__default.createElement(
|
|
269
|
-
React__default.createElement(Button, { size: "small", variation: "subtle", type: "secondary", icon: "export", ariaLabel: effectiveAriaLabel, url: currentImage.url, external: true }))));
|
|
296
|
+
return (React__default.createElement(Tooltip, { message: effectiveAriaLabel },
|
|
297
|
+
React__default.createElement(Button, { size: "small", variation: "subtle", type: "secondary", icon: "export", ariaLabel: effectiveAriaLabel, url: currentImage.url, external: true })));
|
|
270
298
|
}
|
|
271
299
|
/**
|
|
272
300
|
* The animated hero image with swipe-to-navigate and slide animation.
|
|
@@ -418,6 +446,7 @@ LightBox.Content = LightBoxContent;
|
|
|
418
446
|
LightBox.Background = LightBoxBackground;
|
|
419
447
|
LightBox.Overlay = LightBoxOverlay;
|
|
420
448
|
LightBox.Toolbar = LightBoxToolbar;
|
|
449
|
+
LightBox.DownloadAction = LightBoxDownloadAction;
|
|
421
450
|
LightBox.OpenInNewTabAction = LightBoxOpenInNewTabAction;
|
|
422
451
|
LightBox.Slides = LightBoxSlides;
|
|
423
452
|
LightBox.Navigation = LightBoxNavigation;
|
package/dist/Menu/index.cjs
CHANGED
|
@@ -6,10 +6,8 @@ require('@jobber/hooks');
|
|
|
6
6
|
require('classnames');
|
|
7
7
|
require('framer-motion');
|
|
8
8
|
require('../floating-ui.react-cjs.js');
|
|
9
|
-
require('../floating-ui.utils-cjs.js');
|
|
10
9
|
require('react/jsx-runtime');
|
|
11
10
|
require('react-dom');
|
|
12
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
13
11
|
require('../useAtlantisI18n-cjs.js');
|
|
14
12
|
require('../AtlantisContext-cjs.js');
|
|
15
13
|
require('../Button-cjs.js');
|
|
@@ -28,6 +26,7 @@ require('../BottomSheet-cjs.js');
|
|
|
28
26
|
require('../ScrollAreaViewport-cjs.js');
|
|
29
27
|
require('../useScrollLock-cjs.js');
|
|
30
28
|
require('../scrollEdges-cjs.js');
|
|
29
|
+
require('../scrollable-cjs.js');
|
|
31
30
|
require('../HelperText-cjs.js');
|
|
32
31
|
require('../Text-cjs.js');
|
|
33
32
|
require('../SelectPrimitive-cjs.js');
|
package/dist/Menu/index.mjs
CHANGED
|
@@ -4,10 +4,8 @@ import '@jobber/hooks';
|
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import 'framer-motion';
|
|
6
6
|
import '../floating-ui.react-es.js';
|
|
7
|
-
import '../floating-ui.utils-es.js';
|
|
8
7
|
import 'react/jsx-runtime';
|
|
9
8
|
import 'react-dom';
|
|
10
|
-
import '../floating-ui.react-dom-es.js';
|
|
11
9
|
import '../useAtlantisI18n-es.js';
|
|
12
10
|
import '../AtlantisContext-es.js';
|
|
13
11
|
import '../Button-es.js';
|
|
@@ -26,6 +24,7 @@ import '../BottomSheet-es.js';
|
|
|
26
24
|
import '../ScrollAreaViewport-es.js';
|
|
27
25
|
import '../useScrollLock-es.js';
|
|
28
26
|
import '../scrollEdges-es.js';
|
|
27
|
+
import '../scrollable-es.js';
|
|
29
28
|
import '../HelperText-es.js';
|
|
30
29
|
import '../Text-es.js';
|
|
31
30
|
import '../SelectPrimitive-es.js';
|