@postenbring/hedwig-react 0.0.47 → 0.0.48

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.
@@ -0,0 +1,5 @@
1
+ // src/form/radiobutton/index.tsx
2
+ import "@postenbring/hedwig-css/dist/fonts.css";
3
+ import "@postenbring/hedwig-css/dist/tokens.css";
4
+ import "@postenbring/hedwig-css/dist/body.css";
5
+ import "@postenbring/hedwig-css/dist/radiobutton.css";
@@ -0,0 +1,39 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FKR5F35B.mjs";
6
+
7
+ // src/form/radiobutton/radiobutton.tsx
8
+ import { forwardRef } from "react";
9
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var Radiobutton = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
14
+ return /* @__PURE__ */ jsxs(
15
+ "label",
16
+ {
17
+ className: clsx(
18
+ "hds-radiobutton",
19
+ {
20
+ [`hds-radiobutton--${variant}`]: variant === "bounding-box",
21
+ "hds-radiobutton--error": hasError
22
+ },
23
+ className
24
+ ),
25
+ children: [
26
+ /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, rest), { ref, type: "radio" })),
27
+ /* @__PURE__ */ jsx("span", { className: "hds-radiobutton__checkmark" }),
28
+ title ? /* @__PURE__ */ jsx("p", { className: "hds-radiobutton__title", children: title }) : null,
29
+ children
30
+ ]
31
+ }
32
+ );
33
+ }
34
+ );
35
+ Radiobutton.displayName = "Radiobutton";
36
+
37
+ export {
38
+ Radiobutton
39
+ };
@@ -0,0 +1,39 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FKR5F35B.mjs";
6
+
7
+ // src/form/checkbox/checkbox.tsx
8
+ import { forwardRef } from "react";
9
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var Checkbox = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
14
+ return /* @__PURE__ */ jsxs(
15
+ "label",
16
+ {
17
+ className: clsx(
18
+ "hds-checkbox",
19
+ {
20
+ [`hds-checkbox--${variant}`]: variant === "bounding-box",
21
+ "hds-checkbox--error": hasError
22
+ },
23
+ className
24
+ ),
25
+ children: [
26
+ /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, rest), { ref, type: "checkbox" })),
27
+ /* @__PURE__ */ jsx("span", { className: "hds-checkbox__checkmark" }),
28
+ title ? /* @__PURE__ */ jsx("p", { className: "hds-checkbox__-title", children: title }) : null,
29
+ children
30
+ ]
31
+ }
32
+ );
33
+ }
34
+ );
35
+ Checkbox.displayName = "Checkbox";
36
+
37
+ export {
38
+ Checkbox
39
+ };
@@ -0,0 +1,5 @@
1
+ // src/form/checkbox/index.tsx
2
+ import "@postenbring/hedwig-css/dist/fonts.css";
3
+ import "@postenbring/hedwig-css/dist/tokens.css";
4
+ import "@postenbring/hedwig-css/dist/body.css";
5
+ import "@postenbring/hedwig-css/dist/checkbox.css";
@@ -0,0 +1,10 @@
1
+ import react__default, { InputHTMLAttributes } from 'react';
2
+
3
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
4
+ variant?: "plain" | "bounding-box";
5
+ hasError?: boolean;
6
+ title?: string;
7
+ }
8
+ declare const Checkbox: react__default.ForwardRefExoticComponent<CheckboxProps & react__default.RefAttributes<HTMLInputElement>>;
9
+
10
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,10 @@
1
+ import react__default, { InputHTMLAttributes } from 'react';
2
+
3
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
4
+ variant?: "plain" | "bounding-box";
5
+ hasError?: boolean;
6
+ title?: string;
7
+ }
8
+ declare const Checkbox: react__default.ForwardRefExoticComponent<CheckboxProps & react__default.RefAttributes<HTMLInputElement>>;
9
+
10
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,86 @@
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/checkbox/checkbox.tsx
50
+ var checkbox_exports = {};
51
+ __export(checkbox_exports, {
52
+ Checkbox: () => Checkbox
53
+ });
54
+ module.exports = __toCommonJS(checkbox_exports);
55
+ var import_react = require("react");
56
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
57
+ var import_jsx_runtime = require("react/jsx-runtime");
58
+ var Checkbox = (0, import_react.forwardRef)(
59
+ (_a, ref) => {
60
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
62
+ "label",
63
+ {
64
+ className: (0, import_typed_classname.clsx)(
65
+ "hds-checkbox",
66
+ {
67
+ [`hds-checkbox--${variant}`]: variant === "bounding-box",
68
+ "hds-checkbox--error": hasError
69
+ },
70
+ className
71
+ ),
72
+ children: [
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", __spreadProps(__spreadValues({}, rest), { ref, type: "checkbox" })),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "hds-checkbox__checkmark" }),
75
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "hds-checkbox__-title", children: title }) : null,
76
+ children
77
+ ]
78
+ }
79
+ );
80
+ }
81
+ );
82
+ Checkbox.displayName = "Checkbox";
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ Checkbox
86
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ Checkbox
3
+ } from "../../chunk-JTBZ4UL4.mjs";
4
+ import "../../chunk-FKR5F35B.mjs";
5
+ export {
6
+ Checkbox
7
+ };
@@ -0,0 +1,2 @@
1
+ export { Checkbox, CheckboxProps } from './checkbox.mjs';
2
+ import 'react';
@@ -0,0 +1,2 @@
1
+ export { Checkbox, CheckboxProps } from './checkbox.js';
2
+ import 'react';
@@ -0,0 +1,92 @@
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/checkbox/index.tsx
50
+ var checkbox_exports = {};
51
+ __export(checkbox_exports, {
52
+ Checkbox: () => Checkbox
53
+ });
54
+ module.exports = __toCommonJS(checkbox_exports);
55
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
56
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
57
+ var import_body = require("@postenbring/hedwig-css/dist/body.css");
58
+ var import_checkbox = require("@postenbring/hedwig-css/dist/checkbox.css");
59
+
60
+ // src/form/checkbox/checkbox.tsx
61
+ var import_react = require("react");
62
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
63
+ var import_jsx_runtime = require("react/jsx-runtime");
64
+ var Checkbox = (0, import_react.forwardRef)(
65
+ (_a, ref) => {
66
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
68
+ "label",
69
+ {
70
+ className: (0, import_typed_classname.clsx)(
71
+ "hds-checkbox",
72
+ {
73
+ [`hds-checkbox--${variant}`]: variant === "bounding-box",
74
+ "hds-checkbox--error": hasError
75
+ },
76
+ className
77
+ ),
78
+ children: [
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", __spreadProps(__spreadValues({}, rest), { ref, type: "checkbox" })),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "hds-checkbox__checkmark" }),
81
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "hds-checkbox__-title", children: title }) : null,
82
+ children
83
+ ]
84
+ }
85
+ );
86
+ }
87
+ );
88
+ Checkbox.displayName = "Checkbox";
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ Checkbox
92
+ });
@@ -0,0 +1,8 @@
1
+ import "../../chunk-JTHBBJZW.mjs";
2
+ import {
3
+ Checkbox
4
+ } from "../../chunk-JTBZ4UL4.mjs";
5
+ import "../../chunk-FKR5F35B.mjs";
6
+ export {
7
+ Checkbox
8
+ };
@@ -2,5 +2,7 @@ export { Fieldset, FieldsetProps } from './fieldset/fieldset.mjs';
2
2
  export { Input, InputProps } from './input/input.mjs';
3
3
  export { Select, SelectProps } from './select/select.mjs';
4
4
  export { Textarea, TextareaProps } from './textarea/textarea.mjs';
5
+ export { Checkbox, CheckboxProps } from './checkbox/checkbox.mjs';
6
+ export { Radiobutton, RadiobuttonProps } from './radiobutton/radiobutton.mjs';
5
7
  import 'react';
6
8
  import './input-group/input-group.mjs';
@@ -2,5 +2,7 @@ export { Fieldset, FieldsetProps } from './fieldset/fieldset.js';
2
2
  export { Input, InputProps } from './input/input.js';
3
3
  export { Select, SelectProps } from './select/select.js';
4
4
  export { Textarea, TextareaProps } from './textarea/textarea.js';
5
+ export { Checkbox, CheckboxProps } from './checkbox/checkbox.js';
6
+ export { Radiobutton, RadiobuttonProps } from './radiobutton/radiobutton.js';
5
7
  import 'react';
6
8
  import './input-group/input-group.js';
@@ -49,8 +49,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
49
49
  // src/form/index.tsx
50
50
  var form_exports = {};
51
51
  __export(form_exports, {
52
+ Checkbox: () => Checkbox,
52
53
  Fieldset: () => Fieldset,
53
54
  Input: () => Input,
55
+ Radiobutton: () => Radiobutton,
54
56
  Select: () => Select,
55
57
  Textarea: () => Textarea
56
58
  });
@@ -366,10 +368,84 @@ var Textarea = (0, import_react5.forwardRef)(function Textarea2(_a, ref) {
366
368
  );
367
369
  });
368
370
  Textarea.displayName = "Textarea";
371
+
372
+ // src/form/checkbox/index.tsx
373
+ var import_fonts7 = require("@postenbring/hedwig-css/dist/fonts.css");
374
+ var import_tokens7 = require("@postenbring/hedwig-css/dist/tokens.css");
375
+ var import_body7 = require("@postenbring/hedwig-css/dist/body.css");
376
+ var import_checkbox = require("@postenbring/hedwig-css/dist/checkbox.css");
377
+
378
+ // src/form/checkbox/checkbox.tsx
379
+ var import_react6 = require("react");
380
+ var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
381
+ var import_jsx_runtime7 = require("react/jsx-runtime");
382
+ var Checkbox = (0, import_react6.forwardRef)(
383
+ (_a, ref) => {
384
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
385
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
386
+ "label",
387
+ {
388
+ className: (0, import_typed_classname7.clsx)(
389
+ "hds-checkbox",
390
+ {
391
+ [`hds-checkbox--${variant}`]: variant === "bounding-box",
392
+ "hds-checkbox--error": hasError
393
+ },
394
+ className
395
+ ),
396
+ children: [
397
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", __spreadProps(__spreadValues({}, rest), { ref, type: "checkbox" })),
398
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "hds-checkbox__checkmark" }),
399
+ title ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "hds-checkbox__-title", children: title }) : null,
400
+ children
401
+ ]
402
+ }
403
+ );
404
+ }
405
+ );
406
+ Checkbox.displayName = "Checkbox";
407
+
408
+ // src/form/radiobutton/index.tsx
409
+ var import_fonts8 = require("@postenbring/hedwig-css/dist/fonts.css");
410
+ var import_tokens8 = require("@postenbring/hedwig-css/dist/tokens.css");
411
+ var import_body8 = require("@postenbring/hedwig-css/dist/body.css");
412
+ var import_radiobutton = require("@postenbring/hedwig-css/dist/radiobutton.css");
413
+
414
+ // src/form/radiobutton/radiobutton.tsx
415
+ var import_react7 = require("react");
416
+ var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
417
+ var import_jsx_runtime8 = require("react/jsx-runtime");
418
+ var Radiobutton = (0, import_react7.forwardRef)(
419
+ (_a, ref) => {
420
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
421
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
422
+ "label",
423
+ {
424
+ className: (0, import_typed_classname8.clsx)(
425
+ "hds-radiobutton",
426
+ {
427
+ [`hds-radiobutton--${variant}`]: variant === "bounding-box",
428
+ "hds-radiobutton--error": hasError
429
+ },
430
+ className
431
+ ),
432
+ children: [
433
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", __spreadProps(__spreadValues({}, rest), { ref, type: "radio" })),
434
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "hds-radiobutton__checkmark" }),
435
+ title ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "hds-radiobutton__title", children: title }) : null,
436
+ children
437
+ ]
438
+ }
439
+ );
440
+ }
441
+ );
442
+ Radiobutton.displayName = "Radiobutton";
369
443
  // Annotate the CommonJS export names for ESM import in node:
370
444
  0 && (module.exports = {
445
+ Checkbox,
371
446
  Fieldset,
372
447
  Input,
448
+ Radiobutton,
373
449
  Select,
374
450
  Textarea
375
451
  });
@@ -1,4 +1,8 @@
1
- import "../chunk-PPUNMHOX.mjs";
1
+ import "../chunk-5OGUAHLN.mjs";
2
+ import "../chunk-ERFGFY3Q.mjs";
3
+ import {
4
+ Radiobutton
5
+ } from "../chunk-IXH7S7RI.mjs";
2
6
  import "../chunk-OPW2JS5I.mjs";
3
7
  import {
4
8
  Select
@@ -7,6 +11,10 @@ import "../chunk-5NWYVPBZ.mjs";
7
11
  import {
8
12
  Textarea
9
13
  } from "../chunk-4KBVX3Y7.mjs";
14
+ import "../chunk-JTHBBJZW.mjs";
15
+ import {
16
+ Checkbox
17
+ } from "../chunk-JTBZ4UL4.mjs";
10
18
  import "../chunk-OKWNTFU5.mjs";
11
19
  import {
12
20
  Fieldset
@@ -21,8 +29,10 @@ import "../chunk-67OMX7FP.mjs";
21
29
  import "../chunk-R7GQHCN4.mjs";
22
30
  import "../chunk-FKR5F35B.mjs";
23
31
  export {
32
+ Checkbox,
24
33
  Fieldset,
25
34
  Input,
35
+ Radiobutton,
26
36
  Select,
27
37
  Textarea
28
38
  };
@@ -0,0 +1,2 @@
1
+ export { Radiobutton, RadiobuttonProps } from './radiobutton.mjs';
2
+ import 'react';
@@ -0,0 +1,2 @@
1
+ export { Radiobutton, RadiobuttonProps } from './radiobutton.js';
2
+ import 'react';
@@ -0,0 +1,92 @@
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/index.tsx
50
+ var radiobutton_exports = {};
51
+ __export(radiobutton_exports, {
52
+ Radiobutton: () => Radiobutton
53
+ });
54
+ module.exports = __toCommonJS(radiobutton_exports);
55
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
56
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
57
+ var import_body = require("@postenbring/hedwig-css/dist/body.css");
58
+ var import_radiobutton = require("@postenbring/hedwig-css/dist/radiobutton.css");
59
+
60
+ // src/form/radiobutton/radiobutton.tsx
61
+ var import_react = require("react");
62
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
63
+ var import_jsx_runtime = require("react/jsx-runtime");
64
+ var Radiobutton = (0, import_react.forwardRef)(
65
+ (_a, ref) => {
66
+ var _b = _a, { variant = "plain", hasError, title, children, className } = _b, rest = __objRest(_b, ["variant", "hasError", "title", "children", "className"]);
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
68
+ "label",
69
+ {
70
+ className: (0, import_typed_classname.clsx)(
71
+ "hds-radiobutton",
72
+ {
73
+ [`hds-radiobutton--${variant}`]: variant === "bounding-box",
74
+ "hds-radiobutton--error": hasError
75
+ },
76
+ className
77
+ ),
78
+ children: [
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", __spreadProps(__spreadValues({}, rest), { ref, type: "radio" })),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "hds-radiobutton__checkmark" }),
81
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "hds-radiobutton__title", children: title }) : null,
82
+ children
83
+ ]
84
+ }
85
+ );
86
+ }
87
+ );
88
+ Radiobutton.displayName = "Radiobutton";
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ Radiobutton
92
+ });
@@ -0,0 +1,8 @@
1
+ import "../../chunk-ERFGFY3Q.mjs";
2
+ import {
3
+ Radiobutton
4
+ } from "../../chunk-IXH7S7RI.mjs";
5
+ import "../../chunk-FKR5F35B.mjs";
6
+ export {
7
+ Radiobutton
8
+ };
@@ -0,0 +1,10 @@
1
+ import react__default, { InputHTMLAttributes } from 'react';
2
+
3
+ interface RadiobuttonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
4
+ variant?: "plain" | "bounding-box";
5
+ hasError?: boolean;
6
+ title?: string;
7
+ }
8
+ declare const Radiobutton: react__default.ForwardRefExoticComponent<RadiobuttonProps & react__default.RefAttributes<HTMLInputElement>>;
9
+
10
+ export { Radiobutton, type RadiobuttonProps };
@@ -0,0 +1,10 @@
1
+ import react__default, { InputHTMLAttributes } from 'react';
2
+
3
+ interface RadiobuttonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
4
+ variant?: "plain" | "bounding-box";
5
+ hasError?: boolean;
6
+ title?: string;
7
+ }
8
+ declare const Radiobutton: react__default.ForwardRefExoticComponent<RadiobuttonProps & react__default.RefAttributes<HTMLInputElement>>;
9
+
10
+ export { Radiobutton, type RadiobuttonProps };