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