@marigold/components 10.1.0 → 10.1.2
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 +74 -29
- package/dist/index.d.ts +74 -29
- package/dist/index.js +855 -493
- package/dist/index.mjs +792 -431
- package/package.json +27 -27
package/dist/index.mjs
CHANGED
|
@@ -636,15 +636,22 @@ var _ListBoxItem = ({ ...props }) => {
|
|
|
636
636
|
};
|
|
637
637
|
|
|
638
638
|
// src/ListBox/ListBoxSection.tsx
|
|
639
|
-
import { Header,
|
|
639
|
+
import { Header, ListBoxSection } from "react-aria-components";
|
|
640
640
|
import { cn as cn9 } from "@marigold/system";
|
|
641
641
|
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
642
642
|
var _Section = ({ header: header2, children, ...props }) => {
|
|
643
643
|
const { classNames: classNames2 } = useListBoxContext();
|
|
644
|
-
return /* @__PURE__ */ jsxs7(
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
644
|
+
return /* @__PURE__ */ jsxs7(
|
|
645
|
+
ListBoxSection,
|
|
646
|
+
{
|
|
647
|
+
...props,
|
|
648
|
+
className: cn9(classNames2.section, classNames2.header),
|
|
649
|
+
children: [
|
|
650
|
+
/* @__PURE__ */ jsx18(Header, { children: header2 }),
|
|
651
|
+
children
|
|
652
|
+
]
|
|
653
|
+
}
|
|
654
|
+
);
|
|
648
655
|
};
|
|
649
656
|
|
|
650
657
|
// src/ListBox/ListBox.tsx
|
|
@@ -2072,11 +2079,13 @@ var _Calendar = ({
|
|
|
2072
2079
|
readOnly,
|
|
2073
2080
|
size,
|
|
2074
2081
|
variant,
|
|
2082
|
+
dateUnavailable,
|
|
2075
2083
|
...rest
|
|
2076
2084
|
}) => {
|
|
2077
2085
|
const props = {
|
|
2078
2086
|
isDisabled: disabled,
|
|
2079
2087
|
isReadOnly: readOnly,
|
|
2088
|
+
isDateUnavailable: dateUnavailable,
|
|
2080
2089
|
...rest
|
|
2081
2090
|
};
|
|
2082
2091
|
const classNames2 = useClassNames32({ component: "Calendar" });
|
|
@@ -2274,12 +2283,12 @@ var _MenuItem = ({ children, ...props }) => {
|
|
|
2274
2283
|
};
|
|
2275
2284
|
|
|
2276
2285
|
// src/Menu/MenuSection.tsx
|
|
2277
|
-
import {
|
|
2286
|
+
import { MenuSection } from "react-aria-components";
|
|
2278
2287
|
import { useClassNames as useClassNames37 } from "@marigold/system";
|
|
2279
2288
|
import { jsx as jsx67, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2280
2289
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2281
2290
|
const className = useClassNames37({ component: "Menu" });
|
|
2282
|
-
return /* @__PURE__ */ jsxs24(
|
|
2291
|
+
return /* @__PURE__ */ jsxs24(MenuSection, { ...props, children: [
|
|
2283
2292
|
/* @__PURE__ */ jsx67(_Header, { className: className.section, children: title }),
|
|
2284
2293
|
children
|
|
2285
2294
|
] });
|
|
@@ -2325,7 +2334,8 @@ var ActionMenu = ({
|
|
|
2325
2334
|
};
|
|
2326
2335
|
|
|
2327
2336
|
// src/SectionMessage/SectionMessage.tsx
|
|
2328
|
-
import { useState as useState2 } from "react";
|
|
2337
|
+
import { useRef as useRef4, useState as useState2 } from "react";
|
|
2338
|
+
import { useButton as useButton2 } from "@react-aria/button";
|
|
2329
2339
|
import { cn as cn39, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2330
2340
|
|
|
2331
2341
|
// src/SectionMessage/Context.tsx
|
|
@@ -2424,19 +2434,27 @@ var SectionMessage = ({
|
|
|
2424
2434
|
size,
|
|
2425
2435
|
children,
|
|
2426
2436
|
closeButton,
|
|
2437
|
+
close,
|
|
2438
|
+
onCloseChange,
|
|
2427
2439
|
...props
|
|
2428
2440
|
}) => {
|
|
2441
|
+
const buttonRef = useRef4(null);
|
|
2429
2442
|
const classNames2 = useClassNames40({
|
|
2430
2443
|
component: "SectionMessage",
|
|
2431
2444
|
variant,
|
|
2432
2445
|
size
|
|
2433
2446
|
});
|
|
2434
2447
|
const Icon4 = icons[variant];
|
|
2435
|
-
const [
|
|
2448
|
+
const [internalVisible, setInternalVisible] = useState2(true);
|
|
2449
|
+
const isCurrentlyVisible = close != null ? close : internalVisible;
|
|
2450
|
+
const { buttonProps } = useButton2(props, buttonRef);
|
|
2436
2451
|
const handleClose = () => {
|
|
2437
|
-
|
|
2452
|
+
onCloseChange && close && onCloseChange(close);
|
|
2453
|
+
if (close === void 0) {
|
|
2454
|
+
setInternalVisible(false);
|
|
2455
|
+
}
|
|
2438
2456
|
};
|
|
2439
|
-
if (!
|
|
2457
|
+
if (!isCurrentlyVisible) return null;
|
|
2440
2458
|
return /* @__PURE__ */ jsx72(SectionMessageContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsxs27(
|
|
2441
2459
|
"div",
|
|
2442
2460
|
{
|
|
@@ -2457,6 +2475,8 @@ var SectionMessage = ({
|
|
|
2457
2475
|
closeButton && /* @__PURE__ */ jsx72(
|
|
2458
2476
|
"button",
|
|
2459
2477
|
{
|
|
2478
|
+
...buttonProps,
|
|
2479
|
+
ref: buttonRef,
|
|
2460
2480
|
"aria-label": "close",
|
|
2461
2481
|
className: "h-5 w-5 cursor-pointer border-none p-0 leading-normal outline-0 [grid-area:close]",
|
|
2462
2482
|
onClick: handleClose,
|
|
@@ -2705,12 +2725,339 @@ var _NumberField = forwardRef19(
|
|
|
2705
2725
|
}
|
|
2706
2726
|
);
|
|
2707
2727
|
|
|
2728
|
+
// src/Pagination/Pagination.tsx
|
|
2729
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
2730
|
+
|
|
2731
|
+
// src/Pagination/Ellipsis.tsx
|
|
2732
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
2733
|
+
var Ellipsis = () => {
|
|
2734
|
+
return /* @__PURE__ */ jsx78(
|
|
2735
|
+
"span",
|
|
2736
|
+
{
|
|
2737
|
+
className: "text-text-base flex h-8 w-8 items-center justify-center",
|
|
2738
|
+
"aria-label": "These pages are hidden",
|
|
2739
|
+
children: "\u2026"
|
|
2740
|
+
}
|
|
2741
|
+
);
|
|
2742
|
+
};
|
|
2743
|
+
|
|
2744
|
+
// src/Pagination/NavigationButton.tsx
|
|
2745
|
+
import React7, { useEffect as useEffect3 } from "react";
|
|
2746
|
+
import { useButton as useButton3 } from "@react-aria/button";
|
|
2747
|
+
import { cn as cn43, useClassNames as useClassNames44 } from "@marigold/system";
|
|
2748
|
+
import { jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2749
|
+
var NavigationButton = (props) => {
|
|
2750
|
+
const ref = React7.useRef(null);
|
|
2751
|
+
const classNames2 = useClassNames44({
|
|
2752
|
+
component: "Pagination"
|
|
2753
|
+
});
|
|
2754
|
+
let { buttonProps } = useButton3(props, ref);
|
|
2755
|
+
let {
|
|
2756
|
+
children,
|
|
2757
|
+
isSelected,
|
|
2758
|
+
isDisabled,
|
|
2759
|
+
registerRef,
|
|
2760
|
+
controlLabel,
|
|
2761
|
+
position,
|
|
2762
|
+
...rest
|
|
2763
|
+
} = props;
|
|
2764
|
+
useEffect3(() => {
|
|
2765
|
+
if (registerRef) {
|
|
2766
|
+
registerRef(ref.current);
|
|
2767
|
+
return () => registerRef(null);
|
|
2768
|
+
}
|
|
2769
|
+
}, [registerRef]);
|
|
2770
|
+
return /* @__PURE__ */ jsxs31(
|
|
2771
|
+
"button",
|
|
2772
|
+
{
|
|
2773
|
+
ref,
|
|
2774
|
+
...buttonProps,
|
|
2775
|
+
...rest,
|
|
2776
|
+
disabled: isDisabled,
|
|
2777
|
+
className: cn43(classNames2, controlLabel && "w-24 px-2"),
|
|
2778
|
+
"data-selected": isSelected,
|
|
2779
|
+
children: [
|
|
2780
|
+
position === "left" && children,
|
|
2781
|
+
controlLabel,
|
|
2782
|
+
position === "right" && children
|
|
2783
|
+
]
|
|
2784
|
+
}
|
|
2785
|
+
);
|
|
2786
|
+
};
|
|
2787
|
+
|
|
2788
|
+
// src/Pagination/PageButton.tsx
|
|
2789
|
+
import { useEffect as useEffect4, useRef as useRef5 } from "react";
|
|
2790
|
+
import { useButton as useButton4 } from "@react-aria/button";
|
|
2791
|
+
import { useClassNames as useClassNames45 } from "@marigold/system";
|
|
2792
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2793
|
+
var PageButton = (props) => {
|
|
2794
|
+
const ref = useRef5(null);
|
|
2795
|
+
const classNames2 = useClassNames45({
|
|
2796
|
+
component: "Pagination"
|
|
2797
|
+
});
|
|
2798
|
+
let { buttonProps } = useButton4(props, ref);
|
|
2799
|
+
let { page, selected, registerRef, isDisabled } = props;
|
|
2800
|
+
useEffect4(() => {
|
|
2801
|
+
if (registerRef) {
|
|
2802
|
+
registerRef(ref.current);
|
|
2803
|
+
return () => registerRef(null);
|
|
2804
|
+
}
|
|
2805
|
+
}, [registerRef]);
|
|
2806
|
+
return /* @__PURE__ */ jsx79(
|
|
2807
|
+
"button",
|
|
2808
|
+
{
|
|
2809
|
+
ref,
|
|
2810
|
+
...buttonProps,
|
|
2811
|
+
"aria-label": `Page ${page}`,
|
|
2812
|
+
"aria-current": selected ? "page" : void 0,
|
|
2813
|
+
className: classNames2,
|
|
2814
|
+
"data-selected": selected,
|
|
2815
|
+
disabled: isDisabled,
|
|
2816
|
+
tabIndex: selected === true ? 0 : -1,
|
|
2817
|
+
children: page
|
|
2818
|
+
}
|
|
2819
|
+
);
|
|
2820
|
+
};
|
|
2821
|
+
|
|
2822
|
+
// src/Pagination/useKeyboardNavigation.tsx
|
|
2823
|
+
import { useCallback, useRef as useRef6, useState as useState4 } from "react";
|
|
2824
|
+
import { useKeyboard } from "@react-aria/interactions";
|
|
2825
|
+
var NavigationTypes = {
|
|
2826
|
+
Prev: "prev",
|
|
2827
|
+
Next: "next",
|
|
2828
|
+
Page: "page",
|
|
2829
|
+
Ellipsis: "ellipsis"
|
|
2830
|
+
};
|
|
2831
|
+
var useKeyboardNavigation = ({
|
|
2832
|
+
page,
|
|
2833
|
+
totalPages,
|
|
2834
|
+
onChange = () => {
|
|
2835
|
+
}
|
|
2836
|
+
}) => {
|
|
2837
|
+
const containerRef = useRef6(null);
|
|
2838
|
+
const [focusedItem, setFocusedItem] = useState4({
|
|
2839
|
+
type: "page",
|
|
2840
|
+
value: page
|
|
2841
|
+
});
|
|
2842
|
+
const navigationItems = useRef6([]);
|
|
2843
|
+
const buttonRefs = useRef6(/* @__PURE__ */ new Map());
|
|
2844
|
+
const isItemDisabled = useCallback(
|
|
2845
|
+
(item) => {
|
|
2846
|
+
if (item.type === NavigationTypes.Prev) return page <= 1;
|
|
2847
|
+
if (item.type === NavigationTypes.Next) return page >= totalPages;
|
|
2848
|
+
return item.type === NavigationTypes.Ellipsis;
|
|
2849
|
+
},
|
|
2850
|
+
[page, totalPages]
|
|
2851
|
+
);
|
|
2852
|
+
const findNextFocusableItem = useCallback(
|
|
2853
|
+
(current, direction) => {
|
|
2854
|
+
const items = navigationItems.current.filter(
|
|
2855
|
+
(item) => !isItemDisabled(item)
|
|
2856
|
+
);
|
|
2857
|
+
const currentIndex = items.findIndex(
|
|
2858
|
+
(item) => item.type === current.type && item.value === current.value
|
|
2859
|
+
);
|
|
2860
|
+
if (currentIndex === -1) {
|
|
2861
|
+
return items[0] || { type: NavigationTypes.Page, value: page };
|
|
2862
|
+
}
|
|
2863
|
+
const nextIndex = direction === "next" ? (currentIndex + 1) % items.length : (currentIndex - 1 + items.length) % items.length;
|
|
2864
|
+
return items[nextIndex];
|
|
2865
|
+
},
|
|
2866
|
+
[isItemDisabled, page]
|
|
2867
|
+
);
|
|
2868
|
+
const focusItem = useCallback(
|
|
2869
|
+
(item) => {
|
|
2870
|
+
if (isItemDisabled(item)) return;
|
|
2871
|
+
const key = `${item.type}-${item.value}`;
|
|
2872
|
+
const element = buttonRefs.current.get(key);
|
|
2873
|
+
if (element && typeof element.focus === "function") {
|
|
2874
|
+
element.focus();
|
|
2875
|
+
setFocusedItem(item);
|
|
2876
|
+
}
|
|
2877
|
+
},
|
|
2878
|
+
[isItemDisabled]
|
|
2879
|
+
);
|
|
2880
|
+
const { keyboardProps } = useKeyboard({
|
|
2881
|
+
onKeyDown: (e) => {
|
|
2882
|
+
let newFocusedItem = focusedItem;
|
|
2883
|
+
switch (e.key) {
|
|
2884
|
+
case "ArrowLeft":
|
|
2885
|
+
newFocusedItem = findNextFocusableItem(focusedItem, "prev");
|
|
2886
|
+
break;
|
|
2887
|
+
case "ArrowRight":
|
|
2888
|
+
newFocusedItem = findNextFocusableItem(focusedItem, "next");
|
|
2889
|
+
break;
|
|
2890
|
+
case "Home":
|
|
2891
|
+
newFocusedItem = navigationItems.current.find((item) => !isItemDisabled(item)) || focusedItem;
|
|
2892
|
+
break;
|
|
2893
|
+
case "End":
|
|
2894
|
+
newFocusedItem = [...navigationItems.current].reverse().find((item) => !isItemDisabled(item)) || focusedItem;
|
|
2895
|
+
break;
|
|
2896
|
+
case "Enter":
|
|
2897
|
+
case " ":
|
|
2898
|
+
if (isItemDisabled(focusedItem)) return;
|
|
2899
|
+
if (focusedItem.type === NavigationTypes.Page && typeof focusedItem.value === "number") {
|
|
2900
|
+
onChange(focusedItem.value);
|
|
2901
|
+
} else if (focusedItem.type === NavigationTypes.Prev && page > 1) {
|
|
2902
|
+
onChange(page - 1);
|
|
2903
|
+
} else if (focusedItem.type === NavigationTypes.Next && page < totalPages) {
|
|
2904
|
+
onChange(page + 1);
|
|
2905
|
+
}
|
|
2906
|
+
break;
|
|
2907
|
+
default:
|
|
2908
|
+
return;
|
|
2909
|
+
}
|
|
2910
|
+
if (newFocusedItem !== focusedItem) {
|
|
2911
|
+
focusItem(newFocusedItem);
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
});
|
|
2915
|
+
const registerRef = useCallback(
|
|
2916
|
+
(type, value, ref) => {
|
|
2917
|
+
const key = `${type}-${value}`;
|
|
2918
|
+
if (ref) {
|
|
2919
|
+
buttonRefs.current.set(key, ref);
|
|
2920
|
+
} else {
|
|
2921
|
+
buttonRefs.current.delete(key);
|
|
2922
|
+
}
|
|
2923
|
+
},
|
|
2924
|
+
[]
|
|
2925
|
+
);
|
|
2926
|
+
const setNavigationItems = useCallback((items) => {
|
|
2927
|
+
navigationItems.current = items;
|
|
2928
|
+
}, []);
|
|
2929
|
+
return {
|
|
2930
|
+
containerRef,
|
|
2931
|
+
keyboardProps,
|
|
2932
|
+
registerRef,
|
|
2933
|
+
setNavigationItems,
|
|
2934
|
+
setFocusedItem
|
|
2935
|
+
};
|
|
2936
|
+
};
|
|
2937
|
+
|
|
2938
|
+
// src/Pagination/usePageRange.tsx
|
|
2939
|
+
var usePageRange = ({ currentPage, totalPages }) => {
|
|
2940
|
+
const getPageRange = () => {
|
|
2941
|
+
if (totalPages <= 7) {
|
|
2942
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
2943
|
+
}
|
|
2944
|
+
const pages = [1];
|
|
2945
|
+
if (currentPage <= 4) {
|
|
2946
|
+
for (let i = 2; i <= 5; i++) {
|
|
2947
|
+
pages.push(i);
|
|
2948
|
+
}
|
|
2949
|
+
pages.push("ellipsis");
|
|
2950
|
+
} else if (currentPage >= totalPages - 3) {
|
|
2951
|
+
pages.push("ellipsis");
|
|
2952
|
+
for (let i = totalPages - 4; i < totalPages; i++) {
|
|
2953
|
+
pages.push(i);
|
|
2954
|
+
}
|
|
2955
|
+
} else {
|
|
2956
|
+
pages.push("ellipsis");
|
|
2957
|
+
for (let i = currentPage - 1; i <= currentPage + 1; i++) {
|
|
2958
|
+
pages.push(i);
|
|
2959
|
+
}
|
|
2960
|
+
pages.push("ellipsis");
|
|
2961
|
+
}
|
|
2962
|
+
pages.push(totalPages);
|
|
2963
|
+
return pages;
|
|
2964
|
+
};
|
|
2965
|
+
return getPageRange();
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2968
|
+
// src/Pagination/Pagination.tsx
|
|
2969
|
+
import { jsx as jsx80, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2970
|
+
var _Pagination = ({
|
|
2971
|
+
defaultPage = 1,
|
|
2972
|
+
page,
|
|
2973
|
+
totalItems,
|
|
2974
|
+
pageSize,
|
|
2975
|
+
onChange = () => {
|
|
2976
|
+
},
|
|
2977
|
+
controlLabels
|
|
2978
|
+
}) => {
|
|
2979
|
+
const [currentPage, setCurrentPage] = useState5(page != null ? page : defaultPage);
|
|
2980
|
+
const totalPages = Math.ceil(totalItems / pageSize);
|
|
2981
|
+
const handlePageChange = (newPage) => {
|
|
2982
|
+
setCurrentPage(newPage);
|
|
2983
|
+
onChange(newPage);
|
|
2984
|
+
};
|
|
2985
|
+
const { registerRef, keyboardProps, setNavigationItems, setFocusedItem } = useKeyboardNavigation({
|
|
2986
|
+
page: currentPage,
|
|
2987
|
+
totalPages,
|
|
2988
|
+
onChange: handlePageChange
|
|
2989
|
+
});
|
|
2990
|
+
const pageRange = usePageRange({ currentPage, totalPages });
|
|
2991
|
+
useEffect5(() => {
|
|
2992
|
+
const items = [
|
|
2993
|
+
{ type: NavigationTypes.Prev, value: currentPage - 1 },
|
|
2994
|
+
...pageRange.map((value) => ({
|
|
2995
|
+
type: typeof value === "number" ? NavigationTypes.Page : NavigationTypes.Ellipsis,
|
|
2996
|
+
value
|
|
2997
|
+
})),
|
|
2998
|
+
{ type: NavigationTypes.Next, value: currentPage + 1 }
|
|
2999
|
+
];
|
|
3000
|
+
setNavigationItems(items);
|
|
3001
|
+
}, [pageRange, currentPage, setNavigationItems]);
|
|
3002
|
+
useEffect5(() => {
|
|
3003
|
+
setFocusedItem({ type: NavigationTypes.Page, value: currentPage });
|
|
3004
|
+
}, [currentPage, setFocusedItem]);
|
|
3005
|
+
const isFirstPage = currentPage === 1;
|
|
3006
|
+
const isLastPage = currentPage === totalPages || totalPages === 0;
|
|
3007
|
+
return /* @__PURE__ */ jsxs32(
|
|
3008
|
+
"nav",
|
|
3009
|
+
{
|
|
3010
|
+
className: "flex items-center justify-center space-x-2",
|
|
3011
|
+
"aria-label": `Page ${currentPage} of ${totalPages}`,
|
|
3012
|
+
...keyboardProps,
|
|
3013
|
+
children: [
|
|
3014
|
+
/* @__PURE__ */ jsx80(
|
|
3015
|
+
NavigationButton,
|
|
3016
|
+
{
|
|
3017
|
+
onPress: () => handlePageChange(Math.max(1, currentPage - 1)),
|
|
3018
|
+
"aria-label": "Page previous",
|
|
3019
|
+
isDisabled: isFirstPage,
|
|
3020
|
+
registerRef: (ref) => registerRef(NavigationTypes.Prev, currentPage - 1, ref),
|
|
3021
|
+
controlLabel: controlLabels == null ? void 0 : controlLabels[0],
|
|
3022
|
+
position: "left",
|
|
3023
|
+
children: /* @__PURE__ */ jsx80(ChevronLeft, { className: "h-5 w-5" })
|
|
3024
|
+
}
|
|
3025
|
+
),
|
|
3026
|
+
/* @__PURE__ */ jsx80("div", { className: "flex items-center space-x-2", children: totalPages > 0 ? pageRange.map(
|
|
3027
|
+
(pageNumber, index) => pageNumber === "ellipsis" ? /* @__PURE__ */ jsx80(Ellipsis, {}, `ellipsis-${index}`) : /* @__PURE__ */ jsx80(
|
|
3028
|
+
PageButton,
|
|
3029
|
+
{
|
|
3030
|
+
page: pageNumber,
|
|
3031
|
+
selected: pageNumber === currentPage,
|
|
3032
|
+
onPress: () => handlePageChange(pageNumber),
|
|
3033
|
+
registerRef: (ref) => registerRef(NavigationTypes.Page, pageNumber, ref)
|
|
3034
|
+
},
|
|
3035
|
+
pageNumber
|
|
3036
|
+
)
|
|
3037
|
+
) : /* @__PURE__ */ jsx80(PageButton, { page: 1, isDisabled: true }, 1) }),
|
|
3038
|
+
/* @__PURE__ */ jsx80(
|
|
3039
|
+
NavigationButton,
|
|
3040
|
+
{
|
|
3041
|
+
onPress: () => handlePageChange(Math.min(totalPages, currentPage + 1)),
|
|
3042
|
+
"aria-label": "Page next",
|
|
3043
|
+
isDisabled: isLastPage,
|
|
3044
|
+
registerRef: (ref) => registerRef(NavigationTypes.Next, currentPage + 1, ref),
|
|
3045
|
+
controlLabel: controlLabels == null ? void 0 : controlLabels[1],
|
|
3046
|
+
position: "right",
|
|
3047
|
+
children: /* @__PURE__ */ jsx80(ChevronRight, { className: "h-5 w-5" })
|
|
3048
|
+
}
|
|
3049
|
+
)
|
|
3050
|
+
]
|
|
3051
|
+
}
|
|
3052
|
+
);
|
|
3053
|
+
};
|
|
3054
|
+
|
|
2708
3055
|
// src/Radio/Radio.tsx
|
|
2709
3056
|
import {
|
|
2710
3057
|
forwardRef as forwardRef20
|
|
2711
3058
|
} from "react";
|
|
2712
3059
|
import { Radio } from "react-aria-components";
|
|
2713
|
-
import { cn as
|
|
3060
|
+
import { cn as cn45, useClassNames as useClassNames47 } from "@marigold/system";
|
|
2714
3061
|
|
|
2715
3062
|
// src/Radio/Context.ts
|
|
2716
3063
|
import { createContext as createContext7, useContext as useContext13 } from "react";
|
|
@@ -2721,8 +3068,8 @@ var useRadioGroupContext = () => useContext13(RadioGroupContext);
|
|
|
2721
3068
|
|
|
2722
3069
|
// src/Radio/RadioGroup.tsx
|
|
2723
3070
|
import { RadioGroup } from "react-aria-components";
|
|
2724
|
-
import { cn as
|
|
2725
|
-
import { jsx as
|
|
3071
|
+
import { cn as cn44, useClassNames as useClassNames46 } from "@marigold/system";
|
|
3072
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
2726
3073
|
var _RadioGroup = ({
|
|
2727
3074
|
variant,
|
|
2728
3075
|
size,
|
|
@@ -2738,7 +3085,7 @@ var _RadioGroup = ({
|
|
|
2738
3085
|
width,
|
|
2739
3086
|
...rest
|
|
2740
3087
|
}) => {
|
|
2741
|
-
const classNames2 =
|
|
3088
|
+
const classNames2 = useClassNames46({ component: "Radio", variant, size });
|
|
2742
3089
|
const props = {
|
|
2743
3090
|
isDisabled: disabled,
|
|
2744
3091
|
isReadOnly: readOnly,
|
|
@@ -2746,7 +3093,7 @@ var _RadioGroup = ({
|
|
|
2746
3093
|
isInvalid: error,
|
|
2747
3094
|
...rest
|
|
2748
3095
|
};
|
|
2749
|
-
return /* @__PURE__ */
|
|
3096
|
+
return /* @__PURE__ */ jsx81(
|
|
2750
3097
|
FieldBase,
|
|
2751
3098
|
{
|
|
2752
3099
|
as: RadioGroup,
|
|
@@ -2757,18 +3104,18 @@ var _RadioGroup = ({
|
|
|
2757
3104
|
variant,
|
|
2758
3105
|
size,
|
|
2759
3106
|
...props,
|
|
2760
|
-
children: /* @__PURE__ */
|
|
3107
|
+
children: /* @__PURE__ */ jsx81(
|
|
2761
3108
|
"div",
|
|
2762
3109
|
{
|
|
2763
3110
|
role: "presentation",
|
|
2764
3111
|
"data-testid": "group",
|
|
2765
3112
|
"data-orientation": orientation,
|
|
2766
|
-
className:
|
|
3113
|
+
className: cn44(
|
|
2767
3114
|
classNames2.group,
|
|
2768
3115
|
"flex items-start",
|
|
2769
3116
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2770
3117
|
),
|
|
2771
|
-
children: /* @__PURE__ */
|
|
3118
|
+
children: /* @__PURE__ */ jsx81(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
2772
3119
|
}
|
|
2773
3120
|
)
|
|
2774
3121
|
}
|
|
@@ -2776,33 +3123,33 @@ var _RadioGroup = ({
|
|
|
2776
3123
|
};
|
|
2777
3124
|
|
|
2778
3125
|
// src/Radio/Radio.tsx
|
|
2779
|
-
import { Fragment as Fragment7, jsx as
|
|
2780
|
-
var Dot = () => /* @__PURE__ */
|
|
2781
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
3126
|
+
import { Fragment as Fragment7, jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3127
|
+
var Dot = () => /* @__PURE__ */ jsx82("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx82("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
3128
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx82(
|
|
2782
3129
|
"div",
|
|
2783
3130
|
{
|
|
2784
|
-
className:
|
|
3131
|
+
className: cn45(
|
|
2785
3132
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2786
3133
|
className
|
|
2787
3134
|
),
|
|
2788
3135
|
"aria-hidden": "true",
|
|
2789
3136
|
...props,
|
|
2790
|
-
children: checked ? /* @__PURE__ */
|
|
3137
|
+
children: checked ? /* @__PURE__ */ jsx82(Dot, {}) : null
|
|
2791
3138
|
}
|
|
2792
3139
|
);
|
|
2793
3140
|
var _Radio = forwardRef20(
|
|
2794
3141
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2795
3142
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2796
|
-
const classNames2 =
|
|
3143
|
+
const classNames2 = useClassNames47({
|
|
2797
3144
|
component: "Radio",
|
|
2798
3145
|
variant: variant || props.variant,
|
|
2799
3146
|
size: size || props.size
|
|
2800
3147
|
});
|
|
2801
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ jsx82(
|
|
2802
3149
|
Radio,
|
|
2803
3150
|
{
|
|
2804
3151
|
ref,
|
|
2805
|
-
className:
|
|
3152
|
+
className: cn45(
|
|
2806
3153
|
"group/radio",
|
|
2807
3154
|
"relative flex items-center gap-[1ch]",
|
|
2808
3155
|
width || groupWidth || "w-full",
|
|
@@ -2811,18 +3158,18 @@ var _Radio = forwardRef20(
|
|
|
2811
3158
|
value,
|
|
2812
3159
|
isDisabled: disabled,
|
|
2813
3160
|
...props,
|
|
2814
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2815
|
-
/* @__PURE__ */
|
|
3161
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs33(Fragment7, { children: [
|
|
3162
|
+
/* @__PURE__ */ jsx82(
|
|
2816
3163
|
Icon3,
|
|
2817
3164
|
{
|
|
2818
3165
|
checked: isSelected,
|
|
2819
|
-
className:
|
|
3166
|
+
className: cn45(
|
|
2820
3167
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2821
3168
|
classNames2.radio
|
|
2822
3169
|
)
|
|
2823
3170
|
}
|
|
2824
3171
|
),
|
|
2825
|
-
/* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ jsx82("div", { className: classNames2.label, children })
|
|
2826
3173
|
] })
|
|
2827
3174
|
}
|
|
2828
3175
|
);
|
|
@@ -2833,7 +3180,7 @@ _Radio.Group = _RadioGroup;
|
|
|
2833
3180
|
// src/SearchField/SearchField.tsx
|
|
2834
3181
|
import { forwardRef as forwardRef21 } from "react";
|
|
2835
3182
|
import { SearchField } from "react-aria-components";
|
|
2836
|
-
import { jsx as
|
|
3183
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
2837
3184
|
var _SearchField = forwardRef21(
|
|
2838
3185
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2839
3186
|
const props = {
|
|
@@ -2843,7 +3190,7 @@ var _SearchField = forwardRef21(
|
|
|
2843
3190
|
isReadOnly: readOnly,
|
|
2844
3191
|
isInvalid: error
|
|
2845
3192
|
};
|
|
2846
|
-
return /* @__PURE__ */
|
|
3193
|
+
return /* @__PURE__ */ jsx83(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx83(
|
|
2847
3194
|
SearchInput,
|
|
2848
3195
|
{
|
|
2849
3196
|
ref,
|
|
@@ -2860,8 +3207,8 @@ import {
|
|
|
2860
3207
|
Select,
|
|
2861
3208
|
SelectValue
|
|
2862
3209
|
} from "react-aria-components";
|
|
2863
|
-
import { cn as
|
|
2864
|
-
import { jsx as
|
|
3210
|
+
import { cn as cn46, useClassNames as useClassNames48 } from "@marigold/system";
|
|
3211
|
+
import { jsx as jsx84, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2865
3212
|
var _Select = forwardRef22(
|
|
2866
3213
|
({
|
|
2867
3214
|
disabled,
|
|
@@ -2882,22 +3229,22 @@ var _Select = forwardRef22(
|
|
|
2882
3229
|
onSelectionChange: onChange,
|
|
2883
3230
|
...rest
|
|
2884
3231
|
};
|
|
2885
|
-
const classNames2 =
|
|
2886
|
-
return /* @__PURE__ */
|
|
2887
|
-
/* @__PURE__ */
|
|
3232
|
+
const classNames2 = useClassNames48({ component: "Select", variant, size });
|
|
3233
|
+
return /* @__PURE__ */ jsxs34(FieldBase, { as: Select, ref, variant, size, ...props, children: [
|
|
3234
|
+
/* @__PURE__ */ jsxs34(
|
|
2888
3235
|
Button6,
|
|
2889
3236
|
{
|
|
2890
|
-
className:
|
|
3237
|
+
className: cn46(
|
|
2891
3238
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2892
3239
|
classNames2.select
|
|
2893
3240
|
),
|
|
2894
3241
|
children: [
|
|
2895
|
-
/* @__PURE__ */
|
|
2896
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ jsx84(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
3243
|
+
/* @__PURE__ */ jsx84(ChevronDown, { className: cn46("size-4", classNames2.icon) })
|
|
2897
3244
|
]
|
|
2898
3245
|
}
|
|
2899
3246
|
),
|
|
2900
|
-
/* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ jsx84(_Popover, { children: /* @__PURE__ */ jsx84(_ListBox, { items, children: props.children }) })
|
|
2901
3248
|
] });
|
|
2902
3249
|
}
|
|
2903
3250
|
);
|
|
@@ -2909,7 +3256,7 @@ import {
|
|
|
2909
3256
|
forwardRef as forwardRef24
|
|
2910
3257
|
} from "react";
|
|
2911
3258
|
import { GridList as SelectList } from "react-aria-components";
|
|
2912
|
-
import { cn as
|
|
3259
|
+
import { cn as cn48, useClassNames as useClassNames49 } from "@marigold/system";
|
|
2913
3260
|
|
|
2914
3261
|
// src/SelectList/Context.ts
|
|
2915
3262
|
import { createContext as createContext8, useContext as useContext14 } from "react";
|
|
@@ -2921,24 +3268,24 @@ var useSelectListContext = () => useContext14(SelectListContext);
|
|
|
2921
3268
|
// src/SelectList/SelectListItem.tsx
|
|
2922
3269
|
import { forwardRef as forwardRef23 } from "react";
|
|
2923
3270
|
import { GridListItem as SelectListItem } from "react-aria-components";
|
|
2924
|
-
import { cn as
|
|
2925
|
-
import { Fragment as Fragment8, jsx as
|
|
3271
|
+
import { cn as cn47 } from "@marigold/system";
|
|
3272
|
+
import { Fragment as Fragment8, jsx as jsx85, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2926
3273
|
var _SelectListItem = forwardRef23(
|
|
2927
3274
|
({ children, ...props }, ref) => {
|
|
2928
3275
|
let textValue = typeof children === "string" ? children : void 0;
|
|
2929
3276
|
const { classNames: classNames2 } = useSelectListContext();
|
|
2930
|
-
return /* @__PURE__ */
|
|
3277
|
+
return /* @__PURE__ */ jsx85(
|
|
2931
3278
|
SelectListItem,
|
|
2932
3279
|
{
|
|
2933
3280
|
textValue,
|
|
2934
3281
|
...props,
|
|
2935
|
-
className:
|
|
3282
|
+
className: cn47(
|
|
2936
3283
|
"items-center group-data-[layout=grid]/list:flex-row",
|
|
2937
3284
|
classNames2 == null ? void 0 : classNames2.option
|
|
2938
3285
|
),
|
|
2939
3286
|
ref,
|
|
2940
|
-
children: ({ selectionMode }) => /* @__PURE__ */
|
|
2941
|
-
selectionMode === "multiple" && /* @__PURE__ */
|
|
3287
|
+
children: ({ selectionMode }) => /* @__PURE__ */ jsxs35(Fragment8, { children: [
|
|
3288
|
+
selectionMode === "multiple" && /* @__PURE__ */ jsx85(_Checkbox, { slot: "selection" }),
|
|
2942
3289
|
children
|
|
2943
3290
|
] })
|
|
2944
3291
|
}
|
|
@@ -2947,21 +3294,21 @@ var _SelectListItem = forwardRef23(
|
|
|
2947
3294
|
);
|
|
2948
3295
|
|
|
2949
3296
|
// src/SelectList/SelectList.tsx
|
|
2950
|
-
import { jsx as
|
|
3297
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
2951
3298
|
var _SelectList = forwardRef24(
|
|
2952
3299
|
({ onChange, ...rest }, ref) => {
|
|
2953
|
-
const classNames2 =
|
|
3300
|
+
const classNames2 = useClassNames49({ component: "ListBox" });
|
|
2954
3301
|
const props = {
|
|
2955
3302
|
onSelectionChange: onChange,
|
|
2956
3303
|
...rest
|
|
2957
3304
|
};
|
|
2958
|
-
return /* @__PURE__ */
|
|
3305
|
+
return /* @__PURE__ */ jsx86(SelectListContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx86("div", { className: classNames2.container, children: /* @__PURE__ */ jsx86(
|
|
2959
3306
|
SelectList,
|
|
2960
3307
|
{
|
|
2961
3308
|
...props,
|
|
2962
3309
|
layout: "grid",
|
|
2963
3310
|
ref,
|
|
2964
|
-
className:
|
|
3311
|
+
className: cn48(
|
|
2965
3312
|
"group/list overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
2966
3313
|
classNames2.list
|
|
2967
3314
|
),
|
|
@@ -2973,18 +3320,18 @@ var _SelectList = forwardRef24(
|
|
|
2973
3320
|
_SelectList.Item = _SelectListItem;
|
|
2974
3321
|
|
|
2975
3322
|
// src/Scrollable/Scrollable.tsx
|
|
2976
|
-
import { cn as
|
|
2977
|
-
import { jsx as
|
|
3323
|
+
import { cn as cn49, createVar as createVar10, width as twWidth2 } from "@marigold/system";
|
|
3324
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
2978
3325
|
var Scrollable = ({
|
|
2979
3326
|
children,
|
|
2980
3327
|
width = "full",
|
|
2981
3328
|
height,
|
|
2982
3329
|
...props
|
|
2983
|
-
}) => /* @__PURE__ */
|
|
3330
|
+
}) => /* @__PURE__ */ jsx87(
|
|
2984
3331
|
"div",
|
|
2985
3332
|
{
|
|
2986
3333
|
...props,
|
|
2987
|
-
className:
|
|
3334
|
+
className: cn49(["sticky h-[--height] overflow-auto", twWidth2[width]]),
|
|
2988
3335
|
style: createVar10({ height }),
|
|
2989
3336
|
children
|
|
2990
3337
|
}
|
|
@@ -2999,11 +3346,11 @@ import {
|
|
|
2999
3346
|
SliderTrack
|
|
3000
3347
|
} from "react-aria-components";
|
|
3001
3348
|
import {
|
|
3002
|
-
cn as
|
|
3349
|
+
cn as cn50,
|
|
3003
3350
|
width as twWidth3,
|
|
3004
|
-
useClassNames as
|
|
3351
|
+
useClassNames as useClassNames50
|
|
3005
3352
|
} from "@marigold/system";
|
|
3006
|
-
import { Fragment as Fragment9, jsx as
|
|
3353
|
+
import { Fragment as Fragment9, jsx as jsx88, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3007
3354
|
var _Slider = forwardRef25(
|
|
3008
3355
|
({
|
|
3009
3356
|
thumbLabels,
|
|
@@ -3014,7 +3361,7 @@ var _Slider = forwardRef25(
|
|
|
3014
3361
|
label,
|
|
3015
3362
|
...rest
|
|
3016
3363
|
}, ref) => {
|
|
3017
|
-
const classNames2 =
|
|
3364
|
+
const classNames2 = useClassNames50({
|
|
3018
3365
|
component: "Slider",
|
|
3019
3366
|
variant,
|
|
3020
3367
|
size
|
|
@@ -3023,11 +3370,11 @@ var _Slider = forwardRef25(
|
|
|
3023
3370
|
isDisabled: disabled,
|
|
3024
3371
|
...rest
|
|
3025
3372
|
};
|
|
3026
|
-
return /* @__PURE__ */
|
|
3373
|
+
return /* @__PURE__ */ jsxs36(
|
|
3027
3374
|
FieldBase,
|
|
3028
3375
|
{
|
|
3029
3376
|
as: Slider,
|
|
3030
|
-
className:
|
|
3377
|
+
className: cn50(
|
|
3031
3378
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
3032
3379
|
classNames2.container,
|
|
3033
3380
|
twWidth3[width]
|
|
@@ -3035,26 +3382,26 @@ var _Slider = forwardRef25(
|
|
|
3035
3382
|
ref,
|
|
3036
3383
|
...props,
|
|
3037
3384
|
children: [
|
|
3038
|
-
/* @__PURE__ */
|
|
3039
|
-
/* @__PURE__ */
|
|
3040
|
-
/* @__PURE__ */
|
|
3385
|
+
/* @__PURE__ */ jsx88(_Label, { children: props.children && props.children || label && label }),
|
|
3386
|
+
/* @__PURE__ */ jsx88(SliderOutput, { className: cn50("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
3387
|
+
/* @__PURE__ */ jsx88(
|
|
3041
3388
|
SliderTrack,
|
|
3042
3389
|
{
|
|
3043
|
-
className:
|
|
3044
|
-
children: ({ state }) => /* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
3390
|
+
className: cn50("relative col-span-2 h-2 w-full", classNames2.track),
|
|
3391
|
+
children: ({ state }) => /* @__PURE__ */ jsxs36(Fragment9, { children: [
|
|
3392
|
+
/* @__PURE__ */ jsx88(
|
|
3046
3393
|
"div",
|
|
3047
3394
|
{
|
|
3048
|
-
className:
|
|
3395
|
+
className: cn50(
|
|
3049
3396
|
"absolute top-[50%] h-2 w-full translate-y-[-50%]",
|
|
3050
3397
|
classNames2.track
|
|
3051
3398
|
)
|
|
3052
3399
|
}
|
|
3053
3400
|
),
|
|
3054
|
-
/* @__PURE__ */
|
|
3401
|
+
/* @__PURE__ */ jsx88(
|
|
3055
3402
|
"div",
|
|
3056
3403
|
{
|
|
3057
|
-
className:
|
|
3404
|
+
className: cn50(
|
|
3058
3405
|
"absolute top-[50%] h-2 translate-y-[-50%]",
|
|
3059
3406
|
classNames2.selectedTrack
|
|
3060
3407
|
),
|
|
@@ -3064,10 +3411,10 @@ var _Slider = forwardRef25(
|
|
|
3064
3411
|
}
|
|
3065
3412
|
}
|
|
3066
3413
|
),
|
|
3067
|
-
state.values.map((_, i) => /* @__PURE__ */
|
|
3414
|
+
state.values.map((_, i) => /* @__PURE__ */ jsx88(
|
|
3068
3415
|
SliderThumb,
|
|
3069
3416
|
{
|
|
3070
|
-
className:
|
|
3417
|
+
className: cn50("top-1/2 cursor-pointer", classNames2.thumb),
|
|
3071
3418
|
index: i,
|
|
3072
3419
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i],
|
|
3073
3420
|
name: thumbLabels == null ? void 0 : thumbLabels[i]
|
|
@@ -3084,12 +3431,12 @@ var _Slider = forwardRef25(
|
|
|
3084
3431
|
);
|
|
3085
3432
|
|
|
3086
3433
|
// src/Split/Split.tsx
|
|
3087
|
-
import { jsx as
|
|
3088
|
-
var Split = () => /* @__PURE__ */
|
|
3434
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
3435
|
+
var Split = () => /* @__PURE__ */ jsx89("div", { role: "separator", className: "grow" });
|
|
3089
3436
|
|
|
3090
3437
|
// src/Stack/Stack.tsx
|
|
3091
|
-
import { alignment as alignment3, cn as
|
|
3092
|
-
import { jsx as
|
|
3438
|
+
import { alignment as alignment3, cn as cn51, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3439
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
3093
3440
|
var Stack = ({
|
|
3094
3441
|
children,
|
|
3095
3442
|
space = 0,
|
|
@@ -3099,10 +3446,10 @@ var Stack = ({
|
|
|
3099
3446
|
...props
|
|
3100
3447
|
}) => {
|
|
3101
3448
|
var _a, _b, _c, _d;
|
|
3102
|
-
return /* @__PURE__ */
|
|
3449
|
+
return /* @__PURE__ */ jsx90(
|
|
3103
3450
|
"div",
|
|
3104
3451
|
{
|
|
3105
|
-
className:
|
|
3452
|
+
className: cn51(
|
|
3106
3453
|
"flex flex-col",
|
|
3107
3454
|
gapSpace7[space],
|
|
3108
3455
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -3119,11 +3466,11 @@ var Stack = ({
|
|
|
3119
3466
|
import { forwardRef as forwardRef26 } from "react";
|
|
3120
3467
|
import { Switch } from "react-aria-components";
|
|
3121
3468
|
import {
|
|
3122
|
-
cn as
|
|
3469
|
+
cn as cn52,
|
|
3123
3470
|
width as twWidth4,
|
|
3124
|
-
useClassNames as
|
|
3471
|
+
useClassNames as useClassNames51
|
|
3125
3472
|
} from "@marigold/system";
|
|
3126
|
-
import { jsx as
|
|
3473
|
+
import { jsx as jsx91, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3127
3474
|
var _Switch = forwardRef26(
|
|
3128
3475
|
({
|
|
3129
3476
|
variant,
|
|
@@ -3135,37 +3482,37 @@ var _Switch = forwardRef26(
|
|
|
3135
3482
|
readOnly,
|
|
3136
3483
|
...rest
|
|
3137
3484
|
}, ref) => {
|
|
3138
|
-
const classNames2 =
|
|
3485
|
+
const classNames2 = useClassNames51({ component: "Switch", size, variant });
|
|
3139
3486
|
const props = {
|
|
3140
3487
|
isDisabled: disabled,
|
|
3141
3488
|
isReadOnly: readOnly,
|
|
3142
3489
|
isSelected: selected,
|
|
3143
3490
|
...rest
|
|
3144
3491
|
};
|
|
3145
|
-
return /* @__PURE__ */
|
|
3492
|
+
return /* @__PURE__ */ jsxs37(
|
|
3146
3493
|
Switch,
|
|
3147
3494
|
{
|
|
3148
3495
|
...props,
|
|
3149
3496
|
ref,
|
|
3150
|
-
className:
|
|
3497
|
+
className: cn52(
|
|
3151
3498
|
twWidth4[width],
|
|
3152
3499
|
"group/switch",
|
|
3153
3500
|
"flex items-center gap-[1ch]",
|
|
3154
3501
|
classNames2.container
|
|
3155
3502
|
),
|
|
3156
3503
|
children: [
|
|
3157
|
-
/* @__PURE__ */
|
|
3158
|
-
/* @__PURE__ */
|
|
3504
|
+
/* @__PURE__ */ jsx91(_Label, { elementType: "span", children }),
|
|
3505
|
+
/* @__PURE__ */ jsx91("div", { className: "relative", children: /* @__PURE__ */ jsx91(
|
|
3159
3506
|
"div",
|
|
3160
3507
|
{
|
|
3161
|
-
className:
|
|
3508
|
+
className: cn52(
|
|
3162
3509
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed",
|
|
3163
3510
|
classNames2.track
|
|
3164
3511
|
),
|
|
3165
|
-
children: /* @__PURE__ */
|
|
3512
|
+
children: /* @__PURE__ */ jsx91(
|
|
3166
3513
|
"div",
|
|
3167
3514
|
{
|
|
3168
|
-
className:
|
|
3515
|
+
className: cn52(
|
|
3169
3516
|
"h-[22px] w-[22px]",
|
|
3170
3517
|
"cubic-bezier(.7,0,.3,1)",
|
|
3171
3518
|
"absolute left-0 top-px",
|
|
@@ -3184,7 +3531,7 @@ var _Switch = forwardRef26(
|
|
|
3184
3531
|
);
|
|
3185
3532
|
|
|
3186
3533
|
// src/Table/Table.tsx
|
|
3187
|
-
import { useRef as
|
|
3534
|
+
import { useRef as useRef13 } from "react";
|
|
3188
3535
|
import { useTable } from "@react-aria/table";
|
|
3189
3536
|
import {
|
|
3190
3537
|
TableBody as Body2,
|
|
@@ -3194,7 +3541,7 @@ import {
|
|
|
3194
3541
|
Row,
|
|
3195
3542
|
useTableState
|
|
3196
3543
|
} from "@react-stately/table";
|
|
3197
|
-
import { cn as
|
|
3544
|
+
import { cn as cn58, useClassNames as useClassNames53 } from "@marigold/system";
|
|
3198
3545
|
|
|
3199
3546
|
// src/Table/Context.tsx
|
|
3200
3547
|
import { createContext as createContext9, useContext as useContext15 } from "react";
|
|
@@ -3203,12 +3550,12 @@ var useTableContext = () => useContext15(TableContext);
|
|
|
3203
3550
|
|
|
3204
3551
|
// src/Table/TableBody.tsx
|
|
3205
3552
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3206
|
-
import { jsx as
|
|
3553
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
3207
3554
|
var TableBody = ({ children, emptyState }) => {
|
|
3208
3555
|
const { rowGroupProps } = useTableRowGroup();
|
|
3209
3556
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3210
3557
|
if (state.collection.size === 0 && emptyState) {
|
|
3211
|
-
return /* @__PURE__ */
|
|
3558
|
+
return /* @__PURE__ */ jsx92("tbody", { children: /* @__PURE__ */ jsx92("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ jsx92(
|
|
3212
3559
|
"td",
|
|
3213
3560
|
{
|
|
3214
3561
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
@@ -3218,18 +3565,18 @@ var TableBody = ({ children, emptyState }) => {
|
|
|
3218
3565
|
}
|
|
3219
3566
|
) }) });
|
|
3220
3567
|
}
|
|
3221
|
-
return /* @__PURE__ */
|
|
3568
|
+
return /* @__PURE__ */ jsx92("tbody", { ...rowGroupProps, children });
|
|
3222
3569
|
};
|
|
3223
3570
|
|
|
3224
3571
|
// src/Table/TableCell.tsx
|
|
3225
|
-
import { useRef as
|
|
3572
|
+
import { useRef as useRef7 } from "react";
|
|
3226
3573
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
3227
3574
|
import { useTableCell } from "@react-aria/table";
|
|
3228
3575
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
3229
|
-
import { cn as
|
|
3230
|
-
import { jsx as
|
|
3576
|
+
import { cn as cn53, useStateProps as useStateProps2 } from "@marigold/system";
|
|
3577
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
3231
3578
|
var TableCell = ({ cell, align = "left" }) => {
|
|
3232
|
-
const ref =
|
|
3579
|
+
const ref = useRef7(null);
|
|
3233
3580
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
3234
3581
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3235
3582
|
const { gridCellProps } = useTableCell(
|
|
@@ -3250,11 +3597,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
3250
3597
|
};
|
|
3251
3598
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
3252
3599
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
3253
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ jsx93(
|
|
3254
3601
|
"td",
|
|
3255
3602
|
{
|
|
3256
3603
|
ref,
|
|
3257
|
-
className:
|
|
3604
|
+
className: cn53(classNames2 == null ? void 0 : classNames2.cell),
|
|
3258
3605
|
...mergeProps3(cellProps, focusProps),
|
|
3259
3606
|
...stateProps,
|
|
3260
3607
|
align,
|
|
@@ -3264,11 +3611,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
3264
3611
|
};
|
|
3265
3612
|
|
|
3266
3613
|
// src/Table/TableCheckboxCell.tsx
|
|
3267
|
-
import { useRef as
|
|
3614
|
+
import { useRef as useRef8 } from "react";
|
|
3268
3615
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
3269
3616
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3270
3617
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
3271
|
-
import { cn as
|
|
3618
|
+
import { cn as cn54, useStateProps as useStateProps3 } from "@marigold/system";
|
|
3272
3619
|
|
|
3273
3620
|
// src/Table/utils.ts
|
|
3274
3621
|
var mapCheckboxProps = ({
|
|
@@ -3291,9 +3638,9 @@ var mapCheckboxProps = ({
|
|
|
3291
3638
|
};
|
|
3292
3639
|
|
|
3293
3640
|
// src/Table/TableCheckboxCell.tsx
|
|
3294
|
-
import { jsx as
|
|
3641
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
3295
3642
|
var TableCheckboxCell = ({ cell }) => {
|
|
3296
|
-
const ref =
|
|
3643
|
+
const ref = useRef8(null);
|
|
3297
3644
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3298
3645
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3299
3646
|
const { gridCellProps } = useTableCell2(
|
|
@@ -3308,33 +3655,33 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3308
3655
|
);
|
|
3309
3656
|
const { focusProps, isFocusVisible } = useFocusRing3();
|
|
3310
3657
|
const stateProps = useStateProps3({ disabled, focusVisible: isFocusVisible });
|
|
3311
|
-
return /* @__PURE__ */
|
|
3658
|
+
return /* @__PURE__ */ jsx94(
|
|
3312
3659
|
"td",
|
|
3313
3660
|
{
|
|
3314
3661
|
ref,
|
|
3315
|
-
className:
|
|
3662
|
+
className: cn54("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3316
3663
|
...mergeProps4(gridCellProps, focusProps),
|
|
3317
3664
|
...stateProps,
|
|
3318
|
-
children: /* @__PURE__ */
|
|
3665
|
+
children: /* @__PURE__ */ jsx94(_Checkbox, { ...checkboxProps })
|
|
3319
3666
|
}
|
|
3320
3667
|
);
|
|
3321
3668
|
};
|
|
3322
3669
|
|
|
3323
3670
|
// src/Table/TableColumnHeader.tsx
|
|
3324
|
-
import { useRef as
|
|
3671
|
+
import { useRef as useRef9 } from "react";
|
|
3325
3672
|
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
3326
3673
|
import { useHover } from "@react-aria/interactions";
|
|
3327
3674
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3328
3675
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
3329
|
-
import { cn as
|
|
3330
|
-
import { jsx as
|
|
3676
|
+
import { cn as cn55, width as twWidth5, useStateProps as useStateProps4 } from "@marigold/system";
|
|
3677
|
+
import { jsx as jsx95, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3331
3678
|
var TableColumnHeader = ({
|
|
3332
3679
|
column,
|
|
3333
3680
|
width = "auto",
|
|
3334
3681
|
align = "left"
|
|
3335
3682
|
}) => {
|
|
3336
3683
|
var _a, _b;
|
|
3337
|
-
const ref =
|
|
3684
|
+
const ref = useRef9(null);
|
|
3338
3685
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3339
3686
|
const { columnHeaderProps } = useTableColumnHeader(
|
|
3340
3687
|
{
|
|
@@ -3349,18 +3696,18 @@ var TableColumnHeader = ({
|
|
|
3349
3696
|
hover: isHovered,
|
|
3350
3697
|
focusVisible: isFocusVisible
|
|
3351
3698
|
});
|
|
3352
|
-
return /* @__PURE__ */
|
|
3699
|
+
return /* @__PURE__ */ jsxs38(
|
|
3353
3700
|
"th",
|
|
3354
3701
|
{
|
|
3355
3702
|
colSpan: column.colspan,
|
|
3356
3703
|
ref,
|
|
3357
|
-
className:
|
|
3704
|
+
className: cn55("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3358
3705
|
...mergeProps5(columnHeaderProps, hoverProps, focusProps),
|
|
3359
3706
|
...stateProps,
|
|
3360
3707
|
align,
|
|
3361
3708
|
children: [
|
|
3362
3709
|
column.rendered,
|
|
3363
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
3710
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx95(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx95(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx95("span", { className: "invisible", children: /* @__PURE__ */ jsx95(SortDown, { className: "inline-block" }) }))
|
|
3364
3711
|
]
|
|
3365
3712
|
}
|
|
3366
3713
|
);
|
|
@@ -3368,10 +3715,10 @@ var TableColumnHeader = ({
|
|
|
3368
3715
|
|
|
3369
3716
|
// src/Table/TableHeader.tsx
|
|
3370
3717
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3371
|
-
import { jsx as
|
|
3718
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
3372
3719
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
3373
3720
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3374
|
-
return /* @__PURE__ */
|
|
3721
|
+
return /* @__PURE__ */ jsx96(
|
|
3375
3722
|
"thead",
|
|
3376
3723
|
{
|
|
3377
3724
|
...rowGroupProps,
|
|
@@ -3382,29 +3729,29 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
3382
3729
|
};
|
|
3383
3730
|
|
|
3384
3731
|
// src/Table/TableHeaderRow.tsx
|
|
3385
|
-
import { useRef as
|
|
3732
|
+
import { useRef as useRef10 } from "react";
|
|
3386
3733
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3387
|
-
import { jsx as
|
|
3734
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
3388
3735
|
var TableHeaderRow = ({ item, children }) => {
|
|
3389
3736
|
const { state } = useTableContext();
|
|
3390
|
-
const ref =
|
|
3737
|
+
const ref = useRef10(null);
|
|
3391
3738
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3392
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsx97("tr", { ...rowProps, ref, children });
|
|
3393
3740
|
};
|
|
3394
3741
|
|
|
3395
3742
|
// src/Table/TableRow.tsx
|
|
3396
|
-
import { useRef as
|
|
3743
|
+
import { useRef as useRef11 } from "react";
|
|
3397
3744
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
3398
3745
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
3399
3746
|
import { useTableRow } from "@react-aria/table";
|
|
3400
3747
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
3401
|
-
import { cn as
|
|
3402
|
-
import { jsx as
|
|
3748
|
+
import { cn as cn56, useClassNames as useClassNames52, useStateProps as useStateProps5 } from "@marigold/system";
|
|
3749
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
3403
3750
|
var TableRow = ({ children, row }) => {
|
|
3404
|
-
const ref =
|
|
3751
|
+
const ref = useRef11(null);
|
|
3405
3752
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3406
3753
|
const { variant, size } = row.props;
|
|
3407
|
-
const classNames2 =
|
|
3754
|
+
const classNames2 = useClassNames52({
|
|
3408
3755
|
component: "Table",
|
|
3409
3756
|
variant: variant || ctx.variant,
|
|
3410
3757
|
size: size || ctx.size
|
|
@@ -3429,11 +3776,11 @@ var TableRow = ({ children, row }) => {
|
|
|
3429
3776
|
focusVisible: isFocusVisible,
|
|
3430
3777
|
active: isPressed
|
|
3431
3778
|
});
|
|
3432
|
-
return /* @__PURE__ */
|
|
3779
|
+
return /* @__PURE__ */ jsx98(
|
|
3433
3780
|
"tr",
|
|
3434
3781
|
{
|
|
3435
3782
|
ref,
|
|
3436
|
-
className:
|
|
3783
|
+
className: cn56(
|
|
3437
3784
|
[
|
|
3438
3785
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3439
3786
|
],
|
|
@@ -3447,7 +3794,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3447
3794
|
};
|
|
3448
3795
|
|
|
3449
3796
|
// src/Table/TableSelectAllCell.tsx
|
|
3450
|
-
import { useRef as
|
|
3797
|
+
import { useRef as useRef12 } from "react";
|
|
3451
3798
|
import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
|
|
3452
3799
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
3453
3800
|
import {
|
|
@@ -3456,17 +3803,17 @@ import {
|
|
|
3456
3803
|
} from "@react-aria/table";
|
|
3457
3804
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
3458
3805
|
import {
|
|
3459
|
-
cn as
|
|
3806
|
+
cn as cn57,
|
|
3460
3807
|
width as twWidth6,
|
|
3461
3808
|
useStateProps as useStateProps6
|
|
3462
3809
|
} from "@marigold/system";
|
|
3463
|
-
import { jsx as
|
|
3810
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
3464
3811
|
var TableSelectAllCell = ({
|
|
3465
3812
|
column,
|
|
3466
3813
|
width = "auto",
|
|
3467
3814
|
align = "left"
|
|
3468
3815
|
}) => {
|
|
3469
|
-
const ref =
|
|
3816
|
+
const ref = useRef12(null);
|
|
3470
3817
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3471
3818
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
3472
3819
|
{
|
|
@@ -3482,21 +3829,21 @@ var TableSelectAllCell = ({
|
|
|
3482
3829
|
hover: isHovered,
|
|
3483
3830
|
focusVisible: isFocusVisible
|
|
3484
3831
|
});
|
|
3485
|
-
return /* @__PURE__ */
|
|
3832
|
+
return /* @__PURE__ */ jsx99(
|
|
3486
3833
|
"th",
|
|
3487
3834
|
{
|
|
3488
3835
|
ref,
|
|
3489
|
-
className:
|
|
3836
|
+
className: cn57(twWidth6[width], ["leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
3490
3837
|
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
3491
3838
|
...stateProps,
|
|
3492
3839
|
align,
|
|
3493
|
-
children: /* @__PURE__ */
|
|
3840
|
+
children: /* @__PURE__ */ jsx99(_Checkbox, { ...checkboxProps })
|
|
3494
3841
|
}
|
|
3495
3842
|
);
|
|
3496
3843
|
};
|
|
3497
3844
|
|
|
3498
3845
|
// src/Table/Table.tsx
|
|
3499
|
-
import { jsx as
|
|
3846
|
+
import { jsx as jsx100, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3500
3847
|
var Table = ({
|
|
3501
3848
|
variant,
|
|
3502
3849
|
size,
|
|
@@ -3508,7 +3855,7 @@ var Table = ({
|
|
|
3508
3855
|
...props
|
|
3509
3856
|
}) => {
|
|
3510
3857
|
const interactive = selectionMode !== "none";
|
|
3511
|
-
const tableRef =
|
|
3858
|
+
const tableRef = useRef13(null);
|
|
3512
3859
|
const state = useTableState({
|
|
3513
3860
|
...props,
|
|
3514
3861
|
selectionMode,
|
|
@@ -3519,21 +3866,21 @@ var Table = ({
|
|
|
3519
3866
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
3520
3867
|
}
|
|
3521
3868
|
const { gridProps } = useTable(props, state, tableRef);
|
|
3522
|
-
const classNames2 =
|
|
3869
|
+
const classNames2 = useClassNames53({
|
|
3523
3870
|
component: "Table",
|
|
3524
3871
|
variant,
|
|
3525
3872
|
size
|
|
3526
3873
|
});
|
|
3527
3874
|
const { collection } = state;
|
|
3528
|
-
return /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ jsx100(
|
|
3529
3876
|
TableContext.Provider,
|
|
3530
3877
|
{
|
|
3531
3878
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3532
|
-
children: /* @__PURE__ */
|
|
3879
|
+
children: /* @__PURE__ */ jsxs39(
|
|
3533
3880
|
"table",
|
|
3534
3881
|
{
|
|
3535
3882
|
ref: tableRef,
|
|
3536
|
-
className:
|
|
3883
|
+
className: cn58(
|
|
3537
3884
|
"group/table",
|
|
3538
3885
|
"border-collapse",
|
|
3539
3886
|
stretch ? "table w-full" : "block",
|
|
@@ -3541,10 +3888,10 @@ var Table = ({
|
|
|
3541
3888
|
),
|
|
3542
3889
|
...gridProps,
|
|
3543
3890
|
children: [
|
|
3544
|
-
/* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ jsx100(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx100(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3545
3892
|
(column) => {
|
|
3546
3893
|
var _a, _b, _c, _d, _e;
|
|
3547
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3894
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx100(
|
|
3548
3895
|
TableSelectAllCell,
|
|
3549
3896
|
{
|
|
3550
3897
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
@@ -3552,7 +3899,7 @@ var Table = ({
|
|
|
3552
3899
|
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3553
3900
|
},
|
|
3554
3901
|
column.key
|
|
3555
|
-
) : /* @__PURE__ */
|
|
3902
|
+
) : /* @__PURE__ */ jsx100(
|
|
3556
3903
|
TableColumnHeader,
|
|
3557
3904
|
{
|
|
3558
3905
|
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
@@ -3563,12 +3910,12 @@ var Table = ({
|
|
|
3563
3910
|
);
|
|
3564
3911
|
}
|
|
3565
3912
|
) }, headerRow.key)) }),
|
|
3566
|
-
/* @__PURE__ */
|
|
3913
|
+
/* @__PURE__ */ jsxs39(TableBody, { emptyState, children: [
|
|
3567
3914
|
...collection.rows.map(
|
|
3568
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3915
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx100(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3569
3916
|
var _a, _b;
|
|
3570
3917
|
const currentColumn = collection.columns[index];
|
|
3571
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3918
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx100(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx100(
|
|
3572
3919
|
TableCell,
|
|
3573
3920
|
{
|
|
3574
3921
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -3594,7 +3941,7 @@ Table.Row = Row;
|
|
|
3594
3941
|
// src/Text/Text.tsx
|
|
3595
3942
|
import { Text as Text2 } from "react-aria-components";
|
|
3596
3943
|
import {
|
|
3597
|
-
cn as
|
|
3944
|
+
cn as cn59,
|
|
3598
3945
|
createVar as createVar11,
|
|
3599
3946
|
cursorStyle,
|
|
3600
3947
|
fontWeight,
|
|
@@ -3602,10 +3949,10 @@ import {
|
|
|
3602
3949
|
textAlign as textAlign2,
|
|
3603
3950
|
textSize,
|
|
3604
3951
|
textStyle,
|
|
3605
|
-
useClassNames as
|
|
3952
|
+
useClassNames as useClassNames54,
|
|
3606
3953
|
useTheme as useTheme3
|
|
3607
3954
|
} from "@marigold/system";
|
|
3608
|
-
import { jsx as
|
|
3955
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
3609
3956
|
var _Text = ({
|
|
3610
3957
|
variant,
|
|
3611
3958
|
size,
|
|
@@ -3620,18 +3967,19 @@ var _Text = ({
|
|
|
3620
3967
|
...props
|
|
3621
3968
|
}) => {
|
|
3622
3969
|
const theme = useTheme3();
|
|
3623
|
-
const classNames2 =
|
|
3970
|
+
const classNames2 = useClassNames54({
|
|
3624
3971
|
component: "Text",
|
|
3625
3972
|
variant,
|
|
3626
3973
|
size
|
|
3627
3974
|
});
|
|
3628
3975
|
const Component = props.slot ? Text2 : as;
|
|
3629
|
-
|
|
3976
|
+
const elementType = props.slot ? { elementType: as } : {};
|
|
3977
|
+
return /* @__PURE__ */ jsx101(
|
|
3630
3978
|
Component,
|
|
3631
3979
|
{
|
|
3632
3980
|
...props,
|
|
3633
|
-
elementType
|
|
3634
|
-
className:
|
|
3981
|
+
...elementType,
|
|
3982
|
+
className: cn59(
|
|
3635
3983
|
"text-[--color] outline-[--outline]",
|
|
3636
3984
|
classNames2,
|
|
3637
3985
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3656,8 +4004,8 @@ var _Text = ({
|
|
|
3656
4004
|
// src/TextArea/TextArea.tsx
|
|
3657
4005
|
import { forwardRef as forwardRef27 } from "react";
|
|
3658
4006
|
import { TextArea, TextField } from "react-aria-components";
|
|
3659
|
-
import { useClassNames as
|
|
3660
|
-
import { jsx as
|
|
4007
|
+
import { useClassNames as useClassNames55 } from "@marigold/system";
|
|
4008
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
3661
4009
|
var _TextArea = forwardRef27(
|
|
3662
4010
|
({
|
|
3663
4011
|
variant,
|
|
@@ -3669,7 +4017,7 @@ var _TextArea = forwardRef27(
|
|
|
3669
4017
|
rows,
|
|
3670
4018
|
...rest
|
|
3671
4019
|
}, ref) => {
|
|
3672
|
-
const classNames2 =
|
|
4020
|
+
const classNames2 = useClassNames55({ component: "TextArea", variant, size });
|
|
3673
4021
|
const props = {
|
|
3674
4022
|
isDisabled: disabled,
|
|
3675
4023
|
isReadOnly: readOnly,
|
|
@@ -3677,14 +4025,14 @@ var _TextArea = forwardRef27(
|
|
|
3677
4025
|
isRequired: required,
|
|
3678
4026
|
...rest
|
|
3679
4027
|
};
|
|
3680
|
-
return /* @__PURE__ */
|
|
4028
|
+
return /* @__PURE__ */ jsx102(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx102(TextArea, { className: classNames2, ref, rows }) });
|
|
3681
4029
|
}
|
|
3682
4030
|
);
|
|
3683
4031
|
|
|
3684
4032
|
// src/TextField/TextField.tsx
|
|
3685
4033
|
import { forwardRef as forwardRef28 } from "react";
|
|
3686
4034
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3687
|
-
import { jsx as
|
|
4035
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
3688
4036
|
var _TextField = forwardRef28(
|
|
3689
4037
|
({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
3690
4038
|
const props = {
|
|
@@ -3694,13 +4042,13 @@ var _TextField = forwardRef28(
|
|
|
3694
4042
|
isRequired: required,
|
|
3695
4043
|
...rest
|
|
3696
4044
|
};
|
|
3697
|
-
return /* @__PURE__ */
|
|
4045
|
+
return /* @__PURE__ */ jsx103(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx103(_Input, { ref }) });
|
|
3698
4046
|
}
|
|
3699
4047
|
);
|
|
3700
4048
|
|
|
3701
4049
|
// src/Tiles/Tiles.tsx
|
|
3702
|
-
import { cn as
|
|
3703
|
-
import { jsx as
|
|
4050
|
+
import { cn as cn60, createVar as createVar12, gapSpace as gapSpace8 } from "@marigold/system";
|
|
4051
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
3704
4052
|
var Tiles = ({
|
|
3705
4053
|
space = 0,
|
|
3706
4054
|
stretch = false,
|
|
@@ -3713,11 +4061,11 @@ var Tiles = ({
|
|
|
3713
4061
|
if (stretch) {
|
|
3714
4062
|
column = `minmax(${column}, 1fr)`;
|
|
3715
4063
|
}
|
|
3716
|
-
return /* @__PURE__ */
|
|
4064
|
+
return /* @__PURE__ */ jsx104(
|
|
3717
4065
|
"div",
|
|
3718
4066
|
{
|
|
3719
4067
|
...props,
|
|
3720
|
-
className:
|
|
4068
|
+
className: cn60(
|
|
3721
4069
|
"grid",
|
|
3722
4070
|
gapSpace8[space],
|
|
3723
4071
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -3731,11 +4079,11 @@ var Tiles = ({
|
|
|
3731
4079
|
|
|
3732
4080
|
// src/Tooltip/Tooltip.tsx
|
|
3733
4081
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3734
|
-
import { cn as
|
|
4082
|
+
import { cn as cn61, useClassNames as useClassNames56 } from "@marigold/system";
|
|
3735
4083
|
|
|
3736
4084
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3737
4085
|
import { TooltipTrigger } from "react-aria-components";
|
|
3738
|
-
import { jsx as
|
|
4086
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
3739
4087
|
var _TooltipTrigger = ({
|
|
3740
4088
|
delay = 1e3,
|
|
3741
4089
|
children,
|
|
@@ -3749,26 +4097,26 @@ var _TooltipTrigger = ({
|
|
|
3749
4097
|
isOpen: open,
|
|
3750
4098
|
delay
|
|
3751
4099
|
};
|
|
3752
|
-
return /* @__PURE__ */
|
|
4100
|
+
return /* @__PURE__ */ jsx105(TooltipTrigger, { ...props, children });
|
|
3753
4101
|
};
|
|
3754
4102
|
|
|
3755
4103
|
// src/Tooltip/Tooltip.tsx
|
|
3756
|
-
import { jsx as
|
|
4104
|
+
import { jsx as jsx106, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3757
4105
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3758
4106
|
const props = {
|
|
3759
4107
|
...rest,
|
|
3760
4108
|
isOpen: open
|
|
3761
4109
|
};
|
|
3762
|
-
const classNames2 =
|
|
4110
|
+
const classNames2 = useClassNames56({ component: "Tooltip", variant, size });
|
|
3763
4111
|
const portal = usePortalContainer();
|
|
3764
|
-
return /* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ jsxs40(
|
|
3765
4113
|
Tooltip,
|
|
3766
4114
|
{
|
|
3767
4115
|
...props,
|
|
3768
|
-
className:
|
|
4116
|
+
className: cn61("group/tooltip", classNames2.container),
|
|
3769
4117
|
UNSTABLE_portalContainer: portal,
|
|
3770
4118
|
children: [
|
|
3771
|
-
/* @__PURE__ */
|
|
4119
|
+
/* @__PURE__ */ jsx106(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx106("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx106("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3772
4120
|
children
|
|
3773
4121
|
]
|
|
3774
4122
|
}
|
|
@@ -3780,256 +4128,268 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
3780
4128
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
3781
4129
|
|
|
3782
4130
|
// src/XLoader/XLoader.tsx
|
|
3783
|
-
import { forwardRef as forwardRef29 } from "react";
|
|
3784
4131
|
import { Dialog as Dialog2, Modal as Modal2, ModalOverlay as ModalOverlay2 } from "react-aria-components";
|
|
3785
|
-
import {
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
4132
|
+
import { useClassNames as useClassNames58 } from "@marigold/system";
|
|
4133
|
+
|
|
4134
|
+
// src/XLoader/BaseLoader.tsx
|
|
4135
|
+
import { Label as Label2, ProgressBar as ProgressBar2 } from "react-aria-components";
|
|
4136
|
+
import { useClassNames as useClassNames57 } from "@marigold/system";
|
|
4137
|
+
import { jsx as jsx107, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4138
|
+
var BaseLoader = ({
|
|
4139
|
+
variant,
|
|
4140
|
+
size,
|
|
4141
|
+
children,
|
|
4142
|
+
"aria-label": ariaLabel,
|
|
4143
|
+
...props
|
|
4144
|
+
}) => {
|
|
4145
|
+
const className = useClassNames57({ component: "XLoader", variant, size });
|
|
4146
|
+
return /* @__PURE__ */ jsxs41(
|
|
4147
|
+
ProgressBar2,
|
|
4148
|
+
{
|
|
4149
|
+
className: className.container,
|
|
4150
|
+
isIndeterminate: true,
|
|
4151
|
+
"aria-label": ariaLabel || children ? ariaLabel : "Loading...",
|
|
4152
|
+
...props,
|
|
4153
|
+
children: [
|
|
4154
|
+
/* @__PURE__ */ jsxs41(
|
|
4155
|
+
"svg",
|
|
4156
|
+
{
|
|
4157
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4158
|
+
viewBox: "0 0 150 150",
|
|
4159
|
+
fill: "currentColor",
|
|
4160
|
+
className: className.loader,
|
|
4161
|
+
children: [
|
|
4162
|
+
/* @__PURE__ */ jsx107("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4163
|
+
/* @__PURE__ */ jsx107(
|
|
4164
|
+
"path",
|
|
4165
|
+
{
|
|
4166
|
+
id: "XMLID_5_",
|
|
4167
|
+
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",
|
|
4168
|
+
children: /* @__PURE__ */ jsx107(
|
|
4169
|
+
"animate",
|
|
4170
|
+
{
|
|
4171
|
+
attributeName: "opacity",
|
|
4172
|
+
attributeType: "XML",
|
|
4173
|
+
values: "1; .01; 1; 1; 1;",
|
|
4174
|
+
begin: "1.0s",
|
|
4175
|
+
dur: "2.5s",
|
|
4176
|
+
repeatCount: "indefinite"
|
|
4177
|
+
}
|
|
4178
|
+
)
|
|
4179
|
+
}
|
|
4180
|
+
),
|
|
4181
|
+
/* @__PURE__ */ jsx107(
|
|
4182
|
+
"path",
|
|
4183
|
+
{
|
|
4184
|
+
id: "XMLID_18_",
|
|
4185
|
+
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",
|
|
4186
|
+
children: /* @__PURE__ */ jsx107(
|
|
4187
|
+
"animate",
|
|
4188
|
+
{
|
|
4189
|
+
attributeName: "opacity",
|
|
4190
|
+
attributeType: "XML",
|
|
4191
|
+
values: "1; .01; 1; 1; 1;",
|
|
4192
|
+
begin: "0.9s",
|
|
4193
|
+
dur: "2.5s",
|
|
4194
|
+
repeatCount: "indefinite"
|
|
4195
|
+
}
|
|
4196
|
+
)
|
|
4197
|
+
}
|
|
4198
|
+
),
|
|
4199
|
+
/* @__PURE__ */ jsx107(
|
|
4200
|
+
"path",
|
|
4201
|
+
{
|
|
4202
|
+
id: "XMLID_19_",
|
|
4203
|
+
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",
|
|
4204
|
+
children: /* @__PURE__ */ jsx107(
|
|
4205
|
+
"animate",
|
|
4206
|
+
{
|
|
4207
|
+
attributeName: "opacity",
|
|
4208
|
+
attributeType: "XML",
|
|
4209
|
+
values: "1; .01; 1; 1; 1;",
|
|
4210
|
+
begin: "0.8s",
|
|
4211
|
+
dur: "2.5s",
|
|
4212
|
+
repeatCount: "indefinite"
|
|
4213
|
+
}
|
|
4214
|
+
)
|
|
4215
|
+
}
|
|
4216
|
+
),
|
|
4217
|
+
/* @__PURE__ */ jsx107(
|
|
4218
|
+
"path",
|
|
4219
|
+
{
|
|
4220
|
+
id: "XMLID_20_",
|
|
4221
|
+
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",
|
|
4222
|
+
children: /* @__PURE__ */ jsx107(
|
|
4223
|
+
"animate",
|
|
4224
|
+
{
|
|
4225
|
+
attributeName: "opacity",
|
|
4226
|
+
attributeType: "XML",
|
|
4227
|
+
values: "1; .01; 1; 1; 1;",
|
|
4228
|
+
begin: "0.7s",
|
|
4229
|
+
dur: "2.5s",
|
|
4230
|
+
repeatCount: "indefinite"
|
|
4231
|
+
}
|
|
4232
|
+
)
|
|
4233
|
+
}
|
|
4234
|
+
),
|
|
4235
|
+
/* @__PURE__ */ jsx107(
|
|
4236
|
+
"path",
|
|
4237
|
+
{
|
|
4238
|
+
id: "XMLID_21_",
|
|
4239
|
+
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",
|
|
4240
|
+
children: /* @__PURE__ */ jsx107(
|
|
4241
|
+
"animate",
|
|
4242
|
+
{
|
|
4243
|
+
attributeName: "opacity",
|
|
4244
|
+
attributeType: "XML",
|
|
4245
|
+
values: "1; .01; 1; 1; 1;",
|
|
4246
|
+
begin: "0.6s",
|
|
4247
|
+
dur: "2.5s",
|
|
4248
|
+
repeatCount: "indefinite"
|
|
4249
|
+
}
|
|
4250
|
+
)
|
|
4251
|
+
}
|
|
4252
|
+
),
|
|
4253
|
+
/* @__PURE__ */ jsx107(
|
|
4254
|
+
"path",
|
|
4255
|
+
{
|
|
4256
|
+
id: "XMLID_22_",
|
|
4257
|
+
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",
|
|
4258
|
+
children: /* @__PURE__ */ jsx107(
|
|
4259
|
+
"animate",
|
|
4260
|
+
{
|
|
4261
|
+
attributeName: "opacity",
|
|
4262
|
+
attributeType: "XML",
|
|
4263
|
+
values: "1; .01; 1; 1; 1;",
|
|
4264
|
+
begin: "0.5s",
|
|
4265
|
+
dur: "2.5s",
|
|
4266
|
+
repeatCount: "indefinite"
|
|
4267
|
+
}
|
|
4268
|
+
)
|
|
4269
|
+
}
|
|
4270
|
+
),
|
|
4271
|
+
/* @__PURE__ */ jsx107(
|
|
4272
|
+
"path",
|
|
4273
|
+
{
|
|
4274
|
+
id: "XMLID_23_",
|
|
4275
|
+
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",
|
|
4276
|
+
children: /* @__PURE__ */ jsx107(
|
|
4277
|
+
"animate",
|
|
4278
|
+
{
|
|
4279
|
+
attributeName: "opacity",
|
|
4280
|
+
attributeType: "XML",
|
|
4281
|
+
values: "1; .01; 1; 1; 1;",
|
|
4282
|
+
begin: "0.4s",
|
|
4283
|
+
dur: "2.5s",
|
|
4284
|
+
repeatCount: "indefinite"
|
|
4285
|
+
}
|
|
4286
|
+
)
|
|
4287
|
+
}
|
|
4288
|
+
),
|
|
4289
|
+
/* @__PURE__ */ jsx107(
|
|
4290
|
+
"path",
|
|
4291
|
+
{
|
|
4292
|
+
id: "XMLID_24_",
|
|
4293
|
+
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",
|
|
4294
|
+
children: /* @__PURE__ */ jsx107(
|
|
4295
|
+
"animate",
|
|
4296
|
+
{
|
|
4297
|
+
attributeName: "opacity",
|
|
4298
|
+
attributeType: "XML",
|
|
4299
|
+
values: "1; .01; 1; 1; 1;",
|
|
4300
|
+
begin: "0.3s",
|
|
4301
|
+
dur: "2.5s",
|
|
4302
|
+
repeatCount: "indefinite"
|
|
4303
|
+
}
|
|
4304
|
+
)
|
|
4305
|
+
}
|
|
4306
|
+
),
|
|
4307
|
+
/* @__PURE__ */ jsx107(
|
|
4308
|
+
"path",
|
|
4309
|
+
{
|
|
4310
|
+
id: "XMLID_25_",
|
|
4311
|
+
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",
|
|
4312
|
+
children: /* @__PURE__ */ jsx107(
|
|
4313
|
+
"animate",
|
|
4314
|
+
{
|
|
4315
|
+
attributeName: "opacity",
|
|
4316
|
+
attributeType: "XML",
|
|
4317
|
+
values: "1; .01; 1; 1; 1;",
|
|
4318
|
+
begin: "0.2s",
|
|
4319
|
+
dur: "2.5s",
|
|
4320
|
+
repeatCount: "indefinite"
|
|
4321
|
+
}
|
|
4322
|
+
)
|
|
4323
|
+
}
|
|
4324
|
+
),
|
|
4325
|
+
/* @__PURE__ */ jsx107(
|
|
4326
|
+
"path",
|
|
4327
|
+
{
|
|
4328
|
+
id: "XMLID_26_",
|
|
4329
|
+
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",
|
|
4330
|
+
children: /* @__PURE__ */ jsx107(
|
|
4331
|
+
"animate",
|
|
4332
|
+
{
|
|
4333
|
+
attributeName: "opacity",
|
|
4334
|
+
attributeType: "XML",
|
|
4335
|
+
values: "1; .01; 1; 1; 1;",
|
|
4336
|
+
begin: "0.1s",
|
|
4337
|
+
dur: "2.5s",
|
|
4338
|
+
repeatCount: "indefinite"
|
|
4339
|
+
}
|
|
4340
|
+
)
|
|
4341
|
+
}
|
|
4342
|
+
),
|
|
4343
|
+
/* @__PURE__ */ jsx107(
|
|
4344
|
+
"path",
|
|
4345
|
+
{
|
|
4346
|
+
id: "XMLID_27_",
|
|
4347
|
+
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",
|
|
4348
|
+
children: /* @__PURE__ */ jsx107(
|
|
4349
|
+
"animate",
|
|
4350
|
+
{
|
|
4351
|
+
attributeName: "opacity",
|
|
4352
|
+
attributeType: "XML",
|
|
4353
|
+
values: "1; .01; 1; 1; 1;",
|
|
4354
|
+
begin: "0.0s",
|
|
4355
|
+
dur: "2.5s",
|
|
4356
|
+
repeatCount: "indefinite"
|
|
4357
|
+
}
|
|
4358
|
+
)
|
|
4359
|
+
}
|
|
4360
|
+
)
|
|
4361
|
+
]
|
|
4362
|
+
}
|
|
4363
|
+
),
|
|
4364
|
+
children ? /* @__PURE__ */ jsx107(Label2, { className: className.label, children }) : null
|
|
4365
|
+
]
|
|
4366
|
+
}
|
|
4367
|
+
);
|
|
3790
4368
|
};
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
attributeType: "XML",
|
|
3812
|
-
values: "1; .01; 1; 1; 1;",
|
|
3813
|
-
begin: "1.0s",
|
|
3814
|
-
dur: "2.5s",
|
|
3815
|
-
repeatCount: "indefinite"
|
|
3816
|
-
}
|
|
3817
|
-
)
|
|
3818
|
-
}
|
|
3819
|
-
),
|
|
3820
|
-
/* @__PURE__ */ jsx104(
|
|
3821
|
-
"path",
|
|
3822
|
-
{
|
|
3823
|
-
id: "XMLID_18_",
|
|
3824
|
-
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3825
|
-
children: /* @__PURE__ */ jsx104(
|
|
3826
|
-
"animate",
|
|
3827
|
-
{
|
|
3828
|
-
attributeName: "opacity",
|
|
3829
|
-
attributeType: "XML",
|
|
3830
|
-
values: "1; .01; 1; 1; 1;",
|
|
3831
|
-
begin: "0.9s",
|
|
3832
|
-
dur: "2.5s",
|
|
3833
|
-
repeatCount: "indefinite"
|
|
3834
|
-
}
|
|
3835
|
-
)
|
|
3836
|
-
}
|
|
3837
|
-
),
|
|
3838
|
-
/* @__PURE__ */ jsx104(
|
|
3839
|
-
"path",
|
|
3840
|
-
{
|
|
3841
|
-
id: "XMLID_19_",
|
|
3842
|
-
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3843
|
-
children: /* @__PURE__ */ jsx104(
|
|
3844
|
-
"animate",
|
|
3845
|
-
{
|
|
3846
|
-
attributeName: "opacity",
|
|
3847
|
-
attributeType: "XML",
|
|
3848
|
-
values: "1; .01; 1; 1; 1;",
|
|
3849
|
-
begin: "0.8s",
|
|
3850
|
-
dur: "2.5s",
|
|
3851
|
-
repeatCount: "indefinite"
|
|
3852
|
-
}
|
|
3853
|
-
)
|
|
3854
|
-
}
|
|
3855
|
-
),
|
|
3856
|
-
/* @__PURE__ */ jsx104(
|
|
3857
|
-
"path",
|
|
3858
|
-
{
|
|
3859
|
-
id: "XMLID_20_",
|
|
3860
|
-
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3861
|
-
children: /* @__PURE__ */ jsx104(
|
|
3862
|
-
"animate",
|
|
3863
|
-
{
|
|
3864
|
-
attributeName: "opacity",
|
|
3865
|
-
attributeType: "XML",
|
|
3866
|
-
values: "1; .01; 1; 1; 1;",
|
|
3867
|
-
begin: "0.7s",
|
|
3868
|
-
dur: "2.5s",
|
|
3869
|
-
repeatCount: "indefinite"
|
|
3870
|
-
}
|
|
3871
|
-
)
|
|
3872
|
-
}
|
|
3873
|
-
),
|
|
3874
|
-
/* @__PURE__ */ jsx104(
|
|
3875
|
-
"path",
|
|
3876
|
-
{
|
|
3877
|
-
id: "XMLID_21_",
|
|
3878
|
-
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
3879
|
-
children: /* @__PURE__ */ jsx104(
|
|
3880
|
-
"animate",
|
|
3881
|
-
{
|
|
3882
|
-
attributeName: "opacity",
|
|
3883
|
-
attributeType: "XML",
|
|
3884
|
-
values: "1; .01; 1; 1; 1;",
|
|
3885
|
-
begin: "0.6s",
|
|
3886
|
-
dur: "2.5s",
|
|
3887
|
-
repeatCount: "indefinite"
|
|
3888
|
-
}
|
|
3889
|
-
)
|
|
3890
|
-
}
|
|
3891
|
-
),
|
|
3892
|
-
/* @__PURE__ */ jsx104(
|
|
3893
|
-
"path",
|
|
3894
|
-
{
|
|
3895
|
-
id: "XMLID_22_",
|
|
3896
|
-
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
3897
|
-
children: /* @__PURE__ */ jsx104(
|
|
3898
|
-
"animate",
|
|
3899
|
-
{
|
|
3900
|
-
attributeName: "opacity",
|
|
3901
|
-
attributeType: "XML",
|
|
3902
|
-
values: "1; .01; 1; 1; 1;",
|
|
3903
|
-
begin: "0.5s",
|
|
3904
|
-
dur: "2.5s",
|
|
3905
|
-
repeatCount: "indefinite"
|
|
3906
|
-
}
|
|
3907
|
-
)
|
|
3908
|
-
}
|
|
3909
|
-
),
|
|
3910
|
-
/* @__PURE__ */ jsx104(
|
|
3911
|
-
"path",
|
|
3912
|
-
{
|
|
3913
|
-
id: "XMLID_23_",
|
|
3914
|
-
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3915
|
-
children: /* @__PURE__ */ jsx104(
|
|
3916
|
-
"animate",
|
|
3917
|
-
{
|
|
3918
|
-
attributeName: "opacity",
|
|
3919
|
-
attributeType: "XML",
|
|
3920
|
-
values: "1; .01; 1; 1; 1;",
|
|
3921
|
-
begin: "0.4s",
|
|
3922
|
-
dur: "2.5s",
|
|
3923
|
-
repeatCount: "indefinite"
|
|
3924
|
-
}
|
|
3925
|
-
)
|
|
3926
|
-
}
|
|
3927
|
-
),
|
|
3928
|
-
/* @__PURE__ */ jsx104(
|
|
3929
|
-
"path",
|
|
3930
|
-
{
|
|
3931
|
-
id: "XMLID_24_",
|
|
3932
|
-
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3933
|
-
children: /* @__PURE__ */ jsx104(
|
|
3934
|
-
"animate",
|
|
3935
|
-
{
|
|
3936
|
-
attributeName: "opacity",
|
|
3937
|
-
attributeType: "XML",
|
|
3938
|
-
values: "1; .01; 1; 1; 1;",
|
|
3939
|
-
begin: "0.3s",
|
|
3940
|
-
dur: "2.5s",
|
|
3941
|
-
repeatCount: "indefinite"
|
|
3942
|
-
}
|
|
3943
|
-
)
|
|
3944
|
-
}
|
|
3945
|
-
),
|
|
3946
|
-
/* @__PURE__ */ jsx104(
|
|
3947
|
-
"path",
|
|
3948
|
-
{
|
|
3949
|
-
id: "XMLID_25_",
|
|
3950
|
-
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3951
|
-
children: /* @__PURE__ */ jsx104(
|
|
3952
|
-
"animate",
|
|
3953
|
-
{
|
|
3954
|
-
attributeName: "opacity",
|
|
3955
|
-
attributeType: "XML",
|
|
3956
|
-
values: "1; .01; 1; 1; 1;",
|
|
3957
|
-
begin: "0.2s",
|
|
3958
|
-
dur: "2.5s",
|
|
3959
|
-
repeatCount: "indefinite"
|
|
3960
|
-
}
|
|
3961
|
-
)
|
|
3962
|
-
}
|
|
3963
|
-
),
|
|
3964
|
-
/* @__PURE__ */ jsx104(
|
|
3965
|
-
"path",
|
|
3966
|
-
{
|
|
3967
|
-
id: "XMLID_26_",
|
|
3968
|
-
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3969
|
-
children: /* @__PURE__ */ jsx104(
|
|
3970
|
-
"animate",
|
|
3971
|
-
{
|
|
3972
|
-
attributeName: "opacity",
|
|
3973
|
-
attributeType: "XML",
|
|
3974
|
-
values: "1; .01; 1; 1; 1;",
|
|
3975
|
-
begin: "0.1s",
|
|
3976
|
-
dur: "2.5s",
|
|
3977
|
-
repeatCount: "indefinite"
|
|
3978
|
-
}
|
|
3979
|
-
)
|
|
3980
|
-
}
|
|
3981
|
-
),
|
|
3982
|
-
/* @__PURE__ */ jsx104(
|
|
3983
|
-
"path",
|
|
3984
|
-
{
|
|
3985
|
-
id: "XMLID_27_",
|
|
3986
|
-
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3987
|
-
children: /* @__PURE__ */ jsx104(
|
|
3988
|
-
"animate",
|
|
3989
|
-
{
|
|
3990
|
-
attributeName: "opacity",
|
|
3991
|
-
attributeType: "XML",
|
|
3992
|
-
values: "1; .01; 1; 1; 1;",
|
|
3993
|
-
begin: "0.0s",
|
|
3994
|
-
dur: "2.5s",
|
|
3995
|
-
repeatCount: "indefinite"
|
|
3996
|
-
}
|
|
3997
|
-
)
|
|
3998
|
-
}
|
|
3999
|
-
)
|
|
4000
|
-
]
|
|
4001
|
-
}
|
|
4002
|
-
));
|
|
4003
|
-
var LoaderFullSize = forwardRef29(
|
|
4004
|
-
({ children, ...rest }, ref) => {
|
|
4005
|
-
const className = useClassNames55({
|
|
4006
|
-
component: "Underlay",
|
|
4007
|
-
variant: "modal",
|
|
4008
|
-
className: "fixed left-0 top-0 z-10 flex h-[--visual-viewport-height] w-screen items-center justify-center bg-gray-950/30 cursor-progress"
|
|
4009
|
-
});
|
|
4010
|
-
return /* @__PURE__ */ jsx104(ModalOverlay2, { defaultOpen: true, className, isKeyboardDismissDisabled: true, children: /* @__PURE__ */ jsx104(Modal2, { children: /* @__PURE__ */ jsx104(Dialog2, { className: "text-text-inverted outline-0", children: /* @__PURE__ */ jsxs39(Stack, { space: 2, alignX: "center", children: [
|
|
4011
|
-
/* @__PURE__ */ jsx104(Loader, { ...rest, ...ref, color: "text-inverted", size: 80 }),
|
|
4012
|
-
children
|
|
4013
|
-
] }) }) }) });
|
|
4014
|
-
}
|
|
4015
|
-
);
|
|
4016
|
-
var LoaderInline = forwardRef29(
|
|
4017
|
-
({ children, ...rest }, ref) => {
|
|
4018
|
-
return /* @__PURE__ */ jsx104("div", { className: "text-text-inverted flex h-full w-full items-center justify-center bg-gray-950/30", children: /* @__PURE__ */ jsxs39(Stack, { space: 2, alignX: "center", children: [
|
|
4019
|
-
/* @__PURE__ */ jsx104(Loader, { ...rest, ...ref, color: "text-inverted", size: 80 }),
|
|
4020
|
-
children
|
|
4021
|
-
] }) });
|
|
4022
|
-
}
|
|
4023
|
-
);
|
|
4024
|
-
var XLoader = forwardRef29(
|
|
4025
|
-
({ mode, ...rest }, ref) => {
|
|
4026
|
-
return /* @__PURE__ */ jsx104(Fragment10, { children: mode === LoadingModes.FullSize ? /* @__PURE__ */ jsx104(LoaderFullSize, { ...rest, ...ref }) : mode === LoadingModes.Inline ? /* @__PURE__ */ jsx104(LoaderInline, { ...rest, ...ref }) : /* @__PURE__ */ jsx104(Loader, { ...rest, ...ref }) });
|
|
4027
|
-
}
|
|
4028
|
-
);
|
|
4369
|
+
|
|
4370
|
+
// src/XLoader/XLoader.tsx
|
|
4371
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
4372
|
+
var LoaderFullSize = (props) => {
|
|
4373
|
+
const className = useClassNames58({
|
|
4374
|
+
component: "Underlay",
|
|
4375
|
+
variant: "modal",
|
|
4376
|
+
className: "fixed left-0 top-0 z-10 h-[--visual-viewport-height] w-screen"
|
|
4377
|
+
});
|
|
4378
|
+
return /* @__PURE__ */ jsx108(ModalOverlay2, { defaultOpen: true, className, isKeyboardDismissDisabled: true, children: /* @__PURE__ */ jsx108(Modal2, { className: "grid h-[--visual-viewport-height] cursor-progress place-items-center", children: /* @__PURE__ */ jsx108(Dialog2, { className: "outline-0", "aria-label": "Fullscreen Loader", children: /* @__PURE__ */ jsx108(BaseLoader, { ...props }) }) }) });
|
|
4379
|
+
};
|
|
4380
|
+
var LoaderInline = (props) => {
|
|
4381
|
+
const className = useClassNames58({
|
|
4382
|
+
component: "Underlay",
|
|
4383
|
+
variant: "modal",
|
|
4384
|
+
className: "flex size-full items-center justify-center"
|
|
4385
|
+
});
|
|
4386
|
+
return /* @__PURE__ */ jsx108("div", { className, children: /* @__PURE__ */ jsx108(BaseLoader, { ...props }) });
|
|
4387
|
+
};
|
|
4388
|
+
var XLoader = ({ mode, variant, ...props }) => mode === "fullsize" ? /* @__PURE__ */ jsx108(LoaderFullSize, { variant: variant != null ? variant : "inverted", ...props }) : mode === "inline" ? /* @__PURE__ */ jsx108(LoaderInline, { variant: variant != null ? variant : "inverted", ...props }) : /* @__PURE__ */ jsx108(BaseLoader, { variant, ...props });
|
|
4029
4389
|
|
|
4030
4390
|
// src/Tabs/Tabs.tsx
|
|
4031
4391
|
import { Tabs } from "react-aria-components";
|
|
4032
|
-
import { useClassNames as
|
|
4392
|
+
import { useClassNames as useClassNames59 } from "@marigold/system";
|
|
4033
4393
|
|
|
4034
4394
|
// src/Tabs/Context.ts
|
|
4035
4395
|
import { createContext as createContext10, useContext as useContext16 } from "react";
|
|
@@ -4038,15 +4398,15 @@ var useTabContext = () => useContext16(TabContext);
|
|
|
4038
4398
|
|
|
4039
4399
|
// src/Tabs/Tab.tsx
|
|
4040
4400
|
import { Tab } from "react-aria-components";
|
|
4041
|
-
import { cn as
|
|
4042
|
-
import { jsx as
|
|
4401
|
+
import { cn as cn62 } from "@marigold/system";
|
|
4402
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
4043
4403
|
var _Tab = (props) => {
|
|
4044
4404
|
const { classNames: classNames2 } = useTabContext();
|
|
4045
|
-
return /* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ jsx109(
|
|
4046
4406
|
Tab,
|
|
4047
4407
|
{
|
|
4048
4408
|
...props,
|
|
4049
|
-
className:
|
|
4409
|
+
className: cn62(
|
|
4050
4410
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
4051
4411
|
classNames2.tab
|
|
4052
4412
|
),
|
|
@@ -4057,15 +4417,15 @@ var _Tab = (props) => {
|
|
|
4057
4417
|
|
|
4058
4418
|
// src/Tabs/TabList.tsx
|
|
4059
4419
|
import { TabList } from "react-aria-components";
|
|
4060
|
-
import { cn as
|
|
4061
|
-
import { jsx as
|
|
4420
|
+
import { cn as cn63, gapSpace as gapSpace9 } from "@marigold/system";
|
|
4421
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
4062
4422
|
var _TabList = ({ space = 2, ...props }) => {
|
|
4063
4423
|
const { classNames: classNames2 } = useTabContext();
|
|
4064
|
-
return /* @__PURE__ */
|
|
4424
|
+
return /* @__PURE__ */ jsx110(
|
|
4065
4425
|
TabList,
|
|
4066
4426
|
{
|
|
4067
4427
|
...props,
|
|
4068
|
-
className:
|
|
4428
|
+
className: cn63("flex", gapSpace9[space], classNames2.tabsList),
|
|
4069
4429
|
children: props.children
|
|
4070
4430
|
}
|
|
4071
4431
|
);
|
|
@@ -4073,25 +4433,25 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
4073
4433
|
|
|
4074
4434
|
// src/Tabs/TabPanel.tsx
|
|
4075
4435
|
import { TabPanel } from "react-aria-components";
|
|
4076
|
-
import { jsx as
|
|
4436
|
+
import { jsx as jsx111 } from "react/jsx-runtime";
|
|
4077
4437
|
var _TabPanel = (props) => {
|
|
4078
4438
|
const { classNames: classNames2 } = useTabContext();
|
|
4079
|
-
return /* @__PURE__ */
|
|
4439
|
+
return /* @__PURE__ */ jsx111(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
4080
4440
|
};
|
|
4081
4441
|
|
|
4082
4442
|
// src/Tabs/Tabs.tsx
|
|
4083
|
-
import { jsx as
|
|
4443
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
4084
4444
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
4085
4445
|
const props = {
|
|
4086
4446
|
isDisabled: disabled,
|
|
4087
4447
|
...rest
|
|
4088
4448
|
};
|
|
4089
|
-
const classNames2 =
|
|
4449
|
+
const classNames2 = useClassNames59({
|
|
4090
4450
|
component: "Tabs",
|
|
4091
4451
|
size,
|
|
4092
4452
|
variant
|
|
4093
4453
|
});
|
|
4094
|
-
return /* @__PURE__ */
|
|
4454
|
+
return /* @__PURE__ */ jsx112(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx112(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
4095
4455
|
};
|
|
4096
4456
|
_Tabs.List = _TabList;
|
|
4097
4457
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -4145,6 +4505,7 @@ export {
|
|
|
4145
4505
|
Multiselect,
|
|
4146
4506
|
_NumberField as NumberField,
|
|
4147
4507
|
OverlayContainerProvider,
|
|
4508
|
+
_Pagination as Pagination,
|
|
4148
4509
|
_Popover as Popover,
|
|
4149
4510
|
_Radio as Radio,
|
|
4150
4511
|
_RadioGroup as RadioGroup,
|