@postenbring/hedwig-react 0.0.6 → 0.0.9
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 +26 -13
- 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 +35 -25
- package/dist/accordion/index.mjs +5 -5
- package/dist/badge/badge.js +10 -4
- package/dist/badge/badge.mjs +1 -1
- package/dist/badge/index.js +12 -6
- package/dist/badge/index.mjs +2 -2
- 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 +10 -11
- package/dist/box/index.mjs +2 -2
- 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 +61 -40
- package/dist/button/index.mjs +4 -2
- package/dist/chunk-2QSL2PSS.mjs +63 -0
- package/dist/chunk-5NDZ66M6.mjs +5 -0
- package/dist/chunk-6AW5BEDP.mjs +21 -0
- package/dist/{chunk-B3PZUFG2.mjs → chunk-6XSKLHN6.mjs} +15 -6
- package/dist/chunk-BJANCH4F.mjs +5 -0
- 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-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-N3EFZW7T.mjs +5 -0
- package/dist/{chunk-IOOSUX5O.mjs → chunk-QOVAYDPH.mjs} +2 -2
- package/dist/chunk-R55SMUE7.mjs +5 -0
- package/dist/{chunk-EX4U7YZF.mjs → chunk-RXUPE4MM.mjs} +8 -9
- package/dist/{chunk-IWDN3WGQ.mjs → chunk-STKOYB5H.mjs} +13 -7
- package/dist/chunk-TES7CVGU.mjs +34 -0
- package/dist/chunk-X4D24ZRP.mjs +63 -0
- package/dist/chunk-XJ44O3HY.mjs +58 -0
- package/dist/chunk-Z36ETKOZ.mjs +5 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +235 -155
- package/dist/index.mjs +32 -25
- 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 +1 -1
- package/dist/input/input.d.ts +1 -1
- package/dist/input/input.js +13 -7
- package/dist/input/input.mjs +3 -47
- package/dist/link/index.d.mts +1 -1
- package/dist/link/index.d.ts +1 -1
- package/dist/link/index.js +22 -29
- package/dist/link/index.mjs +2 -2
- package/dist/link/link.d.mts +2 -10
- package/dist/link/link.d.ts +2 -10
- package/dist/link/link.js +20 -27
- 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 +28 -13
- package/dist/list/index.mjs +8 -8
- 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 +51 -16
- 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 +3 -5
- package/dist/chunk-4XWB4ZSR.mjs +0 -6
- package/dist/chunk-7F7QB4D5.mjs +0 -50
- package/dist/chunk-AYGPUYPZ.mjs +0 -5
- package/dist/chunk-CYW3DUD2.mjs +0 -5
- package/dist/chunk-EKFYWUBE.mjs +0 -36
- package/dist/chunk-GSPFHK2Z.mjs +0 -55
- package/dist/chunk-ID5KKZMK.mjs +0 -5
- package/dist/chunk-PCKWBORI.mjs +0 -5
- package/dist/chunk-VZNNGRKM.mjs +0 -5
- package/dist/chunk-X3OAJSS2.mjs +0 -41
package/dist/button/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { O as OverridableComponent } from '../utils-BfZsjuFH.js';
|
|
2
|
+
import 'react';
|
|
3
3
|
|
|
4
4
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
/**
|
|
@@ -15,23 +15,23 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
15
15
|
* The background of the button.
|
|
16
16
|
*/
|
|
17
17
|
fill?: "contained" | "outlined";
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Use an icon inside the button
|
|
20
|
+
*/
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
children?: React.ReactNode;
|
|
20
23
|
}
|
|
24
|
+
declare const BaseButton: OverridableComponent<ButtonProps & {
|
|
25
|
+
variant: "primary" | "secondary";
|
|
26
|
+
}, HTMLButtonElement>;
|
|
21
27
|
/**
|
|
22
28
|
* ## TODO
|
|
23
29
|
*
|
|
24
|
-
* - [
|
|
30
|
+
* - [x] Handle links that looks like buttons
|
|
25
31
|
* - [ ] Revisit how to handle outline
|
|
26
32
|
* - [ ] Figure out outline-white
|
|
27
33
|
*/
|
|
28
|
-
declare
|
|
29
|
-
declare
|
|
30
|
-
var displayName: string;
|
|
31
|
-
}
|
|
32
|
-
declare function SecondaryButton(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
33
|
-
declare namespace SecondaryButton {
|
|
34
|
-
var displayName: string;
|
|
35
|
-
}
|
|
34
|
+
declare const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
|
|
35
|
+
declare const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement>;
|
|
36
36
|
|
|
37
|
-
export { type ButtonProps, PrimaryButton, SecondaryButton };
|
|
37
|
+
export { BaseButton, type ButtonProps, PrimaryButton, SecondaryButton };
|
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,61 +49,82 @@ 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
|
});
|
|
55
56
|
module.exports = __toCommonJS(button_exports);
|
|
56
|
-
var import_fonts = require("@postenbring/hedwig-
|
|
57
|
-
var import_tokens = require("@postenbring/hedwig-
|
|
57
|
+
var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
|
|
58
|
+
var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
|
|
58
59
|
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
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-N3EFZW7T.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
|
};
|
|
@@ -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,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Message,
|
|
3
|
+
MessageDescription,
|
|
4
|
+
MessageTitle
|
|
5
|
+
} from "./chunk-X4D24ZRP.mjs";
|
|
6
|
+
|
|
7
|
+
// src/message/index.tsx
|
|
8
|
+
import "@postenbring/hedwig-css/dist/fonts.css";
|
|
9
|
+
import "@postenbring/hedwig-css/dist/tokens.css";
|
|
10
|
+
import "@postenbring/hedwig-css/dist/base.css";
|
|
11
|
+
import "@postenbring/hedwig-css/dist/box.css";
|
|
12
|
+
import "@postenbring/hedwig-css/dist/message.css";
|
|
13
|
+
var MessageComponent = Message;
|
|
14
|
+
MessageComponent.Title = MessageTitle;
|
|
15
|
+
MessageComponent.Description = MessageDescription;
|
|
16
|
+
MessageComponent.Title.displayName = "Message";
|
|
17
|
+
MessageComponent.Description.displayName = "Message";
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
MessageComponent
|
|
21
|
+
};
|
|
@@ -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-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
|
})
|