@postenbring/hedwig-react 0.0.5 → 0.0.7
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/accordion/accordion-item-content.js +3 -4
- package/dist/accordion/accordion-item-content.mjs +1 -1
- package/dist/accordion/accordion-item-trigger.js +2 -3
- package/dist/accordion/accordion-item-trigger.mjs +1 -1
- package/dist/accordion/accordion-item.js +3 -4
- package/dist/accordion/accordion-item.mjs +1 -1
- package/dist/accordion/accordion.js +1 -2
- package/dist/accordion/accordion.mjs +1 -1
- package/dist/accordion/index.js +9 -13
- package/dist/accordion/index.mjs +4 -4
- package/dist/badge/badge.js +10 -4
- package/dist/badge/badge.mjs +1 -1
- package/dist/badge/index.js +10 -4
- package/dist/badge/index.mjs +1 -1
- package/dist/box/box.d.mts +2 -2
- package/dist/box/box.d.ts +2 -2
- package/dist/box/box.js +8 -9
- package/dist/box/box.mjs +1 -1
- package/dist/box/index.js +8 -9
- package/dist/box/index.mjs +1 -1
- package/dist/button/button.d.mts +14 -14
- package/dist/button/button.d.ts +14 -14
- package/dist/button/button.js +59 -38
- package/dist/button/button.mjs +3 -1
- package/dist/button/index.d.mts +2 -2
- package/dist/button/index.d.ts +2 -2
- package/dist/button/index.js +59 -38
- package/dist/button/index.mjs +3 -1
- package/dist/{chunk-X3OAJSS2.mjs → chunk-53AQCCBR.mjs} +9 -7
- package/dist/{chunk-B3PZUFG2.mjs → chunk-6XSKLHN6.mjs} +15 -6
- package/dist/{chunk-NMSLCM2K.mjs → chunk-DQ2OO6EW.mjs} +1 -1
- package/dist/chunk-ENRMC5K7.mjs +75 -0
- package/dist/{chunk-IWV4FFE3.mjs → chunk-GMGUONH5.mjs} +2 -3
- package/dist/{chunk-7F7QB4D5.mjs → chunk-IECCJVMN.mjs} +3 -4
- package/dist/{chunk-LNYNZ4EG.mjs → chunk-J7U4Z726.mjs} +3 -4
- package/dist/{chunk-KBVDBI2L.mjs → chunk-L7DYK6OS.mjs} +3 -4
- package/dist/{chunk-O3NMR6GE.mjs → chunk-MNSMCSAR.mjs} +11 -5
- package/dist/{chunk-EX4U7YZF.mjs → chunk-RXUPE4MM.mjs} +8 -9
- package/dist/{chunk-IWDN3WGQ.mjs → chunk-STKOYB5H.mjs} +13 -7
- package/dist/chunk-X4D24ZRP.mjs +63 -0
- package/dist/chunk-XFA34LPW.mjs +21 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +186 -111
- package/dist/index.mjs +22 -15
- package/dist/input/input.d.mts +1 -1
- package/dist/input/input.d.ts +1 -1
- package/dist/input/input.js +13 -7
- package/dist/input/input.mjs +13 -7
- package/dist/link/index.js +9 -7
- package/dist/link/index.mjs +1 -1
- package/dist/link/link.d.mts +1 -1
- package/dist/link/link.d.ts +1 -1
- package/dist/link/link.js +9 -7
- package/dist/link/link.mjs +1 -1
- package/dist/list/description-list.d.mts +1 -1
- package/dist/list/description-list.d.ts +1 -1
- package/dist/list/description-list.js +14 -5
- package/dist/list/description-list.mjs +1 -1
- package/dist/list/index.js +26 -11
- package/dist/list/index.mjs +3 -3
- package/dist/list/link-list.js +12 -6
- package/dist/list/link-list.mjs +2 -2
- package/dist/list/list.js +12 -6
- package/dist/list/list.mjs +1 -1
- package/dist/message/index.d.mts +14 -2
- package/dist/message/index.d.ts +14 -2
- package/dist/message/index.js +49 -14
- package/dist/message/index.mjs +10 -5
- package/dist/message/message.d.mts +3 -1
- package/dist/message/message.d.ts +3 -1
- package/dist/message/message.js +42 -14
- package/dist/message/message.mjs +8 -4
- package/package.json +2 -3
- package/dist/chunk-4XWB4ZSR.mjs +0 -6
- package/dist/chunk-EKFYWUBE.mjs +0 -36
- package/dist/chunk-GSPFHK2Z.mjs +0 -55
package/dist/button/button.js
CHANGED
|
@@ -49,55 +49,76 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
49
49
|
// src/button/button.tsx
|
|
50
50
|
var button_exports = {};
|
|
51
51
|
__export(button_exports, {
|
|
52
|
+
BaseButton: () => BaseButton,
|
|
52
53
|
PrimaryButton: () => PrimaryButton,
|
|
53
54
|
SecondaryButton: () => SecondaryButton
|
|
54
55
|
});
|
|
55
56
|
module.exports = __toCommonJS(button_exports);
|
|
56
|
-
var
|
|
57
|
+
var import_react = require("react");
|
|
57
58
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
58
59
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
className
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
60
|
+
var BaseButton = (0, import_react.forwardRef)(
|
|
61
|
+
(_a, ref) => {
|
|
62
|
+
var _b = _a, {
|
|
63
|
+
as: Component = "button",
|
|
64
|
+
children,
|
|
65
|
+
variant,
|
|
66
|
+
size = "medium",
|
|
67
|
+
fullWidth = false,
|
|
68
|
+
fill = "contained",
|
|
69
|
+
icon,
|
|
70
|
+
className
|
|
71
|
+
} = _b, rest = __objRest(_b, [
|
|
72
|
+
"as",
|
|
73
|
+
"children",
|
|
74
|
+
"variant",
|
|
75
|
+
"size",
|
|
76
|
+
"fullWidth",
|
|
77
|
+
"fill",
|
|
78
|
+
"icon",
|
|
79
|
+
"className"
|
|
80
|
+
]);
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
82
|
+
Component,
|
|
83
|
+
__spreadProps(__spreadValues({
|
|
84
|
+
className: (0, import_typed_classname.clsx)(
|
|
85
|
+
"hds-button",
|
|
86
|
+
`hds-button--${size}`,
|
|
87
|
+
{
|
|
88
|
+
[`hds-button--${variant}`]: fill === "contained",
|
|
89
|
+
[`hds-button--outline-${variant}`]: fill === "outlined",
|
|
90
|
+
"hds-button--full": fullWidth === true,
|
|
91
|
+
"hds-button--mobile-full": fullWidth === "mobile",
|
|
92
|
+
"hds-button--icon-only": icon && !children
|
|
93
|
+
},
|
|
94
|
+
className
|
|
95
|
+
),
|
|
96
|
+
ref
|
|
97
|
+
}, rest), {
|
|
98
|
+
children: [
|
|
99
|
+
icon && !children ? icon : null,
|
|
100
|
+
children
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
);
|
|
90
106
|
BaseButton.displayName = "BaseButton";
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
107
|
+
var PrimaryButton = (0, import_react.forwardRef)(
|
|
108
|
+
(props, ref) => {
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "primary" }));
|
|
110
|
+
}
|
|
111
|
+
);
|
|
94
112
|
PrimaryButton.displayName = "PrimaryButton";
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
113
|
+
var SecondaryButton = (0, import_react.forwardRef)(
|
|
114
|
+
(props, ref) => {
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "secondary" }));
|
|
116
|
+
}
|
|
117
|
+
);
|
|
98
118
|
SecondaryButton.displayName = "SecondaryButton";
|
|
99
119
|
// Annotate the CommonJS export names for ESM import in node:
|
|
100
120
|
0 && (module.exports = {
|
|
121
|
+
BaseButton,
|
|
101
122
|
PrimaryButton,
|
|
102
123
|
SecondaryButton
|
|
103
124
|
});
|
package/dist/button/button.mjs
CHANGED
package/dist/button/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ButtonProps, PrimaryButton, SecondaryButton } from './button.mjs';
|
|
2
|
-
import '
|
|
1
|
+
export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button.mjs';
|
|
2
|
+
import '../utils-BfZsjuFH.mjs';
|
|
3
3
|
import 'react';
|
package/dist/button/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
|
|
2
|
-
import '
|
|
1
|
+
export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
|
|
2
|
+
import '../utils-BfZsjuFH.js';
|
|
3
3
|
import 'react';
|
package/dist/button/index.js
CHANGED
|
@@ -49,6 +49,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
49
49
|
// src/button/index.tsx
|
|
50
50
|
var button_exports = {};
|
|
51
51
|
__export(button_exports, {
|
|
52
|
+
BaseButton: () => BaseButton,
|
|
52
53
|
PrimaryButton: () => PrimaryButton,
|
|
53
54
|
SecondaryButton: () => SecondaryButton
|
|
54
55
|
});
|
|
@@ -59,51 +60,71 @@ var import_base = require("@postenbring/hedwig-css/dist/base.css");
|
|
|
59
60
|
var import_button = require("@postenbring/hedwig-css/dist/button.css");
|
|
60
61
|
|
|
61
62
|
// src/button/button.tsx
|
|
62
|
-
var
|
|
63
|
+
var import_react = require("react");
|
|
63
64
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
64
65
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
className
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
66
|
+
var BaseButton = (0, import_react.forwardRef)(
|
|
67
|
+
(_a, ref) => {
|
|
68
|
+
var _b = _a, {
|
|
69
|
+
as: Component = "button",
|
|
70
|
+
children,
|
|
71
|
+
variant,
|
|
72
|
+
size = "medium",
|
|
73
|
+
fullWidth = false,
|
|
74
|
+
fill = "contained",
|
|
75
|
+
icon,
|
|
76
|
+
className
|
|
77
|
+
} = _b, rest = __objRest(_b, [
|
|
78
|
+
"as",
|
|
79
|
+
"children",
|
|
80
|
+
"variant",
|
|
81
|
+
"size",
|
|
82
|
+
"fullWidth",
|
|
83
|
+
"fill",
|
|
84
|
+
"icon",
|
|
85
|
+
"className"
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
88
|
+
Component,
|
|
89
|
+
__spreadProps(__spreadValues({
|
|
90
|
+
className: (0, import_typed_classname.clsx)(
|
|
91
|
+
"hds-button",
|
|
92
|
+
`hds-button--${size}`,
|
|
93
|
+
{
|
|
94
|
+
[`hds-button--${variant}`]: fill === "contained",
|
|
95
|
+
[`hds-button--outline-${variant}`]: fill === "outlined",
|
|
96
|
+
"hds-button--full": fullWidth === true,
|
|
97
|
+
"hds-button--mobile-full": fullWidth === "mobile",
|
|
98
|
+
"hds-button--icon-only": icon && !children
|
|
99
|
+
},
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
ref
|
|
103
|
+
}, rest), {
|
|
104
|
+
children: [
|
|
105
|
+
icon && !children ? icon : null,
|
|
106
|
+
children
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
96
112
|
BaseButton.displayName = "BaseButton";
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
113
|
+
var PrimaryButton = (0, import_react.forwardRef)(
|
|
114
|
+
(props, ref) => {
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "primary" }));
|
|
116
|
+
}
|
|
117
|
+
);
|
|
100
118
|
PrimaryButton.displayName = "PrimaryButton";
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
119
|
+
var SecondaryButton = (0, import_react.forwardRef)(
|
|
120
|
+
(props, ref) => {
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "secondary" }));
|
|
122
|
+
}
|
|
123
|
+
);
|
|
104
124
|
SecondaryButton.displayName = "SecondaryButton";
|
|
105
125
|
// Annotate the CommonJS export names for ESM import in node:
|
|
106
126
|
0 && (module.exports = {
|
|
127
|
+
BaseButton,
|
|
107
128
|
PrimaryButton,
|
|
108
129
|
SecondaryButton
|
|
109
130
|
});
|
package/dist/button/index.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import "../chunk-VZNNGRKM.mjs";
|
|
2
2
|
import {
|
|
3
|
+
BaseButton,
|
|
3
4
|
PrimaryButton,
|
|
4
5
|
SecondaryButton
|
|
5
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-ENRMC5K7.mjs";
|
|
6
7
|
import "../chunk-FUJQIYOF.mjs";
|
|
7
8
|
export {
|
|
9
|
+
BaseButton,
|
|
8
10
|
PrimaryButton,
|
|
9
11
|
SecondaryButton
|
|
10
12
|
};
|
|
@@ -5,28 +5,30 @@ import {
|
|
|
5
5
|
} from "./chunk-FUJQIYOF.mjs";
|
|
6
6
|
|
|
7
7
|
// src/link/link.tsx
|
|
8
|
-
import { clsx } from "
|
|
9
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
function Link(_a) {
|
|
12
11
|
var _b = _a, {
|
|
13
12
|
children,
|
|
14
13
|
variant = "underline",
|
|
15
14
|
size = "medium",
|
|
16
|
-
anchorRef
|
|
15
|
+
anchorRef,
|
|
16
|
+
className
|
|
17
17
|
} = _b, rest = __objRest(_b, [
|
|
18
18
|
"children",
|
|
19
19
|
"variant",
|
|
20
20
|
"size",
|
|
21
|
-
"anchorRef"
|
|
21
|
+
"anchorRef",
|
|
22
|
+
"className"
|
|
22
23
|
]);
|
|
23
24
|
return /* @__PURE__ */ jsx(
|
|
24
25
|
"a",
|
|
25
26
|
__spreadProps(__spreadValues({
|
|
26
27
|
className: clsx(
|
|
27
|
-
|
|
28
|
-
variant !== "underline" &&
|
|
29
|
-
size !== "medium" &&
|
|
28
|
+
"hds-link",
|
|
29
|
+
variant !== "underline" && `hds-link--${variant}`,
|
|
30
|
+
size !== "medium" && `hds-link--${size}`,
|
|
31
|
+
className
|
|
30
32
|
),
|
|
31
33
|
ref: anchorRef
|
|
32
34
|
}, rest), {
|
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-FUJQIYOF.mjs";
|
|
6
6
|
|
|
7
7
|
// src/list/description-list.tsx
|
|
8
|
-
import { clsx } from "
|
|
9
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
function DescriptionDetails(_a) {
|
|
12
11
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
@@ -17,13 +16,23 @@ function DescriptionTerm(_a) {
|
|
|
17
16
|
return /* @__PURE__ */ jsx("dt", __spreadProps(__spreadValues({}, rest), { children }));
|
|
18
17
|
}
|
|
19
18
|
function DescriptionList(_a) {
|
|
20
|
-
var _b = _a, {
|
|
19
|
+
var _b = _a, {
|
|
20
|
+
variant = "vertical",
|
|
21
|
+
className
|
|
22
|
+
} = _b, rest = __objRest(_b, [
|
|
23
|
+
"variant",
|
|
24
|
+
"className"
|
|
25
|
+
]);
|
|
21
26
|
return /* @__PURE__ */ jsx(
|
|
22
27
|
"dl",
|
|
23
28
|
__spreadValues({
|
|
24
|
-
className: clsx(
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
className: clsx(
|
|
30
|
+
"hds-description-list",
|
|
31
|
+
{
|
|
32
|
+
"hds-description-list--horizontal": variant === "horizontal"
|
|
33
|
+
},
|
|
34
|
+
className
|
|
35
|
+
)
|
|
27
36
|
}, rest)
|
|
28
37
|
);
|
|
29
38
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
6
|
+
|
|
7
|
+
// src/button/button.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 BaseButton = forwardRef(
|
|
12
|
+
(_a, ref) => {
|
|
13
|
+
var _b = _a, {
|
|
14
|
+
as: Component = "button",
|
|
15
|
+
children,
|
|
16
|
+
variant,
|
|
17
|
+
size = "medium",
|
|
18
|
+
fullWidth = false,
|
|
19
|
+
fill = "contained",
|
|
20
|
+
icon,
|
|
21
|
+
className
|
|
22
|
+
} = _b, rest = __objRest(_b, [
|
|
23
|
+
"as",
|
|
24
|
+
"children",
|
|
25
|
+
"variant",
|
|
26
|
+
"size",
|
|
27
|
+
"fullWidth",
|
|
28
|
+
"fill",
|
|
29
|
+
"icon",
|
|
30
|
+
"className"
|
|
31
|
+
]);
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
|
+
Component,
|
|
34
|
+
__spreadProps(__spreadValues({
|
|
35
|
+
className: clsx(
|
|
36
|
+
"hds-button",
|
|
37
|
+
`hds-button--${size}`,
|
|
38
|
+
{
|
|
39
|
+
[`hds-button--${variant}`]: fill === "contained",
|
|
40
|
+
[`hds-button--outline-${variant}`]: fill === "outlined",
|
|
41
|
+
"hds-button--full": fullWidth === true,
|
|
42
|
+
"hds-button--mobile-full": fullWidth === "mobile",
|
|
43
|
+
"hds-button--icon-only": icon && !children
|
|
44
|
+
},
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
ref
|
|
48
|
+
}, rest), {
|
|
49
|
+
children: [
|
|
50
|
+
icon && !children ? icon : null,
|
|
51
|
+
children
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
BaseButton.displayName = "BaseButton";
|
|
58
|
+
var PrimaryButton = forwardRef(
|
|
59
|
+
(props, ref) => {
|
|
60
|
+
return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "primary" }));
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
PrimaryButton.displayName = "PrimaryButton";
|
|
64
|
+
var SecondaryButton = forwardRef(
|
|
65
|
+
(props, ref) => {
|
|
66
|
+
return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { ref, variant: "secondary" }));
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
SecondaryButton.displayName = "SecondaryButton";
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
BaseButton,
|
|
73
|
+
PrimaryButton,
|
|
74
|
+
SecondaryButton
|
|
75
|
+
};
|
|
@@ -9,8 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// src/accordion/accordion.tsx
|
|
11
11
|
import { forwardRef, useState } from "react";
|
|
12
|
-
import { clsx } from "
|
|
13
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
12
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
14
13
|
import { jsx } from "react/jsx-runtime";
|
|
15
14
|
var Accordion = forwardRef(
|
|
16
15
|
(_a, ref) => {
|
|
@@ -25,7 +24,7 @@ var Accordion = forwardRef(
|
|
|
25
24
|
);
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
|
-
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx(
|
|
27
|
+
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { variant, openItems, toggleOpenItem, mounted: true }, children: /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-accordion", className), ref, children })) });
|
|
29
28
|
}
|
|
30
29
|
);
|
|
31
30
|
Accordion.displayName = "Accordion";
|
|
@@ -9,8 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// src/accordion/accordion-item-trigger.tsx
|
|
11
11
|
import { forwardRef, useContext } from "react";
|
|
12
|
-
import {
|
|
13
|
-
import { clsx } from "clsx";
|
|
12
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
14
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
function FaArrowDownButNotReally() {
|
|
16
15
|
return /* @__PURE__ */ jsx("span", { children: "v " });
|
|
@@ -32,12 +31,12 @@ var AccordionTrigger = forwardRef((_a, ref) => {
|
|
|
32
31
|
Component,
|
|
33
32
|
__spreadProps(__spreadValues({}, rest), {
|
|
34
33
|
"aria-expanded": itemContext.open,
|
|
35
|
-
className: clsx(
|
|
34
|
+
className: clsx("hds-accordion-item-trigger", className),
|
|
36
35
|
onClick: expandOrCollapse,
|
|
37
36
|
ref,
|
|
38
37
|
type: "button",
|
|
39
38
|
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
40
|
-
/* @__PURE__ */ jsx("div", { className: clsx(
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: clsx("hds-accordion-item-trigger--icon"), children: itemContext.open ? /* @__PURE__ */ jsx(FaArrowUpButNotReally, {}) : /* @__PURE__ */ jsx(FaArrowDownButNotReally, {}) }),
|
|
41
40
|
children
|
|
42
41
|
] })
|
|
43
42
|
})
|
|
@@ -9,8 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// src/accordion/accordion-item-content.tsx
|
|
11
11
|
import { forwardRef, useContext } from "react";
|
|
12
|
-
import { clsx } from "
|
|
13
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
12
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
14
13
|
import { jsx } from "react/jsx-runtime";
|
|
15
14
|
var AccordionContent = forwardRef((_a, ref) => {
|
|
16
15
|
var _b = _a, { as: Component = "div", children, className } = _b, rest = __objRest(_b, ["as", "children", "className"]);
|
|
@@ -22,9 +21,9 @@ var AccordionContent = forwardRef((_a, ref) => {
|
|
|
22
21
|
Component,
|
|
23
22
|
__spreadProps(__spreadValues({}, rest), {
|
|
24
23
|
className: clsx(
|
|
25
|
-
|
|
24
|
+
"hds-accordion-item-content",
|
|
26
25
|
{
|
|
27
|
-
|
|
26
|
+
"hds-accordion-item-content--closed": !context.open
|
|
28
27
|
},
|
|
29
28
|
className
|
|
30
29
|
),
|
|
@@ -10,8 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/accordion/accordion-item.tsx
|
|
12
12
|
import { forwardRef, useContext, useEffect, useId, useState } from "react";
|
|
13
|
-
import { clsx } from "
|
|
14
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
13
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
15
14
|
import { jsx } from "react/jsx-runtime";
|
|
16
15
|
var AccordionItem = forwardRef(
|
|
17
16
|
(_a, ref) => {
|
|
@@ -40,9 +39,9 @@ var AccordionItem = forwardRef(
|
|
|
40
39
|
Component,
|
|
41
40
|
__spreadProps(__spreadValues({}, rest), {
|
|
42
41
|
className: clsx(
|
|
43
|
-
|
|
42
|
+
"hds-accordion-item",
|
|
44
43
|
{
|
|
45
|
-
|
|
44
|
+
"hds-accordion-item__expanded": open
|
|
46
45
|
},
|
|
47
46
|
className
|
|
48
47
|
),
|
|
@@ -5,23 +5,29 @@ import {
|
|
|
5
5
|
} from "./chunk-FUJQIYOF.mjs";
|
|
6
6
|
|
|
7
7
|
// src/badge/badge.tsx
|
|
8
|
-
import { clsx } from "
|
|
9
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
function BaseBadge(_a) {
|
|
12
11
|
var _b = _a, {
|
|
13
12
|
children,
|
|
14
13
|
variant,
|
|
15
|
-
size = "small"
|
|
14
|
+
size = "small",
|
|
15
|
+
className
|
|
16
16
|
} = _b, rest = __objRest(_b, [
|
|
17
17
|
"children",
|
|
18
18
|
"variant",
|
|
19
|
-
"size"
|
|
19
|
+
"size",
|
|
20
|
+
"className"
|
|
20
21
|
]);
|
|
21
22
|
return /* @__PURE__ */ jsx(
|
|
22
23
|
"span",
|
|
23
24
|
__spreadProps(__spreadValues({
|
|
24
|
-
className: clsx(
|
|
25
|
+
className: clsx(
|
|
26
|
+
"hds-badge",
|
|
27
|
+
`hds-badge--${size}`,
|
|
28
|
+
`hds-badge--${variant}`,
|
|
29
|
+
className
|
|
30
|
+
)
|
|
25
31
|
}, rest), {
|
|
26
32
|
children
|
|
27
33
|
})
|
|
@@ -6,15 +6,14 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/box/box.tsx
|
|
8
8
|
import { forwardRef, useCallback, useState } from "react";
|
|
9
|
-
import { clsx } from "
|
|
10
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
9
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
var Box = forwardRef(
|
|
13
12
|
(_a, ref) => {
|
|
14
13
|
var _b = _a, {
|
|
15
14
|
as: Component = "div",
|
|
16
15
|
variant = "light-grey",
|
|
17
|
-
|
|
16
|
+
closeable = false,
|
|
18
17
|
onClose: onCloseProp,
|
|
19
18
|
closed: closedProp,
|
|
20
19
|
closeButtonProps,
|
|
@@ -23,7 +22,7 @@ var Box = forwardRef(
|
|
|
23
22
|
} = _b, rest = __objRest(_b, [
|
|
24
23
|
"as",
|
|
25
24
|
"variant",
|
|
26
|
-
"
|
|
25
|
+
"closeable",
|
|
27
26
|
"onClose",
|
|
28
27
|
"closed",
|
|
29
28
|
"closeButtonProps",
|
|
@@ -46,15 +45,15 @@ var Box = forwardRef(
|
|
|
46
45
|
Component,
|
|
47
46
|
__spreadProps(__spreadValues({
|
|
48
47
|
className: clsx(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
48
|
+
"hds-box",
|
|
49
|
+
`hds-box--${variant}`,
|
|
50
|
+
{ "hds-box--closed": closed },
|
|
52
51
|
className
|
|
53
52
|
),
|
|
54
53
|
ref
|
|
55
54
|
}, rest), {
|
|
56
55
|
children: [
|
|
57
|
-
|
|
56
|
+
closeable ? /* @__PURE__ */ jsx(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
|
|
58
57
|
children
|
|
59
58
|
]
|
|
60
59
|
})
|
|
@@ -68,7 +67,7 @@ var BoxCloseButton = forwardRef(
|
|
|
68
67
|
return /* @__PURE__ */ jsx(
|
|
69
68
|
"button",
|
|
70
69
|
__spreadValues({
|
|
71
|
-
className: clsx(
|
|
70
|
+
className: clsx("hds-box__close-button", className),
|
|
72
71
|
ref,
|
|
73
72
|
type: "button"
|
|
74
73
|
}, rest)
|
|
@@ -5,27 +5,33 @@ import {
|
|
|
5
5
|
} from "./chunk-FUJQIYOF.mjs";
|
|
6
6
|
|
|
7
7
|
// src/list/list.tsx
|
|
8
|
-
import { clsx } from "
|
|
9
|
-
import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
function BaseList(_a) {
|
|
12
11
|
var _b = _a, {
|
|
13
12
|
as: ListTag = "ul",
|
|
14
13
|
children,
|
|
15
14
|
listStyle = "inherit",
|
|
16
|
-
size = "medium"
|
|
15
|
+
size = "medium",
|
|
16
|
+
className
|
|
17
17
|
} = _b, rest = __objRest(_b, [
|
|
18
18
|
"as",
|
|
19
19
|
"children",
|
|
20
20
|
"listStyle",
|
|
21
|
-
"size"
|
|
21
|
+
"size",
|
|
22
|
+
"className"
|
|
22
23
|
]);
|
|
23
24
|
return /* @__PURE__ */ jsx(
|
|
24
25
|
ListTag,
|
|
25
26
|
__spreadProps(__spreadValues({
|
|
26
|
-
className: clsx(
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
className: clsx(
|
|
28
|
+
"hds-list",
|
|
29
|
+
`hds-list--${size}`,
|
|
30
|
+
{
|
|
31
|
+
"hds-list--style-hidden": listStyle === "no-bullets"
|
|
32
|
+
},
|
|
33
|
+
className
|
|
34
|
+
)
|
|
29
35
|
}, rest), {
|
|
30
36
|
children
|
|
31
37
|
})
|