@marigold/components 7.3.1 → 7.3.3

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.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 { FocusRing, useFocusRing } from "@react-aria/focus";
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__ */ jsx3(FocusRing, { within: true, children: /* @__PURE__ */ jsxs(
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 React2 from "react";
313
- import { ComboBox, ComboBoxStateContext as ComboBoxStateContext2 } from "react-aria-components";
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 forwardRef5
582
+ forwardRef as forwardRef6
511
583
  } from "react";
512
584
  import { ListBox } from "react-aria-components";
513
- import { cn as cn9, useClassNames as useClassNames6 } from "@marigold/system";
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,37 +591,37 @@ var useListBoxContext = () => useContext2(ListBoxContext);
519
591
 
520
592
  // src/ListBox/ListBoxOption.tsx
521
593
  import { ListBoxItem } from "react-aria-components";
522
- import { jsx as jsx12 } from "react/jsx-runtime";
594
+ import { jsx as jsx13 } from "react/jsx-runtime";
523
595
  var _ListBoxItem = (props) => {
524
596
  const { classNames: classNames2 } = useListBoxContext();
525
- return /* @__PURE__ */ jsx12(ListBoxItem, { ...props, className: classNames2.option });
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 cn8 } from "@marigold/system";
531
- import { jsx as jsx13 } from "react/jsx-runtime";
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__ */ jsx13(
606
+ return /* @__PURE__ */ jsx14(
535
607
  Section,
536
608
  {
537
609
  ...props,
538
- className: cn8(classNames2.section, classNames2.sectionTitle)
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 jsx14 } from "react/jsx-runtime";
545
- var _ListBox = forwardRef5(
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
- return /* @__PURE__ */ jsx14(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx14("div", { className: classNames2.container, children: /* @__PURE__ */ jsx14(
620
+ return /* @__PURE__ */ jsx15(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx15("div", { className: classNames2.container, children: /* @__PURE__ */ jsx15(
549
621
  ListBox,
550
622
  {
551
623
  ...props,
552
- className: cn9(
624
+ className: cn10(
553
625
  "overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
554
626
  classNames2.list
555
627
  ),
@@ -563,9 +635,9 @@ _ListBox.Item = _ListBoxItem;
563
635
  _ListBox.Section = _Section;
564
636
 
565
637
  // src/Overlay/Popover.tsx
566
- import { forwardRef as forwardRef6 } from "react";
638
+ import { forwardRef as forwardRef7 } from "react";
567
639
  import { Popover } from "react-aria-components";
568
- import { cn as cn11, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
640
+ import { cn as cn12, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
569
641
 
570
642
  // src/Provider/OverlayContainerProvider.tsx
571
643
  import { createContext as createContext3, useContext as useContext3 } from "react";
@@ -581,7 +653,7 @@ var usePortalContainer = () => {
581
653
 
582
654
  // src/Overlay/Underlay.tsx
583
655
  import { ModalOverlay } from "react-aria-components";
584
- import { cn as cn10, useClassNames as useClassNames7 } from "@marigold/system";
656
+ import { cn as cn11, useClassNames as useClassNames7 } from "@marigold/system";
585
657
 
586
658
  // src/Provider/index.ts
587
659
  import { useTheme as useTheme2, ThemeProvider as ThemeProvider2 } from "@marigold/system";
@@ -594,19 +666,18 @@ import {
594
666
  defaultTheme,
595
667
  useTheme
596
668
  } from "@marigold/system";
597
- import { jsx as jsx15 } from "react/jsx-runtime";
669
+ import { jsx as jsx16 } from "react/jsx-runtime";
598
670
  function MarigoldProvider({
599
671
  children,
600
- theme,
601
- portalContainer
672
+ theme
602
673
  }) {
603
674
  const outerTheme = useTheme();
604
675
  const isTopLevel = outerTheme === defaultTheme;
605
- return /* @__PURE__ */ jsx15(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx15(OverlayContainerProvider, { value: portalContainer, children: /* @__PURE__ */ jsx15(OverlayProvider, { children }) }) : children });
676
+ return /* @__PURE__ */ jsx16(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx16(OverlayProvider, { children }) : children });
606
677
  }
607
678
 
608
679
  // src/Overlay/Underlay.tsx
609
- import { jsx as jsx16 } from "react/jsx-runtime";
680
+ import { jsx as jsx17 } from "react/jsx-runtime";
610
681
  var Underlay = ({
611
682
  size,
612
683
  variant,
@@ -623,10 +694,10 @@ var Underlay = ({
623
694
  ...rest
624
695
  };
625
696
  const portal = usePortalContainer();
626
- return /* @__PURE__ */ jsx16(
697
+ return /* @__PURE__ */ jsx17(
627
698
  ModalOverlay,
628
699
  {
629
- className: ({ isEntering, isExiting }) => cn10(
700
+ className: ({ isEntering, isExiting }) => cn11(
630
701
  "fixed inset-0 z-10 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur ",
631
702
  isEntering ? "animate-in fade-in duration-300 ease-out" : "",
632
703
  isExiting ? "animate-out fade-out duration-200 ease-in" : "",
@@ -641,8 +712,8 @@ var Underlay = ({
641
712
  };
642
713
 
643
714
  // src/Overlay/Popover.tsx
644
- import { Fragment, jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
645
- var _Popover = forwardRef6(
715
+ import { Fragment, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
716
+ var _Popover = forwardRef7(
646
717
  ({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
647
718
  const props = {
648
719
  isKeyboardDismissDisabled: keyboardDismissDisabled,
@@ -658,21 +729,21 @@ var _Popover = forwardRef6(
658
729
  });
659
730
  const isSmallScreen = useSmallScreen();
660
731
  const portal = usePortalContainer();
661
- return /* @__PURE__ */ jsx17(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs7(Fragment, { children: [
662
- /* @__PURE__ */ jsx17(Underlay, { open, variant: "modal" }),
663
- /* @__PURE__ */ jsx17(
732
+ return /* @__PURE__ */ jsx18(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs7(Fragment, { children: [
733
+ /* @__PURE__ */ jsx18(Underlay, { open, variant: "modal" }),
734
+ /* @__PURE__ */ jsx18(
664
735
  Popover,
665
736
  {
666
737
  ref,
667
738
  ...props,
668
- className: cn11(
739
+ className: cn12(
669
740
  "!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"
670
741
  ),
671
742
  UNSTABLE_portalContainer: portal,
672
743
  children
673
744
  }
674
745
  )
675
- ] }) : /* @__PURE__ */ jsx17(
746
+ ] }) : /* @__PURE__ */ jsx18(
676
747
  Popover,
677
748
  {
678
749
  ref,
@@ -686,87 +757,21 @@ var _Popover = forwardRef6(
686
757
  }
687
758
  );
688
759
 
689
- // src/Autocomplete/ClearButton.tsx
690
- import React from "react";
691
- import { ComboBoxStateContext } from "react-aria-components";
692
- import { cn as cn13 } from "@marigold/system";
693
-
694
- // src/Button/Button.tsx
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
760
+ // src/Autocomplete/Autocomplete.tsx
761
+ import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
762
+ var AutocompleteInput = ({
763
+ onSubmit,
764
+ onClear,
765
+ ref
729
766
  }) => {
730
- let state = React.useContext(ComboBoxStateContext);
767
+ const state = React.useContext(ComboBoxStateContext);
731
768
  return /* @__PURE__ */ jsx19(
732
- _Button,
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,
769
+ SearchInput,
766
770
  {
767
771
  ref,
768
- icon: /* @__PURE__ */ jsx20(SearchIcon, {}),
769
- action: (state == null ? void 0 : state.inputValue) !== "" ? /* @__PURE__ */ jsx20(AutocompleteClearButton, { onClear }) : void 0,
772
+ className: {
773
+ action: (state == null ? void 0 : state.inputValue) === "" ? "hidden" : void 0
774
+ },
770
775
  onKeyDown: (e) => {
771
776
  if (e.key === "Enter" || e.key === "Escape") {
772
777
  e.preventDefault();
@@ -776,22 +781,15 @@ var SearchInput = ({ onSubmit, onClear, ref }) => {
776
781
  onSubmit == null ? void 0 : onSubmit(null, state.inputValue);
777
782
  }
778
783
  }
784
+ },
785
+ onClear: () => {
786
+ state == null ? void 0 : state.setInputValue("");
787
+ state == null ? void 0 : state.setSelectedKey(null);
788
+ onClear == null ? void 0 : onClear();
779
789
  }
780
790
  }
781
791
  );
782
792
  };
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
793
  var _Autocomplete = forwardRef8(
796
794
  ({
797
795
  children,
@@ -818,19 +816,51 @@ var _Autocomplete = forwardRef8(
818
816
  isRequired: required,
819
817
  ...rest
820
818
  };
821
- return /* @__PURE__ */ jsx20(Fragment2, { children: /* @__PURE__ */ jsxs8(FieldBase, { as: ComboBox, ...props, children: [
822
- /* @__PURE__ */ jsx20(SearchInput, { onSubmit, onClear, ref }),
823
- /* @__PURE__ */ jsx20(_Popover, { children: /* @__PURE__ */ jsx20(_ListBox, { children }) })
824
- ] }) });
819
+ return /* @__PURE__ */ jsxs8(FieldBase, { as: ComboBox, ...props, children: [
820
+ /* @__PURE__ */ jsx19(AutocompleteInput, { onSubmit, onClear, ref }),
821
+ /* @__PURE__ */ jsx19(_Popover, { children: /* @__PURE__ */ jsx19(_ListBox, { children }) })
822
+ ] });
825
823
  }
826
824
  );
827
825
  _Autocomplete.Item = _ListBox.Item;
828
826
 
829
827
  // src/ComboBox/ComboBox.tsx
830
- import { forwardRef as forwardRef9 } from "react";
828
+ import { forwardRef as forwardRef10 } from "react";
831
829
  import { ComboBox as ComboBox2 } from "react-aria-components";
830
+
831
+ // src/Button/Button.tsx
832
+ import { forwardRef as forwardRef9 } from "react";
833
+ import { Button as Button2 } from "react-aria-components";
834
+ import { cn as cn13, useClassNames as useClassNames9 } from "@marigold/system";
835
+ import { jsx as jsx20 } from "react/jsx-runtime";
836
+ var _Button = forwardRef9(
837
+ ({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
838
+ const classNames2 = useClassNames9({
839
+ component: "Button",
840
+ variant,
841
+ size,
842
+ className
843
+ });
844
+ return /* @__PURE__ */ jsx20(
845
+ Button2,
846
+ {
847
+ ...props,
848
+ ref,
849
+ className: cn13(
850
+ "inline-flex items-center justify-center gap-[0.5ch]",
851
+ classNames2,
852
+ fullWidth ? "w-full" : void 0
853
+ ),
854
+ isDisabled: disabled,
855
+ children
856
+ }
857
+ );
858
+ }
859
+ );
860
+
861
+ // src/ComboBox/ComboBox.tsx
832
862
  import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
833
- var _ComboBox = forwardRef9(
863
+ var _ComboBox = forwardRef10(
834
864
  ({
835
865
  variant,
836
866
  size,
@@ -987,10 +1017,10 @@ var Center = ({
987
1017
  };
988
1018
 
989
1019
  // src/Checkbox/Checkbox.tsx
990
- import { forwardRef as forwardRef10 } from "react";
1020
+ import { forwardRef as forwardRef11 } from "react";
991
1021
  import { Checkbox } from "react-aria-components";
992
1022
  import { cn as cn17, useClassNames as useClassNames13 } from "@marigold/system";
993
- import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
1023
+ import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
994
1024
  var CheckMark = () => /* @__PURE__ */ jsx27("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx27(
995
1025
  "path",
996
1026
  {
@@ -1024,7 +1054,7 @@ var Icon2 = ({ className, checked, indeterminate, ...props }) => {
1024
1054
  }
1025
1055
  );
1026
1056
  };
1027
- var _Checkbox = forwardRef10(
1057
+ var _Checkbox = forwardRef11(
1028
1058
  ({
1029
1059
  className,
1030
1060
  indeterminate,
@@ -1060,7 +1090,7 @@ var _Checkbox = forwardRef10(
1060
1090
  classNames2.container
1061
1091
  ),
1062
1092
  ...props,
1063
- children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment3, { children: [
1093
+ children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment2, { children: [
1064
1094
  /* @__PURE__ */ jsx27(
1065
1095
  Icon2,
1066
1096
  {
@@ -1248,10 +1278,10 @@ import { Children as Children4 } from "react";
1248
1278
  import { DialogTrigger } from "react-aria-components";
1249
1279
 
1250
1280
  // src/Overlay/Modal.tsx
1251
- import { forwardRef as forwardRef11 } from "react";
1281
+ import { forwardRef as forwardRef12 } from "react";
1252
1282
  import { Modal } from "react-aria-components";
1253
1283
  import { jsx as jsx32 } from "react/jsx-runtime";
1254
- var _Modal = forwardRef11(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
1284
+ var _Modal = forwardRef12(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
1255
1285
  const props = {
1256
1286
  isOpen: open,
1257
1287
  isDismissable: dismissable,
@@ -1303,7 +1333,7 @@ var _DialogTrigger = ({
1303
1333
  };
1304
1334
 
1305
1335
  // src/Dialog/Dialog.tsx
1306
- import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
1336
+ import { Fragment as Fragment3, jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
1307
1337
  var CloseButton = ({ className }) => {
1308
1338
  const { close } = useContext4(OverlayTriggerStateContext);
1309
1339
  return /* @__PURE__ */ jsx34("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx34(
@@ -1347,7 +1377,7 @@ var _Dialog = ({
1347
1377
  {
1348
1378
  ...props,
1349
1379
  className: cn21("relative outline-none", classNames2.container),
1350
- children: /* @__PURE__ */ jsxs12(Fragment4, { children: [
1380
+ children: /* @__PURE__ */ jsxs12(Fragment3, { children: [
1351
1381
  closeButton && /* @__PURE__ */ jsx34(CloseButton, { className: classNames2.closeButton }),
1352
1382
  children
1353
1383
  ] })
@@ -1453,7 +1483,7 @@ var Inline = ({
1453
1483
  };
1454
1484
 
1455
1485
  // src/DateField/DateField.tsx
1456
- import { forwardRef as forwardRef12 } from "react";
1486
+ import { forwardRef as forwardRef13 } from "react";
1457
1487
  import { DateField } from "react-aria-components";
1458
1488
 
1459
1489
  // src/DateField/DateInput.tsx
@@ -1463,7 +1493,7 @@ import { useClassNames as useClassNames21 } from "@marigold/system";
1463
1493
  // src/DateField/DateSegment.tsx
1464
1494
  import { DateSegment } from "react-aria-components";
1465
1495
  import { cn as cn24 } from "@marigold/system";
1466
- import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
1496
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
1467
1497
  var _DateSegment = ({ segment, ...props }) => {
1468
1498
  return /* @__PURE__ */ jsx40(
1469
1499
  DateSegment,
@@ -1473,7 +1503,7 @@ var _DateSegment = ({ segment, ...props }) => {
1473
1503
  style: {
1474
1504
  minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
1475
1505
  },
1476
- children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
1506
+ children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs13(Fragment4, { children: [
1477
1507
  /* @__PURE__ */ jsx40(
1478
1508
  "span",
1479
1509
  {
@@ -1513,7 +1543,7 @@ var _DateInput = ({ variant, size, action, ...props }) => {
1513
1543
 
1514
1544
  // src/DateField/DateField.tsx
1515
1545
  import { jsx as jsx42 } from "react/jsx-runtime";
1516
- var _DateField = forwardRef12(
1546
+ var _DateField = forwardRef13(
1517
1547
  ({
1518
1548
  variant,
1519
1549
  size,
@@ -1654,7 +1684,7 @@ function CalendarListBox({
1654
1684
  }
1655
1685
 
1656
1686
  // src/Calendar/MonthControls.tsx
1657
- import { Button as Button2 } from "react-aria-components";
1687
+ import { Button as Button3 } from "react-aria-components";
1658
1688
  import { ChevronLeft, ChevronRight } from "@marigold/icons";
1659
1689
  import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
1660
1690
  import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
@@ -1670,7 +1700,7 @@ function MonthControls() {
1670
1700
  ),
1671
1701
  children: [
1672
1702
  /* @__PURE__ */ jsx46(
1673
- Button2,
1703
+ Button3,
1674
1704
  {
1675
1705
  className: cn27(
1676
1706
  "inline-flex items-center justify-center gap-[0.5ch]",
@@ -1681,7 +1711,7 @@ function MonthControls() {
1681
1711
  }
1682
1712
  ),
1683
1713
  /* @__PURE__ */ jsx46(
1684
- Button2,
1714
+ Button3,
1685
1715
  {
1686
1716
  className: cn27(
1687
1717
  "inline-flex items-center justify-center gap-[0.5ch]",
@@ -1810,7 +1840,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
1810
1840
  var YearListBox_default = YearListBox;
1811
1841
 
1812
1842
  // src/Calendar/Calendar.tsx
1813
- import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
1843
+ import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
1814
1844
  var _Calendar = ({
1815
1845
  disabled,
1816
1846
  readOnly,
@@ -1837,7 +1867,7 @@ var _Calendar = ({
1837
1867
  classNames2.calendar
1838
1868
  ),
1839
1869
  ...props,
1840
- children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs18(Fragment6, { children: [
1870
+ children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs18(Fragment5, { children: [
1841
1871
  /* @__PURE__ */ jsxs18("div", { className: "mb-4 flex items-center justify-between", children: [
1842
1872
  /* @__PURE__ */ jsxs18("div", { className: "flex w-full gap-4", children: [
1843
1873
  /* @__PURE__ */ jsx49(
@@ -1942,11 +1972,11 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx51(
1942
1972
  );
1943
1973
 
1944
1974
  // src/Link/Link.tsx
1945
- import { forwardRef as forwardRef13 } from "react";
1975
+ import { forwardRef as forwardRef14 } from "react";
1946
1976
  import { Link } from "react-aria-components";
1947
1977
  import { useClassNames as useClassNames28 } from "@marigold/system";
1948
1978
  import { jsx as jsx52 } from "react/jsx-runtime";
1949
- var _Link = forwardRef13(
1979
+ var _Link = forwardRef14(
1950
1980
  ({ variant, size, disabled, children, ...props }, ref) => {
1951
1981
  const classNames2 = useClassNames28({
1952
1982
  component: "Link",
@@ -2151,12 +2181,12 @@ var Message = ({
2151
2181
  };
2152
2182
 
2153
2183
  // src/NumberField/NumberField.tsx
2154
- import { forwardRef as forwardRef14 } from "react";
2184
+ import { forwardRef as forwardRef15 } from "react";
2155
2185
  import { Group as Group2, NumberField } from "react-aria-components";
2156
2186
  import { cn as cn32, useClassNames as useClassNames35 } from "@marigold/system";
2157
2187
 
2158
2188
  // src/NumberField/StepButton.tsx
2159
- import { Button as Button3 } from "react-aria-components";
2189
+ import { Button as Button4 } from "react-aria-components";
2160
2190
  import { cn as cn31 } from "@marigold/system";
2161
2191
  import { jsx as jsx60 } from "react/jsx-runtime";
2162
2192
  var Plus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx60(
@@ -2178,7 +2208,7 @@ var Minus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox:
2178
2208
  var _StepButton = ({ direction, className, ...props }) => {
2179
2209
  const Icon4 = direction === "up" ? Plus : Minus;
2180
2210
  return /* @__PURE__ */ jsx60(
2181
- Button3,
2211
+ Button4,
2182
2212
  {
2183
2213
  className: cn31(
2184
2214
  [
@@ -2195,7 +2225,7 @@ var _StepButton = ({ direction, className, ...props }) => {
2195
2225
 
2196
2226
  // src/NumberField/NumberField.tsx
2197
2227
  import { jsx as jsx61, jsxs as jsxs24 } from "react/jsx-runtime";
2198
- var _NumberField = forwardRef14(
2228
+ var _NumberField = forwardRef15(
2199
2229
  ({
2200
2230
  variant,
2201
2231
  size,
@@ -2251,7 +2281,7 @@ var _NumberField = forwardRef14(
2251
2281
 
2252
2282
  // src/Radio/Radio.tsx
2253
2283
  import {
2254
- forwardRef as forwardRef15
2284
+ forwardRef as forwardRef16
2255
2285
  } from "react";
2256
2286
  import { Radio } from "react-aria-components";
2257
2287
  import { cn as cn34, useClassNames as useClassNames37 } from "@marigold/system";
@@ -2320,7 +2350,7 @@ var _RadioGroup = ({
2320
2350
  };
2321
2351
 
2322
2352
  // src/Radio/Radio.tsx
2323
- import { Fragment as Fragment7, jsx as jsx63, jsxs as jsxs25 } from "react/jsx-runtime";
2353
+ import { Fragment as Fragment6, jsx as jsx63, jsxs as jsxs25 } from "react/jsx-runtime";
2324
2354
  var Dot = () => /* @__PURE__ */ jsx63("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx63("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
2325
2355
  var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx63(
2326
2356
  "div",
@@ -2334,7 +2364,7 @@ var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx63(
2334
2364
  children: checked ? /* @__PURE__ */ jsx63(Dot, {}) : null
2335
2365
  }
2336
2366
  );
2337
- var _Radio = forwardRef15(
2367
+ var _Radio = forwardRef16(
2338
2368
  ({ value, disabled, width, children, ...props }, ref) => {
2339
2369
  const { variant, size, width: groupWidth } = useRadioGroupContext();
2340
2370
  const classNames2 = useClassNames37({
@@ -2355,7 +2385,7 @@ var _Radio = forwardRef15(
2355
2385
  value,
2356
2386
  isDisabled: disabled,
2357
2387
  ...props,
2358
- children: ({ isSelected }) => /* @__PURE__ */ jsxs25(Fragment7, { children: [
2388
+ children: ({ isSelected }) => /* @__PURE__ */ jsxs25(Fragment6, { children: [
2359
2389
  /* @__PURE__ */ jsx63(
2360
2390
  Icon3,
2361
2391
  {
@@ -2375,22 +2405,10 @@ var _Radio = forwardRef15(
2375
2405
  _Radio.Group = _RadioGroup;
2376
2406
 
2377
2407
  // src/SearchField/SearchField.tsx
2378
- import { forwardRef as forwardRef16 } from "react";
2408
+ import { forwardRef as forwardRef17 } from "react";
2379
2409
  import { SearchField } from "react-aria-components";
2380
2410
  import { jsx as jsx64 } from "react/jsx-runtime";
2381
- var SearchIcon2 = (props) => /* @__PURE__ */ jsx64(
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(
2411
+ var _SearchField = forwardRef17(
2394
2412
  ({ disabled, required, readOnly, error, action, ...rest }, ref) => {
2395
2413
  const props = {
2396
2414
  ...rest,
@@ -2399,20 +2417,26 @@ var _SearchField = forwardRef16(
2399
2417
  isReadOnly: readOnly,
2400
2418
  isInvalid: error
2401
2419
  };
2402
- return /* @__PURE__ */ jsx64(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx64(_Input, { ref, icon: /* @__PURE__ */ jsx64(SearchIcon2, {}) }) });
2420
+ return /* @__PURE__ */ jsx64(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx64(
2421
+ SearchInput,
2422
+ {
2423
+ ref,
2424
+ className: { action: "group-data-[empty=true]/field:hidden" }
2425
+ }
2426
+ ) });
2403
2427
  }
2404
2428
  );
2405
2429
 
2406
2430
  // src/Select/Select.tsx
2407
- import { forwardRef as forwardRef17 } from "react";
2431
+ import { forwardRef as forwardRef18 } from "react";
2408
2432
  import {
2409
- Button as Button4,
2433
+ Button as Button5,
2410
2434
  Select,
2411
2435
  SelectValue
2412
2436
  } from "react-aria-components";
2413
2437
  import { cn as cn35, useClassNames as useClassNames38 } from "@marigold/system";
2414
2438
  import { jsx as jsx65, jsxs as jsxs26 } from "react/jsx-runtime";
2415
- var _Select = forwardRef17(
2439
+ var _Select = forwardRef18(
2416
2440
  ({
2417
2441
  disabled,
2418
2442
  required,
@@ -2435,7 +2459,7 @@ var _Select = forwardRef17(
2435
2459
  const classNames2 = useClassNames38({ component: "Select", variant, size });
2436
2460
  return /* @__PURE__ */ jsxs26(FieldBase, { isOpen: true, as: Select, ref, ...props, children: [
2437
2461
  /* @__PURE__ */ jsxs26(
2438
- Button4,
2462
+ Button5,
2439
2463
  {
2440
2464
  className: cn35(
2441
2465
  "flex w-full items-center justify-between gap-1 overflow-hidden",
@@ -2473,7 +2497,7 @@ var Scrollable = ({
2473
2497
  );
2474
2498
 
2475
2499
  // src/Slider/Slider.tsx
2476
- import { forwardRef as forwardRef18 } from "react";
2500
+ import { forwardRef as forwardRef19 } from "react";
2477
2501
  import {
2478
2502
  Slider,
2479
2503
  SliderOutput,
@@ -2486,7 +2510,7 @@ import {
2486
2510
  useClassNames as useClassNames39
2487
2511
  } from "@marigold/system";
2488
2512
  import { jsx as jsx67, jsxs as jsxs27 } from "react/jsx-runtime";
2489
- var _Slider = forwardRef18(
2513
+ var _Slider = forwardRef19(
2490
2514
  ({
2491
2515
  thumbLabels,
2492
2516
  variant,
@@ -2576,7 +2600,7 @@ var Stack = ({
2576
2600
  };
2577
2601
 
2578
2602
  // src/Switch/Switch.tsx
2579
- import { forwardRef as forwardRef19 } from "react";
2603
+ import { forwardRef as forwardRef20 } from "react";
2580
2604
  import { Switch } from "react-aria-components";
2581
2605
  import {
2582
2606
  cn as cn39,
@@ -2584,7 +2608,7 @@ import {
2584
2608
  useClassNames as useClassNames40
2585
2609
  } from "@marigold/system";
2586
2610
  import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
2587
- var _Switch = forwardRef19(
2611
+ var _Switch = forwardRef20(
2588
2612
  ({
2589
2613
  variant,
2590
2614
  size,
@@ -3095,11 +3119,11 @@ var Text2 = ({
3095
3119
  };
3096
3120
 
3097
3121
  // src/TextArea/TextArea.tsx
3098
- import { forwardRef as forwardRef20 } from "react";
3122
+ import { forwardRef as forwardRef21 } from "react";
3099
3123
  import { TextArea, TextField } from "react-aria-components";
3100
3124
  import { useClassNames as useClassNames44 } from "@marigold/system";
3101
3125
  import { jsx as jsx81 } from "react/jsx-runtime";
3102
- var _TextArea = forwardRef20(
3126
+ var _TextArea = forwardRef21(
3103
3127
  ({
3104
3128
  variant,
3105
3129
  size,
@@ -3123,10 +3147,10 @@ var _TextArea = forwardRef20(
3123
3147
  );
3124
3148
 
3125
3149
  // src/TextField/TextField.tsx
3126
- import { forwardRef as forwardRef21 } from "react";
3150
+ import { forwardRef as forwardRef22 } from "react";
3127
3151
  import { TextField as TextField2 } from "react-aria-components";
3128
3152
  import { jsx as jsx82 } from "react/jsx-runtime";
3129
- var _TextField = forwardRef21(
3153
+ var _TextField = forwardRef22(
3130
3154
  ({
3131
3155
  variant,
3132
3156
  size,
@@ -3217,7 +3241,7 @@ var _Tooltip = ({ children, variant, size, open, ...rest }) => {
3217
3241
  _Tooltip.Trigger = _TooltipTrigger;
3218
3242
 
3219
3243
  // src/TagGroup/Tag.tsx
3220
- import { Button as Button5, Tag } from "react-aria-components";
3244
+ import { Button as Button6, Tag } from "react-aria-components";
3221
3245
  import { cn as cn49, useClassNames as useClassNames47 } from "@marigold/system";
3222
3246
 
3223
3247
  // src/TagGroup/TagGroup.tsx
@@ -3237,14 +3261,14 @@ var _TagGroup = ({
3237
3261
  };
3238
3262
 
3239
3263
  // src/TagGroup/Tag.tsx
3240
- import { Fragment as Fragment8, jsx as jsx87, jsxs as jsxs32 } from "react/jsx-runtime";
3264
+ import { Fragment as Fragment7, jsx as jsx87, jsxs as jsxs32 } from "react/jsx-runtime";
3241
3265
  var CloseButton2 = ({ className }) => {
3242
- return /* @__PURE__ */ jsx87(Button5, { slot: "remove", className, children: /* @__PURE__ */ jsx87("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx87("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
3266
+ 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
3267
  };
3244
3268
  var _Tag = ({ variant, size, children, ...props }) => {
3245
3269
  let textValue = typeof children === "string" ? children : void 0;
3246
3270
  const classNames2 = useClassNames47({ component: "Tag", variant, size });
3247
- return /* @__PURE__ */ jsx87(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs32(Fragment8, { children: [
3271
+ return /* @__PURE__ */ jsx87(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs32(Fragment7, { children: [
3248
3272
  children,
3249
3273
  allowsRemoving && /* @__PURE__ */ jsx87(
3250
3274
  CloseButton2,
@@ -3260,10 +3284,10 @@ _Tag.Group = _TagGroup;
3260
3284
  import { VisuallyHidden } from "@react-aria/visually-hidden";
3261
3285
 
3262
3286
  // src/XLoader/XLoader.tsx
3263
- import { forwardRef as forwardRef22 } from "react";
3287
+ import { forwardRef as forwardRef23 } from "react";
3264
3288
  import { SVG as SVG5 } from "@marigold/system";
3265
3289
  import { jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
3266
- var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
3290
+ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs33(
3267
3291
  SVG5,
3268
3292
  {
3269
3293
  id: "XLoader",