@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.
Files changed (154) hide show
  1. package/dist/accordion/accordion-item-content.d.mts +9 -0
  2. package/dist/accordion/accordion-item-content.d.ts +9 -0
  3. package/dist/accordion/accordion-item-content.js +97 -0
  4. package/dist/accordion/accordion-item-content.mjs +8 -0
  5. package/dist/accordion/accordion-item-trigger.d.mts +9 -0
  6. package/dist/accordion/accordion-item-trigger.d.ts +9 -0
  7. package/dist/accordion/accordion-item-trigger.js +121 -0
  8. package/dist/accordion/accordion-item-trigger.mjs +8 -0
  9. package/dist/accordion/accordion-item.d.mts +15 -0
  10. package/dist/accordion/accordion-item.d.ts +15 -0
  11. package/dist/accordion/accordion-item.js +115 -0
  12. package/dist/accordion/accordion-item.mjs +8 -0
  13. package/dist/accordion/accordion.d.mts +28 -0
  14. package/dist/accordion/accordion.d.ts +28 -0
  15. package/dist/accordion/accordion.js +92 -0
  16. package/dist/accordion/accordion.mjs +8 -0
  17. package/dist/accordion/index.d.mts +6 -0
  18. package/dist/accordion/index.d.ts +6 -0
  19. package/dist/accordion/index.js +227 -0
  20. package/dist/accordion/index.mjs +21 -0
  21. package/dist/badge/badge.d.mts +28 -0
  22. package/dist/badge/badge.d.ts +28 -0
  23. package/dist/badge/badge.js +109 -0
  24. package/dist/badge/badge.mjs +13 -0
  25. package/dist/badge/index.d.mts +3 -0
  26. package/dist/badge/index.d.ts +3 -0
  27. package/dist/badge/index.js +115 -0
  28. package/dist/badge/index.mjs +14 -0
  29. package/dist/box/box.d.mts +36 -0
  30. package/dist/box/box.d.ts +36 -0
  31. package/dist/box/box.js +130 -0
  32. package/dist/box/box.mjs +9 -0
  33. package/dist/box/index.d.mts +3 -0
  34. package/dist/box/index.d.ts +3 -0
  35. package/dist/box/index.js +136 -0
  36. package/dist/box/index.mjs +10 -0
  37. package/dist/breadcrumb/breadcrumb.d.mts +43 -0
  38. package/dist/breadcrumb/breadcrumb.d.ts +43 -0
  39. package/dist/breadcrumb/breadcrumb.js +52 -0
  40. package/dist/breadcrumb/breadcrumb.mjs +7 -0
  41. package/dist/breadcrumb/index.d.mts +3 -0
  42. package/dist/breadcrumb/index.d.ts +3 -0
  43. package/dist/breadcrumb/index.js +58 -0
  44. package/dist/breadcrumb/index.mjs +8 -0
  45. package/dist/button/button.d.mts +37 -0
  46. package/dist/button/button.d.ts +37 -0
  47. package/dist/button/button.js +124 -0
  48. package/dist/button/button.mjs +11 -0
  49. package/dist/button/index.d.mts +3 -0
  50. package/dist/button/index.d.ts +3 -0
  51. package/dist/button/index.js +130 -0
  52. package/dist/button/index.mjs +12 -0
  53. package/dist/chunk-2QSL2PSS.mjs +63 -0
  54. package/dist/chunk-2V6SWZ5G.mjs +16 -0
  55. package/dist/chunk-3VUAKZB2.mjs +48 -0
  56. package/dist/chunk-5OAMKZDX.mjs +6 -0
  57. package/dist/chunk-6XSKLHN6.mjs +49 -0
  58. package/dist/chunk-74UG2OYZ.mjs +111 -0
  59. package/dist/chunk-7SCOBRDZ.mjs +5 -0
  60. package/dist/chunk-AJBQ2EJU.mjs +5 -0
  61. package/dist/chunk-BRBGRJ2I.mjs +18 -0
  62. package/dist/chunk-ENRMC5K7.mjs +75 -0
  63. package/dist/chunk-FSBY3NKV.mjs +47 -0
  64. package/dist/chunk-FUJQIYOF.mjs +37 -0
  65. package/dist/chunk-GMGUONH5.mjs +34 -0
  66. package/dist/chunk-HMESGVY5.mjs +21 -0
  67. package/dist/chunk-IEY4EQ4E.mjs +5 -0
  68. package/dist/chunk-J7U4Z726.mjs +39 -0
  69. package/dist/chunk-L7DYK6OS.mjs +58 -0
  70. package/dist/chunk-LNPO2XQW.mjs +5 -0
  71. package/dist/chunk-LZSDIT5D.mjs +5 -0
  72. package/dist/chunk-MNSMCSAR.mjs +59 -0
  73. package/dist/chunk-Q2HYT3Z7.mjs +16 -0
  74. package/dist/chunk-QV33ZHNO.mjs +60 -0
  75. package/dist/chunk-RXUPE4MM.mjs +82 -0
  76. package/dist/chunk-RY53CJI7.mjs +53 -0
  77. package/dist/chunk-TES7CVGU.mjs +34 -0
  78. package/dist/chunk-TFY7NZMU.mjs +5 -0
  79. package/dist/chunk-VX6MSLLO.mjs +5 -0
  80. package/dist/chunk-X4D24ZRP.mjs +63 -0
  81. package/dist/chunk-XJ44O3HY.mjs +58 -0
  82. package/dist/chunk-YFBW5ZRC.mjs +18 -0
  83. package/dist/chunk-YRAMCYSB.mjs +5 -0
  84. package/dist/dropdown/dropdown.d.mts +15 -0
  85. package/dist/dropdown/dropdown.d.ts +15 -0
  86. package/dist/dropdown/dropdown.js +95 -0
  87. package/dist/dropdown/dropdown.mjs +7 -0
  88. package/dist/dropdown/index.d.mts +3 -0
  89. package/dist/dropdown/index.d.ts +3 -0
  90. package/dist/dropdown/index.js +101 -0
  91. package/dist/dropdown/index.mjs +8 -0
  92. package/dist/index.d.mts +21 -0
  93. package/dist/index.d.ts +21 -0
  94. package/dist/index.js +944 -0
  95. package/dist/index.mjs +114 -0
  96. package/dist/input/index.d.mts +3 -0
  97. package/dist/input/index.d.ts +3 -0
  98. package/dist/input/index.js +121 -0
  99. package/dist/input/index.mjs +13 -0
  100. package/dist/input/input.d.mts +13 -0
  101. package/dist/input/input.d.ts +13 -0
  102. package/dist/input/input.js +115 -0
  103. package/dist/input/input.mjs +7 -0
  104. package/dist/link/index.d.mts +3 -0
  105. package/dist/link/index.d.ts +3 -0
  106. package/dist/link/index.js +87 -0
  107. package/dist/link/index.mjs +8 -0
  108. package/dist/link/link.d.mts +18 -0
  109. package/dist/link/link.d.ts +18 -0
  110. package/dist/link/link.js +81 -0
  111. package/dist/link/link.mjs +7 -0
  112. package/dist/list/description-list.d.mts +32 -0
  113. package/dist/list/description-list.d.ts +32 -0
  114. package/dist/list/description-list.js +98 -0
  115. package/dist/list/description-list.mjs +13 -0
  116. package/dist/list/index.d.mts +5 -0
  117. package/dist/list/index.d.ts +5 -0
  118. package/dist/list/index.js +159 -0
  119. package/dist/list/index.mjs +22 -0
  120. package/dist/list/link-list.d.mts +13 -0
  121. package/dist/list/link-list.d.ts +13 -0
  122. package/dist/list/link-list.js +108 -0
  123. package/dist/list/link-list.mjs +8 -0
  124. package/dist/list/list.d.mts +25 -0
  125. package/dist/list/list.d.ts +25 -0
  126. package/dist/list/list.js +101 -0
  127. package/dist/list/list.mjs +9 -0
  128. package/dist/message/index.d.mts +16 -0
  129. package/dist/message/index.d.ts +16 -0
  130. package/dist/message/index.js +197 -0
  131. package/dist/message/index.mjs +14 -0
  132. package/dist/message/message.d.mts +18 -0
  133. package/dist/message/message.d.ts +18 -0
  134. package/dist/message/message.js +183 -0
  135. package/dist/message/message.mjs +12 -0
  136. package/dist/modal/index.d.mts +9 -0
  137. package/dist/modal/index.d.ts +9 -0
  138. package/dist/modal/index.js +218 -0
  139. package/dist/modal/index.mjs +13 -0
  140. package/dist/modal/modal.d.mts +13 -0
  141. package/dist/modal/modal.d.ts +13 -0
  142. package/dist/modal/modal.js +206 -0
  143. package/dist/modal/modal.mjs +11 -0
  144. package/dist/tabs/index.d.mts +4 -0
  145. package/dist/tabs/index.d.ts +4 -0
  146. package/dist/tabs/index.js +202 -0
  147. package/dist/tabs/index.mjs +17 -0
  148. package/dist/tabs/tabs.d.mts +49 -0
  149. package/dist/tabs/tabs.d.ts +49 -0
  150. package/dist/tabs/tabs.js +196 -0
  151. package/dist/tabs/tabs.mjs +16 -0
  152. package/dist/utils-BfZsjuFH.d.mts +17 -0
  153. package/dist/utils-BfZsjuFH.d.ts +17 -0
  154. package/package.json +34 -0
@@ -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
+ };
@@ -0,0 +1,47 @@
1
+ // src/utils.ts
2
+ import * as React from "react";
3
+ import { useCallback, useEffect, useState } from "react";
4
+ function useMergeRefs(refs) {
5
+ return React.useMemo(() => {
6
+ if (refs.every((ref) => ref === null)) {
7
+ return null;
8
+ }
9
+ return (value) => {
10
+ refs.forEach((ref) => {
11
+ if (typeof ref === "function") {
12
+ ref(value);
13
+ } else if (ref !== null) {
14
+ ref.current = value;
15
+ }
16
+ });
17
+ };
18
+ }, refs);
19
+ }
20
+ function useResize(ref) {
21
+ const [width, setWidth] = useState(0);
22
+ const [height, setHeight] = useState(0);
23
+ const handleResize = useCallback(() => {
24
+ var _a, _b, _c, _d;
25
+ if ((ref == null ? void 0 : ref.current) !== null) {
26
+ setWidth((_b = (_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.offsetWidth) != null ? _b : 0);
27
+ setHeight((_d = (_c = ref == null ? void 0 : ref.current) == null ? void 0 : _c.offsetHeight) != null ? _d : 0);
28
+ }
29
+ }, [ref]);
30
+ useEffect(() => {
31
+ window.addEventListener("load", handleResize);
32
+ window.addEventListener("resize", handleResize);
33
+ return () => {
34
+ window.removeEventListener("load", handleResize);
35
+ window.removeEventListener("resize", handleResize);
36
+ };
37
+ }, [ref, handleResize]);
38
+ useEffect(() => {
39
+ handleResize();
40
+ }, []);
41
+ return { width, height };
42
+ }
43
+
44
+ export {
45
+ useMergeRefs,
46
+ useResize
47
+ };
@@ -0,0 +1,37 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ export {
34
+ __spreadValues,
35
+ __spreadProps,
36
+ __objRest
37
+ };
@@ -0,0 +1,34 @@
1
+ import {
2
+ AccordionContext
3
+ } from "./chunk-2V6SWZ5G.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-FUJQIYOF.mjs";
9
+
10
+ // src/accordion/accordion.tsx
11
+ import { forwardRef, useState } from "react";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
+ import { jsx } from "react/jsx-runtime";
14
+ var Accordion = forwardRef(
15
+ (_a, ref) => {
16
+ var _b = _a, { as: Component = "div", children, className, variant = "multiple" } = _b, rest = __objRest(_b, ["as", "children", "className", "variant"]);
17
+ const [openItems, setOpenItems] = useState([]);
18
+ const toggleOpenItem = (itemId) => {
19
+ if (variant === "single") {
20
+ setOpenItems([itemId]);
21
+ } else {
22
+ setOpenItems(
23
+ openItems.includes(itemId) ? openItems.filter((id) => id !== itemId) : [...openItems, itemId]
24
+ );
25
+ }
26
+ };
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 })) });
28
+ }
29
+ );
30
+ Accordion.displayName = "Accordion";
31
+
32
+ export {
33
+ Accordion
34
+ };
@@ -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/body.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
+ };
@@ -0,0 +1,5 @@
1
+ // src/badge/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/badge.css";
@@ -0,0 +1,39 @@
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-content.tsx
11
+ import { forwardRef, useContext } from "react";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
+ import { jsx } from "react/jsx-runtime";
14
+ var AccordionContent = forwardRef((_a, ref) => {
15
+ var _b = _a, { as: Component = "div", children, className } = _b, rest = __objRest(_b, ["as", "children", "className"]);
16
+ const context = useContext(AccordionItemContext);
17
+ if (context === null) {
18
+ return null;
19
+ }
20
+ return /* @__PURE__ */ jsx(
21
+ Component,
22
+ __spreadProps(__spreadValues({}, rest), {
23
+ className: clsx(
24
+ "hds-accordion-item-content",
25
+ {
26
+ "hds-accordion-item-content--closed": !context.open
27
+ },
28
+ className
29
+ ),
30
+ ref,
31
+ children
32
+ })
33
+ );
34
+ });
35
+ AccordionContent.displayName = "AccordionContent";
36
+
37
+ export {
38
+ AccordionContent
39
+ };
@@ -0,0 +1,58 @@
1
+ import {
2
+ AccordionContext,
3
+ AccordionItemContext
4
+ } from "./chunk-2V6SWZ5G.mjs";
5
+ import {
6
+ __objRest,
7
+ __spreadProps,
8
+ __spreadValues
9
+ } from "./chunk-FUJQIYOF.mjs";
10
+
11
+ // src/accordion/accordion-item.tsx
12
+ import { forwardRef, useContext, useEffect, useId, useState } from "react";
13
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var AccordionItem = forwardRef(
16
+ (_a, ref) => {
17
+ var _b = _a, { as: Component = "div", children, className } = _b, rest = __objRest(_b, ["as", "children", "className"]);
18
+ const context = useContext(AccordionContext);
19
+ const [open, setOpen] = useState(false);
20
+ const accordionItemId = useId();
21
+ const handleOpen = () => {
22
+ setOpen(!open);
23
+ if (context.variant === "single") {
24
+ context.toggleOpenItem(accordionItemId);
25
+ }
26
+ };
27
+ if (!context.mounted) {
28
+ throw new Error("Context required. Did you use <AccordionItem/> outside of <Accordion/>?");
29
+ }
30
+ useEffect(() => {
31
+ if (context.variant === "multiple") {
32
+ return;
33
+ }
34
+ if (open && !context.openItems.includes(accordionItemId)) {
35
+ setOpen(false);
36
+ }
37
+ }, [context.openItems]);
38
+ return /* @__PURE__ */ jsx(
39
+ Component,
40
+ __spreadProps(__spreadValues({}, rest), {
41
+ className: clsx(
42
+ "hds-accordion-item",
43
+ {
44
+ "hds-accordion-item__expanded": open
45
+ },
46
+ className
47
+ ),
48
+ ref,
49
+ children: /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { open, setOpen: handleOpen }, children })
50
+ })
51
+ );
52
+ }
53
+ );
54
+ AccordionItem.displayName = "AccordionItem";
55
+
56
+ export {
57
+ AccordionItem
58
+ };
@@ -0,0 +1,5 @@
1
+ // src/accordion/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/accordion.css";
@@ -0,0 +1,5 @@
1
+ // src/dropdown/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/dropdown.css";
@@ -0,0 +1,59 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/badge/badge.tsx
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function BaseBadge(_a) {
11
+ var _b = _a, {
12
+ children,
13
+ variant,
14
+ size = "small",
15
+ className
16
+ } = _b, rest = __objRest(_b, [
17
+ "children",
18
+ "variant",
19
+ "size",
20
+ "className"
21
+ ]);
22
+ return /* @__PURE__ */ jsx(
23
+ "span",
24
+ __spreadProps(__spreadValues({
25
+ className: clsx(
26
+ "hds-badge",
27
+ `hds-badge--${size}`,
28
+ `hds-badge--${variant}`,
29
+ className
30
+ )
31
+ }, rest), {
32
+ children
33
+ })
34
+ );
35
+ }
36
+ BaseBadge.displayName = "BaseBadge";
37
+ function Badge(props) {
38
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
39
+ }
40
+ Badge.displayName = "Badge";
41
+ function DarkBadge(props) {
42
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
43
+ }
44
+ DarkBadge.displayName = "DarkBadge";
45
+ function WhiteBadge(props) {
46
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
47
+ }
48
+ WhiteBadge.displayName = "WhiteBadge";
49
+ function WarningBadge(props) {
50
+ return /* @__PURE__ */ jsx(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
51
+ }
52
+ WarningBadge.displayName = "WarningBadge";
53
+
54
+ export {
55
+ Badge,
56
+ DarkBadge,
57
+ WhiteBadge,
58
+ WarningBadge
59
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues
4
+ } from "./chunk-FUJQIYOF.mjs";
5
+
6
+ // src/breadcrumb/breadcrumb.tsx
7
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function Breadcrumbs({ navProps, olProps, children }) {
10
+ return /* @__PURE__ */ jsx("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ jsx("ol", __spreadProps(__spreadValues({}, olProps), { className: clsx("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
11
+ }
12
+ Breadcrumbs.displayName = "Breadcrumbs";
13
+
14
+ export {
15
+ Breadcrumbs
16
+ };
@@ -0,0 +1,60 @@
1
+ import {
2
+ useMergeRefs
3
+ } from "./chunk-FSBY3NKV.mjs";
4
+ import {
5
+ Box
6
+ } from "./chunk-RXUPE4MM.mjs";
7
+ import {
8
+ __objRest,
9
+ __spreadProps,
10
+ __spreadValues
11
+ } from "./chunk-FUJQIYOF.mjs";
12
+
13
+ // src/modal/modal.tsx
14
+ import { forwardRef, useRef } from "react";
15
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
16
+ import { jsx } from "react/jsx-runtime";
17
+ var Modal = forwardRef(
18
+ (_a, ref) => {
19
+ var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
20
+ const modalRef = useRef(null);
21
+ const mergedRef = useMergeRefs([modalRef, ref]);
22
+ function onClose() {
23
+ var _a2;
24
+ (_a2 = modalRef.current) == null ? void 0 : _a2.close();
25
+ return false;
26
+ }
27
+ return /* @__PURE__ */ jsx(
28
+ Box,
29
+ __spreadProps(__spreadValues({
30
+ as: "dialog",
31
+ className: clsx("hds-modal", className),
32
+ closeable: true,
33
+ onClose,
34
+ ref: mergedRef,
35
+ variant: "white"
36
+ }, rest), {
37
+ children
38
+ })
39
+ );
40
+ }
41
+ );
42
+ Modal.displayName = "Modal";
43
+ var ModalHeader = forwardRef(
44
+ (_a, ref) => {
45
+ var _b = _a, { as: Component = "h1", className } = _b, rest = __objRest(_b, ["as", "className"]);
46
+ return /* @__PURE__ */ jsx(
47
+ Component,
48
+ __spreadValues({
49
+ className: clsx("hds-modal__header", className),
50
+ ref
51
+ }, rest)
52
+ );
53
+ }
54
+ );
55
+ ModalHeader.displayName = "ModalHeader";
56
+
57
+ export {
58
+ Modal,
59
+ ModalHeader
60
+ };
@@ -0,0 +1,82 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/box/box.tsx
8
+ import { forwardRef, useCallback, useState } from "react";
9
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var Box = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, {
14
+ as: Component = "div",
15
+ variant = "light-grey",
16
+ closeable = false,
17
+ onClose: onCloseProp,
18
+ closed: closedProp,
19
+ closeButtonProps,
20
+ children,
21
+ className
22
+ } = _b, rest = __objRest(_b, [
23
+ "as",
24
+ "variant",
25
+ "closeable",
26
+ "onClose",
27
+ "closed",
28
+ "closeButtonProps",
29
+ "children",
30
+ "className"
31
+ ]);
32
+ const [closedState, setClosedState] = useState(false);
33
+ const onClose = useCallback(() => {
34
+ if (onCloseProp) {
35
+ const result = onCloseProp();
36
+ if (result === true) {
37
+ setClosedState(true);
38
+ }
39
+ } else {
40
+ setClosedState(true);
41
+ }
42
+ }, []);
43
+ const closed = closedProp != null ? closedProp : closedState;
44
+ return /* @__PURE__ */ jsxs(
45
+ Component,
46
+ __spreadProps(__spreadValues({
47
+ className: clsx(
48
+ "hds-box",
49
+ `hds-box--${variant}`,
50
+ { "hds-box--closed": closed },
51
+ className
52
+ ),
53
+ ref
54
+ }, rest), {
55
+ children: [
56
+ closeable ? /* @__PURE__ */ jsx(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
57
+ children
58
+ ]
59
+ })
60
+ );
61
+ }
62
+ );
63
+ Box.displayName = "Box";
64
+ var BoxCloseButton = forwardRef(
65
+ (_a, ref) => {
66
+ var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
67
+ return /* @__PURE__ */ jsx(
68
+ "button",
69
+ __spreadValues({
70
+ className: clsx("hds-box__close-button", className),
71
+ ref,
72
+ type: "button"
73
+ }, rest)
74
+ );
75
+ }
76
+ );
77
+ BoxCloseButton.displayName = "BoxCloseButton";
78
+
79
+ export {
80
+ Box,
81
+ BoxCloseButton
82
+ };
@@ -0,0 +1,53 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/list/list.tsx
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function BaseList(_a) {
11
+ var _b = _a, {
12
+ as: ListTag = "ul",
13
+ children,
14
+ listStyle = "inherit",
15
+ size = "medium",
16
+ className
17
+ } = _b, rest = __objRest(_b, [
18
+ "as",
19
+ "children",
20
+ "listStyle",
21
+ "size",
22
+ "className"
23
+ ]);
24
+ return /* @__PURE__ */ jsx(
25
+ ListTag,
26
+ __spreadProps(__spreadValues({
27
+ className: clsx(
28
+ "hds-list",
29
+ `hds-list--${size}`,
30
+ {
31
+ "hds-list--no-bullets": listStyle === "no-bullets"
32
+ },
33
+ className
34
+ )
35
+ }, rest), {
36
+ children
37
+ })
38
+ );
39
+ }
40
+ function UnorderedList(props) {
41
+ return /* @__PURE__ */ jsx(BaseList, __spreadProps(__spreadValues({ as: "ul" }, props), { children: props.children }));
42
+ }
43
+ function OrderedList(props) {
44
+ return /* @__PURE__ */ jsx(BaseList, __spreadProps(__spreadValues({ as: "ol" }, props), { children: props.children }));
45
+ }
46
+ BaseList.displayName = "BaseList";
47
+ OrderedList.displayName = "OrderedList";
48
+ UnorderedList.displayName = "UnorderedList";
49
+
50
+ export {
51
+ UnorderedList,
52
+ OrderedList
53
+ };
@@ -0,0 +1,34 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/link/link.tsx
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
9
+ import { forwardRef } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Link = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { as: Component = "a", children, variant = "underline", size = "medium", className } = _b, rest = __objRest(_b, ["as", "children", "variant", "size", "className"]);
14
+ return /* @__PURE__ */ jsx(
15
+ Component,
16
+ __spreadProps(__spreadValues({
17
+ className: clsx(
18
+ "hds-link",
19
+ variant !== "underline" && `hds-link--${variant}`,
20
+ size !== "medium" && `hds-link--${size}`,
21
+ className
22
+ ),
23
+ ref
24
+ }, rest), {
25
+ children
26
+ })
27
+ );
28
+ }
29
+ );
30
+ Link.displayName = "Link";
31
+
32
+ export {
33
+ Link
34
+ };
@@ -0,0 +1,5 @@
1
+ // src/tabs/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/tabs.css";
@@ -0,0 +1,5 @@
1
+ // src/button/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/button.css";