@postenbring/hedwig-react 0.0.79 → 0.0.80

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 (45) hide show
  1. package/dist/accordion/index.mjs +5 -5
  2. package/dist/{chunk-K3CBNVXC.mjs → chunk-67TP3E2D.mjs} +3 -2
  3. package/dist/{chunk-K3CBNVXC.mjs.map → chunk-67TP3E2D.mjs.map} +1 -1
  4. package/dist/{chunk-MPHMD4LO.mjs → chunk-6R7AXKBR.mjs} +63 -86
  5. package/dist/chunk-6R7AXKBR.mjs.map +1 -0
  6. package/dist/{chunk-HFXVRPBA.mjs → chunk-GXYUJ5MA.mjs} +2 -2
  7. package/dist/{chunk-ZMLHJZQK.mjs → chunk-HBSDJAFF.mjs} +7 -7
  8. package/dist/{chunk-LTTJWLS7.mjs → chunk-MKVI42QR.mjs} +2 -2
  9. package/dist/chunk-MOU6WBT2.mjs +26 -0
  10. package/dist/chunk-MOU6WBT2.mjs.map +1 -0
  11. package/dist/{chunk-XDYXNQDV.mjs → chunk-V6UKKHKD.mjs} +2 -2
  12. package/dist/footer/footer.mjs +4 -4
  13. package/dist/footer/index.mjs +5 -5
  14. package/dist/index-no-css.js +68 -90
  15. package/dist/index-no-css.js.map +1 -1
  16. package/dist/index-no-css.mjs +19 -19
  17. package/dist/index.js +68 -90
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +19 -19
  20. package/dist/navbar/icons.js +6 -6
  21. package/dist/navbar/icons.js.map +1 -1
  22. package/dist/navbar/icons.mjs +1 -1
  23. package/dist/navbar/index.js +66 -89
  24. package/dist/navbar/index.js.map +1 -1
  25. package/dist/navbar/index.mjs +3 -3
  26. package/dist/navbar/navbar-expandable-menu.js +66 -89
  27. package/dist/navbar/navbar-expandable-menu.js.map +1 -1
  28. package/dist/navbar/navbar-expandable-menu.mjs +2 -2
  29. package/dist/show-more/index.js +2 -1
  30. package/dist/show-more/index.js.map +1 -1
  31. package/dist/show-more/index.mjs +1 -1
  32. package/dist/utilities/auto-animate-height.js +2 -1
  33. package/dist/utilities/auto-animate-height.js.map +1 -1
  34. package/dist/utilities/auto-animate-height.mjs +1 -1
  35. package/dist/utilities/index.js +2 -1
  36. package/dist/utilities/index.js.map +1 -1
  37. package/dist/utilities/index.mjs +1 -1
  38. package/package.json +2 -2
  39. package/dist/chunk-MPHMD4LO.mjs.map +0 -1
  40. package/dist/chunk-W2MRIP5P.mjs +0 -26
  41. package/dist/chunk-W2MRIP5P.mjs.map +0 -1
  42. /package/dist/{chunk-HFXVRPBA.mjs.map → chunk-GXYUJ5MA.mjs.map} +0 -0
  43. /package/dist/{chunk-ZMLHJZQK.mjs.map → chunk-HBSDJAFF.mjs.map} +0 -0
  44. /package/dist/{chunk-LTTJWLS7.mjs.map → chunk-MKVI42QR.mjs.map} +0 -0
  45. /package/dist/{chunk-XDYXNQDV.mjs.map → chunk-V6UKKHKD.mjs.map} +0 -0
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-XUWZ4HGD.mjs";
37
37
  import {
38
38
  NavbarComponent
39
- } from "./chunk-XDYXNQDV.mjs";
39
+ } from "./chunk-V6UKKHKD.mjs";
40
40
  import {
41
41
  NavbarButtonItem,
42
42
  NavbarItem,
@@ -51,11 +51,11 @@ import {
51
51
  NavbarExpandableMenuContent,
52
52
  NavbarExpandableMenuTrigger,
53
53
  useNavbarExpendableMenuContext
54
- } from "./chunk-MPHMD4LO.mjs";
55
- import "./chunk-W2MRIP5P.mjs";
54
+ } from "./chunk-6R7AXKBR.mjs";
55
+ import "./chunk-MOU6WBT2.mjs";
56
56
  import {
57
57
  FooterComponent
58
- } from "./chunk-LTTJWLS7.mjs";
58
+ } from "./chunk-MKVI42QR.mjs";
59
59
  import "./chunk-XFKD6EEJ.mjs";
60
60
  import "./chunk-AGZHQDCQ.mjs";
61
61
  import {
@@ -141,7 +141,7 @@ import {
141
141
  FooterLinkSection,
142
142
  FooterLinkSections,
143
143
  FooterLogo
144
- } from "./chunk-HFXVRPBA.mjs";
144
+ } from "./chunk-GXYUJ5MA.mjs";
145
145
  import {
146
146
  LinkList
147
147
  } from "./chunk-COEZA7WA.mjs";
@@ -156,18 +156,17 @@ import {
156
156
  } from "./chunk-KEKPEN2C.mjs";
157
157
  import {
158
158
  AccordionComponent
159
- } from "./chunk-ZMLHJZQK.mjs";
159
+ } from "./chunk-HBSDJAFF.mjs";
160
+ import {
161
+ AccordionContent
162
+ } from "./chunk-2UWPZNXC.mjs";
163
+ import {
164
+ AccordionHeader
165
+ } from "./chunk-3EFAPJ3H.mjs";
160
166
  import {
161
167
  AccordionItem
162
168
  } from "./chunk-A2H2LAII.mjs";
163
169
  import "./chunk-KPGSRU4I.mjs";
164
- import "./chunk-K6PP3ACJ.mjs";
165
- import {
166
- DarkBadge,
167
- LighterBadge,
168
- WarningBadge,
169
- WhiteBadge
170
- } from "./chunk-P6KBFRF4.mjs";
171
170
  import {
172
171
  Breadcrumbs
173
172
  } from "./chunk-YSFZCRWS.mjs";
@@ -181,12 +180,13 @@ import {
181
180
  } from "./chunk-EMI7NAO2.mjs";
182
181
  import "./chunk-KQITCS3U.mjs";
183
182
  import "./chunk-DZNH5JHY.mjs";
183
+ import "./chunk-K6PP3ACJ.mjs";
184
184
  import {
185
- AccordionContent
186
- } from "./chunk-2UWPZNXC.mjs";
187
- import {
188
- AccordionHeader
189
- } from "./chunk-3EFAPJ3H.mjs";
185
+ DarkBadge,
186
+ LighterBadge,
187
+ WarningBadge,
188
+ WhiteBadge
189
+ } from "./chunk-P6KBFRF4.mjs";
190
190
  import "./chunk-V3PAFMK5.mjs";
191
191
  import "./chunk-CFAH2LID.mjs";
192
192
  import {
@@ -206,7 +206,7 @@ import {
206
206
  } from "./chunk-UB2R7TCG.mjs";
207
207
  import {
208
208
  AutoAnimateHeight
209
- } from "./chunk-K3CBNVXC.mjs";
209
+ } from "./chunk-67TP3E2D.mjs";
210
210
  import "./chunk-DEX36MFK.mjs";
211
211
  import "./chunk-JTZPQHKD.mjs";
212
212
  import {
package/dist/index.js CHANGED
@@ -1811,26 +1811,25 @@ NavbarNavigation.displayName = "Navbar.Navigation";
1811
1811
 
1812
1812
  // src/navbar/navbar-expandable-menu.tsx
1813
1813
  var import_react34 = require("react");
1814
- var import_client = require("react-dom/client");
1815
1814
  var import_typed_classname31 = require("@postenbring/hedwig-css/typed-classname");
1816
1815
 
1817
1816
  // src/navbar/icons.tsx
1818
1817
  var import_jsx_runtime32 = require("react/jsx-runtime");
1819
1818
  function CloseIcon() {
1820
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { "aria-hidden": true, viewBox: "0 0 384 512", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1819
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1821
1820
  "path",
1822
1821
  {
1823
- d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z",
1824
- fill: "currentColor"
1822
+ fill: "currentColor",
1823
+ d: "m13.16 12.25 3.621-3.586.739-.738c.105-.106.105-.281 0-.422l-.774-.774c-.14-.105-.316-.105-.422 0L12 11.09 7.64 6.73c-.105-.105-.28-.105-.421 0l-.774.774c-.105.14-.105.316 0 .422l4.36 4.324-4.36 4.36c-.105.105-.105.28 0 .421l.774.774c.14.105.316.105.422 0L12 13.445l3.586 3.621.738.739c.106.105.281.105.422 0l.774-.774c.105-.14.105-.316 0-.422l-4.36-4.359Z"
1825
1824
  }
1826
1825
  ) });
1827
1826
  }
1828
1827
  function MenuIcon() {
1829
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { role: "img", viewBox: "0 0 448 512", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1828
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1830
1829
  "path",
1831
1830
  {
1832
- d: "M0 88C0 74.7 10.7 64 24 64H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H24C10.7 112 0 101.3 0 88zM0 248c0-13.3 10.7-24 24-24H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24zM448 408c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H424c13.3 0 24 10.7 24 24z",
1833
- fill: "currentColor"
1831
+ fill: "currentColor",
1832
+ d: "M25.938 10.146a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.562-.563-.562H6.063a.57.57 0 0 0-.562.562v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Z"
1834
1833
  }
1835
1834
  ) });
1836
1835
  }
@@ -1864,31 +1863,6 @@ function NavbarExpandableMenu({ children }) {
1864
1863
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(expandableMenuContext.Provider, { value: [open, toggleOpen], children });
1865
1864
  }
1866
1865
  NavbarExpandableMenu.displayName = "NavbarExpandableMenu";
1867
- var RenderButton = (0, import_react34.forwardRef)(
1868
- (_a, ref) => {
1869
- var _b = _a, { className, innerRef, open = false, text, title, toggleOpen, width } = _b, rest = __objRest(_b, ["className", "innerRef", "open", "text", "title", "toggleOpen", "width"]);
1870
- const icon = open ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CloseIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuIcon, {});
1871
- const style = width ? { width } : {};
1872
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1873
- "button",
1874
- __spreadProps(__spreadValues({
1875
- className: (0, import_typed_classname31.clsx)("hds-navbar__item", className),
1876
- onClick: toggleOpen,
1877
- ref: ref != null ? ref : innerRef,
1878
- style,
1879
- title,
1880
- type: "button"
1881
- }, rest), {
1882
- children: [
1883
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: (0, import_typed_classname31.clsx)("hds-navbar__item-responsive-text"), children: text }),
1884
- " ",
1885
- icon
1886
- ]
1887
- })
1888
- );
1889
- }
1890
- );
1891
- RenderButton.displayName = "Navbar.RenderButton";
1892
1866
  var NavbarExpandableMenuTrigger = (0, import_react34.forwardRef)(
1893
1867
  (_a, ref) => {
1894
1868
  var _b = _a, {
@@ -1896,75 +1870,78 @@ var NavbarExpandableMenuTrigger = (0, import_react34.forwardRef)(
1896
1870
  whenClosedHelperTitle,
1897
1871
  whenOpenText,
1898
1872
  whenOpenHelperTitle,
1873
+ style,
1899
1874
  className
1900
1875
  } = _b, rest = __objRest(_b, [
1901
1876
  "whenClosedText",
1902
1877
  "whenClosedHelperTitle",
1903
1878
  "whenOpenText",
1904
1879
  "whenOpenHelperTitle",
1880
+ "style",
1905
1881
  "className"
1906
1882
  ]);
1907
1883
  const [open, toggleOpen] = useNavbarExpendableMenuContext();
1908
- const [width, setWidth] = (0, import_react34.useState)(0);
1909
- const measureButtonRef = (0, import_react34.useRef)(null);
1884
+ const [textWidth, setTextWidth] = (0, import_react34.useState)(void 0);
1885
+ const measurementId = (0, import_react34.useId)();
1886
+ (0, import_react34.useEffect)(() => {
1887
+ var _a2, _b2, _c, _d;
1888
+ const widthWhenOpen = (_b2 = (_a2 = document.getElementById(`${measurementId}-when-open`)) == null ? void 0 : _a2.getBoundingClientRect().width) != null ? _b2 : 0;
1889
+ const widthWhenClosed = (_d = (_c = document.getElementById(`${measurementId}-when-closed`)) == null ? void 0 : _c.getBoundingClientRect().width) != null ? _d : 0;
1890
+ setTextWidth(widthWhenOpen < widthWhenClosed ? widthWhenClosed : widthWhenOpen);
1891
+ }, [measurementId]);
1910
1892
  const text = open ? whenOpenText : whenClosedText;
1911
1893
  const title = open ? whenOpenHelperTitle : whenClosedHelperTitle;
1912
- const measureButton = (element, callback) => {
1913
- const container = document.createElement("div");
1914
- container.style.cssText = "display: inline-block; position: absolute; visibility: hidden";
1915
- const c = document.getElementsByClassName("hds-navbar__navigation")[0];
1916
- c.appendChild(container);
1917
- const root = (0, import_client.createRoot)(container);
1918
- root.render(element);
1919
- const getWidth = () => {
1920
- var _a2, _b2;
1921
- callback((_b2 = (_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0);
1922
- root.unmount();
1923
- c.removeChild(container);
1924
- };
1925
- setTimeout(getWidth, 0);
1926
- };
1927
- (0, import_react34.useEffect)(() => {
1928
- measureButton(
1929
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1930
- RenderButton,
1931
- __spreadValues({
1932
- className,
1933
- innerRef: measureButtonRef,
1934
- text: whenClosedText,
1935
- title
1936
- }, rest)
1937
- ),
1938
- (closedWidth) => {
1939
- measureButton(
1940
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1941
- RenderButton,
1942
- __spreadValues({
1943
- className,
1944
- innerRef: measureButtonRef,
1945
- open: true,
1946
- text: whenOpenText,
1947
- title
1948
- }, rest)
1949
- ),
1950
- (openWidth) => {
1951
- setWidth(Math.max(openWidth, closedWidth));
1952
- }
1953
- );
1954
- }
1955
- );
1956
- }, [className, rest, title, whenClosedText, whenOpenText]);
1957
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1958
- RenderButton,
1959
- __spreadValues({
1960
- className,
1961
- open,
1894
+ const icon = open ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CloseIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuIcon, {});
1895
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1896
+ "button",
1897
+ __spreadProps(__spreadValues({
1898
+ className: (0, import_typed_classname31.clsx)("hds-navbar__item", className),
1899
+ onClick: toggleOpen,
1962
1900
  ref,
1963
- text,
1964
1901
  title,
1965
- toggleOpen,
1966
- width
1967
- }, rest)
1902
+ type: "button",
1903
+ style: __spreadValues({ position: "relative" }, style)
1904
+ }, rest), {
1905
+ children: [
1906
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1907
+ "span",
1908
+ {
1909
+ id: `${measurementId}-when-closed`,
1910
+ "aria-hidden": true,
1911
+ style: {
1912
+ position: "absolute",
1913
+ visibility: "hidden",
1914
+ pointerEvents: "none",
1915
+ whiteSpace: "nowrap"
1916
+ },
1917
+ children: whenOpenText
1918
+ }
1919
+ ),
1920
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1921
+ "span",
1922
+ {
1923
+ id: `${measurementId}-when-open`,
1924
+ "aria-hidden": true,
1925
+ style: {
1926
+ position: "absolute",
1927
+ visibility: "hidden",
1928
+ pointerEvents: "none",
1929
+ whiteSpace: "nowrap"
1930
+ },
1931
+ children: whenClosedText
1932
+ }
1933
+ ),
1934
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1935
+ "span",
1936
+ {
1937
+ style: { width: textWidth, whiteSpace: "nowrap" },
1938
+ className: (0, import_typed_classname31.clsx)("hds-navbar__item-responsive-text"),
1939
+ children: text
1940
+ }
1941
+ ),
1942
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: { width: 32, height: 32 }, children: icon })
1943
+ ]
1944
+ })
1968
1945
  );
1969
1946
  }
1970
1947
  );
@@ -1977,7 +1954,7 @@ var NavbarExpandableMenuContent = (0, import_react34.forwardRef)((_a, ref) => {
1977
1954
  __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, rest), {
1978
1955
  className: (0, import_typed_classname31.clsx)("hds-navbar__expandable-menu-content", className),
1979
1956
  "data-state": open ? "open" : "closed"
1980
- }), { inert: open ? "true" : void 0 }), {
1957
+ }), { inert: open ? void 0 : "true" }), {
1981
1958
  ref,
1982
1959
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: (0, import_typed_classname31.clsx)("hds-navbar__expandable-menu-content-inner"), children })
1983
1960
  })
@@ -2088,7 +2065,8 @@ var AutoAnimateHeight = (0, import_react35.forwardRef)(
2088
2065
  ref: measurementRef,
2089
2066
  style: {
2090
2067
  position: "absolute",
2091
- visibility: "hidden"
2068
+ visibility: "hidden",
2069
+ pointerEvents: "none"
2092
2070
  },
2093
2071
  children
2094
2072
  }