@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
@@ -53,7 +53,6 @@ __export(accordion_item_content_exports, {
53
53
  });
54
54
  module.exports = __toCommonJS(accordion_item_content_exports);
55
55
  var import_react2 = require("react");
56
- var import_clsx = require("clsx");
57
56
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
58
57
 
59
58
  // src/accordion/context.ts
@@ -79,10 +78,10 @@ var AccordionContent = (0, import_react2.forwardRef)((_a, ref) => {
79
78
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
79
  Component,
81
80
  __spreadProps(__spreadValues({}, rest), {
82
- className: (0, import_clsx.clsx)(
83
- (0, import_typed_classname.t)("hds-accordion-item-content"),
81
+ className: (0, import_typed_classname.clsx)(
82
+ "hds-accordion-item-content",
84
83
  {
85
- [(0, import_typed_classname.t)(`hds-accordion-item-content--closed`)]: !context.open
84
+ "hds-accordion-item-content--closed": !context.open
86
85
  },
87
86
  className
88
87
  ),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccordionContent
3
- } from "../chunk-LNYNZ4EG.mjs";
3
+ } from "../chunk-J7U4Z726.mjs";
4
4
  import "../chunk-2V6SWZ5G.mjs";
5
5
  import "../chunk-FUJQIYOF.mjs";
6
6
  export {
@@ -54,7 +54,6 @@ __export(accordion_item_trigger_exports, {
54
54
  module.exports = __toCommonJS(accordion_item_trigger_exports);
55
55
  var import_react2 = require("react");
56
56
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
57
- var import_clsx = require("clsx");
58
57
 
59
58
  // src/accordion/context.ts
60
59
  var import_react = require("react");
@@ -70,12 +69,6 @@ var AccordionItemContext = (0, import_react.createContext)(null);
70
69
 
71
70
  // src/accordion/accordion-item-trigger.tsx
72
71
  var import_jsx_runtime = require("react/jsx-runtime");
73
- function FaArrowDownButNotReally() {
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "v " });
75
- }
76
- function FaArrowUpButNotReally() {
77
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "^ " });
78
- }
79
72
  var AccordionTrigger = (0, import_react2.forwardRef)((_a, ref) => {
80
73
  var _b = _a, { as: Component = "button", children, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "onClick"]);
81
74
  const itemContext = (0, import_react2.useContext)(AccordionItemContext);
@@ -86,18 +79,38 @@ var AccordionTrigger = (0, import_react2.forwardRef)((_a, ref) => {
86
79
  itemContext.setOpen(!itemContext.open);
87
80
  onClick && onClick(e);
88
81
  };
89
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
90
83
  Component,
91
84
  __spreadProps(__spreadValues({}, rest), {
92
85
  "aria-expanded": itemContext.open,
93
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-accordion-item-trigger"), className),
86
+ className: (0, import_typed_classname.clsx)(
87
+ "hds-accordion-item-trigger",
88
+ { "hds-accordion-item-trigger--open": itemContext.open },
89
+ className
90
+ ),
94
91
  onClick: expandOrCollapse,
95
92
  ref,
96
93
  type: "button",
97
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
98
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-accordion-item-trigger--icon")), children: itemContext.open ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FaArrowUpButNotReally, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FaArrowDownButNotReally, {}) }),
99
- children
100
- ] })
94
+ children: [
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_typed_classname.clsx)("hds-accordion-item-trigger--icon"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
+ "svg",
97
+ {
98
+ fill: "none",
99
+ height: "24",
100
+ viewBox: "0 0 24 24",
101
+ width: "24",
102
+ xmlns: "http://www.w3.org/2000/svg",
103
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { className: "hds-accordion-item-trigger--icon-chevron", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
104
+ "path",
105
+ {
106
+ className: "hds-accordion-item-trigger--icon-chevron_down",
107
+ 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"
108
+ }
109
+ ) })
110
+ }
111
+ ) }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children })
113
+ ]
101
114
  })
102
115
  );
103
116
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccordionTrigger
3
- } from "../chunk-7F7QB4D5.mjs";
3
+ } from "../chunk-2QSL2PSS.mjs";
4
4
  import "../chunk-2V6SWZ5G.mjs";
5
5
  import "../chunk-FUJQIYOF.mjs";
6
6
  export {
@@ -53,7 +53,6 @@ __export(accordion_item_exports, {
53
53
  });
54
54
  module.exports = __toCommonJS(accordion_item_exports);
55
55
  var import_react2 = require("react");
56
- var import_clsx = require("clsx");
57
56
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
58
57
 
59
58
  // src/accordion/context.ts
@@ -96,10 +95,10 @@ var AccordionItem = (0, import_react2.forwardRef)(
96
95
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
97
96
  Component,
98
97
  __spreadProps(__spreadValues({}, rest), {
99
- className: (0, import_clsx.clsx)(
100
- (0, import_typed_classname.t)("hds-accordion-item"),
98
+ className: (0, import_typed_classname.clsx)(
99
+ "hds-accordion-item",
101
100
  {
102
- [(0, import_typed_classname.t)(`hds-accordion-item__expanded`)]: open
101
+ "hds-accordion-item__expanded": open
103
102
  },
104
103
  className
105
104
  ),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccordionItem
3
- } from "../chunk-KBVDBI2L.mjs";
3
+ } from "../chunk-L7DYK6OS.mjs";
4
4
  import "../chunk-2V6SWZ5G.mjs";
5
5
  import "../chunk-FUJQIYOF.mjs";
6
6
  export {
@@ -53,7 +53,6 @@ __export(accordion_exports, {
53
53
  });
54
54
  module.exports = __toCommonJS(accordion_exports);
55
55
  var import_react2 = require("react");
56
- var import_clsx = require("clsx");
57
56
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
58
57
 
59
58
  // src/accordion/context.ts
@@ -83,7 +82,7 @@ var Accordion = (0, import_react2.forwardRef)(
83
82
  );
84
83
  }
85
84
  };
86
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, __spreadProps(__spreadValues({}, rest), { className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-accordion"), className), ref, children })) });
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, __spreadProps(__spreadValues({}, rest), { className: (0, import_typed_classname.clsx)("hds-accordion", className), ref, children })) });
87
86
  }
88
87
  );
89
88
  Accordion.displayName = "Accordion";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Accordion
3
- } from "../chunk-IWV4FFE3.mjs";
3
+ } from "../chunk-GMGUONH5.mjs";
4
4
  import "../chunk-2V6SWZ5G.mjs";
5
5
  import "../chunk-FUJQIYOF.mjs";
6
6
  export {
@@ -55,14 +55,13 @@ __export(accordion_exports, {
55
55
  AccordionTrigger: () => AccordionTrigger
56
56
  });
57
57
  module.exports = __toCommonJS(accordion_exports);
58
- var import_fonts = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
59
- var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
58
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
59
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
60
60
  var import_base = require("@postenbring/hedwig-css/dist/base.css");
61
61
  var import_accordion = require("@postenbring/hedwig-css/dist/accordion.css");
62
62
 
63
63
  // src/accordion/accordion.tsx
64
64
  var import_react2 = require("react");
65
- var import_clsx = require("clsx");
66
65
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
67
66
 
68
67
  // src/accordion/context.ts
@@ -92,14 +91,13 @@ var Accordion = (0, import_react2.forwardRef)(
92
91
  );
93
92
  }
94
93
  };
95
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, __spreadProps(__spreadValues({}, rest), { className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-accordion"), className), ref, children })) });
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, __spreadProps(__spreadValues({}, rest), { className: (0, import_typed_classname.clsx)("hds-accordion", className), ref, children })) });
96
95
  }
97
96
  );
98
97
  Accordion.displayName = "Accordion";
99
98
 
100
99
  // src/accordion/accordion-item.tsx
101
100
  var import_react3 = require("react");
102
- var import_clsx2 = require("clsx");
103
101
  var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
104
102
  var import_jsx_runtime2 = require("react/jsx-runtime");
105
103
  var AccordionItem = (0, import_react3.forwardRef)(
@@ -128,10 +126,10 @@ var AccordionItem = (0, import_react3.forwardRef)(
128
126
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
129
127
  Component,
130
128
  __spreadProps(__spreadValues({}, rest), {
131
- className: (0, import_clsx2.clsx)(
132
- (0, import_typed_classname2.t)("hds-accordion-item"),
129
+ className: (0, import_typed_classname2.clsx)(
130
+ "hds-accordion-item",
133
131
  {
134
- [(0, import_typed_classname2.t)(`hds-accordion-item__expanded`)]: open
132
+ "hds-accordion-item__expanded": open
135
133
  },
136
134
  className
137
135
  ),
@@ -146,14 +144,7 @@ AccordionItem.displayName = "AccordionItem";
146
144
  // src/accordion/accordion-item-trigger.tsx
147
145
  var import_react4 = require("react");
148
146
  var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
149
- var import_clsx3 = require("clsx");
150
147
  var import_jsx_runtime3 = require("react/jsx-runtime");
151
- function FaArrowDownButNotReally() {
152
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "v " });
153
- }
154
- function FaArrowUpButNotReally() {
155
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "^ " });
156
- }
157
148
  var AccordionTrigger = (0, import_react4.forwardRef)((_a, ref) => {
158
149
  var _b = _a, { as: Component = "button", children, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "onClick"]);
159
150
  const itemContext = (0, import_react4.useContext)(AccordionItemContext);
@@ -164,18 +155,38 @@ var AccordionTrigger = (0, import_react4.forwardRef)((_a, ref) => {
164
155
  itemContext.setOpen(!itemContext.open);
165
156
  onClick && onClick(e);
166
157
  };
167
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
158
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
168
159
  Component,
169
160
  __spreadProps(__spreadValues({}, rest), {
170
161
  "aria-expanded": itemContext.open,
171
- className: (0, import_clsx3.clsx)((0, import_typed_classname3.t)("hds-accordion-item-trigger"), className),
162
+ className: (0, import_typed_classname3.clsx)(
163
+ "hds-accordion-item-trigger",
164
+ { "hds-accordion-item-trigger--open": itemContext.open },
165
+ className
166
+ ),
172
167
  onClick: expandOrCollapse,
173
168
  ref,
174
169
  type: "button",
175
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
176
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_clsx3.clsx)((0, import_typed_classname3.t)("hds-accordion-item-trigger--icon")), children: itemContext.open ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FaArrowUpButNotReally, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FaArrowDownButNotReally, {}) }),
177
- children
178
- ] })
170
+ children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_typed_classname3.clsx)("hds-accordion-item-trigger--icon"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
172
+ "svg",
173
+ {
174
+ fill: "none",
175
+ height: "24",
176
+ viewBox: "0 0 24 24",
177
+ width: "24",
178
+ xmlns: "http://www.w3.org/2000/svg",
179
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { className: "hds-accordion-item-trigger--icon-chevron", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
180
+ "path",
181
+ {
182
+ className: "hds-accordion-item-trigger--icon-chevron_down",
183
+ 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"
184
+ }
185
+ ) })
186
+ }
187
+ ) }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children })
189
+ ]
179
190
  })
180
191
  );
181
192
  });
@@ -183,7 +194,6 @@ AccordionTrigger.displayName = "AccordionTrigger";
183
194
 
184
195
  // src/accordion/accordion-item-content.tsx
185
196
  var import_react5 = require("react");
186
- var import_clsx4 = require("clsx");
187
197
  var import_typed_classname4 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
188
198
  var import_jsx_runtime4 = require("react/jsx-runtime");
189
199
  var AccordionContent = (0, import_react5.forwardRef)((_a, ref) => {
@@ -195,10 +205,10 @@ var AccordionContent = (0, import_react5.forwardRef)((_a, ref) => {
195
205
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
196
206
  Component,
197
207
  __spreadProps(__spreadValues({}, rest), {
198
- className: (0, import_clsx4.clsx)(
199
- (0, import_typed_classname4.t)("hds-accordion-item-content"),
208
+ className: (0, import_typed_classname4.clsx)(
209
+ "hds-accordion-item-content",
200
210
  {
201
- [(0, import_typed_classname4.t)(`hds-accordion-item-content--closed`)]: !context.open
211
+ "hds-accordion-item-content--closed": !context.open
202
212
  },
203
213
  className
204
214
  ),
@@ -1,16 +1,16 @@
1
- import "../chunk-PCKWBORI.mjs";
1
+ import "../chunk-Z36ETKOZ.mjs";
2
2
  import {
3
3
  AccordionContent
4
- } from "../chunk-LNYNZ4EG.mjs";
4
+ } from "../chunk-J7U4Z726.mjs";
5
5
  import {
6
6
  AccordionTrigger
7
- } from "../chunk-7F7QB4D5.mjs";
7
+ } from "../chunk-2QSL2PSS.mjs";
8
8
  import {
9
9
  AccordionItem
10
- } from "../chunk-KBVDBI2L.mjs";
10
+ } from "../chunk-L7DYK6OS.mjs";
11
11
  import {
12
12
  Accordion
13
- } from "../chunk-IWV4FFE3.mjs";
13
+ } from "../chunk-GMGUONH5.mjs";
14
14
  import "../chunk-2V6SWZ5G.mjs";
15
15
  import "../chunk-FUJQIYOF.mjs";
16
16
  export {
@@ -55,23 +55,29 @@ __export(badge_exports, {
55
55
  WhiteBadge: () => WhiteBadge
56
56
  });
57
57
  module.exports = __toCommonJS(badge_exports);
58
- var import_clsx = require("clsx");
59
58
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
60
59
  var import_jsx_runtime = require("react/jsx-runtime");
61
60
  function BaseBadge(_a) {
62
61
  var _b = _a, {
63
62
  children,
64
63
  variant,
65
- size = "small"
64
+ size = "small",
65
+ className
66
66
  } = _b, rest = __objRest(_b, [
67
67
  "children",
68
68
  "variant",
69
- "size"
69
+ "size",
70
+ "className"
70
71
  ]);
71
72
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
73
  "span",
73
74
  __spreadProps(__spreadValues({
74
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-badge"), (0, import_typed_classname.t)(`hds-badge--${size}`), (0, import_typed_classname.t)(`hds-badge--${variant}`))
75
+ className: (0, import_typed_classname.clsx)(
76
+ "hds-badge",
77
+ `hds-badge--${size}`,
78
+ `hds-badge--${variant}`,
79
+ className
80
+ )
75
81
  }, rest), {
76
82
  children
77
83
  })
@@ -3,7 +3,7 @@ import {
3
3
  DarkBadge,
4
4
  WarningBadge,
5
5
  WhiteBadge
6
- } from "../chunk-O3NMR6GE.mjs";
6
+ } from "../chunk-MNSMCSAR.mjs";
7
7
  import "../chunk-FUJQIYOF.mjs";
8
8
  export {
9
9
  Badge,
@@ -55,29 +55,35 @@ __export(badge_exports, {
55
55
  WhiteBadge: () => WhiteBadge
56
56
  });
57
57
  module.exports = __toCommonJS(badge_exports);
58
- var import_fonts = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
59
- var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
58
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
59
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
60
60
  var import_base = require("@postenbring/hedwig-css/dist/base.css");
61
61
  var import_badge = require("@postenbring/hedwig-css/dist/badge.css");
62
62
 
63
63
  // src/badge/badge.tsx
64
- var import_clsx = require("clsx");
65
64
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
66
65
  var import_jsx_runtime = require("react/jsx-runtime");
67
66
  function BaseBadge(_a) {
68
67
  var _b = _a, {
69
68
  children,
70
69
  variant,
71
- size = "small"
70
+ size = "small",
71
+ className
72
72
  } = _b, rest = __objRest(_b, [
73
73
  "children",
74
74
  "variant",
75
- "size"
75
+ "size",
76
+ "className"
76
77
  ]);
77
78
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
79
  "span",
79
80
  __spreadProps(__spreadValues({
80
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-badge"), (0, import_typed_classname.t)(`hds-badge--${size}`), (0, import_typed_classname.t)(`hds-badge--${variant}`))
81
+ className: (0, import_typed_classname.clsx)(
82
+ "hds-badge",
83
+ `hds-badge--${size}`,
84
+ `hds-badge--${variant}`,
85
+ className
86
+ )
81
87
  }, rest), {
82
88
  children
83
89
  })
@@ -1,10 +1,10 @@
1
- import "../chunk-CYW3DUD2.mjs";
1
+ import "../chunk-R55SMUE7.mjs";
2
2
  import {
3
3
  Badge,
4
4
  DarkBadge,
5
5
  WarningBadge,
6
6
  WhiteBadge
7
- } from "../chunk-O3NMR6GE.mjs";
7
+ } from "../chunk-MNSMCSAR.mjs";
8
8
  import "../chunk-FUJQIYOF.mjs";
9
9
  export {
10
10
  Badge,
@@ -5,10 +5,10 @@ interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  variant?: "light-grey" | "lighter" | "white" | "warning";
6
6
  children: React.ReactNode;
7
7
  /**
8
- * If `true`, the close button will be hidden.
8
+ * If `true`, a close button will be shown.
9
9
  * Use when you want to control the close button using the BoxCloseButton component.
10
10
  */
11
- hideCloseButton?: boolean;
11
+ closeable?: boolean;
12
12
  /**
13
13
  * Callback fired when the component requests to be closed.
14
14
  * If not set, the component will be closed without any user interaction.
package/dist/box/box.d.ts CHANGED
@@ -5,10 +5,10 @@ interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  variant?: "light-grey" | "lighter" | "white" | "warning";
6
6
  children: React.ReactNode;
7
7
  /**
8
- * If `true`, the close button will be hidden.
8
+ * If `true`, a close button will be shown.
9
9
  * Use when you want to control the close button using the BoxCloseButton component.
10
10
  */
11
- hideCloseButton?: boolean;
11
+ closeable?: boolean;
12
12
  /**
13
13
  * Callback fired when the component requests to be closed.
14
14
  * If not set, the component will be closed without any user interaction.
package/dist/box/box.js CHANGED
@@ -54,7 +54,6 @@ __export(box_exports, {
54
54
  });
55
55
  module.exports = __toCommonJS(box_exports);
56
56
  var import_react = require("react");
57
- var import_clsx = require("clsx");
58
57
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
59
58
  var import_jsx_runtime = require("react/jsx-runtime");
60
59
  var Box = (0, import_react.forwardRef)(
@@ -62,7 +61,7 @@ var Box = (0, import_react.forwardRef)(
62
61
  var _b = _a, {
63
62
  as: Component = "div",
64
63
  variant = "light-grey",
65
- hideCloseButton,
64
+ closeable = false,
66
65
  onClose: onCloseProp,
67
66
  closed: closedProp,
68
67
  closeButtonProps,
@@ -71,7 +70,7 @@ var Box = (0, import_react.forwardRef)(
71
70
  } = _b, rest = __objRest(_b, [
72
71
  "as",
73
72
  "variant",
74
- "hideCloseButton",
73
+ "closeable",
75
74
  "onClose",
76
75
  "closed",
77
76
  "closeButtonProps",
@@ -93,16 +92,16 @@ var Box = (0, import_react.forwardRef)(
93
92
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
94
93
  Component,
95
94
  __spreadProps(__spreadValues({
96
- className: (0, import_clsx.clsx)(
97
- (0, import_typed_classname.t)("hds-box"),
98
- (0, import_typed_classname.t)(`hds-box--${variant}`),
99
- { [(0, import_typed_classname.t)("hds-box--closed")]: closed },
95
+ className: (0, import_typed_classname.clsx)(
96
+ "hds-box",
97
+ `hds-box--${variant}`,
98
+ { "hds-box--closed": closed },
100
99
  className
101
100
  ),
102
101
  ref
103
102
  }, rest), {
104
103
  children: [
105
- !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)),
104
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
106
105
  children
107
106
  ]
108
107
  })
@@ -116,7 +115,7 @@ var BoxCloseButton = (0, import_react.forwardRef)(
116
115
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
117
116
  "button",
118
117
  __spreadValues({
119
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-box__close-button"), className),
118
+ className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
120
119
  ref,
121
120
  type: "button"
122
121
  }, rest)
package/dist/box/box.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Box,
3
3
  BoxCloseButton
4
- } from "../chunk-EX4U7YZF.mjs";
4
+ } from "../chunk-RXUPE4MM.mjs";
5
5
  import "../chunk-FUJQIYOF.mjs";
6
6
  export {
7
7
  Box,
package/dist/box/index.js CHANGED
@@ -53,14 +53,13 @@ __export(box_exports, {
53
53
  BoxCloseButton: () => BoxCloseButton
54
54
  });
55
55
  module.exports = __toCommonJS(box_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");
56
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
57
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
58
58
  var import_base = require("@postenbring/hedwig-css/dist/base.css");
59
59
  var import_box = require("@postenbring/hedwig-css/dist/box.css");
60
60
 
61
61
  // src/box/box.tsx
62
62
  var import_react = require("react");
63
- var import_clsx = require("clsx");
64
63
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
65
64
  var import_jsx_runtime = require("react/jsx-runtime");
66
65
  var Box = (0, import_react.forwardRef)(
@@ -68,7 +67,7 @@ var Box = (0, import_react.forwardRef)(
68
67
  var _b = _a, {
69
68
  as: Component = "div",
70
69
  variant = "light-grey",
71
- hideCloseButton,
70
+ closeable = false,
72
71
  onClose: onCloseProp,
73
72
  closed: closedProp,
74
73
  closeButtonProps,
@@ -77,7 +76,7 @@ var Box = (0, import_react.forwardRef)(
77
76
  } = _b, rest = __objRest(_b, [
78
77
  "as",
79
78
  "variant",
80
- "hideCloseButton",
79
+ "closeable",
81
80
  "onClose",
82
81
  "closed",
83
82
  "closeButtonProps",
@@ -99,16 +98,16 @@ var Box = (0, import_react.forwardRef)(
99
98
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
100
99
  Component,
101
100
  __spreadProps(__spreadValues({
102
- className: (0, import_clsx.clsx)(
103
- (0, import_typed_classname.t)("hds-box"),
104
- (0, import_typed_classname.t)(`hds-box--${variant}`),
105
- { [(0, import_typed_classname.t)("hds-box--closed")]: closed },
101
+ className: (0, import_typed_classname.clsx)(
102
+ "hds-box",
103
+ `hds-box--${variant}`,
104
+ { "hds-box--closed": closed },
106
105
  className
107
106
  ),
108
107
  ref
109
108
  }, rest), {
110
109
  children: [
111
- !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)),
110
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
112
111
  children
113
112
  ]
114
113
  })
@@ -122,7 +121,7 @@ var BoxCloseButton = (0, import_react.forwardRef)(
122
121
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
122
  "button",
124
123
  __spreadValues({
125
- className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-box__close-button"), className),
124
+ className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
126
125
  ref,
127
126
  type: "button"
128
127
  }, rest)
@@ -1,8 +1,8 @@
1
- import "../chunk-ID5KKZMK.mjs";
1
+ import "../chunk-BJANCH4F.mjs";
2
2
  import {
3
3
  Box,
4
4
  BoxCloseButton
5
- } from "../chunk-EX4U7YZF.mjs";
5
+ } from "../chunk-RXUPE4MM.mjs";
6
6
  import "../chunk-FUJQIYOF.mjs";
7
7
  export {
8
8
  Box,
@@ -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.mjs';
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 };