@clearstory/drywall-react 3.2.0 → 3.3.0
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/{AdapterDayjs-C2OOePSw.js → AdapterDayjs-onBBJ8Hr.js} +1 -1
- package/dist/{Autocomplete-tzEooGdJ.js → Autocomplete-CfXcTXLL.js} +133 -120
- package/dist/{Datepicker-u8DjTSV8.js → Datepicker-CJBEgBsm.js} +76 -55
- package/dist/{SelectControl-CdviGNA_.js → SelectControl-BWiB-iy9.js} +2 -2
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.theme.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/AutocompleteControl/AutocompleteControl.js +3 -3
- package/dist/components/AutocompleteControl/index.js +1 -1
- package/dist/components/Datepicker/Datepicker.js +1 -1
- package/dist/components/Datepicker/index.js +2 -2
- package/dist/components/DatepickerControl/DatepickerControl.js +3 -3
- package/dist/components/DatepickerControl/index.js +1 -1
- package/dist/components/FormSublabel/FormSublabel.js +3 -3
- package/dist/components/FormSublabel/index.js +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +6 -6
- package/dist/components/Input/Input.theme.js +12 -7
- package/dist/components/InputControl/InputControl.js +3 -3
- package/dist/components/InputControl/index.js +1 -1
- package/dist/components/SelectControl/SelectControl.js +3 -3
- package/dist/components/SelectControl/index.js +1 -1
- package/dist/components/ToastContainer/useToast.d.ts +2 -0
- package/dist/components/ToastContainer/useToast.js +110 -106
- package/dist/main.js +4 -4
- package/package.json +1 -1
|
@@ -1,124 +1,128 @@
|
|
|
1
1
|
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { n as
|
|
2
|
+
import { n as i, h } from "../../index-SzwnPTHF.js";
|
|
3
3
|
import { useContext as p, useCallback as b } from "react";
|
|
4
4
|
import "../../icons/ClearstoryIcon.js";
|
|
5
5
|
import "../../icons/InternalOnlyIcon.js";
|
|
6
6
|
import "../../icons/MoneyBucketIcon.js";
|
|
7
7
|
import "../../icons/MoreCircleOutlineIcon.js";
|
|
8
|
-
import { a as w, I, E as
|
|
8
|
+
import { a as w, I, E as v, W as R, C } from "../../WarningAmberOutlined-Bip82sqV.js";
|
|
9
9
|
import { ToastLabelContext as y } from "./ToastLabelContext.js";
|
|
10
10
|
import { B as k } from "../../Box-CKDKtm7F.js";
|
|
11
|
-
import { A as
|
|
11
|
+
import { A as m } from "../../Alert-BAwPio4K.js";
|
|
12
12
|
import { I as T } from "../../IconButton-rSBl8wjc.js";
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
13
|
+
const X = () => {
|
|
14
|
+
const t = p(y);
|
|
15
|
+
if (!t)
|
|
16
16
|
throw new Error(
|
|
17
17
|
'useToast must be used within a ToastProvider. Make sure to wrap your component with <ToastProvider closeAriaLabel="...">'
|
|
18
18
|
);
|
|
19
|
-
const { closeAriaLabel:
|
|
20
|
-
return {
|
|
21
|
-
(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
19
|
+
const { closeAriaLabel: n } = t;
|
|
20
|
+
return {
|
|
21
|
+
notify: b(
|
|
22
|
+
(c, l = {}) => {
|
|
23
|
+
const { type: r = "info", details: e, ...d } = l, s = {
|
|
24
|
+
success: "success",
|
|
25
|
+
warning: "warning",
|
|
26
|
+
error: "error",
|
|
27
|
+
info: "info"
|
|
28
|
+
}, u = {
|
|
29
|
+
success: /* @__PURE__ */ o(C, { sx: { marginRight: 0.5 } }),
|
|
30
|
+
warning: /* @__PURE__ */ o(R, { sx: { marginRight: 0.5 } }),
|
|
31
|
+
error: /* @__PURE__ */ o(v, { sx: { marginRight: 0.5 } }),
|
|
32
|
+
info: /* @__PURE__ */ o(I, { sx: { marginRight: 0.5 } })
|
|
33
|
+
};
|
|
34
|
+
return i(
|
|
35
|
+
(a) => {
|
|
36
|
+
const f = h(c, a);
|
|
37
|
+
return /* @__PURE__ */ x(
|
|
38
|
+
k,
|
|
39
|
+
{
|
|
40
|
+
sx: {
|
|
41
|
+
minWidth: { xs: "auto", sm: "18rem" },
|
|
42
|
+
maxWidth: "18rem"
|
|
43
|
+
},
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ o(
|
|
46
|
+
m,
|
|
47
|
+
{
|
|
48
|
+
role: "none",
|
|
49
|
+
severity: s[r],
|
|
50
|
+
variant: "filled",
|
|
51
|
+
icon: u[r],
|
|
52
|
+
action: /* @__PURE__ */ o(
|
|
53
|
+
T,
|
|
54
|
+
{
|
|
55
|
+
color: "inherit",
|
|
56
|
+
size: "small",
|
|
57
|
+
onClick: () => i.dismiss(a.id),
|
|
58
|
+
"aria-label": n,
|
|
59
|
+
sx: {
|
|
60
|
+
marginLeft: 0.5
|
|
61
|
+
},
|
|
62
|
+
children: /* @__PURE__ */ o(w, { fontSize: "small" })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
sx: [
|
|
66
|
+
{
|
|
67
|
+
boxShadow: 2,
|
|
68
|
+
fontSize: "0.875rem",
|
|
69
|
+
zIndex: 2
|
|
60
70
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
!!e && {
|
|
72
|
+
borderBottomLeftRadius: 0,
|
|
73
|
+
borderBottomRightRadius: 0
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
children: f
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
e && /* @__PURE__ */ o(
|
|
80
|
+
m,
|
|
81
|
+
{
|
|
82
|
+
role: "none",
|
|
83
|
+
icon: !1,
|
|
84
|
+
severity: s[r],
|
|
85
|
+
variant: "outlined",
|
|
86
|
+
sx: ({ vars: g }) => ({
|
|
87
|
+
backgroundColor: g?.palette.background.surface,
|
|
88
|
+
borderTopLeftRadius: 0,
|
|
89
|
+
borderTopRightRadius: 0,
|
|
66
90
|
boxShadow: 2,
|
|
67
|
-
fontSize: "0.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
role: "none",
|
|
82
|
-
icon: !1,
|
|
83
|
-
severity: i[r],
|
|
84
|
-
variant: "outlined",
|
|
85
|
-
sx: ({ vars: g }) => ({
|
|
86
|
-
backgroundColor: g?.palette.background.surface,
|
|
87
|
-
borderTopLeftRadius: 0,
|
|
88
|
-
borderTopRightRadius: 0,
|
|
89
|
-
boxShadow: 2,
|
|
90
|
-
fontSize: "0.75rem",
|
|
91
|
-
alignItems: "flex-start",
|
|
92
|
-
fontWeight: "normal",
|
|
93
|
-
maxHeight: "7rem",
|
|
94
|
-
overflowX: "auto",
|
|
95
|
-
overflowY: "auto",
|
|
96
|
-
zIndex: 1
|
|
97
|
-
}),
|
|
98
|
-
children: e
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
style: {
|
|
107
|
-
padding: 0,
|
|
108
|
-
margin: 0,
|
|
109
|
-
border: 0,
|
|
110
|
-
background: "none",
|
|
111
|
-
boxShadow: "none"
|
|
91
|
+
fontSize: "0.75rem",
|
|
92
|
+
alignItems: "flex-start",
|
|
93
|
+
fontWeight: "normal",
|
|
94
|
+
maxHeight: "7rem",
|
|
95
|
+
overflowX: "auto",
|
|
96
|
+
overflowY: "auto",
|
|
97
|
+
zIndex: 1
|
|
98
|
+
}),
|
|
99
|
+
children: e
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
112
105
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
106
|
+
{
|
|
107
|
+
style: {
|
|
108
|
+
padding: 0,
|
|
109
|
+
margin: 0,
|
|
110
|
+
border: 0,
|
|
111
|
+
background: "none",
|
|
112
|
+
boxShadow: "none"
|
|
113
|
+
},
|
|
114
|
+
duration: r === "error" || r === "warning" ? 1 / 0 : 5e3,
|
|
115
|
+
icon: null,
|
|
116
|
+
...d
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
},
|
|
120
|
+
[n]
|
|
121
|
+
),
|
|
122
|
+
dismissNotification: i.dismiss,
|
|
123
|
+
removeNotifications: i.remove
|
|
124
|
+
};
|
|
121
125
|
};
|
|
122
126
|
export {
|
|
123
|
-
|
|
127
|
+
X as useToast
|
|
124
128
|
};
|
package/dist/main.js
CHANGED
|
@@ -8,9 +8,9 @@ import { A as ua, C as ya } from "./Clear-ABzw_mBN.js";
|
|
|
8
8
|
import { C as Ua, a as ba, E as Sa, I as La, W as Da } from "./WarningAmberOutlined-Bip82sqV.js";
|
|
9
9
|
import { I as Ta } from "./Info-DtWHV9kz.js";
|
|
10
10
|
import { StyledEngineProvider as ka } from "./theme/index.js";
|
|
11
|
-
import { A as wa, a as va, c as Fa, g as Oa } from "./Autocomplete-
|
|
12
|
-
import { A as Ra, D as Ga, F as Ha, I as Ea, S as Na } from "./SelectControl-
|
|
13
|
-
import { c as Ka, a as za, b as Wa, D as ja, L as Qa, M as Za, P as qa, e as Ja, d as Xa, f as Ya, g as _a, j as $a, i as so, p as ao, h as oo } from "./Datepicker-
|
|
11
|
+
import { A as wa, a as va, c as Fa, g as Oa } from "./Autocomplete-CfXcTXLL.js";
|
|
12
|
+
import { A as Ra, D as Ga, F as Ha, I as Ea, S as Na } from "./SelectControl-BWiB-iy9.js";
|
|
13
|
+
import { c as Ka, a as za, b as Wa, D as ja, L as Qa, M as Za, P as qa, e as Ja, d as Xa, f as Ya, g as _a, j as $a, i as so, p as ao, h as oo } from "./Datepicker-CJBEgBsm.js";
|
|
14
14
|
import { Input as eo } from "./components/Input/Input.js";
|
|
15
15
|
import { Select as lo } from "./components/Select/Select.js";
|
|
16
16
|
import { ThemeProvider as no } from "./components/ThemeProvider/ThemeProvider.js";
|
|
@@ -107,7 +107,7 @@ import { T as gn, g as mn, t as In } from "./Typography-DnNWmNen.js";
|
|
|
107
107
|
import { a as fn, d as xn, e as un, g as yn, b as An, l as Un } from "./createTheme-BnGUhbht.js";
|
|
108
108
|
import { u as Sn } from "./ThemeProviderWithVars-Cd9Vwf-U.js";
|
|
109
109
|
import { C as Dn } from "./ClickAwayListener-BhNP8Zmy.js";
|
|
110
|
-
import { A as Tn } from "./AdapterDayjs-
|
|
110
|
+
import { A as Tn } from "./AdapterDayjs-onBBJ8Hr.js";
|
|
111
111
|
export {
|
|
112
112
|
g as AccessTimeIcon,
|
|
113
113
|
So as Accordion,
|