@sberbusiness/triplex-next 0.1.9 → 1.1.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 (212) hide show
  1. package/chunks/AlertProcessSpoiler-Dp7FRT9y.js +39 -0
  2. package/chunks/Card.module-Ddt7TQ9Z.js +17 -0
  3. package/chunks/DropdownListItem-y6Rvj_dd.js +56 -0
  4. package/chunks/DropdownMobile.module-DrQkghxs.js +19 -0
  5. package/chunks/Footer.module-CKfl241m.js +11 -0
  6. package/chunks/FormFieldInput-apk1b0w6.js +63 -0
  7. package/chunks/HeaderLayoutSidebar.module-DTXnksBK.js +9 -0
  8. package/chunks/HeaderTabs.module-DVh6MotJ.js +9 -0
  9. package/chunks/HeaderTitle.module-DOeVL9zC.js +9 -0
  10. package/chunks/{ListItemControlsButton-BtMEMrGK.js → ListItemControlsButton-Cn3Vmrsn.js} +8 -8
  11. package/chunks/ListItemTail.module-BnbT61OM.js +12 -0
  12. package/chunks/ListMasterFooter.module-C6QFamKQ.js +10 -0
  13. package/chunks/Overlay.module-BTSQ5G6t.js +18 -0
  14. package/chunks/Page.module-DfMBQJob.js +16 -0
  15. package/chunks/TabsExtended.module-okOlTNQG.js +13 -0
  16. package/chunks/{TabsExtendedUtils-BOHZcNx8.js → TabsExtendedUtils-NCwWiX7O.js} +6 -6
  17. package/chunks/TooltipDesktop.module-DTbnIWo1.js +19 -0
  18. package/chunks/UploadZoneInput-R9729LZY.js +33 -0
  19. package/chunks/utils-B0khB-Lq.js +36 -0
  20. package/chunks/{vendor-CF2m175I.js → vendor-D-uL_icH.js} +38 -34
  21. package/components/Alert/AlertContext/AlertContext.js +10 -10
  22. package/components/Alert/AlertProcess/AlertProcess.js +3 -3
  23. package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
  24. package/components/Body/Body.js +6 -6
  25. package/components/Button/Button.js +95 -10
  26. package/components/Button/ButtonBase.js +1 -1
  27. package/components/Button/ButtonDropdown.js +184 -23
  28. package/components/Button/ButtonDropdownExtended.js +50 -6
  29. package/components/Button/ButtonIcon.js +2 -2
  30. package/components/Button/enums.js +5 -4
  31. package/components/Button/index.js +14 -12
  32. package/components/Card/CardAction.js +26 -26
  33. package/components/Card/CardStatic.js +3 -3
  34. package/components/Card/components/CardContent/CardContent.js +2 -2
  35. package/components/Card/components/CardContent/components/CardContentBody.js +2 -2
  36. package/components/Card/components/CardContent/components/CardContentFooter.js +2 -2
  37. package/components/Card/components/CardContent/components/CardContentHeader.js +2 -2
  38. package/components/Card/components/CardMedia.js +2 -2
  39. package/components/Card/utils.js +1 -1
  40. package/components/Checkbox/Checkbox.js +7 -7
  41. package/components/Checkbox/CheckboxXGroup.js +11 -11
  42. package/components/Checkbox/CheckboxYGroup.js +2 -2
  43. package/components/Col/Col.js +146 -146
  44. package/components/DesignTokens/DesignTokenUtils.js +2 -2
  45. package/components/DesignTokens/DesignTokensComponents.js +9 -7
  46. package/components/DesignTokens/DesignTokensComponentsThemeDark.js +15 -13
  47. package/components/DesignTokens/components/Button.js +27 -0
  48. package/components/DesignTokens/components/FormField.js +22 -4
  49. package/components/DesignTokens/components/Island.js +26 -0
  50. package/components/DesignTokens/components/index.js +17 -14
  51. package/components/Dropdown/Dropdown.js +22 -7
  52. package/components/Dropdown/desktop/DropdownDesktop.js +94 -18
  53. package/components/Dropdown/desktop/DropdownList.js +65 -94
  54. package/components/Dropdown/desktop/DropdownListItem.js +2 -2
  55. package/components/Dropdown/index.js +27 -25
  56. package/components/Dropdown/mobile/DropdownMobile.js +2 -2
  57. package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
  58. package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
  59. package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
  60. package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
  61. package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
  62. package/components/Dropdown/mobile/DropdownMobileInput.js +2 -2
  63. package/components/Dropdown/mobile/DropdownMobileList.js +2 -2
  64. package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
  65. package/components/Footer/Footer.js +3 -3
  66. package/components/Footer/components/FooterDescription.js +2 -2
  67. package/components/Footer/components/FooterDescriptionContent.js +2 -2
  68. package/components/Footer/components/FooterDescriptionControls.js +2 -2
  69. package/components/FormField/FormField.js +53 -52
  70. package/components/FormField/FormFieldContext.js +8 -8
  71. package/components/FormField/components/FormFieldClear.js +13 -12
  72. package/components/FormField/components/FormFieldCounter.js +5 -5
  73. package/components/FormField/components/FormFieldDescription.js +5 -5
  74. package/components/FormField/components/FormFieldInput.js +4 -3
  75. package/components/FormField/components/FormFieldLabel.js +32 -31
  76. package/components/FormField/components/FormFieldMaskedInput.js +102 -92
  77. package/components/FormField/components/FormFieldPostfix.js +7 -7
  78. package/components/FormField/components/FormFieldPrefix.js +5 -5
  79. package/components/FormField/components/FormFieldTarget.js +49 -0
  80. package/components/FormField/components/FormFieldTextarea.js +25 -24
  81. package/components/FormField/enums.js +3 -2
  82. package/components/FormField/index.js +19 -16
  83. package/components/FormField/types.js +2 -0
  84. package/components/Header/Header.js +11 -11
  85. package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +2 -2
  86. package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +2 -2
  87. package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +2 -2
  88. package/components/Header/components/HeaderSubheader/HeaderSubheader.js +6 -6
  89. package/components/Header/components/HeaderTabs/HeaderTabs.js +2 -2
  90. package/components/Header/components/HeaderTabs/HeaderTabsContent.js +2 -2
  91. package/components/Header/components/HeaderTabs/HeaderTabsControls.js +2 -2
  92. package/components/Header/components/HeaderTitle/HeaderTitle.js +2 -2
  93. package/components/Header/components/HeaderTitle/HeaderTitleContent.js +2 -2
  94. package/components/Header/components/HeaderTitle/HeaderTitleControls.js +2 -2
  95. package/components/Island/Island.js +78 -0
  96. package/components/Island/components/IslandBody.js +10 -0
  97. package/components/Island/components/IslandFooter.js +10 -0
  98. package/components/Island/components/IslandHeader.js +10 -0
  99. package/components/Island/enums.js +7 -0
  100. package/components/Island/index.js +9 -0
  101. package/components/KeyDownListener/ComposedKeyDownListener.js +13 -0
  102. package/components/KeyDownListener/KeyDownListener.js +27 -0
  103. package/components/KeyDownListener/index.js +7 -0
  104. package/components/Link/Link.js +27 -27
  105. package/components/List/List.js +3 -3
  106. package/components/List/ListSortable.js +1 -1
  107. package/components/List/components/ListEmptyState.js +6 -6
  108. package/components/List/components/ListItem.js +1 -1
  109. package/components/List/components/ListItemContent.js +7 -7
  110. package/components/List/components/ListItemControls.js +7 -7
  111. package/components/List/components/ListItemControlsButton.js +2 -2
  112. package/components/List/components/ListItemControlsButtonDropdown.js +98 -15
  113. package/components/List/components/ListItemLoading.js +2 -2
  114. package/components/List/components/ListItemSelectable.js +9 -9
  115. package/components/List/components/ListItemTable.js +29 -19
  116. package/components/List/components/ListItemTailLeft.js +2 -2
  117. package/components/List/components/ListItemTailRight.js +2 -2
  118. package/components/List/components/ListSortableItem.js +37 -18
  119. package/components/List/components/ListSortableItemControls.js +2 -2
  120. package/components/List/components/ListSortableItemTarget.js +6 -6
  121. package/components/List/index.js +22 -20
  122. package/components/ListMaster/ListMaster.js +1 -1
  123. package/components/ListMaster/components/ListMasterBody.js +1 -1
  124. package/components/ListMaster/components/ListMasterChipGroup.js +5 -5
  125. package/components/ListMaster/components/ListMasterFooter.js +2 -2
  126. package/components/ListMaster/components/ListMasterFooterControls.js +2 -2
  127. package/components/ListMaster/components/ListMasterFooterDescription.js +2 -2
  128. package/components/ListMaster/components/ListMasterHeader.js +7 -7
  129. package/components/ListMaster/components/SelectionControls.js +3 -3
  130. package/components/Loader/LoaderMiddle/LoaderMiddle.js +7 -7
  131. package/components/Loader/LoaderSmall/LoaderSmall.js +16 -16
  132. package/components/LoaderWidget/LoaderWidget.js +9 -9
  133. package/components/Overlay/Overlay.js +2 -2
  134. package/components/Overlay/OverlayMask.js +2 -2
  135. package/components/Overlay/OverlayPanel.js +2 -2
  136. package/components/Page/Page.js +2 -2
  137. package/components/Page/components/BodyPage.js +2 -2
  138. package/components/Page/components/FooterPage.js +2 -2
  139. package/components/Page/components/HeaderPage.js +2 -2
  140. package/components/Pagination/components/PaginationExtended.js +3 -3
  141. package/components/Pagination/components/PaginationNavigationButton.js +6 -6
  142. package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
  143. package/components/Pagination/components/PaginationPageButton.js +6 -6
  144. package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
  145. package/components/Pagination/components/PaginationSelect.js +12 -12
  146. package/components/Pagination/utils/paginationUtils.js +10 -10
  147. package/components/Radio/Radio.js +3 -3
  148. package/components/Radio/RadioXGroup.js +10 -10
  149. package/components/Radio/RadioYGroup.js +9 -9
  150. package/components/Row/Row.js +10 -10
  151. package/components/SegmentedControl/SegmentedControl.js +64 -7
  152. package/components/SegmentedControl/SegmentedControlContext.js +13 -0
  153. package/components/SegmentedControl/SegmentedControlSegment.js +68 -8
  154. package/components/SegmentedControl/index.js +6 -6
  155. package/components/SelectExtendedField/SelectExtendedField.js +57 -0
  156. package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +25 -0
  157. package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +86 -0
  158. package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +101 -0
  159. package/components/SelectExtendedField/index.js +9 -0
  160. package/components/Skeleton/Skeleton.js +10 -10
  161. package/components/SwipeableArea/SwipeableArea.js +13 -13
  162. package/components/TabsExtended/TabsExtended.js +7 -7
  163. package/components/TabsExtended/TabsExtendedUtils.js +1 -1
  164. package/components/TabsExtended/components/TabsExtendedContent.js +11 -11
  165. package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
  166. package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
  167. package/components/TabsExtended/components/TabsExtendedTabButton.js +2 -2
  168. package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
  169. package/components/TabsExtended/types.js +2 -0
  170. package/components/TextField/MaskedField.js +6 -89
  171. package/components/TextField/TextField.js +6 -89
  172. package/components/TextField/TextFieldBase.js +30 -89
  173. package/components/TextField/index.js +4 -3
  174. package/components/ThemeProvider/ThemeProvider.js +8 -8
  175. package/components/ThemeProvider/components/ThemeProviderView.js +8 -8
  176. package/components/Tooltip/components/common/TooltipBody.js +7 -7
  177. package/components/Tooltip/components/common/TooltipLink.js +10 -10
  178. package/components/Tooltip/components/common/TooltipXButton.js +1 -1
  179. package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +2 -2
  180. package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +2 -2
  181. package/components/Tooltip/components/mobile/TooltipMobile.js +10 -10
  182. package/components/Typography/Caption.js +15 -15
  183. package/components/Typography/Text.js +24 -24
  184. package/components/Typography/Title.js +13 -13
  185. package/components/Typography/utils.js +1 -1
  186. package/components/UploadZone/UploadZone.js +109 -7
  187. package/components/UploadZone/UploadZoneContext.js +11 -0
  188. package/components/UploadZone/components/UploadZoneInput.js +5 -140
  189. package/components/UploadZone/index.js +2 -3
  190. package/components/UploadZone/types.js +2 -0
  191. package/components/index.js +279 -248
  192. package/index.d.ts +212 -27
  193. package/index.js +277 -246
  194. package/package.json +13 -1
  195. package/styles/triplex-next.css +354 -333
  196. package/chunks/AlertProcessSpoiler-BPbAJJFo.js +0 -39
  197. package/chunks/Card.module-Oqawy8hF.js +0 -17
  198. package/chunks/DropdownListItem-CW2MmFpw.js +0 -56
  199. package/chunks/DropdownMobile.module-DyunEp10.js +0 -19
  200. package/chunks/Footer.module-o57OEPdy.js +0 -11
  201. package/chunks/FormFieldInput-C2qWOLr3.js +0 -62
  202. package/chunks/HeaderLayoutSidebar.module-CzpXvDdH.js +0 -9
  203. package/chunks/HeaderTabs.module-CC0WAcoC.js +0 -9
  204. package/chunks/HeaderTitle.module-CH7eRK8R.js +0 -9
  205. package/chunks/ListItemTail.module-BBV_gvLd.js +0 -12
  206. package/chunks/ListMasterFooter.module-Cw1r4pz-.js +0 -10
  207. package/chunks/Overlay.module-08zZh8Y9.js +0 -18
  208. package/chunks/Page.module-Ccvf_vDR.js +0 -16
  209. package/chunks/TabsExtended.module-yT8L2ZYS.js +0 -13
  210. package/chunks/TooltipDesktop.module-CvcpQSlC.js +0 -19
  211. package/chunks/index-CAZEh1iw.js +0 -931
  212. package/chunks/utils-9a4dp5-W.js +0 -36
@@ -2,8 +2,8 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import t from "react";
3
3
  import { ButtonIcon as m } from "../../Button/ButtonIcon.js";
4
4
  import { CrossStrokeSrvIcon16 as l } from "@sberbusiness/icons-next";
5
- import { c as p } from "../../../chunks/vendor-CF2m175I.js";
6
- import { s as i } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
5
+ import { c as p } from "../../../chunks/vendor-D-uL_icH.js";
6
+ import { s as i } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
7
7
  const a = t.forwardRef(
8
8
  ({ className: r, ...e }, s) => /* @__PURE__ */ o(m, { className: p(i.dropdownMobileClose, r), ref: s, ...e, children: /* @__PURE__ */ o(l, { paletteIndex: 5 }) })
9
9
  );
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { c as a } from "../../../chunks/vendor-CF2m175I.js";
4
- import { s as i } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
3
+ import { c as a } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { s as i } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
5
5
  const p = m.forwardRef(
6
6
  ({ children: o, className: r, ...e }, t) => /* @__PURE__ */ s("div", { className: a(i.dropdownMobileFooter, r), ref: t, ...e, children: o })
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { c as p } from "../../../chunks/vendor-CF2m175I.js";
4
- import { s } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
3
+ import { c as p } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { s } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
5
5
  const f = m.forwardRef(
6
6
  ({ children: e, className: a, closeButton: r, ...d }, o) => /* @__PURE__ */ i("div", { className: p(s.dropdownMobileHeader, a), ref: o, ...d, children: [
7
7
  e,
@@ -1,8 +1,8 @@
1
1
  import { jsxs as j, jsx as c } from "react/jsx-runtime";
2
2
  import y, { useState as l, useEffect as d } from "react";
3
- import { c as n } from "../../../chunks/vendor-CF2m175I.js";
3
+ import { c as n } from "../../../chunks/vendor-D-uL_icH.js";
4
4
  import { useToken as B } from "../../ThemeProvider/useToken.js";
5
- import { s as e } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
5
+ import { s as e } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
6
6
  const C = y.forwardRef(
7
7
  ({
8
8
  children: f,
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import s from "react";
3
- import { c as e } from "../../../chunks/vendor-CF2m175I.js";
4
- import { s as m } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
3
+ import { c as e } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { s as m } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
5
5
  const a = s.forwardRef(
6
6
  ({ className: o, ...r }, p) => /* @__PURE__ */ t("input", { className: e(m.dropdownMobileInput, o), ...r, ref: p })
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import e from "react";
3
- import { c as l } from "../../../chunks/vendor-CF2m175I.js";
4
- import { s as m } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
3
+ import { c as l } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { s as m } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
5
5
  const a = e.forwardRef(
6
6
  ({ children: o, className: r, ...s }, i) => /* @__PURE__ */ t(
7
7
  "div",
@@ -1,9 +1,9 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
2
  import l from "react";
3
- import { c as x } from "../../../chunks/vendor-CF2m175I.js";
3
+ import { c as x } from "../../../chunks/vendor-D-uL_icH.js";
4
4
  import { Text as w } from "../../Typography/Text.js";
5
5
  import { ETextSize as b } from "../../Typography/enums.js";
6
- import { s } from "../../../chunks/DropdownMobile.module-DyunEp10.js";
6
+ import { s } from "../../../chunks/DropdownMobile.module-DrQkghxs.js";
7
7
  const y = l.forwardRef(
8
8
  ({ children: o, className: e, id: B, onClick: t, onSelect: r, selected: i, ...m }, a) => {
9
9
  const p = (d) => {
@@ -1,8 +1,8 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import a from "react";
3
3
  import { FooterDescription as p } from "./components/FooterDescription.js";
4
- import { c } from "../../chunks/vendor-CF2m175I.js";
5
- import { s as o } from "../../chunks/Footer.module-o57OEPdy.js";
4
+ import { c } from "../../chunks/vendor-D-uL_icH.js";
5
+ import { s as o } from "../../chunks/Footer.module-CKfl241m.js";
6
6
  import "./components/FooterDescriptionControls.js";
7
7
  import "./components/FooterDescriptionContent.js";
8
8
  const f = Object.assign(
@@ -12,7 +12,7 @@ const f = Object.assign(
12
12
  {
13
13
  className: c(o.footer, { [o.sticky]: !!e }, r),
14
14
  ...i,
15
- "data-tx": "0.1.9",
15
+ "data-tx": "1.1.0",
16
16
  ref: s,
17
17
  children: t
18
18
  }
@@ -2,8 +2,8 @@ import { jsx as i } from "react/jsx-runtime";
2
2
  import s from "react";
3
3
  import { FooterDescriptionContent as n } from "./FooterDescriptionContent.js";
4
4
  import { FooterDescriptionControls as m } from "./FooterDescriptionControls.js";
5
- import { c as p } from "../../../chunks/vendor-CF2m175I.js";
6
- import { s as c } from "../../../chunks/Footer.module-o57OEPdy.js";
5
+ import { c as p } from "../../../chunks/vendor-D-uL_icH.js";
6
+ import { s as c } from "../../../chunks/Footer.module-CKfl241m.js";
7
7
  const f = Object.assign(
8
8
  s.forwardRef(function({ children: o, className: t, ...r }, e) {
9
9
  return /* @__PURE__ */ i("div", { className: p(c.footerDescription, t), ...r, ref: e, children: o });
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { c as m } from "../../../chunks/vendor-CF2m175I.js";
4
- import { s as n } from "../../../chunks/Footer.module-o57OEPdy.js";
3
+ import { c as m } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { s as n } from "../../../chunks/Footer.module-CKfl241m.js";
5
5
  const a = i.forwardRef(
6
6
  ({ children: o, className: t, ...r }, e) => /* @__PURE__ */ s("div", { className: m(n.footerDescriptionContent, t), ...r, ref: e, children: o })
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { c as m } from "../../../chunks/vendor-CF2m175I.js";
4
- import { s as a } from "../../../chunks/Footer.module-o57OEPdy.js";
3
+ import { c as m } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { s as a } from "../../../chunks/Footer.module-CKfl241m.js";
5
5
  const p = i.forwardRef(
6
6
  ({ children: o, className: r, ...t }, s) => /* @__PURE__ */ e("div", { className: m(a.footerDescriptionControls, r), ...t, ref: s, children: o })
7
7
  );
@@ -1,76 +1,77 @@
1
- import { jsx as f } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { useState as e } from "react";
3
- import { FormFieldContext as E } from "./FormFieldContext.js";
3
+ import { FormFieldContext as G } from "./FormFieldContext.js";
4
4
  import { TARGET_PADDING_X_DEFAULT as _ } from "./consts.js";
5
- import { c as G } from "../../chunks/vendor-CF2m175I.js";
6
- import { EFormFieldSize as T } from "./enums.js";
7
- const y = "formField__622ac953", I = "disabled__70fb53a5", N = "active__d6ce1717", R = "error__5d88cf62", t = {
8
- formField: y,
9
- disabled: I,
10
- active: N,
11
- error: R,
12
- "size-sm": "size-sm__64b9b1f5",
13
- "size-md": "size-md__90671c7c",
14
- "size-lg": "size-lg__4e576499"
15
- }, V = ({
16
- children: n,
17
- className: F,
18
- disabled: d,
19
- error: p,
5
+ import { c as I } from "../../chunks/vendor-D-uL_icH.js";
6
+ import { EFormFieldSize as N, EFormFieldStatus as r } from "./enums.js";
7
+ const P = "formField__9a74ebe8", S = "disabled__4388a233", T = "active__b089df13", L = "error__402055fd", u = "warning__f87ab909", i = {
8
+ formField: P,
9
+ disabled: S,
10
+ active: T,
11
+ error: L,
12
+ warning: u,
13
+ "size-sm": "size-sm__eb9869a4",
14
+ "size-md": "size-md__450c5a48",
15
+ "size-lg": "size-lg__96a2c9be"
16
+ }, O = ({
17
+ children: F,
18
+ className: p,
19
+ status: t = r.DEFAULT,
20
20
  onMouseEnter: s,
21
- onMouseLeave: i,
21
+ onMouseLeave: d,
22
22
  style: x,
23
- size: o = T.LG,
24
- ...h
23
+ size: o = N.LG,
24
+ ...b
25
25
  }) => {
26
- const [l, v] = e(!1), [b, c] = e(!1), [z, g] = e(""), [a, u] = e(_), [m, P] = e(_), [W, A] = e(!1), B = (r) => {
27
- c(!0), s == null || s(r);
28
- }, D = (r) => {
29
- c(!1), i == null || i(r);
26
+ const [l, g] = e(!1), [h, c] = e(!1), [v, E] = e(""), [m, z] = e(_), [f, A] = e(_), [D, R] = e(!1), W = (a) => {
27
+ c(!0), s == null || s(a);
28
+ }, w = (a) => {
29
+ c(!1), d == null || d(a);
30
30
  };
31
- return /* @__PURE__ */ f(
32
- E.Provider,
31
+ return /* @__PURE__ */ n(
32
+ G.Provider,
33
33
  {
34
34
  value: {
35
- disabled: !!d,
35
+ status: t,
36
36
  focused: l,
37
- hovered: b,
38
- id: z,
39
- postfixWidth: a,
40
- prefixWidth: m,
41
- setFocused: v,
42
- setId: g,
43
- setPostfixWidth: u,
44
- setPrefixWidth: P,
45
- setValueExist: A,
46
- valueExist: W,
37
+ hovered: h,
38
+ id: v,
39
+ postfixWidth: m,
40
+ prefixWidth: f,
41
+ setFocused: g,
42
+ setId: E,
43
+ setPostfixWidth: z,
44
+ setPrefixWidth: A,
45
+ setValueExist: R,
46
+ valueExist: D,
47
47
  size: o
48
48
  },
49
- children: /* @__PURE__ */ f(
49
+ children: /* @__PURE__ */ n(
50
50
  "div",
51
51
  {
52
- className: G(
53
- t.formField,
52
+ className: I(
53
+ i.formField,
54
54
  {
55
- [t.active]: l,
56
- [t.disabled]: !!d,
57
- [t.error]: !!p,
58
- [t[`size-${o}`]]: o
55
+ [i.active]: l,
56
+ [i.disabled]: t === r.DISABLED,
57
+ [i.error]: t === r.ERROR,
58
+ [i.warning]: t === r.WARNING,
59
+ [i[`size-${o}`]]: o
59
60
  },
60
- F
61
+ p
61
62
  ),
62
- onMouseEnter: B,
63
- onMouseLeave: D,
64
- "data-tx": "0.1.9",
65
- style: { paddingLeft: m, paddingRight: a, ...x },
66
- ...h,
67
- children: n
63
+ onMouseEnter: W,
64
+ onMouseLeave: w,
65
+ "data-tx": "1.1.0",
66
+ style: { paddingLeft: f, paddingRight: m, ...x },
67
+ ...b,
68
+ children: F
68
69
  }
69
70
  )
70
71
  }
71
72
  );
72
73
  };
73
74
  export {
74
- V as FormField
75
+ O as FormField
75
76
  };
76
77
  //# sourceMappingURL=FormField.js.map
@@ -1,7 +1,7 @@
1
- import e from "react";
2
- import { EFormFieldSize as t } from "./enums.js";
3
- const i = {
4
- disabled: !1,
1
+ import t from "react";
2
+ import { EFormFieldSize as e, EFormFieldStatus as i } from "./enums.js";
3
+ const s = {
4
+ status: i.DEFAULT,
5
5
  focused: !1,
6
6
  hovered: !1,
7
7
  id: "",
@@ -18,10 +18,10 @@ const i = {
18
18
  setValueExist: () => {
19
19
  },
20
20
  valueExist: !1,
21
- size: t.MD
22
- }, d = e.createContext(i);
21
+ size: e.MD
22
+ }, r = t.createContext(s);
23
23
  export {
24
- d as FormFieldContext,
25
- i as initialFormFieldContext
24
+ r as FormFieldContext,
25
+ s as initialFormFieldContext
26
26
  };
27
27
  //# sourceMappingURL=FormFieldContext.js.map
@@ -2,24 +2,25 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import u, { useContext as h } from "react";
3
3
  import { CrossStrokeSrvIcon16 as x } from "@sberbusiness/icons-next";
4
4
  import { FormFieldContext as C } from "../FormFieldContext.js";
5
- import { c as _ } from "../../../chunks/vendor-CF2m175I.js";
6
- const w = "formFieldClear__f9c1039c", v = "shown__5bc8e54c", s = {
7
- formFieldClear: w,
5
+ import { c as _ } from "../../../chunks/vendor-D-uL_icH.js";
6
+ import { EFormFieldStatus as w } from "../enums.js";
7
+ const S = "formFieldClear__8a344304", v = "shown__db71aebe", t = {
8
+ formFieldClear: S,
8
9
  shown: v
9
10
  }, b = u.forwardRef(
10
- ({ className: t, onClick: e, ...l }, a) => {
11
- const { disabled: c, focused: m, hovered: d, id: n, valueExist: i } = h(C), f = (F) => {
12
- const o = document.querySelector(`#${n}`);
13
- o && o.focus(), e == null || e(F);
14
- }, p = _(
15
- s.formFieldClear,
11
+ ({ className: s, onClick: e, ...a }, l) => {
12
+ const { status: m, focused: d, hovered: n, id: i, valueExist: c } = h(C), f = (p) => {
13
+ const o = document.querySelector(`#${i}`);
14
+ o && o.focus(), e == null || e(p);
15
+ }, F = _(
16
+ t.formFieldClear,
16
17
  "hoverable",
17
18
  {
18
- [s.shown]: i && !c && (m || d)
19
+ [t.shown]: c && m !== w.DISABLED && (d || n)
19
20
  },
20
- t
21
+ s
21
22
  );
22
- return /* @__PURE__ */ r("span", { className: p, ref: a, onClick: f, ...l, children: /* @__PURE__ */ r(x, { paletteIndex: 5 }) });
23
+ return /* @__PURE__ */ r("span", { className: F, ref: l, onClick: f, ...a, children: /* @__PURE__ */ r(x, { paletteIndex: 5 }) });
23
24
  }
24
25
  );
25
26
  b.displayName = "FormFieldClear";
@@ -1,16 +1,16 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { useContext as i, useEffect as m } from "react";
3
3
  import { FormFieldDescriptionContext as n } from "../FormFieldDescriptionContext.js";
4
- const s = "formFieldCounter__3ad41a89", u = {
4
+ const s = "formFieldCounter__526f40fd", f = {
5
5
  formFieldCounter: s
6
- }, d = ({ children: o, ...e }) => {
6
+ }, u = ({ children: o, ...e }) => {
7
7
  const { setWithCounter: t } = i(n);
8
8
  return m(() => {
9
9
  t(!0);
10
- }, []), /* @__PURE__ */ r("div", { className: u.formFieldCounter, ...e, children: o });
10
+ }, []), /* @__PURE__ */ r("div", { className: f.formFieldCounter, ...e, children: o });
11
11
  };
12
- d.displayName = "FormFieldCounter";
12
+ u.displayName = "FormFieldCounter";
13
13
  export {
14
- d as FormFieldCounter
14
+ u as FormFieldCounter
15
15
  };
16
16
  //# sourceMappingURL=FormFieldCounter.js.map
@@ -1,13 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useState as n } from "react";
3
- import { c as m } from "../../../chunks/vendor-CF2m175I.js";
4
- import { FormFieldDescriptionContext as c } from "../FormFieldDescriptionContext.js";
5
- const l = "formFieldDescription__a30304e0", p = "withCounter__6ef00bd3", e = {
3
+ import { c } from "../../../chunks/vendor-D-uL_icH.js";
4
+ import { FormFieldDescriptionContext as m } from "../FormFieldDescriptionContext.js";
5
+ const l = "formFieldDescription__b55385b5", p = "withCounter__0fcb9498", i = {
6
6
  formFieldDescription: l,
7
7
  withCounter: p
8
- }, d = ({ children: i, ...r }) => {
8
+ }, d = ({ children: r, ...e }) => {
9
9
  const [o, s] = n(!1);
10
- return /* @__PURE__ */ t(c.Provider, { value: { withCounter: o, setWithCounter: s }, children: /* @__PURE__ */ t("div", { className: m(e.formFieldDescription, { [e.withCounter]: o }), ...r, children: i }) });
10
+ return /* @__PURE__ */ t(m.Provider, { value: { withCounter: o, setWithCounter: s }, children: /* @__PURE__ */ t("div", { className: c(i.formFieldDescription, { [i.withCounter]: o }), ...e, children: r }) });
11
11
  };
12
12
  d.displayName = "FormFieldDescription";
13
13
  export {
@@ -1,9 +1,10 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../FormFieldContext.js";
4
- import "../../../chunks/vendor-CF2m175I.js";
5
- import { F } from "../../../chunks/FormFieldInput-C2qWOLr3.js";
4
+ import "../../../chunks/vendor-D-uL_icH.js";
5
+ import { F as e } from "../../../chunks/FormFieldInput-apk1b0w6.js";
6
+ import "../enums.js";
6
7
  export {
7
- F as FormFieldInput
8
+ e as FormFieldInput
8
9
  };
9
10
  //# sourceMappingURL=FormFieldInput.js.map
@@ -1,42 +1,43 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import g, { useContext as z, useState as u, useEffect as T } from "react";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import p, { useContext as T, useState as g, useEffect as E } from "react";
3
3
  import { FormFieldContext as h } from "../FormFieldContext.js";
4
- import { TARGET_PADDING_X_DEFAULT as i } from "../consts.js";
5
- import { c as N } from "../../../chunks/vendor-CF2m175I.js";
6
- const y = "formFieldLabel__5fa04130", E = "floating__aed9f33a", A = "formFieldLabelText__aa0cc5c8", D = "disabled__70fb53a5", e = {
7
- formFieldLabel: y,
8
- "size-sm": "size-sm__64b9b1f5",
9
- "size-md": "size-md__90671c7c",
10
- "size-lg": "size-lg__4e576499",
11
- floating: E,
12
- formFieldLabelText: A,
13
- disabled: D
14
- }, R = g.forwardRef(
15
- ({ children: o, className: d, style: f, ...m }, r) => {
16
- const { disabled: c, focused: l, id: n, prefixWidth: b, postfixWidth: _, size: s, valueExist: t } = z(h), [F, x] = u(!1);
17
- T(() => {
18
- x(l || t);
19
- }, [l, t]);
20
- const L = N(
21
- e.formFieldLabel,
4
+ import { TARGET_PADDING_X_DEFAULT as m } from "../consts.js";
5
+ import { k as D, c as N } from "../../../chunks/vendor-D-uL_icH.js";
6
+ import { EFormFieldStatus as y } from "../enums.js";
7
+ const A = "formFieldLabel__e3f9fe36", R = "floating__d7dd987e", S = "formFieldLabelText__5500a192", C = "disabled__4388a233", s = {
8
+ formFieldLabel: A,
9
+ "size-sm": "size-sm__eb9869a4",
10
+ "size-md": "size-md__450c5a48",
11
+ "size-lg": "size-lg__96a2c9be",
12
+ floating: R,
13
+ formFieldLabelText: S,
14
+ disabled: C
15
+ }, G = p.forwardRef(
16
+ ({ children: f, className: r, style: c, floating: e, ...n }, F) => {
17
+ const { status: _, focused: t, id: b, prefixWidth: L, postfixWidth: x, size: i, valueExist: a } = T(h), [l, o] = g(!1);
18
+ E(() => {
19
+ !D(e) && e !== l ? o(e) : e !== l && o(t || a);
20
+ }, [t, a, e, l]);
21
+ const u = N(
22
+ s.formFieldLabel,
22
23
  {
23
- [e.disabled]: c,
24
- [e.floating]: F,
25
- [e[`size-${s}`]]: s
24
+ [s.disabled]: _ === y.DISABLED,
25
+ [s.floating]: l,
26
+ [s[`size-${i}`]]: i
26
27
  },
27
- d
28
- ), p = {
28
+ r
29
+ ), z = {
29
30
  // Левая позиция элемента. Когда label по-середине инпута, позиция учитывает иконки по краям, когда сверху, позиция на все ширину поля ввода.
30
- left: b || i,
31
+ left: L || m,
31
32
  // Правая позиция элемента. Когда label по-середине инпута, позиция учитывает иконки по краям, когда сверху, позиция на все ширину поля ввода.
32
- right: _ || i,
33
- ...f
33
+ right: x || m,
34
+ ...c
34
35
  };
35
- return /* @__PURE__ */ a("label", { className: L, ref: r, htmlFor: n, ...m, style: p, children: /* @__PURE__ */ a("span", { className: e.formFieldLabelText, children: o }) });
36
+ return /* @__PURE__ */ d("label", { className: u, ref: F, htmlFor: b, ...n, style: z, children: /* @__PURE__ */ d("span", { className: s.formFieldLabelText, children: f }) });
36
37
  }
37
38
  );
38
- R.displayName = "FormFieldLabel";
39
+ G.displayName = "FormFieldLabel";
39
40
  export {
40
- R as FormFieldLabel
41
+ G as FormFieldLabel
41
42
  };
42
43
  //# sourceMappingURL=FormFieldLabel.js.map