@postenbring/hedwig-react 0.0.46 → 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,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/radiobutton/radiobutton.tsx
50
+ var radiobutton_exports = {};
51
+ __export(radiobutton_exports, {
52
+ Radiobutton: () => Radiobutton
53
+ });
54
+ module.exports = __toCommonJS(radiobutton_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 Radiobutton = (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-radiobutton",
66
+ {
67
+ [`hds-radiobutton--${variant}`]: variant === "bounding-box",
68
+ "hds-radiobutton--error": hasError
69
+ },
70
+ className
71
+ ),
72
+ children: [
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", __spreadProps(__spreadValues({}, rest), { ref, type: "radio" })),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "hds-radiobutton__checkmark" }),
75
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "hds-radiobutton__title", children: title }) : null,
76
+ children
77
+ ]
78
+ }
79
+ );
80
+ }
81
+ );
82
+ Radiobutton.displayName = "Radiobutton";
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ Radiobutton
86
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ Radiobutton
3
+ } from "../../chunk-IXH7S7RI.mjs";
4
+ import "../../chunk-FKR5F35B.mjs";
5
+ export {
6
+ Radiobutton
7
+ };
package/dist/index.d.mts CHANGED
@@ -8,6 +8,8 @@ export { Fieldset, FieldsetProps } from './form/fieldset/fieldset.mjs';
8
8
  export { Input, InputProps } from './form/input/input.mjs';
9
9
  export { Select, SelectProps } from './form/select/select.mjs';
10
10
  export { Textarea, TextareaProps } from './form/textarea/textarea.mjs';
11
+ export { Checkbox, CheckboxProps } from './form/checkbox/checkbox.mjs';
12
+ export { Radiobutton, RadiobuttonProps } from './form/radiobutton/radiobutton.mjs';
11
13
  export { Container, ContainerProps } from './layout/container/container.mjs';
12
14
  export { Link, LinkProps } from './link/link.mjs';
13
15
  export { DescriptionList, DescriptionListProps } from './list/description-list.mjs';
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { Fieldset, FieldsetProps } from './form/fieldset/fieldset.js';
8
8
  export { Input, InputProps } from './form/input/input.js';
9
9
  export { Select, SelectProps } from './form/select/select.js';
10
10
  export { Textarea, TextareaProps } from './form/textarea/textarea.js';
11
+ export { Checkbox, CheckboxProps } from './form/checkbox/checkbox.js';
12
+ export { Radiobutton, RadiobuttonProps } from './form/radiobutton/radiobutton.js';
11
13
  export { Container, ContainerProps } from './layout/container/container.js';
12
14
  export { Link, LinkProps } from './link/link.js';
13
15
  export { DescriptionList, DescriptionListProps } from './list/description-list.js';