@cerberus-design/react 0.10.4 → 0.11.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/build/legacy/_tsup-dts-rollup.d.cts +244 -2
- package/build/legacy/components/Admonition.cjs +419 -0
- package/build/legacy/components/Admonition.cjs.map +1 -0
- package/build/legacy/components/AnimatingUploadIcon.cjs +124 -0
- package/build/legacy/components/AnimatingUploadIcon.cjs.map +1 -0
- package/build/legacy/components/Avatar.cjs +110 -13
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +107 -10
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/CircularProgress.cjs +19 -5
- package/build/legacy/components/CircularProgress.cjs.map +1 -1
- package/build/legacy/components/Fieldset.cjs +66 -0
- package/build/legacy/components/Fieldset.cjs.map +1 -0
- package/build/legacy/components/FieldsetLabel.cjs +49 -0
- package/build/legacy/components/FieldsetLabel.cjs.map +1 -0
- package/build/legacy/components/FileStatus.cjs +138 -39
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +120 -22
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +108 -11
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Label.cjs +1 -1
- package/build/legacy/components/Label.cjs.map +1 -1
- package/build/legacy/components/Legend.cjs +95 -0
- package/build/legacy/components/Legend.cjs.map +1 -0
- package/build/legacy/components/ModalHeader.cjs +2 -2
- package/build/legacy/components/ModalHeader.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +109 -12
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Radio.cjs +27 -14
- package/build/legacy/components/Radio.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +111 -14
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +106 -9
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Th.cjs +4 -1
- package/build/legacy/components/Th.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +108 -11
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +102 -5
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +102 -5
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +141 -40
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +129 -32
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +178 -66
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/hooks/useModal.cjs +6 -2
- package/build/legacy/hooks/useModal.cjs.map +1 -1
- package/build/legacy/index.cjs +793 -442
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +244 -2
- package/build/modern/{chunk-S7XGIQY6.js → chunk-243VUIA6.js} +2 -2
- package/build/modern/{chunk-LKFXUM3Z.js → chunk-3NE6C66J.js} +36 -25
- package/build/modern/{chunk-LKFXUM3Z.js.map → chunk-3NE6C66J.js.map} +1 -1
- package/build/modern/chunk-3ZDFQO25.js +31 -0
- package/build/modern/chunk-3ZDFQO25.js.map +1 -0
- package/build/modern/{chunk-YLPSE5Z2.js → chunk-6QHOKCV3.js} +11 -6
- package/build/modern/chunk-6QHOKCV3.js.map +1 -0
- package/build/modern/chunk-6TTN2JMY.js +54 -0
- package/build/modern/chunk-6TTN2JMY.js.map +1 -0
- package/build/modern/{chunk-OW62FLJ6.js → chunk-7T3JIGM7.js} +8 -4
- package/build/modern/chunk-7T3JIGM7.js.map +1 -0
- package/build/modern/{chunk-7K6PZBHN.js → chunk-CO4BKT7K.js} +5 -2
- package/build/modern/{chunk-7K6PZBHN.js.map → chunk-CO4BKT7K.js.map} +1 -1
- package/build/modern/{chunk-NBG2OSYI.js → chunk-FT7DFRHQ.js} +2 -2
- package/build/modern/chunk-FTPZHG6J.js +46 -0
- package/build/modern/{chunk-LJYCFFX7.js.map → chunk-FTPZHG6J.js.map} +1 -1
- package/build/modern/{chunk-JCGWTIR4.js → chunk-HCB5NQ5J.js} +5 -4
- package/build/modern/chunk-HCB5NQ5J.js.map +1 -0
- package/build/modern/chunk-HVKM54BA.js +100 -0
- package/build/modern/chunk-HVKM54BA.js.map +1 -0
- package/build/modern/{chunk-CMUFJU4S.js → chunk-KLUBAM4U.js} +2 -2
- package/build/modern/{chunk-AUAPBPGW.js → chunk-MDIUFBDX.js} +2 -2
- package/build/modern/{chunk-I35HMGJQ.js → chunk-NMF2HYWO.js} +2 -2
- package/build/modern/{chunk-I35HMGJQ.js.map → chunk-NMF2HYWO.js.map} +1 -1
- package/build/modern/{chunk-O6JYYVO7.js → chunk-PA5EB7EO.js} +2 -2
- package/build/modern/chunk-PZAZKQMO.js +25 -0
- package/build/modern/chunk-PZAZKQMO.js.map +1 -0
- package/build/modern/{chunk-EZNGCXVJ.js → chunk-RDQHHCFR.js} +5 -5
- package/build/modern/{chunk-BDCFYW34.js → chunk-TMR7JGMP.js} +12 -9
- package/build/modern/chunk-TMR7JGMP.js.map +1 -0
- package/build/modern/{chunk-WZOYPFUU.js → chunk-UJKS4DDN.js} +2 -2
- package/build/modern/{chunk-WLEX22KS.js → chunk-ULYQLKWA.js} +3 -3
- package/build/modern/{chunk-WLEX22KS.js.map → chunk-ULYQLKWA.js.map} +1 -1
- package/build/modern/{chunk-6YUB3ITX.js → chunk-X4Y4WTRU.js} +10 -10
- package/build/modern/{chunk-UXHAFEBA.js → chunk-YMJMB6OP.js} +5 -3
- package/build/modern/chunk-YMJMB6OP.js.map +1 -0
- package/build/modern/{chunk-GMG3B34U.js → chunk-YWCTMLLO.js} +2 -2
- package/build/modern/chunk-ZW3FFE37.js +138 -0
- package/build/modern/chunk-ZW3FFE37.js.map +1 -0
- package/build/modern/{chunk-477G5ZEL.js → chunk-ZX6DBC2Z.js} +2 -2
- package/build/modern/components/Admonition.js +17 -0
- package/build/modern/components/Admonition.js.map +1 -0
- package/build/modern/components/AnimatingUploadIcon.js +7 -0
- package/build/modern/components/AnimatingUploadIcon.js.map +1 -0
- package/build/modern/components/Avatar.js +4 -3
- package/build/modern/components/Checkbox.js +4 -3
- package/build/modern/components/CircularProgress.js +2 -1
- package/build/modern/components/Fieldset.js +9 -0
- package/build/modern/components/Fieldset.js.map +1 -0
- package/build/modern/components/FieldsetLabel.js +7 -0
- package/build/modern/components/FieldsetLabel.js.map +1 -0
- package/build/modern/components/FileStatus.js +5 -4
- package/build/modern/components/FileUploader.js +5 -4
- package/build/modern/components/Input.js +4 -3
- package/build/modern/components/Label.js +1 -1
- package/build/modern/components/Legend.js +10 -0
- package/build/modern/components/Legend.js.map +1 -0
- package/build/modern/components/ModalHeader.js +1 -1
- package/build/modern/components/Notification.js +4 -3
- package/build/modern/components/Radio.js +1 -1
- package/build/modern/components/Select.js +4 -3
- package/build/modern/components/Tag.js +4 -3
- package/build/modern/components/Th.js +1 -1
- package/build/modern/components/Toggle.js +4 -3
- package/build/modern/config/cerbIcons.js +2 -1
- package/build/modern/config/defineIcons.js +3 -2
- package/build/modern/context/confirm-modal.js +8 -7
- package/build/modern/context/notification-center.js +6 -5
- package/build/modern/context/prompt-modal.js +10 -9
- package/build/modern/hooks/useModal.js +1 -1
- package/build/modern/index.js +86 -65
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Admonition.tsx +186 -0
- package/src/components/AnimatingUploadIcon.tsx +83 -0
- package/src/components/CircularProgress.tsx +20 -12
- package/src/components/Fieldset.tsx +65 -0
- package/src/components/FieldsetLabel.tsx +59 -0
- package/src/components/FileStatus.tsx +2 -0
- package/src/components/FileUploader.tsx +6 -1
- package/src/components/Label.tsx +1 -1
- package/src/components/Legend.tsx +87 -0
- package/src/components/ModalHeader.tsx +2 -2
- package/src/components/Radio.tsx +10 -1
- package/src/components/Th.tsx +3 -0
- package/src/config/cerbIcons.ts +10 -8
- package/src/context/prompt-modal.tsx +8 -1
- package/src/hooks/useModal.ts +19 -4
- package/src/index.ts +4 -0
- package/build/modern/chunk-BDCFYW34.js.map +0 -1
- package/build/modern/chunk-JCGWTIR4.js.map +0 -1
- package/build/modern/chunk-LJYCFFX7.js +0 -33
- package/build/modern/chunk-OW62FLJ6.js.map +0 -1
- package/build/modern/chunk-UXHAFEBA.js.map +0 -1
- package/build/modern/chunk-YLPSE5Z2.js.map +0 -1
- /package/build/modern/{chunk-S7XGIQY6.js.map → chunk-243VUIA6.js.map} +0 -0
- /package/build/modern/{chunk-NBG2OSYI.js.map → chunk-FT7DFRHQ.js.map} +0 -0
- /package/build/modern/{chunk-CMUFJU4S.js.map → chunk-KLUBAM4U.js.map} +0 -0
- /package/build/modern/{chunk-AUAPBPGW.js.map → chunk-MDIUFBDX.js.map} +0 -0
- /package/build/modern/{chunk-O6JYYVO7.js.map → chunk-PA5EB7EO.js.map} +0 -0
- /package/build/modern/{chunk-EZNGCXVJ.js.map → chunk-RDQHHCFR.js.map} +0 -0
- /package/build/modern/{chunk-WZOYPFUU.js.map → chunk-UJKS4DDN.js.map} +0 -0
- /package/build/modern/{chunk-6YUB3ITX.js.map → chunk-X4Y4WTRU.js.map} +0 -0
- /package/build/modern/{chunk-GMG3B34U.js.map → chunk-YWCTMLLO.js.map} +0 -0
- /package/build/modern/{chunk-477G5ZEL.js.map → chunk-ZX6DBC2Z.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -22,6 +22,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var src_exports = {};
|
|
23
23
|
__export(src_exports, {
|
|
24
24
|
$cerberusIcons: () => $cerberusIcons,
|
|
25
|
+
Admonition: () => Admonition,
|
|
26
|
+
AdmonitionDescription: () => AdmonitionDescription,
|
|
27
|
+
AdmonitionHeading: () => AdmonitionHeading,
|
|
25
28
|
Avatar: () => Avatar,
|
|
26
29
|
Button: () => Button,
|
|
27
30
|
Checkbox: () => Checkbox,
|
|
@@ -32,11 +35,14 @@ __export(src_exports, {
|
|
|
32
35
|
FeatureFlags: () => FeatureFlags,
|
|
33
36
|
Field: () => Field,
|
|
34
37
|
FieldMessage: () => FieldMessage,
|
|
38
|
+
Fieldset: () => Fieldset,
|
|
39
|
+
FieldsetLabel: () => FieldsetLabel,
|
|
35
40
|
FileStatus: () => FileStatus,
|
|
36
41
|
FileUploader: () => FileUploader,
|
|
37
42
|
IconButton: () => IconButton,
|
|
38
43
|
Input: () => Input,
|
|
39
44
|
Label: () => Label,
|
|
45
|
+
Legend: () => Legend,
|
|
40
46
|
MODE_KEY: () => MODE_KEY,
|
|
41
47
|
Modal: () => Modal,
|
|
42
48
|
ModalDescription: () => ModalDescription,
|
|
@@ -94,10 +100,10 @@ __export(src_exports, {
|
|
|
94
100
|
});
|
|
95
101
|
module.exports = __toCommonJS(src_exports);
|
|
96
102
|
|
|
97
|
-
// src/components/
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
var
|
|
103
|
+
// src/components/Admonition.tsx
|
|
104
|
+
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
105
|
+
var import_css2 = require("@cerberus-design/styled-system/css");
|
|
106
|
+
var import_patterns2 = require("@cerberus/styled-system/patterns");
|
|
101
107
|
|
|
102
108
|
// src/config/cerbIcons.ts
|
|
103
109
|
var import_icons = require("@cerberus/icons");
|
|
@@ -139,6 +145,102 @@ function IndeterminateIcon(props) {
|
|
|
139
145
|
);
|
|
140
146
|
}
|
|
141
147
|
|
|
148
|
+
// src/components/AnimatingUploadIcon.tsx
|
|
149
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
150
|
+
function AnimatingUploadIcon(props) {
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
152
|
+
"svg",
|
|
153
|
+
{
|
|
154
|
+
"aria-hidden": "true",
|
|
155
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
156
|
+
width: props.size ?? "1em",
|
|
157
|
+
height: props.size ?? "1em",
|
|
158
|
+
viewBox: "0 0 24 24",
|
|
159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
160
|
+
"g",
|
|
161
|
+
{
|
|
162
|
+
fill: "none",
|
|
163
|
+
stroke: "currentColor",
|
|
164
|
+
strokeLinecap: "square",
|
|
165
|
+
strokeLinejoin: "round",
|
|
166
|
+
strokeWidth: 1.5,
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
169
|
+
"path",
|
|
170
|
+
{
|
|
171
|
+
"data-name": "animating-trail",
|
|
172
|
+
strokeDasharray: "2 4",
|
|
173
|
+
strokeDashoffset: 6,
|
|
174
|
+
d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
|
|
175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
176
|
+
"animate",
|
|
177
|
+
{
|
|
178
|
+
attributeName: "stroke-dashoffset",
|
|
179
|
+
dur: "0.45s",
|
|
180
|
+
repeatCount: "indefinite",
|
|
181
|
+
values: "6;0"
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
187
|
+
"path",
|
|
188
|
+
{
|
|
189
|
+
"data-name": "half-circle",
|
|
190
|
+
strokeDasharray: 32,
|
|
191
|
+
strokeDashoffset: 32,
|
|
192
|
+
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
|
|
193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
194
|
+
"animate",
|
|
195
|
+
{
|
|
196
|
+
fill: "freeze",
|
|
197
|
+
attributeName: "stroke-dashoffset",
|
|
198
|
+
begin: "0.075s",
|
|
199
|
+
dur: "0.3s",
|
|
200
|
+
values: "32;0"
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
206
|
+
"svg",
|
|
207
|
+
{
|
|
208
|
+
"aria-hidden": "true",
|
|
209
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
210
|
+
width: "0.8em",
|
|
211
|
+
height: "0.8em",
|
|
212
|
+
x: "27%",
|
|
213
|
+
y: "27%",
|
|
214
|
+
viewBox: "0 0 24 24",
|
|
215
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
216
|
+
"polygon",
|
|
217
|
+
{
|
|
218
|
+
fill: "currentColor",
|
|
219
|
+
stroke: "currentColor",
|
|
220
|
+
strokeWidth: 0.8,
|
|
221
|
+
opacity: "1",
|
|
222
|
+
points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
|
|
223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
224
|
+
"animate",
|
|
225
|
+
{
|
|
226
|
+
fill: "freeze",
|
|
227
|
+
attributeName: "opacity",
|
|
228
|
+
values: "1;0;1",
|
|
229
|
+
dur: "2s",
|
|
230
|
+
repeatCount: "indefinite"
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
142
244
|
// src/config/cerbIcons.ts
|
|
143
245
|
var defaultIcons = {
|
|
144
246
|
avatar: import_icons.UserFilled,
|
|
@@ -147,12 +249,13 @@ var defaultIcons = {
|
|
|
147
249
|
confirmModal: import_icons.Information,
|
|
148
250
|
delete: import_icons.TrashCan,
|
|
149
251
|
promptModal: import_icons.Information,
|
|
150
|
-
|
|
252
|
+
waitingFileUploader: import_icons.CloudUpload,
|
|
253
|
+
fileUploader: AnimatingUploadIcon,
|
|
151
254
|
indeterminate: IndeterminateIcon,
|
|
152
|
-
infoNotification: import_icons.
|
|
153
|
-
successNotification: import_icons.
|
|
154
|
-
warningNotification: import_icons.
|
|
155
|
-
dangerNotification: import_icons.
|
|
255
|
+
infoNotification: import_icons.Information,
|
|
256
|
+
successNotification: import_icons.CheckmarkOutline,
|
|
257
|
+
warningNotification: import_icons.WarningAlt,
|
|
258
|
+
dangerNotification: import_icons.WarningFilled,
|
|
156
259
|
invalid: import_icons.WarningFilled,
|
|
157
260
|
invalidAlt: import_icons.Warning,
|
|
158
261
|
redo: import_icons.Restart,
|
|
@@ -178,6 +281,11 @@ function defineIcons(icons) {
|
|
|
178
281
|
}
|
|
179
282
|
var $cerberusIcons = defaultIcons;
|
|
180
283
|
|
|
284
|
+
// src/components/Avatar.tsx
|
|
285
|
+
var import_css = require("@cerberus/styled-system/css");
|
|
286
|
+
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
287
|
+
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
288
|
+
|
|
181
289
|
// src/components/Show.tsx
|
|
182
290
|
var import_react = require("react");
|
|
183
291
|
function Show(props) {
|
|
@@ -190,7 +298,7 @@ function Show(props) {
|
|
|
190
298
|
}
|
|
191
299
|
|
|
192
300
|
// src/components/Avatar.tsx
|
|
193
|
-
var
|
|
301
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
194
302
|
function Avatar(props) {
|
|
195
303
|
const {
|
|
196
304
|
ariaLabel,
|
|
@@ -205,7 +313,7 @@ function Avatar(props) {
|
|
|
205
313
|
} = props;
|
|
206
314
|
const { avatar: AvatarIcon } = $cerberusIcons;
|
|
207
315
|
const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
|
|
208
|
-
return /* @__PURE__ */ (0,
|
|
316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
209
317
|
"div",
|
|
210
318
|
{
|
|
211
319
|
...nativeProps,
|
|
@@ -214,19 +322,19 @@ function Avatar(props) {
|
|
|
214
322
|
(0, import_recipes.avatar)({ gradient, size }),
|
|
215
323
|
(0, import_patterns.circle)()
|
|
216
324
|
),
|
|
217
|
-
children: /* @__PURE__ */ (0,
|
|
325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
218
326
|
Show,
|
|
219
327
|
{
|
|
220
328
|
when: Boolean(src) || Boolean(as),
|
|
221
|
-
fallback: /* @__PURE__ */ (0,
|
|
329
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
222
330
|
Show,
|
|
223
331
|
{
|
|
224
332
|
when: Boolean(initials),
|
|
225
|
-
fallback: /* @__PURE__ */ (0,
|
|
333
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
226
334
|
Show,
|
|
227
335
|
{
|
|
228
336
|
when: Boolean(icon),
|
|
229
|
-
fallback: /* @__PURE__ */ (0,
|
|
337
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
230
338
|
AvatarIcon,
|
|
231
339
|
{
|
|
232
340
|
size: iconSizeMap[size]
|
|
@@ -238,11 +346,11 @@ function Avatar(props) {
|
|
|
238
346
|
children: initials
|
|
239
347
|
}
|
|
240
348
|
),
|
|
241
|
-
children: /* @__PURE__ */ (0,
|
|
349
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
242
350
|
Show,
|
|
243
351
|
{
|
|
244
352
|
when: Boolean(as),
|
|
245
|
-
fallback: /* @__PURE__ */ (0,
|
|
353
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
246
354
|
"img",
|
|
247
355
|
{
|
|
248
356
|
alt: props.ariaLabel,
|
|
@@ -277,19 +385,136 @@ var iconSizeMap = {
|
|
|
277
385
|
"4xl": 32
|
|
278
386
|
};
|
|
279
387
|
|
|
388
|
+
// src/components/Admonition.tsx
|
|
389
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
390
|
+
function Admonition(props) {
|
|
391
|
+
const { children, palette = "page", usage, icon, ...nativeProps } = props;
|
|
392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
393
|
+
"aside",
|
|
394
|
+
{
|
|
395
|
+
...nativeProps,
|
|
396
|
+
className: (0, import_css2.cx)(
|
|
397
|
+
nativeProps.className,
|
|
398
|
+
(0, import_patterns2.hstack)({
|
|
399
|
+
gap: "md",
|
|
400
|
+
w: "full"
|
|
401
|
+
}),
|
|
402
|
+
(0, import_recipes2.admonition)({ palette, usage }).root
|
|
403
|
+
),
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MatchAvatar, { palette }), children: icon }),
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { children })
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
function AdmonitionHeading(props) {
|
|
412
|
+
const { palette, usage, ...nativeProps } = props;
|
|
413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
414
|
+
"p",
|
|
415
|
+
{
|
|
416
|
+
...nativeProps,
|
|
417
|
+
className: (0, import_css2.cx)(
|
|
418
|
+
nativeProps.className,
|
|
419
|
+
(0, import_recipes2.admonition)({ palette, usage }).heading
|
|
420
|
+
)
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
function AdmonitionDescription(props) {
|
|
425
|
+
const { palette, usage, ...nativeProps } = props;
|
|
426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
427
|
+
"p",
|
|
428
|
+
{
|
|
429
|
+
...nativeProps,
|
|
430
|
+
className: (0, import_css2.cx)(
|
|
431
|
+
nativeProps.className,
|
|
432
|
+
(0, import_recipes2.admonition)({ palette, usage }).description
|
|
433
|
+
)
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
function MatchAvatar(props) {
|
|
438
|
+
const {
|
|
439
|
+
infoNotification: InfoIcon,
|
|
440
|
+
successNotification: SuccessIcon,
|
|
441
|
+
warningNotification: WarningIcon,
|
|
442
|
+
dangerNotification: DangerIcon
|
|
443
|
+
} = $cerberusIcons;
|
|
444
|
+
switch (props.palette) {
|
|
445
|
+
case "page":
|
|
446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
447
|
+
Avatar,
|
|
448
|
+
{
|
|
449
|
+
gradient: "charon-light",
|
|
450
|
+
ariaLabel: "",
|
|
451
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InfoIcon, {}),
|
|
452
|
+
size: "sm",
|
|
453
|
+
src: ""
|
|
454
|
+
}
|
|
455
|
+
);
|
|
456
|
+
case "info":
|
|
457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
458
|
+
Avatar,
|
|
459
|
+
{
|
|
460
|
+
gradient: "amphiaraus-dark",
|
|
461
|
+
ariaLabel: "",
|
|
462
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InfoIcon, {}),
|
|
463
|
+
size: "sm",
|
|
464
|
+
src: ""
|
|
465
|
+
}
|
|
466
|
+
);
|
|
467
|
+
case "success":
|
|
468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
469
|
+
Avatar,
|
|
470
|
+
{
|
|
471
|
+
gradient: "thanatos-dark",
|
|
472
|
+
ariaLabel: "",
|
|
473
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SuccessIcon, {}),
|
|
474
|
+
size: "sm",
|
|
475
|
+
src: ""
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
case "warning":
|
|
479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
480
|
+
Avatar,
|
|
481
|
+
{
|
|
482
|
+
gradient: "asphodel-light",
|
|
483
|
+
ariaLabel: "",
|
|
484
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WarningIcon, {}),
|
|
485
|
+
size: "sm",
|
|
486
|
+
src: ""
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
case "danger":
|
|
490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
491
|
+
Avatar,
|
|
492
|
+
{
|
|
493
|
+
gradient: "hades-light",
|
|
494
|
+
ariaLabel: "",
|
|
495
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DangerIcon, {}),
|
|
496
|
+
size: "sm",
|
|
497
|
+
src: ""
|
|
498
|
+
}
|
|
499
|
+
);
|
|
500
|
+
default:
|
|
501
|
+
throw new Error("Unsupported admonition palette");
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
280
505
|
// src/components/Button.tsx
|
|
281
|
-
var
|
|
282
|
-
var
|
|
283
|
-
var
|
|
506
|
+
var import_css3 = require("@cerberus/styled-system/css");
|
|
507
|
+
var import_recipes3 = require("@cerberus/styled-system/recipes");
|
|
508
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
284
509
|
function Button(props) {
|
|
285
510
|
const { palette, usage, shape, ...nativeProps } = props;
|
|
286
|
-
return /* @__PURE__ */ (0,
|
|
511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
287
512
|
"button",
|
|
288
513
|
{
|
|
289
514
|
...nativeProps,
|
|
290
|
-
className: (0,
|
|
515
|
+
className: (0, import_css3.cx)(
|
|
291
516
|
nativeProps.className,
|
|
292
|
-
(0,
|
|
517
|
+
(0, import_recipes3.button)({
|
|
293
518
|
palette,
|
|
294
519
|
usage,
|
|
295
520
|
shape
|
|
@@ -300,13 +525,13 @@ function Button(props) {
|
|
|
300
525
|
}
|
|
301
526
|
|
|
302
527
|
// src/components/Checkbox.tsx
|
|
303
|
-
var
|
|
304
|
-
var
|
|
305
|
-
var
|
|
528
|
+
var import_recipes4 = require("@cerberus/styled-system/recipes");
|
|
529
|
+
var import_patterns3 = require("@cerberus/styled-system/patterns");
|
|
530
|
+
var import_css4 = require("@cerberus/styled-system/css");
|
|
306
531
|
|
|
307
532
|
// src/context/field.tsx
|
|
308
533
|
var import_react2 = require("react");
|
|
309
|
-
var
|
|
534
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
310
535
|
var FieldContext = (0, import_react2.createContext)(null);
|
|
311
536
|
function Field(props) {
|
|
312
537
|
const value = (0, import_react2.useMemo)(
|
|
@@ -318,7 +543,7 @@ function Field(props) {
|
|
|
318
543
|
}),
|
|
319
544
|
[props.disabled, props.readOnly, props.required, props.invalid]
|
|
320
545
|
);
|
|
321
|
-
return /* @__PURE__ */ (0,
|
|
546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldContext.Provider, { value, children: props.children });
|
|
322
547
|
}
|
|
323
548
|
function useFieldContext() {
|
|
324
549
|
const context = (0, import_react2.useContext)(FieldContext);
|
|
@@ -329,24 +554,24 @@ function useFieldContext() {
|
|
|
329
554
|
}
|
|
330
555
|
|
|
331
556
|
// src/components/Checkbox.tsx
|
|
332
|
-
var
|
|
557
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
333
558
|
function Checkbox(props) {
|
|
334
559
|
const { describedBy, size, checked, mixed, ...nativeProps } = props;
|
|
335
560
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
336
|
-
const styles = (0,
|
|
561
|
+
const styles = (0, import_recipes4.checkbox)({ size });
|
|
337
562
|
const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = $cerberusIcons;
|
|
338
|
-
return /* @__PURE__ */ (0,
|
|
563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
339
564
|
"div",
|
|
340
565
|
{
|
|
341
|
-
className: (0,
|
|
566
|
+
className: (0, import_css4.cx)(
|
|
342
567
|
styles.root,
|
|
343
|
-
(0,
|
|
568
|
+
(0, import_patterns3.vstack)({
|
|
344
569
|
gap: "0",
|
|
345
570
|
justify: "center"
|
|
346
571
|
})
|
|
347
572
|
),
|
|
348
573
|
children: [
|
|
349
|
-
/* @__PURE__ */ (0,
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
350
575
|
"input",
|
|
351
576
|
{
|
|
352
577
|
...nativeProps,
|
|
@@ -354,27 +579,28 @@ function Checkbox(props) {
|
|
|
354
579
|
...describedBy && { "aria-describedby": describedBy },
|
|
355
580
|
...invalid && { "aria-invalid": true },
|
|
356
581
|
...mixed && { "aria-checked": "mixed" },
|
|
357
|
-
className: (0,
|
|
582
|
+
className: (0, import_css4.cx)("peer", nativeProps.className, styles.input),
|
|
358
583
|
type: "checkbox"
|
|
359
584
|
}
|
|
360
585
|
),
|
|
361
|
-
/* @__PURE__ */ (0,
|
|
362
|
-
/* @__PURE__ */ (0,
|
|
586
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Show, { when: checked && !mixed, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckIcon, {}) }) }),
|
|
587
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Show, { when: mixed, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IndeterminateIcon2, {}) }) })
|
|
363
588
|
]
|
|
364
589
|
}
|
|
365
590
|
);
|
|
366
591
|
}
|
|
367
592
|
|
|
368
593
|
// src/components/CircularProgress.tsx
|
|
369
|
-
var
|
|
370
|
-
var
|
|
371
|
-
var
|
|
594
|
+
var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
595
|
+
var import_css5 = require("@cerberus/styled-system/css");
|
|
596
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
372
597
|
function CircularProgress(props) {
|
|
373
598
|
const strokeW = 14;
|
|
374
599
|
const radius = `calc(50% * (1 - ${strokeW}/100))`;
|
|
375
600
|
const status = props.syntax ?? "Done";
|
|
376
601
|
const now = props.now >= 100 ? 100 : props.now;
|
|
377
|
-
|
|
602
|
+
const bgStyle = props.bgStyle ?? "filled";
|
|
603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
378
604
|
"div",
|
|
379
605
|
{
|
|
380
606
|
id: props.id,
|
|
@@ -382,18 +608,18 @@ function CircularProgress(props) {
|
|
|
382
608
|
"aria-valuemin": 0,
|
|
383
609
|
"aria-valuemax": 100,
|
|
384
610
|
"aria-valuenow": now,
|
|
385
|
-
className: (0,
|
|
611
|
+
className: (0, import_patterns4.cq)({
|
|
386
612
|
alignSelf: "stretch",
|
|
387
613
|
flex: 1,
|
|
388
614
|
m: "4px",
|
|
389
615
|
position: "relative"
|
|
390
616
|
}),
|
|
391
617
|
role: "progressbar",
|
|
392
|
-
children: /* @__PURE__ */ (0,
|
|
618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
393
619
|
"svg",
|
|
394
620
|
{
|
|
395
621
|
"data-complete": now === 100,
|
|
396
|
-
className: (0,
|
|
622
|
+
className: (0, import_css5.css)({
|
|
397
623
|
display: "block",
|
|
398
624
|
rounded: "full",
|
|
399
625
|
transition: "all 0.5s ease"
|
|
@@ -404,28 +630,28 @@ function CircularProgress(props) {
|
|
|
404
630
|
viewBox: "0 0 100 100",
|
|
405
631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
406
632
|
children: [
|
|
407
|
-
/* @__PURE__ */ (0,
|
|
408
|
-
/* @__PURE__ */ (0,
|
|
409
|
-
/* @__PURE__ */ (0,
|
|
410
|
-
/* @__PURE__ */ (0,
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("title", { children: props.title }),
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("desc", { children: `${now}% ${status}` }),
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("linearGradient", { id: "gradient", children: [
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
411
637
|
"stop",
|
|
412
638
|
{
|
|
413
639
|
offset: "0%",
|
|
414
|
-
stopColor: "var(--cerberus-colors-
|
|
640
|
+
stopColor: "var(--cerberus-colors-data-viz-progress-start)"
|
|
415
641
|
}
|
|
416
642
|
),
|
|
417
|
-
/* @__PURE__ */ (0,
|
|
643
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
418
644
|
"stop",
|
|
419
645
|
{
|
|
420
646
|
offset: "100%",
|
|
421
|
-
stopColor: "var(--cerberus-colors-
|
|
647
|
+
stopColor: "var(--cerberus-colors-data-viz-progress-end)"
|
|
422
648
|
}
|
|
423
649
|
)
|
|
424
650
|
] }) }),
|
|
425
|
-
/* @__PURE__ */ (0,
|
|
651
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Show, { when: bgStyle === "filled", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
426
652
|
"circle",
|
|
427
653
|
{
|
|
428
|
-
className: (0,
|
|
654
|
+
className: (0, import_css5.css)({
|
|
429
655
|
fill: "page.surface.initial"
|
|
430
656
|
}),
|
|
431
657
|
cx: "50%",
|
|
@@ -433,11 +659,11 @@ function CircularProgress(props) {
|
|
|
433
659
|
r: `calc(50% * (1 - ${strokeW}/100))`,
|
|
434
660
|
pathLength: "100"
|
|
435
661
|
}
|
|
436
|
-
),
|
|
437
|
-
/* @__PURE__ */ (0,
|
|
662
|
+
) }),
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
438
664
|
"circle",
|
|
439
665
|
{
|
|
440
|
-
className: (0,
|
|
666
|
+
className: (0, import_css5.css)({
|
|
441
667
|
stroke: "page.bg.100"
|
|
442
668
|
}),
|
|
443
669
|
cx: "50%",
|
|
@@ -446,14 +672,14 @@ function CircularProgress(props) {
|
|
|
446
672
|
pathLength: "100"
|
|
447
673
|
}
|
|
448
674
|
),
|
|
449
|
-
/* @__PURE__ */ (0,
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
450
676
|
"circle",
|
|
451
677
|
{
|
|
452
678
|
"data-complete": now === 100,
|
|
453
|
-
className: (0,
|
|
679
|
+
className: (0, import_css5.css)({
|
|
454
680
|
stroke: "url(#gradient)",
|
|
455
681
|
transition: "stroke-dashoffset, stroke 0.5s ease",
|
|
456
|
-
|
|
682
|
+
_isComplete: {
|
|
457
683
|
stroke: "success.bg.initial"
|
|
458
684
|
}
|
|
459
685
|
}),
|
|
@@ -467,11 +693,11 @@ function CircularProgress(props) {
|
|
|
467
693
|
transform: "rotate(-90 50 50)"
|
|
468
694
|
}
|
|
469
695
|
),
|
|
470
|
-
/* @__PURE__ */ (0,
|
|
471
|
-
/* @__PURE__ */ (0,
|
|
696
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("g", { children: [
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
472
698
|
"text",
|
|
473
699
|
{
|
|
474
|
-
className: (0,
|
|
700
|
+
className: (0, import_css5.css)({
|
|
475
701
|
fill: "page.text.initial",
|
|
476
702
|
fontFamily: "mono",
|
|
477
703
|
textStyle: "1.25rem"
|
|
@@ -486,10 +712,10 @@ function CircularProgress(props) {
|
|
|
486
712
|
]
|
|
487
713
|
}
|
|
488
714
|
),
|
|
489
|
-
/* @__PURE__ */ (0,
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
490
716
|
"text",
|
|
491
717
|
{
|
|
492
|
-
className: (0,
|
|
718
|
+
className: (0, import_css5.css)({
|
|
493
719
|
fill: "page.text.100",
|
|
494
720
|
fontSize: "0.5rem",
|
|
495
721
|
fontWeight: 600
|
|
@@ -512,7 +738,7 @@ function CircularProgress(props) {
|
|
|
512
738
|
// src/components/Droppable.tsx
|
|
513
739
|
var import_core = require("@dnd-kit/core");
|
|
514
740
|
var import_react3 = require("react");
|
|
515
|
-
var
|
|
741
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
516
742
|
function Droppable(props) {
|
|
517
743
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
518
744
|
const uuid = (0, import_react3.useId)();
|
|
@@ -522,7 +748,7 @@ function Droppable(props) {
|
|
|
522
748
|
id: id || uuid,
|
|
523
749
|
resizeObserverConfig
|
|
524
750
|
});
|
|
525
|
-
return /* @__PURE__ */ (0,
|
|
751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
526
752
|
"div",
|
|
527
753
|
{
|
|
528
754
|
...nativeProps,
|
|
@@ -535,27 +761,27 @@ function Droppable(props) {
|
|
|
535
761
|
}
|
|
536
762
|
|
|
537
763
|
// src/components/FieldMessage.tsx
|
|
538
|
-
var
|
|
539
|
-
var
|
|
540
|
-
var
|
|
764
|
+
var import_css6 = require("@cerberus/styled-system/css");
|
|
765
|
+
var import_recipes5 = require("@cerberus/styled-system/recipes");
|
|
766
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
541
767
|
function FieldMessage(props) {
|
|
542
768
|
const { invalid } = useFieldContext();
|
|
543
|
-
return /* @__PURE__ */ (0,
|
|
769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
544
770
|
"small",
|
|
545
771
|
{
|
|
546
772
|
...props,
|
|
547
773
|
...invalid && { "aria-invalid": true },
|
|
548
|
-
className: (0,
|
|
774
|
+
className: (0, import_css6.cx)(props.className, (0, import_recipes5.fieldMessage)())
|
|
549
775
|
}
|
|
550
776
|
);
|
|
551
777
|
}
|
|
552
778
|
|
|
553
779
|
// src/context/feature-flags.tsx
|
|
554
780
|
var import_react4 = require("react");
|
|
555
|
-
var
|
|
781
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
556
782
|
var FeatureFlagContext = (0, import_react4.createContext)(null);
|
|
557
783
|
function FeatureFlags(props) {
|
|
558
|
-
return /* @__PURE__ */ (0,
|
|
784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
559
785
|
}
|
|
560
786
|
function useFeatureFlags(key) {
|
|
561
787
|
const context = (0, import_react4.useContext)(FeatureFlagContext);
|
|
@@ -568,40 +794,84 @@ function useFeatureFlags(key) {
|
|
|
568
794
|
}
|
|
569
795
|
|
|
570
796
|
// src/components/FeatureFlag.tsx
|
|
571
|
-
var
|
|
797
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
572
798
|
function FeatureFlag(props) {
|
|
573
799
|
const showContent = useFeatureFlags(props.flag);
|
|
574
|
-
return /* @__PURE__ */ (0,
|
|
800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Show, { when: showContent, children: props.children });
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
// src/components/Fieldset.tsx
|
|
804
|
+
var import_css7 = require("@cerberus/styled-system/css");
|
|
805
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
806
|
+
function Fieldset(props) {
|
|
807
|
+
const { invalid, ...formState } = useFieldContext();
|
|
808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
809
|
+
"fieldset",
|
|
810
|
+
{
|
|
811
|
+
...props,
|
|
812
|
+
...formState,
|
|
813
|
+
...invalid && { "aria-invalid": true },
|
|
814
|
+
className: (0, import_css7.cx)(
|
|
815
|
+
props.className,
|
|
816
|
+
(0, import_css7.css)({
|
|
817
|
+
border: "none",
|
|
818
|
+
pt: 2,
|
|
819
|
+
margin: 0
|
|
820
|
+
})
|
|
821
|
+
)
|
|
822
|
+
}
|
|
823
|
+
);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// src/components/FieldsetLabel.tsx
|
|
827
|
+
var import_css8 = require("@cerberus/styled-system/css");
|
|
828
|
+
var import_recipes6 = require("@cerberus/styled-system/recipes");
|
|
829
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
830
|
+
function FieldsetLabel(props) {
|
|
831
|
+
const { size, usage, ...nativeProps } = props;
|
|
832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
833
|
+
"label",
|
|
834
|
+
{
|
|
835
|
+
...nativeProps,
|
|
836
|
+
className: (0, import_css8.cx)(
|
|
837
|
+
nativeProps.className,
|
|
838
|
+
(0, import_recipes6.label)({
|
|
839
|
+
size,
|
|
840
|
+
usage
|
|
841
|
+
})
|
|
842
|
+
)
|
|
843
|
+
}
|
|
844
|
+
);
|
|
575
845
|
}
|
|
576
846
|
|
|
577
847
|
// src/components/FileStatus.tsx
|
|
578
848
|
var import_react5 = require("react");
|
|
579
|
-
var
|
|
580
|
-
var
|
|
581
|
-
var
|
|
849
|
+
var import_recipes9 = require("@cerberus/styled-system/recipes");
|
|
850
|
+
var import_css11 = require("@cerberus/styled-system/css");
|
|
851
|
+
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
582
852
|
|
|
583
853
|
// src/components/ProgressBar.tsx
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
var
|
|
854
|
+
var import_css9 = require("@cerberus/styled-system/css");
|
|
855
|
+
var import_recipes7 = require("@cerberus/styled-system/recipes");
|
|
856
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
587
857
|
function ProgressBar(props) {
|
|
588
|
-
const { indeterminate, size, usage, now, label:
|
|
589
|
-
const styles = (0,
|
|
858
|
+
const { indeterminate, size, usage, now, label: label4, ...nativeProps } = props;
|
|
859
|
+
const styles = (0, import_recipes7.progressBar)({ size, usage });
|
|
590
860
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
591
861
|
const width = {
|
|
592
862
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
593
863
|
};
|
|
594
|
-
return /* @__PURE__ */ (0,
|
|
864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
595
865
|
"div",
|
|
596
866
|
{
|
|
597
867
|
...nativeProps,
|
|
598
|
-
"aria-label":
|
|
868
|
+
"aria-label": label4,
|
|
599
869
|
"aria-valuemin": 0,
|
|
600
870
|
"aria-valuemax": 100,
|
|
601
871
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
602
|
-
className: (0,
|
|
872
|
+
className: (0, import_css9.cx)(nativeProps.className, styles.root),
|
|
603
873
|
role: "progressbar",
|
|
604
|
-
children: /* @__PURE__ */ (0,
|
|
874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
605
875
|
"div",
|
|
606
876
|
{
|
|
607
877
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -615,19 +885,19 @@ function ProgressBar(props) {
|
|
|
615
885
|
}
|
|
616
886
|
|
|
617
887
|
// src/components/IconButton.tsx
|
|
618
|
-
var
|
|
619
|
-
var
|
|
620
|
-
var
|
|
888
|
+
var import_css10 = require("@cerberus/styled-system/css");
|
|
889
|
+
var import_recipes8 = require("@cerberus/styled-system/recipes");
|
|
890
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
621
891
|
function IconButton(props) {
|
|
622
892
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
623
|
-
return /* @__PURE__ */ (0,
|
|
893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
624
894
|
"button",
|
|
625
895
|
{
|
|
626
896
|
...nativeProps,
|
|
627
897
|
"aria-label": ariaLabel ?? "Icon Button",
|
|
628
|
-
className: (0,
|
|
898
|
+
className: (0, import_css10.cx)(
|
|
629
899
|
nativeProps.className,
|
|
630
|
-
(0,
|
|
900
|
+
(0, import_recipes8.iconButton)({
|
|
631
901
|
palette,
|
|
632
902
|
usage,
|
|
633
903
|
size
|
|
@@ -638,7 +908,7 @@ function IconButton(props) {
|
|
|
638
908
|
}
|
|
639
909
|
|
|
640
910
|
// src/components/FileStatus.tsx
|
|
641
|
-
var
|
|
911
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
642
912
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
643
913
|
processStatus2["TODO"] = "todo";
|
|
644
914
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -654,15 +924,15 @@ function FileStatus(props) {
|
|
|
654
924
|
const styles = (0, import_react5.useMemo)(() => {
|
|
655
925
|
switch (status) {
|
|
656
926
|
case "todo" /* TODO */:
|
|
657
|
-
return (0,
|
|
927
|
+
return (0, import_recipes9.fileStatus)({ status: "todo" });
|
|
658
928
|
case "processing" /* PROCESSING */:
|
|
659
|
-
return (0,
|
|
929
|
+
return (0, import_recipes9.fileStatus)({ status: "processing" });
|
|
660
930
|
case "done" /* DONE */:
|
|
661
|
-
return (0,
|
|
931
|
+
return (0, import_recipes9.fileStatus)({ status: "done" });
|
|
662
932
|
case "error" /* ERROR */:
|
|
663
|
-
return (0,
|
|
933
|
+
return (0, import_recipes9.fileStatus)({ status: "error" });
|
|
664
934
|
default:
|
|
665
|
-
return (0,
|
|
935
|
+
return (0, import_recipes9.fileStatus)();
|
|
666
936
|
}
|
|
667
937
|
}, [status]);
|
|
668
938
|
const handleClick = (0, import_react5.useCallback)(
|
|
@@ -674,41 +944,41 @@ function FileStatus(props) {
|
|
|
674
944
|
},
|
|
675
945
|
[onClick]
|
|
676
946
|
);
|
|
677
|
-
return /* @__PURE__ */ (0,
|
|
947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
678
948
|
"div",
|
|
679
949
|
{
|
|
680
950
|
...nativeProps,
|
|
681
|
-
className: (0,
|
|
951
|
+
className: (0, import_css11.cx)(nativeProps.className, styles.root, (0, import_patterns5.hstack)()),
|
|
682
952
|
children: [
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
684
954
|
Avatar,
|
|
685
955
|
{
|
|
686
956
|
ariaLabel: "",
|
|
687
957
|
gradient: modalIconPalette,
|
|
688
|
-
icon: /* @__PURE__ */ (0,
|
|
958
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
689
959
|
src: ""
|
|
690
960
|
}
|
|
691
961
|
),
|
|
692
|
-
/* @__PURE__ */ (0,
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
693
963
|
"div",
|
|
694
964
|
{
|
|
695
|
-
className: (0,
|
|
965
|
+
className: (0, import_patterns5.vstack)({
|
|
696
966
|
alignItems: "flex-start",
|
|
697
967
|
gap: "0.12rem",
|
|
698
968
|
w: "full"
|
|
699
969
|
}),
|
|
700
970
|
children: [
|
|
701
|
-
/* @__PURE__ */ (0,
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
702
972
|
"small",
|
|
703
973
|
{
|
|
704
|
-
className: (0,
|
|
974
|
+
className: (0, import_css11.css)({
|
|
705
975
|
color: "page.text.initial",
|
|
706
976
|
textStyle: "label-sm"
|
|
707
977
|
}),
|
|
708
978
|
children: file
|
|
709
979
|
}
|
|
710
980
|
),
|
|
711
|
-
/* @__PURE__ */ (0,
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
712
982
|
ProgressBar,
|
|
713
983
|
{
|
|
714
984
|
id: props.id,
|
|
@@ -717,27 +987,27 @@ function FileStatus(props) {
|
|
|
717
987
|
size: "sm"
|
|
718
988
|
}
|
|
719
989
|
),
|
|
720
|
-
/* @__PURE__ */ (0,
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
721
991
|
FieldMessage,
|
|
722
992
|
{
|
|
723
|
-
className: (0,
|
|
993
|
+
className: (0, import_css11.css)({
|
|
724
994
|
color: "page.text.100"
|
|
725
995
|
}),
|
|
726
996
|
id: `help:${file}`,
|
|
727
|
-
children: /* @__PURE__ */ (0,
|
|
997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MatchFileStatusText, { status, now })
|
|
728
998
|
}
|
|
729
999
|
) })
|
|
730
1000
|
]
|
|
731
1001
|
}
|
|
732
1002
|
),
|
|
733
|
-
/* @__PURE__ */ (0,
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
734
1004
|
IconButton,
|
|
735
1005
|
{
|
|
736
1006
|
ariaLabel: actionLabel,
|
|
737
1007
|
onClick: handleClick,
|
|
738
1008
|
palette,
|
|
739
1009
|
size: "sm",
|
|
740
|
-
children: /* @__PURE__ */ (0,
|
|
1010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MatchStatusAction, { status })
|
|
741
1011
|
}
|
|
742
1012
|
)
|
|
743
1013
|
]
|
|
@@ -746,18 +1016,20 @@ function FileStatus(props) {
|
|
|
746
1016
|
}
|
|
747
1017
|
function MatchFileStatusIcon(props) {
|
|
748
1018
|
const {
|
|
1019
|
+
waitingFileUploader: TodoIcon,
|
|
749
1020
|
fileUploader: FileUploaderIcon,
|
|
750
1021
|
invalidAlt: InvalidIcon,
|
|
751
1022
|
successNotification: DoneIcon
|
|
752
1023
|
} = $cerberusIcons;
|
|
753
1024
|
switch (props.status) {
|
|
754
1025
|
case "todo" /* TODO */:
|
|
1026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TodoIcon, { size: props.size });
|
|
755
1027
|
case "processing" /* PROCESSING */:
|
|
756
|
-
return /* @__PURE__ */ (0,
|
|
1028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FileUploaderIcon, { size: props.size });
|
|
757
1029
|
case "done" /* DONE */:
|
|
758
|
-
return /* @__PURE__ */ (0,
|
|
1030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DoneIcon, { size: props.size });
|
|
759
1031
|
case "error" /* ERROR */:
|
|
760
|
-
return /* @__PURE__ */ (0,
|
|
1032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(InvalidIcon, { size: props.size });
|
|
761
1033
|
default:
|
|
762
1034
|
throw new Error("Unknown status");
|
|
763
1035
|
}
|
|
@@ -781,11 +1053,11 @@ function MatchStatusAction(props) {
|
|
|
781
1053
|
switch (props.status) {
|
|
782
1054
|
case "todo" /* TODO */:
|
|
783
1055
|
case "processing" /* PROCESSING */:
|
|
784
|
-
return /* @__PURE__ */ (0,
|
|
1056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CloseIcon, {});
|
|
785
1057
|
case "error" /* ERROR */:
|
|
786
|
-
return /* @__PURE__ */ (0,
|
|
1058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RedoIcon, {});
|
|
787
1059
|
case "done" /* DONE */:
|
|
788
|
-
return /* @__PURE__ */ (0,
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TrashIcon, {});
|
|
789
1061
|
default:
|
|
790
1062
|
throw new Error("Invalid status");
|
|
791
1063
|
}
|
|
@@ -831,55 +1103,56 @@ function getModalIconPalette(status) {
|
|
|
831
1103
|
}
|
|
832
1104
|
|
|
833
1105
|
// src/components/FileUploader.tsx
|
|
834
|
-
var
|
|
835
|
-
var
|
|
836
|
-
var
|
|
837
|
-
var
|
|
1106
|
+
var import_css12 = require("@cerberus/styled-system/css");
|
|
1107
|
+
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
1108
|
+
var import_recipes10 = require("@cerberus/styled-system/recipes");
|
|
1109
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
838
1110
|
function FileUploader(props) {
|
|
839
1111
|
var _a;
|
|
840
|
-
const styles = (0,
|
|
841
|
-
const Icon = $cerberusIcons
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
1112
|
+
const styles = (0, import_recipes10.fileUploader)();
|
|
1113
|
+
const { waitingFileUploader: Icon } = $cerberusIcons;
|
|
1114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
843
1115
|
"div",
|
|
844
1116
|
{
|
|
845
|
-
|
|
846
|
-
|
|
1117
|
+
...props.disabled ? { "aria-disabled": true } : {},
|
|
1118
|
+
className: (0, import_css12.cx)(
|
|
1119
|
+
(0, import_patterns6.vstack)({
|
|
847
1120
|
justify: "center"
|
|
848
1121
|
}),
|
|
849
1122
|
styles.container
|
|
850
1123
|
),
|
|
851
1124
|
children: [
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
1125
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
853
1126
|
Avatar,
|
|
854
1127
|
{
|
|
855
1128
|
gradient: "charon-light",
|
|
856
1129
|
ariaLabel: "",
|
|
857
|
-
icon: /* @__PURE__ */ (0,
|
|
1130
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, {}),
|
|
858
1131
|
size: "md",
|
|
859
1132
|
src: ""
|
|
860
1133
|
}
|
|
861
1134
|
) }),
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
863
1136
|
"label",
|
|
864
1137
|
{
|
|
865
|
-
className: (0,
|
|
866
|
-
(0,
|
|
1138
|
+
className: (0, import_css12.cx)(
|
|
1139
|
+
(0, import_patterns6.vstack)({
|
|
867
1140
|
justify: "center"
|
|
868
1141
|
}),
|
|
869
1142
|
styles.label
|
|
870
1143
|
),
|
|
871
1144
|
htmlFor: props.name,
|
|
872
1145
|
children: [
|
|
873
|
-
/* @__PURE__ */ (0,
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
874
1147
|
"Import ",
|
|
875
1148
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
876
1149
|
" files",
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
879
1152
|
"input",
|
|
880
1153
|
{
|
|
881
1154
|
...props,
|
|
882
|
-
className: (0,
|
|
1155
|
+
className: (0, import_css12.cx)(props.className, styles.input),
|
|
883
1156
|
type: "file"
|
|
884
1157
|
}
|
|
885
1158
|
)
|
|
@@ -892,18 +1165,18 @@ function FileUploader(props) {
|
|
|
892
1165
|
}
|
|
893
1166
|
|
|
894
1167
|
// src/components/Input.tsx
|
|
895
|
-
var
|
|
896
|
-
var
|
|
897
|
-
var
|
|
1168
|
+
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
1169
|
+
var import_css13 = require("@cerberus/styled-system/css");
|
|
1170
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
898
1171
|
function Input(props) {
|
|
899
1172
|
const { describedBy, size, startIcon, endIcon, ...nativeProps } = props;
|
|
900
|
-
const inputStyles = (0,
|
|
1173
|
+
const inputStyles = (0, import_recipes11.input)({ size });
|
|
901
1174
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
902
1175
|
const hasEndIcon = Boolean(endIcon);
|
|
903
1176
|
const { invalid: InvalidIcon } = $cerberusIcons;
|
|
904
|
-
return /* @__PURE__ */ (0,
|
|
905
|
-
/* @__PURE__ */ (0,
|
|
906
|
-
/* @__PURE__ */ (0,
|
|
1177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: inputStyles.root, children: [
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
907
1180
|
"input",
|
|
908
1181
|
{
|
|
909
1182
|
...nativeProps,
|
|
@@ -911,43 +1184,84 @@ function Input(props) {
|
|
|
911
1184
|
...describedBy && { "aria-describedby": describedBy },
|
|
912
1185
|
...invalid && { "aria-invalid": true },
|
|
913
1186
|
"data-start-icon": Boolean(startIcon),
|
|
914
|
-
className: (0,
|
|
1187
|
+
className: (0, import_css13.cx)("peer", nativeProps.className, inputStyles.input)
|
|
915
1188
|
}
|
|
916
1189
|
),
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
918
|
-
/* @__PURE__ */ (0,
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
919
1192
|
] });
|
|
920
1193
|
}
|
|
921
1194
|
|
|
922
1195
|
// src/components/Label.tsx
|
|
923
|
-
var
|
|
924
|
-
var
|
|
925
|
-
var
|
|
926
|
-
var
|
|
1196
|
+
var import_recipes12 = require("@cerberus/styled-system/recipes");
|
|
1197
|
+
var import_css14 = require("@cerberus/styled-system/css");
|
|
1198
|
+
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
1199
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
927
1200
|
function Label(props) {
|
|
928
1201
|
const { hidden, size, ...nativeProps } = props;
|
|
929
1202
|
const { required, disabled } = useFieldContext();
|
|
930
1203
|
const usage = hidden ? "hidden" : "visible";
|
|
931
|
-
return /* @__PURE__ */ (0,
|
|
1204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
932
1205
|
"label",
|
|
933
1206
|
{
|
|
934
1207
|
...nativeProps,
|
|
935
1208
|
...disabled && { "data-disabled": true },
|
|
936
|
-
className: (0,
|
|
1209
|
+
className: (0, import_css14.cx)(
|
|
937
1210
|
nativeProps.className,
|
|
938
|
-
(0,
|
|
939
|
-
(0,
|
|
1211
|
+
(0, import_recipes12.label)({ size, usage }),
|
|
1212
|
+
(0, import_patterns7.hstack)({
|
|
940
1213
|
justify: "space-between",
|
|
941
1214
|
w: "full"
|
|
942
1215
|
})
|
|
943
1216
|
),
|
|
944
1217
|
children: [
|
|
945
1218
|
props.children,
|
|
946
|
-
/* @__PURE__ */ (0,
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
947
1220
|
"span",
|
|
948
1221
|
{
|
|
949
|
-
className: (0,
|
|
950
|
-
color: "
|
|
1222
|
+
className: (0, import_css14.css)({
|
|
1223
|
+
color: "page.text.100",
|
|
1224
|
+
fontSize: "inherit"
|
|
1225
|
+
}),
|
|
1226
|
+
children: "(required)"
|
|
1227
|
+
}
|
|
1228
|
+
) })
|
|
1229
|
+
]
|
|
1230
|
+
}
|
|
1231
|
+
);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
// src/components/Legend.tsx
|
|
1235
|
+
var import_css15 = require("@cerberus/styled-system/css");
|
|
1236
|
+
var import_recipes13 = require("@cerberus-design/styled-system/recipes");
|
|
1237
|
+
var import_patterns8 = require("@cerberus-design/styled-system/patterns");
|
|
1238
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1239
|
+
function Legend(props) {
|
|
1240
|
+
const { size, ...nativeProps } = props;
|
|
1241
|
+
const { invalid, ...formState } = useFieldContext();
|
|
1242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1243
|
+
"legend",
|
|
1244
|
+
{
|
|
1245
|
+
...nativeProps,
|
|
1246
|
+
...formState,
|
|
1247
|
+
...invalid && { "aria-invalid": true },
|
|
1248
|
+
className: (0, import_css15.cx)(
|
|
1249
|
+
nativeProps.className,
|
|
1250
|
+
(0, import_patterns8.hstack)({
|
|
1251
|
+
justify: "space-between",
|
|
1252
|
+
w: "full"
|
|
1253
|
+
}),
|
|
1254
|
+
(0, import_recipes13.label)({
|
|
1255
|
+
size
|
|
1256
|
+
})
|
|
1257
|
+
),
|
|
1258
|
+
children: [
|
|
1259
|
+
nativeProps.children,
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1261
|
+
"span",
|
|
1262
|
+
{
|
|
1263
|
+
className: (0, import_css15.css)({
|
|
1264
|
+
color: "page.text.100",
|
|
951
1265
|
fontSize: "inherit"
|
|
952
1266
|
}),
|
|
953
1267
|
children: "(required)"
|
|
@@ -959,16 +1273,16 @@ function Label(props) {
|
|
|
959
1273
|
}
|
|
960
1274
|
|
|
961
1275
|
// src/components/Modal.tsx
|
|
962
|
-
var
|
|
963
|
-
var
|
|
1276
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
1277
|
+
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
964
1278
|
var import_react6 = require("react");
|
|
965
|
-
var
|
|
1279
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
966
1280
|
function ModalEl(props, ref) {
|
|
967
|
-
return /* @__PURE__ */ (0,
|
|
1281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
968
1282
|
"dialog",
|
|
969
1283
|
{
|
|
970
1284
|
...props,
|
|
971
|
-
className: (0,
|
|
1285
|
+
className: (0, import_css16.cx)(props.className, (0, import_recipes14.modal)().dialog),
|
|
972
1286
|
ref
|
|
973
1287
|
}
|
|
974
1288
|
);
|
|
@@ -976,20 +1290,20 @@ function ModalEl(props, ref) {
|
|
|
976
1290
|
var Modal = (0, import_react6.forwardRef)(ModalEl);
|
|
977
1291
|
|
|
978
1292
|
// src/components/ModalHeader.tsx
|
|
979
|
-
var
|
|
980
|
-
var
|
|
981
|
-
var
|
|
1293
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1294
|
+
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
1295
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
982
1296
|
function ModalHeader(props) {
|
|
983
|
-
return /* @__PURE__ */ (0,
|
|
1297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
984
1298
|
"div",
|
|
985
1299
|
{
|
|
986
1300
|
...props,
|
|
987
|
-
className: (0,
|
|
1301
|
+
className: (0, import_css17.cx)(
|
|
988
1302
|
props.className,
|
|
989
|
-
(0,
|
|
1303
|
+
(0, import_patterns9.vstack)({
|
|
990
1304
|
alignItems: "flex-start",
|
|
991
|
-
gap: "
|
|
992
|
-
mb: "
|
|
1305
|
+
gap: "md",
|
|
1306
|
+
mb: "md"
|
|
993
1307
|
})
|
|
994
1308
|
)
|
|
995
1309
|
}
|
|
@@ -997,25 +1311,25 @@ function ModalHeader(props) {
|
|
|
997
1311
|
}
|
|
998
1312
|
|
|
999
1313
|
// src/components/ModalHeading.tsx
|
|
1000
|
-
var
|
|
1001
|
-
var
|
|
1002
|
-
var
|
|
1314
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
1315
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1316
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1003
1317
|
function ModalHeading(props) {
|
|
1004
|
-
return /* @__PURE__ */ (0,
|
|
1318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { ...props, className: (0, import_css18.cx)(props.className, (0, import_recipes15.modal)().heading) });
|
|
1005
1319
|
}
|
|
1006
1320
|
|
|
1007
1321
|
// src/components/ModalDescription.tsx
|
|
1008
|
-
var
|
|
1009
|
-
var
|
|
1010
|
-
var
|
|
1322
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
1323
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1324
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1011
1325
|
function ModalDescription(props) {
|
|
1012
|
-
return /* @__PURE__ */ (0,
|
|
1326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { ...props, className: (0, import_css19.cx)(props.className, (0, import_recipes16.modal)().description) });
|
|
1013
1327
|
}
|
|
1014
1328
|
|
|
1015
1329
|
// src/components/NavMenuTrigger.tsx
|
|
1016
1330
|
var import_react8 = require("react");
|
|
1017
|
-
var
|
|
1018
|
-
var
|
|
1331
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1332
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1019
1333
|
|
|
1020
1334
|
// src/aria-helpers/nav-menu.aria.ts
|
|
1021
1335
|
function createNavTriggerProps(values) {
|
|
@@ -1026,9 +1340,9 @@ function createNavTriggerProps(values) {
|
|
|
1026
1340
|
}
|
|
1027
1341
|
|
|
1028
1342
|
// src/context/navMenu.tsx
|
|
1029
|
-
var
|
|
1343
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1030
1344
|
var import_react7 = require("react");
|
|
1031
|
-
var
|
|
1345
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1032
1346
|
var NavMenuContext = (0, import_react7.createContext)(null);
|
|
1033
1347
|
function NavMenu(props) {
|
|
1034
1348
|
const triggerRef = (0, import_react7.useRef)(null);
|
|
@@ -1046,10 +1360,10 @@ function NavMenu(props) {
|
|
|
1046
1360
|
}),
|
|
1047
1361
|
[expanded, handleToggle]
|
|
1048
1362
|
);
|
|
1049
|
-
return /* @__PURE__ */ (0,
|
|
1363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1050
1364
|
"nav",
|
|
1051
1365
|
{
|
|
1052
|
-
className: (0,
|
|
1366
|
+
className: (0, import_css20.css)({
|
|
1053
1367
|
position: "relative"
|
|
1054
1368
|
}),
|
|
1055
1369
|
children: props.children
|
|
@@ -1065,7 +1379,7 @@ function useNavMenuContext() {
|
|
|
1065
1379
|
}
|
|
1066
1380
|
|
|
1067
1381
|
// src/components/NavMenuTrigger.tsx
|
|
1068
|
-
var
|
|
1382
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1069
1383
|
function NavMenuTrigger(props) {
|
|
1070
1384
|
const {
|
|
1071
1385
|
as,
|
|
@@ -1091,18 +1405,18 @@ function NavMenuTrigger(props) {
|
|
|
1091
1405
|
},
|
|
1092
1406
|
[onClick, onToggle]
|
|
1093
1407
|
);
|
|
1094
|
-
return /* @__PURE__ */ (0,
|
|
1408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1095
1409
|
Show,
|
|
1096
1410
|
{
|
|
1097
1411
|
when: hasAs,
|
|
1098
|
-
fallback: /* @__PURE__ */ (0,
|
|
1412
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1099
1413
|
"button",
|
|
1100
1414
|
{
|
|
1101
1415
|
...nativeProps,
|
|
1102
1416
|
...ariaProps,
|
|
1103
|
-
className: (0,
|
|
1417
|
+
className: (0, import_css21.cx)(
|
|
1104
1418
|
nativeProps.className,
|
|
1105
|
-
(0,
|
|
1419
|
+
(0, import_recipes17.button)({
|
|
1106
1420
|
palette,
|
|
1107
1421
|
usage,
|
|
1108
1422
|
shape
|
|
@@ -1113,7 +1427,7 @@ function NavMenuTrigger(props) {
|
|
|
1113
1427
|
children: props.children
|
|
1114
1428
|
}
|
|
1115
1429
|
),
|
|
1116
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1430
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1117
1431
|
AsSub,
|
|
1118
1432
|
{
|
|
1119
1433
|
...nativeProps,
|
|
@@ -1128,9 +1442,9 @@ function NavMenuTrigger(props) {
|
|
|
1128
1442
|
|
|
1129
1443
|
// src/components/NavMenuList.tsx
|
|
1130
1444
|
var import_react9 = require("react");
|
|
1131
|
-
var
|
|
1132
|
-
var
|
|
1133
|
-
var
|
|
1445
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1446
|
+
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
1447
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1134
1448
|
function getPosition(position) {
|
|
1135
1449
|
const defaultPositions = {
|
|
1136
1450
|
left: "auto",
|
|
@@ -1151,7 +1465,7 @@ function getPosition(position) {
|
|
|
1151
1465
|
return defaultPositions;
|
|
1152
1466
|
}
|
|
1153
1467
|
}
|
|
1154
|
-
var navListStyles = (0,
|
|
1468
|
+
var navListStyles = (0, import_patterns10.vstack)({
|
|
1155
1469
|
alignItems: "flex-start",
|
|
1156
1470
|
bgColor: "page.surface.100",
|
|
1157
1471
|
boxShadow: "lg",
|
|
@@ -1188,12 +1502,12 @@ function NavMenuList(props) {
|
|
|
1188
1502
|
() => getPosition(position ?? "bottom"),
|
|
1189
1503
|
[position]
|
|
1190
1504
|
);
|
|
1191
|
-
return /* @__PURE__ */ (0,
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1192
1506
|
"ul",
|
|
1193
1507
|
{
|
|
1194
1508
|
...nativeProps,
|
|
1195
1509
|
"data-position": position ?? "bottom",
|
|
1196
|
-
className: (0,
|
|
1510
|
+
className: (0, import_css22.cx)(nativeProps.className, navListStyles),
|
|
1197
1511
|
ref: menuRef,
|
|
1198
1512
|
style: locationStyles
|
|
1199
1513
|
}
|
|
@@ -1201,29 +1515,29 @@ function NavMenuList(props) {
|
|
|
1201
1515
|
}
|
|
1202
1516
|
|
|
1203
1517
|
// src/components/NavMenuLink.tsx
|
|
1204
|
-
var
|
|
1205
|
-
var
|
|
1518
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1519
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1206
1520
|
function NavMenuLink(props) {
|
|
1207
1521
|
const { as, ...nativeProps } = props;
|
|
1208
1522
|
const hasAs = Boolean(as);
|
|
1209
1523
|
const AsSub = as;
|
|
1210
|
-
return /* @__PURE__ */ (0,
|
|
1524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1211
1525
|
"li",
|
|
1212
1526
|
{
|
|
1213
|
-
className: (0,
|
|
1527
|
+
className: (0, import_css23.css)({
|
|
1214
1528
|
w: "full"
|
|
1215
1529
|
}),
|
|
1216
|
-
children: /* @__PURE__ */ (0,
|
|
1530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1217
1531
|
Show,
|
|
1218
1532
|
{
|
|
1219
1533
|
when: hasAs,
|
|
1220
|
-
fallback: /* @__PURE__ */ (0,
|
|
1534
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1221
1535
|
"a",
|
|
1222
1536
|
{
|
|
1223
1537
|
...nativeProps,
|
|
1224
|
-
className: (0,
|
|
1538
|
+
className: (0, import_css23.cx)(
|
|
1225
1539
|
nativeProps.className,
|
|
1226
|
-
(0,
|
|
1540
|
+
(0, import_css23.css)({
|
|
1227
1541
|
color: "action.navigation.initial",
|
|
1228
1542
|
textStyle: "link",
|
|
1229
1543
|
_hover: {
|
|
@@ -1233,7 +1547,7 @@ function NavMenuLink(props) {
|
|
|
1233
1547
|
)
|
|
1234
1548
|
}
|
|
1235
1549
|
),
|
|
1236
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1550
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AsSub, { ...nativeProps })
|
|
1237
1551
|
}
|
|
1238
1552
|
)
|
|
1239
1553
|
}
|
|
@@ -1241,9 +1555,9 @@ function NavMenuLink(props) {
|
|
|
1241
1555
|
}
|
|
1242
1556
|
|
|
1243
1557
|
// src/components/Notification.tsx
|
|
1244
|
-
var
|
|
1245
|
-
var
|
|
1246
|
-
var
|
|
1558
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1559
|
+
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
1560
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1247
1561
|
var import_react10 = require("react");
|
|
1248
1562
|
var import_icons2 = require("@cerberus/icons");
|
|
1249
1563
|
|
|
@@ -1274,25 +1588,25 @@ function trapFocus(modalRef) {
|
|
|
1274
1588
|
}
|
|
1275
1589
|
|
|
1276
1590
|
// src/components/Notification.tsx
|
|
1277
|
-
var
|
|
1591
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1278
1592
|
function MatchNotificationIcon(props) {
|
|
1279
1593
|
const palette = props.palette || "info";
|
|
1280
1594
|
const key = `${palette}Notification`;
|
|
1281
1595
|
const Icon = $cerberusIcons[key];
|
|
1282
|
-
return /* @__PURE__ */ (0,
|
|
1596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, {});
|
|
1283
1597
|
}
|
|
1284
1598
|
function Notification(props) {
|
|
1285
1599
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1286
1600
|
const ref = (0, import_react10.useRef)(null);
|
|
1287
1601
|
const onKeyDown = trapFocus(ref);
|
|
1288
|
-
const styles = (0,
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1602
|
+
const styles = (0, import_recipes18.notification)({ palette });
|
|
1603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1290
1604
|
"dialog",
|
|
1291
1605
|
{
|
|
1292
1606
|
...nativeProps,
|
|
1293
|
-
className: (0,
|
|
1607
|
+
className: (0, import_css24.cx)(
|
|
1294
1608
|
nativeProps.className,
|
|
1295
|
-
(0,
|
|
1609
|
+
(0, import_patterns11.hstack)({
|
|
1296
1610
|
position: "relative",
|
|
1297
1611
|
gap: "4"
|
|
1298
1612
|
}),
|
|
@@ -1301,11 +1615,11 @@ function Notification(props) {
|
|
|
1301
1615
|
onKeyDown,
|
|
1302
1616
|
ref,
|
|
1303
1617
|
children: [
|
|
1304
|
-
/* @__PURE__ */ (0,
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MatchNotificationIcon, { palette }) }),
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1306
1620
|
"div",
|
|
1307
1621
|
{
|
|
1308
|
-
className: (0,
|
|
1622
|
+
className: (0, import_patterns11.vstack)({
|
|
1309
1623
|
alignItems: "flex-start",
|
|
1310
1624
|
gap: "0",
|
|
1311
1625
|
py: "2"
|
|
@@ -1313,14 +1627,14 @@ function Notification(props) {
|
|
|
1313
1627
|
children
|
|
1314
1628
|
}
|
|
1315
1629
|
),
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1317
1631
|
"button",
|
|
1318
1632
|
{
|
|
1319
1633
|
"aria-label": "Close",
|
|
1320
1634
|
className: styles.close,
|
|
1321
1635
|
onClick: onClose,
|
|
1322
1636
|
value: props.id,
|
|
1323
|
-
children: /* @__PURE__ */ (0,
|
|
1637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons2.Close, {})
|
|
1324
1638
|
}
|
|
1325
1639
|
)
|
|
1326
1640
|
]
|
|
@@ -1329,26 +1643,26 @@ function Notification(props) {
|
|
|
1329
1643
|
}
|
|
1330
1644
|
|
|
1331
1645
|
// src/components/NotificationHeading.tsx
|
|
1332
|
-
var
|
|
1333
|
-
var
|
|
1334
|
-
var
|
|
1646
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1647
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1648
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1335
1649
|
function NotificationHeading(props) {
|
|
1336
1650
|
const { palette, ...nativeProps } = props;
|
|
1337
|
-
const styles = (0,
|
|
1338
|
-
return /* @__PURE__ */ (0,
|
|
1651
|
+
const styles = (0, import_recipes19.notification)({ palette });
|
|
1652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: (0, import_css25.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
1339
1653
|
}
|
|
1340
1654
|
|
|
1341
1655
|
// src/components/NotificationDescription.tsx
|
|
1342
|
-
var
|
|
1343
|
-
var
|
|
1344
|
-
var
|
|
1656
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
1657
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1658
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1345
1659
|
function NotificationDescription(props) {
|
|
1346
1660
|
const { palette, ...nativeProps } = props;
|
|
1347
|
-
const styles = (0,
|
|
1348
|
-
return /* @__PURE__ */ (0,
|
|
1661
|
+
const styles = (0, import_recipes20.notification)({ palette });
|
|
1662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1349
1663
|
"p",
|
|
1350
1664
|
{
|
|
1351
|
-
className: (0,
|
|
1665
|
+
className: (0, import_css26.cx)(nativeProps.className, styles.description),
|
|
1352
1666
|
...nativeProps
|
|
1353
1667
|
}
|
|
1354
1668
|
);
|
|
@@ -1365,44 +1679,57 @@ function Portal(props) {
|
|
|
1365
1679
|
}
|
|
1366
1680
|
|
|
1367
1681
|
// src/components/Radio.tsx
|
|
1368
|
-
var
|
|
1369
|
-
var
|
|
1370
|
-
var
|
|
1371
|
-
var
|
|
1682
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
1683
|
+
var import_patterns12 = require("@cerberus/styled-system/patterns");
|
|
1684
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1685
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1372
1686
|
function Radio(props) {
|
|
1373
1687
|
const { children, size, ...nativeProps } = props;
|
|
1374
1688
|
const { invalid, ...state } = useFieldContext();
|
|
1375
|
-
const styles = (0,
|
|
1376
|
-
return /* @__PURE__ */ (0,
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1689
|
+
const styles = (0, import_recipes21.radio)({ size });
|
|
1690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1691
|
+
"div",
|
|
1692
|
+
{
|
|
1693
|
+
className: (0, import_css27.cx)(
|
|
1694
|
+
"group",
|
|
1695
|
+
(0, import_patterns12.hstack)({
|
|
1696
|
+
gap: "sm"
|
|
1697
|
+
}),
|
|
1698
|
+
styles.root
|
|
1699
|
+
),
|
|
1700
|
+
tabIndex: 0,
|
|
1701
|
+
children: [
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1703
|
+
"input",
|
|
1704
|
+
{
|
|
1705
|
+
...nativeProps,
|
|
1706
|
+
...state,
|
|
1707
|
+
...invalid && { "aria-invalid": true },
|
|
1708
|
+
className: (0, import_css27.cx)(nativeProps.className, styles.input),
|
|
1709
|
+
tabIndex: -1,
|
|
1710
|
+
type: "radio"
|
|
1711
|
+
}
|
|
1712
|
+
),
|
|
1713
|
+
children
|
|
1714
|
+
]
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1390
1717
|
}
|
|
1391
1718
|
|
|
1392
1719
|
// src/components/Select.tsx
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1395
|
-
var
|
|
1396
|
-
var
|
|
1720
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
1721
|
+
var import_patterns13 = require("@cerberus/styled-system/patterns");
|
|
1722
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
1723
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1397
1724
|
function Select(props) {
|
|
1398
1725
|
const { describedBy, size, ...nativeProps } = props;
|
|
1399
1726
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
1400
1727
|
const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons;
|
|
1401
|
-
const styles = (0,
|
|
1728
|
+
const styles = (0, import_recipes22.select)({
|
|
1402
1729
|
size
|
|
1403
1730
|
});
|
|
1404
|
-
return /* @__PURE__ */ (0,
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: styles.root, children: [
|
|
1732
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1406
1733
|
"select",
|
|
1407
1734
|
{
|
|
1408
1735
|
...nativeProps,
|
|
@@ -1412,38 +1739,38 @@ function Select(props) {
|
|
|
1412
1739
|
className: styles.input
|
|
1413
1740
|
}
|
|
1414
1741
|
),
|
|
1415
|
-
/* @__PURE__ */ (0,
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1416
1743
|
"span",
|
|
1417
1744
|
{
|
|
1418
|
-
className: (0,
|
|
1745
|
+
className: (0, import_css28.cx)(
|
|
1419
1746
|
styles.iconStack,
|
|
1420
|
-
(0,
|
|
1747
|
+
(0, import_patterns13.hstack)({
|
|
1421
1748
|
gap: "2"
|
|
1422
1749
|
})
|
|
1423
1750
|
),
|
|
1424
1751
|
children: [
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1426
1753
|
"span",
|
|
1427
1754
|
{
|
|
1428
1755
|
...invalid && { "data-invalid": true },
|
|
1429
1756
|
className: styles.stateIcon,
|
|
1430
|
-
children: /* @__PURE__ */ (0,
|
|
1757
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(InvalidIcon, {})
|
|
1431
1758
|
}
|
|
1432
1759
|
) }),
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1760
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectArrow, {}) })
|
|
1434
1761
|
]
|
|
1435
1762
|
}
|
|
1436
1763
|
)
|
|
1437
1764
|
] });
|
|
1438
1765
|
}
|
|
1439
1766
|
function Option(props) {
|
|
1440
|
-
return /* @__PURE__ */ (0,
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("option", { ...props });
|
|
1441
1768
|
}
|
|
1442
1769
|
|
|
1443
1770
|
// src/components/Spinner.tsx
|
|
1444
|
-
var
|
|
1771
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1445
1772
|
function Spinner(props) {
|
|
1446
|
-
return /* @__PURE__ */ (0,
|
|
1773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1447
1774
|
"svg",
|
|
1448
1775
|
{
|
|
1449
1776
|
"aria-busy": "true",
|
|
@@ -1453,7 +1780,7 @@ function Spinner(props) {
|
|
|
1453
1780
|
width: props.size,
|
|
1454
1781
|
viewBox: "0 0 24 24",
|
|
1455
1782
|
...props,
|
|
1456
|
-
children: /* @__PURE__ */ (0,
|
|
1783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1457
1784
|
"g",
|
|
1458
1785
|
{
|
|
1459
1786
|
fill: "none",
|
|
@@ -1462,14 +1789,14 @@ function Spinner(props) {
|
|
|
1462
1789
|
strokeLinejoin: "round",
|
|
1463
1790
|
strokeWidth: 2,
|
|
1464
1791
|
children: [
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1466
1793
|
"path",
|
|
1467
1794
|
{
|
|
1468
1795
|
strokeDasharray: 16,
|
|
1469
1796
|
strokeDashoffset: 16,
|
|
1470
1797
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1471
1798
|
children: [
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1799
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1473
1800
|
"animate",
|
|
1474
1801
|
{
|
|
1475
1802
|
fill: "freeze",
|
|
@@ -1478,7 +1805,7 @@ function Spinner(props) {
|
|
|
1478
1805
|
values: "16;0"
|
|
1479
1806
|
}
|
|
1480
1807
|
),
|
|
1481
|
-
/* @__PURE__ */ (0,
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1482
1809
|
"animateTransform",
|
|
1483
1810
|
{
|
|
1484
1811
|
attributeName: "transform",
|
|
@@ -1491,14 +1818,14 @@ function Spinner(props) {
|
|
|
1491
1818
|
]
|
|
1492
1819
|
}
|
|
1493
1820
|
),
|
|
1494
|
-
/* @__PURE__ */ (0,
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1495
1822
|
"path",
|
|
1496
1823
|
{
|
|
1497
1824
|
strokeDasharray: 64,
|
|
1498
1825
|
strokeDashoffset: 64,
|
|
1499
1826
|
strokeOpacity: 0.3,
|
|
1500
1827
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
|
|
1501
|
-
children: /* @__PURE__ */ (0,
|
|
1828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1502
1829
|
"animate",
|
|
1503
1830
|
{
|
|
1504
1831
|
fill: "freeze",
|
|
@@ -1520,9 +1847,9 @@ function Spinner(props) {
|
|
|
1520
1847
|
var import_react13 = require("react");
|
|
1521
1848
|
|
|
1522
1849
|
// src/context/tabs.tsx
|
|
1523
|
-
var
|
|
1850
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
1524
1851
|
var import_react11 = require("react");
|
|
1525
|
-
var
|
|
1852
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1526
1853
|
var TabsContext = (0, import_react11.createContext)(null);
|
|
1527
1854
|
function Tabs(props) {
|
|
1528
1855
|
const { cache, active, id, palette } = props;
|
|
@@ -1536,7 +1863,7 @@ function Tabs(props) {
|
|
|
1536
1863
|
tabs: tabsList,
|
|
1537
1864
|
id: uuid,
|
|
1538
1865
|
active: activeTab,
|
|
1539
|
-
styles: (0,
|
|
1866
|
+
styles: (0, import_recipes23.tabs)({ palette }),
|
|
1540
1867
|
onTabUpdate: setActiveTab
|
|
1541
1868
|
}),
|
|
1542
1869
|
[activeTab, setActiveTab, palette, uuid, tabsList]
|
|
@@ -1554,7 +1881,7 @@ function Tabs(props) {
|
|
|
1554
1881
|
window.localStorage.setItem(uuid, activeTab);
|
|
1555
1882
|
}
|
|
1556
1883
|
}, [activeTab, cache]);
|
|
1557
|
-
return /* @__PURE__ */ (0,
|
|
1884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TabsContext.Provider, { value, children: props.children });
|
|
1558
1885
|
}
|
|
1559
1886
|
function useTabsContext() {
|
|
1560
1887
|
const context = (0, import_react11.useContext)(TabsContext);
|
|
@@ -1565,7 +1892,7 @@ function useTabsContext() {
|
|
|
1565
1892
|
}
|
|
1566
1893
|
|
|
1567
1894
|
// src/components/Tab.tsx
|
|
1568
|
-
var
|
|
1895
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
1569
1896
|
|
|
1570
1897
|
// src/aria-helpers/tabs.aria.ts
|
|
1571
1898
|
var import_react12 = require("react");
|
|
@@ -1624,7 +1951,7 @@ function useTabsKeyboardNavigation() {
|
|
|
1624
1951
|
}
|
|
1625
1952
|
|
|
1626
1953
|
// src/components/Tab.tsx
|
|
1627
|
-
var
|
|
1954
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1628
1955
|
function Tab(props) {
|
|
1629
1956
|
const { value, ...nativeProps } = props;
|
|
1630
1957
|
const { active, onTabUpdate, styles } = useTabsContext();
|
|
@@ -1636,7 +1963,7 @@ function Tab(props) {
|
|
|
1636
1963
|
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
1637
1964
|
startTransition(() => onTabUpdate(e.currentTarget.value));
|
|
1638
1965
|
}
|
|
1639
|
-
return /* @__PURE__ */ (0,
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1640
1967
|
"button",
|
|
1641
1968
|
{
|
|
1642
1969
|
...nativeProps,
|
|
@@ -1645,7 +1972,7 @@ function Tab(props) {
|
|
|
1645
1972
|
"aria-busy": isPending,
|
|
1646
1973
|
"aria-selected": isActive,
|
|
1647
1974
|
id: `tab:${value}`,
|
|
1648
|
-
className: (0,
|
|
1975
|
+
className: (0, import_css29.cx)(nativeProps.className, styles.tab),
|
|
1649
1976
|
onClick: handleClick,
|
|
1650
1977
|
role: "tab",
|
|
1651
1978
|
ref,
|
|
@@ -1655,20 +1982,20 @@ function Tab(props) {
|
|
|
1655
1982
|
}
|
|
1656
1983
|
|
|
1657
1984
|
// src/components/TabList.tsx
|
|
1658
|
-
var
|
|
1659
|
-
var
|
|
1660
|
-
var
|
|
1985
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
1986
|
+
var import_patterns14 = require("@cerberus/styled-system/patterns");
|
|
1987
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1661
1988
|
function TabList(props) {
|
|
1662
1989
|
const { description, ...nativeProps } = props;
|
|
1663
1990
|
const { id, styles } = useTabsContext();
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
1991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1665
1992
|
"div",
|
|
1666
1993
|
{
|
|
1667
1994
|
...nativeProps,
|
|
1668
1995
|
"aria-label": description,
|
|
1669
|
-
className: (0,
|
|
1996
|
+
className: (0, import_css30.cx)(
|
|
1670
1997
|
nativeProps.className,
|
|
1671
|
-
(0,
|
|
1998
|
+
(0, import_patterns14.hstack)({
|
|
1672
1999
|
gap: "0"
|
|
1673
2000
|
}),
|
|
1674
2001
|
styles.tabList
|
|
@@ -1680,20 +2007,20 @@ function TabList(props) {
|
|
|
1680
2007
|
}
|
|
1681
2008
|
|
|
1682
2009
|
// src/components/TabPanel.tsx
|
|
1683
|
-
var
|
|
2010
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
1684
2011
|
var import_react14 = require("react");
|
|
1685
|
-
var
|
|
2012
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1686
2013
|
function TabPanel(props) {
|
|
1687
2014
|
const { tab, ...nativeProps } = props;
|
|
1688
2015
|
const { active, styles } = useTabsContext();
|
|
1689
2016
|
const isActive = (0, import_react14.useMemo)(() => active === tab, [active, tab]);
|
|
1690
|
-
return /* @__PURE__ */ (0,
|
|
2017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Show, { when: isActive, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1691
2018
|
"div",
|
|
1692
2019
|
{
|
|
1693
2020
|
...nativeProps,
|
|
1694
2021
|
...isActive && { tabIndex: 0 },
|
|
1695
2022
|
"aria-labelledby": `tab:${tab}`,
|
|
1696
|
-
className: (0,
|
|
2023
|
+
className: (0, import_css31.cx)(nativeProps.className, styles.tabPanel),
|
|
1697
2024
|
id: `panel:${tab}`,
|
|
1698
2025
|
role: "tabpanel"
|
|
1699
2026
|
}
|
|
@@ -1701,65 +2028,68 @@ function TabPanel(props) {
|
|
|
1701
2028
|
}
|
|
1702
2029
|
|
|
1703
2030
|
// src/components/Table.tsx
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
1706
|
-
var
|
|
2031
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
2032
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
2033
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1707
2034
|
function Table(props) {
|
|
1708
2035
|
const { caption, children, ...nativeProps } = props;
|
|
1709
|
-
const styles = (0,
|
|
1710
|
-
return /* @__PURE__ */ (0,
|
|
2036
|
+
const styles = (0, import_recipes24.table)();
|
|
2037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
1711
2038
|
"table",
|
|
1712
2039
|
{
|
|
1713
2040
|
...nativeProps,
|
|
1714
|
-
className: (0,
|
|
2041
|
+
className: (0, import_css32.cx)(nativeProps.className, styles.table),
|
|
1715
2042
|
children: [
|
|
1716
|
-
/* @__PURE__ */ (0,
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("caption", { className: styles.caption, children: caption }),
|
|
1717
2044
|
children
|
|
1718
2045
|
]
|
|
1719
2046
|
}
|
|
1720
2047
|
) });
|
|
1721
2048
|
}
|
|
1722
2049
|
function Tr(props) {
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
2050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { ...props });
|
|
1724
2051
|
}
|
|
1725
2052
|
|
|
1726
2053
|
// src/components/Thead.tsx
|
|
1727
|
-
var
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
2054
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
2055
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2056
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1730
2057
|
function Thead(props) {
|
|
1731
|
-
return /* @__PURE__ */ (0,
|
|
2058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("thead", { ...props, className: (0, import_css33.cx)(props.className, (0, import_recipes25.thead)()) });
|
|
1732
2059
|
}
|
|
1733
2060
|
|
|
1734
2061
|
// src/components/Th.tsx
|
|
1735
|
-
var
|
|
1736
|
-
var
|
|
1737
|
-
var
|
|
2062
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2063
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2064
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1738
2065
|
function Th(props) {
|
|
1739
2066
|
const { size, onClick, ...nativeProps } = props;
|
|
1740
|
-
return /* @__PURE__ */ (0,
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1741
2068
|
Show,
|
|
1742
2069
|
{
|
|
1743
2070
|
when: Boolean(onClick),
|
|
1744
|
-
fallback: /* @__PURE__ */ (0,
|
|
2071
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1745
2072
|
"th",
|
|
1746
2073
|
{
|
|
1747
2074
|
...nativeProps,
|
|
1748
|
-
className: (0,
|
|
2075
|
+
className: (0, import_css34.cx)(nativeProps.className, (0, import_recipes26.th)({ size }))
|
|
1749
2076
|
}
|
|
1750
2077
|
),
|
|
1751
|
-
children: /* @__PURE__ */ (0,
|
|
2078
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1752
2079
|
"button",
|
|
1753
2080
|
{
|
|
1754
|
-
className: (0,
|
|
2081
|
+
className: (0, import_css34.cx)(
|
|
1755
2082
|
nativeProps.className,
|
|
1756
|
-
(0,
|
|
1757
|
-
(0,
|
|
2083
|
+
(0, import_recipes26.th)({ size }),
|
|
2084
|
+
(0, import_css34.css)({
|
|
1758
2085
|
alignItems: "center",
|
|
1759
2086
|
display: "inline-flex",
|
|
1760
2087
|
justifyContent: "space-between",
|
|
1761
2088
|
userSelect: "none",
|
|
1762
|
-
w: "full"
|
|
2089
|
+
w: "full",
|
|
2090
|
+
_hover: {
|
|
2091
|
+
bgColor: "page.bg.100"
|
|
2092
|
+
}
|
|
1763
2093
|
})
|
|
1764
2094
|
),
|
|
1765
2095
|
onClick,
|
|
@@ -1771,18 +2101,18 @@ function Th(props) {
|
|
|
1771
2101
|
}
|
|
1772
2102
|
|
|
1773
2103
|
// src/components/Td.tsx
|
|
1774
|
-
var
|
|
1775
|
-
var
|
|
1776
|
-
var
|
|
2104
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
2105
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2106
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1777
2107
|
function Td(props) {
|
|
1778
2108
|
const { size, ...nativeProps } = props;
|
|
1779
|
-
return /* @__PURE__ */ (0,
|
|
2109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1780
2110
|
"td",
|
|
1781
2111
|
{
|
|
1782
2112
|
...nativeProps,
|
|
1783
|
-
className: (0,
|
|
2113
|
+
className: (0, import_css35.cx)(
|
|
1784
2114
|
nativeProps.className,
|
|
1785
|
-
(0,
|
|
2115
|
+
(0, import_recipes27.td)({
|
|
1786
2116
|
size
|
|
1787
2117
|
})
|
|
1788
2118
|
)
|
|
@@ -1791,18 +2121,18 @@ function Td(props) {
|
|
|
1791
2121
|
}
|
|
1792
2122
|
|
|
1793
2123
|
// src/components/Tbody.tsx
|
|
1794
|
-
var
|
|
1795
|
-
var
|
|
1796
|
-
var
|
|
2124
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2125
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
2126
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1797
2127
|
function Tbody(props) {
|
|
1798
2128
|
const { decoration, ...nativeProps } = props;
|
|
1799
|
-
return /* @__PURE__ */ (0,
|
|
2129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1800
2130
|
"tbody",
|
|
1801
2131
|
{
|
|
1802
2132
|
...nativeProps,
|
|
1803
|
-
className: (0,
|
|
2133
|
+
className: (0, import_css36.cx)(
|
|
1804
2134
|
nativeProps.className,
|
|
1805
|
-
(0,
|
|
2135
|
+
(0, import_recipes28.tbody)({
|
|
1806
2136
|
decoration
|
|
1807
2137
|
})
|
|
1808
2138
|
)
|
|
@@ -1811,9 +2141,9 @@ function Tbody(props) {
|
|
|
1811
2141
|
}
|
|
1812
2142
|
|
|
1813
2143
|
// src/components/Tag.tsx
|
|
1814
|
-
var
|
|
1815
|
-
var
|
|
1816
|
-
var
|
|
2144
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
2145
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2146
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1817
2147
|
function Tag(props) {
|
|
1818
2148
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
1819
2149
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -1821,13 +2151,13 @@ function Tag(props) {
|
|
|
1821
2151
|
const shape = isClosable ? "pill" : initShape;
|
|
1822
2152
|
const closableStyles = isClosable ? closableCss : "";
|
|
1823
2153
|
const { close: Close2 } = $cerberusIcons;
|
|
1824
|
-
return /* @__PURE__ */ (0,
|
|
2154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
1825
2155
|
"span",
|
|
1826
2156
|
{
|
|
1827
2157
|
...nativeProps,
|
|
1828
|
-
className: (0,
|
|
2158
|
+
className: (0, import_css37.cx)(
|
|
1829
2159
|
nativeProps.className,
|
|
1830
|
-
(0,
|
|
2160
|
+
(0, import_recipes29.tag)({
|
|
1831
2161
|
gradient,
|
|
1832
2162
|
palette,
|
|
1833
2163
|
shape,
|
|
@@ -1837,47 +2167,47 @@ function Tag(props) {
|
|
|
1837
2167
|
),
|
|
1838
2168
|
children: [
|
|
1839
2169
|
props.children,
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1841
2171
|
"button",
|
|
1842
2172
|
{
|
|
1843
2173
|
"aria-label": "Close",
|
|
1844
|
-
className: (0,
|
|
2174
|
+
className: (0, import_recipes29.iconButton)({
|
|
1845
2175
|
palette: "action",
|
|
1846
2176
|
usage: "filled",
|
|
1847
2177
|
size: "sm"
|
|
1848
2178
|
}),
|
|
1849
2179
|
onClick,
|
|
1850
|
-
children: /* @__PURE__ */ (0,
|
|
2180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Close2, {})
|
|
1851
2181
|
}
|
|
1852
2182
|
) })
|
|
1853
2183
|
]
|
|
1854
2184
|
}
|
|
1855
2185
|
);
|
|
1856
2186
|
}
|
|
1857
|
-
var closableCss = (0,
|
|
2187
|
+
var closableCss = (0, import_css37.css)({
|
|
1858
2188
|
bgColor: "action.bg.active",
|
|
1859
2189
|
color: "action.text.initial",
|
|
1860
2190
|
paddingInlineEnd: "0"
|
|
1861
2191
|
});
|
|
1862
2192
|
|
|
1863
2193
|
// src/components/Textarea.tsx
|
|
1864
|
-
var
|
|
1865
|
-
var
|
|
1866
|
-
var
|
|
2194
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
2195
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
2196
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1867
2197
|
function Textarea(props) {
|
|
1868
2198
|
const { describedBy, ...nativeProps } = props;
|
|
1869
2199
|
const { invalid, ...fieldState } = useFieldContext();
|
|
1870
|
-
return /* @__PURE__ */ (0,
|
|
2200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1871
2201
|
"textarea",
|
|
1872
2202
|
{
|
|
1873
2203
|
...nativeProps,
|
|
1874
2204
|
...fieldState,
|
|
1875
2205
|
...describedBy && { "aria-describedby": describedBy },
|
|
1876
2206
|
...invalid && { "aria-invalid": true },
|
|
1877
|
-
className: (0,
|
|
2207
|
+
className: (0, import_css38.cx)(
|
|
1878
2208
|
props.className,
|
|
1879
|
-
(0,
|
|
1880
|
-
(0,
|
|
2209
|
+
(0, import_recipes30.input)().input,
|
|
2210
|
+
(0, import_css38.css)({
|
|
1881
2211
|
pxi: "2",
|
|
1882
2212
|
py: "2",
|
|
1883
2213
|
resize: "vertical"
|
|
@@ -1889,43 +2219,43 @@ function Textarea(props) {
|
|
|
1889
2219
|
}
|
|
1890
2220
|
|
|
1891
2221
|
// src/components/Toggle.tsx
|
|
1892
|
-
var
|
|
1893
|
-
var
|
|
1894
|
-
var
|
|
1895
|
-
var
|
|
2222
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
2223
|
+
var import_patterns15 = require("@cerberus/styled-system/patterns");
|
|
2224
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2225
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1896
2226
|
function Toggle(props) {
|
|
1897
2227
|
const { size, describedBy, ...nativeProps } = props;
|
|
1898
|
-
const styles = (0,
|
|
2228
|
+
const styles = (0, import_recipes31.toggle)({ size });
|
|
1899
2229
|
const { invalid, ...state } = useFieldContext();
|
|
1900
2230
|
const Icon = $cerberusIcons.toggleChecked;
|
|
1901
|
-
return /* @__PURE__ */ (0,
|
|
2231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
1902
2232
|
"span",
|
|
1903
2233
|
{
|
|
1904
|
-
className: (0,
|
|
2234
|
+
className: (0, import_css39.cx)("group", styles.track, (0, import_patterns15.hstack)()),
|
|
1905
2235
|
"data-checked": props.checked || props.defaultChecked,
|
|
1906
2236
|
children: [
|
|
1907
|
-
/* @__PURE__ */ (0,
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1908
2238
|
"input",
|
|
1909
2239
|
{
|
|
1910
2240
|
...nativeProps,
|
|
1911
2241
|
...state,
|
|
1912
2242
|
...describedBy && { "aria-describedby": describedBy },
|
|
1913
2243
|
...invalid && { "aria-invalid": true },
|
|
1914
|
-
className: (0,
|
|
2244
|
+
className: (0, import_css39.cx)("peer", styles.input),
|
|
1915
2245
|
role: "switch",
|
|
1916
2246
|
type: "checkbox"
|
|
1917
2247
|
}
|
|
1918
2248
|
),
|
|
1919
|
-
/* @__PURE__ */ (0,
|
|
2249
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1920
2250
|
"span",
|
|
1921
2251
|
{
|
|
1922
|
-
className: (0,
|
|
2252
|
+
className: (0, import_css39.cx)(
|
|
1923
2253
|
styles.thumb,
|
|
1924
|
-
(0,
|
|
2254
|
+
(0, import_patterns15.vstack)({
|
|
1925
2255
|
justify: "center"
|
|
1926
2256
|
})
|
|
1927
2257
|
),
|
|
1928
|
-
children: /* @__PURE__ */ (0,
|
|
2258
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, {})
|
|
1929
2259
|
}
|
|
1930
2260
|
)
|
|
1931
2261
|
]
|
|
@@ -1935,32 +2265,36 @@ function Toggle(props) {
|
|
|
1935
2265
|
|
|
1936
2266
|
// src/context/confirm-modal.tsx
|
|
1937
2267
|
var import_react16 = require("react");
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
2268
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
2269
|
+
var import_patterns16 = require("@cerberus/styled-system/patterns");
|
|
1940
2270
|
|
|
1941
2271
|
// src/hooks/useModal.ts
|
|
1942
2272
|
var import_react15 = require("react");
|
|
1943
2273
|
function useModal() {
|
|
1944
2274
|
const modalRef = (0, import_react15.useRef)(null);
|
|
2275
|
+
const [isOpen, setIsOpen] = (0, import_react15.useState)(false);
|
|
1945
2276
|
const show = (0, import_react15.useCallback)(() => {
|
|
1946
2277
|
var _a;
|
|
1947
2278
|
(_a = modalRef.current) == null ? void 0 : _a.showModal();
|
|
2279
|
+
setIsOpen(true);
|
|
1948
2280
|
}, []);
|
|
1949
2281
|
const close = (0, import_react15.useCallback)(() => {
|
|
1950
2282
|
var _a;
|
|
1951
2283
|
(_a = modalRef.current) == null ? void 0 : _a.close();
|
|
2284
|
+
setIsOpen(false);
|
|
1952
2285
|
}, []);
|
|
1953
2286
|
return (0, import_react15.useMemo)(() => {
|
|
1954
2287
|
return {
|
|
1955
2288
|
modalRef,
|
|
1956
2289
|
show,
|
|
1957
|
-
close
|
|
2290
|
+
close,
|
|
2291
|
+
isOpen
|
|
1958
2292
|
};
|
|
1959
|
-
}, [modalRef, show, close]);
|
|
2293
|
+
}, [modalRef, show, close, isOpen]);
|
|
1960
2294
|
}
|
|
1961
2295
|
|
|
1962
2296
|
// src/context/confirm-modal.tsx
|
|
1963
|
-
var
|
|
2297
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1964
2298
|
var ConfirmModalContext = (0, import_react16.createContext)(null);
|
|
1965
2299
|
function ConfirmModal(props) {
|
|
1966
2300
|
const { modalRef, show, close } = useModal();
|
|
@@ -2000,36 +2334,36 @@ function ConfirmModal(props) {
|
|
|
2000
2334
|
}),
|
|
2001
2335
|
[handleShow]
|
|
2002
2336
|
);
|
|
2003
|
-
return /* @__PURE__ */ (0,
|
|
2337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2004
2338
|
props.children,
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2339
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2340
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ModalHeader, { children: [
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2008
2342
|
"div",
|
|
2009
2343
|
{
|
|
2010
|
-
className: (0,
|
|
2344
|
+
className: (0, import_patterns16.hstack)({
|
|
2011
2345
|
justify: "center",
|
|
2012
2346
|
w: "full"
|
|
2013
2347
|
}),
|
|
2014
|
-
children: /* @__PURE__ */ (0,
|
|
2348
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2015
2349
|
Show,
|
|
2016
2350
|
{
|
|
2017
2351
|
when: palette === "danger",
|
|
2018
|
-
fallback: /* @__PURE__ */ (0,
|
|
2352
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2019
2353
|
Avatar,
|
|
2020
2354
|
{
|
|
2021
2355
|
ariaLabel: "",
|
|
2022
2356
|
gradient: "charon-light",
|
|
2023
|
-
icon: /* @__PURE__ */ (0,
|
|
2357
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ConfirmIcon, { size: 24 }),
|
|
2024
2358
|
src: ""
|
|
2025
2359
|
}
|
|
2026
2360
|
),
|
|
2027
|
-
children: /* @__PURE__ */ (0,
|
|
2361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2028
2362
|
Avatar,
|
|
2029
2363
|
{
|
|
2030
2364
|
ariaLabel: "",
|
|
2031
2365
|
gradient: "hades-dark",
|
|
2032
|
-
icon: /* @__PURE__ */ (0,
|
|
2366
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ConfirmIcon, { size: 24 }),
|
|
2033
2367
|
src: ""
|
|
2034
2368
|
}
|
|
2035
2369
|
)
|
|
@@ -2037,21 +2371,21 @@ function ConfirmModal(props) {
|
|
|
2037
2371
|
)
|
|
2038
2372
|
}
|
|
2039
2373
|
),
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2041
|
-
/* @__PURE__ */ (0,
|
|
2374
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2375
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2042
2376
|
] }),
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2377
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2044
2378
|
"div",
|
|
2045
2379
|
{
|
|
2046
|
-
className: (0,
|
|
2380
|
+
className: (0, import_patterns16.hstack)({
|
|
2047
2381
|
gap: "4"
|
|
2048
2382
|
}),
|
|
2049
2383
|
children: [
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2384
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2051
2385
|
Button,
|
|
2052
2386
|
{
|
|
2053
2387
|
autoFocus: true,
|
|
2054
|
-
className: (0,
|
|
2388
|
+
className: (0, import_css40.css)({
|
|
2055
2389
|
w: "1/2"
|
|
2056
2390
|
}),
|
|
2057
2391
|
name: "confirm",
|
|
@@ -2061,10 +2395,10 @@ function ConfirmModal(props) {
|
|
|
2061
2395
|
children: content == null ? void 0 : content.actionText
|
|
2062
2396
|
}
|
|
2063
2397
|
),
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2065
2399
|
Button,
|
|
2066
2400
|
{
|
|
2067
|
-
className: (0,
|
|
2401
|
+
className: (0, import_css40.css)({
|
|
2068
2402
|
w: "1/2"
|
|
2069
2403
|
}),
|
|
2070
2404
|
name: "cancel",
|
|
@@ -2092,14 +2426,14 @@ function useConfirmModal() {
|
|
|
2092
2426
|
|
|
2093
2427
|
// src/context/notification-center.tsx
|
|
2094
2428
|
var import_react17 = require("react");
|
|
2095
|
-
var
|
|
2096
|
-
var
|
|
2097
|
-
var
|
|
2098
|
-
var
|
|
2429
|
+
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2430
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
2431
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
2432
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2099
2433
|
var NotificationsContext = (0, import_react17.createContext)(null);
|
|
2100
2434
|
function NotificationCenter(props) {
|
|
2101
2435
|
const [activeNotifications, setActiveNotifications] = (0, import_react17.useState)([]);
|
|
2102
|
-
const styles = (0,
|
|
2436
|
+
const styles = (0, import_recipes32.notification)();
|
|
2103
2437
|
const handleNotify = (0, import_react17.useCallback)((options) => {
|
|
2104
2438
|
setActiveNotifications((prev) => {
|
|
2105
2439
|
const id = `${options.palette}:${prev.length + 1}`;
|
|
@@ -2128,13 +2462,13 @@ function NotificationCenter(props) {
|
|
|
2128
2462
|
}),
|
|
2129
2463
|
[handleNotify]
|
|
2130
2464
|
);
|
|
2131
|
-
return /* @__PURE__ */ (0,
|
|
2465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2132
2466
|
props.children,
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2134
|
-
/* @__PURE__ */ (0,
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.center, children: [
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2135
2469
|
Button,
|
|
2136
2470
|
{
|
|
2137
|
-
className: (0,
|
|
2471
|
+
className: (0, import_css41.cx)(styles.closeAll, (0, import_patterns17.animateIn)()),
|
|
2138
2472
|
onClick: handleCloseAll,
|
|
2139
2473
|
palette: "action",
|
|
2140
2474
|
shape: "rounded",
|
|
@@ -2143,17 +2477,17 @@ function NotificationCenter(props) {
|
|
|
2143
2477
|
children: "Close all"
|
|
2144
2478
|
}
|
|
2145
2479
|
) }),
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2147
2481
|
"div",
|
|
2148
2482
|
{
|
|
2149
|
-
className: (0,
|
|
2483
|
+
className: (0, import_patterns17.vstack)({
|
|
2150
2484
|
alignItems: "flex-end",
|
|
2151
2485
|
gap: "4"
|
|
2152
2486
|
}),
|
|
2153
2487
|
style: {
|
|
2154
2488
|
alignItems: "flex-end"
|
|
2155
2489
|
},
|
|
2156
|
-
children: activeNotifications.map((option) => /* @__PURE__ */ (0,
|
|
2490
|
+
children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2157
2491
|
MatchNotification,
|
|
2158
2492
|
{
|
|
2159
2493
|
...option,
|
|
@@ -2170,7 +2504,7 @@ function MatchNotification(props) {
|
|
|
2170
2504
|
const { palette, id, onClose, heading, description } = props;
|
|
2171
2505
|
switch (palette) {
|
|
2172
2506
|
case "success":
|
|
2173
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2174
2508
|
Notification,
|
|
2175
2509
|
{
|
|
2176
2510
|
id,
|
|
@@ -2178,14 +2512,14 @@ function MatchNotification(props) {
|
|
|
2178
2512
|
open: true,
|
|
2179
2513
|
palette: "success",
|
|
2180
2514
|
children: [
|
|
2181
|
-
/* @__PURE__ */ (0,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2515
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2183
2517
|
]
|
|
2184
2518
|
},
|
|
2185
2519
|
id
|
|
2186
2520
|
);
|
|
2187
2521
|
case "warning":
|
|
2188
|
-
return /* @__PURE__ */ (0,
|
|
2522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2189
2523
|
Notification,
|
|
2190
2524
|
{
|
|
2191
2525
|
id,
|
|
@@ -2193,22 +2527,22 @@ function MatchNotification(props) {
|
|
|
2193
2527
|
open: true,
|
|
2194
2528
|
palette: "warning",
|
|
2195
2529
|
children: [
|
|
2196
|
-
/* @__PURE__ */ (0,
|
|
2197
|
-
/* @__PURE__ */ (0,
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
2531
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2198
2532
|
]
|
|
2199
2533
|
},
|
|
2200
2534
|
id
|
|
2201
2535
|
);
|
|
2202
2536
|
case "danger":
|
|
2203
|
-
return /* @__PURE__ */ (0,
|
|
2204
|
-
/* @__PURE__ */ (0,
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
|
|
2538
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2206
2540
|
] }, id);
|
|
2207
2541
|
case "info":
|
|
2208
2542
|
default:
|
|
2209
|
-
return /* @__PURE__ */ (0,
|
|
2210
|
-
/* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2212
2546
|
] }, id);
|
|
2213
2547
|
}
|
|
2214
2548
|
}
|
|
@@ -2224,9 +2558,9 @@ function useNotificationCenter() {
|
|
|
2224
2558
|
|
|
2225
2559
|
// src/context/prompt-modal.tsx
|
|
2226
2560
|
var import_react18 = require("react");
|
|
2227
|
-
var
|
|
2228
|
-
var
|
|
2229
|
-
var
|
|
2561
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
2562
|
+
var import_patterns18 = require("@cerberus/styled-system/patterns");
|
|
2563
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2230
2564
|
var PromptModalContext = (0, import_react18.createContext)(null);
|
|
2231
2565
|
function PromptModal(props) {
|
|
2232
2566
|
const { modalRef, show, close } = useModal();
|
|
@@ -2276,36 +2610,36 @@ function PromptModal(props) {
|
|
|
2276
2610
|
}),
|
|
2277
2611
|
[handleShow]
|
|
2278
2612
|
);
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
2280
2614
|
props.children,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2282
|
-
/* @__PURE__ */ (0,
|
|
2283
|
-
/* @__PURE__ */ (0,
|
|
2615
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2616
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(ModalHeader, { children: [
|
|
2617
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2284
2618
|
"div",
|
|
2285
2619
|
{
|
|
2286
|
-
className: (0,
|
|
2620
|
+
className: (0, import_patterns18.hstack)({
|
|
2287
2621
|
justify: "center",
|
|
2288
2622
|
w: "full"
|
|
2289
2623
|
}),
|
|
2290
|
-
children: /* @__PURE__ */ (0,
|
|
2624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2291
2625
|
Show,
|
|
2292
2626
|
{
|
|
2293
2627
|
when: palette === "danger",
|
|
2294
|
-
fallback: /* @__PURE__ */ (0,
|
|
2628
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2295
2629
|
Avatar,
|
|
2296
2630
|
{
|
|
2297
2631
|
ariaLabel: "",
|
|
2298
2632
|
gradient: "charon-light",
|
|
2299
|
-
icon: /* @__PURE__ */ (0,
|
|
2633
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PromptIcon, { size: 24 }),
|
|
2300
2634
|
src: ""
|
|
2301
2635
|
}
|
|
2302
2636
|
),
|
|
2303
|
-
children: /* @__PURE__ */ (0,
|
|
2637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2304
2638
|
Avatar,
|
|
2305
2639
|
{
|
|
2306
2640
|
ariaLabel: "",
|
|
2307
2641
|
gradient: "hades-dark",
|
|
2308
|
-
icon: /* @__PURE__ */ (0,
|
|
2642
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PromptIcon, { size: 24 }),
|
|
2309
2643
|
src: ""
|
|
2310
2644
|
}
|
|
2311
2645
|
)
|
|
@@ -2313,32 +2647,43 @@ function PromptModal(props) {
|
|
|
2313
2647
|
)
|
|
2314
2648
|
}
|
|
2315
2649
|
),
|
|
2316
|
-
/* @__PURE__ */ (0,
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2650
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2651
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2318
2652
|
] }),
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2653
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2320
2654
|
"div",
|
|
2321
2655
|
{
|
|
2322
|
-
className: (0,
|
|
2656
|
+
className: (0, import_patterns18.vstack)({
|
|
2323
2657
|
alignItems: "flex-start",
|
|
2324
2658
|
mt: "4",
|
|
2325
2659
|
mb: "8"
|
|
2326
2660
|
}),
|
|
2327
|
-
children: /* @__PURE__ */ (0,
|
|
2328
|
-
/* @__PURE__ */ (0,
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2661
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Field, { invalid: !isValid, children: [
|
|
2662
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2663
|
+
Label,
|
|
2664
|
+
{
|
|
2665
|
+
className: (0, import_css42.css)({
|
|
2666
|
+
gap: 1,
|
|
2667
|
+
justifyContent: "flex-start"
|
|
2668
|
+
}),
|
|
2669
|
+
htmlFor: "confirm",
|
|
2670
|
+
size: "md",
|
|
2671
|
+
children: [
|
|
2672
|
+
"Type",
|
|
2673
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2674
|
+
"strong",
|
|
2675
|
+
{
|
|
2676
|
+
className: (0, import_css42.css)({
|
|
2677
|
+
textTransform: "uppercase"
|
|
2678
|
+
}),
|
|
2679
|
+
children: content == null ? void 0 : content.key
|
|
2680
|
+
}
|
|
2681
|
+
),
|
|
2682
|
+
"to confirm"
|
|
2683
|
+
]
|
|
2684
|
+
}
|
|
2685
|
+
),
|
|
2686
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2342
2687
|
Input,
|
|
2343
2688
|
{
|
|
2344
2689
|
id: "confirm",
|
|
@@ -2350,19 +2695,19 @@ function PromptModal(props) {
|
|
|
2350
2695
|
] })
|
|
2351
2696
|
}
|
|
2352
2697
|
),
|
|
2353
|
-
/* @__PURE__ */ (0,
|
|
2698
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2354
2699
|
"div",
|
|
2355
2700
|
{
|
|
2356
|
-
className: (0,
|
|
2701
|
+
className: (0, import_patterns18.hstack)({
|
|
2357
2702
|
justifyContent: "stretch",
|
|
2358
2703
|
gap: "4"
|
|
2359
2704
|
}),
|
|
2360
2705
|
children: [
|
|
2361
|
-
/* @__PURE__ */ (0,
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2362
2707
|
Button,
|
|
2363
2708
|
{
|
|
2364
2709
|
autoFocus: true,
|
|
2365
|
-
className: (0,
|
|
2710
|
+
className: (0, import_css42.css)({
|
|
2366
2711
|
w: "1/2"
|
|
2367
2712
|
}),
|
|
2368
2713
|
disabled: !isValid,
|
|
@@ -2373,10 +2718,10 @@ function PromptModal(props) {
|
|
|
2373
2718
|
children: content == null ? void 0 : content.actionText
|
|
2374
2719
|
}
|
|
2375
2720
|
),
|
|
2376
|
-
/* @__PURE__ */ (0,
|
|
2721
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2377
2722
|
Button,
|
|
2378
2723
|
{
|
|
2379
|
-
className: (0,
|
|
2724
|
+
className: (0, import_css42.css)({
|
|
2380
2725
|
w: "1/2"
|
|
2381
2726
|
}),
|
|
2382
2727
|
name: "cancel",
|
|
@@ -2467,7 +2812,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
2467
2812
|
}
|
|
2468
2813
|
|
|
2469
2814
|
// src/context/theme.tsx
|
|
2470
|
-
var
|
|
2815
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2471
2816
|
var ThemeContext = (0, import_react20.createContext)(
|
|
2472
2817
|
null
|
|
2473
2818
|
);
|
|
@@ -2477,7 +2822,7 @@ function ThemeProvider(props) {
|
|
|
2477
2822
|
updateMode: props.updateMode,
|
|
2478
2823
|
updateTheme: props.updateTheme
|
|
2479
2824
|
});
|
|
2480
|
-
return /* @__PURE__ */ (0,
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
2481
2826
|
}
|
|
2482
2827
|
function useThemeContext() {
|
|
2483
2828
|
const context = (0, import_react20.useContext)(ThemeContext);
|
|
@@ -2510,6 +2855,9 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2510
2855
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2511
2856
|
0 && (module.exports = {
|
|
2512
2857
|
$cerberusIcons,
|
|
2858
|
+
Admonition,
|
|
2859
|
+
AdmonitionDescription,
|
|
2860
|
+
AdmonitionHeading,
|
|
2513
2861
|
Avatar,
|
|
2514
2862
|
Button,
|
|
2515
2863
|
Checkbox,
|
|
@@ -2520,11 +2868,14 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2520
2868
|
FeatureFlags,
|
|
2521
2869
|
Field,
|
|
2522
2870
|
FieldMessage,
|
|
2871
|
+
Fieldset,
|
|
2872
|
+
FieldsetLabel,
|
|
2523
2873
|
FileStatus,
|
|
2524
2874
|
FileUploader,
|
|
2525
2875
|
IconButton,
|
|
2526
2876
|
Input,
|
|
2527
2877
|
Label,
|
|
2878
|
+
Legend,
|
|
2528
2879
|
MODE_KEY,
|
|
2529
2880
|
Modal,
|
|
2530
2881
|
ModalDescription,
|