@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
package/dist/box/box.js
ADDED
|
@@ -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/box/box.tsx
|
|
50
|
+
var box_exports = {};
|
|
51
|
+
__export(box_exports, {
|
|
52
|
+
Box: () => Box,
|
|
53
|
+
BoxCloseButton: () => BoxCloseButton
|
|
54
|
+
});
|
|
55
|
+
module.exports = __toCommonJS(box_exports);
|
|
56
|
+
var import_react = require("react");
|
|
57
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
+
var Box = (0, import_react.forwardRef)(
|
|
60
|
+
(_a, ref) => {
|
|
61
|
+
var _b = _a, {
|
|
62
|
+
as: Component = "div",
|
|
63
|
+
variant = "light-grey",
|
|
64
|
+
closeable = false,
|
|
65
|
+
onClose: onCloseProp,
|
|
66
|
+
closed: closedProp,
|
|
67
|
+
closeButtonProps,
|
|
68
|
+
children,
|
|
69
|
+
className
|
|
70
|
+
} = _b, rest = __objRest(_b, [
|
|
71
|
+
"as",
|
|
72
|
+
"variant",
|
|
73
|
+
"closeable",
|
|
74
|
+
"onClose",
|
|
75
|
+
"closed",
|
|
76
|
+
"closeButtonProps",
|
|
77
|
+
"children",
|
|
78
|
+
"className"
|
|
79
|
+
]);
|
|
80
|
+
const [closedState, setClosedState] = (0, import_react.useState)(false);
|
|
81
|
+
const onClose = (0, import_react.useCallback)(() => {
|
|
82
|
+
if (onCloseProp) {
|
|
83
|
+
const result = onCloseProp();
|
|
84
|
+
if (result === true) {
|
|
85
|
+
setClosedState(true);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
setClosedState(true);
|
|
89
|
+
}
|
|
90
|
+
}, []);
|
|
91
|
+
const closed = closedProp != null ? closedProp : closedState;
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
93
|
+
Component,
|
|
94
|
+
__spreadProps(__spreadValues({
|
|
95
|
+
className: (0, import_typed_classname.clsx)(
|
|
96
|
+
"hds-box",
|
|
97
|
+
`hds-box--${variant}`,
|
|
98
|
+
{ "hds-box--closed": closed },
|
|
99
|
+
className
|
|
100
|
+
),
|
|
101
|
+
ref
|
|
102
|
+
}, rest), {
|
|
103
|
+
children: [
|
|
104
|
+
closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
|
|
105
|
+
children
|
|
106
|
+
]
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
Box.displayName = "Box";
|
|
112
|
+
var BoxCloseButton = (0, import_react.forwardRef)(
|
|
113
|
+
(_a, ref) => {
|
|
114
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
+
"button",
|
|
117
|
+
__spreadValues({
|
|
118
|
+
className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
|
|
119
|
+
ref,
|
|
120
|
+
type: "button"
|
|
121
|
+
}, rest)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
BoxCloseButton.displayName = "BoxCloseButton";
|
|
126
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
127
|
+
0 && (module.exports = {
|
|
128
|
+
Box,
|
|
129
|
+
BoxCloseButton
|
|
130
|
+
});
|
package/dist/box/box.mjs
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
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/box/index.tsx
|
|
50
|
+
var box_exports = {};
|
|
51
|
+
__export(box_exports, {
|
|
52
|
+
Box: () => Box,
|
|
53
|
+
BoxCloseButton: () => BoxCloseButton
|
|
54
|
+
});
|
|
55
|
+
module.exports = __toCommonJS(box_exports);
|
|
56
|
+
var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
|
|
57
|
+
var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
|
|
58
|
+
var import_body = require("@postenbring/hedwig-css/dist/body.css");
|
|
59
|
+
var import_box = require("@postenbring/hedwig-css/dist/box.css");
|
|
60
|
+
|
|
61
|
+
// src/box/box.tsx
|
|
62
|
+
var import_react = require("react");
|
|
63
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
64
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
65
|
+
var Box = (0, import_react.forwardRef)(
|
|
66
|
+
(_a, ref) => {
|
|
67
|
+
var _b = _a, {
|
|
68
|
+
as: Component = "div",
|
|
69
|
+
variant = "light-grey",
|
|
70
|
+
closeable = false,
|
|
71
|
+
onClose: onCloseProp,
|
|
72
|
+
closed: closedProp,
|
|
73
|
+
closeButtonProps,
|
|
74
|
+
children,
|
|
75
|
+
className
|
|
76
|
+
} = _b, rest = __objRest(_b, [
|
|
77
|
+
"as",
|
|
78
|
+
"variant",
|
|
79
|
+
"closeable",
|
|
80
|
+
"onClose",
|
|
81
|
+
"closed",
|
|
82
|
+
"closeButtonProps",
|
|
83
|
+
"children",
|
|
84
|
+
"className"
|
|
85
|
+
]);
|
|
86
|
+
const [closedState, setClosedState] = (0, import_react.useState)(false);
|
|
87
|
+
const onClose = (0, import_react.useCallback)(() => {
|
|
88
|
+
if (onCloseProp) {
|
|
89
|
+
const result = onCloseProp();
|
|
90
|
+
if (result === true) {
|
|
91
|
+
setClosedState(true);
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
setClosedState(true);
|
|
95
|
+
}
|
|
96
|
+
}, []);
|
|
97
|
+
const closed = closedProp != null ? closedProp : closedState;
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
99
|
+
Component,
|
|
100
|
+
__spreadProps(__spreadValues({
|
|
101
|
+
className: (0, import_typed_classname.clsx)(
|
|
102
|
+
"hds-box",
|
|
103
|
+
`hds-box--${variant}`,
|
|
104
|
+
{ "hds-box--closed": closed },
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
ref
|
|
108
|
+
}, rest), {
|
|
109
|
+
children: [
|
|
110
|
+
closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
|
|
111
|
+
children
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
Box.displayName = "Box";
|
|
118
|
+
var BoxCloseButton = (0, import_react.forwardRef)(
|
|
119
|
+
(_a, ref) => {
|
|
120
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
"button",
|
|
123
|
+
__spreadValues({
|
|
124
|
+
className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
|
|
125
|
+
ref,
|
|
126
|
+
type: "button"
|
|
127
|
+
}, rest)
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
BoxCloseButton.displayName = "BoxCloseButton";
|
|
132
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
133
|
+
0 && (module.exports = {
|
|
134
|
+
Box,
|
|
135
|
+
BoxCloseButton
|
|
136
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { HTMLAttributes, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {
|
|
5
|
+
children: ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];
|
|
6
|
+
/**
|
|
7
|
+
* Props passed to the root `nav` html element
|
|
8
|
+
*/
|
|
9
|
+
navProps?: HTMLAttributes<HTMLElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Props passed to the `ol` html element
|
|
12
|
+
*/
|
|
13
|
+
olProps?: HTMLAttributes<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A breadcrumbs navigation menu
|
|
17
|
+
*
|
|
18
|
+
* **Usage**
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Breadcrumbs>
|
|
22
|
+
* <li><Link href="../">Previous page</Link></li>
|
|
23
|
+
* <li>Current page</li>
|
|
24
|
+
* </Breadcrumbs>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Outputs this html structure
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <nav>
|
|
31
|
+
* <ol>
|
|
32
|
+
* <li><a href="../">Previous page</a></li>
|
|
33
|
+
* <li>Current page</li>
|
|
34
|
+
* </ol>
|
|
35
|
+
* </nav>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function Breadcrumbs({ navProps, olProps, children }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare namespace Breadcrumbs {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { Breadcrumbs, type BreadcrumbsProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { HTMLAttributes, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {
|
|
5
|
+
children: ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];
|
|
6
|
+
/**
|
|
7
|
+
* Props passed to the root `nav` html element
|
|
8
|
+
*/
|
|
9
|
+
navProps?: HTMLAttributes<HTMLElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Props passed to the `ol` html element
|
|
12
|
+
*/
|
|
13
|
+
olProps?: HTMLAttributes<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A breadcrumbs navigation menu
|
|
17
|
+
*
|
|
18
|
+
* **Usage**
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Breadcrumbs>
|
|
22
|
+
* <li><Link href="../">Previous page</Link></li>
|
|
23
|
+
* <li>Current page</li>
|
|
24
|
+
* </Breadcrumbs>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Outputs this html structure
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <nav>
|
|
31
|
+
* <ol>
|
|
32
|
+
* <li><a href="../">Previous page</a></li>
|
|
33
|
+
* <li>Current page</li>
|
|
34
|
+
* </ol>
|
|
35
|
+
* </nav>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function Breadcrumbs({ navProps, olProps, children }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare namespace Breadcrumbs {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { Breadcrumbs, type BreadcrumbsProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
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 __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// src/breadcrumb/breadcrumb.tsx
|
|
38
|
+
var breadcrumb_exports = {};
|
|
39
|
+
__export(breadcrumb_exports, {
|
|
40
|
+
Breadcrumbs: () => Breadcrumbs
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(breadcrumb_exports);
|
|
43
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
function Breadcrumbs({ navProps, olProps, children }) {
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", __spreadProps(__spreadValues({}, olProps), { className: (0, import_typed_classname.clsx)("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
|
|
47
|
+
}
|
|
48
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
Breadcrumbs
|
|
52
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
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 __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// src/breadcrumb/index.tsx
|
|
38
|
+
var breadcrumb_exports = {};
|
|
39
|
+
__export(breadcrumb_exports, {
|
|
40
|
+
Breadcrumbs: () => Breadcrumbs
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(breadcrumb_exports);
|
|
43
|
+
var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
|
|
44
|
+
var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
|
|
45
|
+
var import_body = require("@postenbring/hedwig-css/dist/body.css");
|
|
46
|
+
var import_breadcrumb = require("@postenbring/hedwig-css/dist/breadcrumb.css");
|
|
47
|
+
|
|
48
|
+
// src/breadcrumb/breadcrumb.tsx
|
|
49
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
50
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
|
+
function Breadcrumbs({ navProps, olProps, children }) {
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", __spreadProps(__spreadValues({}, olProps), { className: (0, import_typed_classname.clsx)("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
|
|
53
|
+
}
|
|
54
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
Breadcrumbs
|
|
58
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { O as OverridableComponent } from '../utils-BfZsjuFH.mjs';
|
|
2
|
+
import 'react';
|
|
3
|
+
|
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
/**
|
|
6
|
+
* The height, font size and padding of the button
|
|
7
|
+
*/
|
|
8
|
+
size?: "small" | "medium" | "large";
|
|
9
|
+
/**
|
|
10
|
+
* Make the button use 100% width available.
|
|
11
|
+
* Using the "mobile" it only stretch to full width on smaller screens
|
|
12
|
+
*/
|
|
13
|
+
fullWidth?: boolean | "mobile";
|
|
14
|
+
/**
|
|
15
|
+
* The background of the button.
|
|
16
|
+
*/
|
|
17
|
+
fill?: "contained" | "outlined";
|
|
18
|
+
/**
|
|
19
|
+
* Use an icon inside the button
|
|
20
|
+
*/
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare const BaseButton: OverridableComponent<ButtonProps & {
|
|
25
|
+
variant: "primary" | "secondary";
|
|
26
|
+
}, HTMLButtonElement>;
|
|
27
|
+
/**
|
|
28
|
+
* ## TODO
|
|
29
|
+
*
|
|
30
|
+
* - [x] Handle links that looks like buttons
|
|
31
|
+
* - [ ] Revisit how to handle outline
|
|
32
|
+
* - [ ] Figure out outline-white
|
|
33
|
+
*/
|
|
34
|
+
declare const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
|
|
35
|
+
declare const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
|
|
36
|
+
|
|
37
|
+
export { BaseButton, type ButtonProps, PrimaryButton, SecondaryButton };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { O as OverridableComponent } from '../utils-BfZsjuFH.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
|
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
/**
|
|
6
|
+
* The height, font size and padding of the button
|
|
7
|
+
*/
|
|
8
|
+
size?: "small" | "medium" | "large";
|
|
9
|
+
/**
|
|
10
|
+
* Make the button use 100% width available.
|
|
11
|
+
* Using the "mobile" it only stretch to full width on smaller screens
|
|
12
|
+
*/
|
|
13
|
+
fullWidth?: boolean | "mobile";
|
|
14
|
+
/**
|
|
15
|
+
* The background of the button.
|
|
16
|
+
*/
|
|
17
|
+
fill?: "contained" | "outlined";
|
|
18
|
+
/**
|
|
19
|
+
* Use an icon inside the button
|
|
20
|
+
*/
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare const BaseButton: OverridableComponent<ButtonProps & {
|
|
25
|
+
variant: "primary" | "secondary";
|
|
26
|
+
}, HTMLButtonElement>;
|
|
27
|
+
/**
|
|
28
|
+
* ## TODO
|
|
29
|
+
*
|
|
30
|
+
* - [x] Handle links that looks like buttons
|
|
31
|
+
* - [ ] Revisit how to handle outline
|
|
32
|
+
* - [ ] Figure out outline-white
|
|
33
|
+
*/
|
|
34
|
+
declare const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
|
|
35
|
+
declare const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
|
|
36
|
+
|
|
37
|
+
export { BaseButton, type ButtonProps, PrimaryButton, SecondaryButton };
|