@postenbring/hedwig-react 0.0.32 → 0.0.34

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 (71) hide show
  1. package/dist/box/box.js +2 -2
  2. package/dist/box/box.mjs +1 -1
  3. package/dist/box/index.js +2 -2
  4. package/dist/box/index.mjs +1 -1
  5. package/dist/card/card.d.mts +19 -0
  6. package/dist/card/card.d.ts +19 -0
  7. package/dist/card/card.js +137 -0
  8. package/dist/card/card.mjs +21 -0
  9. package/dist/card/index.d.mts +35 -0
  10. package/dist/card/index.d.ts +35 -0
  11. package/dist/card/index.js +155 -0
  12. package/dist/card/index.mjs +23 -0
  13. package/dist/{chunk-CB472XH7.mjs → chunk-5MNVIJJ2.mjs} +1 -1
  14. package/dist/chunk-CP4CKVIA.mjs +76 -0
  15. package/dist/chunk-FB5VUC62.mjs +29 -0
  16. package/dist/chunk-FJQCHTJZ.mjs +5 -0
  17. package/dist/chunk-GD4NFQGX.mjs +32 -0
  18. package/dist/chunk-K2HIKZ7F.mjs +5 -0
  19. package/dist/chunk-LWMZV362.mjs +83 -0
  20. package/dist/{chunk-X4D24ZRP.mjs → chunk-QZIJ2OXE.mjs} +1 -1
  21. package/dist/{chunk-QV33ZHNO.mjs → chunk-SQULBVH7.mjs} +1 -1
  22. package/dist/{chunk-RXUPE4MM.mjs → chunk-SWZLMDKJ.mjs} +2 -2
  23. package/dist/{chunk-YFBW5ZRC.mjs → chunk-TUJCKNKR.mjs} +1 -1
  24. package/dist/chunk-VLMLWQKD.mjs +100 -0
  25. package/dist/chunk-VS4HRMMY.mjs +30 -0
  26. package/dist/index.d.mts +13 -9
  27. package/dist/index.d.ts +13 -9
  28. package/dist/index.js +797 -569
  29. package/dist/index.mjs +52 -22
  30. package/dist/layout/container/container.d.mts +10 -0
  31. package/dist/layout/container/container.d.ts +10 -0
  32. package/dist/layout/container/container.js +79 -0
  33. package/dist/layout/container/container.mjs +7 -0
  34. package/dist/layout/index.d.mts +3 -0
  35. package/dist/layout/index.d.ts +3 -0
  36. package/dist/layout/index.js +85 -0
  37. package/dist/layout/index.mjs +8 -0
  38. package/dist/message/index.d.mts +1 -1
  39. package/dist/message/index.d.ts +1 -1
  40. package/dist/message/index.js +2 -2
  41. package/dist/message/index.mjs +3 -3
  42. package/dist/message/message.js +2 -2
  43. package/dist/message/message.mjs +2 -2
  44. package/dist/modal/index.js +2 -2
  45. package/dist/modal/index.mjs +3 -3
  46. package/dist/modal/modal.js +2 -2
  47. package/dist/modal/modal.mjs +2 -2
  48. package/dist/navbar/index.d.mts +16 -0
  49. package/dist/navbar/index.d.ts +16 -0
  50. package/dist/navbar/index.js +154 -0
  51. package/dist/navbar/index.mjs +25 -0
  52. package/dist/navbar/navbar-expandable-menu.d.mts +38 -0
  53. package/dist/navbar/navbar-expandable-menu.d.ts +38 -0
  54. package/dist/navbar/navbar-expandable-menu.js +125 -0
  55. package/dist/navbar/navbar-expandable-menu.mjs +11 -0
  56. package/dist/navbar/navbar.d.mts +16 -0
  57. package/dist/navbar/navbar.d.ts +16 -0
  58. package/dist/navbar/navbar.js +77 -0
  59. package/dist/navbar/navbar.mjs +9 -0
  60. package/dist/tabs/index.mjs +2 -2
  61. package/dist/tabs/tabs-list.mjs +2 -2
  62. package/dist/warning-banner/index.d.mts +3 -0
  63. package/dist/warning-banner/index.d.ts +3 -0
  64. package/dist/warning-banner/index.js +230 -0
  65. package/dist/warning-banner/index.mjs +10 -0
  66. package/dist/warning-banner/warning-banner.d.mts +10 -0
  67. package/dist/warning-banner/warning-banner.d.ts +10 -0
  68. package/dist/warning-banner/warning-banner.js +224 -0
  69. package/dist/warning-banner/warning-banner.mjs +9 -0
  70. package/package.json +3 -3
  71. package/dist/{chunk-NVMNXQ5Q.mjs → chunk-YPD2CH5T.mjs} +3 -3
@@ -0,0 +1,83 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/card/card.tsx
8
+ import { forwardRef } from "react";
9
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Card = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { as: Component = "div", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
14
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-card", className), ref, children }));
15
+ }
16
+ );
17
+ Card.displayName = "Card";
18
+ var CardMedia = forwardRef(
19
+ (_a, ref) => {
20
+ var _b = _a, { as: Component = "div", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
21
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-card__media", className), ref, children }));
22
+ }
23
+ );
24
+ CardMedia.displayName = "Card.Media";
25
+ var CardMediaImg = forwardRef(
26
+ (_a, ref) => {
27
+ var _b = _a, { as: Component = "img", className } = _b, rest = __objRest(_b, ["as", "className"]);
28
+ return /* @__PURE__ */ jsx(
29
+ Component,
30
+ __spreadProps(__spreadValues({}, rest), {
31
+ className: clsx("hds-card__media__img", className),
32
+ ref
33
+ })
34
+ );
35
+ }
36
+ );
37
+ CardMediaImg.displayName = "Card.Media.Img";
38
+ var CardBody = forwardRef(
39
+ (_a, ref) => {
40
+ var _b = _a, { as: Component = "div", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
41
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-card__body", className), ref, children }));
42
+ }
43
+ );
44
+ CardBody.displayName = "Card.Body";
45
+ var CardBodyOverline = forwardRef(
46
+ (_a, ref) => {
47
+ var _b = _a, { as: Component = "p", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
48
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-card__overline", className), ref, children }));
49
+ }
50
+ );
51
+ CardBodyOverline.displayName = "Card.Body.Overline";
52
+ var CardBodyTitle = forwardRef(
53
+ (_a, ref) => {
54
+ var _b = _a, { as: Component = "h3", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
55
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-card__title", className), ref, children }));
56
+ }
57
+ );
58
+ CardBodyTitle.displayName = "Card.Body.Title";
59
+ var CardBodyDescription = forwardRef(
60
+ (_a, ref) => {
61
+ var _b = _a, { as: Component = "p", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
62
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className: clsx(className), ref, children }));
63
+ }
64
+ );
65
+ CardBodyDescription.displayName = "Card.Body.Description";
66
+ var CardBodyAction = forwardRef(
67
+ (_a, ref) => {
68
+ var _b = _a, { as: Component = "div", className, children } = _b, rest = __objRest(_b, ["as", "className", "children"]);
69
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, rest), { className, ref, children }));
70
+ }
71
+ );
72
+ CardBodyAction.displayName = "Card.Body.Action";
73
+
74
+ export {
75
+ Card,
76
+ CardMedia,
77
+ CardMediaImg,
78
+ CardBody,
79
+ CardBodyOverline,
80
+ CardBodyTitle,
81
+ CardBodyDescription,
82
+ CardBodyAction
83
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Box
3
- } from "./chunk-RXUPE4MM.mjs";
3
+ } from "./chunk-SWZLMDKJ.mjs";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadProps,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-FSBY3NKV.mjs";
4
4
  import {
5
5
  Box
6
- } from "./chunk-RXUPE4MM.mjs";
6
+ } from "./chunk-SWZLMDKJ.mjs";
7
7
  import {
8
8
  __objRest,
9
9
  __spreadProps,
@@ -12,7 +12,7 @@ var Box = forwardRef(
12
12
  (_a, ref) => {
13
13
  var _b = _a, {
14
14
  as: Component = "div",
15
- variant = "light-grey",
15
+ variant,
16
16
  closeable = false,
17
17
  onClose: onCloseProp,
18
18
  closed: closedProp,
@@ -46,7 +46,7 @@ var Box = forwardRef(
46
46
  __spreadProps(__spreadValues({
47
47
  className: clsx(
48
48
  "hds-box",
49
- `hds-box--${variant}`,
49
+ variant && `hds-box--${variant}`,
50
50
  { "hds-box--closed": closed },
51
51
  className
52
52
  ),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Modal,
3
3
  ModalHeader
4
- } from "./chunk-QV33ZHNO.mjs";
4
+ } from "./chunk-SQULBVH7.mjs";
5
5
 
6
6
  // src/modal/index.tsx
7
7
  import "@postenbring/hedwig-css/dist/fonts.css";
@@ -0,0 +1,100 @@
1
+ import {
2
+ Box
3
+ } from "./chunk-SWZLMDKJ.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-FUJQIYOF.mjs";
9
+
10
+ // src/warning-banner/warning-banner.tsx
11
+ import { forwardRef, useState } from "react";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ var WarningBanner = forwardRef(
15
+ (_a, ref) => {
16
+ var _b = _a, { title, description, className } = _b, rest = __objRest(_b, ["title", "description", "className"]);
17
+ const expandable = !!description;
18
+ return /* @__PURE__ */ jsxs(Box, __spreadProps(__spreadValues({}, rest), { className: clsx("hds-warning-banner", className), ref, children: [
19
+ /* @__PURE__ */ jsx(WarningBannerTitle, { variant: expandable ? "expandable" : "default", children: title }),
20
+ expandable ? /* @__PURE__ */ jsx(WarningBannerDescription, { children: description }) : null
21
+ ] }));
22
+ }
23
+ );
24
+ WarningBanner.displayName = "WarningBanner";
25
+ var WarningBannerTitle = forwardRef(
26
+ (_a, ref) => {
27
+ var _b = _a, {
28
+ variant,
29
+ as: Component = variant === "expandable" ? "button" : "p",
30
+ children,
31
+ className
32
+ } = _b, rest = __objRest(_b, [
33
+ "variant",
34
+ "as",
35
+ "children",
36
+ "className"
37
+ ]);
38
+ const [open, setOpen] = useState(false);
39
+ if (variant === "expandable") {
40
+ return /* @__PURE__ */ jsxs(
41
+ Component,
42
+ __spreadProps(__spreadValues({
43
+ className: clsx(
44
+ "hds-warning-banner__title",
45
+ "hds-warning-banner__title-trigger",
46
+ { "hds-warning-banner--closed": !open },
47
+ className
48
+ ),
49
+ onClick: () => {
50
+ setOpen(!open);
51
+ },
52
+ ref,
53
+ type: "button"
54
+ }, rest), {
55
+ children: [
56
+ /* @__PURE__ */ jsx("span", { children }),
57
+ /* @__PURE__ */ jsx("span", { className: clsx("hds-warning-banner__title-trigger--icon"), children: /* @__PURE__ */ jsx(
58
+ "svg",
59
+ {
60
+ fill: "none",
61
+ height: "24",
62
+ viewBox: "0 0 24 24",
63
+ width: "24",
64
+ xmlns: "http://www.w3.org/2000/svg",
65
+ children: /* @__PURE__ */ jsx("g", { className: "hds-warning-banner__title-trigger--icon-chevron", children: /* @__PURE__ */ jsx("path", { 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" }) })
66
+ }
67
+ ) })
68
+ ]
69
+ })
70
+ );
71
+ }
72
+ return /* @__PURE__ */ jsx(
73
+ Component,
74
+ __spreadProps(__spreadValues({
75
+ className: clsx("hds-warning-banner__title", className),
76
+ ref
77
+ }, rest), {
78
+ children
79
+ })
80
+ );
81
+ }
82
+ );
83
+ WarningBannerTitle.displayName = "WarningBannerTitle";
84
+ var WarningBannerDescription = forwardRef(
85
+ (_a, ref) => {
86
+ var _b = _a, { as: Component = "p", className } = _b, rest = __objRest(_b, ["as", "className"]);
87
+ return /* @__PURE__ */ jsx(
88
+ Component,
89
+ __spreadValues({
90
+ className: clsx("hds-warning-banner__description", className),
91
+ ref
92
+ }, rest)
93
+ );
94
+ }
95
+ );
96
+ WarningBannerDescription.displayName = "WarningBannerDescription";
97
+
98
+ export {
99
+ WarningBanner
100
+ };
@@ -0,0 +1,30 @@
1
+ import {
2
+ Card,
3
+ CardBody,
4
+ CardBodyAction,
5
+ CardBodyDescription,
6
+ CardBodyOverline,
7
+ CardBodyTitle,
8
+ CardMedia,
9
+ CardMediaImg
10
+ } from "./chunk-LWMZV362.mjs";
11
+
12
+ // src/card/index.tsx
13
+ import "@postenbring/hedwig-css/dist/fonts.css";
14
+ import "@postenbring/hedwig-css/dist/tokens.css";
15
+ import "@postenbring/hedwig-css/dist/body.css";
16
+ import "@postenbring/hedwig-css/dist/card.css";
17
+ var CardMediaComponent = CardMedia;
18
+ CardMediaComponent.Img = CardMediaImg;
19
+ var CardBodyComponent = CardBody;
20
+ CardBodyComponent.Overline = CardBodyOverline;
21
+ CardBodyComponent.Title = CardBodyTitle;
22
+ CardBodyComponent.Description = CardBodyDescription;
23
+ CardBodyComponent.Action = CardBodyAction;
24
+ var CardComponent = Card;
25
+ CardComponent.Media = CardMediaComponent;
26
+ CardComponent.Body = CardBodyComponent;
27
+
28
+ export {
29
+ CardComponent
30
+ };
package/dist/index.d.mts CHANGED
@@ -1,26 +1,30 @@
1
+ export { Accordion } from './accordion/index.mjs';
2
+ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.mjs';
3
+ export { Box, BoxCloseButton, BoxCloseButtonProps, BoxProps } from './box/box.mjs';
4
+ export { Breadcrumbs, BreadcrumbsProps } from './breadcrumb/breadcrumb.mjs';
1
5
  export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button/button.mjs';
6
+ export { Card } from './card/index.mjs';
7
+ export { Input, InputProps } from './input/input.mjs';
2
8
  export { Link, LinkProps } from './link/link.mjs';
3
- export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.mjs';
4
9
  export { DescriptionDetails, DescriptionDetailsProps, default as DescriptionList, DescriptionListProps, DescriptionTerm, DescriptionTermProps } from './list/description-list.mjs';
5
10
  export { ListProps, OrderedList, UnorderedList } from './list/list.mjs';
6
11
  export { LinkList, LinkListProps } from './list/link-list.mjs';
7
- export { Box, BoxCloseButton, BoxCloseButtonProps, BoxProps } from './box/box.mjs';
8
12
  export { Message } from './message/index.mjs';
9
- export { Accordion } from './accordion/index.mjs';
10
- export { Select, SelectProps } from './select/select.mjs';
11
13
  export { Modal } from './modal/index.mjs';
12
- export { Breadcrumbs, BreadcrumbsProps } from './breadcrumb/breadcrumb.mjs';
14
+ export { Select, SelectProps } from './select/select.mjs';
13
15
  export { Tabs, TabsProps } from './tabs/tabs.mjs';
14
16
  export { Tab, TabList, TabListProps, TabProps } from './tabs/tabs-list.mjs';
15
17
  export { TabContent, TabContentProps, TabContents, TabContentsProps } from './tabs/tabs-content.mjs';
16
- export { Input, InputProps } from './input/input.mjs';
17
18
  export { Textarea, TextareaProps } from './textarea/textarea.mjs';
18
- export { MessageDescription, MessageTitle } from './message/message.mjs';
19
+ export { WarningBanner, WarningBannerProps } from './warning-banner/warning-banner.mjs';
20
+ export { Container } from './layout/container/container.mjs';
19
21
  export { AccordionItem } from './accordion/accordion-item.mjs';
20
22
  export { AccordionTrigger } from './accordion/accordion-trigger.mjs';
21
23
  export { AccordionContent } from './accordion/accordion-content.mjs';
24
+ export { CardBaseProps, CardBody, CardBodyAction, CardBodyDescription, CardBodyOverline, CardBodyTitle, CardImageMediaProps, CardMedia, CardMediaImg } from './card/card.mjs';
25
+ export { MessageDescription, MessageTitle } from './message/message.mjs';
22
26
  export { ModalHeader } from './modal/modal.mjs';
23
- import './utils-BfZsjuFH.mjs';
24
27
  import 'react';
25
- import 'react/jsx-runtime';
26
28
  import './accordion/accordion.mjs';
29
+ import './utils-BfZsjuFH.mjs';
30
+ import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,26 +1,30 @@
1
+ export { Accordion } from './accordion/index.js';
2
+ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.js';
3
+ export { Box, BoxCloseButton, BoxCloseButtonProps, BoxProps } from './box/box.js';
4
+ export { Breadcrumbs, BreadcrumbsProps } from './breadcrumb/breadcrumb.js';
1
5
  export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js';
6
+ export { Card } from './card/index.js';
7
+ export { Input, InputProps } from './input/input.js';
2
8
  export { Link, LinkProps } from './link/link.js';
3
- export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.js';
4
9
  export { DescriptionDetails, DescriptionDetailsProps, default as DescriptionList, DescriptionListProps, DescriptionTerm, DescriptionTermProps } from './list/description-list.js';
5
10
  export { ListProps, OrderedList, UnorderedList } from './list/list.js';
6
11
  export { LinkList, LinkListProps } from './list/link-list.js';
7
- export { Box, BoxCloseButton, BoxCloseButtonProps, BoxProps } from './box/box.js';
8
12
  export { Message } from './message/index.js';
9
- export { Accordion } from './accordion/index.js';
10
- export { Select, SelectProps } from './select/select.js';
11
13
  export { Modal } from './modal/index.js';
12
- export { Breadcrumbs, BreadcrumbsProps } from './breadcrumb/breadcrumb.js';
14
+ export { Select, SelectProps } from './select/select.js';
13
15
  export { Tabs, TabsProps } from './tabs/tabs.js';
14
16
  export { Tab, TabList, TabListProps, TabProps } from './tabs/tabs-list.js';
15
17
  export { TabContent, TabContentProps, TabContents, TabContentsProps } from './tabs/tabs-content.js';
16
- export { Input, InputProps } from './input/input.js';
17
18
  export { Textarea, TextareaProps } from './textarea/textarea.js';
18
- export { MessageDescription, MessageTitle } from './message/message.js';
19
+ export { WarningBanner, WarningBannerProps } from './warning-banner/warning-banner.js';
20
+ export { Container } from './layout/container/container.js';
19
21
  export { AccordionItem } from './accordion/accordion-item.js';
20
22
  export { AccordionTrigger } from './accordion/accordion-trigger.js';
21
23
  export { AccordionContent } from './accordion/accordion-content.js';
24
+ export { CardBaseProps, CardBody, CardBodyAction, CardBodyDescription, CardBodyOverline, CardBodyTitle, CardImageMediaProps, CardMedia, CardMediaImg } from './card/card.js';
25
+ export { MessageDescription, MessageTitle } from './message/message.js';
22
26
  export { ModalHeader } from './modal/modal.js';
23
- import './utils-BfZsjuFH.js';
24
27
  import 'react';
25
- import 'react/jsx-runtime';
26
28
  import './accordion/accordion.js';
29
+ import './utils-BfZsjuFH.js';
30
+ import 'react/jsx-runtime';