@sberbusiness/triplex-next 1.0.0 → 1.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 (209) hide show
  1. package/chunks/{AlertProcessSpoiler-JRcPtVtX.js → AlertProcessSpoiler-Caa0745n.js} +11 -11
  2. package/chunks/Card.module-BRANBAxP.js +17 -0
  3. package/chunks/{DropdownListItem-Be_BBAWh.js → DropdownListItem-DIIAnvmw.js} +17 -17
  4. package/chunks/DropdownMobile.module-BUeZuAYr.js +19 -0
  5. package/chunks/Footer.module-BFo05t5_.js +11 -0
  6. package/chunks/FormFieldInput-rV5ZVe9k.js +63 -0
  7. package/chunks/HeaderLayoutSidebar.module-CEqBuRNu.js +9 -0
  8. package/chunks/HeaderTabs.module-BEaVu2Hx.js +9 -0
  9. package/chunks/HeaderTitle.module-Db-1fcNm.js +9 -0
  10. package/chunks/{ListItemControlsButton-DWU_FtH8.js → ListItemControlsButton-Ch-5PQYH.js} +7 -7
  11. package/chunks/ListItemTail.module-C5-4SAqt.js +12 -0
  12. package/chunks/ListMasterFooter.module-Dph-_lLg.js +10 -0
  13. package/chunks/Overlay.module-D6LEz1jT.js +18 -0
  14. package/chunks/Page.module-Ct9ky9ko.js +16 -0
  15. package/chunks/TabsExtended.module-CmU9j8zG.js +13 -0
  16. package/chunks/{TabsExtendedUtils-BLpZL63j.js → TabsExtendedUtils-CkAvE1fA.js} +2 -2
  17. package/chunks/TooltipDesktop.module-KrPZMfQD.js +19 -0
  18. package/chunks/UploadZoneInput-CXjerIVV.js +33 -0
  19. package/chunks/{utils-Ck6y6vsC.js → utils-bbbspEnw.js} +7 -7
  20. package/chunks/{vendor-CF2m175I.js → vendor-D-uL_icH.js} +38 -34
  21. package/components/Alert/AlertContext/AlertContext.js +9 -9
  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 +8 -8
  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 +5 -5
  30. package/components/Button/enums.js +5 -4
  31. package/components/Button/index.js +14 -12
  32. package/components/Card/CardAction.js +20 -20
  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 +9 -9
  41. package/components/Checkbox/CheckboxXGroup.js +13 -13
  42. package/components/Checkbox/CheckboxYGroup.js +2 -2
  43. package/components/Col/Col.js +143 -143
  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 +52 -51
  70. package/components/FormField/FormFieldContext.js +8 -8
  71. package/components/FormField/components/FormFieldClear.js +16 -15
  72. package/components/FormField/components/FormFieldCounter.js +4 -4
  73. package/components/FormField/components/FormFieldDescription.js +9 -9
  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 +6 -6
  78. package/components/FormField/components/FormFieldPrefix.js +8 -8
  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 +10 -10
  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 +17 -17
  105. package/components/List/List.js +9 -9
  106. package/components/List/ListSortable.js +1 -1
  107. package/components/List/components/ListEmptyState.js +2 -2
  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 +8 -8
  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 +5 -5
  114. package/components/List/components/ListItemSelectable.js +6 -6
  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 +9 -9
  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 +6 -6
  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 +11 -11
  129. package/components/ListMaster/components/SelectionControls.js +3 -3
  130. package/components/Loader/LoaderMiddle/LoaderMiddle.js +2 -2
  131. package/components/Loader/LoaderSmall/LoaderSmall.js +10 -10
  132. package/components/LoaderWidget/LoaderWidget.js +5 -5
  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 +5 -5
  142. package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
  143. package/components/Pagination/components/PaginationPageButton.js +2 -2
  144. package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
  145. package/components/Pagination/components/PaginationSelect.js +17 -17
  146. package/components/Pagination/utils/paginationUtils.js +10 -10
  147. package/components/Radio/Radio.js +3 -3
  148. package/components/Radio/RadioXGroup.js +12 -12
  149. package/components/Radio/RadioYGroup.js +7 -7
  150. package/components/Row/Row.js +6 -6
  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 +8 -8
  161. package/components/SwipeableArea/SwipeableArea.js +19 -19
  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 +14 -14
  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 +9 -9
  182. package/components/Typography/Caption.js +12 -12
  183. package/components/Typography/Text.js +22 -22
  184. package/components/Typography/Title.js +18 -18
  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/Card.module-Cr47sRot.js +0 -17
  197. package/chunks/DropdownMobile.module-PWShExJh.js +0 -19
  198. package/chunks/Footer.module-Gh9uBYjc.js +0 -11
  199. package/chunks/FormFieldInput-H-fZrt84.js +0 -62
  200. package/chunks/HeaderLayoutSidebar.module-MHb8aSSn.js +0 -9
  201. package/chunks/HeaderTabs.module-Bfiwon3k.js +0 -9
  202. package/chunks/HeaderTitle.module-xLu0Kmjc.js +0 -9
  203. package/chunks/ListItemTail.module-DZnDKE1u.js +0 -12
  204. package/chunks/ListMasterFooter.module-DVmdCqc9.js +0 -10
  205. package/chunks/Overlay.module-C1GsZR5Z.js +0 -18
  206. package/chunks/Page.module-kOw5fybr.js +0 -16
  207. package/chunks/TabsExtended.module-lHzNgwBX.js +0 -13
  208. package/chunks/TooltipDesktop.module-HNPcWO41.js +0 -19
  209. package/chunks/index-CgNJLkzr.js +0 -931
@@ -5,12 +5,12 @@ import { alertTypeToClassNameMap as m } from "../AlertTypeUtils.js";
5
5
  import { Text as y } from "../../Typography/Text.js";
6
6
  import { EFontType as r, ETextSize as f } from "../../Typography/enums.js";
7
7
  import { SystemStrokeStsIcon16 as I, ErrorStrokeStsIcon16 as S, WarningStrokeStsIcon16 as i, InfoStrokeStsIcon16 as R } from "@sberbusiness/icons-next";
8
- import { c as N } from "../../../chunks/vendor-CF2m175I.js";
9
- const _ = "alertContext__ce8127bf", E = "alertContextText__71a34e05", C = "alertTypeError__a57913b9", d = "alertTypeInfo__bcf3fa2f", u = "alertTypeWarning__7846f64c", A = "alertTypeSystem__364b23d1", n = {
8
+ import { c as N } from "../../../chunks/vendor-D-uL_icH.js";
9
+ const _ = "alertContext__c6b14ba5", d = "alertContextText__ffe826e1", E = "alertTypeError__68fefbb8", C = "alertTypeInfo__10294097", u = "alertTypeWarning__82d4628a", A = "alertTypeSystem__99bcd9dc", n = {
10
10
  alertContext: _,
11
- alertContextText: E,
12
- alertTypeError: C,
13
- alertTypeInfo: d,
11
+ alertContextText: d,
12
+ alertTypeError: E,
13
+ alertTypeInfo: C,
14
14
  alertTypeWarning: u,
15
15
  alertTypeSystem: A
16
16
  }, O = (o) => {
@@ -29,14 +29,14 @@ const _ = "alertContext__ce8127bf", E = "alertContextText__71a34e05", C = "alert
29
29
  [e.WARNING]: r.WARNING,
30
30
  [e.ERROR]: r.ERROR,
31
31
  [e.SYSTEM]: r.SECONDARY
32
- }, F = x.forwardRef(
32
+ }, b = x.forwardRef(
33
33
  ({ children: o, className: l, type: a, renderIcon: s, ...p }, c) => /* @__PURE__ */ T(
34
34
  "span",
35
35
  {
36
36
  role: "alert",
37
37
  className: N(n.alertContext, m[a](n), l),
38
38
  ...p,
39
- "data-tx": "1.0.0",
39
+ "data-tx": "1.1.1",
40
40
  ref: c,
41
41
  children: [
42
42
  s || O(a),
@@ -45,8 +45,8 @@ const _ = "alertContext__ce8127bf", E = "alertContextText__71a34e05", C = "alert
45
45
  }
46
46
  )
47
47
  );
48
- F.displayName = "AlertContext";
48
+ b.displayName = "AlertContext";
49
49
  export {
50
- F as AlertContext
50
+ b as AlertContext
51
51
  };
52
52
  //# sourceMappingURL=AlertContext.js.map
@@ -3,10 +3,10 @@ import P, { useState as n } from "react";
3
3
  import { EAlertType as t } from "../EAlertType.js";
4
4
  import { alertTypeToClassNameMap as k } from "../AlertTypeUtils.js";
5
5
  import { ButtonIcon as v } from "../../Button/ButtonIcon.js";
6
- import { s as r, A as i } from "../../../chunks/AlertProcessSpoiler-JRcPtVtX.js";
6
+ import { s as r, A as i } from "../../../chunks/AlertProcessSpoiler-Caa0745n.js";
7
7
  import { AlertProcessContext as R } from "./AlertProcessContext.js";
8
8
  import { CrossStrokeSrvIcon16 as E, DefaulticonStrokePrdIcon20 as T, SystemStrokeStsIcon20 as y, ErrorStrokeStsIcon20 as j, WarningStrokeStsIcon20 as w, InfoStrokeStsIcon20 as B } from "@sberbusiness/icons-next";
9
- import { c as C } from "../../../chunks/vendor-CF2m175I.js";
9
+ import { c as C } from "../../../chunks/vendor-D-uL_icH.js";
10
10
  const O = (o) => {
11
11
  switch (o) {
12
12
  case t.INFO:
@@ -38,7 +38,7 @@ const O = (o) => {
38
38
  d
39
39
  ),
40
40
  ...f,
41
- "data-tx": "1.0.0",
41
+ "data-tx": "1.1.1",
42
42
  ref: u,
43
43
  children: [
44
44
  /* @__PURE__ */ e("div", { className: r.themeIcon, children: l || O(a) }),
@@ -3,8 +3,8 @@ import "react";
3
3
  import "@sberbusiness/icons-next";
4
4
  import "../../../Button/ButtonIcon.js";
5
5
  import "../AlertProcessContext.js";
6
- import { A as l } from "../../../../chunks/AlertProcessSpoiler-JRcPtVtX.js";
7
- import "../../../../chunks/vendor-CF2m175I.js";
6
+ import { A as l } from "../../../../chunks/AlertProcessSpoiler-Caa0745n.js";
7
+ import "../../../../chunks/vendor-D-uL_icH.js";
8
8
  export {
9
9
  l as AlertProcessSpoiler
10
10
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import e from "react";
3
- import { c as n } from "../../chunks/vendor-CF2m175I.js";
4
- const t = "body__4c49ab14", y = "bodyInner__adcc57b5", d = {
5
- body: t,
6
- bodyInner: y
7
- }, b = e.forwardRef(({ children: a, className: r, ...s }, c) => /* @__PURE__ */ o("div", { className: n(d.body, r), ...s, "data-tx": "1.0.0", ref: c, children: /* @__PURE__ */ o("div", { className: d.bodyInner, children: a }) }));
8
- b.displayName = "Body";
2
+ import n from "react";
3
+ import { c as t } from "../../chunks/vendor-D-uL_icH.js";
4
+ const y = "body__79f29b7d", b = "bodyInner__d4a9b66a", d = {
5
+ body: y,
6
+ bodyInner: b
7
+ }, c = n.forwardRef(({ children: a, className: r, ...s }, e) => /* @__PURE__ */ o("div", { className: t(d.body, r), ...s, "data-tx": "1.1.1", ref: e, children: /* @__PURE__ */ o("div", { className: d.bodyInner, children: a }) }));
8
+ c.displayName = "Body";
9
9
  export {
10
- b as Body
10
+ c as Body
11
11
  };
12
12
  //# sourceMappingURL=Body.js.map
@@ -1,14 +1,99 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "../../chunks/vendor-CF2m175I.js";
4
- import { B as s } from "../../chunks/index-CgNJLkzr.js";
5
- import "./ButtonBase.js";
6
- import "./ButtonIcon.js";
7
- import "./enums.js";
8
- import "../Loader/LoaderSmall/LoaderSmall.js";
9
- import "../Loader/LoaderSmall/enum.js";
1
+ import { jsxs as g, jsx as L } from "react/jsx-runtime";
2
+ import R from "react";
3
+ import { c as f } from "../../chunks/vendor-D-uL_icH.js";
4
+ import { LoaderSmall as B } from "../Loader/LoaderSmall/LoaderSmall.js";
5
+ import { ELoaderSmallTheme as p, ELoaderSmallSize as r } from "../Loader/LoaderSmall/enum.js";
10
6
  import "../Loader/LoaderMiddle/LoaderMiddle.js";
7
+ import { ButtonBase as D } from "./ButtonBase.js";
8
+ import { EButtonSize as d, EButtonTheme as o } from "./enums.js";
9
+ const A = "general__f6fa65f1", C = "expanded__5bfd58e9", b = {
10
+ general: A,
11
+ expanded: C
12
+ }, G = "secondary__78f546e3", T = "expanded__5bfd58e9", h = {
13
+ secondary: G,
14
+ expanded: T
15
+ }, M = "secondaryLight__bc7474d0", z = "expanded__5bfd58e9", x = {
16
+ secondaryLight: M,
17
+ expanded: z
18
+ }, I = "danger__0f36bca7", v = "expanded__5bfd58e9", S = {
19
+ danger: I,
20
+ expanded: v
21
+ }, O = "link__26318cd4", y = {
22
+ link: O
23
+ }, Y = "button__e183baaa", w = "sm__8d96d661", $ = "icon__3af77085", j = "md__a40742ce", H = "lg__10a6065a", K = "block__112deaa7", U = "content__484fff48", q = "loading__80bffa80", F = "loader__2bbe5d60", J = "hidden__8ef1dd26", n = {
24
+ button: Y,
25
+ sm: w,
26
+ icon: $,
27
+ md: j,
28
+ lg: H,
29
+ block: K,
30
+ content: U,
31
+ loading: q,
32
+ loader: F,
33
+ hidden: J
34
+ }, P = (t, e) => {
35
+ switch (t) {
36
+ case o.GENERAL:
37
+ return { [b.general]: !0, [b.expanded]: e };
38
+ case o.SECONDARY:
39
+ return {
40
+ [h.secondary]: !0,
41
+ [h.expanded]: e
42
+ };
43
+ case o.SECONDARY_LIGHT:
44
+ return {
45
+ [x.secondaryLight]: !0,
46
+ [x.expanded]: e
47
+ };
48
+ case o.DANGER:
49
+ return {
50
+ [S.danger]: !0,
51
+ [S.expanded]: e
52
+ };
53
+ case o.LINK:
54
+ return {
55
+ [y.link]: !0,
56
+ [y.expanded]: e
57
+ };
58
+ }
59
+ }, Q = (t) => {
60
+ switch (t) {
61
+ case d.LG:
62
+ return n.lg;
63
+ case d.MD:
64
+ return n.md;
65
+ case d.SM:
66
+ return n.sm;
67
+ }
68
+ }, V = (t, e) => {
69
+ const a = [o.SECONDARY, o.SECONDARY_LIGHT].includes(t) ? p.BRAND : p.NEUTRAL, s = e === d.SM ? r.SM : e === d.LG ? r.LG : r.MD;
70
+ return /* @__PURE__ */ L(B, { theme: a, size: s });
71
+ }, W = R.forwardRef((t, e) => {
72
+ const { children: a, className: s, disabled: l, theme: i, size: _ = d.MD, block: N, loading: c, icon: m, ...E } = t, { "aria-expanded": u } = t, k = f(
73
+ n.button,
74
+ P(i, !!u),
75
+ Q(_),
76
+ { [n.block]: !!N, [n.loading]: !!c },
77
+ { [n.icon]: !!m && !a },
78
+ // Классы для иконок, начало.
79
+ "hoverable",
80
+ {
81
+ active: !!u,
82
+ disabled: !!l
83
+ },
84
+ // Классы для иконок, конец.
85
+ s
86
+ );
87
+ return /* @__PURE__ */ g(D, { className: k, tabIndex: c ? -1 : void 0, disabled: l, ...E, ref: e, children: [
88
+ /* @__PURE__ */ g("span", { className: n.content, children: [
89
+ m,
90
+ a
91
+ ] }),
92
+ /* @__PURE__ */ L("div", { className: f(n.loader, !c && n.hidden), children: V(i, _) })
93
+ ] });
94
+ });
95
+ W.displayName = "Button";
11
96
  export {
12
- s as Button
97
+ W as Button
13
98
  };
14
99
  //# sourceMappingURL=Button.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import e from "react";
3
- const r = e.forwardRef((t, o) => /* @__PURE__ */ a("button", { type: "button", ...t, "data-tx": "1.0.0", ref: o }));
3
+ const r = e.forwardRef((t, o) => /* @__PURE__ */ a("button", { type: "button", ...t, "data-tx": "1.1.1", ref: o }));
4
4
  r.displayName = "ButtonBase";
5
5
  export {
6
6
  r as ButtonBase
@@ -1,26 +1,187 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import { a as j, d as k } from "../../chunks/index-CgNJLkzr.js";
4
- import "./enums.js";
5
- import "@sberbusiness/icons-next";
6
- import "../../utils/keyboard.js";
7
- import "../../chunks/DropdownListItem-Be_BBAWh.js";
8
- import "../Dropdown/mobile/DropdownMobile.js";
9
- import "../Dropdown/mobile/DropdownMobileBody.js";
10
- import "../Dropdown/mobile/DropdownMobileClose.js";
11
- import "../Dropdown/mobile/DropdownMobileFooter.js";
12
- import "../Dropdown/mobile/DropdownMobileHeader.js";
13
- import "../Dropdown/mobile/DropdownMobileInner.js";
14
- import "../Dropdown/mobile/DropdownMobileInput.js";
15
- import "../Dropdown/mobile/DropdownMobileList.js";
16
- import "../Dropdown/mobile/DropdownMobileListItem.js";
17
- import "../Dropdown/enums.js";
18
- import "../Dropdown/DropdownListContext.js";
19
- import "../Typography/Text.js";
20
- import "../Typography/enums.js";
21
- import "../../chunks/vendor-CF2m175I.js";
1
+ import { Button as B } from "./Button.js";
2
+ import "./ButtonBase.js";
3
+ import "./ButtonIcon.js";
4
+ import { jsx as r, jsxs as I, Fragment as F } from "react/jsx-runtime";
5
+ import V, { useRef as E, useState as J, createElement as y } from "react";
6
+ import { c as b, f as Q } from "../../chunks/vendor-D-uL_icH.js";
7
+ import { ButtonDropdownExtended as z } from "./ButtonDropdownExtended.js";
8
+ import { EButtonDotsTheme as m, EButtonTheme as i, EButtonSize as d } from "./enums.js";
9
+ import { DotshorizontalStrokeSrvIcon24 as X, CaretdownStrokeSrvIcon24 as g } from "@sberbusiness/icons-next";
10
+ import { isKey as D } from "../../utils/keyboard.js";
11
+ import { DropdownListContext as Z } from "../Dropdown/DropdownListContext.js";
12
+ import { DropdownMobileHeader as $ } from "../Dropdown/mobile/DropdownMobileHeader.js";
13
+ import { DropdownMobileBody as ee } from "../Dropdown/mobile/DropdownMobileBody.js";
14
+ import { DropdownMobileList as te } from "../Dropdown/mobile/DropdownMobileList.js";
15
+ import { DropdownMobileListItem as oe } from "../Dropdown/mobile/DropdownMobileListItem.js";
16
+ import { DropdownMobileClose as re } from "../Dropdown/mobile/DropdownMobileClose.js";
17
+ import { Text as ne } from "../Typography/Text.js";
18
+ import { ETextSize as ae } from "../Typography/enums.js";
19
+ import { DropdownList as G } from "../Dropdown/desktop/DropdownList.js";
20
+ import { EDropdownSize as S, EDropdownListSize as N } from "../Dropdown/enums.js";
21
+ const ce = "buttonDropdown__387a7658", se = "block__112deaa7", ie = "buttonDropdownTarget__ea5f127b", de = "caretIcon__d3e21d5a", le = "active__a1aa8d91", ue = "buttonDropdownMenuItem__630ff682", n = {
22
+ buttonDropdown: ce,
23
+ block: se,
24
+ buttonDropdownTarget: ie,
25
+ caretIcon: de,
26
+ active: le,
27
+ buttonDropdownMenuItem: ue
28
+ }, me = (l) => {
29
+ switch (l) {
30
+ case d.SM:
31
+ return S.SM;
32
+ case d.MD:
33
+ return S.MD;
34
+ case d.LG:
35
+ return S.LG;
36
+ default:
37
+ return S.MD;
38
+ }
39
+ }, De = (l) => {
40
+ switch (l) {
41
+ case d.SM:
42
+ return N.SM;
43
+ case d.MD:
44
+ return N.MD;
45
+ case d.LG:
46
+ return N.LG;
47
+ default:
48
+ return N.MD;
49
+ }
50
+ }, pe = V.forwardRef(
51
+ (l, p) => {
52
+ const { buttonAttributes: M, children: T, className: Y, theme: f, size: w, options: A, selected: s, block: _, disabled: C, ...W } = l, O = E(null), k = E(null), H = b(n.buttonDropdown, { [n.block]: !!_ }, Y), [R, P] = J(), h = E(Q()), K = ({ opened: e, setOpened: o }) => {
53
+ const a = b(n.buttonDropdownTarget, "hoverable", {
54
+ [n.active]: e,
55
+ [n.block]: !!_
56
+ });
57
+ return /* @__PURE__ */ I(
58
+ B,
59
+ {
60
+ className: a,
61
+ theme: f,
62
+ size: w,
63
+ onKeyDown: L({ opened: e, setOpened: o }),
64
+ onClick: v({ opened: e, setOpened: o }),
65
+ disabled: C,
66
+ "aria-haspopup": "menu",
67
+ "aria-expanded": e,
68
+ "aria-controls": h.current,
69
+ "aria-activedescendant": R,
70
+ ...M,
71
+ ref: x,
72
+ children: [
73
+ T,
74
+ U()
75
+ ]
76
+ }
77
+ );
78
+ }, j = ({ opened: e, setOpened: o }) => {
79
+ const a = b(n.buttonDropdownTarget, "hoverable", {
80
+ [n.active]: e,
81
+ [n.block]: !!_
82
+ });
83
+ return /* @__PURE__ */ r(
84
+ B,
85
+ {
86
+ className: a,
87
+ theme: f === m.DOTS_SECONDARY ? i.SECONDARY : i.SECONDARY_LIGHT,
88
+ size: w,
89
+ onKeyDown: L({ opened: e, setOpened: o }),
90
+ onClick: v({ opened: e, setOpened: o }),
91
+ disabled: C,
92
+ "aria-haspopup": "menu",
93
+ "aria-expanded": e,
94
+ "aria-controls": h.current,
95
+ "aria-activedescendant": R,
96
+ ...M,
97
+ ref: x,
98
+ icon: /* @__PURE__ */ r(X, { paletteIndex: 0 })
99
+ }
100
+ );
101
+ }, v = ({ opened: e, setOpened: o }) => () => o(!e), L = ({ opened: e, setOpened: o }) => (a) => {
102
+ const { key: c } = a;
103
+ (D(c, "SPACE") || D(c, "ARROW_UP") || D(c, "ARROW_DOWN")) && a.preventDefault(), !e && (D(c, "ARROW_UP") || D(c, "ARROW_DOWN")) && o(!0);
104
+ }, U = () => {
105
+ switch (f) {
106
+ case i.GENERAL:
107
+ case i.DANGER:
108
+ case m.DOTS_SECONDARY:
109
+ case m.DOTS_SECONDARY_LIGHT:
110
+ return /* @__PURE__ */ r(g, { paletteIndex: 7, className: n.caretIcon });
111
+ case i.SECONDARY:
112
+ case i.SECONDARY_LIGHT:
113
+ return /* @__PURE__ */ r(g, { paletteIndex: 0, className: n.caretIcon });
114
+ default:
115
+ return null;
116
+ }
117
+ }, q = ({ opened: e, setOpened: o, className: a }) => {
118
+ const c = b(n.buttonDropdownMenu, a);
119
+ return /* @__PURE__ */ r(Z.Provider, { value: { activeDescendant: R, setActiveDescendant: P }, children: /* @__PURE__ */ r(
120
+ z.Dropdown,
121
+ {
122
+ size: me(w),
123
+ className: c,
124
+ opened: e,
125
+ setOpened: o,
126
+ targetRef: O,
127
+ ref: k,
128
+ mobileViewProps: {
129
+ children: /* @__PURE__ */ I(F, { children: [
130
+ /* @__PURE__ */ I($, { children: [
131
+ /* @__PURE__ */ r(ne, { tag: "div", size: ae.B3, children: T }),
132
+ /* @__PURE__ */ r(re, { onClick: () => o(!1) })
133
+ ] }),
134
+ /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(te, { children: A.map((t) => /* @__PURE__ */ y(
135
+ oe,
136
+ {
137
+ ...t,
138
+ key: t.id,
139
+ selected: t.id === (s == null ? void 0 : s.id),
140
+ onSelect: () => {
141
+ var u;
142
+ (u = t.onSelect) == null || u.call(t), o(!1);
143
+ }
144
+ },
145
+ t.label
146
+ )) }) })
147
+ ] })
148
+ },
149
+ children: /* @__PURE__ */ r(G, { dropdownOpened: e, id: h.current, size: De(w), children: A.map((t) => /* @__PURE__ */ y(
150
+ G.Item,
151
+ {
152
+ ...t,
153
+ className: n.buttonDropdownMenuItem,
154
+ key: t.id,
155
+ selected: t.id === (s == null ? void 0 : s.id),
156
+ onSelect: () => {
157
+ var u;
158
+ (u = t.onSelect) == null || u.call(t), o(!1);
159
+ }
160
+ },
161
+ t.label
162
+ )) })
163
+ }
164
+ ) });
165
+ }, x = (e) => {
166
+ O.current = e, typeof p == "function" ? p(e) : p && (p.current = e);
167
+ };
168
+ return /* @__PURE__ */ r(
169
+ z,
170
+ {
171
+ className: H,
172
+ renderButton: [m.DOTS_SECONDARY, m.DOTS_SECONDARY_LIGHT].includes(
173
+ f
174
+ ) ? j : K,
175
+ renderDropdown: q,
176
+ dropdownRef: k,
177
+ closeOnTab: !0,
178
+ ...W
179
+ }
180
+ );
181
+ }
182
+ );
183
+ pe.displayName = "ButtonDropdown";
22
184
  export {
23
- j as ButtonDropdown,
24
- k as dotsTheme
185
+ pe as ButtonDropdown
25
186
  };
26
187
  //# sourceMappingURL=ButtonDropdown.js.map
@@ -1,9 +1,53 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import { b as d } from "../../chunks/index-CgNJLkzr.js";
4
- import "../../utils/keyboard.js";
5
- import "../../chunks/vendor-CF2m175I.js";
1
+ import { jsxs as h } from "react/jsx-runtime";
2
+ import { useRef as f, useState as C, useCallback as N, useEffect as R } from "react";
3
+ import { Dropdown as _ } from "../Dropdown/Dropdown.js";
4
+ import { isKey as w } from "../../utils/keyboard.js";
5
+ import { DropdownList as g } from "../Dropdown/desktop/DropdownList.js";
6
+ import { c as A } from "../../chunks/vendor-D-uL_icH.js";
7
+ const K = "buttonDropdownExtended__be47856e", S = "buttonDropdownExtendedBlock__daefeab0", E = {
8
+ buttonDropdownExtended: K,
9
+ buttonDropdownExtendedBlock: S
10
+ }, D = (s) => {
11
+ const { className: b, opened: v, setOpened: c, renderButton: x, renderDropdown: k, dropdownRef: l, closeOnTab: p, ...L } = s, u = f(null), m = f(s.opened !== void 0), [O, y] = C((s.opened === void 0, !1)), e = m.current ? !!v : O, o = N(
12
+ (t) => {
13
+ if (m.current) {
14
+ c && c(t);
15
+ return;
16
+ }
17
+ y(t);
18
+ },
19
+ [c]
20
+ );
21
+ R(() => {
22
+ if (!e)
23
+ return;
24
+ const t = (r) => {
25
+ const n = r.code || r.keyCode;
26
+ e && (w(n, "ESCAPE") || p && w(n, "TAB")) && o(!1);
27
+ }, d = (r) => {
28
+ const n = u.current, a = l.current;
29
+ if (e) {
30
+ const i = r.target;
31
+ i && !(n != null && n.contains(i)) && !(a != null && a.contains(i)) && o(!1);
32
+ }
33
+ };
34
+ return document.addEventListener("keydown", t), document.addEventListener("mousedown", d), document.addEventListener("touchstart", d), () => {
35
+ document.removeEventListener("keydown", t), document.removeEventListener("mousedown", d), document.removeEventListener("touchstart", d);
36
+ };
37
+ }, [e, p, l, o, u]);
38
+ const B = A(E.buttonDropdownExtended, b);
39
+ return /* @__PURE__ */ h("div", { className: B, ref: u, ...L, children: [
40
+ x({ opened: e, setOpened: o }),
41
+ k({
42
+ className: E.buttonDropdownExtendedBlock,
43
+ opened: e,
44
+ setOpened: o
45
+ })
46
+ ] });
47
+ };
48
+ D.Dropdown = _;
49
+ D.DropdownList = g;
6
50
  export {
7
- d as ButtonDropdownExtended
51
+ D as ButtonDropdownExtended
8
52
  };
9
53
  //# sourceMappingURL=ButtonDropdownExtended.js.map
@@ -1,8 +1,8 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import i from "react";
3
3
  import { EButtonIconShape as c } from "./enums.js";
4
- import { c as m } from "../../chunks/vendor-CF2m175I.js";
5
- const I = "buttonIcon__fd887138", f = "circle__7d08c74a", p = "squircle__6da23d03", o = {
4
+ import { c as m } from "../../chunks/vendor-D-uL_icH.js";
5
+ const I = "buttonIcon__b2500017", f = "circle__9c03a9d9", p = "squircle__93fa5698", o = {
6
6
  buttonIcon: I,
7
7
  circle: f,
8
8
  squircle: p
@@ -13,7 +13,7 @@ const I = "buttonIcon__fd887138", f = "circle__7d08c74a", p = "squircle__6da23d0
13
13
  case c.CIRCLE:
14
14
  return o.circle;
15
15
  }
16
- }, d = i.forwardRef(
16
+ }, b = i.forwardRef(
17
17
  ({ className: t, disabled: e, shape: n = c.SQUIRCLE, active: s, ...r }, a) => {
18
18
  const u = m(o.buttonIcon, _(n), "hoverable", t, {
19
19
  active: !!s,
@@ -22,8 +22,8 @@ const I = "buttonIcon__fd887138", f = "circle__7d08c74a", p = "squircle__6da23d0
22
22
  return /* @__PURE__ */ l("button", { className: u, disabled: e, ...r, ref: a });
23
23
  }
24
24
  );
25
- d.displayName = "ButtonIcon";
25
+ b.displayName = "ButtonIcon";
26
26
  export {
27
- d as ButtonIcon
27
+ b as ButtonIcon
28
28
  };
29
29
  //# sourceMappingURL=ButtonIcon.js.map
@@ -1,7 +1,8 @@
1
- var a = /* @__PURE__ */ ((r) => (r.GENERAL = "general", r.SECONDARY = "secondary", r.DANGER = "danger", r.LINK = "link", r))(a || {}), l = /* @__PURE__ */ ((r) => (r.LG = "lg", r.MD = "md", r.SM = "sm", r))(l || {}), L = /* @__PURE__ */ ((r) => (r.SQUIRCLE = "squircle", r.CIRCLE = "circle", r))(L || {});
1
+ var a = /* @__PURE__ */ ((r) => (r.DOTS_SECONDARY = "dots_secondary", r.DOTS_SECONDARY_LIGHT = "dots_secondary_light", r))(a || {}), d = /* @__PURE__ */ ((r) => (r.GENERAL = "general", r.SECONDARY = "secondary", r.SECONDARY_LIGHT = "secondary_light", r.DANGER = "danger", r.LINK = "link", r))(d || {}), R = /* @__PURE__ */ ((r) => (r.LG = "lg", r.MD = "md", r.SM = "sm", r))(R || {}), _ = /* @__PURE__ */ ((r) => (r.SQUIRCLE = "squircle", r.CIRCLE = "circle", r))(_ || {});
2
2
  export {
3
- L as EButtonIconShape,
4
- l as EButtonSize,
5
- a as EButtonTheme
3
+ a as EButtonDotsTheme,
4
+ _ as EButtonIconShape,
5
+ R as EButtonSize,
6
+ d as EButtonTheme
6
7
  };
7
8
  //# sourceMappingURL=enums.js.map
@@ -1,16 +1,18 @@
1
- import { B as e, a as n, b as r, d as B } from "../../chunks/index-CgNJLkzr.js";
2
- import { ButtonBase as a } from "./ButtonBase.js";
3
- import { ButtonIcon as d } from "./ButtonIcon.js";
4
- import { EButtonIconShape as s, EButtonSize as x, EButtonTheme as f } from "./enums.js";
1
+ import { Button as e } from "./Button.js";
2
+ import { ButtonBase as r } from "./ButtonBase.js";
3
+ import { ButtonIcon as p } from "./ButtonIcon.js";
4
+ import { ButtonDropdown as m } from "./ButtonDropdown.js";
5
+ import { ButtonDropdownExtended as f } from "./ButtonDropdownExtended.js";
6
+ import { EButtonDotsTheme as d, EButtonIconShape as h, EButtonSize as D, EButtonTheme as a } from "./enums.js";
5
7
  export {
6
8
  e as Button,
7
- a as ButtonBase,
8
- n as ButtonDropdown,
9
- r as ButtonDropdownExtended,
10
- d as ButtonIcon,
11
- s as EButtonIconShape,
12
- x as EButtonSize,
13
- f as EButtonTheme,
14
- B as dotsTheme
9
+ r as ButtonBase,
10
+ m as ButtonDropdown,
11
+ f as ButtonDropdownExtended,
12
+ p as ButtonIcon,
13
+ d as EButtonDotsTheme,
14
+ h as EButtonIconShape,
15
+ D as EButtonSize,
16
+ a as EButtonTheme
15
17
  };
16
18
  //# sourceMappingURL=index.js.map