@postenbring/hedwig-react 0.0.6 → 0.0.9

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 (97) hide show
  1. package/dist/accordion/accordion-item-content.js +3 -4
  2. package/dist/accordion/accordion-item-content.mjs +1 -1
  3. package/dist/accordion/accordion-item-trigger.js +26 -13
  4. package/dist/accordion/accordion-item-trigger.mjs +1 -1
  5. package/dist/accordion/accordion-item.js +3 -4
  6. package/dist/accordion/accordion-item.mjs +1 -1
  7. package/dist/accordion/accordion.js +1 -2
  8. package/dist/accordion/accordion.mjs +1 -1
  9. package/dist/accordion/index.js +35 -25
  10. package/dist/accordion/index.mjs +5 -5
  11. package/dist/badge/badge.js +10 -4
  12. package/dist/badge/badge.mjs +1 -1
  13. package/dist/badge/index.js +12 -6
  14. package/dist/badge/index.mjs +2 -2
  15. package/dist/box/box.d.mts +2 -2
  16. package/dist/box/box.d.ts +2 -2
  17. package/dist/box/box.js +8 -9
  18. package/dist/box/box.mjs +1 -1
  19. package/dist/box/index.js +10 -11
  20. package/dist/box/index.mjs +2 -2
  21. package/dist/button/button.d.mts +14 -14
  22. package/dist/button/button.d.ts +14 -14
  23. package/dist/button/button.js +59 -38
  24. package/dist/button/button.mjs +3 -1
  25. package/dist/button/index.d.mts +2 -2
  26. package/dist/button/index.d.ts +2 -2
  27. package/dist/button/index.js +61 -40
  28. package/dist/button/index.mjs +4 -2
  29. package/dist/chunk-2QSL2PSS.mjs +63 -0
  30. package/dist/chunk-5NDZ66M6.mjs +5 -0
  31. package/dist/chunk-6AW5BEDP.mjs +21 -0
  32. package/dist/{chunk-B3PZUFG2.mjs → chunk-6XSKLHN6.mjs} +15 -6
  33. package/dist/chunk-BJANCH4F.mjs +5 -0
  34. package/dist/{chunk-NMSLCM2K.mjs → chunk-DQ2OO6EW.mjs} +1 -1
  35. package/dist/chunk-ENRMC5K7.mjs +75 -0
  36. package/dist/{chunk-IWV4FFE3.mjs → chunk-GMGUONH5.mjs} +2 -3
  37. package/dist/{chunk-LNYNZ4EG.mjs → chunk-J7U4Z726.mjs} +3 -4
  38. package/dist/{chunk-KBVDBI2L.mjs → chunk-L7DYK6OS.mjs} +3 -4
  39. package/dist/{chunk-O3NMR6GE.mjs → chunk-MNSMCSAR.mjs} +11 -5
  40. package/dist/chunk-N3EFZW7T.mjs +5 -0
  41. package/dist/{chunk-IOOSUX5O.mjs → chunk-QOVAYDPH.mjs} +2 -2
  42. package/dist/chunk-R55SMUE7.mjs +5 -0
  43. package/dist/{chunk-EX4U7YZF.mjs → chunk-RXUPE4MM.mjs} +8 -9
  44. package/dist/{chunk-IWDN3WGQ.mjs → chunk-STKOYB5H.mjs} +13 -7
  45. package/dist/chunk-TES7CVGU.mjs +34 -0
  46. package/dist/chunk-X4D24ZRP.mjs +63 -0
  47. package/dist/chunk-XJ44O3HY.mjs +58 -0
  48. package/dist/chunk-Z36ETKOZ.mjs +5 -0
  49. package/dist/index.d.mts +5 -4
  50. package/dist/index.d.ts +5 -4
  51. package/dist/index.js +235 -155
  52. package/dist/index.mjs +32 -25
  53. package/dist/input/index.d.mts +3 -0
  54. package/dist/input/index.d.ts +3 -0
  55. package/dist/input/index.js +121 -0
  56. package/dist/input/index.mjs +13 -0
  57. package/dist/input/input.d.mts +1 -1
  58. package/dist/input/input.d.ts +1 -1
  59. package/dist/input/input.js +13 -7
  60. package/dist/input/input.mjs +3 -47
  61. package/dist/link/index.d.mts +1 -1
  62. package/dist/link/index.d.ts +1 -1
  63. package/dist/link/index.js +22 -29
  64. package/dist/link/index.mjs +2 -2
  65. package/dist/link/link.d.mts +2 -10
  66. package/dist/link/link.d.ts +2 -10
  67. package/dist/link/link.js +20 -27
  68. package/dist/link/link.mjs +1 -1
  69. package/dist/list/description-list.d.mts +1 -1
  70. package/dist/list/description-list.d.ts +1 -1
  71. package/dist/list/description-list.js +14 -5
  72. package/dist/list/description-list.mjs +1 -1
  73. package/dist/list/index.js +28 -13
  74. package/dist/list/index.mjs +8 -8
  75. package/dist/list/link-list.js +12 -6
  76. package/dist/list/link-list.mjs +2 -2
  77. package/dist/list/list.js +12 -6
  78. package/dist/list/list.mjs +1 -1
  79. package/dist/message/index.d.mts +14 -2
  80. package/dist/message/index.d.ts +14 -2
  81. package/dist/message/index.js +51 -16
  82. package/dist/message/index.mjs +10 -5
  83. package/dist/message/message.d.mts +3 -1
  84. package/dist/message/message.d.ts +3 -1
  85. package/dist/message/message.js +42 -14
  86. package/dist/message/message.mjs +8 -4
  87. package/package.json +3 -5
  88. package/dist/chunk-4XWB4ZSR.mjs +0 -6
  89. package/dist/chunk-7F7QB4D5.mjs +0 -50
  90. package/dist/chunk-AYGPUYPZ.mjs +0 -5
  91. package/dist/chunk-CYW3DUD2.mjs +0 -5
  92. package/dist/chunk-EKFYWUBE.mjs +0 -36
  93. package/dist/chunk-GSPFHK2Z.mjs +0 -55
  94. package/dist/chunk-ID5KKZMK.mjs +0 -5
  95. package/dist/chunk-PCKWBORI.mjs +0 -5
  96. package/dist/chunk-VZNNGRKM.mjs +0 -5
  97. package/dist/chunk-X3OAJSS2.mjs +0 -41
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
1
+ import { O as OverridableComponent } from '../utils-BfZsjuFH.js';
2
+ import 'react';
3
3
 
4
4
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
5
  /**
@@ -15,23 +15,23 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
15
15
  * The background of the button.
16
16
  */
17
17
  fill?: "contained" | "outlined";
18
- children: React.ReactNode;
19
- buttonRef?: React.ForwardedRef<HTMLButtonElement>;
18
+ /**
19
+ * Use an icon inside the button
20
+ */
21
+ icon?: React.ReactNode;
22
+ children?: React.ReactNode;
20
23
  }
24
+ declare const BaseButton: OverridableComponent<ButtonProps & {
25
+ variant: "primary" | "secondary";
26
+ }, HTMLButtonElement>;
21
27
  /**
22
28
  * ## TODO
23
29
  *
24
- * - [ ] Handle links that looks like buttons
30
+ * - [x] Handle links that looks like buttons
25
31
  * - [ ] Revisit how to handle outline
26
32
  * - [ ] Figure out outline-white
27
33
  */
28
- declare function PrimaryButton(props: ButtonProps): react_jsx_runtime.JSX.Element;
29
- declare namespace PrimaryButton {
30
- var displayName: string;
31
- }
32
- declare function SecondaryButton(props: ButtonProps): react_jsx_runtime.JSX.Element;
33
- declare namespace SecondaryButton {
34
- var displayName: string;
35
- }
34
+ declare const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
35
+ declare const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
36
36
 
37
- export { type ButtonProps, PrimaryButton, SecondaryButton };
37
+ export { BaseButton, type ButtonProps, PrimaryButton, SecondaryButton };
@@ -49,55 +49,76 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
49
49
  // src/button/button.tsx
50
50
  var button_exports = {};
51
51
  __export(button_exports, {
52
+ BaseButton: () => BaseButton,
52
53
  PrimaryButton: () => PrimaryButton,
53
54
  SecondaryButton: () => SecondaryButton
54
55
  });
55
56
  module.exports = __toCommonJS(button_exports);
56
- var import_clsx = require("clsx");
57
+ var import_react = require("react");
57
58
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
58
59
  var import_jsx_runtime = require("react/jsx-runtime");
59
- function BaseButton(_a) {
60
- var _b = _a, {
61
- children,
62
- variant,
63
- size = "medium",
64
- fullWidth = false,
65
- fill = "contained",
66
- buttonRef
67
- } = _b, rest = __objRest(_b, [
68
- "children",
69
- "variant",
70
- "size",
71
- "fullWidth",
72
- "fill",
73
- "buttonRef"
74
- ]);
75
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
- "button",
77
- __spreadProps(__spreadValues({
78
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`hds-button--${size}`), {
79
- [(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained",
80
- [(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined",
81
- [(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true,
82
- [(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile"
83
- }),
84
- ref: buttonRef
85
- }, rest), {
86
- children
87
- })
88
- );
89
- }
60
+ var BaseButton = (0, import_react.forwardRef)(
61
+ (_a, ref) => {
62
+ var _b = _a, {
63
+ as: Component = "button",
64
+ children,
65
+ variant,
66
+ size = "medium",
67
+ fullWidth = false,
68
+ fill = "contained",
69
+ icon,
70
+ className
71
+ } = _b, rest = __objRest(_b, [
72
+ "as",
73
+ "children",
74
+ "variant",
75
+ "size",
76
+ "fullWidth",
77
+ "fill",
78
+ "icon",
79
+ "className"
80
+ ]);
81
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
82
+ Component,
83
+ __spreadProps(__spreadValues({
84
+ className: (0, import_typed_classname.clsx)(
85
+ "hds-button",
86
+ `hds-button--${size}`,
87
+ {
88
+ [`hds-button--${variant}`]: fill === "contained",
89
+ [`hds-button--outline-${variant}`]: fill === "outlined",
90
+ "hds-button--full": fullWidth === true,
91
+ "hds-button--mobile-full": fullWidth === "mobile",
92
+ "hds-button--icon-only": icon && !children
93
+ },
94
+ className
95
+ ),
96
+ ref
97
+ }, rest), {
98
+ children: [
99
+ icon && !children ? icon : null,
100
+ children
101
+ ]
102
+ })
103
+ );
104
+ }
105
+ );
90
106
  BaseButton.displayName = "BaseButton";
91
- function PrimaryButton(props) {
92
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
93
- }
107
+ var PrimaryButton = (0, import_react.forwardRef)(
108
+ (props, ref) => {
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "primary" }));
110
+ }
111
+ );
94
112
  PrimaryButton.displayName = "PrimaryButton";
95
- function SecondaryButton(props) {
96
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "secondary" }));
97
- }
113
+ var SecondaryButton = (0, import_react.forwardRef)(
114
+ (props, ref) => {
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "secondary" }));
116
+ }
117
+ );
98
118
  SecondaryButton.displayName = "SecondaryButton";
99
119
  // Annotate the CommonJS export names for ESM import in node:
100
120
  0 && (module.exports = {
121
+ BaseButton,
101
122
  PrimaryButton,
102
123
  SecondaryButton
103
124
  });
@@ -1,9 +1,11 @@
1
1
  import {
2
+ BaseButton,
2
3
  PrimaryButton,
3
4
  SecondaryButton
4
- } from "../chunk-GSPFHK2Z.mjs";
5
+ } from "../chunk-ENRMC5K7.mjs";
5
6
  import "../chunk-FUJQIYOF.mjs";
6
7
  export {
8
+ BaseButton,
7
9
  PrimaryButton,
8
10
  SecondaryButton
9
11
  };
@@ -1,3 +1,3 @@
1
- export { ButtonProps, PrimaryButton, SecondaryButton } from './button.mjs';
2
- import 'react/jsx-runtime';
1
+ export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button.mjs';
2
+ import '../utils-BfZsjuFH.mjs';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
2
- import 'react/jsx-runtime';
1
+ export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
2
+ import '../utils-BfZsjuFH.js';
3
3
  import 'react';
@@ -49,61 +49,82 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
49
49
  // src/button/index.tsx
50
50
  var button_exports = {};
51
51
  __export(button_exports, {
52
+ BaseButton: () => BaseButton,
52
53
  PrimaryButton: () => PrimaryButton,
53
54
  SecondaryButton: () => SecondaryButton
54
55
  });
55
56
  module.exports = __toCommonJS(button_exports);
56
- var import_fonts = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
57
- var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
57
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
58
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
58
59
  var import_base = require("@postenbring/hedwig-css/dist/base.css");
59
60
  var import_button = require("@postenbring/hedwig-css/dist/button.css");
60
61
 
61
62
  // src/button/button.tsx
62
- var import_clsx = require("clsx");
63
+ var import_react = require("react");
63
64
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
64
65
  var import_jsx_runtime = require("react/jsx-runtime");
65
- function BaseButton(_a) {
66
- var _b = _a, {
67
- children,
68
- variant,
69
- size = "medium",
70
- fullWidth = false,
71
- fill = "contained",
72
- buttonRef
73
- } = _b, rest = __objRest(_b, [
74
- "children",
75
- "variant",
76
- "size",
77
- "fullWidth",
78
- "fill",
79
- "buttonRef"
80
- ]);
81
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
- "button",
83
- __spreadProps(__spreadValues({
84
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`hds-button--${size}`), {
85
- [(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained",
86
- [(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined",
87
- [(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true,
88
- [(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile"
89
- }),
90
- ref: buttonRef
91
- }, rest), {
92
- children
93
- })
94
- );
95
- }
66
+ var BaseButton = (0, import_react.forwardRef)(
67
+ (_a, ref) => {
68
+ var _b = _a, {
69
+ as: Component = "button",
70
+ children,
71
+ variant,
72
+ size = "medium",
73
+ fullWidth = false,
74
+ fill = "contained",
75
+ icon,
76
+ className
77
+ } = _b, rest = __objRest(_b, [
78
+ "as",
79
+ "children",
80
+ "variant",
81
+ "size",
82
+ "fullWidth",
83
+ "fill",
84
+ "icon",
85
+ "className"
86
+ ]);
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
88
+ Component,
89
+ __spreadProps(__spreadValues({
90
+ className: (0, import_typed_classname.clsx)(
91
+ "hds-button",
92
+ `hds-button--${size}`,
93
+ {
94
+ [`hds-button--${variant}`]: fill === "contained",
95
+ [`hds-button--outline-${variant}`]: fill === "outlined",
96
+ "hds-button--full": fullWidth === true,
97
+ "hds-button--mobile-full": fullWidth === "mobile",
98
+ "hds-button--icon-only": icon && !children
99
+ },
100
+ className
101
+ ),
102
+ ref
103
+ }, rest), {
104
+ children: [
105
+ icon && !children ? icon : null,
106
+ children
107
+ ]
108
+ })
109
+ );
110
+ }
111
+ );
96
112
  BaseButton.displayName = "BaseButton";
97
- function PrimaryButton(props) {
98
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
99
- }
113
+ var PrimaryButton = (0, import_react.forwardRef)(
114
+ (props, ref) => {
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "primary" }));
116
+ }
117
+ );
100
118
  PrimaryButton.displayName = "PrimaryButton";
101
- function SecondaryButton(props) {
102
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "secondary" }));
103
- }
119
+ var SecondaryButton = (0, import_react.forwardRef)(
120
+ (props, ref) => {
121
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "secondary" }));
122
+ }
123
+ );
104
124
  SecondaryButton.displayName = "SecondaryButton";
105
125
  // Annotate the CommonJS export names for ESM import in node:
106
126
  0 && (module.exports = {
127
+ BaseButton,
107
128
  PrimaryButton,
108
129
  SecondaryButton
109
130
  });
@@ -1,10 +1,12 @@
1
- import "../chunk-VZNNGRKM.mjs";
1
+ import "../chunk-N3EFZW7T.mjs";
2
2
  import {
3
+ BaseButton,
3
4
  PrimaryButton,
4
5
  SecondaryButton
5
- } from "../chunk-GSPFHK2Z.mjs";
6
+ } from "../chunk-ENRMC5K7.mjs";
6
7
  import "../chunk-FUJQIYOF.mjs";
7
8
  export {
9
+ BaseButton,
8
10
  PrimaryButton,
9
11
  SecondaryButton
10
12
  };
@@ -0,0 +1,63 @@
1
+ import {
2
+ AccordionItemContext
3
+ } from "./chunk-2V6SWZ5G.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-FUJQIYOF.mjs";
9
+
10
+ // src/accordion/accordion-item-trigger.tsx
11
+ import { forwardRef, useContext } from "react";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ var AccordionTrigger = forwardRef((_a, ref) => {
15
+ var _b = _a, { as: Component = "button", children, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "onClick"]);
16
+ const itemContext = useContext(AccordionItemContext);
17
+ if (itemContext === null) {
18
+ return null;
19
+ }
20
+ const expandOrCollapse = (e) => {
21
+ itemContext.setOpen(!itemContext.open);
22
+ onClick && onClick(e);
23
+ };
24
+ return /* @__PURE__ */ jsxs(
25
+ Component,
26
+ __spreadProps(__spreadValues({}, rest), {
27
+ "aria-expanded": itemContext.open,
28
+ className: clsx(
29
+ "hds-accordion-item-trigger",
30
+ { "hds-accordion-item-trigger--open": itemContext.open },
31
+ className
32
+ ),
33
+ onClick: expandOrCollapse,
34
+ ref,
35
+ type: "button",
36
+ children: [
37
+ /* @__PURE__ */ jsx("span", { className: clsx("hds-accordion-item-trigger--icon"), children: /* @__PURE__ */ jsx(
38
+ "svg",
39
+ {
40
+ fill: "none",
41
+ height: "24",
42
+ viewBox: "0 0 24 24",
43
+ width: "24",
44
+ xmlns: "http://www.w3.org/2000/svg",
45
+ children: /* @__PURE__ */ jsx("g", { className: "hds-accordion-item-trigger--icon-chevron", children: /* @__PURE__ */ jsx(
46
+ "path",
47
+ {
48
+ className: "hds-accordion-item-trigger--icon-chevron_down",
49
+ d: "M19.6289 9.15625L18.9609 8.45312C18.7852 8.27734 18.5039 8.27734 18.3633 8.45312L12 14.8164L5.60156 8.45312C5.46094 8.27734 5.17969 8.27734 5.00391 8.45312L4.33594 9.15625C4.16016 9.29688 4.16016 9.57812 4.33594 9.75391L11.6836 17.1016C11.8594 17.2773 12.1055 17.2773 12.2812 17.1016L19.6289 9.75391C19.8047 9.57812 19.8047 9.29688 19.6289 9.15625Z"
50
+ }
51
+ ) })
52
+ }
53
+ ) }),
54
+ /* @__PURE__ */ jsx("span", { children })
55
+ ]
56
+ })
57
+ );
58
+ });
59
+ AccordionTrigger.displayName = "AccordionTrigger";
60
+
61
+ export {
62
+ AccordionTrigger
63
+ };
@@ -0,0 +1,5 @@
1
+ // src/link/index.tsx
2
+ import "@postenbring/hedwig-css/dist/fonts.css";
3
+ import "@postenbring/hedwig-css/dist/tokens.css";
4
+ import "@postenbring/hedwig-css/dist/base.css";
5
+ import "@postenbring/hedwig-css/dist/link.css";
@@ -0,0 +1,21 @@
1
+ import {
2
+ Message,
3
+ MessageDescription,
4
+ MessageTitle
5
+ } from "./chunk-X4D24ZRP.mjs";
6
+
7
+ // src/message/index.tsx
8
+ import "@postenbring/hedwig-css/dist/fonts.css";
9
+ import "@postenbring/hedwig-css/dist/tokens.css";
10
+ import "@postenbring/hedwig-css/dist/base.css";
11
+ import "@postenbring/hedwig-css/dist/box.css";
12
+ import "@postenbring/hedwig-css/dist/message.css";
13
+ var MessageComponent = Message;
14
+ MessageComponent.Title = MessageTitle;
15
+ MessageComponent.Description = MessageDescription;
16
+ MessageComponent.Title.displayName = "Message";
17
+ MessageComponent.Description.displayName = "Message";
18
+
19
+ export {
20
+ MessageComponent
21
+ };
@@ -5,8 +5,7 @@ import {
5
5
  } from "./chunk-FUJQIYOF.mjs";
6
6
 
7
7
  // src/list/description-list.tsx
8
- import { clsx } from "clsx";
9
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
9
  import { jsx } from "react/jsx-runtime";
11
10
  function DescriptionDetails(_a) {
12
11
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
@@ -17,13 +16,23 @@ function DescriptionTerm(_a) {
17
16
  return /* @__PURE__ */ jsx("dt", __spreadProps(__spreadValues({}, rest), { children }));
18
17
  }
19
18
  function DescriptionList(_a) {
20
- var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]);
19
+ var _b = _a, {
20
+ variant = "vertical",
21
+ className
22
+ } = _b, rest = __objRest(_b, [
23
+ "variant",
24
+ "className"
25
+ ]);
21
26
  return /* @__PURE__ */ jsx(
22
27
  "dl",
23
28
  __spreadValues({
24
- className: clsx(t("hds-description-list"), {
25
- [t("hds-description-list--horizontal")]: variant === "horizontal"
26
- })
29
+ className: clsx(
30
+ "hds-description-list",
31
+ {
32
+ "hds-description-list--horizontal": variant === "horizontal"
33
+ },
34
+ className
35
+ )
27
36
  }, rest)
28
37
  );
29
38
  }
@@ -0,0 +1,5 @@
1
+ // src/box/index.tsx
2
+ import "@postenbring/hedwig-css/dist/fonts.css";
3
+ import "@postenbring/hedwig-css/dist/tokens.css";
4
+ import "@postenbring/hedwig-css/dist/base.css";
5
+ import "@postenbring/hedwig-css/dist/box.css";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  UnorderedList
3
- } from "./chunk-IWDN3WGQ.mjs";
3
+ } from "./chunk-STKOYB5H.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -0,0 +1,75 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/button/button.tsx
8
+ import { forwardRef } from "react";
9
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var BaseButton = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, {
14
+ as: Component = "button",
15
+ children,
16
+ variant,
17
+ size = "medium",
18
+ fullWidth = false,
19
+ fill = "contained",
20
+ icon,
21
+ className
22
+ } = _b, rest = __objRest(_b, [
23
+ "as",
24
+ "children",
25
+ "variant",
26
+ "size",
27
+ "fullWidth",
28
+ "fill",
29
+ "icon",
30
+ "className"
31
+ ]);
32
+ return /* @__PURE__ */ jsxs(
33
+ Component,
34
+ __spreadProps(__spreadValues({
35
+ className: clsx(
36
+ "hds-button",
37
+ `hds-button--${size}`,
38
+ {
39
+ [`hds-button--${variant}`]: fill === "contained",
40
+ [`hds-button--outline-${variant}`]: fill === "outlined",
41
+ "hds-button--full": fullWidth === true,
42
+ "hds-button--mobile-full": fullWidth === "mobile",
43
+ "hds-button--icon-only": icon && !children
44
+ },
45
+ className
46
+ ),
47
+ ref
48
+ }, rest), {
49
+ children: [
50
+ icon && !children ? icon : null,
51
+ children
52
+ ]
53
+ })
54
+ );
55
+ }
56
+ );
57
+ BaseButton.displayName = "BaseButton";
58
+ var PrimaryButton = forwardRef(
59
+ (props, ref) => {
60
+ return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "primary" }));
61
+ }
62
+ );
63
+ PrimaryButton.displayName = "PrimaryButton";
64
+ var SecondaryButton = forwardRef(
65
+ (props, ref) => {
66
+ return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "secondary" }));
67
+ }
68
+ );
69
+ SecondaryButton.displayName = "SecondaryButton";
70
+
71
+ export {
72
+ BaseButton,
73
+ PrimaryButton,
74
+ SecondaryButton
75
+ };
@@ -9,8 +9,7 @@ import {
9
9
 
10
10
  // src/accordion/accordion.tsx
11
11
  import { forwardRef, useState } from "react";
12
- import { clsx } from "clsx";
13
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
14
13
  import { jsx } from "react/jsx-runtime";
15
14
  var Accordion = forwardRef(
16
15
  (_a, ref) => {
@@ -25,7 +24,7 @@ var Accordion = forwardRef(
25
24
  );
26
25
  }
27
26
  };
28
- return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx(t("hds-accordion"), className), ref, children })) });
27
+ return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-accordion", className), ref, children })) });
29
28
  }
30
29
  );
31
30
  Accordion.displayName = "Accordion";
@@ -9,8 +9,7 @@ import {
9
9
 
10
10
  // src/accordion/accordion-item-content.tsx
11
11
  import { forwardRef, useContext } from "react";
12
- import { clsx } from "clsx";
13
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
14
13
  import { jsx } from "react/jsx-runtime";
15
14
  var AccordionContent = forwardRef((_a, ref) => {
16
15
  var _b = _a, { as: Component = "div", children, className } = _b, rest = __objRest(_b, ["as", "children", "className"]);
@@ -22,9 +21,9 @@ var AccordionContent = forwardRef((_a, ref) => {
22
21
  Component,
23
22
  __spreadProps(__spreadValues({}, rest), {
24
23
  className: clsx(
25
- t("hds-accordion-item-content"),
24
+ "hds-accordion-item-content",
26
25
  {
27
- [t(`hds-accordion-item-content--closed`)]: !context.open
26
+ "hds-accordion-item-content--closed": !context.open
28
27
  },
29
28
  className
30
29
  ),
@@ -10,8 +10,7 @@ import {
10
10
 
11
11
  // src/accordion/accordion-item.tsx
12
12
  import { forwardRef, useContext, useEffect, useId, useState } from "react";
13
- import { clsx } from "clsx";
14
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
15
14
  import { jsx } from "react/jsx-runtime";
16
15
  var AccordionItem = forwardRef(
17
16
  (_a, ref) => {
@@ -40,9 +39,9 @@ var AccordionItem = forwardRef(
40
39
  Component,
41
40
  __spreadProps(__spreadValues({}, rest), {
42
41
  className: clsx(
43
- t("hds-accordion-item"),
42
+ "hds-accordion-item",
44
43
  {
45
- [t(`hds-accordion-item__expanded`)]: open
44
+ "hds-accordion-item__expanded": open
46
45
  },
47
46
  className
48
47
  ),
@@ -5,23 +5,29 @@ import {
5
5
  } from "./chunk-FUJQIYOF.mjs";
6
6
 
7
7
  // src/badge/badge.tsx
8
- import { clsx } from "clsx";
9
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
9
  import { jsx } from "react/jsx-runtime";
11
10
  function BaseBadge(_a) {
12
11
  var _b = _a, {
13
12
  children,
14
13
  variant,
15
- size = "small"
14
+ size = "small",
15
+ className
16
16
  } = _b, rest = __objRest(_b, [
17
17
  "children",
18
18
  "variant",
19
- "size"
19
+ "size",
20
+ "className"
20
21
  ]);
21
22
  return /* @__PURE__ */ jsx(
22
23
  "span",
23
24
  __spreadProps(__spreadValues({
24
- className: clsx(t("hds-badge"), t(`hds-badge--${size}`), t(`hds-badge--${variant}`))
25
+ className: clsx(
26
+ "hds-badge",
27
+ `hds-badge--${size}`,
28
+ `hds-badge--${variant}`,
29
+ className
30
+ )
25
31
  }, rest), {
26
32
  children
27
33
  })
@@ -0,0 +1,5 @@
1
+ // src/button/index.tsx
2
+ import "@postenbring/hedwig-css/dist/fonts.css";
3
+ import "@postenbring/hedwig-css/dist/tokens.css";
4
+ import "@postenbring/hedwig-css/dist/base.css";
5
+ import "@postenbring/hedwig-css/dist/button.css";