@pismo/marola 1.0.0-beta.7 → 1.0.0-beta.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/{Button-2b1peDFT.js → Button-DiLqcAJG.js} +2 -2
- package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-BaJ-OV_7.js} +4 -3
- package/dist/Dialog.module-DFcZsVAd.js +30 -0
- package/dist/Input.module-ZTRZRcNt.js +405 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-lLWZt2wk.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-B_Es6eUL.js} +2 -2
- package/dist/SelectButton-CoOT2txy.js +61 -0
- package/dist/Toggle-f5brSwAI.js +175 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Autocomplete.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.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/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/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-BtBYUV_B.js} +1 -1
- package/dist/components/Advice/Advice.d.ts +32 -17
- package/dist/components/Advice/Advice.js +39 -40
- package/dist/components/Advice/Advice.stories.d.ts +4 -3
- package/dist/components/Autocomplete/Autocomplete.d.ts +50 -0
- package/dist/components/Autocomplete/Autocomplete.js +689 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +45 -0
- package/dist/components/Button/Button.js +48 -48
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +2 -2
- package/dist/components/Dialog/Dialog.js +13 -12
- package/dist/components/Dialog/Dialog.stories.d.ts +43 -43
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.js +74 -471
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.js +70 -70
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +8 -7
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Snackbar/Snackbar.js +94 -94
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/SortTooltip/SortTooltip.js +46 -46
- package/dist/components/Stepper/Stepper.js +35 -35
- package/dist/components/Table/Table.js +96 -96
- package/dist/components/Tabs/Tab.js +18 -17
- package/dist/components/Tabs/TabPanel.js +27 -26
- package/dist/components/Tabs/Tabs.js +25 -25
- package/dist/components/Toggle/Toggle.js +55 -55
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/{index-CjW42-M-.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +77 -75
- package/dist/ownerDocument-B61GUaFs.js +33 -0
- package/dist/{useButton-DNk3wrQp.js → useButton-Bn3MNH8I.js} +1 -1
- package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
- package/dist/useEventCallback-BAQJJ3ye.js +14 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useList-B0hog_3-.js → useList-BpJT77u3.js} +2 -2
- package/dist/{index-CH45lKw7.js → useSlotProps-kRhf7Gil.js} +93 -94
- package/package.json +1 -1
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/SelectButton-K3OIfR5m.js +0 -61
- package/dist/Toggle-BWF0-SPB.js +0 -175
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
package/dist/Toggle-BWF0-SPB.js
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import './assets/Toggle2.css';
|
|
2
|
-
import { jsx as c, jsxs as k } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as y } from "react";
|
|
4
|
-
import { c as i } from "./clsx-DB4S2d7J.js";
|
|
5
|
-
import { Icon as N } from "./components/Icon/Icon.js";
|
|
6
|
-
import "./components/Button/Button.js";
|
|
7
|
-
import { Adornment as C } from "./components/Adornment/Adornment.js";
|
|
8
|
-
import "./components/Dialog/Backdrop.js";
|
|
9
|
-
import { Typography as x } from "./components/Typography/Typography.js";
|
|
10
|
-
import "./components/IconButton/IconButton.js";
|
|
11
|
-
import "./components/Select/Select.js";
|
|
12
|
-
import "./components/Table/Table.js";
|
|
13
|
-
import "./components/Tabs/Tabs.js";
|
|
14
|
-
import { s as g } from "./Group-B3p31ftp.js";
|
|
15
|
-
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
-
import { Skeleton as w } from "./components/Skeleton/Skeleton.js";
|
|
17
|
-
import { B as I } from "./Button-2b1peDFT.js";
|
|
18
|
-
const P = "_chip_ccpk4_60", S = "_chip__adornment_ccpk4_114", R = "_chip__remove_ccpk4_119", n = {
|
|
19
|
-
"u-typography-h1": "_u-typography-h1_ccpk4_1",
|
|
20
|
-
"u-typography-h2": "_u-typography-h2_ccpk4_8",
|
|
21
|
-
"u-typography-h3": "_u-typography-h3_ccpk4_15",
|
|
22
|
-
"u-typography-h4": "_u-typography-h4_ccpk4_22",
|
|
23
|
-
"u-typography-h5": "_u-typography-h5_ccpk4_29",
|
|
24
|
-
"u-typography-h6": "_u-typography-h6_ccpk4_36",
|
|
25
|
-
"u-typography-base": "_u-typography-base_ccpk4_43",
|
|
26
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_ccpk4_48",
|
|
27
|
-
"u-typography-base--xl": "_u-typography-base--xl_ccpk4_52",
|
|
28
|
-
"u-typography-base--lg": "_u-typography-base--lg_ccpk4_56",
|
|
29
|
-
"u-typography-base--sm": "_u-typography-base--sm_ccpk4_60",
|
|
30
|
-
chip: P,
|
|
31
|
-
"u-typography-base--bold": "_u-typography-base--bold_ccpk4_64",
|
|
32
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_ccpk4_67",
|
|
33
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_ccpk4_70",
|
|
34
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_ccpk4_73",
|
|
35
|
-
"chip--button": "_chip--button_ccpk4_89",
|
|
36
|
-
"chip--outlined": "_chip--outlined_ccpk4_102",
|
|
37
|
-
"chip--contained": "_chip--contained_ccpk4_108",
|
|
38
|
-
chip__adornment: S,
|
|
39
|
-
chip__remove: R,
|
|
40
|
-
"chip__remove--disabled": "_chip__remove--disabled_ccpk4_130",
|
|
41
|
-
"chip-loading": "_chip-loading_ccpk4_134"
|
|
42
|
-
}, T = y((a, r) => {
|
|
43
|
-
const { children: p, onClickContent: t, disabled: s, className: o, variant: h } = a;
|
|
44
|
-
let e = i(
|
|
45
|
-
n.chip,
|
|
46
|
-
{ [n["chip--outlined"]]: h === "outlined" },
|
|
47
|
-
{ [n["chip--contained"]]: h === "contained" },
|
|
48
|
-
o
|
|
49
|
-
);
|
|
50
|
-
return t ? (e += ` ${n["chip--button"]}`, /* @__PURE__ */ c(
|
|
51
|
-
I,
|
|
52
|
-
{
|
|
53
|
-
onClick: t,
|
|
54
|
-
disabled: s,
|
|
55
|
-
"data-testid": a["data-testid"],
|
|
56
|
-
ref: r,
|
|
57
|
-
className: e,
|
|
58
|
-
children: p
|
|
59
|
-
}
|
|
60
|
-
)) : /* @__PURE__ */ c("span", { "data-testid": a["data-testid"], ref: r, className: e, children: p });
|
|
61
|
-
}), K = y((a, r) => {
|
|
62
|
-
const {
|
|
63
|
-
label: p,
|
|
64
|
-
className: t,
|
|
65
|
-
onClickContent: s,
|
|
66
|
-
leftAdornment: o,
|
|
67
|
-
loading: h = !1,
|
|
68
|
-
disabled: e = !1,
|
|
69
|
-
variant: u = "default",
|
|
70
|
-
onClickRemove: d
|
|
71
|
-
} = a;
|
|
72
|
-
if (h)
|
|
73
|
-
return /* @__PURE__ */ c(
|
|
74
|
-
w,
|
|
75
|
-
{
|
|
76
|
-
className: i(n["chip-loading"], a["className-skeleton"]),
|
|
77
|
-
"data-testid": a["data-testid-skeleton"]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
const b = i(o == null ? void 0 : o.className, n.chip__adornment);
|
|
81
|
-
return /* @__PURE__ */ k(
|
|
82
|
-
T,
|
|
83
|
-
{
|
|
84
|
-
ref: r,
|
|
85
|
-
"data-testid": a["data-testid"],
|
|
86
|
-
onClickContent: s,
|
|
87
|
-
disabled: e,
|
|
88
|
-
className: t,
|
|
89
|
-
variant: u,
|
|
90
|
-
children: [
|
|
91
|
-
o && /* @__PURE__ */ c(C, { ...o, className: b, disabled: e }),
|
|
92
|
-
p,
|
|
93
|
-
d && /* @__PURE__ */ c(
|
|
94
|
-
"span",
|
|
95
|
-
{
|
|
96
|
-
className: i(n.chip__remove, { [n["chip__remove--disabled"]]: e }),
|
|
97
|
-
role: "button",
|
|
98
|
-
tabIndex: e ? -1 : 0,
|
|
99
|
-
"aria-label": "remove",
|
|
100
|
-
onClick: (l) => {
|
|
101
|
-
l == null || l.stopPropagation(), l == null || l.nativeEvent.stopImmediatePropagation(), d();
|
|
102
|
-
},
|
|
103
|
-
"aria-disabled": e,
|
|
104
|
-
children: /* @__PURE__ */ c(N, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}), m = {
|
|
111
|
-
"row-item": "_row-item_o8krl_1",
|
|
112
|
-
"row-item--clickable": "_row-item--clickable_o8krl_15",
|
|
113
|
-
"row-item__content": "_row-item__content_o8krl_18"
|
|
114
|
-
}, M = y((a, r) => {
|
|
115
|
-
const { children: p, leftAdornment: t, disabled: s, onClick: o, buttons: h, ariaLabel: e, className: u } = a, d = i(t == null ? void 0 : t.className, m["row-item__adornment"]), l = {
|
|
116
|
-
onClick: (_) => {
|
|
117
|
-
o && o(_);
|
|
118
|
-
},
|
|
119
|
-
tabIndex: 0,
|
|
120
|
-
"aria-label": e,
|
|
121
|
-
role: "button"
|
|
122
|
-
}, f = { size: "1rem", ...t };
|
|
123
|
-
return /* @__PURE__ */ k(
|
|
124
|
-
"div",
|
|
125
|
-
{
|
|
126
|
-
"data-testid": a["data-testid"],
|
|
127
|
-
className: i(m["row-item"], { [m["row-item--clickable"]]: !!o }, u),
|
|
128
|
-
...!!o && l,
|
|
129
|
-
ref: r,
|
|
130
|
-
children: [
|
|
131
|
-
t && /* @__PURE__ */ c(C, { ...f, className: d, disabled: s }),
|
|
132
|
-
/* @__PURE__ */ c("span", { className: i(m["row-item__content"]), children: p }),
|
|
133
|
-
h && /* @__PURE__ */ c(
|
|
134
|
-
"div",
|
|
135
|
-
{
|
|
136
|
-
onClick: (_) => {
|
|
137
|
-
_ == null || _.stopPropagation(), _ == null || _.nativeEvent.stopImmediatePropagation();
|
|
138
|
-
},
|
|
139
|
-
children: h
|
|
140
|
-
}
|
|
141
|
-
)
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
}), O = y((a, r) => {
|
|
146
|
-
const { text: p, isSelected: t = !1, value: s, onChange: o } = a;
|
|
147
|
-
return /* @__PURE__ */ k(
|
|
148
|
-
"label",
|
|
149
|
-
{
|
|
150
|
-
className: i([g.toggle__label], { [g["toggle__label--selected"]]: t }),
|
|
151
|
-
"data-testid": a["data-testid"],
|
|
152
|
-
children: [
|
|
153
|
-
/* @__PURE__ */ c(
|
|
154
|
-
"input",
|
|
155
|
-
{
|
|
156
|
-
className: i([g.toggle__input]),
|
|
157
|
-
type: "radio",
|
|
158
|
-
ref: r,
|
|
159
|
-
value: s.toString(),
|
|
160
|
-
onChange: () => o(s),
|
|
161
|
-
role: "radio",
|
|
162
|
-
checked: t,
|
|
163
|
-
"aria-checked": t
|
|
164
|
-
}
|
|
165
|
-
),
|
|
166
|
-
/* @__PURE__ */ c(x, { bold: !0, children: p })
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
});
|
|
171
|
-
export {
|
|
172
|
-
K as C,
|
|
173
|
-
M as R,
|
|
174
|
-
O as T
|
|
175
|
-
};
|
|
@@ -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,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
|
-
};
|