@postenbring/hedwig-react 0.0.0-add-html-preview-to-storybook-20231121201313

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.
Files changed (46) hide show
  1. package/dist/badge/badge.d.mts +28 -0
  2. package/dist/badge/badge.d.ts +28 -0
  3. package/dist/badge/badge.js +116 -0
  4. package/dist/badge/badge.mjs +13 -0
  5. package/dist/badge/index.d.mts +3 -0
  6. package/dist/badge/index.d.ts +3 -0
  7. package/dist/badge/index.js +122 -0
  8. package/dist/badge/index.mjs +14 -0
  9. package/dist/button/button.d.mts +37 -0
  10. package/dist/button/button.d.ts +37 -0
  11. package/dist/button/button.js +116 -0
  12. package/dist/button/button.mjs +9 -0
  13. package/dist/button/index.d.mts +3 -0
  14. package/dist/button/index.d.ts +3 -0
  15. package/dist/button/index.js +122 -0
  16. package/dist/button/index.mjs +10 -0
  17. package/dist/chunk-4M56UIIY.mjs +43 -0
  18. package/dist/chunk-54PSOAP2.mjs +48 -0
  19. package/dist/chunk-BY5KAPPK.mjs +5 -0
  20. package/dist/chunk-KPQNT7RU.mjs +5 -0
  21. package/dist/chunk-MZBLAAC4.mjs +55 -0
  22. package/dist/chunk-QQ4VOKOL.mjs +5 -0
  23. package/dist/chunk-SE2TV2KK.mjs +63 -0
  24. package/dist/chunk-T6NTDJO4.mjs +44 -0
  25. package/dist/chunk-YKLXFNKF.mjs +57 -0
  26. package/dist/index.d.mts +7 -0
  27. package/dist/index.d.ts +7 -0
  28. package/dist/index.js +289 -0
  29. package/dist/index.mjs +42 -0
  30. package/dist/link/index.d.mts +3 -0
  31. package/dist/link/index.d.ts +3 -0
  32. package/dist/link/index.js +107 -0
  33. package/dist/link/index.mjs +8 -0
  34. package/dist/link/link.d.mts +26 -0
  35. package/dist/link/link.d.ts +26 -0
  36. package/dist/link/link.js +101 -0
  37. package/dist/link/link.mjs +7 -0
  38. package/dist/list/description-list.d.mts +32 -0
  39. package/dist/list/description-list.d.ts +32 -0
  40. package/dist/list/description-list.js +104 -0
  41. package/dist/list/description-list.mjs +13 -0
  42. package/dist/list/index.d.mts +33 -0
  43. package/dist/list/index.d.ts +33 -0
  44. package/dist/list/index.js +159 -0
  45. package/dist/list/index.mjs +19 -0
  46. package/package.json +36 -0
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface BadgeProps extends Omit<React.AnchorHTMLAttributes<HTMLSpanElement>, "className" | "style"> {
5
+ /**
6
+ * Font size of the badge
7
+ */
8
+ size?: "small" | "smaller";
9
+ children: React.ReactNode;
10
+ }
11
+ declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
12
+ declare namespace Badge {
13
+ var displayName: string;
14
+ }
15
+ declare function DarkBadge(props: BadgeProps): react_jsx_runtime.JSX.Element;
16
+ declare namespace DarkBadge {
17
+ var displayName: string;
18
+ }
19
+ declare function WhiteBadge(props: BadgeProps): react_jsx_runtime.JSX.Element;
20
+ declare namespace WhiteBadge {
21
+ var displayName: string;
22
+ }
23
+ declare function WarningBadge(props: BadgeProps): react_jsx_runtime.JSX.Element;
24
+ declare namespace WarningBadge {
25
+ var displayName: string;
26
+ }
27
+
28
+ export { Badge, type BadgeProps, DarkBadge, WarningBadge, WhiteBadge };
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface BadgeProps extends Omit<React.AnchorHTMLAttributes<HTMLSpanElement>, "className" | "style"> {
5
+ /**
6
+ * Font size of the badge
7
+ */
8
+ size?: "small" | "smaller";
9
+ children: React.ReactNode;
10
+ }
11
+ declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
12
+ declare namespace Badge {
13
+ var displayName: string;
14
+ }
15
+ declare function DarkBadge(props: BadgeProps): react_jsx_runtime.JSX.Element;
16
+ declare namespace DarkBadge {
17
+ var displayName: string;
18
+ }
19
+ declare function WhiteBadge(props: BadgeProps): react_jsx_runtime.JSX.Element;
20
+ declare namespace WhiteBadge {
21
+ var displayName: string;
22
+ }
23
+ declare function WarningBadge(props: BadgeProps): react_jsx_runtime.JSX.Element;
24
+ declare namespace WarningBadge {
25
+ var displayName: string;
26
+ }
27
+
28
+ export { Badge, type BadgeProps, DarkBadge, WarningBadge, WhiteBadge };
@@ -0,0 +1,116 @@
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/badge/badge.tsx
50
+ var badge_exports = {};
51
+ __export(badge_exports, {
52
+ Badge: () => Badge,
53
+ DarkBadge: () => DarkBadge,
54
+ WarningBadge: () => WarningBadge,
55
+ WhiteBadge: () => WhiteBadge
56
+ });
57
+ module.exports = __toCommonJS(badge_exports);
58
+ var import_clsx = require("clsx");
59
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
60
+
61
+ // src/utils.ts
62
+ function warnForStyleOverrides(props) {
63
+ if (props.className) {
64
+ console.warn("Overriding styles are not premited");
65
+ }
66
+ if (props.styles) {
67
+ console.warn("Overriding styles are not premited");
68
+ }
69
+ }
70
+
71
+ // src/badge/badge.tsx
72
+ var import_jsx_runtime = require("react/jsx-runtime");
73
+ function BaseBadge(_a) {
74
+ var _b = _a, {
75
+ children,
76
+ variant,
77
+ size = "small"
78
+ } = _b, rest = __objRest(_b, [
79
+ "children",
80
+ "variant",
81
+ "size"
82
+ ]);
83
+ warnForStyleOverrides(rest);
84
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
+ "span",
86
+ __spreadProps(__spreadValues({
87
+ className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-badge"), (0, import_typed_classname.t)(`hds-badge--${size}`), (0, import_typed_classname.t)(`hds-badge--${variant}`))
88
+ }, rest), {
89
+ children
90
+ })
91
+ );
92
+ }
93
+ BaseBadge.displayName = "BaseBadge";
94
+ function Badge(props) {
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
96
+ }
97
+ Badge.displayName = "Badge";
98
+ function DarkBadge(props) {
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
100
+ }
101
+ DarkBadge.displayName = "DarkBadge";
102
+ function WhiteBadge(props) {
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
104
+ }
105
+ WhiteBadge.displayName = "WhiteBadge";
106
+ function WarningBadge(props) {
107
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
108
+ }
109
+ WarningBadge.displayName = "WarningBadge";
110
+ // Annotate the CommonJS export names for ESM import in node:
111
+ 0 && (module.exports = {
112
+ Badge,
113
+ DarkBadge,
114
+ WarningBadge,
115
+ WhiteBadge
116
+ });
@@ -0,0 +1,13 @@
1
+ import {
2
+ Badge,
3
+ DarkBadge,
4
+ WarningBadge,
5
+ WhiteBadge
6
+ } from "../chunk-MZBLAAC4.mjs";
7
+ import "../chunk-54PSOAP2.mjs";
8
+ export {
9
+ Badge,
10
+ DarkBadge,
11
+ WarningBadge,
12
+ WhiteBadge
13
+ };
@@ -0,0 +1,3 @@
1
+ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge.mjs';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,3 @@
1
+ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,122 @@
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/badge/index.tsx
50
+ var badge_exports = {};
51
+ __export(badge_exports, {
52
+ Badge: () => Badge,
53
+ DarkBadge: () => DarkBadge,
54
+ WarningBadge: () => WarningBadge,
55
+ WhiteBadge: () => WhiteBadge
56
+ });
57
+ module.exports = __toCommonJS(badge_exports);
58
+ var import_fonts = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
59
+ var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
60
+ var import_base = require("@postenbring/hedwig-css/dist/base.css");
61
+ var import_badge = require("@postenbring/hedwig-css/dist/badge/badge.css");
62
+
63
+ // src/badge/badge.tsx
64
+ var import_clsx = require("clsx");
65
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
66
+
67
+ // src/utils.ts
68
+ function warnForStyleOverrides(props) {
69
+ if (props.className) {
70
+ console.warn("Overriding styles are not premited");
71
+ }
72
+ if (props.styles) {
73
+ console.warn("Overriding styles are not premited");
74
+ }
75
+ }
76
+
77
+ // src/badge/badge.tsx
78
+ var import_jsx_runtime = require("react/jsx-runtime");
79
+ function BaseBadge(_a) {
80
+ var _b = _a, {
81
+ children,
82
+ variant,
83
+ size = "small"
84
+ } = _b, rest = __objRest(_b, [
85
+ "children",
86
+ "variant",
87
+ "size"
88
+ ]);
89
+ warnForStyleOverrides(rest);
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ "span",
92
+ __spreadProps(__spreadValues({
93
+ className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-badge"), (0, import_typed_classname.t)(`hds-badge--${size}`), (0, import_typed_classname.t)(`hds-badge--${variant}`))
94
+ }, rest), {
95
+ children
96
+ })
97
+ );
98
+ }
99
+ BaseBadge.displayName = "BaseBadge";
100
+ function Badge(props) {
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
102
+ }
103
+ Badge.displayName = "Badge";
104
+ function DarkBadge(props) {
105
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
106
+ }
107
+ DarkBadge.displayName = "DarkBadge";
108
+ function WhiteBadge(props) {
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
110
+ }
111
+ WhiteBadge.displayName = "WhiteBadge";
112
+ function WarningBadge(props) {
113
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
114
+ }
115
+ WarningBadge.displayName = "WarningBadge";
116
+ // Annotate the CommonJS export names for ESM import in node:
117
+ 0 && (module.exports = {
118
+ Badge,
119
+ DarkBadge,
120
+ WarningBadge,
121
+ WhiteBadge
122
+ });
@@ -0,0 +1,14 @@
1
+ import "../chunk-KPQNT7RU.mjs";
2
+ import {
3
+ Badge,
4
+ DarkBadge,
5
+ WarningBadge,
6
+ WhiteBadge
7
+ } from "../chunk-MZBLAAC4.mjs";
8
+ import "../chunk-54PSOAP2.mjs";
9
+ export {
10
+ Badge,
11
+ DarkBadge,
12
+ WarningBadge,
13
+ WhiteBadge
14
+ };
@@ -0,0 +1,37 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> {
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
+ children: React.ReactNode;
19
+ buttonRef?: React.ForwardedRef<HTMLButtonElement>;
20
+ }
21
+ /**
22
+ * ## TODO
23
+ *
24
+ * - [ ] Handle links that looks like buttons
25
+ * - [ ] Revisit how to handle outline
26
+ * - [ ] Figure out outline-white
27
+ */
28
+ declare function PrimaryButton(props: ButtonProps): react_jsx_runtime.JSX.Element;
29
+ declare namespace PrimaryButton {
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
+ }
36
+
37
+ export { type ButtonProps, PrimaryButton, SecondaryButton };
@@ -0,0 +1,37 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> {
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
+ children: React.ReactNode;
19
+ buttonRef?: React.ForwardedRef<HTMLButtonElement>;
20
+ }
21
+ /**
22
+ * ## TODO
23
+ *
24
+ * - [ ] Handle links that looks like buttons
25
+ * - [ ] Revisit how to handle outline
26
+ * - [ ] Figure out outline-white
27
+ */
28
+ declare function PrimaryButton(props: ButtonProps): react_jsx_runtime.JSX.Element;
29
+ declare namespace PrimaryButton {
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
+ }
36
+
37
+ export { type ButtonProps, PrimaryButton, SecondaryButton };
@@ -0,0 +1,116 @@
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
+ PrimaryButton: () => PrimaryButton,
53
+ SecondaryButton: () => SecondaryButton
54
+ });
55
+ module.exports = __toCommonJS(button_exports);
56
+ var import_clsx = require("clsx");
57
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
58
+
59
+ // src/utils.ts
60
+ function warnForStyleOverrides(props) {
61
+ if (props.className) {
62
+ console.warn("Overriding styles are not premited");
63
+ }
64
+ if (props.styles) {
65
+ console.warn("Overriding styles are not premited");
66
+ }
67
+ }
68
+
69
+ // src/button/button.tsx
70
+ var import_jsx_runtime = require("react/jsx-runtime");
71
+ function BaseButton(_a) {
72
+ var _b = _a, {
73
+ children,
74
+ variant,
75
+ size = "medium",
76
+ fullWidth = false,
77
+ fill = "contained",
78
+ buttonRef
79
+ } = _b, rest = __objRest(_b, [
80
+ "children",
81
+ "variant",
82
+ "size",
83
+ "fullWidth",
84
+ "fill",
85
+ "buttonRef"
86
+ ]);
87
+ warnForStyleOverrides(rest);
88
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
+ "button",
90
+ __spreadProps(__spreadValues({
91
+ className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`hds-button--${size}`), {
92
+ [(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained",
93
+ [(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined",
94
+ [(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true,
95
+ [(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile"
96
+ }),
97
+ ref: buttonRef
98
+ }, rest), {
99
+ children
100
+ })
101
+ );
102
+ }
103
+ BaseButton.displayName = "BaseButton";
104
+ function PrimaryButton(props) {
105
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
106
+ }
107
+ PrimaryButton.displayName = "PrimaryButton";
108
+ function SecondaryButton(props) {
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "secondary" }));
110
+ }
111
+ SecondaryButton.displayName = "SecondaryButton";
112
+ // Annotate the CommonJS export names for ESM import in node:
113
+ 0 && (module.exports = {
114
+ PrimaryButton,
115
+ SecondaryButton
116
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ PrimaryButton,
3
+ SecondaryButton
4
+ } from "../chunk-YKLXFNKF.mjs";
5
+ import "../chunk-54PSOAP2.mjs";
6
+ export {
7
+ PrimaryButton,
8
+ SecondaryButton
9
+ };
@@ -0,0 +1,3 @@
1
+ export { ButtonProps, PrimaryButton, SecondaryButton } from './button.mjs';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,3 @@
1
+ export { ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,122 @@
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
+ PrimaryButton: () => PrimaryButton,
53
+ SecondaryButton: () => SecondaryButton
54
+ });
55
+ module.exports = __toCommonJS(button_exports);
56
+ var import_fonts = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
57
+ var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
58
+ var import_base = require("@postenbring/hedwig-css/dist/base.css");
59
+ var import_button = require("@postenbring/hedwig-css/dist/button/button.css");
60
+
61
+ // src/button/button.tsx
62
+ var import_clsx = require("clsx");
63
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
64
+
65
+ // src/utils.ts
66
+ function warnForStyleOverrides(props) {
67
+ if (props.className) {
68
+ console.warn("Overriding styles are not premited");
69
+ }
70
+ if (props.styles) {
71
+ console.warn("Overriding styles are not premited");
72
+ }
73
+ }
74
+
75
+ // src/button/button.tsx
76
+ var import_jsx_runtime = require("react/jsx-runtime");
77
+ function BaseButton(_a) {
78
+ var _b = _a, {
79
+ children,
80
+ variant,
81
+ size = "medium",
82
+ fullWidth = false,
83
+ fill = "contained",
84
+ buttonRef
85
+ } = _b, rest = __objRest(_b, [
86
+ "children",
87
+ "variant",
88
+ "size",
89
+ "fullWidth",
90
+ "fill",
91
+ "buttonRef"
92
+ ]);
93
+ warnForStyleOverrides(rest);
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
95
+ "button",
96
+ __spreadProps(__spreadValues({
97
+ className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`hds-button--${size}`), {
98
+ [(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained",
99
+ [(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined",
100
+ [(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true,
101
+ [(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile"
102
+ }),
103
+ ref: buttonRef
104
+ }, rest), {
105
+ children
106
+ })
107
+ );
108
+ }
109
+ BaseButton.displayName = "BaseButton";
110
+ function PrimaryButton(props) {
111
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
112
+ }
113
+ PrimaryButton.displayName = "PrimaryButton";
114
+ function SecondaryButton(props) {
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "secondary" }));
116
+ }
117
+ SecondaryButton.displayName = "SecondaryButton";
118
+ // Annotate the CommonJS export names for ESM import in node:
119
+ 0 && (module.exports = {
120
+ PrimaryButton,
121
+ SecondaryButton
122
+ });
@@ -0,0 +1,10 @@
1
+ import "../chunk-BY5KAPPK.mjs";
2
+ import {
3
+ PrimaryButton,
4
+ SecondaryButton
5
+ } from "../chunk-YKLXFNKF.mjs";
6
+ import "../chunk-54PSOAP2.mjs";
7
+ export {
8
+ PrimaryButton,
9
+ SecondaryButton
10
+ };