@pismo/marola 0.0.1-alpha.31 → 0.0.1-alpha.4
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/README.md +5 -17
- package/dist/{Button-2b1peDFT.js → Button-C3Qm852g.js} +23 -23
- package/dist/Dialog.module-BO0mdB7d.js +15 -0
- package/dist/ListContext-D6-YwtZn.js +18 -0
- package/dist/Tabs.module-_kSbSyth.js +66 -0
- package/dist/assets/CallToActionButton.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -0
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +21 -0
- package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +9 -2
- package/dist/components/Dialog/CloseIconButton.js +124 -12
- package/dist/components/Dialog/Dialog.d.ts +5 -6
- package/dist/components/Dialog/Dialog.js +20103 -445
- package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
- package/dist/components/Dialog/Title.js +14 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
- package/dist/components/Tabs/Tab.d.ts +1 -6
- package/dist/components/Tabs/Tab.js +173 -118
- package/dist/components/Tabs/TabPanel.d.ts +1 -5
- package/dist/components/Tabs/TabPanel.js +10 -8
- package/dist/components/Tabs/Tabs.d.ts +2 -8
- package/dist/components/Tabs/Tabs.js +701 -250
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +64 -55
- package/dist/{index-CH45lKw7.js → index-BZ1lkM_M.js} +159 -162
- package/dist/main.d.ts +5 -27
- package/dist/main.js +21 -76
- package/dist/types/helpers.d.ts +7 -14
- package/dist/useButton-CbmjmH5z.js +186 -0
- package/dist/useCompoundItem-B7wfGDHQ.js +41 -0
- package/package.json +10 -51
- package/src/playground/Playground.tsx +20 -0
- package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/Popup-B6ZSGIEI.js +0 -1248
- package/dist/Portal-DIeBsWdL.js +0 -73
- package/dist/SelectButton-C8JQKaf4.js +0 -61
- package/dist/Tabs.module-jkH1Qjn7.js +0 -22
- package/dist/Toggle-BXcLAMNy.js +0 -142
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/EllipsisTooltip.css +0 -1
- package/dist/assets/Group.css +0 -1
- package/dist/assets/IconButton.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/PageHeader.css +0 -1
- package/dist/assets/Pagination.css +0 -1
- package/dist/assets/SelectButton.css +0 -1
- package/dist/assets/Skeleton.css +0 -1
- package/dist/assets/Snackbar.css +0 -1
- package/dist/assets/SortTooltip.css +0 -1
- package/dist/assets/Stepper.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/TextDisplay.css +0 -1
- package/dist/assets/Toggle.css +0 -1
- package/dist/assets/Toggle2.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
- package/dist/components/Advice/Advice.d.ts +0 -30
- package/dist/components/Advice/Advice.js +0 -48
- package/dist/components/Advice/Advice.stories.d.ts +0 -18
- package/dist/components/Button/Button.d.ts +0 -32
- package/dist/components/Button/Button.js +0 -65
- package/dist/components/Button/Button.stories.d.ts +0 -62
- package/dist/components/Checkbox/Checkbox.d.ts +0 -34
- package/dist/components/Checkbox/Checkbox.js +0 -71
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
- package/dist/components/Chip/Chip.d.ts +0 -39
- package/dist/components/Chip/Chip.js +0 -19
- package/dist/components/Chip/Chip.stories.d.ts +0 -42
- package/dist/components/Chip/chip.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
- package/dist/components/Dialog/DialogTitle.js +0 -29
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
- package/dist/components/Icon/Icon.d.ts +0 -27
- package/dist/components/Icon/Icon.js +0 -136
- package/dist/components/Icon/Icon.stories.d.ts +0 -16
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/IconButton/IconButton.d.ts +0 -38
- package/dist/components/IconButton/IconButton.js +0 -63
- package/dist/components/Input/Input.d.ts +0 -44
- package/dist/components/Input/Input.js +0 -508
- package/dist/components/Input/Input.stories.d.ts +0 -43
- package/dist/components/InputSearch/InputSearch.d.ts +0 -9
- package/dist/components/InputSearch/InputSearch.js +0 -34
- package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
- package/dist/components/PageHeader/PageHeader.d.ts +0 -66
- package/dist/components/PageHeader/PageHeader.js +0 -87
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
- package/dist/components/Pagination/Pagination.d.ts +0 -55
- package/dist/components/Pagination/Pagination.js +0 -237
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
- package/dist/components/Select/Select.d.ts +0 -26
- package/dist/components/Select/Select.js +0 -857
- package/dist/components/Select/Select.stories.d.ts +0 -22
- package/dist/components/Select/SelectButton.d.ts +0 -12
- package/dist/components/Select/SelectButton.js +0 -8
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton.js +0 -23
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
- package/dist/components/Snackbar/Snackbar.d.ts +0 -27
- package/dist/components/Snackbar/Snackbar.js +0 -639
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +0 -93
- package/dist/components/Stepper/Stepper.d.ts +0 -26
- package/dist/components/Stepper/Stepper.js +0 -48
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
- package/dist/components/Table/Table.d.ts +0 -56
- package/dist/components/Table/Table.js +0 -137
- package/dist/components/Table/Table.stories.d.ts +0 -29
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +0 -21
- package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
- package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
- package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
- package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
- package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
- package/dist/components/Tabs/Tab.stories.d.ts +0 -15
- package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
- package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
- package/dist/components/TextDisplay/TextDisplay.js +0 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
- package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -11
- package/dist/components/Toggle/Toggle.js +0 -266
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
- package/dist/components/ToggleGroup/Group.d.ts +0 -18
- package/dist/components/ToggleGroup/Group.js +0 -7
- package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
- package/dist/components/ToggleGroup/Toggle.js +0 -16
- package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
- package/dist/components/Tooltip/Tooltip.d.ts +0 -33
- package/dist/components/Tooltip/Tooltip.js +0 -141
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Typography/typography.test.d.ts +0 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
- package/dist/index-CjW42-M-.js +0 -19584
- package/dist/marola.css +0 -1
- package/dist/test-utils/assertStyles.d.ts +0 -1
- package/dist/test-utils/assertStyles.js +0 -11
- package/dist/useButton-DNk3wrQp.js +0 -105
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
package/dist/marola.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{--secondary-orange: #ffa945;--secondary-orange-rgb: 255, 169, 69;--secondary-orange-dark: #fe8d53;--secondary-orange-dark-rgb: 254, 141, 83;--secondary-orange-light: #525061;--secondary-orange-light-rgb: 82, 80, 97;--secondary-green: #99dec3;--secondary-green-rgb: 153, 222, 195;--secondary-green-dark: #6acbb1;--secondary-green-dark-rgb: 106, 203, 177;--secondary-green-darker: #31aa7e;--secondary-green-darker-rgb: 49, 170, 126;--secondary-green-light: #baedd9;--secondary-green-light-rgb: 186, 237, 217;--accent: #1897f3;--accent-rgb: 24, 151, 243;--accent-dark: #1672c7;--accent-dark-rgb: 22, 114, 199;--accent-light: #4fb1f9;--accent-light-rgb: 79, 177, 249;--accent-lighter: #8ae1fd;--accent-lighter-rgb: 138, 225, 253;--alert: #df4561;--alert-rgb: 223, 69, 97;--alert-dark: #bb2b45;--alert-dark-rgb: 187, 43, 69;--accent-alert-light: #f37c91;--accent-alert-light-rgb: 243, 124, 145;--cream: #fafafa;--cream-rgb: 250, 250, 250;--hover: #42b7ff;--hover-rgb: 66, 183, 255;--active: #0a75cc;--active-rgb: 10, 117, 204;--border: #d9d9d9;--border-rgb: 217, 217, 217}:root{--gray-100: #16161e;--gray-100-rgb: 22, 22, 30;--gray-95: #3f3d4b;--gray-95-rgb: 63, 61, 75;--gray-90: #525061;--gray-90-rgb: 82, 80, 97;--gray-75: #838192;--gray-75-rgb: 131, 129, 146;--gray-50: #bcbac8;--gray-50-rgb: 188, 186, 200;--gray-25: #dbdae2;--gray-25-rgb: 219, 218, 226;--gray-10: #ebeaf0;--gray-10-rgb: 235, 234, 240;--gray-5: #f7f7fc;--gray-5-rgb: 247, 247, 252;--black-100: #000000;--black-100-rgb: 0, 0, 0;--black-75: #616161;--black-75-rgb: 97, 97, 97;--black-50: #838192;--black-50-rgb: 131, 129, 146;--black-25: #bcbac8;--black-25-rgb: 188, 186, 200;--black-10: #ebeaf0;--black-10-rgb: 235, 234, 240;--white-100: #ffffff;--white-100-rgb: 255, 255, 255}:root{--heading-font-weight: 700;--heading-font-size-1: 3.75rem;--heading-line-height-1: 4.875rem;--heading-font-size-2: 3rem;--heading-line-height-2: 4rem;--heading-font-size-3: 2.25rem;--heading-line-height-3: 2.875rem;--heading-font-size-4: 1.875rem;--heading-line-height-4: 2.375rem;--heading-font-size-5: 1.5rem;--heading-line-height-5: 2rem;--heading-font-size-6: 1.25rem;--heading-line-height-6: 1.75rem;--base-font-size: .875rem;--base-line-height: 1.375rem;--base-weight: 400;--base-bold: 700;--base-font-size-sm: .75rem;--base-line-height-sm: 1.25rem;--base-font-size-lg: 1rem;--base-line-height-lg: 1.5rem;--base-font-size-xl: 1.25rem;--base-line-height-xl: 1.75rem;--base-font-size-xxl: 1.5rem;--base-line-height-xxl: 2rem}:root{--heading-font-weight: 700;--heading-font-size-xl: 3.75rem;--heading-line-height-xl: 4.875rem;--heading-font-size-l: 3rem;--heading-line-height-l: 3.9375rem;--heading-font-size: 2.25rem;--heading-line-height: 2.875rem;--heading-font-size-s: 1.5rem;--heading-line-height-s: 2rem;--body-font-size: 1rem;--body-line-height: 1.3125rem;--body-weight: normal;--body-bold: bold;--body-font-size-large: 1.5rem;--body-line-height-large: 1.625rem;--body-font-size-medium: 1.125;--body-line-height-medium: 1rem;--body-font-size-small: .875rem;--body-line-height-small: 1.125rem;--body-font-size-tiny: .75rem;--body-line-height-tiny: 1rem;--quote-font-size-large: 1.5rem;--quote-line-height-large: 2rem;--quote-font-weight-large: normal;--quote-font-size: 1rem;--quote-line-height: 1.3125rem;--quote-font-weight: normal;--form-input-font-size: 1rem;--form-input-line-height: 1.3125rem;--form-input-font-weight: bold;--form-hint-font-size: .875rem;--form-hint-line-height: 1.3125rem;--form-hint-font-weight: normal;--form-label-font-size: .875rem;--form-label-line-height: 1.3125rem;--form-label-font-weight: normal;--form-dropdown-font-size: 1rem;--form-dropdown-line-height: 1.3125rem;--form-dropdown-font-weight: normal;--table-font-size: .875rem;--table-line-height: 1.0625rem;--table-header-font-weight: bold;--table-body-font-weight: normal;--table-body-secondary-line-height: 1.3125rem;--button-font-size: 1rem;--button-line-height: 1.25rem;--button-font-weight: bold;--font-size-small: .75rem;--font-weight-small: 400;--font-line-height-small: 1.25rem;--font-weight-700: 700}:root{--spacing: 8px;--border-radius: 6px;--border-radius-soft: 4px;--transition-soft: .3s;--transition-long: .75s}*{box-sizing:border-box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const assertClassesApplied: (expectedClasses: string[] | null, component: HTMLElement) => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const i = (h, r) => {
|
|
2
|
-
h == null || h.forEach((a) => {
|
|
3
|
-
if (!r.className.split(" ").some((t) => t.startsWith(`_${a}_`)))
|
|
4
|
-
throw new Error(`
|
|
5
|
-
Received: ${r.className}
|
|
6
|
-
Expected: _${a}_{x}, (where {x} = random hash)`);
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
i as assertClassesApplied
|
|
11
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { u as S, b as D, f as k } from "./index-CH45lKw7.js";
|
|
2
|
-
import * as i from "react";
|
|
3
|
-
import { u as _ } from "./useIsFocusVisible-BH4IAdcw.js";
|
|
4
|
-
function v(p) {
|
|
5
|
-
const {
|
|
6
|
-
rootElementName: n = "",
|
|
7
|
-
componentName: l
|
|
8
|
-
} = p, [c, y] = i.useState(n.toUpperCase());
|
|
9
|
-
process.env.NODE_ENV !== "production" && i.useEffect(() => {
|
|
10
|
-
n && c !== n.toUpperCase() && console.error(`useRootElementName: the \`rootElementName\` prop of ${l ? `the ${l} component` : "a component"} expected the '${n}' element, but a '${c.toLowerCase()}' was rendered instead`, "This may cause hydration issues in an SSR context, for example in a Next.js app");
|
|
11
|
-
}, [n, c, l]);
|
|
12
|
-
const u = i.useCallback((m) => {
|
|
13
|
-
var s;
|
|
14
|
-
y((s = m == null ? void 0 : m.tagName) != null ? s : "");
|
|
15
|
-
}, []);
|
|
16
|
-
return [c, u];
|
|
17
|
-
}
|
|
18
|
-
function W(p = {}) {
|
|
19
|
-
const {
|
|
20
|
-
disabled: n = !1,
|
|
21
|
-
focusableWhenDisabled: l,
|
|
22
|
-
href: c,
|
|
23
|
-
rootRef: y,
|
|
24
|
-
tabIndex: u,
|
|
25
|
-
to: m,
|
|
26
|
-
type: s,
|
|
27
|
-
rootElementName: T
|
|
28
|
-
} = p, b = i.useRef(), [B, N] = i.useState(!1), {
|
|
29
|
-
isFocusVisibleRef: E,
|
|
30
|
-
onFocus: F,
|
|
31
|
-
onBlur: M,
|
|
32
|
-
ref: U
|
|
33
|
-
} = _(), [d, R] = i.useState(!1);
|
|
34
|
-
n && !l && d && R(!1), i.useEffect(() => {
|
|
35
|
-
E.current = d;
|
|
36
|
-
}, [d, E]);
|
|
37
|
-
const [f, V] = v({
|
|
38
|
-
rootElementName: T ?? (c || m ? "a" : void 0),
|
|
39
|
-
componentName: "Button"
|
|
40
|
-
}), w = (t) => (e) => {
|
|
41
|
-
var o;
|
|
42
|
-
d && e.preventDefault(), (o = t.onMouseLeave) == null || o.call(t, e);
|
|
43
|
-
}, K = (t) => (e) => {
|
|
44
|
-
var o;
|
|
45
|
-
M(e), E.current === !1 && R(!1), (o = t.onBlur) == null || o.call(t, e);
|
|
46
|
-
}, P = (t) => (e) => {
|
|
47
|
-
var o;
|
|
48
|
-
if (b.current || (b.current = e.currentTarget), F(e), E.current === !0) {
|
|
49
|
-
var r;
|
|
50
|
-
R(!0), (r = t.onFocusVisible) == null || r.call(t, e);
|
|
51
|
-
}
|
|
52
|
-
(o = t.onFocus) == null || o.call(t, e);
|
|
53
|
-
}, g = () => {
|
|
54
|
-
const t = b.current;
|
|
55
|
-
return f === "BUTTON" || f === "INPUT" && ["button", "submit", "reset"].includes(t == null ? void 0 : t.type) || f === "A" && (t == null ? void 0 : t.href);
|
|
56
|
-
}, I = (t) => (e) => {
|
|
57
|
-
if (!n) {
|
|
58
|
-
var o;
|
|
59
|
-
(o = t.onClick) == null || o.call(t, e);
|
|
60
|
-
}
|
|
61
|
-
}, $ = (t) => (e) => {
|
|
62
|
-
var o;
|
|
63
|
-
n || (N(!0), document.addEventListener("mouseup", () => {
|
|
64
|
-
N(!1);
|
|
65
|
-
}, {
|
|
66
|
-
once: !0
|
|
67
|
-
})), (o = t.onMouseDown) == null || o.call(t, e);
|
|
68
|
-
}, C = (t) => (e) => {
|
|
69
|
-
var o;
|
|
70
|
-
if ((o = t.onKeyDown) == null || o.call(t, e), !e.defaultMuiPrevented && (e.target === e.currentTarget && !g() && e.key === " " && e.preventDefault(), e.target === e.currentTarget && e.key === " " && !n && N(!0), e.target === e.currentTarget && !g() && e.key === "Enter" && !n)) {
|
|
71
|
-
var r;
|
|
72
|
-
(r = t.onClick) == null || r.call(t, e), e.preventDefault();
|
|
73
|
-
}
|
|
74
|
-
}, L = (t) => (e) => {
|
|
75
|
-
var o;
|
|
76
|
-
if (e.target === e.currentTarget && N(!1), (o = t.onKeyUp) == null || o.call(t, e), e.target === e.currentTarget && !g() && !n && e.key === " " && !e.defaultMuiPrevented) {
|
|
77
|
-
var r;
|
|
78
|
-
(r = t.onClick) == null || r.call(t, e);
|
|
79
|
-
}
|
|
80
|
-
}, x = S(V, y, U, b), a = {};
|
|
81
|
-
return u !== void 0 && (a.tabIndex = u), f === "BUTTON" ? (a.type = s ?? "button", l ? a["aria-disabled"] = n : a.disabled = n) : f === "INPUT" ? s && ["button", "submit", "reset"].includes(s) && (l ? a["aria-disabled"] = n : a.disabled = n) : f !== "" && (!c && !m && (a.role = "button", a.tabIndex = u ?? 0), n && (a["aria-disabled"] = n, a.tabIndex = l ? u ?? 0 : -1)), {
|
|
82
|
-
getRootProps: (t = {}) => {
|
|
83
|
-
const e = D({}, k(p), k(t)), o = D({
|
|
84
|
-
type: s
|
|
85
|
-
}, e, a, t, {
|
|
86
|
-
onBlur: K(e),
|
|
87
|
-
onClick: I(e),
|
|
88
|
-
onFocus: P(e),
|
|
89
|
-
onKeyDown: C(e),
|
|
90
|
-
onKeyUp: L(e),
|
|
91
|
-
onMouseDown: $(e),
|
|
92
|
-
onMouseLeave: w(e),
|
|
93
|
-
ref: x
|
|
94
|
-
});
|
|
95
|
-
return delete o.onFocusVisible, o;
|
|
96
|
-
},
|
|
97
|
-
focusVisible: d,
|
|
98
|
-
setFocusVisible: R,
|
|
99
|
-
active: B,
|
|
100
|
-
rootRef: x
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
export {
|
|
104
|
-
W as u
|
|
105
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { u as g } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
-
let I = 0;
|
|
4
|
-
function x(e) {
|
|
5
|
-
const [n, t] = o.useState(e), u = e || n;
|
|
6
|
-
return o.useEffect(() => {
|
|
7
|
-
n == null && (I += 1, t(`mui-${I}`));
|
|
8
|
-
}, [n]), u;
|
|
9
|
-
}
|
|
10
|
-
const p = o.useId;
|
|
11
|
-
function y(e) {
|
|
12
|
-
if (p !== void 0) {
|
|
13
|
-
const n = p();
|
|
14
|
-
return e ?? n;
|
|
15
|
-
}
|
|
16
|
-
return x(e);
|
|
17
|
-
}
|
|
18
|
-
const b = /* @__PURE__ */ o.createContext(null);
|
|
19
|
-
process.env.NODE_ENV !== "production" && (b.displayName = "CompoundComponentContext");
|
|
20
|
-
function S(e) {
|
|
21
|
-
const n = Array.from(e.keys()).map((t) => {
|
|
22
|
-
const u = e.get(t);
|
|
23
|
-
return {
|
|
24
|
-
key: t,
|
|
25
|
-
subitem: u
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
return n.sort((t, u) => {
|
|
29
|
-
const s = t.subitem.ref.current, r = u.subitem.ref.current;
|
|
30
|
-
return s === null || r === null || s === r ? 0 : s.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
|
|
31
|
-
}), new Map(n.map((t) => [t.key, t.subitem]));
|
|
32
|
-
}
|
|
33
|
-
function E() {
|
|
34
|
-
const [e, n] = o.useState(/* @__PURE__ */ new Map()), t = o.useRef(/* @__PURE__ */ new Set()), u = o.useCallback(function(a) {
|
|
35
|
-
t.current.delete(a), n((m) => {
|
|
36
|
-
const c = new Map(m);
|
|
37
|
-
return c.delete(a), c;
|
|
38
|
-
});
|
|
39
|
-
}, []), s = o.useCallback(function(a, m) {
|
|
40
|
-
let c;
|
|
41
|
-
return typeof a == "function" ? c = a(t.current) : c = a, t.current.add(c), n((C) => {
|
|
42
|
-
const l = new Map(C);
|
|
43
|
-
return l.set(c, m), l;
|
|
44
|
-
}), {
|
|
45
|
-
id: c,
|
|
46
|
-
deregister: () => u(c)
|
|
47
|
-
};
|
|
48
|
-
}, [u]), r = o.useMemo(() => S(e), [e]), i = o.useCallback(function(a) {
|
|
49
|
-
return Array.from(r.keys()).indexOf(a);
|
|
50
|
-
}, [r]);
|
|
51
|
-
return {
|
|
52
|
-
contextValue: o.useMemo(() => ({
|
|
53
|
-
getItemIndex: i,
|
|
54
|
-
registerItem: s,
|
|
55
|
-
totalSubitemCount: e.size
|
|
56
|
-
}), [i, s, e.size]),
|
|
57
|
-
subitems: r
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function N(e, n) {
|
|
61
|
-
const t = o.useContext(b);
|
|
62
|
-
if (t === null)
|
|
63
|
-
throw new Error("useCompoundItem must be used within a useCompoundParent");
|
|
64
|
-
const {
|
|
65
|
-
registerItem: u
|
|
66
|
-
} = t, [s, r] = o.useState(typeof e == "function" ? void 0 : e);
|
|
67
|
-
return g(() => {
|
|
68
|
-
const {
|
|
69
|
-
id: i,
|
|
70
|
-
deregister: d
|
|
71
|
-
} = u(e, n);
|
|
72
|
-
return r(i), d;
|
|
73
|
-
}, [u, n, e]), {
|
|
74
|
-
id: s,
|
|
75
|
-
index: s !== void 0 ? t.getItemIndex(s) : -1,
|
|
76
|
-
totalItemCount: t.totalSubitemCount
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export {
|
|
80
|
-
b as C,
|
|
81
|
-
N as a,
|
|
82
|
-
E as b,
|
|
83
|
-
y as u
|
|
84
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
function d({
|
|
3
|
-
controlled: o,
|
|
4
|
-
default: r,
|
|
5
|
-
name: t,
|
|
6
|
-
state: s = "value"
|
|
7
|
-
}) {
|
|
8
|
-
const {
|
|
9
|
-
current: e
|
|
10
|
-
} = n.useRef(o !== void 0), [l, c] = n.useState(r), u = e ? o : l;
|
|
11
|
-
if (process.env.NODE_ENV !== "production") {
|
|
12
|
-
n.useEffect(() => {
|
|
13
|
-
e !== (o !== void 0) && console.error([`MUI: A component is changing the ${e ? "" : "un"}controlled ${s} state of ${t} to be ${e ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${t} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
14
|
-
`));
|
|
15
|
-
}, [s, t, o]);
|
|
16
|
-
const {
|
|
17
|
-
current: i
|
|
18
|
-
} = n.useRef(r);
|
|
19
|
-
n.useEffect(() => {
|
|
20
|
-
!e && i !== r && console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`].join(`
|
|
21
|
-
`));
|
|
22
|
-
}, [JSON.stringify(r)]);
|
|
23
|
-
}
|
|
24
|
-
const f = n.useCallback((i) => {
|
|
25
|
-
e || c(i);
|
|
26
|
-
}, []);
|
|
27
|
-
return [u, f];
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
d as u
|
|
31
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { P as a } from "./index-CH45lKw7.js";
|
|
2
|
-
import * as c from "react";
|
|
3
|
-
import { u as m } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
4
|
-
function s(e, n) {
|
|
5
|
-
return process.env.NODE_ENV === "production" ? () => null : function(...o) {
|
|
6
|
-
return e(...o) || n(...o);
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
function d(e) {
|
|
10
|
-
const {
|
|
11
|
-
prototype: n = {}
|
|
12
|
-
} = e;
|
|
13
|
-
return !!n.isReactComponent;
|
|
14
|
-
}
|
|
15
|
-
function f(e, n, t, o, l) {
|
|
16
|
-
const u = e[n], p = l || n;
|
|
17
|
-
if (u == null || // When server-side rendering React doesn't warn either.
|
|
18
|
-
// This is not an accurate check for SSR.
|
|
19
|
-
// This is only in place for Emotion compat.
|
|
20
|
-
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
21
|
-
typeof window > "u")
|
|
22
|
-
return null;
|
|
23
|
-
let r;
|
|
24
|
-
const i = u.type;
|
|
25
|
-
return typeof i == "function" && !d(i) && (r = "Did you accidentally use a plain function component for an element instead?"), r !== void 0 ? new Error(`Invalid ${o} \`${p}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${r} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
26
|
-
}
|
|
27
|
-
const y = s(a.element, f);
|
|
28
|
-
y.isRequired = s(a.element.isRequired, f);
|
|
29
|
-
function E(e) {
|
|
30
|
-
return e && e.ownerDocument || document;
|
|
31
|
-
}
|
|
32
|
-
function h(e) {
|
|
33
|
-
const n = c.useRef(e);
|
|
34
|
-
return m(() => {
|
|
35
|
-
n.current = e;
|
|
36
|
-
}), c.useRef((...t) => (
|
|
37
|
-
// @ts-expect-error hide `this`
|
|
38
|
-
(0, n.current)(...t)
|
|
39
|
-
)).current;
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
y as e,
|
|
43
|
-
E as o,
|
|
44
|
-
h as u
|
|
45
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as a from "react";
|
|
2
|
-
import { T as o } from "./useTimeout-DxF9kiZL.js";
|
|
3
|
-
let n = !0, s = !1;
|
|
4
|
-
const c = new o(), f = {
|
|
5
|
-
text: !0,
|
|
6
|
-
search: !0,
|
|
7
|
-
url: !0,
|
|
8
|
-
tel: !0,
|
|
9
|
-
email: !0,
|
|
10
|
-
password: !0,
|
|
11
|
-
number: !0,
|
|
12
|
-
date: !0,
|
|
13
|
-
month: !0,
|
|
14
|
-
week: !0,
|
|
15
|
-
time: !0,
|
|
16
|
-
datetime: !0,
|
|
17
|
-
"datetime-local": !0
|
|
18
|
-
};
|
|
19
|
-
function d(e) {
|
|
20
|
-
const {
|
|
21
|
-
type: t,
|
|
22
|
-
tagName: r
|
|
23
|
-
} = e;
|
|
24
|
-
return !!(r === "INPUT" && f[t] && !e.readOnly || r === "TEXTAREA" && !e.readOnly || e.isContentEditable);
|
|
25
|
-
}
|
|
26
|
-
function h(e) {
|
|
27
|
-
e.metaKey || e.altKey || e.ctrlKey || (n = !0);
|
|
28
|
-
}
|
|
29
|
-
function i() {
|
|
30
|
-
n = !1;
|
|
31
|
-
}
|
|
32
|
-
function y() {
|
|
33
|
-
this.visibilityState === "hidden" && s && (n = !0);
|
|
34
|
-
}
|
|
35
|
-
function m(e) {
|
|
36
|
-
e.addEventListener("keydown", h, !0), e.addEventListener("mousedown", i, !0), e.addEventListener("pointerdown", i, !0), e.addEventListener("touchstart", i, !0), e.addEventListener("visibilitychange", y, !0);
|
|
37
|
-
}
|
|
38
|
-
function b(e) {
|
|
39
|
-
const {
|
|
40
|
-
target: t
|
|
41
|
-
} = e;
|
|
42
|
-
try {
|
|
43
|
-
return t.matches(":focus-visible");
|
|
44
|
-
} catch {
|
|
45
|
-
}
|
|
46
|
-
return n || d(t);
|
|
47
|
-
}
|
|
48
|
-
function w() {
|
|
49
|
-
const e = a.useCallback((u) => {
|
|
50
|
-
u != null && m(u.ownerDocument);
|
|
51
|
-
}, []), t = a.useRef(!1);
|
|
52
|
-
function r() {
|
|
53
|
-
return t.current ? (s = !0, c.start(100, () => {
|
|
54
|
-
s = !1;
|
|
55
|
-
}), t.current = !1, !0) : !1;
|
|
56
|
-
}
|
|
57
|
-
function l(u) {
|
|
58
|
-
return b(u) ? (t.current = !0, !0) : !1;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
isFocusVisibleRef: t,
|
|
62
|
-
onFocus: l,
|
|
63
|
-
onBlur: r,
|
|
64
|
-
ref: e
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export {
|
|
68
|
-
w as u
|
|
69
|
-
};
|