@postenbring/hedwig-react 4.5.2 → 4.6.1

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.
Files changed (67) hide show
  1. package/dist/alert/alert.js +82 -33
  2. package/dist/alert/alert.js.map +1 -1
  3. package/dist/alert/alert.mjs +3 -2
  4. package/dist/alert/index.js +82 -33
  5. package/dist/alert/index.js.map +1 -1
  6. package/dist/alert/index.mjs +3 -2
  7. package/dist/box/box.d.ts.map +1 -1
  8. package/dist/box/box.js +69 -20
  9. package/dist/box/box.js.map +1 -1
  10. package/dist/box/box.mjs +2 -1
  11. package/dist/box/index.js +69 -20
  12. package/dist/box/index.js.map +1 -1
  13. package/dist/box/index.mjs +2 -1
  14. package/dist/{chunk-ILN2L5NX.mjs → chunk-B2DZ6JJ4.mjs} +2 -2
  15. package/dist/{chunk-INDTHGWZ.mjs → chunk-KAVKFO2R.mjs} +2 -2
  16. package/dist/{chunk-DEABU7DB.mjs → chunk-P4AKOVM7.mjs} +9 -9
  17. package/dist/chunk-P4AKOVM7.mjs.map +1 -0
  18. package/dist/{chunk-NAXSP4VU.mjs → chunk-PKEPSKTZ.mjs} +2 -2
  19. package/dist/{chunk-YQT2TN3U.mjs → chunk-QQKPLLCE.mjs} +4 -3
  20. package/dist/chunk-QQKPLLCE.mjs.map +1 -0
  21. package/dist/{chunk-QDG2QLFV.mjs → chunk-UXZKGAZ2.mjs} +4 -4
  22. package/dist/{chunk-PZUJLRG4.mjs → chunk-WFIS2ZYQ.mjs} +2 -2
  23. package/dist/footer/footer.mjs +2 -2
  24. package/dist/footer/index.mjs +2 -2
  25. package/dist/form/error-summary/error-summary.js +104 -55
  26. package/dist/form/error-summary/error-summary.js.map +1 -1
  27. package/dist/form/error-summary/error-summary.mjs +3 -2
  28. package/dist/form/error-summary/index.js +104 -55
  29. package/dist/form/error-summary/index.js.map +1 -1
  30. package/dist/form/error-summary/index.mjs +3 -2
  31. package/dist/form/index.js +166 -117
  32. package/dist/form/index.js.map +1 -1
  33. package/dist/form/index.mjs +3 -2
  34. package/dist/help-text/help-text.js +79 -30
  35. package/dist/help-text/help-text.js.map +1 -1
  36. package/dist/help-text/help-text.mjs +3 -2
  37. package/dist/help-text/index.js +79 -30
  38. package/dist/help-text/index.js.map +1 -1
  39. package/dist/help-text/index.mjs +3 -2
  40. package/dist/index.js +104 -104
  41. package/dist/index.js.map +1 -1
  42. package/dist/index.mjs +39 -39
  43. package/dist/layout/index.mjs +3 -3
  44. package/dist/message/index.js +83 -34
  45. package/dist/message/index.js.map +1 -1
  46. package/dist/message/index.mjs +3 -2
  47. package/dist/message/message.js +83 -34
  48. package/dist/message/message.js.map +1 -1
  49. package/dist/message/message.mjs +3 -2
  50. package/dist/modal/index.js +95 -45
  51. package/dist/modal/index.js.map +1 -1
  52. package/dist/modal/index.mjs +3 -2
  53. package/dist/modal/modal.d.ts +5 -0
  54. package/dist/modal/modal.d.ts.map +1 -1
  55. package/dist/modal/modal.js +95 -45
  56. package/dist/modal/modal.js.map +1 -1
  57. package/dist/modal/modal.mjs +3 -2
  58. package/package.json +4 -4
  59. package/src/box/box.tsx +8 -8
  60. package/src/modal/modal.tsx +12 -1
  61. package/dist/chunk-DEABU7DB.mjs.map +0 -1
  62. package/dist/chunk-YQT2TN3U.mjs.map +0 -1
  63. /package/dist/{chunk-ILN2L5NX.mjs.map → chunk-B2DZ6JJ4.mjs.map} +0 -0
  64. /package/dist/{chunk-INDTHGWZ.mjs.map → chunk-KAVKFO2R.mjs.map} +0 -0
  65. /package/dist/{chunk-NAXSP4VU.mjs.map → chunk-PKEPSKTZ.mjs.map} +0 -0
  66. /package/dist/{chunk-QDG2QLFV.mjs.map → chunk-UXZKGAZ2.mjs.map} +0 -0
  67. /package/dist/{chunk-PZUJLRG4.mjs.map → chunk-WFIS2ZYQ.mjs.map} +0 -0
@@ -527,35 +527,84 @@ var DatePicker = (0, import_react9.forwardRef)(function DatePicker2(_a, ref) {
527
527
  DatePicker.displayName = "DatePicker";
528
528
 
529
529
  // src/form/error-summary/error-summary.tsx
530
- var import_react13 = require("react");
531
- var import_typed_classname10 = require("@postenbring/hedwig-css/typed-classname");
532
- var import_react_slot3 = require("@radix-ui/react-slot");
530
+ var import_react14 = require("react");
531
+ var import_typed_classname11 = require("@postenbring/hedwig-css/typed-classname");
532
+ var import_react_slot4 = require("@radix-ui/react-slot");
533
533
 
534
534
  // src/box/box.tsx
535
+ var import_react11 = require("react");
536
+ var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname");
537
+ var import_react_slot2 = require("@radix-ui/react-slot");
538
+
539
+ // src/button/button.tsx
535
540
  var import_react10 = require("react");
536
541
  var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname");
537
542
  var import_react_slot = require("@radix-ui/react-slot");
538
543
  var import_jsx_runtime9 = require("react/jsx-runtime");
544
+ var Button = (0, import_react10.forwardRef)(
545
+ (_a, ref) => {
546
+ var _b = _a, {
547
+ asChild,
548
+ children,
549
+ variant = "primary",
550
+ size = "large",
551
+ fullWidth = false,
552
+ icon = false,
553
+ className
554
+ } = _b, rest = __objRest(_b, [
555
+ "asChild",
556
+ "children",
557
+ "variant",
558
+ "size",
559
+ "fullWidth",
560
+ "icon",
561
+ "className"
562
+ ]);
563
+ const Component = asChild ? import_react_slot.Slot : "button";
564
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
565
+ Component,
566
+ __spreadProps(__spreadValues({
567
+ className: (0, import_typed_classname7.clsx)(
568
+ "hds-button",
569
+ `hds-button--${size}`,
570
+ `hds-button--${variant}`,
571
+ {
572
+ "hds-button--full": fullWidth === true,
573
+ "hds-button--mobile-full": fullWidth === "mobile",
574
+ "hds-button--only-icon": icon === true,
575
+ "hds-button--leading-icon": icon === "leading",
576
+ "hds-button--trailing-icon": icon === "trailing"
577
+ },
578
+ className
579
+ ),
580
+ ref
581
+ }, rest), {
582
+ children
583
+ })
584
+ );
585
+ }
586
+ );
587
+ Button.displayName = "Button";
588
+
589
+ // src/box/box.tsx
590
+ var import_jsx_runtime10 = require("react/jsx-runtime");
539
591
  function CloseIcon() {
540
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, viewBox: "0 0 32 32", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
541
- "path",
542
- {
543
- d: "M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z",
544
- fill: "currentColor"
545
- }
546
- ) });
592
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z" }) });
547
593
  }
548
- var BoxCloseButton = (0, import_react10.forwardRef)(
594
+ var BoxCloseButton = (0, import_react11.forwardRef)(
549
595
  (_a, ref) => {
550
596
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
551
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
552
- "button",
597
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
598
+ Button,
553
599
  __spreadProps(__spreadValues({
554
- className: (0, import_typed_classname7.clsx)("hds-box__close-button", className),
600
+ className: (0, import_typed_classname8.clsx)("hds-box__close-button", className),
601
+ variant: "tertiary",
602
+ size: "small",
603
+ icon: true,
555
604
  ref,
556
605
  type: "button"
557
606
  }, rest), {
558
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CloseIcon, {})
607
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseIcon, {})
559
608
  })
560
609
  );
561
610
  }
@@ -573,7 +622,7 @@ var convertVariantToColor = (variant) => {
573
622
  return "neutral";
574
623
  }
575
624
  };
576
- var Box = (0, import_react10.forwardRef)(
625
+ var Box = (0, import_react11.forwardRef)(
577
626
  (_a, ref) => {
578
627
  var _b = _a, {
579
628
  "data-color": color = "",
@@ -596,8 +645,8 @@ var Box = (0, import_react10.forwardRef)(
596
645
  "children",
597
646
  "className"
598
647
  ]);
599
- const [closedState, setClosedState] = (0, import_react10.useState)(false);
600
- const onClose = (0, import_react10.useCallback)(() => {
648
+ const [closedState, setClosedState] = (0, import_react11.useState)(false);
649
+ const onClose = (0, import_react11.useCallback)(() => {
601
650
  if (onCloseProp) {
602
651
  const result = onCloseProp();
603
652
  if (result === true) {
@@ -608,13 +657,13 @@ var Box = (0, import_react10.forwardRef)(
608
657
  }
609
658
  }, []);
610
659
  const closed = closedProp != null ? closedProp : closedState;
611
- const Component = asChild ? import_react_slot.Slot : "div";
660
+ const Component = asChild ? import_react_slot2.Slot : "div";
612
661
  const resolvedColor = color && color !== "" ? color : convertVariantToColor(variant);
613
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
662
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
614
663
  Component,
615
664
  __spreadProps(__spreadValues({
616
665
  "data-color": resolvedColor,
617
- className: (0, import_typed_classname7.clsx)(
666
+ className: (0, import_typed_classname8.clsx)(
618
667
  "hds-box",
619
668
  { "hds-box--lighter": variant === "lighter" },
620
669
  { "hds-box--white": variant === "white" },
@@ -624,8 +673,8 @@ var Box = (0, import_react10.forwardRef)(
624
673
  ref
625
674
  }, rest), {
626
675
  children: [
627
- closeable ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
628
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_slot.Slottable, { children })
676
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
677
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_slot2.Slottable, { children })
629
678
  ]
630
679
  })
631
680
  );
@@ -635,17 +684,17 @@ Box.displayName = "Box";
635
684
  Box.CloseButton = BoxCloseButton;
636
685
 
637
686
  // src/list/list.tsx
638
- var import_react11 = require("react");
639
- var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname");
640
- var import_jsx_runtime10 = require("react/jsx-runtime");
641
- var UnorderedList = (0, import_react11.forwardRef)(
687
+ var import_react12 = require("react");
688
+ var import_typed_classname9 = require("@postenbring/hedwig-css/typed-classname");
689
+ var import_jsx_runtime11 = require("react/jsx-runtime");
690
+ var UnorderedList = (0, import_react12.forwardRef)(
642
691
  (_a, ref) => {
643
692
  var _b = _a, { size = "default", className } = _b, rest = __objRest(_b, ["size", "className"]);
644
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
693
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
645
694
  "ul",
646
695
  __spreadValues({
647
696
  ref,
648
- className: (0, import_typed_classname8.clsx)(
697
+ className: (0, import_typed_classname9.clsx)(
649
698
  "hds-list",
650
699
  size !== "default" && `hds-list--${size}`,
651
700
  className
@@ -655,14 +704,14 @@ var UnorderedList = (0, import_react11.forwardRef)(
655
704
  }
656
705
  );
657
706
  UnorderedList.displayName = "UnorderedList";
658
- var OrderedList = (0, import_react11.forwardRef)(
707
+ var OrderedList = (0, import_react12.forwardRef)(
659
708
  (_a, ref) => {
660
709
  var _b = _a, { size = "medium", className } = _b, rest = __objRest(_b, ["size", "className"]);
661
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
710
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
662
711
  "ol",
663
712
  __spreadValues({
664
713
  ref,
665
- className: (0, import_typed_classname8.clsx)(
714
+ className: (0, import_typed_classname9.clsx)(
666
715
  "hds-list",
667
716
  size !== "default" && `hds-list--${size}`,
668
717
  className
@@ -675,18 +724,18 @@ OrderedList.displayName = "OrderedList";
675
724
 
676
725
  // src/link/link.tsx
677
726
  var React2 = require("react");
678
- var import_typed_classname9 = require("@postenbring/hedwig-css/typed-classname");
679
- var import_react12 = require("react");
680
- var import_react_slot2 = require("@radix-ui/react-slot");
681
- var import_jsx_runtime11 = require("react/jsx-runtime");
682
- var Link = (0, import_react12.forwardRef)(
727
+ var import_typed_classname10 = require("@postenbring/hedwig-css/typed-classname");
728
+ var import_react13 = require("react");
729
+ var import_react_slot3 = require("@radix-ui/react-slot");
730
+ var import_jsx_runtime12 = require("react/jsx-runtime");
731
+ var Link = (0, import_react13.forwardRef)(
683
732
  (_a, ref) => {
684
733
  var _b = _a, { asChild, children, variant = "underline", size = "default", icon, className } = _b, rest = __objRest(_b, ["asChild", "children", "variant", "size", "icon", "className"]);
685
- const Component = asChild ? import_react_slot2.Slot : "a";
686
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
734
+ const Component = asChild ? import_react_slot3.Slot : "a";
735
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
687
736
  Component,
688
737
  __spreadProps(__spreadValues({
689
- className: (0, import_typed_classname9.clsx)(
738
+ className: (0, import_typed_classname10.clsx)(
690
739
  "hds-link",
691
740
  variant !== "underline" && `hds-link--${variant}`,
692
741
  size !== "default" && `hds-link--${size}`,
@@ -745,30 +794,30 @@ function labelForInput(input) {
745
794
  }
746
795
 
747
796
  // src/form/error-summary/error-summary.tsx
748
- var import_jsx_runtime12 = require("react/jsx-runtime");
749
- var ErrorSummaryHeading = (0, import_react13.forwardRef)((_a, ref) => {
797
+ var import_jsx_runtime13 = require("react/jsx-runtime");
798
+ var ErrorSummaryHeading = (0, import_react14.forwardRef)((_a, ref) => {
750
799
  var _b = _a, { asChild, children, as: Tag, autoFocus = true } = _b, rest = __objRest(_b, ["asChild", "children", "as", "autoFocus"]);
751
- const focusRef = (0, import_react13.useRef)(null);
800
+ const focusRef = (0, import_react14.useRef)(null);
752
801
  const mergedRef = useMergeRefs([focusRef, ref]);
753
- const Component = asChild ? import_react_slot3.Slot : Tag;
754
- (0, import_react13.useEffect)(() => {
802
+ const Component = asChild ? import_react_slot4.Slot : Tag;
803
+ (0, import_react14.useEffect)(() => {
755
804
  setTimeout(() => {
756
805
  if (focusRef.current && autoFocus) {
757
806
  focusRef.current.focus();
758
807
  }
759
808
  });
760
809
  }, []);
761
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Component, __spreadProps(__spreadValues({ className: (0, import_typed_classname10.clsx)(`hds-error-summary__title`), ref: mergedRef, tabIndex: -1 }, rest), { children }));
810
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Component, __spreadProps(__spreadValues({ className: (0, import_typed_classname11.clsx)(`hds-error-summary__title`), ref: mergedRef, tabIndex: -1 }, rest), { children }));
762
811
  });
763
812
  ErrorSummaryHeading.displayName = "ErrorSummary.Heading";
764
- var ErrorSummaryList = (0, import_react13.forwardRef)(
813
+ var ErrorSummaryList = (0, import_react14.forwardRef)(
765
814
  (_a, ref) => {
766
815
  var _b = _a, { children, size = "small" } = _b, rest = __objRest(_b, ["children", "size"]);
767
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UnorderedList, __spreadProps(__spreadValues({ size, ref }, rest), { children }));
816
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(UnorderedList, __spreadProps(__spreadValues({ size, ref }, rest), { children }));
768
817
  }
769
818
  );
770
819
  ErrorSummaryList.displayName = "ErrorSummary.List";
771
- var ErrorSummaryItem = (0, import_react13.forwardRef)(
820
+ var ErrorSummaryItem = (0, import_react14.forwardRef)(
772
821
  (_a, ref) => {
773
822
  var _b = _a, { children, href, linkProps } = _b, rest = __objRest(_b, ["children", "href", "linkProps"]);
774
823
  function onClick(e) {
@@ -778,20 +827,20 @@ var ErrorSummaryItem = (0, import_react13.forwardRef)(
778
827
  e.preventDefault();
779
828
  }
780
829
  }
781
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", __spreadProps(__spreadValues({ className: (0, import_typed_classname10.clsx)(`hds-error-summary__list-item`), ref }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Link, __spreadProps(__spreadValues({ size: "small", href, variant: "solid" }, linkProps), { onClick, children })) }));
830
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", __spreadProps(__spreadValues({ className: (0, import_typed_classname11.clsx)(`hds-error-summary__list-item`), ref }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Link, __spreadProps(__spreadValues({ size: "small", href, variant: "solid" }, linkProps), { onClick, children })) }));
782
831
  }
783
832
  );
784
833
  ErrorSummaryItem.displayName = "ErrorSummary.Item";
785
- var ErrorSummary = (0, import_react13.forwardRef)(
834
+ var ErrorSummary = (0, import_react14.forwardRef)(
786
835
  (_a, ref) => {
787
836
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
788
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
837
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
789
838
  Box,
790
839
  __spreadProps(__spreadValues({
791
840
  "data-color": "error",
792
841
  ref
793
842
  }, rest), {
794
- className: (0, import_typed_classname10.clsx)(`hds-error-summary`, className),
843
+ className: (0, import_typed_classname11.clsx)(`hds-error-summary`, className),
795
844
  children
796
845
  })
797
846
  );
@@ -803,10 +852,10 @@ ErrorSummary.List = ErrorSummaryList;
803
852
  ErrorSummary.Item = ErrorSummaryItem;
804
853
 
805
854
  // src/form/input/input.tsx
806
- var import_react14 = require("react");
807
- var import_typed_classname11 = require("@postenbring/hedwig-css/typed-classname");
808
- var import_jsx_runtime13 = require("react/jsx-runtime");
809
- var Input = (0, import_react14.forwardRef)(
855
+ var import_react15 = require("react");
856
+ var import_typed_classname12 = require("@postenbring/hedwig-css/typed-classname");
857
+ var import_jsx_runtime14 = require("react/jsx-runtime");
858
+ var Input = (0, import_react15.forwardRef)(
810
859
  (_a, ref) => {
811
860
  var _b = _a, {
812
861
  className,
@@ -833,10 +882,10 @@ var Input = (0, import_react14.forwardRef)(
833
882
  "readOnly",
834
883
  "data-color"
835
884
  ]);
836
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
885
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
837
886
  InputGroup,
838
887
  {
839
- className: (0, import_typed_classname11.clsx)("hds-input", className),
888
+ className: (0, import_typed_classname12.clsx)("hds-input", className),
840
889
  disabled,
841
890
  validationMessage,
842
891
  errorMessage,
@@ -847,7 +896,7 @@ var Input = (0, import_react14.forwardRef)(
847
896
  style,
848
897
  size,
849
898
  "data-color": dataColor,
850
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", __spreadValues({ disabled, readOnly, ref }, rest))
899
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", __spreadValues({ disabled, readOnly, ref }, rest))
851
900
  }
852
901
  );
853
902
  }
@@ -855,28 +904,28 @@ var Input = (0, import_react14.forwardRef)(
855
904
  Input.displayName = "Input";
856
905
 
857
906
  // src/form/radio-button/radio-button.tsx
858
- var import_react16 = require("react");
859
- var import_typed_classname12 = require("@postenbring/hedwig-css/typed-classname");
907
+ var import_react17 = require("react");
908
+ var import_typed_classname13 = require("@postenbring/hedwig-css/typed-classname");
860
909
 
861
910
  // src/form/radio-button/radio-group.tsx
862
- var import_react15 = require("react");
863
- var import_jsx_runtime14 = require("react/jsx-runtime");
864
- var RadioGroupContext = (0, import_react15.createContext)({
911
+ var import_react16 = require("react");
912
+ var import_jsx_runtime15 = require("react/jsx-runtime");
913
+ var RadioGroupContext = (0, import_react16.createContext)({
865
914
  name: void 0,
866
915
  onChange: () => void 0,
867
916
  size: void 0
868
917
  });
869
- var useRadioGroupContext = () => (0, import_react15.useContext)(RadioGroupContext);
870
- var RadioGroup = (0, import_react15.forwardRef)(function RadioGroup2(_a, ref) {
918
+ var useRadioGroupContext = () => (0, import_react16.useContext)(RadioGroupContext);
919
+ var RadioGroup = (0, import_react16.forwardRef)(function RadioGroup2(_a, ref) {
871
920
  var _b = _a, { name, value, onChange, children, size } = _b, rest = __objRest(_b, ["name", "value", "onChange", "children", "size"]);
872
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadioGroupContext.Provider, { value: { name, value, onChange, size }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Fieldset, __spreadProps(__spreadValues({ size }, rest), { ref, children })) });
921
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RadioGroupContext.Provider, { value: { name, value, onChange, size }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Fieldset, __spreadProps(__spreadValues({ size }, rest), { ref, children })) });
873
922
  });
874
923
  RadioGroup.Description = FieldsetDescription;
875
924
  RadioGroup.Legend = FieldsetLegend;
876
925
  RadioGroup.displayName = "RadioGroup";
877
926
 
878
927
  // src/form/radio-button/radio-button.tsx
879
- var import_jsx_runtime15 = require("react/jsx-runtime");
928
+ var import_jsx_runtime16 = require("react/jsx-runtime");
880
929
  var isChecked = ({
881
930
  checked,
882
931
  selectedValue,
@@ -886,15 +935,15 @@ var isChecked = ({
886
935
  if (typeof selectedValue !== "undefined") return value === selectedValue;
887
936
  return void 0;
888
937
  };
889
- var RadioButton = (0, import_react16.forwardRef)(
938
+ var RadioButton = (0, import_react17.forwardRef)(
890
939
  (_a, ref) => {
891
940
  var _b = _a, { checked, value, variant = "plain", title, children, className, size = "" } = _b, rest = __objRest(_b, ["checked", "value", "variant", "title", "children", "className", "size"]);
892
941
  const _a2 = useRadioGroupContext(), { value: selectedValue, size: groupSize } = _a2, context = __objRest(_a2, ["value", "size"]);
893
942
  const effectiveSize = size || groupSize;
894
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
943
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
895
944
  "div",
896
945
  {
897
- className: (0, import_typed_classname12.clsx)(
946
+ className: (0, import_typed_classname13.clsx)(
898
947
  "hds-radio-button",
899
948
  {
900
949
  [`hds-radio-button--${variant}`]: variant === "bounding-box",
@@ -903,8 +952,8 @@ var RadioButton = (0, import_react16.forwardRef)(
903
952
  className
904
953
  ),
905
954
  children: [
906
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
907
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
955
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { children: [
956
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
908
957
  "input",
909
958
  __spreadProps(__spreadValues(__spreadValues({}, context), rest), {
910
959
  checked: isChecked({ checked, selectedValue, value }),
@@ -913,8 +962,8 @@ var RadioButton = (0, import_react16.forwardRef)(
913
962
  type: "radio"
914
963
  })
915
964
  ),
916
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": true, className: "hds-radio-button__checkmark" }),
917
- title ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "hds-radio-button__title", children: title }) : children
965
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { "aria-hidden": true, className: "hds-radio-button__checkmark" }),
966
+ title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "hds-radio-button__title", children: title }) : children
918
967
  ] }),
919
968
  title ? children : null
920
969
  ]
@@ -925,22 +974,22 @@ var RadioButton = (0, import_react16.forwardRef)(
925
974
  RadioButton.displayName = "RadioButton";
926
975
 
927
976
  // src/form/search-wrapper/search-wrapper.tsx
928
- var import_react17 = require("react");
929
- var import_typed_classname13 = require("@postenbring/hedwig-css/typed-classname");
930
- var import_jsx_runtime16 = require("react/jsx-runtime");
931
- var SearchWrapper = (0, import_react17.forwardRef)(
977
+ var import_react18 = require("react");
978
+ var import_typed_classname14 = require("@postenbring/hedwig-css/typed-classname");
979
+ var import_jsx_runtime17 = require("react/jsx-runtime");
980
+ var SearchWrapper = (0, import_react18.forwardRef)(
932
981
  (_a, ref) => {
933
982
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
934
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", __spreadValues({ className: (0, import_typed_classname13.clsx)("hds-search-wrapper", className), ref }, rest));
983
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", __spreadValues({ className: (0, import_typed_classname14.clsx)("hds-search-wrapper", className), ref }, rest));
935
984
  }
936
985
  );
937
986
  SearchWrapper.displayName = "SearchWrapper";
938
987
 
939
988
  // src/form/select/select.tsx
940
- var import_react18 = require("react");
941
- var import_typed_classname14 = require("@postenbring/hedwig-css/typed-classname");
942
- var import_jsx_runtime17 = require("react/jsx-runtime");
943
- var Select = (0, import_react18.forwardRef)(
989
+ var import_react19 = require("react");
990
+ var import_typed_classname15 = require("@postenbring/hedwig-css/typed-classname");
991
+ var import_jsx_runtime18 = require("react/jsx-runtime");
992
+ var Select = (0, import_react19.forwardRef)(
944
993
  (_a, ref) => {
945
994
  var _b = _a, {
946
995
  className,
@@ -969,10 +1018,10 @@ var Select = (0, import_react18.forwardRef)(
969
1018
  "data-color",
970
1019
  "children"
971
1020
  ]);
972
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1021
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
973
1022
  InputGroup,
974
1023
  {
975
- className: (0, import_typed_classname14.clsx)("hds-select", className),
1024
+ className: (0, import_typed_classname15.clsx)("hds-select", className),
976
1025
  disabled,
977
1026
  validationMessage,
978
1027
  validationMessageProps,
@@ -983,7 +1032,7 @@ var Select = (0, import_react18.forwardRef)(
983
1032
  style,
984
1033
  size,
985
1034
  "data-color": dataColor,
986
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("select", __spreadProps(__spreadValues({ disabled, ref }, rest), { children }))
1035
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("select", __spreadProps(__spreadValues({ disabled, ref }, rest), { children }))
987
1036
  }
988
1037
  );
989
1038
  }
@@ -991,41 +1040,41 @@ var Select = (0, import_react18.forwardRef)(
991
1040
  Select.displayName = "Select";
992
1041
 
993
1042
  // src/form/suggestions/suggestions.tsx
994
- var import_react21 = require("react");
995
- var import_typed_classname17 = require("@postenbring/hedwig-css/typed-classname");
1043
+ var import_react22 = require("react");
1044
+ var import_typed_classname18 = require("@postenbring/hedwig-css/typed-classname");
996
1045
 
997
1046
  // src/form/suggestions/suggestions-wrapper.tsx
998
- var import_react19 = require("react");
999
- var import_typed_classname15 = require("@postenbring/hedwig-css/typed-classname");
1000
- var import_jsx_runtime18 = require("react/jsx-runtime");
1001
- var SuggestionsWrapper = (0, import_react19.forwardRef)(
1047
+ var import_react20 = require("react");
1048
+ var import_typed_classname16 = require("@postenbring/hedwig-css/typed-classname");
1049
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1050
+ var SuggestionsWrapper = (0, import_react20.forwardRef)(
1002
1051
  (_a, ref) => {
1003
1052
  var _b = _a, { as: Tag = "div", className } = _b, rest = __objRest(_b, ["as", "className"]);
1004
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tag, __spreadValues({ className: (0, import_typed_classname15.clsx)("hds-suggestions-wrapper", className), ref }, rest));
1053
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Tag, __spreadValues({ className: (0, import_typed_classname16.clsx)("hds-suggestions-wrapper", className), ref }, rest));
1005
1054
  }
1006
1055
  );
1007
1056
  SuggestionsWrapper.displayName = "Suggestions.Wrapper";
1008
1057
 
1009
1058
  // src/form/suggestions/suggestions-item.tsx
1010
- var import_react20 = require("react");
1011
- var import_typed_classname16 = require("@postenbring/hedwig-css/typed-classname");
1012
- var import_react_slot4 = require("@radix-ui/react-slot");
1013
- var import_jsx_runtime19 = require("react/jsx-runtime");
1014
- var SuggestionsItem = (0, import_react20.forwardRef)(
1059
+ var import_react21 = require("react");
1060
+ var import_typed_classname17 = require("@postenbring/hedwig-css/typed-classname");
1061
+ var import_react_slot5 = require("@radix-ui/react-slot");
1062
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1063
+ var SuggestionsItem = (0, import_react21.forwardRef)(
1015
1064
  (_a, ref) => {
1016
1065
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
1017
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", __spreadValues({ className: (0, import_typed_classname16.clsx)("hds-suggestions-item", className), ref }, rest));
1066
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", __spreadValues({ className: (0, import_typed_classname17.clsx)("hds-suggestions-item", className), ref }, rest));
1018
1067
  }
1019
1068
  );
1020
1069
  SuggestionsItem.displayName = "Suggestions.Item";
1021
- var SuggestionsItemAction = (0, import_react20.forwardRef)(
1070
+ var SuggestionsItemAction = (0, import_react21.forwardRef)(
1022
1071
  (_a, ref) => {
1023
1072
  var _b = _a, { asChild, className } = _b, rest = __objRest(_b, ["asChild", "className"]);
1024
- const Component = asChild ? import_react_slot4.Slot : "a";
1025
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1073
+ const Component = asChild ? import_react_slot5.Slot : "a";
1074
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1026
1075
  Component,
1027
1076
  __spreadValues({
1028
- className: (0, import_typed_classname16.clsx)("hds-suggestions-item__action", className),
1077
+ className: (0, import_typed_classname17.clsx)("hds-suggestions-item__action", className),
1029
1078
  ref
1030
1079
  }, rest)
1031
1080
  );
@@ -1034,22 +1083,22 @@ var SuggestionsItemAction = (0, import_react20.forwardRef)(
1034
1083
  SuggestionsItemAction.displayName = "Suggestions.ItemAction";
1035
1084
 
1036
1085
  // src/form/suggestions/suggestions.tsx
1037
- var import_jsx_runtime20 = require("react/jsx-runtime");
1038
- var Suggestions = (0, import_react21.forwardRef)(
1086
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1087
+ var Suggestions = (0, import_react22.forwardRef)(
1039
1088
  (_a, ref) => {
1040
1089
  var _b = _a, { as = "ul", size = "default", className } = _b, rest = __objRest(_b, ["as", "size", "className"]);
1041
- const classes = (0, import_typed_classname17.clsx)(
1090
+ const classes = (0, import_typed_classname18.clsx)(
1042
1091
  "hds-suggestions",
1043
1092
  size !== "default" && `hds-suggestions--${size}`,
1044
1093
  className
1045
1094
  );
1046
- return as === "ol" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1095
+ return as === "ol" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1047
1096
  "ol",
1048
1097
  __spreadValues({
1049
1098
  className: classes,
1050
1099
  ref
1051
1100
  }, rest)
1052
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", __spreadValues({ className: classes, ref }, rest));
1101
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", __spreadValues({ className: classes, ref }, rest));
1053
1102
  }
1054
1103
  );
1055
1104
  Suggestions.displayName = "Suggestions";
@@ -1060,10 +1109,10 @@ Suggestions.ItemAction = SuggestionsItemAction;
1060
1109
  Suggestions.Wrapper = SuggestionsWrapper;
1061
1110
 
1062
1111
  // src/form/textarea/textarea.tsx
1063
- var import_react22 = require("react");
1064
- var import_typed_classname18 = require("@postenbring/hedwig-css/typed-classname");
1065
- var import_jsx_runtime21 = require("react/jsx-runtime");
1066
- var Textarea = (0, import_react22.forwardRef)(function Textarea2(_a, ref) {
1112
+ var import_react23 = require("react");
1113
+ var import_typed_classname19 = require("@postenbring/hedwig-css/typed-classname");
1114
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1115
+ var Textarea = (0, import_react23.forwardRef)(function Textarea2(_a, ref) {
1067
1116
  var _b = _a, {
1068
1117
  className,
1069
1118
  size,
@@ -1091,10 +1140,10 @@ var Textarea = (0, import_react22.forwardRef)(function Textarea2(_a, ref) {
1091
1140
  "readOnly",
1092
1141
  "data-color"
1093
1142
  ]);
1094
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1143
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1095
1144
  InputGroup,
1096
1145
  {
1097
- className: (0, import_typed_classname18.clsx)("hds-textarea", className),
1146
+ className: (0, import_typed_classname19.clsx)("hds-textarea", className),
1098
1147
  disabled,
1099
1148
  validationMessage,
1100
1149
  validationMessageProps,
@@ -1106,7 +1155,7 @@ var Textarea = (0, import_react22.forwardRef)(function Textarea2(_a, ref) {
1106
1155
  style,
1107
1156
  size,
1108
1157
  "data-color": dataColor,
1109
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("textarea", __spreadValues({ disabled, readOnly, ref }, rest))
1158
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("textarea", __spreadValues({ disabled, readOnly, ref }, rest))
1110
1159
  }
1111
1160
  );
1112
1161
  });