@jobber/components 6.26.0 → 6.26.2
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/AnimatedPresence-es.js +4 -4
- package/dist/AnimatedSwitcher-es.js +4 -4
- package/dist/AtlantisThemeContext-es.js +6 -6
- package/dist/Autocomplete-es.js +27 -27
- package/dist/Avatar-es.js +4 -4
- package/dist/Banner-es.js +13 -13
- package/dist/BannerIcon-es.js +3 -3
- package/dist/Body-es.js +12 -12
- package/dist/Box-es.js +2 -2
- package/dist/Button-es.js +13 -13
- package/dist/ButtonDismiss-es.js +2 -2
- package/dist/Card-es.js +15 -15
- package/dist/Checkbox/index.mjs +24 -24
- package/dist/Chip-es.js +17 -17
- package/dist/ChipDismissible-es.js +7 -7
- package/dist/Chips/index.mjs +3 -3
- package/dist/Chips-es.js +13 -13
- package/dist/Combobox/components/ComboboxContent/index.cjs +0 -2
- package/dist/Combobox/components/ComboboxContent/index.mjs +0 -2
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +3 -8
- package/dist/Combobox/index.cjs +1 -2
- package/dist/Combobox/index.mjs +1 -2
- package/dist/Combobox-es.js +6 -6
- package/dist/ComboboxAction-es.js +4 -4
- package/dist/ComboboxActivator-es.js +3 -3
- package/dist/ComboboxContent-cjs.js +3745 -39
- package/dist/ComboboxContent-es.js +3715 -27
- package/dist/ComboboxContentHeader-es.js +4 -4
- package/dist/ComboboxContentList-es.js +13 -13
- package/dist/ComboboxContentSearch-es.js +5 -5
- package/dist/ComboboxLoadMore-es.js +2 -2
- package/dist/ComboboxOption-es.js +6 -6
- package/dist/ComboboxProvider-es.js +3 -3
- package/dist/ComboboxTrigger-es.js +4 -4
- package/dist/ConfirmationModal-es.js +4 -4
- package/dist/Countdown-es.js +3 -3
- package/dist/DataDump-es.js +7 -7
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +1 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +1 -2
- package/dist/DataList/components/DataListFilters/index.cjs +2 -2
- package/dist/DataList/components/DataListFilters/index.mjs +2 -2
- package/dist/DataList-es.js +21 -21
- package/dist/DataList.utils-es.js +7 -7
- package/dist/DataListAction-es.js +9 -9
- package/dist/DataListActions-es.js +6 -6
- package/dist/DataListActionsMenu-es.js +4 -4
- package/dist/DataListBulkActions-es.js +3 -3
- package/dist/DataListContext-es.js +6 -6
- package/dist/DataListEmptyState-es.js +3 -3
- package/dist/DataListFilters-es.js +3 -3
- package/dist/DataListHeader-es.js +12 -12
- package/dist/DataListHeaderTile-es.js +9 -9
- package/dist/DataListItem-es.js +10 -10
- package/dist/DataListItemActions-es.js +3 -3
- package/dist/DataListItemActionsOverflow-es.js +5 -5
- package/dist/DataListItemClickable-es.js +8 -8
- package/dist/DataListItems-es.js +3 -3
- package/dist/DataListLayout-es.js +2 -2
- package/dist/DataListLayoutActions-es.js +6 -6
- package/dist/DataListLoadMore-es.js +8 -8
- package/dist/DataListLoadingState-es.js +4 -4
- package/dist/DataListOverflowFade-es.js +6 -6
- package/dist/DataListSearch-es.js +6 -6
- package/dist/DataListSort-es.js +6 -6
- package/dist/DataListSortingOptions-es.js +3 -3
- package/dist/DataListStatusBar-es.js +2 -2
- package/dist/DataListStickyHeader-es.js +2 -2
- package/dist/DataListTags-es.js +7 -7
- package/dist/DataListTotalCount-es.js +6 -6
- package/dist/DataTable-es.js +45 -45
- package/dist/DatePicker-es.js +12 -12
- package/dist/DayOfMonthSelect-es.js +18 -18
- package/dist/DescriptionList-es.js +4 -4
- package/dist/Disclosure-es.js +10 -10
- package/dist/Divider-es.js +2 -2
- package/dist/DrawerGrid-es.js +11 -11
- package/dist/Emphasis-es.js +2 -2
- package/dist/FeatureSwitch-es.js +17 -17
- package/dist/Flex-es.js +2 -2
- package/dist/Form-es.js +3 -3
- package/dist/FormField/FormFieldTypes.d.ts +6 -0
- package/dist/FormField/hooks/useAtlantisFormField.d.ts +2 -2
- package/dist/FormField-cjs.js +12 -4
- package/dist/FormField-es.js +50 -42
- package/dist/FormatDate-es.js +2 -2
- package/dist/FormatEmail-es.js +2 -2
- package/dist/FormatFile-es.js +23 -23
- package/dist/FormatRelativeDateTime-es.js +6 -6
- package/dist/FormatTime-es.js +2 -2
- package/dist/Gallery-es.js +8 -8
- package/dist/Glimmer-es.js +11 -11
- package/dist/Grid-es.js +2 -2
- package/dist/GridCell-es.js +2 -2
- package/dist/Heading-es.js +2 -2
- package/dist/Icon-es.js +9 -9
- package/dist/InlineLabel-es.js +3 -3
- package/dist/InputAvatar-es.js +11 -11
- package/dist/InputDate/index.cjs +1 -1
- package/dist/InputDate/index.mjs +10 -10
- package/dist/InputEmail-cjs.js +1 -1
- package/dist/InputEmail-es.js +3 -3
- package/dist/InputFile-es.js +20 -20
- package/dist/InputGroup-es.js +4 -4
- package/dist/InputNumber-cjs.js +1 -1
- package/dist/InputNumber-es.js +3 -3
- package/dist/InputPassword-cjs.js +1 -1
- package/dist/InputPassword-es.js +3 -3
- package/dist/InputPhoneNumber-cjs.js +2 -2
- package/dist/InputPhoneNumber-es.js +7 -7
- package/dist/InputText/index.cjs +1 -1
- package/dist/InputText/index.mjs +13 -13
- package/dist/InputTime-cjs.js +1 -1
- package/dist/InputTime-es.js +3 -3
- package/dist/InputValidation-es.js +5 -5
- package/dist/InternalChipDismissible-es.js +19 -19
- package/dist/LightBox-es.js +31 -31
- package/dist/Link-es.js +2 -2
- package/dist/List-es.js +29 -29
- package/dist/Markdown-es.js +15 -15
- package/dist/Menu-es.js +21 -21
- package/dist/Modal-es.js +18 -18
- package/dist/MultiSelect-es.js +9 -9
- package/dist/Option-cjs.js +1 -1
- package/dist/Option-es.js +4 -4
- package/dist/Page-es.js +23 -23
- package/dist/Popover-es.js +7 -7
- package/dist/ProgressBar-es.js +5 -5
- package/dist/RadioGroup-es.js +9 -9
- package/dist/RecurringSelect-es.js +19 -19
- package/dist/SegmentedControl-es.js +9 -9
- package/dist/Select/Select.d.ts +1 -1
- package/dist/SideDrawer-es.js +22 -22
- package/dist/Spinner-es.js +2 -2
- package/dist/StatusIndicator-es.js +2 -2
- package/dist/StatusLabel-es.js +5 -5
- package/dist/Switch-es.js +10 -10
- package/dist/Tabs-es.js +14 -14
- package/dist/Text-es.js +2 -2
- package/dist/Tooltip-es.js +9 -9
- package/dist/Typography-es.js +2 -2
- package/dist/showToast-es.js +11 -11
- package/dist/styles.css +5 -2
- package/dist/useChildComponent-es.js +2 -2
- package/dist/useFocusTrap-es.js +2 -2
- package/dist/useInView-es.js +2 -2
- package/dist/useIsMounted-es.js +2 -2
- package/dist/useOnKeyDown-es.js +2 -2
- package/dist/useRefocusOnActivator-es.js +2 -2
- package/dist/useResizeObserver-es.js +3 -3
- package/dist/useSafeLayoutEffect-es.js +2 -2
- package/dist/useScrollToActive-es.js +3 -3
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { createContext, useContext, useState, useCallback, useMemo, useId, forwardRef, Children, useRef } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
|
|
4
4
|
const SegmentedControlContext = createContext({
|
|
@@ -22,7 +22,7 @@ function SegmentedControlProvider({ children, selectedValue, onSelectValue, defa
|
|
|
22
22
|
const currentSelectedOption = isControlled
|
|
23
23
|
? selectedValue
|
|
24
24
|
: internalSelectedValue;
|
|
25
|
-
return (
|
|
25
|
+
return (React__default.createElement(SegmentedControlContext.Provider, { value: {
|
|
26
26
|
handleChange,
|
|
27
27
|
selectedValue: currentSelectedOption,
|
|
28
28
|
segmentedControlName: name,
|
|
@@ -33,9 +33,9 @@ function SegmentedControlOption({ value, children, ariaLabel, }) {
|
|
|
33
33
|
const { selectedValue, handleChange, segmentedControlName } = useSegmentedControl();
|
|
34
34
|
const localChecked = useMemo(() => selectedValue === value, [selectedValue, value]);
|
|
35
35
|
const inputId = `${value.toString()}_${useId()}`;
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
37
|
+
React__default.createElement("input", { type: "radio", id: inputId, name: segmentedControlName, checked: localChecked, value: value, onChange: handleChange, "aria-label": ariaLabel, tabIndex: localChecked ? 0 : -1 }),
|
|
38
|
+
React__default.createElement("label", { htmlFor: inputId }, children)));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
var styles = {"container":"FDDKTZkTdfM-","small":"V41prM1xcKI-","large":"DbXvfxdDF-c-","spinning":"iKliBX-y4ec-"};
|
|
@@ -46,17 +46,17 @@ const SegmentedControlBase = forwardRef(function SegmentedControlBase({ children
|
|
|
46
46
|
[styles.small]: size === "small",
|
|
47
47
|
[styles.large]: size === "large",
|
|
48
48
|
});
|
|
49
|
-
return (
|
|
49
|
+
return (React__default.createElement("div", { ref: ref, className: containerClassNames, role: "radiogroup", style: {
|
|
50
50
|
"--segmentedControl--option-count": optionCount,
|
|
51
51
|
} },
|
|
52
52
|
children,
|
|
53
|
-
|
|
53
|
+
React__default.createElement("span", null)));
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
function SegmentedControl({ selectedValue, onSelectValue, defaultValue, children, name = useId(), size = "base", }) {
|
|
57
57
|
const container = useRef(null);
|
|
58
|
-
return (
|
|
59
|
-
|
|
58
|
+
return (React__default.createElement(SegmentedControlProvider, { selectedValue: selectedValue, onSelectValue: onSelectValue, defaultValue: defaultValue, name: name },
|
|
59
|
+
React__default.createElement(SegmentedControlBase, { ref: container, size: size }, children)));
|
|
60
60
|
}
|
|
61
61
|
SegmentedControl.Option = SegmentedControlOption;
|
|
62
62
|
SegmentedControl.Base = SegmentedControlBase;
|
package/dist/Select/Select.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ import { FormFieldProps } from "../FormField";
|
|
|
5
5
|
* Unfortunately Docz doesn't currently support Omit so it has been reduced to
|
|
6
6
|
* its component parts.
|
|
7
7
|
*/
|
|
8
|
-
type SelectProps = Pick<FormFieldProps, Exclude<keyof FormFieldProps, "type" | "rows" | "keyboard" | "actionsRef" | "clearable">>;
|
|
8
|
+
type SelectProps = Pick<FormFieldProps, Exclude<keyof FormFieldProps, "type" | "rows" | "keyboard" | "actionsRef" | "clearable" | "pattern">>;
|
|
9
9
|
export declare function Select(props: SelectProps): JSX.Element;
|
|
10
10
|
export {};
|
package/dist/SideDrawer-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { createContext, useContext, useEffect, useState, useId } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
4
4
|
import { u as useRefocusOnActivator_2 } from './useRefocusOnActivator-es.js';
|
|
@@ -27,7 +27,7 @@ function SideDrawerActions({ children }) {
|
|
|
27
27
|
const { actionPortal } = useSideDrawerContext();
|
|
28
28
|
if (!actionPortal)
|
|
29
29
|
return null;
|
|
30
|
-
return createPortal(
|
|
30
|
+
return createPortal(React__default.createElement(React__default.Fragment, null, children), actionPortal);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function SideDrawerTitle({ children }) {
|
|
@@ -35,7 +35,7 @@ function SideDrawerTitle({ children }) {
|
|
|
35
35
|
if (!titlePortal)
|
|
36
36
|
return null;
|
|
37
37
|
if (typeof children === "string") {
|
|
38
|
-
return createPortal(
|
|
38
|
+
return createPortal(React__default.createElement(Heading, { level: 2 }, children), titlePortal);
|
|
39
39
|
}
|
|
40
40
|
return createPortal(children, titlePortal);
|
|
41
41
|
}
|
|
@@ -59,14 +59,14 @@ function SideDrawerBackButton({ onClick, }) {
|
|
|
59
59
|
}, []);
|
|
60
60
|
if (!backPortal)
|
|
61
61
|
return null;
|
|
62
|
-
return createPortal(
|
|
62
|
+
return createPortal(React__default.createElement(Button, { ariaLabel: "Back", icon: "longArrowLeft", variation: "subtle", type: "tertiary", onClick: onClick }), backPortal);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
function SideDrawerFooter({ children }) {
|
|
66
66
|
const { footerPortal } = useSideDrawerContext();
|
|
67
67
|
if (!footerPortal)
|
|
68
68
|
return null;
|
|
69
|
-
return createPortal(
|
|
69
|
+
return createPortal(React__default.createElement(React__default.Fragment, null, children), footerPortal);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
const variants = {
|
|
@@ -110,7 +110,7 @@ function SideDrawer({ children, onRequestClose, open, variation = "base", scroll
|
|
|
110
110
|
const isMounted = useIsMounted_2();
|
|
111
111
|
if (!isMounted.current && !container)
|
|
112
112
|
return null;
|
|
113
|
-
const SideDrawerRender = (
|
|
113
|
+
const SideDrawerRender = (React__default.createElement(SideDrawerContext.Provider, { value: {
|
|
114
114
|
actionPortal: ref === null || ref === void 0 ? void 0 : ref.querySelector(slots.actions.selector),
|
|
115
115
|
titlePortal: ref === null || ref === void 0 ? void 0 : ref.querySelector(slots.title.selector),
|
|
116
116
|
toolbarPortal: ref === null || ref === void 0 ? void 0 : ref.querySelector(slots.toolbar.selector),
|
|
@@ -120,34 +120,34 @@ function SideDrawer({ children, onRequestClose, open, variation = "base", scroll
|
|
|
120
120
|
registerComponent: key => setComponents(prev => (Object.assign(Object.assign({}, prev), { [key]: true }))),
|
|
121
121
|
unRegisterComponent: key => setComponents(prev => (Object.assign(Object.assign({}, prev), { [key]: false }))),
|
|
122
122
|
} },
|
|
123
|
-
open && !inline && (
|
|
124
|
-
|
|
123
|
+
open && !inline && (React__default.createElement("button", { className: styles.overlay, "aria-label": "Close", onClick: onRequestClose, type: "button" })),
|
|
124
|
+
React__default.createElement(AnimatePresence, { initial: false }, open && (React__default.createElement(motion.div, { className: classnames(styles.drawer, {
|
|
125
125
|
[styles.reverseScroll]: scrollDirection === "reverse",
|
|
126
126
|
[styles.inline]: inline,
|
|
127
127
|
}, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container), ref: setRef, "data-elevation": "elevated", variants: inline ? inlineVariants : variants, initial: "initial", animate: "visible", exit: "hidden", transition: {
|
|
128
128
|
duration: tokens["timing-base"] / 1000,
|
|
129
129
|
}, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container },
|
|
130
|
-
|
|
130
|
+
React__default.createElement("div", { ref: sideDrawerRef, role: "dialog", className: classnames(styles.container, styles.hasShadow, {
|
|
131
131
|
[styles.subtle]: variation === "subtle",
|
|
132
132
|
}), tabIndex: 0, onKeyUp: handleKeyUp },
|
|
133
|
-
|
|
133
|
+
React__default.createElement("div", { className: classnames(styles.header, {
|
|
134
134
|
[styles.hasShadow]: headerShadowRef.current && !noHeaderShadow,
|
|
135
135
|
}) },
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
React__default.createElement(Flex, { template: ["grow", "shrink"], align: "start" },
|
|
137
|
+
React__default.createElement(Flex, { template: ["shrink", "grow"], align: "start", gap: "none" },
|
|
138
|
+
React__default.createElement("div", Object.assign({ className: classnames(styles.backButton, {
|
|
139
139
|
[styles.backButtonVisible]: components.backButton,
|
|
140
140
|
}) }, slots.backButton.attr)),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
React__default.createElement("div", Object.assign({ className: classnames(styles.heading) }, slots.title.attr))),
|
|
142
|
+
React__default.createElement("div", { className: styles.headerActions },
|
|
143
|
+
React__default.createElement("div", Object.assign({ className: styles.hideWhenEmpty }, slots.actions.attr)),
|
|
144
|
+
React__default.createElement(Button, { ariaLabel: "Close", icon: "cross", onClick: onRequestClose, type: "tertiary", variation: "subtle" }))),
|
|
145
|
+
React__default.createElement("div", Object.assign({ className: styles.hideWhenEmpty }, slots.toolbar.attr))),
|
|
146
|
+
React__default.createElement("div", { className: styles.content },
|
|
147
|
+
React__default.createElement("div", { className: styles.headerShadowListener, ref: headerShadowRef }),
|
|
148
148
|
children,
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
React__default.createElement("div", { className: styles.footerShadowListener, ref: footerShadowRef })),
|
|
150
|
+
React__default.createElement("div", Object.assign({ className: classnames(styles.footer, styles.hideWhenEmpty, {
|
|
151
151
|
[styles.hasShadow]: footerShadowRef.current && !noFooterShadow,
|
|
152
152
|
}) }, slots.footer.attr))))))));
|
|
153
153
|
if (inline) {
|
package/dist/Spinner-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
|
|
4
4
|
var styles = {"spinner":"_6hfmGZoXNyg-","animationSpin":"aT3CETCJ4hQ-","small":"bMfynkzmlL4-","inline":"NA68eWblbLo-","spinning":"aCBq1WrkI4M-"};
|
|
@@ -8,7 +8,7 @@ function Spinner({ size = "base", inline }) {
|
|
|
8
8
|
[styles.small]: size === "small",
|
|
9
9
|
[styles.inline]: inline,
|
|
10
10
|
});
|
|
11
|
-
return (
|
|
11
|
+
return (React__default.createElement("div", { className: spinnerStyles, role: "alert", "aria-busy": true, "aria-label": "loading" }));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { Spinner as S };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var styles = {"statusIndicator":"WiSIdMrztSU-","spinning":"HtjGZ9un0j0-"};
|
|
4
4
|
|
|
5
5
|
function StatusIndicator({ status }) {
|
|
6
|
-
return (
|
|
6
|
+
return (React__default.createElement("span", { style: { backgroundColor: `var(--color-${status})` }, className: styles.statusIndicator, "data-testid": `ATL-Status-Indicator-${status}` }));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { StatusIndicator as S };
|
package/dist/StatusLabel-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { T as Typography } from './Typography-es.js';
|
|
4
4
|
import { S as StatusIndicator } from './StatusIndicator-es.js';
|
|
@@ -7,10 +7,10 @@ var styles = {"statusLabelRow":"OADGAhZt8dY-","success":"gQdAtJ0BiSk-","warning"
|
|
|
7
7
|
|
|
8
8
|
function StatusLabel({ label, alignment = "start", status = "inactive", }) {
|
|
9
9
|
const containerClassNames = classnames(styles.statusLabelRow, styles[status], alignment === "end" && styles.labelTextEndAligned);
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
return (React__default.createElement("div", { role: "status", className: containerClassNames },
|
|
11
|
+
React__default.createElement("div", { className: styles.statusIndicatorWrapper },
|
|
12
|
+
React__default.createElement(StatusIndicator, { status: status })),
|
|
13
|
+
React__default.createElement(Typography, { size: "small", align: alignment }, label)));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export { StatusLabel as S };
|
package/dist/Switch-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { T as Typography } from './Typography-es.js';
|
|
4
4
|
|
|
@@ -21,13 +21,13 @@ function Switch({ value: providedValue, ariaLabel, name, disabled, onChange, })
|
|
|
21
21
|
[styles.isChecked]: value,
|
|
22
22
|
[styles.disabled]: disabled,
|
|
23
23
|
});
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
25
|
+
React__default.createElement("button", { id: name, type: "button", role: "switch", "aria-checked": value, "aria-label": ariaLabel, className: className, onClick: toggleSwitch, disabled: disabled },
|
|
26
|
+
React__default.createElement("span", { className: styles.toggle },
|
|
27
|
+
React__default.createElement(Label, { as: "On", disabled: disabled }),
|
|
28
|
+
React__default.createElement("span", { className: styles.pip }),
|
|
29
|
+
React__default.createElement(Label, { as: "Off", disabled: disabled }))),
|
|
30
|
+
React__default.createElement("input", { name: name, type: "hidden", value: String(value) })));
|
|
31
31
|
}
|
|
32
32
|
function Label({ as, disabled }) {
|
|
33
33
|
const getTextColor = () => {
|
|
@@ -39,8 +39,8 @@ function Label({ as, disabled }) {
|
|
|
39
39
|
}
|
|
40
40
|
return "greyBlue";
|
|
41
41
|
};
|
|
42
|
-
return (
|
|
43
|
-
|
|
42
|
+
return (React__default.createElement("span", { className: styles.label },
|
|
43
|
+
React__default.createElement(Typography, { element: "span", textColor: getTextColor(), size: "small", fontWeight: "bold", textCase: "uppercase" }, as)));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export { Switch as S };
|
package/dist/Tabs-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { t as throttle } from './throttle-es.js';
|
|
4
4
|
import { T as Typography } from './Typography-es.js';
|
|
@@ -67,7 +67,7 @@ const useArrowKeyNavigation = ({ elementsRef, onActivate, }) => {
|
|
|
67
67
|
|
|
68
68
|
function Tabs({ children, defaultTab = 0, activeTab: controlledActiveTab, onTabChange, }) {
|
|
69
69
|
var _a;
|
|
70
|
-
const activeTabInitialValue = defaultTab <
|
|
70
|
+
const activeTabInitialValue = defaultTab < React__default.Children.count(children) ? defaultTab : 0;
|
|
71
71
|
const [internalActiveTab, setInternalActiveTab] = useState(activeTabInitialValue);
|
|
72
72
|
const activeTab = controlledActiveTab !== undefined ? controlledActiveTab : internalActiveTab;
|
|
73
73
|
const { overflowRight, overflowLeft, tabRow } = useTabsOverflow();
|
|
@@ -90,27 +90,27 @@ function Tabs({ children, defaultTab = 0, activeTab: controlledActiveTab, onTabC
|
|
|
90
90
|
elementsRef: tabRefs,
|
|
91
91
|
onActivate: index => activateTab(index)(),
|
|
92
92
|
});
|
|
93
|
-
const activeTabProps = (_a =
|
|
93
|
+
const activeTabProps = (_a = React__default.Children.toArray(children)[activeTab]) === null || _a === void 0 ? void 0 : _a.props;
|
|
94
94
|
useEffect(() => {
|
|
95
|
-
if (activeTab >
|
|
95
|
+
if (activeTab > React__default.Children.count(children) - 1) {
|
|
96
96
|
setInternalActiveTab(activeTabInitialValue);
|
|
97
97
|
}
|
|
98
|
-
}, [
|
|
99
|
-
return (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
}, [React__default.Children.count(children)]);
|
|
99
|
+
return (React__default.createElement("div", { className: styles.tabs },
|
|
100
|
+
React__default.createElement("div", { className: overflowClassNames },
|
|
101
|
+
React__default.createElement("ul", { role: "tablist", className: styles.tabRow, ref: tabRow, onKeyDown: handleKeyDown }, React__default.Children.map(children, (tab, index) => (React__default.createElement(InternalTab, { label: tab.props.label, selected: activeTab === index, activateTab: activateTab(index), onClick: tab.props.onClick, ref: el => (tabRefs.current[index] = el), tabIndex: activeTab === index ? 0 : -1 }))))),
|
|
102
|
+
React__default.createElement("section", { role: "tabpanel", className: styles.tabContent, "aria-label": activeTabProps === null || activeTabProps === void 0 ? void 0 : activeTabProps.label }, activeTabProps === null || activeTabProps === void 0 ? void 0 : activeTabProps.children)));
|
|
103
103
|
}
|
|
104
104
|
function Tab({ label }) {
|
|
105
|
-
return
|
|
105
|
+
return React__default.createElement(React__default.Fragment, null, label);
|
|
106
106
|
}
|
|
107
|
-
const InternalTab =
|
|
107
|
+
const InternalTab = React__default.forwardRef(({ label, selected, activateTab, onClick, tabIndex }, ref) => {
|
|
108
108
|
const className = classnames(styles.tab, { [styles.selected]: selected });
|
|
109
|
-
return (
|
|
110
|
-
|
|
109
|
+
return (React__default.createElement("li", { role: "presentation" },
|
|
110
|
+
React__default.createElement("button", { type: "button", role: "tab", className: className, onClick: event => {
|
|
111
111
|
activateTab();
|
|
112
112
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
113
|
-
}, ref: ref, tabIndex: tabIndex }, typeof label === "string" ? (
|
|
113
|
+
}, ref: ref, tabIndex: tabIndex }, typeof label === "string" ? (React__default.createElement(Typography, { element: "span", size: "large", fontWeight: "semiBold" }, label)) : (label))));
|
|
114
114
|
});
|
|
115
115
|
InternalTab.displayName = "InternalTab";
|
|
116
116
|
|
package/dist/Text-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { T as Typography } from './Typography-es.js';
|
|
3
3
|
|
|
4
4
|
function Text({ variation = "default", size = "base", align = "start", children, maxLines = "unlimited", }) {
|
|
@@ -19,7 +19,7 @@ function Text({ variation = "default", size = "base", align = "start", children,
|
|
|
19
19
|
larger: 16,
|
|
20
20
|
unlimited: undefined,
|
|
21
21
|
};
|
|
22
|
-
return (
|
|
22
|
+
return (React__default.createElement(Typography, { textColor: textColors[variation], size: size, numberOfLines: maxLineToNumber[maxLines], align: align }, children));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export { Text as T };
|
package/dist/Tooltip-es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useRef, useState } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import ReactDOM__default from 'react-dom';
|
|
4
4
|
import { motion } from 'framer-motion';
|
|
5
5
|
import { u as useSafeLayoutEffect_1 } from './useSafeLayoutEffect-es.js';
|
|
6
6
|
import { u as useIsMounted_2 } from './useIsMounted-es.js';
|
|
@@ -38,17 +38,17 @@ function Tooltip({ message, children, preferredPlacement = "top", setTabIndex =
|
|
|
38
38
|
const { attributes, placement, shadowRef, styles: popperStyles, setArrowRef, setTooltipRef, } = useTooltipPositioning({ preferredPlacement: preferredPlacement });
|
|
39
39
|
initializeListeners();
|
|
40
40
|
const toolTipClassNames = classnames(styles.tooltipWrapper, placement === "bottom" && styles.bottom, placement === "top" && styles.top, placement === "left" && styles.left, placement === "right" && styles.right);
|
|
41
|
-
return (
|
|
42
|
-
|
|
41
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
42
|
+
React__default.createElement("span", { className: styles.shadowActivator, ref: shadowRef }),
|
|
43
43
|
children,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
React__default.createElement(TooltipPortal, null, show && Boolean(message) && (React__default.createElement("div", Object.assign({ className: toolTipClassNames, style: popperStyles.popper, ref: setTooltipRef, role: "tooltip" }, attributes.popper),
|
|
45
|
+
React__default.createElement(motion.div, { className: styles.tooltip, variants: variation, initial: "startOrStop", animate: "done", exit: "startOrStop", transition: {
|
|
46
46
|
ease: "easeOut",
|
|
47
47
|
duration: 0.15,
|
|
48
48
|
delay: 0.3,
|
|
49
49
|
} },
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
React__default.createElement("p", { className: styles.tooltipMessage }, message),
|
|
51
|
+
React__default.createElement("div", { ref: setArrowRef, style: popperStyles.arrow, className: styles.arrow })))))));
|
|
52
52
|
function initializeListeners() {
|
|
53
53
|
const showTooltip = () => {
|
|
54
54
|
setShow(true);
|
|
@@ -104,7 +104,7 @@ function TooltipPortal({ children }) {
|
|
|
104
104
|
if (!(mounted === null || mounted === void 0 ? void 0 : mounted.current)) {
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
|
-
return
|
|
107
|
+
return ReactDOM__default.createPortal(children, document.body);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
export { Tooltip as T };
|
package/dist/Typography-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
|
|
4
4
|
var styles = {"base":"j4h-0Mxa5gk-","spinning":"vNKBQk0oak4-"};
|
|
@@ -31,7 +31,7 @@ function Typography({ id, children, element: Tag = "p", size, align, fontWeight
|
|
|
31
31
|
}
|
|
32
32
|
: {};
|
|
33
33
|
const underlineInlineStyles = computeUnderlineStyles(underline, textColor);
|
|
34
|
-
return (
|
|
34
|
+
return (React__default.createElement(Tag, { id: id, className: className, style: Object.assign(Object.assign(Object.assign({}, truncateStyles), underlineInlineStyles), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.textStyle) }, children));
|
|
35
35
|
}
|
|
36
36
|
function computeUnderlineStyles(underline, textColor) {
|
|
37
37
|
if (!underline) {
|
package/dist/showToast-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useEffect, forwardRef, useImperativeHandle, useRef } from 'react';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
3
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
4
4
|
import { I as Icon } from './Icon-es.js';
|
|
@@ -13,18 +13,18 @@ function Toast({ message, variation = "success", action, actionLabel, }) {
|
|
|
13
13
|
const icon = getIcon();
|
|
14
14
|
let timer;
|
|
15
15
|
useEffect(() => startTimer(), []);
|
|
16
|
-
return (
|
|
16
|
+
return (React__default.createElement(AnimatePresence, null, visible && (React__default.createElement(motion.div, { className: styles.toast, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, onMouseEnter: () => stopTimer(), onMouseLeave: () => startTimer(), exit: {
|
|
17
17
|
opacity: 0,
|
|
18
18
|
scale: 0.8,
|
|
19
19
|
height: 0,
|
|
20
20
|
transition: { duration: 0.4 },
|
|
21
21
|
} },
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
action && (
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
React__default.createElement("div", { className: styles.slice },
|
|
23
|
+
React__default.createElement(Icon, { color: icon.color, name: icon.name }),
|
|
24
|
+
React__default.createElement(Typography, { element: "span", size: "large" }, message),
|
|
25
|
+
action && (React__default.createElement(Button, { label: `${actionLabel}`, onClick: action, type: "tertiary" })),
|
|
26
|
+
React__default.createElement("div", { className: styles.button },
|
|
27
|
+
React__default.createElement(Button, { icon: "remove", ariaLabel: "Hide Notification", onClick: handleToastClose, type: "tertiary", variation: "subtle" })))))));
|
|
28
28
|
function startTimer() {
|
|
29
29
|
timer = setTimeout(() => handleToastClose(), getTimeout());
|
|
30
30
|
}
|
|
@@ -75,14 +75,14 @@ function showToast(props) {
|
|
|
75
75
|
root = createRoot(target);
|
|
76
76
|
}
|
|
77
77
|
if (root && target && globalThis.document.body.contains(target)) {
|
|
78
|
-
root.render(
|
|
78
|
+
root.render(React__default.createElement(ToasterOven, Object.assign({}, props)));
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
const ToastContainer = forwardRef(ToastInternal);
|
|
82
82
|
function ToasterOven(props) {
|
|
83
83
|
const toastRef = useRef();
|
|
84
84
|
useEffect(() => toastRef.current.add(props));
|
|
85
|
-
return
|
|
85
|
+
return React__default.createElement(ToastContainer, { ref: toastRef });
|
|
86
86
|
}
|
|
87
87
|
function ToastInternal(_, ref) {
|
|
88
88
|
const [toastKey, setToastKey] = useState(0);
|
|
@@ -96,7 +96,7 @@ function ToastInternal(_, ref) {
|
|
|
96
96
|
]);
|
|
97
97
|
},
|
|
98
98
|
}));
|
|
99
|
-
return (
|
|
99
|
+
return (React__default.createElement("div", { className: styles.container }, toasts.map(toast => (React__default.createElement(Toast, Object.assign({}, toast, { key: toast.id }))))));
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export { Toast as T, showToast as s };
|
package/dist/styles.css
CHANGED
|
@@ -877,6 +877,11 @@
|
|
|
877
877
|
outline: none;
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
+
.MVhuQuzUBUs- {
|
|
881
|
+
padding-left: calc(var(--field--padding-left) + 4px);
|
|
882
|
+
padding-left: calc(var(--field--padding-left) + var(--space-smaller));
|
|
883
|
+
}
|
|
884
|
+
|
|
880
885
|
.hGr6YW4AeLM- .yVXYv6hkuOA- {
|
|
881
886
|
display: -ms-flexbox;
|
|
882
887
|
display: flex;
|
|
@@ -3377,8 +3382,6 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
3377
3382
|
width: calc(var(--space-extravagant) * 3.75);
|
|
3378
3383
|
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1), 0px 4px 12px 0px rgba(0, 0, 0, 0.05);
|
|
3379
3384
|
box-shadow: var(--shadow-base);
|
|
3380
|
-
margin-top: 8px;
|
|
3381
|
-
margin-top: var(--space-small);
|
|
3382
3385
|
border: 1px solid hsl(200, 13%, 87%);
|
|
3383
3386
|
border: var(--border-base) solid var(--color-border);
|
|
3384
3387
|
border-radius: 8px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useMemo, isValidElement } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns the first React Child that receives `true` from isCorrectComponent
|
|
@@ -8,7 +8,7 @@ import React, { useMemo, isValidElement } from 'react';
|
|
|
8
8
|
*/
|
|
9
9
|
function useChildComponent(children, isCorrectComponent) {
|
|
10
10
|
return useMemo(() => {
|
|
11
|
-
return
|
|
11
|
+
return React__default.Children.toArray(children).find(d => isValidElement(d) && isCorrectComponent(d));
|
|
12
12
|
}, [children]);
|
|
13
13
|
}
|
|
14
14
|
|
package/dist/useFocusTrap-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var useFocusTrap$1 = {};
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(useFocusTrap$1, "__esModule", { value: true });
|
|
6
6
|
var useFocusTrap_2 = useFocusTrap$1.useFocusTrap = useFocusTrap;
|
|
7
|
-
const react_1 =
|
|
7
|
+
const react_1 = React__default;
|
|
8
8
|
/**
|
|
9
9
|
* Traps the focus within the children of the ref element.
|
|
10
10
|
*
|
package/dist/useInView-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var useInView$1 = {};
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(useInView$1, "__esModule", { value: true });
|
|
6
6
|
var useInView_2 = useInView$1.useInView = useInView;
|
|
7
|
-
const react_1 =
|
|
7
|
+
const react_1 = React__default;
|
|
8
8
|
function useInView() {
|
|
9
9
|
const ref = (0, react_1.useRef)(null);
|
|
10
10
|
const [isInView, setIsInView] = (0, react_1.useState)(false);
|
package/dist/useIsMounted-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { a as useSafeLayoutEffect$1 } from './useSafeLayoutEffect-es.js';
|
|
3
3
|
|
|
4
4
|
var useIsMounted$1 = {};
|
|
@@ -14,7 +14,7 @@ var useSafeLayoutEffect = {};
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(useIsMounted$1, "__esModule", { value: true });
|
|
16
16
|
var useIsMounted_2 = useIsMounted$1.useIsMounted = useIsMounted;
|
|
17
|
-
const react_1 =
|
|
17
|
+
const react_1 = React__default;
|
|
18
18
|
const useSafeLayoutEffect_1 = useSafeLayoutEffect;
|
|
19
19
|
/**
|
|
20
20
|
* If you are using this hook in order to only perform an action once after mounting (for example sending
|
package/dist/useOnKeyDown-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var useOnKeyDown$1 = {};
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(useOnKeyDown$1, "__esModule", { value: true });
|
|
6
6
|
var useOnKeyDown_2 = useOnKeyDown$1.useOnKeyDown = useOnKeyDown;
|
|
7
|
-
const react_1 =
|
|
7
|
+
const react_1 = React__default;
|
|
8
8
|
function useOnKeyDown(callback, keys) {
|
|
9
9
|
(0, react_1.useEffect)(() => {
|
|
10
10
|
window.addEventListener("keydown", handler);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var useRefocusOnActivator$1 = {};
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(useRefocusOnActivator$1, "__esModule", { value: true });
|
|
6
6
|
var useRefocusOnActivator_2 = useRefocusOnActivator$1.useRefocusOnActivator = useRefocusOnActivator;
|
|
7
|
-
const react_1 =
|
|
7
|
+
const react_1 = React__default;
|
|
8
8
|
/**
|
|
9
9
|
* Brings back the focus to the element that opened an overlaid element once
|
|
10
10
|
* said overlaid element is dismissed.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as getAugmentedNamespace, c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { a as throttle_1 } from './throttle-es.js';
|
|
4
4
|
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
@@ -956,7 +956,7 @@ var require$$0 = /*@__PURE__*/getAugmentedNamespace(ResizeObserver_es);
|
|
|
956
956
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
957
957
|
|
|
958
958
|
var ResizeObserver = _interopDefault(require$$0);
|
|
959
|
-
var react =
|
|
959
|
+
var react = React__default;
|
|
960
960
|
|
|
961
961
|
function useResizeObserver$1(opts) {
|
|
962
962
|
if (opts === void 0) {
|
|
@@ -1055,7 +1055,7 @@ var polyfilled = useResizeObserver$1;
|
|
|
1055
1055
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1056
1056
|
exports.Breakpoints = void 0;
|
|
1057
1057
|
exports.useResizeObserver = useResizeObserver;
|
|
1058
|
-
const react_1 =
|
|
1058
|
+
const react_1 = React__default;
|
|
1059
1059
|
// Importing the polyfilled version of ResizeObserver
|
|
1060
1060
|
// eslint-disable-next-line import/no-internal-modules
|
|
1061
1061
|
const polyfilled_1 = __importDefault(polyfilled);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var useSafeLayoutEffect = {};
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(useSafeLayoutEffect, "__esModule", { value: true });
|
|
6
6
|
var useSafeLayoutEffect_1 = useSafeLayoutEffect.useSafeLayoutEffect = void 0;
|
|
7
|
-
const react_1 =
|
|
7
|
+
const react_1 = React__default;
|
|
8
8
|
useSafeLayoutEffect_1 = useSafeLayoutEffect.useSafeLayoutEffect = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)
|
|
9
9
|
? react_1.useLayoutEffect
|
|
10
10
|
: react_1.useEffect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useRef, useId, useState, useEffect } from 'react';
|
|
2
2
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
|
|
3
3
|
import { _ as _baseFlatten } from './_baseFlatten-es.js';
|
|
4
4
|
import { a as _arrayMap, b as _baseGet } from './_baseGet-es.js';
|
|
@@ -249,7 +249,7 @@ var useLiveAnnounce$1 = {};
|
|
|
249
249
|
|
|
250
250
|
Object.defineProperty(useLiveAnnounce$1, "__esModule", { value: true });
|
|
251
251
|
var useLiveAnnounce_2 = useLiveAnnounce$1.useLiveAnnounce = useLiveAnnounce;
|
|
252
|
-
const react_1 =
|
|
252
|
+
const react_1 = React__default;
|
|
253
253
|
/**
|
|
254
254
|
* Announce a message on voice over whenever you do an action. This is
|
|
255
255
|
* especially helpful when you have an action that adds or deletes an element
|
|
@@ -479,7 +479,7 @@ function generateCustomOptionObject(searchValue) {
|
|
|
479
479
|
return {
|
|
480
480
|
value: searchValue,
|
|
481
481
|
label: searchValue,
|
|
482
|
-
prefix:
|
|
482
|
+
prefix: React__default.createElement(Icon, { name: "add" }),
|
|
483
483
|
custom: true,
|
|
484
484
|
};
|
|
485
485
|
}
|