@adgytec/adgytec-web-ui-components 2.0.0 → 2.1.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 (230) hide show
  1. package/dist/assets/AppBar.css +1 -0
  2. package/dist/assets/AppBarAvatar.css +1 -0
  3. package/dist/assets/AppBarHeadline.css +1 -0
  4. package/dist/assets/Navigation.css +1 -0
  5. package/dist/assets/NavigationScrollContainer.css +1 -0
  6. package/dist/assets/NavigationSection.css +1 -0
  7. package/dist/assets/NavigationSectionLabel.css +1 -0
  8. package/dist/assets/SideSheet.css +1 -1
  9. package/dist/assets/Tag.css +1 -1
  10. package/dist/assets/core10.css +1 -0
  11. package/dist/assets/core2.css +1 -1
  12. package/dist/assets/core3.css +1 -1
  13. package/dist/assets/core9.css +1 -0
  14. package/dist/chunks/ActionDialog +10 -10
  15. package/dist/chunks/AppBar +65 -0
  16. package/dist/chunks/AppBar.map +1 -0
  17. package/dist/chunks/AppBarAvatar +35 -0
  18. package/dist/chunks/AppBarAvatar.map +1 -0
  19. package/dist/chunks/AppBarHeadline +19 -0
  20. package/dist/chunks/AppBarHeadline.map +1 -0
  21. package/dist/chunks/BaseCalendar +35 -35
  22. package/dist/chunks/BottomSheet +17 -13
  23. package/dist/chunks/BottomSheet.map +1 -1
  24. package/dist/chunks/BottomSheetModal +5 -5
  25. package/dist/chunks/ButtonGroup +4 -4
  26. package/dist/chunks/CalendarCell +14 -14
  27. package/dist/chunks/CalendarGrid +7 -7
  28. package/dist/chunks/CalendarMenuItem +3 -3
  29. package/dist/chunks/CenteredSlider +16 -16
  30. package/dist/chunks/ComboBox +12 -12
  31. package/dist/chunks/ComboBoxTrigger +6 -6
  32. package/dist/chunks/ConnectedButtonGroup +4 -4
  33. package/dist/chunks/Dialog +10 -6
  34. package/dist/chunks/Dialog.map +1 -1
  35. package/dist/chunks/Disclosure +3 -3
  36. package/dist/chunks/DisclosureGroup +4 -4
  37. package/dist/chunks/DisclosureHeader +15 -15
  38. package/dist/chunks/DisclosurePanel +4 -4
  39. package/dist/chunks/Divider +3 -3
  40. package/dist/chunks/FieldError +3 -3
  41. package/dist/chunks/Input +12 -12
  42. package/dist/chunks/Input2 +28 -28
  43. package/dist/chunks/Modal +3 -3
  44. package/dist/chunks/ModalOverlay +3 -3
  45. package/dist/chunks/Navigation +68 -0
  46. package/dist/chunks/Navigation.map +1 -0
  47. package/dist/chunks/NavigationScrollContainer +32 -0
  48. package/dist/chunks/NavigationScrollContainer.map +1 -0
  49. package/dist/chunks/NavigationSection +10 -0
  50. package/dist/chunks/NavigationSection.map +1 -0
  51. package/dist/chunks/NavigationSectionLabel +12 -0
  52. package/dist/chunks/NavigationSectionLabel.map +1 -0
  53. package/dist/chunks/NavigationState +69 -0
  54. package/dist/chunks/NavigationState.map +1 -0
  55. package/dist/chunks/Popover +3 -3
  56. package/dist/chunks/Radio +13 -13
  57. package/dist/chunks/SearchField +10 -10
  58. package/dist/chunks/SelectTrigger +12 -12
  59. package/dist/chunks/SideSheet +50 -37
  60. package/dist/chunks/SideSheet.map +1 -1
  61. package/dist/chunks/SideSheetModal +6 -6
  62. package/dist/chunks/Slider +13 -13
  63. package/dist/chunks/SliderOutput +7 -7
  64. package/dist/chunks/SliderStops +9 -9
  65. package/dist/chunks/SliderThumb +5 -5
  66. package/dist/chunks/Snackbar +23 -23
  67. package/dist/chunks/SplitButton +20 -21
  68. package/dist/chunks/SplitButton.map +1 -1
  69. package/dist/chunks/SplitButtonTrigger +28 -28
  70. package/dist/chunks/SplitButtonTrigger.map +1 -1
  71. package/dist/chunks/Switch +21 -21
  72. package/dist/chunks/Switch.map +1 -1
  73. package/dist/chunks/Tab +12 -12
  74. package/dist/chunks/TabList +3 -3
  75. package/dist/chunks/TabPanel +3 -3
  76. package/dist/chunks/TabPanels +3 -3
  77. package/dist/chunks/Tabs +3 -3
  78. package/dist/chunks/Tag +18 -18
  79. package/dist/chunks/Tag.map +1 -1
  80. package/dist/chunks/ThemeSelector +42 -42
  81. package/dist/chunks/Toolbar +6 -6
  82. package/dist/chunks/Tooltip +3 -3
  83. package/dist/chunks/core +39 -39
  84. package/dist/chunks/core.map +1 -1
  85. package/dist/chunks/core2 +8 -8
  86. package/dist/chunks/core2.map +1 -1
  87. package/dist/chunks/core3 +3 -3
  88. package/dist/chunks/core8 +18 -0
  89. package/dist/chunks/core8.map +1 -0
  90. package/dist/chunks/core9 +6 -0
  91. package/dist/chunks/core9.map +1 -0
  92. package/dist/chunks/navContext +12 -0
  93. package/dist/chunks/navContext.map +1 -0
  94. package/dist/chunks/useSplash +7 -7
  95. package/dist/components/AppBar/AppBar/index.js +2 -0
  96. package/dist/components/AppBar/AppBarAction/index.js +12 -0
  97. package/dist/components/AppBar/AppBarAction/index.js.map +1 -0
  98. package/dist/components/AppBar/AppBarAvatar/index.js +2 -0
  99. package/dist/components/AppBar/AppBarHeadline/index.js +2 -0
  100. package/dist/components/AppBar/AppBarState/index.js +17 -0
  101. package/dist/components/AppBar/AppBarState/index.js.map +1 -0
  102. package/dist/components/AppBar/core/index.js +24 -0
  103. package/dist/components/AppBar/core/index.js.map +1 -0
  104. package/dist/components/AppBar/index.js +7 -0
  105. package/dist/components/Button/Button/index.js +16 -16
  106. package/dist/components/Button/IconButton/index.js +12 -12
  107. package/dist/components/Button/LinkButton/index.js +16 -16
  108. package/dist/components/Button/LinkIconButton/index.js +12 -12
  109. package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js +32 -32
  110. package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js.map +1 -1
  111. package/dist/components/Button/ToggleButton/index.js +17 -17
  112. package/dist/components/Button/ToggleIconButton/index.js +15 -15
  113. package/dist/components/Calendar/Calendar/index.js +4 -4
  114. package/dist/components/Calendar/CalendarMonthMenu/index.js +10 -10
  115. package/dist/components/Calendar/CalendarYearMenu/index.js +7 -7
  116. package/dist/components/Calendar/RangeCalendar/index.js +4 -4
  117. package/dist/components/Dialog/core/index.js +9 -2
  118. package/dist/components/Dialog/core/index.js.map +1 -1
  119. package/dist/components/Dialog/index.js +6 -6
  120. package/dist/components/Input/DateField/index.js +9 -9
  121. package/dist/components/Input/DatePicker/DatePicker/index.js +15 -15
  122. package/dist/components/Input/DatePicker/DateRangePicker/index.js +19 -19
  123. package/dist/components/Input/Description/index.js +3 -3
  124. package/dist/components/Input/Label/index.js +3 -3
  125. package/dist/components/Input/Select/Select/index.js +8 -8
  126. package/dist/components/Input/Select/SelectItem/index.js +18 -18
  127. package/dist/components/Input/Select/SelectList/index.js +3 -3
  128. package/dist/components/Input/Select/SelectListSection/index.js +3 -3
  129. package/dist/components/Input/Select/SelectListSectionHeader/index.js +3 -3
  130. package/dist/components/Input/Slider/RangeSlider/index.js +13 -13
  131. package/dist/components/Input/TextArea/index.js +11 -11
  132. package/dist/components/Input/TimeField/index.js +9 -9
  133. package/dist/components/Menu/Menu/index.js +4 -4
  134. package/dist/components/Menu/MenuItem/index.js +19 -19
  135. package/dist/components/Menu/MenuSection/index.js +3 -3
  136. package/dist/components/Menu/MenuSectionHeader/index.js +3 -3
  137. package/dist/components/Menu/MenuTrigger/index.js +4 -4
  138. package/dist/components/Navigation/Navigation/index.js +3 -0
  139. package/dist/components/Navigation/NavigationItem/NavigationButton/index.js +27 -0
  140. package/dist/components/Navigation/NavigationItem/NavigationButton/index.js.map +1 -0
  141. package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.js +12 -0
  142. package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.js.map +1 -0
  143. package/dist/components/Navigation/NavigationItem/NavigationLink/index.js +25 -0
  144. package/dist/components/Navigation/NavigationItem/NavigationLink/index.js.map +1 -0
  145. package/dist/components/Navigation/NavigationItem/core/index.js +2 -0
  146. package/dist/components/Navigation/NavigationItem/index.js +3 -0
  147. package/dist/components/Navigation/NavigationScrollContainer/index.js +2 -0
  148. package/dist/components/Navigation/NavigationSection/NavigationSection/index.js +2 -0
  149. package/dist/components/Navigation/NavigationSection/NavigationSectionLabel/index.js +2 -0
  150. package/dist/components/Navigation/NavigationSection/index.js +3 -0
  151. package/dist/components/Navigation/NavigationState/index.js +2 -0
  152. package/dist/components/Navigation/SubNavigation/SubNavigation/index.js +63 -0
  153. package/dist/components/Navigation/SubNavigation/SubNavigation/index.js.map +1 -0
  154. package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js +34 -0
  155. package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js.map +1 -0
  156. package/dist/components/Navigation/SubNavigation/index.js +3 -0
  157. package/dist/components/Navigation/core/index.js +2 -0
  158. package/dist/components/Navigation/index.js +10 -0
  159. package/dist/components/Sheets/SideSheet/index.js +2 -2
  160. package/dist/components/Sheets/index.js +2 -2
  161. package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/index.js +3 -3
  162. package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/index.js +3 -3
  163. package/dist/components/Tooltip/TooltipTrigger/index.js +3 -3
  164. package/dist/index.js +122 -107
  165. package/dist/index.js.map +1 -1
  166. package/dist/src/components/AppBar/AppBar/AppBar.d.ts +2 -0
  167. package/dist/src/components/AppBar/AppBar/index.d.ts +2 -0
  168. package/dist/src/components/AppBar/AppBar/types.d.ts +9 -0
  169. package/dist/src/components/AppBar/AppBarAction/AppBarAction.d.ts +2 -0
  170. package/dist/src/components/AppBar/AppBarAction/index.d.ts +1 -0
  171. package/dist/src/components/AppBar/AppBarAvatar/AppBarAvatar.d.ts +2 -0
  172. package/dist/src/components/AppBar/AppBarAvatar/index.d.ts +1 -0
  173. package/dist/src/components/AppBar/AppBarHeadline/AppBarHeadline.d.ts +2 -0
  174. package/dist/src/components/AppBar/AppBarHeadline/index.d.ts +1 -0
  175. package/dist/src/components/AppBar/AppBarState/AppBarState.d.ts +5 -0
  176. package/dist/src/components/AppBar/AppBarState/context.d.ts +5 -0
  177. package/dist/src/components/AppBar/AppBarState/index.d.ts +2 -0
  178. package/dist/src/components/AppBar/core/alignment.d.ts +1 -0
  179. package/dist/src/components/AppBar/core/context.d.ts +10 -0
  180. package/dist/src/components/AppBar/core/index.d.ts +3 -0
  181. package/dist/src/components/AppBar/core/size.d.ts +3 -0
  182. package/dist/src/components/AppBar/index.d.ts +6 -0
  183. package/dist/src/components/Dialog/core/context.d.ts +2 -0
  184. package/dist/src/components/Dialog/core/index.d.ts +1 -0
  185. package/dist/src/components/Input/Switch/types.d.ts +3 -0
  186. package/dist/src/components/Navigation/Navigation/Navigation.d.ts +2 -0
  187. package/dist/src/components/Navigation/Navigation/index.d.ts +4 -0
  188. package/dist/src/components/Navigation/Navigation/navContext.d.ts +7 -0
  189. package/dist/src/components/Navigation/Navigation/navRenderingContext.d.ts +5 -0
  190. package/dist/src/components/Navigation/Navigation/types.d.ts +10 -0
  191. package/dist/src/components/Navigation/NavigationItem/NavigationButton/NavigationButton.d.ts +2 -0
  192. package/dist/src/components/Navigation/NavigationItem/NavigationButton/index.d.ts +2 -0
  193. package/dist/src/components/Navigation/NavigationItem/NavigationButton/types.d.ts +7 -0
  194. package/dist/src/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.d.ts +6 -0
  195. package/dist/src/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.d.ts +1 -0
  196. package/dist/src/components/Navigation/NavigationItem/NavigationLink/NavigationLink.d.ts +2 -0
  197. package/dist/src/components/Navigation/NavigationItem/NavigationLink/index.d.ts +2 -0
  198. package/dist/src/components/Navigation/NavigationItem/NavigationLink/types.d.ts +4 -0
  199. package/dist/src/components/Navigation/NavigationItem/core/index.d.ts +1 -0
  200. package/dist/src/components/Navigation/NavigationItem/core/navigationItem.d.ts +10 -0
  201. package/dist/src/components/Navigation/NavigationItem/index.d.ts +2 -0
  202. package/dist/src/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.d.ts +1 -0
  203. package/dist/src/components/Navigation/NavigationScrollContainer/index.d.ts +1 -0
  204. package/dist/src/components/Navigation/NavigationSection/NavigationSection/NavigationSection.d.ts +1 -0
  205. package/dist/src/components/Navigation/NavigationSection/NavigationSection/index.d.ts +1 -0
  206. package/dist/src/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.d.ts +2 -0
  207. package/dist/src/components/Navigation/NavigationSection/NavigationSectionLabel/index.d.ts +1 -0
  208. package/dist/src/components/Navigation/NavigationSection/index.d.ts +2 -0
  209. package/dist/src/components/Navigation/NavigationState/NavigationState.d.ts +4 -0
  210. package/dist/src/components/Navigation/NavigationState/context.d.ts +10 -0
  211. package/dist/src/components/Navigation/NavigationState/index.d.ts +2 -0
  212. package/dist/src/components/Navigation/NavigationState/types.d.ts +5 -0
  213. package/dist/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.d.ts +4 -0
  214. package/dist/src/components/Navigation/SubNavigation/SubNavigation/index.d.ts +1 -0
  215. package/dist/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.d.ts +6 -0
  216. package/dist/src/components/Navigation/SubNavigation/SubNavigationTrigger/index.d.ts +1 -0
  217. package/dist/src/components/Navigation/SubNavigation/index.d.ts +2 -0
  218. package/dist/src/components/Navigation/core/index.d.ts +3 -0
  219. package/dist/src/components/Navigation/core/navLabelContext.d.ts +3 -0
  220. package/dist/src/components/Navigation/core/navigation.d.ts +3 -0
  221. package/dist/src/components/Navigation/core/navigationInfo.d.ts +6 -0
  222. package/dist/src/components/Navigation/index.d.ts +5 -0
  223. package/dist/src/components/Sheets/SideSheet/SideSheetDialog.d.ts +2 -0
  224. package/dist/src/components/Sheets/SideSheet/index.d.ts +1 -0
  225. package/dist/src/components/Sheets/SideSheet/types.d.ts +2 -0
  226. package/dist/src/index.d.ts +2 -0
  227. package/dist/src/utils/index.d.ts +1 -0
  228. package/dist/src/utils/scroll/index.d.ts +1 -0
  229. package/dist/src/utils/scroll/scroll.d.ts +10 -0
  230. package/package.json +1 -2
@@ -1,5 +1,5 @@
1
- import { t as e } from "./Icon";
2
- import { t } from "./base";
1
+ import { t as e } from "./base";
2
+ import { t } from "./Icon";
3
3
  import { IconButton as n } from "../components/Button/IconButton/index.js";
4
4
  import { t as r } from "./usePress";
5
5
  import { Description as i } from "../components/Input/Description/index.js";
@@ -10,12 +10,12 @@ import { n as m, t as h } from "./useHover";
10
10
  import { CharacterCount as g } from "../components/Input/CharacterCount/index.js";
11
11
  import { useControllableState as _ } from "../components/Input/hooks/index.js";
12
12
  import v from "clsx";
13
- import { Input as y, TextField as b } from "react-aria-components";
14
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
15
- import { cloneElement as w, isValidElement as T, useCallback as E, useMemo as D, useRef as O } from "react";
13
+ import { cloneElement as y, isValidElement as b, useCallback as x, useMemo as S, useRef as C } from "react";
14
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
15
+ import { Input as D, TextField as O } from "react-aria-components";
16
16
  import '../assets/Input2.css';//#region node_modules/react-aria/dist/private/utils/useObjectRef.mjs
17
17
  function k(e) {
18
- let t = O(null), n = O(void 0), r = E((t) => {
18
+ let t = C(null), n = C(void 0), r = x((t) => {
19
19
  if (typeof e == "function") {
20
20
  let n = e, r = n(t);
21
21
  return () => {
@@ -25,7 +25,7 @@ function k(e) {
25
25
  e.current = null;
26
26
  };
27
27
  }, [e]);
28
- return D(() => ({
28
+ return S(() => ({
29
29
  get current() {
30
30
  return t.current;
31
31
  },
@@ -34,7 +34,7 @@ function k(e) {
34
34
  }
35
35
  }), [r]);
36
36
  }
37
- var A = { button: "_button_650ys_2" }, j = ({ icon: e, className: t, ...r }) => /* @__PURE__ */ S(n, {
37
+ var A = { button: "_button_650ys_2" }, j = ({ icon: e, className: t, ...r }) => /* @__PURE__ */ T(n, {
38
38
  className: (e) => v(A.button, typeof t == "function" ? t(e) : t),
39
39
  icon: e,
40
40
  color: "standard",
@@ -45,14 +45,14 @@ var A = { button: "_button_650ys_2" }, j = ({ icon: e, className: t, ...r }) =>
45
45
  //#endregion
46
46
  //#region src/components/Input/Input/handleInputButton.ts
47
47
  function M({ node: e, isInvalid: t, isDisabled: n }) {
48
- return !T(e) || e.type !== j ? e : w(e, {
48
+ return !b(e) || e.type !== j ? e : y(e, {
49
49
  "data-invalid": t || void 0,
50
50
  isDisabled: n
51
51
  });
52
52
  }
53
53
  //#endregion
54
54
  //#region src/components/Input/Input/Input.tsx
55
- var N = ({ label: n, description: w, errorMessage: T, showDescriptionOnInvalid: E = !1, placeholder: D, editorDir: O, prefix: A, suffix: j, leadingIcon: N, trailing: P, className: F, showCharacterCount: I, maxLength: L, value: R, defaultValue: z, ref: B, onChange: V, ...H }) => {
55
+ var N = ({ label: n, description: y, errorMessage: b, showDescriptionOnInvalid: x = !1, placeholder: S, editorDir: C, prefix: A, suffix: j, leadingIcon: N, trailing: P, className: F, showCharacterCount: I, maxLength: L, value: R, defaultValue: z, ref: B, onChange: V, ...H }) => {
56
56
  let U = k(B), { currentValue: W, setValue: G } = _({
57
57
  value: R,
58
58
  defaultValue: z,
@@ -63,7 +63,7 @@ var N = ({ label: n, description: w, errorMessage: T, showDescriptionOnInvalid:
63
63
  "data-trailing": P ? !0 : void 0,
64
64
  "data-leading": N ? !0 : void 0
65
65
  };
66
- return /* @__PURE__ */ S(b, {
66
+ return /* @__PURE__ */ T(O, {
67
67
  className: (e) => v(d, c, typeof F == "function" ? F(e) : F),
68
68
  maxLength: L,
69
69
  value: R,
@@ -79,33 +79,33 @@ var N = ({ label: n, description: w, errorMessage: T, showDescriptionOnInvalid:
79
79
  "data-focus-visible": q || void 0,
80
80
  "data-disabled": r || void 0,
81
81
  "data-invalid": c || void 0
82
- }, m = w && (!c || c && E);
83
- return /* @__PURE__ */ C(x, { children: [
84
- n && /* @__PURE__ */ S(o, { children: n }),
85
- /* @__PURE__ */ C("span", {
82
+ }, m = y && (!c || c && x);
83
+ return /* @__PURE__ */ E(w, { children: [
84
+ n && /* @__PURE__ */ T(o, { children: n }),
85
+ /* @__PURE__ */ E("span", {
86
86
  ...Z,
87
87
  ...X,
88
88
  ...d,
89
89
  className: v(p),
90
90
  "data-input": !0,
91
91
  children: [
92
- N && /* @__PURE__ */ S(e, {
92
+ N && /* @__PURE__ */ T(t, {
93
93
  icon: N,
94
94
  size: 24
95
95
  }),
96
- /* @__PURE__ */ C("span", {
97
- className: v(s, t.bodyLarge),
96
+ /* @__PURE__ */ E("span", {
97
+ className: v(s, e.bodyLarge),
98
98
  children: [
99
99
  A && typeof A == "function" ? A({
100
100
  isDisabled: r,
101
101
  isInvalid: c
102
102
  }) : A,
103
- /* @__PURE__ */ S(y, {
103
+ /* @__PURE__ */ T(D, {
104
104
  ref: U,
105
- className: v(l, f, t.bodyLarge),
105
+ className: v(l, f, e.bodyLarge),
106
106
  ...J,
107
- placeholder: D,
108
- dir: O,
107
+ placeholder: S,
108
+ dir: C,
109
109
  "data-input": !0
110
110
  }),
111
111
  j && typeof j == "function" ? j({
@@ -124,25 +124,25 @@ var N = ({ label: n, description: w, errorMessage: T, showDescriptionOnInvalid:
124
124
  })
125
125
  ]
126
126
  }),
127
- m && /* @__PURE__ */ C("span", {
127
+ m && /* @__PURE__ */ E("span", {
128
128
  ...Q,
129
129
  className: v(u),
130
- children: [/* @__PURE__ */ S(i, { children: w }), I && /* @__PURE__ */ S(g, {
130
+ children: [/* @__PURE__ */ T(i, { children: y }), I && /* @__PURE__ */ T(g, {
131
131
  count: W.length,
132
132
  maxLength: L
133
133
  })]
134
134
  }),
135
- !m && I && /* @__PURE__ */ C("span", {
135
+ !m && I && /* @__PURE__ */ E("span", {
136
136
  ...Q,
137
137
  className: v(u),
138
- children: [/* @__PURE__ */ S(a, { children: T }), /* @__PURE__ */ S(g, {
138
+ children: [/* @__PURE__ */ T(a, { children: b }), /* @__PURE__ */ T(g, {
139
139
  count: W.length,
140
140
  maxLength: L
141
141
  })]
142
142
  }),
143
- m || !I ? /* @__PURE__ */ S(a, {
143
+ m || !I ? /* @__PURE__ */ T(a, {
144
144
  className: v(u),
145
- children: T
145
+ children: b
146
146
  }) : null
147
147
  ] });
148
148
  }
package/dist/chunks/Modal CHANGED
@@ -1,7 +1,7 @@
1
1
  import e from "clsx";
2
- import { Modal as t } from "react-aria-components";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import '../assets/Modal.css';var r = { modal: "_modal_1sjxc_2" }, i = ({ className: i, ...a }) => /* @__PURE__ */ n(t, {
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Modal as n } from "react-aria-components";
4
+ import '../assets/Modal.css';var r = { modal: "_modal_1sjxc_2" }, i = ({ className: i, ...a }) => /* @__PURE__ */ t(n, {
5
5
  className: (t) => e(r.modal, typeof i == "function" ? i(t) : i),
6
6
  ...a
7
7
  });
@@ -1,7 +1,7 @@
1
1
  import e from "clsx";
2
- import { ModalOverlay as t } from "react-aria-components";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import '../assets/ModalOverlay.css';var r = { overlay: "_overlay_jlm1y_8" }, i = ({ className: i, ...a }) => /* @__PURE__ */ n(t, {
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { ModalOverlay as n } from "react-aria-components";
4
+ import '../assets/ModalOverlay.css';var r = { overlay: "_overlay_jlm1y_8" }, i = ({ className: i, ...a }) => /* @__PURE__ */ t(n, {
5
5
  className: (t) => e(r.overlay, typeof i == "function" ? i(t) : i),
6
6
  ...a
7
7
  });
@@ -0,0 +1,68 @@
1
+ import { n as e, r as t, t as n } from "./NavigationState";
2
+ import { t as r } from "./base";
3
+ import { IconButton as i } from "../components/Button/IconButton/index.js";
4
+ import { useInDialog as a } from "../components/Dialog/core/index.js";
5
+ import { a as o, i as s, n as c } from "./core8";
6
+ import { t as l } from "./NavigationScrollContainer";
7
+ import { t as u } from "./navContext";
8
+ import d from "clsx";
9
+ import { createContext as f, useContext as p, useState as m } from "react";
10
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
+ import { Header as _, Heading as v, Provider as y } from "react-aria-components";
12
+ import { X as b } from "lucide-react";
13
+ import '../assets/Navigation.css';var x = { container: "_container_npu2b_2" }, S = f(null);
14
+ function C() {
15
+ let e = p(S);
16
+ if (e === null) throw Error("Missing navigation rendering info. Ensure this component is rendered within Navigation component.");
17
+ return e;
18
+ }
19
+ //#endregion
20
+ //#region src/components/Navigation/Navigation/Navigation.tsx
21
+ var w = ({ label: e, children: n, className: f, isLinkActive: p, isButtonActive: C, stateID: w = "__root__", inert: T, style: E, containerClassName: D, ...O }) => {
22
+ let [k, A] = m(null), { isInert: j } = t(), M = a(), N = M || !!e || !1;
23
+ return /* @__PURE__ */ h(y, {
24
+ values: [
25
+ [S, { container: k }],
26
+ [u, {
27
+ isLinkActive: p,
28
+ isButtonActive: C
29
+ }],
30
+ [c, {
31
+ id: w,
32
+ depth: 0
33
+ }]
34
+ ],
35
+ children: /* @__PURE__ */ h("div", {
36
+ ref: A,
37
+ className: d(x.container, D),
38
+ children: /* @__PURE__ */ g("nav", {
39
+ className: d(o, f),
40
+ ...O,
41
+ "data-header": N || void 0,
42
+ style: {
43
+ ...E,
44
+ zIndex: 1
45
+ },
46
+ inert: T ?? j(0),
47
+ "data-modal": M || void 0,
48
+ children: [N && /* @__PURE__ */ g(_, {
49
+ className: d(s),
50
+ children: [e && /* @__PURE__ */ h(v, {
51
+ className: d(r.titleLarge),
52
+ "data-heading": !0,
53
+ children: e
54
+ }), M && /* @__PURE__ */ h(i, {
55
+ icon: b,
56
+ color: "standard",
57
+ slot: "close",
58
+ "data-close-button": !0
59
+ })]
60
+ }), /* @__PURE__ */ h(l, { children: n })]
61
+ })
62
+ })
63
+ });
64
+ }, T = (t) => p(e) === null ? /* @__PURE__ */ h(n, { children: /* @__PURE__ */ h(w, { ...t }) }) : /* @__PURE__ */ h(w, { ...t });
65
+ //#endregion
66
+ export { S as n, C as r, T as t };
67
+
68
+ //# sourceMappingURL=Navigation.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Navigation","names":[],"sources":["../../src/components/Navigation/Navigation/navigation.module.css","../../src/components/Navigation/Navigation/navRenderingContext.ts","../../src/components/Navigation/Navigation/Navigation.tsx"],"sourcesContent":["@layer adgytec.comps {\n .container {\n --_md-navigation-items-gap: var(--md-sys-layout-space-4);\n\n position: relative;\n border-radius: inherit;\n overflow: clip;\n }\n}\n","import { createContext, useContext } from \"react\";\n\nexport type NavigationRenderingContextType = {\n container: HTMLDivElement | null;\n};\n\nexport const NavigationRenderingContext =\n createContext<NavigationRenderingContextType | null>(null);\n\nexport function useNavigationContainer() {\n const container = useContext(NavigationRenderingContext);\n if (container === null) {\n throw new Error(\n \"Missing navigation rendering info. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return container;\n}\n","import clsx from \"clsx\";\nimport { X } from \"lucide-react\";\nimport { useContext, useState } from \"react\";\nimport { Header, Heading, Provider } from \"react-aria-components\";\nimport { IconButton } from \"@/components/Button\";\nimport { useInDialog } from \"@/components/Dialog\";\nimport { typography } from \"@/utils\";\nimport {\n NavigationHeaderStyles,\n NavigationInfoContext,\n NavigationStyles,\n} from \"../core\";\nimport { NavigationScrollContainer } from \"../NavigationScrollContainer\";\nimport {\n NavigationState,\n NavigationStateContext,\n useNavigationState,\n} from \"../NavigationState\";\nimport { NavigationContext } from \"./navContext\";\nimport styles from \"./navigation.module.css\";\nimport { NavigationRenderingContext } from \"./navRenderingContext\";\nimport type { NavigationProps } from \"./types\";\n\nconst Nav: React.FC<NavigationProps> = ({\n label,\n children,\n className,\n isLinkActive,\n isButtonActive,\n stateID = \"__root__\",\n inert,\n style,\n containerClassName,\n ...props\n}) => {\n const depth = 0;\n\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { isInert } = useNavigationState();\n\n const isInModal = useInDialog();\n const renderHeader = isInModal || !!label || false;\n\n return (\n <Provider\n values={[\n [NavigationRenderingContext, { container }],\n [NavigationContext, { isLinkActive, isButtonActive }],\n [NavigationInfoContext, { id: stateID, depth }],\n ]}\n >\n <div\n ref={setContainer}\n className={clsx(styles[\"container\"], containerClassName)}\n >\n <nav\n className={clsx(NavigationStyles, className)}\n {...props}\n data-header={renderHeader || undefined}\n style={{\n ...style,\n zIndex: depth + 1,\n }}\n inert={inert ?? isInert(depth)}\n data-modal={isInModal || undefined}\n >\n {renderHeader && (\n <Header className={clsx(NavigationHeaderStyles)}>\n {label && (\n <Heading\n className={clsx(typography.titleLarge)}\n data-heading\n >\n {label}\n </Heading>\n )}\n\n {isInModal && (\n <IconButton\n icon={X}\n color=\"standard\"\n slot=\"close\"\n data-close-button\n />\n )}\n </Header>\n )}\n\n <NavigationScrollContainer>\n {children}\n </NavigationScrollContainer>\n </nav>\n </div>\n </Provider>\n );\n};\n\nexport const Navigation: React.FC<NavigationProps> = (props) => {\n const navStateCtx = useContext(NavigationStateContext);\n\n if (navStateCtx === null) {\n return (\n <NavigationState>\n <Nav {...props} />\n </NavigationState>\n );\n }\n\n return <Nav {...props} />;\n};\n"],"mappings":";;;;;;;;;;;;6CCMa,IACT,EAAqD,IAAI;AAE7D,SAAgB,IAAyB;CACrC,IAAM,IAAY,EAAW,CAA0B;CACvD,IAAI,MAAc,MACd,MAAU,MACN,mGACJ;CAGJ,OAAO;AACX;;;ACKA,IAAM,KAAkC,EACpC,UACA,aACA,cACA,iBACA,mBACA,aAAU,YACV,UACA,UACA,uBACA,GAAG,QACD;CACF,IAEM,CAAC,GAAW,KAAgB,EAAgC,IAAI,GAChE,EAAE,eAAY,EAAmB,GAEjC,IAAY,EAAY,GACxB,IAAe,KAAa,CAAC,CAAC,KAAS;CAE7C,OACI,kBAAC,GAAD;EACI,QAAQ;GACJ,CAAC,GAA4B,EAAE,aAAU,CAAC;GAC1C,CAAC,GAAmB;IAAE;IAAc;GAAe,CAAC;GACpD,CAAC,GAAuB;IAAE,IAAI;IAAS;GAAM,CAAC;EAClD;YAEA,kBAAC,OAAD;GACI,KAAK;GACL,WAAW,EAAK,EAAO,WAAc,CAAkB;aAEvD,kBAAC,OAAD;IACI,WAAW,EAAK,GAAkB,CAAS;IAC3C,GAAI;IACJ,eAAa,KAAgB,KAAA;IAC7B,OAAO;KACH,GAAG;KACH,QAAQ;IACZ;IACA,OAAO,KAAS,EAAQ,CAAK;IAC7B,cAAY,KAAa,KAAA;cAT7B,CAWK,KACG,kBAAC,GAAD;KAAQ,WAAW,EAAK,CAAsB;eAA9C,CACK,KACG,kBAAC,GAAD;MACI,WAAW,EAAK,EAAW,UAAU;MACrC,gBAAA;gBAEC;KACI,CAAA,GAGZ,KACG,kBAAC,GAAD;MACI,MAAM;MACN,OAAM;MACN,MAAK;MACL,qBAAA;KACH,CAAA,CAED;QAGZ,kBAAC,GAAD,EACK,YACsB,CAAA,CAC1B;;EACJ,CAAA;CACC,CAAA;AAElB,GAEa,KAAyC,MAC9B,EAAW,CAE3B,MAAgB,OAEZ,kBAAC,GAAD,EAAA,UACI,kBAAC,GAAD,EAAK,GAAI,EAAQ,CAAA,EACJ,CAAA,IAIlB,kBAAC,GAAD,EAAK,GAAI,EAAQ,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { i as e, r as t } from "./NavigationState";
2
+ import { r as n } from "./core8";
3
+ import r from "clsx";
4
+ import { useLayoutEffect as i } from "react";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ import { useObjectRef as o } from "react-aria";
7
+ import '../assets/NavigationScrollContainer.css';var s = { container: "_container_iv0fl_2" }, c = ({ ref: c, className: l, ...u }) => {
8
+ let d = o(c), { registerNavigationContainer: f, saveNavigationScrollTopProgress: p } = t(), { id: m } = n();
9
+ return i(() => {
10
+ let e = d.current;
11
+ if (e) return f(m, e);
12
+ }, [
13
+ d,
14
+ m,
15
+ f
16
+ ]), /* @__PURE__ */ a("div", {
17
+ ref: d,
18
+ onScroll: (t) => {
19
+ p(m, e({
20
+ scrollHeight: t.currentTarget.scrollHeight,
21
+ clientHeight: t.currentTarget.clientHeight,
22
+ scrollTop: t.currentTarget.scrollTop
23
+ }));
24
+ },
25
+ className: r(s.container, l),
26
+ ...u
27
+ });
28
+ };
29
+ //#endregion
30
+ export { c as t };
31
+
32
+ //# sourceMappingURL=NavigationScrollContainer.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationScrollContainer","names":[],"sources":["../../src/components/Navigation/NavigationScrollContainer/navigationScrollContainer.module.css","../../src/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.tsx"],"sourcesContent":["@layer adgytec.comps {\n .container {\n padding-inline: var(--md-sys-layout-space-16);\n overflow-y: auto;\n\n display: grid;\n gap: var(--_md-navigation-items-gap);\n align-content: start;\n }\n}\n","import clsx from \"clsx\";\nimport { useLayoutEffect } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { getScrollProgress } from \"@/utils\";\nimport { useNavigationInfo } from \"../core\";\nimport { useNavigationState } from \"../NavigationState\";\nimport styles from \"./navigationScrollContainer.module.css\";\n\nexport const NavigationScrollContainer: React.FC<\n React.ComponentPropsWithRef<\"div\">\n> = ({ ref, className, ...props }) => {\n const scrollContainerRef = useObjectRef(ref);\n\n const { registerNavigationContainer, saveNavigationScrollTopProgress } =\n useNavigationState();\n const { id } = useNavigationInfo();\n\n useLayoutEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n return registerNavigationContainer(id, container);\n }, [scrollContainerRef, id, registerNavigationContainer]);\n\n return (\n <div\n ref={scrollContainerRef}\n onScroll={(e) => {\n saveNavigationScrollTopProgress(\n id,\n getScrollProgress({\n scrollHeight: e.currentTarget.scrollHeight,\n clientHeight: e.currentTarget.clientHeight,\n scrollTop: e.currentTarget.scrollTop,\n })\n );\n }}\n className={clsx(styles[\"container\"], className)}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;6CCQa,KAER,EAAE,QAAK,cAAW,GAAG,QAAY;CAClC,IAAM,IAAqB,EAAa,CAAG,GAErC,EAAE,gCAA6B,uCACjC,EAAmB,GACjB,EAAE,UAAO,EAAkB;CAWjC,OATA,QAAsB;EAClB,IAAM,IAAY,EAAmB;EAChC,OAIL,OAAO,EAA4B,GAAI,CAAS;CACpD,GAAG;EAAC;EAAoB;EAAI;CAA2B,CAAC,GAGpD,kBAAC,OAAD;EACI,KAAK;EACL,WAAW,MAAM;GACb,EACI,GACA,EAAkB;IACd,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,WAAW,EAAE,cAAc;GAC/B,CAAC,CACL;EACJ;EACA,WAAW,EAAK,EAAO,WAAc,CAAS;EAC9C,GAAI;CACP,CAAA;AAET"}
@@ -0,0 +1,10 @@
1
+ import e from "clsx";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import '../assets/NavigationSection.css';var n = { section: "_section_1u3u0_2" }, r = ({ className: r, ...i }) => /* @__PURE__ */ t("section", {
4
+ className: e(n.section, r),
5
+ ...i
6
+ });
7
+ //#endregion
8
+ export { r as t };
9
+
10
+ //# sourceMappingURL=NavigationSection.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationSection","names":[],"sources":["../../src/components/Navigation/NavigationSection/NavigationSection/navigationSection.module.css","../../src/components/Navigation/NavigationSection/NavigationSection/NavigationSection.tsx"],"sourcesContent":["@layer adgytec.comps {\n .section {\n display: grid;\n gap: var(--_md-navigation-items-gap);\n\n margin-block-end: var(--md-sys-layout-space-16);\n }\n}\n","import clsx from \"clsx\";\nimport styles from \"./navigationSection.module.css\";\n\nexport const NavigationSection: React.FC<\n React.ComponentPropsWithRef<\"section\">\n> = ({ className, ...props }) => {\n return (\n <section className={clsx(styles[\"section\"], className)} {...props} />\n );\n};\n"],"mappings":";;yCCGa,KAER,EAAE,cAAW,GAAG,QAEb,kBAAC,WAAD;CAAS,WAAW,EAAK,EAAO,SAAY,CAAS;CAAG,GAAI;AAAQ,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { t as e } from "./base";
2
+ import t from "clsx";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { Heading as r } from "react-aria-components";
5
+ import '../assets/NavigationSectionLabel.css';var i = { label: "_label_6sxxv_2" }, a = ({ className: a, ...o }) => /* @__PURE__ */ n(r, {
6
+ className: t(i.label, e.titleSmall, a),
7
+ ...o
8
+ });
9
+ //#endregion
10
+ export { a as t };
11
+
12
+ //# sourceMappingURL=NavigationSectionLabel.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationSectionLabel","names":[],"sources":["../../src/components/Navigation/NavigationSection/NavigationSectionLabel/navigationSectionLabel.module.css","../../src/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.tsx"],"sourcesContent":["@layer adgytec.comps {\n .label {\n --_md-navigation-section-label-color: var(\n --md-navigation-section-label-color,\n var(--md-sys-color-on-surface-variant)\n );\n\n padding-inline: var(--md-sys-layout-space-16);\n padding-block-end: var(--md-sys-layout-space-4);\n\n color: var(--_md-navigation-section-label-color);\n }\n}\n","import clsx from \"clsx\";\nimport { Heading } from \"react-aria-components\";\nimport { typography } from \"@/utils\";\nimport styles from \"./navigationSectionLabel.module.css\";\n\nexport const NavigationSectionLabel: React.FC<\n React.ComponentPropsWithRef<typeof Heading>\n> = ({ className, ...props }) => {\n return (\n <Heading\n className={clsx(styles[\"label\"], typography.titleSmall, className)}\n {...props}\n />\n );\n};\n"],"mappings":";;;;qCCKa,KAER,EAAE,cAAW,GAAG,QAEb,kBAAC,GAAD;CACI,WAAW,EAAK,EAAO,OAAU,EAAW,YAAY,CAAS;CACjE,GAAI;AACP,CAAA"}
@@ -0,0 +1,69 @@
1
+ import { createContext as e, useCallback as t, useContext as n, useRef as r, useState as i } from "react";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ //#region src/utils/scroll/scroll.ts
4
+ function o({ scrollHeight: e, scrollTop: t, clientHeight: n }) {
5
+ let r = e - n;
6
+ return r <= 0 ? 0 : t / r;
7
+ }
8
+ function s({ scrollHeight: e, progress: t, clientHeight: n }) {
9
+ return t * (e - n);
10
+ }
11
+ //#endregion
12
+ //#region src/components/Navigation/NavigationState/context.ts
13
+ var c = e(null);
14
+ function l() {
15
+ let e = n(c);
16
+ if (e === null) throw Error("Missing navigation state. Ensure this component is rendered within Navigation component.");
17
+ return e;
18
+ }
19
+ //#endregion
20
+ //#region src/components/Navigation/NavigationState/NavigationState.tsx
21
+ var u = ({ children: e }) => {
22
+ let [n, o] = i([]), l = r({}), u = r({}), d = t((e, t) => {
23
+ let n = l.current[e] ?? 0;
24
+ return t.scrollTop = s({
25
+ scrollHeight: t.scrollHeight,
26
+ clientHeight: t.clientHeight,
27
+ progress: n
28
+ }), u.current[e] ??= /* @__PURE__ */ new Set(), u.current[e].add(t), () => {
29
+ u.current[e]?.delete(t), u.current[e]?.size === 0 && delete u.current[e];
30
+ };
31
+ }, []);
32
+ return /* @__PURE__ */ a(c, {
33
+ value: {
34
+ openSubNavigation: t((e, t) => {
35
+ o((n) => [...n.filter((e) => e.depth < t), {
36
+ id: e,
37
+ depth: t
38
+ }]);
39
+ }, []),
40
+ closeSubNavigation: t((e) => {
41
+ let t = n.find((t) => t.id === e);
42
+ if (!t) return;
43
+ let r = n.filter((e) => e.depth >= t.depth);
44
+ for (let e of r) delete l.current[e.id];
45
+ o((e) => e.filter((e) => e.depth < t.depth));
46
+ }, [n]),
47
+ saveNavigationScrollTopProgress: t((e, t) => {
48
+ l.current[e] = t;
49
+ let n = u.current[e];
50
+ if (n) for (let e of n) {
51
+ let n = s({
52
+ scrollHeight: e.scrollHeight,
53
+ clientHeight: e.clientHeight,
54
+ progress: t
55
+ });
56
+ Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
57
+ }
58
+ }, []),
59
+ registerNavigationContainer: d,
60
+ isSubNavigationOpen: t((e) => n.some((t) => t.id === e), [n]),
61
+ isInert: t((e) => e < (n[n.length - 1]?.depth ?? 0), [n])
62
+ },
63
+ children: e
64
+ });
65
+ };
66
+ //#endregion
67
+ export { s as a, o as i, c as n, l as r, u as t };
68
+
69
+ //# sourceMappingURL=NavigationState.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationState","names":[],"sources":["../../src/utils/scroll/scroll.ts","../../src/components/Navigation/NavigationState/context.ts","../../src/components/Navigation/NavigationState/NavigationState.tsx"],"sourcesContent":["export function getScrollProgress({\n scrollHeight,\n scrollTop,\n clientHeight,\n}: {\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n}): number {\n const maxScrollTop = scrollHeight - clientHeight;\n return maxScrollTop <= 0 ? 0 : scrollTop / maxScrollTop;\n}\nexport function getScrollTopFromProgress({\n scrollHeight,\n progress,\n clientHeight,\n}: {\n progress: number;\n scrollHeight: number;\n clientHeight: number;\n}): number {\n const maxScrollTop = scrollHeight - clientHeight;\n return progress * maxScrollTop;\n}\n","import { createContext, useContext } from \"react\";\n\nexport type NavigationStateContextType = {\n openSubNavigation: (id: string, depth: number) => void;\n closeSubNavigation: (id: string) => void;\n saveNavigationScrollTopProgress: (id: string, progress: number) => void;\n registerNavigationContainer: (\n id: string,\n container: HTMLDivElement\n ) => () => void;\n\n isSubNavigationOpen: (id: string) => boolean;\n isInert: (depth: number) => boolean;\n};\n\nexport const NavigationStateContext =\n createContext<NavigationStateContextType | null>(null);\n\nexport function useNavigationState() {\n const ctx = useContext(NavigationStateContext);\n if (ctx === null) {\n throw new Error(\n \"Missing navigation state. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return ctx;\n}\n","import { type ReactNode, useCallback, useRef, useState } from \"react\";\nimport { getScrollTopFromProgress } from \"@/utils\";\nimport { NavigationStateContext } from \"./context\";\nimport type { NavScrollInfo, SubNavItem } from \"./types\";\n\nexport const NavigationState: React.FC<{ children?: ReactNode }> = ({\n children,\n}) => {\n const [openSubNavs, setOpenSubNavs] = useState<SubNavItem[]>([]);\n const navScrollRef = useRef<NavScrollInfo>({});\n const navContainersRef = useRef<Record<string, Set<HTMLDivElement>>>({});\n\n const registerNavigationContainer = useCallback(\n (id: string, container: HTMLDivElement) => {\n const progress = navScrollRef.current[id] ?? 0;\n\n container.scrollTop = getScrollTopFromProgress({\n scrollHeight: container.scrollHeight,\n clientHeight: container.clientHeight,\n progress,\n });\n\n navContainersRef.current[id] ??= new Set();\n navContainersRef.current[id].add(container);\n\n return () => {\n navContainersRef.current[id]?.delete(container);\n\n if (navContainersRef.current[id]?.size === 0) {\n delete navContainersRef.current[id];\n }\n };\n },\n []\n );\n\n const openSubNavigation = useCallback((id: string, depth: number) => {\n setOpenSubNavs((prev) => [\n ...prev.filter((item) => item.depth < depth),\n { id, depth },\n ]);\n }, []);\n\n const closeSubNavigation = useCallback(\n (id: string) => {\n const item = openSubNavs.find((x) => x.id === id);\n if (!item) {\n return;\n }\n\n const removedItems = openSubNavs.filter(\n (x) => x.depth >= item.depth\n );\n for (const removedItem of removedItems) {\n delete navScrollRef.current[removedItem.id];\n }\n\n setOpenSubNavs((prev) => prev.filter((x) => x.depth < item.depth));\n },\n [openSubNavs]\n );\n\n const saveNavigationScrollTopProgress = useCallback(\n (id: string, progress: number) => {\n navScrollRef.current[id] = progress;\n\n const containers = navContainersRef.current[id];\n\n if (!containers) {\n return;\n }\n\n for (const container of containers) {\n const targetScrollTop = getScrollTopFromProgress({\n scrollHeight: container.scrollHeight,\n clientHeight: container.clientHeight,\n progress,\n });\n\n if (Math.abs(container.scrollTop - targetScrollTop) > 1) {\n container.scrollTop = targetScrollTop;\n }\n }\n },\n []\n );\n\n const isSubNavigationOpen = useCallback(\n (id: string) => {\n return openSubNavs.some((item) => item.id === id);\n },\n [openSubNavs]\n );\n\n const isInert = useCallback(\n (depth: number) => {\n const activeDepth = openSubNavs[openSubNavs.length - 1]?.depth ?? 0;\n\n return depth < activeDepth;\n },\n [openSubNavs]\n );\n\n return (\n <NavigationStateContext\n value={{\n openSubNavigation,\n closeSubNavigation,\n saveNavigationScrollTopProgress,\n registerNavigationContainer,\n isSubNavigationOpen,\n isInert,\n }}\n >\n {children}\n </NavigationStateContext>\n );\n};\n"],"mappings":";;;AAAA,SAAgB,EAAkB,EAC9B,iBACA,cACA,mBAKO;CACP,IAAM,IAAe,IAAe;CACpC,OAAO,KAAgB,IAAI,IAAI,IAAY;AAC/C;AACA,SAAgB,EAAyB,EACrC,iBACA,aACA,mBAKO;CAEP,OAAO,KADc,IAAe;AAExC;;;ACRA,IAAa,IACT,EAAiD,IAAI;AAEzD,SAAgB,IAAqB;CACjC,IAAM,IAAM,EAAW,CAAsB;CAC7C,IAAI,MAAQ,MACR,MAAU,MACN,0FACJ;CAGJ,OAAO;AACX;;;ACtBA,IAAa,KAAuD,EAChE,kBACE;CACF,IAAM,CAAC,GAAa,KAAkB,EAAuB,CAAC,CAAC,GACzD,IAAe,EAAsB,CAAC,CAAC,GACvC,IAAmB,EAA4C,CAAC,CAAC,GAEjE,IAA8B,GAC/B,GAAY,MAA8B;EACvC,IAAM,IAAW,EAAa,QAAQ,MAAO;EAW7C,OATA,EAAU,YAAY,EAAyB;GAC3C,cAAc,EAAU;GACxB,cAAc,EAAU;GACxB;EACJ,CAAC,GAED,EAAiB,QAAQ,uBAAQ,IAAI,IAAI,GACzC,EAAiB,QAAQ,GAAI,IAAI,CAAS,SAE7B;GAGT,AAFA,EAAiB,QAAQ,IAAK,OAAO,CAAS,GAE1C,EAAiB,QAAQ,IAAK,SAAS,KACvC,OAAO,EAAiB,QAAQ;EAExC;CACJ,GACA,CAAC,CACL;CAqEA,OACI,kBAAC,GAAD;EACI,OAAO;GACH,mBAtEc,GAAa,GAAY,MAAkB;IACjE,GAAgB,MAAS,CACrB,GAAG,EAAK,QAAQ,MAAS,EAAK,QAAQ,CAAK,GAC3C;KAAE;KAAI;IAAM,CAChB,CAAC;GACL,GAAG,CAAC,CAiEQ;GACA,oBAhEe,GACtB,MAAe;IACZ,IAAM,IAAO,EAAY,MAAM,MAAM,EAAE,OAAO,CAAE;IAChD,IAAI,CAAC,GACD;IAGJ,IAAM,IAAe,EAAY,QAC5B,MAAM,EAAE,SAAS,EAAK,KAC3B;IACA,KAAK,IAAM,KAAe,GACtB,OAAO,EAAa,QAAQ,EAAY;IAG5C,GAAgB,MAAS,EAAK,QAAQ,MAAM,EAAE,QAAQ,EAAK,KAAK,CAAC;GACrE,GACA,CAAC,CAAW,CAgDJ;GACA,iCA9C4B,GACnC,GAAY,MAAqB;IAC9B,EAAa,QAAQ,KAAM;IAE3B,IAAM,IAAa,EAAiB,QAAQ;IAEvC,OAIL,KAAK,IAAM,KAAa,GAAY;KAChC,IAAM,IAAkB,EAAyB;MAC7C,cAAc,EAAU;MACxB,cAAc,EAAU;MACxB;KACJ,CAAC;KAED,AAAI,KAAK,IAAI,EAAU,YAAY,CAAe,IAAI,MAClD,EAAU,YAAY;IAE9B;GACJ,GACA,CAAC,CAwBO;GACA;GACA,qBAvBgB,GACvB,MACU,EAAY,MAAM,MAAS,EAAK,OAAO,CAAE,GAEpD,CAAC,CAAW,CAmBJ;GACA,SAjBI,GACX,MAGU,KAFa,EAAY,EAAY,SAAS,IAAI,SAAS,IAItE,CAAC,CAAW,CAWJ;EACJ;EAEC;CACmB,CAAA;AAEhC"}
@@ -1,7 +1,7 @@
1
1
  import e from "clsx";
2
- import { Popover as t } from "react-aria-components";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import '../assets/Popover.css';var r = { popover: "_popover_gsd0s_2" }, i = ({ className: i, ...a }) => /* @__PURE__ */ n(t, {
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Popover as n } from "react-aria-components";
4
+ import '../assets/Popover.css';var r = { popover: "_popover_gsd0s_2" }, i = ({ className: i, ...a }) => /* @__PURE__ */ t(n, {
5
5
  className: (t) => e(r.popover, typeof i == "function" ? i(t) : i),
6
6
  ...a
7
7
  });
package/dist/chunks/Radio CHANGED
@@ -4,22 +4,22 @@ import { Description as n } from "../components/Input/Description/index.js";
4
4
  import { t as r } from "./FieldError";
5
5
  import { Label as i } from "../components/Input/Label/index.js";
6
6
  import { clsx as a } from "clsx";
7
- import { Radio as o, RadioGroup as s } from "react-aria-components";
7
+ import { createContext as o, useContext as s } from "react";
8
8
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
9
- import { createContext as d, useContext as f } from "react";
9
+ import { Radio as d, RadioGroup as f } from "react-aria-components";
10
10
  import '../assets/Radio.css';//#region src/components/Input/Radio/context.ts
11
- var p = d({}), m = {
11
+ var p = o({}), m = {
12
12
  "radio-group": "_radio-group_12t9w_15",
13
13
  "radio-items": "_radio-items_12t9w_58",
14
14
  radio: "_radio_12t9w_15",
15
15
  "state-layer": "_state-layer_12t9w_149",
16
16
  indicator: "_indicator_12t9w_169",
17
17
  "indicator-icon": "_indicator-icon_12t9w_252"
18
- }, h = ({ className: n, children: r, labelPlacement: i, containerStateLayer: s, ...d }) => {
19
- let { labelPlacement: h, containerStateLayer: g } = f(p), _ = i ?? h ?? "end", v = s ?? g ?? !1;
20
- return /* @__PURE__ */ l(o, {
18
+ }, h = ({ className: n, children: r, labelPlacement: i, containerStateLayer: o, ...f }) => {
19
+ let { labelPlacement: h, containerStateLayer: g } = s(p), _ = i ?? h ?? "end", v = o ?? g ?? !1;
20
+ return /* @__PURE__ */ l(d, {
21
21
  className: (e) => a(m.radio, v && m["state-layer"], t.labelLarge, typeof n == "function" ? n(e) : n),
22
- ...d,
22
+ ...f,
23
23
  "data-radio": !0,
24
24
  children: (t) => {
25
25
  let { isSelected: n, isHovered: i, isDisabled: o, isFocused: s, isFocusVisible: d, isPressed: f, isInvalid: p } = t, h = {
@@ -46,24 +46,24 @@ var p = d({}), m = {
46
46
  ] });
47
47
  }
48
48
  });
49
- }, g = ({ label: e, description: t, errorMessage: o, showDescriptionOnInvalid: d = !1, children: f, className: h, radioItemsGap: g = 24, labelPlacement: _, containerStateLayer: v, ...y }) => /* @__PURE__ */ l(p, {
49
+ }, g = ({ label: e, description: t, errorMessage: o, showDescriptionOnInvalid: s = !1, children: d, className: h, radioItemsGap: g = 24, labelPlacement: _, containerStateLayer: v, ...y }) => /* @__PURE__ */ l(p, {
50
50
  value: {
51
51
  labelPlacement: _,
52
52
  containerStateLayer: v
53
53
  },
54
- children: /* @__PURE__ */ l(s, {
54
+ children: /* @__PURE__ */ l(f, {
55
55
  className: (e) => a(m["radio-group"], typeof h == "function" ? h(e) : h),
56
56
  ...y,
57
57
  "data-radio-group": !0,
58
- children: ({ orientation: s, isInvalid: p }) => {
59
- let h = t && (!p || p && d);
58
+ children: ({ orientation: f, isInvalid: p }) => {
59
+ let h = t && (!p || p && s);
60
60
  return /* @__PURE__ */ u(c, { children: [
61
61
  e && /* @__PURE__ */ l(i, { children: e }),
62
62
  /* @__PURE__ */ l("div", {
63
- "data-orientation": s,
63
+ "data-orientation": f,
64
64
  className: a(m["radio-items"]),
65
65
  style: { gap: `calc(${g} * var(--dp, 1px))` },
66
- children: f
66
+ children: d
67
67
  }),
68
68
  h && /* @__PURE__ */ l(n, { children: t }),
69
69
  /* @__PURE__ */ l(r, { children: o })
@@ -1,27 +1,27 @@
1
- import { t as e } from "./Icon";
2
- import { t } from "./base";
1
+ import { t as e } from "./base";
2
+ import { t } from "./Icon";
3
3
  import { IconButton as n } from "../components/Button/IconButton/index.js";
4
4
  import { clsx as r } from "clsx";
5
- import { Input as i, SearchField as a } from "react-aria-components";
6
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { Input as s, SearchField as c } from "react-aria-components";
7
7
  import { Search as l, X as u } from "lucide-react";
8
8
  import '../assets/SearchField.css';var d = {
9
9
  "search-field": "_search-field_dol97_10",
10
10
  input: "_input_dol97_74"
11
- }, f = ({ placeholder: f = "Search", className: p, ...m }) => /* @__PURE__ */ s(a, {
11
+ }, f = ({ placeholder: f = "Search", className: p, ...m }) => /* @__PURE__ */ a(c, {
12
12
  className: (e) => r(d["search-field"], typeof p == "function" ? p(e) : p),
13
13
  ...m,
14
- children: ({ isEmpty: a }) => /* @__PURE__ */ c(o, { children: [
15
- /* @__PURE__ */ s(e, {
14
+ children: ({ isEmpty: c }) => /* @__PURE__ */ o(i, { children: [
15
+ /* @__PURE__ */ a(t, {
16
16
  icon: l,
17
17
  size: 24,
18
18
  "data-search-icon": !0
19
19
  }),
20
- /* @__PURE__ */ s(i, {
21
- className: r(d.input, t.bodyLarge),
20
+ /* @__PURE__ */ a(s, {
21
+ className: r(d.input, e.bodyLarge),
22
22
  placeholder: f
23
23
  }),
24
- !a && /* @__PURE__ */ s(n, {
24
+ !c && /* @__PURE__ */ a(n, {
25
25
  icon: u,
26
26
  size: "small",
27
27
  width: "default",
@@ -1,26 +1,26 @@
1
- import { t as e } from "./Icon";
2
- import { t } from "./base";
1
+ import { t as e } from "./base";
2
+ import { t } from "./Icon";
3
3
  import { d as n, o as r, s as i } from "./core4";
4
4
  import a from "clsx";
5
- import { Button as o, SelectStateContext as s, SelectValue as c } from "react-aria-components";
6
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
- import { ChevronDown as d } from "lucide-react";
8
- import { useContext as f } from "react";
5
+ import { useContext as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { Button as l, SelectStateContext as u, SelectValue as d } from "react-aria-components";
8
+ import { ChevronDown as f } from "lucide-react";
9
9
  import '../assets/SelectTrigger.css';var p = {
10
10
  trigger: "_trigger_pud16_2",
11
11
  "select-value": "_select-value_pud16_37"
12
12
  }, m = (m) => {
13
- let h = f(s)?.displayValidation.isInvalid;
14
- return /* @__PURE__ */ u(o, {
15
- className: a(n, i, r, t.bodyLarge, p.trigger),
13
+ let h = o(u)?.displayValidation.isInvalid;
14
+ return /* @__PURE__ */ c(l, {
15
+ className: a(n, i, r, e.bodyLarge, p.trigger),
16
16
  ...m,
17
17
  "data-invalid": h || void 0,
18
18
  "data-select-trigger": !0,
19
- children: [/* @__PURE__ */ l(c, {
19
+ children: [/* @__PURE__ */ s(d, {
20
20
  className: a(p["select-value"]),
21
21
  children: ({ selectedText: e, isPlaceholder: t, defaultChildren: n }) => t ? n : e
22
- }), /* @__PURE__ */ l(e, {
23
- icon: d,
22
+ }), /* @__PURE__ */ s(t, {
23
+ icon: f,
24
24
  size: 24
25
25
  })]
26
26
  });