@pismo/marola 1.0.0-beta.69 → 1.0.0-beta.7
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/{Button-BAljjMv3.js → Button-2b1peDFT.js} +2 -2
- package/dist/{ClickAwayListener-DbEYZpyh.js → ClickAwayListener-BSW-Nd-y.js} +3 -4
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/Group-B3p31ftp.js +26 -0
- package/dist/{Popup-Ck3XlWMq.js → Popup-B6ZSGIEI.js} +3 -3
- package/dist/{Portal-oY3enyAm.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/SelectButton-K3OIfR5m.js +61 -0
- package/dist/{Tabs.module-BGGTkDc5.js → Tabs.module-jkH1Qjn7.js} +7 -7
- package/dist/Toggle-BWF0-SPB.js +175 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -1
- package/dist/assets/Group.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Skeleton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/SortTooltip.css +1 -1
- package/dist/assets/Stepper.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/{combineHooksSlotProps-C-zYvfnF.js → combineHooksSlotProps-DVjg9PRh.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +2 -11
- package/dist/components/Adornment/Adornment.js +6 -6
- package/dist/components/Advice/Advice.d.ts +17 -32
- package/dist/components/Advice/Advice.js +40 -39
- package/dist/components/Advice/Advice.stories.d.ts +3 -4
- package/dist/components/Button/Button.d.ts +0 -2
- package/dist/components/Button/Button.js +49 -51
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +4 -6
- package/dist/components/Chip/Chip.js +7 -11
- package/dist/components/Chip/Chip.stories.d.ts +15 -6
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +3 -3
- package/dist/components/Dialog/Backdrop.js +7 -8
- package/dist/components/Dialog/CloseIconButton.d.ts +2 -1
- package/dist/components/Dialog/CloseIconButton.js +18 -15
- package/dist/components/Dialog/Dialog.d.ts +10 -16
- package/dist/components/Dialog/Dialog.js +166 -167
- package/dist/components/Dialog/Dialog.stories.d.ts +108 -114
- package/dist/components/Dialog/DialogTitle.d.ts +2 -5
- package/dist/components/Dialog/DialogTitle.js +16 -22
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +17 -30
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +2 -3
- package/dist/components/Icon/Icon.js +51 -331
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +5 -26
- package/dist/components/Input/Input.js +304 -319
- package/dist/components/Input/Input.stories.d.ts +21 -2
- package/dist/components/InputSearch/InputSearch.d.ts +7 -37
- package/dist/components/InputSearch/InputSearch.js +29 -27
- package/dist/components/InputSearch/InputSearch.stories.d.ts +3 -15
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +2 -6
- package/dist/components/PageHeader/PageHeader.js +71 -78
- package/dist/components/PageHeader/PageHeader.stories.d.ts +1 -3
- package/dist/components/Pagination/Pagination.d.ts +1 -5
- package/dist/components/Pagination/Pagination.js +91 -90
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/RowItem/RowItem.d.ts +2 -2
- package/dist/components/RowItem/RowItem.js +6 -10
- package/dist/components/Select/Select.d.ts +0 -22
- package/dist/components/Select/Select.js +413 -476
- package/dist/components/Select/SelectButton.d.ts +0 -2
- package/dist/components/Select/SelectButton.js +2 -3
- package/dist/components/Skeleton/Skeleton.d.ts +1 -3
- package/dist/components/Skeleton/Skeleton.js +14 -20
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +94 -94
- package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
- package/dist/components/SortTooltip/SortTooltip.js +46 -46
- package/dist/components/Stepper/Stepper.js +35 -35
- package/dist/components/Table/Table.d.ts +1 -3
- package/dist/components/Table/Table.js +99 -87
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +3 -5
- package/dist/components/Tabs/Tab.js +36 -38
- package/dist/components/Tabs/TabPanel.d.ts +2 -4
- package/dist/components/Tabs/TabPanel.js +40 -51
- package/dist/components/Tabs/Tabs.d.ts +4 -6
- package/dist/components/Tabs/Tabs.js +128 -131
- package/dist/components/TextDisplay/TextDisplay.d.ts +3 -7
- package/dist/components/TextDisplay/TextDisplay.js +37 -44
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -2
- package/dist/components/Toggle/Toggle.js +55 -55
- package/dist/components/ToggleGroup/Group.d.ts +0 -2
- package/dist/components/ToggleGroup/Group.js +2 -4
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -2
- package/dist/components/ToggleGroup/Toggle.js +5 -9
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -3
- package/dist/components/Tooltip/Tooltip.d.ts +1 -3
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -2
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +30 -34
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/{useSlotProps-C_I1kEHr.js → index-CH45lKw7.js} +99 -99
- package/dist/{index-bQFToy-I.js → index-CjW42-M-.js} +1 -1
- package/dist/main.d.ts +0 -9
- package/dist/main.js +77 -95
- package/dist/marola.css +1 -1
- package/dist/test-utils/assertStyles.d.ts +1 -1
- package/dist/{useButton-DcihopJG.js → useButton-DNk3wrQp.js} +1 -1
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-xTG9piMa.js +45 -0
- package/dist/{useList-B9C55YB7.js → useList-B0hog_3-.js} +2 -2
- package/package.json +13 -22
- package/dist/Dialog.module-W7UCXlf3.js +0 -29
- package/dist/Group-DspH8hyO.js +0 -30
- package/dist/Popover.module-B4boCutS.js +0 -10
- package/dist/SelectButton-B38avP9u.js +0 -75
- package/dist/Toggle-MfR7l8Wn.js +0 -190
- package/dist/assets/Alert.css +0 -1
- package/dist/assets/Autocomplete.css +0 -1
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Description.css +0 -1
- package/dist/assets/Popover.css +0 -1
- package/dist/assets/RadioButton.css +0 -1
- package/dist/assets/ResultWithChips.css +0 -1
- package/dist/assets/StepperNavigator.css +0 -1
- package/dist/components/Adornment/Adornment.stories.d.ts +0 -14
- package/dist/components/Adornment/adornment.test.d.ts +0 -1
- package/dist/components/Alert/Alert.d.ts +0 -11
- package/dist/components/Alert/Alert.js +0 -46
- package/dist/components/Alert/Alert.stories.d.ts +0 -24
- package/dist/components/Alert/Alert.test.d.ts +0 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -20
- package/dist/components/Autocomplete/Autocomplete.js +0 -679
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +0 -23
- package/dist/components/Avatar/Avatar.d.ts +0 -15
- package/dist/components/Avatar/Avatar.js +0 -51
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -25
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +0 -14
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js +0 -37
- package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +0 -23
- package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +0 -1
- package/dist/components/Description/Description.d.ts +0 -21
- package/dist/components/Description/Description.js +0 -66
- package/dist/components/Description/Description.stories.d.ts +0 -22
- package/dist/components/Description/Description.test.d.ts +0 -1
- package/dist/components/PageHeader/PageHeader.test.d.ts +0 -1
- package/dist/components/Popover/Popover.d.ts +0 -32
- package/dist/components/Popover/Popover.js +0 -24
- package/dist/components/Popover/Popover.stories.d.ts +0 -34
- package/dist/components/Popover/PopoverBody.d.ts +0 -6
- package/dist/components/Popover/PopoverBody.js +0 -6
- package/dist/components/Popover/PopoverFooter.d.ts +0 -6
- package/dist/components/Popover/PopoverFooter.js +0 -6
- package/dist/components/Popover/PopoverHeader.d.ts +0 -6
- package/dist/components/Popover/PopoverHeader.js +0 -6
- package/dist/components/RadioButton/RadioButton.d.ts +0 -19
- package/dist/components/RadioButton/RadioButton.js +0 -37
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -24
- package/dist/components/RadioButton/RadioButton.test.d.ts +0 -1
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +0 -12
- package/dist/components/ResultWithChips/ResultWithChips.js +0 -33
- package/dist/components/RowItem/RowItem.stories.d.ts +0 -17
- package/dist/components/RowItem/rowItem.test.d.ts +0 -1
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -58
- package/dist/components/StepperNavigator/StepperNavigator.js +0 -115
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -18
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +0 -1
- package/dist/ownerDocument-YGhwAnr1.js +0 -33
- package/dist/useCompoundItem-B7Eo_qZk.js +0 -68
- package/dist/useEventCallback-BAQJJ3ye.js +0 -14
- package/dist/useId-BW-oWmul.js +0 -19
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import '../../assets/StepperNavigator.css';
|
|
2
|
-
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { c as i } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { Button as I } from "../Button/Button.js";
|
|
5
|
-
import { Icon as K } from "../Icon/Icon.js";
|
|
6
|
-
const _ = {
|
|
7
|
-
"stepper-navigator": "_stepper-navigator_27f6m_1",
|
|
8
|
-
"cancel-button": "_cancel-button_27f6m_11",
|
|
9
|
-
"previous-button": "_previous-button_27f6m_20",
|
|
10
|
-
"next-button": "_next-button_27f6m_39",
|
|
11
|
-
"finish-button": "_finish-button_27f6m_40"
|
|
12
|
-
}, b = {
|
|
13
|
-
en: {
|
|
14
|
-
previous: "Previous",
|
|
15
|
-
cancel: "Cancel",
|
|
16
|
-
next: "Next",
|
|
17
|
-
finish: "Finish"
|
|
18
|
-
},
|
|
19
|
-
pt: {
|
|
20
|
-
previous: "Anterior",
|
|
21
|
-
cancel: "Cancelar",
|
|
22
|
-
next: "Próximo",
|
|
23
|
-
finish: "Finalizar"
|
|
24
|
-
}
|
|
25
|
-
}, R = ({
|
|
26
|
-
hideNext: C = !1,
|
|
27
|
-
hidePrevious: j = !1,
|
|
28
|
-
hideCancel: z = !1,
|
|
29
|
-
hideFinish: w = !1,
|
|
30
|
-
disableNext: y = !1,
|
|
31
|
-
disablePrevious: A = !1,
|
|
32
|
-
disableCancel: S = !1,
|
|
33
|
-
disableFinish: q = !1,
|
|
34
|
-
lang: h = "en",
|
|
35
|
-
labelNext: N,
|
|
36
|
-
labelPrevious: f,
|
|
37
|
-
labelCancel: g,
|
|
38
|
-
labelFinish: k,
|
|
39
|
-
className: D,
|
|
40
|
-
"data-testid": E = "stepper-navigator",
|
|
41
|
-
previousButtonProps: d,
|
|
42
|
-
cancelButtonProps: c,
|
|
43
|
-
nextButtonProps: e = { rightIcon: /* @__PURE__ */ a(K, { icon: "circle-arrow-right", size: 24 }) },
|
|
44
|
-
finishButtonProps: m,
|
|
45
|
-
onNext: F = () => {
|
|
46
|
-
},
|
|
47
|
-
onPrevious: G = () => {
|
|
48
|
-
},
|
|
49
|
-
onCancel: H = () => {
|
|
50
|
-
},
|
|
51
|
-
onFinish: J = () => {
|
|
52
|
-
}
|
|
53
|
-
}) => (g = g || b[h].cancel, f = f || b[h].previous, N = N || b[h].next, k = k || b[h].finish, /* @__PURE__ */ l("div", { className: i(_["stepper-navigator"], D), "data-testid": E, children: [
|
|
54
|
-
j ? /* @__PURE__ */ a("span", {}) : /* @__PURE__ */ l(
|
|
55
|
-
I,
|
|
56
|
-
{
|
|
57
|
-
className: i(_["previous-button"], d == null ? void 0 : d.className),
|
|
58
|
-
"data-testid": d == null ? void 0 : d["data-testid"],
|
|
59
|
-
disabled: A,
|
|
60
|
-
onClick: G,
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ a("span", { children: d == null ? void 0 : d.leftIcon }),
|
|
63
|
-
/* @__PURE__ */ a("span", { children: f }),
|
|
64
|
-
/* @__PURE__ */ a("span", { children: d == null ? void 0 : d.rightIcon })
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ l("span", { children: [
|
|
69
|
-
!z && /* @__PURE__ */ l(
|
|
70
|
-
I,
|
|
71
|
-
{
|
|
72
|
-
className: i(_["cancel-button"], c == null ? void 0 : c.className),
|
|
73
|
-
"data-testid": c == null ? void 0 : c["data-testid"],
|
|
74
|
-
disabled: S,
|
|
75
|
-
onClick: H,
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ a("span", { children: c == null ? void 0 : c.leftIcon }),
|
|
78
|
-
/* @__PURE__ */ a("span", { children: g }),
|
|
79
|
-
/* @__PURE__ */ a("span", { children: c == null ? void 0 : c.rightIcon })
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
!C && /* @__PURE__ */ l(
|
|
84
|
-
I,
|
|
85
|
-
{
|
|
86
|
-
className: i(_["next-button"], e == null ? void 0 : e.className),
|
|
87
|
-
"data-testid": e == null ? void 0 : e["data-testid"],
|
|
88
|
-
disabled: y,
|
|
89
|
-
onClick: F,
|
|
90
|
-
children: [
|
|
91
|
-
/* @__PURE__ */ a("span", { children: e == null ? void 0 : e.leftIcon }),
|
|
92
|
-
/* @__PURE__ */ a("span", { children: N }),
|
|
93
|
-
/* @__PURE__ */ a("span", { children: e == null ? void 0 : e.rightIcon })
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
!w && /* @__PURE__ */ l(
|
|
98
|
-
I,
|
|
99
|
-
{
|
|
100
|
-
className: i(_["finish-button"], m == null ? void 0 : m.className),
|
|
101
|
-
"data-testid": m == null ? void 0 : m["data-testid"],
|
|
102
|
-
disabled: q,
|
|
103
|
-
onClick: J,
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ a("span", { children: m == null ? void 0 : m.leftIcon }),
|
|
106
|
-
/* @__PURE__ */ a("span", { children: k }),
|
|
107
|
-
/* @__PURE__ */ a("span", { children: m == null ? void 0 : m.rightIcon })
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
] })
|
|
112
|
-
] }));
|
|
113
|
-
export {
|
|
114
|
-
R as StepperNavigator
|
|
115
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
tags: string[];
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Simple: Story;
|
|
14
|
-
export declare const WithCustomLanguage: Story;
|
|
15
|
-
export declare const WithCustomLabels: Story;
|
|
16
|
-
export declare const Disabled: Story;
|
|
17
|
-
export declare const WithIcons: Story;
|
|
18
|
-
export declare const DefaultWithNoIcons: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { P as c } from "./useSlotProps-C_I1kEHr.js";
|
|
2
|
-
function a(e, n) {
|
|
3
|
-
return process.env.NODE_ENV === "production" ? () => null : function(...t) {
|
|
4
|
-
return e(...t) || n(...t);
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
function p(e) {
|
|
8
|
-
const {
|
|
9
|
-
prototype: n = {}
|
|
10
|
-
} = e;
|
|
11
|
-
return !!n.isReactComponent;
|
|
12
|
-
}
|
|
13
|
-
function l(e, n, i, t, s) {
|
|
14
|
-
const r = e[n], f = s || n;
|
|
15
|
-
if (r == null || // When server-side rendering React doesn't warn either.
|
|
16
|
-
// This is not an accurate check for SSR.
|
|
17
|
-
// This is only in place for Emotion compat.
|
|
18
|
-
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
19
|
-
typeof window > "u")
|
|
20
|
-
return null;
|
|
21
|
-
let o;
|
|
22
|
-
const u = r.type;
|
|
23
|
-
return typeof u == "function" && !p(u) && (o = "Did you accidentally use a plain function component for an element instead?"), o !== void 0 ? new Error(`Invalid ${t} \`${f}\` supplied to \`${i}\`. Expected an element that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
24
|
-
}
|
|
25
|
-
const m = a(c.element, l);
|
|
26
|
-
m.isRequired = a(c.element.isRequired, l);
|
|
27
|
-
function y(e) {
|
|
28
|
-
return e && e.ownerDocument || document;
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
m as e,
|
|
32
|
-
y as o
|
|
33
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { u as I } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
-
const p = /* @__PURE__ */ o.createContext(null);
|
|
4
|
-
process.env.NODE_ENV !== "production" && (p.displayName = "CompoundComponentContext");
|
|
5
|
-
function b(t) {
|
|
6
|
-
const c = Array.from(t.keys()).map((e) => {
|
|
7
|
-
const r = t.get(e);
|
|
8
|
-
return {
|
|
9
|
-
key: e,
|
|
10
|
-
subitem: r
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
return c.sort((e, r) => {
|
|
14
|
-
const n = e.subitem.ref.current, s = r.subitem.ref.current;
|
|
15
|
-
return n === null || s === null || n === s ? 0 : n.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
|
|
16
|
-
}), new Map(c.map((e) => [e.key, e.subitem]));
|
|
17
|
-
}
|
|
18
|
-
function x() {
|
|
19
|
-
const [t, c] = o.useState(/* @__PURE__ */ new Map()), e = o.useRef(/* @__PURE__ */ new Set()), r = o.useCallback(function(i) {
|
|
20
|
-
e.current.delete(i), c((a) => {
|
|
21
|
-
const u = new Map(a);
|
|
22
|
-
return u.delete(i), u;
|
|
23
|
-
});
|
|
24
|
-
}, []), n = o.useCallback(function(i, a) {
|
|
25
|
-
let u;
|
|
26
|
-
return typeof i == "function" ? u = i(e.current) : u = i, e.current.add(u), c((C) => {
|
|
27
|
-
const l = new Map(C);
|
|
28
|
-
return l.set(u, a), l;
|
|
29
|
-
}), {
|
|
30
|
-
id: u,
|
|
31
|
-
deregister: () => r(u)
|
|
32
|
-
};
|
|
33
|
-
}, [r]), s = o.useMemo(() => b(t), [t]), m = o.useCallback(function(i) {
|
|
34
|
-
return Array.from(s.keys()).indexOf(i);
|
|
35
|
-
}, [s]);
|
|
36
|
-
return {
|
|
37
|
-
contextValue: o.useMemo(() => ({
|
|
38
|
-
getItemIndex: m,
|
|
39
|
-
registerItem: n,
|
|
40
|
-
totalSubitemCount: t.size
|
|
41
|
-
}), [m, n, t.size]),
|
|
42
|
-
subitems: s
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function S(t, c) {
|
|
46
|
-
const e = o.useContext(p);
|
|
47
|
-
if (e === null)
|
|
48
|
-
throw new Error("useCompoundItem must be used within a useCompoundParent");
|
|
49
|
-
const {
|
|
50
|
-
registerItem: r
|
|
51
|
-
} = e, [n, s] = o.useState(typeof t == "function" ? void 0 : t);
|
|
52
|
-
return I(() => {
|
|
53
|
-
const {
|
|
54
|
-
id: m,
|
|
55
|
-
deregister: d
|
|
56
|
-
} = r(t, c);
|
|
57
|
-
return s(m), d;
|
|
58
|
-
}, [r, c, t]), {
|
|
59
|
-
id: n,
|
|
60
|
-
index: n !== void 0 ? e.getItemIndex(n) : -1,
|
|
61
|
-
totalItemCount: e.totalSubitemCount
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
p as C,
|
|
66
|
-
x as a,
|
|
67
|
-
S as u
|
|
68
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as t from "react";
|
|
2
|
-
import { u as c } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
-
function s(e) {
|
|
4
|
-
const r = t.useRef(e);
|
|
5
|
-
return c(() => {
|
|
6
|
-
r.current = e;
|
|
7
|
-
}), t.useRef((...u) => (
|
|
8
|
-
// @ts-expect-error hide `this`
|
|
9
|
-
(0, r.current)(...u)
|
|
10
|
-
)).current;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
s as u
|
|
14
|
-
};
|
package/dist/useId-BW-oWmul.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as e from "react";
|
|
2
|
-
let n = 0;
|
|
3
|
-
function l(t) {
|
|
4
|
-
const [u, o] = e.useState(t), a = t || u;
|
|
5
|
-
return e.useEffect(() => {
|
|
6
|
-
u == null && (n += 1, o(`mui-${n}`));
|
|
7
|
-
}, [u]), a;
|
|
8
|
-
}
|
|
9
|
-
const s = e.useId;
|
|
10
|
-
function c(t) {
|
|
11
|
-
if (s !== void 0) {
|
|
12
|
-
const u = s();
|
|
13
|
-
return t ?? u;
|
|
14
|
-
}
|
|
15
|
-
return l(t);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
c as u
|
|
19
|
-
};
|