@marigold/components 6.2.0 → 6.2.1
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.ts +55 -54
- package/dist/index.js +1481 -1273
- package/dist/index.mjs +1400 -1192
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -126,6 +126,7 @@ var import_focus = require("@react-aria/focus");
|
|
|
126
126
|
var import_interactions = require("@react-aria/interactions");
|
|
127
127
|
var import_utils = require("@react-aria/utils");
|
|
128
128
|
var import_system = require("@marigold/system");
|
|
129
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
129
130
|
var Button = (0, import_react.forwardRef)(
|
|
130
131
|
({
|
|
131
132
|
as = "button",
|
|
@@ -178,7 +179,7 @@ var Button = (0, import_react.forwardRef)(
|
|
|
178
179
|
focusVisible: isFocusVisible,
|
|
179
180
|
hover: isHovered
|
|
180
181
|
});
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
182
183
|
Component,
|
|
183
184
|
{
|
|
184
185
|
...(0, import_utils.mergeProps)(buttonProps, focusProps, hoverProps, props),
|
|
@@ -188,9 +189,9 @@ var Button = (0, import_react.forwardRef)(
|
|
|
188
189
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
189
190
|
classNames2,
|
|
190
191
|
fullWidth ? "w-full" : void 0
|
|
191
|
-
)
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
),
|
|
193
|
+
children
|
|
194
|
+
}
|
|
194
195
|
);
|
|
195
196
|
}
|
|
196
197
|
);
|
|
@@ -198,15 +199,17 @@ var Button = (0, import_react.forwardRef)(
|
|
|
198
199
|
// src/Chevron/ChevronUp.tsx
|
|
199
200
|
var import_react2 = require("react");
|
|
200
201
|
var import_system2 = require("@marigold/system");
|
|
202
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
201
203
|
var ChevronUp = (0, import_react2.forwardRef)(
|
|
202
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
204
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_system2.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5.97563 16.8506L12 10.8394L18.0244 16.8506L19.875 15L12 7.125L4.125 15L5.97563 16.8506Z" }) })
|
|
203
205
|
);
|
|
204
206
|
|
|
205
207
|
// src/Chevron/ChevronDown.tsx
|
|
206
208
|
var import_react3 = require("react");
|
|
207
209
|
var import_system3 = require("@marigold/system");
|
|
210
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
208
211
|
var ChevronDown = (0, import_react3.forwardRef)(
|
|
209
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
212
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_system3.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }) })
|
|
210
213
|
);
|
|
211
214
|
|
|
212
215
|
// src/Accordion/useAccordionItem.ts
|
|
@@ -306,6 +309,7 @@ function useAccordionItem(props, state, ref) {
|
|
|
306
309
|
}
|
|
307
310
|
|
|
308
311
|
// src/Accordion/AccordionItem.tsx
|
|
312
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
309
313
|
var AccordionItem = ({
|
|
310
314
|
item,
|
|
311
315
|
state,
|
|
@@ -344,27 +348,33 @@ var AccordionItem = ({
|
|
|
344
348
|
expanded: defaultExpanded || expanded
|
|
345
349
|
});
|
|
346
350
|
const classNames2 = (0, import_system4.useClassNames)({ component: "Accordion", variant, size });
|
|
347
|
-
return /* @__PURE__ */
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col", ...props, children: [
|
|
352
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_focus2.FocusRing, { within: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
353
|
+
Button,
|
|
354
|
+
{
|
|
355
|
+
className: classNames2.button,
|
|
356
|
+
...(0, import_utils5.mergeProps)(buttonProps, stateProps, props),
|
|
357
|
+
ref,
|
|
358
|
+
"aria-label": item.textValue,
|
|
359
|
+
children: [
|
|
360
|
+
title,
|
|
361
|
+
!expanded ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronUp, { className: "h3 w-6" }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronDown, { className: "h3 w-6" })
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
) }),
|
|
365
|
+
expanded || defaultExpanded ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
...(0, import_utils5.mergeProps)(regionProps, focusProps, stateProps),
|
|
369
|
+
className: classNames2.item,
|
|
370
|
+
children: item.props.children
|
|
371
|
+
}
|
|
372
|
+
) : null
|
|
373
|
+
] });
|
|
365
374
|
};
|
|
366
375
|
|
|
367
376
|
// src/Accordion/Accordion.tsx
|
|
377
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
368
378
|
var Accordion = ({ children, ...props }) => {
|
|
369
379
|
const ownProps = {
|
|
370
380
|
...props,
|
|
@@ -389,23 +399,24 @@ var Accordion = ({ children, ...props }) => {
|
|
|
389
399
|
state,
|
|
390
400
|
ref
|
|
391
401
|
);
|
|
392
|
-
return /* @__PURE__ */
|
|
402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ...accordionProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
393
403
|
AccordionItem,
|
|
394
404
|
{
|
|
395
|
-
key: item.key,
|
|
396
405
|
title: item.props.title,
|
|
397
406
|
item,
|
|
398
407
|
state,
|
|
399
408
|
variant: item.props.variant,
|
|
400
409
|
size: item.props.size
|
|
401
|
-
}
|
|
402
|
-
|
|
410
|
+
},
|
|
411
|
+
item.key
|
|
412
|
+
)) });
|
|
403
413
|
};
|
|
404
414
|
Accordion.Item = import_collections.Item;
|
|
405
415
|
|
|
406
416
|
// src/Aside/Aside.tsx
|
|
407
417
|
var import_react6 = require("react");
|
|
408
418
|
var import_system5 = require("@marigold/system");
|
|
419
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
409
420
|
var classNames = {
|
|
410
421
|
aside: "grow basis-[--sideWidth]",
|
|
411
422
|
content: "basis-0 grow-[999] [min-inline-size:--wrap]"
|
|
@@ -423,47 +434,50 @@ var Aside = ({
|
|
|
423
434
|
aside: (0, import_system5.createVar)({ sideWidth }),
|
|
424
435
|
content: (0, import_system5.createVar)({ wrap })
|
|
425
436
|
};
|
|
426
|
-
return /* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
427
438
|
"div",
|
|
428
439
|
{
|
|
429
440
|
className: (0, import_system5.cn)(
|
|
430
441
|
"flex flex-wrap",
|
|
431
442
|
import_system5.gapSpace[space],
|
|
432
443
|
!stretch && "items-start"
|
|
433
|
-
)
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
444
|
+
),
|
|
445
|
+
children: [
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
447
|
+
"div",
|
|
448
|
+
{
|
|
449
|
+
className: classNames[side === "left" ? "aside" : "content"],
|
|
450
|
+
style: vars[side === "left" ? "aside" : "content"],
|
|
451
|
+
children: left
|
|
452
|
+
}
|
|
453
|
+
),
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
455
|
+
"div",
|
|
456
|
+
{
|
|
457
|
+
className: classNames[side === "right" ? "aside" : "content"],
|
|
458
|
+
style: vars[side === "right" ? "aside" : "content"],
|
|
459
|
+
children: right
|
|
460
|
+
}
|
|
461
|
+
)
|
|
462
|
+
]
|
|
463
|
+
}
|
|
451
464
|
);
|
|
452
465
|
};
|
|
453
466
|
|
|
454
467
|
// src/Aspect/Aspect.tsx
|
|
455
468
|
var import_system6 = require("@marigold/system");
|
|
469
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
456
470
|
var Aspect = ({
|
|
457
471
|
ratio = "square",
|
|
458
472
|
maxWidth,
|
|
459
473
|
children
|
|
460
|
-
}) => /* @__PURE__ */
|
|
474
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
461
475
|
"div",
|
|
462
476
|
{
|
|
463
477
|
className: (0, import_system6.cn)("overflow-hidden", import_system6.aspect[ratio], "max-w-[var(--maxWidth)]"),
|
|
464
|
-
style: (0, import_system6.createVar)({ maxWidth })
|
|
465
|
-
|
|
466
|
-
|
|
478
|
+
style: (0, import_system6.createVar)({ maxWidth }),
|
|
479
|
+
children
|
|
480
|
+
}
|
|
467
481
|
);
|
|
468
482
|
|
|
469
483
|
// src/Autocomplete/Autocomplete.tsx
|
|
@@ -478,6 +492,7 @@ var import_system9 = require("@marigold/system");
|
|
|
478
492
|
|
|
479
493
|
// src/HelpText/HelpText.tsx
|
|
480
494
|
var import_system7 = require("@marigold/system");
|
|
495
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
481
496
|
var HelpText = ({
|
|
482
497
|
variant,
|
|
483
498
|
size,
|
|
@@ -497,27 +512,31 @@ var HelpText = ({
|
|
|
497
512
|
size,
|
|
498
513
|
className
|
|
499
514
|
});
|
|
500
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
501
516
|
"div",
|
|
502
517
|
{
|
|
503
518
|
...props,
|
|
504
519
|
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
505
|
-
className: (0, import_system7.cn)("flex items-center gap-1", classNames2.container)
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
520
|
+
className: (0, import_system7.cn)("flex items-center gap-1", classNames2.container),
|
|
521
|
+
children: hasErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
522
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
523
|
+
import_system7.SVG,
|
|
524
|
+
{
|
|
525
|
+
className: (0, import_system7.cn)("h-4 w-4", classNames2.icon),
|
|
526
|
+
viewBox: "0 0 24 24",
|
|
527
|
+
role: "presentation",
|
|
528
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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" })
|
|
529
|
+
}
|
|
530
|
+
),
|
|
531
|
+
errorMessage
|
|
532
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: description })
|
|
533
|
+
}
|
|
516
534
|
);
|
|
517
535
|
};
|
|
518
536
|
|
|
519
537
|
// src/Label/Label.tsx
|
|
520
538
|
var import_system8 = require("@marigold/system");
|
|
539
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
521
540
|
var Label = ({
|
|
522
541
|
as = "label",
|
|
523
542
|
children,
|
|
@@ -528,36 +547,40 @@ var Label = ({
|
|
|
528
547
|
}) => {
|
|
529
548
|
const Component = as;
|
|
530
549
|
const classNames2 = (0, import_system8.useClassNames)({ component: "Label", size, variant });
|
|
531
|
-
return /* @__PURE__ */
|
|
550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
532
551
|
Component,
|
|
533
552
|
{
|
|
534
553
|
...props,
|
|
535
554
|
className: (0, import_system8.cn)(classNames2.container, "flex w-[var(--labelWidth)]"),
|
|
536
|
-
style: (0, import_system8.createVar)({ labelWidth })
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
555
|
+
style: (0, import_system8.createVar)({ labelWidth }),
|
|
556
|
+
children: [
|
|
557
|
+
children,
|
|
558
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
559
|
+
import_system8.SVG,
|
|
560
|
+
{
|
|
561
|
+
viewBox: "0 0 24 24",
|
|
562
|
+
role: "presentation",
|
|
563
|
+
size: 16,
|
|
564
|
+
className: (0, import_system8.cn)("hidden", classNames2.indicator),
|
|
565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("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" })
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
]
|
|
569
|
+
}
|
|
549
570
|
);
|
|
550
571
|
};
|
|
551
572
|
|
|
552
573
|
// src/FieldBase/FieldGroup.tsx
|
|
553
574
|
var import_react7 = require("react");
|
|
575
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
554
576
|
var FieldGroupContext = (0, import_react7.createContext)({});
|
|
555
577
|
var useFieldGroupContext = () => (0, import_react7.useContext)(FieldGroupContext);
|
|
556
578
|
var FieldGroup = ({ labelWidth, children }) => {
|
|
557
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldGroupContext.Provider, { value: { labelWidth }, children });
|
|
558
580
|
};
|
|
559
581
|
|
|
560
582
|
// src/FieldBase/FieldBase.tsx
|
|
583
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
561
584
|
var FieldBase = ({
|
|
562
585
|
children,
|
|
563
586
|
variant,
|
|
@@ -581,43 +604,46 @@ var FieldBase = ({
|
|
|
581
604
|
variant,
|
|
582
605
|
size
|
|
583
606
|
});
|
|
584
|
-
return /* @__PURE__ */
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
585
608
|
"div",
|
|
586
609
|
{
|
|
587
610
|
...props,
|
|
588
611
|
...stateProps,
|
|
589
|
-
className: (0, import_system9.cn)("group/field", import_system9.width[width], classNames2)
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
612
|
+
className: (0, import_system9.cn)("group/field", import_system9.width[width], classNames2),
|
|
613
|
+
children: [
|
|
614
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
615
|
+
Label,
|
|
616
|
+
{
|
|
617
|
+
variant,
|
|
618
|
+
size,
|
|
619
|
+
labelWidth,
|
|
620
|
+
...labelProps,
|
|
621
|
+
children: label
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
children,
|
|
625
|
+
hasHelpText && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
626
|
+
HelpText,
|
|
627
|
+
{
|
|
628
|
+
variant,
|
|
629
|
+
size,
|
|
630
|
+
disabled,
|
|
631
|
+
description,
|
|
632
|
+
descriptionProps,
|
|
633
|
+
error,
|
|
634
|
+
errorMessage,
|
|
635
|
+
errorMessageProps
|
|
636
|
+
}
|
|
637
|
+
)
|
|
638
|
+
]
|
|
639
|
+
}
|
|
615
640
|
);
|
|
616
641
|
};
|
|
617
642
|
|
|
618
643
|
// src/Input/Input.tsx
|
|
619
644
|
var import_react8 = require("react");
|
|
620
645
|
var import_system10 = require("@marigold/system");
|
|
646
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
621
647
|
var Input = (0, import_react8.forwardRef)(
|
|
622
648
|
({
|
|
623
649
|
type = "text",
|
|
@@ -650,31 +676,33 @@ var Input = (0, import_react8.forwardRef)(
|
|
|
650
676
|
),
|
|
651
677
|
...action.props
|
|
652
678
|
}) : null;
|
|
653
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
654
680
|
"div",
|
|
655
681
|
{
|
|
656
682
|
className: "group/input relative flex items-center",
|
|
657
683
|
"data-icon": icon && "",
|
|
658
|
-
"data-action": action && ""
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
684
|
+
"data-action": action && "",
|
|
685
|
+
children: [
|
|
686
|
+
inputIcon,
|
|
687
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
688
|
+
"input",
|
|
689
|
+
{
|
|
690
|
+
...props,
|
|
691
|
+
className: (0, import_system10.cn)(
|
|
692
|
+
"flex-1",
|
|
693
|
+
"disabled:cursor-not-allowed",
|
|
694
|
+
"[&[type=file]]:border-none [&[type=file]]:p-0",
|
|
695
|
+
"[&[type=color]]:ml-0 [&[type=color]]:border-none [&[type=color]]:bg-transparent [&[type=color]]:p-0",
|
|
696
|
+
classNames2.input,
|
|
697
|
+
className
|
|
698
|
+
),
|
|
699
|
+
ref,
|
|
700
|
+
type
|
|
701
|
+
}
|
|
672
702
|
),
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
),
|
|
677
|
-
inputAction
|
|
703
|
+
inputAction
|
|
704
|
+
]
|
|
705
|
+
}
|
|
678
706
|
);
|
|
679
707
|
}
|
|
680
708
|
);
|
|
@@ -695,6 +723,7 @@ var import_react10 = require("react");
|
|
|
695
723
|
var import_listbox = require("@react-aria/listbox");
|
|
696
724
|
var import_utils6 = require("@react-aria/utils");
|
|
697
725
|
var import_system11 = require("@marigold/system");
|
|
726
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
698
727
|
var ListBoxOption = ({ item, state }) => {
|
|
699
728
|
const ref = (0, import_react10.useRef)(null);
|
|
700
729
|
const { optionProps, isSelected, isDisabled, isFocused } = (0, import_listbox.useOption)(
|
|
@@ -711,35 +740,40 @@ var ListBoxOption = ({ item, state }) => {
|
|
|
711
740
|
disabled: isDisabled,
|
|
712
741
|
focusVisible: isFocused
|
|
713
742
|
});
|
|
714
|
-
return /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
715
744
|
"li",
|
|
716
745
|
{
|
|
717
746
|
ref,
|
|
718
747
|
className: classNames2.option,
|
|
719
|
-
...(0, import_utils6.mergeProps)(props, { onPointerDown: onPointerUp }, { ...stateProps })
|
|
720
|
-
|
|
721
|
-
|
|
748
|
+
...(0, import_utils6.mergeProps)(props, { onPointerDown: onPointerUp }, { ...stateProps }),
|
|
749
|
+
children: item.props.children
|
|
750
|
+
}
|
|
722
751
|
);
|
|
723
752
|
};
|
|
724
753
|
|
|
725
754
|
// src/ListBox/ListBoxSection.tsx
|
|
726
755
|
var import_listbox2 = require("@react-aria/listbox");
|
|
756
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
727
757
|
var ListBoxSection = ({ section, state }) => {
|
|
728
758
|
const { classNames: classNames2 } = useListBoxContext();
|
|
729
759
|
const { itemProps, headingProps, groupProps } = (0, import_listbox2.useListBoxSection)({
|
|
730
760
|
heading: section.rendered,
|
|
731
761
|
"aria-label": section["aria-label"]
|
|
732
762
|
});
|
|
733
|
-
return /* @__PURE__ */
|
|
763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { className: classNames2.section, ...itemProps, children: [
|
|
764
|
+
section.rendered && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: classNames2.sectionTitle, ...headingProps, children: section.rendered }),
|
|
765
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: classNames2.list, ...groupProps, children: [...section.props.children].map((node) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListBoxOption, { item: node, state }, node.key)) })
|
|
766
|
+
] });
|
|
734
767
|
};
|
|
735
768
|
|
|
736
769
|
// src/ListBox/ListBox.tsx
|
|
770
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
737
771
|
var ListBox = (0, import_react11.forwardRef)(
|
|
738
772
|
({ state, variant, size, ...props }, ref) => {
|
|
739
773
|
const innerRef = (0, import_utils7.useObjectRef)(ref);
|
|
740
774
|
const { listBoxProps } = (0, import_listbox3.useListBox)(props, state, innerRef);
|
|
741
775
|
const classNames2 = (0, import_system12.useClassNames)({ component: "ListBox", variant, size });
|
|
742
|
-
return /* @__PURE__ */
|
|
776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
743
777
|
"ul",
|
|
744
778
|
{
|
|
745
779
|
className: (0, import_system12.cn)(
|
|
@@ -747,12 +781,12 @@ var ListBox = (0, import_react11.forwardRef)(
|
|
|
747
781
|
classNames2.list
|
|
748
782
|
),
|
|
749
783
|
ref: innerRef,
|
|
750
|
-
...listBoxProps
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
)));
|
|
784
|
+
...listBoxProps,
|
|
785
|
+
children: [...state.collection].map(
|
|
786
|
+
(item) => item.type === "section" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ListBoxOption, { item, state }, item.key)
|
|
787
|
+
)
|
|
788
|
+
}
|
|
789
|
+
) }) });
|
|
756
790
|
}
|
|
757
791
|
);
|
|
758
792
|
|
|
@@ -764,12 +798,14 @@ var import_utils8 = require("@react-aria/utils");
|
|
|
764
798
|
|
|
765
799
|
// src/Overlay/Underlay.tsx
|
|
766
800
|
var import_system13 = require("@marigold/system");
|
|
801
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
767
802
|
var Underlay = ({ size, variant, ...props }) => {
|
|
768
803
|
const classNames2 = (0, import_system13.useClassNames)({ component: "Underlay", size, variant });
|
|
769
|
-
return /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_system13.cn)("fixed inset-0 z-40", classNames2), ...props });
|
|
770
805
|
};
|
|
771
806
|
|
|
772
807
|
// src/Overlay/Modal.tsx
|
|
808
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
773
809
|
var Modal = (0, import_react12.forwardRef)(
|
|
774
810
|
({ children, open, dismissable, keyboardDismissable, onClose, ...props }, ref) => {
|
|
775
811
|
const modalRef = (0, import_utils8.useObjectRef)(ref);
|
|
@@ -784,15 +820,18 @@ var Modal = (0, import_react12.forwardRef)(
|
|
|
784
820
|
);
|
|
785
821
|
(0, import_overlays.usePreventScroll)();
|
|
786
822
|
const { modalProps } = (0, import_overlays.useModal)({});
|
|
787
|
-
return /* @__PURE__ */
|
|
788
|
-
"
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_focus3.FocusScope, { contain: true, restoreFocus: true, autoFocus: true, children: [
|
|
824
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Underlay, { ...underlayProps, variant: "modal" }),
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
826
|
+
"div",
|
|
827
|
+
{
|
|
828
|
+
className: "pointer-none fixed inset-0 z-50 flex items-center justify-center",
|
|
829
|
+
ref: modalRef,
|
|
830
|
+
...(0, import_utils8.mergeProps)(props, overlayProps, modalProps),
|
|
831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { pointerEvents: "auto" }, children })
|
|
832
|
+
}
|
|
833
|
+
)
|
|
834
|
+
] });
|
|
796
835
|
}
|
|
797
836
|
);
|
|
798
837
|
|
|
@@ -800,6 +839,7 @@ var Modal = (0, import_react12.forwardRef)(
|
|
|
800
839
|
var import_react13 = require("react");
|
|
801
840
|
var import_overlays2 = require("@react-aria/overlays");
|
|
802
841
|
var import_system14 = require("@marigold/system");
|
|
842
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
803
843
|
var Overlay = ({ children, container, open }) => {
|
|
804
844
|
const nodeRef = (0, import_react13.useRef)(null);
|
|
805
845
|
const theme = (0, import_system14.useTheme)();
|
|
@@ -807,16 +847,16 @@ var Overlay = ({ children, container, open }) => {
|
|
|
807
847
|
if (!mountOverlay) {
|
|
808
848
|
return null;
|
|
809
849
|
}
|
|
810
|
-
return /* @__PURE__ */
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_overlays2.Overlay, { portalContainer: container, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
811
851
|
"div",
|
|
812
852
|
{
|
|
813
853
|
ref: nodeRef,
|
|
814
854
|
"data-testid": "overlay",
|
|
815
855
|
"data-theme": theme.name,
|
|
816
|
-
className: "opacity-100"
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
));
|
|
856
|
+
className: "opacity-100",
|
|
857
|
+
children
|
|
858
|
+
}
|
|
859
|
+
) });
|
|
820
860
|
};
|
|
821
861
|
|
|
822
862
|
// src/Overlay/Popover.tsx
|
|
@@ -824,12 +864,13 @@ var import_react14 = require("react");
|
|
|
824
864
|
var import_focus4 = require("@react-aria/focus");
|
|
825
865
|
var import_overlays3 = require("@react-aria/overlays");
|
|
826
866
|
var import_system15 = require("@marigold/system");
|
|
867
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
827
868
|
var Popover = (0, import_react14.forwardRef)(
|
|
828
869
|
(props, ref) => {
|
|
829
870
|
const fallbackRef = (0, import_react14.useRef)(null);
|
|
830
871
|
const popoverRef = ref || fallbackRef;
|
|
831
872
|
let { children, state, ...otherProps } = props;
|
|
832
|
-
return /* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Overlay, { open: state.isOpen, ...otherProps, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverWrapper, { ref: popoverRef, ...props, children }) });
|
|
833
874
|
}
|
|
834
875
|
);
|
|
835
876
|
var PopoverWrapper = (0, import_react14.forwardRef)(
|
|
@@ -854,22 +895,27 @@ var PopoverWrapper = (0, import_react14.forwardRef)(
|
|
|
854
895
|
component: "Popover",
|
|
855
896
|
variant: placement
|
|
856
897
|
});
|
|
857
|
-
return /* @__PURE__ */
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_focus4.FocusScope, { restoreFocus: true, children: [
|
|
899
|
+
!isNonModal && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Underlay, { ...underlayProps }),
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
901
|
+
"div",
|
|
902
|
+
{
|
|
903
|
+
...popoverProps,
|
|
904
|
+
className: classNames2,
|
|
905
|
+
style: {
|
|
906
|
+
...popoverProps.style,
|
|
907
|
+
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
908
|
+
},
|
|
909
|
+
ref,
|
|
910
|
+
role: "presentation",
|
|
911
|
+
children: [
|
|
912
|
+
!isNonModal && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_overlays3.DismissButton, { onDismiss: state.close }),
|
|
913
|
+
children,
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_overlays3.DismissButton, { onDismiss: state.close })
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
)
|
|
918
|
+
] });
|
|
873
919
|
}
|
|
874
920
|
);
|
|
875
921
|
|
|
@@ -878,10 +924,11 @@ var import_react15 = require("react");
|
|
|
878
924
|
var import_focus5 = require("@react-aria/focus");
|
|
879
925
|
var import_overlays4 = require("@react-aria/overlays");
|
|
880
926
|
var import_utils9 = require("@react-aria/utils");
|
|
927
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
881
928
|
var Tray = (0, import_react15.forwardRef)(
|
|
882
929
|
({ state, children, ...props }, ref) => {
|
|
883
930
|
const trayRef = (0, import_utils9.useObjectRef)(ref);
|
|
884
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Overlay, { open: state.isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TrayWrapper, { state, ...props, ref: trayRef, children }) });
|
|
885
932
|
}
|
|
886
933
|
);
|
|
887
934
|
var TrayWrapper = (0, import_react15.forwardRef)(
|
|
@@ -894,18 +941,20 @@ var TrayWrapper = (0, import_react15.forwardRef)(
|
|
|
894
941
|
state,
|
|
895
942
|
ref
|
|
896
943
|
);
|
|
897
|
-
return /* @__PURE__ */
|
|
944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_focus5.FocusScope, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Underlay, { ...underlayProps, variant: "modal", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
898
945
|
"div",
|
|
899
946
|
{
|
|
900
947
|
...modalProps,
|
|
901
948
|
ref,
|
|
902
949
|
className: "absolute bottom-0 w-full",
|
|
903
|
-
"data-testid": "tray"
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
950
|
+
"data-testid": "tray",
|
|
951
|
+
children: [
|
|
952
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_overlays4.DismissButton, { onDismiss: state.close }),
|
|
953
|
+
children,
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_overlays4.DismissButton, { onDismiss: state.close })
|
|
955
|
+
]
|
|
956
|
+
}
|
|
957
|
+
) }) });
|
|
909
958
|
}
|
|
910
959
|
);
|
|
911
960
|
|
|
@@ -916,6 +965,7 @@ var import_focus6 = require("@react-aria/focus");
|
|
|
916
965
|
var import_interactions2 = require("@react-aria/interactions");
|
|
917
966
|
var import_utils10 = require("@react-aria/utils");
|
|
918
967
|
var import_system16 = require("@marigold/system");
|
|
968
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
919
969
|
var ClearButton = ({
|
|
920
970
|
preventFocus,
|
|
921
971
|
disabled,
|
|
@@ -958,7 +1008,7 @@ var ClearButton = ({
|
|
|
958
1008
|
focusVisible: isFocusVisible,
|
|
959
1009
|
hover: isHovered
|
|
960
1010
|
});
|
|
961
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
962
1012
|
"button",
|
|
963
1013
|
{
|
|
964
1014
|
...(0, import_utils10.mergeProps)(buttonProps, focusProps, hoverProps, props),
|
|
@@ -967,24 +1017,25 @@ var ClearButton = ({
|
|
|
967
1017
|
className: (0, import_system16.cn)(
|
|
968
1018
|
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
969
1019
|
className
|
|
1020
|
+
),
|
|
1021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1022
|
+
"svg",
|
|
1023
|
+
{
|
|
1024
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1025
|
+
viewBox: "0 0 20 20",
|
|
1026
|
+
fill: "currentColor",
|
|
1027
|
+
width: 20,
|
|
1028
|
+
height: 20,
|
|
1029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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" })
|
|
1030
|
+
}
|
|
970
1031
|
)
|
|
971
|
-
}
|
|
972
|
-
/* @__PURE__ */ React.createElement(
|
|
973
|
-
"svg",
|
|
974
|
-
{
|
|
975
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
976
|
-
viewBox: "0 0 20 20",
|
|
977
|
-
fill: "currentColor",
|
|
978
|
-
width: 20,
|
|
979
|
-
height: 20
|
|
980
|
-
},
|
|
981
|
-
/* @__PURE__ */ React.createElement("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" })
|
|
982
|
-
)
|
|
1032
|
+
}
|
|
983
1033
|
);
|
|
984
1034
|
};
|
|
985
1035
|
|
|
986
1036
|
// src/Autocomplete/Autocomplete.tsx
|
|
987
|
-
var
|
|
1037
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1038
|
+
var SearchIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
988
1039
|
"svg",
|
|
989
1040
|
{
|
|
990
1041
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -992,9 +1043,9 @@ var SearchIcon = (props) => /* @__PURE__ */ React.createElement(
|
|
|
992
1043
|
fill: "currentColor",
|
|
993
1044
|
width: 24,
|
|
994
1045
|
height: 24,
|
|
995
|
-
...props
|
|
996
|
-
|
|
997
|
-
|
|
1046
|
+
...props,
|
|
1047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("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" })
|
|
1048
|
+
}
|
|
998
1049
|
);
|
|
999
1050
|
var Autocomplete = ({
|
|
1000
1051
|
disabled,
|
|
@@ -1048,44 +1099,47 @@ var Autocomplete = ({
|
|
|
1048
1099
|
state
|
|
1049
1100
|
);
|
|
1050
1101
|
const { isDisabled, ...restClearButtonProps } = clearButtonProps;
|
|
1051
|
-
return /* @__PURE__ */
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
label: props.label,
|
|
1055
|
-
labelProps,
|
|
1056
|
-
description: props.description,
|
|
1057
|
-
error,
|
|
1058
|
-
errorMessage: props.errorMessage,
|
|
1059
|
-
disabled,
|
|
1060
|
-
width
|
|
1061
|
-
},
|
|
1062
|
-
/* @__PURE__ */ React.createElement(
|
|
1063
|
-
Input,
|
|
1102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1104
|
+
FieldBase,
|
|
1064
1105
|
{
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1106
|
+
label: props.label,
|
|
1107
|
+
labelProps,
|
|
1108
|
+
description: props.description,
|
|
1109
|
+
error,
|
|
1110
|
+
errorMessage: props.errorMessage,
|
|
1111
|
+
disabled,
|
|
1112
|
+
width,
|
|
1113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1114
|
+
Input,
|
|
1070
1115
|
{
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1116
|
+
...inputProps,
|
|
1117
|
+
ref: inputRef,
|
|
1118
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SearchIcon, {}),
|
|
1119
|
+
action: state.inputValue !== "" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1120
|
+
ClearButton,
|
|
1121
|
+
{
|
|
1122
|
+
preventFocus: true,
|
|
1123
|
+
disabled: isDisabled,
|
|
1124
|
+
...restClearButtonProps
|
|
1125
|
+
}
|
|
1126
|
+
) : null
|
|
1074
1127
|
}
|
|
1075
|
-
)
|
|
1128
|
+
)
|
|
1129
|
+
}
|
|
1130
|
+
),
|
|
1131
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1132
|
+
Popover,
|
|
1133
|
+
{
|
|
1134
|
+
state,
|
|
1135
|
+
ref: popoverRef,
|
|
1136
|
+
triggerRef: inputRef,
|
|
1137
|
+
scrollRef: listBoxRef,
|
|
1138
|
+
isNonModal: true,
|
|
1139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1076
1140
|
}
|
|
1077
1141
|
)
|
|
1078
|
-
)
|
|
1079
|
-
Popover,
|
|
1080
|
-
{
|
|
1081
|
-
state,
|
|
1082
|
-
ref: popoverRef,
|
|
1083
|
-
triggerRef: inputRef,
|
|
1084
|
-
scrollRef: listBoxRef,
|
|
1085
|
-
isNonModal: true
|
|
1086
|
-
},
|
|
1087
|
-
/* @__PURE__ */ React.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1088
|
-
));
|
|
1142
|
+
] });
|
|
1089
1143
|
};
|
|
1090
1144
|
Autocomplete.Item = import_collections2.Item;
|
|
1091
1145
|
|
|
@@ -1096,6 +1150,7 @@ var import_combobox2 = require("@react-aria/combobox");
|
|
|
1096
1150
|
var import_i18n2 = require("@react-aria/i18n");
|
|
1097
1151
|
var import_collections3 = require("@react-stately/collections");
|
|
1098
1152
|
var import_combobox3 = require("@react-stately/combobox");
|
|
1153
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1099
1154
|
var ComboBox = ({
|
|
1100
1155
|
error,
|
|
1101
1156
|
width,
|
|
@@ -1136,56 +1191,61 @@ var ComboBox = ({
|
|
|
1136
1191
|
const errorMessageProps = { "aria-invalid": error };
|
|
1137
1192
|
const { buttonProps } = (0, import_button4.useButton)(triggerProps, buttonRef);
|
|
1138
1193
|
const { label, description, errorMessage } = props;
|
|
1139
|
-
return /* @__PURE__ */
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
label,
|
|
1143
|
-
labelProps,
|
|
1144
|
-
description,
|
|
1145
|
-
error,
|
|
1146
|
-
errorMessage,
|
|
1147
|
-
errorMessageProps,
|
|
1148
|
-
width
|
|
1149
|
-
},
|
|
1150
|
-
/* @__PURE__ */ import_react18.default.createElement(
|
|
1151
|
-
Input,
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1195
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1196
|
+
FieldBase,
|
|
1152
1197
|
{
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1198
|
+
label,
|
|
1199
|
+
labelProps,
|
|
1200
|
+
description,
|
|
1201
|
+
error,
|
|
1202
|
+
errorMessage,
|
|
1203
|
+
errorMessageProps,
|
|
1204
|
+
width,
|
|
1205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1206
|
+
Input,
|
|
1157
1207
|
{
|
|
1158
|
-
|
|
1159
|
-
ref:
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1208
|
+
...inputProps,
|
|
1209
|
+
ref: inputRef,
|
|
1210
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1211
|
+
Button,
|
|
1212
|
+
{
|
|
1213
|
+
className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0",
|
|
1214
|
+
ref: buttonRef,
|
|
1215
|
+
...buttonProps,
|
|
1216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronDown, { className: "h-4 w-4" })
|
|
1217
|
+
}
|
|
1218
|
+
)
|
|
1219
|
+
}
|
|
1163
1220
|
)
|
|
1164
1221
|
}
|
|
1222
|
+
),
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1224
|
+
Popover,
|
|
1225
|
+
{
|
|
1226
|
+
state,
|
|
1227
|
+
ref: popoverRef,
|
|
1228
|
+
triggerRef: inputRef,
|
|
1229
|
+
scrollRef: listBoxRef,
|
|
1230
|
+
isNonModal: true,
|
|
1231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1232
|
+
}
|
|
1165
1233
|
)
|
|
1166
|
-
)
|
|
1167
|
-
Popover,
|
|
1168
|
-
{
|
|
1169
|
-
state,
|
|
1170
|
-
ref: popoverRef,
|
|
1171
|
-
triggerRef: inputRef,
|
|
1172
|
-
scrollRef: listBoxRef,
|
|
1173
|
-
isNonModal: true
|
|
1174
|
-
},
|
|
1175
|
-
/* @__PURE__ */ import_react18.default.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1176
|
-
));
|
|
1234
|
+
] });
|
|
1177
1235
|
};
|
|
1178
1236
|
ComboBox.Item = import_collections3.Item;
|
|
1179
1237
|
|
|
1180
1238
|
// src/Badge/Badge.tsx
|
|
1181
1239
|
var import_system17 = require("@marigold/system");
|
|
1240
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1182
1241
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
1183
1242
|
const classNames2 = (0, import_system17.useClassNames)({ component: "Badge", variant, size });
|
|
1184
|
-
return /* @__PURE__ */
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ...props, className: classNames2, children });
|
|
1185
1244
|
};
|
|
1186
1245
|
|
|
1187
1246
|
// src/Breakout/Breakout.tsx
|
|
1188
1247
|
var import_system18 = require("@marigold/system");
|
|
1248
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1189
1249
|
var Breakout = ({
|
|
1190
1250
|
height,
|
|
1191
1251
|
children,
|
|
@@ -1195,7 +1255,7 @@ var Breakout = ({
|
|
|
1195
1255
|
...props
|
|
1196
1256
|
}) => {
|
|
1197
1257
|
var _a, _b, _c, _d;
|
|
1198
|
-
return /* @__PURE__ */
|
|
1258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1199
1259
|
"div",
|
|
1200
1260
|
{
|
|
1201
1261
|
className: (0, import_system18.cn)(
|
|
@@ -1206,21 +1266,23 @@ var Breakout = ({
|
|
|
1206
1266
|
"h-[--height]"
|
|
1207
1267
|
),
|
|
1208
1268
|
style: (0, import_system18.createVar)({ height }),
|
|
1209
|
-
...props
|
|
1210
|
-
|
|
1211
|
-
|
|
1269
|
+
...props,
|
|
1270
|
+
children
|
|
1271
|
+
}
|
|
1212
1272
|
);
|
|
1213
1273
|
};
|
|
1214
1274
|
|
|
1215
1275
|
// src/Body/Body.tsx
|
|
1216
1276
|
var import_system19 = require("@marigold/system");
|
|
1277
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1217
1278
|
var Body = ({ children, variant, size, ...props }) => {
|
|
1218
1279
|
const classNames2 = (0, import_system19.useClassNames)({ component: "Body", variant, size });
|
|
1219
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("section", { ...props, className: classNames2, children });
|
|
1220
1281
|
};
|
|
1221
1282
|
|
|
1222
1283
|
// src/Card/Card.tsx
|
|
1223
1284
|
var import_system20 = require("@marigold/system");
|
|
1285
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1224
1286
|
var Card = ({
|
|
1225
1287
|
children,
|
|
1226
1288
|
variant,
|
|
@@ -1236,7 +1298,7 @@ var Card = ({
|
|
|
1236
1298
|
...props
|
|
1237
1299
|
}) => {
|
|
1238
1300
|
const classNames2 = (0, import_system20.useClassNames)({ component: "Card", variant, size });
|
|
1239
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1240
1302
|
"div",
|
|
1241
1303
|
{
|
|
1242
1304
|
...props,
|
|
@@ -1251,21 +1313,22 @@ var Card = ({
|
|
|
1251
1313
|
import_system20.paddingLeft !== void 0 && import_system20.paddingLeft[pl],
|
|
1252
1314
|
import_system20.paddingBottom !== void 0 && import_system20.paddingBottom[pb],
|
|
1253
1315
|
import_system20.paddingTop !== void 0 && import_system20.paddingTop[pt]
|
|
1254
|
-
)
|
|
1255
|
-
|
|
1256
|
-
|
|
1316
|
+
),
|
|
1317
|
+
children
|
|
1318
|
+
}
|
|
1257
1319
|
);
|
|
1258
1320
|
};
|
|
1259
1321
|
|
|
1260
1322
|
// src/Center/Center.tsx
|
|
1261
1323
|
var import_system21 = require("@marigold/system");
|
|
1324
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1262
1325
|
var Center = ({
|
|
1263
1326
|
maxWidth = "100%",
|
|
1264
1327
|
space = 0,
|
|
1265
1328
|
children,
|
|
1266
1329
|
...props
|
|
1267
1330
|
}) => {
|
|
1268
|
-
return /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1269
1332
|
"div",
|
|
1270
1333
|
{
|
|
1271
1334
|
className: (0, import_system21.cn)(
|
|
@@ -1274,9 +1337,9 @@ var Center = ({
|
|
|
1274
1337
|
"max-w-[--maxWidth]"
|
|
1275
1338
|
),
|
|
1276
1339
|
style: (0, import_system21.createVar)({ maxWidth }),
|
|
1277
|
-
...props
|
|
1278
|
-
|
|
1279
|
-
|
|
1340
|
+
...props,
|
|
1341
|
+
children
|
|
1342
|
+
}
|
|
1280
1343
|
);
|
|
1281
1344
|
};
|
|
1282
1345
|
|
|
@@ -1291,9 +1354,13 @@ var import_system24 = require("@marigold/system");
|
|
|
1291
1354
|
|
|
1292
1355
|
// src/Checkbox/CheckboxField.tsx
|
|
1293
1356
|
var import_system22 = require("@marigold/system");
|
|
1357
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1294
1358
|
var CheckboxField = ({ children, labelWidth }) => {
|
|
1295
1359
|
const classNames2 = (0, import_system22.useClassNames)({ component: "Field" });
|
|
1296
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: classNames2, children: [
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-[--labelWidth]", style: (0, import_system22.createVar)({ labelWidth }) }),
|
|
1362
|
+
children
|
|
1363
|
+
] });
|
|
1297
1364
|
};
|
|
1298
1365
|
|
|
1299
1366
|
// src/Checkbox/CheckboxGroup.tsx
|
|
@@ -1301,6 +1368,7 @@ var import_react19 = require("react");
|
|
|
1301
1368
|
var import_checkbox = require("@react-aria/checkbox");
|
|
1302
1369
|
var import_checkbox2 = require("@react-stately/checkbox");
|
|
1303
1370
|
var import_system23 = require("@marigold/system");
|
|
1371
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1304
1372
|
var CheckboxGroupContext = (0, import_react19.createContext)(
|
|
1305
1373
|
null
|
|
1306
1374
|
);
|
|
@@ -1328,7 +1396,7 @@ var CheckboxGroup = ({
|
|
|
1328
1396
|
readOnly,
|
|
1329
1397
|
error
|
|
1330
1398
|
});
|
|
1331
|
-
return /* @__PURE__ */
|
|
1399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1332
1400
|
FieldBase,
|
|
1333
1401
|
{
|
|
1334
1402
|
label: props.label,
|
|
@@ -1341,31 +1409,32 @@ var CheckboxGroup = ({
|
|
|
1341
1409
|
disabled,
|
|
1342
1410
|
stateProps,
|
|
1343
1411
|
width,
|
|
1344
|
-
...groupProps
|
|
1345
|
-
|
|
1346
|
-
|
|
1412
|
+
...groupProps,
|
|
1413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { role: "presentation", className: "flex flex-col items-start", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CheckboxGroupContext.Provider, { value: { error, ...state }, children }) })
|
|
1414
|
+
}
|
|
1347
1415
|
);
|
|
1348
1416
|
};
|
|
1349
1417
|
|
|
1350
1418
|
// src/Checkbox/Checkbox.tsx
|
|
1351
|
-
var
|
|
1419
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1420
|
+
var CheckMark = () => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1352
1421
|
"path",
|
|
1353
1422
|
{
|
|
1354
1423
|
fill: "currentColor",
|
|
1355
1424
|
stroke: "none",
|
|
1356
1425
|
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"
|
|
1357
1426
|
}
|
|
1358
|
-
));
|
|
1359
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
1427
|
+
) });
|
|
1428
|
+
var IndeterminateMark = () => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1360
1429
|
"path",
|
|
1361
1430
|
{
|
|
1362
1431
|
fill: "currentColor",
|
|
1363
1432
|
stroke: "none",
|
|
1364
1433
|
d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
|
|
1365
1434
|
}
|
|
1366
|
-
));
|
|
1435
|
+
) });
|
|
1367
1436
|
var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
1368
|
-
return /* @__PURE__ */
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1369
1438
|
"div",
|
|
1370
1439
|
{
|
|
1371
1440
|
"aria-hidden": "true",
|
|
@@ -1376,9 +1445,9 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1376
1445
|
"rounded-[3px] border border-solid border-black",
|
|
1377
1446
|
className
|
|
1378
1447
|
),
|
|
1379
|
-
...props
|
|
1380
|
-
|
|
1381
|
-
|
|
1448
|
+
...props,
|
|
1449
|
+
children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IndeterminateMark, {}) : checked ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckMark, {}) : null
|
|
1450
|
+
}
|
|
1382
1451
|
);
|
|
1383
1452
|
};
|
|
1384
1453
|
var Checkbox = (0, import_react20.forwardRef)(
|
|
@@ -1445,7 +1514,7 @@ var Checkbox = (0, import_react20.forwardRef)(
|
|
|
1445
1514
|
readOnly,
|
|
1446
1515
|
indeterminate
|
|
1447
1516
|
});
|
|
1448
|
-
const component = /* @__PURE__ */
|
|
1517
|
+
const component = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1449
1518
|
"label",
|
|
1450
1519
|
{
|
|
1451
1520
|
className: (0, import_system24.cn)(
|
|
@@ -1453,34 +1522,37 @@ var Checkbox = (0, import_react20.forwardRef)(
|
|
|
1453
1522
|
classNames2.container
|
|
1454
1523
|
),
|
|
1455
1524
|
...hoverProps,
|
|
1456
|
-
...stateProps
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1525
|
+
...stateProps,
|
|
1526
|
+
children: [
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1528
|
+
"input",
|
|
1529
|
+
{
|
|
1530
|
+
ref: inputRef,
|
|
1531
|
+
className: "z-1 absolute left-0 top-0 h-full w-full cursor-pointer opacity-[0.0001] group-disabled/checkbox:cursor-not-allowed",
|
|
1532
|
+
...inputProps,
|
|
1533
|
+
...focusProps
|
|
1534
|
+
}
|
|
1535
|
+
),
|
|
1536
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1537
|
+
Icon,
|
|
1538
|
+
{
|
|
1539
|
+
checked: inputProps.checked,
|
|
1540
|
+
indeterminate,
|
|
1541
|
+
className: classNames2.checkbox
|
|
1542
|
+
}
|
|
1543
|
+
),
|
|
1544
|
+
props.children && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: classNames2.label, children: props.children })
|
|
1545
|
+
]
|
|
1546
|
+
}
|
|
1476
1547
|
);
|
|
1477
|
-
return !groupState && labelWidth ? /* @__PURE__ */
|
|
1548
|
+
return !groupState && labelWidth ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckboxField, { labelWidth, children: component }) : component;
|
|
1478
1549
|
}
|
|
1479
1550
|
);
|
|
1480
1551
|
|
|
1481
1552
|
// src/Columns/Columns.tsx
|
|
1482
1553
|
var import_react21 = require("react");
|
|
1483
1554
|
var import_system25 = require("@marigold/system");
|
|
1555
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1484
1556
|
var Columns = ({
|
|
1485
1557
|
space = 0,
|
|
1486
1558
|
columns,
|
|
@@ -1496,7 +1568,7 @@ var Columns = ({
|
|
|
1496
1568
|
)}`
|
|
1497
1569
|
);
|
|
1498
1570
|
}
|
|
1499
|
-
return /* @__PURE__ */
|
|
1571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1500
1572
|
"div",
|
|
1501
1573
|
{
|
|
1502
1574
|
className: (0, import_system25.cn)(
|
|
@@ -1504,24 +1576,25 @@ var Columns = ({
|
|
|
1504
1576
|
stretch && "h-full",
|
|
1505
1577
|
import_system25.gapSpace[space]
|
|
1506
1578
|
),
|
|
1507
|
-
...props
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
);
|
|
1520
|
-
};
|
|
1521
|
-
|
|
1522
|
-
// src/Container/Container.tsx
|
|
1523
|
-
var import_system26 = require("@marigold/system");
|
|
1524
|
-
var
|
|
1579
|
+
...props,
|
|
1580
|
+
children: import_react21.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1581
|
+
"div",
|
|
1582
|
+
{
|
|
1583
|
+
className: (0, import_system25.cn)(
|
|
1584
|
+
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1585
|
+
),
|
|
1586
|
+
style: (0, import_system25.createVar)({ collapseAt, columnSize: columns[idx] }),
|
|
1587
|
+
children: (0, import_react21.isValidElement)(child) ? (0, import_react21.cloneElement)(child) : child
|
|
1588
|
+
}
|
|
1589
|
+
))
|
|
1590
|
+
}
|
|
1591
|
+
);
|
|
1592
|
+
};
|
|
1593
|
+
|
|
1594
|
+
// src/Container/Container.tsx
|
|
1595
|
+
var import_system26 = require("@marigold/system");
|
|
1596
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1597
|
+
var content = {
|
|
1525
1598
|
small: "20ch",
|
|
1526
1599
|
medium: "45ch",
|
|
1527
1600
|
large: "60ch"
|
|
@@ -1540,7 +1613,7 @@ var Container = ({
|
|
|
1540
1613
|
...props
|
|
1541
1614
|
}) => {
|
|
1542
1615
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1543
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1544
1617
|
"div",
|
|
1545
1618
|
{
|
|
1546
1619
|
className: (0, import_system26.cn)(
|
|
@@ -1550,20 +1623,21 @@ var Container = ({
|
|
|
1550
1623
|
import_system26.gridColumn[align]
|
|
1551
1624
|
),
|
|
1552
1625
|
style: (0, import_system26.createVar)({ maxWidth }),
|
|
1553
|
-
...props
|
|
1554
|
-
|
|
1555
|
-
|
|
1626
|
+
...props,
|
|
1627
|
+
children
|
|
1628
|
+
}
|
|
1556
1629
|
);
|
|
1557
1630
|
};
|
|
1558
1631
|
|
|
1559
1632
|
// src/Dialog/Dialog.tsx
|
|
1560
|
-
var
|
|
1633
|
+
var import_react24 = require("react");
|
|
1561
1634
|
var import_button5 = require("@react-aria/button");
|
|
1562
1635
|
var import_dialog = require("@react-aria/dialog");
|
|
1563
1636
|
var import_system29 = require("@marigold/system");
|
|
1564
1637
|
|
|
1565
1638
|
// src/Header/Header.tsx
|
|
1566
1639
|
var import_system27 = require("@marigold/system");
|
|
1640
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1567
1641
|
var Header = ({
|
|
1568
1642
|
children,
|
|
1569
1643
|
variant,
|
|
@@ -1577,11 +1651,12 @@ var Header = ({
|
|
|
1577
1651
|
size,
|
|
1578
1652
|
className
|
|
1579
1653
|
});
|
|
1580
|
-
return /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("header", { ...props, className: (0, import_system27.cn)(classNames2), children });
|
|
1581
1655
|
};
|
|
1582
1656
|
|
|
1583
1657
|
// src/Headline/Headline.tsx
|
|
1584
1658
|
var import_system28 = require("@marigold/system");
|
|
1659
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1585
1660
|
var Headline = ({
|
|
1586
1661
|
children,
|
|
1587
1662
|
variant,
|
|
@@ -1599,7 +1674,7 @@ var Headline = ({
|
|
|
1599
1674
|
size: size != null ? size : `level-${level}`
|
|
1600
1675
|
});
|
|
1601
1676
|
const Component = as;
|
|
1602
|
-
return /* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1603
1678
|
Component,
|
|
1604
1679
|
{
|
|
1605
1680
|
...props,
|
|
@@ -1611,9 +1686,9 @@ var Headline = ({
|
|
|
1611
1686
|
color
|
|
1612
1687
|
/* fallback */
|
|
1613
1688
|
)
|
|
1614
|
-
})
|
|
1615
|
-
|
|
1616
|
-
|
|
1689
|
+
}),
|
|
1690
|
+
children
|
|
1691
|
+
}
|
|
1617
1692
|
);
|
|
1618
1693
|
};
|
|
1619
1694
|
|
|
@@ -1623,8 +1698,8 @@ var DialogContext = (0, import_react22.createContext)({});
|
|
|
1623
1698
|
var useDialogContext = () => (0, import_react22.useContext)(DialogContext);
|
|
1624
1699
|
|
|
1625
1700
|
// src/Dialog/DialogController.tsx
|
|
1626
|
-
var import_react23 = __toESM(require("react"));
|
|
1627
1701
|
var import_overlays5 = require("@react-stately/overlays");
|
|
1702
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1628
1703
|
var DialogController = ({
|
|
1629
1704
|
children,
|
|
1630
1705
|
dismissable = true,
|
|
@@ -1637,54 +1712,59 @@ var DialogController = ({
|
|
|
1637
1712
|
onOpenChange
|
|
1638
1713
|
});
|
|
1639
1714
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1640
|
-
return /* @__PURE__ */
|
|
1715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DialogContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Overlay, { open: state.isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1641
1716
|
Modal,
|
|
1642
1717
|
{
|
|
1643
1718
|
open: state.isOpen,
|
|
1644
1719
|
onClose: state.close,
|
|
1645
1720
|
dismissable,
|
|
1646
|
-
keyboardDismissable
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
)));
|
|
1721
|
+
keyboardDismissable,
|
|
1722
|
+
children
|
|
1723
|
+
}
|
|
1724
|
+
) }) });
|
|
1650
1725
|
};
|
|
1651
1726
|
|
|
1652
1727
|
// src/Dialog/DialogTrigger.tsx
|
|
1653
|
-
var
|
|
1728
|
+
var import_react23 = require("react");
|
|
1654
1729
|
var import_interactions4 = require("@react-aria/interactions");
|
|
1655
1730
|
var import_overlays6 = require("@react-stately/overlays");
|
|
1731
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1656
1732
|
var DialogTrigger = ({
|
|
1657
1733
|
children,
|
|
1658
1734
|
dismissable = true,
|
|
1659
1735
|
keyboardDismissable = true
|
|
1660
1736
|
}) => {
|
|
1661
|
-
const [dialogTrigger, dialog] =
|
|
1662
|
-
const dialogTriggerRef = (0,
|
|
1737
|
+
const [dialogTrigger, dialog] = import_react23.Children.toArray(children);
|
|
1738
|
+
const dialogTriggerRef = (0, import_react23.useRef)(null);
|
|
1663
1739
|
const state = (0, import_overlays6.useOverlayTriggerState)({});
|
|
1664
1740
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1665
|
-
return /* @__PURE__ */
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
{
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(DialogContext.Provider, { value: ctx, children: [
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1743
|
+
import_interactions4.PressResponder,
|
|
1744
|
+
{
|
|
1745
|
+
ref: dialogTriggerRef,
|
|
1746
|
+
isPressed: state.isOpen,
|
|
1747
|
+
onPress: state.toggle,
|
|
1748
|
+
children: dialogTrigger
|
|
1749
|
+
}
|
|
1750
|
+
),
|
|
1751
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Overlay, { open: state.isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1752
|
+
Modal,
|
|
1753
|
+
{
|
|
1754
|
+
open: state.isOpen,
|
|
1755
|
+
onClose: state.close,
|
|
1756
|
+
dismissable,
|
|
1757
|
+
keyboardDismissable,
|
|
1758
|
+
children: dialog
|
|
1759
|
+
}
|
|
1760
|
+
) })
|
|
1761
|
+
] });
|
|
1683
1762
|
};
|
|
1684
1763
|
|
|
1685
1764
|
// src/Dialog/Dialog.tsx
|
|
1765
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1686
1766
|
var CloseButton = ({ className }) => {
|
|
1687
|
-
const ref = (0,
|
|
1767
|
+
const ref = (0, import_react24.useRef)(null);
|
|
1688
1768
|
const { close } = useDialogContext();
|
|
1689
1769
|
const { buttonProps } = (0, import_button5.useButton)(
|
|
1690
1770
|
{
|
|
@@ -1692,7 +1772,7 @@ var CloseButton = ({ className }) => {
|
|
|
1692
1772
|
},
|
|
1693
1773
|
ref
|
|
1694
1774
|
);
|
|
1695
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1696
1776
|
"button",
|
|
1697
1777
|
{
|
|
1698
1778
|
className: (0, import_system29.cn)(
|
|
@@ -1700,22 +1780,22 @@ var CloseButton = ({ className }) => {
|
|
|
1700
1780
|
className
|
|
1701
1781
|
),
|
|
1702
1782
|
ref,
|
|
1703
|
-
...buttonProps
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
));
|
|
1783
|
+
...buttonProps,
|
|
1784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1785
|
+
"path",
|
|
1786
|
+
{
|
|
1787
|
+
fillRule: "evenodd",
|
|
1788
|
+
clipRule: "evenodd",
|
|
1789
|
+
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"
|
|
1790
|
+
}
|
|
1791
|
+
) })
|
|
1792
|
+
}
|
|
1793
|
+
) });
|
|
1714
1794
|
};
|
|
1715
1795
|
var addTitleProps = (children, titleProps) => {
|
|
1716
|
-
const childs =
|
|
1796
|
+
const childs = import_react24.Children.toArray(children);
|
|
1717
1797
|
const titleIndex = childs.findIndex(
|
|
1718
|
-
(child) => (0,
|
|
1798
|
+
(child) => (0, import_react24.isValidElement)(child) && (child.type === Header || child.type === Headline)
|
|
1719
1799
|
);
|
|
1720
1800
|
if (titleIndex < 0) {
|
|
1721
1801
|
console.warn(
|
|
@@ -1723,7 +1803,7 @@ var addTitleProps = (children, titleProps) => {
|
|
|
1723
1803
|
);
|
|
1724
1804
|
return children;
|
|
1725
1805
|
}
|
|
1726
|
-
const titleChild = (0,
|
|
1806
|
+
const titleChild = (0, import_react24.cloneElement)(
|
|
1727
1807
|
childs[titleIndex],
|
|
1728
1808
|
titleProps
|
|
1729
1809
|
);
|
|
@@ -1737,11 +1817,14 @@ var Dialog = ({
|
|
|
1737
1817
|
closeButton,
|
|
1738
1818
|
...props
|
|
1739
1819
|
}) => {
|
|
1740
|
-
const ref = (0,
|
|
1820
|
+
const ref = (0, import_react24.useRef)(null);
|
|
1741
1821
|
const { close } = useDialogContext();
|
|
1742
1822
|
const { dialogProps, titleProps } = (0, import_dialog.useDialog)(props, ref);
|
|
1743
1823
|
const classNames2 = (0, import_system29.useClassNames)({ component: "Dialog", variant, size });
|
|
1744
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: classNames2.container, ...dialogProps, children: [
|
|
1825
|
+
closeButton && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CloseButton, { className: classNames2.closeButton }),
|
|
1826
|
+
typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps)
|
|
1827
|
+
] });
|
|
1745
1828
|
};
|
|
1746
1829
|
Dialog.Trigger = DialogTrigger;
|
|
1747
1830
|
Dialog.Controller = DialogController;
|
|
@@ -1749,21 +1832,24 @@ Dialog.Controller = DialogController;
|
|
|
1749
1832
|
// src/Divider/Divider.tsx
|
|
1750
1833
|
var import_separator = require("@react-aria/separator");
|
|
1751
1834
|
var import_system30 = require("@marigold/system");
|
|
1835
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1752
1836
|
var Divider = ({ variant, ...props }) => {
|
|
1753
1837
|
const { separatorProps } = (0, import_separator.useSeparator)(props);
|
|
1754
1838
|
const classNames2 = (0, import_system30.useClassNames)({ component: "Divider", variant });
|
|
1755
|
-
return /* @__PURE__ */
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: classNames2, ...props, ...separatorProps });
|
|
1756
1840
|
};
|
|
1757
1841
|
|
|
1758
1842
|
// src/Footer/Footer.tsx
|
|
1759
1843
|
var import_system31 = require("@marigold/system");
|
|
1844
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1760
1845
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1761
1846
|
const classNames2 = (0, import_system31.useClassNames)({ component: "Footer", variant, size });
|
|
1762
|
-
return /* @__PURE__ */
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("footer", { ...props, className: classNames2, children });
|
|
1763
1848
|
};
|
|
1764
1849
|
|
|
1765
1850
|
// src/Image/Image.tsx
|
|
1766
1851
|
var import_system32 = require("@marigold/system");
|
|
1852
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1767
1853
|
var Image = ({
|
|
1768
1854
|
variant,
|
|
1769
1855
|
size,
|
|
@@ -1772,7 +1858,7 @@ var Image = ({
|
|
|
1772
1858
|
...props
|
|
1773
1859
|
}) => {
|
|
1774
1860
|
const classNames2 = (0, import_system32.useClassNames)({ component: "Image", variant, size });
|
|
1775
|
-
return /* @__PURE__ */
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1776
1862
|
"img",
|
|
1777
1863
|
{
|
|
1778
1864
|
...props,
|
|
@@ -1789,6 +1875,7 @@ var Image = ({
|
|
|
1789
1875
|
|
|
1790
1876
|
// src/Inline/Inline.tsx
|
|
1791
1877
|
var import_system33 = require("@marigold/system");
|
|
1878
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1792
1879
|
var Inline = ({
|
|
1793
1880
|
space = 0,
|
|
1794
1881
|
orientation,
|
|
@@ -1798,7 +1885,7 @@ var Inline = ({
|
|
|
1798
1885
|
...props
|
|
1799
1886
|
}) => {
|
|
1800
1887
|
var _a2, _b2, _c, _d;
|
|
1801
|
-
return /* @__PURE__ */
|
|
1888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1802
1889
|
"div",
|
|
1803
1890
|
{
|
|
1804
1891
|
className: (0, import_system33.cn)(
|
|
@@ -1807,15 +1894,15 @@ var Inline = ({
|
|
|
1807
1894
|
alignX && ((_b2 = (_a2 = import_system33.alignment) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
1808
1895
|
alignY && ((_d = (_c = import_system33.alignment) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY])
|
|
1809
1896
|
),
|
|
1810
|
-
...props
|
|
1811
|
-
|
|
1812
|
-
|
|
1897
|
+
...props,
|
|
1898
|
+
children
|
|
1899
|
+
}
|
|
1813
1900
|
);
|
|
1814
1901
|
};
|
|
1815
1902
|
|
|
1816
1903
|
// src/DateField/DateField.tsx
|
|
1817
1904
|
var import_date = require("@internationalized/date");
|
|
1818
|
-
var
|
|
1905
|
+
var import_react26 = require("react");
|
|
1819
1906
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
1820
1907
|
var import_focus9 = require("@react-aria/focus");
|
|
1821
1908
|
var import_i18n3 = require("@react-aria/i18n");
|
|
@@ -1825,18 +1912,19 @@ var import_datepicker3 = require("@react-stately/datepicker");
|
|
|
1825
1912
|
var import_system35 = require("@marigold/system");
|
|
1826
1913
|
|
|
1827
1914
|
// src/DateField/DateSegment.tsx
|
|
1828
|
-
var
|
|
1915
|
+
var import_react25 = require("react");
|
|
1829
1916
|
var import_datepicker = require("@react-aria/datepicker");
|
|
1830
1917
|
var import_focus8 = require("@react-aria/focus");
|
|
1831
1918
|
var import_utils12 = require("@react-aria/utils");
|
|
1832
1919
|
var import_system34 = require("@marigold/system");
|
|
1920
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1833
1921
|
var DateSegment = ({
|
|
1834
1922
|
className,
|
|
1835
1923
|
segment,
|
|
1836
1924
|
state,
|
|
1837
1925
|
isPrevPlaceholder
|
|
1838
1926
|
}) => {
|
|
1839
|
-
const ref = (0,
|
|
1927
|
+
const ref = (0, import_react25.useRef)(null);
|
|
1840
1928
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
1841
1929
|
const { focusProps, isFocused } = (0, import_focus8.useFocusRing)({
|
|
1842
1930
|
within: true,
|
|
@@ -1847,7 +1935,7 @@ var DateSegment = ({
|
|
|
1847
1935
|
focusVisible: isFocused
|
|
1848
1936
|
});
|
|
1849
1937
|
const { isPlaceholder, placeholder, text, type, maxValue } = segment;
|
|
1850
|
-
return /* @__PURE__ */
|
|
1938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
1851
1939
|
"div",
|
|
1852
1940
|
{
|
|
1853
1941
|
...(0, import_utils12.mergeProps)(segmentProps, stateProps, focusProps),
|
|
@@ -1861,24 +1949,27 @@ var DateSegment = ({
|
|
|
1861
1949
|
style: {
|
|
1862
1950
|
...segmentProps.style,
|
|
1863
1951
|
minWidth: maxValue != null ? String(maxValue).length + "ch" : void 0
|
|
1864
|
-
}
|
|
1865
|
-
},
|
|
1866
|
-
/* @__PURE__ */ React.createElement(
|
|
1867
|
-
"span",
|
|
1868
|
-
{
|
|
1869
|
-
"aria-hidden": "true",
|
|
1870
|
-
className: (0, import_system34.cn)(
|
|
1871
|
-
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1872
|
-
"pointer-events-none w-full text-center"
|
|
1873
|
-
)
|
|
1874
1952
|
},
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1953
|
+
children: [
|
|
1954
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1955
|
+
"span",
|
|
1956
|
+
{
|
|
1957
|
+
"aria-hidden": "true",
|
|
1958
|
+
className: (0, import_system34.cn)(
|
|
1959
|
+
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1960
|
+
"pointer-events-none w-full text-center"
|
|
1961
|
+
),
|
|
1962
|
+
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1963
|
+
}
|
|
1964
|
+
),
|
|
1965
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: isPlaceholder ? "" : type === "month" || type === "day" ? Number(text) < 10 ? "0" + text : text : text })
|
|
1966
|
+
]
|
|
1967
|
+
}
|
|
1878
1968
|
);
|
|
1879
1969
|
};
|
|
1880
1970
|
|
|
1881
1971
|
// src/DateField/DateField.tsx
|
|
1972
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1882
1973
|
var DateField = ({
|
|
1883
1974
|
disabled,
|
|
1884
1975
|
readOnly,
|
|
@@ -1907,7 +1998,7 @@ var DateField = ({
|
|
|
1907
1998
|
locale,
|
|
1908
1999
|
createCalendar: import_date.createCalendar
|
|
1909
2000
|
});
|
|
1910
|
-
const ref = (0,
|
|
2001
|
+
const ref = (0, import_react26.useRef)(null);
|
|
1911
2002
|
const { fieldProps, labelProps, descriptionProps } = (0, import_datepicker2.useDateField)(
|
|
1912
2003
|
props,
|
|
1913
2004
|
state,
|
|
@@ -1928,7 +2019,7 @@ var DateField = ({
|
|
|
1928
2019
|
required,
|
|
1929
2020
|
focus: isFocused || isPressed
|
|
1930
2021
|
});
|
|
1931
|
-
return /* @__PURE__ */
|
|
2022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1932
2023
|
FieldBase,
|
|
1933
2024
|
{
|
|
1934
2025
|
error,
|
|
@@ -1942,51 +2033,53 @@ var DateField = ({
|
|
|
1942
2033
|
stateProps,
|
|
1943
2034
|
variant,
|
|
1944
2035
|
size,
|
|
1945
|
-
width
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
"div",
|
|
1949
|
-
{
|
|
1950
|
-
...(0, import_utils13.mergeProps)(fieldProps, focusProps, stateProps, hoverProps),
|
|
1951
|
-
className: (0, import_system35.cn)(
|
|
1952
|
-
"relative flex flex-row flex-nowrap",
|
|
1953
|
-
"cursor-text aria-disabled:cursor-not-allowed",
|
|
1954
|
-
classNames2.field
|
|
1955
|
-
),
|
|
1956
|
-
"data-testid": "date-field",
|
|
1957
|
-
ref: triggerRef
|
|
1958
|
-
},
|
|
1959
|
-
/* @__PURE__ */ React.createElement("div", { ref, className: "flex basis-full items-center" }, state.segments.map((segment, i) => {
|
|
1960
|
-
var _a;
|
|
1961
|
-
return /* @__PURE__ */ React.createElement(
|
|
1962
|
-
DateSegment,
|
|
1963
|
-
{
|
|
1964
|
-
className: classNames2.segment,
|
|
1965
|
-
isPrevPlaceholder: (_a = state.segments[i - 1]) == null ? void 0 : _a.isPlaceholder,
|
|
1966
|
-
key: i,
|
|
1967
|
-
segment,
|
|
1968
|
-
state
|
|
1969
|
-
}
|
|
1970
|
-
);
|
|
1971
|
-
})),
|
|
1972
|
-
action ? action : /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center" }, /* @__PURE__ */ React.createElement(
|
|
1973
|
-
"svg",
|
|
2036
|
+
width,
|
|
2037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
2038
|
+
"div",
|
|
1974
2039
|
{
|
|
1975
|
-
|
|
1976
|
-
className: (0, import_system35.cn)(
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
2040
|
+
...(0, import_utils13.mergeProps)(fieldProps, focusProps, stateProps, hoverProps),
|
|
2041
|
+
className: (0, import_system35.cn)(
|
|
2042
|
+
"relative flex flex-row flex-nowrap",
|
|
2043
|
+
"cursor-text aria-disabled:cursor-not-allowed",
|
|
2044
|
+
classNames2.field
|
|
2045
|
+
),
|
|
2046
|
+
"data-testid": "date-field",
|
|
2047
|
+
ref: triggerRef,
|
|
2048
|
+
children: [
|
|
2049
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { ref, className: "flex basis-full items-center", children: state.segments.map((segment, i) => {
|
|
2050
|
+
var _a;
|
|
2051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2052
|
+
DateSegment,
|
|
2053
|
+
{
|
|
2054
|
+
className: classNames2.segment,
|
|
2055
|
+
isPrevPlaceholder: (_a = state.segments[i - 1]) == null ? void 0 : _a.isPlaceholder,
|
|
2056
|
+
segment,
|
|
2057
|
+
state
|
|
2058
|
+
},
|
|
2059
|
+
i
|
|
2060
|
+
);
|
|
2061
|
+
}) }),
|
|
2062
|
+
action ? action : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2063
|
+
"svg",
|
|
2064
|
+
{
|
|
2065
|
+
"data-testid": "action",
|
|
2066
|
+
className: (0, import_system35.cn)(classNames2.action),
|
|
2067
|
+
viewBox: "0 0 24 24",
|
|
2068
|
+
width: 24,
|
|
2069
|
+
height: 24,
|
|
2070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("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" })
|
|
2071
|
+
}
|
|
2072
|
+
) })
|
|
2073
|
+
]
|
|
2074
|
+
}
|
|
2075
|
+
)
|
|
2076
|
+
}
|
|
1984
2077
|
);
|
|
1985
2078
|
};
|
|
1986
2079
|
|
|
1987
2080
|
// src/Calendar/Calendar.tsx
|
|
1988
2081
|
var import_date3 = require("@internationalized/date");
|
|
1989
|
-
var
|
|
2082
|
+
var import_react30 = require("react");
|
|
1990
2083
|
var import_calendar3 = require("@react-aria/calendar");
|
|
1991
2084
|
var import_i18n9 = require("@react-aria/i18n");
|
|
1992
2085
|
var import_calendar4 = require("@react-stately/calendar");
|
|
@@ -1995,19 +2088,20 @@ var import_system38 = require("@marigold/system");
|
|
|
1995
2088
|
|
|
1996
2089
|
// src/Calendar/CalendarGrid.tsx
|
|
1997
2090
|
var import_date2 = require("@internationalized/date");
|
|
1998
|
-
var
|
|
2091
|
+
var import_react28 = require("react");
|
|
1999
2092
|
var import_calendar2 = require("@react-aria/calendar");
|
|
2000
2093
|
var import_i18n4 = require("@react-aria/i18n");
|
|
2001
2094
|
var import_i18n5 = require("@react-aria/i18n");
|
|
2002
2095
|
|
|
2003
2096
|
// src/Calendar/CalendarCell.tsx
|
|
2004
|
-
var
|
|
2097
|
+
var import_react27 = require("react");
|
|
2005
2098
|
var import_calendar = require("@react-aria/calendar");
|
|
2006
2099
|
var import_interactions6 = require("@react-aria/interactions");
|
|
2007
2100
|
var import_utils14 = require("@react-aria/utils");
|
|
2008
2101
|
var import_system36 = require("@marigold/system");
|
|
2102
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2009
2103
|
var CalendarCell = (props) => {
|
|
2010
|
-
const ref = (0,
|
|
2104
|
+
const ref = (0, import_react27.useRef)(null);
|
|
2011
2105
|
const { state } = props;
|
|
2012
2106
|
let { cellProps, buttonProps, formattedDate, isOutsideVisibleRange } = (0, import_calendar.useCalendarCell)(props, state, ref);
|
|
2013
2107
|
const classNames2 = (0, import_system36.useClassNames)({
|
|
@@ -2022,7 +2116,7 @@ var CalendarCell = (props) => {
|
|
|
2022
2116
|
hover: isHovered,
|
|
2023
2117
|
selected: cellProps["aria-selected"]
|
|
2024
2118
|
});
|
|
2025
|
-
return /* @__PURE__ */
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("td", { className: "group/cell", ...cellProps, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2026
2120
|
"div",
|
|
2027
2121
|
{
|
|
2028
2122
|
className: (0, import_system36.cn)(
|
|
@@ -2031,13 +2125,14 @@ var CalendarCell = (props) => {
|
|
|
2031
2125
|
),
|
|
2032
2126
|
hidden: isOutsideVisibleRange,
|
|
2033
2127
|
ref,
|
|
2034
|
-
...(0, import_utils14.mergeProps)(buttonProps, stateProps, hoverProps)
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
));
|
|
2128
|
+
...(0, import_utils14.mergeProps)(buttonProps, stateProps, hoverProps),
|
|
2129
|
+
children: formattedDate
|
|
2130
|
+
}
|
|
2131
|
+
) });
|
|
2038
2132
|
};
|
|
2039
2133
|
|
|
2040
2134
|
// src/Calendar/CalendarGrid.tsx
|
|
2135
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2041
2136
|
var CalendarGrid = ({ state, ...props }) => {
|
|
2042
2137
|
const { locale } = (0, import_i18n4.useLocale)();
|
|
2043
2138
|
const { gridProps, headerProps } = (0, import_calendar2.useCalendarGrid)(props, state);
|
|
@@ -2049,7 +2144,7 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2049
2144
|
weekday: "short",
|
|
2050
2145
|
timeZone: state.timeZone
|
|
2051
2146
|
});
|
|
2052
|
-
const weekDays = (0,
|
|
2147
|
+
const weekDays = (0, import_react28.useMemo)(() => {
|
|
2053
2148
|
const weekStart = (0, import_date2.startOfWeek)((0, import_date2.today)(state.timeZone), locale);
|
|
2054
2149
|
return [...new Array(7).keys()].map((index) => {
|
|
2055
2150
|
const date = weekStart.add({ days: index });
|
|
@@ -2057,24 +2152,26 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2057
2152
|
return dayFormatter.format(dateDay);
|
|
2058
2153
|
});
|
|
2059
2154
|
}, [locale, state.timeZone, dayFormatter]);
|
|
2060
|
-
return /* @__PURE__ */
|
|
2155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2061
2156
|
"table",
|
|
2062
2157
|
{
|
|
2063
2158
|
className: "w-full border-spacing-[6px]",
|
|
2064
2159
|
...gridProps,
|
|
2065
|
-
cellPadding: "8"
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2160
|
+
cellPadding: "8",
|
|
2161
|
+
children: [
|
|
2162
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("thead", { ...headerProps, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { style: { fontWeight: "bolder" }, children: day.substring(0, 2) }, index)) }) }),
|
|
2163
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tbody", { children: [...new Array(numberOfWeeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tr", { children: state.getDatesInWeek(weekIndex).map(
|
|
2164
|
+
(date, i) => date ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2165
|
+
CalendarCell,
|
|
2166
|
+
{
|
|
2167
|
+
date,
|
|
2168
|
+
state
|
|
2169
|
+
},
|
|
2170
|
+
i
|
|
2171
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", {}, i)
|
|
2172
|
+
) }, weekIndex)) })
|
|
2173
|
+
]
|
|
2174
|
+
}
|
|
2078
2175
|
);
|
|
2079
2176
|
};
|
|
2080
2177
|
|
|
@@ -2082,7 +2179,7 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2082
2179
|
var import_i18n7 = require("@react-aria/i18n");
|
|
2083
2180
|
|
|
2084
2181
|
// src/Select/Select.tsx
|
|
2085
|
-
var
|
|
2182
|
+
var import_react29 = require("react");
|
|
2086
2183
|
var import_button6 = require("@react-aria/button");
|
|
2087
2184
|
var import_focus10 = require("@react-aria/focus");
|
|
2088
2185
|
var import_i18n6 = require("@react-aria/i18n");
|
|
@@ -2103,7 +2200,8 @@ var messages = {
|
|
|
2103
2200
|
};
|
|
2104
2201
|
|
|
2105
2202
|
// src/Select/Select.tsx
|
|
2106
|
-
var
|
|
2203
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2204
|
+
var Select = (0, import_react29.forwardRef)(
|
|
2107
2205
|
({
|
|
2108
2206
|
variant,
|
|
2109
2207
|
size,
|
|
@@ -2126,7 +2224,7 @@ var Select = (0, import_react30.forwardRef)(
|
|
|
2126
2224
|
...rest
|
|
2127
2225
|
};
|
|
2128
2226
|
const buttonRef = (0, import_utils15.useObjectRef)(ref);
|
|
2129
|
-
const listboxRef = (0,
|
|
2227
|
+
const listboxRef = (0, import_react29.useRef)(null);
|
|
2130
2228
|
const state = (0, import_select2.useSelectState)(props);
|
|
2131
2229
|
const {
|
|
2132
2230
|
labelProps,
|
|
@@ -2150,7 +2248,7 @@ var Select = (0, import_react30.forwardRef)(
|
|
|
2150
2248
|
expanded: state.isOpen,
|
|
2151
2249
|
required
|
|
2152
2250
|
});
|
|
2153
|
-
return /* @__PURE__ */
|
|
2251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2154
2252
|
FieldBase,
|
|
2155
2253
|
{
|
|
2156
2254
|
variant,
|
|
@@ -2164,51 +2262,55 @@ var Select = (0, import_react30.forwardRef)(
|
|
|
2164
2262
|
errorMessage: props.errorMessage,
|
|
2165
2263
|
errorMessageProps,
|
|
2166
2264
|
stateProps,
|
|
2167
|
-
disabled
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
),
|
|
2179
|
-
/* @__PURE__ */ React.createElement(
|
|
2180
|
-
"button",
|
|
2181
|
-
{
|
|
2182
|
-
className: (0, import_system37.cn)(
|
|
2183
|
-
"flex w-full items-center justify-between gap-1",
|
|
2184
|
-
classNames2.select
|
|
2265
|
+
disabled,
|
|
2266
|
+
children: [
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2268
|
+
import_select.HiddenSelect,
|
|
2269
|
+
{
|
|
2270
|
+
state,
|
|
2271
|
+
triggerRef: buttonRef,
|
|
2272
|
+
label: props.label,
|
|
2273
|
+
name: props.name,
|
|
2274
|
+
isDisabled: disabled
|
|
2275
|
+
}
|
|
2185
2276
|
),
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2278
|
+
"button",
|
|
2279
|
+
{
|
|
2280
|
+
className: (0, import_system37.cn)(
|
|
2281
|
+
"flex w-full items-center justify-between gap-1",
|
|
2282
|
+
classNames2.select
|
|
2283
|
+
),
|
|
2284
|
+
ref: buttonRef,
|
|
2285
|
+
...(0, import_utils15.mergeProps)(buttonProps, focusProps),
|
|
2286
|
+
...stateProps,
|
|
2287
|
+
children: [
|
|
2288
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "overflow-hidden whitespace-nowrap", ...valueProps, children: state.selectedItem ? state.selectedItem.rendered : props.placeholder }),
|
|
2289
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronDown, { className: "h-4 w-4" })
|
|
2290
|
+
]
|
|
2291
|
+
}
|
|
2292
|
+
),
|
|
2293
|
+
isSmallScreen ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tray, { state, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2294
|
+
ListBox,
|
|
2295
|
+
{
|
|
2296
|
+
ref: listboxRef,
|
|
2297
|
+
state,
|
|
2298
|
+
variant,
|
|
2299
|
+
size,
|
|
2300
|
+
...menuProps
|
|
2301
|
+
}
|
|
2302
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2303
|
+
ListBox,
|
|
2304
|
+
{
|
|
2305
|
+
ref: listboxRef,
|
|
2306
|
+
state,
|
|
2307
|
+
variant,
|
|
2308
|
+
size,
|
|
2309
|
+
...menuProps
|
|
2310
|
+
}
|
|
2311
|
+
) })
|
|
2312
|
+
]
|
|
2313
|
+
}
|
|
2212
2314
|
);
|
|
2213
2315
|
}
|
|
2214
2316
|
);
|
|
@@ -2216,6 +2318,7 @@ Select.Option = import_collections4.Item;
|
|
|
2216
2318
|
Select.Section = import_collections4.Section;
|
|
2217
2319
|
|
|
2218
2320
|
// src/Calendar/MonthDropdown.tsx
|
|
2321
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2219
2322
|
var MonthDropdown = ({ state }) => {
|
|
2220
2323
|
let months = [];
|
|
2221
2324
|
let formatter = (0, import_i18n7.useDateFormatter)({
|
|
@@ -2232,22 +2335,23 @@ var MonthDropdown = ({ state }) => {
|
|
|
2232
2335
|
let date = state.focusedDate.set({ month: value });
|
|
2233
2336
|
state.setFocusedDate(date);
|
|
2234
2337
|
};
|
|
2235
|
-
return /* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2236
2339
|
Select,
|
|
2237
2340
|
{
|
|
2238
2341
|
"aria-label": "Month",
|
|
2239
2342
|
onChange,
|
|
2240
2343
|
selectedKey: String(state.focusedDate.month),
|
|
2241
2344
|
"data-testid": "month",
|
|
2242
|
-
disabled: state.isDisabled
|
|
2243
|
-
|
|
2244
|
-
|
|
2345
|
+
disabled: state.isDisabled,
|
|
2346
|
+
children: months.map((month, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Select.Option, { children: month.substring(0, 3) }, i + 1))
|
|
2347
|
+
}
|
|
2245
2348
|
);
|
|
2246
2349
|
};
|
|
2247
2350
|
var MonthDropdown_default = MonthDropdown;
|
|
2248
2351
|
|
|
2249
2352
|
// src/Calendar/YearDropdown.tsx
|
|
2250
2353
|
var import_i18n8 = require("@react-aria/i18n");
|
|
2354
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2251
2355
|
var YearDropdown = ({ state }) => {
|
|
2252
2356
|
const years = [];
|
|
2253
2357
|
let formatter = (0, import_i18n8.useDateFormatter)({
|
|
@@ -2266,21 +2370,22 @@ var YearDropdown = ({ state }) => {
|
|
|
2266
2370
|
let date = years[index].value;
|
|
2267
2371
|
state.setFocusedDate(date);
|
|
2268
2372
|
};
|
|
2269
|
-
return /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2270
2374
|
Select,
|
|
2271
2375
|
{
|
|
2272
2376
|
"aria-label": "Year",
|
|
2273
2377
|
selectedKey: "20",
|
|
2274
2378
|
onChange,
|
|
2275
2379
|
"data-testid": "year",
|
|
2276
|
-
disabled: state.isDisabled
|
|
2277
|
-
|
|
2278
|
-
|
|
2380
|
+
disabled: state.isDisabled,
|
|
2381
|
+
children: years.map((year, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Select.Option, { children: year.formatted }, i))
|
|
2382
|
+
}
|
|
2279
2383
|
);
|
|
2280
2384
|
};
|
|
2281
2385
|
var YearDropdown_default = YearDropdown;
|
|
2282
2386
|
|
|
2283
2387
|
// src/Calendar/Calendar.tsx
|
|
2388
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2284
2389
|
var Calendar = ({
|
|
2285
2390
|
disabled,
|
|
2286
2391
|
readOnly,
|
|
@@ -2299,7 +2404,7 @@ var Calendar = ({
|
|
|
2299
2404
|
locale,
|
|
2300
2405
|
createCalendar: import_date3.createCalendar
|
|
2301
2406
|
});
|
|
2302
|
-
const ref = (0,
|
|
2407
|
+
const ref = (0, import_react30.useRef)(null);
|
|
2303
2408
|
const { calendarProps, prevButtonProps, nextButtonProps } = (0, import_calendar3.useCalendar)(
|
|
2304
2409
|
props,
|
|
2305
2410
|
state
|
|
@@ -2319,7 +2424,7 @@ var Calendar = ({
|
|
|
2319
2424
|
focusVisible: state.isFocused
|
|
2320
2425
|
});
|
|
2321
2426
|
const classNames2 = (0, import_system38.useClassNames)({ component: "Calendar" });
|
|
2322
|
-
return /* @__PURE__ */
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2323
2428
|
"div",
|
|
2324
2429
|
{
|
|
2325
2430
|
tabIndex: -1,
|
|
@@ -2329,35 +2434,47 @@ var Calendar = ({
|
|
|
2329
2434
|
),
|
|
2330
2435
|
...calendarProps,
|
|
2331
2436
|
...calendarState,
|
|
2332
|
-
ref
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2437
|
+
ref,
|
|
2438
|
+
children: [
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mb-4 flex items-center gap-[60px]", children: [
|
|
2440
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-[170px] gap-[9px] [&_div]:flex", children: [
|
|
2441
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MonthDropdown_default, { state }),
|
|
2442
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(YearDropdown_default, { state })
|
|
2443
|
+
] }),
|
|
2444
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1", children: [
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2446
|
+
Button,
|
|
2447
|
+
{
|
|
2448
|
+
className: classNames2.calendarControllers,
|
|
2449
|
+
...prevPropsRest,
|
|
2450
|
+
disabled: prevIsDisabled,
|
|
2451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons.ChevronLeft, {})
|
|
2452
|
+
}
|
|
2453
|
+
),
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2455
|
+
Button,
|
|
2456
|
+
{
|
|
2457
|
+
className: classNames2.calendarControllers,
|
|
2458
|
+
...nextPropsRest,
|
|
2459
|
+
disabled: nextIsDisabled,
|
|
2460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons.ChevronRight, {})
|
|
2461
|
+
}
|
|
2462
|
+
)
|
|
2463
|
+
] })
|
|
2464
|
+
] }),
|
|
2465
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CalendarGrid, { state })
|
|
2466
|
+
]
|
|
2467
|
+
}
|
|
2352
2468
|
);
|
|
2353
2469
|
};
|
|
2354
2470
|
|
|
2355
2471
|
// src/DatePicker/DatePicker.tsx
|
|
2356
|
-
var
|
|
2472
|
+
var import_react31 = require("react");
|
|
2357
2473
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
2358
2474
|
var import_utils16 = require("@react-aria/utils");
|
|
2359
2475
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
2360
2476
|
var import_system39 = require("@marigold/system");
|
|
2477
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2361
2478
|
var DatePicker = ({
|
|
2362
2479
|
disabled,
|
|
2363
2480
|
required,
|
|
@@ -2380,7 +2497,7 @@ var DatePicker = ({
|
|
|
2380
2497
|
shouldCloseOnSelect,
|
|
2381
2498
|
...props
|
|
2382
2499
|
});
|
|
2383
|
-
const ref = (0,
|
|
2500
|
+
const ref = (0, import_react31.useRef)(null);
|
|
2384
2501
|
const stateProps = (0, import_system39.useStateProps)({
|
|
2385
2502
|
focus: state.isOpen
|
|
2386
2503
|
});
|
|
@@ -2395,64 +2512,69 @@ var DatePicker = ({
|
|
|
2395
2512
|
size,
|
|
2396
2513
|
variant
|
|
2397
2514
|
});
|
|
2398
|
-
return /* @__PURE__ */
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
...(0, import_utils16.mergeProps)(buttonProps, stateProps),
|
|
2414
|
-
className: (0, import_system39.cn)("absolute right-0 top-0", classNames2.button),
|
|
2415
|
-
disabled: isDisabled
|
|
2416
|
-
},
|
|
2417
|
-
/* @__PURE__ */ React.createElement(
|
|
2418
|
-
"svg",
|
|
2515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex w-full min-w-[300px]", ...groupProps, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2517
|
+
DateField,
|
|
2518
|
+
{
|
|
2519
|
+
...fieldProps,
|
|
2520
|
+
label,
|
|
2521
|
+
isPressed: state.isOpen,
|
|
2522
|
+
disabled,
|
|
2523
|
+
required,
|
|
2524
|
+
errorMessage,
|
|
2525
|
+
error,
|
|
2526
|
+
description: !state.isOpen && description,
|
|
2527
|
+
triggerRef: ref,
|
|
2528
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2529
|
+
Button,
|
|
2419
2530
|
{
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2531
|
+
...(0, import_utils16.mergeProps)(buttonProps, stateProps),
|
|
2532
|
+
className: (0, import_system39.cn)("absolute right-0 top-0", classNames2.button),
|
|
2533
|
+
disabled: isDisabled,
|
|
2534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2535
|
+
"svg",
|
|
2536
|
+
{
|
|
2537
|
+
width: "24",
|
|
2538
|
+
height: "24",
|
|
2539
|
+
viewBox: "0 0 24 24",
|
|
2540
|
+
fill: "currentColor",
|
|
2541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("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" })
|
|
2542
|
+
}
|
|
2543
|
+
)
|
|
2544
|
+
}
|
|
2545
|
+
) })
|
|
2546
|
+
}
|
|
2547
|
+
) }),
|
|
2548
|
+
state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Popover, { triggerRef: ref, state, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Calendar, { disabled, ...calendarProps }) })
|
|
2549
|
+
] });
|
|
2430
2550
|
};
|
|
2431
2551
|
|
|
2432
2552
|
// src/Inset/Inset.tsx
|
|
2433
2553
|
var import_system40 = require("@marigold/system");
|
|
2554
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2434
2555
|
var Inset = ({
|
|
2435
2556
|
space = 0,
|
|
2436
2557
|
spaceX = 0,
|
|
2437
2558
|
spaceY = 0,
|
|
2438
2559
|
children
|
|
2439
|
-
}) => /* @__PURE__ */
|
|
2560
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2440
2561
|
"div",
|
|
2441
2562
|
{
|
|
2442
2563
|
className: (0, import_system40.cn)(
|
|
2443
2564
|
space ? import_system40.paddingSpace[space] : import_system40.paddingSpaceX[spaceX],
|
|
2444
2565
|
import_system40.paddingSpaceY[spaceY]
|
|
2445
|
-
)
|
|
2446
|
-
|
|
2447
|
-
|
|
2566
|
+
),
|
|
2567
|
+
children
|
|
2568
|
+
}
|
|
2448
2569
|
);
|
|
2449
2570
|
|
|
2450
2571
|
// src/Link/Link.tsx
|
|
2451
|
-
var
|
|
2572
|
+
var import_react32 = require("react");
|
|
2452
2573
|
var import_link = require("@react-aria/link");
|
|
2453
2574
|
var import_utils17 = require("@react-aria/utils");
|
|
2454
2575
|
var import_system41 = require("@marigold/system");
|
|
2455
|
-
var
|
|
2576
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2577
|
+
var Link = (0, import_react32.forwardRef)(
|
|
2456
2578
|
({
|
|
2457
2579
|
as = "a",
|
|
2458
2580
|
variant,
|
|
@@ -2480,16 +2602,16 @@ var Link = (0, import_react33.forwardRef)(
|
|
|
2480
2602
|
size,
|
|
2481
2603
|
className
|
|
2482
2604
|
});
|
|
2483
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2484
2606
|
Component,
|
|
2485
2607
|
{
|
|
2486
2608
|
...props,
|
|
2487
2609
|
role: "link",
|
|
2488
2610
|
className: classNames2,
|
|
2489
2611
|
ref: linkRef,
|
|
2490
|
-
...linkProps
|
|
2491
|
-
|
|
2492
|
-
|
|
2612
|
+
...linkProps,
|
|
2613
|
+
children
|
|
2614
|
+
}
|
|
2493
2615
|
);
|
|
2494
2616
|
}
|
|
2495
2617
|
);
|
|
@@ -2498,17 +2620,19 @@ var Link = (0, import_react33.forwardRef)(
|
|
|
2498
2620
|
var import_system42 = require("@marigold/system");
|
|
2499
2621
|
|
|
2500
2622
|
// src/List/Context.ts
|
|
2501
|
-
var
|
|
2502
|
-
var ListContext = (0,
|
|
2503
|
-
var useListContext = () => (0,
|
|
2623
|
+
var import_react33 = require("react");
|
|
2624
|
+
var ListContext = (0, import_react33.createContext)({});
|
|
2625
|
+
var useListContext = () => (0, import_react33.useContext)(ListContext);
|
|
2504
2626
|
|
|
2505
2627
|
// src/List/ListItem.tsx
|
|
2628
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2506
2629
|
var ListItem = ({ children, ...props }) => {
|
|
2507
2630
|
const { classNames: classNames2 } = useListContext();
|
|
2508
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("li", { ...props, className: classNames2, children });
|
|
2509
2632
|
};
|
|
2510
2633
|
|
|
2511
2634
|
// src/List/List.tsx
|
|
2635
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2512
2636
|
var List = ({
|
|
2513
2637
|
as = "ul",
|
|
2514
2638
|
children,
|
|
@@ -2518,12 +2642,12 @@ var List = ({
|
|
|
2518
2642
|
}) => {
|
|
2519
2643
|
const Component = as;
|
|
2520
2644
|
const classNames2 = (0, import_system42.useClassNames)({ component: "List", variant, size });
|
|
2521
|
-
return /* @__PURE__ */
|
|
2645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2522
2646
|
};
|
|
2523
2647
|
List.Item = ListItem;
|
|
2524
2648
|
|
|
2525
2649
|
// src/Menu/Menu.tsx
|
|
2526
|
-
var
|
|
2650
|
+
var import_react37 = require("react");
|
|
2527
2651
|
var import_menu5 = require("@react-aria/menu");
|
|
2528
2652
|
var import_utils20 = require("@react-aria/utils");
|
|
2529
2653
|
var import_collections5 = require("@react-stately/collections");
|
|
@@ -2531,23 +2655,24 @@ var import_tree2 = require("@react-stately/tree");
|
|
|
2531
2655
|
var import_system46 = require("@marigold/system");
|
|
2532
2656
|
|
|
2533
2657
|
// src/Menu/Context.ts
|
|
2534
|
-
var
|
|
2535
|
-
var MenuContext = (0,
|
|
2536
|
-
var useMenuContext = () => (0,
|
|
2658
|
+
var import_react34 = require("react");
|
|
2659
|
+
var MenuContext = (0, import_react34.createContext)({});
|
|
2660
|
+
var useMenuContext = () => (0, import_react34.useContext)(MenuContext);
|
|
2537
2661
|
|
|
2538
2662
|
// src/Menu/MenuItem.tsx
|
|
2539
|
-
var
|
|
2663
|
+
var import_react35 = require("react");
|
|
2540
2664
|
var import_focus11 = require("@react-aria/focus");
|
|
2541
2665
|
var import_menu = require("@react-aria/menu");
|
|
2542
2666
|
var import_utils18 = require("@react-aria/utils");
|
|
2543
2667
|
var import_system43 = require("@marigold/system");
|
|
2668
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2544
2669
|
var MenuItem = ({
|
|
2545
2670
|
item,
|
|
2546
2671
|
state,
|
|
2547
2672
|
onAction,
|
|
2548
2673
|
className
|
|
2549
2674
|
}) => {
|
|
2550
|
-
const ref = (0,
|
|
2675
|
+
const ref = (0, import_react35.useRef)(null);
|
|
2551
2676
|
const { onClose } = useMenuContext();
|
|
2552
2677
|
const { menuItemProps } = (0, import_menu.useMenuItem)(
|
|
2553
2678
|
{
|
|
@@ -2563,7 +2688,7 @@ var MenuItem = ({
|
|
|
2563
2688
|
focus: isFocusVisible
|
|
2564
2689
|
});
|
|
2565
2690
|
const { onPointerUp, ...props } = menuItemProps;
|
|
2566
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2567
2692
|
"li",
|
|
2568
2693
|
{
|
|
2569
2694
|
ref,
|
|
@@ -2573,49 +2698,57 @@ var MenuItem = ({
|
|
|
2573
2698
|
{ onPointerDown: onPointerUp },
|
|
2574
2699
|
stateProps,
|
|
2575
2700
|
focusProps
|
|
2576
|
-
)
|
|
2577
|
-
|
|
2578
|
-
|
|
2701
|
+
),
|
|
2702
|
+
children: item.props.children
|
|
2703
|
+
}
|
|
2579
2704
|
);
|
|
2580
2705
|
};
|
|
2581
2706
|
|
|
2582
2707
|
// src/Menu/MenuSection.tsx
|
|
2583
2708
|
var import_menu2 = require("@react-aria/menu");
|
|
2584
2709
|
var import_system44 = require("@marigold/system");
|
|
2710
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2585
2711
|
var MenuSection = ({ onAction, item, state }) => {
|
|
2586
2712
|
let { itemProps, headingProps, groupProps } = (0, import_menu2.useMenuSection)({
|
|
2587
2713
|
heading: item.rendered,
|
|
2588
2714
|
"aria-label": item["aria-label"]
|
|
2589
2715
|
});
|
|
2590
2716
|
const className = (0, import_system44.useClassNames)({ component: "Menu" });
|
|
2591
|
-
return /* @__PURE__ */
|
|
2592
|
-
|
|
2593
|
-
{
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
2718
|
+
item.key !== state.collection.getFirstKey() && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Divider, { variant: "section" }) }),
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("li", { ...itemProps, children: [
|
|
2720
|
+
item.rendered && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { ...headingProps, className: className.section, children: item.rendered }),
|
|
2721
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { ...groupProps, className: "pb-1", children: [...item.props.children].map((node) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2722
|
+
MenuItem,
|
|
2723
|
+
{
|
|
2724
|
+
item: node,
|
|
2725
|
+
state,
|
|
2726
|
+
onAction,
|
|
2727
|
+
className: className.item
|
|
2728
|
+
},
|
|
2729
|
+
node.key
|
|
2730
|
+
)) })
|
|
2731
|
+
] })
|
|
2732
|
+
] });
|
|
2601
2733
|
};
|
|
2602
2734
|
var MenuSection_default = MenuSection;
|
|
2603
2735
|
|
|
2604
2736
|
// src/Menu/MenuTrigger.tsx
|
|
2605
|
-
var
|
|
2737
|
+
var import_react36 = require("react");
|
|
2606
2738
|
var import_interactions7 = require("@react-aria/interactions");
|
|
2607
2739
|
var import_menu3 = require("@react-aria/menu");
|
|
2608
2740
|
var import_utils19 = require("@react-aria/utils");
|
|
2609
2741
|
var import_menu4 = require("@react-stately/menu");
|
|
2610
2742
|
var import_system45 = require("@marigold/system");
|
|
2743
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2611
2744
|
var MenuTrigger = ({
|
|
2612
2745
|
disabled,
|
|
2613
2746
|
open,
|
|
2614
2747
|
onOpenChange,
|
|
2615
2748
|
children
|
|
2616
2749
|
}) => {
|
|
2617
|
-
const [menuTrigger, menu] =
|
|
2618
|
-
const menuTriggerRef = (0,
|
|
2750
|
+
const [menuTrigger, menu] = import_react36.Children.toArray(children);
|
|
2751
|
+
const menuTriggerRef = (0, import_react36.useRef)(null);
|
|
2619
2752
|
const menuRef = (0, import_utils19.useObjectRef)();
|
|
2620
2753
|
const state = (0, import_menu4.useMenuTriggerState)({
|
|
2621
2754
|
isOpen: open,
|
|
@@ -2634,49 +2767,53 @@ var MenuTrigger = ({
|
|
|
2634
2767
|
autoFocus: state.focusStrategy
|
|
2635
2768
|
};
|
|
2636
2769
|
const isSmallScreen = (0, import_system45.useSmallScreen)();
|
|
2637
|
-
return /* @__PURE__ */
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(MenuContext.Provider, { value: menuContext, children: [
|
|
2771
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2772
|
+
import_interactions7.PressResponder,
|
|
2773
|
+
{
|
|
2774
|
+
...menuTriggerProps,
|
|
2775
|
+
ref: menuTriggerRef,
|
|
2776
|
+
isPressed: state.isOpen,
|
|
2777
|
+
children: menuTrigger
|
|
2778
|
+
}
|
|
2779
|
+
),
|
|
2780
|
+
isSmallScreen ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Tray, { state, children: menu }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Popover, { triggerRef: menuTriggerRef, scrollRef: menuRef, state, children: menu })
|
|
2781
|
+
] });
|
|
2646
2782
|
};
|
|
2647
2783
|
|
|
2648
2784
|
// src/Menu/Menu.tsx
|
|
2785
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2649
2786
|
var Menu = ({ variant, size, ...props }) => {
|
|
2650
2787
|
const { ref: scrollRef, ...menuContext } = useMenuContext();
|
|
2651
2788
|
const ownProps = { ...props, ...menuContext };
|
|
2652
|
-
const ref = (0,
|
|
2789
|
+
const ref = (0, import_react37.useRef)(null);
|
|
2653
2790
|
const state = (0, import_tree2.useTreeState)({ ...ownProps, selectionMode: "none" });
|
|
2654
2791
|
const { menuProps } = (0, import_menu5.useMenu)(ownProps, state, ref);
|
|
2655
2792
|
(0, import_utils20.useSyncRef)({ ref: scrollRef }, ref);
|
|
2656
2793
|
const classNames2 = (0, import_system46.useClassNames)({ component: "Menu", variant, size });
|
|
2657
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { ref, className: classNames2.container, ...menuProps, children: [...state.collection].map((item) => {
|
|
2658
2795
|
if (item.type === "section") {
|
|
2659
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2660
2797
|
MenuSection_default,
|
|
2661
2798
|
{
|
|
2662
|
-
key: item.key,
|
|
2663
2799
|
item,
|
|
2664
2800
|
state,
|
|
2665
2801
|
onAction: props.onAction
|
|
2666
|
-
}
|
|
2802
|
+
},
|
|
2803
|
+
item.key
|
|
2667
2804
|
);
|
|
2668
2805
|
}
|
|
2669
|
-
return /* @__PURE__ */
|
|
2806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2670
2807
|
MenuItem,
|
|
2671
2808
|
{
|
|
2672
|
-
key: item.key,
|
|
2673
2809
|
item,
|
|
2674
2810
|
state,
|
|
2675
2811
|
onAction: props.onAction,
|
|
2676
2812
|
className: classNames2.item
|
|
2677
|
-
}
|
|
2813
|
+
},
|
|
2814
|
+
item.key
|
|
2678
2815
|
);
|
|
2679
|
-
}));
|
|
2816
|
+
}) });
|
|
2680
2817
|
};
|
|
2681
2818
|
Menu.Trigger = MenuTrigger;
|
|
2682
2819
|
Menu.Item = import_collections5.Item;
|
|
@@ -2684,60 +2821,65 @@ Menu.Section = import_collections5.Section;
|
|
|
2684
2821
|
|
|
2685
2822
|
// src/Menu/ActionMenu.tsx
|
|
2686
2823
|
var import_system47 = require("@marigold/system");
|
|
2824
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2687
2825
|
var ActionMenu = (props) => {
|
|
2688
|
-
return /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Menu.Trigger, { children: [
|
|
2827
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { variant: "menu", size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_system47.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("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" }) }) }),
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Menu, { ...props })
|
|
2829
|
+
] });
|
|
2689
2830
|
};
|
|
2690
2831
|
|
|
2691
2832
|
// src/Message/Message.tsx
|
|
2692
2833
|
var import_system48 = require("@marigold/system");
|
|
2834
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2693
2835
|
var icons = {
|
|
2694
|
-
info: () => /* @__PURE__ */
|
|
2836
|
+
info: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2695
2837
|
"svg",
|
|
2696
2838
|
{
|
|
2697
2839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2698
2840
|
viewBox: "0 0 24 24",
|
|
2699
|
-
fill: "currentColor"
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2841
|
+
fill: "currentColor",
|
|
2842
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2843
|
+
"path",
|
|
2844
|
+
{
|
|
2845
|
+
fillRule: "evenodd",
|
|
2846
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2847
|
+
clipRule: "evenodd"
|
|
2848
|
+
}
|
|
2849
|
+
)
|
|
2850
|
+
}
|
|
2709
2851
|
),
|
|
2710
|
-
warning: () => /* @__PURE__ */
|
|
2852
|
+
warning: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2711
2853
|
"svg",
|
|
2712
2854
|
{
|
|
2713
2855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2714
2856
|
viewBox: "0 0 24 24",
|
|
2715
|
-
fill: "currentColor"
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2857
|
+
fill: "currentColor",
|
|
2858
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2859
|
+
"path",
|
|
2860
|
+
{
|
|
2861
|
+
fillRule: "evenodd",
|
|
2862
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2863
|
+
clipRule: "evenodd"
|
|
2864
|
+
}
|
|
2865
|
+
)
|
|
2866
|
+
}
|
|
2725
2867
|
),
|
|
2726
|
-
error: () => /* @__PURE__ */
|
|
2868
|
+
error: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2727
2869
|
"svg",
|
|
2728
2870
|
{
|
|
2729
2871
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2730
2872
|
viewBox: "0 0 24 24",
|
|
2731
|
-
fill: "currentColor"
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2873
|
+
fill: "currentColor",
|
|
2874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2875
|
+
"path",
|
|
2876
|
+
{
|
|
2877
|
+
fillRule: "evenodd",
|
|
2878
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2879
|
+
clipRule: "evenodd"
|
|
2880
|
+
}
|
|
2881
|
+
)
|
|
2882
|
+
}
|
|
2741
2883
|
)
|
|
2742
2884
|
};
|
|
2743
2885
|
var Message = ({
|
|
@@ -2749,29 +2891,31 @@ var Message = ({
|
|
|
2749
2891
|
}) => {
|
|
2750
2892
|
const classNames2 = (0, import_system48.useClassNames)({ component: "Message", variant, size });
|
|
2751
2893
|
const Icon3 = icons[variant];
|
|
2752
|
-
return /* @__PURE__ */
|
|
2894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
2753
2895
|
"div",
|
|
2754
2896
|
{
|
|
2755
2897
|
className: (0, import_system48.cn)(
|
|
2756
2898
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2757
2899
|
classNames2.container
|
|
2758
2900
|
),
|
|
2759
|
-
...props
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2901
|
+
...props,
|
|
2902
|
+
children: [
|
|
2903
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_system48.cn)("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon3, {}) }),
|
|
2904
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2905
|
+
"div",
|
|
2906
|
+
{
|
|
2907
|
+
className: (0, import_system48.cn)("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2908
|
+
children: messageTitle
|
|
2909
|
+
}
|
|
2910
|
+
),
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_system48.cn)("col-start-2", classNames2.content), children })
|
|
2912
|
+
]
|
|
2913
|
+
}
|
|
2770
2914
|
);
|
|
2771
2915
|
};
|
|
2772
2916
|
|
|
2773
2917
|
// src/NumberField/NumberField.tsx
|
|
2774
|
-
var
|
|
2918
|
+
var import_react39 = require("react");
|
|
2775
2919
|
var import_focus12 = require("@react-aria/focus");
|
|
2776
2920
|
var import_i18n10 = require("@react-aria/i18n");
|
|
2777
2921
|
var import_interactions9 = require("@react-aria/interactions");
|
|
@@ -2781,33 +2925,34 @@ var import_numberfield2 = require("@react-stately/numberfield");
|
|
|
2781
2925
|
var import_system50 = require("@marigold/system");
|
|
2782
2926
|
|
|
2783
2927
|
// src/NumberField/StepButton.tsx
|
|
2784
|
-
var
|
|
2928
|
+
var import_react38 = require("react");
|
|
2785
2929
|
var import_button7 = require("@react-aria/button");
|
|
2786
2930
|
var import_interactions8 = require("@react-aria/interactions");
|
|
2787
2931
|
var import_utils21 = require("@react-aria/utils");
|
|
2788
2932
|
var import_system49 = require("@marigold/system");
|
|
2789
|
-
var
|
|
2933
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2934
|
+
var Plus = () => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2790
2935
|
"path",
|
|
2791
2936
|
{
|
|
2792
2937
|
fillRule: "evenodd",
|
|
2793
2938
|
clipRule: "evenodd",
|
|
2794
2939
|
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"
|
|
2795
2940
|
}
|
|
2796
|
-
));
|
|
2797
|
-
var Minus = () => /* @__PURE__ */
|
|
2941
|
+
) });
|
|
2942
|
+
var Minus = () => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2798
2943
|
"path",
|
|
2799
2944
|
{
|
|
2800
2945
|
fillRule: "evenodd",
|
|
2801
2946
|
clipRule: "evenodd",
|
|
2802
2947
|
d: "M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
2803
2948
|
}
|
|
2804
|
-
));
|
|
2949
|
+
) });
|
|
2805
2950
|
var StepButton = ({
|
|
2806
2951
|
direction,
|
|
2807
2952
|
className,
|
|
2808
2953
|
...props
|
|
2809
2954
|
}) => {
|
|
2810
|
-
const ref = (0,
|
|
2955
|
+
const ref = (0, import_react38.useRef)(null);
|
|
2811
2956
|
const { buttonProps, isPressed } = (0, import_button7.useButton)(
|
|
2812
2957
|
{ ...props, elementType: "div" },
|
|
2813
2958
|
ref
|
|
@@ -2819,7 +2964,7 @@ var StepButton = ({
|
|
|
2819
2964
|
disabled: props.isDisabled
|
|
2820
2965
|
});
|
|
2821
2966
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
2822
|
-
return /* @__PURE__ */
|
|
2967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2823
2968
|
"div",
|
|
2824
2969
|
{
|
|
2825
2970
|
className: (0, import_system49.cn)(
|
|
@@ -2830,14 +2975,15 @@ var StepButton = ({
|
|
|
2830
2975
|
className
|
|
2831
2976
|
),
|
|
2832
2977
|
...(0, import_utils21.mergeProps)(buttonProps, hoverProps),
|
|
2833
|
-
...stateProps
|
|
2834
|
-
|
|
2835
|
-
|
|
2978
|
+
...stateProps,
|
|
2979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon3, {})
|
|
2980
|
+
}
|
|
2836
2981
|
);
|
|
2837
2982
|
};
|
|
2838
2983
|
|
|
2839
2984
|
// src/NumberField/NumberField.tsx
|
|
2840
|
-
var
|
|
2985
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2986
|
+
var NumberField = (0, import_react39.forwardRef)(
|
|
2841
2987
|
({
|
|
2842
2988
|
variant,
|
|
2843
2989
|
size,
|
|
@@ -2888,7 +3034,7 @@ var NumberField = (0, import_react40.forwardRef)(
|
|
|
2888
3034
|
size,
|
|
2889
3035
|
variant
|
|
2890
3036
|
});
|
|
2891
|
-
return /* @__PURE__ */
|
|
3037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2892
3038
|
FieldBase,
|
|
2893
3039
|
{
|
|
2894
3040
|
label: props.label,
|
|
@@ -2901,47 +3047,49 @@ var NumberField = (0, import_react40.forwardRef)(
|
|
|
2901
3047
|
stateProps,
|
|
2902
3048
|
variant,
|
|
2903
3049
|
size,
|
|
2904
|
-
width
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
"div",
|
|
2908
|
-
{
|
|
2909
|
-
"data-group": true,
|
|
2910
|
-
className: (0, import_system50.cn)("flex items-stretch", classNames2.group),
|
|
2911
|
-
"data-testid": "number-field-container",
|
|
2912
|
-
...(0, import_utils22.mergeProps)(groupProps, focusProps, hoverProps),
|
|
2913
|
-
...stateProps
|
|
2914
|
-
},
|
|
2915
|
-
showStepper && /* @__PURE__ */ React.createElement(
|
|
2916
|
-
StepButton,
|
|
2917
|
-
{
|
|
2918
|
-
className: classNames2.stepper,
|
|
2919
|
-
direction: "down",
|
|
2920
|
-
...decrementButtonProps
|
|
2921
|
-
}
|
|
2922
|
-
),
|
|
2923
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React.createElement(
|
|
2924
|
-
Input,
|
|
2925
|
-
{
|
|
2926
|
-
ref: inputRef,
|
|
2927
|
-
variant,
|
|
2928
|
-
size,
|
|
2929
|
-
className: {
|
|
2930
|
-
input: "min-w-0 items-stretch border-none"
|
|
2931
|
-
},
|
|
2932
|
-
...inputProps,
|
|
2933
|
-
...stateProps
|
|
2934
|
-
}
|
|
2935
|
-
)),
|
|
2936
|
-
showStepper && /* @__PURE__ */ React.createElement(
|
|
2937
|
-
StepButton,
|
|
3050
|
+
width,
|
|
3051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
3052
|
+
"div",
|
|
2938
3053
|
{
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
3054
|
+
"data-group": true,
|
|
3055
|
+
className: (0, import_system50.cn)("flex items-stretch", classNames2.group),
|
|
3056
|
+
"data-testid": "number-field-container",
|
|
3057
|
+
...(0, import_utils22.mergeProps)(groupProps, focusProps, hoverProps),
|
|
3058
|
+
...stateProps,
|
|
3059
|
+
children: [
|
|
3060
|
+
showStepper && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3061
|
+
StepButton,
|
|
3062
|
+
{
|
|
3063
|
+
className: classNames2.stepper,
|
|
3064
|
+
direction: "down",
|
|
3065
|
+
...decrementButtonProps
|
|
3066
|
+
}
|
|
3067
|
+
),
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3069
|
+
Input,
|
|
3070
|
+
{
|
|
3071
|
+
ref: inputRef,
|
|
3072
|
+
variant,
|
|
3073
|
+
size,
|
|
3074
|
+
className: {
|
|
3075
|
+
input: "min-w-0 items-stretch border-none"
|
|
3076
|
+
},
|
|
3077
|
+
...inputProps,
|
|
3078
|
+
...stateProps
|
|
3079
|
+
}
|
|
3080
|
+
) }),
|
|
3081
|
+
showStepper && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3082
|
+
StepButton,
|
|
3083
|
+
{
|
|
3084
|
+
className: classNames2.stepper,
|
|
3085
|
+
direction: "up",
|
|
3086
|
+
...incrementButtonProps
|
|
3087
|
+
}
|
|
3088
|
+
)
|
|
3089
|
+
]
|
|
2942
3090
|
}
|
|
2943
3091
|
)
|
|
2944
|
-
|
|
3092
|
+
}
|
|
2945
3093
|
);
|
|
2946
3094
|
}
|
|
2947
3095
|
);
|
|
@@ -2952,17 +3100,18 @@ var import_system52 = require("@marigold/system");
|
|
|
2952
3100
|
// src/Provider/MarigoldProvider.tsx
|
|
2953
3101
|
var import_overlays7 = require("@react-aria/overlays");
|
|
2954
3102
|
var import_system51 = require("@marigold/system");
|
|
3103
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2955
3104
|
function MarigoldProvider({
|
|
2956
3105
|
children,
|
|
2957
3106
|
theme
|
|
2958
3107
|
}) {
|
|
2959
3108
|
const outerTheme = (0, import_system51.useTheme)();
|
|
2960
3109
|
const isTopLevel = outerTheme === import_system51.defaultTheme;
|
|
2961
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_system51.ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_overlays7.OverlayProvider, { children }) : children });
|
|
2962
3111
|
}
|
|
2963
3112
|
|
|
2964
3113
|
// src/Radio/Radio.tsx
|
|
2965
|
-
var
|
|
3114
|
+
var import_react41 = require("react");
|
|
2966
3115
|
var import_focus13 = require("@react-aria/focus");
|
|
2967
3116
|
var import_interactions10 = require("@react-aria/interactions");
|
|
2968
3117
|
var import_radio3 = require("@react-aria/radio");
|
|
@@ -2970,16 +3119,17 @@ var import_utils23 = require("@react-aria/utils");
|
|
|
2970
3119
|
var import_system54 = require("@marigold/system");
|
|
2971
3120
|
|
|
2972
3121
|
// src/Radio/Context.ts
|
|
2973
|
-
var
|
|
2974
|
-
var RadioGroupContext = (0,
|
|
3122
|
+
var import_react40 = require("react");
|
|
3123
|
+
var RadioGroupContext = (0, import_react40.createContext)(
|
|
2975
3124
|
null
|
|
2976
3125
|
);
|
|
2977
|
-
var useRadioGroupContext = () => (0,
|
|
3126
|
+
var useRadioGroupContext = () => (0, import_react40.useContext)(RadioGroupContext);
|
|
2978
3127
|
|
|
2979
3128
|
// src/Radio/RadioGroup.tsx
|
|
2980
3129
|
var import_radio = require("@react-aria/radio");
|
|
2981
3130
|
var import_radio2 = require("@react-stately/radio");
|
|
2982
3131
|
var import_system53 = require("@marigold/system");
|
|
3132
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2983
3133
|
var RadioGroup = ({
|
|
2984
3134
|
children,
|
|
2985
3135
|
orientation = "vertical",
|
|
@@ -3005,7 +3155,7 @@ var RadioGroup = ({
|
|
|
3005
3155
|
error,
|
|
3006
3156
|
required
|
|
3007
3157
|
});
|
|
3008
|
-
return /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3009
3159
|
FieldBase,
|
|
3010
3160
|
{
|
|
3011
3161
|
width,
|
|
@@ -3018,26 +3168,27 @@ var RadioGroup = ({
|
|
|
3018
3168
|
errorMessageProps,
|
|
3019
3169
|
disabled,
|
|
3020
3170
|
stateProps,
|
|
3021
|
-
...radioGroupProps
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3171
|
+
...radioGroupProps,
|
|
3172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3173
|
+
"div",
|
|
3174
|
+
{
|
|
3175
|
+
role: "presentation",
|
|
3176
|
+
"data-orientation": orientation,
|
|
3177
|
+
className: (0, import_system53.cn)(
|
|
3178
|
+
"flex items-start",
|
|
3179
|
+
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
3180
|
+
),
|
|
3181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(RadioGroupContext.Provider, { value: { width, error, state }, children })
|
|
3182
|
+
}
|
|
3183
|
+
)
|
|
3184
|
+
}
|
|
3035
3185
|
);
|
|
3036
3186
|
};
|
|
3037
3187
|
|
|
3038
3188
|
// src/Radio/Radio.tsx
|
|
3039
|
-
var
|
|
3040
|
-
var
|
|
3189
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3190
|
+
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
3191
|
+
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3041
3192
|
"div",
|
|
3042
3193
|
{
|
|
3043
3194
|
className: (0, import_system54.cn)(
|
|
@@ -3045,11 +3196,11 @@ var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ React.createEl
|
|
|
3045
3196
|
className
|
|
3046
3197
|
),
|
|
3047
3198
|
"aria-hidden": "true",
|
|
3048
|
-
...props
|
|
3049
|
-
|
|
3050
|
-
|
|
3199
|
+
...props,
|
|
3200
|
+
children: checked ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Dot, {}) : null
|
|
3201
|
+
}
|
|
3051
3202
|
);
|
|
3052
|
-
var Radio = (0,
|
|
3203
|
+
var Radio = (0, import_react41.forwardRef)(
|
|
3053
3204
|
({ width, disabled, ...props }, ref) => {
|
|
3054
3205
|
const {
|
|
3055
3206
|
variant,
|
|
@@ -3079,7 +3230,7 @@ var Radio = (0, import_react42.forwardRef)(
|
|
|
3079
3230
|
readOnly: props.readOnly,
|
|
3080
3231
|
error
|
|
3081
3232
|
});
|
|
3082
|
-
return /* @__PURE__ */
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
3083
3234
|
"label",
|
|
3084
3235
|
{
|
|
3085
3236
|
className: (0, import_system54.cn)(
|
|
@@ -3088,28 +3239,30 @@ var Radio = (0, import_react42.forwardRef)(
|
|
|
3088
3239
|
width || groupWidth || "w-full",
|
|
3089
3240
|
classNames2.container
|
|
3090
3241
|
),
|
|
3091
|
-
...(0, import_utils23.mergeProps)(hoverProps, stateProps)
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3242
|
+
...(0, import_utils23.mergeProps)(hoverProps, stateProps),
|
|
3243
|
+
children: [
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3245
|
+
"input",
|
|
3246
|
+
{
|
|
3247
|
+
ref: inputRef,
|
|
3248
|
+
className: (0, import_system54.cn)(
|
|
3249
|
+
"absolute left-0 top-0 z-[1] h-full w-full opacity-[0.0001]",
|
|
3250
|
+
inputProps.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
3251
|
+
),
|
|
3252
|
+
...(0, import_utils23.mergeProps)(inputProps, focusProps)
|
|
3253
|
+
}
|
|
3100
3254
|
),
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
/* @__PURE__ */ React.createElement("div", { className: classNames2.label }, props.children)
|
|
3255
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon2, { checked: inputProps.checked, className: classNames2.radio }),
|
|
3256
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: classNames2.label, children: props.children })
|
|
3257
|
+
]
|
|
3258
|
+
}
|
|
3106
3259
|
);
|
|
3107
3260
|
}
|
|
3108
3261
|
);
|
|
3109
3262
|
Radio.Group = RadioGroup;
|
|
3110
3263
|
|
|
3111
3264
|
// src/Slider/Slider.tsx
|
|
3112
|
-
var
|
|
3265
|
+
var import_react43 = require("react");
|
|
3113
3266
|
var import_i18n11 = require("@react-aria/i18n");
|
|
3114
3267
|
var import_slider2 = require("@react-aria/slider");
|
|
3115
3268
|
var import_utils25 = require("@react-aria/utils");
|
|
@@ -3117,7 +3270,7 @@ var import_slider3 = require("@react-stately/slider");
|
|
|
3117
3270
|
var import_system56 = require("@marigold/system");
|
|
3118
3271
|
|
|
3119
3272
|
// src/Slider/Thumb.tsx
|
|
3120
|
-
var
|
|
3273
|
+
var import_react42 = require("react");
|
|
3121
3274
|
var import_focus14 = require("@react-aria/focus");
|
|
3122
3275
|
var import_slider = require("@react-aria/slider");
|
|
3123
3276
|
var import_utils24 = require("@react-aria/utils");
|
|
@@ -3127,9 +3280,10 @@ var import_system55 = require("@marigold/system");
|
|
|
3127
3280
|
var import_visually_hidden = require("@react-aria/visually-hidden");
|
|
3128
3281
|
|
|
3129
3282
|
// src/Slider/Thumb.tsx
|
|
3283
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3130
3284
|
var Thumb = ({ state, trackRef, className, ...props }) => {
|
|
3131
3285
|
const { disabled } = props;
|
|
3132
|
-
const inputRef = (0,
|
|
3286
|
+
const inputRef = (0, import_react42.useRef)(null);
|
|
3133
3287
|
const { isFocusVisible, focusProps, isFocused } = (0, import_focus14.useFocusRing)();
|
|
3134
3288
|
const focused = isFocused || isFocusVisible || state.isThumbDragging(0);
|
|
3135
3289
|
const stateProps = (0, import_system55.useStateProps)({
|
|
@@ -3145,21 +3299,22 @@ var Thumb = ({ state, trackRef, className, ...props }) => {
|
|
|
3145
3299
|
},
|
|
3146
3300
|
state
|
|
3147
3301
|
);
|
|
3148
|
-
(0,
|
|
3302
|
+
(0, import_react42.useEffect)(() => {
|
|
3149
3303
|
state.setThumbEditable(0, !disabled);
|
|
3150
3304
|
}, [disabled, state]);
|
|
3151
|
-
return /* @__PURE__ */
|
|
3305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: (0, import_system55.cn)("top-1/2", className), ...thumbProps, ...stateProps, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_visually_hidden.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3152
3306
|
"input",
|
|
3153
3307
|
{
|
|
3154
3308
|
type: "range",
|
|
3155
3309
|
ref: inputRef,
|
|
3156
3310
|
...(0, import_utils24.mergeProps)(inputProps, focusProps)
|
|
3157
3311
|
}
|
|
3158
|
-
)));
|
|
3312
|
+
) }) });
|
|
3159
3313
|
};
|
|
3160
3314
|
|
|
3161
3315
|
// src/Slider/Slider.tsx
|
|
3162
|
-
var
|
|
3316
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3317
|
+
var Slider = (0, import_react43.forwardRef)(
|
|
3163
3318
|
({ variant, size, width = "100%", ...props }, ref) => {
|
|
3164
3319
|
const { formatOptions } = props;
|
|
3165
3320
|
const trackRef = (0, import_utils25.useObjectRef)(ref);
|
|
@@ -3181,60 +3336,69 @@ var Slider = (0, import_react44.forwardRef)(
|
|
|
3181
3336
|
const sliderState = (0, import_system56.useStateProps)({
|
|
3182
3337
|
disabled: props.disabled
|
|
3183
3338
|
});
|
|
3184
|
-
return /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3185
3340
|
"div",
|
|
3186
3341
|
{
|
|
3187
3342
|
className: "flex w-[var(--slideWidth)] touch-none flex-col",
|
|
3188
3343
|
style: (0, import_system56.createVar)({ slideWidth: width }),
|
|
3189
|
-
...groupProps
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
"div",
|
|
3204
|
-
{
|
|
3205
|
-
className: "h-8 w-full cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
3206
|
-
...trackProps,
|
|
3207
|
-
...sliderState,
|
|
3208
|
-
ref: trackRef
|
|
3209
|
-
},
|
|
3210
|
-
/* @__PURE__ */ React.createElement(
|
|
3211
|
-
"div",
|
|
3212
|
-
{
|
|
3213
|
-
className: (0, import_system56.cn)(
|
|
3214
|
-
"absolute top-2/4 h-2 w-full -translate-y-1/2",
|
|
3215
|
-
classNames2.track
|
|
3344
|
+
...groupProps,
|
|
3345
|
+
children: [
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex self-stretch", children: [
|
|
3347
|
+
props.children && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("label", { className: classNames2.label, ...labelProps, children: props.children }),
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3349
|
+
"output",
|
|
3350
|
+
{
|
|
3351
|
+
className: (0, import_system56.cn)(
|
|
3352
|
+
"flex flex-shrink-0 flex-grow basis-auto",
|
|
3353
|
+
classNames2.output
|
|
3354
|
+
),
|
|
3355
|
+
...outputProps,
|
|
3356
|
+
children: state.getThumbValueLabel(0)
|
|
3357
|
+
}
|
|
3216
3358
|
)
|
|
3217
|
-
}
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3359
|
+
] }),
|
|
3360
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3361
|
+
"div",
|
|
3362
|
+
{
|
|
3363
|
+
className: "h-8 w-full cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
3364
|
+
...trackProps,
|
|
3365
|
+
...sliderState,
|
|
3366
|
+
ref: trackRef,
|
|
3367
|
+
children: [
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3369
|
+
"div",
|
|
3370
|
+
{
|
|
3371
|
+
className: (0, import_system56.cn)(
|
|
3372
|
+
"absolute top-2/4 h-2 w-full -translate-y-1/2",
|
|
3373
|
+
classNames2.track
|
|
3374
|
+
)
|
|
3375
|
+
}
|
|
3376
|
+
),
|
|
3377
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3378
|
+
Thumb,
|
|
3379
|
+
{
|
|
3380
|
+
state,
|
|
3381
|
+
trackRef,
|
|
3382
|
+
disabled: props.disabled,
|
|
3383
|
+
className: classNames2.thumb
|
|
3384
|
+
}
|
|
3385
|
+
)
|
|
3386
|
+
]
|
|
3387
|
+
}
|
|
3388
|
+
)
|
|
3389
|
+
]
|
|
3390
|
+
}
|
|
3229
3391
|
);
|
|
3230
3392
|
}
|
|
3231
3393
|
);
|
|
3232
3394
|
|
|
3233
3395
|
// src/Split/Split.tsx
|
|
3234
|
-
var
|
|
3396
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3397
|
+
var Split = (props) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { ...props, role: "separator", className: "grow" });
|
|
3235
3398
|
|
|
3236
3399
|
// src/Stack/Stack.tsx
|
|
3237
3400
|
var import_system57 = require("@marigold/system");
|
|
3401
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3238
3402
|
var Stack = ({
|
|
3239
3403
|
children,
|
|
3240
3404
|
space = 0,
|
|
@@ -3245,7 +3409,7 @@ var Stack = ({
|
|
|
3245
3409
|
...props
|
|
3246
3410
|
}) => {
|
|
3247
3411
|
var _a, _b, _c, _d;
|
|
3248
|
-
return /* @__PURE__ */
|
|
3412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3249
3413
|
"div",
|
|
3250
3414
|
{
|
|
3251
3415
|
className: (0, import_system57.cn)(
|
|
@@ -3255,20 +3419,21 @@ var Stack = ({
|
|
|
3255
3419
|
alignY && ((_d = (_c = import_system57.alignment) == null ? void 0 : _c.vertical) == null ? void 0 : _d.alignmentY[alignY]),
|
|
3256
3420
|
stretch && "h-full w-full"
|
|
3257
3421
|
),
|
|
3258
|
-
...props
|
|
3259
|
-
|
|
3260
|
-
|
|
3422
|
+
...props,
|
|
3423
|
+
children
|
|
3424
|
+
}
|
|
3261
3425
|
);
|
|
3262
3426
|
};
|
|
3263
3427
|
|
|
3264
3428
|
// src/Switch/Switch.tsx
|
|
3265
|
-
var
|
|
3429
|
+
var import_react44 = require("react");
|
|
3266
3430
|
var import_focus15 = require("@react-aria/focus");
|
|
3267
3431
|
var import_switch = require("@react-aria/switch");
|
|
3268
3432
|
var import_utils26 = require("@react-aria/utils");
|
|
3269
3433
|
var import_toggle2 = require("@react-stately/toggle");
|
|
3270
3434
|
var import_system58 = require("@marigold/system");
|
|
3271
|
-
var
|
|
3435
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3436
|
+
var Switch = (0, import_react44.forwardRef)(
|
|
3272
3437
|
({
|
|
3273
3438
|
variant,
|
|
3274
3439
|
size,
|
|
@@ -3297,7 +3462,7 @@ var Switch = (0, import_react45.forwardRef)(
|
|
|
3297
3462
|
focus: isFocusVisible
|
|
3298
3463
|
});
|
|
3299
3464
|
const classNames2 = (0, import_system58.useClassNames)({ component: "Switch", size, variant });
|
|
3300
|
-
return /* @__PURE__ */
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3301
3466
|
"label",
|
|
3302
3467
|
{
|
|
3303
3468
|
className: (0, import_system58.cn)(
|
|
@@ -3306,70 +3471,74 @@ var Switch = (0, import_react45.forwardRef)(
|
|
|
3306
3471
|
"relative flex items-center justify-between gap-[1ch]"
|
|
3307
3472
|
),
|
|
3308
3473
|
style: (0, import_system58.createVar)({ switchWidth: width }),
|
|
3309
|
-
...stateProps
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3474
|
+
...stateProps,
|
|
3475
|
+
children: [
|
|
3476
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3477
|
+
"input",
|
|
3478
|
+
{
|
|
3479
|
+
ref: inputRef,
|
|
3480
|
+
className: "absolute left-0 top-0 z-[1] h-full w-full cursor-pointer opacity-[0.0001] disabled:cursor-not-allowed",
|
|
3481
|
+
...inputProps,
|
|
3482
|
+
...focusProps
|
|
3483
|
+
}
|
|
3484
|
+
),
|
|
3485
|
+
props.children && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, { children: props.children }),
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3487
|
+
"div",
|
|
3488
|
+
{
|
|
3489
|
+
className: (0, import_system58.cn)(
|
|
3490
|
+
"relative h-6 flex-shrink-0 flex-grow-0 basis-12 rounded-3xl",
|
|
3491
|
+
classNames2.track
|
|
3492
|
+
),
|
|
3493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3494
|
+
"div",
|
|
3495
|
+
{
|
|
3496
|
+
className: (0, import_system58.cn)(
|
|
3497
|
+
"h-[22px] w-[22px]",
|
|
3498
|
+
"cubic-bezier(.7,0,.3,1)",
|
|
3499
|
+
"absolute left-0 top-px",
|
|
3500
|
+
"block translate-x-[1px] rounded-full transition-all duration-100 ease-in-out will-change-transform",
|
|
3501
|
+
"group-selected/switch:translate-x-[calc(47px_-_100%)]",
|
|
3502
|
+
classNames2.thumb
|
|
3503
|
+
)
|
|
3504
|
+
}
|
|
3505
|
+
)
|
|
3506
|
+
}
|
|
3327
3507
|
)
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
"div",
|
|
3331
|
-
{
|
|
3332
|
-
className: (0, import_system58.cn)(
|
|
3333
|
-
"h-[22px] w-[22px]",
|
|
3334
|
-
"cubic-bezier(.7,0,.3,1)",
|
|
3335
|
-
"absolute left-0 top-px",
|
|
3336
|
-
"block translate-x-[1px] rounded-full transition-all duration-100 ease-in-out will-change-transform",
|
|
3337
|
-
"group-selected/switch:translate-x-[calc(47px_-_100%)]",
|
|
3338
|
-
classNames2.thumb
|
|
3339
|
-
)
|
|
3340
|
-
}
|
|
3341
|
-
)
|
|
3342
|
-
)
|
|
3508
|
+
]
|
|
3509
|
+
}
|
|
3343
3510
|
);
|
|
3344
3511
|
}
|
|
3345
3512
|
);
|
|
3346
3513
|
|
|
3347
3514
|
// src/Table/Table.tsx
|
|
3348
|
-
var
|
|
3515
|
+
var import_react52 = require("react");
|
|
3349
3516
|
var import_table9 = require("@react-aria/table");
|
|
3350
3517
|
var import_table10 = require("@react-stately/table");
|
|
3351
3518
|
var import_system65 = require("@marigold/system");
|
|
3352
3519
|
|
|
3353
3520
|
// src/Table/Context.tsx
|
|
3354
|
-
var
|
|
3355
|
-
var TableContext = (0,
|
|
3356
|
-
var useTableContext = () => (0,
|
|
3521
|
+
var import_react45 = require("react");
|
|
3522
|
+
var TableContext = (0, import_react45.createContext)({});
|
|
3523
|
+
var useTableContext = () => (0, import_react45.useContext)(TableContext);
|
|
3357
3524
|
|
|
3358
3525
|
// src/Table/TableBody.tsx
|
|
3359
3526
|
var import_table = require("@react-aria/table");
|
|
3527
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3360
3528
|
var TableBody = ({ children }) => {
|
|
3361
3529
|
const { rowGroupProps } = (0, import_table.useTableRowGroup)();
|
|
3362
|
-
return /* @__PURE__ */
|
|
3530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("tbody", { ...rowGroupProps, children });
|
|
3363
3531
|
};
|
|
3364
3532
|
|
|
3365
3533
|
// src/Table/TableCell.tsx
|
|
3366
|
-
var
|
|
3534
|
+
var import_react46 = require("react");
|
|
3367
3535
|
var import_focus16 = require("@react-aria/focus");
|
|
3368
3536
|
var import_table2 = require("@react-aria/table");
|
|
3369
3537
|
var import_utils27 = require("@react-aria/utils");
|
|
3370
3538
|
var import_system59 = require("@marigold/system");
|
|
3539
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3371
3540
|
var TableCell = ({ cell }) => {
|
|
3372
|
-
const ref = (0,
|
|
3541
|
+
const ref = (0, import_react46.useRef)(null);
|
|
3373
3542
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
3374
3543
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3375
3544
|
const { gridCellProps } = (0, import_table2.useTableCell)(
|
|
@@ -3390,20 +3559,20 @@ var TableCell = ({ cell }) => {
|
|
|
3390
3559
|
};
|
|
3391
3560
|
const { focusProps, isFocusVisible } = (0, import_focus16.useFocusRing)();
|
|
3392
3561
|
const stateProps = (0, import_system59.useStateProps)({ disabled, focusVisible: isFocusVisible });
|
|
3393
|
-
return /* @__PURE__ */
|
|
3562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3394
3563
|
"td",
|
|
3395
3564
|
{
|
|
3396
3565
|
ref,
|
|
3397
3566
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
3398
3567
|
...(0, import_utils27.mergeProps)(cellProps, focusProps),
|
|
3399
|
-
...stateProps
|
|
3400
|
-
|
|
3401
|
-
|
|
3568
|
+
...stateProps,
|
|
3569
|
+
children: cell.rendered
|
|
3570
|
+
}
|
|
3402
3571
|
);
|
|
3403
3572
|
};
|
|
3404
3573
|
|
|
3405
3574
|
// src/Table/TableCheckboxCell.tsx
|
|
3406
|
-
var
|
|
3575
|
+
var import_react47 = require("react");
|
|
3407
3576
|
var import_focus17 = require("@react-aria/focus");
|
|
3408
3577
|
var import_table3 = require("@react-aria/table");
|
|
3409
3578
|
var import_utils28 = require("@react-aria/utils");
|
|
@@ -3430,8 +3599,9 @@ var mapCheckboxProps = ({
|
|
|
3430
3599
|
};
|
|
3431
3600
|
|
|
3432
3601
|
// src/Table/TableCheckboxCell.tsx
|
|
3602
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3433
3603
|
var TableCheckboxCell = ({ cell }) => {
|
|
3434
|
-
const ref = (0,
|
|
3604
|
+
const ref = (0, import_react47.useRef)(null);
|
|
3435
3605
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3436
3606
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3437
3607
|
const { gridCellProps } = (0, import_table3.useTableCell)(
|
|
@@ -3446,20 +3616,20 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3446
3616
|
);
|
|
3447
3617
|
const { focusProps, isFocusVisible } = (0, import_focus17.useFocusRing)();
|
|
3448
3618
|
const stateProps = (0, import_system60.useStateProps)({ disabled, focusVisible: isFocusVisible });
|
|
3449
|
-
return /* @__PURE__ */
|
|
3619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3450
3620
|
"td",
|
|
3451
3621
|
{
|
|
3452
3622
|
ref,
|
|
3453
3623
|
className: (0, import_system60.cn)("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3454
3624
|
...(0, import_utils28.mergeProps)(gridCellProps, focusProps),
|
|
3455
|
-
...stateProps
|
|
3456
|
-
|
|
3457
|
-
|
|
3625
|
+
...stateProps,
|
|
3626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Checkbox, { ...checkboxProps })
|
|
3627
|
+
}
|
|
3458
3628
|
);
|
|
3459
3629
|
};
|
|
3460
3630
|
|
|
3461
3631
|
// src/Table/TableColumnHeader.tsx
|
|
3462
|
-
var
|
|
3632
|
+
var import_react48 = require("react");
|
|
3463
3633
|
var import_focus18 = require("@react-aria/focus");
|
|
3464
3634
|
var import_interactions11 = require("@react-aria/interactions");
|
|
3465
3635
|
var import_table4 = require("@react-aria/table");
|
|
@@ -3467,12 +3637,13 @@ var import_utils30 = require("@react-aria/utils");
|
|
|
3467
3637
|
var import_icons2 = require("@marigold/icons");
|
|
3468
3638
|
var import_system61 = require("@marigold/system");
|
|
3469
3639
|
var import_system62 = require("@marigold/system");
|
|
3640
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3470
3641
|
var TableColumnHeader = ({
|
|
3471
3642
|
column,
|
|
3472
3643
|
width = "auto"
|
|
3473
3644
|
}) => {
|
|
3474
3645
|
var _a, _b;
|
|
3475
|
-
const ref = (0,
|
|
3646
|
+
const ref = (0, import_react48.useRef)(null);
|
|
3476
3647
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3477
3648
|
const { columnHeaderProps } = (0, import_table4.useTableColumnHeader)(
|
|
3478
3649
|
{
|
|
@@ -3487,46 +3658,51 @@ var TableColumnHeader = ({
|
|
|
3487
3658
|
hover: isHovered,
|
|
3488
3659
|
focusVisible: isFocusVisible
|
|
3489
3660
|
});
|
|
3490
|
-
return /* @__PURE__ */
|
|
3661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
3491
3662
|
"th",
|
|
3492
3663
|
{
|
|
3493
3664
|
colSpan: column.colspan,
|
|
3494
3665
|
ref,
|
|
3495
3666
|
className: (0, import_system61.cn)("cursor-default", import_system62.width[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3496
3667
|
...(0, import_utils30.mergeProps)(columnHeaderProps, hoverProps, focusProps),
|
|
3497
|
-
...stateProps
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3668
|
+
...stateProps,
|
|
3669
|
+
children: [
|
|
3670
|
+
column.rendered,
|
|
3671
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons2.SortUp, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons2.SortDown, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons2.SortDown, { className: "inline-block" }))
|
|
3672
|
+
]
|
|
3673
|
+
}
|
|
3501
3674
|
);
|
|
3502
3675
|
};
|
|
3503
3676
|
|
|
3504
3677
|
// src/Table/TableHeader.tsx
|
|
3505
3678
|
var import_table5 = require("@react-aria/table");
|
|
3679
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3506
3680
|
var TableHeader = ({ children }) => {
|
|
3507
3681
|
const { rowGroupProps } = (0, import_table5.useTableRowGroup)();
|
|
3508
|
-
return /* @__PURE__ */
|
|
3682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("thead", { ...rowGroupProps, children });
|
|
3509
3683
|
};
|
|
3510
3684
|
|
|
3511
3685
|
// src/Table/TableHeaderRow.tsx
|
|
3512
|
-
var
|
|
3686
|
+
var import_react49 = require("react");
|
|
3513
3687
|
var import_table6 = require("@react-aria/table");
|
|
3688
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3514
3689
|
var TableHeaderRow = ({ item, children }) => {
|
|
3515
3690
|
const { state } = useTableContext();
|
|
3516
|
-
const ref = (0,
|
|
3691
|
+
const ref = (0, import_react49.useRef)(null);
|
|
3517
3692
|
const { rowProps } = (0, import_table6.useTableHeaderRow)({ node: item }, state, ref);
|
|
3518
|
-
return /* @__PURE__ */
|
|
3693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { ...rowProps, ref, children });
|
|
3519
3694
|
};
|
|
3520
3695
|
|
|
3521
3696
|
// src/Table/TableRow.tsx
|
|
3522
|
-
var
|
|
3697
|
+
var import_react50 = require("react");
|
|
3523
3698
|
var import_focus19 = require("@react-aria/focus");
|
|
3524
3699
|
var import_interactions12 = require("@react-aria/interactions");
|
|
3525
3700
|
var import_table7 = require("@react-aria/table");
|
|
3526
3701
|
var import_utils31 = require("@react-aria/utils");
|
|
3527
3702
|
var import_system63 = require("@marigold/system");
|
|
3703
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3528
3704
|
var TableRow = ({ children, row }) => {
|
|
3529
|
-
const ref = (0,
|
|
3705
|
+
const ref = (0, import_react50.useRef)(null);
|
|
3530
3706
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3531
3707
|
const { variant, size } = row.props;
|
|
3532
3708
|
const classNames2 = (0, import_system63.useClassNames)({
|
|
@@ -3554,7 +3730,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3554
3730
|
focusVisible: isFocusVisible,
|
|
3555
3731
|
active: isPressed
|
|
3556
3732
|
});
|
|
3557
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3558
3734
|
"tr",
|
|
3559
3735
|
{
|
|
3560
3736
|
ref,
|
|
@@ -3565,24 +3741,25 @@ var TableRow = ({ children, row }) => {
|
|
|
3565
3741
|
classNames2 == null ? void 0 : classNames2.row
|
|
3566
3742
|
),
|
|
3567
3743
|
...(0, import_utils31.mergeProps)(rowProps, focusProps, hoverProps),
|
|
3568
|
-
...stateProps
|
|
3569
|
-
|
|
3570
|
-
|
|
3744
|
+
...stateProps,
|
|
3745
|
+
children
|
|
3746
|
+
}
|
|
3571
3747
|
);
|
|
3572
3748
|
};
|
|
3573
3749
|
|
|
3574
3750
|
// src/Table/TableSelectAllCell.tsx
|
|
3575
|
-
var
|
|
3751
|
+
var import_react51 = require("react");
|
|
3576
3752
|
var import_focus20 = require("@react-aria/focus");
|
|
3577
3753
|
var import_interactions13 = require("@react-aria/interactions");
|
|
3578
3754
|
var import_table8 = require("@react-aria/table");
|
|
3579
3755
|
var import_utils32 = require("@react-aria/utils");
|
|
3580
3756
|
var import_system64 = require("@marigold/system");
|
|
3757
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3581
3758
|
var TableSelectAllCell = ({
|
|
3582
3759
|
column,
|
|
3583
3760
|
width = "auto"
|
|
3584
3761
|
}) => {
|
|
3585
|
-
const ref = (0,
|
|
3762
|
+
const ref = (0, import_react51.useRef)(null);
|
|
3586
3763
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3587
3764
|
const { columnHeaderProps } = (0, import_table8.useTableColumnHeader)(
|
|
3588
3765
|
{
|
|
@@ -3598,7 +3775,7 @@ var TableSelectAllCell = ({
|
|
|
3598
3775
|
hover: isHovered,
|
|
3599
3776
|
focusVisible: isFocusVisible
|
|
3600
3777
|
});
|
|
3601
|
-
return /* @__PURE__ */
|
|
3778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3602
3779
|
"th",
|
|
3603
3780
|
{
|
|
3604
3781
|
ref,
|
|
@@ -3608,13 +3785,14 @@ var TableSelectAllCell = ({
|
|
|
3608
3785
|
classNames2 == null ? void 0 : classNames2.header
|
|
3609
3786
|
),
|
|
3610
3787
|
...(0, import_utils32.mergeProps)(columnHeaderProps, hoverProps, focusProps),
|
|
3611
|
-
...stateProps
|
|
3612
|
-
|
|
3613
|
-
|
|
3788
|
+
...stateProps,
|
|
3789
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Checkbox, { ...checkboxProps })
|
|
3790
|
+
}
|
|
3614
3791
|
);
|
|
3615
3792
|
};
|
|
3616
3793
|
|
|
3617
3794
|
// src/Table/Table.tsx
|
|
3795
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3618
3796
|
var Table = ({
|
|
3619
3797
|
variant,
|
|
3620
3798
|
size,
|
|
@@ -3623,7 +3801,7 @@ var Table = ({
|
|
|
3623
3801
|
...props
|
|
3624
3802
|
}) => {
|
|
3625
3803
|
const interactive = selectionMode !== "none";
|
|
3626
|
-
const tableRef = (0,
|
|
3804
|
+
const tableRef = (0, import_react52.useRef)(null);
|
|
3627
3805
|
const state = (0, import_table10.useTableState)({
|
|
3628
3806
|
...props,
|
|
3629
3807
|
selectionMode,
|
|
@@ -3637,52 +3815,56 @@ var Table = ({
|
|
|
3637
3815
|
size
|
|
3638
3816
|
});
|
|
3639
3817
|
const { collection } = state;
|
|
3640
|
-
return /* @__PURE__ */
|
|
3818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3641
3819
|
TableContext.Provider,
|
|
3642
3820
|
{
|
|
3643
|
-
value: { state, interactive, classNames: classNames2, variant, size }
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3821
|
+
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
3823
|
+
"table",
|
|
3824
|
+
{
|
|
3825
|
+
ref: tableRef,
|
|
3826
|
+
className: (0, import_system65.cn)(
|
|
3827
|
+
"group/table",
|
|
3828
|
+
"border-collapse overflow-auto whitespace-nowrap",
|
|
3829
|
+
stretch ? "table w-full" : "block",
|
|
3830
|
+
classNames2.table
|
|
3831
|
+
),
|
|
3832
|
+
...gridProps,
|
|
3833
|
+
children: [
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3835
|
+
(column) => {
|
|
3836
|
+
var _a, _b, _c;
|
|
3837
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3838
|
+
TableSelectAllCell,
|
|
3839
|
+
{
|
|
3840
|
+
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3841
|
+
column
|
|
3842
|
+
},
|
|
3843
|
+
column.key
|
|
3844
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3845
|
+
TableColumnHeader,
|
|
3846
|
+
{
|
|
3847
|
+
width: (_c = column.props) == null ? void 0 : _c.width,
|
|
3848
|
+
column
|
|
3849
|
+
},
|
|
3850
|
+
column.key
|
|
3851
|
+
);
|
|
3852
|
+
}
|
|
3853
|
+
) }, headerRow.key)) }),
|
|
3854
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(TableBody, { children: [
|
|
3855
|
+
...collection.rows.map(
|
|
3856
|
+
(row) => row.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TableRow, { row, children: [...collection.getChildren(row.key)].map(
|
|
3857
|
+
(cell) => {
|
|
3858
|
+
var _a;
|
|
3859
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TableCell, { cell }, cell.key);
|
|
3860
|
+
}
|
|
3861
|
+
) }, row.key)
|
|
3862
|
+
)
|
|
3863
|
+
] })
|
|
3864
|
+
]
|
|
3675
3865
|
}
|
|
3676
|
-
)
|
|
3677
|
-
|
|
3678
|
-
(row) => row.type === "item" && /* @__PURE__ */ React.createElement(TableRow, { key: row.key, row }, [...collection.getChildren(row.key)].map(
|
|
3679
|
-
(cell) => {
|
|
3680
|
-
var _a;
|
|
3681
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React.createElement(TableCheckboxCell, { key: cell.key, cell }) : /* @__PURE__ */ React.createElement(TableCell, { key: cell.key, cell });
|
|
3682
|
-
}
|
|
3683
|
-
))
|
|
3684
|
-
))
|
|
3685
|
-
)
|
|
3866
|
+
)
|
|
3867
|
+
}
|
|
3686
3868
|
);
|
|
3687
3869
|
};
|
|
3688
3870
|
Table.Body = import_table10.TableBody;
|
|
@@ -3693,6 +3875,7 @@ Table.Row = import_table10.Row;
|
|
|
3693
3875
|
|
|
3694
3876
|
// src/Text/Text.tsx
|
|
3695
3877
|
var import_system66 = require("@marigold/system");
|
|
3878
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3696
3879
|
var Text = ({
|
|
3697
3880
|
variant,
|
|
3698
3881
|
size,
|
|
@@ -3711,7 +3894,7 @@ var Text = ({
|
|
|
3711
3894
|
variant,
|
|
3712
3895
|
size
|
|
3713
3896
|
});
|
|
3714
|
-
return /* @__PURE__ */
|
|
3897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3715
3898
|
"p",
|
|
3716
3899
|
{
|
|
3717
3900
|
...props,
|
|
@@ -3731,20 +3914,21 @@ var Text = ({
|
|
|
3731
3914
|
color
|
|
3732
3915
|
/* fallback */
|
|
3733
3916
|
)
|
|
3734
|
-
})
|
|
3735
|
-
|
|
3736
|
-
|
|
3917
|
+
}),
|
|
3918
|
+
children
|
|
3919
|
+
}
|
|
3737
3920
|
);
|
|
3738
3921
|
};
|
|
3739
3922
|
|
|
3740
3923
|
// src/TextArea/TextArea.tsx
|
|
3741
|
-
var
|
|
3924
|
+
var import_react53 = require("react");
|
|
3742
3925
|
var import_focus21 = require("@react-aria/focus");
|
|
3743
3926
|
var import_interactions14 = require("@react-aria/interactions");
|
|
3744
3927
|
var import_textfield = require("@react-aria/textfield");
|
|
3745
3928
|
var import_utils34 = require("@react-aria/utils");
|
|
3746
3929
|
var import_system67 = require("@marigold/system");
|
|
3747
|
-
var
|
|
3930
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3931
|
+
var TextArea = (0, import_react53.forwardRef)(
|
|
3748
3932
|
({
|
|
3749
3933
|
variant,
|
|
3750
3934
|
size,
|
|
@@ -3780,7 +3964,7 @@ var TextArea = (0, import_react54.forwardRef)(
|
|
|
3780
3964
|
error
|
|
3781
3965
|
});
|
|
3782
3966
|
const classNames2 = (0, import_system67.useClassNames)({ component: "TextArea", variant, size });
|
|
3783
|
-
return /* @__PURE__ */
|
|
3967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3784
3968
|
FieldBase,
|
|
3785
3969
|
{
|
|
3786
3970
|
label,
|
|
@@ -3793,31 +3977,32 @@ var TextArea = (0, import_react54.forwardRef)(
|
|
|
3793
3977
|
stateProps,
|
|
3794
3978
|
variant,
|
|
3795
3979
|
size,
|
|
3796
|
-
width
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3980
|
+
width,
|
|
3981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3982
|
+
"textarea",
|
|
3983
|
+
{
|
|
3984
|
+
className: classNames2,
|
|
3985
|
+
ref: textAreaRef,
|
|
3986
|
+
rows,
|
|
3987
|
+
...inputProps,
|
|
3988
|
+
...focusProps,
|
|
3989
|
+
...hoverProps
|
|
3990
|
+
}
|
|
3991
|
+
)
|
|
3992
|
+
}
|
|
3809
3993
|
);
|
|
3810
3994
|
}
|
|
3811
3995
|
);
|
|
3812
3996
|
|
|
3813
3997
|
// src/TextField/TextField.tsx
|
|
3814
|
-
var
|
|
3998
|
+
var import_react54 = require("react");
|
|
3815
3999
|
var import_focus22 = require("@react-aria/focus");
|
|
3816
4000
|
var import_interactions15 = require("@react-aria/interactions");
|
|
3817
4001
|
var import_textfield2 = require("@react-aria/textfield");
|
|
3818
4002
|
var import_utils35 = require("@react-aria/utils");
|
|
3819
4003
|
var import_system68 = require("@marigold/system");
|
|
3820
|
-
var
|
|
4004
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4005
|
+
var TextField = (0, import_react54.forwardRef)(
|
|
3821
4006
|
({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
|
|
3822
4007
|
const { label, description, errorMessage, autoFocus } = props;
|
|
3823
4008
|
const inputRef = (0, import_utils35.useObjectRef)(ref);
|
|
@@ -3844,7 +4029,7 @@ var TextField = (0, import_react55.forwardRef)(
|
|
|
3844
4029
|
readOnly,
|
|
3845
4030
|
required
|
|
3846
4031
|
});
|
|
3847
|
-
return /* @__PURE__ */
|
|
4032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3848
4033
|
FieldBase,
|
|
3849
4034
|
{
|
|
3850
4035
|
label,
|
|
@@ -3857,23 +4042,24 @@ var TextField = (0, import_react55.forwardRef)(
|
|
|
3857
4042
|
stateProps,
|
|
3858
4043
|
variant,
|
|
3859
4044
|
size,
|
|
3860
|
-
width
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
4045
|
+
width,
|
|
4046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4047
|
+
Input,
|
|
4048
|
+
{
|
|
4049
|
+
ref: inputRef,
|
|
4050
|
+
variant,
|
|
4051
|
+
size,
|
|
4052
|
+
...(0, import_utils35.mergeProps)(focusProps, inputProps, hoverProps)
|
|
4053
|
+
}
|
|
4054
|
+
)
|
|
4055
|
+
}
|
|
3871
4056
|
);
|
|
3872
4057
|
}
|
|
3873
4058
|
);
|
|
3874
4059
|
|
|
3875
4060
|
// src/Tiles/Tiles.tsx
|
|
3876
4061
|
var import_system69 = require("@marigold/system");
|
|
4062
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3877
4063
|
var Tiles = ({
|
|
3878
4064
|
space = 0,
|
|
3879
4065
|
stretch = false,
|
|
@@ -3886,7 +4072,7 @@ var Tiles = ({
|
|
|
3886
4072
|
if (stretch) {
|
|
3887
4073
|
column = `minmax(${column}, 1fr)`;
|
|
3888
4074
|
}
|
|
3889
|
-
return /* @__PURE__ */
|
|
4075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3890
4076
|
"div",
|
|
3891
4077
|
{
|
|
3892
4078
|
...props,
|
|
@@ -3896,9 +4082,9 @@ var Tiles = ({
|
|
|
3896
4082
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3897
4083
|
equalHeight && "auto-rows-[1fr]"
|
|
3898
4084
|
),
|
|
3899
|
-
style: (0, import_system69.createVar)({ column, tilesWidth })
|
|
3900
|
-
|
|
3901
|
-
|
|
4085
|
+
style: (0, import_system69.createVar)({ column, tilesWidth }),
|
|
4086
|
+
children
|
|
4087
|
+
}
|
|
3902
4088
|
);
|
|
3903
4089
|
};
|
|
3904
4090
|
|
|
@@ -3907,16 +4093,17 @@ var import_tooltip3 = require("@react-aria/tooltip");
|
|
|
3907
4093
|
var import_system70 = require("@marigold/system");
|
|
3908
4094
|
|
|
3909
4095
|
// src/Tooltip/Context.ts
|
|
3910
|
-
var
|
|
3911
|
-
var TooltipContext = (0,
|
|
3912
|
-
var useTooltipContext = () => (0,
|
|
4096
|
+
var import_react55 = require("react");
|
|
4097
|
+
var TooltipContext = (0, import_react55.createContext)({});
|
|
4098
|
+
var useTooltipContext = () => (0, import_react55.useContext)(TooltipContext);
|
|
3913
4099
|
|
|
3914
4100
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3915
|
-
var
|
|
4101
|
+
var import_react56 = require("react");
|
|
3916
4102
|
var import_focus23 = require("@react-aria/focus");
|
|
3917
4103
|
var import_overlays8 = require("@react-aria/overlays");
|
|
3918
4104
|
var import_tooltip = require("@react-aria/tooltip");
|
|
3919
4105
|
var import_tooltip2 = require("@react-stately/tooltip");
|
|
4106
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3920
4107
|
var TooltipTrigger = ({
|
|
3921
4108
|
disabled,
|
|
3922
4109
|
open,
|
|
@@ -3925,7 +4112,7 @@ var TooltipTrigger = ({
|
|
|
3925
4112
|
children,
|
|
3926
4113
|
...rest
|
|
3927
4114
|
}) => {
|
|
3928
|
-
const [tooltipTrigger, tooltip] =
|
|
4115
|
+
const [tooltipTrigger, tooltip] = import_react56.Children.toArray(children);
|
|
3929
4116
|
const props = {
|
|
3930
4117
|
...rest,
|
|
3931
4118
|
isDisabled: disabled,
|
|
@@ -3933,8 +4120,8 @@ var TooltipTrigger = ({
|
|
|
3933
4120
|
delay,
|
|
3934
4121
|
placement
|
|
3935
4122
|
};
|
|
3936
|
-
const tooltipTriggerRef = (0,
|
|
3937
|
-
const overlayRef = (0,
|
|
4123
|
+
const tooltipTriggerRef = (0, import_react56.useRef)(null);
|
|
4124
|
+
const overlayRef = (0, import_react56.useRef)(null);
|
|
3938
4125
|
const state = (0, import_tooltip2.useTooltipTriggerState)(props);
|
|
3939
4126
|
const { triggerProps, tooltipProps } = (0, import_tooltip.useTooltipTrigger)(
|
|
3940
4127
|
props,
|
|
@@ -3953,44 +4140,50 @@ var TooltipTrigger = ({
|
|
|
3953
4140
|
isOpen: state.isOpen,
|
|
3954
4141
|
overlayRef
|
|
3955
4142
|
});
|
|
3956
|
-
return /* @__PURE__ */
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
4143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_focus23.FocusableProvider, { ref: tooltipTriggerRef, ...triggerProps, children: [
|
|
4144
|
+
tooltipTrigger,
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4146
|
+
TooltipContext.Provider,
|
|
4147
|
+
{
|
|
4148
|
+
value: {
|
|
4149
|
+
state,
|
|
4150
|
+
overlayRef,
|
|
4151
|
+
arrowProps,
|
|
4152
|
+
placement: overlayPlacement,
|
|
4153
|
+
...tooltipProps,
|
|
4154
|
+
...positionProps
|
|
4155
|
+
},
|
|
4156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Overlay, { open: state.isOpen, children: tooltip })
|
|
3966
4157
|
}
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
));
|
|
4158
|
+
)
|
|
4159
|
+
] });
|
|
3970
4160
|
};
|
|
3971
4161
|
|
|
3972
4162
|
// src/Tooltip/Tooltip.tsx
|
|
4163
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3973
4164
|
var Tooltip = ({ children, variant, size }) => {
|
|
3974
4165
|
const { arrowProps, state, overlayRef, placement, ...rest } = useTooltipContext();
|
|
3975
4166
|
const { tooltipProps } = (0, import_tooltip3.useTooltip)({}, state);
|
|
3976
4167
|
const classNames2 = (0, import_system70.useClassNames)({ component: "Tooltip", variant, size });
|
|
3977
|
-
return /* @__PURE__ */
|
|
4168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
3978
4169
|
"div",
|
|
3979
4170
|
{
|
|
3980
4171
|
...tooltipProps,
|
|
3981
4172
|
...rest,
|
|
3982
4173
|
ref: overlayRef,
|
|
3983
4174
|
className: (0, import_system70.cn)("group/tooltip", classNames2.container),
|
|
3984
|
-
"data-placement": placement
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
4175
|
+
"data-placement": placement,
|
|
4176
|
+
children: [
|
|
4177
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children }),
|
|
4178
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4179
|
+
"div",
|
|
4180
|
+
{
|
|
4181
|
+
...arrowProps,
|
|
4182
|
+
className: (0, import_system70.cn)("absolute h-0 w-0", classNames2.arrow)
|
|
4183
|
+
}
|
|
4184
|
+
)
|
|
4185
|
+
]
|
|
4186
|
+
}
|
|
3994
4187
|
);
|
|
3995
4188
|
};
|
|
3996
4189
|
Tooltip.Trigger = TooltipTrigger;
|
|
@@ -3999,23 +4192,24 @@ Tooltip.Trigger = TooltipTrigger;
|
|
|
3999
4192
|
var import_collections6 = require("@react-stately/collections");
|
|
4000
4193
|
|
|
4001
4194
|
// src/TagGroup/TagGroup.tsx
|
|
4002
|
-
var
|
|
4195
|
+
var import_react58 = require("react");
|
|
4003
4196
|
var import_tag2 = require("@react-aria/tag");
|
|
4004
4197
|
var import_list = require("@react-stately/list");
|
|
4005
4198
|
var import_system72 = require("@marigold/system");
|
|
4006
4199
|
|
|
4007
4200
|
// src/TagGroup/Tag.tsx
|
|
4008
|
-
var
|
|
4201
|
+
var import_react57 = __toESM(require("react"));
|
|
4009
4202
|
var import_focus24 = require("@react-aria/focus");
|
|
4010
4203
|
var import_tag = require("@react-aria/tag");
|
|
4011
4204
|
var import_utils36 = require("@react-aria/utils");
|
|
4012
4205
|
var import_system71 = require("@marigold/system");
|
|
4206
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4013
4207
|
var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
4014
4208
|
const props = {
|
|
4015
4209
|
item,
|
|
4016
4210
|
...rest
|
|
4017
4211
|
};
|
|
4018
|
-
let ref =
|
|
4212
|
+
let ref = import_react57.default.useRef(null);
|
|
4019
4213
|
let { focusProps } = (0, import_focus24.useFocusRing)({ within: true });
|
|
4020
4214
|
const { rowProps, gridCellProps, allowsRemoving, removeButtonProps } = (0, import_tag.useTag)(
|
|
4021
4215
|
{
|
|
@@ -4026,26 +4220,31 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
4026
4220
|
ref
|
|
4027
4221
|
);
|
|
4028
4222
|
const classNames2 = (0, import_system71.useClassNames)({ component: "Tag", variant, size });
|
|
4029
|
-
return /* @__PURE__ */
|
|
4223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4030
4224
|
"span",
|
|
4031
4225
|
{
|
|
4032
4226
|
ref,
|
|
4033
4227
|
...(0, import_utils36.mergeProps)(rowProps, focusProps),
|
|
4034
|
-
className: classNames2.tag
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4228
|
+
className: classNames2.tag,
|
|
4229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { ...gridCellProps, className: classNames2.gridCell, children: [
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: item.rendered }),
|
|
4231
|
+
allowsRemoving && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4232
|
+
Button,
|
|
4233
|
+
{
|
|
4234
|
+
...removeButtonProps,
|
|
4235
|
+
className: (0, import_system71.cn)("flex items-center", classNames2.closeButton),
|
|
4236
|
+
role: "button",
|
|
4237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("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" }) })
|
|
4238
|
+
}
|
|
4239
|
+
)
|
|
4240
|
+
] })
|
|
4241
|
+
}
|
|
4045
4242
|
);
|
|
4046
4243
|
};
|
|
4047
4244
|
|
|
4048
4245
|
// src/TagGroup/TagGroup.tsx
|
|
4246
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4247
|
+
var import_react59 = require("react");
|
|
4049
4248
|
var TagGroup = ({
|
|
4050
4249
|
width,
|
|
4051
4250
|
required,
|
|
@@ -4058,14 +4257,14 @@ var TagGroup = ({
|
|
|
4058
4257
|
validationState: error ? "invalid" : "valid",
|
|
4059
4258
|
...rest
|
|
4060
4259
|
};
|
|
4061
|
-
const inputRef = (0,
|
|
4260
|
+
const inputRef = (0, import_react58.useRef)(null);
|
|
4062
4261
|
const state = (0, import_list.useListState)(props);
|
|
4063
4262
|
const { gridProps, labelProps, descriptionProps, errorMessageProps } = (0, import_tag2.useTagGroup)(props, state, inputRef);
|
|
4064
4263
|
const stateProps = (0, import_system72.useStateProps)({
|
|
4065
4264
|
error,
|
|
4066
4265
|
required
|
|
4067
4266
|
});
|
|
4068
|
-
return /* @__PURE__ */
|
|
4267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4069
4268
|
FieldBase,
|
|
4070
4269
|
{
|
|
4071
4270
|
width,
|
|
@@ -4077,28 +4276,28 @@ var TagGroup = ({
|
|
|
4077
4276
|
errorMessage: props.errorMessage,
|
|
4078
4277
|
errorMessageProps,
|
|
4079
4278
|
stateProps,
|
|
4080
|
-
...gridProps
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
"div",
|
|
4084
|
-
{
|
|
4085
|
-
role: "presentation",
|
|
4086
|
-
ref: inputRef,
|
|
4087
|
-
className: "flex flex-wrap items-start gap-1"
|
|
4088
|
-
},
|
|
4089
|
-
[...state.collection].map((item) => /* @__PURE__ */ React.createElement(
|
|
4090
|
-
Tag,
|
|
4279
|
+
...gridProps,
|
|
4280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4281
|
+
"div",
|
|
4091
4282
|
{
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
state,
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4283
|
+
role: "presentation",
|
|
4284
|
+
ref: inputRef,
|
|
4285
|
+
className: "flex flex-wrap items-start gap-1",
|
|
4286
|
+
children: [...state.collection].map((item) => /* @__PURE__ */ (0, import_react59.createElement)(
|
|
4287
|
+
Tag,
|
|
4288
|
+
{
|
|
4289
|
+
...item.props,
|
|
4290
|
+
key: item.key,
|
|
4291
|
+
item,
|
|
4292
|
+
state,
|
|
4293
|
+
allowsRemoving,
|
|
4294
|
+
onRemove: props.onRemove
|
|
4295
|
+
},
|
|
4296
|
+
item.rendered
|
|
4297
|
+
))
|
|
4298
|
+
}
|
|
4299
|
+
)
|
|
4300
|
+
}
|
|
4102
4301
|
);
|
|
4103
4302
|
};
|
|
4104
4303
|
|
|
@@ -4109,7 +4308,8 @@ Tag2.Group = TagGroup;
|
|
|
4109
4308
|
// src/XLoader/XLoader.tsx
|
|
4110
4309
|
var import_react60 = require("react");
|
|
4111
4310
|
var import_system73 = require("@marigold/system");
|
|
4112
|
-
var
|
|
4311
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4312
|
+
var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
4113
4313
|
import_system73.SVG,
|
|
4114
4314
|
{
|
|
4115
4315
|
id: "XLoader",
|
|
@@ -4117,207 +4317,209 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ Rea
|
|
|
4117
4317
|
size: 150,
|
|
4118
4318
|
viewBox: "0 0 150 150",
|
|
4119
4319
|
...props,
|
|
4120
|
-
...ref
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4320
|
+
...ref,
|
|
4321
|
+
children: [
|
|
4322
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4323
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4324
|
+
"path",
|
|
4325
|
+
{
|
|
4326
|
+
id: "XMLID_5_",
|
|
4327
|
+
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",
|
|
4328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4329
|
+
"animate",
|
|
4330
|
+
{
|
|
4331
|
+
attributeName: "opacity",
|
|
4332
|
+
attributeType: "XML",
|
|
4333
|
+
values: "1; .01; 1; 1; 1;",
|
|
4334
|
+
begin: "1.0s",
|
|
4335
|
+
dur: "2.5s",
|
|
4336
|
+
repeatCount: "indefinite"
|
|
4337
|
+
}
|
|
4338
|
+
)
|
|
4339
|
+
}
|
|
4340
|
+
),
|
|
4341
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4342
|
+
"path",
|
|
4343
|
+
{
|
|
4344
|
+
id: "XMLID_18_",
|
|
4345
|
+
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",
|
|
4346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4347
|
+
"animate",
|
|
4348
|
+
{
|
|
4349
|
+
attributeName: "opacity",
|
|
4350
|
+
attributeType: "XML",
|
|
4351
|
+
values: "1; .01; 1; 1; 1;",
|
|
4352
|
+
begin: "0.9s",
|
|
4353
|
+
dur: "2.5s",
|
|
4354
|
+
repeatCount: "indefinite"
|
|
4355
|
+
}
|
|
4356
|
+
)
|
|
4357
|
+
}
|
|
4358
|
+
),
|
|
4359
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4360
|
+
"path",
|
|
4361
|
+
{
|
|
4362
|
+
id: "XMLID_19_",
|
|
4363
|
+
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",
|
|
4364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4365
|
+
"animate",
|
|
4366
|
+
{
|
|
4367
|
+
attributeName: "opacity",
|
|
4368
|
+
attributeType: "XML",
|
|
4369
|
+
values: "1; .01; 1; 1; 1;",
|
|
4370
|
+
begin: "0.8s",
|
|
4371
|
+
dur: "2.5s",
|
|
4372
|
+
repeatCount: "indefinite"
|
|
4373
|
+
}
|
|
4374
|
+
)
|
|
4375
|
+
}
|
|
4376
|
+
),
|
|
4377
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4378
|
+
"path",
|
|
4379
|
+
{
|
|
4380
|
+
id: "XMLID_20_",
|
|
4381
|
+
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",
|
|
4382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4383
|
+
"animate",
|
|
4384
|
+
{
|
|
4385
|
+
attributeName: "opacity",
|
|
4386
|
+
attributeType: "XML",
|
|
4387
|
+
values: "1; .01; 1; 1; 1;",
|
|
4388
|
+
begin: "0.7s",
|
|
4389
|
+
dur: "2.5s",
|
|
4390
|
+
repeatCount: "indefinite"
|
|
4391
|
+
}
|
|
4392
|
+
)
|
|
4393
|
+
}
|
|
4394
|
+
),
|
|
4395
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4396
|
+
"path",
|
|
4397
|
+
{
|
|
4398
|
+
id: "XMLID_21_",
|
|
4399
|
+
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",
|
|
4400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4401
|
+
"animate",
|
|
4402
|
+
{
|
|
4403
|
+
attributeName: "opacity",
|
|
4404
|
+
attributeType: "XML",
|
|
4405
|
+
values: "1; .01; 1; 1; 1;",
|
|
4406
|
+
begin: "0.6s",
|
|
4407
|
+
dur: "2.5s",
|
|
4408
|
+
repeatCount: "indefinite"
|
|
4409
|
+
}
|
|
4410
|
+
)
|
|
4411
|
+
}
|
|
4412
|
+
),
|
|
4413
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4414
|
+
"path",
|
|
4415
|
+
{
|
|
4416
|
+
id: "XMLID_22_",
|
|
4417
|
+
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",
|
|
4418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4419
|
+
"animate",
|
|
4420
|
+
{
|
|
4421
|
+
attributeName: "opacity",
|
|
4422
|
+
attributeType: "XML",
|
|
4423
|
+
values: "1; .01; 1; 1; 1;",
|
|
4424
|
+
begin: "0.5s",
|
|
4425
|
+
dur: "2.5s",
|
|
4426
|
+
repeatCount: "indefinite"
|
|
4427
|
+
}
|
|
4428
|
+
)
|
|
4429
|
+
}
|
|
4430
|
+
),
|
|
4431
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4432
|
+
"path",
|
|
4433
|
+
{
|
|
4434
|
+
id: "XMLID_23_",
|
|
4435
|
+
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",
|
|
4436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4437
|
+
"animate",
|
|
4438
|
+
{
|
|
4439
|
+
attributeName: "opacity",
|
|
4440
|
+
attributeType: "XML",
|
|
4441
|
+
values: "1; .01; 1; 1; 1;",
|
|
4442
|
+
begin: "0.4s",
|
|
4443
|
+
dur: "2.5s",
|
|
4444
|
+
repeatCount: "indefinite"
|
|
4445
|
+
}
|
|
4446
|
+
)
|
|
4447
|
+
}
|
|
4448
|
+
),
|
|
4449
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4450
|
+
"path",
|
|
4451
|
+
{
|
|
4452
|
+
id: "XMLID_24_",
|
|
4453
|
+
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",
|
|
4454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4455
|
+
"animate",
|
|
4456
|
+
{
|
|
4457
|
+
attributeName: "opacity",
|
|
4458
|
+
attributeType: "XML",
|
|
4459
|
+
values: "1; .01; 1; 1; 1;",
|
|
4460
|
+
begin: "0.3s",
|
|
4461
|
+
dur: "2.5s",
|
|
4462
|
+
repeatCount: "indefinite"
|
|
4463
|
+
}
|
|
4464
|
+
)
|
|
4465
|
+
}
|
|
4466
|
+
),
|
|
4467
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4468
|
+
"path",
|
|
4469
|
+
{
|
|
4470
|
+
id: "XMLID_25_",
|
|
4471
|
+
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",
|
|
4472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4473
|
+
"animate",
|
|
4474
|
+
{
|
|
4475
|
+
attributeName: "opacity",
|
|
4476
|
+
attributeType: "XML",
|
|
4477
|
+
values: "1; .01; 1; 1; 1;",
|
|
4478
|
+
begin: "0.2s",
|
|
4479
|
+
dur: "2.5s",
|
|
4480
|
+
repeatCount: "indefinite"
|
|
4481
|
+
}
|
|
4482
|
+
)
|
|
4483
|
+
}
|
|
4484
|
+
),
|
|
4485
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4486
|
+
"path",
|
|
4487
|
+
{
|
|
4488
|
+
id: "XMLID_26_",
|
|
4489
|
+
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",
|
|
4490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4491
|
+
"animate",
|
|
4492
|
+
{
|
|
4493
|
+
attributeName: "opacity",
|
|
4494
|
+
attributeType: "XML",
|
|
4495
|
+
values: "1; .01; 1; 1; 1;",
|
|
4496
|
+
begin: "0.1s",
|
|
4497
|
+
dur: "2.5s",
|
|
4498
|
+
repeatCount: "indefinite"
|
|
4499
|
+
}
|
|
4500
|
+
)
|
|
4501
|
+
}
|
|
4502
|
+
),
|
|
4503
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4504
|
+
"path",
|
|
4505
|
+
{
|
|
4506
|
+
id: "XMLID_27_",
|
|
4507
|
+
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",
|
|
4508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4509
|
+
"animate",
|
|
4510
|
+
{
|
|
4511
|
+
attributeName: "opacity",
|
|
4512
|
+
attributeType: "XML",
|
|
4513
|
+
values: "1; .01; 1; 1; 1;",
|
|
4514
|
+
begin: "0.0s",
|
|
4515
|
+
dur: "2.5s",
|
|
4516
|
+
repeatCount: "indefinite"
|
|
4517
|
+
}
|
|
4518
|
+
)
|
|
4519
|
+
}
|
|
4520
|
+
)
|
|
4521
|
+
]
|
|
4522
|
+
}
|
|
4321
4523
|
));
|
|
4322
4524
|
|
|
4323
4525
|
// src/Tabs/Tabs.tsx
|
|
@@ -4338,6 +4540,7 @@ var import_interactions16 = require("@react-aria/interactions");
|
|
|
4338
4540
|
var import_tabs = require("@react-aria/tabs");
|
|
4339
4541
|
var import_utils37 = require("@react-aria/utils");
|
|
4340
4542
|
var import_system74 = require("@marigold/system");
|
|
4543
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4341
4544
|
var Tab = ({ item, state }) => {
|
|
4342
4545
|
const { key, rendered } = item;
|
|
4343
4546
|
const ref = (0, import_react62.useRef)(null);
|
|
@@ -4349,7 +4552,7 @@ var Tab = ({ item, state }) => {
|
|
|
4349
4552
|
const { focusProps } = (0, import_interactions16.useFocus)({});
|
|
4350
4553
|
const stateProps = (0, import_system74.useStateProps)({ active: isSelected, hover: isHovered });
|
|
4351
4554
|
const { classNames: classNames2 } = useTabContext();
|
|
4352
|
-
return /* @__PURE__ */
|
|
4555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4353
4556
|
"div",
|
|
4354
4557
|
{
|
|
4355
4558
|
className: (0, import_system74.cn)(
|
|
@@ -4357,9 +4560,9 @@ var Tab = ({ item, state }) => {
|
|
|
4357
4560
|
classNames2.tab
|
|
4358
4561
|
),
|
|
4359
4562
|
...(0, import_utils37.mergeProps)(tabProps, stateProps, focusProps, hoverProps),
|
|
4360
|
-
ref
|
|
4361
|
-
|
|
4362
|
-
|
|
4563
|
+
ref,
|
|
4564
|
+
children: rendered
|
|
4565
|
+
}
|
|
4363
4566
|
);
|
|
4364
4567
|
};
|
|
4365
4568
|
|
|
@@ -4367,16 +4570,18 @@ var Tab = ({ item, state }) => {
|
|
|
4367
4570
|
var import_react63 = require("react");
|
|
4368
4571
|
var import_tabs2 = require("@react-aria/tabs");
|
|
4369
4572
|
var import_system75 = require("@marigold/system");
|
|
4573
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4370
4574
|
var TabPanel = ({ state, ...props }) => {
|
|
4371
4575
|
var _a;
|
|
4372
4576
|
const ref = (0, import_react63.useRef)(null);
|
|
4373
4577
|
const { tabPanelProps } = (0, import_tabs2.useTabPanel)(props, state, ref);
|
|
4374
4578
|
const selectedItemProps = (_a = state.selectedItem) == null ? void 0 : _a.props;
|
|
4375
4579
|
const { classNames: classNames2 } = useTabContext();
|
|
4376
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_system75.cn)(classNames2.tabpanel), ref, ...tabPanelProps, children: selectedItemProps == null ? void 0 : selectedItemProps.children });
|
|
4377
4581
|
};
|
|
4378
4582
|
|
|
4379
4583
|
// src/Tabs/Tabs.tsx
|
|
4584
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4380
4585
|
var Tabs = ({
|
|
4381
4586
|
space = 2,
|
|
4382
4587
|
size = "medium",
|
|
@@ -4397,17 +4602,20 @@ var Tabs = ({
|
|
|
4397
4602
|
size,
|
|
4398
4603
|
variant
|
|
4399
4604
|
});
|
|
4400
|
-
return /* @__PURE__ */
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: (0, import_system76.cn)(classNames2.container), children: [
|
|
4606
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4607
|
+
"div",
|
|
4608
|
+
{
|
|
4609
|
+
className: (0, import_system76.cn)("flex", import_system76.gapSpace[space], classNames2.tabs),
|
|
4610
|
+
...tabListProps,
|
|
4611
|
+
ref,
|
|
4612
|
+
children: [...state.collection].map((item) => {
|
|
4613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tab, { item, state }, item.key);
|
|
4614
|
+
})
|
|
4615
|
+
}
|
|
4616
|
+
),
|
|
4617
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabPanel, { state }, (_a = state.selectedItem) == null ? void 0 : _a.key)
|
|
4618
|
+
] }) });
|
|
4411
4619
|
};
|
|
4412
4620
|
Tabs.Item = import_collections7.Item;
|
|
4413
4621
|
// Annotate the CommonJS export names for ESM import in node:
|