@marigold/components 7.3.1 → 7.4.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/LICENSE +1 -1
- package/dist/index.d.mts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +488 -452
- package/dist/index.mjs +350 -318
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { useTreeState } from "@react-stately/tree";
|
|
|
14
14
|
|
|
15
15
|
// src/Accordion/AccordionItem.tsx
|
|
16
16
|
import { useEffect, useRef } from "react";
|
|
17
|
-
import {
|
|
17
|
+
import { useFocusRing } from "@react-aria/focus";
|
|
18
18
|
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
|
19
19
|
import { cn, useClassNames, useStateProps } from "@marigold/system";
|
|
20
20
|
|
|
@@ -168,7 +168,7 @@ var AccordionItem = ({
|
|
|
168
168
|
});
|
|
169
169
|
const classNames2 = useClassNames({ component: "Accordion", variant, size });
|
|
170
170
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", ...props, children: [
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ jsxs(
|
|
172
172
|
"button",
|
|
173
173
|
{
|
|
174
174
|
className: cn(
|
|
@@ -183,7 +183,7 @@ var AccordionItem = ({
|
|
|
183
183
|
expanded ? /* @__PURE__ */ jsx3(ChevronUp, { className: "h3 w-6" }) : /* @__PURE__ */ jsx3(ChevronDown, { className: "h3 w-6" })
|
|
184
184
|
]
|
|
185
185
|
}
|
|
186
|
-
)
|
|
186
|
+
),
|
|
187
187
|
/* @__PURE__ */ jsx3(
|
|
188
188
|
"div",
|
|
189
189
|
{
|
|
@@ -309,8 +309,8 @@ var Aspect = ({
|
|
|
309
309
|
import {
|
|
310
310
|
forwardRef as forwardRef8
|
|
311
311
|
} from "react";
|
|
312
|
-
import
|
|
313
|
-
import { ComboBox, ComboBoxStateContext
|
|
312
|
+
import React from "react";
|
|
313
|
+
import { ComboBox, ComboBoxStateContext } from "react-aria-components";
|
|
314
314
|
|
|
315
315
|
// src/FieldBase/FieldBase.tsx
|
|
316
316
|
import { forwardRef as forwardRef3 } from "react";
|
|
@@ -446,6 +446,12 @@ var _FieldBase = (props, ref) => {
|
|
|
446
446
|
};
|
|
447
447
|
var FieldBase = fixedForwardRef(_FieldBase);
|
|
448
448
|
|
|
449
|
+
// src/Input/SearchInput.tsx
|
|
450
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
451
|
+
import { Button } from "react-aria-components";
|
|
452
|
+
import { useLocalizedStringFormatter } from "@react-aria/i18n";
|
|
453
|
+
import { cn as cn8 } from "@marigold/system";
|
|
454
|
+
|
|
449
455
|
// src/Input/Input.tsx
|
|
450
456
|
import { cloneElement as cloneElement2, forwardRef as forwardRef4 } from "react";
|
|
451
457
|
import { Input } from "react-aria-components";
|
|
@@ -459,20 +465,20 @@ var _Input = forwardRef4(
|
|
|
459
465
|
size
|
|
460
466
|
});
|
|
461
467
|
const inputIcon = icon ? cloneElement2(icon, {
|
|
468
|
+
...icon.props,
|
|
462
469
|
className: cn7(
|
|
463
470
|
"pointer-events-none absolute",
|
|
464
471
|
classNames2.icon,
|
|
465
472
|
icon.props.className
|
|
466
|
-
)
|
|
467
|
-
...icon.props
|
|
473
|
+
)
|
|
468
474
|
}) : null;
|
|
469
475
|
const inputAction = action && !props.readOnly ? cloneElement2(action, {
|
|
476
|
+
...action.props,
|
|
470
477
|
className: cn7(
|
|
471
|
-
"absolute",
|
|
478
|
+
"absolute right-0",
|
|
472
479
|
classNames2.action,
|
|
473
480
|
action.props.className
|
|
474
|
-
)
|
|
475
|
-
...action.props
|
|
481
|
+
)
|
|
476
482
|
}) : null;
|
|
477
483
|
return /* @__PURE__ */ jsxs6(
|
|
478
484
|
"div",
|
|
@@ -505,12 +511,78 @@ var _Input = forwardRef4(
|
|
|
505
511
|
}
|
|
506
512
|
);
|
|
507
513
|
|
|
514
|
+
// src/Input/SearchInput.tsx
|
|
515
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
516
|
+
var intlMessages = {
|
|
517
|
+
"de-DE": {
|
|
518
|
+
"Clear search": "Suche zur\xFCcksetzen"
|
|
519
|
+
},
|
|
520
|
+
"en-US": {
|
|
521
|
+
"Clear search": "Clear search"
|
|
522
|
+
},
|
|
523
|
+
"fr-FR": {
|
|
524
|
+
"Clear search": "Effacer la recherche"
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
var SearchIcon = (props) => /* @__PURE__ */ jsx12(
|
|
528
|
+
"svg",
|
|
529
|
+
{
|
|
530
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
531
|
+
viewBox: "0 0 24 24",
|
|
532
|
+
fill: "currentColor",
|
|
533
|
+
width: 24,
|
|
534
|
+
height: 24,
|
|
535
|
+
...props,
|
|
536
|
+
children: /* @__PURE__ */ jsx12("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" })
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
var SearchInput = forwardRef5(
|
|
540
|
+
({ className, onClear, ...props }, ref) => {
|
|
541
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
542
|
+
return /* @__PURE__ */ jsx12(
|
|
543
|
+
_Input,
|
|
544
|
+
{
|
|
545
|
+
type: "search",
|
|
546
|
+
className: cn8(
|
|
547
|
+
"[&::-webkit-search-cancel-button]:hidden",
|
|
548
|
+
className == null ? void 0 : className.input
|
|
549
|
+
),
|
|
550
|
+
ref,
|
|
551
|
+
icon: /* @__PURE__ */ jsx12(SearchIcon, {}),
|
|
552
|
+
action: /* @__PURE__ */ jsx12(
|
|
553
|
+
Button,
|
|
554
|
+
{
|
|
555
|
+
className: className == null ? void 0 : className.action,
|
|
556
|
+
onPress: () => onClear == null ? void 0 : onClear(),
|
|
557
|
+
slot: null,
|
|
558
|
+
"aria-label": stringFormatter.format("Clear search"),
|
|
559
|
+
excludeFromTabOrder: true,
|
|
560
|
+
preventFocusOnPress: true,
|
|
561
|
+
children: /* @__PURE__ */ jsx12(
|
|
562
|
+
"svg",
|
|
563
|
+
{
|
|
564
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
565
|
+
viewBox: "0 0 20 20",
|
|
566
|
+
fill: "currentColor",
|
|
567
|
+
width: 20,
|
|
568
|
+
height: 20,
|
|
569
|
+
children: /* @__PURE__ */ jsx12("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" })
|
|
570
|
+
}
|
|
571
|
+
)
|
|
572
|
+
}
|
|
573
|
+
),
|
|
574
|
+
...props
|
|
575
|
+
}
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
|
|
508
580
|
// src/ListBox/ListBox.tsx
|
|
509
581
|
import {
|
|
510
|
-
forwardRef as
|
|
582
|
+
forwardRef as forwardRef6
|
|
511
583
|
} from "react";
|
|
512
584
|
import { ListBox } from "react-aria-components";
|
|
513
|
-
import { cn as
|
|
585
|
+
import { cn as cn10, useClassNames as useClassNames6 } from "@marigold/system";
|
|
514
586
|
|
|
515
587
|
// src/ListBox/Context.ts
|
|
516
588
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
@@ -519,41 +591,43 @@ var useListBoxContext = () => useContext2(ListBoxContext);
|
|
|
519
591
|
|
|
520
592
|
// src/ListBox/ListBoxOption.tsx
|
|
521
593
|
import { ListBoxItem } from "react-aria-components";
|
|
522
|
-
import { jsx as
|
|
594
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
523
595
|
var _ListBoxItem = (props) => {
|
|
524
596
|
const { classNames: classNames2 } = useListBoxContext();
|
|
525
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ jsx13(ListBoxItem, { ...props, className: classNames2.option });
|
|
526
598
|
};
|
|
527
599
|
|
|
528
600
|
// src/ListBox/ListBoxSection.tsx
|
|
529
601
|
import { Section } from "react-aria-components";
|
|
530
|
-
import { cn as
|
|
531
|
-
import { jsx as
|
|
602
|
+
import { cn as cn9 } from "@marigold/system";
|
|
603
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
532
604
|
var _Section = (props) => {
|
|
533
605
|
const { classNames: classNames2 } = useListBoxContext();
|
|
534
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ jsx14(
|
|
535
607
|
Section,
|
|
536
608
|
{
|
|
537
609
|
...props,
|
|
538
|
-
className:
|
|
610
|
+
className: cn9(classNames2.section, classNames2.sectionTitle)
|
|
539
611
|
}
|
|
540
612
|
);
|
|
541
613
|
};
|
|
542
614
|
|
|
543
615
|
// src/ListBox/ListBox.tsx
|
|
544
|
-
import { jsx as
|
|
545
|
-
var _ListBox =
|
|
616
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
617
|
+
var _ListBox = forwardRef6(
|
|
546
618
|
({ variant, size, ...props }, ref) => {
|
|
547
619
|
const classNames2 = useClassNames6({ component: "ListBox", variant, size });
|
|
548
|
-
|
|
620
|
+
const listBoxProps = { shouldSelectOnPressUp: false };
|
|
621
|
+
return /* @__PURE__ */ jsx15(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx15("div", { className: classNames2.container, children: /* @__PURE__ */ jsx15(
|
|
549
622
|
ListBox,
|
|
550
623
|
{
|
|
551
624
|
...props,
|
|
552
|
-
className:
|
|
625
|
+
className: cn10(
|
|
553
626
|
"overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
554
627
|
classNames2.list
|
|
555
628
|
),
|
|
556
629
|
ref,
|
|
630
|
+
...listBoxProps,
|
|
557
631
|
children: props.children
|
|
558
632
|
}
|
|
559
633
|
) }) });
|
|
@@ -563,9 +637,9 @@ _ListBox.Item = _ListBoxItem;
|
|
|
563
637
|
_ListBox.Section = _Section;
|
|
564
638
|
|
|
565
639
|
// src/Overlay/Popover.tsx
|
|
566
|
-
import { forwardRef as
|
|
640
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
567
641
|
import { Popover } from "react-aria-components";
|
|
568
|
-
import { cn as
|
|
642
|
+
import { cn as cn12, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
|
|
569
643
|
|
|
570
644
|
// src/Provider/OverlayContainerProvider.tsx
|
|
571
645
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
@@ -581,32 +655,24 @@ var usePortalContainer = () => {
|
|
|
581
655
|
|
|
582
656
|
// src/Overlay/Underlay.tsx
|
|
583
657
|
import { ModalOverlay } from "react-aria-components";
|
|
584
|
-
import { cn as
|
|
658
|
+
import { cn as cn11, useClassNames as useClassNames7 } from "@marigold/system";
|
|
585
659
|
|
|
586
660
|
// src/Provider/index.ts
|
|
587
|
-
import { useTheme
|
|
661
|
+
import { useTheme, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
588
662
|
import { I18nProvider } from "@react-aria/i18n";
|
|
589
663
|
|
|
590
664
|
// src/Provider/MarigoldProvider.tsx
|
|
591
|
-
import {
|
|
592
|
-
import {
|
|
593
|
-
ThemeProvider,
|
|
594
|
-
defaultTheme,
|
|
595
|
-
useTheme
|
|
596
|
-
} from "@marigold/system";
|
|
597
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
665
|
+
import { ThemeProvider } from "@marigold/system";
|
|
666
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
598
667
|
function MarigoldProvider({
|
|
599
668
|
children,
|
|
600
|
-
theme
|
|
601
|
-
portalContainer
|
|
669
|
+
theme
|
|
602
670
|
}) {
|
|
603
|
-
|
|
604
|
-
const isTopLevel = outerTheme === defaultTheme;
|
|
605
|
-
return /* @__PURE__ */ jsx15(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx15(OverlayContainerProvider, { value: portalContainer, children: /* @__PURE__ */ jsx15(OverlayProvider, { children }) }) : children });
|
|
671
|
+
return /* @__PURE__ */ jsx16(ThemeProvider, { theme, children });
|
|
606
672
|
}
|
|
607
673
|
|
|
608
674
|
// src/Overlay/Underlay.tsx
|
|
609
|
-
import { jsx as
|
|
675
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
610
676
|
var Underlay = ({
|
|
611
677
|
size,
|
|
612
678
|
variant,
|
|
@@ -623,10 +689,10 @@ var Underlay = ({
|
|
|
623
689
|
...rest
|
|
624
690
|
};
|
|
625
691
|
const portal = usePortalContainer();
|
|
626
|
-
return /* @__PURE__ */
|
|
692
|
+
return /* @__PURE__ */ jsx17(
|
|
627
693
|
ModalOverlay,
|
|
628
694
|
{
|
|
629
|
-
className: ({ isEntering, isExiting }) =>
|
|
695
|
+
className: ({ isEntering, isExiting }) => cn11(
|
|
630
696
|
"fixed inset-0 z-10 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur ",
|
|
631
697
|
isEntering ? "animate-in fade-in duration-300 ease-out" : "",
|
|
632
698
|
isExiting ? "animate-out fade-out duration-200 ease-in" : "",
|
|
@@ -641,8 +707,8 @@ var Underlay = ({
|
|
|
641
707
|
};
|
|
642
708
|
|
|
643
709
|
// src/Overlay/Popover.tsx
|
|
644
|
-
import { Fragment, jsx as
|
|
645
|
-
var _Popover =
|
|
710
|
+
import { Fragment, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
711
|
+
var _Popover = forwardRef7(
|
|
646
712
|
({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
|
|
647
713
|
const props = {
|
|
648
714
|
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
@@ -658,21 +724,21 @@ var _Popover = forwardRef6(
|
|
|
658
724
|
});
|
|
659
725
|
const isSmallScreen = useSmallScreen();
|
|
660
726
|
const portal = usePortalContainer();
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
/* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsx18(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
728
|
+
/* @__PURE__ */ jsx18(Underlay, { open, variant: "modal" }),
|
|
729
|
+
/* @__PURE__ */ jsx18(
|
|
664
730
|
Popover,
|
|
665
731
|
{
|
|
666
732
|
ref,
|
|
667
733
|
...props,
|
|
668
|
-
className:
|
|
734
|
+
className: cn12(
|
|
669
735
|
"!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"
|
|
670
736
|
),
|
|
671
737
|
UNSTABLE_portalContainer: portal,
|
|
672
738
|
children
|
|
673
739
|
}
|
|
674
740
|
)
|
|
675
|
-
] }) : /* @__PURE__ */
|
|
741
|
+
] }) : /* @__PURE__ */ jsx18(
|
|
676
742
|
Popover,
|
|
677
743
|
{
|
|
678
744
|
ref,
|
|
@@ -686,87 +752,21 @@ var _Popover = forwardRef6(
|
|
|
686
752
|
}
|
|
687
753
|
);
|
|
688
754
|
|
|
689
|
-
// src/Autocomplete/
|
|
690
|
-
import
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
import { forwardRef as forwardRef7 } from "react";
|
|
696
|
-
import { Button } from "react-aria-components";
|
|
697
|
-
import { cn as cn12, useClassNames as useClassNames9 } from "@marigold/system";
|
|
698
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
699
|
-
var _Button = forwardRef7(
|
|
700
|
-
({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
|
|
701
|
-
const classNames2 = useClassNames9({
|
|
702
|
-
component: "Button",
|
|
703
|
-
variant,
|
|
704
|
-
size,
|
|
705
|
-
className
|
|
706
|
-
});
|
|
707
|
-
return /* @__PURE__ */ jsx18(
|
|
708
|
-
Button,
|
|
709
|
-
{
|
|
710
|
-
...props,
|
|
711
|
-
ref,
|
|
712
|
-
className: cn12(
|
|
713
|
-
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
714
|
-
classNames2,
|
|
715
|
-
fullWidth ? "w-full" : void 0
|
|
716
|
-
),
|
|
717
|
-
isDisabled: disabled,
|
|
718
|
-
children
|
|
719
|
-
}
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
);
|
|
723
|
-
|
|
724
|
-
// src/Autocomplete/ClearButton.tsx
|
|
725
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
726
|
-
var AutocompleteClearButton = ({
|
|
727
|
-
className,
|
|
728
|
-
onClear
|
|
755
|
+
// src/Autocomplete/Autocomplete.tsx
|
|
756
|
+
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
757
|
+
var AutocompleteInput = ({
|
|
758
|
+
onSubmit,
|
|
759
|
+
onClear,
|
|
760
|
+
ref
|
|
729
761
|
}) => {
|
|
730
|
-
|
|
762
|
+
const state = React.useContext(ComboBoxStateContext);
|
|
731
763
|
return /* @__PURE__ */ jsx19(
|
|
732
|
-
|
|
733
|
-
{
|
|
734
|
-
"aria-label": "Clear",
|
|
735
|
-
"data-testid": "clear-button",
|
|
736
|
-
onPress: () => {
|
|
737
|
-
state == null ? void 0 : state.setInputValue("");
|
|
738
|
-
onClear == null ? void 0 : onClear();
|
|
739
|
-
},
|
|
740
|
-
variant: "icon",
|
|
741
|
-
className: cn13(
|
|
742
|
-
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
743
|
-
className
|
|
744
|
-
),
|
|
745
|
-
children: /* @__PURE__ */ jsx19(
|
|
746
|
-
"svg",
|
|
747
|
-
{
|
|
748
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
749
|
-
viewBox: "0 0 20 20",
|
|
750
|
-
fill: "currentColor",
|
|
751
|
-
width: 20,
|
|
752
|
-
height: 20,
|
|
753
|
-
children: /* @__PURE__ */ jsx19("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
754
|
-
}
|
|
755
|
-
)
|
|
756
|
-
}
|
|
757
|
-
);
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
// src/Autocomplete/Autocomplete.tsx
|
|
761
|
-
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
762
|
-
var SearchInput = ({ onSubmit, onClear, ref }) => {
|
|
763
|
-
const state = React2.useContext(ComboBoxStateContext2);
|
|
764
|
-
return /* @__PURE__ */ jsx20(
|
|
765
|
-
_Input,
|
|
764
|
+
SearchInput,
|
|
766
765
|
{
|
|
767
766
|
ref,
|
|
768
|
-
|
|
769
|
-
|
|
767
|
+
className: {
|
|
768
|
+
action: (state == null ? void 0 : state.inputValue) === "" ? "hidden" : void 0
|
|
769
|
+
},
|
|
770
770
|
onKeyDown: (e) => {
|
|
771
771
|
if (e.key === "Enter" || e.key === "Escape") {
|
|
772
772
|
e.preventDefault();
|
|
@@ -776,22 +776,15 @@ var SearchInput = ({ onSubmit, onClear, ref }) => {
|
|
|
776
776
|
onSubmit == null ? void 0 : onSubmit(null, state.inputValue);
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
+
},
|
|
780
|
+
onClear: () => {
|
|
781
|
+
state == null ? void 0 : state.setInputValue("");
|
|
782
|
+
state == null ? void 0 : state.setSelectedKey(null);
|
|
783
|
+
onClear == null ? void 0 : onClear();
|
|
779
784
|
}
|
|
780
785
|
}
|
|
781
786
|
);
|
|
782
787
|
};
|
|
783
|
-
var SearchIcon = (props) => /* @__PURE__ */ jsx20(
|
|
784
|
-
"svg",
|
|
785
|
-
{
|
|
786
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
787
|
-
viewBox: "0 0 24 24",
|
|
788
|
-
fill: "currentColor",
|
|
789
|
-
width: 24,
|
|
790
|
-
height: 24,
|
|
791
|
-
...props,
|
|
792
|
-
children: /* @__PURE__ */ jsx20("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
|
|
793
|
-
}
|
|
794
|
-
);
|
|
795
788
|
var _Autocomplete = forwardRef8(
|
|
796
789
|
({
|
|
797
790
|
children,
|
|
@@ -818,19 +811,52 @@ var _Autocomplete = forwardRef8(
|
|
|
818
811
|
isRequired: required,
|
|
819
812
|
...rest
|
|
820
813
|
};
|
|
821
|
-
return /* @__PURE__ */
|
|
822
|
-
/* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
] })
|
|
814
|
+
return /* @__PURE__ */ jsxs8(FieldBase, { as: ComboBox, ...props, children: [
|
|
815
|
+
/* @__PURE__ */ jsx19(AutocompleteInput, { onSubmit, onClear, ref }),
|
|
816
|
+
/* @__PURE__ */ jsx19(_Popover, { children: /* @__PURE__ */ jsx19(_ListBox, { children }) })
|
|
817
|
+
] });
|
|
825
818
|
}
|
|
826
819
|
);
|
|
827
820
|
_Autocomplete.Item = _ListBox.Item;
|
|
828
821
|
|
|
829
822
|
// src/ComboBox/ComboBox.tsx
|
|
830
|
-
import { forwardRef as
|
|
823
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
831
824
|
import { ComboBox as ComboBox2 } from "react-aria-components";
|
|
825
|
+
import { useClassNames as useClassNames10 } from "@marigold/system";
|
|
826
|
+
|
|
827
|
+
// src/Button/Button.tsx
|
|
828
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
829
|
+
import { Button as Button2 } from "react-aria-components";
|
|
830
|
+
import { cn as cn13, useClassNames as useClassNames9 } from "@marigold/system";
|
|
831
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
832
|
+
var _Button = forwardRef9(
|
|
833
|
+
({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
|
|
834
|
+
const classNames2 = useClassNames9({
|
|
835
|
+
component: "Button",
|
|
836
|
+
variant,
|
|
837
|
+
size,
|
|
838
|
+
className
|
|
839
|
+
});
|
|
840
|
+
return /* @__PURE__ */ jsx20(
|
|
841
|
+
Button2,
|
|
842
|
+
{
|
|
843
|
+
...props,
|
|
844
|
+
ref,
|
|
845
|
+
className: cn13(
|
|
846
|
+
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
847
|
+
classNames2,
|
|
848
|
+
fullWidth ? "w-full" : void 0
|
|
849
|
+
),
|
|
850
|
+
isDisabled: disabled,
|
|
851
|
+
children
|
|
852
|
+
}
|
|
853
|
+
);
|
|
854
|
+
}
|
|
855
|
+
);
|
|
856
|
+
|
|
857
|
+
// src/ComboBox/ComboBox.tsx
|
|
832
858
|
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
833
|
-
var _ComboBox =
|
|
859
|
+
var _ComboBox = forwardRef10(
|
|
834
860
|
({
|
|
835
861
|
variant,
|
|
836
862
|
size,
|
|
@@ -854,11 +880,13 @@ var _ComboBox = forwardRef9(
|
|
|
854
880
|
onInputChange: onChange,
|
|
855
881
|
...rest
|
|
856
882
|
};
|
|
883
|
+
const classNames2 = useClassNames10({ component: "ComboBox", variant, size });
|
|
884
|
+
console.log(classNames2);
|
|
857
885
|
return /* @__PURE__ */ jsxs9(FieldBase, { as: ComboBox2, ref, ...props, children: [
|
|
858
886
|
/* @__PURE__ */ jsx21(
|
|
859
887
|
_Input,
|
|
860
888
|
{
|
|
861
|
-
action: /* @__PURE__ */ jsx21(_Button, { className:
|
|
889
|
+
action: /* @__PURE__ */ jsx21(_Button, { className: classNames2, children: /* @__PURE__ */ jsx21(ChevronDown, { className: "size-4" }) })
|
|
862
890
|
}
|
|
863
891
|
),
|
|
864
892
|
/* @__PURE__ */ jsx21(_Popover, { children: /* @__PURE__ */ jsx21(_ListBox, { children }) })
|
|
@@ -868,10 +896,10 @@ var _ComboBox = forwardRef9(
|
|
|
868
896
|
_ComboBox.Item = _ListBox.Item;
|
|
869
897
|
|
|
870
898
|
// src/Badge/Badge.tsx
|
|
871
|
-
import { useClassNames as
|
|
899
|
+
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
872
900
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
873
901
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
874
|
-
const classNames2 =
|
|
902
|
+
const classNames2 = useClassNames11({ component: "Badge", variant, size });
|
|
875
903
|
return /* @__PURE__ */ jsx22("div", { ...props, className: classNames2, children });
|
|
876
904
|
};
|
|
877
905
|
|
|
@@ -905,10 +933,10 @@ var Breakout = ({
|
|
|
905
933
|
};
|
|
906
934
|
|
|
907
935
|
// src/Body/Body.tsx
|
|
908
|
-
import { useClassNames as
|
|
936
|
+
import { useClassNames as useClassNames12 } from "@marigold/system";
|
|
909
937
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
910
938
|
var Body = ({ children, variant, size, ...props }) => {
|
|
911
|
-
const classNames2 =
|
|
939
|
+
const classNames2 = useClassNames12({ component: "Body", variant, size });
|
|
912
940
|
return /* @__PURE__ */ jsx24("section", { ...props, className: classNames2, children });
|
|
913
941
|
};
|
|
914
942
|
|
|
@@ -923,7 +951,7 @@ import {
|
|
|
923
951
|
paddingSpaceX,
|
|
924
952
|
paddingSpaceY,
|
|
925
953
|
paddingTop,
|
|
926
|
-
useClassNames as
|
|
954
|
+
useClassNames as useClassNames13
|
|
927
955
|
} from "@marigold/system";
|
|
928
956
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
929
957
|
var Card = ({
|
|
@@ -940,7 +968,7 @@ var Card = ({
|
|
|
940
968
|
pr,
|
|
941
969
|
...props
|
|
942
970
|
}) => {
|
|
943
|
-
const classNames2 =
|
|
971
|
+
const classNames2 = useClassNames13({ component: "Card", variant, size });
|
|
944
972
|
return /* @__PURE__ */ jsx25(
|
|
945
973
|
"div",
|
|
946
974
|
{
|
|
@@ -987,10 +1015,10 @@ var Center = ({
|
|
|
987
1015
|
};
|
|
988
1016
|
|
|
989
1017
|
// src/Checkbox/Checkbox.tsx
|
|
990
|
-
import { forwardRef as
|
|
1018
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
991
1019
|
import { Checkbox } from "react-aria-components";
|
|
992
|
-
import { cn as cn17, useClassNames as
|
|
993
|
-
import { Fragment as
|
|
1020
|
+
import { cn as cn17, useClassNames as useClassNames14 } from "@marigold/system";
|
|
1021
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
994
1022
|
var CheckMark = () => /* @__PURE__ */ jsx27("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx27(
|
|
995
1023
|
"path",
|
|
996
1024
|
{
|
|
@@ -1024,7 +1052,7 @@ var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1024
1052
|
}
|
|
1025
1053
|
);
|
|
1026
1054
|
};
|
|
1027
|
-
var _Checkbox =
|
|
1055
|
+
var _Checkbox = forwardRef11(
|
|
1028
1056
|
({
|
|
1029
1057
|
className,
|
|
1030
1058
|
indeterminate,
|
|
@@ -1049,7 +1077,7 @@ var _Checkbox = forwardRef10(
|
|
|
1049
1077
|
defaultSelected: defaultChecked,
|
|
1050
1078
|
...rest
|
|
1051
1079
|
};
|
|
1052
|
-
const classNames2 =
|
|
1080
|
+
const classNames2 = useClassNames14({ component: "Checkbox", variant, size });
|
|
1053
1081
|
return /* @__PURE__ */ jsx27(
|
|
1054
1082
|
Checkbox,
|
|
1055
1083
|
{
|
|
@@ -1060,7 +1088,7 @@ var _Checkbox = forwardRef10(
|
|
|
1060
1088
|
classNames2.container
|
|
1061
1089
|
),
|
|
1062
1090
|
...props,
|
|
1063
|
-
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(
|
|
1091
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1064
1092
|
/* @__PURE__ */ jsx27(
|
|
1065
1093
|
Icon2,
|
|
1066
1094
|
{
|
|
@@ -1078,7 +1106,7 @@ var _Checkbox = forwardRef10(
|
|
|
1078
1106
|
|
|
1079
1107
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1080
1108
|
import { CheckboxGroup } from "react-aria-components";
|
|
1081
|
-
import { useClassNames as
|
|
1109
|
+
import { useClassNames as useClassNames15 } from "@marigold/system";
|
|
1082
1110
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1083
1111
|
var _CheckboxGroup = ({
|
|
1084
1112
|
children,
|
|
@@ -1090,7 +1118,7 @@ var _CheckboxGroup = ({
|
|
|
1090
1118
|
error,
|
|
1091
1119
|
...rest
|
|
1092
1120
|
}) => {
|
|
1093
|
-
const classNames2 =
|
|
1121
|
+
const classNames2 = useClassNames15({
|
|
1094
1122
|
component: "Checkbox",
|
|
1095
1123
|
variant,
|
|
1096
1124
|
size,
|
|
@@ -1196,7 +1224,7 @@ var Container = ({
|
|
|
1196
1224
|
// src/Dialog/Dialog.tsx
|
|
1197
1225
|
import { useContext as useContext4 } from "react";
|
|
1198
1226
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1199
|
-
import { cn as cn21, useClassNames as
|
|
1227
|
+
import { cn as cn21, useClassNames as useClassNames17 } from "@marigold/system";
|
|
1200
1228
|
|
|
1201
1229
|
// src/Headline/Headline.tsx
|
|
1202
1230
|
import { Heading } from "react-aria-components";
|
|
@@ -1205,8 +1233,8 @@ import {
|
|
|
1205
1233
|
createVar as createVar8,
|
|
1206
1234
|
getColor,
|
|
1207
1235
|
textAlign,
|
|
1208
|
-
useClassNames as
|
|
1209
|
-
useTheme as
|
|
1236
|
+
useClassNames as useClassNames16,
|
|
1237
|
+
useTheme as useTheme2
|
|
1210
1238
|
} from "@marigold/system";
|
|
1211
1239
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1212
1240
|
var _Headline = ({
|
|
@@ -1218,8 +1246,8 @@ var _Headline = ({
|
|
|
1218
1246
|
level = 1,
|
|
1219
1247
|
...props
|
|
1220
1248
|
}) => {
|
|
1221
|
-
const theme =
|
|
1222
|
-
const classNames2 =
|
|
1249
|
+
const theme = useTheme2();
|
|
1250
|
+
const classNames2 = useClassNames16({
|
|
1223
1251
|
component: "Headline",
|
|
1224
1252
|
variant,
|
|
1225
1253
|
size: size != null ? size : `level-${level}`
|
|
@@ -1248,10 +1276,10 @@ import { Children as Children4 } from "react";
|
|
|
1248
1276
|
import { DialogTrigger } from "react-aria-components";
|
|
1249
1277
|
|
|
1250
1278
|
// src/Overlay/Modal.tsx
|
|
1251
|
-
import { forwardRef as
|
|
1279
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
1252
1280
|
import { Modal } from "react-aria-components";
|
|
1253
1281
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1254
|
-
var _Modal =
|
|
1282
|
+
var _Modal = forwardRef12(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
1255
1283
|
const props = {
|
|
1256
1284
|
isOpen: open,
|
|
1257
1285
|
isDismissable: dismissable,
|
|
@@ -1303,7 +1331,7 @@ var _DialogTrigger = ({
|
|
|
1303
1331
|
};
|
|
1304
1332
|
|
|
1305
1333
|
// src/Dialog/Dialog.tsx
|
|
1306
|
-
import { Fragment as
|
|
1334
|
+
import { Fragment as Fragment3, jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1307
1335
|
var CloseButton = ({ className }) => {
|
|
1308
1336
|
const { close } = useContext4(OverlayTriggerStateContext);
|
|
1309
1337
|
return /* @__PURE__ */ jsx34("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx34(
|
|
@@ -1333,7 +1361,7 @@ var _Dialog = ({
|
|
|
1333
1361
|
isNonModal,
|
|
1334
1362
|
...props
|
|
1335
1363
|
}) => {
|
|
1336
|
-
const classNames2 =
|
|
1364
|
+
const classNames2 = useClassNames17({ component: "Dialog", variant, size });
|
|
1337
1365
|
let state = useContext4(OverlayTriggerStateContext);
|
|
1338
1366
|
let children = props.children;
|
|
1339
1367
|
if (typeof children === "function") {
|
|
@@ -1347,7 +1375,7 @@ var _Dialog = ({
|
|
|
1347
1375
|
{
|
|
1348
1376
|
...props,
|
|
1349
1377
|
className: cn21("relative outline-none", classNames2.container),
|
|
1350
|
-
children: /* @__PURE__ */ jsxs12(
|
|
1378
|
+
children: /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
1351
1379
|
closeButton && /* @__PURE__ */ jsx34(CloseButton, { className: classNames2.closeButton }),
|
|
1352
1380
|
children
|
|
1353
1381
|
] })
|
|
@@ -1359,18 +1387,18 @@ _Dialog.Headline = DialogHeadline;
|
|
|
1359
1387
|
|
|
1360
1388
|
// src/Divider/Divider.tsx
|
|
1361
1389
|
import { Separator } from "react-aria-components";
|
|
1362
|
-
import { useClassNames as
|
|
1390
|
+
import { useClassNames as useClassNames18 } from "@marigold/system";
|
|
1363
1391
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1364
1392
|
var _Divider = ({ variant, ...props }) => {
|
|
1365
|
-
const classNames2 =
|
|
1393
|
+
const classNames2 = useClassNames18({ component: "Divider", variant });
|
|
1366
1394
|
return /* @__PURE__ */ jsx35(Separator, { className: classNames2, ...props });
|
|
1367
1395
|
};
|
|
1368
1396
|
|
|
1369
1397
|
// src/Footer/Footer.tsx
|
|
1370
|
-
import { useClassNames as
|
|
1398
|
+
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1371
1399
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1372
1400
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1373
|
-
const classNames2 =
|
|
1401
|
+
const classNames2 = useClassNames19({ component: "Footer", variant, size });
|
|
1374
1402
|
return /* @__PURE__ */ jsx36("footer", { ...props, className: classNames2, children });
|
|
1375
1403
|
};
|
|
1376
1404
|
|
|
@@ -1379,10 +1407,10 @@ import { Form } from "react-aria-components";
|
|
|
1379
1407
|
|
|
1380
1408
|
// src/Header/Header.tsx
|
|
1381
1409
|
import { Header } from "react-aria-components";
|
|
1382
|
-
import { useClassNames as
|
|
1410
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
1383
1411
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1384
1412
|
var _Header = ({ variant, size, ...props }) => {
|
|
1385
|
-
const classNames2 =
|
|
1413
|
+
const classNames2 = useClassNames20({
|
|
1386
1414
|
component: "Header",
|
|
1387
1415
|
variant,
|
|
1388
1416
|
size
|
|
@@ -1395,7 +1423,7 @@ import {
|
|
|
1395
1423
|
cn as cn22,
|
|
1396
1424
|
objectFit,
|
|
1397
1425
|
objectPosition,
|
|
1398
|
-
useClassNames as
|
|
1426
|
+
useClassNames as useClassNames21
|
|
1399
1427
|
} from "@marigold/system";
|
|
1400
1428
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1401
1429
|
var Image = ({
|
|
@@ -1405,7 +1433,7 @@ var Image = ({
|
|
|
1405
1433
|
position = "none",
|
|
1406
1434
|
...props
|
|
1407
1435
|
}) => {
|
|
1408
|
-
const classNames2 =
|
|
1436
|
+
const classNames2 = useClassNames21({ component: "Image", variant, size });
|
|
1409
1437
|
return /* @__PURE__ */ jsx38(
|
|
1410
1438
|
"img",
|
|
1411
1439
|
{
|
|
@@ -1453,17 +1481,17 @@ var Inline = ({
|
|
|
1453
1481
|
};
|
|
1454
1482
|
|
|
1455
1483
|
// src/DateField/DateField.tsx
|
|
1456
|
-
import { forwardRef as
|
|
1484
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
1457
1485
|
import { DateField } from "react-aria-components";
|
|
1458
1486
|
|
|
1459
1487
|
// src/DateField/DateInput.tsx
|
|
1460
1488
|
import { DateInput, Group } from "react-aria-components";
|
|
1461
|
-
import { useClassNames as
|
|
1489
|
+
import { useClassNames as useClassNames22 } from "@marigold/system";
|
|
1462
1490
|
|
|
1463
1491
|
// src/DateField/DateSegment.tsx
|
|
1464
1492
|
import { DateSegment } from "react-aria-components";
|
|
1465
1493
|
import { cn as cn24 } from "@marigold/system";
|
|
1466
|
-
import { Fragment as
|
|
1494
|
+
import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1467
1495
|
var _DateSegment = ({ segment, ...props }) => {
|
|
1468
1496
|
return /* @__PURE__ */ jsx40(
|
|
1469
1497
|
DateSegment,
|
|
@@ -1473,7 +1501,7 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1473
1501
|
style: {
|
|
1474
1502
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
1475
1503
|
},
|
|
1476
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs13(
|
|
1504
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
1477
1505
|
/* @__PURE__ */ jsx40(
|
|
1478
1506
|
"span",
|
|
1479
1507
|
{
|
|
@@ -1494,7 +1522,7 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1494
1522
|
// src/DateField/DateInput.tsx
|
|
1495
1523
|
import { jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1496
1524
|
var _DateInput = ({ variant, size, action, ...props }) => {
|
|
1497
|
-
const classNames2 =
|
|
1525
|
+
const classNames2 = useClassNames22({ component: "DateField", variant, size });
|
|
1498
1526
|
return /* @__PURE__ */ jsxs14(Group, { className: classNames2.field, children: [
|
|
1499
1527
|
/* @__PURE__ */ jsx41(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx41(_DateSegment, { className: classNames2.segment, segment }) }),
|
|
1500
1528
|
action ? action : /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx41(
|
|
@@ -1513,7 +1541,7 @@ var _DateInput = ({ variant, size, action, ...props }) => {
|
|
|
1513
1541
|
|
|
1514
1542
|
// src/DateField/DateField.tsx
|
|
1515
1543
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1516
|
-
var _DateField =
|
|
1544
|
+
var _DateField = forwardRef13(
|
|
1517
1545
|
({
|
|
1518
1546
|
variant,
|
|
1519
1547
|
size,
|
|
@@ -1548,7 +1576,7 @@ var _DateField = forwardRef12(
|
|
|
1548
1576
|
// src/Calendar/Calendar.tsx
|
|
1549
1577
|
import { useState } from "react";
|
|
1550
1578
|
import { Calendar } from "react-aria-components";
|
|
1551
|
-
import { cn as cn28, useClassNames as
|
|
1579
|
+
import { cn as cn28, useClassNames as useClassNames27 } from "@marigold/system";
|
|
1552
1580
|
|
|
1553
1581
|
// src/Calendar/CalendarGrid.tsx
|
|
1554
1582
|
import {
|
|
@@ -1556,7 +1584,7 @@ import {
|
|
|
1556
1584
|
CalendarGrid,
|
|
1557
1585
|
CalendarGridBody
|
|
1558
1586
|
} from "react-aria-components";
|
|
1559
|
-
import { cn as cn25, useClassNames as
|
|
1587
|
+
import { cn as cn25, useClassNames as useClassNames24 } from "@marigold/system";
|
|
1560
1588
|
|
|
1561
1589
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1562
1590
|
import { startOfWeek, today } from "@internationalized/date";
|
|
@@ -1564,7 +1592,7 @@ import { useContext as useContext5, useMemo } from "react";
|
|
|
1564
1592
|
import { CalendarStateContext } from "react-aria-components";
|
|
1565
1593
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1566
1594
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1567
|
-
import { useClassNames as
|
|
1595
|
+
import { useClassNames as useClassNames23 } from "@marigold/system";
|
|
1568
1596
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1569
1597
|
function CalendarGridHeader(props) {
|
|
1570
1598
|
const state = useContext5(CalendarStateContext);
|
|
@@ -1582,14 +1610,14 @@ function CalendarGridHeader(props) {
|
|
|
1582
1610
|
return dayFormatter.format(dateDay);
|
|
1583
1611
|
});
|
|
1584
1612
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1585
|
-
const classNames2 =
|
|
1613
|
+
const classNames2 = useClassNames23({ component: "Calendar" });
|
|
1586
1614
|
return /* @__PURE__ */ jsx43("thead", { ...headerProps, children: /* @__PURE__ */ jsx43("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx43("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
|
|
1587
1615
|
}
|
|
1588
1616
|
|
|
1589
1617
|
// src/Calendar/CalendarGrid.tsx
|
|
1590
1618
|
import { jsx as jsx44, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1591
1619
|
var _CalendarGrid = () => {
|
|
1592
|
-
const classNames2 =
|
|
1620
|
+
const classNames2 = useClassNames24({ component: "Calendar" });
|
|
1593
1621
|
return /* @__PURE__ */ jsxs15(CalendarGrid, { className: classNames2.calendarGrid, children: [
|
|
1594
1622
|
/* @__PURE__ */ jsx44(CalendarGridHeader, {}),
|
|
1595
1623
|
/* @__PURE__ */ jsx44(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx44(
|
|
@@ -1609,7 +1637,7 @@ var _CalendarGrid = () => {
|
|
|
1609
1637
|
import { useContext as useContext6 } from "react";
|
|
1610
1638
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1611
1639
|
import { ChevronDown as ChevronDown2 } from "@marigold/icons";
|
|
1612
|
-
import { cn as cn26, useClassNames as
|
|
1640
|
+
import { cn as cn26, useClassNames as useClassNames25 } from "@marigold/system";
|
|
1613
1641
|
|
|
1614
1642
|
// src/Calendar/useFormattedMonths.tsx
|
|
1615
1643
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -1637,7 +1665,7 @@ function CalendarListBox({
|
|
|
1637
1665
|
const state = useContext6(CalendarStateContext2);
|
|
1638
1666
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1639
1667
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1640
|
-
const { select: selectClassNames } =
|
|
1668
|
+
const { select: selectClassNames } = useClassNames25({ component: "Select" });
|
|
1641
1669
|
return /* @__PURE__ */ jsxs16(
|
|
1642
1670
|
"button",
|
|
1643
1671
|
{
|
|
@@ -1654,13 +1682,13 @@ function CalendarListBox({
|
|
|
1654
1682
|
}
|
|
1655
1683
|
|
|
1656
1684
|
// src/Calendar/MonthControls.tsx
|
|
1657
|
-
import { Button as
|
|
1685
|
+
import { Button as Button3 } from "react-aria-components";
|
|
1658
1686
|
import { ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1659
|
-
import { cn as cn27, useClassNames as
|
|
1687
|
+
import { cn as cn27, useClassNames as useClassNames26 } from "@marigold/system";
|
|
1660
1688
|
import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1661
1689
|
function MonthControls() {
|
|
1662
|
-
const classNames2 =
|
|
1663
|
-
const buttonClassNames =
|
|
1690
|
+
const classNames2 = useClassNames26({ component: "Calendar" });
|
|
1691
|
+
const buttonClassNames = useClassNames26({ component: "Button" });
|
|
1664
1692
|
return /* @__PURE__ */ jsxs17(
|
|
1665
1693
|
"div",
|
|
1666
1694
|
{
|
|
@@ -1670,7 +1698,7 @@ function MonthControls() {
|
|
|
1670
1698
|
),
|
|
1671
1699
|
children: [
|
|
1672
1700
|
/* @__PURE__ */ jsx46(
|
|
1673
|
-
|
|
1701
|
+
Button3,
|
|
1674
1702
|
{
|
|
1675
1703
|
className: cn27(
|
|
1676
1704
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
@@ -1681,7 +1709,7 @@ function MonthControls() {
|
|
|
1681
1709
|
}
|
|
1682
1710
|
),
|
|
1683
1711
|
/* @__PURE__ */ jsx46(
|
|
1684
|
-
|
|
1712
|
+
Button3,
|
|
1685
1713
|
{
|
|
1686
1714
|
className: cn27(
|
|
1687
1715
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
@@ -1810,7 +1838,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1810
1838
|
var YearListBox_default = YearListBox;
|
|
1811
1839
|
|
|
1812
1840
|
// src/Calendar/Calendar.tsx
|
|
1813
|
-
import { Fragment as
|
|
1841
|
+
import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1814
1842
|
var _Calendar = ({
|
|
1815
1843
|
disabled,
|
|
1816
1844
|
readOnly,
|
|
@@ -1823,7 +1851,7 @@ var _Calendar = ({
|
|
|
1823
1851
|
isReadOnly: readOnly,
|
|
1824
1852
|
...rest
|
|
1825
1853
|
};
|
|
1826
|
-
const classNames2 =
|
|
1854
|
+
const classNames2 = useClassNames27({ component: "Calendar" });
|
|
1827
1855
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1828
1856
|
const ViewMap = {
|
|
1829
1857
|
month: /* @__PURE__ */ jsx49(MonthListBox_default, { setSelectedDropdown }),
|
|
@@ -1837,7 +1865,7 @@ var _Calendar = ({
|
|
|
1837
1865
|
classNames2.calendar
|
|
1838
1866
|
),
|
|
1839
1867
|
...props,
|
|
1840
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs18(
|
|
1868
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
|
1841
1869
|
/* @__PURE__ */ jsxs18("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
1842
1870
|
/* @__PURE__ */ jsxs18("div", { className: "flex w-full gap-4", children: [
|
|
1843
1871
|
/* @__PURE__ */ jsx49(
|
|
@@ -1867,7 +1895,7 @@ var _Calendar = ({
|
|
|
1867
1895
|
|
|
1868
1896
|
// src/DatePicker/DatePicker.tsx
|
|
1869
1897
|
import { DatePicker } from "react-aria-components";
|
|
1870
|
-
import { useClassNames as
|
|
1898
|
+
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
1871
1899
|
import { jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1872
1900
|
var _DatePicker = ({
|
|
1873
1901
|
disabled,
|
|
@@ -1887,7 +1915,7 @@ var _DatePicker = ({
|
|
|
1887
1915
|
isOpen: open,
|
|
1888
1916
|
...rest
|
|
1889
1917
|
};
|
|
1890
|
-
const classNames2 =
|
|
1918
|
+
const classNames2 = useClassNames28({
|
|
1891
1919
|
component: "DatePicker",
|
|
1892
1920
|
size,
|
|
1893
1921
|
variant
|
|
@@ -1942,13 +1970,13 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx51(
|
|
|
1942
1970
|
);
|
|
1943
1971
|
|
|
1944
1972
|
// src/Link/Link.tsx
|
|
1945
|
-
import { forwardRef as
|
|
1973
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
1946
1974
|
import { Link } from "react-aria-components";
|
|
1947
|
-
import { useClassNames as
|
|
1975
|
+
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
1948
1976
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1949
|
-
var _Link =
|
|
1977
|
+
var _Link = forwardRef14(
|
|
1950
1978
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
1951
|
-
const classNames2 =
|
|
1979
|
+
const classNames2 = useClassNames29({
|
|
1952
1980
|
component: "Link",
|
|
1953
1981
|
variant,
|
|
1954
1982
|
size
|
|
@@ -1958,7 +1986,7 @@ var _Link = forwardRef13(
|
|
|
1958
1986
|
);
|
|
1959
1987
|
|
|
1960
1988
|
// src/List/List.tsx
|
|
1961
|
-
import { useClassNames as
|
|
1989
|
+
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
1962
1990
|
|
|
1963
1991
|
// src/List/Context.ts
|
|
1964
1992
|
import { createContext as createContext4, useContext as useContext9 } from "react";
|
|
@@ -1982,30 +2010,30 @@ var List = ({
|
|
|
1982
2010
|
...props
|
|
1983
2011
|
}) => {
|
|
1984
2012
|
const Component = as;
|
|
1985
|
-
const classNames2 =
|
|
2013
|
+
const classNames2 = useClassNames30({ component: "List", variant, size });
|
|
1986
2014
|
return /* @__PURE__ */ jsx54(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx54(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
1987
2015
|
};
|
|
1988
2016
|
List.Item = ListItem;
|
|
1989
2017
|
|
|
1990
2018
|
// src/Menu/Menu.tsx
|
|
1991
2019
|
import { Menu, MenuTrigger } from "react-aria-components";
|
|
1992
|
-
import { useClassNames as
|
|
2020
|
+
import { useClassNames as useClassNames33 } from "@marigold/system";
|
|
1993
2021
|
|
|
1994
2022
|
// src/Menu/MenuItem.tsx
|
|
1995
2023
|
import { MenuItem } from "react-aria-components";
|
|
1996
|
-
import { useClassNames as
|
|
2024
|
+
import { useClassNames as useClassNames31 } from "@marigold/system";
|
|
1997
2025
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
1998
2026
|
var _MenuItem = ({ children, ...props }) => {
|
|
1999
|
-
const classNames2 =
|
|
2027
|
+
const classNames2 = useClassNames31({ component: "Menu" });
|
|
2000
2028
|
return /* @__PURE__ */ jsx55(MenuItem, { ...props, className: classNames2.item, children });
|
|
2001
2029
|
};
|
|
2002
2030
|
|
|
2003
2031
|
// src/Menu/MenuSection.tsx
|
|
2004
2032
|
import { Section as Section2 } from "react-aria-components";
|
|
2005
|
-
import { useClassNames as
|
|
2033
|
+
import { useClassNames as useClassNames32 } from "@marigold/system";
|
|
2006
2034
|
import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2007
2035
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2008
|
-
const className =
|
|
2036
|
+
const className = useClassNames32({ component: "Menu" });
|
|
2009
2037
|
return /* @__PURE__ */ jsxs20(Section2, { ...props, children: [
|
|
2010
2038
|
/* @__PURE__ */ jsx56(_Header, { className: className.section, children: title }),
|
|
2011
2039
|
children
|
|
@@ -2023,7 +2051,7 @@ var _Menu = ({
|
|
|
2023
2051
|
open,
|
|
2024
2052
|
...props
|
|
2025
2053
|
}) => {
|
|
2026
|
-
const classNames2 =
|
|
2054
|
+
const classNames2 = useClassNames33({ component: "Menu", variant, size });
|
|
2027
2055
|
return /* @__PURE__ */ jsxs21(MenuTrigger, { ...props, children: [
|
|
2028
2056
|
/* @__PURE__ */ jsx57(_Button, { variant: "menu", disabled, children: label }),
|
|
2029
2057
|
/* @__PURE__ */ jsx57(_Popover, { open, children: /* @__PURE__ */ jsx57(Menu, { ...props, className: classNames2.container, children }) })
|
|
@@ -2034,7 +2062,7 @@ _Menu.Section = _MenuSection;
|
|
|
2034
2062
|
|
|
2035
2063
|
// src/Menu/ActionMenu.tsx
|
|
2036
2064
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
2037
|
-
import { SVG as SVG4, useClassNames as
|
|
2065
|
+
import { SVG as SVG4, useClassNames as useClassNames34 } from "@marigold/system";
|
|
2038
2066
|
import { jsx as jsx58, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2039
2067
|
var ActionMenu = ({
|
|
2040
2068
|
variant,
|
|
@@ -2042,7 +2070,7 @@ var ActionMenu = ({
|
|
|
2042
2070
|
disabled,
|
|
2043
2071
|
...props
|
|
2044
2072
|
}) => {
|
|
2045
|
-
const classNames2 =
|
|
2073
|
+
const classNames2 = useClassNames34({ component: "Menu", variant, size });
|
|
2046
2074
|
return /* @__PURE__ */ jsxs22(MenuTrigger2, { children: [
|
|
2047
2075
|
/* @__PURE__ */ jsx58(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx58(SVG4, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx58("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
2048
2076
|
/* @__PURE__ */ jsx58(_Popover, { children: /* @__PURE__ */ jsx58(Menu2, { ...props, className: classNames2.container, children: props.children }) })
|
|
@@ -2050,7 +2078,8 @@ var ActionMenu = ({
|
|
|
2050
2078
|
};
|
|
2051
2079
|
|
|
2052
2080
|
// src/Message/Message.tsx
|
|
2053
|
-
import {
|
|
2081
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
2082
|
+
import { cn as cn30, useClassNames as useClassNames35 } from "@marigold/system";
|
|
2054
2083
|
import { jsx as jsx59, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2055
2084
|
var icons = {
|
|
2056
2085
|
success: () => /* @__PURE__ */ jsx59(
|
|
@@ -2118,45 +2147,45 @@ var icons = {
|
|
|
2118
2147
|
}
|
|
2119
2148
|
)
|
|
2120
2149
|
};
|
|
2121
|
-
var Message = (
|
|
2122
|
-
messageTitle,
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
"div",
|
|
2132
|
-
{
|
|
2133
|
-
className: cn30(
|
|
2134
|
-
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2135
|
-
classNames2.container
|
|
2136
|
-
),
|
|
2137
|
-
...props,
|
|
2138
|
-
children: [
|
|
2139
|
-
/* @__PURE__ */ jsx59("div", { className: cn30("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx59(Icon4, {}) }),
|
|
2140
|
-
/* @__PURE__ */ jsx59(
|
|
2141
|
-
"div",
|
|
2142
|
-
{
|
|
2143
|
-
className: cn30("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2144
|
-
children: messageTitle
|
|
2145
|
-
}
|
|
2150
|
+
var Message = forwardRef15(
|
|
2151
|
+
({ messageTitle, variant = "info", size, children, ...props }, ref) => {
|
|
2152
|
+
const classNames2 = useClassNames35({ component: "Message", variant, size });
|
|
2153
|
+
const Icon4 = icons[variant];
|
|
2154
|
+
return /* @__PURE__ */ jsxs23(
|
|
2155
|
+
"div",
|
|
2156
|
+
{
|
|
2157
|
+
className: cn30(
|
|
2158
|
+
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2159
|
+
classNames2.container
|
|
2146
2160
|
),
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2161
|
+
ref,
|
|
2162
|
+
...props,
|
|
2163
|
+
children: [
|
|
2164
|
+
/* @__PURE__ */ jsx59("div", { className: cn30("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx59(Icon4, {}) }),
|
|
2165
|
+
/* @__PURE__ */ jsx59(
|
|
2166
|
+
"div",
|
|
2167
|
+
{
|
|
2168
|
+
className: cn30(
|
|
2169
|
+
"col-start-2 row-start-1 self-center",
|
|
2170
|
+
classNames2.title
|
|
2171
|
+
),
|
|
2172
|
+
children: messageTitle
|
|
2173
|
+
}
|
|
2174
|
+
),
|
|
2175
|
+
/* @__PURE__ */ jsx59("div", { className: cn30("col-start-2", classNames2.content), children })
|
|
2176
|
+
]
|
|
2177
|
+
}
|
|
2178
|
+
);
|
|
2179
|
+
}
|
|
2180
|
+
);
|
|
2152
2181
|
|
|
2153
2182
|
// src/NumberField/NumberField.tsx
|
|
2154
|
-
import { forwardRef as
|
|
2183
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
2155
2184
|
import { Group as Group2, NumberField } from "react-aria-components";
|
|
2156
|
-
import { cn as cn32, useClassNames as
|
|
2185
|
+
import { cn as cn32, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2157
2186
|
|
|
2158
2187
|
// src/NumberField/StepButton.tsx
|
|
2159
|
-
import { Button as
|
|
2188
|
+
import { Button as Button4 } from "react-aria-components";
|
|
2160
2189
|
import { cn as cn31 } from "@marigold/system";
|
|
2161
2190
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2162
2191
|
var Plus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx60(
|
|
@@ -2178,7 +2207,7 @@ var Minus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox:
|
|
|
2178
2207
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2179
2208
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2180
2209
|
return /* @__PURE__ */ jsx60(
|
|
2181
|
-
|
|
2210
|
+
Button4,
|
|
2182
2211
|
{
|
|
2183
2212
|
className: cn31(
|
|
2184
2213
|
[
|
|
@@ -2195,7 +2224,7 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2195
2224
|
|
|
2196
2225
|
// src/NumberField/NumberField.tsx
|
|
2197
2226
|
import { jsx as jsx61, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2198
|
-
var _NumberField =
|
|
2227
|
+
var _NumberField = forwardRef16(
|
|
2199
2228
|
({
|
|
2200
2229
|
variant,
|
|
2201
2230
|
size,
|
|
@@ -2206,7 +2235,7 @@ var _NumberField = forwardRef14(
|
|
|
2206
2235
|
hideStepper,
|
|
2207
2236
|
...rest
|
|
2208
2237
|
}, ref) => {
|
|
2209
|
-
const classNames2 =
|
|
2238
|
+
const classNames2 = useClassNames36({
|
|
2210
2239
|
component: "NumberField",
|
|
2211
2240
|
size,
|
|
2212
2241
|
variant
|
|
@@ -2251,10 +2280,10 @@ var _NumberField = forwardRef14(
|
|
|
2251
2280
|
|
|
2252
2281
|
// src/Radio/Radio.tsx
|
|
2253
2282
|
import {
|
|
2254
|
-
forwardRef as
|
|
2283
|
+
forwardRef as forwardRef17
|
|
2255
2284
|
} from "react";
|
|
2256
2285
|
import { Radio } from "react-aria-components";
|
|
2257
|
-
import { cn as cn34, useClassNames as
|
|
2286
|
+
import { cn as cn34, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2258
2287
|
|
|
2259
2288
|
// src/Radio/Context.ts
|
|
2260
2289
|
import { createContext as createContext5, useContext as useContext10 } from "react";
|
|
@@ -2265,7 +2294,7 @@ var useRadioGroupContext = () => useContext10(RadioGroupContext);
|
|
|
2265
2294
|
|
|
2266
2295
|
// src/Radio/RadioGroup.tsx
|
|
2267
2296
|
import { RadioGroup } from "react-aria-components";
|
|
2268
|
-
import { cn as cn33, useClassNames as
|
|
2297
|
+
import { cn as cn33, useClassNames as useClassNames37 } from "@marigold/system";
|
|
2269
2298
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2270
2299
|
var _RadioGroup = ({
|
|
2271
2300
|
variant,
|
|
@@ -2282,7 +2311,7 @@ var _RadioGroup = ({
|
|
|
2282
2311
|
width,
|
|
2283
2312
|
...rest
|
|
2284
2313
|
}) => {
|
|
2285
|
-
const classNames2 =
|
|
2314
|
+
const classNames2 = useClassNames37({ component: "Radio", variant, size });
|
|
2286
2315
|
const props = {
|
|
2287
2316
|
isDisabled: disabled,
|
|
2288
2317
|
isReadOnly: readOnly,
|
|
@@ -2320,7 +2349,7 @@ var _RadioGroup = ({
|
|
|
2320
2349
|
};
|
|
2321
2350
|
|
|
2322
2351
|
// src/Radio/Radio.tsx
|
|
2323
|
-
import { Fragment as
|
|
2352
|
+
import { Fragment as Fragment6, jsx as jsx63, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2324
2353
|
var Dot = () => /* @__PURE__ */ jsx63("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx63("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2325
2354
|
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx63(
|
|
2326
2355
|
"div",
|
|
@@ -2334,10 +2363,10 @@ var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx63(
|
|
|
2334
2363
|
children: checked ? /* @__PURE__ */ jsx63(Dot, {}) : null
|
|
2335
2364
|
}
|
|
2336
2365
|
);
|
|
2337
|
-
var _Radio =
|
|
2366
|
+
var _Radio = forwardRef17(
|
|
2338
2367
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2339
2368
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2340
|
-
const classNames2 =
|
|
2369
|
+
const classNames2 = useClassNames38({
|
|
2341
2370
|
component: "Radio",
|
|
2342
2371
|
variant: variant || props.variant,
|
|
2343
2372
|
size: size || props.size
|
|
@@ -2355,7 +2384,7 @@ var _Radio = forwardRef15(
|
|
|
2355
2384
|
value,
|
|
2356
2385
|
isDisabled: disabled,
|
|
2357
2386
|
...props,
|
|
2358
|
-
children: ({ isSelected }) => /* @__PURE__ */ jsxs25(
|
|
2387
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
2359
2388
|
/* @__PURE__ */ jsx63(
|
|
2360
2389
|
Icon3,
|
|
2361
2390
|
{
|
|
@@ -2375,22 +2404,10 @@ var _Radio = forwardRef15(
|
|
|
2375
2404
|
_Radio.Group = _RadioGroup;
|
|
2376
2405
|
|
|
2377
2406
|
// src/SearchField/SearchField.tsx
|
|
2378
|
-
import { forwardRef as
|
|
2407
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
2379
2408
|
import { SearchField } from "react-aria-components";
|
|
2380
2409
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2381
|
-
var
|
|
2382
|
-
"svg",
|
|
2383
|
-
{
|
|
2384
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2385
|
-
viewBox: "0 0 24 24",
|
|
2386
|
-
fill: "currentColor",
|
|
2387
|
-
width: 24,
|
|
2388
|
-
height: 24,
|
|
2389
|
-
...props,
|
|
2390
|
-
children: /* @__PURE__ */ jsx64("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" })
|
|
2391
|
-
}
|
|
2392
|
-
);
|
|
2393
|
-
var _SearchField = forwardRef16(
|
|
2410
|
+
var _SearchField = forwardRef18(
|
|
2394
2411
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2395
2412
|
const props = {
|
|
2396
2413
|
...rest,
|
|
@@ -2399,20 +2416,26 @@ var _SearchField = forwardRef16(
|
|
|
2399
2416
|
isReadOnly: readOnly,
|
|
2400
2417
|
isInvalid: error
|
|
2401
2418
|
};
|
|
2402
|
-
return /* @__PURE__ */ jsx64(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx64(
|
|
2419
|
+
return /* @__PURE__ */ jsx64(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx64(
|
|
2420
|
+
SearchInput,
|
|
2421
|
+
{
|
|
2422
|
+
ref,
|
|
2423
|
+
className: { action: "group-data-[empty=true]/field:hidden" }
|
|
2424
|
+
}
|
|
2425
|
+
) });
|
|
2403
2426
|
}
|
|
2404
2427
|
);
|
|
2405
2428
|
|
|
2406
2429
|
// src/Select/Select.tsx
|
|
2407
|
-
import { forwardRef as
|
|
2430
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
2408
2431
|
import {
|
|
2409
|
-
Button as
|
|
2432
|
+
Button as Button5,
|
|
2410
2433
|
Select,
|
|
2411
2434
|
SelectValue
|
|
2412
2435
|
} from "react-aria-components";
|
|
2413
|
-
import { cn as cn35, useClassNames as
|
|
2436
|
+
import { cn as cn35, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2414
2437
|
import { jsx as jsx65, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2415
|
-
var _Select =
|
|
2438
|
+
var _Select = forwardRef19(
|
|
2416
2439
|
({
|
|
2417
2440
|
disabled,
|
|
2418
2441
|
required,
|
|
@@ -2432,10 +2455,10 @@ var _Select = forwardRef17(
|
|
|
2432
2455
|
onSelectionChange: onChange,
|
|
2433
2456
|
...rest
|
|
2434
2457
|
};
|
|
2435
|
-
const classNames2 =
|
|
2458
|
+
const classNames2 = useClassNames39({ component: "Select", variant, size });
|
|
2436
2459
|
return /* @__PURE__ */ jsxs26(FieldBase, { isOpen: true, as: Select, ref, ...props, children: [
|
|
2437
2460
|
/* @__PURE__ */ jsxs26(
|
|
2438
|
-
|
|
2461
|
+
Button5,
|
|
2439
2462
|
{
|
|
2440
2463
|
className: cn35(
|
|
2441
2464
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
@@ -2473,7 +2496,7 @@ var Scrollable = ({
|
|
|
2473
2496
|
);
|
|
2474
2497
|
|
|
2475
2498
|
// src/Slider/Slider.tsx
|
|
2476
|
-
import { forwardRef as
|
|
2499
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
2477
2500
|
import {
|
|
2478
2501
|
Slider,
|
|
2479
2502
|
SliderOutput,
|
|
@@ -2483,10 +2506,10 @@ import {
|
|
|
2483
2506
|
import {
|
|
2484
2507
|
cn as cn37,
|
|
2485
2508
|
width as twWidth3,
|
|
2486
|
-
useClassNames as
|
|
2509
|
+
useClassNames as useClassNames40
|
|
2487
2510
|
} from "@marigold/system";
|
|
2488
2511
|
import { jsx as jsx67, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2489
|
-
var _Slider =
|
|
2512
|
+
var _Slider = forwardRef20(
|
|
2490
2513
|
({
|
|
2491
2514
|
thumbLabels,
|
|
2492
2515
|
variant,
|
|
@@ -2495,7 +2518,7 @@ var _Slider = forwardRef18(
|
|
|
2495
2518
|
disabled,
|
|
2496
2519
|
...rest
|
|
2497
2520
|
}, ref) => {
|
|
2498
|
-
const classNames2 =
|
|
2521
|
+
const classNames2 = useClassNames40({
|
|
2499
2522
|
component: "Slider",
|
|
2500
2523
|
variant,
|
|
2501
2524
|
size
|
|
@@ -2576,15 +2599,15 @@ var Stack = ({
|
|
|
2576
2599
|
};
|
|
2577
2600
|
|
|
2578
2601
|
// src/Switch/Switch.tsx
|
|
2579
|
-
import { forwardRef as
|
|
2602
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
2580
2603
|
import { Switch } from "react-aria-components";
|
|
2581
2604
|
import {
|
|
2582
2605
|
cn as cn39,
|
|
2583
2606
|
width as twWidth4,
|
|
2584
|
-
useClassNames as
|
|
2607
|
+
useClassNames as useClassNames41
|
|
2585
2608
|
} from "@marigold/system";
|
|
2586
2609
|
import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2587
|
-
var _Switch =
|
|
2610
|
+
var _Switch = forwardRef21(
|
|
2588
2611
|
({
|
|
2589
2612
|
variant,
|
|
2590
2613
|
size,
|
|
@@ -2595,7 +2618,7 @@ var _Switch = forwardRef19(
|
|
|
2595
2618
|
readOnly,
|
|
2596
2619
|
...rest
|
|
2597
2620
|
}, ref) => {
|
|
2598
|
-
const classNames2 =
|
|
2621
|
+
const classNames2 = useClassNames41({ component: "Switch", size, variant });
|
|
2599
2622
|
const props = {
|
|
2600
2623
|
isDisabled: disabled,
|
|
2601
2624
|
isReadOnly: readOnly,
|
|
@@ -2654,7 +2677,7 @@ import {
|
|
|
2654
2677
|
Row,
|
|
2655
2678
|
useTableState
|
|
2656
2679
|
} from "@react-stately/table";
|
|
2657
|
-
import { cn as cn45, useClassNames as
|
|
2680
|
+
import { cn as cn45, useClassNames as useClassNames43 } from "@marigold/system";
|
|
2658
2681
|
|
|
2659
2682
|
// src/Table/Context.tsx
|
|
2660
2683
|
import { createContext as createContext6, useContext as useContext11 } from "react";
|
|
@@ -2848,13 +2871,13 @@ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
|
2848
2871
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
2849
2872
|
import { useTableRow } from "@react-aria/table";
|
|
2850
2873
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
2851
|
-
import { cn as cn43, useClassNames as
|
|
2874
|
+
import { cn as cn43, useClassNames as useClassNames42, useStateProps as useStateProps5 } from "@marigold/system";
|
|
2852
2875
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2853
2876
|
var TableRow = ({ children, row }) => {
|
|
2854
2877
|
const ref = useRef8(null);
|
|
2855
2878
|
const { interactive, state, ...ctx } = useTableContext();
|
|
2856
2879
|
const { variant, size } = row.props;
|
|
2857
|
-
const classNames2 =
|
|
2880
|
+
const classNames2 = useClassNames42({
|
|
2858
2881
|
component: "Table",
|
|
2859
2882
|
variant: variant || ctx.variant,
|
|
2860
2883
|
size: size || ctx.size
|
|
@@ -2964,7 +2987,7 @@ var Table = ({
|
|
|
2964
2987
|
props.selectionBehavior !== "replace"
|
|
2965
2988
|
});
|
|
2966
2989
|
const { gridProps } = useTable(props, state, tableRef);
|
|
2967
|
-
const classNames2 =
|
|
2990
|
+
const classNames2 = useClassNames43({
|
|
2968
2991
|
component: "Table",
|
|
2969
2992
|
variant,
|
|
2970
2993
|
size
|
|
@@ -3046,8 +3069,8 @@ import {
|
|
|
3046
3069
|
textAlign as textAlign2,
|
|
3047
3070
|
textSize,
|
|
3048
3071
|
textStyle,
|
|
3049
|
-
useClassNames as
|
|
3050
|
-
useTheme as
|
|
3072
|
+
useClassNames as useClassNames44,
|
|
3073
|
+
useTheme as useTheme3
|
|
3051
3074
|
} from "@marigold/system";
|
|
3052
3075
|
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
3053
3076
|
var Text2 = ({
|
|
@@ -3062,8 +3085,8 @@ var Text2 = ({
|
|
|
3062
3085
|
children,
|
|
3063
3086
|
...props
|
|
3064
3087
|
}) => {
|
|
3065
|
-
const theme =
|
|
3066
|
-
const classNames2 =
|
|
3088
|
+
const theme = useTheme3();
|
|
3089
|
+
const classNames2 = useClassNames44({
|
|
3067
3090
|
component: "Text",
|
|
3068
3091
|
variant,
|
|
3069
3092
|
size
|
|
@@ -3095,11 +3118,11 @@ var Text2 = ({
|
|
|
3095
3118
|
};
|
|
3096
3119
|
|
|
3097
3120
|
// src/TextArea/TextArea.tsx
|
|
3098
|
-
import { forwardRef as
|
|
3121
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
3099
3122
|
import { TextArea, TextField } from "react-aria-components";
|
|
3100
|
-
import { useClassNames as
|
|
3123
|
+
import { useClassNames as useClassNames45 } from "@marigold/system";
|
|
3101
3124
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3102
|
-
var _TextArea =
|
|
3125
|
+
var _TextArea = forwardRef22(
|
|
3103
3126
|
({
|
|
3104
3127
|
variant,
|
|
3105
3128
|
size,
|
|
@@ -3110,7 +3133,7 @@ var _TextArea = forwardRef20(
|
|
|
3110
3133
|
rows,
|
|
3111
3134
|
...rest
|
|
3112
3135
|
}, ref) => {
|
|
3113
|
-
const classNames2 =
|
|
3136
|
+
const classNames2 = useClassNames45({ component: "TextArea", variant, size });
|
|
3114
3137
|
const props = {
|
|
3115
3138
|
isDisabled: disabled,
|
|
3116
3139
|
isReadOnly: readOnly,
|
|
@@ -3123,10 +3146,10 @@ var _TextArea = forwardRef20(
|
|
|
3123
3146
|
);
|
|
3124
3147
|
|
|
3125
3148
|
// src/TextField/TextField.tsx
|
|
3126
|
-
import { forwardRef as
|
|
3149
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
3127
3150
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3128
3151
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3129
|
-
var _TextField =
|
|
3152
|
+
var _TextField = forwardRef23(
|
|
3130
3153
|
({
|
|
3131
3154
|
variant,
|
|
3132
3155
|
size,
|
|
@@ -3180,7 +3203,7 @@ var Tiles = ({
|
|
|
3180
3203
|
|
|
3181
3204
|
// src/Tooltip/Tooltip.tsx
|
|
3182
3205
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3183
|
-
import { cn as cn48, useClassNames as
|
|
3206
|
+
import { cn as cn48, useClassNames as useClassNames46 } from "@marigold/system";
|
|
3184
3207
|
|
|
3185
3208
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3186
3209
|
import { TooltipTrigger } from "react-aria-components";
|
|
@@ -3208,7 +3231,7 @@ var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
|
3208
3231
|
...rest,
|
|
3209
3232
|
isOpen: open
|
|
3210
3233
|
};
|
|
3211
|
-
const classNames2 =
|
|
3234
|
+
const classNames2 = useClassNames46({ component: "Tooltip", variant, size });
|
|
3212
3235
|
return /* @__PURE__ */ jsxs31(Tooltip, { ...props, className: cn48("group/tooltip", classNames2.container), children: [
|
|
3213
3236
|
/* @__PURE__ */ jsx85(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx85("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx85("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3214
3237
|
children
|
|
@@ -3217,34 +3240,43 @@ var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
|
3217
3240
|
_Tooltip.Trigger = _TooltipTrigger;
|
|
3218
3241
|
|
|
3219
3242
|
// src/TagGroup/Tag.tsx
|
|
3220
|
-
import { Button as
|
|
3221
|
-
import { cn as cn49, useClassNames as
|
|
3243
|
+
import { Button as Button6, Tag } from "react-aria-components";
|
|
3244
|
+
import { cn as cn49, useClassNames as useClassNames48 } from "@marigold/system";
|
|
3222
3245
|
|
|
3223
3246
|
// src/TagGroup/TagGroup.tsx
|
|
3224
3247
|
import { TagGroup, TagList } from "react-aria-components";
|
|
3225
|
-
import { useClassNames as
|
|
3248
|
+
import { useClassNames as useClassNames47 } from "@marigold/system";
|
|
3226
3249
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3227
3250
|
var _TagGroup = ({
|
|
3228
3251
|
width,
|
|
3229
3252
|
items,
|
|
3230
3253
|
children,
|
|
3254
|
+
renderEmptyState,
|
|
3231
3255
|
variant,
|
|
3232
3256
|
size,
|
|
3233
3257
|
...rest
|
|
3234
3258
|
}) => {
|
|
3235
|
-
const classNames2 =
|
|
3236
|
-
return /* @__PURE__ */ jsx86(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx86(
|
|
3259
|
+
const classNames2 = useClassNames47({ component: "Tag", variant, size });
|
|
3260
|
+
return /* @__PURE__ */ jsx86(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx86(
|
|
3261
|
+
TagList,
|
|
3262
|
+
{
|
|
3263
|
+
items,
|
|
3264
|
+
className: classNames2.listItems,
|
|
3265
|
+
renderEmptyState,
|
|
3266
|
+
children
|
|
3267
|
+
}
|
|
3268
|
+
) });
|
|
3237
3269
|
};
|
|
3238
3270
|
|
|
3239
3271
|
// src/TagGroup/Tag.tsx
|
|
3240
|
-
import { Fragment as
|
|
3272
|
+
import { Fragment as Fragment7, jsx as jsx87, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3241
3273
|
var CloseButton2 = ({ className }) => {
|
|
3242
|
-
return /* @__PURE__ */ jsx87(
|
|
3274
|
+
return /* @__PURE__ */ jsx87(Button6, { slot: "remove", className, children: /* @__PURE__ */ jsx87("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx87("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
3243
3275
|
};
|
|
3244
3276
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
3245
3277
|
let textValue = typeof children === "string" ? children : void 0;
|
|
3246
|
-
const classNames2 =
|
|
3247
|
-
return /* @__PURE__ */ jsx87(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs32(
|
|
3278
|
+
const classNames2 = useClassNames48({ component: "Tag", variant, size });
|
|
3279
|
+
return /* @__PURE__ */ jsx87(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
3248
3280
|
children,
|
|
3249
3281
|
allowsRemoving && /* @__PURE__ */ jsx87(
|
|
3250
3282
|
CloseButton2,
|
|
@@ -3260,10 +3292,10 @@ _Tag.Group = _TagGroup;
|
|
|
3260
3292
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
3261
3293
|
|
|
3262
3294
|
// src/XLoader/XLoader.tsx
|
|
3263
|
-
import { forwardRef as
|
|
3295
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
3264
3296
|
import { SVG as SVG5 } from "@marigold/system";
|
|
3265
3297
|
import { jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3266
|
-
var XLoader =
|
|
3298
|
+
var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
3267
3299
|
SVG5,
|
|
3268
3300
|
{
|
|
3269
3301
|
id: "XLoader",
|
|
@@ -3478,7 +3510,7 @@ var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3478
3510
|
|
|
3479
3511
|
// src/Tabs/Tabs.tsx
|
|
3480
3512
|
import { Tabs } from "react-aria-components";
|
|
3481
|
-
import { useClassNames as
|
|
3513
|
+
import { useClassNames as useClassNames49 } from "@marigold/system";
|
|
3482
3514
|
|
|
3483
3515
|
// src/Tabs/Context.ts
|
|
3484
3516
|
import { createContext as createContext7, useContext as useContext12 } from "react";
|
|
@@ -3535,7 +3567,7 @@ var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
|
3535
3567
|
isDisabled: disabled,
|
|
3536
3568
|
...rest
|
|
3537
3569
|
};
|
|
3538
|
-
const classNames2 =
|
|
3570
|
+
const classNames2 = useClassNames49({
|
|
3539
3571
|
component: "Tabs",
|
|
3540
3572
|
size,
|
|
3541
3573
|
variant
|
|
@@ -3617,5 +3649,5 @@ export {
|
|
|
3617
3649
|
useFieldGroupContext,
|
|
3618
3650
|
useListData,
|
|
3619
3651
|
usePortalContainer,
|
|
3620
|
-
|
|
3652
|
+
useTheme
|
|
3621
3653
|
};
|