@postenbring/hedwig-react 0.0.44 → 0.0.46

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 (228) hide show
  1. package/dist/accordion/accordion-content.d.mts +1 -1
  2. package/dist/accordion/accordion-content.d.ts +1 -1
  3. package/dist/accordion/accordion-content.mjs +2 -2
  4. package/dist/accordion/accordion-header.d.mts +1 -1
  5. package/dist/accordion/accordion-header.d.ts +1 -1
  6. package/dist/accordion/accordion-header.mjs +2 -2
  7. package/dist/accordion/accordion-item.d.mts +1 -1
  8. package/dist/accordion/accordion-item.d.ts +1 -1
  9. package/dist/accordion/accordion-item.mjs +2 -2
  10. package/dist/accordion/accordion.d.mts +1 -1
  11. package/dist/accordion/accordion.d.ts +1 -1
  12. package/dist/accordion/accordion.mjs +2 -2
  13. package/dist/accordion/index.d.mts +1 -1
  14. package/dist/accordion/index.d.ts +1 -1
  15. package/dist/accordion/index.mjs +6 -6
  16. package/dist/badge/badge.mjs +2 -2
  17. package/dist/badge/index.mjs +2 -2
  18. package/dist/box/box.d.mts +1 -1
  19. package/dist/box/box.d.ts +1 -1
  20. package/dist/box/box.mjs +2 -2
  21. package/dist/box/index.d.mts +1 -1
  22. package/dist/box/index.d.ts +1 -1
  23. package/dist/box/index.mjs +3 -3
  24. package/dist/breadcrumb/breadcrumb.mjs +2 -2
  25. package/dist/breadcrumb/index.mjs +2 -2
  26. package/dist/button/button.d.mts +1 -1
  27. package/dist/button/button.d.ts +1 -1
  28. package/dist/button/button.mjs +2 -2
  29. package/dist/button/index.d.mts +1 -1
  30. package/dist/button/index.d.ts +1 -1
  31. package/dist/button/index.mjs +2 -2
  32. package/dist/card/card.d.mts +1 -1
  33. package/dist/card/card.d.ts +1 -1
  34. package/dist/card/card.mjs +2 -2
  35. package/dist/card/index.d.mts +1 -1
  36. package/dist/card/index.d.ts +1 -1
  37. package/dist/card/index.mjs +3 -3
  38. package/dist/{chunk-WTMT5WCJ.mjs → chunk-3EENBGOV.mjs} +1 -1
  39. package/dist/chunk-3WUAXFB3.mjs +34 -0
  40. package/dist/{chunk-BHNQPMEB.mjs → chunk-3Y65IUK4.mjs} +2 -2
  41. package/dist/{chunk-Y2KP4RF2.mjs → chunk-4KBVX3Y7.mjs} +3 -3
  42. package/dist/{chunk-G3JPULGO.mjs → chunk-4LB35CUY.mjs} +1 -1
  43. package/dist/{chunk-Q3SWHAU3.mjs → chunk-4M3GIRQZ.mjs} +1 -1
  44. package/dist/{chunk-PF6PZIZS.mjs → chunk-4RAMNETH.mjs} +1 -1
  45. package/dist/{chunk-2QZF65FK.mjs → chunk-5FM3XK4V.mjs} +5 -1
  46. package/dist/{chunk-SDJXW6U7.mjs → chunk-5HF2PDRZ.mjs} +1 -1
  47. package/dist/{chunk-DOJ2ZKNV.mjs → chunk-5NWYVPBZ.mjs} +1 -1
  48. package/dist/chunk-67OMX7FP.mjs +5 -0
  49. package/dist/{chunk-GBDCEHR7.mjs → chunk-6FKQU7QT.mjs} +1 -1
  50. package/dist/{chunk-QAYPCD5Z.mjs → chunk-6KRJB36T.mjs} +22 -13
  51. package/dist/chunk-73MDVYU2.mjs +129 -0
  52. package/dist/{chunk-MER2HJBC.mjs → chunk-7P6MJKWC.mjs} +1 -1
  53. package/dist/{chunk-6XTXM4YQ.mjs → chunk-A6HNU42U.mjs} +1 -1
  54. package/dist/{chunk-3JNHAMRV.mjs → chunk-AUK3J77R.mjs} +1 -1
  55. package/dist/{chunk-LICHSDMT.mjs → chunk-B3SD7RZV.mjs} +1 -1
  56. package/dist/{chunk-RY53CJI7.mjs → chunk-BEXOLUXV.mjs} +1 -1
  57. package/dist/{chunk-ZLCNSHLT.mjs → chunk-C2VTAQEP.mjs} +1 -1
  58. package/dist/chunk-DOWBGRCN.mjs +29253 -0
  59. package/dist/chunk-FKR5F35B.mjs +70 -0
  60. package/dist/{chunk-5QMPUCNW.mjs → chunk-FPVGZ4VX.mjs} +1 -1
  61. package/dist/chunk-HIRUCFWO.mjs +25 -0
  62. package/dist/chunk-J5QNIAFL.mjs +72 -0
  63. package/dist/{chunk-KYCCTJI6.mjs → chunk-KBR5N6UB.mjs} +4 -4
  64. package/dist/{chunk-K3BGDNWO.mjs → chunk-MUGMWWNN.mjs} +3 -3
  65. package/dist/chunk-OKWNTFU5.mjs +5 -0
  66. package/dist/{chunk-SX37JSDS.mjs → chunk-OPW2JS5I.mjs} +1 -1
  67. package/dist/chunk-PPUNMHOX.mjs +0 -0
  68. package/dist/chunk-R7GQHCN4.mjs +30 -0
  69. package/dist/{chunk-6KVF3ELJ.mjs → chunk-RNALWA7A.mjs} +3 -3
  70. package/dist/{chunk-45BJGKVZ.mjs → chunk-S4F2KVFJ.mjs} +1 -1
  71. package/dist/{chunk-E5575U2F.mjs → chunk-S7FSULI3.mjs} +1 -1
  72. package/dist/{chunk-TES7CVGU.mjs → chunk-SNLXFZB6.mjs} +1 -1
  73. package/dist/{chunk-Y4KHO6LN.mjs → chunk-TEOA6K5L.mjs} +1 -1
  74. package/dist/{chunk-E2GAXTBX.mjs → chunk-UBQPNSMU.mjs} +1 -1
  75. package/dist/{chunk-FDAXJJHU.mjs → chunk-UGZSXQQQ.mjs} +1 -1
  76. package/dist/{chunk-GRO36EUL.mjs → chunk-UL2XL6BN.mjs} +1 -1
  77. package/dist/{chunk-GD4NFQGX.mjs → chunk-UOEKLXX4.mjs} +1 -1
  78. package/dist/{chunk-WUMZCEIJ.mjs → chunk-VO6ZLGZ7.mjs} +5 -5
  79. package/dist/{chunk-QC72RAQS.mjs → chunk-VT7SFAQF.mjs} +1 -1
  80. package/dist/{chunk-WYPGZY5Q.mjs → chunk-WKI6D7BR.mjs} +2 -2
  81. package/dist/{chunk-BRBGRJ2I.mjs → chunk-X5URKHFD.mjs} +2 -2
  82. package/dist/{chunk-ENRMC5K7.mjs → chunk-YBSM5D5N.mjs} +1 -1
  83. package/dist/form/error-message/error-message.d.mts +12 -0
  84. package/dist/form/error-message/error-message.d.ts +12 -0
  85. package/dist/form/error-message/error-message.js +66 -0
  86. package/dist/form/error-message/error-message.mjs +7 -0
  87. package/dist/form/error-message/index.d.mts +3 -0
  88. package/dist/form/error-message/index.d.ts +3 -0
  89. package/dist/form/error-message/index.js +72 -0
  90. package/dist/form/error-message/index.mjs +8 -0
  91. package/dist/form/fieldset/fieldset.d.mts +20 -0
  92. package/dist/form/fieldset/fieldset.d.ts +20 -0
  93. package/dist/{input-group/input-group.js → form/fieldset/fieldset.js} +65 -61
  94. package/dist/form/fieldset/fieldset.mjs +9 -0
  95. package/dist/form/fieldset/index.d.mts +2 -0
  96. package/dist/form/fieldset/index.d.ts +2 -0
  97. package/dist/form/fieldset/index.js +152 -0
  98. package/dist/form/fieldset/index.mjs +10 -0
  99. package/dist/form/index.d.mts +6 -0
  100. package/dist/form/index.d.ts +6 -0
  101. package/dist/form/index.js +375 -0
  102. package/dist/form/index.mjs +28 -0
  103. package/dist/{input/input.js → form/input/index.js} +70 -27
  104. package/dist/form/input/index.mjs +12 -0
  105. package/dist/{input/index.js → form/input/input.js} +60 -31
  106. package/dist/form/input/input.mjs +11 -0
  107. package/dist/form/input-group/index.d.mts +2 -0
  108. package/dist/form/input-group/index.d.ts +2 -0
  109. package/dist/{select/select.js → form/input-group/index.js} +60 -49
  110. package/dist/form/input-group/index.mjs +10 -0
  111. package/dist/{input-group → form/input-group}/input-group.d.mts +1 -7
  112. package/dist/{input-group → form/input-group}/input-group.d.ts +1 -7
  113. package/dist/{input-group/index.js → form/input-group/input-group.js} +51 -21
  114. package/dist/form/input-group/input-group.mjs +9 -0
  115. package/dist/form/select/index.js +216 -0
  116. package/dist/form/select/index.mjs +12 -0
  117. package/dist/{select/index.js → form/select/select.js} +60 -31
  118. package/dist/form/select/select.mjs +11 -0
  119. package/dist/{textarea/textarea.js → form/textarea/index.js} +70 -27
  120. package/dist/form/textarea/index.mjs +12 -0
  121. package/dist/{textarea/index.js → form/textarea/textarea.js} +60 -31
  122. package/dist/form/textarea/textarea.mjs +11 -0
  123. package/dist/index.d.mts +9 -7
  124. package/dist/index.d.ts +9 -7
  125. package/dist/index.js +434 -229
  126. package/dist/index.mjs +64 -46
  127. package/dist/layout/container/container.d.mts +1 -1
  128. package/dist/layout/container/container.d.ts +1 -1
  129. package/dist/layout/container/container.mjs +2 -2
  130. package/dist/layout/index.d.mts +1 -1
  131. package/dist/layout/index.d.ts +1 -1
  132. package/dist/layout/index.mjs +2 -2
  133. package/dist/link/index.d.mts +1 -1
  134. package/dist/link/index.d.ts +1 -1
  135. package/dist/link/index.mjs +2 -2
  136. package/dist/link/link.d.mts +1 -1
  137. package/dist/link/link.d.ts +1 -1
  138. package/dist/link/link.mjs +2 -2
  139. package/dist/list/description-list.d.mts +4 -4
  140. package/dist/list/description-list.d.ts +4 -4
  141. package/dist/list/description-list.mjs +2 -2
  142. package/dist/list/index.mjs +6 -6
  143. package/dist/list/link-list.mjs +3 -3
  144. package/dist/list/list.mjs +2 -2
  145. package/dist/message/index.d.mts +1 -1
  146. package/dist/message/index.d.ts +1 -1
  147. package/dist/message/index.mjs +4 -4
  148. package/dist/message/message.d.mts +1 -1
  149. package/dist/message/message.d.ts +1 -1
  150. package/dist/message/message.mjs +3 -3
  151. package/dist/modal/index.d.mts +6 -3
  152. package/dist/modal/index.d.ts +6 -3
  153. package/dist/modal/index.js +71 -3
  154. package/dist/modal/index.mjs +4 -4
  155. package/dist/modal/modal.d.mts +21 -3
  156. package/dist/modal/modal.d.ts +21 -3
  157. package/dist/modal/modal.js +77 -5
  158. package/dist/modal/modal.mjs +11 -5
  159. package/dist/navbar/icons.d.mts +6 -0
  160. package/dist/navbar/icons.d.ts +6 -0
  161. package/dist/navbar/icons.js +50 -0
  162. package/dist/navbar/icons.mjs +9 -0
  163. package/dist/navbar/index.d.mts +1 -1
  164. package/dist/navbar/index.d.ts +1 -1
  165. package/dist/navbar/index.js +29217 -15
  166. package/dist/navbar/index.mjs +4 -3
  167. package/dist/navbar/navbar-expandable-menu.d.mts +3 -2
  168. package/dist/navbar/navbar-expandable-menu.d.ts +3 -2
  169. package/dist/navbar/navbar-expandable-menu.js +29217 -15
  170. package/dist/navbar/navbar-expandable-menu.mjs +3 -2
  171. package/dist/navbar/navbar.d.mts +1 -1
  172. package/dist/navbar/navbar.d.ts +1 -1
  173. package/dist/navbar/navbar.mjs +2 -2
  174. package/dist/prose/prose.d.mts +2 -2
  175. package/dist/prose/prose.d.ts +2 -2
  176. package/dist/prose/prose.mjs +3 -29
  177. package/dist/tabs/index.d.mts +1 -1
  178. package/dist/tabs/index.d.ts +1 -1
  179. package/dist/tabs/index.mjs +5 -5
  180. package/dist/tabs/tabs-content.d.mts +1 -1
  181. package/dist/tabs/tabs-content.d.ts +1 -1
  182. package/dist/tabs/tabs-content.mjs +2 -2
  183. package/dist/tabs/tabs-list.d.mts +1 -1
  184. package/dist/tabs/tabs-list.d.ts +1 -1
  185. package/dist/tabs/tabs-list.mjs +2 -2
  186. package/dist/tabs/tabs.d.mts +1 -1
  187. package/dist/tabs/tabs.d.ts +1 -1
  188. package/dist/tabs/tabs.mjs +2 -2
  189. package/dist/typography/index.d.mts +1 -1
  190. package/dist/typography/index.d.ts +1 -1
  191. package/dist/typography/index.mjs +2 -2
  192. package/dist/typography/typography.d.mts +1 -1
  193. package/dist/typography/typography.d.ts +1 -1
  194. package/dist/typography/typography.mjs +2 -2
  195. package/dist/warning-banner/index.d.mts +1 -1
  196. package/dist/warning-banner/index.d.ts +1 -1
  197. package/dist/warning-banner/index.mjs +4 -4
  198. package/dist/warning-banner/warning-banner.d.mts +1 -1
  199. package/dist/warning-banner/warning-banner.d.ts +1 -1
  200. package/dist/warning-banner/warning-banner.mjs +4 -4
  201. package/package.json +5 -4
  202. package/dist/chunk-FUJQIYOF.mjs +0 -37
  203. package/dist/chunk-OB6UNSKV.mjs +0 -60
  204. package/dist/chunk-T5W5SKZP.mjs +0 -80
  205. package/dist/input/index.mjs +0 -10
  206. package/dist/input/input.mjs +0 -9
  207. package/dist/input-group/index.d.mts +0 -2
  208. package/dist/input-group/index.d.ts +0 -2
  209. package/dist/input-group/index.mjs +0 -8
  210. package/dist/input-group/input-group.mjs +0 -7
  211. package/dist/select/index.mjs +0 -10
  212. package/dist/select/select.mjs +0 -9
  213. package/dist/textarea/index.mjs +0 -10
  214. package/dist/textarea/textarea.mjs +0 -9
  215. /package/dist/{input → form/input}/index.d.mts +0 -0
  216. /package/dist/{input → form/input}/index.d.ts +0 -0
  217. /package/dist/{input → form/input}/input.d.mts +0 -0
  218. /package/dist/{input → form/input}/input.d.ts +0 -0
  219. /package/dist/{select → form/select}/index.d.mts +0 -0
  220. /package/dist/{select → form/select}/index.d.ts +0 -0
  221. /package/dist/{select → form/select}/select.d.mts +0 -0
  222. /package/dist/{select → form/select}/select.d.ts +0 -0
  223. /package/dist/{textarea → form/textarea}/index.d.mts +0 -0
  224. /package/dist/{textarea → form/textarea}/index.d.ts +0 -0
  225. /package/dist/{textarea → form/textarea}/textarea.d.mts +0 -0
  226. /package/dist/{textarea → form/textarea}/textarea.d.ts +0 -0
  227. /package/dist/{utils-BfZsjuFH.d.mts → utils-3jLhIyOS.d.mts} +0 -0
  228. /package/dist/{utils-BfZsjuFH.d.ts → utils-3jLhIyOS.d.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ import * as react from 'react';
2
+ import { FieldsetHTMLAttributes, CSSProperties, ReactNode, HTMLAttributes } from 'react';
3
+
4
+ interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
5
+ className?: string;
6
+ style?: CSSProperties;
7
+ errorMessage?: ReactNode;
8
+ legendProps?: HTMLAttributes<HTMLElement> & {
9
+ size: "default" | "large";
10
+ };
11
+ legend: ReactNode;
12
+ children: ReactNode;
13
+ _unstableAriaLiveOnErrorMessage?: boolean;
14
+ }
15
+ /**
16
+ * 🚨 WORK IN PROGRESS 🚨
17
+ */
18
+ declare const Fieldset: react.ForwardRefExoticComponent<FieldsetProps & react.RefAttributes<HTMLFieldSetElement>>;
19
+
20
+ export { Fieldset, type FieldsetProps };
@@ -46,91 +46,95 @@ var __copyProps = (to, from, except, desc) => {
46
46
  };
47
47
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
48
 
49
- // src/input-group/input-group.tsx
50
- var input_group_exports = {};
51
- __export(input_group_exports, {
52
- InputGroup: () => InputGroup
49
+ // src/form/fieldset/fieldset.tsx
50
+ var fieldset_exports = {};
51
+ __export(fieldset_exports, {
52
+ Fieldset: () => Fieldset
53
53
  });
54
- module.exports = __toCommonJS(input_group_exports);
54
+ module.exports = __toCommonJS(fieldset_exports);
55
55
  var import_react = require("react");
56
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
57
+
58
+ // src/form/error-message/index.tsx
59
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
60
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
61
+ var import_body = require("@postenbring/hedwig-css/dist/body.css");
62
+ var import_error_message = require("@postenbring/hedwig-css/dist/error-message.css");
63
+
64
+ // src/form/error-message/error-message.tsx
56
65
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
57
66
  var import_jsx_runtime = require("react/jsx-runtime");
58
- var InputGroup = (0, import_react.forwardRef)(function InputGroup2(_a, ref) {
67
+ function ErrorMessage({
68
+ children,
69
+ id,
70
+ className,
71
+ _unstableAriaLiveOnErrorMessage
72
+ }) {
73
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
+ "div",
75
+ __spreadProps(__spreadValues({}, _unstableAriaLiveOnErrorMessage && {
76
+ "aria-live": "polite",
77
+ "aria-relevant": "additions removals"
78
+ }), {
79
+ className: (0, import_typed_classname.clsx)("hds-error-message", className),
80
+ id,
81
+ children
82
+ })
83
+ );
84
+ }
85
+
86
+ // src/form/fieldset/fieldset.tsx
87
+ var import_jsx_runtime2 = require("react/jsx-runtime");
88
+ var Fieldset = (0, import_react.forwardRef)(function Fieldset2(_a, ref) {
59
89
  var _b = _a, {
60
- id,
61
90
  className,
62
91
  style,
63
- variant = "default",
64
92
  errorMessage,
65
- labelProps,
66
- label,
67
- disabled,
68
- readOnly,
93
+ legendProps: _c = {}
94
+ } = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
95
+ legend,
69
96
  children,
70
97
  _unstableAriaLiveOnErrorMessage = false
71
- } = _b, rest = __objRest(_b, [
72
- "id",
98
+ } = _e, rest = __objRest(_e, [
73
99
  "className",
74
100
  "style",
75
- "variant",
76
101
  "errorMessage",
77
- "labelProps",
78
- "label",
79
- "disabled",
80
- "readOnly",
102
+ "legendProps",
103
+ "legend",
81
104
  "children",
82
105
  "_unstableAriaLiveOnErrorMessage"
83
106
  ]);
84
107
  const errorMessageId = (0, import_react.useId)();
85
- const inputId = (0, import_react.useId)();
86
- const renderInput = () => {
87
- const input = import_react.Children.toArray(children)[0];
88
- if (!(0, import_react.isValidElement)(input)) {
89
- return;
90
- }
91
- return (0, import_react.cloneElement)(input, __spreadProps(__spreadValues({
108
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
109
+ "fieldset",
110
+ __spreadProps(__spreadValues({
92
111
  "aria-describedby": errorMessage ? errorMessageId : void 0,
93
112
  "aria-invalid": errorMessage ? true : void 0,
94
- id: id || inputId
95
- }, input.props), {
96
- className: (0, import_typed_classname.clsx)("hds-input-group__input", input.props.className)
97
- }));
98
- };
99
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
100
- "div",
101
- __spreadProps(__spreadValues({
102
- className: (0, import_typed_classname.clsx)(
103
- "hds-input-group",
104
- {
105
- [`hds-input-group--${variant}`]: variant,
106
- "hds-input-group--error": errorMessage
107
- },
108
- className
109
- ),
113
+ className: (0, import_typed_classname2.clsx)("hds-fieldset", className),
110
114
  ref,
111
115
  style
112
116
  }, rest), {
113
117
  children: [
114
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", __spreadProps(__spreadValues({ className: "hds-input-group__label" }, labelProps), { htmlFor: id || inputId, children: label })),
115
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
- "div",
117
- {
118
- className: (0, import_typed_classname.clsx)("hds-input-group__input-wrapper"),
119
- "data-disabled": disabled,
120
- "data-readonly": readOnly,
121
- children: renderInput()
122
- }
118
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
119
+ "legend",
120
+ __spreadProps(__spreadValues({
121
+ className: (0, import_typed_classname2.clsx)(
122
+ "hds-fieldset__legend",
123
+ { [`hds-fieldset__legend--${legendSize}`]: legendSize },
124
+ legendClassName
125
+ )
126
+ }, legendProps), {
127
+ children: legend
128
+ })
123
129
  ),
124
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
- "div",
126
- __spreadProps(__spreadValues({}, _unstableAriaLiveOnErrorMessage && {
127
- "aria-live": "polite",
128
- "aria-relevant": "additions removals"
129
- }), {
130
- className: "hds-input-group__error-message",
130
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-fieldset__input-wrapper"), children }),
131
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
132
+ ErrorMessage,
133
+ {
134
+ _unstableAriaLiveOnErrorMessage,
131
135
  id: errorMessageId,
132
- children: !!errorMessage && errorMessage
133
- })
136
+ children: errorMessage
137
+ }
134
138
  )
135
139
  ]
136
140
  })
@@ -138,5 +142,5 @@ var InputGroup = (0, import_react.forwardRef)(function InputGroup2(_a, ref) {
138
142
  });
139
143
  // Annotate the CommonJS export names for ESM import in node:
140
144
  0 && (module.exports = {
141
- InputGroup
145
+ Fieldset
142
146
  });
@@ -0,0 +1,9 @@
1
+ import {
2
+ Fieldset
3
+ } from "../../chunk-J5QNIAFL.mjs";
4
+ import "../../chunk-67OMX7FP.mjs";
5
+ import "../../chunk-R7GQHCN4.mjs";
6
+ import "../../chunk-FKR5F35B.mjs";
7
+ export {
8
+ Fieldset
9
+ };
@@ -0,0 +1,2 @@
1
+ export { Fieldset, FieldsetProps } from './fieldset.mjs';
2
+ import 'react';
@@ -0,0 +1,2 @@
1
+ export { Fieldset, FieldsetProps } from './fieldset.js';
2
+ import 'react';
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/form/fieldset/index.tsx
50
+ var fieldset_exports = {};
51
+ __export(fieldset_exports, {
52
+ Fieldset: () => Fieldset
53
+ });
54
+ module.exports = __toCommonJS(fieldset_exports);
55
+ var import_fonts2 = require("@postenbring/hedwig-css/dist/fonts.css");
56
+ var import_tokens2 = require("@postenbring/hedwig-css/dist/tokens.css");
57
+ var import_body2 = require("@postenbring/hedwig-css/dist/body.css");
58
+ var import_fieldset = require("@postenbring/hedwig-css/dist/fieldset.css");
59
+
60
+ // src/form/fieldset/fieldset.tsx
61
+ var import_react = require("react");
62
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
63
+
64
+ // src/form/error-message/index.tsx
65
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
66
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
67
+ var import_body = require("@postenbring/hedwig-css/dist/body.css");
68
+ var import_error_message = require("@postenbring/hedwig-css/dist/error-message.css");
69
+
70
+ // src/form/error-message/error-message.tsx
71
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
72
+ var import_jsx_runtime = require("react/jsx-runtime");
73
+ function ErrorMessage({
74
+ children,
75
+ id,
76
+ className,
77
+ _unstableAriaLiveOnErrorMessage
78
+ }) {
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
+ "div",
81
+ __spreadProps(__spreadValues({}, _unstableAriaLiveOnErrorMessage && {
82
+ "aria-live": "polite",
83
+ "aria-relevant": "additions removals"
84
+ }), {
85
+ className: (0, import_typed_classname.clsx)("hds-error-message", className),
86
+ id,
87
+ children
88
+ })
89
+ );
90
+ }
91
+
92
+ // src/form/fieldset/fieldset.tsx
93
+ var import_jsx_runtime2 = require("react/jsx-runtime");
94
+ var Fieldset = (0, import_react.forwardRef)(function Fieldset2(_a, ref) {
95
+ var _b = _a, {
96
+ className,
97
+ style,
98
+ errorMessage,
99
+ legendProps: _c = {}
100
+ } = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
101
+ legend,
102
+ children,
103
+ _unstableAriaLiveOnErrorMessage = false
104
+ } = _e, rest = __objRest(_e, [
105
+ "className",
106
+ "style",
107
+ "errorMessage",
108
+ "legendProps",
109
+ "legend",
110
+ "children",
111
+ "_unstableAriaLiveOnErrorMessage"
112
+ ]);
113
+ const errorMessageId = (0, import_react.useId)();
114
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
115
+ "fieldset",
116
+ __spreadProps(__spreadValues({
117
+ "aria-describedby": errorMessage ? errorMessageId : void 0,
118
+ "aria-invalid": errorMessage ? true : void 0,
119
+ className: (0, import_typed_classname2.clsx)("hds-fieldset", className),
120
+ ref,
121
+ style
122
+ }, rest), {
123
+ children: [
124
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
125
+ "legend",
126
+ __spreadProps(__spreadValues({
127
+ className: (0, import_typed_classname2.clsx)(
128
+ "hds-fieldset__legend",
129
+ { [`hds-fieldset__legend--${legendSize}`]: legendSize },
130
+ legendClassName
131
+ )
132
+ }, legendProps), {
133
+ children: legend
134
+ })
135
+ ),
136
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-fieldset__input-wrapper"), children }),
137
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
138
+ ErrorMessage,
139
+ {
140
+ _unstableAriaLiveOnErrorMessage,
141
+ id: errorMessageId,
142
+ children: errorMessage
143
+ }
144
+ )
145
+ ]
146
+ })
147
+ );
148
+ });
149
+ // Annotate the CommonJS export names for ESM import in node:
150
+ 0 && (module.exports = {
151
+ Fieldset
152
+ });
@@ -0,0 +1,10 @@
1
+ import "../../chunk-OKWNTFU5.mjs";
2
+ import {
3
+ Fieldset
4
+ } from "../../chunk-J5QNIAFL.mjs";
5
+ import "../../chunk-67OMX7FP.mjs";
6
+ import "../../chunk-R7GQHCN4.mjs";
7
+ import "../../chunk-FKR5F35B.mjs";
8
+ export {
9
+ Fieldset
10
+ };
@@ -0,0 +1,6 @@
1
+ export { Fieldset, FieldsetProps } from './fieldset/fieldset.mjs';
2
+ export { Input, InputProps } from './input/input.mjs';
3
+ export { Select, SelectProps } from './select/select.mjs';
4
+ export { Textarea, TextareaProps } from './textarea/textarea.mjs';
5
+ import 'react';
6
+ import './input-group/input-group.mjs';
@@ -0,0 +1,6 @@
1
+ export { Fieldset, FieldsetProps } from './fieldset/fieldset.js';
2
+ export { Input, InputProps } from './input/input.js';
3
+ export { Select, SelectProps } from './select/select.js';
4
+ export { Textarea, TextareaProps } from './textarea/textarea.js';
5
+ import 'react';
6
+ import './input-group/input-group.js';