@marigold/components 6.7.0 → 6.9.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 +71 -91
- package/dist/index.d.ts +71 -91
- package/dist/index.js +921 -1088
- package/dist/index.mjs +822 -995
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ __export(src_exports, {
|
|
|
52
52
|
Container: () => Container,
|
|
53
53
|
DateField: () => DateField,
|
|
54
54
|
DatePicker: () => DatePicker,
|
|
55
|
-
Dialog: () =>
|
|
55
|
+
Dialog: () => _Dialog,
|
|
56
56
|
Divider: () => _Divider,
|
|
57
57
|
FieldBase: () => FieldBase,
|
|
58
58
|
FieldGroup: () => FieldGroup,
|
|
@@ -70,8 +70,8 @@ __export(src_exports, {
|
|
|
70
70
|
MarigoldProvider: () => MarigoldProvider,
|
|
71
71
|
Menu: () => Menu,
|
|
72
72
|
Message: () => Message,
|
|
73
|
-
Modal: () =>
|
|
74
|
-
NumberField: () =>
|
|
73
|
+
Modal: () => _Modal,
|
|
74
|
+
NumberField: () => _NumberField,
|
|
75
75
|
Overlay: () => Overlay,
|
|
76
76
|
Popover: () => Popover,
|
|
77
77
|
Radio: () => _Radio,
|
|
@@ -85,21 +85,22 @@ __export(src_exports, {
|
|
|
85
85
|
Tabs: () => Tabs,
|
|
86
86
|
Tag: () => Tag2,
|
|
87
87
|
Text: () => Text2,
|
|
88
|
-
TextArea: () =>
|
|
89
|
-
TextField: () =>
|
|
90
|
-
ThemeProvider: () =>
|
|
88
|
+
TextArea: () => _TextArea,
|
|
89
|
+
TextField: () => _TextField,
|
|
90
|
+
ThemeProvider: () => import_system55.ThemeProvider,
|
|
91
91
|
Tiles: () => Tiles,
|
|
92
|
-
Tooltip: () =>
|
|
92
|
+
Tooltip: () => _Tooltip,
|
|
93
93
|
Tray: () => Tray,
|
|
94
94
|
TrayWrapper: () => TrayWrapper,
|
|
95
95
|
Underlay: () => Underlay,
|
|
96
96
|
VisuallyHidden: () => import_visually_hidden.VisuallyHidden,
|
|
97
97
|
XLoader: () => XLoader,
|
|
98
98
|
_Slider: () => _Slider,
|
|
99
|
+
_TextArea: () => _TextArea,
|
|
99
100
|
useAsyncList: () => import_data.useAsyncList,
|
|
100
101
|
useFieldGroupContext: () => useFieldGroupContext,
|
|
101
102
|
useListData: () => import_data.useListData,
|
|
102
|
-
useTheme: () =>
|
|
103
|
+
useTheme: () => import_system55.useTheme
|
|
103
104
|
});
|
|
104
105
|
module.exports = __toCommonJS(src_exports);
|
|
105
106
|
|
|
@@ -698,62 +699,78 @@ var ListBox = (0, import_react10.forwardRef)(
|
|
|
698
699
|
|
|
699
700
|
// src/Overlay/Modal.tsx
|
|
700
701
|
var import_react11 = require("react");
|
|
701
|
-
var
|
|
702
|
-
var
|
|
703
|
-
var import_utils7 = require("@react-aria/utils");
|
|
702
|
+
var import_react_aria_components3 = require("react-aria-components");
|
|
703
|
+
var import_system13 = require("@marigold/system");
|
|
704
704
|
|
|
705
705
|
// src/Overlay/Underlay.tsx
|
|
706
|
+
var import_react_aria_components2 = require("react-aria-components");
|
|
706
707
|
var import_system12 = require("@marigold/system");
|
|
707
708
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
708
|
-
var Underlay = ({
|
|
709
|
+
var Underlay = ({
|
|
710
|
+
size,
|
|
711
|
+
variant,
|
|
712
|
+
open,
|
|
713
|
+
dismissable,
|
|
714
|
+
keyboardDismissable,
|
|
715
|
+
...rest
|
|
716
|
+
}) => {
|
|
709
717
|
const classNames2 = (0, import_system12.useClassNames)({ component: "Underlay", size, variant });
|
|
710
|
-
|
|
718
|
+
const props = {
|
|
719
|
+
isOpen: open,
|
|
720
|
+
isDismissable: dismissable,
|
|
721
|
+
isKeyboardDismissDisabled: keyboardDismissable,
|
|
722
|
+
...rest
|
|
723
|
+
};
|
|
724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
725
|
+
import_react_aria_components2.ModalOverlay,
|
|
726
|
+
{
|
|
727
|
+
className: ({ isEntering, isExiting }) => (0, import_system12.cn)(
|
|
728
|
+
"fixed inset-0 z-10 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur ",
|
|
729
|
+
isEntering ? "animate-in fade-in duration-300 ease-out" : "",
|
|
730
|
+
isExiting ? "animate-out fade-out duration-200 ease-in" : "",
|
|
731
|
+
classNames2
|
|
732
|
+
),
|
|
733
|
+
...props,
|
|
734
|
+
children: props.children
|
|
735
|
+
}
|
|
736
|
+
);
|
|
711
737
|
};
|
|
712
738
|
|
|
713
739
|
// src/Overlay/Modal.tsx
|
|
714
740
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
715
|
-
var
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
className: "pointer-none fixed inset-0 z-50 flex items-center justify-center",
|
|
735
|
-
ref: modalRef,
|
|
736
|
-
...(0, import_utils7.mergeProps)(props, overlayProps, modalProps),
|
|
737
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { pointerEvents: "auto" }, children })
|
|
738
|
-
}
|
|
739
|
-
)
|
|
740
|
-
] });
|
|
741
|
-
}
|
|
742
|
-
);
|
|
741
|
+
var _Modal = (0, import_react11.forwardRef)(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
742
|
+
const theme = (0, import_system13.useTheme)();
|
|
743
|
+
const props = {
|
|
744
|
+
isOpen: open,
|
|
745
|
+
isDismissable: dismissable,
|
|
746
|
+
isKeyboardDismissDisabled: keyboardDismissable,
|
|
747
|
+
...rest
|
|
748
|
+
};
|
|
749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
750
|
+
Underlay,
|
|
751
|
+
{
|
|
752
|
+
dismissable,
|
|
753
|
+
keyboardDismissable,
|
|
754
|
+
open,
|
|
755
|
+
variant: "modal",
|
|
756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components3.Modal, { ref, "data-theme": theme.name, ...props, children: props.children })
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
});
|
|
743
760
|
|
|
744
761
|
// src/Overlay/Overlay.tsx
|
|
745
762
|
var import_react12 = require("react");
|
|
746
|
-
var
|
|
747
|
-
var
|
|
763
|
+
var import_overlays = require("@react-aria/overlays");
|
|
764
|
+
var import_system14 = require("@marigold/system");
|
|
748
765
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
749
766
|
var Overlay = ({ children, container, open }) => {
|
|
750
767
|
const nodeRef = (0, import_react12.useRef)(null);
|
|
751
|
-
const theme = (0,
|
|
768
|
+
const theme = (0, import_system14.useTheme)();
|
|
752
769
|
let mountOverlay = open;
|
|
753
770
|
if (!mountOverlay) {
|
|
754
771
|
return null;
|
|
755
772
|
}
|
|
756
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_overlays.Overlay, { portalContainer: container, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
757
774
|
"div",
|
|
758
775
|
{
|
|
759
776
|
ref: nodeRef,
|
|
@@ -767,9 +784,9 @@ var Overlay = ({ children, container, open }) => {
|
|
|
767
784
|
|
|
768
785
|
// src/Overlay/Popover.tsx
|
|
769
786
|
var import_react13 = require("react");
|
|
770
|
-
var
|
|
771
|
-
var
|
|
772
|
-
var
|
|
787
|
+
var import_focus2 = require("@react-aria/focus");
|
|
788
|
+
var import_overlays2 = require("@react-aria/overlays");
|
|
789
|
+
var import_system15 = require("@marigold/system");
|
|
773
790
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
774
791
|
var Popover = (0, import_react13.forwardRef)(
|
|
775
792
|
(props, ref) => {
|
|
@@ -787,7 +804,7 @@ var PopoverWrapper = (0, import_react13.forwardRef)(
|
|
|
787
804
|
keyboardDismissDisabled,
|
|
788
805
|
...props
|
|
789
806
|
}, ref) => {
|
|
790
|
-
const { popoverProps, underlayProps, placement } = (0,
|
|
807
|
+
const { popoverProps, underlayProps, placement } = (0, import_overlays2.usePopover)(
|
|
791
808
|
{
|
|
792
809
|
...props,
|
|
793
810
|
isNonModal,
|
|
@@ -797,11 +814,11 @@ var PopoverWrapper = (0, import_react13.forwardRef)(
|
|
|
797
814
|
},
|
|
798
815
|
state
|
|
799
816
|
);
|
|
800
|
-
const classNames2 = (0,
|
|
817
|
+
const classNames2 = (0, import_system15.useClassNames)({
|
|
801
818
|
component: "Popover",
|
|
802
819
|
variant: placement
|
|
803
820
|
});
|
|
804
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_focus2.FocusScope, { restoreFocus: true, children: [
|
|
805
822
|
!isNonModal && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Underlay, { ...underlayProps }),
|
|
806
823
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
807
824
|
"div",
|
|
@@ -815,9 +832,9 @@ var PopoverWrapper = (0, import_react13.forwardRef)(
|
|
|
815
832
|
ref,
|
|
816
833
|
role: "presentation",
|
|
817
834
|
children: [
|
|
818
|
-
!isNonModal && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
835
|
+
!isNonModal && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_overlays2.DismissButton, { onDismiss: state.close }),
|
|
819
836
|
children,
|
|
820
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_overlays2.DismissButton, { onDismiss: state.close })
|
|
821
838
|
]
|
|
822
839
|
}
|
|
823
840
|
)
|
|
@@ -827,19 +844,29 @@ var PopoverWrapper = (0, import_react13.forwardRef)(
|
|
|
827
844
|
|
|
828
845
|
// src/Overlay/Tray.tsx
|
|
829
846
|
var import_react14 = require("react");
|
|
830
|
-
var
|
|
831
|
-
var
|
|
832
|
-
var
|
|
847
|
+
var import_focus3 = require("@react-aria/focus");
|
|
848
|
+
var import_overlays3 = require("@react-aria/overlays");
|
|
849
|
+
var import_utils7 = require("@react-aria/utils");
|
|
850
|
+
|
|
851
|
+
// src/Overlay/_Underlay.tsx
|
|
852
|
+
var import_system16 = require("@marigold/system");
|
|
833
853
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
854
|
+
var Underlay2 = ({ size, variant, ...props }) => {
|
|
855
|
+
const classNames2 = (0, import_system16.useClassNames)({ component: "Underlay", size, variant });
|
|
856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_system16.cn)("fixed inset-0 z-40", classNames2), ...props });
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
// src/Overlay/Tray.tsx
|
|
860
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
834
861
|
var Tray = (0, import_react14.forwardRef)(
|
|
835
862
|
({ state, children, ...props }, ref) => {
|
|
836
|
-
const trayRef = (0,
|
|
837
|
-
return /* @__PURE__ */ (0,
|
|
863
|
+
const trayRef = (0, import_utils7.useObjectRef)(ref);
|
|
864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Overlay, { open: state.isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TrayWrapper, { state, ...props, ref: trayRef, children }) });
|
|
838
865
|
}
|
|
839
866
|
);
|
|
840
867
|
var TrayWrapper = (0, import_react14.forwardRef)(
|
|
841
868
|
({ children, state, ...props }, ref) => {
|
|
842
|
-
let { modalProps, underlayProps } = (0,
|
|
869
|
+
let { modalProps, underlayProps } = (0, import_overlays3.useModalOverlay)(
|
|
843
870
|
{
|
|
844
871
|
...props,
|
|
845
872
|
isDismissable: true
|
|
@@ -847,7 +874,7 @@ var TrayWrapper = (0, import_react14.forwardRef)(
|
|
|
847
874
|
state,
|
|
848
875
|
ref
|
|
849
876
|
);
|
|
850
|
-
return /* @__PURE__ */ (0,
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_focus3.FocusScope, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Underlay2, { ...underlayProps, variant: "modal", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
851
878
|
"div",
|
|
852
879
|
{
|
|
853
880
|
...modalProps,
|
|
@@ -855,9 +882,9 @@ var TrayWrapper = (0, import_react14.forwardRef)(
|
|
|
855
882
|
className: "absolute bottom-0 w-full",
|
|
856
883
|
"data-testid": "tray",
|
|
857
884
|
children: [
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_overlays3.DismissButton, { onDismiss: state.close }),
|
|
859
886
|
children,
|
|
860
|
-
/* @__PURE__ */ (0,
|
|
887
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_overlays3.DismissButton, { onDismiss: state.close })
|
|
861
888
|
]
|
|
862
889
|
}
|
|
863
890
|
) }) });
|
|
@@ -867,11 +894,11 @@ var TrayWrapper = (0, import_react14.forwardRef)(
|
|
|
867
894
|
// src/Autocomplete/ClearButton.tsx
|
|
868
895
|
var import_react15 = require("react");
|
|
869
896
|
var import_button2 = require("@react-aria/button");
|
|
870
|
-
var
|
|
897
|
+
var import_focus4 = require("@react-aria/focus");
|
|
871
898
|
var import_interactions = require("@react-aria/interactions");
|
|
872
|
-
var
|
|
873
|
-
var
|
|
874
|
-
var
|
|
899
|
+
var import_utils8 = require("@react-aria/utils");
|
|
900
|
+
var import_system17 = require("@marigold/system");
|
|
901
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
875
902
|
var ClearButton = ({
|
|
876
903
|
preventFocus,
|
|
877
904
|
disabled,
|
|
@@ -888,7 +915,7 @@ var ClearButton = ({
|
|
|
888
915
|
}) => {
|
|
889
916
|
const buttonRef = (0, import_react15.useRef)(null);
|
|
890
917
|
const { hoverProps, isHovered } = (0, import_interactions.useHover)({ isDisabled: disabled });
|
|
891
|
-
const { isFocusVisible, focusProps } = (0,
|
|
918
|
+
const { isFocusVisible, focusProps } = (0, import_focus4.useFocusRing)({
|
|
892
919
|
autoFocus: props.autoFocus
|
|
893
920
|
});
|
|
894
921
|
const { buttonProps, isPressed } = (0, import_button2.useButton)(
|
|
@@ -909,22 +936,22 @@ var ClearButton = ({
|
|
|
909
936
|
if (preventFocus) {
|
|
910
937
|
delete buttonProps.tabIndex;
|
|
911
938
|
}
|
|
912
|
-
const stateProps = (0,
|
|
939
|
+
const stateProps = (0, import_system17.useStateProps)({
|
|
913
940
|
active: isPressed,
|
|
914
941
|
focusVisible: isFocusVisible,
|
|
915
942
|
hover: isHovered
|
|
916
943
|
});
|
|
917
|
-
return /* @__PURE__ */ (0,
|
|
944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
918
945
|
"button",
|
|
919
946
|
{
|
|
920
|
-
...(0,
|
|
947
|
+
...(0, import_utils8.mergeProps)(buttonProps, focusProps, hoverProps, props),
|
|
921
948
|
...stateProps,
|
|
922
949
|
ref: buttonRef,
|
|
923
|
-
className: (0,
|
|
950
|
+
className: (0, import_system17.cn)(
|
|
924
951
|
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
925
952
|
className
|
|
926
953
|
),
|
|
927
|
-
children: /* @__PURE__ */ (0,
|
|
954
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
928
955
|
"svg",
|
|
929
956
|
{
|
|
930
957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -932,7 +959,7 @@ var ClearButton = ({
|
|
|
932
959
|
fill: "currentColor",
|
|
933
960
|
width: 20,
|
|
934
961
|
height: 20,
|
|
935
|
-
children: /* @__PURE__ */ (0,
|
|
962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
936
963
|
}
|
|
937
964
|
)
|
|
938
965
|
}
|
|
@@ -940,8 +967,8 @@ var ClearButton = ({
|
|
|
940
967
|
};
|
|
941
968
|
|
|
942
969
|
// src/Autocomplete/Autocomplete.tsx
|
|
943
|
-
var
|
|
944
|
-
var SearchIcon = (props) => /* @__PURE__ */ (0,
|
|
970
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
971
|
+
var SearchIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
945
972
|
"svg",
|
|
946
973
|
{
|
|
947
974
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -950,7 +977,7 @@ var SearchIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
|
950
977
|
width: 24,
|
|
951
978
|
height: 24,
|
|
952
979
|
...props,
|
|
953
|
-
children: /* @__PURE__ */ (0,
|
|
980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
|
|
954
981
|
}
|
|
955
982
|
);
|
|
956
983
|
var Autocomplete = ({
|
|
@@ -1005,8 +1032,8 @@ var Autocomplete = ({
|
|
|
1005
1032
|
state
|
|
1006
1033
|
);
|
|
1007
1034
|
const { isDisabled, ...restClearButtonProps } = clearButtonProps;
|
|
1008
|
-
return /* @__PURE__ */ (0,
|
|
1009
|
-
/* @__PURE__ */ (0,
|
|
1035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
1036
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1010
1037
|
FieldBase,
|
|
1011
1038
|
{
|
|
1012
1039
|
label: props.label,
|
|
@@ -1016,13 +1043,13 @@ var Autocomplete = ({
|
|
|
1016
1043
|
errorMessage: props.errorMessage,
|
|
1017
1044
|
disabled,
|
|
1018
1045
|
width,
|
|
1019
|
-
children: /* @__PURE__ */ (0,
|
|
1046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1020
1047
|
Input,
|
|
1021
1048
|
{
|
|
1022
1049
|
...inputProps,
|
|
1023
1050
|
ref: inputRef,
|
|
1024
|
-
icon: /* @__PURE__ */ (0,
|
|
1025
|
-
action: state.inputValue !== "" ? /* @__PURE__ */ (0,
|
|
1051
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SearchIcon, {}),
|
|
1052
|
+
action: state.inputValue !== "" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1026
1053
|
ClearButton,
|
|
1027
1054
|
{
|
|
1028
1055
|
preventFocus: true,
|
|
@@ -1034,7 +1061,7 @@ var Autocomplete = ({
|
|
|
1034
1061
|
)
|
|
1035
1062
|
}
|
|
1036
1063
|
),
|
|
1037
|
-
/* @__PURE__ */ (0,
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1038
1065
|
Popover,
|
|
1039
1066
|
{
|
|
1040
1067
|
state,
|
|
@@ -1042,7 +1069,7 @@ var Autocomplete = ({
|
|
|
1042
1069
|
triggerRef: inputRef,
|
|
1043
1070
|
scrollRef: listBoxRef,
|
|
1044
1071
|
isNonModal: true,
|
|
1045
|
-
children: /* @__PURE__ */ (0,
|
|
1072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1046
1073
|
}
|
|
1047
1074
|
)
|
|
1048
1075
|
] });
|
|
@@ -1058,23 +1085,23 @@ var import_combobox3 = require("@react-stately/combobox");
|
|
|
1058
1085
|
|
|
1059
1086
|
// src/Button/Button.tsx
|
|
1060
1087
|
var import_react17 = require("react");
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1063
|
-
var
|
|
1088
|
+
var import_react_aria_components4 = require("react-aria-components");
|
|
1089
|
+
var import_system18 = require("@marigold/system");
|
|
1090
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1064
1091
|
var _Button = (0, import_react17.forwardRef)(
|
|
1065
1092
|
({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
|
|
1066
|
-
const classNames2 = (0,
|
|
1093
|
+
const classNames2 = (0, import_system18.useClassNames)({
|
|
1067
1094
|
component: "Button",
|
|
1068
1095
|
variant,
|
|
1069
1096
|
size,
|
|
1070
1097
|
className
|
|
1071
1098
|
});
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1073
|
-
|
|
1099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1100
|
+
import_react_aria_components4.Button,
|
|
1074
1101
|
{
|
|
1075
1102
|
...props,
|
|
1076
1103
|
ref,
|
|
1077
|
-
className: (0,
|
|
1104
|
+
className: (0, import_system18.cn)(
|
|
1078
1105
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1079
1106
|
classNames2,
|
|
1080
1107
|
fullWidth ? "w-full" : void 0
|
|
@@ -1087,7 +1114,7 @@ var _Button = (0, import_react17.forwardRef)(
|
|
|
1087
1114
|
);
|
|
1088
1115
|
|
|
1089
1116
|
// src/ComboBox/ComboBox.tsx
|
|
1090
|
-
var
|
|
1117
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1091
1118
|
var ComboBox = ({
|
|
1092
1119
|
error,
|
|
1093
1120
|
width,
|
|
@@ -1127,8 +1154,8 @@ var ComboBox = ({
|
|
|
1127
1154
|
);
|
|
1128
1155
|
const errorMessageProps = { "aria-invalid": error };
|
|
1129
1156
|
const { label, description, errorMessage } = props;
|
|
1130
|
-
return /* @__PURE__ */ (0,
|
|
1131
|
-
/* @__PURE__ */ (0,
|
|
1157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1132
1159
|
FieldBase,
|
|
1133
1160
|
{
|
|
1134
1161
|
label,
|
|
@@ -1138,25 +1165,25 @@ var ComboBox = ({
|
|
|
1138
1165
|
errorMessage,
|
|
1139
1166
|
errorMessageProps,
|
|
1140
1167
|
width,
|
|
1141
|
-
children: /* @__PURE__ */ (0,
|
|
1168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1142
1169
|
Input,
|
|
1143
1170
|
{
|
|
1144
1171
|
...inputProps,
|
|
1145
1172
|
ref: inputRef,
|
|
1146
|
-
action: /* @__PURE__ */ (0,
|
|
1173
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1147
1174
|
_Button,
|
|
1148
1175
|
{
|
|
1149
1176
|
className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0",
|
|
1150
1177
|
ref: buttonRef,
|
|
1151
1178
|
...triggerProps,
|
|
1152
|
-
children: /* @__PURE__ */ (0,
|
|
1179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronDown, { className: "h-4 w-4" })
|
|
1153
1180
|
}
|
|
1154
1181
|
)
|
|
1155
1182
|
}
|
|
1156
1183
|
)
|
|
1157
1184
|
}
|
|
1158
1185
|
),
|
|
1159
|
-
/* @__PURE__ */ (0,
|
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1160
1187
|
Popover,
|
|
1161
1188
|
{
|
|
1162
1189
|
state,
|
|
@@ -1164,7 +1191,7 @@ var ComboBox = ({
|
|
|
1164
1191
|
triggerRef: inputRef,
|
|
1165
1192
|
scrollRef: listBoxRef,
|
|
1166
1193
|
isNonModal: true,
|
|
1167
|
-
children: /* @__PURE__ */ (0,
|
|
1194
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1168
1195
|
}
|
|
1169
1196
|
)
|
|
1170
1197
|
] });
|
|
@@ -1172,16 +1199,16 @@ var ComboBox = ({
|
|
|
1172
1199
|
ComboBox.Item = import_collections3.Item;
|
|
1173
1200
|
|
|
1174
1201
|
// src/Badge/Badge.tsx
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
1202
|
+
var import_system19 = require("@marigold/system");
|
|
1203
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1177
1204
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
1178
|
-
const classNames2 = (0,
|
|
1179
|
-
return /* @__PURE__ */ (0,
|
|
1205
|
+
const classNames2 = (0, import_system19.useClassNames)({ component: "Badge", variant, size });
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ...props, className: classNames2, children });
|
|
1180
1207
|
};
|
|
1181
1208
|
|
|
1182
1209
|
// src/Breakout/Breakout.tsx
|
|
1183
|
-
var
|
|
1184
|
-
var
|
|
1210
|
+
var import_system20 = require("@marigold/system");
|
|
1211
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1185
1212
|
var Breakout = ({
|
|
1186
1213
|
height,
|
|
1187
1214
|
children,
|
|
@@ -1191,17 +1218,17 @@ var Breakout = ({
|
|
|
1191
1218
|
...props
|
|
1192
1219
|
}) => {
|
|
1193
1220
|
var _a, _b, _c, _d;
|
|
1194
|
-
return /* @__PURE__ */ (0,
|
|
1221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1195
1222
|
"div",
|
|
1196
1223
|
{
|
|
1197
|
-
className: (0,
|
|
1224
|
+
className: (0, import_system20.cn)(
|
|
1198
1225
|
"col-start-[1_!important] col-end-[-1_!important] w-full",
|
|
1199
|
-
alignX && ((_b = (_a =
|
|
1200
|
-
alignY && ((_d = (_c =
|
|
1226
|
+
alignX && ((_b = (_a = import_system20.alignment) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
1227
|
+
alignY && ((_d = (_c = import_system20.alignment) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY]),
|
|
1201
1228
|
alignX || alignY ? "flex" : "block",
|
|
1202
1229
|
"h-[--height]"
|
|
1203
1230
|
),
|
|
1204
|
-
style: (0,
|
|
1231
|
+
style: (0, import_system20.createVar)({ height }),
|
|
1205
1232
|
...props,
|
|
1206
1233
|
children
|
|
1207
1234
|
}
|
|
@@ -1209,16 +1236,16 @@ var Breakout = ({
|
|
|
1209
1236
|
};
|
|
1210
1237
|
|
|
1211
1238
|
// src/Body/Body.tsx
|
|
1212
|
-
var
|
|
1213
|
-
var
|
|
1239
|
+
var import_system21 = require("@marigold/system");
|
|
1240
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1214
1241
|
var Body = ({ children, variant, size, ...props }) => {
|
|
1215
|
-
const classNames2 = (0,
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1242
|
+
const classNames2 = (0, import_system21.useClassNames)({ component: "Body", variant, size });
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("section", { ...props, className: classNames2, children });
|
|
1217
1244
|
};
|
|
1218
1245
|
|
|
1219
1246
|
// src/Card/Card.tsx
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1247
|
+
var import_system22 = require("@marigold/system");
|
|
1248
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1222
1249
|
var Card = ({
|
|
1223
1250
|
children,
|
|
1224
1251
|
variant,
|
|
@@ -1233,22 +1260,22 @@ var Card = ({
|
|
|
1233
1260
|
pr,
|
|
1234
1261
|
...props
|
|
1235
1262
|
}) => {
|
|
1236
|
-
const classNames2 = (0,
|
|
1237
|
-
return /* @__PURE__ */ (0,
|
|
1263
|
+
const classNames2 = (0, import_system22.useClassNames)({ component: "Card", variant, size });
|
|
1264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1238
1265
|
"div",
|
|
1239
1266
|
{
|
|
1240
1267
|
...props,
|
|
1241
|
-
className: (0,
|
|
1268
|
+
className: (0, import_system22.cn)(
|
|
1242
1269
|
"flex flex-col",
|
|
1243
1270
|
classNames2,
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1271
|
+
import_system22.gapSpace[space],
|
|
1272
|
+
import_system22.paddingSpace !== void 0 && import_system22.paddingSpace[p],
|
|
1273
|
+
import_system22.paddingSpaceX !== void 0 && import_system22.paddingSpaceX[px],
|
|
1274
|
+
import_system22.paddingSpaceY !== void 0 && import_system22.paddingSpaceY[py],
|
|
1275
|
+
import_system22.paddingRight !== void 0 && import_system22.paddingRight[pr],
|
|
1276
|
+
import_system22.paddingLeft !== void 0 && import_system22.paddingLeft[pl],
|
|
1277
|
+
import_system22.paddingBottom !== void 0 && import_system22.paddingBottom[pb],
|
|
1278
|
+
import_system22.paddingTop !== void 0 && import_system22.paddingTop[pt]
|
|
1252
1279
|
),
|
|
1253
1280
|
children
|
|
1254
1281
|
}
|
|
@@ -1256,24 +1283,24 @@ var Card = ({
|
|
|
1256
1283
|
};
|
|
1257
1284
|
|
|
1258
1285
|
// src/Center/Center.tsx
|
|
1259
|
-
var
|
|
1260
|
-
var
|
|
1286
|
+
var import_system23 = require("@marigold/system");
|
|
1287
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1261
1288
|
var Center = ({
|
|
1262
1289
|
maxWidth = "100%",
|
|
1263
1290
|
space = 0,
|
|
1264
1291
|
children,
|
|
1265
1292
|
...props
|
|
1266
1293
|
}) => {
|
|
1267
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1268
1295
|
"div",
|
|
1269
1296
|
{
|
|
1270
1297
|
...props,
|
|
1271
|
-
className: (0,
|
|
1298
|
+
className: (0, import_system23.cn)(
|
|
1272
1299
|
"me-[auto] ms-[auto] box-content flex flex-col items-center justify-center",
|
|
1273
|
-
|
|
1300
|
+
import_system23.gapSpace[space],
|
|
1274
1301
|
"max-w-[--maxWidth]"
|
|
1275
1302
|
),
|
|
1276
|
-
style: (0,
|
|
1303
|
+
style: (0, import_system23.createVar)({ maxWidth }),
|
|
1277
1304
|
children
|
|
1278
1305
|
}
|
|
1279
1306
|
);
|
|
@@ -1281,10 +1308,10 @@ var Center = ({
|
|
|
1281
1308
|
|
|
1282
1309
|
// src/Checkbox/Checkbox.tsx
|
|
1283
1310
|
var import_react19 = require("react");
|
|
1284
|
-
var
|
|
1285
|
-
var
|
|
1286
|
-
var
|
|
1287
|
-
var CheckMark = () => /* @__PURE__ */ (0,
|
|
1311
|
+
var import_react_aria_components5 = require("react-aria-components");
|
|
1312
|
+
var import_system24 = require("@marigold/system");
|
|
1313
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1314
|
+
var CheckMark = () => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1288
1315
|
"path",
|
|
1289
1316
|
{
|
|
1290
1317
|
fill: "currentColor",
|
|
@@ -1292,7 +1319,7 @@ var CheckMark = () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { vie
|
|
|
1292
1319
|
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"
|
|
1293
1320
|
}
|
|
1294
1321
|
) });
|
|
1295
|
-
var IndeterminateMark = () => /* @__PURE__ */ (0,
|
|
1322
|
+
var IndeterminateMark = () => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1296
1323
|
"path",
|
|
1297
1324
|
{
|
|
1298
1325
|
fill: "currentColor",
|
|
@@ -1301,11 +1328,11 @@ var IndeterminateMark = () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg
|
|
|
1301
1328
|
}
|
|
1302
1329
|
) });
|
|
1303
1330
|
var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
1304
|
-
return /* @__PURE__ */ (0,
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1305
1332
|
"div",
|
|
1306
1333
|
{
|
|
1307
1334
|
"aria-hidden": "true",
|
|
1308
|
-
className: (0,
|
|
1335
|
+
className: (0, import_system24.cn)(
|
|
1309
1336
|
"flex shrink-0 grow-0 basis-4 items-center justify-center",
|
|
1310
1337
|
"h-4 w-4 p-px",
|
|
1311
1338
|
"bg-white",
|
|
@@ -1313,7 +1340,7 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1313
1340
|
className
|
|
1314
1341
|
),
|
|
1315
1342
|
...props,
|
|
1316
|
-
children: indeterminate ? /* @__PURE__ */ (0,
|
|
1343
|
+
children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IndeterminateMark, {}) : checked ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CheckMark, {}) : null
|
|
1317
1344
|
}
|
|
1318
1345
|
);
|
|
1319
1346
|
};
|
|
@@ -1342,19 +1369,19 @@ var _Checkbox = (0, import_react19.forwardRef)(
|
|
|
1342
1369
|
defaultSelected: defaultChecked,
|
|
1343
1370
|
...rest
|
|
1344
1371
|
};
|
|
1345
|
-
const classNames2 = (0,
|
|
1346
|
-
return /* @__PURE__ */ (0,
|
|
1347
|
-
|
|
1372
|
+
const classNames2 = (0, import_system24.useClassNames)({ component: "Checkbox", variant, size });
|
|
1373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1374
|
+
import_react_aria_components5.Checkbox,
|
|
1348
1375
|
{
|
|
1349
1376
|
ref,
|
|
1350
|
-
className: (0,
|
|
1377
|
+
className: (0, import_system24.cn)(
|
|
1351
1378
|
"group/checkbox flex items-center gap-[0.5rem]",
|
|
1352
1379
|
"cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
1353
1380
|
classNames2.container
|
|
1354
1381
|
),
|
|
1355
1382
|
...props,
|
|
1356
|
-
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0,
|
|
1357
|
-
/* @__PURE__ */ (0,
|
|
1383
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1358
1385
|
Icon,
|
|
1359
1386
|
{
|
|
1360
1387
|
checked: isSelected,
|
|
@@ -1362,7 +1389,7 @@ var _Checkbox = (0, import_react19.forwardRef)(
|
|
|
1362
1389
|
className: classNames2.checkbox
|
|
1363
1390
|
}
|
|
1364
1391
|
),
|
|
1365
|
-
/* @__PURE__ */ (0,
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: classNames2.label, children })
|
|
1366
1393
|
] })
|
|
1367
1394
|
}
|
|
1368
1395
|
);
|
|
@@ -1370,27 +1397,28 @@ var _Checkbox = (0, import_react19.forwardRef)(
|
|
|
1370
1397
|
);
|
|
1371
1398
|
|
|
1372
1399
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1373
|
-
var
|
|
1374
|
-
var
|
|
1400
|
+
var import_react_aria_components7 = require("react-aria-components");
|
|
1401
|
+
var import_system27 = require("@marigold/system");
|
|
1375
1402
|
|
|
1376
1403
|
// src/FieldBase/_FieldBase.tsx
|
|
1377
1404
|
var import_react20 = require("react");
|
|
1378
|
-
var
|
|
1405
|
+
var import_system26 = require("@marigold/system");
|
|
1379
1406
|
|
|
1380
1407
|
// src/HelpText/_HelpText.tsx
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1383
|
-
var
|
|
1408
|
+
var import_react_aria_components6 = require("react-aria-components");
|
|
1409
|
+
var import_system25 = require("@marigold/system");
|
|
1410
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1384
1411
|
var HelpText2 = ({
|
|
1385
1412
|
variant,
|
|
1386
1413
|
size,
|
|
1387
1414
|
description,
|
|
1388
1415
|
error,
|
|
1389
1416
|
errorMessage,
|
|
1417
|
+
isInvalid,
|
|
1390
1418
|
...props
|
|
1391
1419
|
}) => {
|
|
1392
1420
|
const hasErrorMessage = errorMessage && error;
|
|
1393
|
-
const classNames2 = (0,
|
|
1421
|
+
const classNames2 = (0, import_system25.useClassNames)({
|
|
1394
1422
|
component: "HelpText",
|
|
1395
1423
|
variant,
|
|
1396
1424
|
size
|
|
@@ -1398,31 +1426,33 @@ var HelpText2 = ({
|
|
|
1398
1426
|
if (!description && !errorMessage) {
|
|
1399
1427
|
return null;
|
|
1400
1428
|
}
|
|
1401
|
-
return /* @__PURE__ */ (0,
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: (0, import_system25.cn)(classNames2.container), children: [
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1431
|
+
import_react_aria_components6.FieldError,
|
|
1432
|
+
{
|
|
1433
|
+
...props,
|
|
1434
|
+
className: "grid grid-flow-col items-center justify-start gap-1",
|
|
1435
|
+
children: [
|
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1437
|
+
"svg",
|
|
1438
|
+
{
|
|
1439
|
+
className: (0, import_system25.cn)("h-4 w-4", classNames2.icon),
|
|
1440
|
+
viewBox: "0 0 24 24",
|
|
1441
|
+
role: "presentation",
|
|
1442
|
+
fill: "currentColor",
|
|
1443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
1444
|
+
}
|
|
1445
|
+
),
|
|
1446
|
+
errorMessage
|
|
1447
|
+
]
|
|
1448
|
+
}
|
|
1449
|
+
),
|
|
1450
|
+
!hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components6.Text, { slot: "description", children: description })
|
|
1451
|
+
] });
|
|
1422
1452
|
};
|
|
1423
1453
|
|
|
1424
1454
|
// src/FieldBase/_FieldBase.tsx
|
|
1425
|
-
var
|
|
1455
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1426
1456
|
var fixedForwardRef = import_react20.forwardRef;
|
|
1427
1457
|
var _FieldBase = (props, ref) => {
|
|
1428
1458
|
const {
|
|
@@ -1435,23 +1465,26 @@ var _FieldBase = (props, ref) => {
|
|
|
1435
1465
|
description,
|
|
1436
1466
|
errorMessage,
|
|
1437
1467
|
className,
|
|
1468
|
+
stateProps,
|
|
1438
1469
|
...rest
|
|
1439
1470
|
} = props;
|
|
1440
|
-
const classNames2 = (0,
|
|
1471
|
+
const classNames2 = (0, import_system26.useClassNames)({
|
|
1441
1472
|
component: "Field",
|
|
1442
1473
|
variant,
|
|
1443
1474
|
size
|
|
1444
1475
|
});
|
|
1445
|
-
return /* @__PURE__ */ (0,
|
|
1476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1446
1477
|
Component,
|
|
1447
1478
|
{
|
|
1448
1479
|
ref,
|
|
1449
|
-
className: (0,
|
|
1480
|
+
className: (0, import_system26.cn)("group/field", import_system26.width[width], classNames2, className),
|
|
1481
|
+
"data-required": props.isRequired ? true : void 0,
|
|
1482
|
+
"data-error": props.isInvalid ? true : void 0,
|
|
1450
1483
|
...rest,
|
|
1451
1484
|
children: [
|
|
1452
|
-
label ? /* @__PURE__ */ (0,
|
|
1485
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(_Label, { variant, size, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { "aria-hidden": "true" }),
|
|
1453
1486
|
children,
|
|
1454
|
-
/* @__PURE__ */ (0,
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1455
1488
|
HelpText2,
|
|
1456
1489
|
{
|
|
1457
1490
|
variant,
|
|
@@ -1468,7 +1501,7 @@ var _FieldBase = (props, ref) => {
|
|
|
1468
1501
|
var FieldBase2 = fixedForwardRef(_FieldBase);
|
|
1469
1502
|
|
|
1470
1503
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1471
|
-
var
|
|
1504
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1472
1505
|
var _CheckboxGroup = ({
|
|
1473
1506
|
children,
|
|
1474
1507
|
variant,
|
|
@@ -1479,7 +1512,7 @@ var _CheckboxGroup = ({
|
|
|
1479
1512
|
error,
|
|
1480
1513
|
...rest
|
|
1481
1514
|
}) => {
|
|
1482
|
-
const classNames2 = (0,
|
|
1515
|
+
const classNames2 = (0, import_system27.useClassNames)({
|
|
1483
1516
|
component: "Checkbox",
|
|
1484
1517
|
variant,
|
|
1485
1518
|
size,
|
|
@@ -1493,13 +1526,13 @@ var _CheckboxGroup = ({
|
|
|
1493
1526
|
isInvalid: error,
|
|
1494
1527
|
...rest
|
|
1495
1528
|
};
|
|
1496
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldBase2, { as: import_react_aria_components7.CheckboxGroup, ...props, children });
|
|
1497
1530
|
};
|
|
1498
1531
|
|
|
1499
1532
|
// src/Columns/Columns.tsx
|
|
1500
1533
|
var import_react21 = require("react");
|
|
1501
|
-
var
|
|
1502
|
-
var
|
|
1534
|
+
var import_system28 = require("@marigold/system");
|
|
1535
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1503
1536
|
var Columns = ({
|
|
1504
1537
|
space = 0,
|
|
1505
1538
|
columns,
|
|
@@ -1515,22 +1548,22 @@ var Columns = ({
|
|
|
1515
1548
|
)}`
|
|
1516
1549
|
);
|
|
1517
1550
|
}
|
|
1518
|
-
return /* @__PURE__ */ (0,
|
|
1551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1519
1552
|
"div",
|
|
1520
1553
|
{
|
|
1521
|
-
className: (0,
|
|
1554
|
+
className: (0, import_system28.cn)(
|
|
1522
1555
|
"flex flex-wrap items-stretch",
|
|
1523
1556
|
stretch && "h-full",
|
|
1524
|
-
|
|
1557
|
+
import_system28.gapSpace[space]
|
|
1525
1558
|
),
|
|
1526
1559
|
...props,
|
|
1527
|
-
children: import_react21.Children.map(children, (child, idx) => /* @__PURE__ */ (0,
|
|
1560
|
+
children: import_react21.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1528
1561
|
"div",
|
|
1529
1562
|
{
|
|
1530
|
-
className: (0,
|
|
1563
|
+
className: (0, import_system28.cn)(
|
|
1531
1564
|
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1532
1565
|
),
|
|
1533
|
-
style: (0,
|
|
1566
|
+
style: (0, import_system28.createVar)({ collapseAt, columnSize: columns[idx] }),
|
|
1534
1567
|
children: (0, import_react21.isValidElement)(child) ? (0, import_react21.cloneElement)(child) : child
|
|
1535
1568
|
}
|
|
1536
1569
|
))
|
|
@@ -1539,8 +1572,8 @@ var Columns = ({
|
|
|
1539
1572
|
};
|
|
1540
1573
|
|
|
1541
1574
|
// src/Container/Container.tsx
|
|
1542
|
-
var
|
|
1543
|
-
var
|
|
1575
|
+
var import_system29 = require("@marigold/system");
|
|
1576
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1544
1577
|
var content = {
|
|
1545
1578
|
small: "20ch",
|
|
1546
1579
|
medium: "45ch",
|
|
@@ -1560,44 +1593,30 @@ var Container = ({
|
|
|
1560
1593
|
...props
|
|
1561
1594
|
}) => {
|
|
1562
1595
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1563
|
-
return /* @__PURE__ */ (0,
|
|
1596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1564
1597
|
"div",
|
|
1565
1598
|
{
|
|
1566
1599
|
...props,
|
|
1567
|
-
className: (0,
|
|
1600
|
+
className: (0, import_system29.cn)(
|
|
1568
1601
|
"grid",
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1602
|
+
import_system29.placeItems[alignItems],
|
|
1603
|
+
import_system29.gridColsAlign[align],
|
|
1604
|
+
import_system29.gridColumn[align]
|
|
1572
1605
|
),
|
|
1573
|
-
style: (0,
|
|
1606
|
+
style: (0, import_system29.createVar)({ maxWidth }),
|
|
1574
1607
|
children
|
|
1575
1608
|
}
|
|
1576
1609
|
);
|
|
1577
1610
|
};
|
|
1578
1611
|
|
|
1579
1612
|
// src/Dialog/Dialog.tsx
|
|
1580
|
-
var
|
|
1581
|
-
var
|
|
1582
|
-
var
|
|
1583
|
-
var import_system30 = require("@marigold/system");
|
|
1584
|
-
|
|
1585
|
-
// src/Header/Header.tsx
|
|
1586
|
-
var import_react_aria_components6 = require("react-aria-components");
|
|
1587
|
-
var import_system28 = require("@marigold/system");
|
|
1588
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1589
|
-
var _Header = ({ variant, size, ...props }) => {
|
|
1590
|
-
const classNames2 = (0, import_system28.useClassNames)({
|
|
1591
|
-
component: "Header",
|
|
1592
|
-
variant,
|
|
1593
|
-
size
|
|
1594
|
-
});
|
|
1595
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components6.Header, { className: classNames2, ...props, children: props.children });
|
|
1596
|
-
};
|
|
1613
|
+
var import_react23 = require("react");
|
|
1614
|
+
var import_react_aria_components10 = require("react-aria-components");
|
|
1615
|
+
var import_system31 = require("@marigold/system");
|
|
1597
1616
|
|
|
1598
1617
|
// src/Headline/Headline.tsx
|
|
1599
|
-
var
|
|
1600
|
-
var
|
|
1618
|
+
var import_react_aria_components8 = require("react-aria-components");
|
|
1619
|
+
var import_system30 = require("@marigold/system");
|
|
1601
1620
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1602
1621
|
var _Headline = ({
|
|
1603
1622
|
variant,
|
|
@@ -1608,20 +1627,20 @@ var _Headline = ({
|
|
|
1608
1627
|
level = 1,
|
|
1609
1628
|
...props
|
|
1610
1629
|
}) => {
|
|
1611
|
-
const theme = (0,
|
|
1612
|
-
const classNames2 = (0,
|
|
1630
|
+
const theme = (0, import_system30.useTheme)();
|
|
1631
|
+
const classNames2 = (0, import_system30.useClassNames)({
|
|
1613
1632
|
component: "Headline",
|
|
1614
1633
|
variant,
|
|
1615
1634
|
size: size != null ? size : `level-${level}`
|
|
1616
1635
|
});
|
|
1617
1636
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1618
|
-
|
|
1637
|
+
import_react_aria_components8.Heading,
|
|
1619
1638
|
{
|
|
1620
1639
|
level: Number(level),
|
|
1621
1640
|
...props,
|
|
1622
|
-
className: (0,
|
|
1623
|
-
style: (0,
|
|
1624
|
-
color: color && theme.colors && (0,
|
|
1641
|
+
className: (0, import_system30.cn)(classNames2, "text-[--color]", import_system30.textAlign[align]),
|
|
1642
|
+
style: (0, import_system30.createVar)({
|
|
1643
|
+
color: color && theme.colors && (0, import_system30.get)(
|
|
1625
1644
|
theme.colors,
|
|
1626
1645
|
color.replace("-", "."),
|
|
1627
1646
|
color
|
|
@@ -1633,96 +1652,50 @@ var _Headline = ({
|
|
|
1633
1652
|
);
|
|
1634
1653
|
};
|
|
1635
1654
|
|
|
1636
|
-
// src/Dialog/
|
|
1655
|
+
// src/Dialog/DialogTrigger.tsx
|
|
1637
1656
|
var import_react22 = require("react");
|
|
1638
|
-
var
|
|
1639
|
-
var useDialogContext = () => (0, import_react22.useContext)(DialogContext);
|
|
1640
|
-
|
|
1641
|
-
// src/Dialog/DialogController.tsx
|
|
1642
|
-
var import_overlays5 = require("@react-stately/overlays");
|
|
1657
|
+
var import_react_aria_components9 = require("react-aria-components");
|
|
1643
1658
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1644
|
-
var
|
|
1645
|
-
children,
|
|
1646
|
-
dismissable = true,
|
|
1647
|
-
keyboardDismissable = true,
|
|
1659
|
+
var _DialogTrigger = ({
|
|
1648
1660
|
open,
|
|
1649
|
-
|
|
1661
|
+
dismissable,
|
|
1662
|
+
keyboardDismissable,
|
|
1663
|
+
...rest
|
|
1650
1664
|
}) => {
|
|
1651
|
-
const
|
|
1665
|
+
const props = {
|
|
1652
1666
|
isOpen: open,
|
|
1653
|
-
|
|
1654
|
-
}
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
children
|
|
1664
|
-
}
|
|
1665
|
-
) }) });
|
|
1666
|
-
};
|
|
1667
|
-
|
|
1668
|
-
// src/Dialog/DialogTrigger.tsx
|
|
1669
|
-
var import_react23 = require("react");
|
|
1670
|
-
var import_interactions2 = require("@react-aria/interactions");
|
|
1671
|
-
var import_overlays6 = require("@react-stately/overlays");
|
|
1672
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1673
|
-
var DialogTrigger = ({
|
|
1674
|
-
children,
|
|
1675
|
-
dismissable = true,
|
|
1676
|
-
keyboardDismissable = true
|
|
1677
|
-
}) => {
|
|
1678
|
-
const [dialogTrigger, dialog] = import_react23.Children.toArray(children);
|
|
1679
|
-
const dialogTriggerRef = (0, import_react23.useRef)(null);
|
|
1680
|
-
const state = (0, import_overlays6.useOverlayTriggerState)({});
|
|
1681
|
-
const ctx = { open: state.isOpen, close: state.close };
|
|
1682
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DialogContext.Provider, { value: ctx, children: [
|
|
1683
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1684
|
-
import_interactions2.PressResponder,
|
|
1685
|
-
{
|
|
1686
|
-
ref: dialogTriggerRef,
|
|
1687
|
-
isPressed: state.isOpen,
|
|
1688
|
-
onPress: state.toggle,
|
|
1689
|
-
children: dialogTrigger
|
|
1690
|
-
}
|
|
1691
|
-
),
|
|
1692
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Overlay, { open: state.isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1693
|
-
Modal,
|
|
1667
|
+
...rest
|
|
1668
|
+
};
|
|
1669
|
+
const children = import_react22.Children.toArray(props.children);
|
|
1670
|
+
const [dialogTrigger, dialog] = children;
|
|
1671
|
+
const hasDialogTrigger = dialogTrigger.type !== _Dialog;
|
|
1672
|
+
const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_aria_components9.DialogTrigger, { ...props, children: [
|
|
1674
|
+
hasDialogTrigger && dialogTrigger,
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1676
|
+
_Modal,
|
|
1694
1677
|
{
|
|
1695
|
-
open: state.isOpen,
|
|
1696
|
-
onClose: state.close,
|
|
1697
1678
|
dismissable,
|
|
1698
1679
|
keyboardDismissable,
|
|
1699
|
-
children:
|
|
1680
|
+
children: currentDialog
|
|
1700
1681
|
}
|
|
1701
|
-
)
|
|
1682
|
+
)
|
|
1702
1683
|
] });
|
|
1703
1684
|
};
|
|
1704
1685
|
|
|
1705
1686
|
// src/Dialog/Dialog.tsx
|
|
1706
|
-
var
|
|
1687
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1707
1688
|
var CloseButton = ({ className }) => {
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1710
|
-
const { buttonProps } = (0, import_button3.useButton)(
|
|
1711
|
-
{
|
|
1712
|
-
onPress: () => close == null ? void 0 : close()
|
|
1713
|
-
},
|
|
1714
|
-
ref
|
|
1715
|
-
);
|
|
1716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1689
|
+
const { close } = (0, import_react23.useContext)(import_react_aria_components10.OverlayTriggerStateContext);
|
|
1690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1717
1691
|
"button",
|
|
1718
1692
|
{
|
|
1719
|
-
className: (0,
|
|
1693
|
+
className: (0, import_system31.cn)(
|
|
1720
1694
|
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
1721
1695
|
className
|
|
1722
1696
|
),
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1697
|
+
onClick: close,
|
|
1698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1726
1699
|
"path",
|
|
1727
1700
|
{
|
|
1728
1701
|
fillRule: "evenodd",
|
|
@@ -1733,88 +1706,96 @@ var CloseButton = ({ className }) => {
|
|
|
1733
1706
|
}
|
|
1734
1707
|
) });
|
|
1735
1708
|
};
|
|
1736
|
-
var
|
|
1737
|
-
|
|
1738
|
-
const titleIndex = childs.findIndex(
|
|
1739
|
-
(child) => (0, import_react24.isValidElement)(child) && (child.type === _Header || child.type === _Headline)
|
|
1740
|
-
);
|
|
1741
|
-
if (titleIndex < 0) {
|
|
1742
|
-
console.warn(
|
|
1743
|
-
"No child in <Dialog> found that can act as title for accessibility. Please add a <Header> or <Headline> as direct child."
|
|
1744
|
-
);
|
|
1745
|
-
return children;
|
|
1746
|
-
}
|
|
1747
|
-
const titleChild = (0, import_react24.cloneElement)(
|
|
1748
|
-
childs[titleIndex],
|
|
1749
|
-
titleProps
|
|
1750
|
-
);
|
|
1751
|
-
childs.splice(titleIndex, 1, titleChild);
|
|
1752
|
-
return childs;
|
|
1753
|
-
};
|
|
1754
|
-
var Dialog = ({
|
|
1755
|
-
children,
|
|
1709
|
+
var DialogHeadline = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(_Headline, { slot: "title", children });
|
|
1710
|
+
var _Dialog = ({
|
|
1756
1711
|
variant,
|
|
1757
1712
|
size,
|
|
1758
1713
|
closeButton,
|
|
1714
|
+
isNonModal,
|
|
1759
1715
|
...props
|
|
1760
1716
|
}) => {
|
|
1761
|
-
const
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1717
|
+
const classNames2 = (0, import_system31.useClassNames)({ component: "Dialog", variant, size });
|
|
1718
|
+
let state = (0, import_react23.useContext)(import_react_aria_components10.OverlayTriggerStateContext);
|
|
1719
|
+
let children = props.children;
|
|
1720
|
+
if (typeof children === "function") {
|
|
1721
|
+
children = children({
|
|
1722
|
+
close: (state == null ? void 0 : state.close) || (() => {
|
|
1723
|
+
})
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1727
|
+
import_react_aria_components10.Dialog,
|
|
1728
|
+
{
|
|
1729
|
+
...props,
|
|
1730
|
+
className: (0, import_system31.cn)("relative outline-none", classNames2.container),
|
|
1731
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
1732
|
+
closeButton && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CloseButton, { className: classNames2.closeButton }),
|
|
1733
|
+
children
|
|
1734
|
+
] })
|
|
1735
|
+
}
|
|
1736
|
+
);
|
|
1769
1737
|
};
|
|
1770
|
-
|
|
1771
|
-
|
|
1738
|
+
_Dialog.Trigger = _DialogTrigger;
|
|
1739
|
+
_Dialog.Headline = DialogHeadline;
|
|
1772
1740
|
|
|
1773
1741
|
// src/Divider/Divider.tsx
|
|
1774
|
-
var
|
|
1775
|
-
var
|
|
1776
|
-
var
|
|
1742
|
+
var import_react_aria_components11 = require("react-aria-components");
|
|
1743
|
+
var import_system32 = require("@marigold/system");
|
|
1744
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1777
1745
|
var _Divider = ({ variant, ...props }) => {
|
|
1778
|
-
const classNames2 = (0,
|
|
1779
|
-
return /* @__PURE__ */ (0,
|
|
1746
|
+
const classNames2 = (0, import_system32.useClassNames)({ component: "Divider", variant });
|
|
1747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components11.Separator, { className: classNames2, ...props });
|
|
1780
1748
|
};
|
|
1781
1749
|
|
|
1782
1750
|
// src/Footer/Footer.tsx
|
|
1783
|
-
var
|
|
1784
|
-
var
|
|
1751
|
+
var import_system33 = require("@marigold/system");
|
|
1752
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1785
1753
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1786
|
-
const classNames2 = (0,
|
|
1787
|
-
return /* @__PURE__ */ (0,
|
|
1754
|
+
const classNames2 = (0, import_system33.useClassNames)({ component: "Footer", variant, size });
|
|
1755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("footer", { ...props, className: classNames2, children });
|
|
1788
1756
|
};
|
|
1789
1757
|
|
|
1790
|
-
// src/
|
|
1791
|
-
var
|
|
1792
|
-
var
|
|
1793
|
-
var
|
|
1794
|
-
|
|
1758
|
+
// src/Header/Header.tsx
|
|
1759
|
+
var import_react_aria_components12 = require("react-aria-components");
|
|
1760
|
+
var import_system34 = require("@marigold/system");
|
|
1761
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1762
|
+
var _Header = ({ variant, size, ...props }) => {
|
|
1763
|
+
const classNames2 = (0, import_system34.useClassNames)({
|
|
1764
|
+
component: "Header",
|
|
1765
|
+
variant,
|
|
1766
|
+
size
|
|
1767
|
+
});
|
|
1768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components12.Header, { className: classNames2, ...props, children: props.children });
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
// src/Image/Image.tsx
|
|
1772
|
+
var import_system35 = require("@marigold/system");
|
|
1773
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1774
|
+
var Image = ({
|
|
1775
|
+
variant,
|
|
1795
1776
|
size,
|
|
1796
1777
|
fit = "none",
|
|
1797
1778
|
position = "none",
|
|
1798
1779
|
...props
|
|
1799
1780
|
}) => {
|
|
1800
|
-
const classNames2 = (0,
|
|
1781
|
+
const classNames2 = (0, import_system35.useClassNames)({ component: "Image", variant, size });
|
|
1801
1782
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1802
1783
|
"img",
|
|
1803
1784
|
{
|
|
1804
1785
|
...props,
|
|
1805
1786
|
alt: props.alt,
|
|
1806
|
-
className: (0,
|
|
1787
|
+
className: (0, import_system35.cn)(
|
|
1807
1788
|
fit !== "none" && "h-full w-full",
|
|
1808
1789
|
classNames2,
|
|
1809
|
-
|
|
1810
|
-
|
|
1790
|
+
import_system35.objectFit[fit],
|
|
1791
|
+
import_system35.objectPosition[position]
|
|
1811
1792
|
)
|
|
1812
1793
|
}
|
|
1813
1794
|
);
|
|
1814
1795
|
};
|
|
1815
1796
|
|
|
1816
1797
|
// src/Inline/Inline.tsx
|
|
1817
|
-
var
|
|
1798
|
+
var import_system36 = require("@marigold/system");
|
|
1818
1799
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1819
1800
|
var Inline = ({
|
|
1820
1801
|
space = 0,
|
|
@@ -1829,11 +1810,11 @@ var Inline = ({
|
|
|
1829
1810
|
"div",
|
|
1830
1811
|
{
|
|
1831
1812
|
...props,
|
|
1832
|
-
className: (0,
|
|
1813
|
+
className: (0, import_system36.cn)(
|
|
1833
1814
|
"flex flex-wrap",
|
|
1834
|
-
|
|
1835
|
-
alignX && ((_b2 = (_a2 =
|
|
1836
|
-
alignY && ((_d = (_c =
|
|
1815
|
+
import_system36.gapSpace[space],
|
|
1816
|
+
alignX && ((_b2 = (_a2 = import_system36.alignment) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
1817
|
+
alignY && ((_d = (_c = import_system36.alignment) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY])
|
|
1837
1818
|
),
|
|
1838
1819
|
children
|
|
1839
1820
|
}
|
|
@@ -1842,21 +1823,21 @@ var Inline = ({
|
|
|
1842
1823
|
|
|
1843
1824
|
// src/DateField/DateField.tsx
|
|
1844
1825
|
var import_date = require("@internationalized/date");
|
|
1845
|
-
var
|
|
1826
|
+
var import_react25 = require("react");
|
|
1846
1827
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
1847
|
-
var
|
|
1828
|
+
var import_focus6 = require("@react-aria/focus");
|
|
1848
1829
|
var import_i18n3 = require("@react-aria/i18n");
|
|
1849
|
-
var
|
|
1850
|
-
var
|
|
1830
|
+
var import_interactions2 = require("@react-aria/interactions");
|
|
1831
|
+
var import_utils10 = require("@react-aria/utils");
|
|
1851
1832
|
var import_datepicker3 = require("@react-stately/datepicker");
|
|
1852
|
-
var
|
|
1833
|
+
var import_system38 = require("@marigold/system");
|
|
1853
1834
|
|
|
1854
1835
|
// src/DateField/DateSegment.tsx
|
|
1855
|
-
var
|
|
1836
|
+
var import_react24 = require("react");
|
|
1856
1837
|
var import_datepicker = require("@react-aria/datepicker");
|
|
1857
|
-
var
|
|
1858
|
-
var
|
|
1859
|
-
var
|
|
1838
|
+
var import_focus5 = require("@react-aria/focus");
|
|
1839
|
+
var import_utils9 = require("@react-aria/utils");
|
|
1840
|
+
var import_system37 = require("@marigold/system");
|
|
1860
1841
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1861
1842
|
var DateSegment = ({
|
|
1862
1843
|
className,
|
|
@@ -1864,13 +1845,13 @@ var DateSegment = ({
|
|
|
1864
1845
|
state,
|
|
1865
1846
|
isPrevPlaceholder
|
|
1866
1847
|
}) => {
|
|
1867
|
-
const ref = (0,
|
|
1848
|
+
const ref = (0, import_react24.useRef)(null);
|
|
1868
1849
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
1869
|
-
const { focusProps, isFocused } = (0,
|
|
1850
|
+
const { focusProps, isFocused } = (0, import_focus5.useFocusRing)({
|
|
1870
1851
|
within: true,
|
|
1871
1852
|
isTextInput: true
|
|
1872
1853
|
});
|
|
1873
|
-
const stateProps = (0,
|
|
1854
|
+
const stateProps = (0, import_system37.useStateProps)({
|
|
1874
1855
|
disabled: state.isDisabled,
|
|
1875
1856
|
focusVisible: isFocused
|
|
1876
1857
|
});
|
|
@@ -1878,9 +1859,9 @@ var DateSegment = ({
|
|
|
1878
1859
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
1879
1860
|
"div",
|
|
1880
1861
|
{
|
|
1881
|
-
...(0,
|
|
1862
|
+
...(0, import_utils9.mergeProps)(segmentProps, stateProps, focusProps),
|
|
1882
1863
|
ref,
|
|
1883
|
-
className: (0,
|
|
1864
|
+
className: (0, import_system37.cn)(
|
|
1884
1865
|
"group/segment",
|
|
1885
1866
|
"text-center leading-none outline-0",
|
|
1886
1867
|
type !== "literal" && "p-0.5",
|
|
@@ -1895,7 +1876,7 @@ var DateSegment = ({
|
|
|
1895
1876
|
"span",
|
|
1896
1877
|
{
|
|
1897
1878
|
"aria-hidden": "true",
|
|
1898
|
-
className: (0,
|
|
1879
|
+
className: (0, import_system37.cn)(
|
|
1899
1880
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1900
1881
|
"pointer-events-none w-full text-center"
|
|
1901
1882
|
),
|
|
@@ -1938,20 +1919,20 @@ var DateField = ({
|
|
|
1938
1919
|
locale,
|
|
1939
1920
|
createCalendar: import_date.createCalendar
|
|
1940
1921
|
});
|
|
1941
|
-
const ref = (0,
|
|
1922
|
+
const ref = (0, import_react25.useRef)(null);
|
|
1942
1923
|
const { fieldProps, labelProps, descriptionProps } = (0, import_datepicker2.useDateField)(
|
|
1943
1924
|
props,
|
|
1944
1925
|
state,
|
|
1945
1926
|
ref
|
|
1946
1927
|
);
|
|
1947
|
-
const classNames2 = (0,
|
|
1948
|
-
const { focusProps, isFocused } = (0,
|
|
1928
|
+
const classNames2 = (0, import_system38.useClassNames)({ component: "DateField", variant, size });
|
|
1929
|
+
const { focusProps, isFocused } = (0, import_focus6.useFocusRing)({
|
|
1949
1930
|
within: true,
|
|
1950
1931
|
isTextInput: true,
|
|
1951
1932
|
autoFocus: props.autoFocus
|
|
1952
1933
|
});
|
|
1953
|
-
const { hoverProps, isHovered } = (0,
|
|
1954
|
-
const stateProps = (0,
|
|
1934
|
+
const { hoverProps, isHovered } = (0, import_interactions2.useHover)({ isDisabled: disabled });
|
|
1935
|
+
const stateProps = (0, import_system38.useStateProps)({
|
|
1955
1936
|
hover: isHovered,
|
|
1956
1937
|
error,
|
|
1957
1938
|
readOnly,
|
|
@@ -1977,8 +1958,8 @@ var DateField = ({
|
|
|
1977
1958
|
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
1978
1959
|
"div",
|
|
1979
1960
|
{
|
|
1980
|
-
...(0,
|
|
1981
|
-
className: (0,
|
|
1961
|
+
...(0, import_utils10.mergeProps)(fieldProps, focusProps, stateProps, hoverProps),
|
|
1962
|
+
className: (0, import_system38.cn)(
|
|
1982
1963
|
"relative flex flex-row flex-nowrap",
|
|
1983
1964
|
"cursor-text aria-disabled:cursor-not-allowed",
|
|
1984
1965
|
classNames2.field
|
|
@@ -2003,7 +1984,7 @@ var DateField = ({
|
|
|
2003
1984
|
"svg",
|
|
2004
1985
|
{
|
|
2005
1986
|
"data-testid": "action",
|
|
2006
|
-
className: (0,
|
|
1987
|
+
className: (0, import_system38.cn)(classNames2.action),
|
|
2007
1988
|
viewBox: "0 0 24 24",
|
|
2008
1989
|
width: 24,
|
|
2009
1990
|
height: 24,
|
|
@@ -2019,39 +2000,39 @@ var DateField = ({
|
|
|
2019
2000
|
|
|
2020
2001
|
// src/Calendar/Calendar.tsx
|
|
2021
2002
|
var import_date3 = require("@internationalized/date");
|
|
2022
|
-
var
|
|
2003
|
+
var import_react29 = require("react");
|
|
2023
2004
|
var import_calendar3 = require("@react-aria/calendar");
|
|
2024
2005
|
var import_i18n7 = require("@react-aria/i18n");
|
|
2025
2006
|
var import_calendar4 = require("@react-stately/calendar");
|
|
2026
2007
|
var import_icons = require("@marigold/icons");
|
|
2027
|
-
var
|
|
2008
|
+
var import_system40 = require("@marigold/system");
|
|
2028
2009
|
|
|
2029
2010
|
// src/Calendar/CalendarGrid.tsx
|
|
2030
2011
|
var import_date2 = require("@internationalized/date");
|
|
2031
|
-
var
|
|
2012
|
+
var import_react27 = require("react");
|
|
2032
2013
|
var import_calendar2 = require("@react-aria/calendar");
|
|
2033
2014
|
var import_i18n4 = require("@react-aria/i18n");
|
|
2034
2015
|
var import_i18n5 = require("@react-aria/i18n");
|
|
2035
2016
|
|
|
2036
2017
|
// src/Calendar/CalendarCell.tsx
|
|
2037
|
-
var
|
|
2018
|
+
var import_react26 = require("react");
|
|
2038
2019
|
var import_calendar = require("@react-aria/calendar");
|
|
2039
|
-
var
|
|
2040
|
-
var
|
|
2041
|
-
var
|
|
2020
|
+
var import_interactions3 = require("@react-aria/interactions");
|
|
2021
|
+
var import_utils11 = require("@react-aria/utils");
|
|
2022
|
+
var import_system39 = require("@marigold/system");
|
|
2042
2023
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2043
2024
|
var CalendarCell = (props) => {
|
|
2044
|
-
const ref = (0,
|
|
2025
|
+
const ref = (0, import_react26.useRef)(null);
|
|
2045
2026
|
const { state } = props;
|
|
2046
2027
|
let { cellProps, buttonProps, formattedDate, isOutsideVisibleRange } = (0, import_calendar.useCalendarCell)(props, state, ref);
|
|
2047
|
-
const classNames2 = (0,
|
|
2028
|
+
const classNames2 = (0, import_system39.useClassNames)({
|
|
2048
2029
|
component: "Calendar"
|
|
2049
2030
|
});
|
|
2050
2031
|
const isDisabled = cellProps["aria-disabled"];
|
|
2051
|
-
const { hoverProps, isHovered } = (0,
|
|
2032
|
+
const { hoverProps, isHovered } = (0, import_interactions3.useHover)({
|
|
2052
2033
|
isDisabled: isDisabled || cellProps["aria-selected"]
|
|
2053
2034
|
});
|
|
2054
|
-
const stateProps = (0,
|
|
2035
|
+
const stateProps = (0, import_system39.useStateProps)({
|
|
2055
2036
|
disabled: isDisabled,
|
|
2056
2037
|
hover: isHovered,
|
|
2057
2038
|
selected: cellProps["aria-selected"]
|
|
@@ -2059,13 +2040,13 @@ var CalendarCell = (props) => {
|
|
|
2059
2040
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "group/cell", ...cellProps, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2060
2041
|
"div",
|
|
2061
2042
|
{
|
|
2062
|
-
className: (0,
|
|
2043
|
+
className: (0, import_system39.cn)(
|
|
2063
2044
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
2064
2045
|
classNames2.calendarCell
|
|
2065
2046
|
),
|
|
2066
2047
|
hidden: isOutsideVisibleRange,
|
|
2067
2048
|
ref,
|
|
2068
|
-
...(0,
|
|
2049
|
+
...(0, import_utils11.mergeProps)(buttonProps, stateProps, hoverProps),
|
|
2069
2050
|
children: formattedDate
|
|
2070
2051
|
}
|
|
2071
2052
|
) });
|
|
@@ -2084,7 +2065,7 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2084
2065
|
weekday: "short",
|
|
2085
2066
|
timeZone: state.timeZone
|
|
2086
2067
|
});
|
|
2087
|
-
const weekDays = (0,
|
|
2068
|
+
const weekDays = (0, import_react27.useMemo)(() => {
|
|
2088
2069
|
const weekStart = (0, import_date2.startOfWeek)((0, import_date2.today)(state.timeZone), locale);
|
|
2089
2070
|
return [...new Array(7).keys()].map((index) => {
|
|
2090
2071
|
const date = weekStart.add({ days: index });
|
|
@@ -2153,7 +2134,7 @@ var MonthDropdown = ({
|
|
|
2153
2134
|
var MonthDropdown_default = MonthDropdown;
|
|
2154
2135
|
|
|
2155
2136
|
// src/Calendar/YearDropdown.tsx
|
|
2156
|
-
var
|
|
2137
|
+
var import_react28 = require("react");
|
|
2157
2138
|
var import_i18n6 = require("@react-aria/i18n");
|
|
2158
2139
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2159
2140
|
var YearDropdown = ({ state, setSelectedDropdown }) => {
|
|
@@ -2169,8 +2150,8 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
|
|
|
2169
2150
|
formatted: formatter.format(date.toDate(state.timeZone))
|
|
2170
2151
|
});
|
|
2171
2152
|
}
|
|
2172
|
-
const activeButtonRef = (0,
|
|
2173
|
-
(0,
|
|
2153
|
+
const activeButtonRef = (0, import_react28.useRef)(null);
|
|
2154
|
+
(0, import_react28.useEffect)(() => {
|
|
2174
2155
|
if (activeButtonRef.current) {
|
|
2175
2156
|
const activeButton = activeButtonRef.current;
|
|
2176
2157
|
activeButton == null ? void 0 : activeButton.scrollIntoView({
|
|
@@ -2240,7 +2221,7 @@ var Calendar = ({
|
|
|
2240
2221
|
locale,
|
|
2241
2222
|
createCalendar: import_date3.createCalendar
|
|
2242
2223
|
});
|
|
2243
|
-
const ref = (0,
|
|
2224
|
+
const ref = (0, import_react29.useRef)(null);
|
|
2244
2225
|
const { calendarProps, prevButtonProps, nextButtonProps } = (0, import_calendar3.useCalendar)(
|
|
2245
2226
|
props,
|
|
2246
2227
|
state
|
|
@@ -2255,13 +2236,13 @@ var Calendar = ({
|
|
|
2255
2236
|
onFocusChange: nextFocusChange,
|
|
2256
2237
|
...nextPropsRest
|
|
2257
2238
|
} = nextButtonProps;
|
|
2258
|
-
const calendarState = (0,
|
|
2239
|
+
const calendarState = (0, import_system40.useStateProps)({
|
|
2259
2240
|
disabled: state.isDisabled,
|
|
2260
2241
|
focusVisible: state.isFocused
|
|
2261
2242
|
});
|
|
2262
|
-
const classNames2 = (0,
|
|
2263
|
-
const { select: selectClassNames } = (0,
|
|
2264
|
-
const [selectedDropdown, setSelectedDropdown] = (0,
|
|
2243
|
+
const classNames2 = (0, import_system40.useClassNames)({ component: "Calendar" });
|
|
2244
|
+
const { select: selectClassNames } = (0, import_system40.useClassNames)({ component: "Select" });
|
|
2245
|
+
const [selectedDropdown, setSelectedDropdown] = (0, import_react29.useState)();
|
|
2265
2246
|
let months = [];
|
|
2266
2247
|
let formatter = (0, import_i18n7.useDateFormatter)({
|
|
2267
2248
|
month: "long",
|
|
@@ -2280,7 +2261,7 @@ var Calendar = ({
|
|
|
2280
2261
|
"div",
|
|
2281
2262
|
{
|
|
2282
2263
|
tabIndex: -1,
|
|
2283
|
-
className: (0,
|
|
2264
|
+
className: (0, import_system40.cn)(
|
|
2284
2265
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4 shadow-[0_4px_4px_rgba(165,165,165,0.25)]",
|
|
2285
2266
|
classNames2.calendar
|
|
2286
2267
|
),
|
|
@@ -2308,7 +2289,7 @@ var Calendar = ({
|
|
|
2308
2289
|
{
|
|
2309
2290
|
disabled: state.isDisabled,
|
|
2310
2291
|
onClick: () => setSelectedDropdown("month"),
|
|
2311
|
-
className: (0,
|
|
2292
|
+
className: (0, import_system40.cn)(buttonStyles, selectClassNames),
|
|
2312
2293
|
"data-testid": "month",
|
|
2313
2294
|
children: [
|
|
2314
2295
|
selectedValue.month,
|
|
@@ -2321,7 +2302,7 @@ var Calendar = ({
|
|
|
2321
2302
|
{
|
|
2322
2303
|
disabled: state.isDisabled,
|
|
2323
2304
|
onClick: () => setSelectedDropdown("year"),
|
|
2324
|
-
className: (0,
|
|
2305
|
+
className: (0, import_system40.cn)(buttonStyles, selectClassNames),
|
|
2325
2306
|
"data-testid": "year",
|
|
2326
2307
|
children: [
|
|
2327
2308
|
selectedValue.year,
|
|
@@ -2333,7 +2314,7 @@ var Calendar = ({
|
|
|
2333
2314
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2334
2315
|
"div",
|
|
2335
2316
|
{
|
|
2336
|
-
className: (0,
|
|
2317
|
+
className: (0, import_system40.cn)(
|
|
2337
2318
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
2338
2319
|
classNames2.calendarControllers
|
|
2339
2320
|
),
|
|
@@ -2351,11 +2332,11 @@ var Calendar = ({
|
|
|
2351
2332
|
};
|
|
2352
2333
|
|
|
2353
2334
|
// src/DatePicker/DatePicker.tsx
|
|
2354
|
-
var
|
|
2335
|
+
var import_react30 = require("react");
|
|
2355
2336
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
2356
|
-
var
|
|
2337
|
+
var import_utils12 = require("@react-aria/utils");
|
|
2357
2338
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
2358
|
-
var
|
|
2339
|
+
var import_system41 = require("@marigold/system");
|
|
2359
2340
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2360
2341
|
var DatePicker = ({
|
|
2361
2342
|
disabled,
|
|
@@ -2380,8 +2361,8 @@ var DatePicker = ({
|
|
|
2380
2361
|
shouldCloseOnSelect,
|
|
2381
2362
|
...props
|
|
2382
2363
|
});
|
|
2383
|
-
const ref = (0,
|
|
2384
|
-
const stateProps = (0,
|
|
2364
|
+
const ref = (0, import_react30.useRef)(null);
|
|
2365
|
+
const stateProps = (0, import_system41.useStateProps)({
|
|
2385
2366
|
focus: state.isOpen
|
|
2386
2367
|
});
|
|
2387
2368
|
const { groupProps, fieldProps, buttonProps, calendarProps } = (0, import_datepicker4.useDatePicker)(
|
|
@@ -2390,7 +2371,7 @@ var DatePicker = ({
|
|
|
2390
2371
|
ref
|
|
2391
2372
|
);
|
|
2392
2373
|
const { isDisabled, errorMessage, description, label } = props;
|
|
2393
|
-
const classNames2 = (0,
|
|
2374
|
+
const classNames2 = (0, import_system41.useClassNames)({
|
|
2394
2375
|
component: "DatePicker",
|
|
2395
2376
|
size,
|
|
2396
2377
|
variant
|
|
@@ -2412,7 +2393,7 @@ var DatePicker = ({
|
|
|
2412
2393
|
action: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2413
2394
|
_Button,
|
|
2414
2395
|
{
|
|
2415
|
-
...(0,
|
|
2396
|
+
...(0, import_utils12.mergeProps)(buttonProps, stateProps),
|
|
2416
2397
|
disabled: isDisabled,
|
|
2417
2398
|
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2418
2399
|
"svg",
|
|
@@ -2433,43 +2414,43 @@ var DatePicker = ({
|
|
|
2433
2414
|
};
|
|
2434
2415
|
|
|
2435
2416
|
// src/Inset/Inset.tsx
|
|
2436
|
-
var
|
|
2417
|
+
var import_system42 = require("@marigold/system");
|
|
2437
2418
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2438
2419
|
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2439
2420
|
"div",
|
|
2440
2421
|
{
|
|
2441
|
-
className: (0,
|
|
2442
|
-
space &&
|
|
2443
|
-
!space && spaceX &&
|
|
2444
|
-
!space && spaceY &&
|
|
2422
|
+
className: (0, import_system42.cn)(
|
|
2423
|
+
space && import_system42.paddingSpace[space],
|
|
2424
|
+
!space && spaceX && import_system42.paddingSpaceX[spaceX],
|
|
2425
|
+
!space && spaceY && import_system42.paddingSpaceY[spaceY]
|
|
2445
2426
|
),
|
|
2446
2427
|
children
|
|
2447
2428
|
}
|
|
2448
2429
|
);
|
|
2449
2430
|
|
|
2450
2431
|
// src/Link/Link.tsx
|
|
2451
|
-
var
|
|
2452
|
-
var
|
|
2453
|
-
var
|
|
2432
|
+
var import_react31 = require("react");
|
|
2433
|
+
var import_react_aria_components13 = require("react-aria-components");
|
|
2434
|
+
var import_system43 = require("@marigold/system");
|
|
2454
2435
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2455
|
-
var _Link = (0,
|
|
2436
|
+
var _Link = (0, import_react31.forwardRef)(
|
|
2456
2437
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
2457
|
-
const classNames2 = (0,
|
|
2438
|
+
const classNames2 = (0, import_system43.useClassNames)({
|
|
2458
2439
|
component: "Link",
|
|
2459
2440
|
variant,
|
|
2460
2441
|
size
|
|
2461
2442
|
});
|
|
2462
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_aria_components13.Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
2463
2444
|
}
|
|
2464
2445
|
);
|
|
2465
2446
|
|
|
2466
2447
|
// src/List/List.tsx
|
|
2467
|
-
var
|
|
2448
|
+
var import_system44 = require("@marigold/system");
|
|
2468
2449
|
|
|
2469
2450
|
// src/List/Context.ts
|
|
2470
|
-
var
|
|
2471
|
-
var ListContext = (0,
|
|
2472
|
-
var useListContext = () => (0,
|
|
2451
|
+
var import_react32 = require("react");
|
|
2452
|
+
var ListContext = (0, import_react32.createContext)({});
|
|
2453
|
+
var useListContext = () => (0, import_react32.useContext)(ListContext);
|
|
2473
2454
|
|
|
2474
2455
|
// src/List/ListItem.tsx
|
|
2475
2456
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
@@ -2488,30 +2469,30 @@ var List = ({
|
|
|
2488
2469
|
...props
|
|
2489
2470
|
}) => {
|
|
2490
2471
|
const Component = as;
|
|
2491
|
-
const classNames2 = (0,
|
|
2472
|
+
const classNames2 = (0, import_system44.useClassNames)({ component: "List", variant, size });
|
|
2492
2473
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2493
2474
|
};
|
|
2494
2475
|
List.Item = ListItem;
|
|
2495
2476
|
|
|
2496
2477
|
// src/Menu/Menu.tsx
|
|
2497
|
-
var
|
|
2478
|
+
var import_react36 = require("react");
|
|
2498
2479
|
var import_menu5 = require("@react-aria/menu");
|
|
2499
|
-
var
|
|
2480
|
+
var import_utils15 = require("@react-aria/utils");
|
|
2500
2481
|
var import_collections4 = require("@react-stately/collections");
|
|
2501
2482
|
var import_tree2 = require("@react-stately/tree");
|
|
2502
|
-
var
|
|
2483
|
+
var import_system48 = require("@marigold/system");
|
|
2503
2484
|
|
|
2504
2485
|
// src/Menu/Context.ts
|
|
2505
|
-
var
|
|
2506
|
-
var MenuContext = (0,
|
|
2507
|
-
var useMenuContext = () => (0,
|
|
2486
|
+
var import_react33 = require("react");
|
|
2487
|
+
var MenuContext = (0, import_react33.createContext)({});
|
|
2488
|
+
var useMenuContext = () => (0, import_react33.useContext)(MenuContext);
|
|
2508
2489
|
|
|
2509
2490
|
// src/Menu/MenuItem.tsx
|
|
2510
|
-
var
|
|
2511
|
-
var
|
|
2491
|
+
var import_react34 = require("react");
|
|
2492
|
+
var import_focus7 = require("@react-aria/focus");
|
|
2512
2493
|
var import_menu = require("@react-aria/menu");
|
|
2513
|
-
var
|
|
2514
|
-
var
|
|
2494
|
+
var import_utils13 = require("@react-aria/utils");
|
|
2495
|
+
var import_system45 = require("@marigold/system");
|
|
2515
2496
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2516
2497
|
var MenuItem = ({
|
|
2517
2498
|
item,
|
|
@@ -2519,7 +2500,7 @@ var MenuItem = ({
|
|
|
2519
2500
|
onAction,
|
|
2520
2501
|
className
|
|
2521
2502
|
}) => {
|
|
2522
|
-
const ref = (0,
|
|
2503
|
+
const ref = (0, import_react34.useRef)(null);
|
|
2523
2504
|
const { onClose } = useMenuContext();
|
|
2524
2505
|
const { menuItemProps } = (0, import_menu.useMenuItem)(
|
|
2525
2506
|
{
|
|
@@ -2530,8 +2511,8 @@ var MenuItem = ({
|
|
|
2530
2511
|
state,
|
|
2531
2512
|
ref
|
|
2532
2513
|
);
|
|
2533
|
-
const { isFocusVisible, focusProps } = (0,
|
|
2534
|
-
const stateProps = (0,
|
|
2514
|
+
const { isFocusVisible, focusProps } = (0, import_focus7.useFocusRing)();
|
|
2515
|
+
const stateProps = (0, import_system45.useStateProps)({
|
|
2535
2516
|
focus: isFocusVisible
|
|
2536
2517
|
});
|
|
2537
2518
|
const { onPointerUp, ...props } = menuItemProps;
|
|
@@ -2540,7 +2521,7 @@ var MenuItem = ({
|
|
|
2540
2521
|
{
|
|
2541
2522
|
ref,
|
|
2542
2523
|
className,
|
|
2543
|
-
...(0,
|
|
2524
|
+
...(0, import_utils13.mergeProps)(
|
|
2544
2525
|
props,
|
|
2545
2526
|
{ onPointerDown: onPointerUp },
|
|
2546
2527
|
stateProps,
|
|
@@ -2553,14 +2534,14 @@ var MenuItem = ({
|
|
|
2553
2534
|
|
|
2554
2535
|
// src/Menu/MenuSection.tsx
|
|
2555
2536
|
var import_menu2 = require("@react-aria/menu");
|
|
2556
|
-
var
|
|
2537
|
+
var import_system46 = require("@marigold/system");
|
|
2557
2538
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2558
2539
|
var MenuSection = ({ onAction, item, state }) => {
|
|
2559
2540
|
let { itemProps, headingProps, groupProps } = (0, import_menu2.useMenuSection)({
|
|
2560
2541
|
heading: item.rendered,
|
|
2561
2542
|
"aria-label": item["aria-label"]
|
|
2562
2543
|
});
|
|
2563
|
-
const className = (0,
|
|
2544
|
+
const className = (0, import_system46.useClassNames)({ component: "Menu" });
|
|
2564
2545
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
2565
2546
|
item.key !== state.collection.getFirstKey() && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(_Divider, { variant: "section" }) }),
|
|
2566
2547
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("li", { ...itemProps, children: [
|
|
@@ -2581,12 +2562,12 @@ var MenuSection = ({ onAction, item, state }) => {
|
|
|
2581
2562
|
var MenuSection_default = MenuSection;
|
|
2582
2563
|
|
|
2583
2564
|
// src/Menu/MenuTrigger.tsx
|
|
2584
|
-
var
|
|
2585
|
-
var
|
|
2565
|
+
var import_react35 = require("react");
|
|
2566
|
+
var import_interactions4 = require("@react-aria/interactions");
|
|
2586
2567
|
var import_menu3 = require("@react-aria/menu");
|
|
2587
|
-
var
|
|
2568
|
+
var import_utils14 = require("@react-aria/utils");
|
|
2588
2569
|
var import_menu4 = require("@react-stately/menu");
|
|
2589
|
-
var
|
|
2570
|
+
var import_system47 = require("@marigold/system");
|
|
2590
2571
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2591
2572
|
var MenuTrigger = ({
|
|
2592
2573
|
disabled,
|
|
@@ -2594,9 +2575,9 @@ var MenuTrigger = ({
|
|
|
2594
2575
|
onOpenChange,
|
|
2595
2576
|
children
|
|
2596
2577
|
}) => {
|
|
2597
|
-
const [menuTrigger, menu] =
|
|
2598
|
-
const menuTriggerRef = (0,
|
|
2599
|
-
const menuRef = (0,
|
|
2578
|
+
const [menuTrigger, menu] = import_react35.Children.toArray(children);
|
|
2579
|
+
const menuTriggerRef = (0, import_react35.useRef)(null);
|
|
2580
|
+
const menuRef = (0, import_utils14.useObjectRef)();
|
|
2600
2581
|
const state = (0, import_menu4.useMenuTriggerState)({
|
|
2601
2582
|
isOpen: open,
|
|
2602
2583
|
onOpenChange
|
|
@@ -2613,10 +2594,10 @@ var MenuTrigger = ({
|
|
|
2613
2594
|
onClose: state.close,
|
|
2614
2595
|
autoFocus: state.focusStrategy
|
|
2615
2596
|
};
|
|
2616
|
-
const isSmallScreen = (0,
|
|
2597
|
+
const isSmallScreen = (0, import_system47.useSmallScreen)();
|
|
2617
2598
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(MenuContext.Provider, { value: menuContext, children: [
|
|
2618
2599
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2619
|
-
|
|
2600
|
+
import_interactions4.PressResponder,
|
|
2620
2601
|
{
|
|
2621
2602
|
...menuTriggerProps,
|
|
2622
2603
|
ref: menuTriggerRef,
|
|
@@ -2633,11 +2614,11 @@ var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
|
2633
2614
|
var Menu = ({ variant, size, ...props }) => {
|
|
2634
2615
|
const { ref: scrollRef, ...menuContext } = useMenuContext();
|
|
2635
2616
|
const ownProps = { ...props, ...menuContext };
|
|
2636
|
-
const ref = (0,
|
|
2617
|
+
const ref = (0, import_react36.useRef)(null);
|
|
2637
2618
|
const state = (0, import_tree2.useTreeState)({ ...ownProps, selectionMode: "none" });
|
|
2638
2619
|
const { menuProps } = (0, import_menu5.useMenu)(ownProps, state, ref);
|
|
2639
|
-
(0,
|
|
2640
|
-
const classNames2 = (0,
|
|
2620
|
+
(0, import_utils15.useSyncRef)({ ref: scrollRef }, ref);
|
|
2621
|
+
const classNames2 = (0, import_system48.useClassNames)({ component: "Menu", variant, size });
|
|
2641
2622
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { ref, className: classNames2.container, ...menuProps, children: [...state.collection].map((item) => {
|
|
2642
2623
|
if (item.type === "section") {
|
|
2643
2624
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
@@ -2667,19 +2648,35 @@ Menu.Item = import_collections4.Item;
|
|
|
2667
2648
|
Menu.Section = import_collections4.Section;
|
|
2668
2649
|
|
|
2669
2650
|
// src/Menu/ActionMenu.tsx
|
|
2670
|
-
var
|
|
2651
|
+
var import_system49 = require("@marigold/system");
|
|
2671
2652
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2672
2653
|
var ActionMenu = (props) => {
|
|
2673
2654
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Menu.Trigger, { children: [
|
|
2674
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(_Button, { variant: "menu", size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(_Button, { variant: "menu", size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_system49.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
2675
2656
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Menu, { ...props })
|
|
2676
2657
|
] });
|
|
2677
2658
|
};
|
|
2678
2659
|
|
|
2679
2660
|
// src/Message/Message.tsx
|
|
2680
|
-
var
|
|
2661
|
+
var import_system50 = require("@marigold/system");
|
|
2681
2662
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2682
2663
|
var icons = {
|
|
2664
|
+
success: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2665
|
+
"svg",
|
|
2666
|
+
{
|
|
2667
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2668
|
+
viewBox: "0 0 24 24",
|
|
2669
|
+
fill: "currentColor",
|
|
2670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2671
|
+
"path",
|
|
2672
|
+
{
|
|
2673
|
+
fillRule: "evenodd",
|
|
2674
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",
|
|
2675
|
+
clipRule: "evenodd"
|
|
2676
|
+
}
|
|
2677
|
+
)
|
|
2678
|
+
}
|
|
2679
|
+
),
|
|
2683
2680
|
info: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2684
2681
|
"svg",
|
|
2685
2682
|
{
|
|
@@ -2736,49 +2733,100 @@ var Message = ({
|
|
|
2736
2733
|
children,
|
|
2737
2734
|
...props
|
|
2738
2735
|
}) => {
|
|
2739
|
-
const classNames2 = (0,
|
|
2736
|
+
const classNames2 = (0, import_system50.useClassNames)({ component: "Message", variant, size });
|
|
2740
2737
|
const Icon3 = icons[variant];
|
|
2741
2738
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
2742
2739
|
"div",
|
|
2743
2740
|
{
|
|
2744
|
-
className: (0,
|
|
2741
|
+
className: (0, import_system50.cn)(
|
|
2745
2742
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2746
2743
|
classNames2.container
|
|
2747
2744
|
),
|
|
2748
2745
|
...props,
|
|
2749
2746
|
children: [
|
|
2750
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0,
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_system50.cn)("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon3, {}) }),
|
|
2751
2748
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2752
2749
|
"div",
|
|
2753
2750
|
{
|
|
2754
|
-
className: (0,
|
|
2751
|
+
className: (0, import_system50.cn)("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2755
2752
|
children: messageTitle
|
|
2756
2753
|
}
|
|
2757
2754
|
),
|
|
2758
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0,
|
|
2755
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_system50.cn)("col-start-2", classNames2.content), children })
|
|
2759
2756
|
]
|
|
2760
2757
|
}
|
|
2761
2758
|
);
|
|
2762
2759
|
};
|
|
2763
2760
|
|
|
2764
2761
|
// src/NumberField/NumberField.tsx
|
|
2765
|
-
var import_react39 = require("react");
|
|
2766
|
-
var import_focus9 = require("@react-aria/focus");
|
|
2767
|
-
var import_i18n8 = require("@react-aria/i18n");
|
|
2768
|
-
var import_interactions7 = require("@react-aria/interactions");
|
|
2769
|
-
var import_numberfield = require("@react-aria/numberfield");
|
|
2770
|
-
var import_utils18 = require("@react-aria/utils");
|
|
2771
|
-
var import_numberfield2 = require("@react-stately/numberfield");
|
|
2772
|
-
var import_system50 = require("@marigold/system");
|
|
2773
|
-
|
|
2774
|
-
// src/NumberField/StepButton.tsx
|
|
2775
2762
|
var import_react38 = require("react");
|
|
2776
|
-
var
|
|
2777
|
-
var
|
|
2778
|
-
|
|
2779
|
-
|
|
2763
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
2764
|
+
var import_system53 = require("@marigold/system");
|
|
2765
|
+
|
|
2766
|
+
// src/Input/_Input.tsx
|
|
2767
|
+
var import_react37 = require("react");
|
|
2768
|
+
var import_react_aria_components14 = require("react-aria-components");
|
|
2769
|
+
var import_system51 = require("@marigold/system");
|
|
2780
2770
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2781
|
-
var
|
|
2771
|
+
var _Input = (0, import_react37.forwardRef)(
|
|
2772
|
+
({ type, icon, action, variant, size, className, ...props }, ref) => {
|
|
2773
|
+
const classNames2 = (0, import_system51.useClassNames)({
|
|
2774
|
+
component: "Input",
|
|
2775
|
+
variant,
|
|
2776
|
+
size
|
|
2777
|
+
});
|
|
2778
|
+
const inputIcon = icon ? (0, import_react37.cloneElement)(icon, {
|
|
2779
|
+
className: (0, import_system51.cn)(
|
|
2780
|
+
"pointer-events-none absolute",
|
|
2781
|
+
classNames2.icon,
|
|
2782
|
+
icon.props.className
|
|
2783
|
+
),
|
|
2784
|
+
...icon.props
|
|
2785
|
+
}) : null;
|
|
2786
|
+
const inputAction = action && !props.readOnly ? (0, import_react37.cloneElement)(action, {
|
|
2787
|
+
className: (0, import_system51.cn)(
|
|
2788
|
+
"absolute",
|
|
2789
|
+
classNames2.action,
|
|
2790
|
+
action.props.className
|
|
2791
|
+
),
|
|
2792
|
+
...action.props
|
|
2793
|
+
}) : null;
|
|
2794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2795
|
+
"div",
|
|
2796
|
+
{
|
|
2797
|
+
className: "group/input relative flex items-center",
|
|
2798
|
+
"data-icon": icon && "",
|
|
2799
|
+
"data-action": action && "",
|
|
2800
|
+
children: [
|
|
2801
|
+
inputIcon,
|
|
2802
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2803
|
+
import_react_aria_components14.Input,
|
|
2804
|
+
{
|
|
2805
|
+
...props,
|
|
2806
|
+
className: (0, import_system51.cn)(
|
|
2807
|
+
"w-full flex-1",
|
|
2808
|
+
"disabled:cursor-not-allowed",
|
|
2809
|
+
"[&[type=file]]:border-none [&[type=file]]:p-0",
|
|
2810
|
+
"[&[type=color]]:ml-0 [&[type=color]]:border-none [&[type=color]]:bg-transparent [&[type=color]]:p-0",
|
|
2811
|
+
classNames2.input,
|
|
2812
|
+
className
|
|
2813
|
+
),
|
|
2814
|
+
ref,
|
|
2815
|
+
type
|
|
2816
|
+
}
|
|
2817
|
+
),
|
|
2818
|
+
inputAction
|
|
2819
|
+
]
|
|
2820
|
+
}
|
|
2821
|
+
);
|
|
2822
|
+
}
|
|
2823
|
+
);
|
|
2824
|
+
|
|
2825
|
+
// src/NumberField/StepButton.tsx
|
|
2826
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
2827
|
+
var import_system52 = require("@marigold/system");
|
|
2828
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2829
|
+
var Plus = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2782
2830
|
"path",
|
|
2783
2831
|
{
|
|
2784
2832
|
fillRule: "evenodd",
|
|
@@ -2786,7 +2834,7 @@ var Plus = () => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { width: 1
|
|
|
2786
2834
|
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"
|
|
2787
2835
|
}
|
|
2788
2836
|
) });
|
|
2789
|
-
var Minus = () => /* @__PURE__ */ (0,
|
|
2837
|
+
var Minus = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2790
2838
|
"path",
|
|
2791
2839
|
{
|
|
2792
2840
|
fillRule: "evenodd",
|
|
@@ -2794,47 +2842,30 @@ var Minus = () => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { width:
|
|
|
2794
2842
|
d: "M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
2795
2843
|
}
|
|
2796
2844
|
) });
|
|
2797
|
-
var
|
|
2798
|
-
direction,
|
|
2799
|
-
className,
|
|
2800
|
-
...props
|
|
2801
|
-
}) => {
|
|
2802
|
-
const ref = (0, import_react38.useRef)(null);
|
|
2803
|
-
const { buttonProps, isPressed } = (0, import_button4.useButton)(
|
|
2804
|
-
{ ...props, elementType: "div" },
|
|
2805
|
-
ref
|
|
2806
|
-
);
|
|
2807
|
-
const { hoverProps, isHovered } = (0, import_interactions6.useHover)(props);
|
|
2808
|
-
const stateProps = (0, import_system49.useStateProps)({
|
|
2809
|
-
active: isPressed,
|
|
2810
|
-
hover: isHovered,
|
|
2811
|
-
disabled: props.isDisabled
|
|
2812
|
-
});
|
|
2845
|
+
var _StepButton = ({ direction, className, ...props }) => {
|
|
2813
2846
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
2814
|
-
return /* @__PURE__ */ (0,
|
|
2815
|
-
|
|
2847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2848
|
+
import_react_aria_components15.Button,
|
|
2816
2849
|
{
|
|
2817
|
-
className: (0,
|
|
2850
|
+
className: (0, import_system52.cn)(
|
|
2818
2851
|
[
|
|
2819
2852
|
"flex items-center justify-center",
|
|
2820
2853
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
2821
2854
|
],
|
|
2822
2855
|
className
|
|
2823
2856
|
),
|
|
2824
|
-
...
|
|
2825
|
-
|
|
2826
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon3, {})
|
|
2857
|
+
...props,
|
|
2858
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon3, {})
|
|
2827
2859
|
}
|
|
2828
2860
|
);
|
|
2829
2861
|
};
|
|
2830
2862
|
|
|
2831
2863
|
// src/NumberField/NumberField.tsx
|
|
2832
|
-
var
|
|
2833
|
-
var
|
|
2864
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2865
|
+
var _NumberField = (0, import_react38.forwardRef)(
|
|
2834
2866
|
({
|
|
2835
2867
|
variant,
|
|
2836
2868
|
size,
|
|
2837
|
-
width,
|
|
2838
2869
|
disabled,
|
|
2839
2870
|
required,
|
|
2840
2871
|
readOnly,
|
|
@@ -2842,134 +2873,81 @@ var NumberField = (0, import_react39.forwardRef)(
|
|
|
2842
2873
|
hideStepper,
|
|
2843
2874
|
...rest
|
|
2844
2875
|
}, ref) => {
|
|
2876
|
+
const classNames2 = (0, import_system53.useClassNames)({
|
|
2877
|
+
component: "NumberField",
|
|
2878
|
+
size,
|
|
2879
|
+
variant
|
|
2880
|
+
});
|
|
2845
2881
|
const props = {
|
|
2846
2882
|
isDisabled: disabled,
|
|
2847
|
-
isRequired: required,
|
|
2848
2883
|
isReadOnly: readOnly,
|
|
2849
|
-
|
|
2884
|
+
isInvalid: error,
|
|
2885
|
+
isRequired: required,
|
|
2850
2886
|
...rest
|
|
2851
2887
|
};
|
|
2852
2888
|
const showStepper = !hideStepper;
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
size,
|
|
2882
|
-
variant
|
|
2883
|
-
});
|
|
2884
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2885
|
-
FieldBase,
|
|
2886
|
-
{
|
|
2887
|
-
label: props.label,
|
|
2888
|
-
labelProps,
|
|
2889
|
-
description: props.description,
|
|
2890
|
-
descriptionProps,
|
|
2891
|
-
error,
|
|
2892
|
-
errorMessage: props.errorMessage,
|
|
2893
|
-
errorMessageProps,
|
|
2894
|
-
stateProps,
|
|
2895
|
-
variant,
|
|
2896
|
-
size,
|
|
2897
|
-
width,
|
|
2898
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
2899
|
-
"div",
|
|
2900
|
-
{
|
|
2901
|
-
"data-group": true,
|
|
2902
|
-
className: (0, import_system50.cn)("flex items-stretch", classNames2.group),
|
|
2903
|
-
"data-testid": "number-field-container",
|
|
2904
|
-
...(0, import_utils18.mergeProps)(groupProps, focusProps, hoverProps),
|
|
2905
|
-
...stateProps,
|
|
2906
|
-
children: [
|
|
2907
|
-
showStepper && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2908
|
-
StepButton,
|
|
2909
|
-
{
|
|
2910
|
-
className: classNames2.stepper,
|
|
2911
|
-
direction: "down",
|
|
2912
|
-
...decrementButtonProps
|
|
2913
|
-
}
|
|
2914
|
-
),
|
|
2915
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2916
|
-
Input,
|
|
2917
|
-
{
|
|
2918
|
-
ref: inputRef,
|
|
2919
|
-
variant,
|
|
2920
|
-
size,
|
|
2921
|
-
...inputProps,
|
|
2922
|
-
...stateProps
|
|
2923
|
-
}
|
|
2924
|
-
) }),
|
|
2925
|
-
showStepper && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2926
|
-
StepButton,
|
|
2927
|
-
{
|
|
2928
|
-
className: classNames2.stepper,
|
|
2929
|
-
direction: "up",
|
|
2930
|
-
...incrementButtonProps
|
|
2931
|
-
}
|
|
2932
|
-
)
|
|
2933
|
-
]
|
|
2934
|
-
}
|
|
2935
|
-
)
|
|
2936
|
-
}
|
|
2937
|
-
);
|
|
2938
|
-
}
|
|
2889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FieldBase2, { as: import_react_aria_components16.NumberField, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react_aria_components16.Group, { className: (0, import_system53.cn)("flex items-stretch", classNames2.group), children: [
|
|
2890
|
+
showStepper && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2891
|
+
_StepButton,
|
|
2892
|
+
{
|
|
2893
|
+
className: classNames2.stepper,
|
|
2894
|
+
direction: "down",
|
|
2895
|
+
slot: "decrement"
|
|
2896
|
+
}
|
|
2897
|
+
),
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2899
|
+
_Input,
|
|
2900
|
+
{
|
|
2901
|
+
ref,
|
|
2902
|
+
variant,
|
|
2903
|
+
size,
|
|
2904
|
+
className: classNames2.input
|
|
2905
|
+
}
|
|
2906
|
+
) }),
|
|
2907
|
+
showStepper && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2908
|
+
_StepButton,
|
|
2909
|
+
{
|
|
2910
|
+
className: classNames2.stepper,
|
|
2911
|
+
direction: "up",
|
|
2912
|
+
slot: "increment"
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
] }) });
|
|
2916
|
+
}
|
|
2939
2917
|
);
|
|
2940
2918
|
|
|
2941
2919
|
// src/Provider/index.ts
|
|
2942
|
-
var
|
|
2920
|
+
var import_system55 = require("@marigold/system");
|
|
2943
2921
|
|
|
2944
2922
|
// src/Provider/MarigoldProvider.tsx
|
|
2945
|
-
var
|
|
2946
|
-
var
|
|
2947
|
-
var
|
|
2923
|
+
var import_overlays4 = require("@react-aria/overlays");
|
|
2924
|
+
var import_system54 = require("@marigold/system");
|
|
2925
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2948
2926
|
function MarigoldProvider({
|
|
2949
2927
|
children,
|
|
2950
2928
|
theme
|
|
2951
2929
|
}) {
|
|
2952
|
-
const outerTheme = (0,
|
|
2953
|
-
const isTopLevel = outerTheme ===
|
|
2954
|
-
return /* @__PURE__ */ (0,
|
|
2930
|
+
const outerTheme = (0, import_system54.useTheme)();
|
|
2931
|
+
const isTopLevel = outerTheme === import_system54.defaultTheme;
|
|
2932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_system54.ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_overlays4.OverlayProvider, { children }) : children });
|
|
2955
2933
|
}
|
|
2956
2934
|
|
|
2957
2935
|
// src/Radio/Radio.tsx
|
|
2958
|
-
var
|
|
2959
|
-
var
|
|
2960
|
-
var
|
|
2936
|
+
var import_react40 = require("react");
|
|
2937
|
+
var import_react_aria_components18 = require("react-aria-components");
|
|
2938
|
+
var import_system57 = require("@marigold/system");
|
|
2961
2939
|
|
|
2962
2940
|
// src/Radio/Context.ts
|
|
2963
|
-
var
|
|
2964
|
-
var RadioGroupContext = (0,
|
|
2941
|
+
var import_react39 = require("react");
|
|
2942
|
+
var RadioGroupContext = (0, import_react39.createContext)(
|
|
2965
2943
|
null
|
|
2966
2944
|
);
|
|
2967
|
-
var useRadioGroupContext = () => (0,
|
|
2945
|
+
var useRadioGroupContext = () => (0, import_react39.useContext)(RadioGroupContext);
|
|
2968
2946
|
|
|
2969
2947
|
// src/Radio/RadioGroup.tsx
|
|
2970
|
-
var
|
|
2971
|
-
var
|
|
2972
|
-
var
|
|
2948
|
+
var import_react_aria_components17 = require("react-aria-components");
|
|
2949
|
+
var import_system56 = require("@marigold/system");
|
|
2950
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2973
2951
|
var _RadioGroup = ({
|
|
2974
2952
|
variant,
|
|
2975
2953
|
size,
|
|
@@ -2985,7 +2963,7 @@ var _RadioGroup = ({
|
|
|
2985
2963
|
width,
|
|
2986
2964
|
...rest
|
|
2987
2965
|
}) => {
|
|
2988
|
-
const classNames2 = (0,
|
|
2966
|
+
const classNames2 = (0, import_system56.useClassNames)({ component: "Radio", variant, size });
|
|
2989
2967
|
const props = {
|
|
2990
2968
|
isDisabled: disabled,
|
|
2991
2969
|
isReadOnly: readOnly,
|
|
@@ -2993,10 +2971,10 @@ var _RadioGroup = ({
|
|
|
2993
2971
|
isInvalid: error,
|
|
2994
2972
|
...rest
|
|
2995
2973
|
};
|
|
2996
|
-
return /* @__PURE__ */ (0,
|
|
2974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2997
2975
|
FieldBase2,
|
|
2998
2976
|
{
|
|
2999
|
-
as:
|
|
2977
|
+
as: import_react_aria_components17.RadioGroup,
|
|
3000
2978
|
width,
|
|
3001
2979
|
label,
|
|
3002
2980
|
description,
|
|
@@ -3004,18 +2982,18 @@ var _RadioGroup = ({
|
|
|
3004
2982
|
variant,
|
|
3005
2983
|
size,
|
|
3006
2984
|
...props,
|
|
3007
|
-
children: /* @__PURE__ */ (0,
|
|
2985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3008
2986
|
"div",
|
|
3009
2987
|
{
|
|
3010
2988
|
role: "presentation",
|
|
3011
2989
|
"data-testid": "group",
|
|
3012
2990
|
"data-orientation": orientation,
|
|
3013
|
-
className: (0,
|
|
2991
|
+
className: (0, import_system56.cn)(
|
|
3014
2992
|
classNames2.group,
|
|
3015
2993
|
"flex items-start",
|
|
3016
2994
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
3017
2995
|
),
|
|
3018
|
-
children: /* @__PURE__ */ (0,
|
|
2996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
3019
2997
|
}
|
|
3020
2998
|
)
|
|
3021
2999
|
}
|
|
@@ -3023,33 +3001,33 @@ var _RadioGroup = ({
|
|
|
3023
3001
|
};
|
|
3024
3002
|
|
|
3025
3003
|
// src/Radio/Radio.tsx
|
|
3026
|
-
var
|
|
3027
|
-
var Dot = () => /* @__PURE__ */ (0,
|
|
3028
|
-
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ (0,
|
|
3004
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3005
|
+
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
3006
|
+
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3029
3007
|
"div",
|
|
3030
3008
|
{
|
|
3031
|
-
className: (0,
|
|
3009
|
+
className: (0, import_system57.cn)(
|
|
3032
3010
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
3033
3011
|
className
|
|
3034
3012
|
),
|
|
3035
3013
|
"aria-hidden": "true",
|
|
3036
3014
|
...props,
|
|
3037
|
-
children: checked ? /* @__PURE__ */ (0,
|
|
3015
|
+
children: checked ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Dot, {}) : null
|
|
3038
3016
|
}
|
|
3039
3017
|
);
|
|
3040
|
-
var _Radio = (0,
|
|
3018
|
+
var _Radio = (0, import_react40.forwardRef)(
|
|
3041
3019
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
3042
3020
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
3043
|
-
const classNames2 = (0,
|
|
3021
|
+
const classNames2 = (0, import_system57.useClassNames)({
|
|
3044
3022
|
component: "Radio",
|
|
3045
3023
|
variant: variant || props.variant,
|
|
3046
3024
|
size: size || props.size
|
|
3047
3025
|
});
|
|
3048
|
-
return /* @__PURE__ */ (0,
|
|
3049
|
-
|
|
3026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3027
|
+
import_react_aria_components18.Radio,
|
|
3050
3028
|
{
|
|
3051
3029
|
ref,
|
|
3052
|
-
className: (0,
|
|
3030
|
+
className: (0, import_system57.cn)(
|
|
3053
3031
|
"group/radio",
|
|
3054
3032
|
"relative flex items-center gap-[1ch]",
|
|
3055
3033
|
width || groupWidth || "w-full",
|
|
@@ -3058,18 +3036,18 @@ var _Radio = (0, import_react41.forwardRef)(
|
|
|
3058
3036
|
value,
|
|
3059
3037
|
isDisabled: disabled,
|
|
3060
3038
|
...props,
|
|
3061
|
-
children: ({ isSelected }) => /* @__PURE__ */ (0,
|
|
3062
|
-
/* @__PURE__ */ (0,
|
|
3039
|
+
children: ({ isSelected }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3063
3041
|
Icon2,
|
|
3064
3042
|
{
|
|
3065
3043
|
checked: isSelected,
|
|
3066
|
-
className: (0,
|
|
3044
|
+
className: (0, import_system57.cn)(
|
|
3067
3045
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
3068
3046
|
classNames2.radio
|
|
3069
3047
|
)
|
|
3070
3048
|
}
|
|
3071
3049
|
),
|
|
3072
|
-
/* @__PURE__ */ (0,
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: classNames2.label, children })
|
|
3073
3051
|
] })
|
|
3074
3052
|
}
|
|
3075
3053
|
);
|
|
@@ -3078,15 +3056,15 @@ var _Radio = (0, import_react41.forwardRef)(
|
|
|
3078
3056
|
_Radio.Group = _RadioGroup;
|
|
3079
3057
|
|
|
3080
3058
|
// src/Select/Select.tsx
|
|
3081
|
-
var
|
|
3082
|
-
var
|
|
3083
|
-
var
|
|
3084
|
-
var
|
|
3059
|
+
var import_react41 = require("react");
|
|
3060
|
+
var import_button3 = require("@react-aria/button");
|
|
3061
|
+
var import_focus8 = require("@react-aria/focus");
|
|
3062
|
+
var import_i18n8 = require("@react-aria/i18n");
|
|
3085
3063
|
var import_select = require("@react-aria/select");
|
|
3086
|
-
var
|
|
3064
|
+
var import_utils16 = require("@react-aria/utils");
|
|
3087
3065
|
var import_collections5 = require("@react-stately/collections");
|
|
3088
3066
|
var import_select2 = require("@react-stately/select");
|
|
3089
|
-
var
|
|
3067
|
+
var import_system58 = require("@marigold/system");
|
|
3090
3068
|
|
|
3091
3069
|
// src/Select/intl.ts
|
|
3092
3070
|
var messages = {
|
|
@@ -3099,8 +3077,8 @@ var messages = {
|
|
|
3099
3077
|
};
|
|
3100
3078
|
|
|
3101
3079
|
// src/Select/Select.tsx
|
|
3102
|
-
var
|
|
3103
|
-
var Select = (0,
|
|
3080
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3081
|
+
var Select = (0, import_react41.forwardRef)(
|
|
3104
3082
|
({
|
|
3105
3083
|
variant,
|
|
3106
3084
|
size,
|
|
@@ -3112,7 +3090,7 @@ var Select = (0, import_react42.forwardRef)(
|
|
|
3112
3090
|
onChange,
|
|
3113
3091
|
...rest
|
|
3114
3092
|
}, ref) => {
|
|
3115
|
-
const formatMessage = (0,
|
|
3093
|
+
const formatMessage = (0, import_i18n8.useLocalizedStringFormatter)(messages);
|
|
3116
3094
|
const props = {
|
|
3117
3095
|
isOpen: open,
|
|
3118
3096
|
isDisabled: disabled,
|
|
@@ -3122,8 +3100,8 @@ var Select = (0, import_react42.forwardRef)(
|
|
|
3122
3100
|
onSelectionChange: onChange,
|
|
3123
3101
|
...rest
|
|
3124
3102
|
};
|
|
3125
|
-
const buttonRef = (0,
|
|
3126
|
-
const listboxRef = (0,
|
|
3103
|
+
const buttonRef = (0, import_utils16.useObjectRef)(ref);
|
|
3104
|
+
const listboxRef = (0, import_react41.useRef)(null);
|
|
3127
3105
|
const state = (0, import_select2.useSelectState)(props);
|
|
3128
3106
|
const {
|
|
3129
3107
|
labelProps,
|
|
@@ -3133,21 +3111,21 @@ var Select = (0, import_react42.forwardRef)(
|
|
|
3133
3111
|
descriptionProps,
|
|
3134
3112
|
errorMessageProps
|
|
3135
3113
|
} = (0, import_select.useSelect)(props, state, buttonRef);
|
|
3136
|
-
const { buttonProps } = (0,
|
|
3114
|
+
const { buttonProps } = (0, import_button3.useButton)(
|
|
3137
3115
|
{ isDisabled: disabled, ...triggerProps },
|
|
3138
3116
|
buttonRef
|
|
3139
3117
|
);
|
|
3140
|
-
const { focusProps, isFocusVisible } = (0,
|
|
3141
|
-
const classNames2 = (0,
|
|
3142
|
-
const isSmallScreen = (0,
|
|
3143
|
-
const stateProps = (0,
|
|
3118
|
+
const { focusProps, isFocusVisible } = (0, import_focus8.useFocusRing)();
|
|
3119
|
+
const classNames2 = (0, import_system58.useClassNames)({ component: "Select", variant, size });
|
|
3120
|
+
const isSmallScreen = (0, import_system58.useSmallScreen)();
|
|
3121
|
+
const stateProps = (0, import_system58.useStateProps)({
|
|
3144
3122
|
disabled,
|
|
3145
3123
|
error,
|
|
3146
3124
|
focusVisible: isFocusVisible,
|
|
3147
3125
|
expanded: state.isOpen,
|
|
3148
3126
|
required
|
|
3149
3127
|
});
|
|
3150
|
-
return /* @__PURE__ */ (0,
|
|
3128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3151
3129
|
FieldBase,
|
|
3152
3130
|
{
|
|
3153
3131
|
variant,
|
|
@@ -3163,7 +3141,7 @@ var Select = (0, import_react42.forwardRef)(
|
|
|
3163
3141
|
stateProps,
|
|
3164
3142
|
disabled,
|
|
3165
3143
|
children: [
|
|
3166
|
-
/* @__PURE__ */ (0,
|
|
3144
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3167
3145
|
import_select.HiddenSelect,
|
|
3168
3146
|
{
|
|
3169
3147
|
state,
|
|
@@ -3173,23 +3151,23 @@ var Select = (0, import_react42.forwardRef)(
|
|
|
3173
3151
|
isDisabled: disabled
|
|
3174
3152
|
}
|
|
3175
3153
|
),
|
|
3176
|
-
/* @__PURE__ */ (0,
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3177
3155
|
"button",
|
|
3178
3156
|
{
|
|
3179
|
-
className: (0,
|
|
3157
|
+
className: (0, import_system58.cn)(
|
|
3180
3158
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
3181
3159
|
classNames2.select
|
|
3182
3160
|
),
|
|
3183
3161
|
ref: buttonRef,
|
|
3184
|
-
...(0,
|
|
3162
|
+
...(0, import_utils16.mergeProps)(buttonProps, focusProps),
|
|
3185
3163
|
...stateProps,
|
|
3186
3164
|
children: [
|
|
3187
|
-
/* @__PURE__ */ (0,
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3165
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "overflow-hidden whitespace-nowrap", ...valueProps, children: state.selectedItem ? state.selectedItem.rendered : props.placeholder }),
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ChevronDown, { className: "h-4 w-4" })
|
|
3189
3167
|
]
|
|
3190
3168
|
}
|
|
3191
3169
|
),
|
|
3192
|
-
isSmallScreen ? /* @__PURE__ */ (0,
|
|
3170
|
+
isSmallScreen ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Tray, { state, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3193
3171
|
ListBox,
|
|
3194
3172
|
{
|
|
3195
3173
|
ref: listboxRef,
|
|
@@ -3198,7 +3176,7 @@ var Select = (0, import_react42.forwardRef)(
|
|
|
3198
3176
|
size,
|
|
3199
3177
|
...menuProps
|
|
3200
3178
|
}
|
|
3201
|
-
) }) : /* @__PURE__ */ (0,
|
|
3179
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3202
3180
|
ListBox,
|
|
3203
3181
|
{
|
|
3204
3182
|
ref: listboxRef,
|
|
@@ -3217,11 +3195,11 @@ Select.Option = import_collections5.Item;
|
|
|
3217
3195
|
Select.Section = import_collections5.Section;
|
|
3218
3196
|
|
|
3219
3197
|
// src/Slider/Slider.tsx
|
|
3220
|
-
var
|
|
3221
|
-
var
|
|
3222
|
-
var
|
|
3223
|
-
var
|
|
3224
|
-
var _Slider = (0,
|
|
3198
|
+
var import_react42 = require("react");
|
|
3199
|
+
var import_react_aria_components19 = require("react-aria-components");
|
|
3200
|
+
var import_system59 = require("@marigold/system");
|
|
3201
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3202
|
+
var _Slider = (0, import_react42.forwardRef)(
|
|
3225
3203
|
({
|
|
3226
3204
|
thumbLabels,
|
|
3227
3205
|
variant,
|
|
@@ -3230,7 +3208,7 @@ var _Slider = (0, import_react43.forwardRef)(
|
|
|
3230
3208
|
disabled,
|
|
3231
3209
|
...rest
|
|
3232
3210
|
}, ref) => {
|
|
3233
|
-
const classNames2 = (0,
|
|
3211
|
+
const classNames2 = (0, import_system59.useClassNames)({
|
|
3234
3212
|
component: "Slider",
|
|
3235
3213
|
variant,
|
|
3236
3214
|
size
|
|
@@ -3239,27 +3217,27 @@ var _Slider = (0, import_react43.forwardRef)(
|
|
|
3239
3217
|
isDisabled: disabled,
|
|
3240
3218
|
...rest
|
|
3241
3219
|
};
|
|
3242
|
-
return /* @__PURE__ */ (0,
|
|
3243
|
-
|
|
3220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
3221
|
+
import_react_aria_components19.Slider,
|
|
3244
3222
|
{
|
|
3245
|
-
className: (0,
|
|
3223
|
+
className: (0, import_system59.cn)(
|
|
3246
3224
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
3247
3225
|
classNames2.container,
|
|
3248
|
-
|
|
3226
|
+
import_system59.width[width]
|
|
3249
3227
|
),
|
|
3250
3228
|
ref,
|
|
3251
3229
|
...props,
|
|
3252
3230
|
children: [
|
|
3253
|
-
/* @__PURE__ */ (0,
|
|
3254
|
-
/* @__PURE__ */ (0,
|
|
3255
|
-
/* @__PURE__ */ (0,
|
|
3256
|
-
|
|
3231
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(_Label, { children: props.children }),
|
|
3232
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_aria_components19.SliderOutput, { className: (0, import_system59.cn)("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3234
|
+
import_react_aria_components19.SliderTrack,
|
|
3257
3235
|
{
|
|
3258
|
-
className: (0,
|
|
3259
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ (0,
|
|
3260
|
-
|
|
3236
|
+
className: (0, import_system59.cn)("relative col-span-2 h-2 w-full", classNames2.track),
|
|
3237
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3238
|
+
import_react_aria_components19.SliderThumb,
|
|
3261
3239
|
{
|
|
3262
|
-
className: (0,
|
|
3240
|
+
className: (0, import_system59.cn)("top-1/2 cursor-pointer", classNames2.thumb),
|
|
3263
3241
|
index: i,
|
|
3264
3242
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
3265
3243
|
},
|
|
@@ -3274,12 +3252,12 @@ var _Slider = (0, import_react43.forwardRef)(
|
|
|
3274
3252
|
);
|
|
3275
3253
|
|
|
3276
3254
|
// src/Split/Split.tsx
|
|
3277
|
-
var
|
|
3278
|
-
var Split = (props) => /* @__PURE__ */ (0,
|
|
3255
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3256
|
+
var Split = (props) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ...props, role: "separator", className: "grow" });
|
|
3279
3257
|
|
|
3280
3258
|
// src/Stack/Stack.tsx
|
|
3281
|
-
var
|
|
3282
|
-
var
|
|
3259
|
+
var import_system60 = require("@marigold/system");
|
|
3260
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3283
3261
|
var Stack = ({
|
|
3284
3262
|
children,
|
|
3285
3263
|
space = 0,
|
|
@@ -3290,14 +3268,14 @@ var Stack = ({
|
|
|
3290
3268
|
...props
|
|
3291
3269
|
}) => {
|
|
3292
3270
|
var _a, _b, _c, _d;
|
|
3293
|
-
return /* @__PURE__ */ (0,
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3294
3272
|
"div",
|
|
3295
3273
|
{
|
|
3296
|
-
className: (0,
|
|
3274
|
+
className: (0, import_system60.cn)(
|
|
3297
3275
|
"flex flex-col",
|
|
3298
|
-
|
|
3299
|
-
alignX && ((_b = (_a =
|
|
3300
|
-
alignY && ((_d = (_c =
|
|
3276
|
+
import_system60.gapSpace[space],
|
|
3277
|
+
alignX && ((_b = (_a = import_system60.alignment) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
3278
|
+
alignY && ((_d = (_c = import_system60.alignment) == null ? void 0 : _c.vertical) == null ? void 0 : _d.alignmentY[alignY]),
|
|
3301
3279
|
stretch && "h-full w-full"
|
|
3302
3280
|
),
|
|
3303
3281
|
...props,
|
|
@@ -3307,11 +3285,11 @@ var Stack = ({
|
|
|
3307
3285
|
};
|
|
3308
3286
|
|
|
3309
3287
|
// src/Switch/Switch.tsx
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3312
|
-
var
|
|
3313
|
-
var
|
|
3314
|
-
var _Switch = (0,
|
|
3288
|
+
var import_react43 = require("react");
|
|
3289
|
+
var import_react_aria_components20 = require("react-aria-components");
|
|
3290
|
+
var import_system61 = require("@marigold/system");
|
|
3291
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3292
|
+
var _Switch = (0, import_react43.forwardRef)(
|
|
3315
3293
|
({
|
|
3316
3294
|
variant,
|
|
3317
3295
|
size,
|
|
@@ -3322,37 +3300,37 @@ var _Switch = (0, import_react44.forwardRef)(
|
|
|
3322
3300
|
readOnly,
|
|
3323
3301
|
...rest
|
|
3324
3302
|
}, ref) => {
|
|
3325
|
-
const classNames2 = (0,
|
|
3303
|
+
const classNames2 = (0, import_system61.useClassNames)({ component: "Switch", size, variant });
|
|
3326
3304
|
const props = {
|
|
3327
3305
|
isDisabled: disabled,
|
|
3328
3306
|
isReadOnly: readOnly,
|
|
3329
3307
|
isSelected: selected,
|
|
3330
3308
|
...rest
|
|
3331
3309
|
};
|
|
3332
|
-
return /* @__PURE__ */ (0,
|
|
3333
|
-
|
|
3310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
3311
|
+
import_react_aria_components20.Switch,
|
|
3334
3312
|
{
|
|
3335
3313
|
...props,
|
|
3336
3314
|
ref,
|
|
3337
|
-
className: (0,
|
|
3338
|
-
|
|
3315
|
+
className: (0, import_system61.cn)(
|
|
3316
|
+
import_system61.width[width],
|
|
3339
3317
|
"group/switch",
|
|
3340
3318
|
"flex items-center justify-between gap-[1ch]",
|
|
3341
3319
|
classNames2.container
|
|
3342
3320
|
),
|
|
3343
3321
|
children: [
|
|
3344
|
-
/* @__PURE__ */ (0,
|
|
3345
|
-
/* @__PURE__ */ (0,
|
|
3322
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(_Label, { elementType: "span", children }),
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3346
3324
|
"div",
|
|
3347
3325
|
{
|
|
3348
|
-
className: (0,
|
|
3326
|
+
className: (0, import_system61.cn)(
|
|
3349
3327
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
3350
3328
|
classNames2.track
|
|
3351
3329
|
),
|
|
3352
|
-
children: /* @__PURE__ */ (0,
|
|
3330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3353
3331
|
"div",
|
|
3354
3332
|
{
|
|
3355
|
-
className: (0,
|
|
3333
|
+
className: (0, import_system61.cn)(
|
|
3356
3334
|
"h-[22px] w-[22px]",
|
|
3357
3335
|
"cubic-bezier(.7,0,.3,1)",
|
|
3358
3336
|
"absolute left-0 top-px",
|
|
@@ -3371,33 +3349,33 @@ var _Switch = (0, import_react44.forwardRef)(
|
|
|
3371
3349
|
);
|
|
3372
3350
|
|
|
3373
3351
|
// src/Table/Table.tsx
|
|
3374
|
-
var
|
|
3352
|
+
var import_react51 = require("react");
|
|
3375
3353
|
var import_table9 = require("@react-aria/table");
|
|
3376
3354
|
var import_table10 = require("@react-stately/table");
|
|
3377
|
-
var
|
|
3355
|
+
var import_system68 = require("@marigold/system");
|
|
3378
3356
|
|
|
3379
3357
|
// src/Table/Context.tsx
|
|
3380
|
-
var
|
|
3381
|
-
var TableContext = (0,
|
|
3382
|
-
var useTableContext = () => (0,
|
|
3358
|
+
var import_react44 = require("react");
|
|
3359
|
+
var TableContext = (0, import_react44.createContext)({});
|
|
3360
|
+
var useTableContext = () => (0, import_react44.useContext)(TableContext);
|
|
3383
3361
|
|
|
3384
3362
|
// src/Table/TableBody.tsx
|
|
3385
3363
|
var import_table = require("@react-aria/table");
|
|
3386
|
-
var
|
|
3364
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3387
3365
|
var TableBody = ({ children }) => {
|
|
3388
3366
|
const { rowGroupProps } = (0, import_table.useTableRowGroup)();
|
|
3389
|
-
return /* @__PURE__ */ (0,
|
|
3367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tbody", { ...rowGroupProps, children });
|
|
3390
3368
|
};
|
|
3391
3369
|
|
|
3392
3370
|
// src/Table/TableCell.tsx
|
|
3393
|
-
var
|
|
3394
|
-
var
|
|
3371
|
+
var import_react45 = require("react");
|
|
3372
|
+
var import_focus9 = require("@react-aria/focus");
|
|
3395
3373
|
var import_table2 = require("@react-aria/table");
|
|
3396
|
-
var
|
|
3397
|
-
var
|
|
3398
|
-
var
|
|
3374
|
+
var import_utils17 = require("@react-aria/utils");
|
|
3375
|
+
var import_system62 = require("@marigold/system");
|
|
3376
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3399
3377
|
var TableCell = ({ cell }) => {
|
|
3400
|
-
const ref = (0,
|
|
3378
|
+
const ref = (0, import_react45.useRef)(null);
|
|
3401
3379
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
3402
3380
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3403
3381
|
const { gridCellProps } = (0, import_table2.useTableCell)(
|
|
@@ -3416,14 +3394,14 @@ var TableCell = ({ cell }) => {
|
|
|
3416
3394
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3417
3395
|
onPointerDown: (e) => e.stopPropagation()
|
|
3418
3396
|
};
|
|
3419
|
-
const { focusProps, isFocusVisible } = (0,
|
|
3420
|
-
const stateProps = (0,
|
|
3421
|
-
return /* @__PURE__ */ (0,
|
|
3397
|
+
const { focusProps, isFocusVisible } = (0, import_focus9.useFocusRing)();
|
|
3398
|
+
const stateProps = (0, import_system62.useStateProps)({ disabled, focusVisible: isFocusVisible });
|
|
3399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3422
3400
|
"td",
|
|
3423
3401
|
{
|
|
3424
3402
|
ref,
|
|
3425
3403
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
3426
|
-
...(0,
|
|
3404
|
+
...(0, import_utils17.mergeProps)(cellProps, focusProps),
|
|
3427
3405
|
...stateProps,
|
|
3428
3406
|
children: cell.rendered
|
|
3429
3407
|
}
|
|
@@ -3431,11 +3409,11 @@ var TableCell = ({ cell }) => {
|
|
|
3431
3409
|
};
|
|
3432
3410
|
|
|
3433
3411
|
// src/Table/TableCheckboxCell.tsx
|
|
3434
|
-
var
|
|
3435
|
-
var
|
|
3412
|
+
var import_react46 = require("react");
|
|
3413
|
+
var import_focus10 = require("@react-aria/focus");
|
|
3436
3414
|
var import_table3 = require("@react-aria/table");
|
|
3437
|
-
var
|
|
3438
|
-
var
|
|
3415
|
+
var import_utils18 = require("@react-aria/utils");
|
|
3416
|
+
var import_system63 = require("@marigold/system");
|
|
3439
3417
|
|
|
3440
3418
|
// src/Table/utils.ts
|
|
3441
3419
|
var mapCheckboxProps = ({
|
|
@@ -3458,9 +3436,9 @@ var mapCheckboxProps = ({
|
|
|
3458
3436
|
};
|
|
3459
3437
|
|
|
3460
3438
|
// src/Table/TableCheckboxCell.tsx
|
|
3461
|
-
var
|
|
3439
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3462
3440
|
var TableCheckboxCell = ({ cell }) => {
|
|
3463
|
-
const ref = (0,
|
|
3441
|
+
const ref = (0, import_react46.useRef)(null);
|
|
3464
3442
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3465
3443
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3466
3444
|
const { gridCellProps } = (0, import_table3.useTableCell)(
|
|
@@ -3473,36 +3451,36 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3473
3451
|
const { checkboxProps } = mapCheckboxProps(
|
|
3474
3452
|
(0, import_table3.useTableSelectionCheckbox)({ key: cell.parentKey }, state)
|
|
3475
3453
|
);
|
|
3476
|
-
const { focusProps, isFocusVisible } = (0,
|
|
3477
|
-
const stateProps = (0,
|
|
3478
|
-
return /* @__PURE__ */ (0,
|
|
3454
|
+
const { focusProps, isFocusVisible } = (0, import_focus10.useFocusRing)();
|
|
3455
|
+
const stateProps = (0, import_system63.useStateProps)({ disabled, focusVisible: isFocusVisible });
|
|
3456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3479
3457
|
"td",
|
|
3480
3458
|
{
|
|
3481
3459
|
ref,
|
|
3482
|
-
className: (0,
|
|
3483
|
-
...(0,
|
|
3460
|
+
className: (0, import_system63.cn)("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3461
|
+
...(0, import_utils18.mergeProps)(gridCellProps, focusProps),
|
|
3484
3462
|
...stateProps,
|
|
3485
|
-
children: /* @__PURE__ */ (0,
|
|
3463
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(_Checkbox, { ...checkboxProps })
|
|
3486
3464
|
}
|
|
3487
3465
|
);
|
|
3488
3466
|
};
|
|
3489
3467
|
|
|
3490
3468
|
// src/Table/TableColumnHeader.tsx
|
|
3491
|
-
var
|
|
3492
|
-
var
|
|
3493
|
-
var
|
|
3469
|
+
var import_react47 = require("react");
|
|
3470
|
+
var import_focus11 = require("@react-aria/focus");
|
|
3471
|
+
var import_interactions5 = require("@react-aria/interactions");
|
|
3494
3472
|
var import_table4 = require("@react-aria/table");
|
|
3495
|
-
var
|
|
3473
|
+
var import_utils20 = require("@react-aria/utils");
|
|
3496
3474
|
var import_icons2 = require("@marigold/icons");
|
|
3497
|
-
var
|
|
3498
|
-
var
|
|
3499
|
-
var
|
|
3475
|
+
var import_system64 = require("@marigold/system");
|
|
3476
|
+
var import_system65 = require("@marigold/system");
|
|
3477
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3500
3478
|
var TableColumnHeader = ({
|
|
3501
3479
|
column,
|
|
3502
3480
|
width = "auto"
|
|
3503
3481
|
}) => {
|
|
3504
3482
|
var _a, _b;
|
|
3505
|
-
const ref = (0,
|
|
3483
|
+
const ref = (0, import_react47.useRef)(null);
|
|
3506
3484
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3507
3485
|
const { columnHeaderProps } = (0, import_table4.useTableColumnHeader)(
|
|
3508
3486
|
{
|
|
@@ -3511,23 +3489,23 @@ var TableColumnHeader = ({
|
|
|
3511
3489
|
state,
|
|
3512
3490
|
ref
|
|
3513
3491
|
);
|
|
3514
|
-
const { hoverProps, isHovered } = (0,
|
|
3515
|
-
const { focusProps, isFocusVisible } = (0,
|
|
3516
|
-
const stateProps = (0,
|
|
3492
|
+
const { hoverProps, isHovered } = (0, import_interactions5.useHover)({});
|
|
3493
|
+
const { focusProps, isFocusVisible } = (0, import_focus11.useFocusRing)();
|
|
3494
|
+
const stateProps = (0, import_system64.useStateProps)({
|
|
3517
3495
|
hover: isHovered,
|
|
3518
3496
|
focusVisible: isFocusVisible
|
|
3519
3497
|
});
|
|
3520
|
-
return /* @__PURE__ */ (0,
|
|
3498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
3521
3499
|
"th",
|
|
3522
3500
|
{
|
|
3523
3501
|
colSpan: column.colspan,
|
|
3524
3502
|
ref,
|
|
3525
|
-
className: (0,
|
|
3526
|
-
...(0,
|
|
3503
|
+
className: (0, import_system64.cn)("cursor-default", import_system65.width[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3504
|
+
...(0, import_utils20.mergeProps)(columnHeaderProps, hoverProps, focusProps),
|
|
3527
3505
|
...stateProps,
|
|
3528
3506
|
children: [
|
|
3529
3507
|
column.rendered,
|
|
3530
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ (0,
|
|
3508
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_icons2.SortUp, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_icons2.SortDown, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_icons2.SortDown, { className: "inline-block" }))
|
|
3531
3509
|
]
|
|
3532
3510
|
}
|
|
3533
3511
|
);
|
|
@@ -3535,36 +3513,36 @@ var TableColumnHeader = ({
|
|
|
3535
3513
|
|
|
3536
3514
|
// src/Table/TableHeader.tsx
|
|
3537
3515
|
var import_table5 = require("@react-aria/table");
|
|
3538
|
-
var
|
|
3516
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3539
3517
|
var TableHeader = ({ children }) => {
|
|
3540
3518
|
const { rowGroupProps } = (0, import_table5.useTableRowGroup)();
|
|
3541
|
-
return /* @__PURE__ */ (0,
|
|
3519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("thead", { ...rowGroupProps, children });
|
|
3542
3520
|
};
|
|
3543
3521
|
|
|
3544
3522
|
// src/Table/TableHeaderRow.tsx
|
|
3545
|
-
var
|
|
3523
|
+
var import_react48 = require("react");
|
|
3546
3524
|
var import_table6 = require("@react-aria/table");
|
|
3547
|
-
var
|
|
3525
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3548
3526
|
var TableHeaderRow = ({ item, children }) => {
|
|
3549
3527
|
const { state } = useTableContext();
|
|
3550
|
-
const ref = (0,
|
|
3528
|
+
const ref = (0, import_react48.useRef)(null);
|
|
3551
3529
|
const { rowProps } = (0, import_table6.useTableHeaderRow)({ node: item }, state, ref);
|
|
3552
|
-
return /* @__PURE__ */ (0,
|
|
3530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { ...rowProps, ref, children });
|
|
3553
3531
|
};
|
|
3554
3532
|
|
|
3555
3533
|
// src/Table/TableRow.tsx
|
|
3556
|
-
var
|
|
3557
|
-
var
|
|
3558
|
-
var
|
|
3534
|
+
var import_react49 = require("react");
|
|
3535
|
+
var import_focus12 = require("@react-aria/focus");
|
|
3536
|
+
var import_interactions6 = require("@react-aria/interactions");
|
|
3559
3537
|
var import_table7 = require("@react-aria/table");
|
|
3560
|
-
var
|
|
3561
|
-
var
|
|
3562
|
-
var
|
|
3538
|
+
var import_utils21 = require("@react-aria/utils");
|
|
3539
|
+
var import_system66 = require("@marigold/system");
|
|
3540
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3563
3541
|
var TableRow = ({ children, row }) => {
|
|
3564
|
-
const ref = (0,
|
|
3542
|
+
const ref = (0, import_react49.useRef)(null);
|
|
3565
3543
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3566
3544
|
const { variant, size } = row.props;
|
|
3567
|
-
const classNames2 = (0,
|
|
3545
|
+
const classNames2 = (0, import_system66.useClassNames)({
|
|
3568
3546
|
component: "Table",
|
|
3569
3547
|
variant: variant || ctx.variant,
|
|
3570
3548
|
size: size || ctx.size
|
|
@@ -3578,28 +3556,28 @@ var TableRow = ({ children, row }) => {
|
|
|
3578
3556
|
);
|
|
3579
3557
|
const disabled = state.disabledKeys.has(row.key);
|
|
3580
3558
|
const selected = state.selectionManager.isSelected(row.key);
|
|
3581
|
-
const { focusProps, isFocusVisible } = (0,
|
|
3582
|
-
const { hoverProps, isHovered } = (0,
|
|
3559
|
+
const { focusProps, isFocusVisible } = (0, import_focus12.useFocusRing)({ within: true });
|
|
3560
|
+
const { hoverProps, isHovered } = (0, import_interactions6.useHover)({
|
|
3583
3561
|
isDisabled: disabled || !interactive
|
|
3584
3562
|
});
|
|
3585
|
-
const stateProps = (0,
|
|
3563
|
+
const stateProps = (0, import_system66.useStateProps)({
|
|
3586
3564
|
disabled,
|
|
3587
3565
|
selected,
|
|
3588
3566
|
hover: isHovered,
|
|
3589
3567
|
focusVisible: isFocusVisible,
|
|
3590
3568
|
active: isPressed
|
|
3591
3569
|
});
|
|
3592
|
-
return /* @__PURE__ */ (0,
|
|
3570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3593
3571
|
"tr",
|
|
3594
3572
|
{
|
|
3595
3573
|
ref,
|
|
3596
|
-
className: (0,
|
|
3574
|
+
className: (0, import_system66.cn)(
|
|
3597
3575
|
[
|
|
3598
3576
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3599
3577
|
],
|
|
3600
3578
|
classNames2 == null ? void 0 : classNames2.row
|
|
3601
3579
|
),
|
|
3602
|
-
...(0,
|
|
3580
|
+
...(0, import_utils21.mergeProps)(rowProps, focusProps, hoverProps),
|
|
3603
3581
|
...stateProps,
|
|
3604
3582
|
children
|
|
3605
3583
|
}
|
|
@@ -3607,18 +3585,18 @@ var TableRow = ({ children, row }) => {
|
|
|
3607
3585
|
};
|
|
3608
3586
|
|
|
3609
3587
|
// src/Table/TableSelectAllCell.tsx
|
|
3610
|
-
var
|
|
3611
|
-
var
|
|
3612
|
-
var
|
|
3588
|
+
var import_react50 = require("react");
|
|
3589
|
+
var import_focus13 = require("@react-aria/focus");
|
|
3590
|
+
var import_interactions7 = require("@react-aria/interactions");
|
|
3613
3591
|
var import_table8 = require("@react-aria/table");
|
|
3614
|
-
var
|
|
3615
|
-
var
|
|
3616
|
-
var
|
|
3592
|
+
var import_utils22 = require("@react-aria/utils");
|
|
3593
|
+
var import_system67 = require("@marigold/system");
|
|
3594
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3617
3595
|
var TableSelectAllCell = ({
|
|
3618
3596
|
column,
|
|
3619
3597
|
width = "auto"
|
|
3620
3598
|
}) => {
|
|
3621
|
-
const ref = (0,
|
|
3599
|
+
const ref = (0, import_react50.useRef)(null);
|
|
3622
3600
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3623
3601
|
const { columnHeaderProps } = (0, import_table8.useTableColumnHeader)(
|
|
3624
3602
|
{
|
|
@@ -3628,30 +3606,30 @@ var TableSelectAllCell = ({
|
|
|
3628
3606
|
ref
|
|
3629
3607
|
);
|
|
3630
3608
|
const { checkboxProps } = mapCheckboxProps((0, import_table8.useTableSelectAllCheckbox)(state));
|
|
3631
|
-
const { hoverProps, isHovered } = (0,
|
|
3632
|
-
const { focusProps, isFocusVisible } = (0,
|
|
3633
|
-
const stateProps = (0,
|
|
3609
|
+
const { hoverProps, isHovered } = (0, import_interactions7.useHover)({});
|
|
3610
|
+
const { focusProps, isFocusVisible } = (0, import_focus13.useFocusRing)();
|
|
3611
|
+
const stateProps = (0, import_system67.useStateProps)({
|
|
3634
3612
|
hover: isHovered,
|
|
3635
3613
|
focusVisible: isFocusVisible
|
|
3636
3614
|
});
|
|
3637
|
-
return /* @__PURE__ */ (0,
|
|
3615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3638
3616
|
"th",
|
|
3639
3617
|
{
|
|
3640
3618
|
ref,
|
|
3641
|
-
className: (0,
|
|
3642
|
-
|
|
3619
|
+
className: (0, import_system67.cn)(
|
|
3620
|
+
import_system67.width[width],
|
|
3643
3621
|
["text-center align-middle leading-none"],
|
|
3644
3622
|
classNames2 == null ? void 0 : classNames2.header
|
|
3645
3623
|
),
|
|
3646
|
-
...(0,
|
|
3624
|
+
...(0, import_utils22.mergeProps)(columnHeaderProps, hoverProps, focusProps),
|
|
3647
3625
|
...stateProps,
|
|
3648
|
-
children: /* @__PURE__ */ (0,
|
|
3626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(_Checkbox, { ...checkboxProps })
|
|
3649
3627
|
}
|
|
3650
3628
|
);
|
|
3651
3629
|
};
|
|
3652
3630
|
|
|
3653
3631
|
// src/Table/Table.tsx
|
|
3654
|
-
var
|
|
3632
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3655
3633
|
var Table = ({
|
|
3656
3634
|
variant,
|
|
3657
3635
|
size,
|
|
@@ -3660,7 +3638,7 @@ var Table = ({
|
|
|
3660
3638
|
...props
|
|
3661
3639
|
}) => {
|
|
3662
3640
|
const interactive = selectionMode !== "none";
|
|
3663
|
-
const tableRef = (0,
|
|
3641
|
+
const tableRef = (0, import_react51.useRef)(null);
|
|
3664
3642
|
const state = (0, import_table10.useTableState)({
|
|
3665
3643
|
...props,
|
|
3666
3644
|
selectionMode,
|
|
@@ -3668,21 +3646,21 @@ var Table = ({
|
|
|
3668
3646
|
props.selectionBehavior !== "replace"
|
|
3669
3647
|
});
|
|
3670
3648
|
const { gridProps } = (0, import_table9.useTable)(props, state, tableRef);
|
|
3671
|
-
const classNames2 = (0,
|
|
3649
|
+
const classNames2 = (0, import_system68.useClassNames)({
|
|
3672
3650
|
component: "Table",
|
|
3673
3651
|
variant,
|
|
3674
3652
|
size
|
|
3675
3653
|
});
|
|
3676
3654
|
const { collection } = state;
|
|
3677
|
-
return /* @__PURE__ */ (0,
|
|
3655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3678
3656
|
TableContext.Provider,
|
|
3679
3657
|
{
|
|
3680
3658
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3681
|
-
children: /* @__PURE__ */ (0,
|
|
3659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
3682
3660
|
"table",
|
|
3683
3661
|
{
|
|
3684
3662
|
ref: tableRef,
|
|
3685
|
-
className: (0,
|
|
3663
|
+
className: (0, import_system68.cn)(
|
|
3686
3664
|
"group/table",
|
|
3687
3665
|
"border-collapse overflow-auto whitespace-nowrap",
|
|
3688
3666
|
stretch ? "table w-full" : "block",
|
|
@@ -3690,17 +3668,17 @@ var Table = ({
|
|
|
3690
3668
|
),
|
|
3691
3669
|
...gridProps,
|
|
3692
3670
|
children: [
|
|
3693
|
-
/* @__PURE__ */ (0,
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3694
3672
|
(column) => {
|
|
3695
3673
|
var _a, _b, _c;
|
|
3696
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0,
|
|
3674
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3697
3675
|
TableSelectAllCell,
|
|
3698
3676
|
{
|
|
3699
3677
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3700
3678
|
column
|
|
3701
3679
|
},
|
|
3702
3680
|
column.key
|
|
3703
|
-
) : /* @__PURE__ */ (0,
|
|
3681
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3704
3682
|
TableColumnHeader,
|
|
3705
3683
|
{
|
|
3706
3684
|
width: (_c = column.props) == null ? void 0 : _c.width,
|
|
@@ -3710,12 +3688,12 @@ var Table = ({
|
|
|
3710
3688
|
);
|
|
3711
3689
|
}
|
|
3712
3690
|
) }, headerRow.key)) }),
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(TableBody, { children: [
|
|
3714
3692
|
...collection.rows.map(
|
|
3715
|
-
(row) => row.type === "item" && /* @__PURE__ */ (0,
|
|
3693
|
+
(row) => row.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TableRow, { row, children: [...collection.getChildren(row.key)].map(
|
|
3716
3694
|
(cell) => {
|
|
3717
3695
|
var _a;
|
|
3718
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0,
|
|
3696
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TableCell, { cell }, cell.key);
|
|
3719
3697
|
}
|
|
3720
3698
|
) }, row.key)
|
|
3721
3699
|
)
|
|
@@ -3733,8 +3711,8 @@ Table.Header = import_table10.TableHeader;
|
|
|
3733
3711
|
Table.Row = import_table10.Row;
|
|
3734
3712
|
|
|
3735
3713
|
// src/Text/Text.tsx
|
|
3736
|
-
var
|
|
3737
|
-
var
|
|
3714
|
+
var import_system69 = require("@marigold/system");
|
|
3715
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3738
3716
|
var Text2 = ({
|
|
3739
3717
|
variant,
|
|
3740
3718
|
size,
|
|
@@ -3747,27 +3725,27 @@ var Text2 = ({
|
|
|
3747
3725
|
children,
|
|
3748
3726
|
...props
|
|
3749
3727
|
}) => {
|
|
3750
|
-
const theme = (0,
|
|
3751
|
-
const classNames2 = (0,
|
|
3728
|
+
const theme = (0, import_system69.useTheme)();
|
|
3729
|
+
const classNames2 = (0, import_system69.useClassNames)({
|
|
3752
3730
|
component: "Text",
|
|
3753
3731
|
variant,
|
|
3754
3732
|
size
|
|
3755
3733
|
});
|
|
3756
|
-
return /* @__PURE__ */ (0,
|
|
3734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3757
3735
|
"p",
|
|
3758
3736
|
{
|
|
3759
3737
|
...props,
|
|
3760
|
-
className: (0,
|
|
3738
|
+
className: (0, import_system69.cn)(
|
|
3761
3739
|
classNames2,
|
|
3762
3740
|
"text-[--color] outline-[--outline]",
|
|
3763
|
-
fontStyle &&
|
|
3764
|
-
align &&
|
|
3765
|
-
cursor &&
|
|
3766
|
-
weight &&
|
|
3767
|
-
fontSize &&
|
|
3741
|
+
fontStyle && import_system69.textStyle[fontStyle],
|
|
3742
|
+
align && import_system69.textAlign[align],
|
|
3743
|
+
cursor && import_system69.cursorStyle[cursor],
|
|
3744
|
+
weight && import_system69.fontWeight[weight],
|
|
3745
|
+
fontSize && import_system69.textSize[fontSize]
|
|
3768
3746
|
),
|
|
3769
|
-
style: (0,
|
|
3770
|
-
color: color && theme.colors && (0,
|
|
3747
|
+
style: (0, import_system69.createVar)({
|
|
3748
|
+
color: color && theme.colors && (0, import_system69.get)(
|
|
3771
3749
|
theme.colors,
|
|
3772
3750
|
color.replace("-", "."),
|
|
3773
3751
|
color
|
|
@@ -3780,145 +3758,61 @@ var Text2 = ({
|
|
|
3780
3758
|
};
|
|
3781
3759
|
|
|
3782
3760
|
// src/TextArea/TextArea.tsx
|
|
3783
|
-
var
|
|
3784
|
-
var
|
|
3785
|
-
var
|
|
3786
|
-
var
|
|
3787
|
-
var
|
|
3788
|
-
var import_system67 = require("@marigold/system");
|
|
3789
|
-
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3790
|
-
var TextArea = (0, import_react53.forwardRef)(
|
|
3761
|
+
var import_react52 = require("react");
|
|
3762
|
+
var import_react_aria_components21 = require("react-aria-components");
|
|
3763
|
+
var import_system70 = require("@marigold/system");
|
|
3764
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3765
|
+
var _TextArea = (0, import_react52.forwardRef)(
|
|
3791
3766
|
({
|
|
3792
3767
|
variant,
|
|
3793
3768
|
size,
|
|
3794
|
-
width,
|
|
3795
|
-
disabled,
|
|
3796
3769
|
required,
|
|
3770
|
+
disabled,
|
|
3797
3771
|
readOnly,
|
|
3798
3772
|
error,
|
|
3799
3773
|
rows,
|
|
3800
|
-
...
|
|
3774
|
+
...rest
|
|
3801
3775
|
}, ref) => {
|
|
3802
|
-
const {
|
|
3803
|
-
const
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
...props
|
|
3812
|
-
},
|
|
3813
|
-
textAreaRef
|
|
3814
|
-
);
|
|
3815
|
-
const { hoverProps, isHovered } = (0, import_interactions11.useHover)({});
|
|
3816
|
-
const { focusProps, isFocusVisible } = (0, import_focus16.useFocusRing)();
|
|
3817
|
-
const stateProps = (0, import_system67.useStateProps)({
|
|
3818
|
-
hover: isHovered,
|
|
3819
|
-
focus: isFocusVisible,
|
|
3820
|
-
disabled,
|
|
3821
|
-
readOnly,
|
|
3822
|
-
required,
|
|
3823
|
-
error
|
|
3824
|
-
});
|
|
3825
|
-
const classNames2 = (0, import_system67.useClassNames)({ component: "TextArea", variant, size });
|
|
3826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3827
|
-
FieldBase,
|
|
3828
|
-
{
|
|
3829
|
-
label,
|
|
3830
|
-
labelProps,
|
|
3831
|
-
description,
|
|
3832
|
-
descriptionProps,
|
|
3833
|
-
error,
|
|
3834
|
-
errorMessage,
|
|
3835
|
-
errorMessageProps,
|
|
3836
|
-
stateProps,
|
|
3837
|
-
variant,
|
|
3838
|
-
size,
|
|
3839
|
-
width,
|
|
3840
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3841
|
-
"textarea",
|
|
3842
|
-
{
|
|
3843
|
-
className: classNames2,
|
|
3844
|
-
ref: textAreaRef,
|
|
3845
|
-
rows,
|
|
3846
|
-
...inputProps,
|
|
3847
|
-
...focusProps,
|
|
3848
|
-
...hoverProps
|
|
3849
|
-
}
|
|
3850
|
-
)
|
|
3851
|
-
}
|
|
3852
|
-
);
|
|
3776
|
+
const classNames2 = (0, import_system70.useClassNames)({ component: "TextArea", variant, size });
|
|
3777
|
+
const props = {
|
|
3778
|
+
isDisabled: disabled,
|
|
3779
|
+
isReadOnly: readOnly,
|
|
3780
|
+
isInvalid: error,
|
|
3781
|
+
isRequired: required,
|
|
3782
|
+
...rest
|
|
3783
|
+
};
|
|
3784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FieldBase2, { as: import_react_aria_components21.TextField, ...props, variant, size, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_aria_components21.TextArea, { className: classNames2, ref, rows }) });
|
|
3853
3785
|
}
|
|
3854
3786
|
);
|
|
3855
3787
|
|
|
3856
3788
|
// src/TextField/TextField.tsx
|
|
3857
|
-
var
|
|
3858
|
-
var
|
|
3859
|
-
var
|
|
3860
|
-
var
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
);
|
|
3878
|
-
const { hoverProps, isHovered } = (0, import_interactions12.useHover)({});
|
|
3879
|
-
const { focusProps, isFocused } = (0, import_focus17.useFocusRing)({
|
|
3880
|
-
isTextInput: true,
|
|
3881
|
-
autoFocus
|
|
3882
|
-
});
|
|
3883
|
-
const stateProps = (0, import_system68.useStateProps)({
|
|
3884
|
-
hover: isHovered,
|
|
3885
|
-
focus: isFocused,
|
|
3886
|
-
disabled,
|
|
3887
|
-
error,
|
|
3888
|
-
readOnly,
|
|
3889
|
-
required
|
|
3890
|
-
});
|
|
3891
|
-
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3892
|
-
FieldBase,
|
|
3893
|
-
{
|
|
3894
|
-
label,
|
|
3895
|
-
labelProps,
|
|
3896
|
-
description,
|
|
3897
|
-
descriptionProps,
|
|
3898
|
-
error,
|
|
3899
|
-
errorMessage,
|
|
3900
|
-
errorMessageProps,
|
|
3901
|
-
stateProps,
|
|
3902
|
-
variant,
|
|
3903
|
-
size,
|
|
3904
|
-
width,
|
|
3905
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3906
|
-
Input,
|
|
3907
|
-
{
|
|
3908
|
-
ref: inputRef,
|
|
3909
|
-
variant,
|
|
3910
|
-
size,
|
|
3911
|
-
...(0, import_utils28.mergeProps)(focusProps, inputProps, hoverProps)
|
|
3912
|
-
}
|
|
3913
|
-
)
|
|
3914
|
-
}
|
|
3915
|
-
);
|
|
3789
|
+
var import_react53 = require("react");
|
|
3790
|
+
var import_react_aria_components22 = require("react-aria-components");
|
|
3791
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3792
|
+
var _TextField = (0, import_react53.forwardRef)(
|
|
3793
|
+
({
|
|
3794
|
+
variant,
|
|
3795
|
+
size,
|
|
3796
|
+
required,
|
|
3797
|
+
disabled,
|
|
3798
|
+
readOnly,
|
|
3799
|
+
error,
|
|
3800
|
+
...rest
|
|
3801
|
+
}, ref) => {
|
|
3802
|
+
const props = {
|
|
3803
|
+
isDisabled: disabled,
|
|
3804
|
+
isReadOnly: readOnly,
|
|
3805
|
+
isInvalid: error,
|
|
3806
|
+
isRequired: required,
|
|
3807
|
+
...rest
|
|
3808
|
+
};
|
|
3809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FieldBase2, { as: import_react_aria_components22.TextField, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(_Input, { ref }) });
|
|
3916
3810
|
}
|
|
3917
3811
|
);
|
|
3918
3812
|
|
|
3919
3813
|
// src/Tiles/Tiles.tsx
|
|
3920
|
-
var
|
|
3921
|
-
var
|
|
3814
|
+
var import_system71 = require("@marigold/system");
|
|
3815
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3922
3816
|
var Tiles = ({
|
|
3923
3817
|
space = 0,
|
|
3924
3818
|
stretch = false,
|
|
@@ -3931,151 +3825,89 @@ var Tiles = ({
|
|
|
3931
3825
|
if (stretch) {
|
|
3932
3826
|
column = `minmax(${column}, 1fr)`;
|
|
3933
3827
|
}
|
|
3934
|
-
return /* @__PURE__ */ (0,
|
|
3828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3935
3829
|
"div",
|
|
3936
3830
|
{
|
|
3937
3831
|
...props,
|
|
3938
|
-
className: (0,
|
|
3832
|
+
className: (0, import_system71.cn)(
|
|
3939
3833
|
"grid",
|
|
3940
|
-
|
|
3834
|
+
import_system71.gapSpace[space],
|
|
3941
3835
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3942
3836
|
equalHeight && "auto-rows-[1fr]"
|
|
3943
3837
|
),
|
|
3944
|
-
style: (0,
|
|
3838
|
+
style: (0, import_system71.createVar)({ column, tilesWidth }),
|
|
3945
3839
|
children
|
|
3946
3840
|
}
|
|
3947
3841
|
);
|
|
3948
3842
|
};
|
|
3949
3843
|
|
|
3950
3844
|
// src/Tooltip/Tooltip.tsx
|
|
3951
|
-
var
|
|
3952
|
-
var
|
|
3953
|
-
|
|
3954
|
-
// src/Tooltip/Context.ts
|
|
3955
|
-
var import_react55 = require("react");
|
|
3956
|
-
var TooltipContext = (0, import_react55.createContext)({});
|
|
3957
|
-
var useTooltipContext = () => (0, import_react55.useContext)(TooltipContext);
|
|
3845
|
+
var import_react_aria_components24 = require("react-aria-components");
|
|
3846
|
+
var import_system72 = require("@marigold/system");
|
|
3958
3847
|
|
|
3959
3848
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3960
|
-
var
|
|
3961
|
-
var
|
|
3962
|
-
var
|
|
3963
|
-
var import_tooltip = require("@react-aria/tooltip");
|
|
3964
|
-
var import_tooltip2 = require("@react-stately/tooltip");
|
|
3965
|
-
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3966
|
-
var TooltipTrigger = ({
|
|
3967
|
-
disabled,
|
|
3968
|
-
open,
|
|
3849
|
+
var import_react_aria_components23 = require("react-aria-components");
|
|
3850
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3851
|
+
var _TooltipTrigger = ({
|
|
3969
3852
|
delay = 1e3,
|
|
3970
|
-
placement = "top",
|
|
3971
3853
|
children,
|
|
3854
|
+
disabled,
|
|
3855
|
+
open,
|
|
3972
3856
|
...rest
|
|
3973
3857
|
}) => {
|
|
3974
|
-
const [tooltipTrigger, tooltip] = import_react56.Children.toArray(children);
|
|
3975
3858
|
const props = {
|
|
3976
3859
|
...rest,
|
|
3977
3860
|
isDisabled: disabled,
|
|
3978
3861
|
isOpen: open,
|
|
3979
|
-
delay
|
|
3980
|
-
placement
|
|
3862
|
+
delay
|
|
3981
3863
|
};
|
|
3982
|
-
|
|
3983
|
-
const overlayRef = (0, import_react56.useRef)(null);
|
|
3984
|
-
const state = (0, import_tooltip2.useTooltipTriggerState)(props);
|
|
3985
|
-
const { triggerProps, tooltipProps } = (0, import_tooltip.useTooltipTrigger)(
|
|
3986
|
-
props,
|
|
3987
|
-
state,
|
|
3988
|
-
tooltipTriggerRef
|
|
3989
|
-
);
|
|
3990
|
-
const {
|
|
3991
|
-
overlayProps: positionProps,
|
|
3992
|
-
placement: overlayPlacement,
|
|
3993
|
-
arrowProps
|
|
3994
|
-
} = (0, import_overlays8.useOverlayPosition)({
|
|
3995
|
-
placement: props.placement,
|
|
3996
|
-
targetRef: tooltipTriggerRef,
|
|
3997
|
-
offset: props.offset,
|
|
3998
|
-
crossOffset: props.crossOffset,
|
|
3999
|
-
isOpen: state.isOpen,
|
|
4000
|
-
overlayRef
|
|
4001
|
-
});
|
|
4002
|
-
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_focus18.FocusableProvider, { ref: tooltipTriggerRef, ...triggerProps, children: [
|
|
4003
|
-
tooltipTrigger,
|
|
4004
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4005
|
-
TooltipContext.Provider,
|
|
4006
|
-
{
|
|
4007
|
-
value: {
|
|
4008
|
-
state,
|
|
4009
|
-
overlayRef,
|
|
4010
|
-
arrowProps,
|
|
4011
|
-
placement: overlayPlacement,
|
|
4012
|
-
...tooltipProps,
|
|
4013
|
-
...positionProps
|
|
4014
|
-
},
|
|
4015
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Overlay, { open: state.isOpen, children: tooltip })
|
|
4016
|
-
}
|
|
4017
|
-
)
|
|
4018
|
-
] });
|
|
3864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_aria_components23.TooltipTrigger, { ...props, children });
|
|
4019
3865
|
};
|
|
4020
3866
|
|
|
4021
3867
|
// src/Tooltip/Tooltip.tsx
|
|
4022
|
-
var
|
|
4023
|
-
var
|
|
4024
|
-
const
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
className: (0, import_system70.cn)("group/tooltip", classNames2.container),
|
|
4034
|
-
"data-placement": placement,
|
|
4035
|
-
children: [
|
|
4036
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children }),
|
|
4037
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4038
|
-
"div",
|
|
4039
|
-
{
|
|
4040
|
-
...arrowProps,
|
|
4041
|
-
className: (0, import_system70.cn)("absolute h-0 w-0", classNames2.arrow)
|
|
4042
|
-
}
|
|
4043
|
-
)
|
|
4044
|
-
]
|
|
4045
|
-
}
|
|
4046
|
-
);
|
|
3868
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3869
|
+
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3870
|
+
const props = {
|
|
3871
|
+
...rest,
|
|
3872
|
+
isOpen: open
|
|
3873
|
+
};
|
|
3874
|
+
const classNames2 = (0, import_system72.useClassNames)({ component: "Tooltip", variant, size });
|
|
3875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react_aria_components24.Tooltip, { ...props, className: (0, import_system72.cn)("group/tooltip", classNames2.container), children: [
|
|
3876
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_aria_components24.OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3877
|
+
children
|
|
3878
|
+
] });
|
|
4047
3879
|
};
|
|
4048
|
-
|
|
3880
|
+
_Tooltip.Trigger = _TooltipTrigger;
|
|
4049
3881
|
|
|
4050
3882
|
// src/TagGroup/index.ts
|
|
4051
3883
|
var import_collections6 = require("@react-stately/collections");
|
|
4052
3884
|
|
|
4053
3885
|
// src/TagGroup/TagGroup.tsx
|
|
4054
|
-
var
|
|
3886
|
+
var import_react55 = require("react");
|
|
4055
3887
|
var import_tag2 = require("@react-aria/tag");
|
|
4056
3888
|
var import_list = require("@react-stately/list");
|
|
4057
|
-
var
|
|
3889
|
+
var import_system74 = require("@marigold/system");
|
|
4058
3890
|
|
|
4059
3891
|
// src/TagGroup/Tag.tsx
|
|
4060
|
-
var
|
|
4061
|
-
var
|
|
4062
|
-
var
|
|
3892
|
+
var import_react54 = __toESM(require("react"));
|
|
3893
|
+
var import_button4 = require("@react-aria/button");
|
|
3894
|
+
var import_focus14 = require("@react-aria/focus");
|
|
4063
3895
|
var import_tag = require("@react-aria/tag");
|
|
4064
|
-
var
|
|
4065
|
-
var
|
|
4066
|
-
var
|
|
3896
|
+
var import_utils24 = require("@react-aria/utils");
|
|
3897
|
+
var import_system73 = require("@marigold/system");
|
|
3898
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4067
3899
|
var CloseButton2 = ({ className, ...props }) => {
|
|
4068
|
-
const ref = (0,
|
|
4069
|
-
const { buttonProps } = (0,
|
|
4070
|
-
return /* @__PURE__ */ (0,
|
|
3900
|
+
const ref = (0, import_react54.useRef)(null);
|
|
3901
|
+
const { buttonProps } = (0, import_button4.useButton)({ ...props }, ref);
|
|
3902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("button", { className, ...buttonProps, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
4071
3903
|
};
|
|
4072
3904
|
var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
4073
3905
|
const props = {
|
|
4074
3906
|
item,
|
|
4075
3907
|
...rest
|
|
4076
3908
|
};
|
|
4077
|
-
let ref =
|
|
4078
|
-
let { focusProps } = (0,
|
|
3909
|
+
let ref = import_react54.default.useRef(null);
|
|
3910
|
+
let { focusProps } = (0, import_focus14.useFocusRing)({ within: true });
|
|
4079
3911
|
const { rowProps, gridCellProps, allowsRemoving, removeButtonProps } = (0, import_tag.useTag)(
|
|
4080
3912
|
{
|
|
4081
3913
|
...props,
|
|
@@ -4084,20 +3916,20 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
4084
3916
|
state,
|
|
4085
3917
|
ref
|
|
4086
3918
|
);
|
|
4087
|
-
const classNames2 = (0,
|
|
4088
|
-
return /* @__PURE__ */ (0,
|
|
3919
|
+
const classNames2 = (0, import_system73.useClassNames)({ component: "Tag", variant, size });
|
|
3920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4089
3921
|
"span",
|
|
4090
3922
|
{
|
|
4091
3923
|
ref,
|
|
4092
|
-
...(0,
|
|
3924
|
+
...(0, import_utils24.mergeProps)(rowProps, focusProps),
|
|
4093
3925
|
className: classNames2.tag,
|
|
4094
|
-
children: /* @__PURE__ */ (0,
|
|
4095
|
-
/* @__PURE__ */ (0,
|
|
4096
|
-
allowsRemoving && /* @__PURE__ */ (0,
|
|
3926
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { ...gridCellProps, className: classNames2.gridCell, children: [
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { children: item.rendered }),
|
|
3928
|
+
allowsRemoving && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4097
3929
|
CloseButton2,
|
|
4098
3930
|
{
|
|
4099
3931
|
...removeButtonProps,
|
|
4100
|
-
className: (0,
|
|
3932
|
+
className: (0, import_system73.cn)("flex items-center", classNames2.closeButton)
|
|
4101
3933
|
}
|
|
4102
3934
|
)
|
|
4103
3935
|
] })
|
|
@@ -4106,8 +3938,8 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
4106
3938
|
};
|
|
4107
3939
|
|
|
4108
3940
|
// src/TagGroup/TagGroup.tsx
|
|
4109
|
-
var
|
|
4110
|
-
var
|
|
3941
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
3942
|
+
var import_react56 = require("react");
|
|
4111
3943
|
var TagGroup = ({
|
|
4112
3944
|
width,
|
|
4113
3945
|
required,
|
|
@@ -4120,14 +3952,14 @@ var TagGroup = ({
|
|
|
4120
3952
|
validationState: error ? "invalid" : "valid",
|
|
4121
3953
|
...rest
|
|
4122
3954
|
};
|
|
4123
|
-
const inputRef = (0,
|
|
3955
|
+
const inputRef = (0, import_react55.useRef)(null);
|
|
4124
3956
|
const state = (0, import_list.useListState)(props);
|
|
4125
3957
|
const { gridProps, labelProps, descriptionProps, errorMessageProps } = (0, import_tag2.useTagGroup)(props, state, inputRef);
|
|
4126
|
-
const stateProps = (0,
|
|
3958
|
+
const stateProps = (0, import_system74.useStateProps)({
|
|
4127
3959
|
error,
|
|
4128
3960
|
required
|
|
4129
3961
|
});
|
|
4130
|
-
return /* @__PURE__ */ (0,
|
|
3962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4131
3963
|
FieldBase,
|
|
4132
3964
|
{
|
|
4133
3965
|
width,
|
|
@@ -4140,13 +3972,13 @@ var TagGroup = ({
|
|
|
4140
3972
|
errorMessageProps,
|
|
4141
3973
|
stateProps,
|
|
4142
3974
|
...gridProps,
|
|
4143
|
-
children: /* @__PURE__ */ (0,
|
|
3975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4144
3976
|
"div",
|
|
4145
3977
|
{
|
|
4146
3978
|
role: "presentation",
|
|
4147
3979
|
ref: inputRef,
|
|
4148
3980
|
className: "flex flex-wrap items-start gap-1",
|
|
4149
|
-
children: [...state.collection].map((item) => /* @__PURE__ */ (0,
|
|
3981
|
+
children: [...state.collection].map((item) => /* @__PURE__ */ (0, import_react56.createElement)(
|
|
4150
3982
|
Tag,
|
|
4151
3983
|
{
|
|
4152
3984
|
...item.props,
|
|
@@ -4172,11 +4004,11 @@ Tag2.Group = TagGroup;
|
|
|
4172
4004
|
var import_visually_hidden = require("@react-aria/visually-hidden");
|
|
4173
4005
|
|
|
4174
4006
|
// src/XLoader/XLoader.tsx
|
|
4175
|
-
var
|
|
4176
|
-
var
|
|
4177
|
-
var
|
|
4178
|
-
var XLoader = (0,
|
|
4179
|
-
|
|
4007
|
+
var import_react57 = require("react");
|
|
4008
|
+
var import_system75 = require("@marigold/system");
|
|
4009
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4010
|
+
var XLoader = (0, import_react57.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
4011
|
+
import_system75.SVG,
|
|
4180
4012
|
{
|
|
4181
4013
|
id: "XLoader",
|
|
4182
4014
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4185,13 +4017,13 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4185
4017
|
...props,
|
|
4186
4018
|
...ref,
|
|
4187
4019
|
children: [
|
|
4188
|
-
/* @__PURE__ */ (0,
|
|
4189
|
-
/* @__PURE__ */ (0,
|
|
4020
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4021
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4190
4022
|
"path",
|
|
4191
4023
|
{
|
|
4192
4024
|
id: "XMLID_5_",
|
|
4193
4025
|
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",
|
|
4194
|
-
children: /* @__PURE__ */ (0,
|
|
4026
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4195
4027
|
"animate",
|
|
4196
4028
|
{
|
|
4197
4029
|
attributeName: "opacity",
|
|
@@ -4204,12 +4036,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4204
4036
|
)
|
|
4205
4037
|
}
|
|
4206
4038
|
),
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4208
4040
|
"path",
|
|
4209
4041
|
{
|
|
4210
4042
|
id: "XMLID_18_",
|
|
4211
4043
|
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",
|
|
4212
|
-
children: /* @__PURE__ */ (0,
|
|
4044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4213
4045
|
"animate",
|
|
4214
4046
|
{
|
|
4215
4047
|
attributeName: "opacity",
|
|
@@ -4222,12 +4054,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4222
4054
|
)
|
|
4223
4055
|
}
|
|
4224
4056
|
),
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4226
4058
|
"path",
|
|
4227
4059
|
{
|
|
4228
4060
|
id: "XMLID_19_",
|
|
4229
4061
|
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",
|
|
4230
|
-
children: /* @__PURE__ */ (0,
|
|
4062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4231
4063
|
"animate",
|
|
4232
4064
|
{
|
|
4233
4065
|
attributeName: "opacity",
|
|
@@ -4240,12 +4072,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4240
4072
|
)
|
|
4241
4073
|
}
|
|
4242
4074
|
),
|
|
4243
|
-
/* @__PURE__ */ (0,
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4244
4076
|
"path",
|
|
4245
4077
|
{
|
|
4246
4078
|
id: "XMLID_20_",
|
|
4247
4079
|
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",
|
|
4248
|
-
children: /* @__PURE__ */ (0,
|
|
4080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4249
4081
|
"animate",
|
|
4250
4082
|
{
|
|
4251
4083
|
attributeName: "opacity",
|
|
@@ -4258,12 +4090,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4258
4090
|
)
|
|
4259
4091
|
}
|
|
4260
4092
|
),
|
|
4261
|
-
/* @__PURE__ */ (0,
|
|
4093
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4262
4094
|
"path",
|
|
4263
4095
|
{
|
|
4264
4096
|
id: "XMLID_21_",
|
|
4265
4097
|
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",
|
|
4266
|
-
children: /* @__PURE__ */ (0,
|
|
4098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4267
4099
|
"animate",
|
|
4268
4100
|
{
|
|
4269
4101
|
attributeName: "opacity",
|
|
@@ -4276,12 +4108,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4276
4108
|
)
|
|
4277
4109
|
}
|
|
4278
4110
|
),
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4280
4112
|
"path",
|
|
4281
4113
|
{
|
|
4282
4114
|
id: "XMLID_22_",
|
|
4283
4115
|
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",
|
|
4284
|
-
children: /* @__PURE__ */ (0,
|
|
4116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4285
4117
|
"animate",
|
|
4286
4118
|
{
|
|
4287
4119
|
attributeName: "opacity",
|
|
@@ -4294,12 +4126,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4294
4126
|
)
|
|
4295
4127
|
}
|
|
4296
4128
|
),
|
|
4297
|
-
/* @__PURE__ */ (0,
|
|
4129
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4298
4130
|
"path",
|
|
4299
4131
|
{
|
|
4300
4132
|
id: "XMLID_23_",
|
|
4301
4133
|
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",
|
|
4302
|
-
children: /* @__PURE__ */ (0,
|
|
4134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4303
4135
|
"animate",
|
|
4304
4136
|
{
|
|
4305
4137
|
attributeName: "opacity",
|
|
@@ -4312,12 +4144,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4312
4144
|
)
|
|
4313
4145
|
}
|
|
4314
4146
|
),
|
|
4315
|
-
/* @__PURE__ */ (0,
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4316
4148
|
"path",
|
|
4317
4149
|
{
|
|
4318
4150
|
id: "XMLID_24_",
|
|
4319
4151
|
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",
|
|
4320
|
-
children: /* @__PURE__ */ (0,
|
|
4152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4321
4153
|
"animate",
|
|
4322
4154
|
{
|
|
4323
4155
|
attributeName: "opacity",
|
|
@@ -4330,12 +4162,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4330
4162
|
)
|
|
4331
4163
|
}
|
|
4332
4164
|
),
|
|
4333
|
-
/* @__PURE__ */ (0,
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4334
4166
|
"path",
|
|
4335
4167
|
{
|
|
4336
4168
|
id: "XMLID_25_",
|
|
4337
4169
|
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",
|
|
4338
|
-
children: /* @__PURE__ */ (0,
|
|
4170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4339
4171
|
"animate",
|
|
4340
4172
|
{
|
|
4341
4173
|
attributeName: "opacity",
|
|
@@ -4348,12 +4180,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4348
4180
|
)
|
|
4349
4181
|
}
|
|
4350
4182
|
),
|
|
4351
|
-
/* @__PURE__ */ (0,
|
|
4183
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4352
4184
|
"path",
|
|
4353
4185
|
{
|
|
4354
4186
|
id: "XMLID_26_",
|
|
4355
4187
|
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",
|
|
4356
|
-
children: /* @__PURE__ */ (0,
|
|
4188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4357
4189
|
"animate",
|
|
4358
4190
|
{
|
|
4359
4191
|
attributeName: "opacity",
|
|
@@ -4366,12 +4198,12 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4366
4198
|
)
|
|
4367
4199
|
}
|
|
4368
4200
|
),
|
|
4369
|
-
/* @__PURE__ */ (0,
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4370
4202
|
"path",
|
|
4371
4203
|
{
|
|
4372
4204
|
id: "XMLID_27_",
|
|
4373
4205
|
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",
|
|
4374
|
-
children: /* @__PURE__ */ (0,
|
|
4206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4375
4207
|
"animate",
|
|
4376
4208
|
{
|
|
4377
4209
|
attributeName: "opacity",
|
|
@@ -4389,43 +4221,43 @@ var XLoader = (0, import_react60.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
4389
4221
|
));
|
|
4390
4222
|
|
|
4391
4223
|
// src/Tabs/Tabs.tsx
|
|
4392
|
-
var
|
|
4224
|
+
var import_react61 = require("react");
|
|
4393
4225
|
var import_tabs3 = require("@react-aria/tabs");
|
|
4394
4226
|
var import_collections7 = require("@react-stately/collections");
|
|
4395
4227
|
var import_tabs4 = require("@react-stately/tabs");
|
|
4396
|
-
var
|
|
4228
|
+
var import_system78 = require("@marigold/system");
|
|
4397
4229
|
|
|
4398
4230
|
// src/Tabs/Context.ts
|
|
4399
|
-
var
|
|
4400
|
-
var TabContext = (0,
|
|
4401
|
-
var useTabContext = () => (0,
|
|
4231
|
+
var import_react58 = require("react");
|
|
4232
|
+
var TabContext = (0, import_react58.createContext)({});
|
|
4233
|
+
var useTabContext = () => (0, import_react58.useContext)(TabContext);
|
|
4402
4234
|
|
|
4403
4235
|
// src/Tabs/Tab.tsx
|
|
4404
|
-
var
|
|
4405
|
-
var
|
|
4236
|
+
var import_react59 = require("react");
|
|
4237
|
+
var import_interactions8 = require("@react-aria/interactions");
|
|
4406
4238
|
var import_tabs = require("@react-aria/tabs");
|
|
4407
|
-
var
|
|
4408
|
-
var
|
|
4409
|
-
var
|
|
4239
|
+
var import_utils25 = require("@react-aria/utils");
|
|
4240
|
+
var import_system76 = require("@marigold/system");
|
|
4241
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4410
4242
|
var Tab = ({ item, state }) => {
|
|
4411
4243
|
const { key, rendered } = item;
|
|
4412
|
-
const ref = (0,
|
|
4244
|
+
const ref = (0, import_react59.useRef)(null);
|
|
4413
4245
|
const { tabProps, isSelected } = (0, import_tabs.useTab)({ key }, state, ref);
|
|
4414
4246
|
const disabled = tabProps["aria-disabled"];
|
|
4415
|
-
const { hoverProps, isHovered } = (0,
|
|
4247
|
+
const { hoverProps, isHovered } = (0, import_interactions8.useHover)({
|
|
4416
4248
|
isDisabled: disabled || isSelected
|
|
4417
4249
|
});
|
|
4418
|
-
const { focusProps } = (0,
|
|
4419
|
-
const stateProps = (0,
|
|
4250
|
+
const { focusProps } = (0, import_interactions8.useFocus)({});
|
|
4251
|
+
const stateProps = (0, import_system76.useStateProps)({ active: isSelected, hover: isHovered });
|
|
4420
4252
|
const { classNames: classNames2 } = useTabContext();
|
|
4421
|
-
return /* @__PURE__ */ (0,
|
|
4253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4422
4254
|
"div",
|
|
4423
4255
|
{
|
|
4424
|
-
className: (0,
|
|
4256
|
+
className: (0, import_system76.cn)(
|
|
4425
4257
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
4426
4258
|
classNames2.tab
|
|
4427
4259
|
),
|
|
4428
|
-
...(0,
|
|
4260
|
+
...(0, import_utils25.mergeProps)(tabProps, stateProps, focusProps, hoverProps),
|
|
4429
4261
|
ref,
|
|
4430
4262
|
children: rendered
|
|
4431
4263
|
}
|
|
@@ -4433,21 +4265,21 @@ var Tab = ({ item, state }) => {
|
|
|
4433
4265
|
};
|
|
4434
4266
|
|
|
4435
4267
|
// src/Tabs/TabPanel.tsx
|
|
4436
|
-
var
|
|
4268
|
+
var import_react60 = require("react");
|
|
4437
4269
|
var import_tabs2 = require("@react-aria/tabs");
|
|
4438
|
-
var
|
|
4439
|
-
var
|
|
4270
|
+
var import_system77 = require("@marigold/system");
|
|
4271
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4440
4272
|
var TabPanel = ({ state, ...props }) => {
|
|
4441
4273
|
var _a;
|
|
4442
|
-
const ref = (0,
|
|
4274
|
+
const ref = (0, import_react60.useRef)(null);
|
|
4443
4275
|
const { tabPanelProps } = (0, import_tabs2.useTabPanel)(props, state, ref);
|
|
4444
4276
|
const selectedItemProps = (_a = state.selectedItem) == null ? void 0 : _a.props;
|
|
4445
4277
|
const { classNames: classNames2 } = useTabContext();
|
|
4446
|
-
return /* @__PURE__ */ (0,
|
|
4278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: (0, import_system77.cn)(classNames2.tabpanel), ref, ...tabPanelProps, children: selectedItemProps == null ? void 0 : selectedItemProps.children });
|
|
4447
4279
|
};
|
|
4448
4280
|
|
|
4449
4281
|
// src/Tabs/Tabs.tsx
|
|
4450
|
-
var
|
|
4282
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4451
4283
|
var Tabs = ({
|
|
4452
4284
|
space = 2,
|
|
4453
4285
|
size = "medium",
|
|
@@ -4456,31 +4288,31 @@ var Tabs = ({
|
|
|
4456
4288
|
...rest
|
|
4457
4289
|
}) => {
|
|
4458
4290
|
var _a;
|
|
4459
|
-
const ref = (0,
|
|
4291
|
+
const ref = (0, import_react61.useRef)(null);
|
|
4460
4292
|
const props = {
|
|
4461
4293
|
isDisabled: disabled,
|
|
4462
4294
|
...rest
|
|
4463
4295
|
};
|
|
4464
4296
|
const state = (0, import_tabs4.useTabListState)(props);
|
|
4465
4297
|
const { tabListProps } = (0, import_tabs3.useTabList)(props, state, ref);
|
|
4466
|
-
const classNames2 = (0,
|
|
4298
|
+
const classNames2 = (0, import_system78.useClassNames)({
|
|
4467
4299
|
component: "Tabs",
|
|
4468
4300
|
size,
|
|
4469
4301
|
variant
|
|
4470
4302
|
});
|
|
4471
|
-
return /* @__PURE__ */ (0,
|
|
4472
|
-
/* @__PURE__ */ (0,
|
|
4303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_system78.cn)(classNames2.container), children: [
|
|
4304
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4473
4305
|
"div",
|
|
4474
4306
|
{
|
|
4475
|
-
className: (0,
|
|
4307
|
+
className: (0, import_system78.cn)("flex", import_system78.gapSpace[space], classNames2.tabs),
|
|
4476
4308
|
...tabListProps,
|
|
4477
4309
|
ref,
|
|
4478
4310
|
children: [...state.collection].map((item) => {
|
|
4479
|
-
return /* @__PURE__ */ (0,
|
|
4311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Tab, { item, state }, item.key);
|
|
4480
4312
|
})
|
|
4481
4313
|
}
|
|
4482
4314
|
),
|
|
4483
|
-
/* @__PURE__ */ (0,
|
|
4315
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TabPanel, { state }, (_a = state.selectedItem) == null ? void 0 : _a.key)
|
|
4484
4316
|
] }) });
|
|
4485
4317
|
};
|
|
4486
4318
|
Tabs.Item = import_collections7.Item;
|
|
@@ -4552,6 +4384,7 @@ Tabs.Item = import_collections7.Item;
|
|
|
4552
4384
|
VisuallyHidden,
|
|
4553
4385
|
XLoader,
|
|
4554
4386
|
_Slider,
|
|
4387
|
+
_TextArea,
|
|
4555
4388
|
useAsyncList,
|
|
4556
4389
|
useFieldGroupContext,
|
|
4557
4390
|
useListData,
|