@marigold/components 9.0.2 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +184 -97
- package/dist/index.d.ts +184 -97
- package/dist/index.js +1154 -938
- package/dist/index.mjs +882 -666
- package/package.json +26 -26
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { useFocusRing } from "@react-aria/focus";
|
|
|
18
18
|
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
|
19
19
|
import { cn, useClassNames, useStateProps } from "@marigold/system";
|
|
20
20
|
|
|
21
|
-
// src/
|
|
21
|
+
// src/icons/ChevronUp.tsx
|
|
22
22
|
import { forwardRef } from "react";
|
|
23
23
|
import { SVG } from "@marigold/system";
|
|
24
24
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +26,7 @@ var ChevronUp = forwardRef(
|
|
|
26
26
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx("path", { d: "M5.97563 16.8506L12 10.8394L18.0244 16.8506L19.875 15L12 7.125L4.125 15L5.97563 16.8506Z" }) })
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
// src/
|
|
29
|
+
// src/icons/ChevronDown.tsx
|
|
30
30
|
import { forwardRef as forwardRef2 } from "react";
|
|
31
31
|
import { SVG as SVG2 } from "@marigold/system";
|
|
32
32
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
@@ -34,6 +34,34 @@ var ChevronDown = forwardRef2(
|
|
|
34
34
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx2(SVG2, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx2("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }) })
|
|
35
35
|
);
|
|
36
36
|
|
|
37
|
+
// src/icons/ChevronRight.tsx
|
|
38
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
39
|
+
import { SVG as SVG3 } from "@marigold/system";
|
|
40
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
41
|
+
var ChevronRight = forwardRef3(
|
|
42
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(SVG3, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx3("path", { d: "M7.125 18.0244L13.1363 12L7.125 5.97563L8.97563 4.125L16.8506 12L8.97563 19.875L7.125 18.0244Z" }) })
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// src/icons/ChevronLeft.tsx
|
|
46
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
47
|
+
import { SVG as SVG4 } from "@marigold/system";
|
|
48
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
49
|
+
var ChevronLeft = forwardRef4(
|
|
50
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx4(SVG4, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx4("path", { d: "M16.8506 18.0244L10.8394 12L16.8506 5.97563L15 4.125L7.125 12L15 19.875L16.8506 18.0244Z" }) })
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
// src/icons/SortDown.tsx
|
|
54
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
55
|
+
import { SVG as SVG5 } from "@marigold/system";
|
|
56
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
57
|
+
var SortDown = forwardRef5((props, ref) => /* @__PURE__ */ jsx5(SVG5, { ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx5("path", { d: "M17.3962 10.0496L12.5042 14.9416C12.3731 15.0727 12.1984 15.1492 12.0128 15.1492C11.8272 15.1492 11.6524 15.0727 11.5214 14.9416L6.62934 10.0496C6.49827 9.91854 6.42188 9.7439 6.42188 9.55816C6.42188 9.17606 6.73856 8.85938 7.12078 8.85938H16.9048C17.287 8.85938 17.6037 9.17606 17.6037 9.55816C17.6037 9.7439 17.5273 9.91854 17.3962 10.0496Z" }) }));
|
|
58
|
+
|
|
59
|
+
// src/icons/SortUp.tsx
|
|
60
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
61
|
+
import { SVG as SVG6 } from "@marigold/system";
|
|
62
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
63
|
+
var SortUp = forwardRef6((props, ref) => /* @__PURE__ */ jsx6(SVG6, { ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx6("path", { d: "M16.9048 15.1491H7.12078C6.73856 15.1491 6.42188 14.8324 6.42188 14.4503C6.42188 14.2645 6.49827 14.0899 6.62934 13.9588L11.5214 9.06684C11.6524 8.93577 11.8272 8.85938 12.0128 8.85938C12.1984 8.85938 12.3731 8.93577 12.5042 9.06684L17.3962 13.9588C17.5273 14.0899 17.6037 14.2645 17.6037 14.4503C17.6037 14.8324 17.287 15.1491 16.9048 15.1491Z" }) }));
|
|
64
|
+
|
|
37
65
|
// src/Accordion/useAccordionItem.ts
|
|
38
66
|
import { useButton } from "@react-aria/button";
|
|
39
67
|
import { useSelectableItem } from "@react-aria/selection";
|
|
@@ -127,7 +155,7 @@ function useAccordionItem(props, state, ref) {
|
|
|
127
155
|
}
|
|
128
156
|
|
|
129
157
|
// src/Accordion/AccordionItem.tsx
|
|
130
|
-
import { jsx as
|
|
158
|
+
import { jsx as jsx7, jsxs } from "react/jsx-runtime";
|
|
131
159
|
var AccordionItem = ({
|
|
132
160
|
item,
|
|
133
161
|
state,
|
|
@@ -180,11 +208,11 @@ var AccordionItem = ({
|
|
|
180
208
|
"aria-label": item.textValue,
|
|
181
209
|
children: [
|
|
182
210
|
title,
|
|
183
|
-
expanded ? /* @__PURE__ */
|
|
211
|
+
expanded ? /* @__PURE__ */ jsx7(ChevronUp, { className: "h3 w-6" }) : /* @__PURE__ */ jsx7(ChevronDown, { className: "h3 w-6" })
|
|
184
212
|
]
|
|
185
213
|
}
|
|
186
214
|
),
|
|
187
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ jsx7(
|
|
188
216
|
"div",
|
|
189
217
|
{
|
|
190
218
|
...mergeProps2(regionProps, focusProps, stateProps),
|
|
@@ -196,7 +224,7 @@ var AccordionItem = ({
|
|
|
196
224
|
};
|
|
197
225
|
|
|
198
226
|
// src/Accordion/Accordion.tsx
|
|
199
|
-
import { jsx as
|
|
227
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
200
228
|
var Accordion = ({ children, ...props }) => {
|
|
201
229
|
const ownProps = {
|
|
202
230
|
...props,
|
|
@@ -229,7 +257,7 @@ var Accordion = ({ children, ...props }) => {
|
|
|
229
257
|
ref
|
|
230
258
|
);
|
|
231
259
|
delete accordionProps.onKeyDownCapture;
|
|
232
|
-
return /* @__PURE__ */
|
|
260
|
+
return /* @__PURE__ */ jsx8("div", { ...accordionProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ jsx8(
|
|
233
261
|
AccordionItem,
|
|
234
262
|
{
|
|
235
263
|
title: item.props.title,
|
|
@@ -246,7 +274,7 @@ Accordion.Item = Item;
|
|
|
246
274
|
// src/Aside/Aside.tsx
|
|
247
275
|
import { Children as Children2 } from "react";
|
|
248
276
|
import { cn as cn2, createVar, gapSpace } from "@marigold/system";
|
|
249
|
-
import { jsx as
|
|
277
|
+
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
250
278
|
var classNames = {
|
|
251
279
|
aside: "grow basis-[--sideWidth]",
|
|
252
280
|
content: "basis-0 grow-[999] [min-inline-size:--wrap]"
|
|
@@ -264,7 +292,7 @@ var Aside = ({
|
|
|
264
292
|
content: createVar({ wrap })
|
|
265
293
|
};
|
|
266
294
|
return /* @__PURE__ */ jsxs2("div", { className: cn2("flex flex-wrap", gapSpace[space]), children: [
|
|
267
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ jsx9(
|
|
268
296
|
"div",
|
|
269
297
|
{
|
|
270
298
|
className: classNames[side === "left" ? "aside" : "content"],
|
|
@@ -272,7 +300,7 @@ var Aside = ({
|
|
|
272
300
|
children: left
|
|
273
301
|
}
|
|
274
302
|
),
|
|
275
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ jsx9(
|
|
276
304
|
"div",
|
|
277
305
|
{
|
|
278
306
|
className: classNames[side === "right" ? "aside" : "content"],
|
|
@@ -285,13 +313,13 @@ var Aside = ({
|
|
|
285
313
|
|
|
286
314
|
// src/Aspect/Aspect.tsx
|
|
287
315
|
import { aspect, cn as cn3, createVar as createVar2 } from "@marigold/system";
|
|
288
|
-
import { jsx as
|
|
316
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
289
317
|
var Aspect = ({
|
|
290
318
|
ratio = "square",
|
|
291
319
|
maxWidth,
|
|
292
320
|
children
|
|
293
321
|
}) => {
|
|
294
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ jsx10(
|
|
295
323
|
"div",
|
|
296
324
|
{
|
|
297
325
|
className: cn3(
|
|
@@ -306,29 +334,29 @@ var Aspect = ({
|
|
|
306
334
|
};
|
|
307
335
|
|
|
308
336
|
// src/Autocomplete/Autocomplete.tsx
|
|
309
|
-
import
|
|
310
|
-
forwardRef as
|
|
337
|
+
import React3, {
|
|
338
|
+
forwardRef as forwardRef12
|
|
311
339
|
} from "react";
|
|
312
340
|
import { ComboBox, ComboBoxStateContext } from "react-aria-components";
|
|
313
341
|
import { cn as cn13, useClassNames as useClassNames9 } from "@marigold/system";
|
|
314
342
|
|
|
315
343
|
// src/FieldBase/FieldBase.tsx
|
|
316
|
-
import { forwardRef as
|
|
344
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
317
345
|
import { cn as cn6, width as twWidth, useClassNames as useClassNames4 } from "@marigold/system";
|
|
318
346
|
|
|
319
347
|
// src/HelpText/HelpText.tsx
|
|
320
348
|
import { useContext } from "react";
|
|
321
349
|
import { FieldError, FieldErrorContext, Text } from "react-aria-components";
|
|
322
350
|
import { cn as cn4, useClassNames as useClassNames2 } from "@marigold/system";
|
|
323
|
-
import { jsx as
|
|
324
|
-
var Icon = ({ className }) => /* @__PURE__ */
|
|
351
|
+
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
352
|
+
var Icon = ({ className }) => /* @__PURE__ */ jsx11(
|
|
325
353
|
"svg",
|
|
326
354
|
{
|
|
327
355
|
className: cn4("h-4 w-4 shrink-0", className),
|
|
328
356
|
viewBox: "0 0 24 24",
|
|
329
357
|
role: "presentation",
|
|
330
358
|
fill: "currentColor",
|
|
331
|
-
children: /* @__PURE__ */
|
|
359
|
+
children: /* @__PURE__ */ jsx11("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
332
360
|
}
|
|
333
361
|
);
|
|
334
362
|
var HelpText = ({
|
|
@@ -348,35 +376,35 @@ var HelpText = ({
|
|
|
348
376
|
return null;
|
|
349
377
|
}
|
|
350
378
|
return /* @__PURE__ */ jsxs3("div", { className: cn4(classNames2.container), children: [
|
|
351
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ jsx11(FieldError, { ...props, className: "flex flex-col", children: (validation) => {
|
|
352
380
|
const messages = (typeof errorMessage === "function" ? errorMessage(validation) : errorMessage) || validation.validationErrors;
|
|
353
381
|
return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
354
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ jsx11(Icon, { className: classNames2.icon }),
|
|
355
383
|
msg
|
|
356
384
|
] }, idx)) : /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
357
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ jsx11(Icon, { className: classNames2.icon }),
|
|
358
386
|
messages
|
|
359
387
|
] });
|
|
360
388
|
} }),
|
|
361
|
-
ctx && ctx.isInvalid ? null : /* @__PURE__ */
|
|
389
|
+
ctx && ctx.isInvalid ? null : /* @__PURE__ */ jsx11(Text, { slot: "description", children: description })
|
|
362
390
|
] });
|
|
363
391
|
};
|
|
364
392
|
|
|
365
393
|
// src/Label/Label.tsx
|
|
366
394
|
import { Label } from "react-aria-components";
|
|
367
|
-
import { SVG as
|
|
395
|
+
import { SVG as SVG7, cn as cn5, createVar as createVar3, useClassNames as useClassNames3 } from "@marigold/system";
|
|
368
396
|
|
|
369
397
|
// src/FieldBase/FieldGroup.tsx
|
|
370
398
|
import { createContext, useContext as useContext2 } from "react";
|
|
371
|
-
import { jsx as
|
|
399
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
372
400
|
var FieldGroupContext = createContext({});
|
|
373
401
|
var useFieldGroupContext = () => useContext2(FieldGroupContext);
|
|
374
402
|
var FieldGroup = ({ labelWidth, children }) => {
|
|
375
|
-
return /* @__PURE__ */
|
|
403
|
+
return /* @__PURE__ */ jsx12(FieldGroupContext.Provider, { value: { labelWidth }, children });
|
|
376
404
|
};
|
|
377
405
|
|
|
378
406
|
// src/Label/Label.tsx
|
|
379
|
-
import { jsx as
|
|
407
|
+
import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
380
408
|
var _Label = ({ size, variant, children, ...props }) => {
|
|
381
409
|
const classNames2 = useClassNames3({ component: "Label", size, variant });
|
|
382
410
|
const { labelWidth } = useFieldGroupContext();
|
|
@@ -388,14 +416,14 @@ var _Label = ({ size, variant, children, ...props }) => {
|
|
|
388
416
|
style: createVar3({ labelWidth }),
|
|
389
417
|
children: [
|
|
390
418
|
children,
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
|
|
419
|
+
/* @__PURE__ */ jsx13(
|
|
420
|
+
SVG7,
|
|
393
421
|
{
|
|
394
422
|
viewBox: "0 0 24 24",
|
|
395
423
|
role: "presentation",
|
|
396
424
|
size: 16,
|
|
397
425
|
className: cn5("hidden", classNames2.indicator),
|
|
398
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z" })
|
|
399
427
|
}
|
|
400
428
|
)
|
|
401
429
|
]
|
|
@@ -404,8 +432,8 @@ var _Label = ({ size, variant, children, ...props }) => {
|
|
|
404
432
|
};
|
|
405
433
|
|
|
406
434
|
// src/FieldBase/FieldBase.tsx
|
|
407
|
-
import { jsx as
|
|
408
|
-
var fixedForwardRef =
|
|
435
|
+
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
436
|
+
var fixedForwardRef = forwardRef7;
|
|
409
437
|
var _FieldBase = (props, ref) => {
|
|
410
438
|
const {
|
|
411
439
|
as: Component = "div",
|
|
@@ -440,9 +468,9 @@ var _FieldBase = (props, ref) => {
|
|
|
440
468
|
"data-error": props.isInvalid ? true : void 0,
|
|
441
469
|
...rest,
|
|
442
470
|
children: [
|
|
443
|
-
label ? /* @__PURE__ */
|
|
471
|
+
label ? /* @__PURE__ */ jsx14(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx14("span", { "aria-hidden": "true" }),
|
|
444
472
|
children,
|
|
445
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ jsx14(
|
|
446
474
|
HelpText,
|
|
447
475
|
{
|
|
448
476
|
variant,
|
|
@@ -458,17 +486,17 @@ var _FieldBase = (props, ref) => {
|
|
|
458
486
|
var FieldBase = fixedForwardRef(_FieldBase);
|
|
459
487
|
|
|
460
488
|
// src/Input/SearchInput.tsx
|
|
461
|
-
import { forwardRef as
|
|
489
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
462
490
|
import { Button } from "react-aria-components";
|
|
463
491
|
import { useLocalizedStringFormatter } from "@react-aria/i18n";
|
|
464
492
|
import { cn as cn8 } from "@marigold/system";
|
|
465
493
|
|
|
466
494
|
// src/Input/Input.tsx
|
|
467
|
-
import { cloneElement as cloneElement2, forwardRef as
|
|
495
|
+
import { cloneElement as cloneElement2, forwardRef as forwardRef8 } from "react";
|
|
468
496
|
import { Input } from "react-aria-components";
|
|
469
497
|
import { cn as cn7, useClassNames as useClassNames5 } from "@marigold/system";
|
|
470
|
-
import { jsx as
|
|
471
|
-
var _Input =
|
|
498
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
499
|
+
var _Input = forwardRef8(
|
|
472
500
|
({ type, icon, action, variant, size, className, ...props }, ref) => {
|
|
473
501
|
const classNames2 = useClassNames5({
|
|
474
502
|
component: "Input",
|
|
@@ -499,7 +527,7 @@ var _Input = forwardRef4(
|
|
|
499
527
|
"data-action": action && "",
|
|
500
528
|
children: [
|
|
501
529
|
inputIcon,
|
|
502
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ jsx15(
|
|
503
531
|
Input,
|
|
504
532
|
{
|
|
505
533
|
...props,
|
|
@@ -523,7 +551,7 @@ var _Input = forwardRef4(
|
|
|
523
551
|
);
|
|
524
552
|
|
|
525
553
|
// src/Input/SearchInput.tsx
|
|
526
|
-
import { jsx as
|
|
554
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
527
555
|
var intlMessages = {
|
|
528
556
|
"de-DE": {
|
|
529
557
|
"Clear search": "Suche zur\xFCcksetzen"
|
|
@@ -535,7 +563,7 @@ var intlMessages = {
|
|
|
535
563
|
"Clear search": "Effacer la recherche"
|
|
536
564
|
}
|
|
537
565
|
};
|
|
538
|
-
var SearchIcon = (props) => /* @__PURE__ */
|
|
566
|
+
var SearchIcon = (props) => /* @__PURE__ */ jsx16(
|
|
539
567
|
"svg",
|
|
540
568
|
{
|
|
541
569
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -544,13 +572,13 @@ var SearchIcon = (props) => /* @__PURE__ */ jsx12(
|
|
|
544
572
|
width: 24,
|
|
545
573
|
height: 24,
|
|
546
574
|
...props,
|
|
547
|
-
children: /* @__PURE__ */
|
|
575
|
+
children: /* @__PURE__ */ jsx16("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
|
|
548
576
|
}
|
|
549
577
|
);
|
|
550
|
-
var SearchInput =
|
|
578
|
+
var SearchInput = forwardRef9(
|
|
551
579
|
({ className, onClear, ...props }, ref) => {
|
|
552
580
|
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
553
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ jsx16(
|
|
554
582
|
_Input,
|
|
555
583
|
{
|
|
556
584
|
type: "search",
|
|
@@ -559,8 +587,8 @@ var SearchInput = forwardRef5(
|
|
|
559
587
|
className == null ? void 0 : className.input
|
|
560
588
|
),
|
|
561
589
|
ref,
|
|
562
|
-
icon: /* @__PURE__ */
|
|
563
|
-
action: /* @__PURE__ */
|
|
590
|
+
icon: /* @__PURE__ */ jsx16(SearchIcon, {}),
|
|
591
|
+
action: /* @__PURE__ */ jsx16(
|
|
564
592
|
Button,
|
|
565
593
|
{
|
|
566
594
|
className: className == null ? void 0 : className.action,
|
|
@@ -568,7 +596,7 @@ var SearchInput = forwardRef5(
|
|
|
568
596
|
"aria-label": stringFormatter.format("Clear search"),
|
|
569
597
|
excludeFromTabOrder: true,
|
|
570
598
|
preventFocusOnPress: true,
|
|
571
|
-
children: /* @__PURE__ */
|
|
599
|
+
children: /* @__PURE__ */ jsx16(
|
|
572
600
|
"svg",
|
|
573
601
|
{
|
|
574
602
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -576,7 +604,7 @@ var SearchInput = forwardRef5(
|
|
|
576
604
|
fill: "currentColor",
|
|
577
605
|
width: 20,
|
|
578
606
|
height: 20,
|
|
579
|
-
children: /* @__PURE__ */
|
|
607
|
+
children: /* @__PURE__ */ jsx16("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
580
608
|
}
|
|
581
609
|
)
|
|
582
610
|
}
|
|
@@ -589,7 +617,7 @@ var SearchInput = forwardRef5(
|
|
|
589
617
|
|
|
590
618
|
// src/ListBox/ListBox.tsx
|
|
591
619
|
import {
|
|
592
|
-
forwardRef as
|
|
620
|
+
forwardRef as forwardRef10
|
|
593
621
|
} from "react";
|
|
594
622
|
import { ListBox } from "react-aria-components";
|
|
595
623
|
import { cn as cn10, useClassNames as useClassNames6 } from "@marigold/system";
|
|
@@ -601,34 +629,31 @@ var useListBoxContext = () => useContext3(ListBoxContext);
|
|
|
601
629
|
|
|
602
630
|
// src/ListBox/ListBoxItem.tsx
|
|
603
631
|
import { ListBoxItem } from "react-aria-components";
|
|
604
|
-
import { jsx as
|
|
632
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
605
633
|
var _ListBoxItem = ({ ...props }) => {
|
|
606
634
|
const { classNames: classNames2 } = useListBoxContext();
|
|
607
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ jsx17(ListBoxItem, { ...props, className: classNames2.option });
|
|
608
636
|
};
|
|
609
637
|
|
|
610
638
|
// src/ListBox/ListBoxSection.tsx
|
|
611
|
-
import { Section } from "react-aria-components";
|
|
639
|
+
import { Header, Section } from "react-aria-components";
|
|
612
640
|
import { cn as cn9 } from "@marigold/system";
|
|
613
|
-
import { jsx as
|
|
614
|
-
var _Section = (props) => {
|
|
641
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
642
|
+
var _Section = ({ header: header2, children, ...props }) => {
|
|
615
643
|
const { classNames: classNames2 } = useListBoxContext();
|
|
616
|
-
return /* @__PURE__ */
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
className: cn9(classNames2.section, classNames2.sectionTitle)
|
|
621
|
-
}
|
|
622
|
-
);
|
|
644
|
+
return /* @__PURE__ */ jsxs7(Section, { ...props, className: cn9(classNames2.section, classNames2.header), children: [
|
|
645
|
+
/* @__PURE__ */ jsx18(Header, { children: header2 }),
|
|
646
|
+
children
|
|
647
|
+
] });
|
|
623
648
|
};
|
|
624
649
|
|
|
625
650
|
// src/ListBox/ListBox.tsx
|
|
626
|
-
import { jsx as
|
|
627
|
-
var _ListBox =
|
|
651
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
652
|
+
var _ListBox = forwardRef10(
|
|
628
653
|
({ variant, size, ...props }, ref) => {
|
|
629
654
|
const classNames2 = useClassNames6({ component: "ListBox", variant, size });
|
|
630
655
|
const listBoxProps = { shouldSelectOnPressUp: false };
|
|
631
|
-
return /* @__PURE__ */
|
|
656
|
+
return /* @__PURE__ */ jsx19(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx19("div", { className: classNames2.container, children: /* @__PURE__ */ jsx19(
|
|
632
657
|
ListBox,
|
|
633
658
|
{
|
|
634
659
|
...props,
|
|
@@ -647,7 +672,7 @@ _ListBox.Item = _ListBoxItem;
|
|
|
647
672
|
_ListBox.Section = _Section;
|
|
648
673
|
|
|
649
674
|
// src/Overlay/Popover.tsx
|
|
650
|
-
import { forwardRef as
|
|
675
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
651
676
|
import { Popover } from "react-aria-components";
|
|
652
677
|
import { cn as cn12, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
|
|
653
678
|
|
|
@@ -673,17 +698,17 @@ import { I18nProvider } from "@react-aria/i18n";
|
|
|
673
698
|
|
|
674
699
|
// src/Provider/MarigoldProvider.tsx
|
|
675
700
|
import { ThemeProvider } from "@marigold/system";
|
|
676
|
-
import { jsx as
|
|
701
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
677
702
|
function MarigoldProvider({
|
|
678
703
|
children,
|
|
679
704
|
className,
|
|
680
705
|
theme
|
|
681
706
|
}) {
|
|
682
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ jsx20(ThemeProvider, { theme, className, children });
|
|
683
708
|
}
|
|
684
709
|
|
|
685
710
|
// src/Overlay/Underlay.tsx
|
|
686
|
-
import { jsx as
|
|
711
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
687
712
|
var Underlay = ({
|
|
688
713
|
size,
|
|
689
714
|
variant,
|
|
@@ -700,7 +725,7 @@ var Underlay = ({
|
|
|
700
725
|
...rest
|
|
701
726
|
};
|
|
702
727
|
const portal = usePortalContainer();
|
|
703
|
-
return /* @__PURE__ */
|
|
728
|
+
return /* @__PURE__ */ jsx21(
|
|
704
729
|
ModalOverlay,
|
|
705
730
|
{
|
|
706
731
|
className: ({ isEntering, isExiting }) => cn11(
|
|
@@ -718,8 +743,8 @@ var Underlay = ({
|
|
|
718
743
|
};
|
|
719
744
|
|
|
720
745
|
// src/Overlay/Popover.tsx
|
|
721
|
-
import { Fragment, jsx as
|
|
722
|
-
var _Popover =
|
|
746
|
+
import { Fragment, jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
747
|
+
var _Popover = forwardRef11(
|
|
723
748
|
({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
|
|
724
749
|
const props = {
|
|
725
750
|
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
@@ -735,9 +760,9 @@ var _Popover = forwardRef7(
|
|
|
735
760
|
});
|
|
736
761
|
const isSmallScreen = useSmallScreen();
|
|
737
762
|
const portal = usePortalContainer();
|
|
738
|
-
return /* @__PURE__ */
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */
|
|
763
|
+
return /* @__PURE__ */ jsx22(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
764
|
+
/* @__PURE__ */ jsx22(Underlay, { open, variant: "modal" }),
|
|
765
|
+
/* @__PURE__ */ jsx22(
|
|
741
766
|
Popover,
|
|
742
767
|
{
|
|
743
768
|
ref,
|
|
@@ -749,7 +774,7 @@ var _Popover = forwardRef7(
|
|
|
749
774
|
children
|
|
750
775
|
}
|
|
751
776
|
)
|
|
752
|
-
] }) : /* @__PURE__ */
|
|
777
|
+
] }) : /* @__PURE__ */ jsx22(
|
|
753
778
|
Popover,
|
|
754
779
|
{
|
|
755
780
|
ref,
|
|
@@ -765,15 +790,15 @@ var _Popover = forwardRef7(
|
|
|
765
790
|
);
|
|
766
791
|
|
|
767
792
|
// src/Autocomplete/Autocomplete.tsx
|
|
768
|
-
import { jsx as
|
|
793
|
+
import { jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
769
794
|
var AutocompleteInput = ({
|
|
770
795
|
onSubmit,
|
|
771
796
|
onClear,
|
|
772
797
|
ref
|
|
773
798
|
}) => {
|
|
774
|
-
const state =
|
|
799
|
+
const state = React3.useContext(ComboBoxStateContext);
|
|
775
800
|
const classNames2 = useClassNames9({ component: "ComboBox" });
|
|
776
|
-
return /* @__PURE__ */
|
|
801
|
+
return /* @__PURE__ */ jsx23(
|
|
777
802
|
SearchInput,
|
|
778
803
|
{
|
|
779
804
|
ref,
|
|
@@ -788,8 +813,8 @@ var AutocompleteInput = ({
|
|
|
788
813
|
e.preventDefault();
|
|
789
814
|
}
|
|
790
815
|
if (e.key === "Enter") {
|
|
791
|
-
if (state.selectionManager.focusedKey === null) {
|
|
792
|
-
onSubmit == null ? void 0 : onSubmit(null, state.inputValue);
|
|
816
|
+
if ((state == null ? void 0 : state.selectionManager.focusedKey) === null) {
|
|
817
|
+
onSubmit == null ? void 0 : onSubmit(null, state == null ? void 0 : state.inputValue);
|
|
793
818
|
}
|
|
794
819
|
}
|
|
795
820
|
},
|
|
@@ -801,7 +826,7 @@ var AutocompleteInput = ({
|
|
|
801
826
|
}
|
|
802
827
|
);
|
|
803
828
|
};
|
|
804
|
-
var _Autocomplete =
|
|
829
|
+
var _Autocomplete = forwardRef12(
|
|
805
830
|
({
|
|
806
831
|
children,
|
|
807
832
|
defaultValue,
|
|
@@ -827,33 +852,97 @@ var _Autocomplete = forwardRef8(
|
|
|
827
852
|
isRequired: required,
|
|
828
853
|
...rest
|
|
829
854
|
};
|
|
830
|
-
return /* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
855
|
+
return /* @__PURE__ */ jsxs9(FieldBase, { as: ComboBox, ref, ...props, children: [
|
|
856
|
+
/* @__PURE__ */ jsx23(AutocompleteInput, { onSubmit, onClear, ref }),
|
|
857
|
+
/* @__PURE__ */ jsx23(_Popover, { children: /* @__PURE__ */ jsx23(_ListBox, { children }) })
|
|
833
858
|
] });
|
|
834
859
|
}
|
|
835
860
|
);
|
|
836
|
-
_Autocomplete.
|
|
861
|
+
_Autocomplete.Option = _ListBox.Item;
|
|
862
|
+
_Autocomplete.Section = _ListBox.Section;
|
|
837
863
|
|
|
838
864
|
// src/ComboBox/ComboBox.tsx
|
|
839
|
-
import { forwardRef as
|
|
865
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
840
866
|
import { ComboBox as ComboBox2 } from "react-aria-components";
|
|
841
867
|
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
842
868
|
|
|
843
869
|
// src/Button/Button.tsx
|
|
844
|
-
import { forwardRef as
|
|
870
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
845
871
|
import { Button as Button2 } from "react-aria-components";
|
|
846
872
|
import { cn as cn14, useClassNames as useClassNames10 } from "@marigold/system";
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
873
|
+
|
|
874
|
+
// src/ProgressCycle/ProgressCycle.tsx
|
|
875
|
+
import { ProgressBar } from "react-aria-components";
|
|
876
|
+
import { SVG as SVG8 } from "@marigold/system";
|
|
877
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
878
|
+
var ProgressCycle = ({
|
|
879
|
+
size = "16",
|
|
880
|
+
...props
|
|
881
|
+
}) => {
|
|
882
|
+
let strokeWidth = 3;
|
|
883
|
+
if (size <= "24") {
|
|
884
|
+
strokeWidth = 2;
|
|
885
|
+
} else if (size >= "32") {
|
|
886
|
+
strokeWidth = 4;
|
|
887
|
+
}
|
|
888
|
+
const radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
889
|
+
return /* @__PURE__ */ jsx24(ProgressBar, { ...props, "aria-label": "loading", isIndeterminate: true, children: /* @__PURE__ */ jsxs10(
|
|
890
|
+
SVG8,
|
|
891
|
+
{
|
|
892
|
+
className: "animate-rotate-spinner origin-center fill-none",
|
|
893
|
+
size,
|
|
894
|
+
"aria-hidden": "true",
|
|
895
|
+
role: "img",
|
|
896
|
+
children: [
|
|
897
|
+
/* @__PURE__ */ jsx24(
|
|
898
|
+
"circle",
|
|
899
|
+
{
|
|
900
|
+
cx: "50%",
|
|
901
|
+
cy: "50%",
|
|
902
|
+
r: radius,
|
|
903
|
+
strokeWidth,
|
|
904
|
+
className: "stroke-transparent"
|
|
905
|
+
}
|
|
906
|
+
),
|
|
907
|
+
/* @__PURE__ */ jsx24(
|
|
908
|
+
"circle",
|
|
909
|
+
{
|
|
910
|
+
cx: "50%",
|
|
911
|
+
cy: "50%",
|
|
912
|
+
r: radius,
|
|
913
|
+
strokeWidth,
|
|
914
|
+
pathLength: "100",
|
|
915
|
+
strokeDasharray: "100 200",
|
|
916
|
+
strokeDashoffset: "0",
|
|
917
|
+
strokeLinecap: "round",
|
|
918
|
+
className: "animate-progress-cycle origin-center -rotate-90 stroke-gray-800"
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
]
|
|
922
|
+
}
|
|
923
|
+
) });
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
// src/Button/Button.tsx
|
|
927
|
+
import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
928
|
+
var _Button = forwardRef13(
|
|
929
|
+
({
|
|
930
|
+
children,
|
|
931
|
+
variant,
|
|
932
|
+
size,
|
|
933
|
+
className,
|
|
934
|
+
disabled,
|
|
935
|
+
loading,
|
|
936
|
+
fullWidth,
|
|
937
|
+
...props
|
|
938
|
+
}, ref) => {
|
|
850
939
|
const classNames2 = useClassNames10({
|
|
851
940
|
component: "Button",
|
|
852
941
|
variant,
|
|
853
942
|
size,
|
|
854
943
|
className
|
|
855
944
|
});
|
|
856
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ jsx25(
|
|
857
946
|
Button2,
|
|
858
947
|
{
|
|
859
948
|
...props,
|
|
@@ -861,18 +950,23 @@ var _Button = forwardRef9(
|
|
|
861
950
|
className: cn14(
|
|
862
951
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
863
952
|
classNames2,
|
|
864
|
-
fullWidth ? "w-full" : void 0
|
|
953
|
+
fullWidth ? "w-full" : void 0,
|
|
954
|
+
loading && "!cursor-progress"
|
|
865
955
|
),
|
|
956
|
+
isPending: loading,
|
|
866
957
|
isDisabled: disabled,
|
|
867
|
-
children
|
|
958
|
+
children: loading ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
959
|
+
/* @__PURE__ */ jsx25("span", { className: "absolute", children: /* @__PURE__ */ jsx25(ProgressCycle, {}) }),
|
|
960
|
+
/* @__PURE__ */ jsx25("span", { className: "invisible flex gap-[inherit]", children })
|
|
961
|
+
] }) : children
|
|
868
962
|
}
|
|
869
963
|
);
|
|
870
964
|
}
|
|
871
965
|
);
|
|
872
966
|
|
|
873
967
|
// src/ComboBox/ComboBox.tsx
|
|
874
|
-
import { jsx as
|
|
875
|
-
var _ComboBox =
|
|
968
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
969
|
+
var _ComboBox = forwardRef14(
|
|
876
970
|
({
|
|
877
971
|
variant,
|
|
878
972
|
size,
|
|
@@ -897,30 +991,31 @@ var _ComboBox = forwardRef10(
|
|
|
897
991
|
...rest
|
|
898
992
|
};
|
|
899
993
|
const classNames2 = useClassNames11({ component: "ComboBox", variant, size });
|
|
900
|
-
return /* @__PURE__ */
|
|
901
|
-
/* @__PURE__ */
|
|
994
|
+
return /* @__PURE__ */ jsxs12(FieldBase, { as: ComboBox2, ref, ...props, children: [
|
|
995
|
+
/* @__PURE__ */ jsx26(
|
|
902
996
|
_Input,
|
|
903
997
|
{
|
|
904
|
-
action: /* @__PURE__ */
|
|
998
|
+
action: /* @__PURE__ */ jsx26(_Button, { className: classNames2, children: /* @__PURE__ */ jsx26(ChevronDown, { className: "size-4" }) })
|
|
905
999
|
}
|
|
906
1000
|
),
|
|
907
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ jsx26(_Popover, { children: /* @__PURE__ */ jsx26(_ListBox, { children }) })
|
|
908
1002
|
] });
|
|
909
1003
|
}
|
|
910
1004
|
);
|
|
911
|
-
_ComboBox.
|
|
1005
|
+
_ComboBox.Option = _ListBox.Item;
|
|
1006
|
+
_ComboBox.Section = _ListBox.Section;
|
|
912
1007
|
|
|
913
1008
|
// src/Badge/Badge.tsx
|
|
914
1009
|
import { useClassNames as useClassNames12 } from "@marigold/system";
|
|
915
|
-
import { jsx as
|
|
1010
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
916
1011
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
917
1012
|
const classNames2 = useClassNames12({ component: "Badge", variant, size });
|
|
918
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsx27("div", { className: classNames2, ...props, children });
|
|
919
1014
|
};
|
|
920
1015
|
|
|
921
1016
|
// src/Breakout/Breakout.tsx
|
|
922
1017
|
import { alignment, cn as cn15, createVar as createVar4 } from "@marigold/system";
|
|
923
|
-
import { jsx as
|
|
1018
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
924
1019
|
var Breakout = ({
|
|
925
1020
|
height,
|
|
926
1021
|
children,
|
|
@@ -928,7 +1023,7 @@ var Breakout = ({
|
|
|
928
1023
|
alignY = "center"
|
|
929
1024
|
}) => {
|
|
930
1025
|
var _a, _b, _c, _d;
|
|
931
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ jsx28(
|
|
932
1027
|
"div",
|
|
933
1028
|
{
|
|
934
1029
|
className: cn15(
|
|
@@ -946,10 +1041,10 @@ var Breakout = ({
|
|
|
946
1041
|
|
|
947
1042
|
// src/Body/Body.tsx
|
|
948
1043
|
import { useClassNames as useClassNames13 } from "@marigold/system";
|
|
949
|
-
import { jsx as
|
|
1044
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
950
1045
|
var Body = ({ children, variant, size, ...props }) => {
|
|
951
1046
|
const classNames2 = useClassNames13({ component: "Body", variant, size });
|
|
952
|
-
return /* @__PURE__ */
|
|
1047
|
+
return /* @__PURE__ */ jsx29("section", { ...props, className: classNames2, children });
|
|
953
1048
|
};
|
|
954
1049
|
|
|
955
1050
|
// src/Card/Card.tsx
|
|
@@ -965,7 +1060,7 @@ import {
|
|
|
965
1060
|
paddingTop,
|
|
966
1061
|
useClassNames as useClassNames14
|
|
967
1062
|
} from "@marigold/system";
|
|
968
|
-
import { jsx as
|
|
1063
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
969
1064
|
var Card = ({
|
|
970
1065
|
children,
|
|
971
1066
|
variant,
|
|
@@ -981,7 +1076,7 @@ var Card = ({
|
|
|
981
1076
|
...props
|
|
982
1077
|
}) => {
|
|
983
1078
|
const classNames2 = useClassNames14({ component: "Card", variant, size });
|
|
984
|
-
return /* @__PURE__ */
|
|
1079
|
+
return /* @__PURE__ */ jsx30(
|
|
985
1080
|
"div",
|
|
986
1081
|
{
|
|
987
1082
|
...props,
|
|
@@ -1004,14 +1099,14 @@ var Card = ({
|
|
|
1004
1099
|
|
|
1005
1100
|
// src/Center/Center.tsx
|
|
1006
1101
|
import { cn as cn17, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
|
|
1007
|
-
import { jsx as
|
|
1102
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1008
1103
|
var Center = ({
|
|
1009
1104
|
maxWidth = "100%",
|
|
1010
1105
|
space = 0,
|
|
1011
1106
|
children,
|
|
1012
1107
|
...props
|
|
1013
1108
|
}) => {
|
|
1014
|
-
return /* @__PURE__ */
|
|
1109
|
+
return /* @__PURE__ */ jsx31(
|
|
1015
1110
|
"div",
|
|
1016
1111
|
{
|
|
1017
1112
|
...props,
|
|
@@ -1027,29 +1122,76 @@ var Center = ({
|
|
|
1027
1122
|
};
|
|
1028
1123
|
|
|
1029
1124
|
// src/Checkbox/Checkbox.tsx
|
|
1030
|
-
import { forwardRef as
|
|
1125
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
1031
1126
|
import { Checkbox } from "react-aria-components";
|
|
1032
|
-
import { cn as
|
|
1127
|
+
import { cn as cn19, useClassNames as useClassNames17 } from "@marigold/system";
|
|
1033
1128
|
|
|
1034
1129
|
// src/Checkbox/CheckBoxField.tsx
|
|
1035
1130
|
import { createVar as createVar6, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1036
|
-
import { jsx as
|
|
1131
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1037
1132
|
var CheckboxField = ({ children, labelWidth }) => {
|
|
1038
1133
|
const classNames2 = useClassNames15({ component: "Field" });
|
|
1039
|
-
return /* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */
|
|
1134
|
+
return /* @__PURE__ */ jsxs13("div", { className: classNames2, children: [
|
|
1135
|
+
/* @__PURE__ */ jsx32("div", { className: "w-[--labelWidth]", style: createVar6({ labelWidth }) }),
|
|
1041
1136
|
children
|
|
1042
1137
|
] });
|
|
1043
1138
|
};
|
|
1044
1139
|
|
|
1140
|
+
// src/Checkbox/CheckboxGroup.tsx
|
|
1141
|
+
import { CheckboxGroup } from "react-aria-components";
|
|
1142
|
+
import { cn as cn18, useClassNames as useClassNames16 } from "@marigold/system";
|
|
1143
|
+
|
|
1045
1144
|
// src/Checkbox/Context.tsx
|
|
1046
1145
|
import { createContext as createContext4, useContext as useContext5 } from "react";
|
|
1047
1146
|
var CheckboxGroupContext = createContext4(null);
|
|
1048
1147
|
var useCheckboxGroupContext = () => useContext5(CheckboxGroupContext);
|
|
1049
1148
|
|
|
1149
|
+
// src/Checkbox/CheckboxGroup.tsx
|
|
1150
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1151
|
+
var _CheckboxGroup = ({
|
|
1152
|
+
children,
|
|
1153
|
+
variant,
|
|
1154
|
+
size,
|
|
1155
|
+
required,
|
|
1156
|
+
disabled,
|
|
1157
|
+
readOnly,
|
|
1158
|
+
error,
|
|
1159
|
+
width,
|
|
1160
|
+
orientation = "vertical",
|
|
1161
|
+
...rest
|
|
1162
|
+
}) => {
|
|
1163
|
+
const classNames2 = useClassNames16({
|
|
1164
|
+
component: "Checkbox",
|
|
1165
|
+
variant,
|
|
1166
|
+
size,
|
|
1167
|
+
className: { group: "gap-x-2" }
|
|
1168
|
+
});
|
|
1169
|
+
const props = {
|
|
1170
|
+
className: classNames2.group,
|
|
1171
|
+
isRequired: required,
|
|
1172
|
+
isDisabled: disabled,
|
|
1173
|
+
isReadOnly: readOnly,
|
|
1174
|
+
isInvalid: error,
|
|
1175
|
+
...rest
|
|
1176
|
+
};
|
|
1177
|
+
return /* @__PURE__ */ jsx33(FieldBase, { as: CheckboxGroup, width, ...props, children: /* @__PURE__ */ jsx33(
|
|
1178
|
+
"div",
|
|
1179
|
+
{
|
|
1180
|
+
role: "presentation",
|
|
1181
|
+
"data-orientation": orientation,
|
|
1182
|
+
className: cn18(
|
|
1183
|
+
classNames2.group,
|
|
1184
|
+
"flex items-start",
|
|
1185
|
+
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
1186
|
+
),
|
|
1187
|
+
children: /* @__PURE__ */ jsx33(CheckboxGroupContext.Provider, { value: { width, variant, size }, children })
|
|
1188
|
+
}
|
|
1189
|
+
) });
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1050
1192
|
// src/Checkbox/Checkbox.tsx
|
|
1051
|
-
import { Fragment as
|
|
1052
|
-
var CheckMark = () => /* @__PURE__ */
|
|
1193
|
+
import { Fragment as Fragment3, jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1194
|
+
var CheckMark = () => /* @__PURE__ */ jsx34("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx34(
|
|
1053
1195
|
"path",
|
|
1054
1196
|
{
|
|
1055
1197
|
fill: "currentColor",
|
|
@@ -1057,7 +1199,7 @@ var CheckMark = () => /* @__PURE__ */ jsx28("svg", { viewBox: "0 0 12 10", child
|
|
|
1057
1199
|
d: "M11.915 1.548 10.367 0 4.045 6.315 1.557 3.827 0 5.373l4.045 4.046 7.87-7.871Z"
|
|
1058
1200
|
}
|
|
1059
1201
|
) });
|
|
1060
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
1202
|
+
var IndeterminateMark = () => /* @__PURE__ */ jsx34("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx34(
|
|
1061
1203
|
"path",
|
|
1062
1204
|
{
|
|
1063
1205
|
fill: "currentColor",
|
|
@@ -1066,11 +1208,11 @@ var IndeterminateMark = () => /* @__PURE__ */ jsx28("svg", { width: "12", height
|
|
|
1066
1208
|
}
|
|
1067
1209
|
) });
|
|
1068
1210
|
var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
1069
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ jsx34(
|
|
1070
1212
|
"div",
|
|
1071
1213
|
{
|
|
1072
1214
|
"aria-hidden": "true",
|
|
1073
|
-
className:
|
|
1215
|
+
className: cn19(
|
|
1074
1216
|
"flex shrink-0 grow-0 basis-4 items-center justify-center",
|
|
1075
1217
|
"h-4 w-4 p-px",
|
|
1076
1218
|
"bg-white",
|
|
@@ -1078,11 +1220,11 @@ var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1078
1220
|
className
|
|
1079
1221
|
),
|
|
1080
1222
|
...props,
|
|
1081
|
-
children: indeterminate ? /* @__PURE__ */
|
|
1223
|
+
children: indeterminate ? /* @__PURE__ */ jsx34(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx34(CheckMark, {}) : null
|
|
1082
1224
|
}
|
|
1083
1225
|
);
|
|
1084
1226
|
};
|
|
1085
|
-
var _Checkbox =
|
|
1227
|
+
var _Checkbox = forwardRef15(
|
|
1086
1228
|
({
|
|
1087
1229
|
error,
|
|
1088
1230
|
disabled,
|
|
@@ -1108,23 +1250,23 @@ var _Checkbox = forwardRef11(
|
|
|
1108
1250
|
};
|
|
1109
1251
|
const { labelWidth } = useFieldGroupContext();
|
|
1110
1252
|
const group = useCheckboxGroupContext();
|
|
1111
|
-
const classNames2 =
|
|
1253
|
+
const classNames2 = useClassNames17({
|
|
1112
1254
|
component: "Checkbox",
|
|
1113
1255
|
variant: variant || (group == null ? void 0 : group.variant),
|
|
1114
1256
|
size: size || (group == null ? void 0 : group.size)
|
|
1115
1257
|
});
|
|
1116
|
-
const component = /* @__PURE__ */
|
|
1258
|
+
const component = /* @__PURE__ */ jsx34(
|
|
1117
1259
|
Checkbox,
|
|
1118
1260
|
{
|
|
1119
1261
|
ref,
|
|
1120
|
-
className:
|
|
1262
|
+
className: cn19(
|
|
1121
1263
|
"group/checkbox flex items-center gap-[0.5rem]",
|
|
1122
1264
|
"cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
1123
1265
|
classNames2.container
|
|
1124
1266
|
),
|
|
1125
1267
|
...props,
|
|
1126
|
-
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */
|
|
1268
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
1269
|
+
/* @__PURE__ */ jsx34(
|
|
1128
1270
|
Icon2,
|
|
1129
1271
|
{
|
|
1130
1272
|
checked: isSelected,
|
|
@@ -1132,63 +1274,19 @@ var _Checkbox = forwardRef11(
|
|
|
1132
1274
|
className: classNames2.checkbox
|
|
1133
1275
|
}
|
|
1134
1276
|
),
|
|
1135
|
-
/* @__PURE__ */
|
|
1277
|
+
children ? /* @__PURE__ */ jsx34("div", { className: classNames2.label, children }) : null
|
|
1136
1278
|
] })
|
|
1137
1279
|
}
|
|
1138
1280
|
);
|
|
1139
|
-
return !group && !!labelWidth ? /* @__PURE__ */
|
|
1281
|
+
return !group && !!labelWidth ? /* @__PURE__ */ jsx34(CheckboxField, { labelWidth, children: component }) : component;
|
|
1140
1282
|
}
|
|
1141
1283
|
);
|
|
1142
|
-
|
|
1143
|
-
// src/Checkbox/CheckboxGroup.tsx
|
|
1144
|
-
import { CheckboxGroup } from "react-aria-components";
|
|
1145
|
-
import { cn as cn19, useClassNames as useClassNames17 } from "@marigold/system";
|
|
1146
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1147
|
-
var _CheckboxGroup = ({
|
|
1148
|
-
children,
|
|
1149
|
-
variant,
|
|
1150
|
-
size,
|
|
1151
|
-
required,
|
|
1152
|
-
disabled,
|
|
1153
|
-
readOnly,
|
|
1154
|
-
error,
|
|
1155
|
-
width,
|
|
1156
|
-
orientation = "vertical",
|
|
1157
|
-
...rest
|
|
1158
|
-
}) => {
|
|
1159
|
-
const classNames2 = useClassNames17({
|
|
1160
|
-
component: "Checkbox",
|
|
1161
|
-
variant,
|
|
1162
|
-
size,
|
|
1163
|
-
className: { group: "gap-x-2" }
|
|
1164
|
-
});
|
|
1165
|
-
const props = {
|
|
1166
|
-
className: classNames2.group,
|
|
1167
|
-
isRequired: required,
|
|
1168
|
-
isDisabled: disabled,
|
|
1169
|
-
isReadOnly: readOnly,
|
|
1170
|
-
isInvalid: error,
|
|
1171
|
-
...rest
|
|
1172
|
-
};
|
|
1173
|
-
return /* @__PURE__ */ jsx29(FieldBase, { as: CheckboxGroup, width, ...props, children: /* @__PURE__ */ jsx29(
|
|
1174
|
-
"div",
|
|
1175
|
-
{
|
|
1176
|
-
role: "presentation",
|
|
1177
|
-
"data-orientation": orientation,
|
|
1178
|
-
className: cn19(
|
|
1179
|
-
classNames2.group,
|
|
1180
|
-
"flex items-start",
|
|
1181
|
-
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
1182
|
-
),
|
|
1183
|
-
children: /* @__PURE__ */ jsx29(CheckboxGroupContext.Provider, { value: { width, variant, size }, children })
|
|
1184
|
-
}
|
|
1185
|
-
) });
|
|
1186
|
-
};
|
|
1284
|
+
_Checkbox.Group = _CheckboxGroup;
|
|
1187
1285
|
|
|
1188
1286
|
// src/Columns/Columns.tsx
|
|
1189
1287
|
import { Children as Children3 } from "react";
|
|
1190
1288
|
import { cn as cn20, createVar as createVar7, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1191
|
-
import { jsx as
|
|
1289
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1192
1290
|
var Columns = ({
|
|
1193
1291
|
space = 0,
|
|
1194
1292
|
columns,
|
|
@@ -1204,7 +1302,7 @@ var Columns = ({
|
|
|
1204
1302
|
)}`
|
|
1205
1303
|
);
|
|
1206
1304
|
}
|
|
1207
|
-
return /* @__PURE__ */
|
|
1305
|
+
return /* @__PURE__ */ jsx35(
|
|
1208
1306
|
"div",
|
|
1209
1307
|
{
|
|
1210
1308
|
className: cn20(
|
|
@@ -1213,7 +1311,7 @@ var Columns = ({
|
|
|
1213
1311
|
gapSpace4[space]
|
|
1214
1312
|
),
|
|
1215
1313
|
...props,
|
|
1216
|
-
children: Children3.map(children, (child, idx) => /* @__PURE__ */
|
|
1314
|
+
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx35(
|
|
1217
1315
|
"div",
|
|
1218
1316
|
{
|
|
1219
1317
|
className: cn20(
|
|
@@ -1239,7 +1337,7 @@ import {
|
|
|
1239
1337
|
gridColumn,
|
|
1240
1338
|
placeItems
|
|
1241
1339
|
} from "@marigold/system";
|
|
1242
|
-
import { jsx as
|
|
1340
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1243
1341
|
var content = {
|
|
1244
1342
|
small: "20ch",
|
|
1245
1343
|
medium: "45ch",
|
|
@@ -1259,7 +1357,7 @@ var Container = ({
|
|
|
1259
1357
|
...props
|
|
1260
1358
|
}) => {
|
|
1261
1359
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1262
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ jsx36(
|
|
1263
1361
|
"div",
|
|
1264
1362
|
{
|
|
1265
1363
|
...props,
|
|
@@ -1278,19 +1376,55 @@ var Container = ({
|
|
|
1278
1376
|
// src/Dialog/Dialog.tsx
|
|
1279
1377
|
import { useContext as useContext6 } from "react";
|
|
1280
1378
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1379
|
+
import { cn as cn26, useClassNames as useClassNames23 } from "@marigold/system";
|
|
1380
|
+
|
|
1381
|
+
// src/Dialog/DialogActions.tsx
|
|
1382
|
+
import { cn as cn22, useClassNames as useClassNames18 } from "@marigold/system";
|
|
1383
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1384
|
+
var DialogActions = ({ variant, size, children }) => {
|
|
1385
|
+
const classNames2 = useClassNames18({ component: "Dialog", variant, size });
|
|
1386
|
+
return /* @__PURE__ */ jsx37("div", { className: cn22("[grid-area:actions]", classNames2.actions), children });
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
// src/Dialog/DialogContent.tsx
|
|
1281
1390
|
import { cn as cn23, useClassNames as useClassNames19 } from "@marigold/system";
|
|
1391
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1392
|
+
var DialogContent = ({
|
|
1393
|
+
variant,
|
|
1394
|
+
size,
|
|
1395
|
+
children
|
|
1396
|
+
}) => {
|
|
1397
|
+
const classNames2 = useClassNames19({ component: "Dialog", variant, size });
|
|
1398
|
+
return /* @__PURE__ */ jsx38("div", { className: cn23("[grid-area:content]", classNames2.content), children });
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
// src/Dialog/DialogTitle.tsx
|
|
1402
|
+
import { cn as cn25, useClassNames as useClassNames22 } from "@marigold/system";
|
|
1403
|
+
|
|
1404
|
+
// src/Header/Header.tsx
|
|
1405
|
+
import { Header as Header2 } from "react-aria-components";
|
|
1406
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
1407
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1408
|
+
var _Header = ({ variant, size, ...props }) => {
|
|
1409
|
+
const classNames2 = useClassNames20({
|
|
1410
|
+
component: "Header",
|
|
1411
|
+
variant,
|
|
1412
|
+
size
|
|
1413
|
+
});
|
|
1414
|
+
return /* @__PURE__ */ jsx39(Header2, { className: classNames2, ...props, children: props.children });
|
|
1415
|
+
};
|
|
1282
1416
|
|
|
1283
1417
|
// src/Headline/Headline.tsx
|
|
1284
1418
|
import { Heading } from "react-aria-components";
|
|
1285
1419
|
import {
|
|
1286
|
-
cn as
|
|
1420
|
+
cn as cn24,
|
|
1287
1421
|
createVar as createVar9,
|
|
1288
1422
|
getColor,
|
|
1289
1423
|
textAlign,
|
|
1290
|
-
useClassNames as
|
|
1424
|
+
useClassNames as useClassNames21,
|
|
1291
1425
|
useTheme as useTheme2
|
|
1292
1426
|
} from "@marigold/system";
|
|
1293
|
-
import { jsx as
|
|
1427
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1294
1428
|
var _Headline = ({
|
|
1295
1429
|
variant,
|
|
1296
1430
|
size,
|
|
@@ -1301,17 +1435,17 @@ var _Headline = ({
|
|
|
1301
1435
|
...props
|
|
1302
1436
|
}) => {
|
|
1303
1437
|
const theme = useTheme2();
|
|
1304
|
-
const classNames2 =
|
|
1438
|
+
const classNames2 = useClassNames21({
|
|
1305
1439
|
component: "Headline",
|
|
1306
1440
|
variant,
|
|
1307
1441
|
size: size != null ? size : `level-${level}`
|
|
1308
1442
|
});
|
|
1309
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ jsx40(
|
|
1310
1444
|
Heading,
|
|
1311
1445
|
{
|
|
1312
1446
|
level: Number(level),
|
|
1313
1447
|
...props,
|
|
1314
|
-
className:
|
|
1448
|
+
className: cn24(classNames2, "text-[--color]", textAlign[align]),
|
|
1315
1449
|
style: createVar9({
|
|
1316
1450
|
color: color && getColor(
|
|
1317
1451
|
theme,
|
|
@@ -1325,35 +1459,55 @@ var _Headline = ({
|
|
|
1325
1459
|
);
|
|
1326
1460
|
};
|
|
1327
1461
|
|
|
1462
|
+
// src/Dialog/DialogTitle.tsx
|
|
1463
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1464
|
+
var DialogTitle = ({
|
|
1465
|
+
level = "2",
|
|
1466
|
+
variant,
|
|
1467
|
+
size,
|
|
1468
|
+
children
|
|
1469
|
+
}) => {
|
|
1470
|
+
const classNames2 = useClassNames22({ component: "Dialog", variant, size });
|
|
1471
|
+
return /* @__PURE__ */ jsx41(_Header, { className: cn25("[grid-area:title]", classNames2.header), children: /* @__PURE__ */ jsx41(_Headline, { slot: "title", level, children }) });
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1328
1474
|
// src/Dialog/DialogTrigger.tsx
|
|
1329
1475
|
import { Children as Children4 } from "react";
|
|
1330
1476
|
import { DialogTrigger } from "react-aria-components";
|
|
1331
1477
|
|
|
1332
1478
|
// src/Overlay/Modal.tsx
|
|
1333
|
-
import { forwardRef as
|
|
1479
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
1334
1480
|
import { Modal } from "react-aria-components";
|
|
1335
|
-
import { jsx as
|
|
1336
|
-
var _Modal =
|
|
1481
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1482
|
+
var _Modal = forwardRef16(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
1337
1483
|
const props = {
|
|
1338
1484
|
isOpen: open,
|
|
1339
1485
|
isDismissable: dismissable,
|
|
1340
1486
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
1341
1487
|
...rest
|
|
1342
1488
|
};
|
|
1343
|
-
return /* @__PURE__ */
|
|
1489
|
+
return /* @__PURE__ */ jsx42(
|
|
1344
1490
|
Underlay,
|
|
1345
1491
|
{
|
|
1346
1492
|
dismissable,
|
|
1347
1493
|
keyboardDismissable,
|
|
1348
1494
|
open,
|
|
1349
1495
|
variant: "modal",
|
|
1350
|
-
children: /* @__PURE__ */
|
|
1496
|
+
children: /* @__PURE__ */ jsx42(
|
|
1497
|
+
Modal,
|
|
1498
|
+
{
|
|
1499
|
+
ref,
|
|
1500
|
+
className: "relative flex w-full justify-center",
|
|
1501
|
+
...props,
|
|
1502
|
+
children: props.children
|
|
1503
|
+
}
|
|
1504
|
+
)
|
|
1351
1505
|
}
|
|
1352
1506
|
);
|
|
1353
1507
|
});
|
|
1354
1508
|
|
|
1355
1509
|
// src/Dialog/DialogTrigger.tsx
|
|
1356
|
-
import { jsx as
|
|
1510
|
+
import { jsx as jsx43, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1357
1511
|
var _DialogTrigger = ({
|
|
1358
1512
|
open,
|
|
1359
1513
|
dismissable,
|
|
@@ -1370,10 +1524,10 @@ var _DialogTrigger = ({
|
|
|
1370
1524
|
const hasDialogTrigger = dialogTrigger.type !== _Dialog;
|
|
1371
1525
|
const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
|
|
1372
1526
|
if (isNonModal)
|
|
1373
|
-
return /* @__PURE__ */
|
|
1374
|
-
return /* @__PURE__ */
|
|
1527
|
+
return /* @__PURE__ */ jsx43(DialogTrigger, { ...props, children: props.children });
|
|
1528
|
+
return /* @__PURE__ */ jsxs15(DialogTrigger, { ...props, children: [
|
|
1375
1529
|
hasDialogTrigger && dialogTrigger,
|
|
1376
|
-
/* @__PURE__ */
|
|
1530
|
+
/* @__PURE__ */ jsx43(
|
|
1377
1531
|
_Modal,
|
|
1378
1532
|
{
|
|
1379
1533
|
dismissable,
|
|
@@ -1385,18 +1539,19 @@ var _DialogTrigger = ({
|
|
|
1385
1539
|
};
|
|
1386
1540
|
|
|
1387
1541
|
// src/Dialog/Dialog.tsx
|
|
1388
|
-
import {
|
|
1542
|
+
import { jsx as jsx44, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1389
1543
|
var CloseButton = ({ className }) => {
|
|
1390
|
-
const
|
|
1391
|
-
return /* @__PURE__ */
|
|
1544
|
+
const ctx = useContext6(OverlayTriggerStateContext);
|
|
1545
|
+
return /* @__PURE__ */ jsx44("div", { className: "absolute right-4 top-4 ml-4", children: /* @__PURE__ */ jsx44(
|
|
1392
1546
|
"button",
|
|
1393
1547
|
{
|
|
1394
|
-
className:
|
|
1548
|
+
className: cn26(
|
|
1395
1549
|
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
1396
1550
|
className
|
|
1397
1551
|
),
|
|
1398
|
-
onClick: close,
|
|
1399
|
-
|
|
1552
|
+
onClick: ctx == null ? void 0 : ctx.close,
|
|
1553
|
+
slot: "dismiss-button",
|
|
1554
|
+
children: /* @__PURE__ */ jsx44("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx44(
|
|
1400
1555
|
"path",
|
|
1401
1556
|
{
|
|
1402
1557
|
fillRule: "evenodd",
|
|
@@ -1407,7 +1562,6 @@ var CloseButton = ({ className }) => {
|
|
|
1407
1562
|
}
|
|
1408
1563
|
) });
|
|
1409
1564
|
};
|
|
1410
|
-
var DialogHeadline = ({ children }) => /* @__PURE__ */ jsx35(_Headline, { slot: "title", children });
|
|
1411
1565
|
var _Dialog = ({
|
|
1412
1566
|
variant,
|
|
1413
1567
|
size,
|
|
@@ -1415,59 +1569,63 @@ var _Dialog = ({
|
|
|
1415
1569
|
isNonModal,
|
|
1416
1570
|
...props
|
|
1417
1571
|
}) => {
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
}
|
|
1427
|
-
return /* @__PURE__ */ jsx35(
|
|
1572
|
+
var _a;
|
|
1573
|
+
const classNames2 = useClassNames23({ component: "Dialog", variant, size });
|
|
1574
|
+
const state = useContext6(OverlayTriggerStateContext);
|
|
1575
|
+
const children = typeof props.children === "function" ? props.children({
|
|
1576
|
+
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
1577
|
+
}
|
|
1578
|
+
}) : props.children;
|
|
1579
|
+
return /* @__PURE__ */ jsxs16(
|
|
1428
1580
|
Dialog,
|
|
1429
1581
|
{
|
|
1430
1582
|
...props,
|
|
1431
|
-
className:
|
|
1432
|
-
|
|
1433
|
-
|
|
1583
|
+
className: cn26(
|
|
1584
|
+
"relative outline-none [&>*:not(:last-child)]:mb-4",
|
|
1585
|
+
"grid [grid-template-areas:'title'_'content'_'actions']",
|
|
1586
|
+
classNames2.container
|
|
1587
|
+
),
|
|
1588
|
+
children: [
|
|
1589
|
+
closeButton && /* @__PURE__ */ jsx44(CloseButton, { className: classNames2.closeButton }),
|
|
1434
1590
|
children
|
|
1435
|
-
]
|
|
1591
|
+
]
|
|
1436
1592
|
}
|
|
1437
1593
|
);
|
|
1438
1594
|
};
|
|
1439
1595
|
_Dialog.Trigger = _DialogTrigger;
|
|
1440
|
-
_Dialog.
|
|
1596
|
+
_Dialog.Title = DialogTitle;
|
|
1597
|
+
_Dialog.Content = DialogContent;
|
|
1598
|
+
_Dialog.Actions = DialogActions;
|
|
1441
1599
|
|
|
1442
1600
|
// src/Divider/Divider.tsx
|
|
1443
1601
|
import { Separator } from "react-aria-components";
|
|
1444
|
-
import { cn as
|
|
1445
|
-
import { jsx as
|
|
1602
|
+
import { cn as cn27, useClassNames as useClassNames24 } from "@marigold/system";
|
|
1603
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
1446
1604
|
var _Divider = ({ variant, ...props }) => {
|
|
1447
|
-
const classNames2 =
|
|
1448
|
-
return /* @__PURE__ */
|
|
1605
|
+
const classNames2 = useClassNames24({ component: "Divider", variant });
|
|
1606
|
+
return /* @__PURE__ */ jsx45(Separator, { className: cn27("border-none", classNames2), ...props });
|
|
1449
1607
|
};
|
|
1450
1608
|
|
|
1451
1609
|
// src/Footer/Footer.tsx
|
|
1452
|
-
import { useClassNames as
|
|
1453
|
-
import { jsx as
|
|
1610
|
+
import { useClassNames as useClassNames25 } from "@marigold/system";
|
|
1611
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1454
1612
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1455
|
-
const classNames2 =
|
|
1456
|
-
return /* @__PURE__ */
|
|
1613
|
+
const classNames2 = useClassNames25({ component: "Footer", variant, size });
|
|
1614
|
+
return /* @__PURE__ */ jsx46("footer", { ...props, className: classNames2, children });
|
|
1457
1615
|
};
|
|
1458
1616
|
|
|
1459
1617
|
// src/Form/Form.tsx
|
|
1460
1618
|
import { Form } from "react-aria-components";
|
|
1461
1619
|
|
|
1462
1620
|
// src/Grid/Grid.tsx
|
|
1463
|
-
import { cn as
|
|
1621
|
+
import { cn as cn28, gapSpace as gapSpace5, height as twHeight } from "@marigold/system";
|
|
1464
1622
|
|
|
1465
1623
|
// src/Grid/GridArea.tsx
|
|
1466
|
-
import { jsx as
|
|
1467
|
-
var GridArea = ({ name, children }) => /* @__PURE__ */
|
|
1624
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1625
|
+
var GridArea = ({ name, children }) => /* @__PURE__ */ jsx47("div", { style: { gridArea: name }, children });
|
|
1468
1626
|
|
|
1469
1627
|
// src/Grid/Grid.tsx
|
|
1470
|
-
import { jsx as
|
|
1628
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1471
1629
|
var parseGridAreas = (areas) => areas.map((area) => `"${area}"`).join("\n");
|
|
1472
1630
|
var parseTemplateValue = (values) => values.map((val) => typeof val === "number" ? `${val}fr` : val).join(" ");
|
|
1473
1631
|
var Grid = ({
|
|
@@ -1479,10 +1637,10 @@ var Grid = ({
|
|
|
1479
1637
|
space = 0,
|
|
1480
1638
|
...props
|
|
1481
1639
|
}) => {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ jsx48(
|
|
1483
1641
|
"div",
|
|
1484
1642
|
{
|
|
1485
|
-
className:
|
|
1643
|
+
className: cn28("grid", gapSpace5[space], twHeight[height]),
|
|
1486
1644
|
style: {
|
|
1487
1645
|
gridTemplateAreas: parseGridAreas(areas),
|
|
1488
1646
|
gridTemplateColumns: parseTemplateValue(columns),
|
|
@@ -1495,27 +1653,14 @@ var Grid = ({
|
|
|
1495
1653
|
};
|
|
1496
1654
|
Grid.Area = GridArea;
|
|
1497
1655
|
|
|
1498
|
-
// src/Header/Header.tsx
|
|
1499
|
-
import { Header } from "react-aria-components";
|
|
1500
|
-
import { useClassNames as useClassNames22 } from "@marigold/system";
|
|
1501
|
-
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1502
|
-
var _Header = ({ variant, size, ...props }) => {
|
|
1503
|
-
const classNames2 = useClassNames22({
|
|
1504
|
-
component: "Header",
|
|
1505
|
-
variant,
|
|
1506
|
-
size
|
|
1507
|
-
});
|
|
1508
|
-
return /* @__PURE__ */ jsx40(Header, { className: classNames2, ...props, children: props.children });
|
|
1509
|
-
};
|
|
1510
|
-
|
|
1511
1656
|
// src/Image/Image.tsx
|
|
1512
1657
|
import {
|
|
1513
|
-
cn as
|
|
1658
|
+
cn as cn29,
|
|
1514
1659
|
objectFit,
|
|
1515
1660
|
objectPosition,
|
|
1516
|
-
useClassNames as
|
|
1661
|
+
useClassNames as useClassNames26
|
|
1517
1662
|
} from "@marigold/system";
|
|
1518
|
-
import { jsx as
|
|
1663
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1519
1664
|
var Image = ({
|
|
1520
1665
|
variant,
|
|
1521
1666
|
size,
|
|
@@ -1523,13 +1668,13 @@ var Image = ({
|
|
|
1523
1668
|
position = "none",
|
|
1524
1669
|
...props
|
|
1525
1670
|
}) => {
|
|
1526
|
-
const classNames2 =
|
|
1527
|
-
return /* @__PURE__ */
|
|
1671
|
+
const classNames2 = useClassNames26({ component: "Image", variant, size });
|
|
1672
|
+
return /* @__PURE__ */ jsx49(
|
|
1528
1673
|
"img",
|
|
1529
1674
|
{
|
|
1530
1675
|
...props,
|
|
1531
1676
|
alt: props.alt,
|
|
1532
|
-
className:
|
|
1677
|
+
className: cn29(
|
|
1533
1678
|
fit !== "none" && "h-full w-full",
|
|
1534
1679
|
classNames2,
|
|
1535
1680
|
objectFit[fit],
|
|
@@ -1540,8 +1685,8 @@ var Image = ({
|
|
|
1540
1685
|
};
|
|
1541
1686
|
|
|
1542
1687
|
// src/Inline/Inline.tsx
|
|
1543
|
-
import { alignment as alignment2, cn as
|
|
1544
|
-
import { jsx as
|
|
1688
|
+
import { alignment as alignment2, cn as cn30, gapSpace as gapSpace6 } from "@marigold/system";
|
|
1689
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
1545
1690
|
var Inline = ({
|
|
1546
1691
|
space = 0,
|
|
1547
1692
|
alignX,
|
|
@@ -1550,11 +1695,11 @@ var Inline = ({
|
|
|
1550
1695
|
...props
|
|
1551
1696
|
}) => {
|
|
1552
1697
|
var _a, _b, _c, _d;
|
|
1553
|
-
return /* @__PURE__ */
|
|
1698
|
+
return /* @__PURE__ */ jsx50(
|
|
1554
1699
|
"div",
|
|
1555
1700
|
{
|
|
1556
1701
|
...props,
|
|
1557
|
-
className:
|
|
1702
|
+
className: cn30(
|
|
1558
1703
|
"flex flex-wrap",
|
|
1559
1704
|
gapSpace6[space],
|
|
1560
1705
|
alignX && ((_b = (_a = alignment2) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -1566,19 +1711,19 @@ var Inline = ({
|
|
|
1566
1711
|
};
|
|
1567
1712
|
|
|
1568
1713
|
// src/DateField/DateField.tsx
|
|
1569
|
-
import { forwardRef as
|
|
1714
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
1570
1715
|
import { DateField } from "react-aria-components";
|
|
1571
1716
|
|
|
1572
1717
|
// src/DateField/DateInput.tsx
|
|
1573
1718
|
import { DateInput, Group } from "react-aria-components";
|
|
1574
|
-
import { useClassNames as
|
|
1719
|
+
import { useClassNames as useClassNames27 } from "@marigold/system";
|
|
1575
1720
|
|
|
1576
1721
|
// src/DateField/DateSegment.tsx
|
|
1577
1722
|
import { DateSegment } from "react-aria-components";
|
|
1578
|
-
import { cn as
|
|
1579
|
-
import { Fragment as Fragment4, jsx as
|
|
1723
|
+
import { cn as cn31 } from "@marigold/system";
|
|
1724
|
+
import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1580
1725
|
var _DateSegment = ({ segment, ...props }) => {
|
|
1581
|
-
return /* @__PURE__ */
|
|
1726
|
+
return /* @__PURE__ */ jsx51(
|
|
1582
1727
|
DateSegment,
|
|
1583
1728
|
{
|
|
1584
1729
|
...props,
|
|
@@ -1586,31 +1731,31 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1586
1731
|
style: {
|
|
1587
1732
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
1588
1733
|
},
|
|
1589
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1734
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
1735
|
+
/* @__PURE__ */ jsx51(
|
|
1591
1736
|
"span",
|
|
1592
1737
|
{
|
|
1593
1738
|
"aria-hidden": "true",
|
|
1594
|
-
className:
|
|
1739
|
+
className: cn31(
|
|
1595
1740
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1596
1741
|
"pointer-events-none w-full text-center"
|
|
1597
1742
|
),
|
|
1598
1743
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1599
1744
|
}
|
|
1600
1745
|
),
|
|
1601
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ jsx51("span", { children: isPlaceholder ? "" : segment.type === "month" || segment.type === "day" ? segment.text.padStart(2, "0") : text })
|
|
1602
1747
|
] })
|
|
1603
1748
|
}
|
|
1604
1749
|
);
|
|
1605
1750
|
};
|
|
1606
1751
|
|
|
1607
1752
|
// src/DateField/DateInput.tsx
|
|
1608
|
-
import { jsx as
|
|
1753
|
+
import { jsx as jsx52, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1609
1754
|
var _DateInput = ({ variant, size, action, ...props }) => {
|
|
1610
|
-
const classNames2 =
|
|
1611
|
-
return /* @__PURE__ */
|
|
1612
|
-
/* @__PURE__ */
|
|
1613
|
-
action ? action : /* @__PURE__ */
|
|
1755
|
+
const classNames2 = useClassNames27({ component: "DateField", variant, size });
|
|
1756
|
+
return /* @__PURE__ */ jsxs18(Group, { className: classNames2.field, children: [
|
|
1757
|
+
/* @__PURE__ */ jsx52(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx52(_DateSegment, { className: classNames2.segment, segment }) }),
|
|
1758
|
+
action ? action : /* @__PURE__ */ jsx52("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx52(
|
|
1614
1759
|
"svg",
|
|
1615
1760
|
{
|
|
1616
1761
|
"data-testid": "action",
|
|
@@ -1618,15 +1763,15 @@ var _DateInput = ({ variant, size, action, ...props }) => {
|
|
|
1618
1763
|
viewBox: "0 0 24 24",
|
|
1619
1764
|
width: 24,
|
|
1620
1765
|
height: 24,
|
|
1621
|
-
children: /* @__PURE__ */
|
|
1766
|
+
children: /* @__PURE__ */ jsx52("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
1622
1767
|
}
|
|
1623
1768
|
) })
|
|
1624
1769
|
] });
|
|
1625
1770
|
};
|
|
1626
1771
|
|
|
1627
1772
|
// src/DateField/DateField.tsx
|
|
1628
|
-
import { jsx as
|
|
1629
|
-
var _DateField =
|
|
1773
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
1774
|
+
var _DateField = forwardRef17(
|
|
1630
1775
|
({
|
|
1631
1776
|
variant,
|
|
1632
1777
|
size,
|
|
@@ -1644,7 +1789,7 @@ var _DateField = forwardRef13(
|
|
|
1644
1789
|
isRequired: required,
|
|
1645
1790
|
...rest
|
|
1646
1791
|
};
|
|
1647
|
-
return /* @__PURE__ */
|
|
1792
|
+
return /* @__PURE__ */ jsx53(
|
|
1648
1793
|
FieldBase,
|
|
1649
1794
|
{
|
|
1650
1795
|
as: DateField,
|
|
@@ -1652,7 +1797,7 @@ var _DateField = forwardRef13(
|
|
|
1652
1797
|
size,
|
|
1653
1798
|
ref,
|
|
1654
1799
|
...props,
|
|
1655
|
-
children: /* @__PURE__ */
|
|
1800
|
+
children: /* @__PURE__ */ jsx53(_DateInput, { action })
|
|
1656
1801
|
}
|
|
1657
1802
|
);
|
|
1658
1803
|
}
|
|
@@ -1661,7 +1806,7 @@ var _DateField = forwardRef13(
|
|
|
1661
1806
|
// src/Calendar/Calendar.tsx
|
|
1662
1807
|
import { useState } from "react";
|
|
1663
1808
|
import { Calendar } from "react-aria-components";
|
|
1664
|
-
import { cn as
|
|
1809
|
+
import { cn as cn35, useClassNames as useClassNames32 } from "@marigold/system";
|
|
1665
1810
|
|
|
1666
1811
|
// src/Calendar/CalendarGrid.tsx
|
|
1667
1812
|
import {
|
|
@@ -1669,7 +1814,7 @@ import {
|
|
|
1669
1814
|
CalendarGrid,
|
|
1670
1815
|
CalendarGridBody
|
|
1671
1816
|
} from "react-aria-components";
|
|
1672
|
-
import { cn as
|
|
1817
|
+
import { cn as cn32, useClassNames as useClassNames29 } from "@marigold/system";
|
|
1673
1818
|
|
|
1674
1819
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1675
1820
|
import { startOfWeek, today } from "@internationalized/date";
|
|
@@ -1677,8 +1822,8 @@ import { useContext as useContext7, useMemo } from "react";
|
|
|
1677
1822
|
import { CalendarStateContext } from "react-aria-components";
|
|
1678
1823
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1679
1824
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1680
|
-
import { useClassNames as
|
|
1681
|
-
import { jsx as
|
|
1825
|
+
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
1826
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
1682
1827
|
function CalendarGridHeader(props) {
|
|
1683
1828
|
const state = useContext7(CalendarStateContext);
|
|
1684
1829
|
const { headerProps } = useCalendarGrid(props, state);
|
|
@@ -1695,21 +1840,21 @@ function CalendarGridHeader(props) {
|
|
|
1695
1840
|
return dayFormatter.format(dateDay);
|
|
1696
1841
|
});
|
|
1697
1842
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1698
|
-
const classNames2 =
|
|
1699
|
-
return /* @__PURE__ */
|
|
1843
|
+
const classNames2 = useClassNames28({ component: "Calendar" });
|
|
1844
|
+
return /* @__PURE__ */ jsx54("thead", { ...headerProps, children: /* @__PURE__ */ jsx54("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx54("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
|
|
1700
1845
|
}
|
|
1701
1846
|
|
|
1702
1847
|
// src/Calendar/CalendarGrid.tsx
|
|
1703
|
-
import { jsx as
|
|
1848
|
+
import { jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1704
1849
|
var _CalendarGrid = () => {
|
|
1705
|
-
const classNames2 =
|
|
1706
|
-
return /* @__PURE__ */
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1850
|
+
const classNames2 = useClassNames29({ component: "Calendar" });
|
|
1851
|
+
return /* @__PURE__ */ jsxs19(CalendarGrid, { className: classNames2.calendarGrid, children: [
|
|
1852
|
+
/* @__PURE__ */ jsx55(CalendarGridHeader, {}),
|
|
1853
|
+
/* @__PURE__ */ jsx55(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx55(
|
|
1709
1854
|
CalendarCell,
|
|
1710
1855
|
{
|
|
1711
1856
|
date,
|
|
1712
|
-
className:
|
|
1857
|
+
className: cn32(
|
|
1713
1858
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1714
1859
|
classNames2.calendarCell
|
|
1715
1860
|
)
|
|
@@ -1721,8 +1866,7 @@ var _CalendarGrid = () => {
|
|
|
1721
1866
|
// src/Calendar/CalendarListBox.tsx
|
|
1722
1867
|
import { useContext as useContext8 } from "react";
|
|
1723
1868
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1724
|
-
import {
|
|
1725
|
-
import { cn as cn30, useClassNames as useClassNames27 } from "@marigold/system";
|
|
1869
|
+
import { cn as cn33, useClassNames as useClassNames30 } from "@marigold/system";
|
|
1726
1870
|
|
|
1727
1871
|
// src/Calendar/useFormattedMonths.tsx
|
|
1728
1872
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -1741,7 +1885,7 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
1741
1885
|
}
|
|
1742
1886
|
|
|
1743
1887
|
// src/Calendar/CalendarListBox.tsx
|
|
1744
|
-
import { jsx as
|
|
1888
|
+
import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1745
1889
|
function CalendarListBox({
|
|
1746
1890
|
type,
|
|
1747
1891
|
isDisabled,
|
|
@@ -1750,17 +1894,17 @@ function CalendarListBox({
|
|
|
1750
1894
|
const state = useContext8(CalendarStateContext2);
|
|
1751
1895
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1752
1896
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1753
|
-
const { select: selectClassNames } =
|
|
1754
|
-
return /* @__PURE__ */
|
|
1897
|
+
const { select: selectClassNames } = useClassNames30({ component: "Select" });
|
|
1898
|
+
return /* @__PURE__ */ jsxs20(
|
|
1755
1899
|
"button",
|
|
1756
1900
|
{
|
|
1757
1901
|
disabled: isDisabled,
|
|
1758
1902
|
onClick: () => setSelectedDropdown(type),
|
|
1759
|
-
className:
|
|
1903
|
+
className: cn33(buttonStyles, selectClassNames),
|
|
1760
1904
|
"data-testid": type,
|
|
1761
1905
|
children: [
|
|
1762
1906
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
1763
|
-
/* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ jsx56(ChevronDown, {})
|
|
1764
1908
|
]
|
|
1765
1909
|
}
|
|
1766
1910
|
);
|
|
@@ -1768,40 +1912,39 @@ function CalendarListBox({
|
|
|
1768
1912
|
|
|
1769
1913
|
// src/Calendar/MonthControls.tsx
|
|
1770
1914
|
import { Button as Button3 } from "react-aria-components";
|
|
1771
|
-
import {
|
|
1772
|
-
import {
|
|
1773
|
-
import { jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1915
|
+
import { cn as cn34, useClassNames as useClassNames31 } from "@marigold/system";
|
|
1916
|
+
import { jsx as jsx57, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1774
1917
|
function MonthControls() {
|
|
1775
|
-
const classNames2 =
|
|
1776
|
-
const buttonClassNames =
|
|
1777
|
-
return /* @__PURE__ */
|
|
1918
|
+
const classNames2 = useClassNames31({ component: "Calendar" });
|
|
1919
|
+
const buttonClassNames = useClassNames31({ component: "Button" });
|
|
1920
|
+
return /* @__PURE__ */ jsxs21(
|
|
1778
1921
|
"div",
|
|
1779
1922
|
{
|
|
1780
|
-
className:
|
|
1923
|
+
className: cn34(
|
|
1781
1924
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
1782
1925
|
classNames2.calendarControllers
|
|
1783
1926
|
),
|
|
1784
1927
|
children: [
|
|
1785
|
-
/* @__PURE__ */
|
|
1928
|
+
/* @__PURE__ */ jsx57(
|
|
1786
1929
|
Button3,
|
|
1787
1930
|
{
|
|
1788
|
-
className:
|
|
1931
|
+
className: cn34(
|
|
1789
1932
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1790
1933
|
buttonClassNames
|
|
1791
1934
|
),
|
|
1792
1935
|
slot: "previous",
|
|
1793
|
-
children: /* @__PURE__ */
|
|
1936
|
+
children: /* @__PURE__ */ jsx57(ChevronLeft, {})
|
|
1794
1937
|
}
|
|
1795
1938
|
),
|
|
1796
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ jsx57(
|
|
1797
1940
|
Button3,
|
|
1798
1941
|
{
|
|
1799
|
-
className:
|
|
1942
|
+
className: cn34(
|
|
1800
1943
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1801
1944
|
buttonClassNames
|
|
1802
1945
|
),
|
|
1803
1946
|
slot: "next",
|
|
1804
|
-
children: /* @__PURE__ */
|
|
1947
|
+
children: /* @__PURE__ */ jsx57(ChevronRight, {})
|
|
1805
1948
|
}
|
|
1806
1949
|
)
|
|
1807
1950
|
]
|
|
@@ -1813,7 +1956,7 @@ var MonthControls_default = MonthControls;
|
|
|
1813
1956
|
// src/Calendar/MonthListBox.tsx
|
|
1814
1957
|
import { useContext as useContext9 } from "react";
|
|
1815
1958
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
1816
|
-
import { jsx as
|
|
1959
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
1817
1960
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1818
1961
|
const state = useContext9(CalendarStateContext3);
|
|
1819
1962
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
@@ -1822,13 +1965,13 @@ var MonthListBox = ({ setSelectedDropdown }) => {
|
|
|
1822
1965
|
let date = state.focusedDate.set({ month: value });
|
|
1823
1966
|
state.setFocusedDate(date);
|
|
1824
1967
|
};
|
|
1825
|
-
return /* @__PURE__ */
|
|
1968
|
+
return /* @__PURE__ */ jsx58(
|
|
1826
1969
|
"ul",
|
|
1827
1970
|
{
|
|
1828
1971
|
"data-testid": "monthOptions",
|
|
1829
1972
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1830
1973
|
children: months.map((month, index) => {
|
|
1831
|
-
return /* @__PURE__ */
|
|
1974
|
+
return /* @__PURE__ */ jsx58("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx58(
|
|
1832
1975
|
_Button,
|
|
1833
1976
|
{
|
|
1834
1977
|
slot: "previous",
|
|
@@ -1856,7 +1999,7 @@ import {
|
|
|
1856
1999
|
} from "react";
|
|
1857
2000
|
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
1858
2001
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
1859
|
-
import { jsx as
|
|
2002
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
1860
2003
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1861
2004
|
const state = useContext10(CalendarStateContext4);
|
|
1862
2005
|
const years = [];
|
|
@@ -1886,19 +2029,19 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1886
2029
|
let date = years[index].value;
|
|
1887
2030
|
state.setFocusedDate(date);
|
|
1888
2031
|
};
|
|
1889
|
-
return /* @__PURE__ */
|
|
2032
|
+
return /* @__PURE__ */ jsx59(
|
|
1890
2033
|
"ul",
|
|
1891
2034
|
{
|
|
1892
2035
|
"data-testid": "yearOptions",
|
|
1893
2036
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1894
2037
|
children: years.map((year, index) => {
|
|
1895
2038
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
1896
|
-
return /* @__PURE__ */
|
|
2039
|
+
return /* @__PURE__ */ jsx59("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx59(
|
|
1897
2040
|
"div",
|
|
1898
2041
|
{
|
|
1899
2042
|
ref: isActive ? activeButtonRef : null,
|
|
1900
2043
|
style: { height: "100%", width: "100%" },
|
|
1901
|
-
children: /* @__PURE__ */
|
|
2044
|
+
children: /* @__PURE__ */ jsx59(
|
|
1902
2045
|
_Button,
|
|
1903
2046
|
{
|
|
1904
2047
|
slot: "previous",
|
|
@@ -1923,7 +2066,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1923
2066
|
var YearListBox_default = YearListBox;
|
|
1924
2067
|
|
|
1925
2068
|
// src/Calendar/Calendar.tsx
|
|
1926
|
-
import { Fragment as Fragment5, jsx as
|
|
2069
|
+
import { Fragment as Fragment5, jsx as jsx60, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1927
2070
|
var _Calendar = ({
|
|
1928
2071
|
disabled,
|
|
1929
2072
|
readOnly,
|
|
@@ -1936,24 +2079,24 @@ var _Calendar = ({
|
|
|
1936
2079
|
isReadOnly: readOnly,
|
|
1937
2080
|
...rest
|
|
1938
2081
|
};
|
|
1939
|
-
const classNames2 =
|
|
2082
|
+
const classNames2 = useClassNames32({ component: "Calendar" });
|
|
1940
2083
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1941
2084
|
const ViewMap = {
|
|
1942
|
-
month: /* @__PURE__ */
|
|
1943
|
-
year: /* @__PURE__ */
|
|
2085
|
+
month: /* @__PURE__ */ jsx60(MonthListBox_default, { setSelectedDropdown }),
|
|
2086
|
+
year: /* @__PURE__ */ jsx60(YearListBox_default, { setSelectedDropdown })
|
|
1944
2087
|
};
|
|
1945
|
-
return /* @__PURE__ */
|
|
2088
|
+
return /* @__PURE__ */ jsx60(
|
|
1946
2089
|
Calendar,
|
|
1947
2090
|
{
|
|
1948
|
-
className:
|
|
2091
|
+
className: cn35(
|
|
1949
2092
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4",
|
|
1950
2093
|
classNames2.calendar
|
|
1951
2094
|
),
|
|
1952
2095
|
...props,
|
|
1953
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
2096
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
2097
|
+
/* @__PURE__ */ jsxs22("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2098
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex w-full gap-4", children: [
|
|
2099
|
+
/* @__PURE__ */ jsx60(
|
|
1957
2100
|
CalendarListBox,
|
|
1958
2101
|
{
|
|
1959
2102
|
type: "month",
|
|
@@ -1961,7 +2104,7 @@ var _Calendar = ({
|
|
|
1961
2104
|
setSelectedDropdown
|
|
1962
2105
|
}
|
|
1963
2106
|
),
|
|
1964
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ jsx60(
|
|
1965
2108
|
CalendarListBox,
|
|
1966
2109
|
{
|
|
1967
2110
|
type: "year",
|
|
@@ -1970,21 +2113,22 @@ var _Calendar = ({
|
|
|
1970
2113
|
}
|
|
1971
2114
|
)
|
|
1972
2115
|
] }),
|
|
1973
|
-
/* @__PURE__ */
|
|
2116
|
+
/* @__PURE__ */ jsx60(MonthControls_default, {})
|
|
1974
2117
|
] }),
|
|
1975
|
-
/* @__PURE__ */
|
|
2118
|
+
/* @__PURE__ */ jsx60(_CalendarGrid, {})
|
|
1976
2119
|
] })
|
|
1977
2120
|
}
|
|
1978
2121
|
);
|
|
1979
2122
|
};
|
|
1980
2123
|
|
|
1981
2124
|
// src/DatePicker/DatePicker.tsx
|
|
1982
|
-
import
|
|
2125
|
+
import React6 from "react";
|
|
1983
2126
|
import { DatePicker } from "react-aria-components";
|
|
1984
|
-
import { useClassNames as
|
|
1985
|
-
import { jsx as
|
|
1986
|
-
var _DatePicker =
|
|
2127
|
+
import { useClassNames as useClassNames33 } from "@marigold/system";
|
|
2128
|
+
import { jsx as jsx61, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2129
|
+
var _DatePicker = React6.forwardRef(
|
|
1987
2130
|
({
|
|
2131
|
+
dateUnavailable,
|
|
1988
2132
|
disabled,
|
|
1989
2133
|
required,
|
|
1990
2134
|
readOnly,
|
|
@@ -1996,6 +2140,7 @@ var _DatePicker = React4.forwardRef(
|
|
|
1996
2140
|
...rest
|
|
1997
2141
|
}, ref) => {
|
|
1998
2142
|
const props = {
|
|
2143
|
+
isDateUnavailable: dateUnavailable,
|
|
1999
2144
|
isDisabled: disabled,
|
|
2000
2145
|
isReadOnly: readOnly,
|
|
2001
2146
|
isRequired: required,
|
|
@@ -2004,12 +2149,12 @@ var _DatePicker = React4.forwardRef(
|
|
|
2004
2149
|
granularity,
|
|
2005
2150
|
...rest
|
|
2006
2151
|
};
|
|
2007
|
-
const classNames2 =
|
|
2152
|
+
const classNames2 = useClassNames33({
|
|
2008
2153
|
component: "DatePicker",
|
|
2009
2154
|
size,
|
|
2010
2155
|
variant
|
|
2011
2156
|
});
|
|
2012
|
-
return /* @__PURE__ */
|
|
2157
|
+
return /* @__PURE__ */ jsxs23(
|
|
2013
2158
|
FieldBase,
|
|
2014
2159
|
{
|
|
2015
2160
|
as: DatePicker,
|
|
@@ -2018,16 +2163,16 @@ var _DatePicker = React4.forwardRef(
|
|
|
2018
2163
|
...props,
|
|
2019
2164
|
ref,
|
|
2020
2165
|
children: [
|
|
2021
|
-
/* @__PURE__ */
|
|
2166
|
+
/* @__PURE__ */ jsx61(
|
|
2022
2167
|
_DateInput,
|
|
2023
2168
|
{
|
|
2024
|
-
action: /* @__PURE__ */
|
|
2169
|
+
action: /* @__PURE__ */ jsx61("div", { className: classNames2.container, children: /* @__PURE__ */ jsx61(
|
|
2025
2170
|
_Button,
|
|
2026
2171
|
{
|
|
2027
2172
|
size: "small",
|
|
2028
2173
|
disabled,
|
|
2029
2174
|
className: classNames2.button,
|
|
2030
|
-
children: /* @__PURE__ */
|
|
2175
|
+
children: /* @__PURE__ */ jsx61(
|
|
2031
2176
|
"svg",
|
|
2032
2177
|
{
|
|
2033
2178
|
"data-testid": "action",
|
|
@@ -2035,14 +2180,14 @@ var _DatePicker = React4.forwardRef(
|
|
|
2035
2180
|
width: 24,
|
|
2036
2181
|
height: 24,
|
|
2037
2182
|
fill: "currentColor",
|
|
2038
|
-
children: /* @__PURE__ */
|
|
2183
|
+
children: /* @__PURE__ */ jsx61("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
2039
2184
|
}
|
|
2040
2185
|
)
|
|
2041
2186
|
}
|
|
2042
2187
|
) })
|
|
2043
2188
|
}
|
|
2044
2189
|
),
|
|
2045
|
-
/* @__PURE__ */
|
|
2190
|
+
/* @__PURE__ */ jsx61(_Popover, { children: /* @__PURE__ */ jsx61(_Calendar, { disabled }) })
|
|
2046
2191
|
]
|
|
2047
2192
|
}
|
|
2048
2193
|
);
|
|
@@ -2051,16 +2196,16 @@ var _DatePicker = React4.forwardRef(
|
|
|
2051
2196
|
|
|
2052
2197
|
// src/Inset/Inset.tsx
|
|
2053
2198
|
import {
|
|
2054
|
-
cn as
|
|
2199
|
+
cn as cn36,
|
|
2055
2200
|
paddingSpace as paddingSpace2,
|
|
2056
2201
|
paddingSpaceX as paddingSpaceX2,
|
|
2057
2202
|
paddingSpaceY as paddingSpaceY2
|
|
2058
2203
|
} from "@marigold/system";
|
|
2059
|
-
import { jsx as
|
|
2060
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
2204
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2205
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx62(
|
|
2061
2206
|
"div",
|
|
2062
2207
|
{
|
|
2063
|
-
className:
|
|
2208
|
+
className: cn36(
|
|
2064
2209
|
space && paddingSpace2[space],
|
|
2065
2210
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
2066
2211
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -2070,23 +2215,23 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx54(
|
|
|
2070
2215
|
);
|
|
2071
2216
|
|
|
2072
2217
|
// src/Link/Link.tsx
|
|
2073
|
-
import { forwardRef as
|
|
2218
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
2074
2219
|
import { Link } from "react-aria-components";
|
|
2075
|
-
import { useClassNames as
|
|
2076
|
-
import { jsx as
|
|
2077
|
-
var _Link =
|
|
2220
|
+
import { useClassNames as useClassNames34 } from "@marigold/system";
|
|
2221
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2222
|
+
var _Link = forwardRef18(
|
|
2078
2223
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
2079
|
-
const classNames2 =
|
|
2224
|
+
const classNames2 = useClassNames34({
|
|
2080
2225
|
component: "Link",
|
|
2081
2226
|
variant,
|
|
2082
2227
|
size
|
|
2083
2228
|
});
|
|
2084
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ jsx63(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
2085
2230
|
}
|
|
2086
2231
|
);
|
|
2087
2232
|
|
|
2088
2233
|
// src/List/List.tsx
|
|
2089
|
-
import { useClassNames as
|
|
2234
|
+
import { useClassNames as useClassNames35 } from "@marigold/system";
|
|
2090
2235
|
|
|
2091
2236
|
// src/List/Context.ts
|
|
2092
2237
|
import { createContext as createContext5, useContext as useContext11 } from "react";
|
|
@@ -2094,14 +2239,14 @@ var ListContext = createContext5({});
|
|
|
2094
2239
|
var useListContext = () => useContext11(ListContext);
|
|
2095
2240
|
|
|
2096
2241
|
// src/List/ListItem.tsx
|
|
2097
|
-
import { jsx as
|
|
2242
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2098
2243
|
var ListItem = ({ children, ...props }) => {
|
|
2099
2244
|
const { classNames: classNames2 } = useListContext();
|
|
2100
|
-
return /* @__PURE__ */
|
|
2245
|
+
return /* @__PURE__ */ jsx64("li", { ...props, className: classNames2, children });
|
|
2101
2246
|
};
|
|
2102
2247
|
|
|
2103
2248
|
// src/List/List.tsx
|
|
2104
|
-
import { jsx as
|
|
2249
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2105
2250
|
var List = ({
|
|
2106
2251
|
as = "ul",
|
|
2107
2252
|
children,
|
|
@@ -2110,38 +2255,38 @@ var List = ({
|
|
|
2110
2255
|
...props
|
|
2111
2256
|
}) => {
|
|
2112
2257
|
const Component = as;
|
|
2113
|
-
const classNames2 =
|
|
2114
|
-
return /* @__PURE__ */
|
|
2258
|
+
const classNames2 = useClassNames35({ component: "List", variant, size });
|
|
2259
|
+
return /* @__PURE__ */ jsx65(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx65(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2115
2260
|
};
|
|
2116
2261
|
List.Item = ListItem;
|
|
2117
2262
|
|
|
2118
2263
|
// src/Menu/Menu.tsx
|
|
2119
2264
|
import { Menu, MenuTrigger } from "react-aria-components";
|
|
2120
|
-
import { useClassNames as
|
|
2265
|
+
import { useClassNames as useClassNames38 } from "@marigold/system";
|
|
2121
2266
|
|
|
2122
2267
|
// src/Menu/MenuItem.tsx
|
|
2123
2268
|
import { MenuItem } from "react-aria-components";
|
|
2124
|
-
import { useClassNames as
|
|
2125
|
-
import { jsx as
|
|
2269
|
+
import { useClassNames as useClassNames36 } from "@marigold/system";
|
|
2270
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2126
2271
|
var _MenuItem = ({ children, ...props }) => {
|
|
2127
|
-
const classNames2 =
|
|
2128
|
-
return /* @__PURE__ */
|
|
2272
|
+
const classNames2 = useClassNames36({ component: "Menu" });
|
|
2273
|
+
return /* @__PURE__ */ jsx66(MenuItem, { ...props, className: classNames2.item, children });
|
|
2129
2274
|
};
|
|
2130
2275
|
|
|
2131
2276
|
// src/Menu/MenuSection.tsx
|
|
2132
2277
|
import { Section as Section2 } from "react-aria-components";
|
|
2133
|
-
import { useClassNames as
|
|
2134
|
-
import { jsx as
|
|
2278
|
+
import { useClassNames as useClassNames37 } from "@marigold/system";
|
|
2279
|
+
import { jsx as jsx67, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2135
2280
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2136
|
-
const className =
|
|
2137
|
-
return /* @__PURE__ */
|
|
2138
|
-
/* @__PURE__ */
|
|
2281
|
+
const className = useClassNames37({ component: "Menu" });
|
|
2282
|
+
return /* @__PURE__ */ jsxs24(Section2, { ...props, children: [
|
|
2283
|
+
/* @__PURE__ */ jsx67(_Header, { className: className.section, children: title }),
|
|
2139
2284
|
children
|
|
2140
2285
|
] });
|
|
2141
2286
|
};
|
|
2142
2287
|
|
|
2143
2288
|
// src/Menu/Menu.tsx
|
|
2144
|
-
import { jsx as
|
|
2289
|
+
import { jsx as jsx68, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2145
2290
|
var _Menu = ({
|
|
2146
2291
|
children,
|
|
2147
2292
|
label,
|
|
@@ -2150,12 +2295,13 @@ var _Menu = ({
|
|
|
2150
2295
|
disabled,
|
|
2151
2296
|
open,
|
|
2152
2297
|
placement,
|
|
2298
|
+
"aria-label": ariaLabel,
|
|
2153
2299
|
...props
|
|
2154
2300
|
}) => {
|
|
2155
|
-
const classNames2 =
|
|
2156
|
-
return /* @__PURE__ */
|
|
2157
|
-
/* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */
|
|
2301
|
+
const classNames2 = useClassNames38({ component: "Menu", variant, size });
|
|
2302
|
+
return /* @__PURE__ */ jsxs25(MenuTrigger, { ...props, children: [
|
|
2303
|
+
/* @__PURE__ */ jsx68(_Button, { variant: "menu", disabled, "aria-label": ariaLabel, children: label }),
|
|
2304
|
+
/* @__PURE__ */ jsx68(_Popover, { open, placement, children: /* @__PURE__ */ jsx68(Menu, { ...props, className: classNames2.container, children }) })
|
|
2159
2305
|
] });
|
|
2160
2306
|
};
|
|
2161
2307
|
_Menu.Item = _MenuItem;
|
|
@@ -2163,23 +2309,24 @@ _Menu.Section = _MenuSection;
|
|
|
2163
2309
|
|
|
2164
2310
|
// src/Menu/ActionMenu.tsx
|
|
2165
2311
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
2166
|
-
import { SVG as
|
|
2167
|
-
import { jsx as
|
|
2312
|
+
import { SVG as SVG9, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2313
|
+
import { jsx as jsx69, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2168
2314
|
var ActionMenu = ({
|
|
2169
2315
|
variant,
|
|
2170
2316
|
size,
|
|
2171
2317
|
disabled,
|
|
2172
2318
|
...props
|
|
2173
2319
|
}) => {
|
|
2174
|
-
const classNames2 =
|
|
2175
|
-
return /* @__PURE__ */
|
|
2176
|
-
/* @__PURE__ */
|
|
2177
|
-
/* @__PURE__ */
|
|
2320
|
+
const classNames2 = useClassNames39({ component: "Menu", variant, size });
|
|
2321
|
+
return /* @__PURE__ */ jsxs26(MenuTrigger2, { children: [
|
|
2322
|
+
/* @__PURE__ */ jsx69(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx69(SVG9, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx69("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
2323
|
+
/* @__PURE__ */ jsx69(_Popover, { children: /* @__PURE__ */ jsx69(Menu2, { ...props, className: classNames2.container, children: props.children }) })
|
|
2178
2324
|
] });
|
|
2179
2325
|
};
|
|
2180
2326
|
|
|
2181
2327
|
// src/SectionMessage/SectionMessage.tsx
|
|
2182
|
-
import {
|
|
2328
|
+
import { useState as useState2 } from "react";
|
|
2329
|
+
import { cn as cn39, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2183
2330
|
|
|
2184
2331
|
// src/SectionMessage/Context.tsx
|
|
2185
2332
|
import { createContext as createContext6, useContext as useContext12 } from "react";
|
|
@@ -2187,33 +2334,33 @@ var SectionMessageContext = createContext6({});
|
|
|
2187
2334
|
var useSectionMessageContext = () => useContext12(SectionMessageContext);
|
|
2188
2335
|
|
|
2189
2336
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
2190
|
-
import { cn as
|
|
2191
|
-
import { jsx as
|
|
2337
|
+
import { cn as cn37 } from "@marigold/system";
|
|
2338
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2192
2339
|
var SectionMessageContent = ({
|
|
2193
2340
|
children
|
|
2194
2341
|
}) => {
|
|
2195
2342
|
const { classNames: classNames2 } = useSectionMessageContext();
|
|
2196
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ jsx70("div", { className: cn37("[grid-area:content]", classNames2.content), children });
|
|
2197
2344
|
};
|
|
2198
2345
|
|
|
2199
2346
|
// src/SectionMessage/SectionMessageTitle.tsx
|
|
2200
|
-
import { cn as
|
|
2201
|
-
import { jsx as
|
|
2347
|
+
import { cn as cn38 } from "@marigold/system";
|
|
2348
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2202
2349
|
var SectionMessageTitle = ({ children }) => {
|
|
2203
2350
|
const { classNames: classNames2 } = useSectionMessageContext();
|
|
2204
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsx71("div", { className: cn38("[grid-area:title]", classNames2.title), children });
|
|
2205
2352
|
};
|
|
2206
2353
|
|
|
2207
2354
|
// src/SectionMessage/SectionMessage.tsx
|
|
2208
|
-
import { jsx as
|
|
2355
|
+
import { jsx as jsx72, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2209
2356
|
var icons = {
|
|
2210
|
-
success: () => /* @__PURE__ */
|
|
2357
|
+
success: () => /* @__PURE__ */ jsx72(
|
|
2211
2358
|
"svg",
|
|
2212
2359
|
{
|
|
2213
2360
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2214
2361
|
viewBox: "0 0 24 24",
|
|
2215
2362
|
fill: "currentColor",
|
|
2216
|
-
children: /* @__PURE__ */
|
|
2363
|
+
children: /* @__PURE__ */ jsx72(
|
|
2217
2364
|
"path",
|
|
2218
2365
|
{
|
|
2219
2366
|
fillRule: "evenodd",
|
|
@@ -2223,13 +2370,13 @@ var icons = {
|
|
|
2223
2370
|
)
|
|
2224
2371
|
}
|
|
2225
2372
|
),
|
|
2226
|
-
info: () => /* @__PURE__ */
|
|
2373
|
+
info: () => /* @__PURE__ */ jsx72(
|
|
2227
2374
|
"svg",
|
|
2228
2375
|
{
|
|
2229
2376
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2230
2377
|
viewBox: "0 0 24 24",
|
|
2231
2378
|
fill: "currentColor",
|
|
2232
|
-
children: /* @__PURE__ */
|
|
2379
|
+
children: /* @__PURE__ */ jsx72(
|
|
2233
2380
|
"path",
|
|
2234
2381
|
{
|
|
2235
2382
|
fillRule: "evenodd",
|
|
@@ -2239,13 +2386,13 @@ var icons = {
|
|
|
2239
2386
|
)
|
|
2240
2387
|
}
|
|
2241
2388
|
),
|
|
2242
|
-
warning: () => /* @__PURE__ */
|
|
2389
|
+
warning: () => /* @__PURE__ */ jsx72(
|
|
2243
2390
|
"svg",
|
|
2244
2391
|
{
|
|
2245
2392
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2246
2393
|
viewBox: "0 0 24 24",
|
|
2247
2394
|
fill: "currentColor",
|
|
2248
|
-
children: /* @__PURE__ */
|
|
2395
|
+
children: /* @__PURE__ */ jsx72(
|
|
2249
2396
|
"path",
|
|
2250
2397
|
{
|
|
2251
2398
|
fillRule: "evenodd",
|
|
@@ -2255,13 +2402,13 @@ var icons = {
|
|
|
2255
2402
|
)
|
|
2256
2403
|
}
|
|
2257
2404
|
),
|
|
2258
|
-
error: () => /* @__PURE__ */
|
|
2405
|
+
error: () => /* @__PURE__ */ jsx72(
|
|
2259
2406
|
"svg",
|
|
2260
2407
|
{
|
|
2261
2408
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2262
2409
|
viewBox: "0 0 24 24",
|
|
2263
2410
|
fill: "currentColor",
|
|
2264
|
-
children: /* @__PURE__ */
|
|
2411
|
+
children: /* @__PURE__ */ jsx72(
|
|
2265
2412
|
"path",
|
|
2266
2413
|
{
|
|
2267
2414
|
fillRule: "evenodd",
|
|
@@ -2276,29 +2423,51 @@ var SectionMessage = ({
|
|
|
2276
2423
|
variant = "info",
|
|
2277
2424
|
size,
|
|
2278
2425
|
children,
|
|
2426
|
+
closeButton,
|
|
2279
2427
|
...props
|
|
2280
2428
|
}) => {
|
|
2281
|
-
const classNames2 =
|
|
2429
|
+
const classNames2 = useClassNames40({
|
|
2282
2430
|
component: "SectionMessage",
|
|
2283
2431
|
variant,
|
|
2284
2432
|
size
|
|
2285
2433
|
});
|
|
2286
2434
|
const Icon4 = icons[variant];
|
|
2287
|
-
|
|
2435
|
+
const [isVisible, setIsVisible] = useState2(true);
|
|
2436
|
+
const handleClose = () => {
|
|
2437
|
+
setIsVisible(false);
|
|
2438
|
+
};
|
|
2439
|
+
if (!isVisible) return null;
|
|
2440
|
+
return /* @__PURE__ */ jsx72(SectionMessageContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsxs27(
|
|
2288
2441
|
"div",
|
|
2289
2442
|
{
|
|
2290
2443
|
role: variant === "error" ? "alert" : void 0,
|
|
2291
2444
|
...props,
|
|
2292
|
-
className:
|
|
2445
|
+
className: cn39("grid auto-rows-min", classNames2.container),
|
|
2293
2446
|
children: [
|
|
2294
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ jsx72(
|
|
2295
2448
|
"div",
|
|
2296
2449
|
{
|
|
2297
|
-
className:
|
|
2450
|
+
className: cn39(
|
|
2298
2451
|
"h-5 w-5 self-center [grid-area:icon]",
|
|
2299
2452
|
classNames2.icon
|
|
2300
2453
|
),
|
|
2301
|
-
children: /* @__PURE__ */
|
|
2454
|
+
children: Icon4 && /* @__PURE__ */ jsx72(Icon4, {})
|
|
2455
|
+
}
|
|
2456
|
+
),
|
|
2457
|
+
closeButton && /* @__PURE__ */ jsx72(
|
|
2458
|
+
"button",
|
|
2459
|
+
{
|
|
2460
|
+
"aria-label": "close",
|
|
2461
|
+
className: "h-5 w-5 cursor-pointer border-none p-0 leading-normal outline-0 [grid-area:close]",
|
|
2462
|
+
onClick: handleClose,
|
|
2463
|
+
children: /* @__PURE__ */ jsx72("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx72(
|
|
2464
|
+
"path",
|
|
2465
|
+
{
|
|
2466
|
+
fillRule: "evenodd",
|
|
2467
|
+
clipRule: "evenodd",
|
|
2468
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
2469
|
+
}
|
|
2470
|
+
) })
|
|
2302
2471
|
}
|
|
2303
2472
|
),
|
|
2304
2473
|
children
|
|
@@ -2310,17 +2479,17 @@ SectionMessage.Title = SectionMessageTitle;
|
|
|
2310
2479
|
SectionMessage.Content = SectionMessageContent;
|
|
2311
2480
|
|
|
2312
2481
|
// src/Multiselect/Multiselect.tsx
|
|
2313
|
-
import { Children as Children5, useState as
|
|
2482
|
+
import { Children as Children5, useState as useState3 } from "react";
|
|
2314
2483
|
import { useListData as useListData2 } from "@react-stately/data";
|
|
2315
2484
|
|
|
2316
2485
|
// src/TagGroup/Tag.tsx
|
|
2317
2486
|
import { Button as Button4, Tag } from "react-aria-components";
|
|
2318
|
-
import { cn as
|
|
2487
|
+
import { cn as cn40, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2319
2488
|
|
|
2320
2489
|
// src/TagGroup/TagGroup.tsx
|
|
2321
2490
|
import { TagGroup, TagList } from "react-aria-components";
|
|
2322
|
-
import { useClassNames as
|
|
2323
|
-
import { jsx as
|
|
2491
|
+
import { useClassNames as useClassNames41 } from "@marigold/system";
|
|
2492
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2324
2493
|
var _TagGroup = ({
|
|
2325
2494
|
width,
|
|
2326
2495
|
items,
|
|
@@ -2330,8 +2499,8 @@ var _TagGroup = ({
|
|
|
2330
2499
|
size,
|
|
2331
2500
|
...rest
|
|
2332
2501
|
}) => {
|
|
2333
|
-
const classNames2 =
|
|
2334
|
-
return /* @__PURE__ */
|
|
2502
|
+
const classNames2 = useClassNames41({ component: "Tag", variant, size });
|
|
2503
|
+
return /* @__PURE__ */ jsx73(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx73(
|
|
2335
2504
|
TagList,
|
|
2336
2505
|
{
|
|
2337
2506
|
items,
|
|
@@ -2343,25 +2512,25 @@ var _TagGroup = ({
|
|
|
2343
2512
|
};
|
|
2344
2513
|
|
|
2345
2514
|
// src/TagGroup/Tag.tsx
|
|
2346
|
-
import { Fragment as Fragment6, jsx as
|
|
2515
|
+
import { Fragment as Fragment6, jsx as jsx74, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2347
2516
|
var CloseButton2 = ({ className }) => {
|
|
2348
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ jsx74(Button4, { slot: "remove", className, children: /* @__PURE__ */ jsx74("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx74("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
2349
2518
|
};
|
|
2350
2519
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
2351
2520
|
let textValue = typeof children === "string" ? children : void 0;
|
|
2352
|
-
const classNames2 =
|
|
2353
|
-
return /* @__PURE__ */
|
|
2521
|
+
const classNames2 = useClassNames42({ component: "Tag", variant, size });
|
|
2522
|
+
return /* @__PURE__ */ jsx74(
|
|
2354
2523
|
Tag,
|
|
2355
2524
|
{
|
|
2356
2525
|
textValue,
|
|
2357
2526
|
...props,
|
|
2358
|
-
className:
|
|
2359
|
-
children: ({ allowsRemoving }) => /* @__PURE__ */
|
|
2527
|
+
className: cn40("data-[selection-mode]:cursor-pointer", classNames2.tag),
|
|
2528
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
2360
2529
|
children,
|
|
2361
|
-
allowsRemoving && /* @__PURE__ */
|
|
2530
|
+
allowsRemoving && /* @__PURE__ */ jsx74(
|
|
2362
2531
|
CloseButton2,
|
|
2363
2532
|
{
|
|
2364
|
-
className:
|
|
2533
|
+
className: cn40("flex items-center", classNames2.closeButton)
|
|
2365
2534
|
}
|
|
2366
2535
|
)
|
|
2367
2536
|
] })
|
|
@@ -2371,7 +2540,7 @@ var _Tag = ({ variant, size, children, ...props }) => {
|
|
|
2371
2540
|
_Tag.Group = _TagGroup;
|
|
2372
2541
|
|
|
2373
2542
|
// src/Multiselect/Multiselect.tsx
|
|
2374
|
-
import { jsx as
|
|
2543
|
+
import { jsx as jsx75, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2375
2544
|
var Item2 = (_) => null;
|
|
2376
2545
|
var Multiselect = ({
|
|
2377
2546
|
label,
|
|
@@ -2397,7 +2566,7 @@ var Multiselect = ({
|
|
|
2397
2566
|
}
|
|
2398
2567
|
list.setSelectedKeys(next);
|
|
2399
2568
|
};
|
|
2400
|
-
const [value, setValue] =
|
|
2569
|
+
const [value, setValue] = useState3("");
|
|
2401
2570
|
const selectItem = (key) => {
|
|
2402
2571
|
if (list.selectedKeys !== "all") {
|
|
2403
2572
|
const next = list.selectedKeys.add(key);
|
|
@@ -2409,18 +2578,18 @@ var Multiselect = ({
|
|
|
2409
2578
|
}, 0);
|
|
2410
2579
|
input.focus();
|
|
2411
2580
|
};
|
|
2412
|
-
return /* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */
|
|
2581
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-wrap gap-1", children: [
|
|
2582
|
+
/* @__PURE__ */ jsx75(
|
|
2414
2583
|
_Tag.Group,
|
|
2415
2584
|
{
|
|
2416
2585
|
items: selected,
|
|
2417
2586
|
allowsRemoving: true,
|
|
2418
2587
|
onRemove: setUnselected,
|
|
2419
2588
|
renderEmptyState: () => null,
|
|
2420
|
-
children: (item) => /* @__PURE__ */
|
|
2589
|
+
children: (item) => /* @__PURE__ */ jsx75(_Tag, { id: item.id, children: item.children }, item.id)
|
|
2421
2590
|
}
|
|
2422
2591
|
),
|
|
2423
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ jsx75(
|
|
2424
2593
|
_ComboBox,
|
|
2425
2594
|
{
|
|
2426
2595
|
value,
|
|
@@ -2430,7 +2599,7 @@ var Multiselect = ({
|
|
|
2430
2599
|
disabled: unselected.length === 0,
|
|
2431
2600
|
placeholder: unselected.length === 0 ? "All items selected" : "",
|
|
2432
2601
|
...props,
|
|
2433
|
-
children: unselected.map((item) => /* @__PURE__ */
|
|
2602
|
+
children: unselected.map((item) => /* @__PURE__ */ jsx75(_ComboBox.Option, { id: item.id, children: item.children }, item.id))
|
|
2434
2603
|
}
|
|
2435
2604
|
)
|
|
2436
2605
|
] });
|
|
@@ -2438,15 +2607,15 @@ var Multiselect = ({
|
|
|
2438
2607
|
Multiselect.Item = Item2;
|
|
2439
2608
|
|
|
2440
2609
|
// src/NumberField/NumberField.tsx
|
|
2441
|
-
import { forwardRef as
|
|
2610
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
2442
2611
|
import { Group as Group2, NumberField } from "react-aria-components";
|
|
2443
|
-
import { cn as
|
|
2612
|
+
import { cn as cn42, useClassNames as useClassNames43 } from "@marigold/system";
|
|
2444
2613
|
|
|
2445
2614
|
// src/NumberField/StepButton.tsx
|
|
2446
2615
|
import { Button as Button5 } from "react-aria-components";
|
|
2447
|
-
import { cn as
|
|
2448
|
-
import { jsx as
|
|
2449
|
-
var Plus = () => /* @__PURE__ */
|
|
2616
|
+
import { cn as cn41 } from "@marigold/system";
|
|
2617
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2618
|
+
var Plus = () => /* @__PURE__ */ jsx76("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx76(
|
|
2450
2619
|
"path",
|
|
2451
2620
|
{
|
|
2452
2621
|
fillRule: "evenodd",
|
|
@@ -2454,7 +2623,7 @@ var Plus = () => /* @__PURE__ */ jsx68("svg", { width: 16, height: 16, viewBox:
|
|
|
2454
2623
|
d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
|
|
2455
2624
|
}
|
|
2456
2625
|
) });
|
|
2457
|
-
var Minus = () => /* @__PURE__ */
|
|
2626
|
+
var Minus = () => /* @__PURE__ */ jsx76("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx76(
|
|
2458
2627
|
"path",
|
|
2459
2628
|
{
|
|
2460
2629
|
fillRule: "evenodd",
|
|
@@ -2464,10 +2633,10 @@ var Minus = () => /* @__PURE__ */ jsx68("svg", { width: 16, height: 16, viewBox:
|
|
|
2464
2633
|
) });
|
|
2465
2634
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2466
2635
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2467
|
-
return /* @__PURE__ */
|
|
2636
|
+
return /* @__PURE__ */ jsx76(
|
|
2468
2637
|
Button5,
|
|
2469
2638
|
{
|
|
2470
|
-
className:
|
|
2639
|
+
className: cn41(
|
|
2471
2640
|
[
|
|
2472
2641
|
"flex items-center justify-center",
|
|
2473
2642
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2475,14 +2644,14 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2475
2644
|
className
|
|
2476
2645
|
),
|
|
2477
2646
|
...props,
|
|
2478
|
-
children: /* @__PURE__ */
|
|
2647
|
+
children: /* @__PURE__ */ jsx76(Icon4, {})
|
|
2479
2648
|
}
|
|
2480
2649
|
);
|
|
2481
2650
|
};
|
|
2482
2651
|
|
|
2483
2652
|
// src/NumberField/NumberField.tsx
|
|
2484
|
-
import { jsx as
|
|
2485
|
-
var _NumberField =
|
|
2653
|
+
import { jsx as jsx77, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2654
|
+
var _NumberField = forwardRef19(
|
|
2486
2655
|
({
|
|
2487
2656
|
variant,
|
|
2488
2657
|
size,
|
|
@@ -2493,7 +2662,7 @@ var _NumberField = forwardRef15(
|
|
|
2493
2662
|
hideStepper,
|
|
2494
2663
|
...rest
|
|
2495
2664
|
}, ref) => {
|
|
2496
|
-
const classNames2 =
|
|
2665
|
+
const classNames2 = useClassNames43({
|
|
2497
2666
|
component: "NumberField",
|
|
2498
2667
|
size,
|
|
2499
2668
|
variant
|
|
@@ -2506,8 +2675,8 @@ var _NumberField = forwardRef15(
|
|
|
2506
2675
|
...rest
|
|
2507
2676
|
};
|
|
2508
2677
|
const showStepper = !hideStepper;
|
|
2509
|
-
return /* @__PURE__ */
|
|
2510
|
-
showStepper && /* @__PURE__ */
|
|
2678
|
+
return /* @__PURE__ */ jsx77(FieldBase, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs30(Group2, { className: cn42("flex items-stretch", classNames2.group), children: [
|
|
2679
|
+
showStepper && /* @__PURE__ */ jsx77(
|
|
2511
2680
|
_StepButton,
|
|
2512
2681
|
{
|
|
2513
2682
|
className: classNames2.stepper,
|
|
@@ -2515,7 +2684,7 @@ var _NumberField = forwardRef15(
|
|
|
2515
2684
|
slot: "decrement"
|
|
2516
2685
|
}
|
|
2517
2686
|
),
|
|
2518
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ jsx77("div", { className: "flex-1", children: /* @__PURE__ */ jsx77(
|
|
2519
2688
|
_Input,
|
|
2520
2689
|
{
|
|
2521
2690
|
ref,
|
|
@@ -2524,7 +2693,7 @@ var _NumberField = forwardRef15(
|
|
|
2524
2693
|
className: classNames2.input
|
|
2525
2694
|
}
|
|
2526
2695
|
) }),
|
|
2527
|
-
showStepper && /* @__PURE__ */
|
|
2696
|
+
showStepper && /* @__PURE__ */ jsx77(
|
|
2528
2697
|
_StepButton,
|
|
2529
2698
|
{
|
|
2530
2699
|
className: classNames2.stepper,
|
|
@@ -2538,10 +2707,10 @@ var _NumberField = forwardRef15(
|
|
|
2538
2707
|
|
|
2539
2708
|
// src/Radio/Radio.tsx
|
|
2540
2709
|
import {
|
|
2541
|
-
forwardRef as
|
|
2710
|
+
forwardRef as forwardRef20
|
|
2542
2711
|
} from "react";
|
|
2543
2712
|
import { Radio } from "react-aria-components";
|
|
2544
|
-
import { cn as
|
|
2713
|
+
import { cn as cn44, useClassNames as useClassNames45 } from "@marigold/system";
|
|
2545
2714
|
|
|
2546
2715
|
// src/Radio/Context.ts
|
|
2547
2716
|
import { createContext as createContext7, useContext as useContext13 } from "react";
|
|
@@ -2552,8 +2721,8 @@ var useRadioGroupContext = () => useContext13(RadioGroupContext);
|
|
|
2552
2721
|
|
|
2553
2722
|
// src/Radio/RadioGroup.tsx
|
|
2554
2723
|
import { RadioGroup } from "react-aria-components";
|
|
2555
|
-
import { cn as
|
|
2556
|
-
import { jsx as
|
|
2724
|
+
import { cn as cn43, useClassNames as useClassNames44 } from "@marigold/system";
|
|
2725
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
2557
2726
|
var _RadioGroup = ({
|
|
2558
2727
|
variant,
|
|
2559
2728
|
size,
|
|
@@ -2569,7 +2738,7 @@ var _RadioGroup = ({
|
|
|
2569
2738
|
width,
|
|
2570
2739
|
...rest
|
|
2571
2740
|
}) => {
|
|
2572
|
-
const classNames2 =
|
|
2741
|
+
const classNames2 = useClassNames44({ component: "Radio", variant, size });
|
|
2573
2742
|
const props = {
|
|
2574
2743
|
isDisabled: disabled,
|
|
2575
2744
|
isReadOnly: readOnly,
|
|
@@ -2577,7 +2746,7 @@ var _RadioGroup = ({
|
|
|
2577
2746
|
isInvalid: error,
|
|
2578
2747
|
...rest
|
|
2579
2748
|
};
|
|
2580
|
-
return /* @__PURE__ */
|
|
2749
|
+
return /* @__PURE__ */ jsx78(
|
|
2581
2750
|
FieldBase,
|
|
2582
2751
|
{
|
|
2583
2752
|
as: RadioGroup,
|
|
@@ -2588,18 +2757,18 @@ var _RadioGroup = ({
|
|
|
2588
2757
|
variant,
|
|
2589
2758
|
size,
|
|
2590
2759
|
...props,
|
|
2591
|
-
children: /* @__PURE__ */
|
|
2760
|
+
children: /* @__PURE__ */ jsx78(
|
|
2592
2761
|
"div",
|
|
2593
2762
|
{
|
|
2594
2763
|
role: "presentation",
|
|
2595
2764
|
"data-testid": "group",
|
|
2596
2765
|
"data-orientation": orientation,
|
|
2597
|
-
className:
|
|
2766
|
+
className: cn43(
|
|
2598
2767
|
classNames2.group,
|
|
2599
2768
|
"flex items-start",
|
|
2600
2769
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2601
2770
|
),
|
|
2602
|
-
children: /* @__PURE__ */
|
|
2771
|
+
children: /* @__PURE__ */ jsx78(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
2603
2772
|
}
|
|
2604
2773
|
)
|
|
2605
2774
|
}
|
|
@@ -2607,33 +2776,33 @@ var _RadioGroup = ({
|
|
|
2607
2776
|
};
|
|
2608
2777
|
|
|
2609
2778
|
// src/Radio/Radio.tsx
|
|
2610
|
-
import { Fragment as Fragment7, jsx as
|
|
2611
|
-
var Dot = () => /* @__PURE__ */
|
|
2612
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
2779
|
+
import { Fragment as Fragment7, jsx as jsx79, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2780
|
+
var Dot = () => /* @__PURE__ */ jsx79("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx79("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2781
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx79(
|
|
2613
2782
|
"div",
|
|
2614
2783
|
{
|
|
2615
|
-
className:
|
|
2784
|
+
className: cn44(
|
|
2616
2785
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2617
2786
|
className
|
|
2618
2787
|
),
|
|
2619
2788
|
"aria-hidden": "true",
|
|
2620
2789
|
...props,
|
|
2621
|
-
children: checked ? /* @__PURE__ */
|
|
2790
|
+
children: checked ? /* @__PURE__ */ jsx79(Dot, {}) : null
|
|
2622
2791
|
}
|
|
2623
2792
|
);
|
|
2624
|
-
var _Radio =
|
|
2793
|
+
var _Radio = forwardRef20(
|
|
2625
2794
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2626
2795
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2627
|
-
const classNames2 =
|
|
2796
|
+
const classNames2 = useClassNames45({
|
|
2628
2797
|
component: "Radio",
|
|
2629
2798
|
variant: variant || props.variant,
|
|
2630
2799
|
size: size || props.size
|
|
2631
2800
|
});
|
|
2632
|
-
return /* @__PURE__ */
|
|
2801
|
+
return /* @__PURE__ */ jsx79(
|
|
2633
2802
|
Radio,
|
|
2634
2803
|
{
|
|
2635
2804
|
ref,
|
|
2636
|
-
className:
|
|
2805
|
+
className: cn44(
|
|
2637
2806
|
"group/radio",
|
|
2638
2807
|
"relative flex items-center gap-[1ch]",
|
|
2639
2808
|
width || groupWidth || "w-full",
|
|
@@ -2642,18 +2811,18 @@ var _Radio = forwardRef16(
|
|
|
2642
2811
|
value,
|
|
2643
2812
|
isDisabled: disabled,
|
|
2644
2813
|
...props,
|
|
2645
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2646
|
-
/* @__PURE__ */
|
|
2814
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
2815
|
+
/* @__PURE__ */ jsx79(
|
|
2647
2816
|
Icon3,
|
|
2648
2817
|
{
|
|
2649
2818
|
checked: isSelected,
|
|
2650
|
-
className:
|
|
2819
|
+
className: cn44(
|
|
2651
2820
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2652
2821
|
classNames2.radio
|
|
2653
2822
|
)
|
|
2654
2823
|
}
|
|
2655
2824
|
),
|
|
2656
|
-
/* @__PURE__ */
|
|
2825
|
+
/* @__PURE__ */ jsx79("div", { className: classNames2.label, children })
|
|
2657
2826
|
] })
|
|
2658
2827
|
}
|
|
2659
2828
|
);
|
|
@@ -2662,10 +2831,10 @@ var _Radio = forwardRef16(
|
|
|
2662
2831
|
_Radio.Group = _RadioGroup;
|
|
2663
2832
|
|
|
2664
2833
|
// src/SearchField/SearchField.tsx
|
|
2665
|
-
import { forwardRef as
|
|
2834
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
2666
2835
|
import { SearchField } from "react-aria-components";
|
|
2667
|
-
import { jsx as
|
|
2668
|
-
var _SearchField =
|
|
2836
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
2837
|
+
var _SearchField = forwardRef21(
|
|
2669
2838
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2670
2839
|
const props = {
|
|
2671
2840
|
...rest,
|
|
@@ -2674,7 +2843,7 @@ var _SearchField = forwardRef17(
|
|
|
2674
2843
|
isReadOnly: readOnly,
|
|
2675
2844
|
isInvalid: error
|
|
2676
2845
|
};
|
|
2677
|
-
return /* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ jsx80(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx80(
|
|
2678
2847
|
SearchInput,
|
|
2679
2848
|
{
|
|
2680
2849
|
ref,
|
|
@@ -2685,15 +2854,15 @@ var _SearchField = forwardRef17(
|
|
|
2685
2854
|
);
|
|
2686
2855
|
|
|
2687
2856
|
// src/Select/Select.tsx
|
|
2688
|
-
import { forwardRef as
|
|
2857
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
2689
2858
|
import {
|
|
2690
2859
|
Button as Button6,
|
|
2691
2860
|
Select,
|
|
2692
2861
|
SelectValue
|
|
2693
2862
|
} from "react-aria-components";
|
|
2694
|
-
import { cn as
|
|
2695
|
-
import { jsx as
|
|
2696
|
-
var _Select =
|
|
2863
|
+
import { cn as cn45, useClassNames as useClassNames46 } from "@marigold/system";
|
|
2864
|
+
import { jsx as jsx81, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2865
|
+
var _Select = forwardRef22(
|
|
2697
2866
|
({
|
|
2698
2867
|
disabled,
|
|
2699
2868
|
required,
|
|
@@ -2713,34 +2882,23 @@ var _Select = forwardRef18(
|
|
|
2713
2882
|
onSelectionChange: onChange,
|
|
2714
2883
|
...rest
|
|
2715
2884
|
};
|
|
2716
|
-
const classNames2 =
|
|
2717
|
-
return /* @__PURE__ */
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
size,
|
|
2725
|
-
...props,
|
|
2726
|
-
children: [
|
|
2727
|
-
/* @__PURE__ */ jsxs29(
|
|
2728
|
-
Button6,
|
|
2729
|
-
{
|
|
2730
|
-
className: cn42(
|
|
2731
|
-
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2732
|
-
classNames2.select
|
|
2733
|
-
),
|
|
2734
|
-
children: [
|
|
2735
|
-
/* @__PURE__ */ jsx73(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
2736
|
-
/* @__PURE__ */ jsx73(ChevronDown, { className: cn42("size-4", classNames2.icon) })
|
|
2737
|
-
]
|
|
2738
|
-
}
|
|
2885
|
+
const classNames2 = useClassNames46({ component: "Select", variant, size });
|
|
2886
|
+
return /* @__PURE__ */ jsxs32(FieldBase, { as: Select, ref, variant, size, ...props, children: [
|
|
2887
|
+
/* @__PURE__ */ jsxs32(
|
|
2888
|
+
Button6,
|
|
2889
|
+
{
|
|
2890
|
+
className: cn45(
|
|
2891
|
+
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2892
|
+
classNames2.select
|
|
2739
2893
|
),
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2894
|
+
children: [
|
|
2895
|
+
/* @__PURE__ */ jsx81(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
2896
|
+
/* @__PURE__ */ jsx81(ChevronDown, { className: cn45("size-4", classNames2.icon) })
|
|
2897
|
+
]
|
|
2898
|
+
}
|
|
2899
|
+
),
|
|
2900
|
+
/* @__PURE__ */ jsx81(_Popover, { children: /* @__PURE__ */ jsx81(_ListBox, { items, children: props.children }) })
|
|
2901
|
+
] });
|
|
2744
2902
|
}
|
|
2745
2903
|
);
|
|
2746
2904
|
_Select.Option = _ListBox.Item;
|
|
@@ -2748,10 +2906,10 @@ _Select.Section = _ListBox.Section;
|
|
|
2748
2906
|
|
|
2749
2907
|
// src/SelectList/SelectList.tsx
|
|
2750
2908
|
import {
|
|
2751
|
-
forwardRef as
|
|
2909
|
+
forwardRef as forwardRef24
|
|
2752
2910
|
} from "react";
|
|
2753
2911
|
import { GridList as SelectList } from "react-aria-components";
|
|
2754
|
-
import { cn as
|
|
2912
|
+
import { cn as cn47, useClassNames as useClassNames47 } from "@marigold/system";
|
|
2755
2913
|
|
|
2756
2914
|
// src/SelectList/Context.ts
|
|
2757
2915
|
import { createContext as createContext8, useContext as useContext14 } from "react";
|
|
@@ -2761,26 +2919,26 @@ var SelectListContext = createContext8(
|
|
|
2761
2919
|
var useSelectListContext = () => useContext14(SelectListContext);
|
|
2762
2920
|
|
|
2763
2921
|
// src/SelectList/SelectListItem.tsx
|
|
2764
|
-
import { forwardRef as
|
|
2922
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
2765
2923
|
import { GridListItem as SelectListItem } from "react-aria-components";
|
|
2766
|
-
import { cn as
|
|
2767
|
-
import { Fragment as Fragment8, jsx as
|
|
2768
|
-
var _SelectListItem =
|
|
2924
|
+
import { cn as cn46 } from "@marigold/system";
|
|
2925
|
+
import { Fragment as Fragment8, jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2926
|
+
var _SelectListItem = forwardRef23(
|
|
2769
2927
|
({ children, ...props }, ref) => {
|
|
2770
2928
|
let textValue = typeof children === "string" ? children : void 0;
|
|
2771
2929
|
const { classNames: classNames2 } = useSelectListContext();
|
|
2772
|
-
return /* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ jsx82(
|
|
2773
2931
|
SelectListItem,
|
|
2774
2932
|
{
|
|
2775
2933
|
textValue,
|
|
2776
2934
|
...props,
|
|
2777
|
-
className:
|
|
2935
|
+
className: cn46(
|
|
2778
2936
|
"items-center group-data-[layout=grid]/list:flex-row",
|
|
2779
2937
|
classNames2 == null ? void 0 : classNames2.option
|
|
2780
2938
|
),
|
|
2781
2939
|
ref,
|
|
2782
|
-
children: ({ selectionMode }) => /* @__PURE__ */
|
|
2783
|
-
selectionMode === "multiple" && /* @__PURE__ */
|
|
2940
|
+
children: ({ selectionMode }) => /* @__PURE__ */ jsxs33(Fragment8, { children: [
|
|
2941
|
+
selectionMode === "multiple" && /* @__PURE__ */ jsx82(_Checkbox, { slot: "selection" }),
|
|
2784
2942
|
children
|
|
2785
2943
|
] })
|
|
2786
2944
|
}
|
|
@@ -2789,21 +2947,21 @@ var _SelectListItem = forwardRef19(
|
|
|
2789
2947
|
);
|
|
2790
2948
|
|
|
2791
2949
|
// src/SelectList/SelectList.tsx
|
|
2792
|
-
import { jsx as
|
|
2793
|
-
var _SelectList =
|
|
2950
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
2951
|
+
var _SelectList = forwardRef24(
|
|
2794
2952
|
({ onChange, ...rest }, ref) => {
|
|
2795
|
-
const classNames2 =
|
|
2953
|
+
const classNames2 = useClassNames47({ component: "ListBox" });
|
|
2796
2954
|
const props = {
|
|
2797
2955
|
onSelectionChange: onChange,
|
|
2798
2956
|
...rest
|
|
2799
2957
|
};
|
|
2800
|
-
return /* @__PURE__ */
|
|
2958
|
+
return /* @__PURE__ */ jsx83(SelectListContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx83("div", { className: classNames2.container, children: /* @__PURE__ */ jsx83(
|
|
2801
2959
|
SelectList,
|
|
2802
2960
|
{
|
|
2803
2961
|
...props,
|
|
2804
2962
|
layout: "grid",
|
|
2805
2963
|
ref,
|
|
2806
|
-
className:
|
|
2964
|
+
className: cn47(
|
|
2807
2965
|
"group/list overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
2808
2966
|
classNames2.list
|
|
2809
2967
|
),
|
|
@@ -2815,25 +2973,25 @@ var _SelectList = forwardRef20(
|
|
|
2815
2973
|
_SelectList.Item = _SelectListItem;
|
|
2816
2974
|
|
|
2817
2975
|
// src/Scrollable/Scrollable.tsx
|
|
2818
|
-
import { cn as
|
|
2819
|
-
import { jsx as
|
|
2976
|
+
import { cn as cn48, createVar as createVar10, width as twWidth2 } from "@marigold/system";
|
|
2977
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
2820
2978
|
var Scrollable = ({
|
|
2821
2979
|
children,
|
|
2822
2980
|
width = "full",
|
|
2823
2981
|
height,
|
|
2824
2982
|
...props
|
|
2825
|
-
}) => /* @__PURE__ */
|
|
2983
|
+
}) => /* @__PURE__ */ jsx84(
|
|
2826
2984
|
"div",
|
|
2827
2985
|
{
|
|
2828
2986
|
...props,
|
|
2829
|
-
className:
|
|
2987
|
+
className: cn48(["sticky h-[--height] overflow-auto", twWidth2[width]]),
|
|
2830
2988
|
style: createVar10({ height }),
|
|
2831
2989
|
children
|
|
2832
2990
|
}
|
|
2833
2991
|
);
|
|
2834
2992
|
|
|
2835
2993
|
// src/Slider/Slider.tsx
|
|
2836
|
-
import { forwardRef as
|
|
2994
|
+
import { forwardRef as forwardRef25 } from "react";
|
|
2837
2995
|
import {
|
|
2838
2996
|
Slider,
|
|
2839
2997
|
SliderOutput,
|
|
@@ -2841,21 +2999,22 @@ import {
|
|
|
2841
2999
|
SliderTrack
|
|
2842
3000
|
} from "react-aria-components";
|
|
2843
3001
|
import {
|
|
2844
|
-
cn as
|
|
3002
|
+
cn as cn49,
|
|
2845
3003
|
width as twWidth3,
|
|
2846
|
-
useClassNames as
|
|
3004
|
+
useClassNames as useClassNames48
|
|
2847
3005
|
} from "@marigold/system";
|
|
2848
|
-
import { jsx as
|
|
2849
|
-
var _Slider =
|
|
3006
|
+
import { Fragment as Fragment9, jsx as jsx85, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3007
|
+
var _Slider = forwardRef25(
|
|
2850
3008
|
({
|
|
2851
3009
|
thumbLabels,
|
|
2852
3010
|
variant,
|
|
2853
3011
|
size,
|
|
2854
3012
|
width = "full",
|
|
2855
3013
|
disabled,
|
|
3014
|
+
label,
|
|
2856
3015
|
...rest
|
|
2857
3016
|
}, ref) => {
|
|
2858
|
-
const classNames2 =
|
|
3017
|
+
const classNames2 = useClassNames48({
|
|
2859
3018
|
component: "Slider",
|
|
2860
3019
|
variant,
|
|
2861
3020
|
size
|
|
@@ -2864,10 +3023,11 @@ var _Slider = forwardRef21(
|
|
|
2864
3023
|
isDisabled: disabled,
|
|
2865
3024
|
...rest
|
|
2866
3025
|
};
|
|
2867
|
-
return /* @__PURE__ */
|
|
2868
|
-
|
|
3026
|
+
return /* @__PURE__ */ jsxs34(
|
|
3027
|
+
FieldBase,
|
|
2869
3028
|
{
|
|
2870
|
-
|
|
3029
|
+
as: Slider,
|
|
3030
|
+
className: cn49(
|
|
2871
3031
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
2872
3032
|
classNames2.container,
|
|
2873
3033
|
twWidth3[width]
|
|
@@ -2875,21 +3035,46 @@ var _Slider = forwardRef21(
|
|
|
2875
3035
|
ref,
|
|
2876
3036
|
...props,
|
|
2877
3037
|
children: [
|
|
2878
|
-
/* @__PURE__ */
|
|
2879
|
-
/* @__PURE__ */
|
|
2880
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ jsx85(_Label, { children: props.children && props.children || label && label }),
|
|
3039
|
+
/* @__PURE__ */ jsx85(SliderOutput, { className: cn49("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
3040
|
+
/* @__PURE__ */ jsx85(
|
|
2881
3041
|
SliderTrack,
|
|
2882
3042
|
{
|
|
2883
|
-
className:
|
|
2884
|
-
children: ({ state }) =>
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
3043
|
+
className: cn49("relative col-span-2 h-2 w-full", classNames2.track),
|
|
3044
|
+
children: ({ state }) => /* @__PURE__ */ jsxs34(Fragment9, { children: [
|
|
3045
|
+
/* @__PURE__ */ jsx85(
|
|
3046
|
+
"div",
|
|
3047
|
+
{
|
|
3048
|
+
className: cn49(
|
|
3049
|
+
"absolute top-[50%] h-2 w-full translate-y-[-50%]",
|
|
3050
|
+
classNames2.track
|
|
3051
|
+
)
|
|
3052
|
+
}
|
|
3053
|
+
),
|
|
3054
|
+
/* @__PURE__ */ jsx85(
|
|
3055
|
+
"div",
|
|
3056
|
+
{
|
|
3057
|
+
className: cn49(
|
|
3058
|
+
"absolute top-[50%] h-2 translate-y-[-50%]",
|
|
3059
|
+
classNames2.selectedTrack
|
|
3060
|
+
),
|
|
3061
|
+
style: state.values.length === 1 ? { width: state.getThumbPercent(0) * 100 + "%" } : {
|
|
3062
|
+
width: state.getThumbPercent(1) * 100 - state.getThumbPercent(0) * 100 + "%",
|
|
3063
|
+
left: state.getThumbPercent(0) * 100 + "%"
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
),
|
|
3067
|
+
state.values.map((_, i) => /* @__PURE__ */ jsx85(
|
|
3068
|
+
SliderThumb,
|
|
3069
|
+
{
|
|
3070
|
+
className: cn49("top-1/2 cursor-pointer", classNames2.thumb),
|
|
3071
|
+
index: i,
|
|
3072
|
+
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i],
|
|
3073
|
+
name: thumbLabels == null ? void 0 : thumbLabels[i]
|
|
3074
|
+
},
|
|
3075
|
+
i
|
|
3076
|
+
))
|
|
3077
|
+
] })
|
|
2893
3078
|
}
|
|
2894
3079
|
)
|
|
2895
3080
|
]
|
|
@@ -2899,12 +3084,12 @@ var _Slider = forwardRef21(
|
|
|
2899
3084
|
);
|
|
2900
3085
|
|
|
2901
3086
|
// src/Split/Split.tsx
|
|
2902
|
-
import { jsx as
|
|
2903
|
-
var Split = () => /* @__PURE__ */
|
|
3087
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3088
|
+
var Split = () => /* @__PURE__ */ jsx86("div", { role: "separator", className: "grow" });
|
|
2904
3089
|
|
|
2905
3090
|
// src/Stack/Stack.tsx
|
|
2906
|
-
import { alignment as alignment3, cn as
|
|
2907
|
-
import { jsx as
|
|
3091
|
+
import { alignment as alignment3, cn as cn50, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3092
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
2908
3093
|
var Stack = ({
|
|
2909
3094
|
children,
|
|
2910
3095
|
space = 0,
|
|
@@ -2914,10 +3099,10 @@ var Stack = ({
|
|
|
2914
3099
|
...props
|
|
2915
3100
|
}) => {
|
|
2916
3101
|
var _a, _b, _c, _d;
|
|
2917
|
-
return /* @__PURE__ */
|
|
3102
|
+
return /* @__PURE__ */ jsx87(
|
|
2918
3103
|
"div",
|
|
2919
3104
|
{
|
|
2920
|
-
className:
|
|
3105
|
+
className: cn50(
|
|
2921
3106
|
"flex flex-col",
|
|
2922
3107
|
gapSpace7[space],
|
|
2923
3108
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2931,15 +3116,15 @@ var Stack = ({
|
|
|
2931
3116
|
};
|
|
2932
3117
|
|
|
2933
3118
|
// src/Switch/Switch.tsx
|
|
2934
|
-
import { forwardRef as
|
|
3119
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
2935
3120
|
import { Switch } from "react-aria-components";
|
|
2936
3121
|
import {
|
|
2937
|
-
cn as
|
|
3122
|
+
cn as cn51,
|
|
2938
3123
|
width as twWidth4,
|
|
2939
|
-
useClassNames as
|
|
3124
|
+
useClassNames as useClassNames49
|
|
2940
3125
|
} from "@marigold/system";
|
|
2941
|
-
import { jsx as
|
|
2942
|
-
var _Switch =
|
|
3126
|
+
import { jsx as jsx88, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3127
|
+
var _Switch = forwardRef26(
|
|
2943
3128
|
({
|
|
2944
3129
|
variant,
|
|
2945
3130
|
size,
|
|
@@ -2950,37 +3135,37 @@ var _Switch = forwardRef22(
|
|
|
2950
3135
|
readOnly,
|
|
2951
3136
|
...rest
|
|
2952
3137
|
}, ref) => {
|
|
2953
|
-
const classNames2 =
|
|
3138
|
+
const classNames2 = useClassNames49({ component: "Switch", size, variant });
|
|
2954
3139
|
const props = {
|
|
2955
3140
|
isDisabled: disabled,
|
|
2956
3141
|
isReadOnly: readOnly,
|
|
2957
3142
|
isSelected: selected,
|
|
2958
3143
|
...rest
|
|
2959
3144
|
};
|
|
2960
|
-
return /* @__PURE__ */
|
|
3145
|
+
return /* @__PURE__ */ jsxs35(
|
|
2961
3146
|
Switch,
|
|
2962
3147
|
{
|
|
2963
3148
|
...props,
|
|
2964
3149
|
ref,
|
|
2965
|
-
className:
|
|
3150
|
+
className: cn51(
|
|
2966
3151
|
twWidth4[width],
|
|
2967
3152
|
"group/switch",
|
|
2968
3153
|
"flex items-center gap-[1ch]",
|
|
2969
3154
|
classNames2.container
|
|
2970
3155
|
),
|
|
2971
3156
|
children: [
|
|
2972
|
-
/* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
3157
|
+
/* @__PURE__ */ jsx88(_Label, { elementType: "span", children }),
|
|
3158
|
+
/* @__PURE__ */ jsx88("div", { className: "relative", children: /* @__PURE__ */ jsx88(
|
|
2974
3159
|
"div",
|
|
2975
3160
|
{
|
|
2976
|
-
className:
|
|
3161
|
+
className: cn51(
|
|
2977
3162
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed",
|
|
2978
3163
|
classNames2.track
|
|
2979
3164
|
),
|
|
2980
|
-
children: /* @__PURE__ */
|
|
3165
|
+
children: /* @__PURE__ */ jsx88(
|
|
2981
3166
|
"div",
|
|
2982
3167
|
{
|
|
2983
|
-
className:
|
|
3168
|
+
className: cn51(
|
|
2984
3169
|
"h-[22px] w-[22px]",
|
|
2985
3170
|
"cubic-bezier(.7,0,.3,1)",
|
|
2986
3171
|
"absolute left-0 top-px",
|
|
@@ -3005,11 +3190,11 @@ import {
|
|
|
3005
3190
|
TableBody as Body2,
|
|
3006
3191
|
Cell,
|
|
3007
3192
|
Column,
|
|
3008
|
-
TableHeader as
|
|
3193
|
+
TableHeader as Header3,
|
|
3009
3194
|
Row,
|
|
3010
3195
|
useTableState
|
|
3011
3196
|
} from "@react-stately/table";
|
|
3012
|
-
import { cn as
|
|
3197
|
+
import { cn as cn57, useClassNames as useClassNames51 } from "@marigold/system";
|
|
3013
3198
|
|
|
3014
3199
|
// src/Table/Context.tsx
|
|
3015
3200
|
import { createContext as createContext9, useContext as useContext15 } from "react";
|
|
@@ -3018,12 +3203,12 @@ var useTableContext = () => useContext15(TableContext);
|
|
|
3018
3203
|
|
|
3019
3204
|
// src/Table/TableBody.tsx
|
|
3020
3205
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3021
|
-
import { jsx as
|
|
3206
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
3022
3207
|
var TableBody = ({ children, emptyState }) => {
|
|
3023
3208
|
const { rowGroupProps } = useTableRowGroup();
|
|
3024
3209
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3025
3210
|
if (state.collection.size === 0 && emptyState) {
|
|
3026
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ jsx89("tbody", { children: /* @__PURE__ */ jsx89("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ jsx89(
|
|
3027
3212
|
"td",
|
|
3028
3213
|
{
|
|
3029
3214
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
@@ -3033,7 +3218,7 @@ var TableBody = ({ children, emptyState }) => {
|
|
|
3033
3218
|
}
|
|
3034
3219
|
) }) });
|
|
3035
3220
|
}
|
|
3036
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ jsx89("tbody", { ...rowGroupProps, children });
|
|
3037
3222
|
};
|
|
3038
3223
|
|
|
3039
3224
|
// src/Table/TableCell.tsx
|
|
@@ -3041,8 +3226,8 @@ import { useRef as useRef4 } from "react";
|
|
|
3041
3226
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
3042
3227
|
import { useTableCell } from "@react-aria/table";
|
|
3043
3228
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
3044
|
-
import { cn as
|
|
3045
|
-
import { jsx as
|
|
3229
|
+
import { cn as cn52, useStateProps as useStateProps2 } from "@marigold/system";
|
|
3230
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
3046
3231
|
var TableCell = ({ cell, align = "left" }) => {
|
|
3047
3232
|
const ref = useRef4(null);
|
|
3048
3233
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
@@ -3065,11 +3250,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
3065
3250
|
};
|
|
3066
3251
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
3067
3252
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
3068
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ jsx90(
|
|
3069
3254
|
"td",
|
|
3070
3255
|
{
|
|
3071
3256
|
ref,
|
|
3072
|
-
className:
|
|
3257
|
+
className: cn52(classNames2 == null ? void 0 : classNames2.cell),
|
|
3073
3258
|
...mergeProps3(cellProps, focusProps),
|
|
3074
3259
|
...stateProps,
|
|
3075
3260
|
align,
|
|
@@ -3083,7 +3268,7 @@ import { useRef as useRef5 } from "react";
|
|
|
3083
3268
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
3084
3269
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3085
3270
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
3086
|
-
import { cn as
|
|
3271
|
+
import { cn as cn53, useStateProps as useStateProps3 } from "@marigold/system";
|
|
3087
3272
|
|
|
3088
3273
|
// src/Table/utils.ts
|
|
3089
3274
|
var mapCheckboxProps = ({
|
|
@@ -3106,7 +3291,7 @@ var mapCheckboxProps = ({
|
|
|
3106
3291
|
};
|
|
3107
3292
|
|
|
3108
3293
|
// src/Table/TableCheckboxCell.tsx
|
|
3109
|
-
import { jsx as
|
|
3294
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
3110
3295
|
var TableCheckboxCell = ({ cell }) => {
|
|
3111
3296
|
const ref = useRef5(null);
|
|
3112
3297
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -3123,14 +3308,14 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3123
3308
|
);
|
|
3124
3309
|
const { focusProps, isFocusVisible } = useFocusRing3();
|
|
3125
3310
|
const stateProps = useStateProps3({ disabled, focusVisible: isFocusVisible });
|
|
3126
|
-
return /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ jsx91(
|
|
3127
3312
|
"td",
|
|
3128
3313
|
{
|
|
3129
3314
|
ref,
|
|
3130
|
-
className:
|
|
3315
|
+
className: cn53("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3131
3316
|
...mergeProps4(gridCellProps, focusProps),
|
|
3132
3317
|
...stateProps,
|
|
3133
|
-
children: /* @__PURE__ */
|
|
3318
|
+
children: /* @__PURE__ */ jsx91(_Checkbox, { ...checkboxProps })
|
|
3134
3319
|
}
|
|
3135
3320
|
);
|
|
3136
3321
|
};
|
|
@@ -3141,9 +3326,8 @@ import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
|
3141
3326
|
import { useHover } from "@react-aria/interactions";
|
|
3142
3327
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3143
3328
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
3144
|
-
import {
|
|
3145
|
-
import {
|
|
3146
|
-
import { jsx as jsx84, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3329
|
+
import { cn as cn54, width as twWidth5, useStateProps as useStateProps4 } from "@marigold/system";
|
|
3330
|
+
import { jsx as jsx92, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3147
3331
|
var TableColumnHeader = ({
|
|
3148
3332
|
column,
|
|
3149
3333
|
width = "auto",
|
|
@@ -3165,18 +3349,18 @@ var TableColumnHeader = ({
|
|
|
3165
3349
|
hover: isHovered,
|
|
3166
3350
|
focusVisible: isFocusVisible
|
|
3167
3351
|
});
|
|
3168
|
-
return /* @__PURE__ */
|
|
3352
|
+
return /* @__PURE__ */ jsxs36(
|
|
3169
3353
|
"th",
|
|
3170
3354
|
{
|
|
3171
3355
|
colSpan: column.colspan,
|
|
3172
3356
|
ref,
|
|
3173
|
-
className:
|
|
3357
|
+
className: cn54("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3174
3358
|
...mergeProps5(columnHeaderProps, hoverProps, focusProps),
|
|
3175
3359
|
...stateProps,
|
|
3176
3360
|
align,
|
|
3177
3361
|
children: [
|
|
3178
3362
|
column.rendered,
|
|
3179
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
3363
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx92(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx92(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx92("span", { className: "invisible", children: /* @__PURE__ */ jsx92(SortDown, { className: "inline-block" }) }))
|
|
3180
3364
|
]
|
|
3181
3365
|
}
|
|
3182
3366
|
);
|
|
@@ -3184,10 +3368,10 @@ var TableColumnHeader = ({
|
|
|
3184
3368
|
|
|
3185
3369
|
// src/Table/TableHeader.tsx
|
|
3186
3370
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3187
|
-
import { jsx as
|
|
3371
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
3188
3372
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
3189
3373
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3190
|
-
return /* @__PURE__ */
|
|
3374
|
+
return /* @__PURE__ */ jsx93(
|
|
3191
3375
|
"thead",
|
|
3192
3376
|
{
|
|
3193
3377
|
...rowGroupProps,
|
|
@@ -3200,12 +3384,12 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
3200
3384
|
// src/Table/TableHeaderRow.tsx
|
|
3201
3385
|
import { useRef as useRef7 } from "react";
|
|
3202
3386
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3203
|
-
import { jsx as
|
|
3387
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
3204
3388
|
var TableHeaderRow = ({ item, children }) => {
|
|
3205
3389
|
const { state } = useTableContext();
|
|
3206
3390
|
const ref = useRef7(null);
|
|
3207
3391
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3208
|
-
return /* @__PURE__ */
|
|
3392
|
+
return /* @__PURE__ */ jsx94("tr", { ...rowProps, ref, children });
|
|
3209
3393
|
};
|
|
3210
3394
|
|
|
3211
3395
|
// src/Table/TableRow.tsx
|
|
@@ -3214,13 +3398,13 @@ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
|
3214
3398
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
3215
3399
|
import { useTableRow } from "@react-aria/table";
|
|
3216
3400
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
3217
|
-
import { cn as
|
|
3218
|
-
import { jsx as
|
|
3401
|
+
import { cn as cn55, useClassNames as useClassNames50, useStateProps as useStateProps5 } from "@marigold/system";
|
|
3402
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
3219
3403
|
var TableRow = ({ children, row }) => {
|
|
3220
3404
|
const ref = useRef8(null);
|
|
3221
3405
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3222
3406
|
const { variant, size } = row.props;
|
|
3223
|
-
const classNames2 =
|
|
3407
|
+
const classNames2 = useClassNames50({
|
|
3224
3408
|
component: "Table",
|
|
3225
3409
|
variant: variant || ctx.variant,
|
|
3226
3410
|
size: size || ctx.size
|
|
@@ -3234,7 +3418,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3234
3418
|
);
|
|
3235
3419
|
const disabled = state.disabledKeys.has(row.key);
|
|
3236
3420
|
const selected = state.selectionManager.isSelected(row.key);
|
|
3237
|
-
const { focusProps, isFocusVisible } = useFocusRing5(
|
|
3421
|
+
const { focusProps, isFocusVisible } = useFocusRing5();
|
|
3238
3422
|
const { hoverProps, isHovered } = useHover2({
|
|
3239
3423
|
isDisabled: disabled || !interactive
|
|
3240
3424
|
});
|
|
@@ -3245,11 +3429,11 @@ var TableRow = ({ children, row }) => {
|
|
|
3245
3429
|
focusVisible: isFocusVisible,
|
|
3246
3430
|
active: isPressed
|
|
3247
3431
|
});
|
|
3248
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ jsx95(
|
|
3249
3433
|
"tr",
|
|
3250
3434
|
{
|
|
3251
3435
|
ref,
|
|
3252
|
-
className:
|
|
3436
|
+
className: cn55(
|
|
3253
3437
|
[
|
|
3254
3438
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3255
3439
|
],
|
|
@@ -3272,11 +3456,11 @@ import {
|
|
|
3272
3456
|
} from "@react-aria/table";
|
|
3273
3457
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
3274
3458
|
import {
|
|
3275
|
-
cn as
|
|
3459
|
+
cn as cn56,
|
|
3276
3460
|
width as twWidth6,
|
|
3277
3461
|
useStateProps as useStateProps6
|
|
3278
3462
|
} from "@marigold/system";
|
|
3279
|
-
import { jsx as
|
|
3463
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
3280
3464
|
var TableSelectAllCell = ({
|
|
3281
3465
|
column,
|
|
3282
3466
|
width = "auto",
|
|
@@ -3298,21 +3482,21 @@ var TableSelectAllCell = ({
|
|
|
3298
3482
|
hover: isHovered,
|
|
3299
3483
|
focusVisible: isFocusVisible
|
|
3300
3484
|
});
|
|
3301
|
-
return /* @__PURE__ */
|
|
3485
|
+
return /* @__PURE__ */ jsx96(
|
|
3302
3486
|
"th",
|
|
3303
3487
|
{
|
|
3304
3488
|
ref,
|
|
3305
|
-
className:
|
|
3489
|
+
className: cn56(twWidth6[width], ["leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
3306
3490
|
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
3307
3491
|
...stateProps,
|
|
3308
3492
|
align,
|
|
3309
|
-
children: /* @__PURE__ */
|
|
3493
|
+
children: /* @__PURE__ */ jsx96(_Checkbox, { ...checkboxProps })
|
|
3310
3494
|
}
|
|
3311
3495
|
);
|
|
3312
3496
|
};
|
|
3313
3497
|
|
|
3314
3498
|
// src/Table/Table.tsx
|
|
3315
|
-
import { jsx as
|
|
3499
|
+
import { jsx as jsx97, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3316
3500
|
var Table = ({
|
|
3317
3501
|
variant,
|
|
3318
3502
|
size,
|
|
@@ -3335,21 +3519,21 @@ var Table = ({
|
|
|
3335
3519
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
3336
3520
|
}
|
|
3337
3521
|
const { gridProps } = useTable(props, state, tableRef);
|
|
3338
|
-
const classNames2 =
|
|
3522
|
+
const classNames2 = useClassNames51({
|
|
3339
3523
|
component: "Table",
|
|
3340
3524
|
variant,
|
|
3341
3525
|
size
|
|
3342
3526
|
});
|
|
3343
3527
|
const { collection } = state;
|
|
3344
|
-
return /* @__PURE__ */
|
|
3528
|
+
return /* @__PURE__ */ jsx97(
|
|
3345
3529
|
TableContext.Provider,
|
|
3346
3530
|
{
|
|
3347
3531
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3348
|
-
children: /* @__PURE__ */
|
|
3532
|
+
children: /* @__PURE__ */ jsxs37(
|
|
3349
3533
|
"table",
|
|
3350
3534
|
{
|
|
3351
3535
|
ref: tableRef,
|
|
3352
|
-
className:
|
|
3536
|
+
className: cn57(
|
|
3353
3537
|
"group/table",
|
|
3354
3538
|
"border-collapse",
|
|
3355
3539
|
stretch ? "table w-full" : "block",
|
|
@@ -3357,10 +3541,10 @@ var Table = ({
|
|
|
3357
3541
|
),
|
|
3358
3542
|
...gridProps,
|
|
3359
3543
|
children: [
|
|
3360
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ jsx97(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx97(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3361
3545
|
(column) => {
|
|
3362
3546
|
var _a, _b, _c, _d, _e;
|
|
3363
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3547
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx97(
|
|
3364
3548
|
TableSelectAllCell,
|
|
3365
3549
|
{
|
|
3366
3550
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
@@ -3368,7 +3552,7 @@ var Table = ({
|
|
|
3368
3552
|
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3369
3553
|
},
|
|
3370
3554
|
column.key
|
|
3371
|
-
) : /* @__PURE__ */
|
|
3555
|
+
) : /* @__PURE__ */ jsx97(
|
|
3372
3556
|
TableColumnHeader,
|
|
3373
3557
|
{
|
|
3374
3558
|
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
@@ -3379,12 +3563,12 @@ var Table = ({
|
|
|
3379
3563
|
);
|
|
3380
3564
|
}
|
|
3381
3565
|
) }, headerRow.key)) }),
|
|
3382
|
-
/* @__PURE__ */
|
|
3566
|
+
/* @__PURE__ */ jsxs37(TableBody, { emptyState, children: [
|
|
3383
3567
|
...collection.rows.map(
|
|
3384
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3568
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx97(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3385
3569
|
var _a, _b;
|
|
3386
3570
|
const currentColumn = collection.columns[index];
|
|
3387
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3571
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx97(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx97(
|
|
3388
3572
|
TableCell,
|
|
3389
3573
|
{
|
|
3390
3574
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -3404,13 +3588,13 @@ var Table = ({
|
|
|
3404
3588
|
Table.Body = Body2;
|
|
3405
3589
|
Table.Cell = Cell;
|
|
3406
3590
|
Table.Column = Column;
|
|
3407
|
-
Table.Header =
|
|
3591
|
+
Table.Header = Header3;
|
|
3408
3592
|
Table.Row = Row;
|
|
3409
3593
|
|
|
3410
3594
|
// src/Text/Text.tsx
|
|
3411
3595
|
import { Text as Text2 } from "react-aria-components";
|
|
3412
3596
|
import {
|
|
3413
|
-
cn as
|
|
3597
|
+
cn as cn58,
|
|
3414
3598
|
createVar as createVar11,
|
|
3415
3599
|
cursorStyle,
|
|
3416
3600
|
fontWeight,
|
|
@@ -3418,10 +3602,10 @@ import {
|
|
|
3418
3602
|
textAlign as textAlign2,
|
|
3419
3603
|
textSize,
|
|
3420
3604
|
textStyle,
|
|
3421
|
-
useClassNames as
|
|
3605
|
+
useClassNames as useClassNames52,
|
|
3422
3606
|
useTheme as useTheme3
|
|
3423
3607
|
} from "@marigold/system";
|
|
3424
|
-
import { jsx as
|
|
3608
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
3425
3609
|
var _Text = ({
|
|
3426
3610
|
variant,
|
|
3427
3611
|
size,
|
|
@@ -3436,17 +3620,18 @@ var _Text = ({
|
|
|
3436
3620
|
...props
|
|
3437
3621
|
}) => {
|
|
3438
3622
|
const theme = useTheme3();
|
|
3439
|
-
const classNames2 =
|
|
3623
|
+
const classNames2 = useClassNames52({
|
|
3440
3624
|
component: "Text",
|
|
3441
3625
|
variant,
|
|
3442
3626
|
size
|
|
3443
3627
|
});
|
|
3444
|
-
|
|
3445
|
-
|
|
3628
|
+
const Component = props.slot ? Text2 : as;
|
|
3629
|
+
return /* @__PURE__ */ jsx98(
|
|
3630
|
+
Component,
|
|
3446
3631
|
{
|
|
3447
3632
|
...props,
|
|
3448
|
-
elementType: as,
|
|
3449
|
-
className:
|
|
3633
|
+
elementType: props.slot ? as : void 0,
|
|
3634
|
+
className: cn58(
|
|
3450
3635
|
"text-[--color] outline-[--outline]",
|
|
3451
3636
|
classNames2,
|
|
3452
3637
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3469,11 +3654,11 @@ var _Text = ({
|
|
|
3469
3654
|
};
|
|
3470
3655
|
|
|
3471
3656
|
// src/TextArea/TextArea.tsx
|
|
3472
|
-
import { forwardRef as
|
|
3657
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
3473
3658
|
import { TextArea, TextField } from "react-aria-components";
|
|
3474
|
-
import { useClassNames as
|
|
3475
|
-
import { jsx as
|
|
3476
|
-
var _TextArea =
|
|
3659
|
+
import { useClassNames as useClassNames53 } from "@marigold/system";
|
|
3660
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
3661
|
+
var _TextArea = forwardRef27(
|
|
3477
3662
|
({
|
|
3478
3663
|
variant,
|
|
3479
3664
|
size,
|
|
@@ -3484,7 +3669,7 @@ var _TextArea = forwardRef23(
|
|
|
3484
3669
|
rows,
|
|
3485
3670
|
...rest
|
|
3486
3671
|
}, ref) => {
|
|
3487
|
-
const classNames2 =
|
|
3672
|
+
const classNames2 = useClassNames53({ component: "TextArea", variant, size });
|
|
3488
3673
|
const props = {
|
|
3489
3674
|
isDisabled: disabled,
|
|
3490
3675
|
isReadOnly: readOnly,
|
|
@@ -3492,15 +3677,15 @@ var _TextArea = forwardRef23(
|
|
|
3492
3677
|
isRequired: required,
|
|
3493
3678
|
...rest
|
|
3494
3679
|
};
|
|
3495
|
-
return /* @__PURE__ */
|
|
3680
|
+
return /* @__PURE__ */ jsx99(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx99(TextArea, { className: classNames2, ref, rows }) });
|
|
3496
3681
|
}
|
|
3497
3682
|
);
|
|
3498
3683
|
|
|
3499
3684
|
// src/TextField/TextField.tsx
|
|
3500
|
-
import { forwardRef as
|
|
3685
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
3501
3686
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3502
|
-
import { jsx as
|
|
3503
|
-
var _TextField =
|
|
3687
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
3688
|
+
var _TextField = forwardRef28(
|
|
3504
3689
|
({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
3505
3690
|
const props = {
|
|
3506
3691
|
isDisabled: disabled,
|
|
@@ -3509,13 +3694,13 @@ var _TextField = forwardRef24(
|
|
|
3509
3694
|
isRequired: required,
|
|
3510
3695
|
...rest
|
|
3511
3696
|
};
|
|
3512
|
-
return /* @__PURE__ */
|
|
3697
|
+
return /* @__PURE__ */ jsx100(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx100(_Input, { ref }) });
|
|
3513
3698
|
}
|
|
3514
3699
|
);
|
|
3515
3700
|
|
|
3516
3701
|
// src/Tiles/Tiles.tsx
|
|
3517
|
-
import { cn as
|
|
3518
|
-
import { jsx as
|
|
3702
|
+
import { cn as cn59, createVar as createVar12, gapSpace as gapSpace8 } from "@marigold/system";
|
|
3703
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
3519
3704
|
var Tiles = ({
|
|
3520
3705
|
space = 0,
|
|
3521
3706
|
stretch = false,
|
|
@@ -3528,11 +3713,11 @@ var Tiles = ({
|
|
|
3528
3713
|
if (stretch) {
|
|
3529
3714
|
column = `minmax(${column}, 1fr)`;
|
|
3530
3715
|
}
|
|
3531
|
-
return /* @__PURE__ */
|
|
3716
|
+
return /* @__PURE__ */ jsx101(
|
|
3532
3717
|
"div",
|
|
3533
3718
|
{
|
|
3534
3719
|
...props,
|
|
3535
|
-
className:
|
|
3720
|
+
className: cn59(
|
|
3536
3721
|
"grid",
|
|
3537
3722
|
gapSpace8[space],
|
|
3538
3723
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -3546,11 +3731,11 @@ var Tiles = ({
|
|
|
3546
3731
|
|
|
3547
3732
|
// src/Tooltip/Tooltip.tsx
|
|
3548
3733
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3549
|
-
import { cn as
|
|
3734
|
+
import { cn as cn60, useClassNames as useClassNames54 } from "@marigold/system";
|
|
3550
3735
|
|
|
3551
3736
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3552
3737
|
import { TooltipTrigger } from "react-aria-components";
|
|
3553
|
-
import { jsx as
|
|
3738
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
3554
3739
|
var _TooltipTrigger = ({
|
|
3555
3740
|
delay = 1e3,
|
|
3556
3741
|
children,
|
|
@@ -3564,26 +3749,26 @@ var _TooltipTrigger = ({
|
|
|
3564
3749
|
isOpen: open,
|
|
3565
3750
|
delay
|
|
3566
3751
|
};
|
|
3567
|
-
return /* @__PURE__ */
|
|
3752
|
+
return /* @__PURE__ */ jsx102(TooltipTrigger, { ...props, children });
|
|
3568
3753
|
};
|
|
3569
3754
|
|
|
3570
3755
|
// src/Tooltip/Tooltip.tsx
|
|
3571
|
-
import { jsx as
|
|
3756
|
+
import { jsx as jsx103, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3572
3757
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3573
3758
|
const props = {
|
|
3574
3759
|
...rest,
|
|
3575
3760
|
isOpen: open
|
|
3576
3761
|
};
|
|
3577
|
-
const classNames2 =
|
|
3762
|
+
const classNames2 = useClassNames54({ component: "Tooltip", variant, size });
|
|
3578
3763
|
const portal = usePortalContainer();
|
|
3579
|
-
return /* @__PURE__ */
|
|
3764
|
+
return /* @__PURE__ */ jsxs38(
|
|
3580
3765
|
Tooltip,
|
|
3581
3766
|
{
|
|
3582
3767
|
...props,
|
|
3583
|
-
className:
|
|
3768
|
+
className: cn60("group/tooltip", classNames2.container),
|
|
3584
3769
|
UNSTABLE_portalContainer: portal,
|
|
3585
3770
|
children: [
|
|
3586
|
-
/* @__PURE__ */
|
|
3771
|
+
/* @__PURE__ */ jsx103(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx103("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx103("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3587
3772
|
children
|
|
3588
3773
|
]
|
|
3589
3774
|
}
|
|
@@ -3595,11 +3780,16 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
3595
3780
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
3596
3781
|
|
|
3597
3782
|
// src/XLoader/XLoader.tsx
|
|
3598
|
-
import { forwardRef as
|
|
3599
|
-
import {
|
|
3600
|
-
import {
|
|
3601
|
-
|
|
3602
|
-
|
|
3783
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
3784
|
+
import { Dialog as Dialog2, Modal as Modal2, ModalOverlay as ModalOverlay2 } from "react-aria-components";
|
|
3785
|
+
import { SVG as SVG10, useClassNames as useClassNames55 } from "@marigold/system";
|
|
3786
|
+
import { Fragment as Fragment10, jsx as jsx104, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3787
|
+
var LoadingModes = {
|
|
3788
|
+
FullSize: "fullsize",
|
|
3789
|
+
Inline: "inline"
|
|
3790
|
+
};
|
|
3791
|
+
var Loader = forwardRef29((props, ref) => /* @__PURE__ */ jsxs39(
|
|
3792
|
+
SVG10,
|
|
3603
3793
|
{
|
|
3604
3794
|
id: "XLoader",
|
|
3605
3795
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3608,13 +3798,13 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3608
3798
|
...props,
|
|
3609
3799
|
...ref,
|
|
3610
3800
|
children: [
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3801
|
+
/* @__PURE__ */ jsx104("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3802
|
+
/* @__PURE__ */ jsx104(
|
|
3613
3803
|
"path",
|
|
3614
3804
|
{
|
|
3615
3805
|
id: "XMLID_5_",
|
|
3616
3806
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3617
|
-
children: /* @__PURE__ */
|
|
3807
|
+
children: /* @__PURE__ */ jsx104(
|
|
3618
3808
|
"animate",
|
|
3619
3809
|
{
|
|
3620
3810
|
attributeName: "opacity",
|
|
@@ -3627,12 +3817,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3627
3817
|
)
|
|
3628
3818
|
}
|
|
3629
3819
|
),
|
|
3630
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsx104(
|
|
3631
3821
|
"path",
|
|
3632
3822
|
{
|
|
3633
3823
|
id: "XMLID_18_",
|
|
3634
3824
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3635
|
-
children: /* @__PURE__ */
|
|
3825
|
+
children: /* @__PURE__ */ jsx104(
|
|
3636
3826
|
"animate",
|
|
3637
3827
|
{
|
|
3638
3828
|
attributeName: "opacity",
|
|
@@ -3645,12 +3835,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3645
3835
|
)
|
|
3646
3836
|
}
|
|
3647
3837
|
),
|
|
3648
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ jsx104(
|
|
3649
3839
|
"path",
|
|
3650
3840
|
{
|
|
3651
3841
|
id: "XMLID_19_",
|
|
3652
3842
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3653
|
-
children: /* @__PURE__ */
|
|
3843
|
+
children: /* @__PURE__ */ jsx104(
|
|
3654
3844
|
"animate",
|
|
3655
3845
|
{
|
|
3656
3846
|
attributeName: "opacity",
|
|
@@ -3663,12 +3853,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3663
3853
|
)
|
|
3664
3854
|
}
|
|
3665
3855
|
),
|
|
3666
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ jsx104(
|
|
3667
3857
|
"path",
|
|
3668
3858
|
{
|
|
3669
3859
|
id: "XMLID_20_",
|
|
3670
3860
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3671
|
-
children: /* @__PURE__ */
|
|
3861
|
+
children: /* @__PURE__ */ jsx104(
|
|
3672
3862
|
"animate",
|
|
3673
3863
|
{
|
|
3674
3864
|
attributeName: "opacity",
|
|
@@ -3681,12 +3871,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3681
3871
|
)
|
|
3682
3872
|
}
|
|
3683
3873
|
),
|
|
3684
|
-
/* @__PURE__ */
|
|
3874
|
+
/* @__PURE__ */ jsx104(
|
|
3685
3875
|
"path",
|
|
3686
3876
|
{
|
|
3687
3877
|
id: "XMLID_21_",
|
|
3688
3878
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
3689
|
-
children: /* @__PURE__ */
|
|
3879
|
+
children: /* @__PURE__ */ jsx104(
|
|
3690
3880
|
"animate",
|
|
3691
3881
|
{
|
|
3692
3882
|
attributeName: "opacity",
|
|
@@ -3699,12 +3889,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3699
3889
|
)
|
|
3700
3890
|
}
|
|
3701
3891
|
),
|
|
3702
|
-
/* @__PURE__ */
|
|
3892
|
+
/* @__PURE__ */ jsx104(
|
|
3703
3893
|
"path",
|
|
3704
3894
|
{
|
|
3705
3895
|
id: "XMLID_22_",
|
|
3706
3896
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
3707
|
-
children: /* @__PURE__ */
|
|
3897
|
+
children: /* @__PURE__ */ jsx104(
|
|
3708
3898
|
"animate",
|
|
3709
3899
|
{
|
|
3710
3900
|
attributeName: "opacity",
|
|
@@ -3717,12 +3907,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3717
3907
|
)
|
|
3718
3908
|
}
|
|
3719
3909
|
),
|
|
3720
|
-
/* @__PURE__ */
|
|
3910
|
+
/* @__PURE__ */ jsx104(
|
|
3721
3911
|
"path",
|
|
3722
3912
|
{
|
|
3723
3913
|
id: "XMLID_23_",
|
|
3724
3914
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3725
|
-
children: /* @__PURE__ */
|
|
3915
|
+
children: /* @__PURE__ */ jsx104(
|
|
3726
3916
|
"animate",
|
|
3727
3917
|
{
|
|
3728
3918
|
attributeName: "opacity",
|
|
@@ -3735,12 +3925,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3735
3925
|
)
|
|
3736
3926
|
}
|
|
3737
3927
|
),
|
|
3738
|
-
/* @__PURE__ */
|
|
3928
|
+
/* @__PURE__ */ jsx104(
|
|
3739
3929
|
"path",
|
|
3740
3930
|
{
|
|
3741
3931
|
id: "XMLID_24_",
|
|
3742
3932
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3743
|
-
children: /* @__PURE__ */
|
|
3933
|
+
children: /* @__PURE__ */ jsx104(
|
|
3744
3934
|
"animate",
|
|
3745
3935
|
{
|
|
3746
3936
|
attributeName: "opacity",
|
|
@@ -3753,12 +3943,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3753
3943
|
)
|
|
3754
3944
|
}
|
|
3755
3945
|
),
|
|
3756
|
-
/* @__PURE__ */
|
|
3946
|
+
/* @__PURE__ */ jsx104(
|
|
3757
3947
|
"path",
|
|
3758
3948
|
{
|
|
3759
3949
|
id: "XMLID_25_",
|
|
3760
3950
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3761
|
-
children: /* @__PURE__ */
|
|
3951
|
+
children: /* @__PURE__ */ jsx104(
|
|
3762
3952
|
"animate",
|
|
3763
3953
|
{
|
|
3764
3954
|
attributeName: "opacity",
|
|
@@ -3771,12 +3961,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3771
3961
|
)
|
|
3772
3962
|
}
|
|
3773
3963
|
),
|
|
3774
|
-
/* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsx104(
|
|
3775
3965
|
"path",
|
|
3776
3966
|
{
|
|
3777
3967
|
id: "XMLID_26_",
|
|
3778
3968
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3779
|
-
children: /* @__PURE__ */
|
|
3969
|
+
children: /* @__PURE__ */ jsx104(
|
|
3780
3970
|
"animate",
|
|
3781
3971
|
{
|
|
3782
3972
|
attributeName: "opacity",
|
|
@@ -3789,12 +3979,12 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3789
3979
|
)
|
|
3790
3980
|
}
|
|
3791
3981
|
),
|
|
3792
|
-
/* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ jsx104(
|
|
3793
3983
|
"path",
|
|
3794
3984
|
{
|
|
3795
3985
|
id: "XMLID_27_",
|
|
3796
3986
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3797
|
-
children: /* @__PURE__ */
|
|
3987
|
+
children: /* @__PURE__ */ jsx104(
|
|
3798
3988
|
"animate",
|
|
3799
3989
|
{
|
|
3800
3990
|
attributeName: "opacity",
|
|
@@ -3810,10 +4000,36 @@ var XLoader = forwardRef25((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
3810
4000
|
]
|
|
3811
4001
|
}
|
|
3812
4002
|
));
|
|
4003
|
+
var LoaderFullSize = forwardRef29(
|
|
4004
|
+
({ children, ...rest }, ref) => {
|
|
4005
|
+
const className = useClassNames55({
|
|
4006
|
+
component: "Underlay",
|
|
4007
|
+
variant: "modal",
|
|
4008
|
+
className: "fixed left-0 top-0 z-10 flex h-[--visual-viewport-height] w-screen items-center justify-center bg-gray-950/30 cursor-progress"
|
|
4009
|
+
});
|
|
4010
|
+
return /* @__PURE__ */ jsx104(ModalOverlay2, { defaultOpen: true, className, isKeyboardDismissDisabled: true, children: /* @__PURE__ */ jsx104(Modal2, { children: /* @__PURE__ */ jsx104(Dialog2, { className: "text-text-inverted outline-0", children: /* @__PURE__ */ jsxs39(Stack, { space: 2, alignX: "center", children: [
|
|
4011
|
+
/* @__PURE__ */ jsx104(Loader, { ...rest, ...ref, color: "text-inverted", size: 80 }),
|
|
4012
|
+
children
|
|
4013
|
+
] }) }) }) });
|
|
4014
|
+
}
|
|
4015
|
+
);
|
|
4016
|
+
var LoaderInline = forwardRef29(
|
|
4017
|
+
({ children, ...rest }, ref) => {
|
|
4018
|
+
return /* @__PURE__ */ jsx104("div", { className: "text-text-inverted flex h-full w-full items-center justify-center bg-gray-950/30", children: /* @__PURE__ */ jsxs39(Stack, { space: 2, alignX: "center", children: [
|
|
4019
|
+
/* @__PURE__ */ jsx104(Loader, { ...rest, ...ref, color: "text-inverted", size: 80 }),
|
|
4020
|
+
children
|
|
4021
|
+
] }) });
|
|
4022
|
+
}
|
|
4023
|
+
);
|
|
4024
|
+
var XLoader = forwardRef29(
|
|
4025
|
+
({ mode, ...rest }, ref) => {
|
|
4026
|
+
return /* @__PURE__ */ jsx104(Fragment10, { children: mode === LoadingModes.FullSize ? /* @__PURE__ */ jsx104(LoaderFullSize, { ...rest, ...ref }) : mode === LoadingModes.Inline ? /* @__PURE__ */ jsx104(LoaderInline, { ...rest, ...ref }) : /* @__PURE__ */ jsx104(Loader, { ...rest, ...ref }) });
|
|
4027
|
+
}
|
|
4028
|
+
);
|
|
3813
4029
|
|
|
3814
4030
|
// src/Tabs/Tabs.tsx
|
|
3815
4031
|
import { Tabs } from "react-aria-components";
|
|
3816
|
-
import { useClassNames as
|
|
4032
|
+
import { useClassNames as useClassNames56 } from "@marigold/system";
|
|
3817
4033
|
|
|
3818
4034
|
// src/Tabs/Context.ts
|
|
3819
4035
|
import { createContext as createContext10, useContext as useContext16 } from "react";
|
|
@@ -3822,15 +4038,15 @@ var useTabContext = () => useContext16(TabContext);
|
|
|
3822
4038
|
|
|
3823
4039
|
// src/Tabs/Tab.tsx
|
|
3824
4040
|
import { Tab } from "react-aria-components";
|
|
3825
|
-
import { cn as
|
|
3826
|
-
import { jsx as
|
|
4041
|
+
import { cn as cn61 } from "@marigold/system";
|
|
4042
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
3827
4043
|
var _Tab = (props) => {
|
|
3828
4044
|
const { classNames: classNames2 } = useTabContext();
|
|
3829
|
-
return /* @__PURE__ */
|
|
4045
|
+
return /* @__PURE__ */ jsx105(
|
|
3830
4046
|
Tab,
|
|
3831
4047
|
{
|
|
3832
4048
|
...props,
|
|
3833
|
-
className:
|
|
4049
|
+
className: cn61(
|
|
3834
4050
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
3835
4051
|
classNames2.tab
|
|
3836
4052
|
),
|
|
@@ -3841,15 +4057,15 @@ var _Tab = (props) => {
|
|
|
3841
4057
|
|
|
3842
4058
|
// src/Tabs/TabList.tsx
|
|
3843
4059
|
import { TabList } from "react-aria-components";
|
|
3844
|
-
import { cn as
|
|
3845
|
-
import { jsx as
|
|
4060
|
+
import { cn as cn62, gapSpace as gapSpace9 } from "@marigold/system";
|
|
4061
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
3846
4062
|
var _TabList = ({ space = 2, ...props }) => {
|
|
3847
4063
|
const { classNames: classNames2 } = useTabContext();
|
|
3848
|
-
return /* @__PURE__ */
|
|
4064
|
+
return /* @__PURE__ */ jsx106(
|
|
3849
4065
|
TabList,
|
|
3850
4066
|
{
|
|
3851
4067
|
...props,
|
|
3852
|
-
className:
|
|
4068
|
+
className: cn62("flex", gapSpace9[space], classNames2.tabsList),
|
|
3853
4069
|
children: props.children
|
|
3854
4070
|
}
|
|
3855
4071
|
);
|
|
@@ -3857,25 +4073,25 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
3857
4073
|
|
|
3858
4074
|
// src/Tabs/TabPanel.tsx
|
|
3859
4075
|
import { TabPanel } from "react-aria-components";
|
|
3860
|
-
import { jsx as
|
|
4076
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
3861
4077
|
var _TabPanel = (props) => {
|
|
3862
4078
|
const { classNames: classNames2 } = useTabContext();
|
|
3863
|
-
return /* @__PURE__ */
|
|
4079
|
+
return /* @__PURE__ */ jsx107(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
3864
4080
|
};
|
|
3865
4081
|
|
|
3866
4082
|
// src/Tabs/Tabs.tsx
|
|
3867
|
-
import { jsx as
|
|
4083
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
3868
4084
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
3869
4085
|
const props = {
|
|
3870
4086
|
isDisabled: disabled,
|
|
3871
4087
|
...rest
|
|
3872
4088
|
};
|
|
3873
|
-
const classNames2 =
|
|
4089
|
+
const classNames2 = useClassNames56({
|
|
3874
4090
|
component: "Tabs",
|
|
3875
4091
|
size,
|
|
3876
4092
|
variant
|
|
3877
4093
|
});
|
|
3878
|
-
return /* @__PURE__ */
|
|
4094
|
+
return /* @__PURE__ */ jsx108(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx108(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
3879
4095
|
};
|
|
3880
4096
|
_Tabs.List = _TabList;
|
|
3881
4097
|
_Tabs.TabPanel = _TabPanel;
|