@sberbusiness/triplex-next 1.0.0 → 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.
- package/chunks/{AlertProcessSpoiler-JRcPtVtX.js → AlertProcessSpoiler-Dp7FRT9y.js} +11 -11
- package/chunks/Card.module-Ddt7TQ9Z.js +17 -0
- package/chunks/{DropdownListItem-Be_BBAWh.js → DropdownListItem-y6Rvj_dd.js} +14 -14
- package/chunks/DropdownMobile.module-DrQkghxs.js +19 -0
- package/chunks/Footer.module-CKfl241m.js +11 -0
- package/chunks/FormFieldInput-apk1b0w6.js +63 -0
- package/chunks/HeaderLayoutSidebar.module-DTXnksBK.js +9 -0
- package/chunks/HeaderTabs.module-DVh6MotJ.js +9 -0
- package/chunks/HeaderTitle.module-DOeVL9zC.js +9 -0
- package/chunks/{ListItemControlsButton-DWU_FtH8.js → ListItemControlsButton-Cn3Vmrsn.js} +10 -10
- package/chunks/ListItemTail.module-BnbT61OM.js +12 -0
- package/chunks/ListMasterFooter.module-C6QFamKQ.js +10 -0
- package/chunks/Overlay.module-BTSQ5G6t.js +18 -0
- package/chunks/Page.module-DfMBQJob.js +16 -0
- package/chunks/TabsExtended.module-okOlTNQG.js +13 -0
- package/chunks/{TabsExtendedUtils-BLpZL63j.js → TabsExtendedUtils-NCwWiX7O.js} +4 -4
- package/chunks/TooltipDesktop.module-DTbnIWo1.js +19 -0
- package/chunks/UploadZoneInput-R9729LZY.js +33 -0
- package/chunks/utils-B0khB-Lq.js +36 -0
- package/chunks/{vendor-CF2m175I.js → vendor-D-uL_icH.js} +38 -34
- package/components/Alert/AlertContext/AlertContext.js +8 -8
- package/components/Alert/AlertProcess/AlertProcess.js +3 -3
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
- package/components/Body/Body.js +6 -6
- package/components/Button/Button.js +95 -10
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +184 -23
- package/components/Button/ButtonDropdownExtended.js +50 -6
- package/components/Button/ButtonIcon.js +5 -5
- package/components/Button/enums.js +5 -4
- package/components/Button/index.js +14 -12
- package/components/Card/CardAction.js +14 -14
- package/components/Card/CardStatic.js +3 -3
- package/components/Card/components/CardContent/CardContent.js +2 -2
- package/components/Card/components/CardContent/components/CardContentBody.js +2 -2
- package/components/Card/components/CardContent/components/CardContentFooter.js +2 -2
- package/components/Card/components/CardContent/components/CardContentHeader.js +2 -2
- package/components/Card/components/CardMedia.js +2 -2
- package/components/Card/utils.js +1 -1
- package/components/Checkbox/Checkbox.js +10 -10
- package/components/Checkbox/CheckboxXGroup.js +14 -14
- package/components/Checkbox/CheckboxYGroup.js +2 -2
- package/components/Col/Col.js +142 -142
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/DesignTokensComponents.js +9 -7
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +15 -13
- package/components/DesignTokens/components/Button.js +27 -0
- package/components/DesignTokens/components/FormField.js +22 -4
- package/components/DesignTokens/components/Island.js +26 -0
- package/components/DesignTokens/components/index.js +17 -14
- package/components/Dropdown/Dropdown.js +22 -7
- package/components/Dropdown/desktop/DropdownDesktop.js +94 -18
- package/components/Dropdown/desktop/DropdownList.js +65 -94
- package/components/Dropdown/desktop/DropdownListItem.js +2 -2
- package/components/Dropdown/index.js +27 -25
- package/components/Dropdown/mobile/DropdownMobile.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInput.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileList.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
- package/components/Footer/Footer.js +3 -3
- package/components/Footer/components/FooterDescription.js +2 -2
- package/components/Footer/components/FooterDescriptionContent.js +2 -2
- package/components/Footer/components/FooterDescriptionControls.js +2 -2
- package/components/FormField/FormField.js +52 -51
- package/components/FormField/FormFieldContext.js +8 -8
- package/components/FormField/components/FormFieldClear.js +13 -12
- package/components/FormField/components/FormFieldCounter.js +5 -5
- package/components/FormField/components/FormFieldDescription.js +2 -2
- package/components/FormField/components/FormFieldInput.js +4 -3
- package/components/FormField/components/FormFieldLabel.js +32 -31
- package/components/FormField/components/FormFieldMaskedInput.js +102 -92
- package/components/FormField/components/FormFieldPostfix.js +9 -9
- package/components/FormField/components/FormFieldPrefix.js +10 -10
- package/components/FormField/components/FormFieldTarget.js +49 -0
- package/components/FormField/components/FormFieldTextarea.js +25 -24
- package/components/FormField/enums.js +3 -2
- package/components/FormField/index.js +19 -16
- package/components/FormField/types.js +2 -0
- package/components/Header/Header.js +12 -12
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +2 -2
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +9 -9
- package/components/Header/components/HeaderTabs/HeaderTabs.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitle.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +2 -2
- package/components/Island/Island.js +78 -0
- package/components/Island/components/IslandBody.js +10 -0
- package/components/Island/components/IslandFooter.js +10 -0
- package/components/Island/components/IslandHeader.js +10 -0
- package/components/Island/enums.js +7 -0
- package/components/Island/index.js +9 -0
- package/components/KeyDownListener/ComposedKeyDownListener.js +13 -0
- package/components/KeyDownListener/KeyDownListener.js +27 -0
- package/components/KeyDownListener/index.js +7 -0
- package/components/Link/Link.js +34 -34
- package/components/List/List.js +7 -7
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListEmptyState.js +6 -6
- package/components/List/components/ListItem.js +1 -1
- package/components/List/components/ListItemContent.js +3 -3
- package/components/List/components/ListItemControls.js +2 -2
- package/components/List/components/ListItemControlsButton.js +2 -2
- package/components/List/components/ListItemControlsButtonDropdown.js +98 -15
- package/components/List/components/ListItemLoading.js +2 -2
- package/components/List/components/ListItemSelectable.js +9 -9
- package/components/List/components/ListItemTable.js +29 -19
- package/components/List/components/ListItemTailLeft.js +2 -2
- package/components/List/components/ListItemTailRight.js +2 -2
- package/components/List/components/ListSortableItem.js +37 -18
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +4 -4
- package/components/List/index.js +22 -20
- package/components/ListMaster/ListMaster.js +1 -1
- package/components/ListMaster/components/ListMasterBody.js +1 -1
- package/components/ListMaster/components/ListMasterChipGroup.js +6 -6
- package/components/ListMaster/components/ListMasterFooter.js +2 -2
- package/components/ListMaster/components/ListMasterFooterControls.js +2 -2
- package/components/ListMaster/components/ListMasterFooterDescription.js +2 -2
- package/components/ListMaster/components/ListMasterHeader.js +9 -9
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +2 -2
- package/components/Loader/LoaderSmall/LoaderSmall.js +11 -11
- package/components/LoaderWidget/LoaderWidget.js +9 -9
- package/components/Overlay/Overlay.js +2 -2
- package/components/Overlay/OverlayMask.js +2 -2
- package/components/Overlay/OverlayPanel.js +2 -2
- package/components/Page/Page.js +2 -2
- package/components/Page/components/BodyPage.js +2 -2
- package/components/Page/components/FooterPage.js +2 -2
- package/components/Page/components/HeaderPage.js +2 -2
- package/components/Pagination/components/PaginationExtended.js +3 -3
- package/components/Pagination/components/PaginationNavigationButton.js +4 -4
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +2 -2
- package/components/Pagination/components/PaginationPageEllipsis.js +3 -3
- package/components/Pagination/components/PaginationSelect.js +12 -12
- package/components/Pagination/utils/paginationUtils.js +10 -10
- package/components/Radio/Radio.js +3 -3
- package/components/Radio/RadioXGroup.js +13 -13
- package/components/Radio/RadioYGroup.js +5 -5
- package/components/Row/Row.js +6 -6
- package/components/SegmentedControl/SegmentedControl.js +64 -7
- package/components/SegmentedControl/SegmentedControlContext.js +13 -0
- package/components/SegmentedControl/SegmentedControlSegment.js +68 -8
- package/components/SegmentedControl/index.js +6 -6
- package/components/SelectExtendedField/SelectExtendedField.js +57 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +25 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +86 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +101 -0
- package/components/SelectExtendedField/index.js +9 -0
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/SwipeableArea/SwipeableArea.js +11 -11
- package/components/TabsExtended/TabsExtended.js +7 -7
- package/components/TabsExtended/TabsExtendedUtils.js +1 -1
- package/components/TabsExtended/components/TabsExtendedContent.js +11 -11
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabButton.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
- package/components/TabsExtended/types.js +2 -0
- package/components/TextField/MaskedField.js +6 -89
- package/components/TextField/TextField.js +6 -89
- package/components/TextField/TextFieldBase.js +30 -89
- package/components/TextField/index.js +4 -3
- package/components/ThemeProvider/ThemeProvider.js +8 -8
- package/components/ThemeProvider/components/ThemeProviderView.js +8 -8
- package/components/Tooltip/components/common/TooltipBody.js +7 -7
- package/components/Tooltip/components/common/TooltipLink.js +17 -17
- package/components/Tooltip/components/common/TooltipXButton.js +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +2 -2
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +2 -2
- package/components/Tooltip/components/mobile/TooltipMobile.js +9 -9
- package/components/Typography/Caption.js +14 -14
- package/components/Typography/Text.js +24 -24
- package/components/Typography/Title.js +24 -24
- package/components/Typography/utils.js +1 -1
- package/components/UploadZone/UploadZone.js +109 -7
- package/components/UploadZone/UploadZoneContext.js +11 -0
- package/components/UploadZone/components/UploadZoneInput.js +5 -140
- package/components/UploadZone/index.js +2 -3
- package/components/UploadZone/types.js +2 -0
- package/components/index.js +279 -248
- package/index.d.ts +212 -27
- package/index.js +277 -246
- package/package.json +13 -1
- package/styles/triplex-next.css +354 -333
- package/chunks/Card.module-Cr47sRot.js +0 -17
- package/chunks/DropdownMobile.module-PWShExJh.js +0 -19
- package/chunks/Footer.module-Gh9uBYjc.js +0 -11
- package/chunks/FormFieldInput-H-fZrt84.js +0 -62
- package/chunks/HeaderLayoutSidebar.module-MHb8aSSn.js +0 -9
- package/chunks/HeaderTabs.module-Bfiwon3k.js +0 -9
- package/chunks/HeaderTitle.module-xLu0Kmjc.js +0 -9
- package/chunks/ListItemTail.module-DZnDKE1u.js +0 -12
- package/chunks/ListMasterFooter.module-DVmdCqc9.js +0 -10
- package/chunks/Overlay.module-C1GsZR5Z.js +0 -18
- package/chunks/Page.module-kOw5fybr.js +0 -16
- package/chunks/TabsExtended.module-lHzNgwBX.js +0 -13
- package/chunks/TooltipDesktop.module-HNPcWO41.js +0 -19
- package/chunks/index-CgNJLkzr.js +0 -931
- package/chunks/utils-Ck6y6vsC.js +0 -36
|
@@ -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-
|
|
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-
|
|
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-
|
|
4
|
-
import { s as m } from "../../../chunks/DropdownMobile.module-
|
|
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-
|
|
4
|
-
import { s as m } from "../../../chunks/DropdownMobile.module-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
import { s as o } from "../../chunks/Footer.module-
|
|
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": "1.
|
|
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-
|
|
6
|
-
import { s as c } from "../../../chunks/Footer.module-
|
|
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-
|
|
4
|
-
import { s as n } from "../../../chunks/Footer.module-
|
|
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-
|
|
4
|
-
import { s as a } from "../../../chunks/Footer.module-
|
|
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
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useState as e } from "react";
|
|
3
|
-
import { FormFieldContext as
|
|
3
|
+
import { FormFieldContext as G } from "./FormFieldContext.js";
|
|
4
4
|
import { TARGET_PADDING_X_DEFAULT as _ } from "./consts.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { EFormFieldSize as
|
|
7
|
-
const
|
|
8
|
-
formField:
|
|
9
|
-
disabled:
|
|
10
|
-
active:
|
|
11
|
-
error:
|
|
12
|
-
|
|
13
|
-
"size-
|
|
14
|
-
"size-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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:
|
|
21
|
+
onMouseLeave: d,
|
|
22
22
|
style: x,
|
|
23
|
-
size: o =
|
|
23
|
+
size: o = N.LG,
|
|
24
24
|
...b
|
|
25
25
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
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__ */
|
|
32
|
-
|
|
31
|
+
return /* @__PURE__ */ n(
|
|
32
|
+
G.Provider,
|
|
33
33
|
{
|
|
34
34
|
value: {
|
|
35
|
-
|
|
36
|
-
focused:
|
|
37
|
-
hovered:
|
|
38
|
-
id:
|
|
39
|
-
postfixWidth:
|
|
40
|
-
prefixWidth:
|
|
41
|
-
setFocused:
|
|
42
|
-
setId:
|
|
43
|
-
setPostfixWidth:
|
|
44
|
-
setPrefixWidth:
|
|
45
|
-
setValueExist:
|
|
46
|
-
valueExist:
|
|
35
|
+
status: t,
|
|
36
|
+
focused: l,
|
|
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__ */
|
|
49
|
+
children: /* @__PURE__ */ n(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
53
|
-
|
|
52
|
+
className: I(
|
|
53
|
+
i.formField,
|
|
54
54
|
{
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
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
|
-
|
|
61
|
+
p
|
|
61
62
|
),
|
|
62
|
-
onMouseEnter:
|
|
63
|
-
onMouseLeave:
|
|
64
|
-
"data-tx": "1.
|
|
65
|
-
style: { paddingLeft:
|
|
63
|
+
onMouseEnter: W,
|
|
64
|
+
onMouseLeave: w,
|
|
65
|
+
"data-tx": "1.1.0",
|
|
66
|
+
style: { paddingLeft: f, paddingRight: m, ...x },
|
|
66
67
|
...b,
|
|
67
|
-
children:
|
|
68
|
+
children: F
|
|
68
69
|
}
|
|
69
70
|
)
|
|
70
71
|
}
|
|
71
72
|
);
|
|
72
73
|
};
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
O as FormField
|
|
75
76
|
};
|
|
76
77
|
//# sourceMappingURL=FormField.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EFormFieldSize as
|
|
3
|
-
const
|
|
4
|
-
|
|
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:
|
|
22
|
-
},
|
|
21
|
+
size: e.MD
|
|
22
|
+
}, r = t.createContext(s);
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
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-
|
|
6
|
-
|
|
7
|
-
|
|
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:
|
|
11
|
-
const {
|
|
12
|
-
const o = document.querySelector(`#${
|
|
13
|
-
o && o.focus(), e == null || e(
|
|
14
|
-
},
|
|
15
|
-
|
|
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
|
-
[
|
|
19
|
+
[t.shown]: c && m !== w.DISABLED && (d || n)
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
+
s
|
|
21
22
|
);
|
|
22
|
-
return /* @__PURE__ */ r("span", { className:
|
|
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 = "
|
|
4
|
+
const s = "formFieldCounter__526f40fd", f = {
|
|
5
5
|
formFieldCounter: s
|
|
6
|
-
},
|
|
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:
|
|
10
|
+
}, []), /* @__PURE__ */ r("div", { className: f.formFieldCounter, ...e, children: o });
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
u.displayName = "FormFieldCounter";
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
u as FormFieldCounter
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=FormFieldCounter.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as n } from "react";
|
|
3
|
-
import { c } from "../../../chunks/vendor-
|
|
3
|
+
import { c } from "../../../chunks/vendor-D-uL_icH.js";
|
|
4
4
|
import { FormFieldDescriptionContext as m } from "../FormFieldDescriptionContext.js";
|
|
5
|
-
const l = "
|
|
5
|
+
const l = "formFieldDescription__b55385b5", p = "withCounter__0fcb9498", i = {
|
|
6
6
|
formFieldDescription: l,
|
|
7
7
|
withCounter: p
|
|
8
8
|
}, d = ({ children: r, ...e }) => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../FormFieldContext.js";
|
|
4
|
-
import "../../../chunks/vendor-
|
|
5
|
-
import { F } from "../../../chunks/FormFieldInput-
|
|
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
|
-
|
|
8
|
+
e as FormFieldInput
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=FormFieldInput.js.map
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
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
|
|
5
|
-
import { c as N } from "../../../chunks/vendor-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"size-
|
|
10
|
-
"size-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
T(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
24
|
+
[s.disabled]: _ === y.DISABLED,
|
|
25
|
+
[s.floating]: l,
|
|
26
|
+
[s[`size-${i}`]]: i
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
),
|
|
28
|
+
r
|
|
29
|
+
), z = {
|
|
29
30
|
// Левая позиция элемента. Когда label по-середине инпута, позиция учитывает иконки по краям, когда сверху, позиция на все ширину поля ввода.
|
|
30
|
-
left:
|
|
31
|
+
left: L || m,
|
|
31
32
|
// Правая позиция элемента. Когда label по-середине инпута, позиция учитывает иконки по краям, когда сверху, позиция на все ширину поля ввода.
|
|
32
|
-
right:
|
|
33
|
-
...
|
|
33
|
+
right: x || m,
|
|
34
|
+
...c
|
|
34
35
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
39
|
+
G.displayName = "FormFieldLabel";
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
G as FormFieldLabel
|
|
41
42
|
};
|
|
42
43
|
//# sourceMappingURL=FormFieldLabel.js.map
|
|
@@ -1,95 +1,105 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../../chunks/vendor-
|
|
4
|
-
import "./FormFieldMaskedInputPresets.js";
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
1
|
+
import { jsxs as N, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as O, useRef as A, useContext as B, useEffect as D, useCallback as U } from "react";
|
|
3
|
+
import { c as F, l as q, m as p } from "../../../chunks/vendor-D-uL_icH.js";
|
|
4
|
+
import { presets as G } from "./FormFieldMaskedInputPresets.js";
|
|
5
|
+
import { s as H, F as J } from "../../../chunks/FormFieldInput-apk1b0w6.js";
|
|
6
|
+
import { FormFieldContext as K } from "../FormFieldContext.js";
|
|
7
|
+
const L = "formFieldMaskedInputWrapper__2c4006d1", Q = "formFieldMaskedInputPlaceholder__641b6e4d", X = "formFieldMaskedInput__70355da8", l = {
|
|
8
|
+
formFieldMaskedInputWrapper: L,
|
|
9
|
+
formFieldMaskedInputPlaceholder: Q,
|
|
10
|
+
"size-sm": "size-sm__eb9869a4",
|
|
11
|
+
"size-md": "size-md__450c5a48",
|
|
12
|
+
"size-lg": "size-lg__96a2c9be",
|
|
13
|
+
formFieldMaskedInput: X
|
|
14
|
+
}, c = ({
|
|
15
|
+
className: I,
|
|
16
|
+
forwardedRef: f,
|
|
17
|
+
disabled: g,
|
|
18
|
+
mask: o,
|
|
19
|
+
onChange: d,
|
|
20
|
+
placeholder: M,
|
|
21
|
+
placeholderChar: i = "0",
|
|
22
|
+
placeholderMask: u,
|
|
23
|
+
value: s,
|
|
24
|
+
..._
|
|
25
|
+
}) => {
|
|
26
|
+
const [V, x] = O(""), a = A(!1), { valueExist: y, focused: z, size: k } = B(K);
|
|
27
|
+
D(() => {
|
|
28
|
+
x((() => {
|
|
29
|
+
let t = [];
|
|
30
|
+
if (s) {
|
|
31
|
+
const { conformedValue: n } = p.conformToMask(s.toString(), o, { guide: !0, placeholderChar: i });
|
|
32
|
+
for (let r = 0; r < o.length; r++)
|
|
33
|
+
typeof o[r] == "string" ? t[r] = n[r] : n[r] === i && !s.toString()[r] ? t[r] = (u == null ? void 0 : u[r]) || i : t[r] = n[r];
|
|
34
|
+
} else if (u)
|
|
35
|
+
t = u.split("");
|
|
36
|
+
else {
|
|
37
|
+
const { conformedValue: n } = p.conformToMask("", o, { guide: !0, placeholderChar: i });
|
|
38
|
+
t = n.split("");
|
|
39
|
+
}
|
|
40
|
+
return t.join("");
|
|
41
|
+
})());
|
|
42
|
+
}, [s, o, i, u]);
|
|
43
|
+
const T = U(
|
|
44
|
+
(e) => {
|
|
45
|
+
const { value: t } = e.target;
|
|
46
|
+
a.current = !1, s !== t && (d == null || d(e));
|
|
47
|
+
},
|
|
48
|
+
[s, d]
|
|
49
|
+
), b = () => {
|
|
50
|
+
a.current = !0;
|
|
51
|
+
}, E = (e, t) => o === c.presets.masks.phone ? e.length ? P(t.rawValue) : e : o === c.presets.masks.swiftCode ? e.toUpperCase() : e, P = (e) => {
|
|
52
|
+
let t = [];
|
|
53
|
+
if (a.current) {
|
|
54
|
+
let n = /^[78]((\D*\d)*)/;
|
|
55
|
+
e = e.replace(n, "+7 ($1"), n = /^\d7/, e = e.replace(n, (r) => (t = Array.from("+7 (").map((Y, $) => $), `+7 (${r}`));
|
|
56
|
+
} else (e === "7" || e === "8") && (e = "+7 (");
|
|
57
|
+
return {
|
|
58
|
+
indexesOfPipedChars: t,
|
|
59
|
+
value: p.conformToMask(e, o, { guide: !1, placeholderChar: i }).conformedValue
|
|
60
|
+
};
|
|
61
|
+
}, W = () => o === c.presets.masks.phone ? (s = P(s).value, s) : p.conformToMask(s, o, { guide: !1, placeholderChar: i }).conformedValue, j = (e) => (t) => {
|
|
62
|
+
t && e(t), typeof f == "function" ? f(t) : f && (f.current = t);
|
|
63
|
+
}, S = () => !y && !z || !s && M ? "" : V;
|
|
64
|
+
return /* @__PURE__ */ N("div", { className: F(l.formFieldMaskedInputWrapper, l[`size-${k}`]), children: [
|
|
65
|
+
/* @__PURE__ */ m(
|
|
66
|
+
"input",
|
|
67
|
+
{
|
|
68
|
+
className: F(
|
|
69
|
+
H.formFieldInput,
|
|
70
|
+
l.formFieldMaskedInputPlaceholder,
|
|
71
|
+
I
|
|
72
|
+
),
|
|
73
|
+
disabled: g,
|
|
74
|
+
placeholder: S(),
|
|
75
|
+
readOnly: !0,
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
type: "text"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ m(
|
|
82
|
+
q,
|
|
83
|
+
{
|
|
84
|
+
className: F(l.formFieldMaskedInput, { [l.error]: !!_.error }, I),
|
|
85
|
+
defaultValue: "",
|
|
86
|
+
disabled: g,
|
|
87
|
+
guide: !1,
|
|
88
|
+
render: (e, t) => /* @__PURE__ */ m(J, { ...t, value: s, placeholder: M || "", ref: j(e) }),
|
|
89
|
+
mask: o,
|
|
90
|
+
onChange: T,
|
|
91
|
+
onPaste: b,
|
|
92
|
+
placeholderChar: i,
|
|
93
|
+
value: W(),
|
|
94
|
+
pipe: E,
|
|
95
|
+
type: "text",
|
|
96
|
+
..._
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] });
|
|
100
|
+
};
|
|
101
|
+
c.presets = G;
|
|
92
102
|
export {
|
|
93
|
-
|
|
103
|
+
c as FormFieldMaskedInput
|
|
94
104
|
};
|
|
95
105
|
//# sourceMappingURL=FormFieldMaskedInput.js.map
|