@postenbring/hedwig-react 0.0.54 → 0.0.56

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 (98) hide show
  1. package/dist/_tsup-dts-rollup.d.mts +162 -190
  2. package/dist/_tsup-dts-rollup.d.ts +162 -190
  3. package/dist/accordion/index.mjs +2 -2
  4. package/dist/button/button.js +1 -1
  5. package/dist/button/button.js.map +1 -1
  6. package/dist/button/button.mjs +1 -1
  7. package/dist/button/index.js +1 -1
  8. package/dist/button/index.js.map +1 -1
  9. package/dist/button/index.mjs +1 -1
  10. package/dist/{chunk-2XSEQBJ5.mjs → chunk-5IIBIO3Y.mjs} +1 -1
  11. package/dist/chunk-5IIBIO3Y.mjs.map +1 -0
  12. package/dist/{chunk-MJ4LA23N.mjs → chunk-BDA6STW2.mjs} +2 -2
  13. package/dist/{chunk-52ULSP6E.mjs → chunk-GAKMKOPK.mjs} +3 -16
  14. package/dist/chunk-GAKMKOPK.mjs.map +1 -0
  15. package/dist/{chunk-5T3VUFL4.mjs → chunk-GVSLN5KE.mjs} +1 -1
  16. package/dist/chunk-GVSLN5KE.mjs.map +1 -0
  17. package/dist/{chunk-FL4LCX4F.mjs → chunk-IWV5GK63.mjs} +4 -4
  18. package/dist/{chunk-UVUIY2WB.mjs → chunk-J6ES2LO5.mjs} +2 -2
  19. package/dist/{chunk-UVUIY2WB.mjs.map → chunk-J6ES2LO5.mjs.map} +1 -1
  20. package/dist/{chunk-5GRZROYQ.mjs → chunk-LYRXA4WS.mjs} +8 -8
  21. package/dist/chunk-LYRXA4WS.mjs.map +1 -0
  22. package/dist/{chunk-KOO4VQ2N.mjs → chunk-OJ42PRYY.mjs} +2 -2
  23. package/dist/chunk-OJ42PRYY.mjs.map +1 -0
  24. package/dist/{chunk-T3EC54VN.mjs → chunk-PUFFEK6I.mjs} +2 -2
  25. package/dist/chunk-V4NGQVBQ.mjs +61 -0
  26. package/dist/chunk-V4NGQVBQ.mjs.map +1 -0
  27. package/dist/{chunk-LK62DXGG.mjs → chunk-ZSLWZUBI.mjs} +10 -3
  28. package/dist/chunk-ZSLWZUBI.mjs.map +1 -0
  29. package/dist/index-no-css.d.mts +1 -28
  30. package/dist/index-no-css.d.ts +1 -28
  31. package/dist/index-no-css.js +53 -132
  32. package/dist/index-no-css.js.map +1 -1
  33. package/dist/index-no-css.mjs +23 -77
  34. package/dist/index.d.mts +1 -28
  35. package/dist/index.d.ts +1 -28
  36. package/dist/index.js +54 -133
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +24 -78
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/modal/index.js.map +1 -1
  41. package/dist/modal/index.mjs +2 -2
  42. package/dist/modal/modal.js.map +1 -1
  43. package/dist/modal/modal.mjs +1 -1
  44. package/dist/navbar/index.js +9 -2
  45. package/dist/navbar/index.js.map +1 -1
  46. package/dist/navbar/index.mjs +2 -2
  47. package/dist/navbar/navbar-expandable-menu.js +9 -2
  48. package/dist/navbar/navbar-expandable-menu.js.map +1 -1
  49. package/dist/navbar/navbar-expandable-menu.mjs +1 -1
  50. package/dist/show-more/index.js.map +1 -1
  51. package/dist/show-more/index.mjs +1 -1
  52. package/dist/show-more/show-more.js.map +1 -1
  53. package/dist/show-more/show-more.mjs +1 -1
  54. package/dist/styled-html/index.js +1 -1
  55. package/dist/styled-html/index.js.map +1 -1
  56. package/dist/styled-html/index.mjs +1 -1
  57. package/dist/styled-html/styled-html.js +1 -1
  58. package/dist/styled-html/styled-html.js.map +1 -1
  59. package/dist/styled-html/styled-html.mjs +1 -1
  60. package/dist/text/index.d.mts +15 -0
  61. package/dist/text/index.d.ts +15 -0
  62. package/dist/text/index.js +179 -0
  63. package/dist/text/index.js.map +1 -0
  64. package/dist/text/index.mjs +36 -0
  65. package/dist/text/text.d.mts +2 -0
  66. package/dist/text/text.d.ts +2 -0
  67. package/dist/{typography/typography.js → text/text.js} +12 -12
  68. package/dist/text/text.js.map +1 -0
  69. package/dist/text/text.mjs +8 -0
  70. package/dist/warning-banner/index.js +2 -15
  71. package/dist/warning-banner/index.js.map +1 -1
  72. package/dist/warning-banner/index.mjs +1 -1
  73. package/dist/warning-banner/warning-banner.js +2 -15
  74. package/dist/warning-banner/warning-banner.js.map +1 -1
  75. package/dist/warning-banner/warning-banner.mjs +1 -1
  76. package/package.json +5 -5
  77. package/dist/chunk-2XSEQBJ5.mjs.map +0 -1
  78. package/dist/chunk-52ULSP6E.mjs.map +0 -1
  79. package/dist/chunk-5GRZROYQ.mjs.map +0 -1
  80. package/dist/chunk-5T3VUFL4.mjs.map +0 -1
  81. package/dist/chunk-KOO4VQ2N.mjs.map +0 -1
  82. package/dist/chunk-LK62DXGG.mjs.map +0 -1
  83. package/dist/chunk-NCYRNCGJ.mjs +0 -107
  84. package/dist/chunk-NCYRNCGJ.mjs.map +0 -1
  85. package/dist/typography/index.d.mts +0 -42
  86. package/dist/typography/index.d.ts +0 -42
  87. package/dist/typography/index.js +0 -252
  88. package/dist/typography/index.js.map +0 -1
  89. package/dist/typography/index.mjs +0 -90
  90. package/dist/typography/typography.d.mts +0 -2
  91. package/dist/typography/typography.d.ts +0 -2
  92. package/dist/typography/typography.js.map +0 -1
  93. package/dist/typography/typography.mjs +0 -8
  94. /package/dist/{chunk-MJ4LA23N.mjs.map → chunk-BDA6STW2.mjs.map} +0 -0
  95. /package/dist/{chunk-FL4LCX4F.mjs.map → chunk-IWV5GK63.mjs.map} +0 -0
  96. /package/dist/{chunk-T3EC54VN.mjs.map → chunk-PUFFEK6I.mjs.map} +0 -0
  97. /package/dist/{typography → text}/index.mjs.map +0 -0
  98. /package/dist/{typography/typography.mjs.map → text/text.mjs.map} +0 -0
@@ -62,14 +62,8 @@ __export(index_no_css_exports, {
62
62
  Accordion: () => AccordionComponent,
63
63
  AutoAnimateHeight: () => AutoAnimateHeight,
64
64
  Badge: () => Badge,
65
- Body: () => Body,
66
- BodySmall: () => BodySmall,
67
- BodySmallTitle: () => BodySmallTitle,
68
- BodyTitle: () => BodyTitle,
69
65
  Box: () => BoxComponent,
70
66
  Breadcrumbs: () => Breadcrumbs,
71
- Caption: () => Caption,
72
- CaptionTitle: () => CaptionTitle,
73
67
  Card: () => CardComponent,
74
68
  Checkbox: () => Checkbox,
75
69
  Container: () => Container,
@@ -77,11 +71,6 @@ __export(index_no_css_exports, {
77
71
  DescriptionList: () => DescriptionList,
78
72
  ErrorMessage: () => ErrorMessage,
79
73
  Fieldset: () => Fieldset,
80
- H1: () => H1,
81
- H1Display: () => H1Display,
82
- H2: () => H2,
83
- H3: () => H3,
84
- H3Title: () => H3Title,
85
74
  Input: () => Input,
86
75
  Link: () => Link,
87
76
  LinkList: () => LinkList,
@@ -98,8 +87,6 @@ __export(index_no_css_exports, {
98
87
  StepIndicator: () => StepIndicator,
99
88
  StyledHtml: () => StyledHtml,
100
89
  Tabs: () => TabsComponent,
101
- Technical: () => Technical,
102
- TechnicalTitle: () => TechnicalTitle,
103
90
  Text: () => Text,
104
91
  TextBody: () => TextBody,
105
92
  TextBodySmall: () => TextBodySmall,
@@ -115,20 +102,6 @@ __export(index_no_css_exports, {
115
102
  TextTechnical: () => TextTechnical,
116
103
  TextTechnicalTitle: () => TextTechnicalTitle,
117
104
  Textarea: () => Textarea,
118
- Typography: () => Typography,
119
- TypographyBody: () => TypographyBody,
120
- TypographyBodySmall: () => TypographyBodySmall,
121
- TypographyBodySmallTitle: () => TypographyBodySmallTitle,
122
- TypographyBodyTitle: () => TypographyBodyTitle,
123
- TypographyCaption: () => TypographyCaption,
124
- TypographyCaptionTitle: () => TypographyCaptionTitle,
125
- TypographyH1: () => TypographyH1,
126
- TypographyH1Display: () => TypographyH1Display,
127
- TypographyH2: () => TypographyH2,
128
- TypographyH3: () => TypographyH3,
129
- TypographyH3Title: () => TypographyH3Title,
130
- TypographyTechnical: () => TypographyTechnical,
131
- TypographyTechnicalTitle: () => TypographyTechnicalTitle,
132
105
  UnorderedList: () => UnorderedList,
133
106
  WarningBadge: () => WarningBadge,
134
107
  WarningBanner: () => WarningBanner,
@@ -449,7 +422,7 @@ var BaseButton = (0, import_react7.forwardRef)(
449
422
  {
450
423
  [`hds-button--${variant}`]: fill === "contained",
451
424
  [`hds-button--outline-${variant}`]: fill === "outline" || fill === "outlined",
452
- "hds-button--full": fullWidth,
425
+ "hds-button--full": fullWidth === true,
453
426
  "hds-button--mobile-full": fullWidth === "mobile",
454
427
  "hds-button--icon-only": icon && !children
455
428
  },
@@ -1297,7 +1270,14 @@ var navbarContext = (0, import_react22.createContext)([
1297
1270
  function NavbarExpandableMenu({ children }) {
1298
1271
  const [open, setOpen] = (0, import_react22.useState)(false);
1299
1272
  const toggleOpen = () => {
1300
- setOpen((currentOpen) => !currentOpen);
1273
+ const nextOpenState = !open;
1274
+ setOpen(nextOpenState);
1275
+ if (nextOpenState) {
1276
+ window.scrollTo(0, 0);
1277
+ document.body.classList.add((0, import_typed_classname26.clsx)("hds-navbar-scroll-lock"));
1278
+ } else {
1279
+ document.body.classList.remove((0, import_typed_classname26.clsx)("hds-navbar-scroll-lock"));
1280
+ }
1301
1281
  };
1302
1282
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(navbarContext.Provider, { value: [open, toggleOpen], children });
1303
1283
  }
@@ -1431,7 +1411,7 @@ var NavbarExpandableMenuContent = (0, import_react22.forwardRef)((_a, ref) => {
1431
1411
  className: (0, import_typed_classname26.clsx)("hds-navbar__expandable-menu-content", className),
1432
1412
  "data-state": open ? "open" : "closed",
1433
1413
  ref,
1434
- children
1414
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: (0, import_typed_classname26.clsx)("hds-navbar__expandable-menu-content-inner"), children })
1435
1415
  })
1436
1416
  );
1437
1417
  });
@@ -1647,7 +1627,7 @@ var StyledHtml = (0, import_react25.forwardRef)(
1647
1627
  );
1648
1628
  }
1649
1629
  );
1650
- StyledHtml.displayName = "Prose";
1630
+ StyledHtml.displayName = "StyledHtml";
1651
1631
 
1652
1632
  // src/tabs/tabs.tsx
1653
1633
  var import_react27 = require("react");
@@ -1774,7 +1754,7 @@ TabsComponent.Tab = Tab;
1774
1754
  TabsComponent.Contents = TabsContents;
1775
1755
  TabsComponent.Content = TabsContent;
1776
1756
 
1777
- // src/typography/typography.tsx
1757
+ // src/text/text.tsx
1778
1758
  var import_react30 = require("react");
1779
1759
  var import_typed_classname34 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
1780
1760
  var import_jsx_runtime36 = require("react/jsx-runtime");
@@ -1793,7 +1773,7 @@ var defaultHTMLTag = {
1793
1773
  caption: "p",
1794
1774
  "caption-title": "p"
1795
1775
  };
1796
- var Typography = (0, import_react30.forwardRef)(
1776
+ var Text = (0, import_react30.forwardRef)(
1797
1777
  (_a, ref) => {
1798
1778
  var _b = _a, {
1799
1779
  as,
@@ -1816,9 +1796,9 @@ var Typography = (0, import_react30.forwardRef)(
1816
1796
  Component,
1817
1797
  __spreadProps(__spreadValues({
1818
1798
  className: (0, import_typed_classname34.clsx)(
1819
- `hds-typography-${variant}`,
1820
- sizeModifier && `hds-typography--${sizeModifier}`,
1821
- spacing && "hds-typography--spacing",
1799
+ `hds-text-${variant}`,
1800
+ sizeModifier && `hds-text--${sizeModifier}`,
1801
+ spacing && "hds-text--spacing",
1822
1802
  className
1823
1803
  ),
1824
1804
  ref
@@ -1828,63 +1808,44 @@ var Typography = (0, import_react30.forwardRef)(
1828
1808
  );
1829
1809
  }
1830
1810
  );
1831
- Typography.displayName = "Typography";
1811
+ Text.displayName = "Text";
1832
1812
 
1833
- // src/typography/index.tsx
1813
+ // src/text/index.tsx
1834
1814
  var import_jsx_runtime37 = require("react/jsx-runtime");
1835
- var Text = Typography;
1836
- Text.displayName = "Text";
1837
- var H1Display = typographyVariant("h1-display", "H1Display");
1838
- var H1 = typographyVariant("h1", "H1");
1839
- var H2 = typographyVariant("h2", "H2");
1840
- var H3 = typographyVariant("h3", "H3");
1841
- var H3Title = typographyVariant("h3-title", "H3Title");
1842
- var Body = typographyVariant("body", "Body");
1843
- var BodyTitle = typographyVariant("body-title", "BodyTitle");
1844
- var BodySmall = typographyVariant("body-small", "BodySmall");
1845
- var BodySmallTitle = typographyVariant("body-small-title", "BodySmallTitle");
1846
- var Technical = typographyVariant("technical", "Technical");
1847
- var TechnicalTitle = typographyVariant("technical-title", "TechnicalTitle");
1848
- var Caption = typographyVariant("caption", "Caption");
1849
- var CaptionTitle = typographyVariant("caption-title", "CaptionTitle");
1850
- var TextH1Display = typographyVariant("h1-display", "TextH1Display");
1851
- var TextH1 = typographyVariant("h1", "TextH1");
1852
- var TextH2 = typographyVariant("h2", "TextH2");
1853
- var TextH3 = typographyVariant("h3", "TextH3");
1854
- var TextH3Title = typographyVariant("h3-title", "TextH3Title");
1855
- var TextBody = typographyVariant("body", "TextBody");
1856
- var TextBodyTitle = typographyVariant("body-title", "TextBodyTitle");
1857
- var TextBodySmall = typographyVariant("body-small", "TextBodySmall");
1858
- var TextBodySmallTitle = typographyVariant("body-small-title", "TextBodySmallTitle");
1859
- var TextTechnical = typographyVariant("technical", "TextTechnical");
1860
- var TextTechnicalTitle = typographyVariant("technical-title", "TextTechnicalTitle");
1861
- var TextCaption = typographyVariant("caption", "TextCaption");
1862
- var TextCaptionTitle = typographyVariant("caption-title", "TextCaptionTitle");
1863
- var TypographyH1Display = typographyVariant("h1-display", "TypographyH1Display");
1864
- var TypographyH1 = typographyVariant("h1", "TypographyH1");
1865
- var TypographyH2 = typographyVariant("h2", "TypographyH2");
1866
- var TypographyH3 = typographyVariant("h3", "TypographyH3");
1867
- var TypographyH3Title = typographyVariant("h3-title", "TypographyH3Title");
1868
- var TypographyBody = typographyVariant("body", "TypographyBody");
1869
- var TypographyBodyTitle = typographyVariant("body-title", "TypographyBodyTitle");
1870
- var TypographyBodySmall = typographyVariant("body-small", "TypographyBodySmall");
1871
- var TypographyBodySmallTitle = typographyVariant(
1872
- "body-small-title",
1873
- "TypographyBodySmallTitle"
1874
- );
1875
- var TypographyTechnical = typographyVariant("technical", "TypographyTechnical");
1876
- var TypographyTechnicalTitle = typographyVariant(
1877
- "technical-title",
1878
- "TypographyTechnicalTitle"
1879
- );
1880
- var TypographyCaption = typographyVariant("caption", "TypographyCaption");
1881
- var TypographyCaptionTitle = typographyVariant("caption-title", "TypographyCaptionTitle");
1882
- function typographyVariant(variant, displayName) {
1883
- function WrappedTypography(props) {
1884
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Typography, __spreadValues({ variant }, props));
1815
+ var TextH1Display = textVariant("h1-display", "TextH1Display");
1816
+ var TextH1 = textVariant("h1", "TextH1");
1817
+ var TextH2 = textVariant("h2", "TextH2");
1818
+ var TextH3 = textVariant("h3", "TextH3");
1819
+ var TextH3Title = textVariant("h3-title", "TextH3Title");
1820
+ var TextBody = textVariant("body", "TextBody");
1821
+ var TextBodyTitle = textVariant("body-title", "TextBodyTitle");
1822
+ var TextBodySmall = textVariant("body-small", "TextBodySmall");
1823
+ var TextBodySmallTitle = textVariant("body-small-title", "TextBodySmallTitle");
1824
+ var TextTechnical = textVariant("technical", "TextTechnical");
1825
+ var TextTechnicalTitle = textVariant("technical-title", "TextTechnicalTitle");
1826
+ var TextCaption = textVariant("caption", "TextCaption");
1827
+ var TextCaptionTitle = textVariant("caption-title", "TextCaptionTitle");
1828
+ var variantToHtmlTag = {
1829
+ "h1-display": "h1",
1830
+ h1: "h1",
1831
+ h2: "h2",
1832
+ h3: "h3",
1833
+ "h3-title": "h3",
1834
+ body: "p",
1835
+ "body-title": "p",
1836
+ "body-small": "p",
1837
+ "body-small-title": "p",
1838
+ technical: "p",
1839
+ "technical-title": "p",
1840
+ caption: "p",
1841
+ "caption-title": "p"
1842
+ };
1843
+ function textVariant(variant, displayName) {
1844
+ function WrappedText(props) {
1845
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, __spreadValues({ variant, as: variantToHtmlTag[variant != null ? variant : "body"] }, props));
1885
1846
  }
1886
- WrappedTypography.displayName = displayName;
1887
- return WrappedTypography;
1847
+ WrappedText.displayName = displayName;
1848
+ return WrappedText;
1888
1849
  }
1889
1850
 
1890
1851
  // src/warning-banner/warning-banner.tsx
@@ -1917,7 +1878,7 @@ var WarningBannerTitle = (0, import_react31.forwardRef)(
1917
1878
  ]);
1918
1879
  const [open, setOpen] = (0, import_react31.useState)(false);
1919
1880
  if (variant === "expandable") {
1920
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
1881
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1921
1882
  Component,
1922
1883
  __spreadProps(__spreadValues({
1923
1884
  className: (0, import_typed_classname35.clsx)(
@@ -1932,20 +1893,7 @@ var WarningBannerTitle = (0, import_react31.forwardRef)(
1932
1893
  ref,
1933
1894
  type: "button"
1934
1895
  }, rest), {
1935
- children: [
1936
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children }),
1937
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: (0, import_typed_classname35.clsx)("hds-warning-banner__title-trigger--icon"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1938
- "svg",
1939
- {
1940
- fill: "none",
1941
- height: "24",
1942
- viewBox: "0 0 24 24",
1943
- width: "24",
1944
- xmlns: "http://www.w3.org/2000/svg",
1945
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("g", { className: "hds-warning-banner__title-trigger--icon-chevron", children: /* @__PURE__ */ (0, import_jsx_runtime38.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" }) })
1946
- }
1947
- ) })
1948
- ]
1896
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children })
1949
1897
  })
1950
1898
  );
1951
1899
  }
@@ -1979,14 +1927,8 @@ WarningBannerDescription.displayName = "WarningBannerDescription";
1979
1927
  Accordion,
1980
1928
  AutoAnimateHeight,
1981
1929
  Badge,
1982
- Body,
1983
- BodySmall,
1984
- BodySmallTitle,
1985
- BodyTitle,
1986
1930
  Box,
1987
1931
  Breadcrumbs,
1988
- Caption,
1989
- CaptionTitle,
1990
1932
  Card,
1991
1933
  Checkbox,
1992
1934
  Container,
@@ -1994,11 +1936,6 @@ WarningBannerDescription.displayName = "WarningBannerDescription";
1994
1936
  DescriptionList,
1995
1937
  ErrorMessage,
1996
1938
  Fieldset,
1997
- H1,
1998
- H1Display,
1999
- H2,
2000
- H3,
2001
- H3Title,
2002
1939
  Input,
2003
1940
  Link,
2004
1941
  LinkList,
@@ -2015,8 +1952,6 @@ WarningBannerDescription.displayName = "WarningBannerDescription";
2015
1952
  StepIndicator,
2016
1953
  StyledHtml,
2017
1954
  Tabs,
2018
- Technical,
2019
- TechnicalTitle,
2020
1955
  Text,
2021
1956
  TextBody,
2022
1957
  TextBodySmall,
@@ -2032,20 +1967,6 @@ WarningBannerDescription.displayName = "WarningBannerDescription";
2032
1967
  TextTechnical,
2033
1968
  TextTechnicalTitle,
2034
1969
  Textarea,
2035
- Typography,
2036
- TypographyBody,
2037
- TypographyBodySmall,
2038
- TypographyBodySmallTitle,
2039
- TypographyBodyTitle,
2040
- TypographyCaption,
2041
- TypographyCaptionTitle,
2042
- TypographyH1,
2043
- TypographyH1Display,
2044
- TypographyH2,
2045
- TypographyH3,
2046
- TypographyH3Title,
2047
- TypographyTechnical,
2048
- TypographyTechnicalTitle,
2049
1970
  UnorderedList,
2050
1971
  WarningBadge,
2051
1972
  WarningBanner,