@postenbring/hedwig-react 0.0.47 → 0.0.49
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/button/button.d.mts +12 -5
- package/dist/button/button.d.ts +12 -5
- package/dist/button/button.js +5 -2
- package/dist/button/button.mjs +1 -1
- package/dist/button/index.js +5 -2
- package/dist/button/index.mjs +1 -1
- package/dist/card/card.d.mts +29 -5
- package/dist/card/card.d.ts +29 -5
- package/dist/card/card.js +26 -32
- package/dist/card/card.mjs +1 -1
- package/dist/card/index.d.mts +9 -8
- package/dist/card/index.d.ts +9 -8
- package/dist/card/index.js +26 -32
- package/dist/card/index.mjs +2 -2
- package/dist/{chunk-3WUAXFB3.mjs → chunk-3WKOOAQL.mjs} +7 -7
- package/dist/{chunk-S7FSULI3.mjs → chunk-52YSOWMY.mjs} +1 -1
- package/dist/{chunk-6KRJB36T.mjs → chunk-CCNB2ABL.mjs} +6 -15
- package/dist/chunk-ERFGFY3Q.mjs +5 -0
- package/dist/{chunk-J5QNIAFL.mjs → chunk-JAHBNZTG.mjs} +4 -13
- package/dist/{chunk-DOWBGRCN.mjs → chunk-JOKO7Y7O.mjs} +3 -3
- package/dist/chunk-JTHBBJZW.mjs +5 -0
- package/dist/{chunk-MUGMWWNN.mjs → chunk-LCFKBPZC.mjs} +1 -1
- package/dist/{chunk-B3SD7RZV.mjs → chunk-OEOI74US.mjs} +26 -32
- package/dist/{chunk-4KBVX3Y7.mjs → chunk-OSCKYUZ3.mjs} +1 -1
- package/dist/{chunk-RNALWA7A.mjs → chunk-OX5NTX6M.mjs} +2 -25
- package/dist/{chunk-YBSM5D5N.mjs → chunk-PTLX7PHW.mjs} +5 -2
- package/dist/chunk-RBOWRO3L.mjs +18 -0
- package/dist/chunk-RSL23FEW.mjs +26 -0
- package/dist/chunk-SDR3TESK.mjs +39 -0
- package/dist/chunk-ZDZR5FVC.mjs +39 -0
- package/dist/form/checkbox/checkbox.d.mts +10 -0
- package/dist/form/checkbox/checkbox.d.ts +10 -0
- package/dist/form/checkbox/checkbox.js +86 -0
- package/dist/form/checkbox/checkbox.mjs +7 -0
- package/dist/form/checkbox/index.d.mts +2 -0
- package/dist/form/checkbox/index.d.ts +2 -0
- package/dist/form/checkbox/index.js +92 -0
- package/dist/form/checkbox/index.mjs +8 -0
- package/dist/form/error-message/error-message.d.mts +1 -2
- package/dist/form/error-message/error-message.d.ts +1 -2
- package/dist/form/error-message/error-message.js +4 -28
- package/dist/form/error-message/error-message.mjs +1 -1
- package/dist/form/error-message/index.js +4 -28
- package/dist/form/error-message/index.mjs +1 -1
- package/dist/form/fieldset/fieldset.d.mts +0 -1
- package/dist/form/fieldset/fieldset.d.ts +0 -1
- package/dist/form/fieldset/fieldset.js +7 -23
- package/dist/form/fieldset/fieldset.mjs +2 -2
- package/dist/form/fieldset/index.js +7 -23
- package/dist/form/fieldset/index.mjs +2 -2
- package/dist/form/index.d.mts +2 -0
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +89 -61
- package/dist/form/index.mjs +17 -7
- package/dist/form/input/index.js +10 -49
- package/dist/form/input/index.mjs +3 -3
- package/dist/form/input/input.js +10 -49
- package/dist/form/input/input.mjs +3 -3
- package/dist/form/input-group/index.js +9 -25
- package/dist/form/input-group/index.mjs +2 -2
- package/dist/form/input-group/input-group.d.mts +0 -1
- package/dist/form/input-group/input-group.d.ts +0 -1
- package/dist/form/input-group/input-group.js +9 -25
- package/dist/form/input-group/input-group.mjs +2 -2
- package/dist/form/radiobutton/index.d.mts +2 -0
- package/dist/form/radiobutton/index.d.ts +2 -0
- package/dist/form/radiobutton/index.js +92 -0
- package/dist/form/radiobutton/index.mjs +8 -0
- package/dist/form/radiobutton/radiobutton.d.mts +10 -0
- package/dist/form/radiobutton/radiobutton.d.ts +10 -0
- package/dist/form/radiobutton/radiobutton.js +86 -0
- package/dist/form/radiobutton/radiobutton.mjs +7 -0
- package/dist/form/select/index.js +9 -25
- package/dist/form/select/index.mjs +3 -3
- package/dist/form/select/select.js +9 -25
- package/dist/form/select/select.mjs +3 -3
- package/dist/form/textarea/index.js +9 -25
- package/dist/form/textarea/index.mjs +3 -3
- package/dist/form/textarea/textarea.js +9 -25
- package/dist/form/textarea/textarea.mjs +3 -3
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +273 -240
- package/dist/index.mjs +26 -16
- package/dist/list/index.js +10 -2
- package/dist/list/index.mjs +1 -1
- package/dist/list/link-list.d.mts +1 -1
- package/dist/list/link-list.d.ts +1 -1
- package/dist/list/link-list.js +10 -2
- package/dist/list/link-list.mjs +1 -1
- package/dist/navbar/index.js +3 -3
- package/dist/navbar/index.mjs +1 -1
- package/dist/navbar/navbar-expandable-menu.js +3 -3
- package/dist/navbar/navbar-expandable-menu.mjs +1 -1
- package/dist/{prose/prose.d.mts → styled-html/styled-html.d.mts} +9 -15
- package/dist/{prose/prose.d.ts → styled-html/styled-html.d.ts} +9 -15
- package/dist/{prose/prose.js → styled-html/styled-html.js} +11 -11
- package/dist/styled-html/styled-html.mjs +7 -0
- package/package.json +5 -5
- package/dist/chunk-R7GQHCN4.mjs +0 -30
- package/dist/chunk-X5URKHFD.mjs +0 -18
- package/dist/prose/prose.mjs +0 -7
- /package/dist/{chunk-PPUNMHOX.mjs → chunk-5OGUAHLN.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ErrorMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RBOWRO3L.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__objRest,
|
|
6
6
|
__spreadProps,
|
|
@@ -19,16 +19,14 @@ var Fieldset = forwardRef(function Fieldset2(_a, ref) {
|
|
|
19
19
|
legendProps: _c = {}
|
|
20
20
|
} = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
|
|
21
21
|
legend,
|
|
22
|
-
children
|
|
23
|
-
_unstableAriaLiveOnErrorMessage = false
|
|
22
|
+
children
|
|
24
23
|
} = _e, rest = __objRest(_e, [
|
|
25
24
|
"className",
|
|
26
25
|
"style",
|
|
27
26
|
"errorMessage",
|
|
28
27
|
"legendProps",
|
|
29
28
|
"legend",
|
|
30
|
-
"children"
|
|
31
|
-
"_unstableAriaLiveOnErrorMessage"
|
|
29
|
+
"children"
|
|
32
30
|
]);
|
|
33
31
|
const errorMessageId = useId();
|
|
34
32
|
return /* @__PURE__ */ jsxs(
|
|
@@ -54,14 +52,7 @@ var Fieldset = forwardRef(function Fieldset2(_a, ref) {
|
|
|
54
52
|
})
|
|
55
53
|
),
|
|
56
54
|
/* @__PURE__ */ jsx("div", { className: clsx("hds-fieldset__input-wrapper"), children }),
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
ErrorMessage,
|
|
59
|
-
{
|
|
60
|
-
_unstableAriaLiveOnErrorMessage,
|
|
61
|
-
id: errorMessageId,
|
|
62
|
-
children: errorMessage
|
|
63
|
-
}
|
|
64
|
-
)
|
|
55
|
+
/* @__PURE__ */ jsx(ErrorMessage, { id: errorMessageId, children: errorMessage })
|
|
65
56
|
]
|
|
66
57
|
})
|
|
67
58
|
);
|
|
@@ -29079,7 +29079,7 @@ function RenderButton(_a) {
|
|
|
29079
29079
|
__spreadProps(__spreadValues({
|
|
29080
29080
|
className: clsx("hds-navbar__button", className),
|
|
29081
29081
|
onClick: toggleOpen,
|
|
29082
|
-
ref: ref
|
|
29082
|
+
ref: ref != null ? ref : innerRef,
|
|
29083
29083
|
style,
|
|
29084
29084
|
title,
|
|
29085
29085
|
type: "button"
|
|
@@ -29120,8 +29120,8 @@ var NavbarExpandableMenuTrigger = forwardRef(
|
|
|
29120
29120
|
const root = (0, import_client.createRoot)(container);
|
|
29121
29121
|
root.render(element);
|
|
29122
29122
|
const getWidth = () => {
|
|
29123
|
-
var _a2;
|
|
29124
|
-
callback(((_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth)
|
|
29123
|
+
var _a2, _b2;
|
|
29124
|
+
callback((_b2 = (_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0);
|
|
29125
29125
|
root.unmount();
|
|
29126
29126
|
c.removeChild(container);
|
|
29127
29127
|
};
|
|
@@ -8,12 +8,10 @@ import {
|
|
|
8
8
|
import { forwardRef } from "react";
|
|
9
9
|
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
var Card = forwardRef(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
);
|
|
11
|
+
var Card = forwardRef((_a, ref) => {
|
|
12
|
+
var _b = _a, { as: Component = "section", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
|
|
13
|
+
return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-card", className), ref, children }));
|
|
14
|
+
});
|
|
17
15
|
Card.displayName = "Card";
|
|
18
16
|
var CardMedia = forwardRef(
|
|
19
17
|
(_a, ref) => {
|
|
@@ -42,19 +40,17 @@ var CardBody = forwardRef(
|
|
|
42
40
|
}
|
|
43
41
|
);
|
|
44
42
|
CardBody.displayName = "Card.Body";
|
|
45
|
-
var CardBodyHeader = forwardRef(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
);
|
|
43
|
+
var CardBodyHeader = forwardRef((_a, ref) => {
|
|
44
|
+
var _b = _a, { as: Component, className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
Component,
|
|
47
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
48
|
+
className: clsx("hds-card__body-header", className),
|
|
49
|
+
ref,
|
|
50
|
+
children
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
});
|
|
58
54
|
CardBodyHeader.displayName = "Card.Body.Header";
|
|
59
55
|
var CardBodyHeaderOverline = forwardRef((_a, ref) => {
|
|
60
56
|
var _b = _a, { as: Component = "span", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
|
|
@@ -68,19 +64,17 @@ var CardBodyHeaderOverline = forwardRef((_a, ref) => {
|
|
|
68
64
|
);
|
|
69
65
|
});
|
|
70
66
|
CardBodyHeaderOverline.displayName = "Card.Body.Header.Overline";
|
|
71
|
-
var CardBodyHeaderTitle = forwardRef(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
);
|
|
67
|
+
var CardBodyHeaderTitle = forwardRef((_a, ref) => {
|
|
68
|
+
var _b = _a, { as: Component, className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
Component,
|
|
71
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
72
|
+
className: clsx("hds-card__body-header-title", className),
|
|
73
|
+
ref,
|
|
74
|
+
children
|
|
75
|
+
})
|
|
76
|
+
);
|
|
77
|
+
});
|
|
84
78
|
CardBodyHeaderTitle.displayName = "Card.Body.Header.Title";
|
|
85
79
|
var CardBodyDescription = forwardRef(
|
|
86
80
|
(_a, ref) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
InputGroup
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CCNB2ABL.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__objRest,
|
|
6
6
|
__spreadProps,
|
|
@@ -12,33 +12,10 @@ import { forwardRef } from "react";
|
|
|
12
12
|
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
var Input = forwardRef(function Input2(_a, ref) {
|
|
15
|
-
var _b = _a, {
|
|
16
|
-
className,
|
|
17
|
-
variant,
|
|
18
|
-
errorMessage,
|
|
19
|
-
labelProps,
|
|
20
|
-
label,
|
|
21
|
-
id,
|
|
22
|
-
style,
|
|
23
|
-
disabled,
|
|
24
|
-
readOnly,
|
|
25
|
-
_unstableAriaLiveOnErrorMessage
|
|
26
|
-
} = _b, rest = __objRest(_b, [
|
|
27
|
-
"className",
|
|
28
|
-
"variant",
|
|
29
|
-
"errorMessage",
|
|
30
|
-
"labelProps",
|
|
31
|
-
"label",
|
|
32
|
-
"id",
|
|
33
|
-
"style",
|
|
34
|
-
"disabled",
|
|
35
|
-
"readOnly",
|
|
36
|
-
"_unstableAriaLiveOnErrorMessage"
|
|
37
|
-
]);
|
|
15
|
+
var _b = _a, { className, variant, errorMessage, labelProps, label, id, style, disabled, readOnly } = _b, rest = __objRest(_b, ["className", "variant", "errorMessage", "labelProps", "label", "id", "style", "disabled", "readOnly"]);
|
|
38
16
|
return /* @__PURE__ */ jsx(
|
|
39
17
|
InputGroup,
|
|
40
18
|
{
|
|
41
|
-
_unstableAriaLiveOnErrorMessage,
|
|
42
19
|
className: clsx("hds-input", className),
|
|
43
20
|
disabled,
|
|
44
21
|
errorMessage,
|
|
@@ -29,6 +29,9 @@ var BaseButton = forwardRef(
|
|
|
29
29
|
"icon",
|
|
30
30
|
"className"
|
|
31
31
|
]);
|
|
32
|
+
if (fill === "outlined") {
|
|
33
|
+
console.warn("The `fill` value `outlined` is deprecated, use `fill='outline'` instead");
|
|
34
|
+
}
|
|
32
35
|
return /* @__PURE__ */ jsxs(
|
|
33
36
|
Component,
|
|
34
37
|
__spreadProps(__spreadValues({
|
|
@@ -37,8 +40,8 @@ var BaseButton = forwardRef(
|
|
|
37
40
|
`hds-button--${size}`,
|
|
38
41
|
{
|
|
39
42
|
[`hds-button--${variant}`]: fill === "contained",
|
|
40
|
-
[`hds-button--outline-${variant}`]: fill === "outlined",
|
|
41
|
-
"hds-button--full": fullWidth
|
|
43
|
+
[`hds-button--outline-${variant}`]: fill === "outline" || fill === "outlined",
|
|
44
|
+
"hds-button--full": fullWidth,
|
|
42
45
|
"hds-button--mobile-full": fullWidth === "mobile",
|
|
43
46
|
"hds-button--icon-only": icon && !children
|
|
44
47
|
},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/form/error-message/error-message.tsx
|
|
2
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function ErrorMessage({ children, id, className }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
"aria-live": "assertive",
|
|
9
|
+
className: clsx("hds-error-message", className),
|
|
10
|
+
id,
|
|
11
|
+
children
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
ErrorMessage
|
|
18
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UnorderedList
|
|
3
|
+
} from "./chunk-BEXOLUXV.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadValues
|
|
7
|
+
} from "./chunk-FKR5F35B.mjs";
|
|
8
|
+
|
|
9
|
+
// src/list/link-list.tsx
|
|
10
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
function LinkList(_a) {
|
|
13
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
UnorderedList,
|
|
16
|
+
__spreadValues({
|
|
17
|
+
className: clsx("hds-list--link-list", className),
|
|
18
|
+
listStyle: "no-bullets"
|
|
19
|
+
}, rest)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
LinkList.displayName = "LinkList";
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
LinkList
|
|
26
|
+
};
|
|
@@ -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), { "aria-invalid": hasError ? true : void 0, ref, type: "checkbox" })),
|
|
27
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, 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,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", { "aria-hidden": true, 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,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), { "aria-invalid": hasError ? true : void 0, ref, type: "checkbox" })),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, 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,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), { "aria-invalid": hasError ? true : void 0, ref, type: "checkbox" })),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, 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
|
+
});
|
|
@@ -5,8 +5,7 @@ interface ErrorMessageProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
className?: string;
|
|
8
|
-
_unstableAriaLiveOnErrorMessage?: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare function ErrorMessage({ children, id, className
|
|
9
|
+
declare function ErrorMessage({ children, id, className }: ErrorMessageProps): react_jsx_runtime.JSX.Element;
|
|
11
10
|
|
|
12
11
|
export { ErrorMessage, type ErrorMessageProps };
|
|
@@ -5,8 +5,7 @@ interface ErrorMessageProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
className?: string;
|
|
8
|
-
_unstableAriaLiveOnErrorMessage?: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare function ErrorMessage({ children, id, className
|
|
9
|
+
declare function ErrorMessage({ children, id, className }: ErrorMessageProps): react_jsx_runtime.JSX.Element;
|
|
11
10
|
|
|
12
11
|
export { ErrorMessage, type ErrorMessageProps };
|
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
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
6
|
var __export = (target, all) => {
|
|
24
7
|
for (var name in all)
|
|
25
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -42,22 +25,15 @@ __export(error_message_exports, {
|
|
|
42
25
|
module.exports = __toCommonJS(error_message_exports);
|
|
43
26
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
44
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
-
function ErrorMessage({
|
|
46
|
-
children,
|
|
47
|
-
id,
|
|
48
|
-
className,
|
|
49
|
-
_unstableAriaLiveOnErrorMessage
|
|
50
|
-
}) {
|
|
28
|
+
function ErrorMessage({ children, id, className }) {
|
|
51
29
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
30
|
"div",
|
|
53
|
-
|
|
54
|
-
"aria-live": "
|
|
55
|
-
"aria-relevant": "additions removals"
|
|
56
|
-
}), {
|
|
31
|
+
{
|
|
32
|
+
"aria-live": "assertive",
|
|
57
33
|
className: (0, import_typed_classname.clsx)("hds-error-message", className),
|
|
58
34
|
id,
|
|
59
35
|
children
|
|
60
|
-
}
|
|
36
|
+
}
|
|
61
37
|
);
|
|
62
38
|
}
|
|
63
39
|
// Annotate the CommonJS export names for ESM import in node:
|