@pismo/marola 2.1.19 → 2.1.20
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-Bh6rpTyY.js → Button-BrEDdtHO.js} +2 -2
- package/dist/{ClickAwayListener-BjqhGzJh.js → ClickAwayListener-Z08peX_P.js} +3 -3
- package/dist/{Popup-aWlctE1C.js → Popup-Dffqo7wT.js} +3 -3
- package/dist/{Portal-Dc9ej3DW.js → Portal-DJapUCn6.js} +14 -13
- package/dist/{RadioButton.module-VF7v9SuY.js → RadioButton.module-RTKWJmma.js} +1 -1
- package/dist/{Toggle-DPXiwAx3.js → Toggle-SlvGYQKW.js} +48 -46
- package/dist/assets/Draggable.css +1 -0
- package/dist/{combineHooksSlotProps-CNWfgylM.js → combineHooksSlotProps-BhQ14uyD.js} +5 -5
- package/dist/components/Autocomplete/Autocomplete.js +38 -38
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Chip/Chip.js +6 -3
- package/dist/components/DatePicker/DatePicker.js +4 -4
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +4 -4
- package/dist/components/Draggable/Draggable.d.ts +47 -0
- package/dist/components/Draggable/Draggable.js +151 -0
- package/dist/components/Draggable/Draggable.spec.d.ts +1 -0
- package/dist/components/Draggable/Draggable.stories.d.ts +44 -0
- package/dist/components/Draggable/useDraggable.d.ts +20 -0
- package/dist/components/Draggable/useDraggable.js +11 -0
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/RadioButton/RadioButton.js +17 -15
- package/dist/components/RadioButton/RadioOption.js +13 -12
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/RowItem/RowItem.js +5 -3
- package/dist/components/Select/Select.js +5 -5
- package/dist/components/Snackbar/Snackbar.js +3 -3
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabPanel.js +1 -1
- package/dist/components/Tabs/Tabs.js +3 -3
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleGroup/Toggle.js +4 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +3 -0
- package/dist/contexts/DraggableProvider/DraggableProvider.js +6 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/exactProp-SYjL19cU.js +13 -0
- package/dist/{index-Bppuplgd.js → index-1UpBa69h.js} +1361 -1372
- package/dist/main.d.ts +6 -0
- package/dist/main.js +123 -102
- package/dist/{ownerDocument-CXvpb_nj.js → ownerDocument-By592Iy6.js} +1 -1
- package/dist/react-BvI-Sw9b.js +509 -0
- package/dist/{useButton-B8Y1xR88.js → useButton-CezPDte8.js} +6 -6
- package/dist/{useList-9gbS2r78.js → useList-nqLfZem8.js} +2 -2
- package/dist/{useSlotProps-C7dqSmdM.js → useSlotProps-CYHDC4TN.js} +2 -2
- package/dist/utils/draggable.d.ts +8 -0
- package/dist/utils/draggable.js +30 -0
- package/dist/utils/draggable.test.d.ts +1 -0
- package/package.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as T, a as _,
|
|
1
|
+
import { g as T, a as _, b as x, _ as i, c as B, d as O, e as D, P as e } from "./useSlotProps-CYHDC4TN.js";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import { jsx as F } from "react/jsx-runtime";
|
|
4
|
-
import { u as S } from "./useButton-
|
|
4
|
+
import { u as S } from "./useButton-CezPDte8.js";
|
|
5
5
|
const m = "Button";
|
|
6
6
|
function U(s) {
|
|
7
7
|
return T(m, s);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as t from "react";
|
|
2
|
-
import { u as C, P as f } from "./useSlotProps-
|
|
2
|
+
import { u as C, P as f } from "./useSlotProps-CYHDC4TN.js";
|
|
3
3
|
import { jsx as w } from "react/jsx-runtime";
|
|
4
4
|
import { u as L } from "./useEventCallback-BAQJJ3ye.js";
|
|
5
|
-
import { o as h, e as b } from "./ownerDocument-
|
|
6
|
-
import { e as g } from "./
|
|
5
|
+
import { o as h, e as b } from "./ownerDocument-By592Iy6.js";
|
|
6
|
+
import { e as g } from "./exactProp-SYjL19cU.js";
|
|
7
7
|
function T(c) {
|
|
8
8
|
return c.substring(2).toLowerCase();
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as jt, a as zt,
|
|
1
|
+
import { g as jt, a as zt, b as It, u as Ut, _ as ut, c as Xt, d as Yt, e as Kt, P as x } from "./useSlotProps-CYHDC4TN.js";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { useLayoutEffect as Gt, useEffect as Jt } from "react";
|
|
4
|
-
import { r as Qt } from "./index-
|
|
4
|
+
import { r as Qt } from "./index-1UpBa69h.js";
|
|
5
5
|
import { jsx as Z } from "react/jsx-runtime";
|
|
6
6
|
import { u as Zt } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
7
|
-
import { P as qt, H as gt } from "./Portal-
|
|
7
|
+
import { P as qt, H as gt } from "./Portal-DJapUCn6.js";
|
|
8
8
|
const et = Math.min, z = Math.max, nt = Math.round, q = Math.floor, H = (t) => ({
|
|
9
9
|
x: t,
|
|
10
10
|
y: t
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
import { r as P
|
|
3
|
-
import { u as
|
|
2
|
+
import { r as P } from "./index-1UpBa69h.js";
|
|
3
|
+
import { u as y, s as a, P as u } from "./useSlotProps-CYHDC4TN.js";
|
|
4
4
|
import { jsx as c } from "react/jsx-runtime";
|
|
5
5
|
import { u as f } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
6
|
-
|
|
6
|
+
import { e as T } from "./exactProp-SYjL19cU.js";
|
|
7
|
+
function N(t, l, s, n, i) {
|
|
7
8
|
if (process.env.NODE_ENV === "production")
|
|
8
9
|
return null;
|
|
9
|
-
const e = t[l], r =
|
|
10
|
+
const e = t[l], r = i || l;
|
|
10
11
|
return e == null ? null : e && e.nodeType !== 1 ? new Error(`Invalid ${n} \`${r}\` supplied to \`${s}\`. Expected an HTMLElement.`) : null;
|
|
11
12
|
}
|
|
12
13
|
function h(t) {
|
|
@@ -15,12 +16,12 @@ function h(t) {
|
|
|
15
16
|
const p = /* @__PURE__ */ o.forwardRef(function(l, s) {
|
|
16
17
|
const {
|
|
17
18
|
children: n,
|
|
18
|
-
container:
|
|
19
|
+
container: i,
|
|
19
20
|
disablePortal: e = !1
|
|
20
|
-
} = l, [r,
|
|
21
|
+
} = l, [r, m] = o.useState(null), d = y(/* @__PURE__ */ o.isValidElement(n) ? n.ref : null, s);
|
|
21
22
|
if (f(() => {
|
|
22
|
-
e ||
|
|
23
|
-
}, [
|
|
23
|
+
e || m(h(i) || document.body);
|
|
24
|
+
}, [i, e]), f(() => {
|
|
24
25
|
if (r && !e)
|
|
25
26
|
return a(s, r), () => {
|
|
26
27
|
a(s, null);
|
|
@@ -28,7 +29,7 @@ const p = /* @__PURE__ */ o.forwardRef(function(l, s) {
|
|
|
28
29
|
}, [s, r, e]), e) {
|
|
29
30
|
if (/* @__PURE__ */ o.isValidElement(n)) {
|
|
30
31
|
const E = {
|
|
31
|
-
ref:
|
|
32
|
+
ref: d
|
|
32
33
|
};
|
|
33
34
|
return /* @__PURE__ */ o.cloneElement(n, E);
|
|
34
35
|
}
|
|
@@ -48,7 +49,7 @@ process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
|
48
49
|
/**
|
|
49
50
|
* The children to render into the `container`.
|
|
50
51
|
*/
|
|
51
|
-
children:
|
|
52
|
+
children: u.node,
|
|
52
53
|
/**
|
|
53
54
|
* An HTML element or function that returns one.
|
|
54
55
|
* The `container` will have the portal children appended to it.
|
|
@@ -59,14 +60,14 @@ process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
|
59
60
|
* By default, it uses the body of the top-level document object,
|
|
60
61
|
* so it's simply `document.body` most of the time.
|
|
61
62
|
*/
|
|
62
|
-
container:
|
|
63
|
+
container: u.oneOfType([N, u.func]),
|
|
63
64
|
/**
|
|
64
65
|
* The `children` will be under the DOM hierarchy of the parent component.
|
|
65
66
|
* @default false
|
|
66
67
|
*/
|
|
67
|
-
disablePortal:
|
|
68
|
+
disablePortal: u.bool
|
|
68
69
|
});
|
|
69
|
-
process.env.NODE_ENV !== "production" && (p.propTypes =
|
|
70
|
+
process.env.NODE_ENV !== "production" && (p.propTypes = T(p.propTypes));
|
|
70
71
|
export {
|
|
71
72
|
N as H,
|
|
72
73
|
p as P
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as u } from "react";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as p } from "./clsx-OuTLNxxd.js";
|
|
4
4
|
import "./utils/iconsList.js";
|
|
5
5
|
import { Typography as C } from "./components/Typography/Typography.js";
|
|
6
6
|
import "./components/Input/Input.js";
|
|
@@ -11,6 +11,8 @@ import { Icon as N } from "./components/Icon/Icon.js";
|
|
|
11
11
|
import "./components/Dialog/Dialog.js";
|
|
12
12
|
import "./components/DatePicker/DatePicker.js";
|
|
13
13
|
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
14
|
+
import "./index-1UpBa69h.js";
|
|
15
|
+
import "./components/Draggable/useDraggable.js";
|
|
14
16
|
import "./components/IconButton/IconButton.js";
|
|
15
17
|
import "./components/InputSearch/InputSearch.js";
|
|
16
18
|
import "./components/Select/Select.js";
|
|
@@ -19,7 +21,7 @@ import "./components/Table/Table.js";
|
|
|
19
21
|
import "./components/Tabs/Tabs.js";
|
|
20
22
|
import { s as y } from "./Group-DJz1rK2n.js";
|
|
21
23
|
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
22
|
-
import { B as x } from "./Button-
|
|
24
|
+
import { B as x } from "./Button-BrEDdtHO.js";
|
|
23
25
|
import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove_1wvod_121", n = {
|
|
24
26
|
"u-typography-h1": "_u-typography-h1_1wvod_1",
|
|
25
27
|
"u-typography-h2": "_u-typography-h2_1wvod_8",
|
|
@@ -44,31 +46,31 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
44
46
|
chip__remove: z,
|
|
45
47
|
"chip__remove--disabled": "_chip__remove--disabled_1wvod_133",
|
|
46
48
|
"chip-loading": "_chip-loading_1wvod_137"
|
|
47
|
-
}, S = u((t,
|
|
48
|
-
const { children:
|
|
49
|
-
let e =
|
|
49
|
+
}, S = u((t, l) => {
|
|
50
|
+
const { children: d, onClickContent: a, disabled: r, className: o, variant: s } = t;
|
|
51
|
+
let e = p(
|
|
50
52
|
n.chip,
|
|
51
53
|
{ [n["chip--outlined"]]: s === "outlined" },
|
|
52
54
|
{ [n["chip--contained"]]: s === "contained" },
|
|
53
|
-
|
|
55
|
+
o
|
|
54
56
|
);
|
|
55
|
-
return
|
|
57
|
+
return a ? (e += ` ${n["chip--button"]}`, /* @__PURE__ */ i(
|
|
56
58
|
x,
|
|
57
59
|
{
|
|
58
|
-
onClick:
|
|
60
|
+
onClick: a,
|
|
59
61
|
disabled: r,
|
|
60
62
|
"data-testid": t["data-testid"],
|
|
61
|
-
ref:
|
|
63
|
+
ref: l,
|
|
62
64
|
className: e,
|
|
63
|
-
children:
|
|
65
|
+
children: d
|
|
64
66
|
}
|
|
65
|
-
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref:
|
|
66
|
-
}),
|
|
67
|
+
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: l, className: e, children: d });
|
|
68
|
+
}), oo = u((t, l) => {
|
|
67
69
|
const {
|
|
68
|
-
label:
|
|
69
|
-
className:
|
|
70
|
+
label: d,
|
|
71
|
+
className: a,
|
|
70
72
|
onClickContent: r,
|
|
71
|
-
leftAdornment:
|
|
73
|
+
leftAdornment: o,
|
|
72
74
|
loading: s = !1,
|
|
73
75
|
disabled: e = !1,
|
|
74
76
|
variant: g = "default",
|
|
@@ -78,27 +80,27 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
78
80
|
return /* @__PURE__ */ i(
|
|
79
81
|
f,
|
|
80
82
|
{
|
|
81
|
-
className:
|
|
83
|
+
className: p(n["chip-loading"], t["className-skeleton"]),
|
|
82
84
|
"data-testid": t["data-testid-skeleton"]
|
|
83
85
|
}
|
|
84
86
|
);
|
|
85
|
-
const b =
|
|
87
|
+
const b = p(o == null ? void 0 : o.className, n.chip__adornment), w = o != null && o.customIcon ? { ...o, className: b } : { ...o, disabled: e, className: b };
|
|
86
88
|
return /* @__PURE__ */ k(
|
|
87
89
|
S,
|
|
88
90
|
{
|
|
89
|
-
ref:
|
|
91
|
+
ref: l,
|
|
90
92
|
"data-testid": t["data-testid"],
|
|
91
93
|
onClickContent: r,
|
|
92
94
|
disabled: e,
|
|
93
|
-
className:
|
|
95
|
+
className: a,
|
|
94
96
|
variant: g,
|
|
95
97
|
children: [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
o && /* @__PURE__ */ i(v, { ...w }),
|
|
99
|
+
d,
|
|
98
100
|
m && /* @__PURE__ */ i(
|
|
99
101
|
"span",
|
|
100
102
|
{
|
|
101
|
-
className:
|
|
103
|
+
className: p(n.chip__remove, { [n["chip__remove--disabled"]]: e }),
|
|
102
104
|
role: "button",
|
|
103
105
|
tabIndex: e ? -1 : 0,
|
|
104
106
|
"aria-label": "remove",
|
|
@@ -117,30 +119,30 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
117
119
|
"row-item--clickable": "_row-item--clickable_8z1a0_13",
|
|
118
120
|
"row-item--disabled": "_row-item--disabled_8z1a0_19",
|
|
119
121
|
"row-item__content": "_row-item__content_8z1a0_22"
|
|
120
|
-
},
|
|
121
|
-
const { children:
|
|
122
|
+
}, ao = u((t, l) => {
|
|
123
|
+
const { children: d, leftAdornment: a, disabled: r, onClick: o, buttons: s, ariaLabel: e, className: g } = t, m = p(a == null ? void 0 : a.className, h["row-item__adornment"]), w = {
|
|
122
124
|
onClick: (c) => {
|
|
123
|
-
r ||
|
|
125
|
+
r || o && o(c);
|
|
124
126
|
},
|
|
125
127
|
tabIndex: 0,
|
|
126
128
|
"aria-label": e,
|
|
127
129
|
role: "button"
|
|
128
|
-
}, _ =
|
|
130
|
+
}, _ = a != null && a.customIcon ? a : { size: "1rem", ...a };
|
|
129
131
|
return /* @__PURE__ */ k(
|
|
130
132
|
"div",
|
|
131
133
|
{
|
|
132
134
|
"data-testid": t["data-testid"],
|
|
133
|
-
className:
|
|
135
|
+
className: p(
|
|
134
136
|
h["row-item"],
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
o && h["row-item--clickable"],
|
|
138
|
+
o && r && h["row-item--disabled"],
|
|
137
139
|
g
|
|
138
140
|
),
|
|
139
|
-
...!!
|
|
140
|
-
ref:
|
|
141
|
+
...!!o && w,
|
|
142
|
+
ref: l,
|
|
141
143
|
children: [
|
|
142
|
-
|
|
143
|
-
/* @__PURE__ */ i("span", { className:
|
|
144
|
+
a && /* @__PURE__ */ i(v, { ..._, className: m, disabled: r }),
|
|
145
|
+
/* @__PURE__ */ i("span", { className: p(h["row-item__content"]), children: d }),
|
|
144
146
|
s && /* @__PURE__ */ i(
|
|
145
147
|
"div",
|
|
146
148
|
{
|
|
@@ -153,14 +155,14 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
153
155
|
]
|
|
154
156
|
}
|
|
155
157
|
);
|
|
156
|
-
}),
|
|
157
|
-
const { text:
|
|
158
|
+
}), to = u((t, l) => {
|
|
159
|
+
const { text: d, isSelected: a = !1, value: r, onChange: o, disabled: s, type: e } = t;
|
|
158
160
|
return /* @__PURE__ */ k(
|
|
159
161
|
"label",
|
|
160
162
|
{
|
|
161
|
-
className:
|
|
163
|
+
className: p(
|
|
162
164
|
[y.toggle__label],
|
|
163
|
-
|
|
165
|
+
a && y["toggle__label--selected"],
|
|
164
166
|
s && y["toggle__label--disabled"]
|
|
165
167
|
),
|
|
166
168
|
"data-testid": t["data-testid"],
|
|
@@ -168,24 +170,24 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
168
170
|
/* @__PURE__ */ i(
|
|
169
171
|
"input",
|
|
170
172
|
{
|
|
171
|
-
className:
|
|
173
|
+
className: p([y.toggle__input]),
|
|
172
174
|
type: e ?? "radio",
|
|
173
|
-
ref:
|
|
175
|
+
ref: l,
|
|
174
176
|
value: r.toString(),
|
|
175
|
-
onChange: () =>
|
|
177
|
+
onChange: () => o(r),
|
|
176
178
|
role: e ?? "radio",
|
|
177
|
-
checked:
|
|
178
|
-
"aria-checked":
|
|
179
|
+
checked: a,
|
|
180
|
+
"aria-checked": a,
|
|
179
181
|
disabled: s
|
|
180
182
|
}
|
|
181
183
|
),
|
|
182
|
-
/* @__PURE__ */ i(C, { bold: !0, children:
|
|
184
|
+
/* @__PURE__ */ i(C, { bold: !0, children: d })
|
|
183
185
|
]
|
|
184
186
|
}
|
|
185
187
|
);
|
|
186
188
|
});
|
|
187
189
|
export {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
oo as C,
|
|
191
|
+
ao as R,
|
|
192
|
+
to as T
|
|
191
193
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._draggable-container_1muhu_1{position:relative}._draggable-container-draggable_1muhu_4{cursor:grabbing}._draggable-container-draggable-dragging_1muhu_7{cursor:default}._draggable-zone_1muhu_11{position:relative;border:1px dashed transparent}._draggable-zone-to-drop_1muhu_15{position:absolute;top:var(--props-offset-zone-top-to-drop);width:100%;height:calc(100% + var(--props-offset-zone-down-to-drop));display:flex;flex-direction:column;z-index:2}._draggable-zone-to-drop_1muhu_15>div{flex:1}._draggable-zone-replace_1muhu_27{background-color:var(--colors-base-blue-1);border:1px dashed var(--colors-base-blue-4)}._draggable-to-drop_1muhu_32{height:2px;width:100%;display:block;background-color:var(--colors-brand-primary-color-primary);content:" ";position:absolute;opacity:0;z-index:1}._draggable-to-drop-top_1muhu_42{top:-5;left:0}._draggable-to-drop-down_1muhu_46{bottom:-5;left:0}._draggable-to-drop-visible_1muhu_50{opacity:1}._draggable-to-drop_1muhu_32:before,._draggable-to-drop_1muhu_32:after{content:"";position:absolute;left:0;top:-4;height:5px;width:5px;border-radius:50%;background-color:#fff;border:2px solid var(--colors-brand-primary-color-primary)}._draggable-to-drop_1muhu_32:after{left:initial;right:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as E,
|
|
1
|
+
import { f as E, _ as c } from "./useSlotProps-CYHDC4TN.js";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
const m = {
|
|
4
4
|
blur: "list:blur",
|
|
@@ -12,7 +12,7 @@ const m = {
|
|
|
12
12
|
clearSelection: "list:clearSelection"
|
|
13
13
|
}, f = /* @__PURE__ */ r.createContext(null);
|
|
14
14
|
process.env.NODE_ENV !== "production" && (f.displayName = "ListContext");
|
|
15
|
-
function
|
|
15
|
+
function x(l) {
|
|
16
16
|
const {
|
|
17
17
|
handlePointerOverEvents: a = !1,
|
|
18
18
|
item: t
|
|
@@ -65,7 +65,7 @@ function b(l) {
|
|
|
65
65
|
selected: p
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function H(l, a) {
|
|
69
69
|
return function(s = {}) {
|
|
70
70
|
const n = c({}, s, l(s));
|
|
71
71
|
return c({}, n, a(n));
|
|
@@ -74,6 +74,6 @@ function x(l, a) {
|
|
|
74
74
|
export {
|
|
75
75
|
m as L,
|
|
76
76
|
f as a,
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
H as c,
|
|
78
|
+
x as u
|
|
79
79
|
};
|
|
@@ -4,9 +4,9 @@ import { useId as lt, useState as at } from "react";
|
|
|
4
4
|
import { c as ut } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
import { Icon as ct } from "../Icon/Icon.js";
|
|
6
6
|
import { Input as ft } from "../Input/Input.js";
|
|
7
|
-
import { s as dt,
|
|
7
|
+
import { s as dt, _ as Me } from "../../useSlotProps-CYHDC4TN.js";
|
|
8
8
|
import { u as pt } from "../../useId-BW-oWmul.js";
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as _e } from "../../useControlled-CCMYYdCM.js";
|
|
10
10
|
import { u as pe } from "../../useEventCallback-BAQJJ3ye.js";
|
|
11
11
|
import '../../assets/Autocomplete.css';const gt = (c) => {
|
|
12
12
|
const h = g.useRef({});
|
|
@@ -82,20 +82,20 @@ function yt(c) {
|
|
|
82
82
|
id: be,
|
|
83
83
|
includeInputInList: i = !1,
|
|
84
84
|
inputValue: y,
|
|
85
|
-
isOptionEqualToValue:
|
|
85
|
+
isOptionEqualToValue: _ = (t, e) => t === e,
|
|
86
86
|
multiple: l = !1,
|
|
87
|
-
onChange:
|
|
87
|
+
onChange: E,
|
|
88
88
|
onClose: oe,
|
|
89
89
|
onHighlightChange: se,
|
|
90
90
|
onInputChange: H,
|
|
91
|
-
onOpen:
|
|
91
|
+
onOpen: Ee,
|
|
92
92
|
open: He,
|
|
93
93
|
openOnFocus: Fe = !1,
|
|
94
94
|
options: xe,
|
|
95
95
|
readOnly: Y = !1,
|
|
96
96
|
selectOnFocus: qe = !c.freeSolo,
|
|
97
97
|
value: je
|
|
98
|
-
} = c,
|
|
98
|
+
} = c, T = pt(be);
|
|
99
99
|
let O = ne;
|
|
100
100
|
O = (t) => {
|
|
101
101
|
const e = ne(t);
|
|
@@ -108,11 +108,11 @@ function yt(c) {
|
|
|
108
108
|
}
|
|
109
109
|
return e;
|
|
110
110
|
};
|
|
111
|
-
const ye = g.useRef(!1), Oe = g.useRef(!0), d = g.useRef(null), $ = g.useRef(null), [ie, Be] = g.useState(null), [P, Ie] = g.useState(-1),
|
|
111
|
+
const ye = g.useRef(!1), Oe = g.useRef(!0), d = g.useRef(null), $ = g.useRef(null), [ie, Be] = g.useState(null), [P, Ie] = g.useState(-1), Te = v ? 0 : -1, x = g.useRef(Te), [r, Ue] = _e({
|
|
112
112
|
controlled: je,
|
|
113
113
|
default: k,
|
|
114
114
|
name: b
|
|
115
|
-
}), [u, le] =
|
|
115
|
+
}), [u, le] = _e({
|
|
116
116
|
controlled: y,
|
|
117
117
|
default: "",
|
|
118
118
|
name: b,
|
|
@@ -130,13 +130,13 @@ function yt(c) {
|
|
|
130
130
|
o = typeof s == "string" ? s : "";
|
|
131
131
|
}
|
|
132
132
|
u !== o && (le(o), H && H(t, o, "reset"));
|
|
133
|
-
}, [O, u, l, H, le, D, r]), [K, Pe] =
|
|
133
|
+
}, [O, u, l, H, le, D, r]), [K, Pe] = _e({
|
|
134
134
|
controlled: He,
|
|
135
135
|
default: !1,
|
|
136
136
|
name: b,
|
|
137
137
|
state: "open"
|
|
138
138
|
}), [Ke, Ae] = g.useState(!0), De = !l && r != null && u === O(r), S = K && !Y, f = S ? me(
|
|
139
|
-
xe.filter((t) => !(ee && (l ? r : [r]).some((e) => e !== null &&
|
|
139
|
+
xe.filter((t) => !(ee && (l ? r : [r]).some((e) => e !== null && _(t, e)))),
|
|
140
140
|
// we use the empty string to manipulate `filterOptions` to not filter any options
|
|
141
141
|
// i.e. the filter predicate always returns true
|
|
142
142
|
{
|
|
@@ -154,7 +154,7 @@ function yt(c) {
|
|
|
154
154
|
}, [r, ue, ae, C.value, L]);
|
|
155
155
|
const we = K && f.length > 0 && !Y;
|
|
156
156
|
if (process.env.NODE_ENV !== "production" && r !== null && !L && xe.length > 0) {
|
|
157
|
-
const t = (l ? r : [r]).filter((e) => !xe.some((n) =>
|
|
157
|
+
const t = (l ? r : [r]).filter((e) => !xe.some((n) => _(n, e)));
|
|
158
158
|
t.length > 0 && console.warn([`MUI: The value provided to ${b} is invalid.`, `None of the options match with \`${t.length > 1 ? JSON.stringify(t) : JSON.stringify(t[0])}\`.`, "You can use the `isOptionEqualToValue` prop to customize the equality test."].join(`
|
|
159
159
|
`));
|
|
160
160
|
}
|
|
@@ -181,7 +181,7 @@ function yt(c) {
|
|
|
181
181
|
index: e,
|
|
182
182
|
reason: n = "auto"
|
|
183
183
|
}) => {
|
|
184
|
-
if (x.current = e, e === -1 ? d.current.removeAttribute("aria-activedescendant") : d.current.setAttribute("aria-activedescendant", `${
|
|
184
|
+
if (x.current = e, e === -1 ? d.current.removeAttribute("aria-activedescendant") : d.current.setAttribute("aria-activedescendant", `${T}-option-${e}`), se && se(t, e === -1 ? null : f[e], n), !$.current)
|
|
185
185
|
return;
|
|
186
186
|
const o = $.current.querySelector(`[role="option"].${m}-focused`);
|
|
187
187
|
o && (o.classList.remove(`${m}-focused`), o.classList.remove(`${m}-focusVisible`));
|
|
@@ -208,7 +208,7 @@ function yt(c) {
|
|
|
208
208
|
const a = ze((() => {
|
|
209
209
|
const p = f.length - 1;
|
|
210
210
|
if (e === "reset")
|
|
211
|
-
return
|
|
211
|
+
return Te;
|
|
212
212
|
if (e === "start")
|
|
213
213
|
return 0;
|
|
214
214
|
if (e === "end")
|
|
@@ -256,9 +256,9 @@ function yt(c) {
|
|
|
256
256
|
if ($.current) {
|
|
257
257
|
if (e != null) {
|
|
258
258
|
const n = f[x.current];
|
|
259
|
-
if (l && n && ge(r, (s) =>
|
|
259
|
+
if (l && n && ge(r, (s) => _(n, s)) !== -1)
|
|
260
260
|
return;
|
|
261
|
-
const o = ge(f, (s) =>
|
|
261
|
+
const o = ge(f, (s) => _(s, e));
|
|
262
262
|
o === -1 ? N({
|
|
263
263
|
diff: "reset"
|
|
264
264
|
}) : F({
|
|
@@ -299,7 +299,7 @@ function yt(c) {
|
|
|
299
299
|
Se();
|
|
300
300
|
}, [Se]);
|
|
301
301
|
const q = (t) => {
|
|
302
|
-
K || (Pe(!0), Ae(!0),
|
|
302
|
+
K || (Pe(!0), Ae(!0), Ee && Ee(t));
|
|
303
303
|
}, X = (t, e) => {
|
|
304
304
|
K && (Pe(!1), oe && oe(t, e));
|
|
305
305
|
}, z = (t, e, n, o) => {
|
|
@@ -308,16 +308,16 @@ function yt(c) {
|
|
|
308
308
|
return;
|
|
309
309
|
} else if (r === e)
|
|
310
310
|
return;
|
|
311
|
-
|
|
311
|
+
E && E(t, e, n, o), Ue(e);
|
|
312
312
|
}, fe = g.useRef(!1), G = (t, e, n = "selectOption", o = "options") => {
|
|
313
313
|
let s = n, a = e;
|
|
314
314
|
if (l) {
|
|
315
315
|
if (a = Array.isArray(r) ? r.slice() : [], process.env.NODE_ENV !== "production") {
|
|
316
|
-
const I = a.filter((de) =>
|
|
316
|
+
const I = a.filter((de) => _(e, de));
|
|
317
317
|
I.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${b} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${I.length} matches.`].join(`
|
|
318
318
|
`));
|
|
319
319
|
}
|
|
320
|
-
const p = ge(a, (I) =>
|
|
320
|
+
const p = ge(a, (I) => _(e, I));
|
|
321
321
|
p === -1 ? a.push(e) : o !== "freeSolo" && (a.splice(p, 1), s = "removeOption");
|
|
322
322
|
}
|
|
323
323
|
ue(t, a), z(t, a, s, {
|
|
@@ -466,7 +466,7 @@ function yt(c) {
|
|
|
466
466
|
}, Le = (t) => {
|
|
467
467
|
K ? X(t, "toggleInput") : q(t);
|
|
468
468
|
}, rt = (t) => {
|
|
469
|
-
t.currentTarget.contains(t.target) && t.target.getAttribute("id") !==
|
|
469
|
+
t.currentTarget.contains(t.target) && t.target.getAttribute("id") !== T && t.preventDefault();
|
|
470
470
|
}, ot = (t) => {
|
|
471
471
|
t.currentTarget.contains(t.target) && (d.current.focus(), qe && Oe.current && d.current.selectionEnd - d.current.selectionStart === 0 && d.current.select(), Oe.current = !1);
|
|
472
472
|
}, st = (t) => {
|
|
@@ -490,18 +490,18 @@ function yt(c) {
|
|
|
490
490
|
}
|
|
491
491
|
return w && ae && ve(), {
|
|
492
492
|
getRootProps: (t = {}) => Me({
|
|
493
|
-
"aria-owns": we ? `${
|
|
493
|
+
"aria-owns": we ? `${T}-listbox` : null
|
|
494
494
|
}, t, {
|
|
495
495
|
onKeyDown: Xe(t),
|
|
496
496
|
onMouseDown: rt,
|
|
497
497
|
onClick: ot
|
|
498
498
|
}),
|
|
499
499
|
getInputLabelProps: () => ({
|
|
500
|
-
id: `${
|
|
501
|
-
htmlFor:
|
|
500
|
+
id: `${T}-label`,
|
|
501
|
+
htmlFor: T
|
|
502
502
|
}),
|
|
503
503
|
getInputProps: () => ({
|
|
504
|
-
id:
|
|
504
|
+
id: T,
|
|
505
505
|
value: u,
|
|
506
506
|
onBlur: ve,
|
|
507
507
|
onFocus: Ge,
|
|
@@ -511,7 +511,7 @@ function yt(c) {
|
|
|
511
511
|
// only have an opinion about this when closed
|
|
512
512
|
"aria-activedescendant": S ? "" : null,
|
|
513
513
|
"aria-autocomplete": A ? "both" : "list",
|
|
514
|
-
"aria-controls": we ? `${
|
|
514
|
+
"aria-controls": we ? `${T}-listbox` : void 0,
|
|
515
515
|
"aria-expanded": we,
|
|
516
516
|
// Disable browser's suggestion that might overlap with the popup.
|
|
517
517
|
// Handle autocomplete but not autofill.
|
|
@@ -543,8 +543,8 @@ function yt(c) {
|
|
|
543
543
|
}),
|
|
544
544
|
getListboxProps: () => ({
|
|
545
545
|
role: "listbox",
|
|
546
|
-
id: `${
|
|
547
|
-
"aria-labelledby": `${
|
|
546
|
+
id: `${T}-listbox`,
|
|
547
|
+
"aria-labelledby": `${T}-label`,
|
|
548
548
|
ref: We,
|
|
549
549
|
onMouseDown: (t) => {
|
|
550
550
|
t.preventDefault();
|
|
@@ -555,12 +555,12 @@ function yt(c) {
|
|
|
555
555
|
option: e
|
|
556
556
|
}) => {
|
|
557
557
|
var n;
|
|
558
|
-
const o = (l ? r : [r]).some((a) => a != null &&
|
|
558
|
+
const o = (l ? r : [r]).some((a) => a != null && _(e, a)), s = U ? U(e) : !1;
|
|
559
559
|
return {
|
|
560
560
|
key: (n = te == null ? void 0 : te(e)) != null ? n : O(e),
|
|
561
561
|
tabIndex: -1,
|
|
562
562
|
role: "option",
|
|
563
|
-
id: `${
|
|
563
|
+
id: `${T}-option-${t}`,
|
|
564
564
|
onMouseMove: Ze,
|
|
565
565
|
onClick: tt,
|
|
566
566
|
onTouchStart: et,
|
|
@@ -569,7 +569,7 @@ function yt(c) {
|
|
|
569
569
|
"aria-selected": o
|
|
570
570
|
};
|
|
571
571
|
},
|
|
572
|
-
id:
|
|
572
|
+
id: T,
|
|
573
573
|
inputValue: u,
|
|
574
574
|
value: r,
|
|
575
575
|
dirty: ke,
|
|
@@ -628,11 +628,11 @@ const Ot = "_autocomplete_mj65r_65", Z = {
|
|
|
628
628
|
onInputChange: (i, y) => {
|
|
629
629
|
M && M(i, y), L(y);
|
|
630
630
|
},
|
|
631
|
-
onHighlightChange: (i, y,
|
|
631
|
+
onHighlightChange: (i, y, _) => {
|
|
632
632
|
var l;
|
|
633
|
-
if (
|
|
634
|
-
const
|
|
635
|
-
|
|
633
|
+
if (_ === "keyboard") {
|
|
634
|
+
const E = document.querySelector("#autocomplete-list"), oe = (i == null ? void 0 : i.target).getAttribute("aria-activedescendant");
|
|
635
|
+
E == null || E.querySelectorAll("li").forEach((se) => se.classList.remove(Z["option-focused"])), (l = E == null ? void 0 : E.querySelector(`[id="${oe}"]`)) == null || l.classList.add(Z["option-focused"]);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
}), be = {
|
|
@@ -655,19 +655,19 @@ const Ot = "_autocomplete_mj65r_65", Z = {
|
|
|
655
655
|
id: "autocomplete-list",
|
|
656
656
|
className: Z["autocomplete__dropdown-list"],
|
|
657
657
|
children: R.map((i, y) => {
|
|
658
|
-
const { key:
|
|
658
|
+
const { key: _, ...l } = ne({
|
|
659
659
|
option: i,
|
|
660
660
|
index: y
|
|
661
|
-
}),
|
|
661
|
+
}), E = typeof i == "string" ? i : m ? m(i) : String(i[c || "label"]);
|
|
662
662
|
return /* @__PURE__ */ Q(
|
|
663
663
|
"li",
|
|
664
664
|
{
|
|
665
665
|
tabIndex: y,
|
|
666
666
|
className: Z["autocomplete__dropdown-item"],
|
|
667
667
|
...l,
|
|
668
|
-
children:
|
|
668
|
+
children: E
|
|
669
669
|
},
|
|
670
|
-
|
|
670
|
+
_
|
|
671
671
|
);
|
|
672
672
|
})
|
|
673
673
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _, jsxs as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as c, useMemo as f } from "react";
|
|
3
3
|
import { c as k } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { LoadingSpinner as x } from "../LoadingSpinner/LoadingSpinner.js";
|
|
5
|
-
import { B as q } from "../../Button-
|
|
5
|
+
import { B as q } from "../../Button-BrEDdtHO.js";
|
|
6
6
|
import '../../assets/Button.css';const B = "_button_1wddv_43", d = {
|
|
7
7
|
"u-typography-h1": "_u-typography-h1_1wddv_1",
|
|
8
8
|
"u-typography-h2": "_u-typography-h2_1wddv_8",
|
|
@@ -7,10 +7,12 @@ import "../Typography/Typography.js";
|
|
|
7
7
|
import "../Input/Input.js";
|
|
8
8
|
import "../Avatar/Avatar.js";
|
|
9
9
|
import "../Button/Button.js";
|
|
10
|
-
import { C as
|
|
10
|
+
import { C as z } from "../../Toggle-SlvGYQKW.js";
|
|
11
11
|
import "../Dialog/Dialog.js";
|
|
12
12
|
import "../DatePicker/DatePicker.js";
|
|
13
13
|
import "../Skeleton/Skeleton.js";
|
|
14
|
+
import "../../index-1UpBa69h.js";
|
|
15
|
+
import "../Draggable/useDraggable.js";
|
|
14
16
|
import "../IconButton/IconButton.js";
|
|
15
17
|
import "../InputSearch/InputSearch.js";
|
|
16
18
|
import "../Select/Select.js";
|
|
@@ -19,7 +21,8 @@ import "../Table/Table.js";
|
|
|
19
21
|
import "../Tabs/Tabs.js";
|
|
20
22
|
import "../../Group-DJz1rK2n.js";
|
|
21
23
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
22
|
-
import "../../
|
|
24
|
+
import "../../utils/iconsList.js";
|
|
25
|
+
import "../../Button-BrEDdtHO.js";
|
|
23
26
|
export {
|
|
24
|
-
|
|
27
|
+
z as Chip
|
|
25
28
|
};
|
|
@@ -12,11 +12,11 @@ import { renderDualCalendarHeader as Gt } from "./renderDualCalendarHeader.js";
|
|
|
12
12
|
import { renderHeader as Zt } from "./renderHeader.js";
|
|
13
13
|
import { renderNavigatorInput as Qt } from "./renderNavigatorInput.js";
|
|
14
14
|
import { renderPeriodSelection as er } from "./renderPeriodSelection.js";
|
|
15
|
-
import { P as b, g as tr, a as rr,
|
|
16
|
-
import { o as st, c as ir } from "../../ownerDocument-
|
|
17
|
-
import { P as sr, H as ft } from "../../Portal-
|
|
15
|
+
import { P as b, g as tr, a as rr, b as Mt, _ as _e, u as it, c as nr, d as or, e as ar } from "../../useSlotProps-CYHDC4TN.js";
|
|
16
|
+
import { o as st, c as ir } from "../../ownerDocument-By592Iy6.js";
|
|
17
|
+
import { P as sr, H as ft } from "../../Portal-DJapUCn6.js";
|
|
18
18
|
import { u as ct } from "../../useEnhancedEffect-CJGo-L3B.js";
|
|
19
|
-
import { C as fr } from "../../ClickAwayListener-
|
|
19
|
+
import { C as fr } from "../../ClickAwayListener-Z08peX_P.js";
|
|
20
20
|
const cr = b.oneOfType([b.func, b.object]);
|
|
21
21
|
var S = "top", N = "bottom", W = "right", C = "left", Fe = "auto", ge = [S, N, W, C], se = "start", me = "end", pr = "clippingParents", Dt = "viewport", ue = "popper", lr = "reference", pt = /* @__PURE__ */ ge.reduce(function(e, t) {
|
|
22
22
|
return e.concat([t + "-" + se, t + "-" + me]);
|