@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.
Files changed (26) hide show
  1. package/dist/{AdapterDayjs-C2OOePSw.js → AdapterDayjs-onBBJ8Hr.js} +1 -1
  2. package/dist/{Autocomplete-tzEooGdJ.js → Autocomplete-CfXcTXLL.js} +133 -120
  3. package/dist/{Datepicker-u8DjTSV8.js → Datepicker-CJBEgBsm.js} +76 -55
  4. package/dist/{SelectControl-CdviGNA_.js → SelectControl-BWiB-iy9.js} +2 -2
  5. package/dist/components/Autocomplete/Autocomplete.js +1 -1
  6. package/dist/components/Autocomplete/Autocomplete.theme.js +1 -1
  7. package/dist/components/Autocomplete/index.js +1 -1
  8. package/dist/components/AutocompleteControl/AutocompleteControl.js +3 -3
  9. package/dist/components/AutocompleteControl/index.js +1 -1
  10. package/dist/components/Datepicker/Datepicker.js +1 -1
  11. package/dist/components/Datepicker/index.js +2 -2
  12. package/dist/components/DatepickerControl/DatepickerControl.js +3 -3
  13. package/dist/components/DatepickerControl/index.js +1 -1
  14. package/dist/components/FormSublabel/FormSublabel.js +3 -3
  15. package/dist/components/FormSublabel/index.js +1 -1
  16. package/dist/components/Input/Input.d.ts +1 -1
  17. package/dist/components/Input/Input.js +6 -6
  18. package/dist/components/Input/Input.theme.js +12 -7
  19. package/dist/components/InputControl/InputControl.js +3 -3
  20. package/dist/components/InputControl/index.js +1 -1
  21. package/dist/components/SelectControl/SelectControl.js +3 -3
  22. package/dist/components/SelectControl/index.js +1 -1
  23. package/dist/components/ToastContainer/useToast.d.ts +2 -0
  24. package/dist/components/ToastContainer/useToast.js +110 -106
  25. package/dist/main.js +4 -4
  26. 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 a, h } from "../../index-SzwnPTHF.js";
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 R, W as v, C } from "../../WarningAmberOutlined-Bip82sqV.js";
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 l } from "../../Alert-BAwPio4K.js";
11
+ import { A as m } from "../../Alert-BAwPio4K.js";
12
12
  import { I as T } from "../../IconButton-rSBl8wjc.js";
13
- const Y = () => {
14
- const n = p(y);
15
- if (!n)
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: t } = n;
20
- return { notify: b(
21
- (m, c = {}) => {
22
- const { type: r = "info", details: e, ...d } = c, i = {
23
- success: "success",
24
- warning: "warning",
25
- error: "error",
26
- info: "info"
27
- }, u = {
28
- success: /* @__PURE__ */ o(C, { sx: { marginRight: 0.5 } }),
29
- warning: /* @__PURE__ */ o(v, { sx: { marginRight: 0.5 } }),
30
- error: /* @__PURE__ */ o(R, { sx: { marginRight: 0.5 } }),
31
- info: /* @__PURE__ */ o(I, { sx: { marginRight: 0.5 } })
32
- };
33
- a(
34
- (s) => {
35
- const f = h(m, s);
36
- return /* @__PURE__ */ x(
37
- k,
38
- {
39
- sx: {
40
- minWidth: { xs: "auto", sm: "18rem" },
41
- maxWidth: "18rem"
42
- },
43
- children: [
44
- /* @__PURE__ */ o(
45
- l,
46
- {
47
- role: "none",
48
- severity: i[r],
49
- variant: "filled",
50
- icon: u[r],
51
- action: /* @__PURE__ */ o(
52
- T,
53
- {
54
- color: "inherit",
55
- size: "small",
56
- onClick: () => a.dismiss(s.id),
57
- "aria-label": t,
58
- sx: {
59
- marginLeft: 0.5
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
- children: /* @__PURE__ */ o(w, { fontSize: "small" })
62
- }
63
- ),
64
- sx: [
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.875rem",
68
- zIndex: 2
69
- },
70
- !!e && {
71
- borderBottomLeftRadius: 0,
72
- borderBottomRightRadius: 0
73
- }
74
- ],
75
- children: f
76
- }
77
- ),
78
- e && /* @__PURE__ */ o(
79
- l,
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
- duration: r === "error" || r === "warning" ? 1 / 0 : 5e3,
114
- icon: null,
115
- ...d
116
- }
117
- );
118
- },
119
- [t]
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
- Y as useToast
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-tzEooGdJ.js";
12
- import { A as Ra, D as Ga, F as Ha, I as Ea, S as Na } from "./SelectControl-CdviGNA_.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-u8DjTSV8.js";
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-C2OOePSw.js";
110
+ import { A as Tn } from "./AdapterDayjs-onBBJ8Hr.js";
111
111
  export {
112
112
  g as AccessTimeIcon,
113
113
  So as Accordion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clearstory/drywall-react",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "a Clearstory software design system",
6
6
  "type": "module",