@jobber/components 6.86.0 → 6.86.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 +6 -6
- package/dist/Autocomplete/index.mjs +11 -11
- package/dist/Banner-cjs.js +1 -1
- package/dist/Banner-es.js +1 -1
- package/dist/Chip-cjs.js +2 -2
- package/dist/Chip-es.js +3 -3
- package/dist/Combobox-cjs.js +1 -1
- package/dist/Combobox-es.js +2 -2
- package/dist/ComboboxContent-cjs.js +2 -2
- package/dist/ComboboxContent-es.js +5 -5
- package/dist/ComboboxLoadMore-cjs.js +1 -1
- package/dist/ComboboxLoadMore-es.js +2 -2
- package/dist/ConfirmationModal-cjs.js +1 -1
- package/dist/ConfirmationModal-es.js +2 -2
- package/dist/ContentBlock-cjs.js +1 -1
- package/dist/ContentBlock-es.js +2 -2
- package/dist/DataListActionsMenu-cjs.js +4 -4
- package/dist/DataListActionsMenu-es.js +8 -8
- package/dist/DataListHeaderTile-cjs.js +1 -1
- package/dist/DataListHeaderTile-es.js +2 -2
- package/dist/DataListLoadMore-cjs.js +1 -1
- package/dist/DataListLoadMore-es.js +2 -2
- package/dist/DataListOverflowFade-cjs.js +2 -2
- package/dist/DataListOverflowFade-es.js +3 -3
- package/dist/DataListSearch-cjs.js +1 -1
- package/dist/DataListSearch-es.js +2 -2
- package/dist/DataListSortingOptions-cjs.js +2 -2
- package/dist/DataListSortingOptions-es.js +4 -4
- package/dist/DataTable/test-utilities/index.cjs +1 -1
- package/dist/DataTable/test-utilities/index.mjs +1 -1
- package/dist/DataTable-cjs.js +3 -3
- package/dist/DataTable-es.js +4 -4
- package/dist/DatePicker-cjs.js +1 -1
- package/dist/DatePicker-es.js +2 -2
- package/dist/Disclosure-cjs.js +2 -2
- package/dist/Disclosure-es.js +3 -3
- package/dist/FormField-cjs.js +1 -5
- package/dist/FormField-es.js +1 -5
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/index.cjs +2 -2
- package/dist/InputText/index.mjs +3 -3
- package/dist/LightBox-cjs.js +51 -67
- package/dist/LightBox-es.js +57 -73
- package/dist/Menu-cjs.js +6 -11
- package/dist/Menu-es.js +11 -16
- package/dist/Modal/index.cjs +3 -3
- package/dist/Modal/index.mjs +7 -7
- package/dist/Page-cjs.js +4 -4
- package/dist/Page-es.js +5 -5
- package/dist/Popover-cjs.js +1 -1
- package/dist/Popover-es.js +3 -3
- package/dist/SideDrawer-cjs.js +6 -6
- package/dist/SideDrawer-es.js +10 -10
- package/dist/Tooltip-cjs.js +2 -2
- package/dist/Tooltip-es.js +5 -5
- package/dist/floating-ui.react-es.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +5 -5
- package/dist/throttle-cjs.js +0 -1
- package/dist/throttle-es.js +1 -1
- package/dist/useDebounce-cjs.js +69 -4381
- package/dist/useDebounce-es.js +71 -4383
- package/dist/useFocusTrap-cjs.js +3 -8
- package/dist/useFocusTrap-es.js +4 -9
- package/dist/useInView-cjs.js +5 -10
- package/dist/useInView-es.js +6 -11
- package/dist/useIsMounted-cjs.js +4 -19
- package/dist/useIsMounted-es.js +5 -20
- package/dist/useOnKeyDown-cjs.js +2 -7
- package/dist/useOnKeyDown-es.js +3 -8
- package/dist/useRefocusOnActivator-cjs.js +2 -7
- package/dist/useRefocusOnActivator-es.js +3 -8
- package/dist/useResizeObserver-cjs.js +64 -92
- package/dist/useResizeObserver-es.js +65 -94
- package/dist/useSafeLayoutEffect-cjs.js +3 -8
- package/dist/useSafeLayoutEffect-es.js +5 -10
- package/dist/useScrollToActive-cjs.js +4 -9
- package/dist/useScrollToActive-es.js +6 -11
- package/package.json +3 -3
|
@@ -1023,7 +1023,7 @@ function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
|
1023
1023
|
: {})));
|
|
1024
1024
|
// While DefaultMenu leverages conditional rendering, CustomMenu is hidden with CSS
|
|
1025
1025
|
// We need to apply the correct update method to each case
|
|
1026
|
-
useSafeLayoutEffect.
|
|
1026
|
+
useSafeLayoutEffect.useSafeLayoutEffect(() => {
|
|
1027
1027
|
if (cssManagedVisibility && visible && attachTo && refs.floating.current) {
|
|
1028
1028
|
const cleanup = floatingUi_react.autoUpdate(attachTo, refs.floating.current, update);
|
|
1029
1029
|
return cleanup;
|
|
@@ -1067,7 +1067,7 @@ function useAutocompleteMenu({ attachTo, }) {
|
|
|
1067
1067
|
return { MenuWrapper: AutocompleteMenuWrapper, menuRef };
|
|
1068
1068
|
}
|
|
1069
1069
|
function BaseAutocompleteMenuWrapper(props) {
|
|
1070
|
-
const mounted = useIsMounted.
|
|
1070
|
+
const mounted = useIsMounted.useIsMounted();
|
|
1071
1071
|
const menu = React.createElement(BaseAutocompleteMenuWrapperInternal, Object.assign({}, props));
|
|
1072
1072
|
return mounted.current ? React.createElement(floatingUi_react.FloatingPortal, null, menu) : menu;
|
|
1073
1073
|
}
|
|
@@ -1141,13 +1141,13 @@ exports.KeyboardAction = void 0;
|
|
|
1141
1141
|
* Use this hook if you are using components in the menu that aren't MenuOption or BaseMenuOption.
|
|
1142
1142
|
*/
|
|
1143
1143
|
function useCustomKeyboardNavigation({ onRequestHighlightChange, }) {
|
|
1144
|
-
useOnKeyDown.
|
|
1144
|
+
useOnKeyDown.useOnKeyDown((event) => {
|
|
1145
1145
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, exports.KeyboardAction.Next);
|
|
1146
1146
|
}, "ArrowDown");
|
|
1147
|
-
useOnKeyDown.
|
|
1147
|
+
useOnKeyDown.useOnKeyDown((event) => {
|
|
1148
1148
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, exports.KeyboardAction.Previous);
|
|
1149
1149
|
}, "ArrowUp");
|
|
1150
|
-
useOnKeyDown.
|
|
1150
|
+
useOnKeyDown.useOnKeyDown((event) => {
|
|
1151
1151
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, exports.KeyboardAction.Select);
|
|
1152
1152
|
}, "Enter");
|
|
1153
1153
|
}
|
|
@@ -1259,7 +1259,7 @@ function AutocompleteInternal(_a, ref) {
|
|
|
1259
1259
|
const [inputFocused, setInputFocused] = React.useState(false);
|
|
1260
1260
|
const [inputText, setInputText] = React.useState((_b = value === null || value === void 0 ? void 0 : value.label) !== null && _b !== void 0 ? _b : "");
|
|
1261
1261
|
const [autocompleteRef, setAutocompleteRef] = React.useState(null);
|
|
1262
|
-
const delayedSearch = useDebounce.
|
|
1262
|
+
const delayedSearch = useDebounce.useDebounce(updateSearch, debounceRate);
|
|
1263
1263
|
const inputRef = React.useRef(null);
|
|
1264
1264
|
React.useEffect(() => {
|
|
1265
1265
|
delayedSearch();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useEffect, useCallback, useMemo, forwardRef } from 'react';
|
|
2
|
-
import { u as useFloating,
|
|
2
|
+
import { u as useFloating, c as autoUpdate, o as offset, f as flip, s as size, r as useListNavigation, a as useDismiss, b as useInteractions, t as useTransitionStyles, F as FloatingPortal, q as FloatingFocusManager } from '../floating-ui.react-es.js';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { tokens } from '@jobber/design';
|
|
5
5
|
import { useCallbackRef, useDebounce } from '@jobber/hooks';
|
|
@@ -12,10 +12,10 @@ import { InputText } from '../InputText/index.mjs';
|
|
|
12
12
|
import { G as Glimmer } from '../Glimmer-es.js';
|
|
13
13
|
import { m as mergeRefs } from '../FormField-es.js';
|
|
14
14
|
import { _ as __rest, a as __awaiter } from '../tslib.es6-es.js';
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
18
|
-
import { u as
|
|
15
|
+
import { u as useDebounce$1 } from '../useDebounce-es.js';
|
|
16
|
+
import { u as useIsMounted } from '../useIsMounted-es.js';
|
|
17
|
+
import { u as useSafeLayoutEffect } from '../useSafeLayoutEffect-es.js';
|
|
18
|
+
import { u as useOnKeyDown } from '../useOnKeyDown-es.js';
|
|
19
19
|
import 'react-dom';
|
|
20
20
|
import 'react-hook-form';
|
|
21
21
|
import 'framer-motion';
|
|
@@ -1021,7 +1021,7 @@ function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
|
1021
1021
|
: {})));
|
|
1022
1022
|
// While DefaultMenu leverages conditional rendering, CustomMenu is hidden with CSS
|
|
1023
1023
|
// We need to apply the correct update method to each case
|
|
1024
|
-
|
|
1024
|
+
useSafeLayoutEffect(() => {
|
|
1025
1025
|
if (cssManagedVisibility && visible && attachTo && refs.floating.current) {
|
|
1026
1026
|
const cleanup = autoUpdate(attachTo, refs.floating.current, update);
|
|
1027
1027
|
return cleanup;
|
|
@@ -1065,7 +1065,7 @@ function useAutocompleteMenu({ attachTo, }) {
|
|
|
1065
1065
|
return { MenuWrapper: AutocompleteMenuWrapper, menuRef };
|
|
1066
1066
|
}
|
|
1067
1067
|
function BaseAutocompleteMenuWrapper(props) {
|
|
1068
|
-
const mounted =
|
|
1068
|
+
const mounted = useIsMounted();
|
|
1069
1069
|
const menu = React__default.createElement(BaseAutocompleteMenuWrapperInternal, Object.assign({}, props));
|
|
1070
1070
|
return mounted.current ? React__default.createElement(FloatingPortal, null, menu) : menu;
|
|
1071
1071
|
}
|
|
@@ -1139,13 +1139,13 @@ var KeyboardAction;
|
|
|
1139
1139
|
* Use this hook if you are using components in the menu that aren't MenuOption or BaseMenuOption.
|
|
1140
1140
|
*/
|
|
1141
1141
|
function useCustomKeyboardNavigation({ onRequestHighlightChange, }) {
|
|
1142
|
-
|
|
1142
|
+
useOnKeyDown((event) => {
|
|
1143
1143
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, KeyboardAction.Next);
|
|
1144
1144
|
}, "ArrowDown");
|
|
1145
|
-
|
|
1145
|
+
useOnKeyDown((event) => {
|
|
1146
1146
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, KeyboardAction.Previous);
|
|
1147
1147
|
}, "ArrowUp");
|
|
1148
|
-
|
|
1148
|
+
useOnKeyDown((event) => {
|
|
1149
1149
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, KeyboardAction.Select);
|
|
1150
1150
|
}, "Enter");
|
|
1151
1151
|
}
|
|
@@ -1257,7 +1257,7 @@ function AutocompleteInternal(_a, ref) {
|
|
|
1257
1257
|
const [inputFocused, setInputFocused] = useState(false);
|
|
1258
1258
|
const [inputText, setInputText] = useState((_b = value === null || value === void 0 ? void 0 : value.label) !== null && _b !== void 0 ? _b : "");
|
|
1259
1259
|
const [autocompleteRef, setAutocompleteRef] = useState(null);
|
|
1260
|
-
const delayedSearch =
|
|
1260
|
+
const delayedSearch = useDebounce$1(updateSearch, debounceRate);
|
|
1261
1261
|
const inputRef = useRef(null);
|
|
1262
1262
|
useEffect(() => {
|
|
1263
1263
|
delayedSearch();
|
package/dist/Banner-cjs.js
CHANGED
|
@@ -58,7 +58,7 @@ function InternalWrapper({ children, icon, dismissButton, UNSAFE_className, UNSA
|
|
|
58
58
|
small: 320,
|
|
59
59
|
medium: 480,
|
|
60
60
|
};
|
|
61
|
-
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver.useResizeObserver
|
|
61
|
+
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver.useResizeObserver({
|
|
62
62
|
widths: bannerWidths,
|
|
63
63
|
});
|
|
64
64
|
const bannerClassNames = classnames(styles.banner, [styles[type]], {
|
package/dist/Banner-es.js
CHANGED
|
@@ -56,7 +56,7 @@ function InternalWrapper({ children, icon, dismissButton, UNSAFE_className, UNSA
|
|
|
56
56
|
small: 320,
|
|
57
57
|
medium: 480,
|
|
58
58
|
};
|
|
59
|
-
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver
|
|
59
|
+
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver({
|
|
60
60
|
widths: bannerWidths,
|
|
61
61
|
});
|
|
62
62
|
const bannerClassNames = classnames(styles.banner, [styles[type]], {
|
package/dist/Chip-cjs.js
CHANGED
|
@@ -72,8 +72,8 @@ const ChipComponent = React.forwardRef(({ ariaLabel, disabled, heading, invalid,
|
|
|
72
72
|
});
|
|
73
73
|
const prefix = useChildComponent.useChildComponent(children, d => d.type === ChipPrefix);
|
|
74
74
|
const suffix = useChildComponent.useChildComponent(children, d => d.type === ChipSuffix);
|
|
75
|
-
const [labelRef, labelFullyVisible] = useInView.
|
|
76
|
-
const [headingRef, headingFullyVisible] = useInView.
|
|
75
|
+
const [labelRef, labelFullyVisible] = useInView.useInView();
|
|
76
|
+
const [headingRef, headingFullyVisible] = useInView.useInView();
|
|
77
77
|
const tooltipMessage = getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading);
|
|
78
78
|
const chipContent = (React.createElement(React.Fragment, null,
|
|
79
79
|
prefix,
|
package/dist/Chip-es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef, forwardRef } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { u as
|
|
3
|
+
import { u as useInView } from './useInView-es.js';
|
|
4
4
|
import { A as Avatar } from './Avatar-es.js';
|
|
5
5
|
import { I as Icon } from './Icon-es.js';
|
|
6
6
|
import { u as useChildComponent } from './useChildComponent-es.js';
|
|
@@ -70,8 +70,8 @@ const ChipComponent = forwardRef(({ ariaLabel, disabled, heading, invalid, label
|
|
|
70
70
|
});
|
|
71
71
|
const prefix = useChildComponent(children, d => d.type === ChipPrefix);
|
|
72
72
|
const suffix = useChildComponent(children, d => d.type === ChipSuffix);
|
|
73
|
-
const [labelRef, labelFullyVisible] =
|
|
74
|
-
const [headingRef, headingFullyVisible] =
|
|
73
|
+
const [labelRef, labelFullyVisible] = useInView();
|
|
74
|
+
const [headingRef, headingFullyVisible] = useInView();
|
|
75
75
|
const tooltipMessage = getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading);
|
|
76
76
|
const chipContent = (React__default.createElement(React__default.Fragment, null,
|
|
77
77
|
prefix,
|
package/dist/Combobox-cjs.js
CHANGED
|
@@ -57,7 +57,7 @@ function useCombobox(selected, onSelect, options, onClose, multiSelect, onSearch
|
|
|
57
57
|
const shouldScroll = React.useRef(false);
|
|
58
58
|
const [open, setOpen] = React.useState(false);
|
|
59
59
|
const [searchValue, setSearchValue] = React.useState("");
|
|
60
|
-
const searchCallback = useDebounce.
|
|
60
|
+
const searchCallback = useDebounce.useDebounce((value) => onSearch === null || onSearch === void 0 ? void 0 : onSearch(value), debounceTime);
|
|
61
61
|
const { handleClose, handleSelection, handleOpen } = useMakeComboboxHandlers(setOpen, open, setSearchValue, selected, shouldScroll, onSelect, multiSelect, onClose, onSearch);
|
|
62
62
|
const internalFilteredOptions = options.filter(option => option.label.toLowerCase().includes(searchValue.toLowerCase()));
|
|
63
63
|
return {
|
package/dist/Combobox-es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { C as ComboboxContextProvider } from './ComboboxProvider-es.js';
|
|
|
5
5
|
import { C as ComboboxTrigger } from './ComboboxTrigger-es.js';
|
|
6
6
|
import { C as ComboboxOption } from './ComboboxOption-es.js';
|
|
7
7
|
import { n as noop } from './noop-es.js';
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as useDebounce } from './useDebounce-es.js';
|
|
9
9
|
import { C as ComboboxActivator } from './ComboboxActivator-es.js';
|
|
10
10
|
|
|
11
11
|
var styles = {"overlay":"xxU2WqkpXZU-","wrapper":"W-9SMjhEMpI-","spinning":"mqMvu8yxz2w-"};
|
|
@@ -55,7 +55,7 @@ function useCombobox(selected, onSelect, options, onClose, multiSelect, onSearch
|
|
|
55
55
|
const shouldScroll = useRef(false);
|
|
56
56
|
const [open, setOpen] = useState(false);
|
|
57
57
|
const [searchValue, setSearchValue] = useState("");
|
|
58
|
-
const searchCallback =
|
|
58
|
+
const searchCallback = useDebounce((value) => onSearch === null || onSearch === void 0 ? void 0 : onSearch(value), debounceTime);
|
|
59
59
|
const { handleClose, handleSelection, handleOpen } = useMakeComboboxHandlers(setOpen, open, setSearchValue, selected, shouldScroll, onSelect, multiSelect, onClose, onSearch);
|
|
60
60
|
const internalFilteredOptions = options.filter(option => option.label.toLowerCase().includes(searchValue.toLowerCase()));
|
|
61
61
|
return {
|
|
@@ -50,8 +50,8 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
50
50
|
const focusedIndex = React.useRef(null);
|
|
51
51
|
const parentNodeId = floatingUi_react.useFloatingParentNodeId();
|
|
52
52
|
const nodeId = floatingUi_react.useFloatingNodeId();
|
|
53
|
-
useRefocusOnActivator.
|
|
54
|
-
const floatingRef = useFocusTrap.
|
|
53
|
+
useRefocusOnActivator.useRefocusOnActivator(open);
|
|
54
|
+
const floatingRef = useFocusTrap.useFocusTrap(open);
|
|
55
55
|
const { floatingStyles, update, context } = floatingUi_react.useFloating({
|
|
56
56
|
nodeId,
|
|
57
57
|
elements: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React__default, { useContext, useRef, useEffect, useMemo } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { g as useFloatingParentNodeId, h as useFloatingNodeId, u as useFloating, o as offset, f as flip,
|
|
3
|
+
import { g as useFloatingParentNodeId, h as useFloatingNodeId, u as useFloating, o as offset, f as flip, c as autoUpdate, a as useDismiss, b as useInteractions, i as FloatingTree, j as FloatingNode, F as FloatingPortal } from './floating-ui.react-es.js';
|
|
4
4
|
import { C as ComboboxContentSearch } from './ComboboxContentSearch-es.js';
|
|
5
5
|
import { C as ComboboxContentList } from './ComboboxContentList-es.js';
|
|
6
6
|
import { C as ComboboxContentHeader } from './ComboboxContentHeader-es.js';
|
|
7
7
|
import { a as ComboboxContext } from './ComboboxProvider-es.js';
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
8
|
+
import { u as useRefocusOnActivator } from './useRefocusOnActivator-es.js';
|
|
9
|
+
import { u as useFocusTrap } from './useFocusTrap-es.js';
|
|
10
10
|
import { C as COMBOBOX_MENU_ID } from './constants-es.js';
|
|
11
11
|
|
|
12
12
|
var styles = {"content":"QsRc49DHSgA-","hidden":"_7Fd5XGsPpUA-","actions":"yV8-0Hs43J0-","actionPadding":"g3Gdt8jXvFk-","spinning":"dJVYYOaf04E-"};
|
|
@@ -48,8 +48,8 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
48
48
|
const focusedIndex = useRef(null);
|
|
49
49
|
const parentNodeId = useFloatingParentNodeId();
|
|
50
50
|
const nodeId = useFloatingNodeId();
|
|
51
|
-
|
|
52
|
-
const floatingRef =
|
|
51
|
+
useRefocusOnActivator(open);
|
|
52
|
+
const floatingRef = useFocusTrap(open);
|
|
53
53
|
const { floatingStyles, update, context } = useFloating({
|
|
54
54
|
nodeId,
|
|
55
55
|
elements: {
|
|
@@ -6,7 +6,7 @@ var useInView = require('./useInView-cjs.js');
|
|
|
6
6
|
var styles = {"trigger":"jPB--ZCYNNI-","spinning":"aW61BrnGmcw-"};
|
|
7
7
|
|
|
8
8
|
function ComboboxLoadMore({ onLoadMore }) {
|
|
9
|
-
const [inViewRef, isInView] = useInView.
|
|
9
|
+
const [inViewRef, isInView] = useInView.useInView();
|
|
10
10
|
React.useEffect(() => {
|
|
11
11
|
isInView && onLoadMore();
|
|
12
12
|
}, [isInView]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React__default, { useEffect } from 'react';
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as useInView } from './useInView-es.js';
|
|
3
3
|
|
|
4
4
|
var styles = {"trigger":"jPB--ZCYNNI-","spinning":"aW61BrnGmcw-"};
|
|
5
5
|
|
|
6
6
|
function ComboboxLoadMore({ onLoadMore }) {
|
|
7
|
-
const [inViewRef, isInView] =
|
|
7
|
+
const [inViewRef, isInView] = useInView();
|
|
8
8
|
useEffect(() => {
|
|
9
9
|
isInView && onLoadMore();
|
|
10
10
|
}, [isInView]);
|
|
@@ -53,7 +53,7 @@ const ConfirmationModal = React.forwardRef(function ConfirmationModalInternal({
|
|
|
53
53
|
onCancel }),
|
|
54
54
|
});
|
|
55
55
|
}, [title, message, confirmLabel, cancelLabel, onConfirm, onCancel]);
|
|
56
|
-
useOnKeyDown.
|
|
56
|
+
useOnKeyDown.useOnKeyDown(handleKeyboardShortcut, ["Escape", "Enter"]);
|
|
57
57
|
return (React.createElement(Modal_index.Modal, { title: state.title, open: open || state.open, size: size, dismissible: false, primaryAction: {
|
|
58
58
|
label: state.confirmLabel,
|
|
59
59
|
onClick: handleAction("confirm"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { forwardRef, useReducer, useImperativeHandle, useEffect } from 'react';
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as useOnKeyDown } from './useOnKeyDown-es.js';
|
|
3
3
|
import { Modal } from './Modal/index.mjs';
|
|
4
4
|
import { C as Content } from './Content-es.js';
|
|
5
5
|
import { M as Markdown } from './Markdown-es.js';
|
|
@@ -51,7 +51,7 @@ const ConfirmationModal = forwardRef(function ConfirmationModalInternal({ title,
|
|
|
51
51
|
onCancel }),
|
|
52
52
|
});
|
|
53
53
|
}, [title, message, confirmLabel, cancelLabel, onConfirm, onCancel]);
|
|
54
|
-
|
|
54
|
+
useOnKeyDown(handleKeyboardShortcut, ["Escape", "Enter"]);
|
|
55
55
|
return (React__default.createElement(Modal, { title: state.title, open: open || state.open, size: size, dismissible: false, primaryAction: {
|
|
56
56
|
label: state.confirmLabel,
|
|
57
57
|
onClick: handleAction("confirm"),
|
package/dist/ContentBlock-cjs.js
CHANGED
|
@@ -24,7 +24,7 @@ const getMappedBreakpointWidth = (maxWidth) => {
|
|
|
24
24
|
return maxWidth;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
function ContentBlock({ children, maxWidth = useResizeObserver.
|
|
27
|
+
function ContentBlock({ children, maxWidth = useResizeObserver.Breakpoints.smaller, andText, gutters, justify = "left", as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
28
28
|
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--content-block-max-width": getMappedBreakpointWidth(maxWidth), "--content-block-gutters": getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gutters) }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.contentBlock, andText && styles.andText, gutters && styles.gutters, justify === "left" && styles.left, justify === "right" && styles.right, justify === "center" && styles.center, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
29
29
|
}
|
|
30
30
|
|
package/dist/ContentBlock-es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { B as Breakpoints } from './useResizeObserver-es.js';
|
|
4
4
|
import { g as getMappedAtlantisSpaceToken } from './getMappedAtlantisSpaceToken-es.js';
|
|
5
5
|
|
|
6
6
|
var styles = {"contentBlock":"rJamQZ6fRes-","left":"bqjXV8MRO-4-","right":"sCMxIxKkFe0-","center":"_2pIQVKvVL1I-","andText":"_6dF2no3aTxw-","gutters":"_8k8YLsatGag-","spinning":"sjMwRWFdKeo-"};
|
|
@@ -22,7 +22,7 @@ const getMappedBreakpointWidth = (maxWidth) => {
|
|
|
22
22
|
return maxWidth;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
function ContentBlock({ children, maxWidth =
|
|
25
|
+
function ContentBlock({ children, maxWidth = Breakpoints.smaller, andText, gutters, justify = "left", as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
26
26
|
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--content-block-max-width": getMappedBreakpointWidth(maxWidth), "--content-block-gutters": getMappedAtlantisSpaceToken(gutters) }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.contentBlock, andText && styles.andText, gutters && styles.gutters, justify === "left" && styles.left, justify === "right" && styles.right, justify === "center" && styles.center, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -18,10 +18,10 @@ const variants = {
|
|
|
18
18
|
};
|
|
19
19
|
function DataListActionsMenu({ visible = false, position, onRequestClose, children, }) {
|
|
20
20
|
const [ref, setRef] = React.useState();
|
|
21
|
-
const mounted = useIsMounted.
|
|
22
|
-
useRefocusOnActivator.
|
|
23
|
-
const focusTrapRef = useFocusTrap.
|
|
24
|
-
useOnKeyDown.
|
|
21
|
+
const mounted = useIsMounted.useIsMounted();
|
|
22
|
+
useRefocusOnActivator.useRefocusOnActivator(visible);
|
|
23
|
+
const focusTrapRef = useFocusTrap.useFocusTrap(visible);
|
|
24
|
+
useOnKeyDown.useOnKeyDown(onRequestClose, "Escape");
|
|
25
25
|
const actionsMenu = (React.createElement(framerMotion.AnimatePresence, null, visible && (React.createElement("div", { ref: focusTrapRef, onClick: handleClick },
|
|
26
26
|
React.createElement(framerMotion.motion.div, { role: "menu", "data-elevation": "elevated", ref: setRef, variants: variants, initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: DataList_const.TRANSITION_DELAY_IN_SECONDS }, className: styles.menu, style: getPositionCssVars(), onClick: onRequestClose }, children),
|
|
27
27
|
React.createElement("button", { type: "button", className: styles.overlay, onClick: onRequestClose, "aria-label": "Close menu" })))));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React__default, { useState } from 'react';
|
|
2
2
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
3
|
+
import { u as useFocusTrap } from './useFocusTrap-es.js';
|
|
4
|
+
import { u as useRefocusOnActivator } from './useRefocusOnActivator-es.js';
|
|
5
|
+
import { u as useOnKeyDown } from './useOnKeyDown-es.js';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { tokens } from '@jobber/design';
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as useIsMounted } from './useIsMounted-es.js';
|
|
9
9
|
import { e as TRANSITION_DELAY_IN_SECONDS } from './DataList.const-es.js';
|
|
10
10
|
|
|
11
11
|
var styles = {"menu":"e1ztw2-YxtM-","overlay":"uMoOb93Pf1Q-","spinning":"_0wS9DWCNuj4-"};
|
|
@@ -16,10 +16,10 @@ const variants = {
|
|
|
16
16
|
};
|
|
17
17
|
function DataListActionsMenu({ visible = false, position, onRequestClose, children, }) {
|
|
18
18
|
const [ref, setRef] = useState();
|
|
19
|
-
const mounted =
|
|
20
|
-
|
|
21
|
-
const focusTrapRef =
|
|
22
|
-
|
|
19
|
+
const mounted = useIsMounted();
|
|
20
|
+
useRefocusOnActivator(visible);
|
|
21
|
+
const focusTrapRef = useFocusTrap(visible);
|
|
22
|
+
useOnKeyDown(onRequestClose, "Escape");
|
|
23
23
|
const actionsMenu = (React__default.createElement(AnimatePresence, null, visible && (React__default.createElement("div", { ref: focusTrapRef, onClick: handleClick },
|
|
24
24
|
React__default.createElement(motion.div, { role: "menu", "data-elevation": "elevated", ref: setRef, variants: variants, initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: TRANSITION_DELAY_IN_SECONDS }, className: styles.menu, style: getPositionCssVars(), onClick: onRequestClose }, children),
|
|
25
25
|
React__default.createElement("button", { type: "button", className: styles.overlay, onClick: onRequestClose, "aria-label": "Close menu" })))));
|
|
@@ -31,7 +31,7 @@ function DataListSortingArrows({ headerKey, order, }) {
|
|
|
31
31
|
function DataListHeaderTile({ headers, headerKey, }) {
|
|
32
32
|
const { sorting } = DataListContext.useDataListContext();
|
|
33
33
|
const [isDropDownOpen, setIsDropDownOpen] = React.useState(false);
|
|
34
|
-
const optionsListRef = useFocusTrap.
|
|
34
|
+
const optionsListRef = useFocusTrap.useFocusTrap(isDropDownOpen);
|
|
35
35
|
const dataListHeaderTileRef = React.useRef(null);
|
|
36
36
|
const sortableItem = sorting === null || sorting === void 0 ? void 0 : sorting.sortable.find(item => item.key === headerKey);
|
|
37
37
|
const isSortable = Boolean(sortableItem);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState, useRef } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { u as
|
|
3
|
+
import { u as useFocusTrap } from './useFocusTrap-es.js';
|
|
4
4
|
import { D as DataListSortingOptions } from './DataListSortingOptions-es.js';
|
|
5
5
|
import { T as Text } from './Text-es.js';
|
|
6
6
|
import { u as useDataListContext } from './DataListContext-es.js';
|
|
@@ -29,7 +29,7 @@ function DataListSortingArrows({ headerKey, order, }) {
|
|
|
29
29
|
function DataListHeaderTile({ headers, headerKey, }) {
|
|
30
30
|
const { sorting } = useDataListContext();
|
|
31
31
|
const [isDropDownOpen, setIsDropDownOpen] = useState(false);
|
|
32
|
-
const optionsListRef =
|
|
32
|
+
const optionsListRef = useFocusTrap(isDropDownOpen);
|
|
33
33
|
const dataListHeaderTileRef = useRef(null);
|
|
34
34
|
const sortableItem = sorting === null || sorting === void 0 ? void 0 : sorting.sortable.find(item => item.key === headerKey);
|
|
35
35
|
const isSortable = Boolean(sortableItem);
|
|
@@ -12,7 +12,7 @@ var styles = {"trigger":"aJIHa8Q-WbY-","loadingMore":"lLYWNAYcURY-","backToTop":
|
|
|
12
12
|
|
|
13
13
|
function DataListLoadMoreTrigger() {
|
|
14
14
|
const { onLoadMore } = DataListContext.useDataListContext();
|
|
15
|
-
const [inViewRef, isInView] = useInView.
|
|
15
|
+
const [inViewRef, isInView] = useInView.useInView();
|
|
16
16
|
React.useEffect(() => {
|
|
17
17
|
isInView && (onLoadMore === null || onLoadMore === void 0 ? void 0 : onLoadMore());
|
|
18
18
|
}, [isInView]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useEffect } from 'react';
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as useInView } from './useInView-es.js';
|
|
3
3
|
import { u as useDataListContext } from './DataListContext-es.js';
|
|
4
4
|
import { g as DATA_LOAD_MORE_TEST_ID, h as DATA_LIST_LOADING_MORE_SPINNER_TEST_ID } from './DataList.const-es.js';
|
|
5
5
|
import { S as Spinner } from './Spinner-es.js';
|
|
@@ -10,7 +10,7 @@ var styles = {"trigger":"aJIHa8Q-WbY-","loadingMore":"lLYWNAYcURY-","backToTop":
|
|
|
10
10
|
|
|
11
11
|
function DataListLoadMoreTrigger() {
|
|
12
12
|
const { onLoadMore } = useDataListContext();
|
|
13
|
-
const [inViewRef, isInView] =
|
|
13
|
+
const [inViewRef, isInView] = useInView();
|
|
14
14
|
useEffect(() => {
|
|
15
15
|
isInView && (onLoadMore === null || onLoadMore === void 0 ? void 0 : onLoadMore());
|
|
16
16
|
}, [isInView]);
|
|
@@ -9,8 +9,8 @@ const CONTAINER_TEST_ID = "ATL-DataListFilters-Container";
|
|
|
9
9
|
var styles = {"fadeContainer":"a-KvXvaVQks-","overflowItems":"faGQ-G8kLN8-","overflowGrid":"TBUIm7AHO68-","overflowTrigger":"FMXUosxE5aQ-","overflowLeft":"kxQNzyS1RsY-","overflowRight":"AXW-X8-zsI8-","spinning":"bPN5dkeOZKI-"};
|
|
10
10
|
|
|
11
11
|
function DataListOverflowFade({ children }) {
|
|
12
|
-
const [leftRef, isLeftVisible] = useInView.
|
|
13
|
-
const [rightRef, isRightVisible] = useInView.
|
|
12
|
+
const [leftRef, isLeftVisible] = useInView.useInView();
|
|
13
|
+
const [rightRef, isRightVisible] = useInView.useInView();
|
|
14
14
|
return (React.createElement("div", { "data-testid": CONTAINER_TEST_ID, className: classnames(styles.fadeContainer, {
|
|
15
15
|
[styles.overflowLeft]: !isLeftVisible,
|
|
16
16
|
[styles.overflowRight]: !isRightVisible,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as useInView } from './useInView-es.js';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
|
|
5
5
|
const CONTAINER_TEST_ID = "ATL-DataListFilters-Container";
|
|
@@ -7,8 +7,8 @@ const CONTAINER_TEST_ID = "ATL-DataListFilters-Container";
|
|
|
7
7
|
var styles = {"fadeContainer":"a-KvXvaVQks-","overflowItems":"faGQ-G8kLN8-","overflowGrid":"TBUIm7AHO68-","overflowTrigger":"FMXUosxE5aQ-","overflowLeft":"kxQNzyS1RsY-","overflowRight":"AXW-X8-zsI8-","spinning":"bPN5dkeOZKI-"};
|
|
8
8
|
|
|
9
9
|
function DataListOverflowFade({ children }) {
|
|
10
|
-
const [leftRef, isLeftVisible] =
|
|
11
|
-
const [rightRef, isRightVisible] =
|
|
10
|
+
const [leftRef, isLeftVisible] = useInView();
|
|
11
|
+
const [rightRef, isRightVisible] = useInView();
|
|
12
12
|
return (React__default.createElement("div", { "data-testid": CONTAINER_TEST_ID, className: classnames(styles.fadeContainer, {
|
|
13
13
|
[styles.overflowLeft]: !isLeftVisible,
|
|
14
14
|
[styles.overflowRight]: !isRightVisible,
|
|
@@ -25,7 +25,7 @@ function InternalDataListSearch() {
|
|
|
25
25
|
const inputRef = React.useRef(null);
|
|
26
26
|
const [visible, setVisible] = React.useState(false);
|
|
27
27
|
const { searchComponent, filterComponent, sorting, title } = DataListContext.useDataListContext();
|
|
28
|
-
const debouncedSearch = useDebounce.
|
|
28
|
+
const debouncedSearch = useDebounce.useDebounce((value) => { var _a; return (_a = searchComponent === null || searchComponent === void 0 ? void 0 : searchComponent.props) === null || _a === void 0 ? void 0 : _a.onSearch(value); }, DataList_const.SEARCH_DEBOUNCE_DELAY);
|
|
29
29
|
if (!searchComponent)
|
|
30
30
|
return null;
|
|
31
31
|
const { placeholder, initialValue, value: controlledValue, } = searchComponent.props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useRef, useState } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { tokens } from '@jobber/design';
|
|
4
|
-
import { u as
|
|
4
|
+
import { u as useDebounce } from './useDebounce-es.js';
|
|
5
5
|
import { InputText } from './InputText/index.mjs';
|
|
6
6
|
import { u as useDataListContext } from './DataListContext-es.js';
|
|
7
7
|
import { S as SEARCH_DEBOUNCE_DELAY } from './DataList.const-es.js';
|
|
@@ -23,7 +23,7 @@ function InternalDataListSearch() {
|
|
|
23
23
|
const inputRef = useRef(null);
|
|
24
24
|
const [visible, setVisible] = useState(false);
|
|
25
25
|
const { searchComponent, filterComponent, sorting, title } = useDataListContext();
|
|
26
|
-
const debouncedSearch =
|
|
26
|
+
const debouncedSearch = useDebounce((value) => { var _a; return (_a = searchComponent === null || searchComponent === void 0 ? void 0 : searchComponent.props) === null || _a === void 0 ? void 0 : _a.onSearch(value); }, SEARCH_DEBOUNCE_DELAY);
|
|
27
27
|
if (!searchComponent)
|
|
28
28
|
return null;
|
|
29
29
|
const { placeholder, initialValue, value: controlledValue, } = searchComponent.props;
|
|
@@ -8,8 +8,8 @@ var Icon = require('./Icon-cjs.js');
|
|
|
8
8
|
var styles = {"optionsList":"krkUjDI-P7E-","option":"d4hPt6o50kw-","spinning":"CNq0y1X8-Eo-"};
|
|
9
9
|
|
|
10
10
|
function DataListSortingOptions({ options, selectedOption, onSelectChange, onClose, optionsListRef, dataListHeaderTileRef, }) {
|
|
11
|
-
useRefocusOnActivator.
|
|
12
|
-
useOnKeyDown.
|
|
11
|
+
useRefocusOnActivator.useRefocusOnActivator(!optionsListRef.current);
|
|
12
|
+
useOnKeyDown.useOnKeyDown(() => onClose(), "Escape");
|
|
13
13
|
React.useEffect(() => {
|
|
14
14
|
document.addEventListener("mousedown", handleClickOutside);
|
|
15
15
|
return () => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React__default, { useEffect } from 'react';
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
2
|
+
import { u as useOnKeyDown } from './useOnKeyDown-es.js';
|
|
3
|
+
import { u as useRefocusOnActivator } from './useRefocusOnActivator-es.js';
|
|
4
4
|
import { I as Icon } from './Icon-es.js';
|
|
5
5
|
|
|
6
6
|
var styles = {"optionsList":"krkUjDI-P7E-","option":"d4hPt6o50kw-","spinning":"CNq0y1X8-Eo-"};
|
|
7
7
|
|
|
8
8
|
function DataListSortingOptions({ options, selectedOption, onSelectChange, onClose, optionsListRef, dataListHeaderTileRef, }) {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
useRefocusOnActivator(!optionsListRef.current);
|
|
10
|
+
useOnKeyDown(() => onClose(), "Escape");
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
document.addEventListener("mousedown", handleClickOutside);
|
|
13
13
|
return () => {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var helpers = require('../../helpers-cjs.js');
|
|
4
4
|
require('../../useResizeObserver-cjs.js');
|
|
5
|
-
require('../../_commonjsHelpers-cjs.js');
|
|
6
5
|
require('react');
|
|
6
|
+
require('../../_commonjsHelpers-cjs.js');
|
|
7
7
|
require('../../throttle-cjs.js');
|
|
8
8
|
require('../../debounce-cjs.js');
|
|
9
9
|
require('../../isObjectLike-cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { m as mockContainerWidth } from '../../helpers-es.js';
|
|
2
2
|
import '../../useResizeObserver-es.js';
|
|
3
|
-
import '../../_commonjsHelpers-es.js';
|
|
4
3
|
import 'react';
|
|
4
|
+
import '../../_commonjsHelpers-es.js';
|
|
5
5
|
import '../../throttle-es.js';
|
|
6
6
|
import '../../debounce-es.js';
|
|
7
7
|
import '../../isObjectLike-es.js';
|
package/dist/DataTable-cjs.js
CHANGED
|
@@ -177,7 +177,7 @@ function Header({ table, stickyHeader, sorting, onRowClick, }) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
function DataTable({ data, columns, pagination, sorting, height, stickyHeader, pinFirstColumn, onRowClick, emptyState, loading = false, }) {
|
|
180
|
-
const [ref, { exactWidth }] = useResizeObserver.useResizeObserver
|
|
180
|
+
const [ref, { exactWidth }] = useResizeObserver.useResizeObserver();
|
|
181
181
|
const tableSettings = createTableSettings(data, columns, {
|
|
182
182
|
pagination,
|
|
183
183
|
sorting,
|
|
@@ -193,10 +193,10 @@ function DataTable({ data, columns, pagination, sorting, height, stickyHeader, p
|
|
|
193
193
|
React.createElement(Body, { table: table, onRowClick: onRowClick, emptyState: emptyState, loading: loading }),
|
|
194
194
|
table.getRowModel().rows.length &&
|
|
195
195
|
exactWidth &&
|
|
196
|
-
exactWidth > useResizeObserver.
|
|
196
|
+
exactWidth > useResizeObserver.Breakpoints.small ? (React.createElement(Footer, { table: table, viewType: "desktop" })) : null)),
|
|
197
197
|
table.getRowModel().rows.length &&
|
|
198
198
|
exactWidth &&
|
|
199
|
-
exactWidth <= useResizeObserver.
|
|
199
|
+
exactWidth <= useResizeObserver.Breakpoints.small ? (React.createElement(Footer, { table: table })) : null,
|
|
200
200
|
pagination && (React.createElement(Pagination, { table: table, itemsPerPage: pagination.itemsPerPage, totalItems: pagination.manualPagination
|
|
201
201
|
? pagination.totalItems
|
|
202
202
|
: table.getCoreRowModel().rows.length, loading: loading, onPageChange: () => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0); } }))));
|
package/dist/DataTable-es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { flexRender, getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import React__default, { useCallback, useMemo } from 'react';
|
|
4
|
-
import { u as useResizeObserver } from './useResizeObserver-es.js';
|
|
4
|
+
import { u as useResizeObserver, B as Breakpoints } from './useResizeObserver-es.js';
|
|
5
5
|
import { G as Glimmer } from './Glimmer-es.js';
|
|
6
6
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
7
7
|
import { Select, Option as SelectOption } from './Select/index.mjs';
|
|
@@ -175,7 +175,7 @@ function Header({ table, stickyHeader, sorting, onRowClick, }) {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
function DataTable({ data, columns, pagination, sorting, height, stickyHeader, pinFirstColumn, onRowClick, emptyState, loading = false, }) {
|
|
178
|
-
const [ref, { exactWidth }] = useResizeObserver
|
|
178
|
+
const [ref, { exactWidth }] = useResizeObserver();
|
|
179
179
|
const tableSettings = createTableSettings(data, columns, {
|
|
180
180
|
pagination,
|
|
181
181
|
sorting,
|
|
@@ -191,10 +191,10 @@ function DataTable({ data, columns, pagination, sorting, height, stickyHeader, p
|
|
|
191
191
|
React__default.createElement(Body, { table: table, onRowClick: onRowClick, emptyState: emptyState, loading: loading }),
|
|
192
192
|
table.getRowModel().rows.length &&
|
|
193
193
|
exactWidth &&
|
|
194
|
-
exactWidth >
|
|
194
|
+
exactWidth > Breakpoints.small ? (React__default.createElement(Footer, { table: table, viewType: "desktop" })) : null)),
|
|
195
195
|
table.getRowModel().rows.length &&
|
|
196
196
|
exactWidth &&
|
|
197
|
-
exactWidth <=
|
|
197
|
+
exactWidth <= Breakpoints.small ? (React__default.createElement(Footer, { table: table })) : null,
|
|
198
198
|
pagination && (React__default.createElement(Pagination, { table: table, itemsPerPage: pagination.itemsPerPage, totalItems: pagination.manualPagination
|
|
199
199
|
? pagination.totalItems
|
|
200
200
|
: table.getCoreRowModel().rows.length, loading: loading, onPageChange: () => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0); } }))));
|
package/dist/DatePicker-cjs.js
CHANGED
|
@@ -9779,7 +9779,7 @@ function DatePicker({ onChange, onMonthChange, activator, inline, selected, read
|
|
|
9779
9779
|
});
|
|
9780
9780
|
const { pickerRef } = useEscapeKeyToCloseDatePicker(open, ref);
|
|
9781
9781
|
if (smartAutofocus) {
|
|
9782
|
-
useRefocusOnActivator.
|
|
9782
|
+
useRefocusOnActivator.useRefocusOnActivator(open);
|
|
9783
9783
|
React.useEffect(focusOnSelectedDate, [open]);
|
|
9784
9784
|
}
|
|
9785
9785
|
return (React.createElement("div", { className: wrapperClassName, ref: ref, "data-elevation": "elevated" },
|