@sberbusiness/triplex-next 0.1.5 → 0.1.6
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-Dz7CKApv.js → AlertProcessSpoiler-BuN7zhGO.js} +14 -14
- package/chunks/Card.module-ByP22Mc4.js +17 -0
- package/chunks/{DropdownListItem-CwqothNf.js → DropdownListItem-CM0DOekv.js} +13 -13
- package/chunks/DropdownMobile.module-gjHocEKh.js +19 -0
- package/chunks/Footer.module-B1rO0bcd.js +11 -0
- package/chunks/{FormFieldInput-Cmc0beZ5.js → FormFieldInput-3TmHcNY0.js} +18 -18
- package/chunks/HeaderLayoutSidebar.module-CEXHjsmH.js +9 -0
- package/chunks/HeaderTabs.module-YFm2izz6.js +9 -0
- package/chunks/HeaderTitle.module-lv649tnz.js +9 -0
- package/chunks/{ListItemControlsButton-Bn_onrHQ.js → ListItemControlsButton-BpUzyKya.js} +7 -7
- package/chunks/ListItemTail.module-D7Oa-l-5.js +12 -0
- package/chunks/ListMasterFooter.module-1LjIdZNa.js +10 -0
- package/chunks/Overlay.module-BbpDNlm7.js +18 -0
- package/chunks/Page.module-DAinpecX.js +16 -0
- package/chunks/TabsExtended.module-CQBdl7x1.js +13 -0
- package/chunks/{TabsExtendedUtils-CZCrojKY.js → TabsExtendedUtils-BT4b2wK1.js} +2 -2
- package/chunks/TooltipDesktop.module-BRkBuup-.js +19 -0
- package/chunks/{index-1QUfI5kD.js → index-CLQ4mLUp.js} +168 -168
- package/chunks/utils-VD40Qwop.js +36 -0
- package/components/Alert/AlertContext/AlertContext.js +21 -21
- package/components/Alert/AlertProcess/AlertProcess.js +26 -26
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +1 -1
- package/components/Body/Body.js +7 -7
- package/components/Button/Button.js +1 -1
- package/components/Button/ButtonBase.js +3 -3
- package/components/Button/ButtonDropdown.js +2 -2
- package/components/Button/ButtonDropdownExtended.js +1 -1
- package/components/Button/ButtonIcon.js +2 -2
- package/components/Button/index.js +1 -1
- package/components/Card/CardAction.js +24 -24
- package/components/Card/CardStatic.js +17 -17
- package/components/Card/components/CardContent/CardContent.js +1 -1
- package/components/Card/components/CardContent/components/CardContentBody.js +1 -1
- package/components/Card/components/CardContent/components/CardContentFooter.js +1 -1
- package/components/Card/components/CardContent/components/CardContentHeader.js +1 -1
- package/components/Card/components/CardMedia.js +1 -1
- package/components/Card/utils.js +1 -1
- package/components/Checkbox/Checkbox.js +11 -11
- package/components/Checkbox/CheckboxXGroup.js +10 -10
- package/components/Checkbox/CheckboxYGroup.js +3 -3
- package/components/Col/Col.js +136 -136
- package/components/DesignTokens/DesignTokenUtils.js +34 -34
- package/components/Dropdown/Dropdown.js +1 -1
- package/components/Dropdown/desktop/DropdownDesktop.js +2 -2
- package/components/Dropdown/desktop/DropdownList.js +4 -4
- package/components/Dropdown/desktop/DropdownListItem.js +1 -1
- package/components/Dropdown/index.js +2 -2
- package/components/Dropdown/mobile/DropdownMobile.js +8 -8
- package/components/Dropdown/mobile/DropdownMobileBody.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileClose.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileFooter.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileHeader.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileInner.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileInput.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileList.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileListItem.js +1 -1
- package/components/Footer/Footer.js +13 -13
- package/components/Footer/components/FooterDescription.js +1 -1
- package/components/Footer/components/FooterDescriptionContent.js +1 -1
- package/components/Footer/components/FooterDescriptionControls.js +1 -1
- package/components/FormField/FormField.js +26 -26
- package/components/FormField/components/FormFieldClear.js +10 -10
- package/components/FormField/components/FormFieldCounter.js +3 -3
- package/components/FormField/components/FormFieldDescription.js +3 -3
- package/components/FormField/components/FormFieldInput.js +1 -1
- package/components/FormField/components/FormFieldLabel.js +12 -12
- package/components/FormField/components/FormFieldMaskedInput.js +4 -4
- package/components/FormField/components/FormFieldPostfix.js +1 -1
- package/components/FormField/components/FormFieldPrefix.js +7 -7
- package/components/FormField/components/FormFieldTextarea.js +9 -9
- package/components/FormField/index.js +2 -2
- package/components/Header/Header.js +14 -14
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +1 -1
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +1 -1
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +1 -1
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +5 -5
- package/components/Header/components/HeaderTabs/HeaderTabs.js +1 -1
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +1 -1
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +1 -1
- package/components/Header/components/HeaderTitle/HeaderTitle.js +1 -1
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +1 -1
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +1 -1
- package/components/Link/Link.js +36 -36
- package/components/List/List.js +12 -12
- package/components/List/components/ListEmptyState.js +3 -3
- package/components/List/components/ListItem.js +10 -10
- package/components/List/components/ListItemContent.js +10 -10
- package/components/List/components/ListItemControls.js +5 -5
- package/components/List/components/ListItemControlsButton.js +1 -1
- package/components/List/components/ListItemControlsButtonDropdown.js +2 -2
- package/components/List/components/ListItemLoading.js +5 -5
- package/components/List/components/ListItemSelectable.js +8 -8
- package/components/List/components/ListItemTable.js +2 -2
- package/components/List/components/ListItemTailLeft.js +1 -1
- package/components/List/components/ListItemTailRight.js +1 -1
- package/components/List/components/ListSortableItem.js +2 -2
- package/components/List/components/ListSortableItemControls.js +5 -5
- package/components/List/components/ListSortableItemTarget.js +9 -9
- package/components/List/index.js +2 -2
- package/components/ListMaster/ListMaster.js +8 -8
- package/components/ListMaster/components/ListMasterBody.js +9 -9
- package/components/ListMaster/components/ListMasterChipGroup.js +6 -6
- package/components/ListMaster/components/ListMasterFooter.js +1 -1
- package/components/ListMaster/components/ListMasterFooterControls.js +1 -1
- package/components/ListMaster/components/ListMasterFooterDescription.js +1 -1
- package/components/ListMaster/components/ListMasterHeader.js +5 -5
- package/components/ListMaster/components/SelectionControls.js +10 -10
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +6 -6
- package/components/Loader/LoaderSmall/LoaderSmall.js +18 -18
- package/components/LoaderWidget/LoaderWidget.js +4 -4
- package/components/Overlay/Overlay.js +1 -1
- package/components/Overlay/OverlayMask.js +1 -1
- package/components/Overlay/OverlayPanel.js +1 -1
- package/components/Page/Page.js +1 -1
- package/components/Page/components/BodyPage.js +1 -1
- package/components/Page/components/FooterPage.js +1 -1
- package/components/Page/components/HeaderPage.js +1 -1
- package/components/Pagination/components/PaginationExtended.js +14 -14
- package/components/Pagination/components/PaginationNavigationButton.js +4 -4
- package/components/Pagination/components/PaginationNavigationExtended.js +1 -1
- package/components/Pagination/components/PaginationPageButton.js +1 -1
- package/components/Pagination/components/PaginationPageEllipsis.js +1 -1
- package/components/Pagination/components/PaginationSelect.js +12 -12
- package/components/Radio/Radio.js +12 -12
- package/components/Radio/RadioXGroup.js +7 -7
- package/components/Radio/RadioYGroup.js +9 -9
- package/components/Row/Row.js +9 -9
- package/components/SegmentedControl/SegmentedControl.js +1 -1
- package/components/SegmentedControl/SegmentedControlSegment.js +1 -1
- package/components/SegmentedControl/index.js +1 -1
- package/components/Skeleton/Skeleton.js +12 -12
- package/components/SwipeableArea/SwipeableArea.js +19 -19
- package/components/TabsExtended/TabsExtended.js +1 -1
- package/components/TabsExtended/TabsExtendedUtils.js +1 -1
- package/components/TabsExtended/components/TabsExtendedContent.js +1 -1
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +1 -1
- package/components/TabsExtended/components/TabsExtendedTab.js +1 -1
- package/components/TabsExtended/components/TabsExtendedTabButton.js +1 -1
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +1 -1
- package/components/TextField/MaskedField.js +4 -4
- package/components/TextField/TextField.js +4 -4
- package/components/TextField/TextFieldBase.js +4 -4
- package/components/TextField/index.js +1 -1
- package/components/Tooltip/components/common/TooltipBody.js +1 -1
- package/components/Tooltip/components/common/TooltipLink.js +18 -18
- package/components/Tooltip/components/common/TooltipXButton.js +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +1 -1
- package/components/Tooltip/components/mobile/TooltipMobile.js +8 -8
- package/components/Typography/Caption.js +9 -9
- package/components/Typography/Text.js +7 -7
- package/components/Typography/Title.js +15 -15
- package/components/Typography/utils.js +1 -1
- package/components/UploadZone/components/UploadZoneInput.js +37 -37
- package/components/index.js +4 -4
- package/index.js +4 -4
- package/package.json +1 -1
- package/styles/triplex-next.css +333 -333
- package/chunks/Card.module-BVAy3tJd.js +0 -17
- package/chunks/DropdownMobile.module-zLTfuu5W.js +0 -19
- package/chunks/Footer.module-C8ediOIN.js +0 -11
- package/chunks/HeaderLayoutSidebar.module-DUesMumi.js +0 -9
- package/chunks/HeaderTabs.module-B8b_Vmmv.js +0 -9
- package/chunks/HeaderTitle.module-CS0vKAYw.js +0 -9
- package/chunks/ListItemTail.module-8r8-WRy-.js +0 -12
- package/chunks/ListMasterFooter.module-Bylyf04G.js +0 -10
- package/chunks/Overlay.module-BfeGcilV.js +0 -18
- package/chunks/Page.module-DI3KI2pW.js +0 -16
- package/chunks/TabsExtended.module-De1gs7fV.js +0 -13
- package/chunks/TooltipDesktop.module-0Me4J_t3.js +0 -19
- package/chunks/utils-DUlFnyF3.js +0 -36
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as ue, D as Ge } from "./DropdownListItem-
|
|
1
|
+
import { s as ue, D as Ge } from "./DropdownListItem-CM0DOekv.js";
|
|
2
2
|
import { DropdownMobile as $e } from "../components/Dropdown/mobile/DropdownMobile.js";
|
|
3
|
-
import { DropdownMobileBody as
|
|
4
|
-
import { DropdownMobileClose as
|
|
3
|
+
import { DropdownMobileBody as Le } from "../components/Dropdown/mobile/DropdownMobileBody.js";
|
|
4
|
+
import { DropdownMobileClose as ve } from "../components/Dropdown/mobile/DropdownMobileClose.js";
|
|
5
5
|
import "../components/Dropdown/mobile/DropdownMobileFooter.js";
|
|
6
6
|
import { DropdownMobileHeader as Te } from "../components/Dropdown/mobile/DropdownMobileHeader.js";
|
|
7
7
|
import "../components/Dropdown/mobile/DropdownMobileInner.js";
|
|
@@ -17,7 +17,7 @@ import { FormFieldDescription as He } from "../components/FormField/components/F
|
|
|
17
17
|
import { FormFieldCounter as Ke } from "../components/FormField/components/FormFieldCounter.js";
|
|
18
18
|
import { FormFieldLabel as Ve } from "../components/FormField/components/FormFieldLabel.js";
|
|
19
19
|
import "../components/FormField/components/FormFieldClear.js";
|
|
20
|
-
import { s as je, F as Me } from "./FormFieldInput-
|
|
20
|
+
import { s as je, F as Me } from "./FormFieldInput-3TmHcNY0.js";
|
|
21
21
|
import { FormFieldPostfix as Ye } from "../components/FormField/components/FormFieldPostfix.js";
|
|
22
22
|
import { FormFieldPrefix as qe } from "../components/FormField/components/FormFieldPrefix.js";
|
|
23
23
|
import "../components/FormField/components/FormFieldTextarea.js";
|
|
@@ -27,7 +27,7 @@ import "../components/List/ListSortable.js";
|
|
|
27
27
|
import { ListItem as xe } from "../components/List/components/ListItem.js";
|
|
28
28
|
import { ListItemControls as Je } from "../components/List/components/ListItemControls.js";
|
|
29
29
|
import { ListItemContent as Qe } from "../components/List/components/ListItemContent.js";
|
|
30
|
-
import { s as fe, L as Xe } from "./ListItemControlsButton-
|
|
30
|
+
import { s as fe, L as Xe } from "./ListItemControlsButton-BpUzyKya.js";
|
|
31
31
|
import "../components/List/components/ListEmptyState.js";
|
|
32
32
|
import "../components/List/components/ListItemLoading.js";
|
|
33
33
|
import { ListItemSelectable as Ze } from "../components/List/components/ListItemSelectable.js";
|
|
@@ -101,37 +101,37 @@ import "../components/Card/CardStatic.js";
|
|
|
101
101
|
import { useToken as mt } from "../components/ThemeProvider/useToken.js";
|
|
102
102
|
import { MobileView as ut } from "../components/MobileView/MobileView.js";
|
|
103
103
|
import { DotshorizontalStrokeSrvIcon24 as ft, CaretdownStrokeSrvIcon24 as ge } from "@sberbusiness/icons-next";
|
|
104
|
-
import { ELoaderSmallTheme as
|
|
105
|
-
const pt = "
|
|
104
|
+
import { ELoaderSmallTheme as be, ELoaderSmallSize as se } from "../components/Loader/LoaderSmall/enum.js";
|
|
105
|
+
const pt = "button__9e90103a", gt = "sm__7431abb2", bt = "icon__e6d198b8", wt = "md__85c5af41", ht = "lg__bb71fc01", _t = "block__3eb3cf09", Dt = "content__080b748a", yt = "loading__0b417097", St = "loader__81ee9104", Nt = "hidden__8825f7da", z = {
|
|
106
106
|
button: pt,
|
|
107
107
|
sm: gt,
|
|
108
|
-
icon:
|
|
109
|
-
md:
|
|
110
|
-
lg:
|
|
111
|
-
block:
|
|
108
|
+
icon: bt,
|
|
109
|
+
md: wt,
|
|
110
|
+
lg: ht,
|
|
111
|
+
block: _t,
|
|
112
112
|
content: Dt,
|
|
113
113
|
loading: yt,
|
|
114
114
|
loader: St,
|
|
115
115
|
hidden: Nt
|
|
116
|
-
}, Et = "
|
|
116
|
+
}, Et = "general__81e93e72", It = "expanded__1a4fe561", we = {
|
|
117
117
|
general: Et,
|
|
118
118
|
expanded: It
|
|
119
|
-
},
|
|
120
|
-
secondary:
|
|
121
|
-
expanded:
|
|
122
|
-
}, Tt = "
|
|
119
|
+
}, Lt = "secondary__2e3a9d2c", vt = "expanded__1a4fe561", he = {
|
|
120
|
+
secondary: Lt,
|
|
121
|
+
expanded: vt
|
|
122
|
+
}, Tt = "danger__90b972ec", Ct = "expanded__1a4fe561", _e = {
|
|
123
123
|
danger: Tt,
|
|
124
124
|
expanded: Ct
|
|
125
|
-
}, Rt = "
|
|
125
|
+
}, Rt = "link__30361d77", De = {
|
|
126
126
|
link: Rt
|
|
127
127
|
}, kt = (d, t) => {
|
|
128
128
|
switch (d) {
|
|
129
129
|
case $.GENERAL:
|
|
130
|
-
return { [
|
|
130
|
+
return { [we.general]: !0, [we.expanded]: t };
|
|
131
131
|
case $.SECONDARY:
|
|
132
|
-
return { [
|
|
132
|
+
return { [he.secondary]: !0, [he.expanded]: t };
|
|
133
133
|
case $.DANGER:
|
|
134
|
-
return { [
|
|
134
|
+
return { [_e.danger]: !0, [_e.expanded]: t };
|
|
135
135
|
case $.LINK:
|
|
136
136
|
return { [De.link]: !0, [De.expanded]: t };
|
|
137
137
|
}
|
|
@@ -145,27 +145,27 @@ const pt = "button__8910c7ff", gt = "sm__ffd8f060", wt = "icon__5d27a691", ht =
|
|
|
145
145
|
return z.sm;
|
|
146
146
|
}
|
|
147
147
|
}, xt = (d, t) => {
|
|
148
|
-
const m = d === $.SECONDARY ?
|
|
148
|
+
const m = d === $.SECONDARY ? be.BRAND : be.NEUTRAL, o = t === P.SM ? se.SM : t === P.LG ? se.LG : se.MD;
|
|
149
149
|
return /* @__PURE__ */ r(at, { theme: m, size: o });
|
|
150
150
|
}, ie = x.forwardRef((d, t) => {
|
|
151
|
-
const { children: m, className: o, disabled: p, theme: u, size: i = P.MD, block: a, loading: c, icon:
|
|
151
|
+
const { children: m, className: o, disabled: p, theme: u, size: i = P.MD, block: a, loading: c, icon: w, ..._ } = d, { "aria-expanded": L } = d, y = k(
|
|
152
152
|
z.button,
|
|
153
|
-
kt(u, !!
|
|
153
|
+
kt(u, !!L),
|
|
154
154
|
Mt(i),
|
|
155
155
|
{ [z.block]: !!a, [z.loading]: !!c },
|
|
156
|
-
{ [z.icon]: !!
|
|
156
|
+
{ [z.icon]: !!w && !m },
|
|
157
157
|
// Классы для иконок, начало.
|
|
158
158
|
"hoverable",
|
|
159
159
|
{
|
|
160
|
-
active: !!
|
|
160
|
+
active: !!L,
|
|
161
161
|
disabled: !!p
|
|
162
162
|
},
|
|
163
163
|
// Классы для иконок, конец.
|
|
164
164
|
o
|
|
165
165
|
);
|
|
166
|
-
return /* @__PURE__ */ F(ke, { className: y, tabIndex: c ? -1 : void 0, disabled: p, ...
|
|
166
|
+
return /* @__PURE__ */ F(ke, { className: y, tabIndex: c ? -1 : void 0, disabled: p, ..._, ref: t, children: [
|
|
167
167
|
/* @__PURE__ */ F("span", { className: z.content, children: [
|
|
168
|
-
|
|
168
|
+
w,
|
|
169
169
|
m
|
|
170
170
|
] }),
|
|
171
171
|
/* @__PURE__ */ r("div", { className: k(z.loader, !c && z.hidden), children: xt(u, i) })
|
|
@@ -173,67 +173,67 @@ const pt = "button__8910c7ff", gt = "sm__ffd8f060", wt = "icon__5d27a691", ht =
|
|
|
173
173
|
});
|
|
174
174
|
ie.displayName = "Button";
|
|
175
175
|
const K = (d) => {
|
|
176
|
-
const { children: t, className: m, dropdownOpened: o, listRef: p, size: u = J.MD, ...i } = d, a = k(ue.dropdownList, m, ue[`dropdownList-${u}`]), { activeDescendant: c, setActiveDescendant:
|
|
176
|
+
const { children: t, className: m, dropdownOpened: o, listRef: p, size: u = J.MD, ...i } = d, a = k(ue.dropdownList, m, ue[`dropdownList-${u}`]), { activeDescendant: c, setActiveDescendant: w } = ae(le), _ = p || x.createRef(), L = O([]), [y, N] = j(void 0), E = x.Children.count(t), M = (b) => {
|
|
177
177
|
const n = x.createRef();
|
|
178
|
-
return
|
|
179
|
-
}, I = (
|
|
180
|
-
var
|
|
181
|
-
const n =
|
|
182
|
-
if (n &&
|
|
183
|
-
const { top: e, bottom: s } = n.getBoundingClientRect(), { top: f, bottom: D } =
|
|
178
|
+
return L.current[b] = n, n;
|
|
179
|
+
}, I = (b) => {
|
|
180
|
+
var v;
|
|
181
|
+
const n = _ == null ? void 0 : _.current, h = (v = L.current[b]) == null ? void 0 : v.current;
|
|
182
|
+
if (n && h) {
|
|
183
|
+
const { top: e, bottom: s } = n.getBoundingClientRect(), { top: f, bottom: D } = h.getBoundingClientRect(), l = 4;
|
|
184
184
|
e > f ? n.scrollTop = n.scrollTop - e + f - l : D > s && (n.scrollTop = n.scrollTop + D - s + l);
|
|
185
185
|
}
|
|
186
186
|
}, C = () => {
|
|
187
|
-
const
|
|
188
|
-
|
|
187
|
+
const b = _ == null ? void 0 : _.current;
|
|
188
|
+
b && (b.scrollTop = 0);
|
|
189
189
|
};
|
|
190
190
|
W(() => {
|
|
191
191
|
if (!o)
|
|
192
192
|
return;
|
|
193
|
-
const
|
|
194
|
-
const { keyCode:
|
|
193
|
+
const b = (n) => {
|
|
194
|
+
const { keyCode: h } = n, v = E, e = y;
|
|
195
195
|
let s;
|
|
196
|
-
|
|
196
|
+
h === pe.ARROW_DOWN ? (e !== void 0 && e < v - 1 ? s = e + 1 : s = 0, n.preventDefault()) : h === pe.ARROW_UP && (e !== void 0 && e > 0 ? s = e - 1 : s = v - 1, n.preventDefault()), s !== void 0 && e !== s && (I(s), N(s));
|
|
197
197
|
};
|
|
198
|
-
return document.addEventListener("keydown",
|
|
199
|
-
document.removeEventListener("keydown",
|
|
198
|
+
return document.addEventListener("keydown", b), () => {
|
|
199
|
+
document.removeEventListener("keydown", b);
|
|
200
200
|
};
|
|
201
201
|
}, [o, y, E]), W(() => {
|
|
202
202
|
if (!o)
|
|
203
203
|
return;
|
|
204
|
-
let
|
|
205
|
-
x.Children.forEach(t, (n,
|
|
206
|
-
n && n.props && n.props.selected && (
|
|
207
|
-
}),
|
|
204
|
+
let b = !1;
|
|
205
|
+
x.Children.forEach(t, (n, h) => {
|
|
206
|
+
n && n.props && n.props.selected && (b = !0, I(h), N(h));
|
|
207
|
+
}), b || (N(0), C());
|
|
208
208
|
}, [o]), W(() => {
|
|
209
|
-
var
|
|
209
|
+
var b, n;
|
|
210
210
|
if (o && y !== void 0) {
|
|
211
|
-
|
|
211
|
+
w((n = (b = L.current[y]) == null ? void 0 : b.current) == null ? void 0 : n.id);
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
|
-
!o && c !== void 0 &&
|
|
215
|
-
}, [o, y, c,
|
|
216
|
-
c !== void 0 &&
|
|
217
|
-
}, [c,
|
|
218
|
-
const A = x.Children.map(t, (
|
|
219
|
-
if (
|
|
220
|
-
return x.cloneElement(
|
|
214
|
+
!o && c !== void 0 && w();
|
|
215
|
+
}, [o, y, c, w]), W(() => () => {
|
|
216
|
+
c !== void 0 && w();
|
|
217
|
+
}, [c, w]);
|
|
218
|
+
const A = x.Children.map(t, (b, n) => {
|
|
219
|
+
if (b)
|
|
220
|
+
return x.cloneElement(b, {
|
|
221
221
|
active: o && y === n,
|
|
222
|
-
onMouseOver: (
|
|
223
|
-
var
|
|
224
|
-
N(n), (e = (
|
|
222
|
+
onMouseOver: (h) => {
|
|
223
|
+
var v, e;
|
|
224
|
+
N(n), (e = (v = b.props).onMouseOver) == null || e.call(v, h);
|
|
225
225
|
},
|
|
226
226
|
ref: M(n)
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
|
-
return /* @__PURE__ */ r("div", { className: a, role: "listbox", ref:
|
|
229
|
+
return /* @__PURE__ */ r("div", { className: a, role: "listbox", ref: _, ...i, children: A });
|
|
230
230
|
};
|
|
231
231
|
K.Item = Ge;
|
|
232
|
-
const At = "
|
|
232
|
+
const At = "dropdown__ff240a21", Ft = "dropdownOverflowHidden__cbaea3f9", ye = {
|
|
233
233
|
dropdown: At,
|
|
234
|
-
"dropdown-sm": "dropdown-
|
|
235
|
-
"dropdown-md": "dropdown-
|
|
236
|
-
"dropdown-lg": "dropdown-
|
|
234
|
+
"dropdown-sm": "dropdown-sm__17ef0018",
|
|
235
|
+
"dropdown-md": "dropdown-md__d8df81ee",
|
|
236
|
+
"dropdown-lg": "dropdown-lg__8609a077",
|
|
237
237
|
dropdownOverflowHidden: Ft
|
|
238
238
|
}, Se = "dropdownOverflowHidden", ce = x.forwardRef((d, t) => {
|
|
239
239
|
const {
|
|
@@ -244,11 +244,11 @@ const At = "dropdown__4c322172", Ft = "dropdownOverflowHidden__69339e5b", ye = {
|
|
|
244
244
|
direction: i = ee.AUTO,
|
|
245
245
|
opened: a,
|
|
246
246
|
setOpened: c,
|
|
247
|
-
style:
|
|
248
|
-
targetRef:
|
|
249
|
-
size:
|
|
247
|
+
style: w,
|
|
248
|
+
targetRef: _,
|
|
249
|
+
size: L = Q.MD,
|
|
250
250
|
...y
|
|
251
|
-
} = d, { scopeClassName: N } = mt(), [E, M] = j({ ...
|
|
251
|
+
} = d, { scopeClassName: N } = mt(), [E, M] = j({ ...w, opacity: 0 }), I = O(null), C = O({ height: 0, width: 0 }), A = k(ye.dropdown, N, u, ye[`dropdown-${L}`]), b = G(
|
|
252
252
|
(l) => {
|
|
253
253
|
var S;
|
|
254
254
|
(S = I.current) != null && S.contains(l.target) || l.preventDefault();
|
|
@@ -259,13 +259,13 @@ const At = "dropdown__4c322172", Ft = "dropdownOverflowHidden__69339e5b", ye = {
|
|
|
259
259
|
const S = l.code || l.keyCode;
|
|
260
260
|
(T(S, "SPACE") || T(S, "PAGE_UP") || T(S, "PAGE_DOWN") || T(S, "END") || T(S, "HOME") || T(S, "ARROW_LEFT") || T(S, "ARROW_UP") || T(S, "ARROW_RIGHT") || T(S, "ARROW_DOWN")) && l.preventDefault();
|
|
261
261
|
}
|
|
262
|
-
}, []),
|
|
262
|
+
}, []), h = G(
|
|
263
263
|
/** Запрет скролла всей страницы. */
|
|
264
264
|
(l) => {
|
|
265
|
-
l ? (document.addEventListener("wheel",
|
|
265
|
+
l ? (document.addEventListener("wheel", b, { passive: !1 }), document.addEventListener("keydown", n)) : (document.removeEventListener("wheel", b), document.removeEventListener("keydown", n));
|
|
266
266
|
},
|
|
267
|
-
[
|
|
268
|
-
),
|
|
267
|
+
[b, n]
|
|
268
|
+
), v = G(
|
|
269
269
|
(l, S, g) => {
|
|
270
270
|
const R = p ? g.width : Math.max(g.width, S.width);
|
|
271
271
|
m === Z.AUTO ? g.right - R > 0 ? l.left = g.right - R : g.left + R < document.documentElement.clientWidth ? l.left = g.left : l.left = g.right - R : m === Z.RIGHT ? l.left = g.right - R : m === Z.LEFT && (l.left = g.left);
|
|
@@ -277,15 +277,15 @@ const At = "dropdown__4c322172", Ft = "dropdownOverflowHidden__69339e5b", ye = {
|
|
|
277
277
|
},
|
|
278
278
|
[i]
|
|
279
279
|
), s = G(() => {
|
|
280
|
-
const { current: l } = I, { current: S } =
|
|
280
|
+
const { current: l } = I, { current: S } = _;
|
|
281
281
|
if (l && S) {
|
|
282
282
|
const g = l.getBoundingClientRect(), R = S.getBoundingClientRect(), Y = {};
|
|
283
|
-
p ? Y.width = R.width : Y.minWidth = R.width, e(Y, g, R),
|
|
283
|
+
p ? Y.width = R.width : Y.minWidth = R.width, e(Y, g, R), v(Y, g, R), C.current = { height: g.height, width: g.width }, M({ ...w, ...Y });
|
|
284
284
|
}
|
|
285
|
-
}, [
|
|
285
|
+
}, [_, p, w, e, v]);
|
|
286
286
|
W(() => {
|
|
287
|
-
a ? s() : (C.current = { height: 0, width: 0 }, M({ ...
|
|
288
|
-
}, [a, s,
|
|
287
|
+
a ? s() : (C.current = { height: 0, width: 0 }, M({ ...w, opacity: 0 }));
|
|
288
|
+
}, [a, s, w]), W(() => {
|
|
289
289
|
if (I.current) {
|
|
290
290
|
const { width: l, height: S } = I.current.getBoundingClientRect();
|
|
291
291
|
(l != C.current.width || S != C.current.height) && s();
|
|
@@ -296,10 +296,10 @@ const At = "dropdown__4c322172", Ft = "dropdownOverflowHidden__69339e5b", ye = {
|
|
|
296
296
|
}, [s]);
|
|
297
297
|
W(() => {
|
|
298
298
|
if (a)
|
|
299
|
-
return document.addEventListener("scroll", f, !0), window.addEventListener("resize", f),
|
|
300
|
-
document.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f),
|
|
299
|
+
return document.addEventListener("scroll", f, !0), window.addEventListener("resize", f), h(!0), document.body.classList.add(Se), () => {
|
|
300
|
+
document.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f), h(!1), document.body.classList.remove(Se);
|
|
301
301
|
};
|
|
302
|
-
}, [a, f,
|
|
302
|
+
}, [a, f, h]);
|
|
303
303
|
const D = (l) => {
|
|
304
304
|
I.current = l, typeof t == "function" ? t(l) : t && (t.current = l);
|
|
305
305
|
};
|
|
@@ -310,7 +310,7 @@ const At = "dropdown__4c322172", Ft = "dropdownOverflowHidden__69339e5b", ye = {
|
|
|
310
310
|
style: { ...E },
|
|
311
311
|
ref: D,
|
|
312
312
|
...y,
|
|
313
|
-
"data-tx":
|
|
313
|
+
"data-tx": "0.1.6",
|
|
314
314
|
children: o
|
|
315
315
|
}
|
|
316
316
|
) : null;
|
|
@@ -331,13 +331,13 @@ const Pe = x.forwardRef(
|
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
333
|
Pe.displayName = "Dropdown";
|
|
334
|
-
const Ot = "
|
|
334
|
+
const Ot = "buttonDropdownExtended__eaf7c3e0", Bt = "buttonDropdownExtendedBlock__00adf9e5", Ne = {
|
|
335
335
|
buttonDropdownExtended: Ot,
|
|
336
336
|
buttonDropdownExtendedBlock: Bt
|
|
337
337
|
}, V = (d) => {
|
|
338
|
-
const { className: t, opened: m, setOpened: o, renderButton: p, renderDropdown: u, dropdownRef: i, closeOnTab: a, ...c } = d,
|
|
338
|
+
const { className: t, opened: m, setOpened: o, renderButton: p, renderDropdown: u, dropdownRef: i, closeOnTab: a, ...c } = d, w = O(null), _ = O(d.opened !== void 0), [L, y] = j((d.opened === void 0, !1)), N = _.current ? !!m : L, E = G(
|
|
339
339
|
(I) => {
|
|
340
|
-
if (
|
|
340
|
+
if (_.current) {
|
|
341
341
|
o && o(I);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
@@ -349,21 +349,21 @@ const Ot = "buttonDropdownExtended__b13d3a5a", Bt = "buttonDropdownExtendedBlock
|
|
|
349
349
|
if (!N)
|
|
350
350
|
return;
|
|
351
351
|
const I = (A) => {
|
|
352
|
-
const
|
|
353
|
-
N && (T(
|
|
352
|
+
const b = A.code || A.keyCode;
|
|
353
|
+
N && (T(b, "ESCAPE") || a && T(b, "TAB")) && E(!1);
|
|
354
354
|
}, C = (A) => {
|
|
355
|
-
const
|
|
355
|
+
const b = w.current, n = i.current;
|
|
356
356
|
if (N) {
|
|
357
|
-
const
|
|
358
|
-
|
|
357
|
+
const h = A.target;
|
|
358
|
+
h && !(b != null && b.contains(h)) && !(n != null && n.contains(h)) && E(!1);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
return document.addEventListener("keydown", I), document.addEventListener("mousedown", C), document.addEventListener("touchstart", C), () => {
|
|
362
362
|
document.removeEventListener("keydown", I), document.removeEventListener("mousedown", C), document.removeEventListener("touchstart", C);
|
|
363
363
|
};
|
|
364
|
-
}, [N, a, i, E,
|
|
364
|
+
}, [N, a, i, E, w]);
|
|
365
365
|
const M = k(Ne.buttonDropdownExtended, t);
|
|
366
|
-
return /* @__PURE__ */ F("div", { className: M, ref:
|
|
366
|
+
return /* @__PURE__ */ F("div", { className: M, ref: w, ...c, children: [
|
|
367
367
|
p({ opened: N, setOpened: E }),
|
|
368
368
|
u({
|
|
369
369
|
className: Ne.buttonDropdownExtendedBlock,
|
|
@@ -374,7 +374,7 @@ const Ot = "buttonDropdownExtended__b13d3a5a", Bt = "buttonDropdownExtendedBlock
|
|
|
374
374
|
};
|
|
375
375
|
V.Dropdown = Pe;
|
|
376
376
|
V.DropdownList = K;
|
|
377
|
-
const Pt = "
|
|
377
|
+
const Pt = "buttonDropdown__c89a1a0b", zt = "block__3eb3cf09", Wt = "buttonDropdownTarget__735398dd", Gt = "caretIcon__f80cba27", $t = "active__d72757aa", Ut = "buttonDropdownMenuItem__4f070c54", B = {
|
|
378
378
|
buttonDropdown: Pt,
|
|
379
379
|
block: zt,
|
|
380
380
|
buttonDropdownTarget: Wt,
|
|
@@ -405,10 +405,10 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
405
405
|
}
|
|
406
406
|
}, Vt = x.forwardRef(
|
|
407
407
|
(d, t) => {
|
|
408
|
-
const { buttonAttributes: m, children: o, className: p, theme: u, size: i, options: a, selected: c, block:
|
|
408
|
+
const { buttonAttributes: m, children: o, className: p, theme: u, size: i, options: a, selected: c, block: w, disabled: _, ...L } = d, y = O(null), N = O(null), E = k(B.buttonDropdown, { [B.block]: !!w }, p), [M, I] = j(), C = O(Fe()), A = ({ opened: f, setOpened: D }) => {
|
|
409
409
|
const l = k(B.buttonDropdownTarget, "hoverable", {
|
|
410
410
|
[B.active]: f,
|
|
411
|
-
[B.block]: !!
|
|
411
|
+
[B.block]: !!w
|
|
412
412
|
});
|
|
413
413
|
return /* @__PURE__ */ F(
|
|
414
414
|
ie,
|
|
@@ -416,9 +416,9 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
416
416
|
className: l,
|
|
417
417
|
theme: u,
|
|
418
418
|
size: i,
|
|
419
|
-
onKeyDown:
|
|
419
|
+
onKeyDown: h({ opened: f, setOpened: D }),
|
|
420
420
|
onClick: n({ opened: f, setOpened: D }),
|
|
421
|
-
disabled:
|
|
421
|
+
disabled: _,
|
|
422
422
|
"aria-haspopup": "menu",
|
|
423
423
|
"aria-expanded": f,
|
|
424
424
|
"aria-controls": C.current,
|
|
@@ -427,14 +427,14 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
427
427
|
ref: s,
|
|
428
428
|
children: [
|
|
429
429
|
o,
|
|
430
|
-
|
|
430
|
+
v()
|
|
431
431
|
]
|
|
432
432
|
}
|
|
433
433
|
);
|
|
434
|
-
},
|
|
434
|
+
}, b = ({ opened: f, setOpened: D }) => {
|
|
435
435
|
const l = k(B.buttonDropdownTarget, "hoverable", {
|
|
436
436
|
[B.active]: f,
|
|
437
|
-
[B.block]: !!
|
|
437
|
+
[B.block]: !!w
|
|
438
438
|
});
|
|
439
439
|
return /* @__PURE__ */ r(
|
|
440
440
|
ie,
|
|
@@ -442,9 +442,9 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
442
442
|
className: l,
|
|
443
443
|
theme: $.SECONDARY,
|
|
444
444
|
size: i,
|
|
445
|
-
onKeyDown:
|
|
445
|
+
onKeyDown: h({ opened: f, setOpened: D }),
|
|
446
446
|
onClick: n({ opened: f, setOpened: D }),
|
|
447
|
-
disabled:
|
|
447
|
+
disabled: _,
|
|
448
448
|
"aria-haspopup": "menu",
|
|
449
449
|
"aria-expanded": f,
|
|
450
450
|
"aria-controls": C.current,
|
|
@@ -454,10 +454,10 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
454
454
|
icon: /* @__PURE__ */ r(ft, { paletteIndex: 0 })
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
|
-
}, n = ({ opened: f, setOpened: D }) => () => D(!f),
|
|
457
|
+
}, n = ({ opened: f, setOpened: D }) => () => D(!f), h = ({ opened: f, setOpened: D }) => (l) => {
|
|
458
458
|
const { key: S } = l;
|
|
459
459
|
(T(S, "SPACE") || T(S, "ARROW_UP") || T(S, "ARROW_DOWN")) && l.preventDefault(), !f && (T(S, "ARROW_UP") || T(S, "ARROW_DOWN")) && D(!0);
|
|
460
|
-
},
|
|
460
|
+
}, v = () => {
|
|
461
461
|
switch (u) {
|
|
462
462
|
case $.GENERAL:
|
|
463
463
|
case $.DANGER:
|
|
@@ -483,9 +483,9 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
483
483
|
children: /* @__PURE__ */ F(Ae, { children: [
|
|
484
484
|
/* @__PURE__ */ F(Te, { children: [
|
|
485
485
|
/* @__PURE__ */ r(Oe, { tag: "div", size: Be.B3, children: o }),
|
|
486
|
-
/* @__PURE__ */ r(
|
|
486
|
+
/* @__PURE__ */ r(ve, { onClick: () => D(!1) })
|
|
487
487
|
] }),
|
|
488
|
-
/* @__PURE__ */ r(
|
|
488
|
+
/* @__PURE__ */ r(Le, { children: /* @__PURE__ */ r(Ce, { children: a.map((g) => /* @__PURE__ */ ne(
|
|
489
489
|
Re,
|
|
490
490
|
{
|
|
491
491
|
...g,
|
|
@@ -523,22 +523,22 @@ const Pt = "buttonDropdown__f439c212", zt = "block__17df638d", Wt = "buttonDropd
|
|
|
523
523
|
V,
|
|
524
524
|
{
|
|
525
525
|
className: E,
|
|
526
|
-
renderButton: u === Ee ?
|
|
526
|
+
renderButton: u === Ee ? b : A,
|
|
527
527
|
renderDropdown: e,
|
|
528
528
|
dropdownRef: N,
|
|
529
529
|
closeOnTab: !0,
|
|
530
|
-
...
|
|
530
|
+
...L
|
|
531
531
|
}
|
|
532
532
|
);
|
|
533
533
|
}
|
|
534
534
|
);
|
|
535
535
|
Vt.displayName = "ButtonDropdown";
|
|
536
|
-
const jt = "
|
|
536
|
+
const jt = "formFieldMaskedInputWrapper__18b96804", Yt = "formFieldMaskedInputPlaceholder__5ddbb445", qt = "formFieldMaskedInput__9f3e2c2a", q = {
|
|
537
537
|
formFieldMaskedInputWrapper: jt,
|
|
538
538
|
formFieldMaskedInputPlaceholder: Yt,
|
|
539
|
-
"size-sm": "size-
|
|
540
|
-
"size-md": "size-
|
|
541
|
-
"size-lg": "size-
|
|
539
|
+
"size-sm": "size-sm__5c0732be",
|
|
540
|
+
"size-md": "size-md__3275adc6",
|
|
541
|
+
"size-lg": "size-lg__b7e84fba",
|
|
542
542
|
formFieldMaskedInput: qt
|
|
543
543
|
}, X = ({
|
|
544
544
|
className: d,
|
|
@@ -550,11 +550,11 @@ const jt = "formFieldMaskedInputWrapper__f7f32208", Yt = "formFieldMaskedInputPl
|
|
|
550
550
|
placeholderChar: i = "0",
|
|
551
551
|
placeholderMask: a,
|
|
552
552
|
value: c,
|
|
553
|
-
...
|
|
553
|
+
...w
|
|
554
554
|
}) => {
|
|
555
|
-
const [
|
|
555
|
+
const [_, L] = j(""), y = O(!1), { valueExist: N, focused: E, size: M } = ae(dt);
|
|
556
556
|
W(() => {
|
|
557
|
-
|
|
557
|
+
L((() => {
|
|
558
558
|
let s = [];
|
|
559
559
|
if (c) {
|
|
560
560
|
const { conformedValue: f } = oe.conformToMask(c.toString(), o, { guide: !0, placeholderChar: i });
|
|
@@ -577,7 +577,7 @@ const jt = "formFieldMaskedInputWrapper__f7f32208", Yt = "formFieldMaskedInputPl
|
|
|
577
577
|
[c, p]
|
|
578
578
|
), C = () => {
|
|
579
579
|
y.current = !0;
|
|
580
|
-
}, A = (e, s) => o === X.presets.masks.phone ? e.length ?
|
|
580
|
+
}, A = (e, s) => o === X.presets.masks.phone ? e.length ? b(s.rawValue) : e : o === X.presets.masks.swiftCode ? e.toUpperCase() : e, b = (e) => {
|
|
581
581
|
let s = [];
|
|
582
582
|
if (y.current) {
|
|
583
583
|
let f = /^[78]((\D*\d)*)/;
|
|
@@ -587,9 +587,9 @@ const jt = "formFieldMaskedInputWrapper__f7f32208", Yt = "formFieldMaskedInputPl
|
|
|
587
587
|
indexesOfPipedChars: s,
|
|
588
588
|
value: oe.conformToMask(e, o, { guide: !1, placeholderChar: i }).conformedValue
|
|
589
589
|
};
|
|
590
|
-
}, n = () => o === X.presets.masks.phone ? (c =
|
|
590
|
+
}, n = () => o === X.presets.masks.phone ? (c = b(c).value, c) : oe.conformToMask(c, o, { guide: !1, placeholderChar: i }).conformedValue, h = (e) => (s) => {
|
|
591
591
|
s && e(s), typeof t == "function" ? t(s) : t && (t.current = s);
|
|
592
|
-
},
|
|
592
|
+
}, v = () => !N && !E || !c && u ? "" : _;
|
|
593
593
|
return /* @__PURE__ */ F("div", { className: k(q.formFieldMaskedInputWrapper, q[`size-${M}`]), children: [
|
|
594
594
|
/* @__PURE__ */ r(
|
|
595
595
|
"input",
|
|
@@ -600,7 +600,7 @@ const jt = "formFieldMaskedInputWrapper__f7f32208", Yt = "formFieldMaskedInputPl
|
|
|
600
600
|
d
|
|
601
601
|
),
|
|
602
602
|
disabled: m,
|
|
603
|
-
placeholder:
|
|
603
|
+
placeholder: v(),
|
|
604
604
|
readOnly: !0,
|
|
605
605
|
"aria-hidden": "true",
|
|
606
606
|
tabIndex: -1,
|
|
@@ -610,11 +610,11 @@ const jt = "formFieldMaskedInputWrapper__f7f32208", Yt = "formFieldMaskedInputPl
|
|
|
610
610
|
/* @__PURE__ */ r(
|
|
611
611
|
ot,
|
|
612
612
|
{
|
|
613
|
-
className: k(q.formFieldMaskedInput, { [q.error]: !!
|
|
613
|
+
className: k(q.formFieldMaskedInput, { [q.error]: !!w.error }, d),
|
|
614
614
|
defaultValue: "",
|
|
615
615
|
disabled: m,
|
|
616
616
|
guide: !1,
|
|
617
|
-
render: (e, s) => /* @__PURE__ */ r(Me, { ...s, value: c, placeholder: u || "", ref:
|
|
617
|
+
render: (e, s) => /* @__PURE__ */ r(Me, { ...s, value: c, placeholder: u || "", ref: h(e) }),
|
|
618
618
|
mask: o,
|
|
619
619
|
onChange: I,
|
|
620
620
|
onPaste: C,
|
|
@@ -622,7 +622,7 @@ const jt = "formFieldMaskedInputWrapper__f7f32208", Yt = "formFieldMaskedInputPl
|
|
|
622
622
|
value: n(),
|
|
623
623
|
pipe: A,
|
|
624
624
|
type: "text",
|
|
625
|
-
...
|
|
625
|
+
...w
|
|
626
626
|
}
|
|
627
627
|
)
|
|
628
628
|
] });
|
|
@@ -655,12 +655,12 @@ const Qt = ({ maskedInputProps: d, ...t }) => /* @__PURE__ */ r(me, { ...t, chil
|
|
|
655
655
|
Qt.displayName = "MaskedField";
|
|
656
656
|
const Xt = x.forwardRef(
|
|
657
657
|
(d, t) => {
|
|
658
|
-
const { buttonAttributes: m, children: o, className: p, icon: u, options: i, selected: a, disabled: c, ...
|
|
658
|
+
const { buttonAttributes: m, children: o, className: p, icon: u, options: i, selected: a, disabled: c, ...w } = d, _ = O(null), L = O(null), [y, N] = j(), E = O(Fe()), M = ({ opened: n, setOpened: h }) => /* @__PURE__ */ r(
|
|
659
659
|
Xe,
|
|
660
660
|
{
|
|
661
661
|
className: "hoverable",
|
|
662
|
-
onKeyDown: C({ opened: n, setOpened:
|
|
663
|
-
onClick: I({ opened: n, setOpened:
|
|
662
|
+
onKeyDown: C({ opened: n, setOpened: h }),
|
|
663
|
+
onClick: I({ opened: n, setOpened: h }),
|
|
664
664
|
disabled: c,
|
|
665
665
|
"aria-haspopup": "menu",
|
|
666
666
|
"aria-expanded": n,
|
|
@@ -668,27 +668,27 @@ const Xt = x.forwardRef(
|
|
|
668
668
|
"aria-activedescendant": y,
|
|
669
669
|
icon: u,
|
|
670
670
|
...m,
|
|
671
|
-
ref:
|
|
671
|
+
ref: b,
|
|
672
672
|
children: o
|
|
673
673
|
}
|
|
674
|
-
), I = ({ opened: n, setOpened:
|
|
675
|
-
const { key: e } =
|
|
676
|
-
(T(e, "SPACE") || T(e, "ARROW_UP") || T(e, "ARROW_DOWN")) &&
|
|
677
|
-
}, A = ({ opened: n, setOpened:
|
|
674
|
+
), I = ({ opened: n, setOpened: h }) => () => h(!n), C = ({ opened: n, setOpened: h }) => (v) => {
|
|
675
|
+
const { key: e } = v;
|
|
676
|
+
(T(e, "SPACE") || T(e, "ARROW_UP") || T(e, "ARROW_DOWN")) && v.preventDefault(), !n && (T(e, "ARROW_UP") || T(e, "ARROW_DOWN")) && h(!0);
|
|
677
|
+
}, A = ({ opened: n, setOpened: h, className: v }) => /* @__PURE__ */ r(le.Provider, { value: { activeDescendant: y, setActiveDescendant: N }, children: /* @__PURE__ */ r(
|
|
678
678
|
V.Dropdown,
|
|
679
679
|
{
|
|
680
|
-
className:
|
|
680
|
+
className: v,
|
|
681
681
|
opened: n,
|
|
682
|
-
setOpened:
|
|
683
|
-
targetRef:
|
|
684
|
-
ref:
|
|
682
|
+
setOpened: h,
|
|
683
|
+
targetRef: _,
|
|
684
|
+
ref: L,
|
|
685
685
|
mobileViewProps: {
|
|
686
686
|
children: /* @__PURE__ */ F(Ae, { children: [
|
|
687
687
|
/* @__PURE__ */ F(Te, { children: [
|
|
688
688
|
/* @__PURE__ */ r(Oe, { tag: "div", size: Be.B1, children: o }),
|
|
689
|
-
/* @__PURE__ */ r(
|
|
689
|
+
/* @__PURE__ */ r(ve, { onClick: () => h(!1) })
|
|
690
690
|
] }),
|
|
691
|
-
/* @__PURE__ */ r(
|
|
691
|
+
/* @__PURE__ */ r(Le, { children: /* @__PURE__ */ r(Ce, { children: i.map((e) => /* @__PURE__ */ ne(
|
|
692
692
|
Re,
|
|
693
693
|
{
|
|
694
694
|
...e,
|
|
@@ -696,7 +696,7 @@ const Xt = x.forwardRef(
|
|
|
696
696
|
selected: e.id === (a == null ? void 0 : a.id),
|
|
697
697
|
onSelect: () => {
|
|
698
698
|
var s;
|
|
699
|
-
(s = e.onSelect) == null || s.call(e),
|
|
699
|
+
(s = e.onSelect) == null || s.call(e), h(!1);
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
702
|
e.label
|
|
@@ -712,14 +712,14 @@ const Xt = x.forwardRef(
|
|
|
712
712
|
selected: e.id === (a == null ? void 0 : a.id),
|
|
713
713
|
onSelect: () => {
|
|
714
714
|
var s;
|
|
715
|
-
(s = e.onSelect) == null || s.call(e),
|
|
715
|
+
(s = e.onSelect) == null || s.call(e), h(!1);
|
|
716
716
|
}
|
|
717
717
|
},
|
|
718
718
|
e.label
|
|
719
719
|
)) })
|
|
720
720
|
}
|
|
721
|
-
) }),
|
|
722
|
-
|
|
721
|
+
) }), b = (n) => {
|
|
722
|
+
_.current = n, typeof t == "function" ? t(n) : t && (t.current = n);
|
|
723
723
|
};
|
|
724
724
|
return /* @__PURE__ */ r(
|
|
725
725
|
V,
|
|
@@ -727,19 +727,19 @@ const Xt = x.forwardRef(
|
|
|
727
727
|
className: k(fe.listItemControlsButtonDropdown, p),
|
|
728
728
|
renderButton: M,
|
|
729
729
|
renderDropdown: A,
|
|
730
|
-
dropdownRef:
|
|
730
|
+
dropdownRef: L,
|
|
731
731
|
closeOnTab: !0,
|
|
732
|
-
...
|
|
732
|
+
...w
|
|
733
733
|
}
|
|
734
734
|
);
|
|
735
735
|
}
|
|
736
736
|
);
|
|
737
737
|
Xt.displayName = "ListItemControlsButtonDropdown";
|
|
738
|
-
const Zt = "
|
|
738
|
+
const Zt = "listItemTable__24471b8b", eo = {
|
|
739
739
|
listItemTable: Zt
|
|
740
740
|
}, to = x.forwardRef(
|
|
741
741
|
({ children: d, className: t, controlButtons: m, onClickItem: o, onSelect: p, selected: u, swipeableAreaRef: i, ...a }, c) => {
|
|
742
|
-
const
|
|
742
|
+
const w = typeof p < "u" && typeof u < "u", _ = () => /* @__PURE__ */ r(Qe, { onClick: o, children: d });
|
|
743
743
|
return /* @__PURE__ */ r(xe, { className: k(eo.listItemTable, t), ...a, ref: c, children: /* @__PURE__ */ F(
|
|
744
744
|
lt,
|
|
745
745
|
{
|
|
@@ -747,19 +747,19 @@ const Zt = "listItemTable__c23ebd1e", eo = {
|
|
|
747
747
|
rightSwipeableArea: m ? /* @__PURE__ */ r(Je, { children: m }) : void 0,
|
|
748
748
|
children: [
|
|
749
749
|
/* @__PURE__ */ r(et, {}),
|
|
750
|
-
|
|
750
|
+
w ? /* @__PURE__ */ r(Ze, { selected: u, onSelect: p, children: _() }) : _()
|
|
751
751
|
]
|
|
752
752
|
}
|
|
753
753
|
) });
|
|
754
754
|
}
|
|
755
755
|
);
|
|
756
756
|
to.displayName = "ListItemTable";
|
|
757
|
-
const oo = "
|
|
757
|
+
const oo = "listSortableItem__b60fab31", no = "dragging__e893fe3f", Ie = {
|
|
758
758
|
listSortableItem: oo,
|
|
759
759
|
dragging: no
|
|
760
760
|
}, ro = Object.assign(
|
|
761
761
|
x.forwardRef(function({ children: t, className: m, style: o, disabled: p, ...u }, i) {
|
|
762
|
-
const { transform: a, transition: c, listeners:
|
|
762
|
+
const { transform: a, transition: c, listeners: w, isDragging: _, setNodeRef: L, setActivatorNodeRef: y } = nt({
|
|
763
763
|
disabled: p,
|
|
764
764
|
id: u.id,
|
|
765
765
|
transition: {
|
|
@@ -767,16 +767,16 @@ const oo = "listSortableItem__ac9c3ac1", no = "dragging__0dd5f38b", Ie = {
|
|
|
767
767
|
easing: "ease-out"
|
|
768
768
|
}
|
|
769
769
|
}), N = (E) => {
|
|
770
|
-
|
|
770
|
+
L(E), typeof i == "function" ? i(E) : i && (i.current = E);
|
|
771
771
|
};
|
|
772
772
|
return /* @__PURE__ */ r(
|
|
773
773
|
xe,
|
|
774
774
|
{
|
|
775
|
-
className: k(Ie.listSortableItem, { [Ie.dragging]:
|
|
775
|
+
className: k(Ie.listSortableItem, { [Ie.dragging]: _ }, m),
|
|
776
776
|
style: { transform: rt.Translate.toString(a), transition: c, ...o },
|
|
777
777
|
...u,
|
|
778
778
|
ref: N,
|
|
779
|
-
children: typeof t == "function" ? t({ disabled: p, dragging:
|
|
779
|
+
children: typeof t == "function" ? t({ disabled: p, dragging: _, listeners: w, setActivatorNodeRef: y }) : t
|
|
780
780
|
}
|
|
781
781
|
);
|
|
782
782
|
}),
|
|
@@ -785,7 +785,7 @@ const oo = "listSortableItem__ac9c3ac1", no = "dragging__0dd5f38b", Ie = {
|
|
|
785
785
|
}
|
|
786
786
|
);
|
|
787
787
|
ro.displayName = "ListSortableItem";
|
|
788
|
-
const so = "
|
|
788
|
+
const so = "segmentedControlSegment__a5945d69", io = "selected__8d34f887", co = "content__ac0909e7", de = {
|
|
789
789
|
segmentedControlSegment: so,
|
|
790
790
|
selected: io,
|
|
791
791
|
content: co
|
|
@@ -801,8 +801,8 @@ const so = "segmentedControlSegment__a86a9c92", io = "selected__d9f4cbc2", co =
|
|
|
801
801
|
const {
|
|
802
802
|
type: a,
|
|
803
803
|
value: c,
|
|
804
|
-
disabled:
|
|
805
|
-
onSegmentSelect:
|
|
804
|
+
disabled: w,
|
|
805
|
+
onSegmentSelect: _
|
|
806
806
|
} = ae(We), y = (() => {
|
|
807
807
|
switch (a) {
|
|
808
808
|
case H.SINGLE:
|
|
@@ -824,10 +824,10 @@ const so = "segmentedControlSegment__a86a9c92", io = "selected__d9f4cbc2", co =
|
|
|
824
824
|
}, M = (I) => {
|
|
825
825
|
switch (a) {
|
|
826
826
|
case H.SINGLE:
|
|
827
|
-
|
|
827
|
+
_({ value: m, selected: !0 });
|
|
828
828
|
break;
|
|
829
829
|
case H.MULTIPLE:
|
|
830
|
-
|
|
830
|
+
_({ value: m, selected: !y });
|
|
831
831
|
break;
|
|
832
832
|
}
|
|
833
833
|
u == null || u(I);
|
|
@@ -837,7 +837,7 @@ const so = "segmentedControlSegment__a86a9c92", io = "selected__d9f4cbc2", co =
|
|
|
837
837
|
{
|
|
838
838
|
className: N,
|
|
839
839
|
title: E(),
|
|
840
|
-
disabled: p ||
|
|
840
|
+
disabled: p || w,
|
|
841
841
|
"aria-pressed": y,
|
|
842
842
|
onClick: M,
|
|
843
843
|
...i,
|
|
@@ -846,7 +846,7 @@ const so = "segmentedControlSegment__a86a9c92", io = "selected__d9f4cbc2", co =
|
|
|
846
846
|
);
|
|
847
847
|
};
|
|
848
848
|
ze.displayName = "SegmentedControlSegment";
|
|
849
|
-
const ao = "
|
|
849
|
+
const ao = "segmentedControl__c4964704", lo = "general1__556f3762", mo = "secondary1__dadefab7", uo = "general2__9f6a19b2", fo = "secondary2__da54a391", po = "sm__45b7565e", go = "md__70427b1b", bo = "lg__5faef581", U = {
|
|
850
850
|
segmentedControl: ao,
|
|
851
851
|
general1: lo,
|
|
852
852
|
secondary1: mo,
|
|
@@ -854,31 +854,31 @@ const ao = "segmentedControl__9b23c394", lo = "general1__96e2ea93", mo = "second
|
|
|
854
854
|
secondary2: fo,
|
|
855
855
|
sm: po,
|
|
856
856
|
md: go,
|
|
857
|
-
lg:
|
|
857
|
+
lg: bo
|
|
858
858
|
}, We = x.createContext({
|
|
859
859
|
type: H.SINGLE,
|
|
860
860
|
value: "",
|
|
861
861
|
disabled: !1,
|
|
862
862
|
onSegmentSelect: () => {
|
|
863
863
|
}
|
|
864
|
-
}),
|
|
864
|
+
}), wo = {
|
|
865
865
|
[te.GENERAL_1]: U.general1,
|
|
866
866
|
[te.GENERAL_2]: U.general2,
|
|
867
867
|
[te.SECONDARY_1]: U.secondary1,
|
|
868
868
|
[te.SECONDARY_2]: U.secondary2
|
|
869
|
-
},
|
|
869
|
+
}, ho = {
|
|
870
870
|
[re.SM]: U.sm,
|
|
871
871
|
[re.MD]: U.md,
|
|
872
872
|
[re.LG]: U.lg
|
|
873
|
-
},
|
|
873
|
+
}, _o = Object.assign(
|
|
874
874
|
x.forwardRef(
|
|
875
|
-
({ children: d, className: t, value: m, theme: o, type: p, size: u, disabled: i, onSelect: a, ...c },
|
|
876
|
-
const
|
|
875
|
+
({ children: d, className: t, value: m, theme: o, type: p, size: u, disabled: i, onSelect: a, ...c }, w) => {
|
|
876
|
+
const _ = k(
|
|
877
877
|
U.segmentedControl,
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
wo[o],
|
|
879
|
+
ho[u],
|
|
880
880
|
t
|
|
881
|
-
),
|
|
881
|
+
), L = ({
|
|
882
882
|
selected: y,
|
|
883
883
|
value: N
|
|
884
884
|
}) => {
|
|
@@ -897,9 +897,9 @@ const ao = "segmentedControl__9b23c394", lo = "general1__96e2ea93", mo = "second
|
|
|
897
897
|
type: p,
|
|
898
898
|
value: m,
|
|
899
899
|
disabled: !!i,
|
|
900
|
-
onSegmentSelect:
|
|
900
|
+
onSegmentSelect: L
|
|
901
901
|
},
|
|
902
|
-
children: /* @__PURE__ */ r("div", { className:
|
|
902
|
+
children: /* @__PURE__ */ r("div", { className: _, ...c, "data-tx": "0.1.6", ref: w, children: d })
|
|
903
903
|
}
|
|
904
904
|
);
|
|
905
905
|
}
|
|
@@ -908,7 +908,7 @@ const ao = "segmentedControl__9b23c394", lo = "general1__96e2ea93", mo = "second
|
|
|
908
908
|
Segment: ze
|
|
909
909
|
}
|
|
910
910
|
);
|
|
911
|
-
|
|
911
|
+
_o.displayName = "SegmentedControl";
|
|
912
912
|
export {
|
|
913
913
|
ie as B,
|
|
914
914
|
Pe as D,
|
|
@@ -925,7 +925,7 @@ export {
|
|
|
925
925
|
to as f,
|
|
926
926
|
ro as g,
|
|
927
927
|
We as h,
|
|
928
|
-
|
|
928
|
+
_o as i,
|
|
929
929
|
me as j
|
|
930
930
|
};
|
|
931
|
-
//# sourceMappingURL=index-
|
|
931
|
+
//# sourceMappingURL=index-CLQ4mLUp.js.map
|