@postenbring/hedwig-react 0.0.70 → 0.0.72

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 (126) hide show
  1. package/dist/_tsup-dts-rollup.d.mts +89 -28
  2. package/dist/_tsup-dts-rollup.d.ts +89 -28
  3. package/dist/accordion/index.mjs +5 -5
  4. package/dist/{breadcrumb/index.js → breadcrumbs/breadcrumbs.js} +12 -11
  5. package/dist/breadcrumbs/breadcrumbs.js.map +1 -0
  6. package/dist/{breadcrumb/breadcrumb.mjs → breadcrumbs/breadcrumbs.mjs} +2 -2
  7. package/dist/{breadcrumb/breadcrumb.js → breadcrumbs/index.js} +14 -9
  8. package/dist/breadcrumbs/index.js.map +1 -0
  9. package/dist/breadcrumbs/index.mjs +9 -0
  10. package/dist/button/button.js +1 -4
  11. package/dist/button/button.js.map +1 -1
  12. package/dist/button/button.mjs +1 -1
  13. package/dist/button/index.js +1 -4
  14. package/dist/button/index.js.map +1 -1
  15. package/dist/button/index.mjs +1 -1
  16. package/dist/{chunk-XYIY6FHW.mjs → chunk-3FRCJ3RH.mjs} +7 -7
  17. package/dist/chunk-3LYJRAOC.mjs +1 -0
  18. package/dist/{chunk-O32FZU7E.mjs → chunk-BFNITN5E.mjs} +5 -5
  19. package/dist/{chunk-OUHO4LGN.mjs → chunk-BWFFP6BB.mjs} +2 -5
  20. package/dist/chunk-BWFFP6BB.mjs.map +1 -0
  21. package/dist/chunk-CFAH2LID.mjs +1 -0
  22. package/dist/{chunk-ZRFDCZ62.mjs → chunk-CSFSJGLY.mjs} +5 -5
  23. package/dist/{chunk-K2HG7WRK.mjs → chunk-CU56G5WS.mjs} +2 -2
  24. package/dist/chunk-E5O6ID3L.mjs +54 -0
  25. package/dist/chunk-E5O6ID3L.mjs.map +1 -0
  26. package/dist/chunk-EMI7NAO2.mjs +45 -0
  27. package/dist/chunk-EMI7NAO2.mjs.map +1 -0
  28. package/dist/chunk-GGEQEVZ4.mjs +22 -0
  29. package/dist/chunk-GGEQEVZ4.mjs.map +1 -0
  30. package/dist/chunk-HSIL53A5.mjs +118 -0
  31. package/dist/chunk-HSIL53A5.mjs.map +1 -0
  32. package/dist/chunk-ISAHCU7C.mjs +1 -0
  33. package/dist/chunk-ISAHCU7C.mjs.map +1 -0
  34. package/dist/chunk-JBWAZQKM.mjs +1 -0
  35. package/dist/chunk-JBWAZQKM.mjs.map +1 -0
  36. package/dist/{chunk-FOZSX44S.mjs → chunk-VM345XBI.mjs} +6 -6
  37. package/dist/chunk-Z753E3XF.mjs +33 -0
  38. package/dist/chunk-Z753E3XF.mjs.map +1 -0
  39. package/dist/description-list/description-list.d.mts +1 -1
  40. package/dist/description-list/description-list.d.ts +1 -1
  41. package/dist/description-list/description-list.js +19 -21
  42. package/dist/description-list/description-list.js.map +1 -1
  43. package/dist/description-list/description-list.mjs +1 -1
  44. package/dist/description-list/index.js +19 -21
  45. package/dist/description-list/index.js.map +1 -1
  46. package/dist/description-list/index.mjs +1 -1
  47. package/dist/footer/footer.js +1 -4
  48. package/dist/footer/footer.js.map +1 -1
  49. package/dist/footer/footer.mjs +5 -5
  50. package/dist/footer/index.js +1 -4
  51. package/dist/footer/index.js.map +1 -1
  52. package/dist/footer/index.mjs +6 -6
  53. package/dist/form/index.mjs +14 -14
  54. package/dist/help-text/help-text.d.mts +1 -0
  55. package/dist/help-text/help-text.d.ts +1 -0
  56. package/dist/help-text/help-text.js +186 -0
  57. package/dist/help-text/help-text.js.map +1 -0
  58. package/dist/help-text/help-text.mjs +10 -0
  59. package/dist/help-text/help-text.mjs.map +1 -0
  60. package/dist/help-text/index.d.mts +1 -0
  61. package/dist/help-text/index.d.ts +1 -0
  62. package/dist/help-text/index.js +188 -0
  63. package/dist/help-text/index.js.map +1 -0
  64. package/dist/help-text/index.mjs +11 -0
  65. package/dist/help-text/index.mjs.map +1 -0
  66. package/dist/index-no-css.d.mts +2 -0
  67. package/dist/index-no-css.d.ts +2 -0
  68. package/dist/index-no-css.js +414 -316
  69. package/dist/index-no-css.js.map +1 -1
  70. package/dist/index-no-css.mjs +113 -103
  71. package/dist/index.d.mts +2 -0
  72. package/dist/index.d.ts +2 -0
  73. package/dist/index.js +414 -316
  74. package/dist/index.js.map +1 -1
  75. package/dist/index.mjs +113 -103
  76. package/dist/index.mjs.map +1 -1
  77. package/dist/layout/index.mjs +6 -6
  78. package/dist/navbar/index.mjs +5 -5
  79. package/dist/show-more/index.js +91 -39
  80. package/dist/show-more/index.js.map +1 -1
  81. package/dist/show-more/index.mjs +2 -1
  82. package/dist/table/index.d.mts +1 -0
  83. package/dist/table/index.d.ts +1 -0
  84. package/dist/table/index.js +94 -0
  85. package/dist/table/index.js.map +1 -0
  86. package/dist/table/index.mjs +9 -0
  87. package/dist/table/index.mjs.map +1 -0
  88. package/dist/table/table.d.mts +1 -0
  89. package/dist/table/table.d.ts +1 -0
  90. package/dist/table/table.js +92 -0
  91. package/dist/table/table.js.map +1 -0
  92. package/dist/table/table.mjs +8 -0
  93. package/dist/table/table.mjs.map +1 -0
  94. package/dist/tabs/index.mjs +5 -5
  95. package/dist/utilities/auto-animate-height.js +89 -37
  96. package/dist/utilities/auto-animate-height.js.map +1 -1
  97. package/dist/utilities/auto-animate-height.mjs +2 -1
  98. package/dist/utilities/index.js +89 -37
  99. package/dist/utilities/index.js.map +1 -1
  100. package/dist/utilities/index.mjs +2 -1
  101. package/package.json +7 -6
  102. package/dist/breadcrumb/breadcrumb.js.map +0 -1
  103. package/dist/breadcrumb/index.js.map +0 -1
  104. package/dist/breadcrumb/index.mjs +0 -9
  105. package/dist/chunk-AKYK3XFN.mjs +0 -95
  106. package/dist/chunk-AKYK3XFN.mjs.map +0 -1
  107. package/dist/chunk-OUHO4LGN.mjs.map +0 -1
  108. package/dist/chunk-XMB45ILT.mjs +0 -35
  109. package/dist/chunk-XMB45ILT.mjs.map +0 -1
  110. package/dist/chunk-YKDKFWP2.mjs +0 -19
  111. package/dist/chunk-YKDKFWP2.mjs.map +0 -1
  112. package/dist/chunk-YWNVB7TY.mjs +0 -1
  113. package/dist/chunk-ZOCMUEOX.mjs +0 -1
  114. package/dist/{breadcrumb/breadcrumb.d.mts → breadcrumbs/breadcrumbs.d.mts} +1 -1
  115. package/dist/{breadcrumb/breadcrumb.d.ts → breadcrumbs/breadcrumbs.d.ts} +1 -1
  116. /package/dist/{breadcrumb/breadcrumb.mjs.map → breadcrumbs/breadcrumbs.mjs.map} +0 -0
  117. /package/dist/{breadcrumb → breadcrumbs}/index.d.mts +0 -0
  118. /package/dist/{breadcrumb → breadcrumbs}/index.d.ts +0 -0
  119. /package/dist/{breadcrumb → breadcrumbs}/index.mjs.map +0 -0
  120. /package/dist/{chunk-XYIY6FHW.mjs.map → chunk-3FRCJ3RH.mjs.map} +0 -0
  121. /package/dist/{chunk-YWNVB7TY.mjs.map → chunk-3LYJRAOC.mjs.map} +0 -0
  122. /package/dist/{chunk-O32FZU7E.mjs.map → chunk-BFNITN5E.mjs.map} +0 -0
  123. /package/dist/{chunk-ZOCMUEOX.mjs.map → chunk-CFAH2LID.mjs.map} +0 -0
  124. /package/dist/{chunk-ZRFDCZ62.mjs.map → chunk-CSFSJGLY.mjs.map} +0 -0
  125. /package/dist/{chunk-K2HG7WRK.mjs.map → chunk-CU56G5WS.mjs.map} +0 -0
  126. /package/dist/{chunk-FOZSX44S.mjs.map → chunk-VM345XBI.mjs.map} +0 -0
@@ -29,9 +29,6 @@ var BaseButton = forwardRef(
29
29
  "icon",
30
30
  "className"
31
31
  ]);
32
- if (fill === "outlined") {
33
- console.warn("The `fill` value `outlined` is deprecated, use `fill='outline'` instead");
34
- }
35
32
  return /* @__PURE__ */ jsxs(
36
33
  Component,
37
34
  __spreadProps(__spreadValues({
@@ -40,7 +37,7 @@ var BaseButton = forwardRef(
40
37
  `hds-button--${size}`,
41
38
  {
42
39
  [`hds-button--${variant}`]: fill === "contained",
43
- [`hds-button--outline-${variant}`]: fill === "outline" || fill === "outlined",
40
+ [`hds-button--outline-${variant}`]: fill === "outline",
44
41
  "hds-button--full": fullWidth === true,
45
42
  "hds-button--mobile-full": fullWidth === "mobile",
46
43
  "hds-button--icon-only": icon && !children
@@ -76,4 +73,4 @@ export {
76
73
  PrimaryButton,
77
74
  SecondaryButton
78
75
  };
79
- //# sourceMappingURL=chunk-OUHO4LGN.mjs.map
76
+ //# sourceMappingURL=chunk-BWFFP6BB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button/button.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n /**\n * The background fill of the button\n */\n fill?: \"contained\" | \"outline\";\n\n /**\n * Make the button use 100% width available.\n * Using the \"mobile\" it only stretch to full width on smaller screens\n */\n fullWidth?: boolean | \"mobile\";\n\n /**\n * Use an icon inside the button\n */\n icon?: React.ReactNode;\n\n children?: React.ReactNode;\n}\n\nexport const BaseButton: OverridableComponent<\n ButtonProps & { variant: \"primary\" | \"secondary\" },\n HTMLButtonElement\n> = forwardRef(\n (\n {\n as: Component = \"button\",\n children,\n variant,\n size = \"medium\",\n fullWidth = false,\n fill = \"contained\",\n icon,\n className,\n ...rest\n },\n ref,\n ) => {\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n {\n [`hds-button--${variant}`]: fill === \"contained\",\n [`hds-button--outline-${variant}`]: fill === \"outline\",\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--icon-only\": icon && !children,\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {icon && !children ? icon : null}\n {children}\n </Component>\n );\n },\n);\nBaseButton.displayName = \"BaseButton\";\n\n/**\n * ## TODO\n *\n * - [x] Handle links that looks like buttons\n * - [ ] Revisit how to handle outline\n * - [ ] Figure out outline-white\n */\n\nexport const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement> = forwardRef(\n (props, ref) => {\n return <BaseButton {...props} ref={ref} variant=\"primary\" />;\n },\n);\n\nPrimaryButton.displayName = \"PrimaryButton\";\n\nexport const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement> = forwardRef(\n (props, ref) => {\n return <BaseButton {...props} ref={ref} variant=\"secondary\" />;\n },\n);\n\nSecondaryButton.displayName = \"SecondaryButton\";\n"],"mappings":";;;;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AA+Cf,SAkCK,KAlCL;AAnBC,IAAM,aAGT;AAAA,EACF,CACE,IAWA,QACG;AAZH,iBACE;AAAA,UAAI,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP;AAAA,MACA;AAAA,IA1CN,IAkCI,IASK,iBATL,IASK;AAAA,MARH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,eAAe,IAAI;AAAA,UACnB;AAAA,YACE,CAAC,eAAe,OAAO,EAAE,GAAG,SAAS;AAAA,YACrC,CAAC,uBAAuB,OAAO,EAAE,GAAG,SAAS;AAAA,YAC7C,oBAAoB,cAAc;AAAA,YAClC,2BAA2B,cAAc;AAAA,YACzC,yBAAyB,QAAQ,CAAC;AAAA,UACpC;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,SACI,OAdL;AAAA,QAgBE;AAAA,kBAAQ,CAAC,WAAW,OAAO;AAAA,UAC3B;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;AAUlB,IAAM,gBAAsE;AAAA,EACjF,CAAC,OAAO,QAAQ;AACd,WAAO,oBAAC,6CAAe,QAAf,EAAsB,KAAU,SAAQ,YAAU;AAAA,EAC5D;AACF;AAEA,cAAc,cAAc;AAErB,IAAM,kBAAwE;AAAA,EACnF,CAAC,OAAO,QAAQ;AACd,WAAO,oBAAC,6CAAe,QAAf,EAAsB,KAAU,SAAQ,cAAY;AAAA,EAC9D;AACF;AAEA,gBAAgB,cAAc;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-CFAH2LID.mjs.map
@@ -1,7 +1,3 @@
1
- import {
2
- TabsContent,
3
- TabsContents
4
- } from "./chunk-UWTGHSWT.mjs";
5
1
  import {
6
2
  TabsList,
7
3
  TabsTab
@@ -9,6 +5,10 @@ import {
9
5
  import {
10
6
  Tabs
11
7
  } from "./chunk-XVFQWVHO.mjs";
8
+ import {
9
+ TabsContent,
10
+ TabsContents
11
+ } from "./chunk-UWTGHSWT.mjs";
12
12
 
13
13
  // src/tabs/index.tsx
14
14
  var TabsComponent = Tabs;
@@ -20,4 +20,4 @@ TabsComponent.Content = TabsContent;
20
20
  export {
21
21
  TabsComponent
22
22
  };
23
- //# sourceMappingURL=chunk-ZRFDCZ62.mjs.map
23
+ //# sourceMappingURL=chunk-CSFSJGLY.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  FooterLinkSection,
5
5
  FooterLinkSections,
6
6
  FooterLogo
7
- } from "./chunk-O32FZU7E.mjs";
7
+ } from "./chunk-BFNITN5E.mjs";
8
8
 
9
9
  // src/footer/index.tsx
10
10
  var FooterComponent = Footer;
@@ -16,4 +16,4 @@ FooterComponent.LinkSection = FooterLinkSection;
16
16
  export {
17
17
  FooterComponent
18
18
  };
19
- //# sourceMappingURL=chunk-K2HG7WRK.mjs.map
19
+ //# sourceMappingURL=chunk-CU56G5WS.mjs.map
@@ -0,0 +1,54 @@
1
+ import {
2
+ BoxComponent
3
+ } from "./chunk-NMMFIRLZ.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-R4SQKVDQ.mjs";
9
+
10
+ // src/help-text/help-text.tsx
11
+ import * as Popover from "@radix-ui/react-popover";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
13
+ import { forwardRef } from "react";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ var HelpText = forwardRef(
16
+ (_a, ref) => {
17
+ var _b = _a, { children, className, word, title, side = "top", align = "start", boxProps } = _b, rest = __objRest(_b, ["children", "className", "word", "title", "side", "align", "boxProps"]);
18
+ return (
19
+ // NOTE: Using radix's [Popover component](https://www.radix-ui.com/primitives/docs/components/popover)
20
+ // In the future we can use the native popover api, but as of writing, though all browsers support it
21
+ // it's not far enough back to be used in production
22
+ // https://caniuse.com/mdn-html_elements_input_popovertarget
23
+ /* @__PURE__ */ jsxs(Popover.Root, { children: [
24
+ /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
25
+ "button",
26
+ __spreadProps(__spreadValues({
27
+ ref,
28
+ className: clsx("hds-help-text-button", className),
29
+ title,
30
+ type: "button"
31
+ }, rest), {
32
+ children: word
33
+ })
34
+ ) }),
35
+ /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Content, { asChild: true, side, align, children: /* @__PURE__ */ jsxs(
36
+ BoxComponent,
37
+ __spreadProps(__spreadValues({}, boxProps), {
38
+ className: clsx("hds-help-text-box", boxProps == null ? void 0 : boxProps.className),
39
+ children: [
40
+ /* @__PURE__ */ jsx(Popover.Close, { asChild: true, children: /* @__PURE__ */ jsx(BoxComponent.CloseButton, {}) }),
41
+ children
42
+ ]
43
+ })
44
+ ) }) })
45
+ ] })
46
+ );
47
+ }
48
+ );
49
+ HelpText.displayName = "HelpText";
50
+
51
+ export {
52
+ HelpText
53
+ };
54
+ //# sourceMappingURL=chunk-E5O6ID3L.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/help-text/help-text.tsx"],"sourcesContent":["import * as Popover from \"@radix-ui/react-popover\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Box } from \"../box\";\n\ninterface HelpTextProps extends React.HTMLAttributes<HTMLButtonElement> {\n className?: string;\n\n /**\n * The content of the help text\n */\n children: React.ReactNode;\n\n /**\n * The word that should be clickable to show the help text\n */\n word?: React.ReactNode;\n\n /**\n * The title of the help text. Used by screen readers and if the user hover over the help text\n */\n title?: string;\n\n /**\n * Props for the `Box` that contains the help text\n */\n boxProps?: React.ComponentProps<typeof Box>;\n\n /**\n * The side of the trigger the popover should be attached to\n *\n * default is `top`\n */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n\n /**\n * The alignment of the popover content\n *\n * default is `start`\n */\n align?: \"center\" | \"end\" | \"start\";\n}\n\n/**\n * Show a help text for a word or phrase when clicked\n *\n * Useful for providing explanations for domain-specific terms or acronyms\n */\nexport const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(\n ({ children, className, word, title, side = \"top\", align = \"start\", boxProps, ...rest }, ref) => {\n return (\n // NOTE: Using radix's [Popover component](https://www.radix-ui.com/primitives/docs/components/popover)\n // In the future we can use the native popover api, but as of writing, though all browsers support it\n // it's not far enough back to be used in production\n // https://caniuse.com/mdn-html_elements_input_popovertarget\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n ref={ref}\n className={clsx(\"hds-help-text-button\", className as undefined)}\n title={title}\n type=\"button\"\n {...rest}\n >\n {word}\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content asChild side={side} align={align}>\n <Box\n {...boxProps}\n className={clsx(\"hds-help-text-box\", boxProps?.className as undefined)}\n >\n <Popover.Close asChild>\n <Box.CloseButton />\n </Popover.Close>\n {children}\n </Box>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n },\n);\nHelpText.displayName = \"HelpText\";\n"],"mappings":";;;;;;;;;;AAAA,YAAY,aAAa;AACzB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAuDjB,cAYE,YAZF;AATH,IAAM,WAAW;AAAA,EACtB,CAAC,IAAwF,QAAQ;AAAhG,iBAAE,YAAU,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,SAAS,SAjDtE,IAiDG,IAAgF,iBAAhF,IAAgF,CAA9E,YAAU,aAAW,QAAM,SAAO,QAAc,SAAiB;AAClE;AAAA;AAAA;AAAA;AAAA;AAAA,MAKE,qBAAS,cAAR,EACC;AAAA,4BAAS,iBAAR,EAAgB,SAAO,MACtB;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,KAAK,wBAAwB,SAAsB;AAAA,YAC9D;AAAA,YACA,MAAK;AAAA,aACD,OALL;AAAA,YAOE;AAAA;AAAA,QACH,GACF;AAAA,QACA,oBAAS,gBAAR,EACC,8BAAS,iBAAR,EAAgB,SAAO,MAAC,MAAY,OACnC;AAAA,UAAC;AAAA,2CACK,WADL;AAAA,YAEC,WAAW,KAAK,qBAAqB,qCAAU,SAAsB;AAAA,YAErE;AAAA,kCAAS,eAAR,EAAc,SAAO,MACpB,8BAAC,aAAI,aAAJ,EAAgB,GACnB;AAAA,cACC;AAAA;AAAA;AAAA,QACH,GACF,GACF;AAAA,SACF;AAAA;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
@@ -0,0 +1,45 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-R4SQKVDQ.mjs";
6
+
7
+ // src/table/table.tsx
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
9
+ import { forwardRef, useId } from "react";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ var Table = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { children, className, size, caption, description } = _b, rest = __objRest(_b, ["children", "className", "size", "caption", "description"]);
14
+ const descriptionId = useId();
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ /* @__PURE__ */ jsxs(
17
+ "table",
18
+ __spreadProps(__spreadValues({
19
+ "aria-describedby": description ? descriptionId : void 0,
20
+ ref,
21
+ className: clsx(
22
+ "hds-table",
23
+ {
24
+ "hds-table--compressed": size === "compressed",
25
+ "hds-table--mobile-compressed": size === "mobile-compressed"
26
+ },
27
+ className
28
+ )
29
+ }, rest), {
30
+ children: [
31
+ caption ? /* @__PURE__ */ jsx("caption", { children: caption }) : null,
32
+ children
33
+ ]
34
+ })
35
+ ),
36
+ description ? /* @__PURE__ */ jsx("p", { className: clsx("hds-table-description"), id: descriptionId, children: description }) : null
37
+ ] });
38
+ }
39
+ );
40
+ Table.displayName = "Table";
41
+
42
+ export {
43
+ Table
44
+ };
45
+ //# sourceMappingURL=chunk-EMI7NAO2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/table/table.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, useId } from \"react\";\n\ninterface TableProps extends React.HTMLAttributes<HTMLTableElement> {\n className?: string;\n\n /**\n * Size of the table\n *\n * Use `compressed` for a more compact table, or `mobile-compressed` for a compact table on mobile screens only.\n */\n size?: \"default\" | \"compressed\" | \"mobile-compressed\";\n\n /**\n * The table caption\n *\n * You can also set this by passing `<caption>` as a first child of the table\n */\n caption?: React.ReactNode;\n\n /**\n * Optional description of the table displayed underneath the table\n *\n * Ensures the `aria-describedby` attribute is set on the table, making it accessible for screen readers.\n */\n description?: React.ReactNode;\n}\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n ({ children, className, size, caption, description, ...rest }, ref) => {\n const descriptionId = useId();\n return (\n <>\n <table\n aria-describedby={description ? descriptionId : undefined}\n ref={ref}\n className={clsx(\n \"hds-table\",\n {\n \"hds-table--compressed\": size === \"compressed\",\n \"hds-table--mobile-compressed\": size === \"mobile-compressed\",\n },\n className as undefined,\n )}\n {...rest}\n >\n {caption ? <caption>{caption}</caption> : null}\n {children}\n </table>\n {description ? (\n <p className={clsx(\"hds-table-description\")} id={descriptionId}>\n {description}\n </p>\n ) : null}\n </>\n );\n },\n);\nTable.displayName = \"Table\";\n"],"mappings":";;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,YAAY,aAAa;AA+B5B,mBAce,KAbb,YADF;AAJC,IAAM,QAAQ;AAAA,EACnB,CAAC,IAA8D,QAAQ;AAAtE,iBAAE,YAAU,WAAW,MAAM,SAAS,YA7BzC,IA6BG,IAAsD,iBAAtD,IAAsD,CAApD,YAAU,aAAW,QAAM,WAAS;AACrC,UAAM,gBAAgB,MAAM;AAC5B,WACE,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,oBAAkB,cAAc,gBAAgB;AAAA,UAChD;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA;AAAA,cACE,yBAAyB,SAAS;AAAA,cAClC,gCAAgC,SAAS;AAAA,YAC3C;AAAA,YACA;AAAA,UACF;AAAA,WACI,OAXL;AAAA,UAaE;AAAA,sBAAU,oBAAC,aAAS,mBAAQ,IAAa;AAAA,YACzC;AAAA;AAAA;AAAA,MACH;AAAA,MACC,cACC,oBAAC,OAAE,WAAW,KAAK,uBAAuB,GAAG,IAAI,eAC9C,uBACH,IACE;AAAA,OACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
@@ -0,0 +1,22 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-R4SQKVDQ.mjs";
6
+
7
+ // src/breadcrumbs/breadcrumbs.tsx
8
+ import { forwardRef } from "react";
9
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Breadcrumbs = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { olProps, children } = _b, rest = __objRest(_b, ["olProps", "children"]);
14
+ return /* @__PURE__ */ jsx("nav", __spreadProps(__spreadValues({ ref }, rest), { children: /* @__PURE__ */ jsx("ol", __spreadProps(__spreadValues({}, olProps), { className: clsx("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
15
+ }
16
+ );
17
+ Breadcrumbs.displayName = "Breadcrumbs";
18
+
19
+ export {
20
+ Breadcrumbs
21
+ };
22
+ //# sourceMappingURL=chunk-GGEQEVZ4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/breadcrumbs/breadcrumbs.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {\n children: ReactNode | ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];\n\n /**\n * Props passed to the `ol` html element\n */\n olProps?: HTMLAttributes<HTMLElement>;\n}\n\n/**\n * A breadcrumbs navigation menu\n *\n * **Usage**\n *\n * ```tsx\n * <Breadcrumbs data-testid=\"breadcrumbs\">\n * <li><Link href=\"../\">Previous page</Link></li>\n * <li aria-current=\"page\">Current page</li>\n * </Breadcrumbs>\n * ```\n *\n * Outputs this html structure\n *\n * ```html\n * <nav data-testid=\"breadcrumbs\">\n * <ol>\n * <li><a href=\"../\">Previous page</a></li>\n * <li aria-current=\"page\">Current page</li>\n * </ol>\n * </nav>\n * ```\n */\nexport const Breadcrumbs = forwardRef<HTMLDivElement, BreadcrumbsProps>(\n ({ olProps, children, ...rest }, ref) => {\n return (\n <nav ref={ref} {...rest}>\n <ol {...olProps} className={clsx(\"hds-breadcrumbs\", olProps?.className as undefined)}>\n {children}\n </ol>\n </nav>\n );\n },\n);\nBreadcrumbs.displayName = \"Breadcrumbs\";\n"],"mappings":";;;;;;;AAAA,SAAS,kBAA0E;AACnF,SAAS,YAAY;AAsCb;AAJD,IAAM,cAAc;AAAA,EACzB,CAAC,IAAgC,QAAQ;AAAxC,iBAAE,WAAS,SApCd,IAoCG,IAAwB,iBAAxB,IAAwB,CAAtB,WAAS;AACV,WACE,oBAAC,sCAAI,OAAc,OAAlB,EACC,8BAAC,uCAAO,UAAP,EAAgB,WAAW,KAAK,mBAAmB,mCAAS,SAAsB,GAChF,WACH,IACF;AAAA,EAEJ;AACF;AACA,YAAY,cAAc;","names":[]}
@@ -0,0 +1,118 @@
1
+ import {
2
+ useMergeRefs
3
+ } from "./chunk-ZL56N4UK.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-R4SQKVDQ.mjs";
9
+
10
+ // src/utilities/auto-animate-height.tsx
11
+ import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
12
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
+ var AutoAnimateHeight = forwardRef(
14
+ (_a, ref) => {
15
+ var _b = _a, {
16
+ as: Component = "div",
17
+ children,
18
+ style,
19
+ animationDuration = "quick",
20
+ animationEasing = "normal",
21
+ onTransitionEnd
22
+ } = _b, rest = __objRest(_b, [
23
+ "as",
24
+ "children",
25
+ "style",
26
+ "animationDuration",
27
+ "animationEasing",
28
+ "onTransitionEnd"
29
+ ]);
30
+ var _a2, _b2;
31
+ const rootRef = useRef(null);
32
+ const mergedRef = useMergeRefs([rootRef, ref]);
33
+ const measurementRef = useRef(null);
34
+ const [height, setHeight] = useState(
35
+ void 0
36
+ );
37
+ const [clonedChildren, setClonedChildren] = useState(
38
+ () => cloneElement(/* @__PURE__ */ jsx(Fragment, { children }), {})
39
+ );
40
+ useEffect(() => {
41
+ var _a3;
42
+ if (!rootRef.current)
43
+ return;
44
+ if (!measurementRef.current)
45
+ return;
46
+ if (document.body.scrollHeight === 0)
47
+ return;
48
+ const currentMeasurement = measurementRef.current;
49
+ const { height: newHeight } = currentMeasurement.getBoundingClientRect();
50
+ let previouslyObservedHeight = newHeight;
51
+ const resizeObserver = new ResizeObserver(() => {
52
+ const { height: resizedHeight } = currentMeasurement.getBoundingClientRect();
53
+ if (resizedHeight === previouslyObservedHeight)
54
+ return;
55
+ previouslyObservedHeight = resizedHeight;
56
+ setHeight({ height: resizedHeight, shouldAnimate: false });
57
+ });
58
+ resizeObserver.observe(currentMeasurement);
59
+ setHeight({ height: newHeight, shouldAnimate: true });
60
+ const nextClonedChildren = cloneElement(/* @__PURE__ */ jsx(Fragment, { children }), {});
61
+ if (newHeight >= ((_a3 = height == null ? void 0 : height.height) != null ? _a3 : 0)) {
62
+ setClonedChildren(nextClonedChildren);
63
+ return () => {
64
+ resizeObserver.disconnect();
65
+ };
66
+ }
67
+ const currentRoot = rootRef.current;
68
+ function onTransitionEndHandler(e) {
69
+ if (e.propertyName !== "height")
70
+ return;
71
+ setClonedChildren(nextClonedChildren);
72
+ }
73
+ currentRoot.addEventListener("transitionend", onTransitionEndHandler);
74
+ return () => {
75
+ resizeObserver.disconnect();
76
+ currentRoot.removeEventListener("transitionend", onTransitionEndHandler);
77
+ };
78
+ }, [children]);
79
+ return /* @__PURE__ */ jsxs(
80
+ Component,
81
+ __spreadProps(__spreadValues({
82
+ ref: mergedRef,
83
+ onTransitionEnd,
84
+ style: __spreadValues({
85
+ position: "relative",
86
+ overflow: "hidden",
87
+ height: (_b2 = height == null ? void 0 : height.height) != null ? _b2 : (_a2 = measurementRef.current) == null ? void 0 : _a2.getBoundingClientRect().height,
88
+ transitionProperty: (height == null ? void 0 : height.shouldAnimate) ? "height" : "none",
89
+ transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,
90
+ transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,
91
+ willChange: "height"
92
+ }, style)
93
+ }, rest), {
94
+ children: [
95
+ /* @__PURE__ */ jsx(
96
+ "div",
97
+ {
98
+ "aria-hidden": true,
99
+ ref: measurementRef,
100
+ style: {
101
+ position: "absolute",
102
+ visibility: "hidden"
103
+ },
104
+ children
105
+ }
106
+ ),
107
+ clonedChildren
108
+ ]
109
+ })
110
+ );
111
+ }
112
+ );
113
+ AutoAnimateHeight.displayName = "AutoAnimateHeight";
114
+
115
+ export {
116
+ AutoAnimateHeight
117
+ };
118
+ //# sourceMappingURL=chunk-HSIL53A5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utilities/auto-animate-height.tsx"],"sourcesContent":["import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { useMergeRefs, type OverridableComponent } from \"../utils\";\n\nexport interface AutoAnimateHeightProps {\n /**\n * Time of the animation, using the hedwig animation tokens\n * quick: 0.1s\n * normal: 0.3s\n * slow: 0.7s\n *\n * default is \"quick\"\n */\n animationDuration?: \"quick\" | \"normal\" | \"slow\";\n\n /**\n * Callback fired when animiation transition ends\n * Use this to do effects after resizing is done, e.g. scrolling to the element\n * using `element.scrollIntoView()`\n */\n onTransitionEnd?: () => void;\n\n /**\n * Which hedwig easing function to use, default is \"normal\"\n */\n animationEasing?: \"in\" | \"out\" | \"normal\";\n children: React.ReactNode;\n style?: React.CSSProperties;\n}\n\n/**\n * Helper component to animate the height of the children when they change\n * It's done by rendering two versions of the passed children,\n * one hidden to measure the height and one visible to only changes after the height is measured.\n *\n * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.\n */\nexport const AutoAnimateHeight: OverridableComponent<AutoAnimateHeightProps, HTMLDivElement> =\n forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n onTransitionEnd,\n ...rest\n },\n ref,\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([rootRef, ref]);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<{ height: number; shouldAnimate: boolean } | undefined>(\n undefined,\n );\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n\n useEffect(() => {\n if (!rootRef.current) return;\n if (!measurementRef.current) return;\n if (document.body.scrollHeight === 0) return;\n const currentMeasurement = measurementRef.current;\n const { height: newHeight } = currentMeasurement.getBoundingClientRect();\n\n // Listen for resize events on the measurement element\n // Keep the children in sync with the height\n // But don't animate it.\n let previouslyObservedHeight = newHeight;\n const resizeObserver = new ResizeObserver(() => {\n const { height: resizedHeight } = currentMeasurement.getBoundingClientRect();\n if (resizedHeight === previouslyObservedHeight) return;\n previouslyObservedHeight = resizedHeight;\n setHeight({ height: resizedHeight, shouldAnimate: false });\n });\n resizeObserver.observe(currentMeasurement); // This is cleaned up down below in the return functions\n\n // Set the new height when children changes\n setHeight({ height: newHeight, shouldAnimate: true });\n\n // Update children\n const nextClonedChildren = cloneElement(<>{children}</>, {});\n\n // When increasing in height update immediately so the new content is shown during the animation\n if (newHeight >= (height?.height ?? 0)) {\n setClonedChildren(nextClonedChildren);\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n // When decreasing in height, wait until the animation is done so that we don't get a sudden flash of empty content\n const currentRoot = rootRef.current;\n function onTransitionEndHandler(e: TransitionEvent) {\n if (e.propertyName !== \"height\") return;\n setClonedChildren(nextClonedChildren);\n }\n currentRoot.addEventListener(\"transitionend\", onTransitionEndHandler);\n return () => {\n resizeObserver.disconnect();\n currentRoot.removeEventListener(\"transitionend\", onTransitionEndHandler);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <Component\n ref={mergedRef}\n onTransitionEnd={onTransitionEnd}\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n height: height?.height ?? measurementRef.current?.getBoundingClientRect().height,\n transitionProperty: height?.shouldAnimate ? \"height\" : \"none\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n willChange: \"height\",\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </Component>\n );\n },\n );\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n"],"mappings":";;;;;;;;;;AAAA,SAAS,cAAc,YAAY,WAAW,QAAQ,gBAAgB;AAyDjD,wBAoDb,YApDa;AArBd,IAAM,oBACX;AAAA,EACE,CACE,IASA,QACG;AAVH,iBACE;AAAA,UAAI,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,MACA,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB;AAAA,IA7CR,IAuCM,IAOK,iBAPL,IAOK;AAAA,MANH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AA7CR,QAAAA,KAAAC;AAkDM,UAAM,UAAU,OAAuB,IAAI;AAC3C,UAAM,YAAY,aAAa,CAAC,SAAS,GAAG,CAAC;AAC7C,UAAM,iBAAiB,OAAuB,IAAI;AAClD,UAAM,CAAC,QAAQ,SAAS,IAAI;AAAA,MAC1B;AAAA,IACF;AACA,UAAM,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,MAA0B,MACpE,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC;AAAA,IAClC;AAEA,cAAU,MAAM;AA5DtB,UAAAD;AA6DQ,UAAI,CAAC,QAAQ;AAAS;AACtB,UAAI,CAAC,eAAe;AAAS;AAC7B,UAAI,SAAS,KAAK,iBAAiB;AAAG;AACtC,YAAM,qBAAqB,eAAe;AAC1C,YAAM,EAAE,QAAQ,UAAU,IAAI,mBAAmB,sBAAsB;AAKvE,UAAI,2BAA2B;AAC/B,YAAM,iBAAiB,IAAI,eAAe,MAAM;AAC9C,cAAM,EAAE,QAAQ,cAAc,IAAI,mBAAmB,sBAAsB;AAC3E,YAAI,kBAAkB;AAA0B;AAChD,mCAA2B;AAC3B,kBAAU,EAAE,QAAQ,eAAe,eAAe,MAAM,CAAC;AAAA,MAC3D,CAAC;AACD,qBAAe,QAAQ,kBAAkB;AAGzC,gBAAU,EAAE,QAAQ,WAAW,eAAe,KAAK,CAAC;AAGpD,YAAM,qBAAqB,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC;AAG3D,UAAI,eAAcA,MAAA,iCAAQ,WAAR,OAAAA,MAAkB,IAAI;AACtC,0BAAkB,kBAAkB;AACpC,eAAO,MAAM;AACX,yBAAe,WAAW;AAAA,QAC5B;AAAA,MACF;AAGA,YAAM,cAAc,QAAQ;AAC5B,eAAS,uBAAuB,GAAoB;AAClD,YAAI,EAAE,iBAAiB;AAAU;AACjC,0BAAkB,kBAAkB;AAAA,MACtC;AACA,kBAAY,iBAAiB,iBAAiB,sBAAsB;AACpE,aAAO,MAAM;AACX,uBAAe,WAAW;AAC1B,oBAAY,oBAAoB,iBAAiB,sBAAsB;AAAA,MACzE;AAAA,IAGF,GAAG,CAAC,QAAQ,CAAC;AAEb,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL;AAAA,QACA,OAAO;AAAA,UACL,UAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAQC,MAAA,iCAAQ,WAAR,OAAAA,OAAkBD,MAAA,eAAe,YAAf,gBAAAA,IAAwB,wBAAwB;AAAA,UAC1E,qBAAoB,iCAAQ,iBAAgB,WAAW;AAAA,UACvD,oBAAoB,sCAAsC,iBAAiB;AAAA,UAC3E,0BAA0B,oCAAoC,eAAe;AAAA,UAC7E,YAAY;AAAA,WACT;AAAA,SAED,OAbL;AAAA,QAeC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,cACX,KAAK;AAAA,cACL,OAAO;AAAA,gBACL,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACF,kBAAkB,cAAc;","names":["_a","_b"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-ISAHCU7C.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-JBWAZQKM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,8 +1,3 @@
1
- import {
2
- NavbarExpandableMenu,
3
- NavbarExpandableMenuContent,
4
- NavbarExpandableMenuTrigger
5
- } from "./chunk-3KZOKDKP.mjs";
6
1
  import {
7
2
  Navbar,
8
3
  NavbarButton,
@@ -10,6 +5,11 @@ import {
10
5
  NavbarLogoAndServiceText,
11
6
  NavbarNavigation
12
7
  } from "./chunk-625SVQEP.mjs";
8
+ import {
9
+ NavbarExpandableMenu,
10
+ NavbarExpandableMenuContent,
11
+ NavbarExpandableMenuTrigger
12
+ } from "./chunk-3KZOKDKP.mjs";
13
13
 
14
14
  // src/navbar/index.tsx
15
15
  var NavbarExpandableMenuComponent = NavbarExpandableMenu;
@@ -25,4 +25,4 @@ NavbarComponent.Navigation = NavbarNavigation;
25
25
  export {
26
26
  NavbarComponent
27
27
  };
28
- //# sourceMappingURL=chunk-FOZSX44S.mjs.map
28
+ //# sourceMappingURL=chunk-VM345XBI.mjs.map
@@ -0,0 +1,33 @@
1
+ import {
2
+ __objRest,
3
+ __spreadValues
4
+ } from "./chunk-R4SQKVDQ.mjs";
5
+
6
+ // src/description-list/description-list.tsx
7
+ import { forwardRef } from "react";
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var DescriptionList = forwardRef(
11
+ (_a, ref) => {
12
+ var _b = _a, { variant = "vertical", className } = _b, rest = __objRest(_b, ["variant", "className"]);
13
+ return /* @__PURE__ */ jsx(
14
+ "dl",
15
+ __spreadValues({
16
+ ref,
17
+ className: clsx(
18
+ "hds-description-list",
19
+ {
20
+ "hds-description-list--horizontal": variant === "horizontal"
21
+ },
22
+ className
23
+ )
24
+ }, rest)
25
+ );
26
+ }
27
+ );
28
+ DescriptionList.displayName = "DescriptionList";
29
+
30
+ export {
31
+ DescriptionList
32
+ };
33
+ //# sourceMappingURL=chunk-Z753E3XF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/description-list/description-list.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport const DescriptionList = forwardRef<HTMLDListElement, DescriptionListProps>(\n ({ variant = \"vertical\", className, ...rest }, ref) => {\n return (\n <dl\n ref={ref}\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nDescriptionList.displayName = \"DescriptionList\";\n"],"mappings":";;;;;;AAAA,SAAS,kBAAuD;AAChE,SAAS,YAAY;AA6Cf;AAHC,IAAM,kBAAkB;AAAA,EAC7B,CAAC,IAA8C,QAAQ;AAAtD,iBAAE,YAAU,YAAY,UA5C3B,IA4CG,IAAsC,iBAAtC,IAAsC,CAApC,WAAsB;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,oCAAoC,YAAY;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,gBAAgB,cAAc;","names":[]}
@@ -1,2 +1,2 @@
1
- export { DescriptionList_alias_2 as DescriptionList } from '../_tsup-dts-rollup';
2
1
  export { DescriptionListProps_alias_2 as DescriptionListProps } from '../_tsup-dts-rollup';
2
+ export { DescriptionList_alias_2 as DescriptionList } from '../_tsup-dts-rollup';
@@ -1,2 +1,2 @@
1
- export { DescriptionList_alias_2 as DescriptionList } from '../_tsup-dts-rollup';
2
1
  export { DescriptionListProps_alias_2 as DescriptionListProps } from '../_tsup-dts-rollup';
2
+ export { DescriptionList_alias_2 as DescriptionList } from '../_tsup-dts-rollup';
@@ -49,29 +49,27 @@ __export(description_list_exports, {
49
49
  DescriptionList: () => DescriptionList
50
50
  });
51
51
  module.exports = __toCommonJS(description_list_exports);
52
+ var import_react = require("react");
52
53
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
53
54
  var import_jsx_runtime = require("react/jsx-runtime");
54
- function DescriptionList(_a) {
55
- var _b = _a, {
56
- variant = "vertical",
57
- className
58
- } = _b, rest = __objRest(_b, [
59
- "variant",
60
- "className"
61
- ]);
62
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
- "dl",
64
- __spreadValues({
65
- className: (0, import_typed_classname.clsx)(
66
- "hds-description-list",
67
- {
68
- "hds-description-list--horizontal": variant === "horizontal"
69
- },
70
- className
71
- )
72
- }, rest)
73
- );
74
- }
55
+ var DescriptionList = (0, import_react.forwardRef)(
56
+ (_a, ref) => {
57
+ var _b = _a, { variant = "vertical", className } = _b, rest = __objRest(_b, ["variant", "className"]);
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ "dl",
60
+ __spreadValues({
61
+ ref,
62
+ className: (0, import_typed_classname.clsx)(
63
+ "hds-description-list",
64
+ {
65
+ "hds-description-list--horizontal": variant === "horizontal"
66
+ },
67
+ className
68
+ )
69
+ }, rest)
70
+ );
71
+ }
72
+ );
75
73
  DescriptionList.displayName = "DescriptionList";
76
74
  // Annotate the CommonJS export names for ESM import in node:
77
75
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/description-list/description-list.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport function DescriptionList({\n variant = \"vertical\",\n className,\n ...rest\n}: DescriptionListProps) {\n return (\n <dl\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n}\nDescriptionList.displayName = \"DescriptionList\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,6BAAqB;AAgDjB;AANG,SAAS,gBAAgB,IAIP;AAJO,eAC9B;AAAA,cAAU;AAAA,IACV;AAAA,EA7CF,IA2CgC,IAG3B,iBAH2B,IAG3B;AAAA,IAFH;AAAA,IACA;AAAA;AAGA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,oCAAoC,YAAY;AAAA,QAClD;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN;AAEJ;AACA,gBAAgB,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/description-list/description-list.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport const DescriptionList = forwardRef<HTMLDListElement, DescriptionListProps>(\n ({ variant = \"vertical\", className, ...rest }, ref) => {\n return (\n <dl\n ref={ref}\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nDescriptionList.displayName = \"DescriptionList\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgE;AAChE,6BAAqB;AA6Cf;AAHC,IAAM,sBAAkB;AAAA,EAC7B,CAAC,IAA8C,QAAQ;AAAtD,iBAAE,YAAU,YAAY,UA5C3B,IA4CG,IAAsC,iBAAtC,IAAsC,CAApC,WAAsB;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,oCAAoC,YAAY;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,gBAAgB,cAAc;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DescriptionList
3
- } from "../chunk-XMB45ILT.mjs";
3
+ } from "../chunk-Z753E3XF.mjs";
4
4
  import "../chunk-R4SQKVDQ.mjs";
5
5
  export {
6
6
  DescriptionList
@@ -51,29 +51,27 @@ __export(description_list_exports, {
51
51
  module.exports = __toCommonJS(description_list_exports);
52
52
 
53
53
  // src/description-list/description-list.tsx
54
+ var import_react = require("react");
54
55
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
55
56
  var import_jsx_runtime = require("react/jsx-runtime");
56
- function DescriptionList(_a) {
57
- var _b = _a, {
58
- variant = "vertical",
59
- className
60
- } = _b, rest = __objRest(_b, [
61
- "variant",
62
- "className"
63
- ]);
64
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
- "dl",
66
- __spreadValues({
67
- className: (0, import_typed_classname.clsx)(
68
- "hds-description-list",
69
- {
70
- "hds-description-list--horizontal": variant === "horizontal"
71
- },
72
- className
73
- )
74
- }, rest)
75
- );
76
- }
57
+ var DescriptionList = (0, import_react.forwardRef)(
58
+ (_a, ref) => {
59
+ var _b = _a, { variant = "vertical", className } = _b, rest = __objRest(_b, ["variant", "className"]);
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ "dl",
62
+ __spreadValues({
63
+ ref,
64
+ className: (0, import_typed_classname.clsx)(
65
+ "hds-description-list",
66
+ {
67
+ "hds-description-list--horizontal": variant === "horizontal"
68
+ },
69
+ className
70
+ )
71
+ }, rest)
72
+ );
73
+ }
74
+ );
77
75
  DescriptionList.displayName = "DescriptionList";
78
76
  // Annotate the CommonJS export names for ESM import in node:
79
77
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/description-list/index.tsx","../../src/description-list/description-list.tsx"],"sourcesContent":["export { DescriptionList } from \"./description-list\";\nexport type * from \"./description-list\";\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport function DescriptionList({\n variant = \"vertical\",\n className,\n ...rest\n}: DescriptionListProps) {\n return (\n <dl\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n}\nDescriptionList.displayName = \"DescriptionList\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,6BAAqB;AAgDjB;AANG,SAAS,gBAAgB,IAIP;AAJO,eAC9B;AAAA,cAAU;AAAA,IACV;AAAA,EA7CF,IA2CgC,IAG3B,iBAH2B,IAG3B;AAAA,IAFH;AAAA,IACA;AAAA;AAGA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,oCAAoC,YAAY;AAAA,QAClD;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN;AAEJ;AACA,gBAAgB,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/description-list/index.tsx","../../src/description-list/description-list.tsx"],"sourcesContent":["export { DescriptionList } from \"./description-list\";\nexport type * from \"./description-list\";\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport const DescriptionList = forwardRef<HTMLDListElement, DescriptionListProps>(\n ({ variant = \"vertical\", className, ...rest }, ref) => {\n return (\n <dl\n ref={ref}\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nDescriptionList.displayName = \"DescriptionList\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAgE;AAChE,6BAAqB;AA6Cf;AAHC,IAAM,sBAAkB;AAAA,EAC7B,CAAC,IAA8C,QAAQ;AAAtD,iBAAE,YAAU,YAAY,UA5C3B,IA4CG,IAAsC,iBAAtC,IAAsC,CAApC,WAAsB;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,oCAAoC,YAAY;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,gBAAgB,cAAc;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import "../chunk-2YL2MVWN.mjs";
2
2
  import {
3
3
  DescriptionList
4
- } from "../chunk-XMB45ILT.mjs";
4
+ } from "../chunk-Z753E3XF.mjs";
5
5
  import "../chunk-R4SQKVDQ.mjs";
6
6
  export {
7
7
  DescriptionList
@@ -257,9 +257,6 @@ var BaseButton = (0, import_react6.forwardRef)(
257
257
  "icon",
258
258
  "className"
259
259
  ]);
260
- if (fill === "outlined") {
261
- console.warn("The `fill` value `outlined` is deprecated, use `fill='outline'` instead");
262
- }
263
260
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
264
261
  Component,
265
262
  __spreadProps(__spreadValues({
@@ -268,7 +265,7 @@ var BaseButton = (0, import_react6.forwardRef)(
268
265
  `hds-button--${size}`,
269
266
  {
270
267
  [`hds-button--${variant}`]: fill === "contained",
271
- [`hds-button--outline-${variant}`]: fill === "outline" || fill === "outlined",
268
+ [`hds-button--outline-${variant}`]: fill === "outline",
272
269
  "hds-button--full": fullWidth === true,
273
270
  "hds-button--mobile-full": fullWidth === "mobile",
274
271
  "hds-button--icon-only": icon && !children