@postenbring/hedwig-react 0.0.0-FPfHEZ66-tabs-component-20231214140156
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.d.mts +9 -0
- package/dist/accordion/accordion-item-content.d.ts +9 -0
- package/dist/accordion/accordion-item-content.js +97 -0
- package/dist/accordion/accordion-item-content.mjs +8 -0
- package/dist/accordion/accordion-item-trigger.d.mts +9 -0
- package/dist/accordion/accordion-item-trigger.d.ts +9 -0
- package/dist/accordion/accordion-item-trigger.js +121 -0
- package/dist/accordion/accordion-item-trigger.mjs +8 -0
- package/dist/accordion/accordion-item.d.mts +15 -0
- package/dist/accordion/accordion-item.d.ts +15 -0
- package/dist/accordion/accordion-item.js +115 -0
- package/dist/accordion/accordion-item.mjs +8 -0
- package/dist/accordion/accordion.d.mts +28 -0
- package/dist/accordion/accordion.d.ts +28 -0
- package/dist/accordion/accordion.js +92 -0
- package/dist/accordion/accordion.mjs +8 -0
- package/dist/accordion/index.d.mts +6 -0
- package/dist/accordion/index.d.ts +6 -0
- package/dist/accordion/index.js +227 -0
- package/dist/accordion/index.mjs +21 -0
- package/dist/badge/badge.d.mts +28 -0
- package/dist/badge/badge.d.ts +28 -0
- package/dist/badge/badge.js +109 -0
- package/dist/badge/badge.mjs +13 -0
- package/dist/badge/index.d.mts +3 -0
- package/dist/badge/index.d.ts +3 -0
- package/dist/badge/index.js +115 -0
- package/dist/badge/index.mjs +14 -0
- package/dist/box/box.d.mts +36 -0
- package/dist/box/box.d.ts +36 -0
- package/dist/box/box.js +130 -0
- package/dist/box/box.mjs +9 -0
- package/dist/box/index.d.mts +3 -0
- package/dist/box/index.d.ts +3 -0
- package/dist/box/index.js +136 -0
- package/dist/box/index.mjs +10 -0
- package/dist/breadcrumb/breadcrumb.d.mts +43 -0
- package/dist/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/breadcrumb/breadcrumb.js +52 -0
- package/dist/breadcrumb/breadcrumb.mjs +7 -0
- package/dist/breadcrumb/index.d.mts +3 -0
- package/dist/breadcrumb/index.d.ts +3 -0
- package/dist/breadcrumb/index.js +58 -0
- package/dist/breadcrumb/index.mjs +8 -0
- package/dist/button/button.d.mts +37 -0
- package/dist/button/button.d.ts +37 -0
- package/dist/button/button.js +124 -0
- package/dist/button/button.mjs +11 -0
- package/dist/button/index.d.mts +3 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/button/index.js +130 -0
- package/dist/button/index.mjs +12 -0
- package/dist/chunk-2QSL2PSS.mjs +63 -0
- package/dist/chunk-2V6SWZ5G.mjs +16 -0
- package/dist/chunk-3VUAKZB2.mjs +48 -0
- package/dist/chunk-5OAMKZDX.mjs +6 -0
- package/dist/chunk-6XSKLHN6.mjs +49 -0
- package/dist/chunk-74UG2OYZ.mjs +111 -0
- package/dist/chunk-7SCOBRDZ.mjs +5 -0
- package/dist/chunk-AJBQ2EJU.mjs +5 -0
- package/dist/chunk-BRBGRJ2I.mjs +18 -0
- package/dist/chunk-ENRMC5K7.mjs +75 -0
- package/dist/chunk-FSBY3NKV.mjs +47 -0
- package/dist/chunk-FUJQIYOF.mjs +37 -0
- package/dist/chunk-GMGUONH5.mjs +34 -0
- package/dist/chunk-HMESGVY5.mjs +21 -0
- package/dist/chunk-IEY4EQ4E.mjs +5 -0
- package/dist/chunk-J7U4Z726.mjs +39 -0
- package/dist/chunk-L7DYK6OS.mjs +58 -0
- package/dist/chunk-LNPO2XQW.mjs +5 -0
- package/dist/chunk-LZSDIT5D.mjs +5 -0
- package/dist/chunk-MNSMCSAR.mjs +59 -0
- package/dist/chunk-Q2HYT3Z7.mjs +16 -0
- package/dist/chunk-QV33ZHNO.mjs +60 -0
- package/dist/chunk-RXUPE4MM.mjs +82 -0
- package/dist/chunk-RY53CJI7.mjs +53 -0
- package/dist/chunk-TES7CVGU.mjs +34 -0
- package/dist/chunk-TFY7NZMU.mjs +5 -0
- package/dist/chunk-VX6MSLLO.mjs +5 -0
- package/dist/chunk-X4D24ZRP.mjs +63 -0
- package/dist/chunk-XJ44O3HY.mjs +58 -0
- package/dist/chunk-YFBW5ZRC.mjs +18 -0
- package/dist/chunk-YRAMCYSB.mjs +5 -0
- package/dist/dropdown/dropdown.d.mts +15 -0
- package/dist/dropdown/dropdown.d.ts +15 -0
- package/dist/dropdown/dropdown.js +95 -0
- package/dist/dropdown/dropdown.mjs +7 -0
- package/dist/dropdown/index.d.mts +3 -0
- package/dist/dropdown/index.d.ts +3 -0
- package/dist/dropdown/index.js +101 -0
- package/dist/dropdown/index.mjs +8 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +944 -0
- package/dist/index.mjs +114 -0
- package/dist/input/index.d.mts +3 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.js +121 -0
- package/dist/input/index.mjs +13 -0
- package/dist/input/input.d.mts +13 -0
- package/dist/input/input.d.ts +13 -0
- package/dist/input/input.js +115 -0
- package/dist/input/input.mjs +7 -0
- package/dist/link/index.d.mts +3 -0
- package/dist/link/index.d.ts +3 -0
- package/dist/link/index.js +87 -0
- package/dist/link/index.mjs +8 -0
- package/dist/link/link.d.mts +18 -0
- package/dist/link/link.d.ts +18 -0
- package/dist/link/link.js +81 -0
- package/dist/link/link.mjs +7 -0
- package/dist/list/description-list.d.mts +32 -0
- package/dist/list/description-list.d.ts +32 -0
- package/dist/list/description-list.js +98 -0
- package/dist/list/description-list.mjs +13 -0
- package/dist/list/index.d.mts +5 -0
- package/dist/list/index.d.ts +5 -0
- package/dist/list/index.js +159 -0
- package/dist/list/index.mjs +22 -0
- package/dist/list/link-list.d.mts +13 -0
- package/dist/list/link-list.d.ts +13 -0
- package/dist/list/link-list.js +108 -0
- package/dist/list/link-list.mjs +8 -0
- package/dist/list/list.d.mts +25 -0
- package/dist/list/list.d.ts +25 -0
- package/dist/list/list.js +101 -0
- package/dist/list/list.mjs +9 -0
- package/dist/message/index.d.mts +16 -0
- package/dist/message/index.d.ts +16 -0
- package/dist/message/index.js +197 -0
- package/dist/message/index.mjs +14 -0
- package/dist/message/message.d.mts +18 -0
- package/dist/message/message.d.ts +18 -0
- package/dist/message/message.js +183 -0
- package/dist/message/message.mjs +12 -0
- package/dist/modal/index.d.mts +9 -0
- package/dist/modal/index.d.ts +9 -0
- package/dist/modal/index.js +218 -0
- package/dist/modal/index.mjs +13 -0
- package/dist/modal/modal.d.mts +13 -0
- package/dist/modal/modal.d.ts +13 -0
- package/dist/modal/modal.js +206 -0
- package/dist/modal/modal.mjs +11 -0
- package/dist/tabs/index.d.mts +4 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +202 -0
- package/dist/tabs/index.mjs +17 -0
- package/dist/tabs/tabs.d.mts +49 -0
- package/dist/tabs/tabs.d.ts +49 -0
- package/dist/tabs/tabs.js +196 -0
- package/dist/tabs/tabs.mjs +16 -0
- package/dist/utils-BfZsjuFH.d.mts +17 -0
- package/dist/utils-BfZsjuFH.d.ts +17 -0
- package/package.json +34 -0
|
@@ -0,0 +1,124 @@
|
|
|
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/button/button.tsx
|
|
50
|
+
var button_exports = {};
|
|
51
|
+
__export(button_exports, {
|
|
52
|
+
BaseButton: () => BaseButton,
|
|
53
|
+
PrimaryButton: () => PrimaryButton,
|
|
54
|
+
SecondaryButton: () => SecondaryButton
|
|
55
|
+
});
|
|
56
|
+
module.exports = __toCommonJS(button_exports);
|
|
57
|
+
var import_react = require("react");
|
|
58
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
59
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
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
|
+
);
|
|
106
|
+
BaseButton.displayName = "BaseButton";
|
|
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
|
+
);
|
|
112
|
+
PrimaryButton.displayName = "PrimaryButton";
|
|
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
|
+
);
|
|
118
|
+
SecondaryButton.displayName = "SecondaryButton";
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
BaseButton,
|
|
122
|
+
PrimaryButton,
|
|
123
|
+
SecondaryButton
|
|
124
|
+
});
|
|
@@ -0,0 +1,130 @@
|
|
|
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/button/index.tsx
|
|
50
|
+
var button_exports = {};
|
|
51
|
+
__export(button_exports, {
|
|
52
|
+
BaseButton: () => BaseButton,
|
|
53
|
+
PrimaryButton: () => PrimaryButton,
|
|
54
|
+
SecondaryButton: () => SecondaryButton
|
|
55
|
+
});
|
|
56
|
+
module.exports = __toCommonJS(button_exports);
|
|
57
|
+
var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
|
|
58
|
+
var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
|
|
59
|
+
var import_body = require("@postenbring/hedwig-css/dist/body.css");
|
|
60
|
+
var import_button = require("@postenbring/hedwig-css/dist/button.css");
|
|
61
|
+
|
|
62
|
+
// src/button/button.tsx
|
|
63
|
+
var import_react = require("react");
|
|
64
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
65
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
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
|
+
);
|
|
112
|
+
BaseButton.displayName = "BaseButton";
|
|
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
|
+
);
|
|
118
|
+
PrimaryButton.displayName = "PrimaryButton";
|
|
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
|
+
);
|
|
124
|
+
SecondaryButton.displayName = "SecondaryButton";
|
|
125
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
126
|
+
0 && (module.exports = {
|
|
127
|
+
BaseButton,
|
|
128
|
+
PrimaryButton,
|
|
129
|
+
SecondaryButton
|
|
130
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AccordionItemContext
|
|
3
|
+
} from "./chunk-2V6SWZ5G.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
9
|
+
|
|
10
|
+
// src/accordion/accordion-item-trigger.tsx
|
|
11
|
+
import { forwardRef, useContext } from "react";
|
|
12
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var AccordionTrigger = forwardRef((_a, ref) => {
|
|
15
|
+
var _b = _a, { as: Component = "button", children, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "onClick"]);
|
|
16
|
+
const itemContext = useContext(AccordionItemContext);
|
|
17
|
+
if (itemContext === null) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const expandOrCollapse = (e) => {
|
|
21
|
+
itemContext.setOpen(!itemContext.open);
|
|
22
|
+
onClick && onClick(e);
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
Component,
|
|
26
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
27
|
+
"aria-expanded": itemContext.open,
|
|
28
|
+
className: clsx(
|
|
29
|
+
"hds-accordion-item-trigger",
|
|
30
|
+
{ "hds-accordion-item-trigger--open": itemContext.open },
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
onClick: expandOrCollapse,
|
|
34
|
+
ref,
|
|
35
|
+
type: "button",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: clsx("hds-accordion-item-trigger--icon"), children: /* @__PURE__ */ jsx(
|
|
38
|
+
"svg",
|
|
39
|
+
{
|
|
40
|
+
fill: "none",
|
|
41
|
+
height: "24",
|
|
42
|
+
viewBox: "0 0 24 24",
|
|
43
|
+
width: "24",
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
children: /* @__PURE__ */ jsx("g", { className: "hds-accordion-item-trigger--icon-chevron", children: /* @__PURE__ */ jsx(
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
className: "hds-accordion-item-trigger--icon-chevron_down",
|
|
49
|
+
d: "M19.6289 9.15625L18.9609 8.45312C18.7852 8.27734 18.5039 8.27734 18.3633 8.45312L12 14.8164L5.60156 8.45312C5.46094 8.27734 5.17969 8.27734 5.00391 8.45312L4.33594 9.15625C4.16016 9.29688 4.16016 9.57812 4.33594 9.75391L11.6836 17.1016C11.8594 17.2773 12.1055 17.2773 12.2812 17.1016L19.6289 9.75391C19.8047 9.57812 19.8047 9.29688 19.6289 9.15625Z"
|
|
50
|
+
}
|
|
51
|
+
) })
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
AccordionTrigger
|
|
63
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/accordion/context.ts
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
var AccordionContext = createContext({
|
|
4
|
+
variant: "multiple",
|
|
5
|
+
mounted: false,
|
|
6
|
+
openItems: [],
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- Added default section, without handling
|
|
8
|
+
toggleOpenItem: (id) => {
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var AccordionItemContext = createContext(null);
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
AccordionContext,
|
|
15
|
+
AccordionItemContext
|
|
16
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
6
|
+
|
|
7
|
+
// src/dropdown/dropdown.tsx
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
function Dropdown(_a) {
|
|
11
|
+
var _b = _a, {
|
|
12
|
+
label,
|
|
13
|
+
variant,
|
|
14
|
+
errorMessage,
|
|
15
|
+
className,
|
|
16
|
+
children
|
|
17
|
+
} = _b, rest = __objRest(_b, [
|
|
18
|
+
"label",
|
|
19
|
+
"variant",
|
|
20
|
+
"errorMessage",
|
|
21
|
+
"className",
|
|
22
|
+
"children"
|
|
23
|
+
]);
|
|
24
|
+
return /* @__PURE__ */ jsxs("label", { className: clsx("hds-dropdown__label", { "hds-dropdown--error": errorMessage }), children: [
|
|
25
|
+
label,
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"select",
|
|
28
|
+
__spreadProps(__spreadValues({
|
|
29
|
+
className: clsx(
|
|
30
|
+
"hds-dropdown",
|
|
31
|
+
{
|
|
32
|
+
[`hds-dropdown--${variant}`]: variant,
|
|
33
|
+
"hds-dropdown--error": errorMessage
|
|
34
|
+
},
|
|
35
|
+
className
|
|
36
|
+
)
|
|
37
|
+
}, rest), {
|
|
38
|
+
children
|
|
39
|
+
})
|
|
40
|
+
),
|
|
41
|
+
errorMessage ? /* @__PURE__ */ jsx("div", { className: "hds-dropdown-message", children: errorMessage }) : null
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
Dropdown.displayName = "Dropdown";
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
Dropdown
|
|
48
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// src/list/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/description-list.css";
|
|
6
|
+
import "@postenbring/hedwig-css/dist/list.css";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
6
|
+
|
|
7
|
+
// src/list/description-list.tsx
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
function DescriptionDetails(_a) {
|
|
11
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
12
|
+
return /* @__PURE__ */ jsx("dd", __spreadProps(__spreadValues({}, rest), { children }));
|
|
13
|
+
}
|
|
14
|
+
function DescriptionTerm(_a) {
|
|
15
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
16
|
+
return /* @__PURE__ */ jsx("dt", __spreadProps(__spreadValues({}, rest), { children }));
|
|
17
|
+
}
|
|
18
|
+
function DescriptionList(_a) {
|
|
19
|
+
var _b = _a, {
|
|
20
|
+
variant = "vertical",
|
|
21
|
+
className
|
|
22
|
+
} = _b, rest = __objRest(_b, [
|
|
23
|
+
"variant",
|
|
24
|
+
"className"
|
|
25
|
+
]);
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"dl",
|
|
28
|
+
__spreadValues({
|
|
29
|
+
className: clsx(
|
|
30
|
+
"hds-description-list",
|
|
31
|
+
{
|
|
32
|
+
"hds-description-list--horizontal": variant === "horizontal"
|
|
33
|
+
},
|
|
34
|
+
className
|
|
35
|
+
)
|
|
36
|
+
}, rest)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
DescriptionList.displayName = "DescriptionList";
|
|
40
|
+
DescriptionTerm.displayName = "DescriptionTerm";
|
|
41
|
+
DescriptionDetails.displayName = "DescriptionDetails";
|
|
42
|
+
var description_list_default = DescriptionList;
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
DescriptionDetails,
|
|
46
|
+
DescriptionTerm,
|
|
47
|
+
DescriptionList,
|
|
48
|
+
description_list_default
|
|
49
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useResize
|
|
3
|
+
} from "./chunk-FSBY3NKV.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
9
|
+
|
|
10
|
+
// src/tabs/tabs.tsx
|
|
11
|
+
import { forwardRef, useContext, useRef, useState } from "react";
|
|
12
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
13
|
+
|
|
14
|
+
// src/tabs/context.ts
|
|
15
|
+
import { createContext } from "react";
|
|
16
|
+
var TabsContext = createContext({
|
|
17
|
+
activeTabId: void 0,
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- Added default section, without handling
|
|
19
|
+
toggleActiveTabId: (tabId) => {
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// src/tabs/tabs.tsx
|
|
24
|
+
import { jsx } from "react/jsx-runtime";
|
|
25
|
+
var Tabs = forwardRef(
|
|
26
|
+
(_a, ref) => {
|
|
27
|
+
var _b = _a, { as: Component = "div", defaultTab, children } = _b, rest = __objRest(_b, ["as", "defaultTab", "children"]);
|
|
28
|
+
const [activeTabId, toggleActiveTabId] = useState(defaultTab);
|
|
29
|
+
return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({ className: clsx("hds-tabs"), ref }, rest), { children: /* @__PURE__ */ jsx(TabsContext.Provider, { value: { activeTabId, toggleActiveTabId }, children }) }));
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
Tabs.displayName = "Tabs";
|
|
33
|
+
function TabList(_a) {
|
|
34
|
+
var _b = _a, { children, direction = "horizontal", className } = _b, rest = __objRest(_b, ["children", "direction", "className"]);
|
|
35
|
+
const tabsListRef = useRef(null);
|
|
36
|
+
const { width: tabsWidth } = useResize(tabsListRef);
|
|
37
|
+
const { innerWidth } = window;
|
|
38
|
+
const wideEnough = innerWidth >= tabsWidth;
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"div",
|
|
41
|
+
__spreadProps(__spreadValues({
|
|
42
|
+
className: clsx(
|
|
43
|
+
"hds-tabs--list",
|
|
44
|
+
direction === "horizontal" ? {
|
|
45
|
+
[`hds-tabs--list-horizontal`]: wideEnough,
|
|
46
|
+
"hds-tabs--list-vertical": !wideEnough
|
|
47
|
+
} : {
|
|
48
|
+
"hds-tabs--list-vertical": true
|
|
49
|
+
},
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
ref: tabsListRef,
|
|
53
|
+
role: "tablist"
|
|
54
|
+
}, rest), {
|
|
55
|
+
children
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
TabList.displayName = "TabList";
|
|
60
|
+
var Tab = forwardRef(
|
|
61
|
+
(_a, ref) => {
|
|
62
|
+
var _b = _a, { as: Component = "button", children, tabId, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "tabId", "className", "onClick"]);
|
|
63
|
+
const context = useContext(TabsContext);
|
|
64
|
+
const toggleTab = (e) => {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
context.toggleActiveTabId(tabId);
|
|
67
|
+
onClick && onClick(e);
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
Component,
|
|
71
|
+
__spreadProps(__spreadValues({
|
|
72
|
+
className: clsx(
|
|
73
|
+
"hds-tabs--tab",
|
|
74
|
+
{ "hds-tabs--tab-active": context.activeTabId === tabId },
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
"data-tabid": tabId,
|
|
78
|
+
onClick: toggleTab,
|
|
79
|
+
ref,
|
|
80
|
+
role: "tab"
|
|
81
|
+
}, rest), {
|
|
82
|
+
children
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
Tab.displayName = "Tab";
|
|
88
|
+
function TabContents(_a) {
|
|
89
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
90
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ className: clsx("hds-tabs--contents") }, rest), { children }));
|
|
91
|
+
}
|
|
92
|
+
TabContents.displayName = "TabContents";
|
|
93
|
+
var TabContent = forwardRef(
|
|
94
|
+
(_a, ref) => {
|
|
95
|
+
var _b = _a, { as: Component = "div", forTabId, children } = _b, rest = __objRest(_b, ["as", "forTabId", "children"]);
|
|
96
|
+
const context = useContext(TabsContext);
|
|
97
|
+
if (context.activeTabId === forTabId) {
|
|
98
|
+
return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { ref, children }));
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
TabContent.displayName = "TabContent";
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
Tabs,
|
|
107
|
+
TabList,
|
|
108
|
+
Tab,
|
|
109
|
+
TabContents,
|
|
110
|
+
TabContent
|
|
111
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UnorderedList
|
|
3
|
+
} from "./chunk-RY53CJI7.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__spreadProps,
|
|
6
|
+
__spreadValues
|
|
7
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
8
|
+
|
|
9
|
+
// src/list/link-list.tsx
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
function LinkList(props) {
|
|
12
|
+
return /* @__PURE__ */ jsx(UnorderedList, __spreadProps(__spreadValues({ listStyle: "no-bullets" }, props), { children: props.children }));
|
|
13
|
+
}
|
|
14
|
+
LinkList.displayName = "LinkList";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
LinkList
|
|
18
|
+
};
|