@postenbring/hedwig-react 0.0.60 → 0.0.61
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.
- package/dist/_tsup-dts-rollup.d.mts +142 -96
- package/dist/_tsup-dts-rollup.d.ts +142 -96
- package/dist/badge/badge.js +1 -0
- package/dist/badge/badge.js.map +1 -1
- package/dist/badge/badge.mjs +1 -1
- package/dist/badge/index.js +1 -0
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +1 -1
- package/dist/chunk-2KX7VFN2.mjs +1 -0
- package/dist/{chunk-3ADVRQ3D.mjs → chunk-2LKUHKL4.mjs} +3 -3
- package/dist/chunk-2LKUHKL4.mjs.map +1 -0
- package/dist/{chunk-MDA3MMNA.mjs → chunk-5QL53TR2.mjs} +2 -1
- package/dist/{chunk-MDA3MMNA.mjs.map → chunk-5QL53TR2.mjs.map} +1 -1
- package/dist/chunk-DZNH5JHY.mjs +1 -0
- package/dist/{chunk-ZUKLWHUR.mjs → chunk-GJDRW6PA.mjs} +3 -2
- package/dist/{chunk-ZUKLWHUR.mjs.map → chunk-GJDRW6PA.mjs.map} +1 -1
- package/dist/chunk-H4GIHEB2.mjs +1 -0
- package/dist/{chunk-44X6U32G.mjs → chunk-OYJQ5MAS.mjs} +2 -1
- package/dist/{chunk-44X6U32G.mjs.map → chunk-OYJQ5MAS.mjs.map} +1 -1
- package/dist/{chunk-PTANXZW6.mjs → chunk-PMLDK3VC.mjs} +2 -1
- package/dist/{chunk-PTANXZW6.mjs.map → chunk-PMLDK3VC.mjs.map} +1 -1
- package/dist/chunk-V4NGUB4I.mjs +34 -0
- package/dist/chunk-V4NGUB4I.mjs.map +1 -0
- package/dist/{chunk-Q3GMWURJ.mjs → chunk-VKRPPQ6F.mjs} +6 -6
- package/dist/{chunk-JDJQFQQ6.mjs → chunk-W3D4VR4Y.mjs} +2 -1
- package/dist/{chunk-JDJQFQQ6.mjs.map → chunk-W3D4VR4Y.mjs.map} +1 -1
- package/dist/chunk-WGVZWX5L.mjs +82 -0
- package/dist/chunk-WGVZWX5L.mjs.map +1 -0
- package/dist/form/index.d.mts +3 -0
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.js +65 -8
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +7 -3
- package/dist/form/radiobutton/index.d.mts +3 -0
- package/dist/form/radiobutton/index.d.ts +3 -0
- package/dist/form/radiobutton/index.js +135 -8
- package/dist/form/radiobutton/index.js.map +1 -1
- package/dist/form/radiobutton/index.mjs +10 -2
- package/dist/form/radiobutton/radiobutton.js +133 -8
- package/dist/form/radiobutton/radiobutton.js.map +1 -1
- package/dist/form/radiobutton/radiobutton.mjs +6 -1
- package/dist/form/radiobutton/radiogroup.d.mts +3 -0
- package/dist/form/radiobutton/radiogroup.d.ts +3 -0
- package/dist/form/radiobutton/radiogroup.js +145 -0
- package/dist/form/radiobutton/radiogroup.js.map +1 -0
- package/dist/form/radiobutton/radiogroup.mjs +14 -0
- package/dist/form/radiobutton/radiogroup.mjs.map +1 -0
- package/dist/index-no-css.d.mts +3 -0
- package/dist/index-no-css.d.ts +3 -0
- package/dist/index-no-css.js +218 -156
- package/dist/index-no-css.js.map +1 -1
- package/dist/index-no-css.mjs +23 -18
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +218 -156
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -18
- package/dist/index.mjs.map +1 -1
- package/dist/link/index.js +1 -0
- package/dist/link/index.js.map +1 -1
- package/dist/link/index.mjs +1 -1
- package/dist/link/link.js +1 -0
- package/dist/link/link.js.map +1 -1
- package/dist/link/link.mjs +1 -1
- package/dist/list/index.js +2 -0
- package/dist/list/index.js.map +1 -1
- package/dist/list/index.mjs +2 -2
- package/dist/list/link-list.js +2 -0
- package/dist/list/link-list.js.map +1 -1
- package/dist/list/link-list.mjs +2 -2
- package/dist/list/list.js +1 -0
- package/dist/list/list.js.map +1 -1
- package/dist/list/list.mjs +1 -1
- package/dist/navbar/index.mjs +2 -2
- package/dist/show-more/index.d.mts +2 -2
- package/dist/show-more/index.d.ts +2 -2
- package/dist/show-more/index.js +2 -2
- package/dist/show-more/index.js.map +1 -1
- package/dist/show-more/index.mjs +3 -3
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/skeleton/skeleton.js +1 -0
- package/dist/skeleton/skeleton.js.map +1 -1
- package/dist/skeleton/skeleton.mjs +1 -1
- package/dist/utilities/auto-animate-height.d.mts +2 -0
- package/dist/utilities/auto-animate-height.d.ts +2 -0
- package/dist/{show-more → utilities}/auto-animate-height.js +2 -2
- package/dist/utilities/auto-animate-height.js.map +1 -0
- package/dist/{show-more → utilities}/auto-animate-height.mjs +1 -1
- package/dist/utilities/auto-animate-height.mjs.map +1 -0
- package/dist/utilities/index.d.mts +2 -0
- package/dist/utilities/index.d.ts +2 -0
- package/dist/utilities/index.js +137 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/index.mjs +9 -0
- package/dist/utilities/index.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/chunk-3ADVRQ3D.mjs.map +0 -1
- package/dist/chunk-DY7LD3X3.mjs +0 -1
- package/dist/chunk-MQ3EEUTP.mjs +0 -1
- package/dist/chunk-SEKRICE4.mjs +0 -42
- package/dist/chunk-SEKRICE4.mjs.map +0 -1
- package/dist/show-more/auto-animate-height.d.mts +0 -2
- package/dist/show-more/auto-animate-height.d.ts +0 -2
- package/dist/show-more/auto-animate-height.js.map +0 -1
- /package/dist/{chunk-DY7LD3X3.mjs.map → chunk-2KX7VFN2.mjs.map} +0 -0
- /package/dist/{chunk-MQ3EEUTP.mjs.map → chunk-DZNH5JHY.mjs.map} +0 -0
- /package/dist/{show-more/auto-animate-height.mjs.map → chunk-H4GIHEB2.mjs.map} +0 -0
- /package/dist/{chunk-Q3GMWURJ.mjs.map → chunk-VKRPPQ6F.mjs.map} +0 -0
|
@@ -49,21 +49,139 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
49
49
|
// src/form/radiobutton/index.tsx
|
|
50
50
|
var radiobutton_exports = {};
|
|
51
51
|
__export(radiobutton_exports, {
|
|
52
|
+
RadioGroup: () => RadioGroup,
|
|
52
53
|
Radiobutton: () => Radiobutton
|
|
53
54
|
});
|
|
54
55
|
module.exports = __toCommonJS(radiobutton_exports);
|
|
55
56
|
|
|
56
57
|
// src/form/radiobutton/radiobutton.tsx
|
|
58
|
+
var import_react3 = require("react");
|
|
59
|
+
var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname");
|
|
60
|
+
|
|
61
|
+
// src/form/radiobutton/radiogroup.tsx
|
|
62
|
+
var import_react2 = require("react");
|
|
63
|
+
|
|
64
|
+
// src/form/fieldset/fieldset.tsx
|
|
57
65
|
var import_react = require("react");
|
|
66
|
+
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
|
|
67
|
+
|
|
68
|
+
// src/form/error-message/error-message.tsx
|
|
58
69
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
59
70
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
60
|
-
|
|
71
|
+
function ErrorMessage({ children, id, className }) {
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
"aria-live": "assertive",
|
|
76
|
+
className: (0, import_typed_classname.clsx)("hds-error-message", className),
|
|
77
|
+
id,
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/form/fieldset/fieldset.tsx
|
|
84
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
85
|
+
var Fieldset = (0, import_react.forwardRef)(function Fieldset2(_a, ref) {
|
|
86
|
+
var _b = _a, {
|
|
87
|
+
className,
|
|
88
|
+
style,
|
|
89
|
+
errorMessage,
|
|
90
|
+
legendProps: _c = {}
|
|
91
|
+
} = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
|
|
92
|
+
legend,
|
|
93
|
+
children
|
|
94
|
+
} = _e, rest = __objRest(_e, [
|
|
95
|
+
"className",
|
|
96
|
+
"style",
|
|
97
|
+
"errorMessage",
|
|
98
|
+
"legendProps",
|
|
99
|
+
"legend",
|
|
100
|
+
"children"
|
|
101
|
+
]);
|
|
102
|
+
const errorMessageId = (0, import_react.useId)();
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
104
|
+
"fieldset",
|
|
105
|
+
__spreadProps(__spreadValues({
|
|
106
|
+
"aria-describedby": errorMessage ? errorMessageId : void 0,
|
|
107
|
+
"aria-invalid": errorMessage ? true : void 0,
|
|
108
|
+
className: (0, import_typed_classname2.clsx)("hds-fieldset", className),
|
|
109
|
+
ref,
|
|
110
|
+
style
|
|
111
|
+
}, rest), {
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
|
+
"legend",
|
|
115
|
+
__spreadProps(__spreadValues({
|
|
116
|
+
className: (0, import_typed_classname2.clsx)(
|
|
117
|
+
"hds-fieldset__legend",
|
|
118
|
+
{ [`hds-fieldset__legend--${legendSize}`]: legendSize },
|
|
119
|
+
legendClassName
|
|
120
|
+
)
|
|
121
|
+
}, legendProps), {
|
|
122
|
+
children: legend
|
|
123
|
+
})
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-fieldset__input-wrapper"), children }),
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorMessage, { id: errorMessageId, children: errorMessage })
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// src/form/radiobutton/radiogroup.tsx
|
|
133
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
134
|
+
var RadioGroupContext = (0, import_react2.createContext)({
|
|
135
|
+
hasError: false,
|
|
136
|
+
onChange: () => {
|
|
137
|
+
return void 0;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var useRadioGroupContext = () => (0, import_react2.useContext)(RadioGroupContext);
|
|
141
|
+
var RadioGroup = (0, import_react2.forwardRef)(function RadioGroup2(_a, ref) {
|
|
142
|
+
var _b = _a, { name, value, errorMessage, onChange, children } = _b, rest = __objRest(_b, ["name", "value", "errorMessage", "onChange", "children"]);
|
|
143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadioGroupContext.Provider, { value: { name, value, hasError: Boolean(errorMessage), onChange }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Fieldset, __spreadProps(__spreadValues({ errorMessage }, rest), { ref, children })) });
|
|
144
|
+
});
|
|
145
|
+
RadioGroup.displayName = "RadioGroup";
|
|
146
|
+
|
|
147
|
+
// src/form/radiobutton/radiobutton.tsx
|
|
148
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
149
|
+
var isChecked = ({
|
|
150
|
+
checked,
|
|
151
|
+
selectedValue,
|
|
152
|
+
value
|
|
153
|
+
}) => {
|
|
154
|
+
if (typeof checked !== "undefined")
|
|
155
|
+
return checked;
|
|
156
|
+
if (typeof selectedValue !== "undefined")
|
|
157
|
+
return value === selectedValue;
|
|
158
|
+
return void 0;
|
|
159
|
+
};
|
|
160
|
+
var Radiobutton = (0, import_react3.forwardRef)(
|
|
61
161
|
(_a, ref) => {
|
|
62
|
-
var _b = _a, {
|
|
63
|
-
|
|
162
|
+
var _b = _a, {
|
|
163
|
+
checked,
|
|
164
|
+
value,
|
|
165
|
+
variant = "plain",
|
|
166
|
+
hasError: hasErrorProp,
|
|
167
|
+
title,
|
|
168
|
+
children,
|
|
169
|
+
className
|
|
170
|
+
} = _b, rest = __objRest(_b, [
|
|
171
|
+
"checked",
|
|
172
|
+
"value",
|
|
173
|
+
"variant",
|
|
174
|
+
"hasError",
|
|
175
|
+
"title",
|
|
176
|
+
"children",
|
|
177
|
+
"className"
|
|
178
|
+
]);
|
|
179
|
+
const _a2 = useRadioGroupContext(), { value: selectedValue, hasError: hasErrorContext } = _a2, context = __objRest(_a2, ["value", "hasError"]);
|
|
180
|
+
const hasError = hasErrorContext || hasErrorProp;
|
|
181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
64
182
|
"div",
|
|
65
183
|
{
|
|
66
|
-
className: (0,
|
|
184
|
+
className: (0, import_typed_classname3.clsx)(
|
|
67
185
|
"hds-radiobutton",
|
|
68
186
|
{
|
|
69
187
|
[`hds-radiobutton--${variant}`]: variant === "bounding-box",
|
|
@@ -72,10 +190,18 @@ var Radiobutton = (0, import_react.forwardRef)(
|
|
|
72
190
|
className
|
|
73
191
|
),
|
|
74
192
|
children: [
|
|
75
|
-
/* @__PURE__ */ (0,
|
|
76
|
-
/* @__PURE__ */ (0,
|
|
77
|
-
|
|
78
|
-
|
|
193
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { children: [
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
195
|
+
"input",
|
|
196
|
+
__spreadProps(__spreadValues(__spreadValues({}, context), rest), {
|
|
197
|
+
checked: isChecked({ checked, selectedValue, value }),
|
|
198
|
+
value,
|
|
199
|
+
ref,
|
|
200
|
+
type: "radio"
|
|
201
|
+
})
|
|
202
|
+
),
|
|
203
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "hds-radiobutton__checkmark" }),
|
|
204
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "hds-radiobutton__title", children: title }) : children
|
|
79
205
|
] }),
|
|
80
206
|
title ? children : null
|
|
81
207
|
]
|
|
@@ -86,6 +212,7 @@ var Radiobutton = (0, import_react.forwardRef)(
|
|
|
86
212
|
Radiobutton.displayName = "Radiobutton";
|
|
87
213
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
214
|
0 && (module.exports = {
|
|
215
|
+
RadioGroup,
|
|
89
216
|
Radiobutton
|
|
90
217
|
});
|
|
91
218
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/form/radiobutton/index.tsx","../../../src/form/radiobutton/radiobutton.tsx"],"sourcesContent":["export { Radiobutton } from \"./radiobutton\";\nexport type * from \"./radiobutton\";\n","import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface RadiobuttonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nexport const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(\n ({
|
|
1
|
+
{"version":3,"sources":["../../../src/form/radiobutton/index.tsx","../../../src/form/radiobutton/radiobutton.tsx","../../../src/form/radiobutton/radiogroup.tsx","../../../src/form/fieldset/fieldset.tsx","../../../src/form/error-message/error-message.tsx"],"sourcesContent":["export { Radiobutton } from \"./radiobutton\";\nexport type * from \"./radiobutton\";\nexport { RadioGroup } from \"./radiogroup\";\nexport type * from \"./radiogroup\";\n","import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radiogroup\";\n\nexport interface RadiobuttonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadiobuttonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioGroupProps[\"value\"];\n}) => {\n if (typeof checked !== \"undefined\") return checked;\n if (typeof selectedValue !== \"undefined\") return value === selectedValue;\n return undefined;\n};\n\nexport const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(\n (\n {\n checked,\n value,\n variant = \"plain\",\n hasError: hasErrorProp,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const { value: selectedValue, hasError: hasErrorContext, ...context } = useRadioGroupContext();\n const hasError = hasErrorContext || hasErrorProp;\n return (\n <div\n className={clsx(\n \"hds-radiobutton\",\n {\n [`hds-radiobutton--${variant}`]: variant === \"bounding-box\",\n \"hds-radiobutton--error\": hasError,\n },\n className as undefined,\n )}\n >\n <label>\n <input\n {...context}\n {...rest}\n checked={isChecked({ checked, selectedValue, value })}\n value={value}\n ref={ref}\n type=\"radio\"\n />\n <span aria-hidden className=\"hds-radiobutton__checkmark\" />\n {title ? <p className=\"hds-radiobutton__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadiobutton.displayName = \"Radiobutton\";\n","import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadiobuttonProps } from \"./radiobutton\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n /** Will be passed to all Radiobuttons within the radio group */\n name?: RadiobuttonProps[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: RadiobuttonProps[\"value\"];\n /**\n * Error message is passed to the internal Fieldset,\n * and also marks all radiobuttons as invalid\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radiobuttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = {\n hasError: boolean;\n} & Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n hasError: false,\n onChange: () => {\n return undefined;\n },\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, errorMessage, onChange, children, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, hasError: Boolean(errorMessage), onChange }}>\n <Fieldset errorMessage={errorMessage} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n});\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { useId, forwardRef } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n}\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n legendProps: { size: legendSize = \"default\", className: legendClassName, ...legendProps } = {},\n legend,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n\n return (\n <fieldset\n aria-describedby={errorMessage ? errorMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", className as undefined)}\n ref={ref}\n style={style}\n {...rest}\n >\n <legend\n className={clsx(\n \"hds-fieldset__legend\",\n { [`hds-fieldset__legend--${legendSize}`]: legendSize },\n legendClassName as undefined,\n )}\n {...legendProps}\n >\n {legend}\n </legend>\n <div className={clsx(\"hds-fieldset__input-wrapper\")}>{children}</div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </fieldset>\n );\n});\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorMessageProps {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport function ErrorMessage({ children, id, className }: ErrorMessageProps) {\n return (\n <div\n aria-live=\"assertive\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n >\n {children}\n </div>\n );\n}\n"],"mappings":"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","names":["import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","Fieldset","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a"]}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-2KX7VFN2.mjs";
|
|
2
2
|
import {
|
|
3
3
|
Radiobutton
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-WGVZWX5L.mjs";
|
|
5
|
+
import {
|
|
6
|
+
RadioGroup
|
|
7
|
+
} from "../../chunk-V4NGUB4I.mjs";
|
|
8
|
+
import "../../chunk-LMF3QGSF.mjs";
|
|
9
|
+
import "../../chunk-37WVYY6X.mjs";
|
|
10
|
+
import "../../chunk-NSLSA7F7.mjs";
|
|
11
|
+
import "../../chunk-IL7576PP.mjs";
|
|
5
12
|
import "../../chunk-R4SQKVDQ.mjs";
|
|
6
13
|
export {
|
|
14
|
+
RadioGroup,
|
|
7
15
|
Radiobutton
|
|
8
16
|
};
|
|
9
17
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -52,16 +52,133 @@ __export(radiobutton_exports, {
|
|
|
52
52
|
Radiobutton: () => Radiobutton
|
|
53
53
|
});
|
|
54
54
|
module.exports = __toCommonJS(radiobutton_exports);
|
|
55
|
+
var import_react3 = require("react");
|
|
56
|
+
var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname");
|
|
57
|
+
|
|
58
|
+
// src/form/radiobutton/radiogroup.tsx
|
|
59
|
+
var import_react2 = require("react");
|
|
60
|
+
|
|
61
|
+
// src/form/fieldset/fieldset.tsx
|
|
55
62
|
var import_react = require("react");
|
|
63
|
+
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
|
|
64
|
+
|
|
65
|
+
// src/form/error-message/error-message.tsx
|
|
56
66
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
57
67
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
|
-
|
|
68
|
+
function ErrorMessage({ children, id, className }) {
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"aria-live": "assertive",
|
|
73
|
+
className: (0, import_typed_classname.clsx)("hds-error-message", className),
|
|
74
|
+
id,
|
|
75
|
+
children
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/form/fieldset/fieldset.tsx
|
|
81
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
82
|
+
var Fieldset = (0, import_react.forwardRef)(function Fieldset2(_a, ref) {
|
|
83
|
+
var _b = _a, {
|
|
84
|
+
className,
|
|
85
|
+
style,
|
|
86
|
+
errorMessage,
|
|
87
|
+
legendProps: _c = {}
|
|
88
|
+
} = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
|
|
89
|
+
legend,
|
|
90
|
+
children
|
|
91
|
+
} = _e, rest = __objRest(_e, [
|
|
92
|
+
"className",
|
|
93
|
+
"style",
|
|
94
|
+
"errorMessage",
|
|
95
|
+
"legendProps",
|
|
96
|
+
"legend",
|
|
97
|
+
"children"
|
|
98
|
+
]);
|
|
99
|
+
const errorMessageId = (0, import_react.useId)();
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
101
|
+
"fieldset",
|
|
102
|
+
__spreadProps(__spreadValues({
|
|
103
|
+
"aria-describedby": errorMessage ? errorMessageId : void 0,
|
|
104
|
+
"aria-invalid": errorMessage ? true : void 0,
|
|
105
|
+
className: (0, import_typed_classname2.clsx)("hds-fieldset", className),
|
|
106
|
+
ref,
|
|
107
|
+
style
|
|
108
|
+
}, rest), {
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
111
|
+
"legend",
|
|
112
|
+
__spreadProps(__spreadValues({
|
|
113
|
+
className: (0, import_typed_classname2.clsx)(
|
|
114
|
+
"hds-fieldset__legend",
|
|
115
|
+
{ [`hds-fieldset__legend--${legendSize}`]: legendSize },
|
|
116
|
+
legendClassName
|
|
117
|
+
)
|
|
118
|
+
}, legendProps), {
|
|
119
|
+
children: legend
|
|
120
|
+
})
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-fieldset__input-wrapper"), children }),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorMessage, { id: errorMessageId, children: errorMessage })
|
|
124
|
+
]
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// src/form/radiobutton/radiogroup.tsx
|
|
130
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
131
|
+
var RadioGroupContext = (0, import_react2.createContext)({
|
|
132
|
+
hasError: false,
|
|
133
|
+
onChange: () => {
|
|
134
|
+
return void 0;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
var useRadioGroupContext = () => (0, import_react2.useContext)(RadioGroupContext);
|
|
138
|
+
var RadioGroup = (0, import_react2.forwardRef)(function RadioGroup2(_a, ref) {
|
|
139
|
+
var _b = _a, { name, value, errorMessage, onChange, children } = _b, rest = __objRest(_b, ["name", "value", "errorMessage", "onChange", "children"]);
|
|
140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadioGroupContext.Provider, { value: { name, value, hasError: Boolean(errorMessage), onChange }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Fieldset, __spreadProps(__spreadValues({ errorMessage }, rest), { ref, children })) });
|
|
141
|
+
});
|
|
142
|
+
RadioGroup.displayName = "RadioGroup";
|
|
143
|
+
|
|
144
|
+
// src/form/radiobutton/radiobutton.tsx
|
|
145
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
146
|
+
var isChecked = ({
|
|
147
|
+
checked,
|
|
148
|
+
selectedValue,
|
|
149
|
+
value
|
|
150
|
+
}) => {
|
|
151
|
+
if (typeof checked !== "undefined")
|
|
152
|
+
return checked;
|
|
153
|
+
if (typeof selectedValue !== "undefined")
|
|
154
|
+
return value === selectedValue;
|
|
155
|
+
return void 0;
|
|
156
|
+
};
|
|
157
|
+
var Radiobutton = (0, import_react3.forwardRef)(
|
|
59
158
|
(_a, ref) => {
|
|
60
|
-
var _b = _a, {
|
|
61
|
-
|
|
159
|
+
var _b = _a, {
|
|
160
|
+
checked,
|
|
161
|
+
value,
|
|
162
|
+
variant = "plain",
|
|
163
|
+
hasError: hasErrorProp,
|
|
164
|
+
title,
|
|
165
|
+
children,
|
|
166
|
+
className
|
|
167
|
+
} = _b, rest = __objRest(_b, [
|
|
168
|
+
"checked",
|
|
169
|
+
"value",
|
|
170
|
+
"variant",
|
|
171
|
+
"hasError",
|
|
172
|
+
"title",
|
|
173
|
+
"children",
|
|
174
|
+
"className"
|
|
175
|
+
]);
|
|
176
|
+
const _a2 = useRadioGroupContext(), { value: selectedValue, hasError: hasErrorContext } = _a2, context = __objRest(_a2, ["value", "hasError"]);
|
|
177
|
+
const hasError = hasErrorContext || hasErrorProp;
|
|
178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
62
179
|
"div",
|
|
63
180
|
{
|
|
64
|
-
className: (0,
|
|
181
|
+
className: (0, import_typed_classname3.clsx)(
|
|
65
182
|
"hds-radiobutton",
|
|
66
183
|
{
|
|
67
184
|
[`hds-radiobutton--${variant}`]: variant === "bounding-box",
|
|
@@ -70,10 +187,18 @@ var Radiobutton = (0, import_react.forwardRef)(
|
|
|
70
187
|
className
|
|
71
188
|
),
|
|
72
189
|
children: [
|
|
73
|
-
/* @__PURE__ */ (0,
|
|
74
|
-
/* @__PURE__ */ (0,
|
|
75
|
-
|
|
76
|
-
|
|
190
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { children: [
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
192
|
+
"input",
|
|
193
|
+
__spreadProps(__spreadValues(__spreadValues({}, context), rest), {
|
|
194
|
+
checked: isChecked({ checked, selectedValue, value }),
|
|
195
|
+
value,
|
|
196
|
+
ref,
|
|
197
|
+
type: "radio"
|
|
198
|
+
})
|
|
199
|
+
),
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "hds-radiobutton__checkmark" }),
|
|
201
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "hds-radiobutton__title", children: title }) : children
|
|
77
202
|
] }),
|
|
78
203
|
title ? children : null
|
|
79
204
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/form/radiobutton/radiobutton.tsx"],"sourcesContent":["import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface RadiobuttonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nexport const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(\n ({
|
|
1
|
+
{"version":3,"sources":["../../../src/form/radiobutton/radiobutton.tsx","../../../src/form/radiobutton/radiogroup.tsx","../../../src/form/fieldset/fieldset.tsx","../../../src/form/error-message/error-message.tsx"],"sourcesContent":["import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radiogroup\";\n\nexport interface RadiobuttonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadiobuttonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioGroupProps[\"value\"];\n}) => {\n if (typeof checked !== \"undefined\") return checked;\n if (typeof selectedValue !== \"undefined\") return value === selectedValue;\n return undefined;\n};\n\nexport const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(\n (\n {\n checked,\n value,\n variant = \"plain\",\n hasError: hasErrorProp,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const { value: selectedValue, hasError: hasErrorContext, ...context } = useRadioGroupContext();\n const hasError = hasErrorContext || hasErrorProp;\n return (\n <div\n className={clsx(\n \"hds-radiobutton\",\n {\n [`hds-radiobutton--${variant}`]: variant === \"bounding-box\",\n \"hds-radiobutton--error\": hasError,\n },\n className as undefined,\n )}\n >\n <label>\n <input\n {...context}\n {...rest}\n checked={isChecked({ checked, selectedValue, value })}\n value={value}\n ref={ref}\n type=\"radio\"\n />\n <span aria-hidden className=\"hds-radiobutton__checkmark\" />\n {title ? <p className=\"hds-radiobutton__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadiobutton.displayName = \"Radiobutton\";\n","import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadiobuttonProps } from \"./radiobutton\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n /** Will be passed to all Radiobuttons within the radio group */\n name?: RadiobuttonProps[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: RadiobuttonProps[\"value\"];\n /**\n * Error message is passed to the internal Fieldset,\n * and also marks all radiobuttons as invalid\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radiobuttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = {\n hasError: boolean;\n} & Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n hasError: false,\n onChange: () => {\n return undefined;\n },\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, errorMessage, onChange, children, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, hasError: Boolean(errorMessage), onChange }}>\n <Fieldset errorMessage={errorMessage} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n});\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { useId, forwardRef } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n}\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n legendProps: { size: legendSize = \"default\", className: legendClassName, ...legendProps } = {},\n legend,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n\n return (\n <fieldset\n aria-describedby={errorMessage ? errorMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", className as undefined)}\n ref={ref}\n style={style}\n {...rest}\n >\n <legend\n className={clsx(\n \"hds-fieldset__legend\",\n { [`hds-fieldset__legend--${legendSize}`]: legendSize },\n legendClassName as undefined,\n )}\n {...legendProps}\n >\n {legend}\n </legend>\n <div className={clsx(\"hds-fieldset__input-wrapper\")}>{children}</div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </fieldset>\n );\n});\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorMessageProps {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport function ErrorMessage({ children, id, className }: ErrorMessageProps) {\n return (\n <div\n aria-live=\"assertive\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n >\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAAA,gBAAkC;AAClC,IAAAC,0BAAqB;;;ACFrB,IAAAC,gBAMO;;;ACNP,mBAAkC;AAElC,IAAAC,0BAAqB;;;ACFrB,6BAAqB;AAWjB;AAFG,SAAS,aAAa,EAAE,UAAU,IAAI,UAAU,GAAsB;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,eAAW,6BAAK,qBAAqB,SAAsB;AAAA,MAC3D;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;;;ADUI,IAAAC,sBAAA;AAfG,IAAM,eAAW,yBAA+C,SAASC,UAC9E,IASA,KACA;AAVA,eAIe;AAAA,IAHb;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,KAA+E,CAAC;AAAA,EAnBjG,IAeE,IAIe,SAAE,QAAM,aAAa,WAAW,WAAW,gBAnB5D,IAmBiB,IAA+D,wBAA/D,IAA+D,CAA7D,QAA8B,eAJ/C,SAKE;AAAA;AAAA,IACA;AAAA,EArBJ,IAeE,IAOK,iBAPL,IAOK;AAAA,IANH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKF,QAAM,qBAAiB,oBAAM;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,oBAAkB,eAAe,iBAAiB;AAAA,MAClD,gBAAc,eAAe,OAAO;AAAA,MACpC,eAAW,8BAAK,gBAAgB,SAAsB;AAAA,MACtD;AAAA,MACA;AAAA,OACI,OANL;AAAA,MAQC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,EAAE,CAAC,yBAAyB,UAAU,EAAE,GAAG,WAAW;AAAA,cACtD;AAAA,YACF;AAAA,aACI,cANL;AAAA,YAQE;AAAA;AAAA,QACH;AAAA,QACA,6CAAC,SAAI,eAAW,8BAAK,6BAA6B,GAAI,UAAS;AAAA,QAC/D,6CAAC,gBAAa,IAAI,gBAAiB,wBAAa;AAAA;AAAA;AAAA,EAClD;AAEJ,CAAC;;;ADRK,IAAAC,sBAAA;AAfN,IAAM,wBAAoB,6BAAsC;AAAA,EAC9D,UAAU;AAAA,EACV,UAAU,MAAM;AACd,WAAO;AAAA,EACT;AACF,CAAC;AAEM,IAAM,uBAAuB,UAAM,0BAAW,iBAAiB;AAE/D,IAAM,iBAAa,0BAAiD,SAASC,YAClF,IACA,KACA;AAFA,eAAE,QAAM,OAAO,cAAc,UAAU,SAtCzC,IAsCE,IAAoD,iBAApD,IAAoD,CAAlD,QAAM,SAAO,gBAAc,YAAU;AAGvC,SACE,6CAAC,kBAAkB,UAAlB,EAA2B,OAAO,EAAE,MAAM,OAAO,UAAU,QAAQ,YAAY,GAAG,SAAS,GAC1F,uDAAC,yCAAS,gBAAgC,OAAzC,EAA+C,KAC7C,WACH,GACF;AAEJ,CAAC;AAED,WAAW,cAAc;;;ADCjB,IAAAC,sBAAA;AAvCR,IAAM,YAAY,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF,MAEM;AACJ,MAAI,OAAO,YAAY;AAAa,WAAO;AAC3C,MAAI,OAAO,kBAAkB;AAAa,WAAO,UAAU;AAC3D,SAAO;AACT;AAEO,IAAM,kBAAc;AAAA,EACzB,CACE,IAUA,QACG;AAXH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAjCN,IA0BI,IAQK,iBARL,IAQK;AAAA,MAPH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAwEC,MAAA,qBAAqB,GAArF,SAAO,eAAe,UAAU,gBAtC5C,IAsC4EA,KAAZ,oBAAYA,KAAZ,CAApD,SAAsB;AAC9B,UAAM,WAAW,mBAAmB;AACpC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,CAAC,oBAAoB,OAAO,EAAE,GAAG,YAAY;AAAA,YAC7C,0BAA0B;AAAA,UAC5B;AAAA,UACA;AAAA,QACF;AAAA,QAEA;AAAA,wDAAC,WACC;AAAA;AAAA,cAAC;AAAA,8DACK,UACA,OAFL;AAAA,gBAGC,SAAS,UAAU,EAAE,SAAS,eAAe,MAAM,CAAC;AAAA,gBACpD;AAAA,gBACA;AAAA,gBACA,MAAK;AAAA;AAAA,YACP;AAAA,YACA,6CAAC,UAAK,eAAW,MAAC,WAAU,8BAA6B;AAAA,YACxD,QAAQ,6CAAC,OAAE,WAAU,0BAA0B,iBAAM,IAAO;AAAA,aAC/D;AAAA,UACC,QAAQ,WAAW;AAAA;AAAA;AAAA,IACtB;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","Fieldset","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Radiobutton
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-WGVZWX5L.mjs";
|
|
4
|
+
import "../../chunk-V4NGUB4I.mjs";
|
|
5
|
+
import "../../chunk-LMF3QGSF.mjs";
|
|
6
|
+
import "../../chunk-37WVYY6X.mjs";
|
|
7
|
+
import "../../chunk-NSLSA7F7.mjs";
|
|
8
|
+
import "../../chunk-IL7576PP.mjs";
|
|
4
9
|
import "../../chunk-R4SQKVDQ.mjs";
|
|
5
10
|
export {
|
|
6
11
|
Radiobutton
|
|
@@ -0,0 +1,145 @@
|
|
|
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/radiobutton/radiogroup.tsx
|
|
50
|
+
var radiogroup_exports = {};
|
|
51
|
+
__export(radiogroup_exports, {
|
|
52
|
+
RadioGroup: () => RadioGroup,
|
|
53
|
+
useRadioGroupContext: () => useRadioGroupContext
|
|
54
|
+
});
|
|
55
|
+
module.exports = __toCommonJS(radiogroup_exports);
|
|
56
|
+
var import_react2 = require("react");
|
|
57
|
+
|
|
58
|
+
// src/form/fieldset/fieldset.tsx
|
|
59
|
+
var import_react = require("react");
|
|
60
|
+
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
|
|
61
|
+
|
|
62
|
+
// src/form/error-message/error-message.tsx
|
|
63
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
64
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
65
|
+
function ErrorMessage({ children, id, className }) {
|
|
66
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
"aria-live": "assertive",
|
|
70
|
+
className: (0, import_typed_classname.clsx)("hds-error-message", className),
|
|
71
|
+
id,
|
|
72
|
+
children
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// src/form/fieldset/fieldset.tsx
|
|
78
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
79
|
+
var Fieldset = (0, import_react.forwardRef)(function Fieldset2(_a, ref) {
|
|
80
|
+
var _b = _a, {
|
|
81
|
+
className,
|
|
82
|
+
style,
|
|
83
|
+
errorMessage,
|
|
84
|
+
legendProps: _c = {}
|
|
85
|
+
} = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
|
|
86
|
+
legend,
|
|
87
|
+
children
|
|
88
|
+
} = _e, rest = __objRest(_e, [
|
|
89
|
+
"className",
|
|
90
|
+
"style",
|
|
91
|
+
"errorMessage",
|
|
92
|
+
"legendProps",
|
|
93
|
+
"legend",
|
|
94
|
+
"children"
|
|
95
|
+
]);
|
|
96
|
+
const errorMessageId = (0, import_react.useId)();
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
98
|
+
"fieldset",
|
|
99
|
+
__spreadProps(__spreadValues({
|
|
100
|
+
"aria-describedby": errorMessage ? errorMessageId : void 0,
|
|
101
|
+
"aria-invalid": errorMessage ? true : void 0,
|
|
102
|
+
className: (0, import_typed_classname2.clsx)("hds-fieldset", className),
|
|
103
|
+
ref,
|
|
104
|
+
style
|
|
105
|
+
}, rest), {
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
108
|
+
"legend",
|
|
109
|
+
__spreadProps(__spreadValues({
|
|
110
|
+
className: (0, import_typed_classname2.clsx)(
|
|
111
|
+
"hds-fieldset__legend",
|
|
112
|
+
{ [`hds-fieldset__legend--${legendSize}`]: legendSize },
|
|
113
|
+
legendClassName
|
|
114
|
+
)
|
|
115
|
+
}, legendProps), {
|
|
116
|
+
children: legend
|
|
117
|
+
})
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-fieldset__input-wrapper"), children }),
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorMessage, { id: errorMessageId, children: errorMessage })
|
|
121
|
+
]
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// src/form/radiobutton/radiogroup.tsx
|
|
127
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
128
|
+
var RadioGroupContext = (0, import_react2.createContext)({
|
|
129
|
+
hasError: false,
|
|
130
|
+
onChange: () => {
|
|
131
|
+
return void 0;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
var useRadioGroupContext = () => (0, import_react2.useContext)(RadioGroupContext);
|
|
135
|
+
var RadioGroup = (0, import_react2.forwardRef)(function RadioGroup2(_a, ref) {
|
|
136
|
+
var _b = _a, { name, value, errorMessage, onChange, children } = _b, rest = __objRest(_b, ["name", "value", "errorMessage", "onChange", "children"]);
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadioGroupContext.Provider, { value: { name, value, hasError: Boolean(errorMessage), onChange }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Fieldset, __spreadProps(__spreadValues({ errorMessage }, rest), { ref, children })) });
|
|
138
|
+
});
|
|
139
|
+
RadioGroup.displayName = "RadioGroup";
|
|
140
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
141
|
+
0 && (module.exports = {
|
|
142
|
+
RadioGroup,
|
|
143
|
+
useRadioGroupContext
|
|
144
|
+
});
|
|
145
|
+
//# sourceMappingURL=radiogroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/form/radiobutton/radiogroup.tsx","../../../src/form/fieldset/fieldset.tsx","../../../src/form/error-message/error-message.tsx"],"sourcesContent":["import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadiobuttonProps } from \"./radiobutton\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n /** Will be passed to all Radiobuttons within the radio group */\n name?: RadiobuttonProps[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: RadiobuttonProps[\"value\"];\n /**\n * Error message is passed to the internal Fieldset,\n * and also marks all radiobuttons as invalid\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radiobuttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = {\n hasError: boolean;\n} & Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n hasError: false,\n onChange: () => {\n return undefined;\n },\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, errorMessage, onChange, children, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, hasError: Boolean(errorMessage), onChange }}>\n <Fieldset errorMessage={errorMessage} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n});\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { useId, forwardRef } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n}\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n legendProps: { size: legendSize = \"default\", className: legendClassName, ...legendProps } = {},\n legend,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n\n return (\n <fieldset\n aria-describedby={errorMessage ? errorMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", className as undefined)}\n ref={ref}\n style={style}\n {...rest}\n >\n <legend\n className={clsx(\n \"hds-fieldset__legend\",\n { [`hds-fieldset__legend--${legendSize}`]: legendSize },\n legendClassName as undefined,\n )}\n {...legendProps}\n >\n {legend}\n </legend>\n <div className={clsx(\"hds-fieldset__input-wrapper\")}>{children}</div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </fieldset>\n );\n});\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorMessageProps {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport function ErrorMessage({ children, id, className }: ErrorMessageProps) {\n return (\n <div\n aria-live=\"assertive\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n >\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAMO;;;ACNP,mBAAkC;AAElC,IAAAC,0BAAqB;;;ACFrB,6BAAqB;AAWjB;AAFG,SAAS,aAAa,EAAE,UAAU,IAAI,UAAU,GAAsB;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,eAAW,6BAAK,qBAAqB,SAAsB;AAAA,MAC3D;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;;;ADUI,IAAAC,sBAAA;AAfG,IAAM,eAAW,yBAA+C,SAASC,UAC9E,IASA,KACA;AAVA,eAIe;AAAA,IAHb;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,KAA+E,CAAC;AAAA,EAnBjG,IAeE,IAIe,SAAE,QAAM,aAAa,WAAW,WAAW,gBAnB5D,IAmBiB,IAA+D,wBAA/D,IAA+D,CAA7D,QAA8B,eAJ/C,SAKE;AAAA;AAAA,IACA;AAAA,EArBJ,IAeE,IAOK,iBAPL,IAOK;AAAA,IANH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKF,QAAM,qBAAiB,oBAAM;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,oBAAkB,eAAe,iBAAiB;AAAA,MAClD,gBAAc,eAAe,OAAO;AAAA,MACpC,eAAW,8BAAK,gBAAgB,SAAsB;AAAA,MACtD;AAAA,MACA;AAAA,OACI,OANL;AAAA,MAQC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,EAAE,CAAC,yBAAyB,UAAU,EAAE,GAAG,WAAW;AAAA,cACtD;AAAA,YACF;AAAA,aACI,cANL;AAAA,YAQE;AAAA;AAAA,QACH;AAAA,QACA,6CAAC,SAAI,eAAW,8BAAK,6BAA6B,GAAI,UAAS;AAAA,QAC/D,6CAAC,gBAAa,IAAI,gBAAiB,wBAAa;AAAA;AAAA;AAAA,EAClD;AAEJ,CAAC;;;ADRK,IAAAC,sBAAA;AAfN,IAAM,wBAAoB,6BAAsC;AAAA,EAC9D,UAAU;AAAA,EACV,UAAU,MAAM;AACd,WAAO;AAAA,EACT;AACF,CAAC;AAEM,IAAM,uBAAuB,UAAM,0BAAW,iBAAiB;AAE/D,IAAM,iBAAa,0BAAiD,SAASC,YAClF,IACA,KACA;AAFA,eAAE,QAAM,OAAO,cAAc,UAAU,SAtCzC,IAsCE,IAAoD,iBAApD,IAAoD,CAAlD,QAAM,SAAO,gBAAc,YAAU;AAGvC,SACE,6CAAC,kBAAkB,UAAlB,EAA2B,OAAO,EAAE,MAAM,OAAO,UAAU,QAAQ,YAAY,GAAG,SAAS,GAC1F,uDAAC,yCAAS,gBAAgC,OAAzC,EAA+C,KAC7C,WACH,GACF;AAEJ,CAAC;AAED,WAAW,cAAc;","names":["import_react","import_typed_classname","import_jsx_runtime","Fieldset","import_jsx_runtime","RadioGroup"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RadioGroup,
|
|
3
|
+
useRadioGroupContext
|
|
4
|
+
} from "../../chunk-V4NGUB4I.mjs";
|
|
5
|
+
import "../../chunk-LMF3QGSF.mjs";
|
|
6
|
+
import "../../chunk-37WVYY6X.mjs";
|
|
7
|
+
import "../../chunk-NSLSA7F7.mjs";
|
|
8
|
+
import "../../chunk-IL7576PP.mjs";
|
|
9
|
+
import "../../chunk-R4SQKVDQ.mjs";
|
|
10
|
+
export {
|
|
11
|
+
RadioGroup,
|
|
12
|
+
useRadioGroupContext
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=radiogroup.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index-no-css.d.mts
CHANGED
|
@@ -47,7 +47,10 @@ export { TextareaProps } from './_tsup-dts-rollup';
|
|
|
47
47
|
export { Checkbox } from './_tsup-dts-rollup';
|
|
48
48
|
export { CheckboxProps } from './_tsup-dts-rollup';
|
|
49
49
|
export { Radiobutton } from './_tsup-dts-rollup';
|
|
50
|
+
export { RadioGroup } from './_tsup-dts-rollup';
|
|
50
51
|
export { RadiobuttonProps } from './_tsup-dts-rollup';
|
|
52
|
+
export { RadioGroupProps } from './_tsup-dts-rollup';
|
|
53
|
+
export { useRadioGroupContext } from './_tsup-dts-rollup';
|
|
51
54
|
export { ErrorMessage } from './_tsup-dts-rollup';
|
|
52
55
|
export { ErrorMessageProps } from './_tsup-dts-rollup';
|
|
53
56
|
export { Container } from './_tsup-dts-rollup';
|
package/dist/index-no-css.d.ts
CHANGED
|
@@ -47,7 +47,10 @@ export { TextareaProps } from './_tsup-dts-rollup';
|
|
|
47
47
|
export { Checkbox } from './_tsup-dts-rollup';
|
|
48
48
|
export { CheckboxProps } from './_tsup-dts-rollup';
|
|
49
49
|
export { Radiobutton } from './_tsup-dts-rollup';
|
|
50
|
+
export { RadioGroup } from './_tsup-dts-rollup';
|
|
50
51
|
export { RadiobuttonProps } from './_tsup-dts-rollup';
|
|
52
|
+
export { RadioGroupProps } from './_tsup-dts-rollup';
|
|
53
|
+
export { useRadioGroupContext } from './_tsup-dts-rollup';
|
|
51
54
|
export { ErrorMessage } from './_tsup-dts-rollup';
|
|
52
55
|
export { ErrorMessageProps } from './_tsup-dts-rollup';
|
|
53
56
|
export { Container } from './_tsup-dts-rollup';
|