@handijitcom/ui 3.3.1 → 3.4.1

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 (212) hide show
  1. package/README.md +247 -0
  2. package/build/chat.css +1 -1
  3. package/build/components/AppShell/Nav.cjs +1 -1
  4. package/build/components/AppShell/Nav.cjs.map +1 -1
  5. package/build/components/AppShell/Nav.d.cts +8 -1
  6. package/build/components/AppShell/Nav.d.ts +8 -1
  7. package/build/components/AppShell/Nav.js +127 -112
  8. package/build/components/AppShell/Nav.js.map +1 -1
  9. package/build/components/AppShell/style.css +1 -1
  10. package/build/components/AppliedFilters/index.cjs +2 -0
  11. package/build/components/AppliedFilters/index.cjs.map +1 -0
  12. package/build/components/AppliedFilters/index.d.cts +33 -0
  13. package/build/components/AppliedFilters/index.d.ts +33 -0
  14. package/build/components/AppliedFilters/index.js +85 -0
  15. package/build/components/AppliedFilters/index.js.map +1 -0
  16. package/build/components/AppliedFilters/style.css +1 -0
  17. package/build/components/BrandLockup/index.cjs +2 -0
  18. package/build/components/BrandLockup/index.cjs.map +1 -0
  19. package/build/components/BrandLockup/index.d.cts +29 -0
  20. package/build/components/BrandLockup/index.d.ts +29 -0
  21. package/build/components/BrandLockup/index.js +41 -0
  22. package/build/components/BrandLockup/index.js.map +1 -0
  23. package/build/components/BrandLockup/style.css +1 -0
  24. package/build/components/Carousel/index.cjs +1 -1
  25. package/build/components/Carousel/index.cjs.map +1 -1
  26. package/build/components/Carousel/index.d.cts +9 -0
  27. package/build/components/Carousel/index.d.ts +9 -0
  28. package/build/components/Carousel/index.js +65 -60
  29. package/build/components/Carousel/index.js.map +1 -1
  30. package/build/components/Carousel/style.css +1 -1
  31. package/build/components/CodeText/CodeTextCopy.cjs +2 -0
  32. package/build/components/CodeText/CodeTextCopy.cjs.map +1 -0
  33. package/build/components/CodeText/CodeTextCopy.d.cts +11 -0
  34. package/build/components/CodeText/CodeTextCopy.d.ts +11 -0
  35. package/build/components/CodeText/CodeTextCopy.js +41 -0
  36. package/build/components/CodeText/CodeTextCopy.js.map +1 -0
  37. package/build/components/CodeText/index.cjs +2 -0
  38. package/build/components/CodeText/index.cjs.map +1 -0
  39. package/build/components/CodeText/index.d.cts +26 -0
  40. package/build/components/CodeText/index.d.ts +26 -0
  41. package/build/components/CodeText/index.js +39 -0
  42. package/build/components/CodeText/index.js.map +1 -0
  43. package/build/components/CodeText/style.css +1 -0
  44. package/build/components/Combobox/index.cjs +1 -1
  45. package/build/components/Combobox/index.cjs.map +1 -1
  46. package/build/components/Combobox/index.js +147 -146
  47. package/build/components/Combobox/index.js.map +1 -1
  48. package/build/components/Combobox/style.css +1 -1
  49. package/build/components/CompareTray/index.cjs +2 -0
  50. package/build/components/CompareTray/index.cjs.map +1 -0
  51. package/build/components/CompareTray/index.d.cts +44 -0
  52. package/build/components/CompareTray/index.d.ts +44 -0
  53. package/build/components/CompareTray/index.js +94 -0
  54. package/build/components/CompareTray/index.js.map +1 -0
  55. package/build/components/CompareTray/style.css +1 -0
  56. package/build/components/DataTable/index.cjs +1 -1
  57. package/build/components/DataTable/index.cjs.map +1 -1
  58. package/build/components/DataTable/index.d.cts +12 -0
  59. package/build/components/DataTable/index.d.ts +12 -0
  60. package/build/components/DataTable/index.js +120 -122
  61. package/build/components/DataTable/index.js.map +1 -1
  62. package/build/components/DataTable/style.css +1 -1
  63. package/build/components/Eyebrow/style.css +1 -1
  64. package/build/components/FacetSection/index.cjs +2 -0
  65. package/build/components/FacetSection/index.cjs.map +1 -0
  66. package/build/components/FacetSection/index.d.cts +75 -0
  67. package/build/components/FacetSection/index.d.ts +75 -0
  68. package/build/components/FacetSection/index.js +199 -0
  69. package/build/components/FacetSection/index.js.map +1 -0
  70. package/build/components/FacetSection/style.css +1 -0
  71. package/build/components/FacetSidebar/index.cjs +2 -0
  72. package/build/components/FacetSidebar/index.cjs.map +1 -0
  73. package/build/components/FacetSidebar/index.d.cts +35 -0
  74. package/build/components/FacetSidebar/index.d.ts +35 -0
  75. package/build/components/FacetSidebar/index.js +110 -0
  76. package/build/components/FacetSidebar/index.js.map +1 -0
  77. package/build/components/FacetSidebar/style.css +1 -0
  78. package/build/components/FilterToolbar/index.cjs +2 -0
  79. package/build/components/FilterToolbar/index.cjs.map +1 -0
  80. package/build/components/FilterToolbar/index.d.cts +55 -0
  81. package/build/components/FilterToolbar/index.d.ts +55 -0
  82. package/build/components/FilterToolbar/index.js +149 -0
  83. package/build/components/FilterToolbar/index.js.map +1 -0
  84. package/build/components/FilterToolbar/style.css +1 -0
  85. package/build/components/Gallery/index.cjs +1 -1
  86. package/build/components/Gallery/index.cjs.map +1 -1
  87. package/build/components/Gallery/index.d.cts +8 -1
  88. package/build/components/Gallery/index.d.ts +8 -1
  89. package/build/components/Gallery/index.js +146 -138
  90. package/build/components/Gallery/index.js.map +1 -1
  91. package/build/components/Gallery/style.css +1 -1
  92. package/build/components/MegaMenu/index.cjs +2 -0
  93. package/build/components/MegaMenu/index.cjs.map +1 -0
  94. package/build/components/MegaMenu/index.d.cts +67 -0
  95. package/build/components/MegaMenu/index.d.ts +67 -0
  96. package/build/components/MegaMenu/index.js +220 -0
  97. package/build/components/MegaMenu/index.js.map +1 -0
  98. package/build/components/MegaMenu/style.css +1 -0
  99. package/build/components/MoneyInput/index.cjs +1 -1
  100. package/build/components/MoneyInput/index.cjs.map +1 -1
  101. package/build/components/MoneyInput/index.js +10 -10
  102. package/build/components/MoneyInput/index.js.map +1 -1
  103. package/build/components/NotificationCenter/style.css +1 -1
  104. package/build/components/PageHeader/style.css +1 -1
  105. package/build/components/Popover/style.css +1 -1
  106. package/build/components/ProductCarousel/index.cjs +2 -0
  107. package/build/components/ProductCarousel/index.cjs.map +1 -0
  108. package/build/components/ProductCarousel/index.d.cts +35 -0
  109. package/build/components/ProductCarousel/index.d.ts +35 -0
  110. package/build/components/ProductCarousel/index.js +86 -0
  111. package/build/components/ProductCarousel/index.js.map +1 -0
  112. package/build/components/ProductCarousel/style.css +1 -0
  113. package/build/components/Radio/index.cjs +1 -1
  114. package/build/components/Radio/index.cjs.map +1 -1
  115. package/build/components/Radio/index.js +10 -10
  116. package/build/components/Radio/index.js.map +1 -1
  117. package/build/components/SectionHeader/index.cjs +1 -1
  118. package/build/components/SectionHeader/index.cjs.map +1 -1
  119. package/build/components/SectionHeader/index.js +4 -4
  120. package/build/components/SectionHeader/index.js.map +1 -1
  121. package/build/components/SectionHeader/style.css +1 -1
  122. package/build/components/SegmentedControl/index.cjs +1 -1
  123. package/build/components/SegmentedControl/index.cjs.map +1 -1
  124. package/build/components/SegmentedControl/index.js +23 -23
  125. package/build/components/SegmentedControl/index.js.map +1 -1
  126. package/build/components/Select/index.cjs +1 -1
  127. package/build/components/Select/index.cjs.map +1 -1
  128. package/build/components/Select/index.js +37 -37
  129. package/build/components/Select/index.js.map +1 -1
  130. package/build/components/Select/style.css +1 -1
  131. package/build/components/Skeleton/index.cjs +1 -1
  132. package/build/components/Skeleton/index.cjs.map +1 -1
  133. package/build/components/Skeleton/index.js +16 -16
  134. package/build/components/Skeleton/index.js.map +1 -1
  135. package/build/components/SortableList/index.cjs +2 -0
  136. package/build/components/SortableList/index.cjs.map +1 -0
  137. package/build/components/SortableList/index.d.cts +37 -0
  138. package/build/components/SortableList/index.d.ts +37 -0
  139. package/build/components/SortableList/index.js +159 -0
  140. package/build/components/SortableList/index.js.map +1 -0
  141. package/build/components/SortableList/style.css +1 -0
  142. package/build/components/Steps/index.cjs +1 -1
  143. package/build/components/Steps/index.cjs.map +1 -1
  144. package/build/components/Steps/index.d.cts +6 -0
  145. package/build/components/Steps/index.d.ts +6 -0
  146. package/build/components/Steps/index.js +37 -35
  147. package/build/components/Steps/index.js.map +1 -1
  148. package/build/components/Steps/style.css +1 -1
  149. package/build/components/StickyActionBar/index.cjs +2 -0
  150. package/build/components/StickyActionBar/index.cjs.map +1 -0
  151. package/build/components/StickyActionBar/index.d.cts +29 -0
  152. package/build/components/StickyActionBar/index.d.ts +29 -0
  153. package/build/components/StickyActionBar/index.js +57 -0
  154. package/build/components/StickyActionBar/index.js.map +1 -0
  155. package/build/components/StickyActionBar/style.css +1 -0
  156. package/build/components/Table/index.cjs +1 -1
  157. package/build/components/Table/index.cjs.map +1 -1
  158. package/build/components/Table/index.d.cts +6 -0
  159. package/build/components/Table/index.d.ts +6 -0
  160. package/build/components/Table/index.js +34 -32
  161. package/build/components/Table/index.js.map +1 -1
  162. package/build/components/Table/style.css +1 -1
  163. package/build/helpers/carousel.helper.cjs +2 -0
  164. package/build/helpers/carousel.helper.cjs.map +1 -0
  165. package/build/helpers/carousel.helper.d.cts +11 -0
  166. package/build/helpers/carousel.helper.d.ts +11 -0
  167. package/build/helpers/carousel.helper.js +10 -0
  168. package/build/helpers/carousel.helper.js.map +1 -0
  169. package/build/helpers/facet.helper.cjs +2 -0
  170. package/build/helpers/facet.helper.cjs.map +1 -0
  171. package/build/helpers/facet.helper.d.cts +6 -0
  172. package/build/helpers/facet.helper.d.ts +6 -0
  173. package/build/helpers/facet.helper.js +5 -0
  174. package/build/helpers/facet.helper.js.map +1 -0
  175. package/build/helpers/focus.helper.cjs +1 -1
  176. package/build/helpers/focus.helper.cjs.map +1 -1
  177. package/build/helpers/focus.helper.d.cts +2 -0
  178. package/build/helpers/focus.helper.d.ts +2 -0
  179. package/build/helpers/focus.helper.js +1 -0
  180. package/build/helpers/focus.helper.js.map +1 -1
  181. package/build/helpers/sortable.helper.cjs +2 -0
  182. package/build/helpers/sortable.helper.cjs.map +1 -0
  183. package/build/helpers/sortable.helper.d.cts +19 -0
  184. package/build/helpers/sortable.helper.d.ts +19 -0
  185. package/build/helpers/sortable.helper.js +20 -0
  186. package/build/helpers/sortable.helper.js.map +1 -0
  187. package/build/helpers/sticky-bar.helper.cjs +2 -0
  188. package/build/helpers/sticky-bar.helper.cjs.map +1 -0
  189. package/build/helpers/sticky-bar.helper.d.cts +6 -0
  190. package/build/helpers/sticky-bar.helper.d.ts +6 -0
  191. package/build/helpers/sticky-bar.helper.js +8 -0
  192. package/build/helpers/sticky-bar.helper.js.map +1 -0
  193. package/build/hooks/useRemovalFocus.cjs +2 -0
  194. package/build/hooks/useRemovalFocus.cjs.map +1 -0
  195. package/build/hooks/useRemovalFocus.d.cts +13 -0
  196. package/build/hooks/useRemovalFocus.d.ts +13 -0
  197. package/build/hooks/useRemovalFocus.js +21 -0
  198. package/build/hooks/useRemovalFocus.js.map +1 -0
  199. package/build/index.cjs +1 -1
  200. package/build/index.d.cts +13 -2
  201. package/build/index.d.ts +13 -2
  202. package/build/index.js +115 -93
  203. package/build/index.js.map +1 -1
  204. package/build/scss/_mixins.scss +3 -1
  205. package/build/styles.css +38 -14
  206. package/build/types/sortable.type.d.cts +12 -0
  207. package/build/types/sortable.type.d.ts +12 -0
  208. package/build/types/theme.type.d.cts +95 -0
  209. package/build/types/theme.type.d.ts +95 -0
  210. package/build/types/types/theme.type.d.cts +95 -0
  211. package/build/types/types/theme.type.d.ts +95 -0
  212. package/package.json +111 -1
@@ -1,189 +1,204 @@
1
1
  "use client";
2
- import { jsxs as h, jsx as s, Fragment as g } from "react/jsx-runtime";
3
- import { memo as b, useId as C, useMemo as G, useState as L, useEffect as M } from "react";
4
- import { ChevronDown as E } from "react-bootstrap-icons";
5
- import { findActiveHref as H } from "../../helpers/app-shell.helper.js";
6
- import { cx as f } from "../../helpers/class-name.helper.js";
2
+ import { jsxs as v, jsx as t, Fragment as C } from "react/jsx-runtime";
3
+ import { memo as f, useId as g, useMemo as M, useState as D, useEffect as E } from "react";
4
+ import { ChevronDown as H } from "react-bootstrap-icons";
5
+ import { findActiveHref as $ } from "../../helpers/app-shell.helper.js";
6
+ import { cx as b } from "../../helpers/class-name.helper.js";
7
7
  import { named as N } from "../../helpers/component.helper.js";
8
- import { resolveLabel as $, resolveFormatter as j } from "../../helpers/label.helper.js";
9
- import F from "../Link/index.js";
10
- import { useAppShellLabels as x, useAppShell as B } from "./context.js";
8
+ import { resolveLabel as j, resolveFormatter as F } from "../../helpers/label.helper.js";
9
+ import O from "../Link/index.js";
10
+ import { useAppShellLabels as x, useAppShell as y } from "./context.js";
11
11
  const a = {"shell":"ui-shell-DdJz9","shell--collapsed":"ui-shell--collapsed-mBfej","srOnly":"ui-srOnly--wftu","shell__skip":"ui-shell__skip-hqzkw","shell__sidebar":"ui-shell__sidebar-59ryl","shell__sidebar-inner":"ui-shell__sidebar-inner-iIXhF","shell__brand":"ui-shell__brand-Mph-k","shell__navigation":"ui-shell__navigation-quAVK","shell__footer":"ui-shell__footer-gGr9S","shell__toggle":"ui-shell__toggle--vukn","shell__frame":"ui-shell__frame-4Cwe2","shell__topbar":"ui-shell__topbar-HH2s0","shell__menu-button":"ui-shell__menu-button-8CeT4","shell__title":"ui-shell__title--Z5jA","shell__search":"ui-shell__search-4Tij9","shell__actions":"ui-shell__actions-RU34x","shell__content":"ui-shell__content-nbbhQ","shell__drawer-brand":"ui-shell__drawer-brand-3MgNr","nav":"ui-nav-3I7Ws","nav__section-label":"ui-nav__section-label-0CMnM","nav__list":"ui-nav__list-Wotlu","nav__sublist":"ui-nav__sublist-8ut6O","nav__item":"ui-nav__item-RvDle","nav__item--active":"ui-nav__item--active-Lg028","nav__item--disabled":"ui-nav__item--disabled-CcOTO","nav__icon":"ui-nav__icon-NVN6X","nav__label":"ui-nav__label-nlEMg","nav__badge":"ui-nav__badge-aR8RE","nav__chevron":"ui-nav__chevron-ZrqW9","nav__chevron--open":"ui-nav__chevron--open-56sZo","nav__section":"ui-nav__section-hkG3J"};
12
- const S = 99, I = ({ count: l }) => {
13
- const t = x();
14
- return /* @__PURE__ */ h(g, { children: [
15
- /* @__PURE__ */ s("span", { "aria-hidden": !0, className: a.nav__badge, children: l > S ? `${S}+` : l }),
16
- /* @__PURE__ */ h("span", { className: a.srOnly, children: [
12
+ const S = 99, B = ({ count: s }) => {
13
+ const l = x();
14
+ return /* @__PURE__ */ v(C, { children: [
15
+ /* @__PURE__ */ t("span", { "aria-hidden": !0, className: a.nav__badge, children: s > S ? `${S}+` : s }),
16
+ /* @__PURE__ */ v("span", { className: a.srOnly, children: [
17
17
  ", ",
18
- j("AppShell.labels.badge", t.badge, l)
18
+ F("AppShell.labels.badge", l.badge, s)
19
19
  ] })
20
20
  ] });
21
- }, O = ({
22
- label: l,
23
- href: t,
21
+ }, w = ({
22
+ label: s,
23
+ href: l,
24
24
  icon: m,
25
- badge: i,
26
- isActive: _ = !1,
27
- isDisabled: u = !1,
28
- linkProps: r,
29
- className: n,
30
- testId: p
25
+ badge: r,
26
+ isActive: h = !1,
27
+ isDisabled: _ = !1,
28
+ onClick: u,
29
+ linkProps: i,
30
+ className: o,
31
+ testId: c
31
32
  }) => {
32
- const { isCollapsed: v, onNavigate: d } = B(), o = /* @__PURE__ */ h(g, { children: [
33
- m && /* @__PURE__ */ s("span", { "aria-hidden": !0, className: a.nav__icon, children: m }),
34
- /* @__PURE__ */ s("span", { className: a.nav__label, children: l }),
35
- i !== void 0 && i > 0 && /* @__PURE__ */ s(I, { count: i })
36
- ] }), e = v ? l : void 0;
37
- if (t === void 0 || u)
38
- return /* @__PURE__ */ s("li", { className: n, "data-testid": p, children: /* @__PURE__ */ s(
33
+ const { isCollapsed: p, onNavigate: n } = y(), e = /* @__PURE__ */ v(C, { children: [
34
+ m && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: a.nav__icon, children: m }),
35
+ /* @__PURE__ */ t("span", { className: a.nav__label, children: s }),
36
+ r !== void 0 && r > 0 && /* @__PURE__ */ t(B, { count: r })
37
+ ] }), d = p ? s : void 0;
38
+ if (l === void 0 && u && !_)
39
+ return /* @__PURE__ */ t("li", { className: o, "data-testid": c, children: /* @__PURE__ */ t(
40
+ "button",
41
+ {
42
+ type: "button",
43
+ className: a.nav__item,
44
+ title: d,
45
+ onClick: () => {
46
+ u(), n == null || n();
47
+ },
48
+ children: e
49
+ }
50
+ ) });
51
+ if (l === void 0 || _)
52
+ return /* @__PURE__ */ t("li", { className: o, "data-testid": c, children: /* @__PURE__ */ t(
39
53
  "span",
40
54
  {
41
- className: f(a.nav__item, a["nav__item--disabled"]),
55
+ className: b(a.nav__item, a["nav__item--disabled"]),
42
56
  "aria-disabled": "true",
43
- title: e,
44
- children: o
57
+ title: d,
58
+ children: e
45
59
  }
46
60
  ) });
47
- const c = (D) => {
61
+ const I = (L) => {
48
62
  var A;
49
- (A = r == null ? void 0 : r.onClick) == null || A.call(r, D), d == null || d();
63
+ (A = i == null ? void 0 : i.onClick) == null || A.call(i, L), n == null || n();
50
64
  };
51
- return /* @__PURE__ */ s("li", { className: n, "data-testid": p, children: /* @__PURE__ */ s(
52
- F,
65
+ return /* @__PURE__ */ t("li", { className: o, "data-testid": c, children: /* @__PURE__ */ t(
66
+ O,
53
67
  {
54
- ...r,
55
- href: t,
56
- className: f(a.nav__item, _ && a["nav__item--active"]),
57
- "aria-current": _ ? "page" : void 0,
58
- title: e,
59
- onClick: c,
60
- children: o
68
+ ...i,
69
+ href: l,
70
+ className: b(a.nav__item, h && a["nav__item--active"]),
71
+ "aria-current": h ? "page" : void 0,
72
+ title: d,
73
+ onClick: I,
74
+ children: e
61
75
  }
62
76
  ) });
63
- }, w = /* @__PURE__ */ b(
64
- /* @__PURE__ */ N(O, "AppShellNavItem")
65
- ), U = ({
66
- label: l,
67
- icon: t,
77
+ }, U = /* @__PURE__ */ f(
78
+ /* @__PURE__ */ N(w, "AppShellNavItem")
79
+ ), X = ({
80
+ label: s,
81
+ icon: l,
68
82
  badge: m,
69
- hasActiveItem: i = !1,
70
- children: _,
71
- className: u,
72
- testId: r
83
+ hasActiveItem: r = !1,
84
+ children: h,
85
+ className: _,
86
+ testId: u
73
87
  }) => {
74
- const { isCollapsed: n, onExpandSidebar: p } = B(), v = C(), [d, o] = L(i);
75
- M(() => {
76
- i && o(!0);
77
- }, [i]);
78
- const e = d && !n, c = () => {
79
- if (n) {
80
- o(!0), p == null || p();
88
+ const { isCollapsed: i, onExpandSidebar: o } = y(), c = g(), [p, n] = D(r);
89
+ E(() => {
90
+ r && n(!0);
91
+ }, [r]);
92
+ const e = p && !i, d = () => {
93
+ if (i) {
94
+ n(!0), o == null || o();
81
95
  return;
82
96
  }
83
- o(!d);
97
+ n(!p);
84
98
  };
85
- return /* @__PURE__ */ h("li", { className: u, "data-testid": r, children: [
86
- /* @__PURE__ */ h(
99
+ return /* @__PURE__ */ v("li", { className: _, "data-testid": u, children: [
100
+ /* @__PURE__ */ v(
87
101
  "button",
88
102
  {
89
103
  type: "button",
90
- className: f(
104
+ className: b(
91
105
  a.nav__item,
92
106
  a["nav__item--group"],
93
- i && n && a["nav__item--active"]
107
+ r && i && a["nav__item--active"]
94
108
  ),
95
109
  "aria-expanded": e,
96
- "aria-controls": v,
97
- title: n ? l : void 0,
98
- onClick: c,
110
+ "aria-controls": c,
111
+ title: i ? s : void 0,
112
+ onClick: d,
99
113
  children: [
100
- t && /* @__PURE__ */ s("span", { "aria-hidden": !0, className: a.nav__icon, children: t }),
101
- /* @__PURE__ */ s("span", { className: a.nav__label, children: l }),
102
- m !== void 0 && m > 0 && /* @__PURE__ */ s(I, { count: m }),
103
- /* @__PURE__ */ s(
104
- E,
114
+ l && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: a.nav__icon, children: l }),
115
+ /* @__PURE__ */ t("span", { className: a.nav__label, children: s }),
116
+ m !== void 0 && m > 0 && /* @__PURE__ */ t(B, { count: m }),
117
+ /* @__PURE__ */ t(
118
+ H,
105
119
  {
106
120
  "aria-hidden": !0,
107
- className: f(a.nav__chevron, e && a["nav__chevron--open"])
121
+ className: b(a.nav__chevron, e && a["nav__chevron--open"])
108
122
  }
109
123
  )
110
124
  ]
111
125
  }
112
126
  ),
113
- /* @__PURE__ */ s("ul", { id: v, className: a.nav__sublist, hidden: !e, children: _ })
127
+ /* @__PURE__ */ t("ul", { id: c, className: a.nav__sublist, hidden: !e, children: h })
114
128
  ] });
115
- }, X = /* @__PURE__ */ b(
116
- /* @__PURE__ */ N(U, "AppShellNavGroup")
117
- ), y = (l) => l.flatMap((t) => [
118
- ...t.href !== void 0 && t.isActive === void 0 ? [t.href] : [],
119
- ...y(t.items ?? [])
120
- ]), q = ({
121
- sections: l = [],
122
- currentPath: t,
129
+ }, q = /* @__PURE__ */ f(
130
+ /* @__PURE__ */ N(X, "AppShellNavGroup")
131
+ ), G = (s) => s.flatMap((l) => [
132
+ ...l.href !== void 0 && l.isActive === void 0 ? [l.href] : [],
133
+ ...G(l.items ?? [])
134
+ ]), z = ({
135
+ sections: s = [],
136
+ currentPath: l,
123
137
  label: m,
124
- children: i,
125
- className: _,
126
- testId: u
138
+ children: r,
139
+ className: h,
140
+ testId: _
127
141
  }) => {
128
- const r = x(), n = C(), p = G(
129
- () => H(y(l.flatMap((e) => e.items)), t),
130
- [l, t]
131
- ), v = (e) => e.isActive ?? (e.href !== void 0 && e.href === p), d = (e) => (e.items ?? []).some((c) => v(c) || d(c)), o = (e) => e.items && e.items.length > 0 ? /* @__PURE__ */ s(
132
- X,
142
+ const u = x(), i = g(), o = M(
143
+ () => $(G(s.flatMap((e) => e.items)), l),
144
+ [s, l]
145
+ ), c = (e) => e.isActive ?? (e.href !== void 0 && e.href === o), p = (e) => (e.items ?? []).some((d) => c(d) || p(d)), n = (e) => e.items && e.items.length > 0 ? /* @__PURE__ */ t(
146
+ q,
133
147
  {
134
148
  label: e.label,
135
149
  icon: e.icon,
136
150
  badge: e.badge,
137
- hasActiveItem: d(e),
138
- children: e.items.map(o)
151
+ hasActiveItem: p(e),
152
+ children: e.items.map(n)
139
153
  },
140
154
  e.id
141
- ) : /* @__PURE__ */ s(
142
- w,
155
+ ) : /* @__PURE__ */ t(
156
+ U,
143
157
  {
144
158
  label: e.label,
145
159
  href: e.href,
146
160
  icon: e.icon,
147
161
  badge: e.badge,
148
- isActive: v(e),
162
+ isActive: c(e),
149
163
  isDisabled: e.isDisabled,
164
+ onClick: e.onClick,
150
165
  linkProps: e.linkProps
151
166
  },
152
167
  e.id
153
168
  );
154
- return /* @__PURE__ */ h(
169
+ return /* @__PURE__ */ v(
155
170
  "nav",
156
171
  {
157
- "aria-label": $("AppShellNav.label", m, r.navigation),
158
- className: f(a.nav, _),
159
- "data-testid": u,
172
+ "aria-label": j("AppShellNav.label", m, u.navigation),
173
+ className: b(a.nav, h),
174
+ "data-testid": _,
160
175
  children: [
161
- l.map((e) => {
162
- const c = `${n}-${e.id}`;
163
- return /* @__PURE__ */ h(
176
+ s.map((e) => {
177
+ const d = `${i}-${e.id}`;
178
+ return /* @__PURE__ */ v(
164
179
  "div",
165
180
  {
166
181
  className: a.nav__section,
167
182
  role: e.label ? "group" : void 0,
168
- "aria-labelledby": e.label ? c : void 0,
183
+ "aria-labelledby": e.label ? d : void 0,
169
184
  children: [
170
- e.label && /* @__PURE__ */ s("p", { id: c, className: a["nav__section-label"], children: e.label }),
171
- /* @__PURE__ */ s("ul", { className: a.nav__list, children: e.items.map(o) })
185
+ e.label && /* @__PURE__ */ t("p", { id: d, className: a["nav__section-label"], children: e.label }),
186
+ /* @__PURE__ */ t("ul", { className: a.nav__list, children: e.items.map(n) })
172
187
  ]
173
188
  },
174
189
  e.id
175
190
  );
176
191
  }),
177
- i && /* @__PURE__ */ s("ul", { className: a.nav__list, children: i })
192
+ r && /* @__PURE__ */ t("ul", { className: a.nav__list, children: r })
178
193
  ]
179
194
  }
180
195
  );
181
- }, P = /* @__PURE__ */ b(
182
- /* @__PURE__ */ N(q, "AppShellNav")
196
+ }, k = /* @__PURE__ */ f(
197
+ /* @__PURE__ */ N(z, "AppShellNav")
183
198
  );
184
199
  export {
185
- P as AppShellNav,
186
- X as AppShellNavGroup,
187
- w as AppShellNavItem
200
+ k as AppShellNav,
201
+ q as AppShellNavGroup,
202
+ U as AppShellNavItem
188
203
  };
189
204
  //# sourceMappingURL=Nav.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Nav.js","sources":["../../../src/components/AppShell/Nav.tsx"],"sourcesContent":["'use client';\n\nimport { type MouseEvent, type ReactNode, memo, useEffect, useId, useMemo, useState } from 'react';\n\nimport { ChevronDown } from 'react-bootstrap-icons';\n\nimport { findActiveHref } from '../../helpers/app-shell.helper';\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\nimport { useAppShell, useAppShellLabels } from './context';\n\nimport styles from './index.module.scss';\n\n/** One entry of `AppShellNav`'s data: a link, or a collapsible group when it has `items`. */\nexport type AppShellNavLink = {\n id: string;\n label: string;\n /** Without it the entry is a passive row (a screen that is not there yet). */\n href?: string;\n icon?: ReactNode;\n /** A count drawn at the end of the row (and at the icon's corner on the icon rail). */\n badge?: number;\n /** Overrides the `currentPath` match for this entry. */\n isActive?: boolean;\n isDisabled?: boolean;\n /** Nested links: the entry becomes a group that opens and closes. */\n items?: AppShellNavLink[];\n /** Extra props for the router's link component. */\n linkProps?: UiLinkExtraProps;\n};\n\n/** A titled block of entries (\"Satış\", \"Raporlar\"). */\nexport type AppShellNavSection = {\n id: string;\n /** Shown above the entries; read as the group's name. */\n label?: string;\n items: AppShellNavLink[];\n};\n\n/* Above this the badge reads \"99+\": a wider badge pushes the label out. */\nconst BADGE_MAX = 99;\n\nconst CountBadge = ({ count }: { count: number }) => {\n const labels = useAppShellLabels();\n\n return (\n <>\n <span aria-hidden className={styles.nav__badge}>\n {count > BADGE_MAX ? `${BADGE_MAX}+` : count}\n </span>\n <span className={styles.srOnly}>\n {', '}\n {resolveFormatter('AppShell.labels.badge', labels.badge, count)}\n </span>\n </>\n );\n};\n\nexport type AppShellNavItemProps = {\n label: string;\n /** Without it (or with `isDisabled`) the row is passive. */\n href?: string;\n icon?: ReactNode;\n badge?: number;\n /** The current page: drawn as selected and read as `aria-current=\"page\"`. */\n isActive?: boolean;\n isDisabled?: boolean;\n linkProps?: UiLinkExtraProps;\n className?: string;\n testId?: string;\n};\n\n/** One navigation row: icon, label, count. Rendered through the provider's link component. */\nconst AppShellNavItemBase = ({\n label,\n href,\n icon,\n badge,\n isActive = false,\n isDisabled = false,\n linkProps,\n className,\n testId,\n}: AppShellNavItemProps) => {\n const { isCollapsed, onNavigate } = useAppShell();\n\n const content = (\n <>\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n </>\n );\n\n /* On the icon rail the label is hidden: the native tooltip names the icon for the pointer. */\n const title = isCollapsed ? label : undefined;\n\n if (href === undefined || isDisabled)\n return (\n <li className={className} data-testid={testId}>\n <span\n className={cx(styles.nav__item, styles['nav__item--disabled'])}\n aria-disabled=\"true\"\n title={title}\n >\n {content}\n </span>\n </li>\n );\n\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n (linkProps?.onClick as ((event: MouseEvent<HTMLAnchorElement>) => void) | undefined)?.(event);\n onNavigate?.();\n };\n\n return (\n <li className={className} data-testid={testId}>\n <UiLink\n {...linkProps}\n href={href}\n className={cx(styles.nav__item, isActive && styles['nav__item--active'])}\n aria-current={isActive ? 'page' : undefined}\n title={title}\n onClick={handleClick}\n >\n {content}\n </UiLink>\n </li>\n );\n};\n\nexport const AppShellNavItem = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavItemBase, 'AppShellNavItem'),\n) as typeof AppShellNavItemBase;\n\nexport type AppShellNavGroupProps = {\n label: string;\n icon?: ReactNode;\n badge?: number;\n /**\n * The current page is one of its links: the group opens (at first, and whenever this turns true)\n * and its row is marked on the icon rail.\n */\n hasActiveItem?: boolean;\n /** `AppShellNavItem`s (or nested groups). */\n children: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** A row that opens and closes a nested list of links. */\nconst AppShellNavGroupBase = ({\n label,\n icon,\n badge,\n hasActiveItem = false,\n children,\n className,\n testId,\n}: AppShellNavGroupProps) => {\n const { isCollapsed, onExpandSidebar } = useAppShell();\n const listId = useId();\n const [isExpanded, setIsExpanded] = useState(hasActiveItem);\n\n /* The page moved into the group (a link elsewhere, the browser's back button): show it. */\n useEffect(() => {\n if (hasActiveItem) setIsExpanded(true);\n }, [hasActiveItem]);\n\n /* The icon rail has no room for nested links: the list is closed there whatever the state. */\n const isOpen = isExpanded && !isCollapsed;\n\n const handleClick = () => {\n if (isCollapsed) {\n setIsExpanded(true);\n onExpandSidebar?.();\n return;\n }\n setIsExpanded(!isExpanded);\n };\n\n return (\n <li className={className} data-testid={testId}>\n <button\n type=\"button\"\n className={cx(\n styles.nav__item,\n styles['nav__item--group'],\n hasActiveItem && isCollapsed && styles['nav__item--active'],\n )}\n aria-expanded={isOpen}\n aria-controls={listId}\n title={isCollapsed ? label : undefined}\n onClick={handleClick}\n >\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n <ChevronDown\n aria-hidden\n className={cx(styles.nav__chevron, isOpen && styles['nav__chevron--open'])}\n />\n </button>\n <ul id={listId} className={styles.nav__sublist} hidden={!isOpen}>\n {children}\n </ul>\n </li>\n );\n};\n\nexport const AppShellNavGroup = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavGroupBase, 'AppShellNavGroup'),\n) as typeof AppShellNavGroupBase;\n\nconst linkHrefs = (links: readonly AppShellNavLink[]): string[] =>\n links.flatMap(link => [\n ...(link.href !== undefined && link.isActive === undefined ? [link.href] : []),\n ...linkHrefs(link.items ?? []),\n ]);\n\nexport type AppShellNavProps = {\n /** Titled blocks of links. */\n sections?: AppShellNavSection[];\n /** The router's current path: the longest matching `href` is the current page. */\n currentPath?: string;\n /** The landmark's name; `labels.appShell.navigation` by default. */\n label?: string;\n /** Your own `AppShellNavItem` / `AppShellNavGroup` rows, after the sections. */\n children?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** The sidebar's `<nav>`: sections of links with icons, counts and nested groups. */\nconst AppShellNavBase = ({\n sections = [],\n currentPath,\n label,\n children,\n className,\n testId,\n}: AppShellNavProps) => {\n const labels = useAppShellLabels();\n const baseId = useId();\n\n const activeHref = useMemo(\n () => findActiveHref(linkHrefs(sections.flatMap(section => section.items)), currentPath),\n [sections, currentPath],\n );\n\n const isActive = (link: AppShellNavLink): boolean =>\n link.isActive ?? (link.href !== undefined && link.href === activeHref);\n\n const containsActive = (link: AppShellNavLink): boolean =>\n (link.items ?? []).some(child => isActive(child) || containsActive(child));\n\n const renderLink = (link: AppShellNavLink): ReactNode =>\n link.items && link.items.length > 0 ? (\n <AppShellNavGroup\n key={link.id}\n label={link.label}\n icon={link.icon}\n badge={link.badge}\n hasActiveItem={containsActive(link)}\n >\n {link.items.map(renderLink)}\n </AppShellNavGroup>\n ) : (\n <AppShellNavItem\n key={link.id}\n label={link.label}\n href={link.href}\n icon={link.icon}\n badge={link.badge}\n isActive={isActive(link)}\n isDisabled={link.isDisabled}\n linkProps={link.linkProps}\n />\n );\n\n return (\n <nav\n aria-label={resolveLabel('AppShellNav.label', label, labels.navigation)}\n className={cx(styles.nav, className)}\n data-testid={testId}\n >\n {sections.map(section => {\n const headingId = `${baseId}-${section.id}`;\n\n return (\n <div\n key={section.id}\n className={styles.nav__section}\n role={section.label ? 'group' : undefined}\n aria-labelledby={section.label ? headingId : undefined}\n >\n {section.label && (\n <p id={headingId} className={styles['nav__section-label']}>\n {section.label}\n </p>\n )}\n <ul className={styles.nav__list}>{section.items.map(renderLink)}</ul>\n </div>\n );\n })}\n {children && <ul className={styles.nav__list}>{children}</ul>}\n </nav>\n );\n};\n\nexport const AppShellNav = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavBase, 'AppShellNav'),\n) as typeof AppShellNavBase;\n"],"names":["BADGE_MAX","CountBadge","count","labels","useAppShellLabels","jsxs","Fragment","jsx","styles","resolveFormatter","AppShellNavItemBase","label","href","icon","badge","isActive","isDisabled","linkProps","className","testId","isCollapsed","onNavigate","useAppShell","content","title","cx","handleClick","event","_a","UiLink","AppShellNavItem","memo","named","AppShellNavGroupBase","hasActiveItem","children","onExpandSidebar","listId","useId","isExpanded","setIsExpanded","useState","useEffect","isOpen","ChevronDown","AppShellNavGroup","linkHrefs","links","link","AppShellNavBase","sections","currentPath","baseId","activeHref","useMemo","findActiveHref","section","containsActive","child","renderLink","resolveLabel","headingId","AppShellNav"],"mappings":";;;;;;;;;;;AA0CA,MAAMA,IAAY,IAEZC,IAAa,CAAC,EAAE,OAAAC,QAA+B;AACnD,QAAMC,IAASC,EAAA;AAEf,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EAAK,eAAW,IAAC,WAAWC,EAAO,YACjC,UAAAN,IAAQF,IAAY,GAAGA,CAAS,MAAME,GACzC;AAAA,IACA,gBAAAG,EAAC,QAAA,EAAK,WAAWG,EAAO,QACrB,UAAA;AAAA,MAAA;AAAA,MACAC,EAAiB,yBAAyBN,EAAO,OAAOD,CAAK;AAAA,IAAA,EAAA,CAChE;AAAA,EAAA,GACF;AAEJ,GAiBMQ,IAAsB,CAAC;AAAA,EAC3B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AACF,MAA4B;AAC1B,QAAM,EAAE,aAAAC,GAAa,YAAAC,EAAA,IAAeC,EAAA,GAE9BC,IACJ,gBAAAlB,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAO,uBACE,QAAA,EAAK,eAAW,IAAC,WAAWL,EAAO,WACjC,UAAAK,EAAA,CACH;AAAA,IAEF,gBAAAN,EAAC,QAAA,EAAK,WAAWC,EAAO,YAAa,UAAAG,GAAM;AAAA,IAC1CG,MAAU,UAAaA,IAAQ,KAAK,gBAAAP,EAACN,GAAA,EAAW,OAAOa,EAAA,CAAO;AAAA,EAAA,GACjE,GAIIU,IAAQJ,IAAcT,I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AA,IAPXA,EAAK;AAAA,EAAA;AAWhB,SACE,gBAAA3C;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAYuD,EAAa,qBAAqBjD,GAAOR,EAAO,UAAU;AAAA,MACtE,WAAWsB,EAAGjB,EAAO,KAAKU,CAAS;AAAA,MACnC,eAAaC;AAAA,MAEZ,UAAA;AAAA,QAAA+B,EAAS,IAAI,CAAAM,MAAW;AACvB,gBAAMK,IAAY,GAAGT,CAAM,IAAII,EAAQ,EAAE;AAEzC,iBACE,gBAAAnD;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,WAAWG,EAAO;AAAA,cAClB,MAAMgD,EAAQ,QAAQ,UAAU;AAAA,cAChC,mBAAiBA,EAAQ,QAAQK,IAAY;AAAA,cAE5C,UAAA;AAAA,gBAAAL,EAAQ,SACP,gBAAAjD,EAAC,KAAA,EAAE,IAAIsD,GAAW,WAAWrD,EAAO,oBAAoB,GACrD,UAAAgD,EAAQ,MAAA,CACX;AAAA,gBAEF,gBAAAjD,EAAC,QAAG,WAAWC,EAAO,WAAY,UAAAgD,EAAQ,MAAM,IAAIG,CAAU,EAAA,CAAE;AAAA,cAAA;AAAA,YAAA;AAAA,YAV3DH,EAAQ;AAAA,UAAA;AAAA,QAanB,CAAC;AAAA,QACArB,KAAY,gBAAA5B,EAAC,MAAA,EAAG,WAAWC,EAAO,WAAY,UAAA2B,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9D,GAEa2B,IAA4B,gBAAA/B;AAAA,EACzB,gBAAAC,EAAMiB,GAAiB,aAAa;AACpD;"}
1
+ {"version":3,"file":"Nav.js","sources":["../../../src/components/AppShell/Nav.tsx"],"sourcesContent":["'use client';\n\nimport { type MouseEvent, type ReactNode, memo, useEffect, useId, useMemo, useState } from 'react';\n\nimport { ChevronDown } from 'react-bootstrap-icons';\n\nimport { findActiveHref } from '../../helpers/app-shell.helper';\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\nimport { useAppShell, useAppShellLabels } from './context';\n\nimport styles from './index.module.scss';\n\n/** One entry of `AppShellNav`'s data: a link, or a collapsible group when it has `items`. */\nexport type AppShellNavLink = {\n id: string;\n label: string;\n /** Without it the entry is a passive row (a screen that is not there yet). */\n href?: string;\n icon?: ReactNode;\n /** A count drawn at the end of the row (and at the icon's corner on the icon rail). */\n badge?: number;\n /** Overrides the `currentPath` match for this entry. */\n isActive?: boolean;\n isDisabled?: boolean;\n /** Nested links: the entry becomes a group that opens and closes. */\n items?: AppShellNavLink[];\n /** An action row without `href` (\"Çıkış yap\"), 3.4: a button with the link rows' metrics. */\n onClick?: () => void;\n /** Extra props for the router's link component. */\n linkProps?: UiLinkExtraProps;\n};\n\n/** A titled block of entries (\"Satış\", \"Raporlar\"). */\nexport type AppShellNavSection = {\n id: string;\n /** Shown above the entries; read as the group's name. */\n label?: string;\n items: AppShellNavLink[];\n};\n\n/* Above this the badge reads \"99+\": a wider badge pushes the label out. */\nconst BADGE_MAX = 99;\n\nconst CountBadge = ({ count }: { count: number }) => {\n const labels = useAppShellLabels();\n\n return (\n <>\n <span aria-hidden className={styles.nav__badge}>\n {count > BADGE_MAX ? `${BADGE_MAX}+` : count}\n </span>\n <span className={styles.srOnly}>\n {', '}\n {resolveFormatter('AppShell.labels.badge', labels.badge, count)}\n </span>\n </>\n );\n};\n\nexport type AppShellNavItemProps = {\n label: string;\n /** Without it (or with `isDisabled`) the row is passive. */\n href?: string;\n icon?: ReactNode;\n badge?: number;\n /** The current page: drawn as selected and read as `aria-current=\"page\"`. */\n isActive?: boolean;\n isDisabled?: boolean;\n /**\n * An action instead of a page (3.4) — \"Çıkış yap\" at the end of an account menu: without `href`\n * the row is a `<button>` that shares the link rows' size, icon column and hover.\n */\n onClick?: () => void;\n linkProps?: UiLinkExtraProps;\n className?: string;\n testId?: string;\n};\n\n/** One navigation row: icon, label, count. Rendered through the provider's link component. */\nconst AppShellNavItemBase = ({\n label,\n href,\n icon,\n badge,\n isActive = false,\n isDisabled = false,\n onClick,\n linkProps,\n className,\n testId,\n}: AppShellNavItemProps) => {\n const { isCollapsed, onNavigate } = useAppShell();\n\n const content = (\n <>\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n </>\n );\n\n /* On the icon rail the label is hidden: the native tooltip names the icon for the pointer. */\n const title = isCollapsed ? label : undefined;\n\n if (href === undefined && onClick && !isDisabled)\n return (\n <li className={className} data-testid={testId}>\n <button\n type=\"button\"\n className={styles.nav__item}\n title={title}\n onClick={() => {\n onClick();\n onNavigate?.();\n }}\n >\n {content}\n </button>\n </li>\n );\n\n if (href === undefined || isDisabled)\n return (\n <li className={className} data-testid={testId}>\n <span\n className={cx(styles.nav__item, styles['nav__item--disabled'])}\n aria-disabled=\"true\"\n title={title}\n >\n {content}\n </span>\n </li>\n );\n\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n (linkProps?.onClick as ((event: MouseEvent<HTMLAnchorElement>) => void) | undefined)?.(event);\n onNavigate?.();\n };\n\n return (\n <li className={className} data-testid={testId}>\n <UiLink\n {...linkProps}\n href={href}\n className={cx(styles.nav__item, isActive && styles['nav__item--active'])}\n aria-current={isActive ? 'page' : undefined}\n title={title}\n onClick={handleClick}\n >\n {content}\n </UiLink>\n </li>\n );\n};\n\nexport const AppShellNavItem = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavItemBase, 'AppShellNavItem'),\n) as typeof AppShellNavItemBase;\n\nexport type AppShellNavGroupProps = {\n label: string;\n icon?: ReactNode;\n badge?: number;\n /**\n * The current page is one of its links: the group opens (at first, and whenever this turns true)\n * and its row is marked on the icon rail.\n */\n hasActiveItem?: boolean;\n /** `AppShellNavItem`s (or nested groups). */\n children: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** A row that opens and closes a nested list of links. */\nconst AppShellNavGroupBase = ({\n label,\n icon,\n badge,\n hasActiveItem = false,\n children,\n className,\n testId,\n}: AppShellNavGroupProps) => {\n const { isCollapsed, onExpandSidebar } = useAppShell();\n const listId = useId();\n const [isExpanded, setIsExpanded] = useState(hasActiveItem);\n\n /* The page moved into the group (a link elsewhere, the browser's back button): show it. */\n useEffect(() => {\n if (hasActiveItem) setIsExpanded(true);\n }, [hasActiveItem]);\n\n /* The icon rail has no room for nested links: the list is closed there whatever the state. */\n const isOpen = isExpanded && !isCollapsed;\n\n const handleClick = () => {\n if (isCollapsed) {\n setIsExpanded(true);\n onExpandSidebar?.();\n return;\n }\n setIsExpanded(!isExpanded);\n };\n\n return (\n <li className={className} data-testid={testId}>\n <button\n type=\"button\"\n className={cx(\n styles.nav__item,\n styles['nav__item--group'],\n hasActiveItem && isCollapsed && styles['nav__item--active'],\n )}\n aria-expanded={isOpen}\n aria-controls={listId}\n title={isCollapsed ? label : undefined}\n onClick={handleClick}\n >\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n <ChevronDown\n aria-hidden\n className={cx(styles.nav__chevron, isOpen && styles['nav__chevron--open'])}\n />\n </button>\n <ul id={listId} className={styles.nav__sublist} hidden={!isOpen}>\n {children}\n </ul>\n </li>\n );\n};\n\nexport const AppShellNavGroup = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavGroupBase, 'AppShellNavGroup'),\n) as typeof AppShellNavGroupBase;\n\nconst linkHrefs = (links: readonly AppShellNavLink[]): string[] =>\n links.flatMap(link => [\n ...(link.href !== undefined && link.isActive === undefined ? [link.href] : []),\n ...linkHrefs(link.items ?? []),\n ]);\n\nexport type AppShellNavProps = {\n /** Titled blocks of links. */\n sections?: AppShellNavSection[];\n /** The router's current path: the longest matching `href` is the current page. */\n currentPath?: string;\n /** The landmark's name; `labels.appShell.navigation` by default. */\n label?: string;\n /** Your own `AppShellNavItem` / `AppShellNavGroup` rows, after the sections. */\n children?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** The sidebar's `<nav>`: sections of links with icons, counts and nested groups. */\nconst AppShellNavBase = ({\n sections = [],\n currentPath,\n label,\n children,\n className,\n testId,\n}: AppShellNavProps) => {\n const labels = useAppShellLabels();\n const baseId = useId();\n\n const activeHref = useMemo(\n () => findActiveHref(linkHrefs(sections.flatMap(section => section.items)), currentPath),\n [sections, currentPath],\n );\n\n const isActive = (link: AppShellNavLink): boolean =>\n link.isActive ?? (link.href !== undefined && link.href === activeHref);\n\n const containsActive = (link: AppShellNavLink): boolean =>\n (link.items ?? []).some(child => isActive(child) || containsActive(child));\n\n const renderLink = (link: AppShellNavLink): ReactNode =>\n link.items && link.items.length > 0 ? (\n <AppShellNavGroup\n key={link.id}\n label={link.label}\n icon={link.icon}\n badge={link.badge}\n hasActiveItem={containsActive(link)}\n >\n {link.items.map(renderLink)}\n </AppShellNavGroup>\n ) : (\n <AppShellNavItem\n key={link.id}\n label={link.label}\n href={link.href}\n icon={link.icon}\n badge={link.badge}\n isActive={isActive(link)}\n isDisabled={link.isDisabled}\n onClick={link.onClick}\n linkProps={link.linkProps}\n />\n );\n\n return (\n <nav\n aria-label={resolveLabel('AppShellNav.label', label, labels.navigation)}\n className={cx(styles.nav, className)}\n data-testid={testId}\n >\n {sections.map(section => {\n const headingId = `${baseId}-${section.id}`;\n\n return (\n <div\n key={section.id}\n className={styles.nav__section}\n role={section.label ? 'group' : undefined}\n aria-labelledby={section.label ? headingId : undefined}\n >\n {section.label && (\n <p id={headingId} className={styles['nav__section-label']}>\n {section.label}\n </p>\n )}\n <ul className={styles.nav__list}>{section.items.map(renderLink)}</ul>\n </div>\n );\n })}\n {children && <ul className={styles.nav__list}>{children}</ul>}\n </nav>\n );\n};\n\nexport const AppShellNav = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavBase, 'AppShellNav'),\n) as typeof AppShellNavBase;\n"],"names":["BADGE_MAX","CountBadge","count","labels","useAppShellLabels","jsxs","Fragment","jsx","styles","resolveFormatter","AppShellNavItemBase","label","href","icon","badge","isActive","isDisabled","onClick","linkProps","className","testId","isCollapsed","onNavigate","useAppShell","content","title","cx","handleClick","event","_a","UiLink","AppShellNavItem","memo","named","AppShellNavGroupBase","hasActiveItem","children","onExpandSidebar","listId","useId","isExpanded","setIsExpanded","useState","useEffect","isOpen","ChevronDown","AppShellNavGroup","linkHrefs","links","link","AppShellNavBase","sections","currentPath","baseId","activeHref","useMemo","findActiveHref","section","containsActive","child","renderLink","resolveLabel","headingId","AppShellNav"],"mappings":";;;;;;;;;;;AA4CA,MAAMA,IAAY,IAEZC,IAAa,CAAC,EAAE,OAAAC,QAA+B;AACnD,QAAMC,IAASC,EAAA;AAEf,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EAAK,eAAW,IAAC,WAAWC,EAAO,YACjC,UAAAN,IAAQF,IAAY,GAAGA,CAAS,MAAME,GACzC;AAAA,IACA,gBAAAG,EAAC,QAAA,EAAK,WAAWG,EAAO,QACrB,UAAA;AAAA,MAAA;AAAA,MACAC,EAAiB,yBAAyBN,EAAO,OAAOD,CAAK;AAAA,IAAA,EAAA,CAChE;AAAA,EAAA,GACF;AAEJ,GAsBMQ,IAAsB,CAAC;AAAA,EAC3B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AACF,MAA4B;AAC1B,QAAM,EAAE,aAAAC,GAAa,YAAAC,EAAA,IAAeC,EAAA,GAE9BC,IACJ,gBAAAnB,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAO,uB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BAAAlD,EAAC,QAAG,WAAWC,EAAO,WAAY,UAAAiD,EAAQ,MAAM,IAAIG,CAAU,EAAA,CAAE;AAAA,cAAA;AAAA,YAAA;AAAA,YAV3DH,EAAQ;AAAA,UAAA;AAAA,QAanB,CAAC;AAAA,QACArB,KAAY,gBAAA7B,EAAC,MAAA,EAAG,WAAWC,EAAO,WAAY,UAAA4B,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9D,GAEa2B,IAA4B,gBAAA/B;AAAA,EACzB,gBAAAC,EAAMiB,GAAiB,aAAa;AACpD;"}
@@ -1 +1 @@
1
- @layer ui{:root:has(.ui-shell-DdJz9){--app-sidebar-width: 232px}:root:has(.ui-shell--collapsed-mBfej){--app-sidebar-width: 56px}@media (max-width: 1024px){:root:has(.ui-shell-DdJz9){--app-sidebar-width: 0px}}.ui-srOnly--wftu{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell-DdJz9{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100dvh;background-color:var(--hd-bg-page);color:var(--hd-text);transition:grid-template-columns var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell-DdJz9{transition:none}}@media (max-width: 1024px){.ui-shell-DdJz9{grid-template-columns:minmax(0,1fr)}}.ui-shell--collapsed-mBfej{grid-template-columns:56px minmax(0,1fr)}@media (max-width: 1024px){.ui-shell--collapsed-mBfej{grid-template-columns:minmax(0,1fr)}}.ui-shell__skip-hqzkw{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell__skip-hqzkw:focus-visible{position:fixed;inset-block-start:var(--hd-space-2);inset-inline-start:var(--hd-space-2);z-index:var(--hd-z-tooltip);width:auto;height:auto;margin:0;padding:var(--hd-space-2) var(--hd-space-3);overflow:visible;clip-path:none;white-space:nowrap;border-radius:var(--hd-radius-sm);background-color:var(--hd-bg-raised);box-shadow:var(--hd-shadow-2);color:var(--hd-primary-text);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);text-decoration:none;outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-shell__sidebar-59ryl{min-width:0;border-inline-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 1024px){.ui-shell__sidebar-59ryl{display:none}}.ui-shell__sidebar-inner-iIXhF{position:sticky;inset-block-start:0;display:flex;flex-direction:column;height:100dvh}.ui-shell__brand-Mph-k{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;min-height:52px;padding-inline:var(--hd-space-4);overflow:hidden;border-block-end:1px solid var(--hd-border);font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__brand-Mph-k :where(a),.ui-shell__brand-Mph-k :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__brand-Mph-k :where(svg){flex-shrink:0}.ui-shell__navigation-quAVK{position:relative;flex:1;min-height:0;overflow-y:auto;padding:var(--hd-space-3) var(--hd-space-2);scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar{width:8px;height:8px}.ui-shell__navigation-quAVK::-webkit-scrollbar-track{background:transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-shell__footer-gGr9S{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;justify-content:flex-end;padding:var(--hd-space-2);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__footer-gGr9S{flex-direction:column;justify-content:center}.ui-shell--collapsed-mBfej .ui-shell__brand-Mph-k{justify-content:center;padding-inline:var(--hd-space-2)}[dir=rtl] .ui-shell__toggle--vukn{transform:scaleX(-1)}.ui-shell__toggle--vukn{transition:rotate var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell__toggle--vukn{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__toggle--vukn{rotate:180deg}.ui-shell__frame-4Cwe2{display:flex;flex-direction:column;min-width:0}.ui-shell__topbar-HH2s0{display:flex;align-items:center;gap:var(--hd-space-3);position:sticky;inset-block-start:0;z-index:var(--hd-z-sticky);min-height:52px;padding-inline:var(--hd-space-4);border-block-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 640px){.ui-shell__topbar-HH2s0{gap:var(--hd-space-2);padding-inline:var(--hd-space-3)}}.ui-shell__menu-button-8CeT4{display:none}@media (max-width: 1024px){.ui-shell__menu-button-8CeT4{display:inline-flex}}.ui-shell__title--Z5jA{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;min-width:0}.ui-shell__search-4Tij9{flex:1 1 auto;min-width:0;max-width:480px}.ui-shell__actions-RU34x{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;margin-inline-start:auto}.ui-shell__content-nbbhQ{flex:1;min-width:0;padding:var(--hd-space-6)}.ui-shell__content-nbbhQ:focus{outline:none}@media (max-width: 1024px){.ui-shell__content-nbbhQ{padding:var(--hd-space-4)}}.ui-shell__drawer-brand-3MgNr{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__drawer-brand-3MgNr :where(a),.ui-shell__drawer-brand-3MgNr :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__drawer-brand-3MgNr :where(svg){flex-shrink:0}.ui-shell__drawer-brand-3MgNr{margin-block-end:var(--hd-space-3)}.ui-nav-3I7Ws{display:flex;flex-direction:column;gap:var(--hd-space-4)}.ui-nav__section-label-0CMnM{font-family:var(--hd-font-body);font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:.045em;text-transform:uppercase;color:var(--hd-text-2);margin:0;padding:0 var(--hd-space-3) var(--hd-space-1);color:var(--hd-text-3)}.ui-nav__list-Wotlu,.ui-nav__sublist-8ut6O{display:flex;flex-direction:column;gap:var(--hd-space-0);margin:0;padding:0;list-style:none}.ui-nav__sublist-8ut6O{margin-inline-start:calc(var(--hd-space-3) + 18px / 2);padding-inline-start:var(--hd-space-2);border-inline-start:1px solid var(--hd-border)}.ui-nav__sublist-8ut6O[hidden]{display:none}.ui-nav__item-RvDle{display:flex;align-items:center;gap:var(--hd-space-2);background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__item-RvDle:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-nav__item-RvDle{transition:none}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-nav__item-RvDle:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-nav__item-RvDle{position:relative;width:100%;min-height:36px;padding:0 var(--hd-space-3);border:0;border-radius:var(--hd-radius-sm);color:var(--hd-text-2);font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium);line-height:var(--hd-type-h4-line-height);text-align:start;text-decoration:none;cursor:pointer}.ui-nav__item-RvDle:hover{color:var(--hd-text)}@media (hover: none) and (pointer: coarse){.ui-nav__item-RvDle{min-height:44px}}.ui-nav__item--active-Lg028{background-color:var(--hd-primary-soft);color:var(--hd-primary-text);font-weight:var(--hd-font-weight-semibold)}.ui-nav__item--active-Lg028:hover:not(:disabled){background-color:var(--hd-primary-soft-hover);color:var(--hd-primary-text)}.ui-nav__item--disabled-CcOTO{color:var(--hd-text-3)}@media (forced-colors: active){.ui-nav__item--disabled-CcOTO{color:GrayText}}.ui-nav__item--disabled-CcOTO{cursor:default}.ui-nav__item--disabled-CcOTO:hover{background-color:transparent;color:var(--hd-text-3)}.ui-nav__icon-NVN6X{display:inline-flex;flex-shrink:0;font-size:18px}.ui-nav__label-nlEMg{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.ui-nav__badge-aR8RE{flex-shrink:0;min-width:18px;height:18px;padding-inline:var(--hd-space-1);border-radius:var(--hd-radius-pill);background-color:var(--hd-primary);color:var(--hd-on-primary);font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);line-height:18px;text-align:center;font-variant-numeric:tabular-nums;box-sizing:border-box}@media (forced-colors: active){.ui-nav__badge-aR8RE{border:1px solid CanvasText}}.ui-nav__chevron-ZrqW9{flex-shrink:0;font-size:14px;transition:rotate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__chevron--open-56sZo{rotate:180deg}@media (prefers-reduced-motion: reduce){.ui-nav__chevron-ZrqW9{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-label-0CMnM,.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__label-nlEMg{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-hkG3J+.ui-nav__section-hkG3J{padding-block-start:var(--hd-space-3);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__item-RvDle{justify-content:center;padding:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__chevron-ZrqW9{display:none}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__badge-aR8RE{position:absolute;inset-block-start:2px;inset-inline-end:2px;min-width:14px;height:14px;padding-inline:3px;font-size:10px;line-height:14px}@media print{.ui-shell-DdJz9,.ui-shell--collapsed-mBfej{display:block;min-height:0;background:none}.ui-shell__skip-hqzkw,.ui-shell__sidebar-59ryl,.ui-shell__topbar-HH2s0{display:none}.ui-shell__content-nbbhQ{padding:0}}}
1
+ @layer ui{:root:has(.ui-shell-DdJz9){--app-sidebar-width: 232px}:root:has(.ui-shell--collapsed-mBfej){--app-sidebar-width: 56px}@media (max-width: 1024px){:root:has(.ui-shell-DdJz9){--app-sidebar-width: 0px}}.ui-srOnly--wftu{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell-DdJz9{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100dvh;background-color:var(--hd-bg-page);color:var(--hd-text);transition:grid-template-columns var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell-DdJz9{transition:none}}@media (max-width: 1024px){.ui-shell-DdJz9{grid-template-columns:minmax(0,1fr)}}.ui-shell--collapsed-mBfej{grid-template-columns:56px minmax(0,1fr)}@media (max-width: 1024px){.ui-shell--collapsed-mBfej{grid-template-columns:minmax(0,1fr)}}.ui-shell__skip-hqzkw{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell__skip-hqzkw:focus-visible{position:fixed;inset-block-start:var(--hd-space-2);inset-inline-start:var(--hd-space-2);z-index:var(--hd-z-tooltip);width:auto;height:auto;margin:0;padding:var(--hd-space-2) var(--hd-space-3);overflow:visible;clip-path:none;white-space:nowrap;border-radius:var(--hd-radius-sm);background-color:var(--hd-bg-raised);box-shadow:var(--hd-shadow-2);color:var(--hd-primary-text);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);text-decoration:none;outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-shell__sidebar-59ryl{min-width:0;border-inline-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 1024px){.ui-shell__sidebar-59ryl{display:none}}.ui-shell__sidebar-inner-iIXhF{position:sticky;inset-block-start:0;display:flex;flex-direction:column;height:100dvh}.ui-shell__brand-Mph-k{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;min-height:52px;padding-inline:var(--hd-space-4);overflow:hidden;border-block-end:1px solid var(--hd-border);font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__brand-Mph-k :where(a),.ui-shell__brand-Mph-k :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__brand-Mph-k :where(svg){flex-shrink:0}.ui-shell__navigation-quAVK{position:relative;flex:1;min-height:0;overflow-y:auto;padding:var(--hd-space-3) var(--hd-space-2);scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar{width:8px;height:8px}.ui-shell__navigation-quAVK::-webkit-scrollbar-track{background:transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-shell__footer-gGr9S{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;justify-content:flex-end;padding:var(--hd-space-2);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__footer-gGr9S{flex-direction:column;justify-content:center}.ui-shell--collapsed-mBfej .ui-shell__brand-Mph-k{justify-content:center;padding-inline:var(--hd-space-2)}[dir=rtl] .ui-shell__toggle--vukn{transform:scaleX(-1)}.ui-shell__toggle--vukn{transition:rotate var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell__toggle--vukn{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__toggle--vukn{rotate:180deg}.ui-shell__frame-4Cwe2{display:flex;flex-direction:column;min-width:0}.ui-shell__topbar-HH2s0{display:flex;align-items:center;gap:var(--hd-space-3);position:sticky;inset-block-start:0;z-index:var(--hd-z-sticky);min-height:52px;padding-inline:var(--hd-space-4);border-block-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 640px){.ui-shell__topbar-HH2s0{gap:var(--hd-space-2);padding-inline:var(--hd-space-3)}}.ui-shell__menu-button-8CeT4{display:none}@media (max-width: 1024px){.ui-shell__menu-button-8CeT4{display:inline-flex}}.ui-shell__title--Z5jA{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;min-width:0}.ui-shell__search-4Tij9{flex:1 1 auto;min-width:0;max-width:480px}.ui-shell__actions-RU34x{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;margin-inline-start:auto}.ui-shell__content-nbbhQ{flex:1;min-width:0;padding:var(--hd-space-6)}.ui-shell__content-nbbhQ:focus{outline:none}@media (max-width: 1024px){.ui-shell__content-nbbhQ{padding:var(--hd-space-4)}}.ui-shell__drawer-brand-3MgNr{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__drawer-brand-3MgNr :where(a),.ui-shell__drawer-brand-3MgNr :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__drawer-brand-3MgNr :where(svg){flex-shrink:0}.ui-shell__drawer-brand-3MgNr{margin-block-end:var(--hd-space-3)}.ui-nav-3I7Ws{display:flex;flex-direction:column;gap:var(--hd-space-4)}.ui-nav__section-label-0CMnM{font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:.045em;text-transform:uppercase;color:var(--hd-text-2);margin:0;padding:0 var(--hd-space-3) var(--hd-space-1);color:var(--hd-text-3)}.ui-nav__list-Wotlu,.ui-nav__sublist-8ut6O{display:flex;flex-direction:column;gap:var(--hd-space-0);margin:0;padding:0;list-style:none}.ui-nav__sublist-8ut6O{margin-inline-start:calc(var(--hd-space-3) + 18px / 2);padding-inline-start:var(--hd-space-2);border-inline-start:1px solid var(--hd-border)}.ui-nav__sublist-8ut6O[hidden]{display:none}.ui-nav__item-RvDle{display:flex;align-items:center;gap:var(--hd-space-2);background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__item-RvDle:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-nav__item-RvDle{transition:none}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-nav__item-RvDle:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-nav__item-RvDle{position:relative;width:100%;min-height:36px;padding:0 var(--hd-space-3);border:0;border-radius:var(--hd-radius-sm);color:var(--hd-text-2);font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium);line-height:var(--hd-type-h4-line-height);text-align:start;text-decoration:none;cursor:pointer}.ui-nav__item-RvDle:hover{color:var(--hd-text)}@media (hover: none) and (pointer: coarse){.ui-nav__item-RvDle{min-height:44px}}.ui-nav__item--active-Lg028{background-color:var(--hd-primary-soft);color:var(--hd-primary-text);font-weight:var(--hd-font-weight-semibold)}.ui-nav__item--active-Lg028:hover:not(:disabled){background-color:var(--hd-primary-soft-hover);color:var(--hd-primary-text)}.ui-nav__item--disabled-CcOTO{color:var(--hd-text-3)}@media (forced-colors: active){.ui-nav__item--disabled-CcOTO{color:GrayText}}.ui-nav__item--disabled-CcOTO{cursor:default}.ui-nav__item--disabled-CcOTO:hover{background-color:transparent;color:var(--hd-text-3)}.ui-nav__icon-NVN6X{display:inline-flex;flex-shrink:0;font-size:18px}.ui-nav__label-nlEMg{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.ui-nav__badge-aR8RE{flex-shrink:0;min-width:18px;height:18px;padding-inline:var(--hd-space-1);border-radius:var(--hd-radius-pill);background-color:var(--hd-primary);color:var(--hd-on-primary);font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);line-height:18px;text-align:center;font-variant-numeric:tabular-nums;box-sizing:border-box}@media (forced-colors: active){.ui-nav__badge-aR8RE{border:1px solid CanvasText}}.ui-nav__chevron-ZrqW9{flex-shrink:0;font-size:14px;transition:rotate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__chevron--open-56sZo{rotate:180deg}@media (prefers-reduced-motion: reduce){.ui-nav__chevron-ZrqW9{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-label-0CMnM,.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__label-nlEMg{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-hkG3J+.ui-nav__section-hkG3J{padding-block-start:var(--hd-space-3);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__item-RvDle{justify-content:center;padding:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__chevron-ZrqW9{display:none}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__badge-aR8RE{position:absolute;inset-block-start:2px;inset-inline-end:2px;min-width:14px;height:14px;padding-inline:3px;font-size:10px;line-height:14px}@media print{.ui-shell-DdJz9,.ui-shell--collapsed-mBfej{display:block;min-height:0;background:none}.ui-shell__skip-hqzkw,.ui-shell__sidebar-59ryl,.ui-shell__topbar-HH2s0{display:none}.ui-shell__content-nbbhQ{padding:0}}}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),r=require("react"),_=require("react-bootstrap-icons"),q=require("../../enums/ui-size.enum.cjs"),F=require("../../enums/ui-variant.enum.cjs"),x=require("../../helpers/class-name.helper.cjs"),A=require("../../helpers/component.helper.cjs"),n=require("../../helpers/label.helper.cjs"),N=require("../../hooks/useRemovalFocus.cjs"),R=require("../../theme/context.cjs"),g=require("../Button/index.cjs"),I=require("../Chip/index.cjs"),i={default:{"applied":"ui-applied-PjuWH","applied__lead":"ui-applied__lead-A6FkV","applied__list":"ui-applied__list-4APk5","applied__chip":"ui-applied__chip-DmkZy","applied__group":"ui-applied__group-xPW72","applied__value":"ui-applied__value-1MDBf","applied__extra":"ui-applied__extra-gCUen","applied__clear":"ui-applied__clear-xaCI4"}},L=({filters:c,onClearAll:u,extraCount:d=0,labels:e,className:v,testId:h})=>{const{labels:t}=R.useUi(),l=t==null?void 0:t.appliedFilters,o=r.useId(),m=r.useRef(null),p=r.useRef(null),f=N.useRemovalFocus(m,"button",p);return c.length===0&&d===0?null:s.jsxs("div",{role:"group","aria-labelledby":o,className:x.cx(i.default.applied,v),"data-testid":h,children:[s.jsx("span",{id:o,ref:p,tabIndex:-1,className:i.default.applied__lead,children:n.resolveLabel("AppliedFilters.labels.title",e==null?void 0:e.title,l==null?void 0:l.title)}),s.jsxs("ul",{ref:m,className:i.default.applied__list,children:[c.map((a,j)=>s.jsx("li",{children:s.jsxs(I.default,{size:"sm",className:i.default.applied__chip,endIcon:s.jsx(_.XLg,{}),"aria-pressed":void 0,"aria-label":n.resolveFormatter("AppliedFilters.labels.remove",(e==null?void 0:e.remove)??(l==null?void 0:l.remove),a.group??"",a.label),onClick:()=>{f(j),a.onRemove()},children:[a.group&&s.jsxs("span",{className:i.default.applied__group,children:[a.group,":"]}),s.jsx("span",{className:i.default.applied__value,children:a.label})]})},a.key)),d>0&&s.jsx("li",{className:i.default.applied__extra,children:n.resolveFormatter("AppliedFilters.labels.more",(e==null?void 0:e.more)??(l==null?void 0:l.more),d)})]}),u&&s.jsx(g.default,{variant:F.default.GHOST,size:q.default.SMALL,startIcon:s.jsx(_.XCircleFill,{"aria-hidden":!0}),className:i.default.applied__clear,onClick:u,children:n.resolveLabel("AppliedFilters.labels.clearAll",e==null?void 0:e.clearAll,l==null?void 0:l.clearAll)})]})},S=r.memo(A.named(L,"AppliedFilters"));exports.default=S;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/AppliedFilters/index.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useId, useRef } from 'react';\n\nimport { XCircleFill, XLg } from 'react-bootstrap-icons';\n\nimport UISize from '../../enums/ui-size.enum';\nimport UIVariant from '../../enums/ui-variant.enum';\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport { useRemovalFocus } from '../../hooks/useRemovalFocus';\nimport { useUi } from '../../theme/context';\nimport type { Formatter } from '../../types/theme.type';\nimport Button from '../Button';\nimport Chip from '../Chip';\n\nimport styles from './index.module.scss';\n\n/** One applied filter: \"Marka: Bosch\". */\nexport type AppliedFilter = {\n /** Unique among the chips (`brand:12`). */\n key: string;\n /** The facet's name (\"Marka\"); a chip without one shows only its value. */\n group?: string;\n /** The value (\"Bosch\", \"₺100 – ₺500\"). */\n label: string;\n onRemove: () => void;\n};\n\nexport type AppliedFiltersLabels = {\n title: string;\n remove: Formatter<[group: string, value: string]>;\n clearAll: string;\n more: Formatter<[count: number]>;\n};\n\ntype Props = {\n filters: AppliedFilter[];\n onClearAll?: () => void;\n /** Applied filters the page cannot name as a chip (a flag from an old link): \"+2 filtre daha\". */\n extraCount?: number;\n labels?: Partial<AppliedFiltersLabels>;\n className?: string;\n testId?: string;\n};\n\n/**\n * The strip of applied filters above a result list (3.4): one removable chip per value with its\n * group's name, and \"clear all\". Draws nothing when no filter is applied.\n */\nconst AppliedFilters = ({\n filters,\n onClearAll,\n extraCount = 0,\n labels: labelProps,\n className,\n testId,\n}: Props) => {\n const { labels: config } = useUi();\n const text = config?.appliedFilters;\n const leadId = useId();\n const listRef = useRef<HTMLUListElement>(null);\n const leadRef = useRef<HTMLSpanElement>(null);\n const markRemoved = useRemovalFocus(listRef, 'button', leadRef);\n\n if (filters.length === 0 && extraCount === 0) return null;\n\n return (\n <div\n role=\"group\"\n aria-labelledby={leadId}\n className={cx(styles.applied, className)}\n data-testid={testId}\n >\n <span id={leadId} ref={leadRef} tabIndex={-1} className={styles.applied__lead}>\n {resolveLabel('AppliedFilters.labels.title', labelProps?.title, text?.title)}\n </span>\n\n <ul ref={listRef} className={styles.applied__list}>\n {filters.map((filter, index) => (\n <li key={filter.key}>\n <Chip\n size=\"sm\"\n className={styles.applied__chip}\n endIcon={<XLg />}\n aria-pressed={undefined}\n aria-label={resolveFormatter(\n 'AppliedFilters.labels.remove',\n labelProps?.remove ?? text?.remove,\n filter.group ?? '',\n filter.label,\n )}\n onClick={() => {\n markRemoved(index);\n filter.onRemove();\n }}\n >\n {filter.group && <span className={styles.applied__group}>{filter.group}:</span>}\n <span className={styles.applied__value}>{filter.label}</span>\n </Chip>\n </li>\n ))}\n\n {extraCount > 0 && (\n <li className={styles.applied__extra}>\n {resolveFormatter(\n 'AppliedFilters.labels.more',\n labelProps?.more ?? text?.more,\n extraCount,\n )}\n </li>\n )}\n </ul>\n\n {onClearAll && (\n <Button\n variant={UIVariant.GHOST}\n size={UISize.SMALL}\n startIcon={<XCircleFill aria-hidden />}\n className={styles.applied__clear}\n onClick={onClearAll}\n >\n {resolveLabel('AppliedFilters.labels.clearAll', labelProps?.clearAll, text?.clearAll)}\n </Button>\n )}\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppliedFilters, 'AppliedFilters'),\n) as typeof AppliedFilters;\n"],"names":["AppliedFilters","filters","onClearAll","extraCount","labelProps","className","testId","config","useUi","text","leadId","useId","listRef","useRef","leadRef","markRemoved","useRemovalFocus","jsxs","cx","styles","jsx","filter","index","Chip","XLg","resolveFormatter","Button","UIVariant","UISize","XCircleFill","resolveLabel","memo","named"],"mappings":"+mBAkDMA,EAAiB,CAAC,CACtB,QAAAC,EACA,WAAAC,EACA,WAAAC,EAAa,EACb,OAAQC,EACR,UAAAC,EACA,OAAAC,CACF,IAAa,CACX,KAAM,CAAE,OAAQC,CAAA,EAAWC,QAAA,EACrBC,EAAOF,GAAA,YAAAA,EAAQ,eACfG,EAASC,EAAAA,MAAA,EACTC,EAAUC,EAAAA,OAAyB,IAAI,EACvCC,EAAUD,EAAAA,OAAwB,IAAI,EACtCE,EAAcC,EAAAA,gBAAgBJ,EAAS,SAAUE,CAAO,EAE9D,OAAIb,EAAQ,SAAW,GAAKE,IAAe,EAAU,KAGnDc,EAAAA,KAAC,MAAA,CACC,KAAK,QACL,kBAAiBP,EACjB,UAAWQ,EAAAA,GAAGC,UAAO,QAASd,CAAS,EACvC,cAAaC,EA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AA,YAAAA,EAAY,SAAUK,GAAA,YAAAA,EAAM,QAAQ,CAAA,CAAA,CACtF,CAAA,CAAA,CAIR,EAEAa,EAA6BS,EAAAA,KACbC,EAAAA,MAAMhC,EAAgB,gBAAgB,CACtD"}
@@ -0,0 +1,33 @@
1
+ import { Formatter } from '../../types/theme.type.cjs';
2
+ /** One applied filter: "Marka: Bosch". */
3
+ export type AppliedFilter = {
4
+ /** Unique among the chips (`brand:12`). */
5
+ key: string;
6
+ /** The facet's name ("Marka"); a chip without one shows only its value. */
7
+ group?: string;
8
+ /** The value ("Bosch", "₺100 – ₺500"). */
9
+ label: string;
10
+ onRemove: () => void;
11
+ };
12
+ export type AppliedFiltersLabels = {
13
+ title: string;
14
+ remove: Formatter<[group: string, value: string]>;
15
+ clearAll: string;
16
+ more: Formatter<[count: number]>;
17
+ };
18
+ type Props = {
19
+ filters: AppliedFilter[];
20
+ onClearAll?: () => void;
21
+ /** Applied filters the page cannot name as a chip (a flag from an old link): "+2 filtre daha". */
22
+ extraCount?: number;
23
+ labels?: Partial<AppliedFiltersLabels>;
24
+ className?: string;
25
+ testId?: string;
26
+ };
27
+ /**
28
+ * The strip of applied filters above a result list (3.4): one removable chip per value with its
29
+ * group's name, and "clear all". Draws nothing when no filter is applied.
30
+ */
31
+ declare const AppliedFilters: ({ filters, onClearAll, extraCount, labels: labelProps, className, testId, }: Props) => import("react").JSX.Element | null;
32
+ declare const _default: typeof AppliedFilters;
33
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { Formatter } from '../../types/theme.type.js';
2
+ /** One applied filter: "Marka: Bosch". */
3
+ export type AppliedFilter = {
4
+ /** Unique among the chips (`brand:12`). */
5
+ key: string;
6
+ /** The facet's name ("Marka"); a chip without one shows only its value. */
7
+ group?: string;
8
+ /** The value ("Bosch", "₺100 – ₺500"). */
9
+ label: string;
10
+ onRemove: () => void;
11
+ };
12
+ export type AppliedFiltersLabels = {
13
+ title: string;
14
+ remove: Formatter<[group: string, value: string]>;
15
+ clearAll: string;
16
+ more: Formatter<[count: number]>;
17
+ };
18
+ type Props = {
19
+ filters: AppliedFilter[];
20
+ onClearAll?: () => void;
21
+ /** Applied filters the page cannot name as a chip (a flag from an old link): "+2 filtre daha". */
22
+ extraCount?: number;
23
+ labels?: Partial<AppliedFiltersLabels>;
24
+ className?: string;
25
+ testId?: string;
26
+ };
27
+ /**
28
+ * The strip of applied filters above a result list (3.4): one removable chip per value with its
29
+ * group's name, and "clear all". Draws nothing when no filter is applied.
30
+ */
31
+ declare const AppliedFilters: ({ filters, onClearAll, extraCount, labels: labelProps, className, testId, }: Props) => import("react").JSX.Element | null;
32
+ declare const _default: typeof AppliedFilters;
33
+ export default _default;