@ryuzaki13/react-foundation-ui 3.4.3 → 3.5.0

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 (168) hide show
  1. package/dist/badge/index.js +65 -2
  2. package/dist/badge/index.js.map +1 -0
  3. package/dist/barcode-scanner/index.js +18 -18
  4. package/dist/base-table/index.js +2 -2
  5. package/dist/button/index.js +1 -1
  6. package/dist/check-box/index.js +1 -1
  7. package/dist/chunks/{CalendarView-Dm55k0bN.js → CalendarView-CwbPJG2Y.js} +86 -86
  8. package/dist/chunks/{CalendarView-Dm55k0bN.js.map → CalendarView-CwbPJG2Y.js.map} +1 -1
  9. package/dist/chunks/{ImageViewerRuntime-HGBWp9NM.js → ImageViewerRuntime-DZpgxzF1.js} +25 -25
  10. package/dist/chunks/{ImageViewerRuntime-HGBWp9NM.js.map → ImageViewerRuntime-DZpgxzF1.js.map} +1 -1
  11. package/dist/chunks/{TextEditorLexicalClient-C8nSoz85.js → TextEditorLexicalClient-BRp8jHId.js} +354 -354
  12. package/dist/chunks/{TextEditorLexicalClient-C8nSoz85.js.map → TextEditorLexicalClient-BRp8jHId.js.map} +1 -1
  13. package/dist/chunks/{base-table-BWvKfI2W.js → base-table-BHmboNzl.js} +138 -138
  14. package/dist/chunks/{base-table-BWvKfI2W.js.map → base-table-BHmboNzl.js.map} +1 -1
  15. package/dist/chunks/{button-DF21yxVp.js → button-D7GAU2Wa.js} +20 -20
  16. package/dist/chunks/{button-DF21yxVp.js.map → button-D7GAU2Wa.js.map} +1 -1
  17. package/dist/chunks/{check-box-CZyhzmR0.js → check-box-D_Y6iIWv.js} +19 -19
  18. package/dist/chunks/{check-box-CZyhzmR0.js.map → check-box-D_Y6iIWv.js.map} +1 -1
  19. package/dist/chunks/{context-menu-DgvXGCuI.js → context-menu-BQePxRpu.js} +159 -159
  20. package/dist/chunks/{context-menu-DgvXGCuI.js.map → context-menu-BQePxRpu.js.map} +1 -1
  21. package/dist/chunks/{date-input-D7aBsPJc.js → date-input-Crijdmmq.js} +67 -67
  22. package/dist/chunks/{date-input-D7aBsPJc.js.map → date-input-Crijdmmq.js.map} +1 -1
  23. package/dist/chunks/{date-range-preset-select-BLnY47cv.js → date-range-preset-select-CyzGMvVp.js} +6 -6
  24. package/dist/chunks/{date-range-preset-select-BLnY47cv.js.map → date-range-preset-select-CyzGMvVp.js.map} +1 -1
  25. package/dist/chunks/{dialog-1Z1zCNCe.js → dialog-BcQGVNbu.js} +13 -13
  26. package/dist/chunks/{dialog-1Z1zCNCe.js.map → dialog-BcQGVNbu.js.map} +1 -1
  27. package/dist/chunks/{flex-C7njxZ74.js → flex-DtXK7OM4.js} +29 -29
  28. package/dist/chunks/{flex-C7njxZ74.js.map → flex-DtXK7OM4.js.map} +1 -1
  29. package/dist/chunks/{floating-arrow-DPKwJfww.js → floating-arrow-DKUKx2ZQ.js} +7 -7
  30. package/dist/chunks/{floating-arrow-DPKwJfww.js.map → floating-arrow-DKUKx2ZQ.js.map} +1 -1
  31. package/dist/chunks/{input-DSPKgiCK.js → input-CuRK9Vbz.js} +78 -78
  32. package/dist/chunks/{input-DSPKgiCK.js.map → input-CuRK9Vbz.js.map} +1 -1
  33. package/dist/chunks/{input-files-tIS17-zX.js → input-files-B8j6Pb_M.js} +31 -31
  34. package/dist/chunks/{input-files-tIS17-zX.js.map → input-files-B8j6Pb_M.js.map} +1 -1
  35. package/dist/chunks/{misc-DeGboAt-.js → misc-CGQOXXCy.js} +110 -110
  36. package/dist/chunks/{misc-DeGboAt-.js.map → misc-CGQOXXCy.js.map} +1 -1
  37. package/dist/chunks/{modal-dplfAaER.js → modal-febBsMyR.js} +58 -58
  38. package/dist/chunks/{modal-dplfAaER.js.map → modal-febBsMyR.js.map} +1 -1
  39. package/dist/chunks/{picker-lvm82d0A.js → picker-BA6okKnz.js} +91 -91
  40. package/dist/chunks/{picker-lvm82d0A.js.map → picker-BA6okKnz.js.map} +1 -1
  41. package/dist/chunks/popover-yl5DVe06.js +245 -0
  42. package/dist/chunks/{popover-Bne-Ljbs.js.map → popover-yl5DVe06.js.map} +1 -1
  43. package/dist/chunks/radio-group-CW-K1n9c.js +125 -0
  44. package/dist/chunks/{radio-group-sSnlYjAX.js.map → radio-group-CW-K1n9c.js.map} +1 -1
  45. package/dist/chunks/select-DblNSc5H.js +363 -0
  46. package/dist/chunks/{select-aTGupQan.js.map → select-DblNSc5H.js.map} +1 -1
  47. package/dist/chunks/{separator-B72Aq-6a.js → separator-CIqnk2z9.js} +2 -2
  48. package/dist/chunks/{separator-B72Aq-6a.js.map → separator-CIqnk2z9.js.map} +1 -1
  49. package/dist/chunks/{sortable-BKIwlqhI.js → sortable-CQmMHAF8.js} +38 -38
  50. package/dist/chunks/{sortable-BKIwlqhI.js.map → sortable-CQmMHAF8.js.map} +1 -1
  51. package/dist/chunks/{table-DxoSOvQK.js → table-BnvjPaE1.js} +18 -18
  52. package/dist/chunks/{table-DxoSOvQK.js.map → table-BnvjPaE1.js.map} +1 -1
  53. package/dist/chunks/{table-column-interactions-DzEvVuXe.js → table-column-interactions-Do8LFtiv.js} +20 -20
  54. package/dist/chunks/{table-column-interactions-DzEvVuXe.js.map → table-column-interactions-Do8LFtiv.js.map} +1 -1
  55. package/dist/chunks/{types-D9Wj9wrg.js → types-CxXyru6U.js} +21 -21
  56. package/dist/chunks/{types-D9Wj9wrg.js.map → types-CxXyru6U.js.map} +1 -1
  57. package/dist/chunks/{useODataSelectBase-DR4PrY1j.js → useODataSelectBase-DwR4Lfv-.js} +5 -5
  58. package/dist/chunks/{useODataSelectBase-DR4PrY1j.js.map → useODataSelectBase-DwR4Lfv-.js.map} +1 -1
  59. package/dist/chunks/{wheel-picker-FS58cRsQ.js → wheel-picker-DUHGy7wE.js} +23 -23
  60. package/dist/chunks/{wheel-picker-FS58cRsQ.js.map → wheel-picker-DUHGy7wE.js.map} +1 -1
  61. package/dist/context-menu/index.js +1 -1
  62. package/dist/date-input/index.js +2 -2
  63. package/dist/date-range-preset-select/index.js +1 -1
  64. package/dist/date-time-input/index.js +122 -122
  65. package/dist/date-time-input/index.js.map +1 -1
  66. package/dist/detail/index.js +22 -22
  67. package/dist/dialog/index.js +1 -1
  68. package/dist/disclosure/index.js +9 -9
  69. package/dist/drop-zone/index.js +21 -21
  70. package/dist/errors/index.js +50 -50
  71. package/dist/expandable-action-panel/index.js +24 -24
  72. package/dist/flex/index.js +1 -1
  73. package/dist/flex/useFlexClasses.d.ts +1 -1
  74. package/dist/floating-arrow/index.js +1 -1
  75. package/dist/fullscreen-portal/index.js +8 -8
  76. package/dist/image/index.js +119 -119
  77. package/dist/input/index.js +1 -1
  78. package/dist/input-date-time/index.js +55 -55
  79. package/dist/input-file/index.js +16 -16
  80. package/dist/input-files/index.js +1 -1
  81. package/dist/input-image/index.js +17 -17
  82. package/dist/input-search/index.js +30 -2
  83. package/dist/input-search/index.js.map +1 -0
  84. package/dist/layout-picker/index.js +93 -93
  85. package/dist/layout-picker/index.js.map +1 -1
  86. package/dist/list/index.js +39 -39
  87. package/dist/listbox/index.js +33 -33
  88. package/dist/misc/index.js +1 -1
  89. package/dist/modal/index.js +1 -1
  90. package/dist/multi-select/index.js +466 -2
  91. package/dist/multi-select/index.js.map +1 -0
  92. package/dist/notifications/index.js +45 -45
  93. package/dist/option/index.js +30 -30
  94. package/dist/period-select/index.js +7 -7
  95. package/dist/picker/index.js +1 -1
  96. package/dist/popover/index.js +1 -1
  97. package/dist/preset-range-date-input/index.js +10 -10
  98. package/dist/preset-select/index.js +1 -1
  99. package/dist/radio-button/index.js +9 -9
  100. package/dist/radio-group/index.js +1 -1
  101. package/dist/select/index.js +1 -1
  102. package/dist/separator/index.js +1 -1
  103. package/dist/simple-table/index.js +5 -5
  104. package/dist/slider/index.js +82 -82
  105. package/dist/slider/index.js.map +1 -1
  106. package/dist/sortable/index.js +1 -1
  107. package/dist/splitter/index.js +55 -55
  108. package/dist/state-select/index.js +17 -17
  109. package/dist/styles.css +1 -1
  110. package/dist/switch/index.js +18 -18
  111. package/dist/table/index.js +1 -1
  112. package/dist/table-column-interactions/index.js +1 -1
  113. package/dist/table-editor/index.js +99 -99
  114. package/dist/table-sorting/index.js +13 -13
  115. package/dist/tabs/index.js +83 -83
  116. package/dist/tag-input/index.js +58 -58
  117. package/dist/tag-input/index.js.map +1 -1
  118. package/dist/text/index.js +18 -18
  119. package/dist/text-editor/index.js +3 -3
  120. package/dist/textarea/index.js +1 -1
  121. package/dist/three-scene/index.js +7 -7
  122. package/dist/toggle/index.js +20 -20
  123. package/dist/toolbar/index.js +16 -16
  124. package/dist/tree/index.js +24 -24
  125. package/dist/tree-select/index.js +189 -189
  126. package/dist/tree-select/index.js.map +1 -1
  127. package/dist/tree-table/index.js +33 -33
  128. package/dist/tree-table/index.js.map +1 -1
  129. package/dist/wheel-picker/index.js +1 -1
  130. package/package.json +1 -5
  131. package/storybook-static/project.json +1 -1
  132. package/dist/advanced-search/index.d.ts +0 -3
  133. package/dist/advanced-search/index.d.ts.map +0 -1
  134. package/dist/advanced-search/index.js +0 -399
  135. package/dist/advanced-search/index.js.map +0 -1
  136. package/dist/advanced-search/lib/index.d.ts +0 -2
  137. package/dist/advanced-search/lib/index.d.ts.map +0 -1
  138. package/dist/advanced-search/lib/searchParts.d.ts +0 -3
  139. package/dist/advanced-search/lib/searchParts.d.ts.map +0 -1
  140. package/dist/advanced-search/model/index.d.ts +0 -5
  141. package/dist/advanced-search/model/index.d.ts.map +0 -1
  142. package/dist/advanced-search/model/types.d.ts +0 -55
  143. package/dist/advanced-search/model/types.d.ts.map +0 -1
  144. package/dist/advanced-search/model/useAdvancedSearch.d.ts +0 -11
  145. package/dist/advanced-search/model/useAdvancedSearch.d.ts.map +0 -1
  146. package/dist/advanced-search/model/useAdvancedSearchInitialSelected.d.ts +0 -6
  147. package/dist/advanced-search/model/useAdvancedSearchInitialSelected.d.ts.map +0 -1
  148. package/dist/advanced-search/model/useAdvancedSearchSelection.d.ts +0 -13
  149. package/dist/advanced-search/model/useAdvancedSearchSelection.d.ts.map +0 -1
  150. package/dist/advanced-search/ui/AdvancedSearchModal.d.ts +0 -23
  151. package/dist/advanced-search/ui/AdvancedSearchModal.d.ts.map +0 -1
  152. package/dist/advanced-search/ui/AdvancedSearchModalSession.d.ts +0 -16
  153. package/dist/advanced-search/ui/AdvancedSearchModalSession.d.ts.map +0 -1
  154. package/dist/advanced-search/ui/AdvancedSearchSelect.d.ts +0 -9
  155. package/dist/advanced-search/ui/AdvancedSearchSelect.d.ts.map +0 -1
  156. package/dist/advanced-search/ui/AdvancedSearchSelectUI.d.ts +0 -9
  157. package/dist/advanced-search/ui/AdvancedSearchSelectUI.d.ts.map +0 -1
  158. package/dist/advanced-search/ui/index.d.ts +0 -2
  159. package/dist/advanced-search/ui/index.d.ts.map +0 -1
  160. package/dist/chunks/badge-6mXO9BWP.js +0 -65
  161. package/dist/chunks/badge-6mXO9BWP.js.map +0 -1
  162. package/dist/chunks/input-search-Cat4c7SM.js +0 -30
  163. package/dist/chunks/input-search-Cat4c7SM.js.map +0 -1
  164. package/dist/chunks/multi-select-BZ9N6Dal.js +0 -466
  165. package/dist/chunks/multi-select-BZ9N6Dal.js.map +0 -1
  166. package/dist/chunks/popover-Bne-Ljbs.js +0 -245
  167. package/dist/chunks/radio-group-sSnlYjAX.js +0 -125
  168. package/dist/chunks/select-aTGupQan.js +0 -363
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../chunks/ui.module-oRwY3Zli.js";
2
2
  import { n as t } from "../chunks/uiClasses-CQj47jkF.js";
3
- import { d as n, h as r, l as i } from "../chunks/misc-DeGboAt-.js";
4
- import { Children as a, isValidElement as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
5
- import { cn as d, getRovingFocusTargetIndex as f } from "@ryuzaki13/react-foundation-lib/utils";
6
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
3
+ import { d as n, h as r, l as i } from "../chunks/misc-CGQOXXCy.js";
4
+ import { cn as a, getRovingFocusTargetIndex as o } from "@ryuzaki13/react-foundation-lib/utils";
5
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { Children as u, isValidElement as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
7
7
  //#region src/tabs/lib/tabs.ts
8
8
  function g(e) {
9
9
  return e.find((e) => !e.disabled)?.id ?? null;
@@ -19,8 +19,8 @@ function y({ mountStrategy: e, isSelected: t, isVisited: n }) {
19
19
  }
20
20
  //#endregion
21
21
  //#region src/tabs/model/useTabsState.ts
22
- function b({ items: e, value: t, defaultValue: n, onValueChange: r, orientation: i = "horizontal", activationMode: a = "automatic", loop: o = !0 }) {
23
- let d = t !== void 0, p = c(() => v(e), [e]), m = p[0]?.id ?? null, [h, g] = u(() => _(e, n)), [y, b] = u(() => _(e, t ?? n)), x = _(e, t ?? n), [S, C] = u(() => x ? /* @__PURE__ */ new Set([x]) : /* @__PURE__ */ new Set()), w = s(), T = l({}), E = _(e, d ? t : h), D = _(e, y) ?? E ?? m, O = c(() => {
22
+ function b({ items: e, value: t, defaultValue: n, onValueChange: r, orientation: i = "horizontal", activationMode: a = "automatic", loop: s = !0 }) {
23
+ let c = t !== void 0, l = p(() => v(e), [e]), u = l[0]?.id ?? null, [d, g] = h(() => _(e, n)), [y, b] = h(() => _(e, t ?? n)), x = _(e, t ?? n), [S, C] = h(() => x ? /* @__PURE__ */ new Set([x]) : /* @__PURE__ */ new Set()), w = f(), T = m({}), E = _(e, c ? t : d), D = _(e, y) ?? E ?? u, O = p(() => {
24
24
  if (!E || S.has(E)) return S;
25
25
  let e = new Set(S);
26
26
  return e.add(E), e;
@@ -30,25 +30,25 @@ function b({ items: e, value: t, defaultValue: n, onValueChange: r, orientation:
30
30
  if (e.has(n)) return e;
31
31
  let t = new Set(e);
32
32
  return t.add(n), t;
33
- }), d || g(n), r?.(n));
33
+ }), c || g(n), r?.(n));
34
34
  }, A = (e) => {
35
35
  T.current[e]?.focus();
36
36
  }, j = (e) => {
37
- if (p.length < 2) return;
38
- let t = Math.max(0, p.findIndex((e) => e.id === (D ?? E ?? m))), n = f({
37
+ if (l.length < 2) return;
38
+ let t = Math.max(0, l.findIndex((e) => e.id === (D ?? E ?? u))), n = o({
39
39
  currentIndex: t,
40
- itemCount: p.length,
40
+ itemCount: l.length,
41
41
  key: e.key,
42
42
  orientation: i,
43
- wrap: o
43
+ wrap: s
44
44
  });
45
45
  if (n === null) return;
46
46
  e.preventDefault();
47
- let r = p[n]?.id;
47
+ let r = l[n]?.id;
48
48
  r && (b(r), A(r), a === "automatic" && k(r));
49
49
  }, M = (e) => {
50
50
  let t = e.relatedTarget;
51
- t instanceof Node && e.currentTarget.contains(t) || b(E ?? m);
51
+ t instanceof Node && e.currentTarget.contains(t) || b(E ?? u);
52
52
  }, N = (e) => `${w}-tab-${e}`, P = (e) => `${w}-panel-${e}`;
53
53
  return {
54
54
  activationMode: a,
@@ -99,28 +99,28 @@ var x = {
99
99
  };
100
100
  //#endregion
101
101
  //#region src/tabs/ui/TabsLoadingState.tsx
102
- function S({ containerClassName: e, tabListClassName: t, panelsClassName: n, panelClassName: i, panelBodyClassName: a, loadingText: o }) {
103
- return /* @__PURE__ */ h("div", {
102
+ function S({ containerClassName: e, tabListClassName: t, panelsClassName: n, panelClassName: i, panelBodyClassName: o, loadingText: s }) {
103
+ return /* @__PURE__ */ l("div", {
104
104
  className: e,
105
- children: [/* @__PURE__ */ m("div", {
105
+ children: [/* @__PURE__ */ c("div", {
106
106
  className: t,
107
107
  "aria-hidden": "true",
108
- children: /* @__PURE__ */ m("button", {
108
+ children: /* @__PURE__ */ c("button", {
109
109
  type: "button",
110
110
  disabled: !0,
111
111
  "data-disabled": "",
112
- className: d(x.tab, "skeletonLine"),
112
+ className: a(x.tab, "skeletonLine"),
113
113
  children: "Загрузка..."
114
114
  })
115
- }), /* @__PURE__ */ m("div", {
115
+ }), /* @__PURE__ */ c("div", {
116
116
  className: n,
117
117
  "aria-busy": "true",
118
- children: /* @__PURE__ */ m("div", {
118
+ children: /* @__PURE__ */ c("div", {
119
119
  className: i,
120
- children: /* @__PURE__ */ m("div", {
121
- className: a,
122
- children: /* @__PURE__ */ m(r, {
123
- text: o,
120
+ children: /* @__PURE__ */ c("div", {
121
+ className: o,
122
+ children: /* @__PURE__ */ c(r, {
123
+ text: s,
124
124
  className: "radiusSm"
125
125
  })
126
126
  })
@@ -131,15 +131,15 @@ function S({ containerClassName: e, tabListClassName: t, panelsClassName: n, pan
131
131
  //#endregion
132
132
  //#region src/tabs/ui/TabsNoDataState.tsx
133
133
  function C({ containerClassName: e, panelsClassName: t, panelClassName: r, panelBodyClassName: i }) {
134
- return /* @__PURE__ */ m("div", {
134
+ return /* @__PURE__ */ c("div", {
135
135
  className: e,
136
- children: /* @__PURE__ */ m("div", {
136
+ children: /* @__PURE__ */ c("div", {
137
137
  className: t,
138
- children: /* @__PURE__ */ m("div", {
138
+ children: /* @__PURE__ */ c("div", {
139
139
  className: r,
140
- children: /* @__PURE__ */ m("div", {
140
+ children: /* @__PURE__ */ c("div", {
141
141
  className: i,
142
- children: /* @__PURE__ */ m(n, { className: "radiusSm" })
142
+ children: /* @__PURE__ */ c(n, { className: "radiusSm" })
143
143
  })
144
144
  })
145
145
  })
@@ -148,7 +148,7 @@ function C({ containerClassName: e, panelsClassName: t, panelClassName: r, panel
148
148
  //#endregion
149
149
  //#region src/tabs/ui/TabsPanel.tsx
150
150
  function w({ tabId: e, isSelected: t, className: n, getTabElementId: r, getPanelElementId: i, children: a }) {
151
- return /* @__PURE__ */ m("div", {
151
+ return /* @__PURE__ */ c("div", {
152
152
  role: "tabpanel",
153
153
  id: i(e),
154
154
  "aria-labelledby": r(e),
@@ -159,73 +159,73 @@ function w({ tabId: e, isSelected: t, className: n, getTabElementId: r, getPanel
159
159
  }
160
160
  //#endregion
161
161
  //#region src/tabs/ui/TabsTabList.tsx
162
- function T({ items: e, state: t, className: n, ariaLabel: r, ariaLabelledBy: a }) {
163
- return /* @__PURE__ */ m("div", {
162
+ function T({ items: e, state: t, className: n, ariaLabel: r, ariaLabelledBy: o }) {
163
+ return /* @__PURE__ */ c("div", {
164
164
  className: n,
165
165
  role: "tablist",
166
166
  "aria-orientation": t.orientation,
167
167
  "aria-label": r,
168
- "aria-labelledby": a,
168
+ "aria-labelledby": o,
169
169
  onKeyDown: t.onTabListKeyDown,
170
170
  onBlur: t.onTabListBlur,
171
- children: ((e) => t.orientation === "horizontal" ? /* @__PURE__ */ m(i, { children: e }) : /* @__PURE__ */ m(p, { children: e }))(e.map((e) => /* @__PURE__ */ m("button", {
171
+ children: ((e) => t.orientation === "horizontal" ? /* @__PURE__ */ c(i, { children: e }) : /* @__PURE__ */ c(s, { children: e }))(e.map((e) => /* @__PURE__ */ c("button", {
172
172
  ...t.getTabButtonProps(e),
173
173
  "data-ui": "tabs-tab",
174
174
  "data-action": "select-tab",
175
- className: d(x.tab, "textWrap", e.id === t.selectedTabId && x.selected),
175
+ className: a(x.tab, "textWrap", e.id === t.selectedTabId && x.selected),
176
176
  children: e.title
177
177
  }, e.id)))
178
178
  });
179
179
  }
180
180
  //#endregion
181
181
  //#region src/tabs/ui/TabsBox.tsx
182
- function E({ items: n, value: r, defaultValue: i, onValueChange: a, className: o, isLoading: s, loadingText: c, orientation: l = "horizontal", activationMode: u = "automatic", mountStrategy: f = "unmount", loop: p = !0, tone: g = "primary", clean: _ = !1, "aria-label": v, "aria-labelledby": E }) {
182
+ function E({ items: n, value: r, defaultValue: i, onValueChange: o, className: s, isLoading: u, loadingText: d, orientation: f = "horizontal", activationMode: p = "automatic", mountStrategy: m = "unmount", loop: h = !0, tone: g = "primary", clean: _ = !1, "aria-label": v, "aria-labelledby": E }) {
183
183
  let D = b({
184
184
  items: n,
185
185
  value: r,
186
186
  defaultValue: i,
187
- onValueChange: a,
188
- orientation: l,
189
- activationMode: u,
190
- loop: p
191
- }), O = d(x.tabsContainer, _ ? x.clean : e.uiFilledPanel, x[l], t(g), o), k = x.tabs, A = d(x.panels, x.panelScrollable, "scrollable overscroll"), j = x.panel, M = x.panelBody;
192
- return s ? /* @__PURE__ */ m(S, {
187
+ onValueChange: o,
188
+ orientation: f,
189
+ activationMode: p,
190
+ loop: h
191
+ }), O = a(x.tabsContainer, _ ? x.clean : e.uiFilledPanel, x[f], t(g), s), k = x.tabs, A = a(x.panels, x.panelScrollable, "scrollable overscroll"), j = x.panel, M = x.panelBody;
192
+ return u ? /* @__PURE__ */ c(S, {
193
193
  containerClassName: O,
194
194
  tabListClassName: k,
195
195
  panelsClassName: A,
196
196
  panelClassName: j,
197
197
  panelBodyClassName: M,
198
- loadingText: c
199
- }) : n.length ? /* @__PURE__ */ h("div", {
198
+ loadingText: d
199
+ }) : n.length ? /* @__PURE__ */ l("div", {
200
200
  className: O,
201
- children: [/* @__PURE__ */ m(T, {
201
+ children: [/* @__PURE__ */ c(T, {
202
202
  items: n,
203
203
  state: D,
204
204
  className: k,
205
205
  ariaLabel: v,
206
206
  ariaLabelledBy: E
207
- }), /* @__PURE__ */ m("div", {
207
+ }), /* @__PURE__ */ c("div", {
208
208
  className: A,
209
209
  children: n.map((e) => {
210
210
  let t = e.id === D.selectedTabId;
211
211
  return y({
212
- mountStrategy: f,
212
+ mountStrategy: m,
213
213
  isSelected: t,
214
214
  isVisited: D.isVisited(e.id)
215
- }) ? /* @__PURE__ */ m(w, {
215
+ }) ? /* @__PURE__ */ c(w, {
216
216
  tabId: e.id,
217
217
  isSelected: t,
218
218
  className: j,
219
219
  getTabElementId: D.getTabElementId,
220
220
  getPanelElementId: D.getPanelElementId,
221
- children: /* @__PURE__ */ m("div", {
221
+ children: /* @__PURE__ */ c("div", {
222
222
  className: M,
223
223
  children: e.content
224
224
  })
225
225
  }, e.id) : null;
226
226
  })
227
227
  })]
228
- }) : /* @__PURE__ */ m(C, {
228
+ }) : /* @__PURE__ */ c(C, {
229
229
  containerClassName: O,
230
230
  panelsClassName: A,
231
231
  panelClassName: j,
@@ -248,41 +248,41 @@ function j(e) {
248
248
  return null;
249
249
  }
250
250
  function M(e, t) {
251
- return o(e) && j(e) === t;
251
+ return d(e) && j(e) === t;
252
252
  }
253
253
  function N({ children: e }) {
254
- return /* @__PURE__ */ m(p, { children: e });
254
+ return /* @__PURE__ */ c(s, { children: e });
255
255
  }
256
256
  N.displayName = D;
257
257
  function P({ children: e }) {
258
- return /* @__PURE__ */ m(p, { children: e });
258
+ return /* @__PURE__ */ c(s, { children: e });
259
259
  }
260
260
  P.displayName = O;
261
261
  function F({ children: e }) {
262
- return /* @__PURE__ */ m(p, { children: e });
262
+ return /* @__PURE__ */ c(s, { children: e });
263
263
  }
264
264
  F.displayName = k;
265
265
  function I({ children: e }) {
266
- return /* @__PURE__ */ m(p, { children: e });
266
+ return /* @__PURE__ */ c(s, { children: e });
267
267
  }
268
268
  I.displayName = A;
269
269
  function L(e, t) {
270
270
  let n = null, r = null, i = null;
271
- for (let s of a.toArray(e)) {
272
- if (!o(s)) throw Error(`TabsLayout.Tab "${t}" поддерживает только дочерние элементы TabsLayout.Toolbar, TabsLayout.Content и TabsLayout.Footer.`);
273
- if (M(s, O)) {
271
+ for (let a of u.toArray(e)) {
272
+ if (!d(a)) throw Error(`TabsLayout.Tab "${t}" поддерживает только дочерние элементы TabsLayout.Toolbar, TabsLayout.Content и TabsLayout.Footer.`);
273
+ if (M(a, O)) {
274
274
  if (n) throw Error(`TabsLayout.Tab "${t}" содержит более одного блока TabsLayout.Toolbar.`);
275
- n = s.props;
275
+ n = a.props;
276
276
  continue;
277
277
  }
278
- if (M(s, k)) {
278
+ if (M(a, k)) {
279
279
  if (r) throw Error(`TabsLayout.Tab "${t}" содержит более одного блока TabsLayout.Content.`);
280
- r = s.props;
280
+ r = a.props;
281
281
  continue;
282
282
  }
283
- if (M(s, A)) {
283
+ if (M(a, A)) {
284
284
  if (i) throw Error(`TabsLayout.Tab "${t}" содержит более одного блока TabsLayout.Footer.`);
285
- i = s.props;
285
+ i = a.props;
286
286
  continue;
287
287
  }
288
288
  throw Error(`TabsLayout.Tab "${t}" поддерживает только дочерние элементы TabsLayout.Toolbar, TabsLayout.Content и TabsLayout.Footer.`);
@@ -295,7 +295,7 @@ function L(e, t) {
295
295
  };
296
296
  }
297
297
  function R(e) {
298
- return a.toArray(e).map((e) => {
298
+ return u.toArray(e).map((e) => {
299
299
  if (!M(e, D)) throw Error("TabsLayout принимает только дочерние элементы TabsLayout.Tab.");
300
300
  return {
301
301
  id: e.props.id,
@@ -305,54 +305,54 @@ function R(e) {
305
305
  };
306
306
  });
307
307
  }
308
- var z = ({ children: n, value: r, defaultValue: i, onValueChange: a, className: o, orientation: s = "horizontal", activationMode: l = "manual", mountStrategy: u = "lazy", loop: f = !0, tone: p = "primary", clean: g = !1, "aria-label": _, "aria-labelledby": v }) => {
309
- let S = c(() => R(n), [n]), C = b({
308
+ var z = ({ children: n, value: r, defaultValue: i, onValueChange: o, className: s, orientation: u = "horizontal", activationMode: d = "manual", mountStrategy: f = "lazy", loop: m = !0, tone: h = "primary", clean: g = !1, "aria-label": _, "aria-labelledby": v }) => {
309
+ let S = p(() => R(n), [n]), C = b({
310
310
  items: S,
311
311
  value: r,
312
312
  defaultValue: i,
313
- onValueChange: a,
314
- orientation: s,
315
- activationMode: l,
316
- loop: f
317
- }), E = d(x.tabsContainer, g ? x.clean : e.uiFilledPanel, x[s], t(p), o), D = d(x.panels, x.layoutPanels);
318
- return /* @__PURE__ */ h("div", {
313
+ onValueChange: o,
314
+ orientation: u,
315
+ activationMode: d,
316
+ loop: m
317
+ }), E = a(x.tabsContainer, g ? x.clean : e.uiFilledPanel, x[u], t(h), s), D = a(x.panels, x.layoutPanels);
318
+ return /* @__PURE__ */ l("div", {
319
319
  className: E,
320
- children: [/* @__PURE__ */ m(T, {
320
+ children: [/* @__PURE__ */ c(T, {
321
321
  items: S,
322
322
  state: C,
323
323
  className: x.tabs,
324
324
  ariaLabel: _,
325
325
  ariaLabelledBy: v
326
- }), /* @__PURE__ */ m("div", {
326
+ }), /* @__PURE__ */ c("div", {
327
327
  className: D,
328
328
  children: S.map((e) => {
329
329
  let t = e.id === C.selectedTabId;
330
330
  if (!y({
331
- mountStrategy: u,
331
+ mountStrategy: f,
332
332
  isSelected: t,
333
333
  isVisited: C.isVisited(e.id)
334
334
  })) return null;
335
335
  let n = `${e.toolbar ? "auto " : ""}minmax(0, 1fr)${e.footer ? " auto" : ""}`;
336
- return /* @__PURE__ */ m(w, {
336
+ return /* @__PURE__ */ c(w, {
337
337
  tabId: e.id,
338
338
  isSelected: t,
339
339
  className: x.panel,
340
340
  getTabElementId: C.getTabElementId,
341
341
  getPanelElementId: C.getPanelElementId,
342
- children: /* @__PURE__ */ h("div", {
342
+ children: /* @__PURE__ */ l("div", {
343
343
  className: x.layoutPanel,
344
344
  style: { gridTemplateRows: n },
345
345
  children: [
346
- e.toolbar ? /* @__PURE__ */ m("div", {
347
- className: d(x.layoutSection, e.toolbar.className),
346
+ e.toolbar ? /* @__PURE__ */ c("div", {
347
+ className: a(x.layoutSection, e.toolbar.className),
348
348
  children: e.toolbar.children
349
349
  }) : null,
350
- /* @__PURE__ */ m("div", {
351
- className: d(x.layoutSection, x.layoutContent, e.content.className),
350
+ /* @__PURE__ */ c("div", {
351
+ className: a(x.layoutSection, x.layoutContent, e.content.className),
352
352
  children: e.content.children
353
353
  }),
354
- e.footer ? /* @__PURE__ */ m("div", {
355
- className: d(x.layoutSection, e.footer.className),
354
+ e.footer ? /* @__PURE__ */ c("div", {
355
+ className: a(x.layoutSection, e.footer.className),
356
356
  children: e.footer.children
357
357
  }) : null
358
358
  ]
@@ -1,40 +1,40 @@
1
1
  import { t as e } from "../chunks/ui.module-oRwY3Zli.js";
2
- import { c as t, d as n } from "../chunks/input-DSPKgiCK.js";
3
- import { useImperativeHandle as r, useRef as i, useState as a } from "react";
4
- import { cn as o } from "@ryuzaki13/react-foundation-lib/utils";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { XIcon as ee } from "lucide-react";
2
+ import { c as t, d as n } from "../chunks/input-CuRK9Vbz.js";
3
+ import { cn as r } from "@ryuzaki13/react-foundation-lib/utils";
4
+ import { XIcon as i } from "lucide-react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { useImperativeHandle as s, useRef as c, useState as l } from "react";
7
7
  //#region src/tag-input/lib/joinTagInputAriaIds.ts
8
- function l(...e) {
8
+ function u(...e) {
9
9
  return e.filter(Boolean).join(" ") || void 0;
10
10
  }
11
11
  //#endregion
12
12
  //#region src/tag-input/lib/tagInputDefaults.ts
13
- function te(e) {
13
+ function ee(e) {
14
14
  return e.trim();
15
15
  }
16
- function ne(e) {
16
+ function te(e) {
17
17
  return e;
18
18
  }
19
- function u(e) {
19
+ function d(e) {
20
20
  return `Удалить тег «${e}»`;
21
21
  }
22
- var d = {
22
+ var f = {
23
23
  control: "AoFB3K",
24
24
  tagList: "PvaUEA",
25
25
  tag: "FZ-xEM",
26
26
  tagText: "-RCqfG",
27
27
  removeButton: "ggY643",
28
28
  input: "hiZq-y"
29
- }, f = /[,\r\n]/, p = /[,\r\n]+/;
30
- function m({ ref: m, value: h, onChange: g, label: _, description: v, placeholder: y, size: b, disabled: x, readOnly: S = !1, error: C, onClearError: w, maxTags: T, normalizeTag: E = te, getTagKey: D = ne, addOnBlur: O = !0, getRemoveButtonAriaLabel: re = u, tokensAriaLabel: ie = "Добавленные теги", inputClassName: ae, className: oe, id: se, name: k, form: A, required: ce, maxLength: j, onKeyDown: M, onPaste: N, onBlur: P, onCompositionStart: F, onCompositionEnd: I, "aria-describedby": L, "aria-labelledby": R, ...z }) {
31
- let B = i(null), V = i(null), H = i(!1), [U, W] = a(""), [le, G] = a(""), { controlId: K, labelId: q, descriptionId: ue, errorId: de, describedBy: fe } = n({
32
- id: se,
33
- hasLabel: _ != null,
34
- hasDescription: !!v,
29
+ }, p = /[,\r\n]/, m = /[,\r\n]+/;
30
+ function h({ ref: h, value: g, onChange: _, label: v, description: y, placeholder: ne, size: b, disabled: x, readOnly: S = !1, error: C, onClearError: w, maxTags: T, normalizeTag: E = ee, getTagKey: D = te, addOnBlur: O = !0, getRemoveButtonAriaLabel: k = d, tokensAriaLabel: re = "Добавленные теги", inputClassName: ie, className: ae, id: oe, name: A, form: j, required: se, maxLength: M, onKeyDown: ce, onPaste: N, onBlur: P, onCompositionStart: F, onCompositionEnd: I, "aria-describedby": L, "aria-labelledby": R, ...z }) {
31
+ let B = c(null), V = c(null), H = c(!1), [U, W] = l(""), [le, G] = l(""), { controlId: K, labelId: q, descriptionId: ue, errorId: de, describedBy: fe } = n({
32
+ id: oe,
33
+ hasLabel: v != null,
34
+ hasDescription: !!y,
35
35
  hasError: !!C
36
- }), J = T === void 0 ? Infinity : Math.max(0, Math.floor(T)), Y = x || S, X = l(fe, L), pe = l(q, R);
37
- r(m, () => {
36
+ }), J = T === void 0 ? Infinity : Math.max(0, Math.floor(T)), Y = x || S, X = u(fe, L), pe = u(q, R);
37
+ s(h, () => {
38
38
  let e = B.current;
39
39
  if (!e) throw Error("TagInput: внутренний input недоступен при создании imperative handle.");
40
40
  return e;
@@ -42,11 +42,11 @@ function m({ ref: m, value: h, onChange: g, label: _, description: v, placeholde
42
42
  let Z = (e) => {
43
43
  if (Y) return;
44
44
  w?.();
45
- let t = [...h], n = new Set(t.map((e) => D(e))), r = [], i = 0, a = !1;
45
+ let t = [...g], n = new Set(t.map((e) => D(e))), r = [], i = 0, a = !1;
46
46
  for (let o of e) {
47
47
  let e = E(o);
48
48
  if (!e) continue;
49
- if (j !== void 0 && e.length > j) {
49
+ if (M !== void 0 && e.length > M) {
50
50
  G(`Тег «${e}» длиннее допустимого значения.`);
51
51
  continue;
52
52
  }
@@ -61,85 +61,85 @@ function m({ ref: m, value: h, onChange: g, label: _, description: v, placeholde
61
61
  }
62
62
  n.add(s), t.push(e), r.push(e);
63
63
  }
64
- r.length > 0 ? (g(t), G(r.length === 1 ? `Добавлен тег «${r[0]}».` : `Добавлено тегов: ${r.length}.`)) : a ? G(`Достигнуто максимальное количество тегов: ${J}.`) : i > 0 && G("Такой тег уже добавлен.");
65
- }, Q = () => U ? (Z(U.split(p)), W(""), !0) : !1, $ = (e) => {
64
+ r.length > 0 ? (_(t), G(r.length === 1 ? `Добавлен тег «${r[0]}».` : `Добавлено тегов: ${r.length}.`)) : a ? G(`Достигнуто максимальное количество тегов: ${J}.`) : i > 0 && G("Такой тег уже добавлен.");
65
+ }, Q = () => U ? (Z(U.split(m)), W(""), !0) : !1, $ = (e) => {
66
66
  if (Y) return;
67
- let t = h[e];
68
- t !== void 0 && (g(h.filter((t, n) => n !== e)), w?.(), G(`Удалён тег «${t}».`), B.current?.focus());
67
+ let t = g[e];
68
+ t !== void 0 && (_(g.filter((t, n) => n !== e)), w?.(), G(`Удалён тег «${t}».`), B.current?.focus());
69
69
  }, me = (e) => {
70
- if (M?.(e), !(e.defaultPrevented || e.nativeEvent.isComposing || H.current || Y)) {
70
+ if (ce?.(e), !(e.defaultPrevented || e.nativeEvent.isComposing || H.current || Y)) {
71
71
  if (e.key === "Enter" || e.key === ",") {
72
72
  (Q() || e.key === ",") && e.preventDefault();
73
73
  return;
74
74
  }
75
- e.key === "Backspace" && U.length === 0 && h.length > 0 && (e.preventDefault(), $(h.length - 1));
75
+ e.key === "Backspace" && U.length === 0 && g.length > 0 && (e.preventDefault(), $(g.length - 1));
76
76
  }
77
77
  }, he = (e) => {
78
78
  if (N?.(e), e.defaultPrevented || Y) return;
79
79
  let t = e.clipboardData.getData("text");
80
- if (!f.test(t)) return;
80
+ if (!p.test(t)) return;
81
81
  e.preventDefault();
82
82
  let n = e.currentTarget.selectionStart ?? U.length, r = e.currentTarget.selectionEnd ?? n, i = `${U.slice(0, n)}${t}${U.slice(r)}`;
83
- Z(i.split(p)), W("");
83
+ Z(i.split(m)), W("");
84
84
  };
85
- return /* @__PURE__ */ c(t, {
86
- label: _,
87
- description: v,
85
+ return /* @__PURE__ */ o(t, {
86
+ label: v,
87
+ description: y,
88
88
  disabled: x,
89
- className: oe,
89
+ className: ae,
90
90
  size: b,
91
91
  error: C,
92
92
  controlId: K,
93
93
  labelId: q,
94
94
  descriptionId: ue,
95
95
  errorId: de,
96
- children: [/* @__PURE__ */ c("div", {
96
+ children: [/* @__PURE__ */ o("div", {
97
97
  ref: V,
98
- className: o(e.uiControl, C && e.invalid, d.control),
98
+ className: r(e.uiControl, C && e.invalid, f.control),
99
99
  "data-disabled": x ? "" : void 0,
100
100
  "data-readonly": S ? "" : void 0,
101
101
  "data-invalid": C ? "" : void 0,
102
102
  onClick: () => B.current?.focus(),
103
103
  children: [
104
- h.length > 0 && /* @__PURE__ */ s("ul", {
105
- className: d.tagList,
106
- "aria-label": ie,
107
- children: h.map((e, t) => /* @__PURE__ */ c("li", {
108
- className: d.tag,
109
- children: [/* @__PURE__ */ s("span", {
110
- className: d.tagText,
104
+ g.length > 0 && /* @__PURE__ */ a("ul", {
105
+ className: f.tagList,
106
+ "aria-label": re,
107
+ children: g.map((e, t) => /* @__PURE__ */ o("li", {
108
+ className: f.tag,
109
+ children: [/* @__PURE__ */ a("span", {
110
+ className: f.tagText,
111
111
  children: e
112
- }), !Y && /* @__PURE__ */ s("button", {
112
+ }), !Y && /* @__PURE__ */ a("button", {
113
113
  type: "button",
114
- className: d.removeButton,
114
+ className: f.removeButton,
115
115
  onClick: (e) => {
116
116
  e.stopPropagation(), $(t);
117
117
  },
118
- "aria-label": re(e, t),
119
- children: /* @__PURE__ */ s(ee, { "aria-hidden": "true" })
118
+ "aria-label": k(e, t),
119
+ children: /* @__PURE__ */ a(i, { "aria-hidden": "true" })
120
120
  })]
121
121
  }, `${D(e)}-${t}`))
122
122
  }),
123
- /* @__PURE__ */ s("input", {
123
+ /* @__PURE__ */ a("input", {
124
124
  ...z,
125
125
  ref: B,
126
126
  id: K,
127
- form: A,
127
+ form: j,
128
128
  disabled: x,
129
129
  readOnly: S,
130
- required: ce && h.length === 0,
131
- maxLength: j,
130
+ required: se && g.length === 0,
131
+ maxLength: M,
132
132
  value: U,
133
- placeholder: h.length === 0 ? y : void 0,
133
+ placeholder: g.length === 0 ? ne : void 0,
134
134
  "aria-invalid": !!C || void 0,
135
135
  "aria-labelledby": pe,
136
136
  "aria-describedby": X,
137
- className: o(d.input, ae),
137
+ className: r(f.input, ie),
138
138
  onChange: (e) => {
139
- let t = e.target.value, n = f.test(t);
139
+ let t = e.target.value, n = p.test(t);
140
140
  if (H.current) W(t);
141
141
  else if (n) {
142
- let e = t.split(p), n = f.test(t.at(-1) ?? "") ? "" : e.pop() ?? "";
142
+ let e = t.split(m), n = p.test(t.at(-1) ?? "") ? "" : e.pop() ?? "";
143
143
  Z(e), W(n);
144
144
  } else W(t);
145
145
  (H.current || !n) && w?.();
@@ -158,15 +158,15 @@ function m({ ref: m, value: h, onChange: g, label: _, description: v, placeholde
158
158
  !e.defaultPrevented && !n && O && !Y && Q();
159
159
  }
160
160
  }),
161
- k && h.map((e, t) => /* @__PURE__ */ s("input", {
161
+ A && g.map((e, t) => /* @__PURE__ */ a("input", {
162
162
  type: "hidden",
163
- name: k,
163
+ name: A,
164
164
  value: e,
165
- form: A,
165
+ form: j,
166
166
  disabled: x
167
167
  }, `${D(e)}-${t}`))
168
168
  ]
169
- }), /* @__PURE__ */ s("span", {
169
+ }), /* @__PURE__ */ a("span", {
170
170
  className: "visuallyHidden",
171
171
  "aria-live": "polite",
172
172
  "aria-atomic": "true",
@@ -175,6 +175,6 @@ function m({ ref: m, value: h, onChange: g, label: _, description: v, placeholde
175
175
  });
176
176
  }
177
177
  //#endregion
178
- export { m as TagInput };
178
+ export { h as TagInput };
179
179
 
180
180
  //# sourceMappingURL=index.js.map