@marigold/components 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +22 -10
- package/dist/index.d.ts +22 -10
- package/dist/index.js +612 -577
- package/dist/index.mjs +436 -404
- package/package.json +24 -67
package/dist/index.mjs
CHANGED
|
@@ -312,45 +312,40 @@ import { cn as cn6, width as twWidth, useClassNames as useClassNames4 } from "@m
|
|
|
312
312
|
import { FieldError, Text } from "react-aria-components";
|
|
313
313
|
import { cn as cn4, useClassNames as useClassNames2 } from "@marigold/system";
|
|
314
314
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
315
|
+
var Icon = ({ className }) => /* @__PURE__ */ jsx7(
|
|
316
|
+
"svg",
|
|
317
|
+
{
|
|
318
|
+
className: cn4("h-4 w-4 shrink-0", className),
|
|
319
|
+
viewBox: "0 0 24 24",
|
|
320
|
+
role: "presentation",
|
|
321
|
+
fill: "currentColor",
|
|
322
|
+
children: /* @__PURE__ */ jsx7("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" })
|
|
323
|
+
}
|
|
324
|
+
);
|
|
315
325
|
var HelpText = ({
|
|
316
326
|
variant,
|
|
317
327
|
size,
|
|
318
328
|
description,
|
|
319
|
-
error,
|
|
320
329
|
errorMessage,
|
|
321
330
|
...props
|
|
322
331
|
}) => {
|
|
323
|
-
const hasErrorMessage = errorMessage && error;
|
|
324
332
|
const classNames2 = useClassNames2({
|
|
325
333
|
component: "HelpText",
|
|
326
334
|
variant,
|
|
327
335
|
size
|
|
328
336
|
});
|
|
329
|
-
if (!description && !errorMessage) {
|
|
330
|
-
return null;
|
|
331
|
-
}
|
|
332
337
|
return /* @__PURE__ */ jsxs3("div", { className: cn4(classNames2.container), children: [
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
|
|
335
|
-
{
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
role: "presentation",
|
|
345
|
-
fill: "currentColor",
|
|
346
|
-
children: /* @__PURE__ */ jsx7("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" })
|
|
347
|
-
}
|
|
348
|
-
),
|
|
349
|
-
errorMessage
|
|
350
|
-
]
|
|
351
|
-
}
|
|
352
|
-
),
|
|
353
|
-
!hasErrorMessage && /* @__PURE__ */ jsx7(Text, { slot: "description", children: description })
|
|
338
|
+
/* @__PURE__ */ jsx7(FieldError, { ...props, className: "peer/error flex flex-col", children: (validation) => {
|
|
339
|
+
const messages = (typeof errorMessage === "function" ? errorMessage(validation) : errorMessage) || validation.validationErrors;
|
|
340
|
+
return Array.isArray(messages) ? messages.map((msg) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
341
|
+
/* @__PURE__ */ jsx7(Icon, { className: classNames2.icon }),
|
|
342
|
+
msg
|
|
343
|
+
] })) : /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
344
|
+
/* @__PURE__ */ jsx7(Icon, { className: classNames2.icon }),
|
|
345
|
+
messages
|
|
346
|
+
] });
|
|
347
|
+
} }),
|
|
348
|
+
/* @__PURE__ */ jsx7(Text, { slot: "description", className: "peer-first/error:hidden", children: description })
|
|
354
349
|
] });
|
|
355
350
|
};
|
|
356
351
|
|
|
@@ -434,8 +429,7 @@ var _FieldBase = (props, ref) => {
|
|
|
434
429
|
variant,
|
|
435
430
|
size,
|
|
436
431
|
description,
|
|
437
|
-
errorMessage
|
|
438
|
-
error: props.isInvalid
|
|
432
|
+
errorMessage
|
|
439
433
|
}
|
|
440
434
|
)
|
|
441
435
|
]
|
|
@@ -563,12 +557,47 @@ _ListBox.Section = _Section;
|
|
|
563
557
|
// src/Overlay/Popover.tsx
|
|
564
558
|
import { forwardRef as forwardRef6 } from "react";
|
|
565
559
|
import { Popover } from "react-aria-components";
|
|
566
|
-
import { cn as cn11, useClassNames as useClassNames8, useSmallScreen
|
|
560
|
+
import { cn as cn11, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
|
|
561
|
+
|
|
562
|
+
// src/Provider/OverlayContainerProvider.tsx
|
|
563
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
564
|
+
import { useIsSSR } from "@react-aria/ssr";
|
|
565
|
+
var OverlayContainerContext = createContext3(void 0);
|
|
566
|
+
var OverlayContainerProvider = OverlayContainerContext.Provider;
|
|
567
|
+
var usePortalContainer = () => {
|
|
568
|
+
const portalContainer = useContext3(OverlayContainerContext);
|
|
569
|
+
const isSSR = useIsSSR();
|
|
570
|
+
const portal = isSSR ? null : portalContainer ? document.getElementById(portalContainer) : document.body;
|
|
571
|
+
return portal;
|
|
572
|
+
};
|
|
567
573
|
|
|
568
574
|
// src/Overlay/Underlay.tsx
|
|
569
575
|
import { ModalOverlay } from "react-aria-components";
|
|
570
576
|
import { cn as cn10, useClassNames as useClassNames7 } from "@marigold/system";
|
|
577
|
+
|
|
578
|
+
// src/Provider/index.ts
|
|
579
|
+
import { useTheme as useTheme2, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
580
|
+
|
|
581
|
+
// src/Provider/MarigoldProvider.tsx
|
|
582
|
+
import { OverlayProvider } from "@react-aria/overlays";
|
|
583
|
+
import {
|
|
584
|
+
ThemeProvider,
|
|
585
|
+
defaultTheme,
|
|
586
|
+
useTheme
|
|
587
|
+
} from "@marigold/system";
|
|
571
588
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
589
|
+
function MarigoldProvider({
|
|
590
|
+
children,
|
|
591
|
+
theme,
|
|
592
|
+
portalContainer
|
|
593
|
+
}) {
|
|
594
|
+
const outerTheme = useTheme();
|
|
595
|
+
const isTopLevel = outerTheme === defaultTheme;
|
|
596
|
+
return /* @__PURE__ */ jsx15(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx15(OverlayContainerProvider, { value: portalContainer, children: /* @__PURE__ */ jsx15(OverlayProvider, { children }) }) : children });
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
// src/Overlay/Underlay.tsx
|
|
600
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
572
601
|
var Underlay = ({
|
|
573
602
|
size,
|
|
574
603
|
variant,
|
|
@@ -584,7 +613,8 @@ var Underlay = ({
|
|
|
584
613
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
585
614
|
...rest
|
|
586
615
|
};
|
|
587
|
-
|
|
616
|
+
const portal = usePortalContainer();
|
|
617
|
+
return /* @__PURE__ */ jsx16(
|
|
588
618
|
ModalOverlay,
|
|
589
619
|
{
|
|
590
620
|
className: ({ isEntering, isExiting }) => cn10(
|
|
@@ -595,15 +625,16 @@ var Underlay = ({
|
|
|
595
625
|
),
|
|
596
626
|
...props,
|
|
597
627
|
"data-testid": "underlay-id",
|
|
628
|
+
UNSTABLE_portalContainer: portal,
|
|
598
629
|
children: props.children
|
|
599
630
|
}
|
|
600
631
|
);
|
|
601
632
|
};
|
|
602
633
|
|
|
603
634
|
// src/Overlay/Popover.tsx
|
|
604
|
-
import { Fragment, jsx as
|
|
635
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
605
636
|
var _Popover = forwardRef6(
|
|
606
|
-
({ keyboardDismissDisabled, placement, open, children, ...rest }, ref) => {
|
|
637
|
+
({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
|
|
607
638
|
const props = {
|
|
608
639
|
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
609
640
|
isOpen: open,
|
|
@@ -617,10 +648,10 @@ var _Popover = forwardRef6(
|
|
|
617
648
|
className: "w-[--trigger-width]"
|
|
618
649
|
});
|
|
619
650
|
const isSmallScreen = useSmallScreen();
|
|
620
|
-
const
|
|
621
|
-
return /* @__PURE__ */
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */
|
|
651
|
+
const portal = usePortalContainer();
|
|
652
|
+
return /* @__PURE__ */ jsx17(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
653
|
+
/* @__PURE__ */ jsx17(Underlay, { open, variant: "modal" }),
|
|
654
|
+
/* @__PURE__ */ jsx17(
|
|
624
655
|
Popover,
|
|
625
656
|
{
|
|
626
657
|
ref,
|
|
@@ -628,18 +659,18 @@ var _Popover = forwardRef6(
|
|
|
628
659
|
className: cn11(
|
|
629
660
|
"!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"
|
|
630
661
|
),
|
|
631
|
-
|
|
662
|
+
UNSTABLE_portalContainer: portal,
|
|
632
663
|
children
|
|
633
664
|
}
|
|
634
665
|
)
|
|
635
|
-
] }) : /* @__PURE__ */
|
|
666
|
+
] }) : /* @__PURE__ */ jsx17(
|
|
636
667
|
Popover,
|
|
637
668
|
{
|
|
638
669
|
ref,
|
|
639
670
|
...props,
|
|
640
671
|
className: classNames2,
|
|
641
672
|
offset: 0,
|
|
642
|
-
|
|
673
|
+
UNSTABLE_portalContainer: portal,
|
|
643
674
|
children
|
|
644
675
|
}
|
|
645
676
|
) });
|
|
@@ -655,7 +686,7 @@ import { cn as cn13 } from "@marigold/system";
|
|
|
655
686
|
import { forwardRef as forwardRef7 } from "react";
|
|
656
687
|
import { Button } from "react-aria-components";
|
|
657
688
|
import { cn as cn12, useClassNames as useClassNames9 } from "@marigold/system";
|
|
658
|
-
import { jsx as
|
|
689
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
659
690
|
var _Button = forwardRef7(
|
|
660
691
|
({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
|
|
661
692
|
const classNames2 = useClassNames9({
|
|
@@ -664,7 +695,7 @@ var _Button = forwardRef7(
|
|
|
664
695
|
size,
|
|
665
696
|
className
|
|
666
697
|
});
|
|
667
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ jsx18(
|
|
668
699
|
Button,
|
|
669
700
|
{
|
|
670
701
|
...props,
|
|
@@ -682,10 +713,10 @@ var _Button = forwardRef7(
|
|
|
682
713
|
);
|
|
683
714
|
|
|
684
715
|
// src/Autocomplete/ClearButton.tsx
|
|
685
|
-
import { jsx as
|
|
716
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
686
717
|
var AutocompleteClearButton = ({ className }) => {
|
|
687
718
|
let state = React.useContext(ComboBoxStateContext);
|
|
688
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ jsx19(
|
|
689
720
|
_Button,
|
|
690
721
|
{
|
|
691
722
|
"aria-label": "Clear",
|
|
@@ -695,7 +726,7 @@ var AutocompleteClearButton = ({ className }) => {
|
|
|
695
726
|
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
696
727
|
className
|
|
697
728
|
),
|
|
698
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ jsx19(
|
|
699
730
|
"svg",
|
|
700
731
|
{
|
|
701
732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -703,7 +734,7 @@ var AutocompleteClearButton = ({ className }) => {
|
|
|
703
734
|
fill: "currentColor",
|
|
704
735
|
width: 20,
|
|
705
736
|
height: 20,
|
|
706
|
-
children: /* @__PURE__ */
|
|
737
|
+
children: /* @__PURE__ */ jsx19("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" })
|
|
707
738
|
}
|
|
708
739
|
)
|
|
709
740
|
}
|
|
@@ -711,15 +742,15 @@ var AutocompleteClearButton = ({ className }) => {
|
|
|
711
742
|
};
|
|
712
743
|
|
|
713
744
|
// src/Autocomplete/Autocomplete.tsx
|
|
714
|
-
import { Fragment as Fragment2, jsx as
|
|
745
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
715
746
|
var SearchInput = ({ onSubmit, ref }) => {
|
|
716
747
|
const state = React2.useContext(ComboBoxStateContext2);
|
|
717
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ jsx20(
|
|
718
749
|
_Input,
|
|
719
750
|
{
|
|
720
751
|
ref,
|
|
721
|
-
icon: /* @__PURE__ */
|
|
722
|
-
action: (state == null ? void 0 : state.inputValue) !== "" ? /* @__PURE__ */
|
|
752
|
+
icon: /* @__PURE__ */ jsx20(SearchIcon, {}),
|
|
753
|
+
action: (state == null ? void 0 : state.inputValue) !== "" ? /* @__PURE__ */ jsx20(AutocompleteClearButton, {}) : void 0,
|
|
723
754
|
onKeyDown: (e) => {
|
|
724
755
|
if (e.key === "Enter" || e.key === "Escape") {
|
|
725
756
|
e.preventDefault();
|
|
@@ -733,7 +764,7 @@ var SearchInput = ({ onSubmit, ref }) => {
|
|
|
733
764
|
}
|
|
734
765
|
);
|
|
735
766
|
};
|
|
736
|
-
var SearchIcon = (props) => /* @__PURE__ */
|
|
767
|
+
var SearchIcon = (props) => /* @__PURE__ */ jsx20(
|
|
737
768
|
"svg",
|
|
738
769
|
{
|
|
739
770
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -742,7 +773,7 @@ var SearchIcon = (props) => /* @__PURE__ */ jsx19(
|
|
|
742
773
|
width: 24,
|
|
743
774
|
height: 24,
|
|
744
775
|
...props,
|
|
745
|
-
children: /* @__PURE__ */
|
|
776
|
+
children: /* @__PURE__ */ jsx20("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" })
|
|
746
777
|
}
|
|
747
778
|
);
|
|
748
779
|
var _Autocomplete = forwardRef8(
|
|
@@ -770,9 +801,9 @@ var _Autocomplete = forwardRef8(
|
|
|
770
801
|
isRequired: required,
|
|
771
802
|
...rest
|
|
772
803
|
};
|
|
773
|
-
return /* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ jsx20(Fragment2, { children: /* @__PURE__ */ jsxs8(FieldBase, { as: ComboBox, ...props, children: [
|
|
805
|
+
/* @__PURE__ */ jsx20(SearchInput, { onSubmit, ref }),
|
|
806
|
+
/* @__PURE__ */ jsx20(_Popover, { children: /* @__PURE__ */ jsx20(_ListBox, { children }) })
|
|
776
807
|
] }) });
|
|
777
808
|
}
|
|
778
809
|
);
|
|
@@ -781,7 +812,7 @@ _Autocomplete.Item = _ListBox.Item;
|
|
|
781
812
|
// src/ComboBox/ComboBox.tsx
|
|
782
813
|
import { forwardRef as forwardRef9 } from "react";
|
|
783
814
|
import { ComboBox as ComboBox2 } from "react-aria-components";
|
|
784
|
-
import { jsx as
|
|
815
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
785
816
|
var _ComboBox = forwardRef9(
|
|
786
817
|
({
|
|
787
818
|
variant,
|
|
@@ -807,13 +838,13 @@ var _ComboBox = forwardRef9(
|
|
|
807
838
|
...rest
|
|
808
839
|
};
|
|
809
840
|
return /* @__PURE__ */ jsxs9(FieldBase, { as: ComboBox2, ref, ...props, children: [
|
|
810
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsx21(
|
|
811
842
|
_Input,
|
|
812
843
|
{
|
|
813
|
-
action: /* @__PURE__ */
|
|
844
|
+
action: /* @__PURE__ */ jsx21(_Button, { className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0", children: /* @__PURE__ */ jsx21(ChevronDown, { className: "h-4 w-4" }) })
|
|
814
845
|
}
|
|
815
846
|
),
|
|
816
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ jsx21(_Popover, { children: /* @__PURE__ */ jsx21(_ListBox, { children }) })
|
|
817
848
|
] });
|
|
818
849
|
}
|
|
819
850
|
);
|
|
@@ -821,15 +852,15 @@ _ComboBox.Item = _ListBox.Item;
|
|
|
821
852
|
|
|
822
853
|
// src/Badge/Badge.tsx
|
|
823
854
|
import { useClassNames as useClassNames10 } from "@marigold/system";
|
|
824
|
-
import { jsx as
|
|
855
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
825
856
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
826
857
|
const classNames2 = useClassNames10({ component: "Badge", variant, size });
|
|
827
|
-
return /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ jsx22("div", { ...props, className: classNames2, children });
|
|
828
859
|
};
|
|
829
860
|
|
|
830
861
|
// src/Breakout/Breakout.tsx
|
|
831
862
|
import { alignment, cn as cn14, createVar as createVar4 } from "@marigold/system";
|
|
832
|
-
import { jsx as
|
|
863
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
833
864
|
var Breakout = ({
|
|
834
865
|
height,
|
|
835
866
|
children,
|
|
@@ -839,7 +870,7 @@ var Breakout = ({
|
|
|
839
870
|
...props
|
|
840
871
|
}) => {
|
|
841
872
|
var _a, _b, _c, _d;
|
|
842
|
-
return /* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ jsx23(
|
|
843
874
|
"div",
|
|
844
875
|
{
|
|
845
876
|
className: cn14(
|
|
@@ -858,10 +889,10 @@ var Breakout = ({
|
|
|
858
889
|
|
|
859
890
|
// src/Body/Body.tsx
|
|
860
891
|
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
861
|
-
import { jsx as
|
|
892
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
862
893
|
var Body = ({ children, variant, size, ...props }) => {
|
|
863
894
|
const classNames2 = useClassNames11({ component: "Body", variant, size });
|
|
864
|
-
return /* @__PURE__ */
|
|
895
|
+
return /* @__PURE__ */ jsx24("section", { ...props, className: classNames2, children });
|
|
865
896
|
};
|
|
866
897
|
|
|
867
898
|
// src/Card/Card.tsx
|
|
@@ -877,7 +908,7 @@ import {
|
|
|
877
908
|
paddingTop,
|
|
878
909
|
useClassNames as useClassNames12
|
|
879
910
|
} from "@marigold/system";
|
|
880
|
-
import { jsx as
|
|
911
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
881
912
|
var Card = ({
|
|
882
913
|
children,
|
|
883
914
|
variant,
|
|
@@ -893,7 +924,7 @@ var Card = ({
|
|
|
893
924
|
...props
|
|
894
925
|
}) => {
|
|
895
926
|
const classNames2 = useClassNames12({ component: "Card", variant, size });
|
|
896
|
-
return /* @__PURE__ */
|
|
927
|
+
return /* @__PURE__ */ jsx25(
|
|
897
928
|
"div",
|
|
898
929
|
{
|
|
899
930
|
...props,
|
|
@@ -916,14 +947,14 @@ var Card = ({
|
|
|
916
947
|
|
|
917
948
|
// src/Center/Center.tsx
|
|
918
949
|
import { cn as cn16, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
|
|
919
|
-
import { jsx as
|
|
950
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
920
951
|
var Center = ({
|
|
921
952
|
maxWidth = "100%",
|
|
922
953
|
space = 0,
|
|
923
954
|
children,
|
|
924
955
|
...props
|
|
925
956
|
}) => {
|
|
926
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ jsx26(
|
|
927
958
|
"div",
|
|
928
959
|
{
|
|
929
960
|
...props,
|
|
@@ -942,8 +973,8 @@ var Center = ({
|
|
|
942
973
|
import { forwardRef as forwardRef10 } from "react";
|
|
943
974
|
import { Checkbox } from "react-aria-components";
|
|
944
975
|
import { cn as cn17, useClassNames as useClassNames13 } from "@marigold/system";
|
|
945
|
-
import { Fragment as Fragment3, jsx as
|
|
946
|
-
var CheckMark = () => /* @__PURE__ */
|
|
976
|
+
import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
977
|
+
var CheckMark = () => /* @__PURE__ */ jsx27("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx27(
|
|
947
978
|
"path",
|
|
948
979
|
{
|
|
949
980
|
fill: "currentColor",
|
|
@@ -951,7 +982,7 @@ var CheckMark = () => /* @__PURE__ */ jsx26("svg", { viewBox: "0 0 12 10", child
|
|
|
951
982
|
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"
|
|
952
983
|
}
|
|
953
984
|
) });
|
|
954
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
985
|
+
var IndeterminateMark = () => /* @__PURE__ */ jsx27("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx27(
|
|
955
986
|
"path",
|
|
956
987
|
{
|
|
957
988
|
fill: "currentColor",
|
|
@@ -959,8 +990,8 @@ var IndeterminateMark = () => /* @__PURE__ */ jsx26("svg", { width: "12", height
|
|
|
959
990
|
d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
|
|
960
991
|
}
|
|
961
992
|
) });
|
|
962
|
-
var
|
|
963
|
-
return /* @__PURE__ */
|
|
993
|
+
var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
994
|
+
return /* @__PURE__ */ jsx27(
|
|
964
995
|
"div",
|
|
965
996
|
{
|
|
966
997
|
"aria-hidden": "true",
|
|
@@ -972,7 +1003,7 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
972
1003
|
className
|
|
973
1004
|
),
|
|
974
1005
|
...props,
|
|
975
|
-
children: indeterminate ? /* @__PURE__ */
|
|
1006
|
+
children: indeterminate ? /* @__PURE__ */ jsx27(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx27(CheckMark, {}) : null
|
|
976
1007
|
}
|
|
977
1008
|
);
|
|
978
1009
|
};
|
|
@@ -1002,7 +1033,7 @@ var _Checkbox = forwardRef10(
|
|
|
1002
1033
|
...rest
|
|
1003
1034
|
};
|
|
1004
1035
|
const classNames2 = useClassNames13({ component: "Checkbox", variant, size });
|
|
1005
|
-
return /* @__PURE__ */
|
|
1036
|
+
return /* @__PURE__ */ jsx27(
|
|
1006
1037
|
Checkbox,
|
|
1007
1038
|
{
|
|
1008
1039
|
ref,
|
|
@@ -1013,15 +1044,15 @@ var _Checkbox = forwardRef10(
|
|
|
1013
1044
|
),
|
|
1014
1045
|
...props,
|
|
1015
1046
|
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
|
|
1047
|
+
/* @__PURE__ */ jsx27(
|
|
1048
|
+
Icon2,
|
|
1018
1049
|
{
|
|
1019
1050
|
checked: isSelected,
|
|
1020
1051
|
indeterminate: isIndeterminate,
|
|
1021
1052
|
className: classNames2.checkbox
|
|
1022
1053
|
}
|
|
1023
1054
|
),
|
|
1024
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ jsx27("div", { className: classNames2.label, children })
|
|
1025
1056
|
] })
|
|
1026
1057
|
}
|
|
1027
1058
|
);
|
|
@@ -1031,7 +1062,7 @@ var _Checkbox = forwardRef10(
|
|
|
1031
1062
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1032
1063
|
import { CheckboxGroup } from "react-aria-components";
|
|
1033
1064
|
import { useClassNames as useClassNames14 } from "@marigold/system";
|
|
1034
|
-
import { jsx as
|
|
1065
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1035
1066
|
var _CheckboxGroup = ({
|
|
1036
1067
|
children,
|
|
1037
1068
|
variant,
|
|
@@ -1056,13 +1087,13 @@ var _CheckboxGroup = ({
|
|
|
1056
1087
|
isInvalid: error,
|
|
1057
1088
|
...rest
|
|
1058
1089
|
};
|
|
1059
|
-
return /* @__PURE__ */
|
|
1090
|
+
return /* @__PURE__ */ jsx28(FieldBase, { as: CheckboxGroup, ...props, children });
|
|
1060
1091
|
};
|
|
1061
1092
|
|
|
1062
1093
|
// src/Columns/Columns.tsx
|
|
1063
1094
|
import { Children as Children3 } from "react";
|
|
1064
1095
|
import { cn as cn18, createVar as createVar6, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1065
|
-
import { jsx as
|
|
1096
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1066
1097
|
var Columns = ({
|
|
1067
1098
|
space = 0,
|
|
1068
1099
|
columns,
|
|
@@ -1078,7 +1109,7 @@ var Columns = ({
|
|
|
1078
1109
|
)}`
|
|
1079
1110
|
);
|
|
1080
1111
|
}
|
|
1081
|
-
return /* @__PURE__ */
|
|
1112
|
+
return /* @__PURE__ */ jsx29(
|
|
1082
1113
|
"div",
|
|
1083
1114
|
{
|
|
1084
1115
|
className: cn18(
|
|
@@ -1087,7 +1118,7 @@ var Columns = ({
|
|
|
1087
1118
|
gapSpace4[space]
|
|
1088
1119
|
),
|
|
1089
1120
|
...props,
|
|
1090
|
-
children: Children3.map(children, (child, idx) => /* @__PURE__ */
|
|
1121
|
+
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx29(
|
|
1091
1122
|
"div",
|
|
1092
1123
|
{
|
|
1093
1124
|
className: cn18(
|
|
@@ -1109,7 +1140,7 @@ import {
|
|
|
1109
1140
|
gridColumn,
|
|
1110
1141
|
placeItems
|
|
1111
1142
|
} from "@marigold/system";
|
|
1112
|
-
import { jsx as
|
|
1143
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1113
1144
|
var content = {
|
|
1114
1145
|
small: "20ch",
|
|
1115
1146
|
medium: "45ch",
|
|
@@ -1129,7 +1160,7 @@ var Container = ({
|
|
|
1129
1160
|
...props
|
|
1130
1161
|
}) => {
|
|
1131
1162
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1132
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ jsx30(
|
|
1133
1164
|
"div",
|
|
1134
1165
|
{
|
|
1135
1166
|
...props,
|
|
@@ -1146,7 +1177,7 @@ var Container = ({
|
|
|
1146
1177
|
};
|
|
1147
1178
|
|
|
1148
1179
|
// src/Dialog/Dialog.tsx
|
|
1149
|
-
import { useContext as
|
|
1180
|
+
import { useContext as useContext4 } from "react";
|
|
1150
1181
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1151
1182
|
import { cn as cn21, useClassNames as useClassNames16 } from "@marigold/system";
|
|
1152
1183
|
|
|
@@ -1158,9 +1189,9 @@ import {
|
|
|
1158
1189
|
get,
|
|
1159
1190
|
textAlign,
|
|
1160
1191
|
useClassNames as useClassNames15,
|
|
1161
|
-
useTheme as
|
|
1192
|
+
useTheme as useTheme3
|
|
1162
1193
|
} from "@marigold/system";
|
|
1163
|
-
import { jsx as
|
|
1194
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1164
1195
|
var _Headline = ({
|
|
1165
1196
|
variant,
|
|
1166
1197
|
size,
|
|
@@ -1170,13 +1201,13 @@ var _Headline = ({
|
|
|
1170
1201
|
level = 1,
|
|
1171
1202
|
...props
|
|
1172
1203
|
}) => {
|
|
1173
|
-
const theme =
|
|
1204
|
+
const theme = useTheme3();
|
|
1174
1205
|
const classNames2 = useClassNames15({
|
|
1175
1206
|
component: "Headline",
|
|
1176
1207
|
variant,
|
|
1177
1208
|
size: size != null ? size : `level-${level}`
|
|
1178
1209
|
});
|
|
1179
|
-
return /* @__PURE__ */
|
|
1210
|
+
return /* @__PURE__ */ jsx31(
|
|
1180
1211
|
Heading,
|
|
1181
1212
|
{
|
|
1182
1213
|
level: Number(level),
|
|
@@ -1202,30 +1233,28 @@ import { DialogTrigger } from "react-aria-components";
|
|
|
1202
1233
|
// src/Overlay/Modal.tsx
|
|
1203
1234
|
import { forwardRef as forwardRef11 } from "react";
|
|
1204
1235
|
import { Modal } from "react-aria-components";
|
|
1205
|
-
import {
|
|
1206
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1236
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1207
1237
|
var _Modal = forwardRef11(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
1208
|
-
const theme = useTheme3();
|
|
1209
1238
|
const props = {
|
|
1210
1239
|
isOpen: open,
|
|
1211
1240
|
isDismissable: dismissable,
|
|
1212
1241
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
1213
1242
|
...rest
|
|
1214
1243
|
};
|
|
1215
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ jsx32(
|
|
1216
1245
|
Underlay,
|
|
1217
1246
|
{
|
|
1218
1247
|
dismissable,
|
|
1219
1248
|
keyboardDismissable,
|
|
1220
1249
|
open,
|
|
1221
1250
|
variant: "modal",
|
|
1222
|
-
children: /* @__PURE__ */
|
|
1251
|
+
children: /* @__PURE__ */ jsx32(Modal, { ref, ...props, children: props.children })
|
|
1223
1252
|
}
|
|
1224
1253
|
);
|
|
1225
1254
|
});
|
|
1226
1255
|
|
|
1227
1256
|
// src/Dialog/DialogTrigger.tsx
|
|
1228
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1229
1258
|
var _DialogTrigger = ({
|
|
1230
1259
|
open,
|
|
1231
1260
|
dismissable,
|
|
@@ -1242,10 +1271,10 @@ var _DialogTrigger = ({
|
|
|
1242
1271
|
const hasDialogTrigger = dialogTrigger.type !== _Dialog;
|
|
1243
1272
|
const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
|
|
1244
1273
|
if (isNonModal)
|
|
1245
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ jsx33(DialogTrigger, { ...props, children: props.children });
|
|
1246
1275
|
return /* @__PURE__ */ jsxs11(DialogTrigger, { ...props, children: [
|
|
1247
1276
|
hasDialogTrigger && dialogTrigger,
|
|
1248
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx33(
|
|
1249
1278
|
_Modal,
|
|
1250
1279
|
{
|
|
1251
1280
|
dismissable,
|
|
@@ -1257,10 +1286,10 @@ var _DialogTrigger = ({
|
|
|
1257
1286
|
};
|
|
1258
1287
|
|
|
1259
1288
|
// src/Dialog/Dialog.tsx
|
|
1260
|
-
import { Fragment as Fragment4, jsx as
|
|
1289
|
+
import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1261
1290
|
var CloseButton = ({ className }) => {
|
|
1262
|
-
const { close } =
|
|
1263
|
-
return /* @__PURE__ */
|
|
1291
|
+
const { close } = useContext4(OverlayTriggerStateContext);
|
|
1292
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx34(
|
|
1264
1293
|
"button",
|
|
1265
1294
|
{
|
|
1266
1295
|
className: cn21(
|
|
@@ -1268,7 +1297,7 @@ var CloseButton = ({ className }) => {
|
|
|
1268
1297
|
className
|
|
1269
1298
|
),
|
|
1270
1299
|
onClick: close,
|
|
1271
|
-
children: /* @__PURE__ */
|
|
1300
|
+
children: /* @__PURE__ */ jsx34("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx34(
|
|
1272
1301
|
"path",
|
|
1273
1302
|
{
|
|
1274
1303
|
fillRule: "evenodd",
|
|
@@ -1279,7 +1308,7 @@ var CloseButton = ({ className }) => {
|
|
|
1279
1308
|
}
|
|
1280
1309
|
) });
|
|
1281
1310
|
};
|
|
1282
|
-
var DialogHeadline = ({ children }) => /* @__PURE__ */
|
|
1311
|
+
var DialogHeadline = ({ children }) => /* @__PURE__ */ jsx34(_Headline, { slot: "title", children });
|
|
1283
1312
|
var _Dialog = ({
|
|
1284
1313
|
variant,
|
|
1285
1314
|
size,
|
|
@@ -1288,7 +1317,7 @@ var _Dialog = ({
|
|
|
1288
1317
|
...props
|
|
1289
1318
|
}) => {
|
|
1290
1319
|
const classNames2 = useClassNames16({ component: "Dialog", variant, size });
|
|
1291
|
-
let state =
|
|
1320
|
+
let state = useContext4(OverlayTriggerStateContext);
|
|
1292
1321
|
let children = props.children;
|
|
1293
1322
|
if (typeof children === "function") {
|
|
1294
1323
|
children = children({
|
|
@@ -1296,13 +1325,13 @@ var _Dialog = ({
|
|
|
1296
1325
|
})
|
|
1297
1326
|
});
|
|
1298
1327
|
}
|
|
1299
|
-
return /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ jsx34(
|
|
1300
1329
|
Dialog,
|
|
1301
1330
|
{
|
|
1302
1331
|
...props,
|
|
1303
1332
|
className: cn21("relative outline-none", classNames2.container),
|
|
1304
1333
|
children: /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
1305
|
-
closeButton && /* @__PURE__ */
|
|
1334
|
+
closeButton && /* @__PURE__ */ jsx34(CloseButton, { className: classNames2.closeButton }),
|
|
1306
1335
|
children
|
|
1307
1336
|
] })
|
|
1308
1337
|
}
|
|
@@ -1314,18 +1343,18 @@ _Dialog.Headline = DialogHeadline;
|
|
|
1314
1343
|
// src/Divider/Divider.tsx
|
|
1315
1344
|
import { Separator } from "react-aria-components";
|
|
1316
1345
|
import { useClassNames as useClassNames17 } from "@marigold/system";
|
|
1317
|
-
import { jsx as
|
|
1346
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1318
1347
|
var _Divider = ({ variant, ...props }) => {
|
|
1319
1348
|
const classNames2 = useClassNames17({ component: "Divider", variant });
|
|
1320
|
-
return /* @__PURE__ */
|
|
1349
|
+
return /* @__PURE__ */ jsx35(Separator, { className: classNames2, ...props });
|
|
1321
1350
|
};
|
|
1322
1351
|
|
|
1323
1352
|
// src/Footer/Footer.tsx
|
|
1324
1353
|
import { useClassNames as useClassNames18 } from "@marigold/system";
|
|
1325
|
-
import { jsx as
|
|
1354
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1326
1355
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1327
1356
|
const classNames2 = useClassNames18({ component: "Footer", variant, size });
|
|
1328
|
-
return /* @__PURE__ */
|
|
1357
|
+
return /* @__PURE__ */ jsx36("footer", { ...props, className: classNames2, children });
|
|
1329
1358
|
};
|
|
1330
1359
|
|
|
1331
1360
|
// src/Form/Form.tsx
|
|
@@ -1334,14 +1363,14 @@ import { Form } from "react-aria-components";
|
|
|
1334
1363
|
// src/Header/Header.tsx
|
|
1335
1364
|
import { Header } from "react-aria-components";
|
|
1336
1365
|
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1337
|
-
import { jsx as
|
|
1366
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1338
1367
|
var _Header = ({ variant, size, ...props }) => {
|
|
1339
1368
|
const classNames2 = useClassNames19({
|
|
1340
1369
|
component: "Header",
|
|
1341
1370
|
variant,
|
|
1342
1371
|
size
|
|
1343
1372
|
});
|
|
1344
|
-
return /* @__PURE__ */
|
|
1373
|
+
return /* @__PURE__ */ jsx37(Header, { className: classNames2, ...props, children: props.children });
|
|
1345
1374
|
};
|
|
1346
1375
|
|
|
1347
1376
|
// src/Image/Image.tsx
|
|
@@ -1351,7 +1380,7 @@ import {
|
|
|
1351
1380
|
objectPosition,
|
|
1352
1381
|
useClassNames as useClassNames20
|
|
1353
1382
|
} from "@marigold/system";
|
|
1354
|
-
import { jsx as
|
|
1383
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1355
1384
|
var Image = ({
|
|
1356
1385
|
variant,
|
|
1357
1386
|
size,
|
|
@@ -1360,7 +1389,7 @@ var Image = ({
|
|
|
1360
1389
|
...props
|
|
1361
1390
|
}) => {
|
|
1362
1391
|
const classNames2 = useClassNames20({ component: "Image", variant, size });
|
|
1363
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ jsx38(
|
|
1364
1393
|
"img",
|
|
1365
1394
|
{
|
|
1366
1395
|
...props,
|
|
@@ -1381,7 +1410,7 @@ import {
|
|
|
1381
1410
|
cn as cn23,
|
|
1382
1411
|
gapSpace as gapSpace5
|
|
1383
1412
|
} from "@marigold/system";
|
|
1384
|
-
import { jsx as
|
|
1413
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1385
1414
|
var Inline = ({
|
|
1386
1415
|
space = 0,
|
|
1387
1416
|
orientation,
|
|
@@ -1391,7 +1420,7 @@ var Inline = ({
|
|
|
1391
1420
|
...props
|
|
1392
1421
|
}) => {
|
|
1393
1422
|
var _a2, _b2, _c, _d;
|
|
1394
|
-
return /* @__PURE__ */
|
|
1423
|
+
return /* @__PURE__ */ jsx39(
|
|
1395
1424
|
"div",
|
|
1396
1425
|
{
|
|
1397
1426
|
...props,
|
|
@@ -1417,9 +1446,9 @@ import { useClassNames as useClassNames21 } from "@marigold/system";
|
|
|
1417
1446
|
// src/DateField/DateSegment.tsx
|
|
1418
1447
|
import { DateSegment } from "react-aria-components";
|
|
1419
1448
|
import { cn as cn24 } from "@marigold/system";
|
|
1420
|
-
import { Fragment as Fragment5, jsx as
|
|
1449
|
+
import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1421
1450
|
var _DateSegment = ({ segment, ...props }) => {
|
|
1422
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ jsx40(
|
|
1423
1452
|
DateSegment,
|
|
1424
1453
|
{
|
|
1425
1454
|
...props,
|
|
@@ -1428,7 +1457,7 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1428
1457
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
1429
1458
|
},
|
|
1430
1459
|
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1431
|
-
/* @__PURE__ */
|
|
1460
|
+
/* @__PURE__ */ jsx40(
|
|
1432
1461
|
"span",
|
|
1433
1462
|
{
|
|
1434
1463
|
"aria-hidden": "true",
|
|
@@ -1439,19 +1468,19 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1439
1468
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1440
1469
|
}
|
|
1441
1470
|
),
|
|
1442
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ jsx40("span", { children: isPlaceholder ? "" : (segment.type === "month" || segment.type === "day") && Number(segment.text) < 10 ? "0" + segment.text : text })
|
|
1443
1472
|
] })
|
|
1444
1473
|
}
|
|
1445
1474
|
);
|
|
1446
1475
|
};
|
|
1447
1476
|
|
|
1448
1477
|
// src/DateField/DateInput.tsx
|
|
1449
|
-
import { jsx as
|
|
1478
|
+
import { jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1450
1479
|
var _DateInput = ({ variant, size, action, ...props }) => {
|
|
1451
1480
|
const classNames2 = useClassNames21({ component: "DateField", variant, size });
|
|
1452
1481
|
return /* @__PURE__ */ jsxs14(Group, { className: classNames2.field, children: [
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
-
action ? action : /* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ jsx41(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx41(_DateSegment, { className: classNames2.segment, segment }) }),
|
|
1483
|
+
action ? action : /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx41(
|
|
1455
1484
|
"svg",
|
|
1456
1485
|
{
|
|
1457
1486
|
"data-testid": "action",
|
|
@@ -1459,14 +1488,14 @@ var _DateInput = ({ variant, size, action, ...props }) => {
|
|
|
1459
1488
|
viewBox: "0 0 24 24",
|
|
1460
1489
|
width: 24,
|
|
1461
1490
|
height: 24,
|
|
1462
|
-
children: /* @__PURE__ */
|
|
1491
|
+
children: /* @__PURE__ */ jsx41("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" })
|
|
1463
1492
|
}
|
|
1464
1493
|
) })
|
|
1465
1494
|
] });
|
|
1466
1495
|
};
|
|
1467
1496
|
|
|
1468
1497
|
// src/DateField/DateField.tsx
|
|
1469
|
-
import { jsx as
|
|
1498
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1470
1499
|
var _DateField = forwardRef12(
|
|
1471
1500
|
({
|
|
1472
1501
|
variant,
|
|
@@ -1485,7 +1514,7 @@ var _DateField = forwardRef12(
|
|
|
1485
1514
|
isRequired: required,
|
|
1486
1515
|
...rest
|
|
1487
1516
|
};
|
|
1488
|
-
return /* @__PURE__ */
|
|
1517
|
+
return /* @__PURE__ */ jsx42(
|
|
1489
1518
|
FieldBase,
|
|
1490
1519
|
{
|
|
1491
1520
|
as: DateField,
|
|
@@ -1493,7 +1522,7 @@ var _DateField = forwardRef12(
|
|
|
1493
1522
|
size,
|
|
1494
1523
|
ref,
|
|
1495
1524
|
...props,
|
|
1496
|
-
children: /* @__PURE__ */
|
|
1525
|
+
children: /* @__PURE__ */ jsx42(_DateInput, { action })
|
|
1497
1526
|
}
|
|
1498
1527
|
);
|
|
1499
1528
|
}
|
|
@@ -1514,14 +1543,14 @@ import { cn as cn25, useClassNames as useClassNames23 } from "@marigold/system";
|
|
|
1514
1543
|
|
|
1515
1544
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1516
1545
|
import { startOfWeek, today } from "@internationalized/date";
|
|
1517
|
-
import { useContext as
|
|
1546
|
+
import { useContext as useContext5, useMemo } from "react";
|
|
1518
1547
|
import { CalendarStateContext } from "react-aria-components";
|
|
1519
1548
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1520
1549
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1521
1550
|
import { useClassNames as useClassNames22 } from "@marigold/system";
|
|
1522
|
-
import { jsx as
|
|
1551
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1523
1552
|
function CalendarGridHeader(props) {
|
|
1524
|
-
const state =
|
|
1553
|
+
const state = useContext5(CalendarStateContext);
|
|
1525
1554
|
const { headerProps } = useCalendarGrid(props, state);
|
|
1526
1555
|
const { locale } = useLocale();
|
|
1527
1556
|
const dayFormatter = useDateFormatter({
|
|
@@ -1537,16 +1566,16 @@ function CalendarGridHeader(props) {
|
|
|
1537
1566
|
});
|
|
1538
1567
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1539
1568
|
const classNames2 = useClassNames22({ component: "Calendar" });
|
|
1540
|
-
return /* @__PURE__ */
|
|
1569
|
+
return /* @__PURE__ */ jsx43("thead", { ...headerProps, children: /* @__PURE__ */ jsx43("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx43("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
|
|
1541
1570
|
}
|
|
1542
1571
|
|
|
1543
1572
|
// src/Calendar/CalendarGrid.tsx
|
|
1544
|
-
import { jsx as
|
|
1573
|
+
import { jsx as jsx44, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1545
1574
|
var _CalendarGrid = () => {
|
|
1546
1575
|
const classNames2 = useClassNames23({ component: "Calendar" });
|
|
1547
1576
|
return /* @__PURE__ */ jsxs15(CalendarGrid, { className: classNames2.calendarGrid, children: [
|
|
1548
|
-
/* @__PURE__ */
|
|
1549
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ jsx44(CalendarGridHeader, {}),
|
|
1578
|
+
/* @__PURE__ */ jsx44(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx44(
|
|
1550
1579
|
CalendarCell,
|
|
1551
1580
|
{
|
|
1552
1581
|
date,
|
|
@@ -1560,7 +1589,7 @@ var _CalendarGrid = () => {
|
|
|
1560
1589
|
};
|
|
1561
1590
|
|
|
1562
1591
|
// src/Calendar/CalendarListBox.tsx
|
|
1563
|
-
import { useContext as
|
|
1592
|
+
import { useContext as useContext6 } from "react";
|
|
1564
1593
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1565
1594
|
import { ChevronDown as ChevronDown2 } from "@marigold/icons";
|
|
1566
1595
|
import { cn as cn26, useClassNames as useClassNames24 } from "@marigold/system";
|
|
@@ -1582,13 +1611,13 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
1582
1611
|
}
|
|
1583
1612
|
|
|
1584
1613
|
// src/Calendar/CalendarListBox.tsx
|
|
1585
|
-
import { jsx as
|
|
1614
|
+
import { jsx as jsx45, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1586
1615
|
function CalendarListBox({
|
|
1587
1616
|
type,
|
|
1588
1617
|
isDisabled,
|
|
1589
1618
|
setSelectedDropdown
|
|
1590
1619
|
}) {
|
|
1591
|
-
const state =
|
|
1620
|
+
const state = useContext6(CalendarStateContext2);
|
|
1592
1621
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1593
1622
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1594
1623
|
const { select: selectClassNames } = useClassNames24({ component: "Select" });
|
|
@@ -1601,7 +1630,7 @@ function CalendarListBox({
|
|
|
1601
1630
|
"data-testid": type,
|
|
1602
1631
|
children: [
|
|
1603
1632
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
1604
|
-
/* @__PURE__ */
|
|
1633
|
+
/* @__PURE__ */ jsx45(ChevronDown2, {})
|
|
1605
1634
|
]
|
|
1606
1635
|
}
|
|
1607
1636
|
);
|
|
@@ -1611,7 +1640,7 @@ function CalendarListBox({
|
|
|
1611
1640
|
import { Button as Button2 } from "react-aria-components";
|
|
1612
1641
|
import { ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1613
1642
|
import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
|
|
1614
|
-
import { jsx as
|
|
1643
|
+
import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1615
1644
|
function MonthControls() {
|
|
1616
1645
|
const classNames2 = useClassNames25({ component: "Calendar" });
|
|
1617
1646
|
const buttonClassNames = useClassNames25({ component: "Button" });
|
|
@@ -1623,7 +1652,7 @@ function MonthControls() {
|
|
|
1623
1652
|
classNames2.calendarControllers
|
|
1624
1653
|
),
|
|
1625
1654
|
children: [
|
|
1626
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__PURE__ */ jsx46(
|
|
1627
1656
|
Button2,
|
|
1628
1657
|
{
|
|
1629
1658
|
className: cn27(
|
|
@@ -1631,10 +1660,10 @@ function MonthControls() {
|
|
|
1631
1660
|
buttonClassNames
|
|
1632
1661
|
),
|
|
1633
1662
|
slot: "previous",
|
|
1634
|
-
children: /* @__PURE__ */
|
|
1663
|
+
children: /* @__PURE__ */ jsx46(ChevronLeft, {})
|
|
1635
1664
|
}
|
|
1636
1665
|
),
|
|
1637
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsx46(
|
|
1638
1667
|
Button2,
|
|
1639
1668
|
{
|
|
1640
1669
|
className: cn27(
|
|
@@ -1642,7 +1671,7 @@ function MonthControls() {
|
|
|
1642
1671
|
buttonClassNames
|
|
1643
1672
|
),
|
|
1644
1673
|
slot: "next",
|
|
1645
|
-
children: /* @__PURE__ */
|
|
1674
|
+
children: /* @__PURE__ */ jsx46(ChevronRight, {})
|
|
1646
1675
|
}
|
|
1647
1676
|
)
|
|
1648
1677
|
]
|
|
@@ -1652,24 +1681,24 @@ function MonthControls() {
|
|
|
1652
1681
|
var MonthControls_default = MonthControls;
|
|
1653
1682
|
|
|
1654
1683
|
// src/Calendar/MonthListBox.tsx
|
|
1655
|
-
import { useContext as
|
|
1684
|
+
import { useContext as useContext7 } from "react";
|
|
1656
1685
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
1657
|
-
import { jsx as
|
|
1686
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1658
1687
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1659
|
-
const state =
|
|
1688
|
+
const state = useContext7(CalendarStateContext3);
|
|
1660
1689
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1661
1690
|
let onChange = (index) => {
|
|
1662
1691
|
let value = Number(index) + 1;
|
|
1663
1692
|
let date = state.focusedDate.set({ month: value });
|
|
1664
1693
|
state.setFocusedDate(date);
|
|
1665
1694
|
};
|
|
1666
|
-
return /* @__PURE__ */
|
|
1695
|
+
return /* @__PURE__ */ jsx47(
|
|
1667
1696
|
"ul",
|
|
1668
1697
|
{
|
|
1669
1698
|
"data-testid": "monthOptions",
|
|
1670
1699
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1671
1700
|
children: months.map((month, index) => {
|
|
1672
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsx47("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx47(
|
|
1673
1702
|
_Button,
|
|
1674
1703
|
{
|
|
1675
1704
|
slot: "previous",
|
|
@@ -1691,15 +1720,15 @@ var MonthListBox_default = MonthListBox;
|
|
|
1691
1720
|
|
|
1692
1721
|
// src/Calendar/YearListBox.tsx
|
|
1693
1722
|
import {
|
|
1694
|
-
useContext as
|
|
1723
|
+
useContext as useContext8,
|
|
1695
1724
|
useEffect as useEffect2,
|
|
1696
1725
|
useRef as useRef3
|
|
1697
1726
|
} from "react";
|
|
1698
1727
|
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
1699
1728
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
1700
|
-
import { jsx as
|
|
1729
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1701
1730
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1702
|
-
const state =
|
|
1731
|
+
const state = useContext8(CalendarStateContext4);
|
|
1703
1732
|
const years = [];
|
|
1704
1733
|
let formatter = useDateFormatter3({
|
|
1705
1734
|
year: "numeric",
|
|
@@ -1727,19 +1756,19 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1727
1756
|
let date = years[index].value;
|
|
1728
1757
|
state.setFocusedDate(date);
|
|
1729
1758
|
};
|
|
1730
|
-
return /* @__PURE__ */
|
|
1759
|
+
return /* @__PURE__ */ jsx48(
|
|
1731
1760
|
"ul",
|
|
1732
1761
|
{
|
|
1733
1762
|
"data-testid": "yearOptions",
|
|
1734
1763
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1735
1764
|
children: years.map((year, index) => {
|
|
1736
1765
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
1737
|
-
return /* @__PURE__ */
|
|
1766
|
+
return /* @__PURE__ */ jsx48("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx48(
|
|
1738
1767
|
"div",
|
|
1739
1768
|
{
|
|
1740
1769
|
ref: isActive ? activeButtonRef : null,
|
|
1741
1770
|
style: { height: "100%", width: "100%" },
|
|
1742
|
-
children: /* @__PURE__ */
|
|
1771
|
+
children: /* @__PURE__ */ jsx48(
|
|
1743
1772
|
_Button,
|
|
1744
1773
|
{
|
|
1745
1774
|
slot: "previous",
|
|
@@ -1764,7 +1793,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1764
1793
|
var YearListBox_default = YearListBox;
|
|
1765
1794
|
|
|
1766
1795
|
// src/Calendar/Calendar.tsx
|
|
1767
|
-
import { Fragment as Fragment6, jsx as
|
|
1796
|
+
import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1768
1797
|
var _Calendar = ({
|
|
1769
1798
|
disabled,
|
|
1770
1799
|
readOnly,
|
|
@@ -1780,10 +1809,10 @@ var _Calendar = ({
|
|
|
1780
1809
|
const classNames2 = useClassNames26({ component: "Calendar" });
|
|
1781
1810
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1782
1811
|
const ViewMap = {
|
|
1783
|
-
month: /* @__PURE__ */
|
|
1784
|
-
year: /* @__PURE__ */
|
|
1812
|
+
month: /* @__PURE__ */ jsx49(MonthListBox_default, { setSelectedDropdown }),
|
|
1813
|
+
year: /* @__PURE__ */ jsx49(YearListBox_default, { setSelectedDropdown })
|
|
1785
1814
|
};
|
|
1786
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ jsx49(
|
|
1787
1816
|
Calendar,
|
|
1788
1817
|
{
|
|
1789
1818
|
className: cn28(
|
|
@@ -1794,7 +1823,7 @@ var _Calendar = ({
|
|
|
1794
1823
|
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
1795
1824
|
/* @__PURE__ */ jsxs18("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
1796
1825
|
/* @__PURE__ */ jsxs18("div", { className: "flex w-full gap-4", children: [
|
|
1797
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ jsx49(
|
|
1798
1827
|
CalendarListBox,
|
|
1799
1828
|
{
|
|
1800
1829
|
type: "month",
|
|
@@ -1802,7 +1831,7 @@ var _Calendar = ({
|
|
|
1802
1831
|
setSelectedDropdown
|
|
1803
1832
|
}
|
|
1804
1833
|
),
|
|
1805
|
-
/* @__PURE__ */
|
|
1834
|
+
/* @__PURE__ */ jsx49(
|
|
1806
1835
|
CalendarListBox,
|
|
1807
1836
|
{
|
|
1808
1837
|
type: "year",
|
|
@@ -1811,9 +1840,9 @@ var _Calendar = ({
|
|
|
1811
1840
|
}
|
|
1812
1841
|
)
|
|
1813
1842
|
] }),
|
|
1814
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ jsx49(MonthControls_default, {})
|
|
1815
1844
|
] }),
|
|
1816
|
-
/* @__PURE__ */
|
|
1845
|
+
/* @__PURE__ */ jsx49(_CalendarGrid, {})
|
|
1817
1846
|
] })
|
|
1818
1847
|
}
|
|
1819
1848
|
);
|
|
@@ -1822,7 +1851,7 @@ var _Calendar = ({
|
|
|
1822
1851
|
// src/DatePicker/DatePicker.tsx
|
|
1823
1852
|
import { DatePicker } from "react-aria-components";
|
|
1824
1853
|
import { useClassNames as useClassNames27 } from "@marigold/system";
|
|
1825
|
-
import { jsx as
|
|
1854
|
+
import { jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1826
1855
|
var _DatePicker = ({
|
|
1827
1856
|
disabled,
|
|
1828
1857
|
required,
|
|
@@ -1847,16 +1876,16 @@ var _DatePicker = ({
|
|
|
1847
1876
|
variant
|
|
1848
1877
|
});
|
|
1849
1878
|
return /* @__PURE__ */ jsxs19(FieldBase, { as: DatePicker, variant, size, ...props, children: [
|
|
1850
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ jsx50(
|
|
1851
1880
|
_DateInput,
|
|
1852
1881
|
{
|
|
1853
|
-
action: /* @__PURE__ */
|
|
1882
|
+
action: /* @__PURE__ */ jsx50("div", { className: classNames2.container, children: /* @__PURE__ */ jsx50(
|
|
1854
1883
|
_Button,
|
|
1855
1884
|
{
|
|
1856
1885
|
size: "small",
|
|
1857
1886
|
disabled,
|
|
1858
1887
|
className: classNames2.button,
|
|
1859
|
-
children: /* @__PURE__ */
|
|
1888
|
+
children: /* @__PURE__ */ jsx50(
|
|
1860
1889
|
"svg",
|
|
1861
1890
|
{
|
|
1862
1891
|
"data-testid": "action",
|
|
@@ -1864,14 +1893,14 @@ var _DatePicker = ({
|
|
|
1864
1893
|
width: 24,
|
|
1865
1894
|
height: 24,
|
|
1866
1895
|
fill: "currentColor",
|
|
1867
|
-
children: /* @__PURE__ */
|
|
1896
|
+
children: /* @__PURE__ */ jsx50("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" })
|
|
1868
1897
|
}
|
|
1869
1898
|
)
|
|
1870
1899
|
}
|
|
1871
1900
|
) })
|
|
1872
1901
|
}
|
|
1873
1902
|
),
|
|
1874
|
-
/* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ jsx50(_Popover, { children: /* @__PURE__ */ jsx50(_Calendar, { disabled }) })
|
|
1875
1904
|
] });
|
|
1876
1905
|
};
|
|
1877
1906
|
|
|
@@ -1882,8 +1911,8 @@ import {
|
|
|
1882
1911
|
paddingSpaceX as paddingSpaceX2,
|
|
1883
1912
|
paddingSpaceY as paddingSpaceY2
|
|
1884
1913
|
} from "@marigold/system";
|
|
1885
|
-
import { jsx as
|
|
1886
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
1914
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1915
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx51(
|
|
1887
1916
|
"div",
|
|
1888
1917
|
{
|
|
1889
1918
|
className: cn29(
|
|
@@ -1899,7 +1928,7 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx50(
|
|
|
1899
1928
|
import { forwardRef as forwardRef13 } from "react";
|
|
1900
1929
|
import { Link } from "react-aria-components";
|
|
1901
1930
|
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
1902
|
-
import { jsx as
|
|
1931
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1903
1932
|
var _Link = forwardRef13(
|
|
1904
1933
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
1905
1934
|
const classNames2 = useClassNames28({
|
|
@@ -1907,7 +1936,7 @@ var _Link = forwardRef13(
|
|
|
1907
1936
|
variant,
|
|
1908
1937
|
size
|
|
1909
1938
|
});
|
|
1910
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ jsx52(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
1911
1940
|
}
|
|
1912
1941
|
);
|
|
1913
1942
|
|
|
@@ -1915,19 +1944,19 @@ var _Link = forwardRef13(
|
|
|
1915
1944
|
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
1916
1945
|
|
|
1917
1946
|
// src/List/Context.ts
|
|
1918
|
-
import { createContext as
|
|
1919
|
-
var ListContext =
|
|
1920
|
-
var useListContext = () =>
|
|
1947
|
+
import { createContext as createContext4, useContext as useContext9 } from "react";
|
|
1948
|
+
var ListContext = createContext4({});
|
|
1949
|
+
var useListContext = () => useContext9(ListContext);
|
|
1921
1950
|
|
|
1922
1951
|
// src/List/ListItem.tsx
|
|
1923
|
-
import { jsx as
|
|
1952
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
1924
1953
|
var ListItem = ({ children, ...props }) => {
|
|
1925
1954
|
const { classNames: classNames2 } = useListContext();
|
|
1926
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ jsx53("li", { ...props, className: classNames2, children });
|
|
1927
1956
|
};
|
|
1928
1957
|
|
|
1929
1958
|
// src/List/List.tsx
|
|
1930
|
-
import { jsx as
|
|
1959
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
1931
1960
|
var List = ({
|
|
1932
1961
|
as = "ul",
|
|
1933
1962
|
children,
|
|
@@ -1937,7 +1966,7 @@ var List = ({
|
|
|
1937
1966
|
}) => {
|
|
1938
1967
|
const Component = as;
|
|
1939
1968
|
const classNames2 = useClassNames29({ component: "List", variant, size });
|
|
1940
|
-
return /* @__PURE__ */
|
|
1969
|
+
return /* @__PURE__ */ jsx54(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx54(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
1941
1970
|
};
|
|
1942
1971
|
List.Item = ListItem;
|
|
1943
1972
|
|
|
@@ -1948,26 +1977,26 @@ import { useClassNames as useClassNames32 } from "@marigold/system";
|
|
|
1948
1977
|
// src/Menu/MenuItem.tsx
|
|
1949
1978
|
import { MenuItem } from "react-aria-components";
|
|
1950
1979
|
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
1951
|
-
import { jsx as
|
|
1980
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
1952
1981
|
var _MenuItem = ({ children, ...props }) => {
|
|
1953
1982
|
const classNames2 = useClassNames30({ component: "Menu" });
|
|
1954
|
-
return /* @__PURE__ */
|
|
1983
|
+
return /* @__PURE__ */ jsx55(MenuItem, { ...props, className: classNames2.item, children });
|
|
1955
1984
|
};
|
|
1956
1985
|
|
|
1957
1986
|
// src/Menu/MenuSection.tsx
|
|
1958
1987
|
import { Section as Section2 } from "react-aria-components";
|
|
1959
1988
|
import { useClassNames as useClassNames31 } from "@marigold/system";
|
|
1960
|
-
import { jsx as
|
|
1989
|
+
import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1961
1990
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
1962
1991
|
const className = useClassNames31({ component: "Menu" });
|
|
1963
1992
|
return /* @__PURE__ */ jsxs20(Section2, { ...props, children: [
|
|
1964
|
-
/* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ jsx56(_Header, { className: className.section, children: title }),
|
|
1965
1994
|
children
|
|
1966
1995
|
] });
|
|
1967
1996
|
};
|
|
1968
1997
|
|
|
1969
1998
|
// src/Menu/Menu.tsx
|
|
1970
|
-
import { jsx as
|
|
1999
|
+
import { jsx as jsx57, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1971
2000
|
var _Menu = ({
|
|
1972
2001
|
children,
|
|
1973
2002
|
label,
|
|
@@ -1979,8 +2008,8 @@ var _Menu = ({
|
|
|
1979
2008
|
}) => {
|
|
1980
2009
|
const classNames2 = useClassNames32({ component: "Menu", variant, size });
|
|
1981
2010
|
return /* @__PURE__ */ jsxs21(MenuTrigger, { ...props, children: [
|
|
1982
|
-
/* @__PURE__ */
|
|
1983
|
-
/* @__PURE__ */
|
|
2011
|
+
/* @__PURE__ */ jsx57(_Button, { variant: "menu", disabled, children: label }),
|
|
2012
|
+
/* @__PURE__ */ jsx57(_Popover, { open, children: /* @__PURE__ */ jsx57(Menu, { ...props, className: classNames2.container, children }) })
|
|
1984
2013
|
] });
|
|
1985
2014
|
};
|
|
1986
2015
|
_Menu.Item = _MenuItem;
|
|
@@ -1989,26 +2018,31 @@ _Menu.Section = _MenuSection;
|
|
|
1989
2018
|
// src/Menu/ActionMenu.tsx
|
|
1990
2019
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
1991
2020
|
import { SVG as SVG4, useClassNames as useClassNames33 } from "@marigold/system";
|
|
1992
|
-
import { jsx as
|
|
1993
|
-
var ActionMenu = ({
|
|
2021
|
+
import { jsx as jsx58, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2022
|
+
var ActionMenu = ({
|
|
2023
|
+
variant,
|
|
2024
|
+
size,
|
|
2025
|
+
disabled,
|
|
2026
|
+
...props
|
|
2027
|
+
}) => {
|
|
1994
2028
|
const classNames2 = useClassNames33({ component: "Menu", variant, size });
|
|
1995
2029
|
return /* @__PURE__ */ jsxs22(MenuTrigger2, { children: [
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
2030
|
+
/* @__PURE__ */ jsx58(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx58(SVG4, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx58("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" }) }) }),
|
|
2031
|
+
/* @__PURE__ */ jsx58(_Popover, { children: /* @__PURE__ */ jsx58(Menu2, { ...props, className: classNames2.container, children: props.children }) })
|
|
1998
2032
|
] });
|
|
1999
2033
|
};
|
|
2000
2034
|
|
|
2001
2035
|
// src/Message/Message.tsx
|
|
2002
2036
|
import { cn as cn30, useClassNames as useClassNames34 } from "@marigold/system";
|
|
2003
|
-
import { jsx as
|
|
2037
|
+
import { jsx as jsx59, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2004
2038
|
var icons = {
|
|
2005
|
-
success: () => /* @__PURE__ */
|
|
2039
|
+
success: () => /* @__PURE__ */ jsx59(
|
|
2006
2040
|
"svg",
|
|
2007
2041
|
{
|
|
2008
2042
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2009
2043
|
viewBox: "0 0 24 24",
|
|
2010
2044
|
fill: "currentColor",
|
|
2011
|
-
children: /* @__PURE__ */
|
|
2045
|
+
children: /* @__PURE__ */ jsx59(
|
|
2012
2046
|
"path",
|
|
2013
2047
|
{
|
|
2014
2048
|
fillRule: "evenodd",
|
|
@@ -2018,13 +2052,13 @@ var icons = {
|
|
|
2018
2052
|
)
|
|
2019
2053
|
}
|
|
2020
2054
|
),
|
|
2021
|
-
info: () => /* @__PURE__ */
|
|
2055
|
+
info: () => /* @__PURE__ */ jsx59(
|
|
2022
2056
|
"svg",
|
|
2023
2057
|
{
|
|
2024
2058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2025
2059
|
viewBox: "0 0 24 24",
|
|
2026
2060
|
fill: "currentColor",
|
|
2027
|
-
children: /* @__PURE__ */
|
|
2061
|
+
children: /* @__PURE__ */ jsx59(
|
|
2028
2062
|
"path",
|
|
2029
2063
|
{
|
|
2030
2064
|
fillRule: "evenodd",
|
|
@@ -2034,13 +2068,13 @@ var icons = {
|
|
|
2034
2068
|
)
|
|
2035
2069
|
}
|
|
2036
2070
|
),
|
|
2037
|
-
warning: () => /* @__PURE__ */
|
|
2071
|
+
warning: () => /* @__PURE__ */ jsx59(
|
|
2038
2072
|
"svg",
|
|
2039
2073
|
{
|
|
2040
2074
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2041
2075
|
viewBox: "0 0 24 24",
|
|
2042
2076
|
fill: "currentColor",
|
|
2043
|
-
children: /* @__PURE__ */
|
|
2077
|
+
children: /* @__PURE__ */ jsx59(
|
|
2044
2078
|
"path",
|
|
2045
2079
|
{
|
|
2046
2080
|
fillRule: "evenodd",
|
|
@@ -2050,13 +2084,13 @@ var icons = {
|
|
|
2050
2084
|
)
|
|
2051
2085
|
}
|
|
2052
2086
|
),
|
|
2053
|
-
error: () => /* @__PURE__ */
|
|
2087
|
+
error: () => /* @__PURE__ */ jsx59(
|
|
2054
2088
|
"svg",
|
|
2055
2089
|
{
|
|
2056
2090
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2057
2091
|
viewBox: "0 0 24 24",
|
|
2058
2092
|
fill: "currentColor",
|
|
2059
|
-
children: /* @__PURE__ */
|
|
2093
|
+
children: /* @__PURE__ */ jsx59(
|
|
2060
2094
|
"path",
|
|
2061
2095
|
{
|
|
2062
2096
|
fillRule: "evenodd",
|
|
@@ -2075,7 +2109,7 @@ var Message = ({
|
|
|
2075
2109
|
...props
|
|
2076
2110
|
}) => {
|
|
2077
2111
|
const classNames2 = useClassNames34({ component: "Message", variant, size });
|
|
2078
|
-
const
|
|
2112
|
+
const Icon4 = icons[variant];
|
|
2079
2113
|
return /* @__PURE__ */ jsxs23(
|
|
2080
2114
|
"div",
|
|
2081
2115
|
{
|
|
@@ -2085,15 +2119,15 @@ var Message = ({
|
|
|
2085
2119
|
),
|
|
2086
2120
|
...props,
|
|
2087
2121
|
children: [
|
|
2088
|
-
/* @__PURE__ */
|
|
2089
|
-
/* @__PURE__ */
|
|
2122
|
+
/* @__PURE__ */ jsx59("div", { className: cn30("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx59(Icon4, {}) }),
|
|
2123
|
+
/* @__PURE__ */ jsx59(
|
|
2090
2124
|
"div",
|
|
2091
2125
|
{
|
|
2092
2126
|
className: cn30("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2093
2127
|
children: messageTitle
|
|
2094
2128
|
}
|
|
2095
2129
|
),
|
|
2096
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsx59("div", { className: cn30("col-start-2", classNames2.content), children })
|
|
2097
2131
|
]
|
|
2098
2132
|
}
|
|
2099
2133
|
);
|
|
@@ -2107,8 +2141,8 @@ import { cn as cn32, useClassNames as useClassNames35 } from "@marigold/system";
|
|
|
2107
2141
|
// src/NumberField/StepButton.tsx
|
|
2108
2142
|
import { Button as Button3 } from "react-aria-components";
|
|
2109
2143
|
import { cn as cn31 } from "@marigold/system";
|
|
2110
|
-
import { jsx as
|
|
2111
|
-
var Plus = () => /* @__PURE__ */
|
|
2144
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2145
|
+
var Plus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx60(
|
|
2112
2146
|
"path",
|
|
2113
2147
|
{
|
|
2114
2148
|
fillRule: "evenodd",
|
|
@@ -2116,7 +2150,7 @@ var Plus = () => /* @__PURE__ */ jsx59("svg", { width: 16, height: 16, viewBox:
|
|
|
2116
2150
|
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"
|
|
2117
2151
|
}
|
|
2118
2152
|
) });
|
|
2119
|
-
var Minus = () => /* @__PURE__ */
|
|
2153
|
+
var Minus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx60(
|
|
2120
2154
|
"path",
|
|
2121
2155
|
{
|
|
2122
2156
|
fillRule: "evenodd",
|
|
@@ -2125,8 +2159,8 @@ var Minus = () => /* @__PURE__ */ jsx59("svg", { width: 16, height: 16, viewBox:
|
|
|
2125
2159
|
}
|
|
2126
2160
|
) });
|
|
2127
2161
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2128
|
-
const
|
|
2129
|
-
return /* @__PURE__ */
|
|
2162
|
+
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2163
|
+
return /* @__PURE__ */ jsx60(
|
|
2130
2164
|
Button3,
|
|
2131
2165
|
{
|
|
2132
2166
|
className: cn31(
|
|
@@ -2137,13 +2171,13 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2137
2171
|
className
|
|
2138
2172
|
),
|
|
2139
2173
|
...props,
|
|
2140
|
-
children: /* @__PURE__ */
|
|
2174
|
+
children: /* @__PURE__ */ jsx60(Icon4, {})
|
|
2141
2175
|
}
|
|
2142
2176
|
);
|
|
2143
2177
|
};
|
|
2144
2178
|
|
|
2145
2179
|
// src/NumberField/NumberField.tsx
|
|
2146
|
-
import { jsx as
|
|
2180
|
+
import { jsx as jsx61, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2147
2181
|
var _NumberField = forwardRef14(
|
|
2148
2182
|
({
|
|
2149
2183
|
variant,
|
|
@@ -2168,8 +2202,8 @@ var _NumberField = forwardRef14(
|
|
|
2168
2202
|
...rest
|
|
2169
2203
|
};
|
|
2170
2204
|
const showStepper = !hideStepper;
|
|
2171
|
-
return /* @__PURE__ */
|
|
2172
|
-
showStepper && /* @__PURE__ */
|
|
2205
|
+
return /* @__PURE__ */ jsx61(FieldBase, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs24(Group2, { className: cn32("flex items-stretch", classNames2.group), children: [
|
|
2206
|
+
showStepper && /* @__PURE__ */ jsx61(
|
|
2173
2207
|
_StepButton,
|
|
2174
2208
|
{
|
|
2175
2209
|
className: classNames2.stepper,
|
|
@@ -2177,7 +2211,7 @@ var _NumberField = forwardRef14(
|
|
|
2177
2211
|
slot: "decrement"
|
|
2178
2212
|
}
|
|
2179
2213
|
),
|
|
2180
|
-
/* @__PURE__ */
|
|
2214
|
+
/* @__PURE__ */ jsx61("div", { className: "flex-1", children: /* @__PURE__ */ jsx61(
|
|
2181
2215
|
_Input,
|
|
2182
2216
|
{
|
|
2183
2217
|
ref,
|
|
@@ -2186,7 +2220,7 @@ var _NumberField = forwardRef14(
|
|
|
2186
2220
|
className: classNames2.input
|
|
2187
2221
|
}
|
|
2188
2222
|
) }),
|
|
2189
|
-
showStepper && /* @__PURE__ */
|
|
2223
|
+
showStepper && /* @__PURE__ */ jsx61(
|
|
2190
2224
|
_StepButton,
|
|
2191
2225
|
{
|
|
2192
2226
|
className: classNames2.stepper,
|
|
@@ -2198,26 +2232,6 @@ var _NumberField = forwardRef14(
|
|
|
2198
2232
|
}
|
|
2199
2233
|
);
|
|
2200
2234
|
|
|
2201
|
-
// src/Provider/index.ts
|
|
2202
|
-
import { useTheme as useTheme5, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
2203
|
-
|
|
2204
|
-
// src/Provider/MarigoldProvider.tsx
|
|
2205
|
-
import { OverlayProvider } from "@react-aria/overlays";
|
|
2206
|
-
import {
|
|
2207
|
-
ThemeProvider,
|
|
2208
|
-
defaultTheme,
|
|
2209
|
-
useTheme as useTheme4
|
|
2210
|
-
} from "@marigold/system";
|
|
2211
|
-
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2212
|
-
function MarigoldProvider({
|
|
2213
|
-
children,
|
|
2214
|
-
theme
|
|
2215
|
-
}) {
|
|
2216
|
-
const outerTheme = useTheme4();
|
|
2217
|
-
const isTopLevel = outerTheme === defaultTheme;
|
|
2218
|
-
return /* @__PURE__ */ jsx61(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx61(OverlayProvider, { children }) : children });
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
2235
|
// src/Radio/Radio.tsx
|
|
2222
2236
|
import {
|
|
2223
2237
|
forwardRef as forwardRef15
|
|
@@ -2226,11 +2240,11 @@ import { Radio } from "react-aria-components";
|
|
|
2226
2240
|
import { cn as cn34, useClassNames as useClassNames37 } from "@marigold/system";
|
|
2227
2241
|
|
|
2228
2242
|
// src/Radio/Context.ts
|
|
2229
|
-
import { createContext as
|
|
2230
|
-
var RadioGroupContext =
|
|
2243
|
+
import { createContext as createContext5, useContext as useContext10 } from "react";
|
|
2244
|
+
var RadioGroupContext = createContext5(
|
|
2231
2245
|
null
|
|
2232
2246
|
);
|
|
2233
|
-
var useRadioGroupContext = () =>
|
|
2247
|
+
var useRadioGroupContext = () => useContext10(RadioGroupContext);
|
|
2234
2248
|
|
|
2235
2249
|
// src/Radio/RadioGroup.tsx
|
|
2236
2250
|
import { RadioGroup } from "react-aria-components";
|
|
@@ -2291,7 +2305,7 @@ var _RadioGroup = ({
|
|
|
2291
2305
|
// src/Radio/Radio.tsx
|
|
2292
2306
|
import { Fragment as Fragment7, jsx as jsx63, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2293
2307
|
var Dot = () => /* @__PURE__ */ jsx63("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx63("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2294
|
-
var
|
|
2308
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx63(
|
|
2295
2309
|
"div",
|
|
2296
2310
|
{
|
|
2297
2311
|
className: cn34(
|
|
@@ -2326,7 +2340,7 @@ var _Radio = forwardRef15(
|
|
|
2326
2340
|
...props,
|
|
2327
2341
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
2328
2342
|
/* @__PURE__ */ jsx63(
|
|
2329
|
-
|
|
2343
|
+
Icon3,
|
|
2330
2344
|
{
|
|
2331
2345
|
checked: isSelected,
|
|
2332
2346
|
className: cn34(
|
|
@@ -2424,6 +2438,24 @@ var _Select = forwardRef17(
|
|
|
2424
2438
|
_Select.Option = _ListBox.Item;
|
|
2425
2439
|
_Select.Section = _ListBox.Section;
|
|
2426
2440
|
|
|
2441
|
+
// src/Scrollable/Scrollable.tsx
|
|
2442
|
+
import { cn as cn36, createVar as createVar9, width as twWidth2 } from "@marigold/system";
|
|
2443
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2444
|
+
var Scrollable = ({
|
|
2445
|
+
children,
|
|
2446
|
+
width = "full",
|
|
2447
|
+
height,
|
|
2448
|
+
...props
|
|
2449
|
+
}) => /* @__PURE__ */ jsx66(
|
|
2450
|
+
"div",
|
|
2451
|
+
{
|
|
2452
|
+
...props,
|
|
2453
|
+
className: cn36(["sticky h-[--height] overflow-auto", twWidth2[width]]),
|
|
2454
|
+
style: createVar9({ height }),
|
|
2455
|
+
children
|
|
2456
|
+
}
|
|
2457
|
+
);
|
|
2458
|
+
|
|
2427
2459
|
// src/Slider/Slider.tsx
|
|
2428
2460
|
import { forwardRef as forwardRef18 } from "react";
|
|
2429
2461
|
import {
|
|
@@ -2433,11 +2465,11 @@ import {
|
|
|
2433
2465
|
SliderTrack
|
|
2434
2466
|
} from "react-aria-components";
|
|
2435
2467
|
import {
|
|
2436
|
-
cn as
|
|
2437
|
-
width as
|
|
2468
|
+
cn as cn37,
|
|
2469
|
+
width as twWidth3,
|
|
2438
2470
|
useClassNames as useClassNames39
|
|
2439
2471
|
} from "@marigold/system";
|
|
2440
|
-
import { jsx as
|
|
2472
|
+
import { jsx as jsx67, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2441
2473
|
var _Slider = forwardRef18(
|
|
2442
2474
|
({
|
|
2443
2475
|
thumbLabels,
|
|
@@ -2459,24 +2491,24 @@ var _Slider = forwardRef18(
|
|
|
2459
2491
|
return /* @__PURE__ */ jsxs27(
|
|
2460
2492
|
Slider,
|
|
2461
2493
|
{
|
|
2462
|
-
className:
|
|
2494
|
+
className: cn37(
|
|
2463
2495
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
2464
2496
|
classNames2.container,
|
|
2465
|
-
|
|
2497
|
+
twWidth3[width]
|
|
2466
2498
|
),
|
|
2467
2499
|
ref,
|
|
2468
2500
|
...props,
|
|
2469
2501
|
children: [
|
|
2470
|
-
/* @__PURE__ */
|
|
2471
|
-
/* @__PURE__ */
|
|
2472
|
-
/* @__PURE__ */
|
|
2502
|
+
/* @__PURE__ */ jsx67(_Label, { children: props.children }),
|
|
2503
|
+
/* @__PURE__ */ jsx67(SliderOutput, { className: cn37("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
2504
|
+
/* @__PURE__ */ jsx67(
|
|
2473
2505
|
SliderTrack,
|
|
2474
2506
|
{
|
|
2475
|
-
className:
|
|
2476
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */
|
|
2507
|
+
className: cn37("relative col-span-2 h-2 w-full", classNames2.track),
|
|
2508
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx67(
|
|
2477
2509
|
SliderThumb,
|
|
2478
2510
|
{
|
|
2479
|
-
className:
|
|
2511
|
+
className: cn37("top-1/2 cursor-pointer", classNames2.thumb),
|
|
2480
2512
|
index: i,
|
|
2481
2513
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
2482
2514
|
},
|
|
@@ -2491,16 +2523,16 @@ var _Slider = forwardRef18(
|
|
|
2491
2523
|
);
|
|
2492
2524
|
|
|
2493
2525
|
// src/Split/Split.tsx
|
|
2494
|
-
import { jsx as
|
|
2495
|
-
var Split = (props) => /* @__PURE__ */
|
|
2526
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2527
|
+
var Split = (props) => /* @__PURE__ */ jsx68("div", { ...props, role: "separator", className: "grow" });
|
|
2496
2528
|
|
|
2497
2529
|
// src/Stack/Stack.tsx
|
|
2498
2530
|
import {
|
|
2499
2531
|
alignment as alignment3,
|
|
2500
|
-
cn as
|
|
2532
|
+
cn as cn38,
|
|
2501
2533
|
gapSpace as gapSpace6
|
|
2502
2534
|
} from "@marigold/system";
|
|
2503
|
-
import { jsx as
|
|
2535
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2504
2536
|
var Stack = ({
|
|
2505
2537
|
children,
|
|
2506
2538
|
space = 0,
|
|
@@ -2511,10 +2543,10 @@ var Stack = ({
|
|
|
2511
2543
|
...props
|
|
2512
2544
|
}) => {
|
|
2513
2545
|
var _a, _b, _c, _d;
|
|
2514
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ jsx69(
|
|
2515
2547
|
"div",
|
|
2516
2548
|
{
|
|
2517
|
-
className:
|
|
2549
|
+
className: cn38(
|
|
2518
2550
|
"flex flex-col",
|
|
2519
2551
|
gapSpace6[space],
|
|
2520
2552
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2531,11 +2563,11 @@ var Stack = ({
|
|
|
2531
2563
|
import { forwardRef as forwardRef19 } from "react";
|
|
2532
2564
|
import { Switch } from "react-aria-components";
|
|
2533
2565
|
import {
|
|
2534
|
-
cn as
|
|
2535
|
-
width as
|
|
2566
|
+
cn as cn39,
|
|
2567
|
+
width as twWidth4,
|
|
2536
2568
|
useClassNames as useClassNames40
|
|
2537
2569
|
} from "@marigold/system";
|
|
2538
|
-
import { jsx as
|
|
2570
|
+
import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2539
2571
|
var _Switch = forwardRef19(
|
|
2540
2572
|
({
|
|
2541
2573
|
variant,
|
|
@@ -2559,25 +2591,25 @@ var _Switch = forwardRef19(
|
|
|
2559
2591
|
{
|
|
2560
2592
|
...props,
|
|
2561
2593
|
ref,
|
|
2562
|
-
className:
|
|
2563
|
-
|
|
2594
|
+
className: cn39(
|
|
2595
|
+
twWidth4[width],
|
|
2564
2596
|
"group/switch",
|
|
2565
2597
|
"flex items-center justify-between gap-[1ch]",
|
|
2566
2598
|
classNames2.container
|
|
2567
2599
|
),
|
|
2568
2600
|
children: [
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ jsx70(_Label, { elementType: "span", children }),
|
|
2602
|
+
/* @__PURE__ */ jsx70("div", { className: "relative", children: /* @__PURE__ */ jsx70(
|
|
2571
2603
|
"div",
|
|
2572
2604
|
{
|
|
2573
|
-
className:
|
|
2605
|
+
className: cn39(
|
|
2574
2606
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
2575
2607
|
classNames2.track
|
|
2576
2608
|
),
|
|
2577
|
-
children: /* @__PURE__ */
|
|
2609
|
+
children: /* @__PURE__ */ jsx70(
|
|
2578
2610
|
"div",
|
|
2579
2611
|
{
|
|
2580
|
-
className:
|
|
2612
|
+
className: cn39(
|
|
2581
2613
|
"h-[22px] w-[22px]",
|
|
2582
2614
|
"cubic-bezier(.7,0,.3,1)",
|
|
2583
2615
|
"absolute left-0 top-px",
|
|
@@ -2606,19 +2638,19 @@ import {
|
|
|
2606
2638
|
Row,
|
|
2607
2639
|
useTableState
|
|
2608
2640
|
} from "@react-stately/table";
|
|
2609
|
-
import { cn as
|
|
2641
|
+
import { cn as cn45, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2610
2642
|
|
|
2611
2643
|
// src/Table/Context.tsx
|
|
2612
|
-
import { createContext as
|
|
2613
|
-
var TableContext =
|
|
2614
|
-
var useTableContext = () =>
|
|
2644
|
+
import { createContext as createContext6, useContext as useContext11 } from "react";
|
|
2645
|
+
var TableContext = createContext6({});
|
|
2646
|
+
var useTableContext = () => useContext11(TableContext);
|
|
2615
2647
|
|
|
2616
2648
|
// src/Table/TableBody.tsx
|
|
2617
2649
|
import { useTableRowGroup } from "@react-aria/table";
|
|
2618
|
-
import { jsx as
|
|
2650
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2619
2651
|
var TableBody = ({ children }) => {
|
|
2620
2652
|
const { rowGroupProps } = useTableRowGroup();
|
|
2621
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ jsx71("tbody", { ...rowGroupProps, children });
|
|
2622
2654
|
};
|
|
2623
2655
|
|
|
2624
2656
|
// src/Table/TableCell.tsx
|
|
@@ -2626,9 +2658,9 @@ import { useRef as useRef4 } from "react";
|
|
|
2626
2658
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
2627
2659
|
import { useTableCell } from "@react-aria/table";
|
|
2628
2660
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
2629
|
-
import { useStateProps as useStateProps2 } from "@marigold/system";
|
|
2630
|
-
import { jsx as
|
|
2631
|
-
var TableCell = ({ cell, align }) => {
|
|
2661
|
+
import { cn as cn40, useStateProps as useStateProps2 } from "@marigold/system";
|
|
2662
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2663
|
+
var TableCell = ({ cell, align = "left" }) => {
|
|
2632
2664
|
const ref = useRef4(null);
|
|
2633
2665
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
2634
2666
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
@@ -2650,11 +2682,11 @@ var TableCell = ({ cell, align }) => {
|
|
|
2650
2682
|
};
|
|
2651
2683
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
2652
2684
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
2653
|
-
return /* @__PURE__ */
|
|
2685
|
+
return /* @__PURE__ */ jsx72(
|
|
2654
2686
|
"td",
|
|
2655
2687
|
{
|
|
2656
2688
|
ref,
|
|
2657
|
-
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
2689
|
+
className: cn40(classNames2 == null ? void 0 : classNames2.cell),
|
|
2658
2690
|
...mergeProps3(cellProps, focusProps),
|
|
2659
2691
|
...stateProps,
|
|
2660
2692
|
align,
|
|
@@ -2668,7 +2700,7 @@ import { useRef as useRef5 } from "react";
|
|
|
2668
2700
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
2669
2701
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
2670
2702
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
2671
|
-
import { cn as
|
|
2703
|
+
import { cn as cn41, useStateProps as useStateProps3 } from "@marigold/system";
|
|
2672
2704
|
|
|
2673
2705
|
// src/Table/utils.ts
|
|
2674
2706
|
var mapCheckboxProps = ({
|
|
@@ -2691,8 +2723,8 @@ var mapCheckboxProps = ({
|
|
|
2691
2723
|
};
|
|
2692
2724
|
|
|
2693
2725
|
// src/Table/TableCheckboxCell.tsx
|
|
2694
|
-
import { jsx as
|
|
2695
|
-
var TableCheckboxCell = ({ cell
|
|
2726
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2727
|
+
var TableCheckboxCell = ({ cell }) => {
|
|
2696
2728
|
const ref = useRef5(null);
|
|
2697
2729
|
const { state, classNames: classNames2 } = useTableContext();
|
|
2698
2730
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
@@ -2708,15 +2740,14 @@ var TableCheckboxCell = ({ cell, align }) => {
|
|
|
2708
2740
|
);
|
|
2709
2741
|
const { focusProps, isFocusVisible } = useFocusRing3();
|
|
2710
2742
|
const stateProps = useStateProps3({ disabled, focusVisible: isFocusVisible });
|
|
2711
|
-
return /* @__PURE__ */
|
|
2743
|
+
return /* @__PURE__ */ jsx73(
|
|
2712
2744
|
"td",
|
|
2713
2745
|
{
|
|
2714
2746
|
ref,
|
|
2715
|
-
className:
|
|
2716
|
-
align,
|
|
2747
|
+
className: cn41("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
2717
2748
|
...mergeProps4(gridCellProps, focusProps),
|
|
2718
2749
|
...stateProps,
|
|
2719
|
-
children: /* @__PURE__ */
|
|
2750
|
+
children: /* @__PURE__ */ jsx73(_Checkbox, { ...checkboxProps })
|
|
2720
2751
|
}
|
|
2721
2752
|
);
|
|
2722
2753
|
};
|
|
@@ -2728,13 +2759,13 @@ import { useHover } from "@react-aria/interactions";
|
|
|
2728
2759
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
2729
2760
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
2730
2761
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
2731
|
-
import { cn as
|
|
2732
|
-
import { width as
|
|
2733
|
-
import { jsx as
|
|
2762
|
+
import { cn as cn42, useStateProps as useStateProps4 } from "@marigold/system";
|
|
2763
|
+
import { width as twWidth5 } from "@marigold/system";
|
|
2764
|
+
import { jsx as jsx74, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2734
2765
|
var TableColumnHeader = ({
|
|
2735
2766
|
column,
|
|
2736
2767
|
width = "auto",
|
|
2737
|
-
align
|
|
2768
|
+
align = "left"
|
|
2738
2769
|
}) => {
|
|
2739
2770
|
var _a, _b;
|
|
2740
2771
|
const ref = useRef6(null);
|
|
@@ -2757,13 +2788,13 @@ var TableColumnHeader = ({
|
|
|
2757
2788
|
{
|
|
2758
2789
|
colSpan: column.colspan,
|
|
2759
2790
|
ref,
|
|
2760
|
-
className:
|
|
2791
|
+
className: cn42("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
2761
2792
|
...mergeProps5(columnHeaderProps, hoverProps, focusProps),
|
|
2762
2793
|
...stateProps,
|
|
2763
2794
|
align,
|
|
2764
2795
|
children: [
|
|
2765
2796
|
column.rendered,
|
|
2766
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
2797
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx74(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx74(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx74(SortDown, { className: "inline-block" }))
|
|
2767
2798
|
]
|
|
2768
2799
|
}
|
|
2769
2800
|
);
|
|
@@ -2771,21 +2802,28 @@ var TableColumnHeader = ({
|
|
|
2771
2802
|
|
|
2772
2803
|
// src/Table/TableHeader.tsx
|
|
2773
2804
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
2774
|
-
import { jsx as
|
|
2775
|
-
var TableHeader = ({ children }) => {
|
|
2805
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2806
|
+
var TableHeader = ({ stickyHeader, children }) => {
|
|
2776
2807
|
const { rowGroupProps } = useTableRowGroup2();
|
|
2777
|
-
return /* @__PURE__ */
|
|
2808
|
+
return /* @__PURE__ */ jsx75(
|
|
2809
|
+
"thead",
|
|
2810
|
+
{
|
|
2811
|
+
...rowGroupProps,
|
|
2812
|
+
className: stickyHeader ? "[&_th]:sticky [&_th]:top-0" : "",
|
|
2813
|
+
children
|
|
2814
|
+
}
|
|
2815
|
+
);
|
|
2778
2816
|
};
|
|
2779
2817
|
|
|
2780
2818
|
// src/Table/TableHeaderRow.tsx
|
|
2781
2819
|
import { useRef as useRef7 } from "react";
|
|
2782
2820
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
2783
|
-
import { jsx as
|
|
2821
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2784
2822
|
var TableHeaderRow = ({ item, children }) => {
|
|
2785
2823
|
const { state } = useTableContext();
|
|
2786
2824
|
const ref = useRef7(null);
|
|
2787
2825
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
2788
|
-
return /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ jsx76("tr", { ...rowProps, ref, children });
|
|
2789
2827
|
};
|
|
2790
2828
|
|
|
2791
2829
|
// src/Table/TableRow.tsx
|
|
@@ -2794,8 +2832,8 @@ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
|
2794
2832
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
2795
2833
|
import { useTableRow } from "@react-aria/table";
|
|
2796
2834
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
2797
|
-
import { cn as
|
|
2798
|
-
import { jsx as
|
|
2835
|
+
import { cn as cn43, useClassNames as useClassNames41, useStateProps as useStateProps5 } from "@marigold/system";
|
|
2836
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2799
2837
|
var TableRow = ({ children, row }) => {
|
|
2800
2838
|
const ref = useRef8(null);
|
|
2801
2839
|
const { interactive, state, ...ctx } = useTableContext();
|
|
@@ -2825,11 +2863,11 @@ var TableRow = ({ children, row }) => {
|
|
|
2825
2863
|
focusVisible: isFocusVisible,
|
|
2826
2864
|
active: isPressed
|
|
2827
2865
|
});
|
|
2828
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsx77(
|
|
2829
2867
|
"tr",
|
|
2830
2868
|
{
|
|
2831
2869
|
ref,
|
|
2832
|
-
className:
|
|
2870
|
+
className: cn43(
|
|
2833
2871
|
[
|
|
2834
2872
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
2835
2873
|
],
|
|
@@ -2852,15 +2890,15 @@ import {
|
|
|
2852
2890
|
} from "@react-aria/table";
|
|
2853
2891
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
2854
2892
|
import {
|
|
2855
|
-
cn as
|
|
2856
|
-
width as
|
|
2893
|
+
cn as cn44,
|
|
2894
|
+
width as twWidth6,
|
|
2857
2895
|
useStateProps as useStateProps6
|
|
2858
2896
|
} from "@marigold/system";
|
|
2859
|
-
import { jsx as
|
|
2897
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
2860
2898
|
var TableSelectAllCell = ({
|
|
2861
2899
|
column,
|
|
2862
2900
|
width = "auto",
|
|
2863
|
-
align
|
|
2901
|
+
align = "left"
|
|
2864
2902
|
}) => {
|
|
2865
2903
|
const ref = useRef9(null);
|
|
2866
2904
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -2878,30 +2916,27 @@ var TableSelectAllCell = ({
|
|
|
2878
2916
|
hover: isHovered,
|
|
2879
2917
|
focusVisible: isFocusVisible
|
|
2880
2918
|
});
|
|
2881
|
-
return /* @__PURE__ */
|
|
2919
|
+
return /* @__PURE__ */ jsx78(
|
|
2882
2920
|
"th",
|
|
2883
2921
|
{
|
|
2884
2922
|
ref,
|
|
2885
|
-
className:
|
|
2886
|
-
twWidth5[width],
|
|
2887
|
-
["text-center align-middle leading-none"],
|
|
2888
|
-
classNames2 == null ? void 0 : classNames2.header
|
|
2889
|
-
),
|
|
2890
|
-
align,
|
|
2923
|
+
className: cn44(twWidth6[width], [" leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
2891
2924
|
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
2892
2925
|
...stateProps,
|
|
2893
|
-
|
|
2926
|
+
align,
|
|
2927
|
+
children: /* @__PURE__ */ jsx78(_Checkbox, { ...checkboxProps })
|
|
2894
2928
|
}
|
|
2895
2929
|
);
|
|
2896
2930
|
};
|
|
2897
2931
|
|
|
2898
2932
|
// src/Table/Table.tsx
|
|
2899
|
-
import { jsx as
|
|
2933
|
+
import { jsx as jsx79, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2900
2934
|
var Table = ({
|
|
2901
2935
|
variant,
|
|
2902
2936
|
size,
|
|
2903
2937
|
stretch,
|
|
2904
2938
|
selectionMode = "none",
|
|
2939
|
+
stickyHeader,
|
|
2905
2940
|
...props
|
|
2906
2941
|
}) => {
|
|
2907
2942
|
const interactive = selectionMode !== "none";
|
|
@@ -2919,7 +2954,7 @@ var Table = ({
|
|
|
2919
2954
|
size
|
|
2920
2955
|
});
|
|
2921
2956
|
const { collection } = state;
|
|
2922
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx79(
|
|
2923
2958
|
TableContext.Provider,
|
|
2924
2959
|
{
|
|
2925
2960
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
@@ -2927,30 +2962,31 @@ var Table = ({
|
|
|
2927
2962
|
"table",
|
|
2928
2963
|
{
|
|
2929
2964
|
ref: tableRef,
|
|
2930
|
-
className:
|
|
2965
|
+
className: cn45(
|
|
2931
2966
|
"group/table",
|
|
2932
|
-
"border-collapse
|
|
2967
|
+
"border-collapse whitespace-nowrap",
|
|
2933
2968
|
stretch ? "table w-full" : "block",
|
|
2934
2969
|
classNames2.table
|
|
2935
2970
|
),
|
|
2936
2971
|
...gridProps,
|
|
2937
2972
|
children: [
|
|
2938
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ jsx79(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx79(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
2939
2974
|
(column) => {
|
|
2940
|
-
var _a, _b, _c, _d;
|
|
2941
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
2975
|
+
var _a, _b, _c, _d, _e;
|
|
2976
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx79(
|
|
2942
2977
|
TableSelectAllCell,
|
|
2943
2978
|
{
|
|
2944
2979
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
2945
|
-
column
|
|
2980
|
+
column,
|
|
2981
|
+
align: (_c = column.props) == null ? void 0 : _c.align
|
|
2946
2982
|
},
|
|
2947
2983
|
column.key
|
|
2948
|
-
) : /* @__PURE__ */
|
|
2984
|
+
) : /* @__PURE__ */ jsx79(
|
|
2949
2985
|
TableColumnHeader,
|
|
2950
2986
|
{
|
|
2951
|
-
width: (
|
|
2987
|
+
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
2952
2988
|
column,
|
|
2953
|
-
align: (
|
|
2989
|
+
align: (_e = column.props) == null ? void 0 : _e.align
|
|
2954
2990
|
},
|
|
2955
2991
|
column.key
|
|
2956
2992
|
);
|
|
@@ -2958,20 +2994,13 @@ var Table = ({
|
|
|
2958
2994
|
) }, headerRow.key)) }),
|
|
2959
2995
|
/* @__PURE__ */ jsxs30(TableBody, { children: [
|
|
2960
2996
|
...collection.rows.map(
|
|
2961
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
2962
|
-
var _a, _b
|
|
2997
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx79(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
2998
|
+
var _a, _b;
|
|
2963
2999
|
const currentColumn = collection.columns[index];
|
|
2964
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
2965
|
-
TableCheckboxCell,
|
|
2966
|
-
{
|
|
2967
|
-
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
2968
|
-
cell
|
|
2969
|
-
},
|
|
2970
|
-
cell.key
|
|
2971
|
-
) : /* @__PURE__ */ jsx78(
|
|
3000
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx79(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx79(
|
|
2972
3001
|
TableCell,
|
|
2973
3002
|
{
|
|
2974
|
-
align: (
|
|
3003
|
+
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
2975
3004
|
cell
|
|
2976
3005
|
},
|
|
2977
3006
|
cell.key
|
|
@@ -2993,8 +3022,8 @@ Table.Row = Row;
|
|
|
2993
3022
|
|
|
2994
3023
|
// src/Text/Text.tsx
|
|
2995
3024
|
import {
|
|
2996
|
-
cn as
|
|
2997
|
-
createVar as
|
|
3025
|
+
cn as cn46,
|
|
3026
|
+
createVar as createVar10,
|
|
2998
3027
|
cursorStyle,
|
|
2999
3028
|
fontWeight,
|
|
3000
3029
|
get as get2,
|
|
@@ -3002,9 +3031,9 @@ import {
|
|
|
3002
3031
|
textSize,
|
|
3003
3032
|
textStyle,
|
|
3004
3033
|
useClassNames as useClassNames43,
|
|
3005
|
-
useTheme as
|
|
3034
|
+
useTheme as useTheme4
|
|
3006
3035
|
} from "@marigold/system";
|
|
3007
|
-
import { jsx as
|
|
3036
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
3008
3037
|
var Text2 = ({
|
|
3009
3038
|
variant,
|
|
3010
3039
|
size,
|
|
@@ -3017,17 +3046,17 @@ var Text2 = ({
|
|
|
3017
3046
|
children,
|
|
3018
3047
|
...props
|
|
3019
3048
|
}) => {
|
|
3020
|
-
const theme =
|
|
3049
|
+
const theme = useTheme4();
|
|
3021
3050
|
const classNames2 = useClassNames43({
|
|
3022
3051
|
component: "Text",
|
|
3023
3052
|
variant,
|
|
3024
3053
|
size
|
|
3025
3054
|
});
|
|
3026
|
-
return /* @__PURE__ */
|
|
3055
|
+
return /* @__PURE__ */ jsx80(
|
|
3027
3056
|
"p",
|
|
3028
3057
|
{
|
|
3029
3058
|
...props,
|
|
3030
|
-
className:
|
|
3059
|
+
className: cn46(
|
|
3031
3060
|
classNames2,
|
|
3032
3061
|
"text-[--color] outline-[--outline]",
|
|
3033
3062
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3036,7 +3065,7 @@ var Text2 = ({
|
|
|
3036
3065
|
weight && fontWeight[weight],
|
|
3037
3066
|
fontSize && textSize[fontSize]
|
|
3038
3067
|
),
|
|
3039
|
-
style:
|
|
3068
|
+
style: createVar10({
|
|
3040
3069
|
color: color && theme.colors && get2(
|
|
3041
3070
|
theme.colors,
|
|
3042
3071
|
color.replace("-", "."),
|
|
@@ -3053,7 +3082,7 @@ var Text2 = ({
|
|
|
3053
3082
|
import { forwardRef as forwardRef20 } from "react";
|
|
3054
3083
|
import { TextArea, TextField } from "react-aria-components";
|
|
3055
3084
|
import { useClassNames as useClassNames44 } from "@marigold/system";
|
|
3056
|
-
import { jsx as
|
|
3085
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3057
3086
|
var _TextArea = forwardRef20(
|
|
3058
3087
|
({
|
|
3059
3088
|
variant,
|
|
@@ -3073,14 +3102,14 @@ var _TextArea = forwardRef20(
|
|
|
3073
3102
|
isRequired: required,
|
|
3074
3103
|
...rest
|
|
3075
3104
|
};
|
|
3076
|
-
return /* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ jsx81(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx81(TextArea, { className: classNames2, ref, rows }) });
|
|
3077
3106
|
}
|
|
3078
3107
|
);
|
|
3079
3108
|
|
|
3080
3109
|
// src/TextField/TextField.tsx
|
|
3081
3110
|
import { forwardRef as forwardRef21 } from "react";
|
|
3082
3111
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3083
|
-
import { jsx as
|
|
3112
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3084
3113
|
var _TextField = forwardRef21(
|
|
3085
3114
|
({
|
|
3086
3115
|
variant,
|
|
@@ -3098,13 +3127,13 @@ var _TextField = forwardRef21(
|
|
|
3098
3127
|
isRequired: required,
|
|
3099
3128
|
...rest
|
|
3100
3129
|
};
|
|
3101
|
-
return /* @__PURE__ */
|
|
3130
|
+
return /* @__PURE__ */ jsx82(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx82(_Input, { ref }) });
|
|
3102
3131
|
}
|
|
3103
3132
|
);
|
|
3104
3133
|
|
|
3105
3134
|
// src/Tiles/Tiles.tsx
|
|
3106
|
-
import { cn as
|
|
3107
|
-
import { jsx as
|
|
3135
|
+
import { cn as cn47, createVar as createVar11, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3136
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3108
3137
|
var Tiles = ({
|
|
3109
3138
|
space = 0,
|
|
3110
3139
|
stretch = false,
|
|
@@ -3117,17 +3146,17 @@ var Tiles = ({
|
|
|
3117
3146
|
if (stretch) {
|
|
3118
3147
|
column = `minmax(${column}, 1fr)`;
|
|
3119
3148
|
}
|
|
3120
|
-
return /* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsx83(
|
|
3121
3150
|
"div",
|
|
3122
3151
|
{
|
|
3123
3152
|
...props,
|
|
3124
|
-
className:
|
|
3153
|
+
className: cn47(
|
|
3125
3154
|
"grid",
|
|
3126
3155
|
gapSpace7[space],
|
|
3127
3156
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3128
3157
|
equalHeight && "auto-rows-[1fr]"
|
|
3129
3158
|
),
|
|
3130
|
-
style:
|
|
3159
|
+
style: createVar11({ column, tilesWidth }),
|
|
3131
3160
|
children
|
|
3132
3161
|
}
|
|
3133
3162
|
);
|
|
@@ -3135,11 +3164,11 @@ var Tiles = ({
|
|
|
3135
3164
|
|
|
3136
3165
|
// src/Tooltip/Tooltip.tsx
|
|
3137
3166
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3138
|
-
import { cn as
|
|
3167
|
+
import { cn as cn48, useClassNames as useClassNames45 } from "@marigold/system";
|
|
3139
3168
|
|
|
3140
3169
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3141
3170
|
import { TooltipTrigger } from "react-aria-components";
|
|
3142
|
-
import { jsx as
|
|
3171
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3143
3172
|
var _TooltipTrigger = ({
|
|
3144
3173
|
delay = 1e3,
|
|
3145
3174
|
children,
|
|
@@ -3153,19 +3182,19 @@ var _TooltipTrigger = ({
|
|
|
3153
3182
|
isOpen: open,
|
|
3154
3183
|
delay
|
|
3155
3184
|
};
|
|
3156
|
-
return /* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ jsx84(TooltipTrigger, { ...props, children });
|
|
3157
3186
|
};
|
|
3158
3187
|
|
|
3159
3188
|
// src/Tooltip/Tooltip.tsx
|
|
3160
|
-
import { jsx as
|
|
3189
|
+
import { jsx as jsx85, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3161
3190
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3162
3191
|
const props = {
|
|
3163
3192
|
...rest,
|
|
3164
3193
|
isOpen: open
|
|
3165
3194
|
};
|
|
3166
3195
|
const classNames2 = useClassNames45({ component: "Tooltip", variant, size });
|
|
3167
|
-
return /* @__PURE__ */ jsxs31(Tooltip, { ...props, className:
|
|
3168
|
-
/* @__PURE__ */
|
|
3196
|
+
return /* @__PURE__ */ jsxs31(Tooltip, { ...props, className: cn48("group/tooltip", classNames2.container), children: [
|
|
3197
|
+
/* @__PURE__ */ jsx85(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx85("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx85("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3169
3198
|
children
|
|
3170
3199
|
] });
|
|
3171
3200
|
};
|
|
@@ -3173,12 +3202,12 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
3173
3202
|
|
|
3174
3203
|
// src/TagGroup/Tag.tsx
|
|
3175
3204
|
import { Button as Button5, Tag } from "react-aria-components";
|
|
3176
|
-
import { cn as
|
|
3205
|
+
import { cn as cn49, useClassNames as useClassNames47 } from "@marigold/system";
|
|
3177
3206
|
|
|
3178
3207
|
// src/TagGroup/TagGroup.tsx
|
|
3179
3208
|
import { TagGroup, TagList } from "react-aria-components";
|
|
3180
3209
|
import { useClassNames as useClassNames46 } from "@marigold/system";
|
|
3181
|
-
import { jsx as
|
|
3210
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3182
3211
|
var _TagGroup = ({
|
|
3183
3212
|
width,
|
|
3184
3213
|
items,
|
|
@@ -3188,23 +3217,23 @@ var _TagGroup = ({
|
|
|
3188
3217
|
...rest
|
|
3189
3218
|
}) => {
|
|
3190
3219
|
const classNames2 = useClassNames46({ component: "Tag", variant, size });
|
|
3191
|
-
return /* @__PURE__ */
|
|
3220
|
+
return /* @__PURE__ */ jsx86(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx86(TagList, { items, className: classNames2.listItems, children }) });
|
|
3192
3221
|
};
|
|
3193
3222
|
|
|
3194
3223
|
// src/TagGroup/Tag.tsx
|
|
3195
|
-
import { Fragment as Fragment8, jsx as
|
|
3224
|
+
import { Fragment as Fragment8, jsx as jsx87, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3196
3225
|
var CloseButton2 = ({ className }) => {
|
|
3197
|
-
return /* @__PURE__ */
|
|
3226
|
+
return /* @__PURE__ */ jsx87(Button5, { slot: "remove", className, children: /* @__PURE__ */ jsx87("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx87("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" }) }) });
|
|
3198
3227
|
};
|
|
3199
3228
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
3200
3229
|
let textValue = typeof children === "string" ? children : void 0;
|
|
3201
3230
|
const classNames2 = useClassNames47({ component: "Tag", variant, size });
|
|
3202
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ jsx87(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
3203
3232
|
children,
|
|
3204
|
-
allowsRemoving && /* @__PURE__ */
|
|
3233
|
+
allowsRemoving && /* @__PURE__ */ jsx87(
|
|
3205
3234
|
CloseButton2,
|
|
3206
3235
|
{
|
|
3207
|
-
className:
|
|
3236
|
+
className: cn49("flex items-center", classNames2.closeButton)
|
|
3208
3237
|
}
|
|
3209
3238
|
)
|
|
3210
3239
|
] }) });
|
|
@@ -3217,7 +3246,7 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
|
3217
3246
|
// src/XLoader/XLoader.tsx
|
|
3218
3247
|
import { forwardRef as forwardRef22 } from "react";
|
|
3219
3248
|
import { SVG as SVG5 } from "@marigold/system";
|
|
3220
|
-
import { jsx as
|
|
3249
|
+
import { jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3221
3250
|
var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
3222
3251
|
SVG5,
|
|
3223
3252
|
{
|
|
@@ -3228,13 +3257,13 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3228
3257
|
...props,
|
|
3229
3258
|
...ref,
|
|
3230
3259
|
children: [
|
|
3231
|
-
/* @__PURE__ */
|
|
3232
|
-
/* @__PURE__ */
|
|
3260
|
+
/* @__PURE__ */ jsx88("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3261
|
+
/* @__PURE__ */ jsx88(
|
|
3233
3262
|
"path",
|
|
3234
3263
|
{
|
|
3235
3264
|
id: "XMLID_5_",
|
|
3236
3265
|
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",
|
|
3237
|
-
children: /* @__PURE__ */
|
|
3266
|
+
children: /* @__PURE__ */ jsx88(
|
|
3238
3267
|
"animate",
|
|
3239
3268
|
{
|
|
3240
3269
|
attributeName: "opacity",
|
|
@@ -3247,12 +3276,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3247
3276
|
)
|
|
3248
3277
|
}
|
|
3249
3278
|
),
|
|
3250
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ jsx88(
|
|
3251
3280
|
"path",
|
|
3252
3281
|
{
|
|
3253
3282
|
id: "XMLID_18_",
|
|
3254
3283
|
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",
|
|
3255
|
-
children: /* @__PURE__ */
|
|
3284
|
+
children: /* @__PURE__ */ jsx88(
|
|
3256
3285
|
"animate",
|
|
3257
3286
|
{
|
|
3258
3287
|
attributeName: "opacity",
|
|
@@ -3265,12 +3294,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3265
3294
|
)
|
|
3266
3295
|
}
|
|
3267
3296
|
),
|
|
3268
|
-
/* @__PURE__ */
|
|
3297
|
+
/* @__PURE__ */ jsx88(
|
|
3269
3298
|
"path",
|
|
3270
3299
|
{
|
|
3271
3300
|
id: "XMLID_19_",
|
|
3272
3301
|
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",
|
|
3273
|
-
children: /* @__PURE__ */
|
|
3302
|
+
children: /* @__PURE__ */ jsx88(
|
|
3274
3303
|
"animate",
|
|
3275
3304
|
{
|
|
3276
3305
|
attributeName: "opacity",
|
|
@@ -3283,12 +3312,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3283
3312
|
)
|
|
3284
3313
|
}
|
|
3285
3314
|
),
|
|
3286
|
-
/* @__PURE__ */
|
|
3315
|
+
/* @__PURE__ */ jsx88(
|
|
3287
3316
|
"path",
|
|
3288
3317
|
{
|
|
3289
3318
|
id: "XMLID_20_",
|
|
3290
3319
|
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",
|
|
3291
|
-
children: /* @__PURE__ */
|
|
3320
|
+
children: /* @__PURE__ */ jsx88(
|
|
3292
3321
|
"animate",
|
|
3293
3322
|
{
|
|
3294
3323
|
attributeName: "opacity",
|
|
@@ -3301,12 +3330,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3301
3330
|
)
|
|
3302
3331
|
}
|
|
3303
3332
|
),
|
|
3304
|
-
/* @__PURE__ */
|
|
3333
|
+
/* @__PURE__ */ jsx88(
|
|
3305
3334
|
"path",
|
|
3306
3335
|
{
|
|
3307
3336
|
id: "XMLID_21_",
|
|
3308
3337
|
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",
|
|
3309
|
-
children: /* @__PURE__ */
|
|
3338
|
+
children: /* @__PURE__ */ jsx88(
|
|
3310
3339
|
"animate",
|
|
3311
3340
|
{
|
|
3312
3341
|
attributeName: "opacity",
|
|
@@ -3319,12 +3348,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3319
3348
|
)
|
|
3320
3349
|
}
|
|
3321
3350
|
),
|
|
3322
|
-
/* @__PURE__ */
|
|
3351
|
+
/* @__PURE__ */ jsx88(
|
|
3323
3352
|
"path",
|
|
3324
3353
|
{
|
|
3325
3354
|
id: "XMLID_22_",
|
|
3326
3355
|
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",
|
|
3327
|
-
children: /* @__PURE__ */
|
|
3356
|
+
children: /* @__PURE__ */ jsx88(
|
|
3328
3357
|
"animate",
|
|
3329
3358
|
{
|
|
3330
3359
|
attributeName: "opacity",
|
|
@@ -3337,12 +3366,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3337
3366
|
)
|
|
3338
3367
|
}
|
|
3339
3368
|
),
|
|
3340
|
-
/* @__PURE__ */
|
|
3369
|
+
/* @__PURE__ */ jsx88(
|
|
3341
3370
|
"path",
|
|
3342
3371
|
{
|
|
3343
3372
|
id: "XMLID_23_",
|
|
3344
3373
|
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",
|
|
3345
|
-
children: /* @__PURE__ */
|
|
3374
|
+
children: /* @__PURE__ */ jsx88(
|
|
3346
3375
|
"animate",
|
|
3347
3376
|
{
|
|
3348
3377
|
attributeName: "opacity",
|
|
@@ -3355,12 +3384,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3355
3384
|
)
|
|
3356
3385
|
}
|
|
3357
3386
|
),
|
|
3358
|
-
/* @__PURE__ */
|
|
3387
|
+
/* @__PURE__ */ jsx88(
|
|
3359
3388
|
"path",
|
|
3360
3389
|
{
|
|
3361
3390
|
id: "XMLID_24_",
|
|
3362
3391
|
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",
|
|
3363
|
-
children: /* @__PURE__ */
|
|
3392
|
+
children: /* @__PURE__ */ jsx88(
|
|
3364
3393
|
"animate",
|
|
3365
3394
|
{
|
|
3366
3395
|
attributeName: "opacity",
|
|
@@ -3373,12 +3402,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3373
3402
|
)
|
|
3374
3403
|
}
|
|
3375
3404
|
),
|
|
3376
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ jsx88(
|
|
3377
3406
|
"path",
|
|
3378
3407
|
{
|
|
3379
3408
|
id: "XMLID_25_",
|
|
3380
3409
|
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",
|
|
3381
|
-
children: /* @__PURE__ */
|
|
3410
|
+
children: /* @__PURE__ */ jsx88(
|
|
3382
3411
|
"animate",
|
|
3383
3412
|
{
|
|
3384
3413
|
attributeName: "opacity",
|
|
@@ -3391,12 +3420,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3391
3420
|
)
|
|
3392
3421
|
}
|
|
3393
3422
|
),
|
|
3394
|
-
/* @__PURE__ */
|
|
3423
|
+
/* @__PURE__ */ jsx88(
|
|
3395
3424
|
"path",
|
|
3396
3425
|
{
|
|
3397
3426
|
id: "XMLID_26_",
|
|
3398
3427
|
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",
|
|
3399
|
-
children: /* @__PURE__ */
|
|
3428
|
+
children: /* @__PURE__ */ jsx88(
|
|
3400
3429
|
"animate",
|
|
3401
3430
|
{
|
|
3402
3431
|
attributeName: "opacity",
|
|
@@ -3409,12 +3438,12 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3409
3438
|
)
|
|
3410
3439
|
}
|
|
3411
3440
|
),
|
|
3412
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ jsx88(
|
|
3413
3442
|
"path",
|
|
3414
3443
|
{
|
|
3415
3444
|
id: "XMLID_27_",
|
|
3416
3445
|
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",
|
|
3417
|
-
children: /* @__PURE__ */
|
|
3446
|
+
children: /* @__PURE__ */ jsx88(
|
|
3418
3447
|
"animate",
|
|
3419
3448
|
{
|
|
3420
3449
|
attributeName: "opacity",
|
|
@@ -3436,21 +3465,21 @@ import { Tabs } from "react-aria-components";
|
|
|
3436
3465
|
import { useClassNames as useClassNames48 } from "@marigold/system";
|
|
3437
3466
|
|
|
3438
3467
|
// src/Tabs/Context.ts
|
|
3439
|
-
import { createContext as
|
|
3440
|
-
var TabContext =
|
|
3441
|
-
var useTabContext = () =>
|
|
3468
|
+
import { createContext as createContext7, useContext as useContext12 } from "react";
|
|
3469
|
+
var TabContext = createContext7({});
|
|
3470
|
+
var useTabContext = () => useContext12(TabContext);
|
|
3442
3471
|
|
|
3443
3472
|
// src/Tabs/Tab.tsx
|
|
3444
3473
|
import { Tab } from "react-aria-components";
|
|
3445
|
-
import { cn as
|
|
3446
|
-
import { jsx as
|
|
3474
|
+
import { cn as cn50 } from "@marigold/system";
|
|
3475
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
3447
3476
|
var _Tab = (props) => {
|
|
3448
3477
|
const { classNames: classNames2 } = useTabContext();
|
|
3449
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsx89(
|
|
3450
3479
|
Tab,
|
|
3451
3480
|
{
|
|
3452
3481
|
...props,
|
|
3453
|
-
className:
|
|
3482
|
+
className: cn50(
|
|
3454
3483
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
3455
3484
|
classNames2.tab
|
|
3456
3485
|
),
|
|
@@ -3461,15 +3490,15 @@ var _Tab = (props) => {
|
|
|
3461
3490
|
|
|
3462
3491
|
// src/Tabs/TabList.tsx
|
|
3463
3492
|
import { TabList } from "react-aria-components";
|
|
3464
|
-
import { cn as
|
|
3465
|
-
import { jsx as
|
|
3493
|
+
import { cn as cn51, gapSpace as gapSpace8 } from "@marigold/system";
|
|
3494
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
3466
3495
|
var _TabList = ({ space = 2, ...props }) => {
|
|
3467
3496
|
const { classNames: classNames2 } = useTabContext();
|
|
3468
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx90(
|
|
3469
3498
|
TabList,
|
|
3470
3499
|
{
|
|
3471
3500
|
...props,
|
|
3472
|
-
className:
|
|
3501
|
+
className: cn51("flex", gapSpace8[space], classNames2.tabsList),
|
|
3473
3502
|
children: props.children
|
|
3474
3503
|
}
|
|
3475
3504
|
);
|
|
@@ -3477,14 +3506,14 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
3477
3506
|
|
|
3478
3507
|
// src/Tabs/TabPanel.tsx
|
|
3479
3508
|
import { TabPanel } from "react-aria-components";
|
|
3480
|
-
import { jsx as
|
|
3509
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
3481
3510
|
var _TabPanel = (props) => {
|
|
3482
3511
|
const { classNames: classNames2 } = useTabContext();
|
|
3483
|
-
return /* @__PURE__ */
|
|
3512
|
+
return /* @__PURE__ */ jsx91(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
3484
3513
|
};
|
|
3485
3514
|
|
|
3486
3515
|
// src/Tabs/Tabs.tsx
|
|
3487
|
-
import { jsx as
|
|
3516
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
3488
3517
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
3489
3518
|
const props = {
|
|
3490
3519
|
isDisabled: disabled,
|
|
@@ -3495,7 +3524,7 @@ var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
|
3495
3524
|
size,
|
|
3496
3525
|
variant
|
|
3497
3526
|
});
|
|
3498
|
-
return /* @__PURE__ */
|
|
3527
|
+
return /* @__PURE__ */ jsx92(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx92(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
3499
3528
|
};
|
|
3500
3529
|
_Tabs.List = _TabList;
|
|
3501
3530
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -3543,9 +3572,11 @@ export {
|
|
|
3543
3572
|
Message,
|
|
3544
3573
|
_Modal as Modal,
|
|
3545
3574
|
_NumberField as NumberField,
|
|
3575
|
+
OverlayContainerProvider,
|
|
3546
3576
|
_Popover as Popover,
|
|
3547
3577
|
_Radio as Radio,
|
|
3548
3578
|
_RadioGroup as RadioGroup,
|
|
3579
|
+
Scrollable,
|
|
3549
3580
|
_SearchField as SearchField,
|
|
3550
3581
|
_Select as Select,
|
|
3551
3582
|
_Slider as Slider,
|
|
@@ -3568,5 +3599,6 @@ export {
|
|
|
3568
3599
|
useAsyncList,
|
|
3569
3600
|
useFieldGroupContext,
|
|
3570
3601
|
useListData,
|
|
3571
|
-
|
|
3602
|
+
usePortalContainer,
|
|
3603
|
+
useTheme2 as useTheme
|
|
3572
3604
|
};
|