@pismo/marola 0.0.1-alpha.7 → 0.0.1-alpha.9
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/Tab-CRwnhsj5.js +254 -0
- package/dist/Tabs.module-yYcTJnj6.js +103 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -0
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +104 -104
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/InputSearch/InputSearch.d.ts +11 -0
- package/dist/components/InputSearch/InputSearch.js +29 -0
- package/dist/components/InputSearch/InputSearch.stories.d.ts +22 -0
- package/dist/components/InputSearch/InputSearch.stories.js +36 -0
- package/dist/components/PageHeader/PageHeader.js +25 -25
- package/dist/components/PageHeader/PageHeader.stories.js +3 -3
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +30 -30
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +14 -14
- package/dist/components/Tabs/Tab.js +6 -239
- package/dist/components/Tabs/TabPanel.js +18 -19
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/Tabs.js +12 -8
- package/dist/components/Toggle/Toggle.d.ts +4 -7
- package/dist/components/Toggle/Toggle.js +99 -103
- package/dist/components/Toggle/Toggle.stories.d.ts +21 -0
- package/dist/components/Toggle/Toggle.stories.js +33 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +42 -35
- package/package.json +1 -1
- package/dist/ListContext-Dj2Va7Iv.js +0 -18
- package/dist/Tabs.module-BA-PC7fA.js +0 -66
- package/dist/useCompoundItem-CTYi5M_E.js +0 -41
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import '../../assets/Toggle.css';
|
|
2
|
-
import { jsxs as I, jsx as
|
|
3
|
-
import { c as
|
|
2
|
+
import { jsxs as I, jsx as T } from "react/jsx-runtime";
|
|
3
|
+
import { c as F } from "../../clsx-DB4S2d7J.js";
|
|
4
4
|
import { a as y, _ as v } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
5
|
-
import * as
|
|
6
|
-
import { u as U, g as q, a as H, b as
|
|
5
|
+
import * as V from "react";
|
|
6
|
+
import { u as U, g as q, a as H, b as N, P as e, c as M, d as A } from "../../index-CqjC7P5Y.js";
|
|
7
7
|
import { u as D } from "../../useControlled-CCMYYdCM.js";
|
|
8
8
|
import { u as L } from "../../useIsFocusVisible-BH4IAdcw.js";
|
|
9
9
|
function W(l) {
|
|
10
10
|
const {
|
|
11
|
-
checked:
|
|
12
|
-
defaultChecked:
|
|
11
|
+
checked: s,
|
|
12
|
+
defaultChecked: p,
|
|
13
13
|
disabled: c,
|
|
14
|
-
onBlur:
|
|
15
|
-
onChange:
|
|
16
|
-
onFocus:
|
|
17
|
-
onFocusVisible:
|
|
14
|
+
onBlur: a,
|
|
15
|
+
onChange: g,
|
|
16
|
+
onFocus: r,
|
|
17
|
+
onFocusVisible: u,
|
|
18
18
|
readOnly: n,
|
|
19
|
-
required:
|
|
20
|
-
} = l, [
|
|
21
|
-
controlled:
|
|
22
|
-
default: !!
|
|
19
|
+
required: i
|
|
20
|
+
} = l, [S, x] = D({
|
|
21
|
+
controlled: s,
|
|
22
|
+
default: !!p,
|
|
23
23
|
name: "Switch",
|
|
24
24
|
state: "checked"
|
|
25
|
-
}), B = (t) => (
|
|
26
|
-
var
|
|
27
|
-
|
|
25
|
+
}), B = (t) => (o) => {
|
|
26
|
+
var b;
|
|
27
|
+
o.nativeEvent.defaultPrevented || (x(o.target.checked), g == null || g(o), (b = t.onChange) == null || b.call(t, o));
|
|
28
28
|
}, {
|
|
29
|
-
isFocusVisibleRef:
|
|
29
|
+
isFocusVisibleRef: _,
|
|
30
30
|
onBlur: w,
|
|
31
31
|
onFocus: f,
|
|
32
|
-
ref:
|
|
33
|
-
} = L(), [
|
|
34
|
-
c &&
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
const k =
|
|
38
|
-
var
|
|
39
|
-
k.current || (k.current =
|
|
40
|
-
},
|
|
41
|
-
var
|
|
42
|
-
w(
|
|
43
|
-
},
|
|
32
|
+
ref: m
|
|
33
|
+
} = L(), [h, P] = V.useState(!1);
|
|
34
|
+
c && h && P(!1), V.useEffect(() => {
|
|
35
|
+
_.current = h;
|
|
36
|
+
}, [h, _]);
|
|
37
|
+
const k = V.useRef(null), R = (t) => (o) => {
|
|
38
|
+
var b;
|
|
39
|
+
k.current || (k.current = o.currentTarget), f(o), _.current === !0 && (P(!0), u == null || u(o)), r == null || r(o), (b = t.onFocus) == null || b.call(t, o);
|
|
40
|
+
}, O = (t) => (o) => {
|
|
41
|
+
var b;
|
|
42
|
+
w(o), _.current === !1 && P(!1), a == null || a(o), (b = t.onBlur) == null || b.call(t, o);
|
|
43
|
+
}, C = U(m, k);
|
|
44
44
|
return {
|
|
45
|
-
checked:
|
|
45
|
+
checked: S,
|
|
46
46
|
disabled: !!c,
|
|
47
|
-
focusVisible:
|
|
47
|
+
focusVisible: h,
|
|
48
48
|
getInputProps: (t = {}) => y({
|
|
49
|
-
checked:
|
|
50
|
-
defaultChecked:
|
|
49
|
+
checked: s,
|
|
50
|
+
defaultChecked: p,
|
|
51
51
|
disabled: c,
|
|
52
52
|
readOnly: n,
|
|
53
|
-
ref:
|
|
54
|
-
required:
|
|
53
|
+
ref: C,
|
|
54
|
+
required: i,
|
|
55
55
|
type: "checkbox",
|
|
56
56
|
role: "switch",
|
|
57
|
-
"aria-checked":
|
|
57
|
+
"aria-checked": s
|
|
58
58
|
}, t, {
|
|
59
59
|
onChange: B(t),
|
|
60
60
|
onFocus: R(t),
|
|
61
|
-
onBlur:
|
|
61
|
+
onBlur: O(t)
|
|
62
62
|
}),
|
|
63
|
-
inputRef:
|
|
63
|
+
inputRef: C,
|
|
64
64
|
readOnly: !!n
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -71,61 +71,61 @@ function z(l) {
|
|
|
71
71
|
H($, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
|
|
72
72
|
const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"], J = (l) => {
|
|
73
73
|
const {
|
|
74
|
-
checked:
|
|
75
|
-
disabled:
|
|
74
|
+
checked: s,
|
|
75
|
+
disabled: p,
|
|
76
76
|
focusVisible: c,
|
|
77
|
-
readOnly:
|
|
77
|
+
readOnly: a
|
|
78
78
|
} = l;
|
|
79
79
|
return M({
|
|
80
|
-
root: ["root",
|
|
80
|
+
root: ["root", s && "checked", p && "disabled", c && "focusVisible", a && "readOnly"],
|
|
81
81
|
thumb: ["thumb"],
|
|
82
82
|
input: ["input"],
|
|
83
83
|
track: ["track"]
|
|
84
84
|
}, A(z));
|
|
85
|
-
}, E = /* @__PURE__ */
|
|
86
|
-
var c,
|
|
85
|
+
}, E = /* @__PURE__ */ V.forwardRef(function(s, p) {
|
|
86
|
+
var c, a, g, r;
|
|
87
87
|
const {
|
|
88
|
-
slotProps:
|
|
88
|
+
slotProps: u = {},
|
|
89
89
|
slots: n = {}
|
|
90
|
-
} =
|
|
91
|
-
getInputProps:
|
|
90
|
+
} = s, i = v(s, G), {
|
|
91
|
+
getInputProps: S,
|
|
92
92
|
checked: x,
|
|
93
93
|
disabled: B,
|
|
94
|
-
focusVisible:
|
|
94
|
+
focusVisible: _,
|
|
95
95
|
readOnly: w
|
|
96
|
-
} = W(
|
|
96
|
+
} = W(s), f = y({}, s, {
|
|
97
97
|
checked: x,
|
|
98
98
|
disabled: B,
|
|
99
|
-
focusVisible:
|
|
99
|
+
focusVisible: _,
|
|
100
100
|
readOnly: w
|
|
101
|
-
}),
|
|
102
|
-
elementType:
|
|
103
|
-
externalSlotProps:
|
|
104
|
-
externalForwardedProps:
|
|
101
|
+
}), m = J(f), h = (c = n.root) != null ? c : "span", P = N({
|
|
102
|
+
elementType: h,
|
|
103
|
+
externalSlotProps: u.root,
|
|
104
|
+
externalForwardedProps: i,
|
|
105
105
|
additionalProps: {
|
|
106
|
-
ref:
|
|
106
|
+
ref: p
|
|
107
107
|
},
|
|
108
108
|
ownerState: f,
|
|
109
|
-
className:
|
|
110
|
-
}), k = (
|
|
109
|
+
className: m.root
|
|
110
|
+
}), k = (a = n.thumb) != null ? a : "span", R = N({
|
|
111
111
|
elementType: k,
|
|
112
|
-
externalSlotProps:
|
|
112
|
+
externalSlotProps: u.thumb,
|
|
113
113
|
ownerState: f,
|
|
114
|
-
className:
|
|
115
|
-
}),
|
|
116
|
-
elementType:
|
|
117
|
-
getSlotProps:
|
|
118
|
-
externalSlotProps:
|
|
114
|
+
className: m.thumb
|
|
115
|
+
}), O = (g = n.input) != null ? g : "input", C = N({
|
|
116
|
+
elementType: O,
|
|
117
|
+
getSlotProps: S,
|
|
118
|
+
externalSlotProps: u.input,
|
|
119
119
|
ownerState: f,
|
|
120
|
-
className:
|
|
121
|
-
}), j = n.track === null ? () => null : (
|
|
120
|
+
className: m.input
|
|
121
|
+
}), j = n.track === null ? () => null : (r = n.track) != null ? r : "span", t = N({
|
|
122
122
|
elementType: j,
|
|
123
|
-
externalSlotProps:
|
|
123
|
+
externalSlotProps: u.track,
|
|
124
124
|
ownerState: f,
|
|
125
|
-
className:
|
|
125
|
+
className: m.track
|
|
126
126
|
});
|
|
127
|
-
return /* @__PURE__ */ I(
|
|
128
|
-
children: [/* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ I(h, y({}, P, {
|
|
128
|
+
children: [/* @__PURE__ */ T(j, y({}, t)), /* @__PURE__ */ T(k, y({}, R)), /* @__PURE__ */ T(O, y({}, C))]
|
|
129
129
|
}));
|
|
130
130
|
});
|
|
131
131
|
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
@@ -199,56 +199,52 @@ process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
|
199
199
|
track: e.oneOfType([e.elementType, e.oneOf([null])])
|
|
200
200
|
})
|
|
201
201
|
});
|
|
202
|
-
const K = "
|
|
202
|
+
const K = "_toggle_11c3l_1", Q = "_input_11c3l_12", X = "_thumb_11c3l_23", Y = "_track_11c3l_37", Z = "_toggle__label_11c3l_61", d = {
|
|
203
203
|
toggle: K,
|
|
204
|
-
"toggle__toggle-el-wrapper": "_toggle__toggle-el-
|
|
204
|
+
"toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_11c3l_8",
|
|
205
205
|
input: Q,
|
|
206
206
|
thumb: X,
|
|
207
207
|
track: Y,
|
|
208
|
-
"toggle--focus-visible": "_toggle--focus-
|
|
209
|
-
"toggle--checked": "_toggle--
|
|
208
|
+
"toggle--focus-visible": "_toggle--focus-visible_11c3l_47",
|
|
209
|
+
"toggle--checked": "_toggle--checked_11c3l_51",
|
|
210
210
|
toggle__label: Z,
|
|
211
|
-
"toggle--disabled": "_toggle--
|
|
211
|
+
"toggle--disabled": "_toggle--disabled_11c3l_66"
|
|
212
212
|
}, ne = ({
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
disabled:
|
|
216
|
-
|
|
217
|
-
autoFocus: r,
|
|
218
|
-
classNameWrapper: p,
|
|
219
|
-
classNameLabel: g,
|
|
213
|
+
label: l,
|
|
214
|
+
checked: s,
|
|
215
|
+
disabled: p,
|
|
216
|
+
classNameWrapper: c,
|
|
220
217
|
classNameInput: a,
|
|
221
|
-
"data-testid":
|
|
218
|
+
"data-testid": g,
|
|
219
|
+
onChange: r,
|
|
220
|
+
classNameLabel: u
|
|
222
221
|
}) => {
|
|
223
|
-
const
|
|
224
|
-
|
|
222
|
+
const n = (i) => {
|
|
223
|
+
r == null || r(i);
|
|
225
224
|
};
|
|
226
|
-
return /* @__PURE__ */ I("div", { className:
|
|
227
|
-
/* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ I("div", { className: F(d.toggle, c), "data-testid": g, children: [
|
|
226
|
+
/* @__PURE__ */ T(
|
|
228
227
|
E,
|
|
229
228
|
{
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
"aria-label": o,
|
|
229
|
+
checked: s === !0,
|
|
230
|
+
disabled: p,
|
|
231
|
+
onChange: n,
|
|
232
|
+
"aria-label": l,
|
|
235
233
|
slotProps: {
|
|
236
|
-
root: (
|
|
237
|
-
className:
|
|
238
|
-
[
|
|
239
|
-
[
|
|
240
|
-
[
|
|
234
|
+
root: (i) => ({
|
|
235
|
+
className: F(d["toggle__toggle-el-wrapper"], {
|
|
236
|
+
[d["toggle--disabled"]]: i.disabled,
|
|
237
|
+
[d["toggle--focus-visible"]]: i.focusVisible,
|
|
238
|
+
[d["toggle--checked"]]: i.checked
|
|
241
239
|
})
|
|
242
240
|
}),
|
|
243
|
-
input: {
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
thumb: { className: i.thumb },
|
|
247
|
-
track: { className: i.track }
|
|
241
|
+
input: { className: F(d.input, a) },
|
|
242
|
+
thumb: { className: d.thumb },
|
|
243
|
+
track: { className: d.track }
|
|
248
244
|
}
|
|
249
245
|
}
|
|
250
246
|
),
|
|
251
|
-
|
|
247
|
+
l && /* @__PURE__ */ T("label", { className: F(d.toggle__label, u), children: l })
|
|
252
248
|
] });
|
|
253
249
|
};
|
|
254
250
|
export {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ label, checked, disabled, classNameWrapper, classNameInput, "data-testid": dataTestId, onChange, classNameLabel, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
classNameWrapper?: string | undefined;
|
|
8
|
+
classNameInput?: string | undefined;
|
|
9
|
+
classNameLabel?: string | undefined;
|
|
10
|
+
'data-testid'?: string | undefined;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
tags: string[];
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Simple: Story;
|
|
20
|
+
export declare const WithLabel: Story;
|
|
21
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r } from "react";
|
|
3
|
+
import { Toggle as c } from "./Toggle.js";
|
|
4
|
+
const l = {
|
|
5
|
+
title: "Components/Toggle",
|
|
6
|
+
component: c,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "padded"
|
|
10
|
+
}
|
|
11
|
+
}, h = {
|
|
12
|
+
render: () => {
|
|
13
|
+
const [e, t] = r(!1);
|
|
14
|
+
return /* @__PURE__ */ o(c, { checked: e, onChange: (a) => t(a.target.checked) });
|
|
15
|
+
}
|
|
16
|
+
}, m = {
|
|
17
|
+
name: "With label",
|
|
18
|
+
render: () => {
|
|
19
|
+
const [e, t] = r(!1);
|
|
20
|
+
return /* @__PURE__ */ o(c, { label: "Active", checked: e, onChange: (a) => t(a.target.checked) });
|
|
21
|
+
}
|
|
22
|
+
}, g = {
|
|
23
|
+
render: () => {
|
|
24
|
+
const [e, t] = r(!1);
|
|
25
|
+
return /* @__PURE__ */ o(c, { label: "Active", disabled: !0, checked: e, onChange: (a) => t(a.target.checked) });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
g as Disabled,
|
|
30
|
+
h as Simple,
|
|
31
|
+
m as WithLabel,
|
|
32
|
+
l as default
|
|
33
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/Dialog/Dialog';
|
|
|
6
6
|
export * from './components/Icon/Icon';
|
|
7
7
|
export * from './components/IconButton/IconButton';
|
|
8
8
|
export * from './components/Input/Input';
|
|
9
|
+
export * from './components/InputSearch/InputSearch';
|
|
9
10
|
export * from './components/LoadingSpinner/LoadingSpinner';
|
|
10
11
|
export * from './components/PageHeader/PageHeader';
|
|
11
12
|
export * from './components/Pagination/Pagination';
|
package/dist/main.js
CHANGED
|
@@ -1,52 +1,59 @@
|
|
|
1
1
|
import './assets/global.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { Advice as
|
|
4
|
-
import { Button as
|
|
3
|
+
import { Advice as e } from "./components/Advice/Advice.js";
|
|
4
|
+
import { Button as a } from "./components/Button/Button.js";
|
|
5
5
|
import { Checkbox as m } from "./components/Checkbox/Checkbox.js";
|
|
6
|
-
import { Dialog as
|
|
7
|
-
import { FamilyAndIcons as
|
|
6
|
+
import { Dialog as x } from "./components/Dialog/Dialog.js";
|
|
7
|
+
import { FamilyAndIcons as i, Icon as T } from "./components/Icon/Icon.js";
|
|
8
8
|
import { IconButton as c } from "./components/IconButton/IconButton.js";
|
|
9
|
-
import { Input as
|
|
9
|
+
import { Input as u } from "./components/Input/Input.js";
|
|
10
|
+
import { InputSearch as b } from "./components/InputSearch/InputSearch.js";
|
|
10
11
|
import { LoadingSpinner as k } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
11
12
|
import { PageHeader as D } from "./components/PageHeader/PageHeader.js";
|
|
12
13
|
import { Pagination as y, paginationDefaultTranslations as A } from "./components/Pagination/Pagination.js";
|
|
13
|
-
import { Skeleton as
|
|
14
|
-
import { Snackbar as
|
|
15
|
-
import { SortTooltip as
|
|
16
|
-
import { Stepper as
|
|
17
|
-
import "./components/Table/Table.js";
|
|
18
|
-
import { Tabs as
|
|
19
|
-
import { Toggle as
|
|
20
|
-
import { Tooltip as
|
|
21
|
-
import { Typography as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
14
|
+
import { Skeleton as P, SkeletonCircle as B, SkeletonTable as v } from "./components/Skeleton/Skeleton.js";
|
|
15
|
+
import { Snackbar as H } from "./components/Snackbar/Snackbar.js";
|
|
16
|
+
import { SortTooltip as j, sortTooltipDefaultTranslations as q } from "./components/SortTooltip/SortTooltip.js";
|
|
17
|
+
import { Stepper as z } from "./components/Stepper/Stepper.js";
|
|
18
|
+
import { Table as G } from "./components/Table/Table.js";
|
|
19
|
+
import { Tabs as K } from "./components/Tabs/Tabs.js";
|
|
20
|
+
import { Toggle as N } from "./components/Toggle/Toggle.js";
|
|
21
|
+
import { Tooltip as Q } from "./components/Tooltip/Tooltip.js";
|
|
22
|
+
import { Typography as U } from "./components/Typography/Typography.js";
|
|
23
|
+
import { default as W } from "./components/Dialog/Title.js";
|
|
24
|
+
import { default as Y } from "./components/Dialog/Content.js";
|
|
25
|
+
import { default as _ } from "./components/Dialog/Actions.js";
|
|
26
|
+
import { T as oo } from "./Tab-CRwnhsj5.js";
|
|
27
|
+
import { TabPanel as to } from "./components/Tabs/TabPanel.js";
|
|
25
28
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
_ as Actions,
|
|
30
|
+
e as Advice,
|
|
31
|
+
a as Button,
|
|
29
32
|
m as Checkbox,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
Y as Content,
|
|
34
|
+
x as Dialog,
|
|
35
|
+
W as DialogTitle,
|
|
36
|
+
i as FamilyAndIcons,
|
|
34
37
|
T as Icon,
|
|
35
38
|
c as IconButton,
|
|
36
|
-
|
|
39
|
+
u as Input,
|
|
40
|
+
b as InputSearch,
|
|
37
41
|
k as LoadingSpinner,
|
|
38
42
|
D as PageHeader,
|
|
39
43
|
y as Pagination,
|
|
40
|
-
|
|
44
|
+
P as Skeleton,
|
|
41
45
|
B as SkeletonCircle,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
v as SkeletonTable,
|
|
47
|
+
H as Snackbar,
|
|
48
|
+
j as SortTooltip,
|
|
49
|
+
z as Stepper,
|
|
50
|
+
oo as Tab,
|
|
51
|
+
to as TabPanel,
|
|
52
|
+
G as Table,
|
|
53
|
+
K as Tabs,
|
|
54
|
+
N as Toggle,
|
|
55
|
+
Q as Tooltip,
|
|
56
|
+
U as Typography,
|
|
50
57
|
A as paginationDefaultTranslations,
|
|
51
|
-
|
|
58
|
+
q as sortTooltipDefaultTranslations
|
|
52
59
|
};
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as t from "react";
|
|
2
|
-
const e = {
|
|
3
|
-
blur: "list:blur",
|
|
4
|
-
focus: "list:focus",
|
|
5
|
-
itemClick: "list:itemClick",
|
|
6
|
-
itemHover: "list:itemHover",
|
|
7
|
-
itemsChange: "list:itemsChange",
|
|
8
|
-
keyDown: "list:keyDown",
|
|
9
|
-
resetHighlight: "list:resetHighlight",
|
|
10
|
-
highlightLast: "list:highlightLast",
|
|
11
|
-
textNavigation: "list:textNavigation",
|
|
12
|
-
clearSelection: "list:clearSelection"
|
|
13
|
-
}, i = /* @__PURE__ */ t.createContext(null);
|
|
14
|
-
process.env.NODE_ENV !== "production" && (i.displayName = "ListContext");
|
|
15
|
-
export {
|
|
16
|
-
i as L,
|
|
17
|
-
e as a
|
|
18
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import './assets/Tabs.css';
|
|
2
|
-
import * as n from "react";
|
|
3
|
-
const p = /* @__PURE__ */ n.createContext(null);
|
|
4
|
-
process.env.NODE_ENV !== "production" && (p.displayName = "CompoundComponentContext");
|
|
5
|
-
function C(e) {
|
|
6
|
-
const c = Array.from(e.keys()).map((t) => {
|
|
7
|
-
const a = e.get(t);
|
|
8
|
-
return {
|
|
9
|
-
key: t,
|
|
10
|
-
subitem: a
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
return c.sort((t, a) => {
|
|
14
|
-
const u = t.subitem.ref.current, r = a.subitem.ref.current;
|
|
15
|
-
return u === null || r === null || u === r ? 0 : u.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
|
|
16
|
-
}), new Map(c.map((t) => [t.key, t.subitem]));
|
|
17
|
-
}
|
|
18
|
-
function N() {
|
|
19
|
-
const [e, c] = n.useState(/* @__PURE__ */ new Map()), t = n.useRef(/* @__PURE__ */ new Set()), a = n.useCallback(function(o) {
|
|
20
|
-
t.current.delete(o), c((b) => {
|
|
21
|
-
const s = new Map(b);
|
|
22
|
-
return s.delete(o), s;
|
|
23
|
-
});
|
|
24
|
-
}, []), u = n.useCallback(function(o, b) {
|
|
25
|
-
let s;
|
|
26
|
-
return typeof o == "function" ? s = o(t.current) : s = o, t.current.add(s), c((d) => {
|
|
27
|
-
const _ = new Map(d);
|
|
28
|
-
return _.set(s, b), _;
|
|
29
|
-
}), {
|
|
30
|
-
id: s,
|
|
31
|
-
deregister: () => a(s)
|
|
32
|
-
};
|
|
33
|
-
}, [a]), r = n.useMemo(() => C(e), [e]), i = n.useCallback(function(o) {
|
|
34
|
-
return Array.from(r.keys()).indexOf(o);
|
|
35
|
-
}, [r]);
|
|
36
|
-
return {
|
|
37
|
-
contextValue: n.useMemo(() => ({
|
|
38
|
-
getItemIndex: i,
|
|
39
|
-
registerItem: u,
|
|
40
|
-
totalSubitemCount: e.size
|
|
41
|
-
}), [i, u, e.size]),
|
|
42
|
-
subitems: r
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const l = /* @__PURE__ */ n.createContext(null);
|
|
46
|
-
process.env.NODE_ENV !== "production" && (l.displayName = "TabsContext");
|
|
47
|
-
function I() {
|
|
48
|
-
const e = n.useContext(l);
|
|
49
|
-
if (e == null)
|
|
50
|
-
throw new Error("No TabsContext provided");
|
|
51
|
-
return e;
|
|
52
|
-
}
|
|
53
|
-
const f = "_tabs_18ymz_1", x = "_tabs__tab_18ymz_5", w = {
|
|
54
|
-
tabs: f,
|
|
55
|
-
tabs__tab: x,
|
|
56
|
-
"tabs__tab--disabled": "_tabs__tab--disabled_18ymz_22",
|
|
57
|
-
"tabs__tab--selected": "_tabs__tab--selected_18ymz_31",
|
|
58
|
-
"tabs__tab-panel": "_tabs__tab-panel_18ymz_35"
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
p as C,
|
|
62
|
-
l as T,
|
|
63
|
-
N as a,
|
|
64
|
-
w as s,
|
|
65
|
-
I as u
|
|
66
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { C as a } from "./Tabs.module-BA-PC7fA.js";
|
|
3
|
-
import { u as I } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
4
|
-
let r = 0;
|
|
5
|
-
function i(t) {
|
|
6
|
-
const [e, n] = o.useState(t), u = t || e;
|
|
7
|
-
return o.useEffect(() => {
|
|
8
|
-
e == null && (r += 1, n(`mui-${r}`));
|
|
9
|
-
}, [e]), u;
|
|
10
|
-
}
|
|
11
|
-
const d = o.useId;
|
|
12
|
-
function C(t) {
|
|
13
|
-
if (d !== void 0) {
|
|
14
|
-
const e = d();
|
|
15
|
-
return t ?? e;
|
|
16
|
-
}
|
|
17
|
-
return i(t);
|
|
18
|
-
}
|
|
19
|
-
function g(t, e) {
|
|
20
|
-
const n = o.useContext(a);
|
|
21
|
-
if (n === null)
|
|
22
|
-
throw new Error("useCompoundItem must be used within a useCompoundParent");
|
|
23
|
-
const {
|
|
24
|
-
registerItem: u
|
|
25
|
-
} = n, [s, f] = o.useState(typeof t == "function" ? void 0 : t);
|
|
26
|
-
return I(() => {
|
|
27
|
-
const {
|
|
28
|
-
id: c,
|
|
29
|
-
deregister: m
|
|
30
|
-
} = u(t, e);
|
|
31
|
-
return f(c), m;
|
|
32
|
-
}, [u, e, t]), {
|
|
33
|
-
id: s,
|
|
34
|
-
index: s !== void 0 ? n.getItemIndex(s) : -1,
|
|
35
|
-
totalItemCount: n.totalSubitemCount
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
g as a,
|
|
40
|
-
C as u
|
|
41
|
-
};
|