@alphakits/ui 2.3.0 → 2.4.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/dist/__internal/utils/index.d.ts +1 -1
- package/dist/__internal/utils/index.js +4 -4
- package/dist/amount-input/component.js +41 -41
- package/dist/avatar/component.js +2 -18
- package/dist/badge/component.d.ts +1 -1
- package/dist/base-card/component.js +1 -7
- package/dist/bottom-sheet/component.d.ts +1 -1
- package/dist/bottom-sheet/component.js +9 -13
- package/dist/box/component.d.ts +2 -2
- package/dist/box/component.js +4 -4
- package/dist/button/component.js +9 -9
- package/dist/button-arrow/component.js +6 -1
- package/dist/calendar/component.d.ts +1 -2
- package/dist/calendar/component.js +77 -74
- package/dist/calendar/components/days-table/component.js +46 -43
- package/dist/calendar/components/header/{/321/201omponent.js → component.js} +3 -12
- package/dist/calendar/components/header/index.d.ts +1 -1
- package/dist/calendar/components/header/index.js +1 -1
- package/dist/calendar/components/months-table/{/321/201omponent.js → component.js} +7 -7
- package/dist/calendar/components/months-table/index.d.ts +1 -1
- package/dist/calendar/components/months-table/index.js +1 -1
- package/dist/calendar/components/select-button/{/321/201omponent.d.ts → component.d.ts} +3 -3
- package/dist/calendar/components/select-button/{/321/201omponent.js → component.js} +5 -11
- package/dist/calendar/components/select-button/index.d.ts +1 -1
- package/dist/calendar/components/select-button/index.js +1 -1
- package/dist/calendar/components/years-table/{/321/201omponent.js → component.js} +14 -14
- package/dist/calendar/components/years-table/index.d.ts +1 -1
- package/dist/calendar/components/years-table/index.js +1 -1
- package/dist/calendar/index.d.ts +2 -2
- package/dist/calendar/index.js +4 -4
- package/dist/calendar/use-calendar.js +51 -47
- package/dist/calendar/utils.js +7 -9
- package/dist/calendar-input/component.js +22 -22
- package/dist/card/component.js +2 -18
- package/dist/cell/base/component.js +31 -31
- package/dist/cell/pure/component.js +2 -2
- package/dist/checkbox/component.js +11 -11
- package/dist/checkbox-group/component.js +23 -24
- package/dist/checkbox-lists/component.d.ts +1 -2
- package/dist/checkbox-lists/component.js +59 -61
- package/dist/collapsable-row/addons.d.ts +3 -4
- package/dist/collapsable-row/addons.js +6 -9
- package/dist/collapsable-row/component.d.ts +1 -1
- package/dist/collapsable-row/component.js +7 -7
- package/dist/collapse/component.js +45 -54
- package/dist/copy-button/component.d.ts +1 -2
- package/dist/copy-button/component.js +1 -5
- package/dist/date/component.js +1 -1
- package/dist/date-switcher/component.d.ts +1 -2
- package/dist/date-switcher/component.js +8 -8
- package/dist/decorated-item/component.js +10 -20
- package/dist/dot/component.js +1 -4
- package/dist/empty-page/component.js +1 -9
- package/dist/filter-tag/component.d.ts +1 -1
- package/dist/flex/component.d.ts +2 -2
- package/dist/footer/component.js +57 -53
- package/dist/form/component.d.ts +1 -2
- package/dist/form/component.js +2 -12
- package/dist/form/templates/base-form/index.d.ts +3 -3
- package/dist/form/templates/base-form/index.js +26 -26
- package/dist/form/templates/filters-form/index.d.ts +1 -1
- package/dist/form/templates/filters-form/index.js +20 -23
- package/dist/form/templates/rest-form/form.d.ts +1 -2
- package/dist/form/templates/rest-form/form.js +51 -56
- package/dist/form/templates/rest-form/index.d.ts +3 -3
- package/dist/form/templates/rest-form/index.js +16 -27
- package/dist/form/utils/get-default-values.js +3 -6
- package/dist/form/utils/remove-undefined-from-object.js +1 -3
- package/dist/form-control/component.js +1 -1
- package/dist/formik/index.d.ts +2 -2
- package/dist/header-search/component.js +1 -6
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +10 -10
- package/dist/hooks/use-get-one/index.js +16 -16
- package/dist/icon-button/component.d.ts +3 -3
- package/dist/icon-button/component.js +2 -8
- package/dist/image/component.js +52 -30
- package/dist/image/image-base.js +1 -7
- package/dist/image/use-image-render-component.d.ts +1 -1
- package/dist/image/use-image-render-component.js +11 -14
- package/dist/image-gallery/component.js +40 -45
- package/dist/image-uploader/component.js +56 -53
- package/dist/index.js +41 -41
- package/dist/info-block-wrapper/component.d.ts +1 -1
- package/dist/input/component.js +1 -1
- package/dist/input-autocomplete/autocomplete-field/index.d.ts +1 -2
- package/dist/input-autocomplete/autocomplete-field/index.js +6 -6
- package/dist/input-autocomplete/component.d.ts +26 -26
- package/dist/input-ghost/component.d.ts +1 -1
- package/dist/link/component.d.ts +2 -2
- package/dist/link/component.js +1 -1
- package/dist/loader/component.js +6 -5
- package/dist/masked-input/component.js +7 -16
- package/dist/menu/component.js +12 -17
- package/dist/menu/components/content-header/index.js +1 -9
- package/dist/menu/components/menu-avatar/index.js +1 -6
- package/dist/menu/components/menu-button/index.js +1 -10
- package/dist/menu/components/menu-buttons-list/index.d.ts +1 -1
- package/dist/menu/components/menu-buttons-list/index.js +1 -7
- package/dist/menu/hooks/use-menu.js +12 -12
- package/dist/message/component.js +33 -14
- package/dist/modal/components/modals/modal.d.ts +1 -2
- package/dist/modal/components/modals/modal.js +30 -33
- package/dist/modal/context.js +12 -9
- package/dist/modal/hooks/use-modal.d.ts +1 -1
- package/dist/mq/component.js +1 -6
- package/dist/notification/component.js +14 -12
- package/dist/page-container/component.js +1 -6
- package/dist/page-loading/component.d.ts +1 -2
- package/dist/page-with-controls/component.js +4 -7
- package/dist/picker-button/common/labeled-button/index.js +18 -12
- package/dist/picker-button/component.js +5 -5
- package/dist/picker-button/field/{Component.d.ts → component.d.ts} +1 -2
- package/dist/picker-button/field/index.d.ts +1 -1
- package/dist/picker-button/field/index.js +1 -1
- package/dist/picker-button/index.d.ts +1 -1
- package/dist/picker-button/index.js +4 -4
- package/dist/popover/component.d.ts +2 -2
- package/dist/popover/component.js +69 -63
- package/dist/radio/component.js +7 -7
- package/dist/radio-groups/component.d.ts +1 -2
- package/dist/radio-groups/component.js +9 -7
- package/dist/select/component.d.ts +8 -9
- package/dist/select/component.js +1 -9
- package/dist/select/components/arrow/component.d.ts +1 -2
- package/dist/select/components/base-select/component.js +97 -90
- package/dist/select/components/checkmark/component.d.ts +1 -2
- package/dist/select/components/field/component.d.ts +1 -2
- package/dist/select/components/field/component.js +8 -5
- package/dist/select/components/native-select/component.js +4 -11
- package/dist/select/components/optgroup/component.d.ts +1 -2
- package/dist/select/components/optgroup/component.js +4 -4
- package/dist/select/components/option/component.js +1 -1
- package/dist/select/components/options-list/component.d.ts +1 -2
- package/dist/select/components/options-list/component.js +25 -23
- package/dist/select/components/select-search/index.d.ts +1 -1
- package/dist/select/components/select-search/index.js +28 -26
- package/dist/select/components/virtual-options-list/component.d.ts +1 -2
- package/dist/select/components/virtual-options-list/component.js +52 -45
- package/dist/select/index.js +4 -4
- package/dist/select/presets/index.d.ts +1 -1
- package/dist/select/presets/index.js +4 -4
- package/dist/select/presets/use-lazy-loading/index.d.ts +3 -4
- package/dist/select/presets/use-lazy-loading/index.js +45 -43
- package/dist/select/presets/use-select-with-loading/hook.d.ts +1 -2
- package/dist/select/presets/use-select-with-loading/hook.js +8 -1
- package/dist/select/utils.js +32 -32
- package/dist/sidepanel/component.js +21 -15
- package/dist/sidepanel-header/component.js +17 -16
- package/dist/skeleton/component.js +4 -4
- package/dist/space/component.d.ts +2 -2
- package/dist/space/component.js +42 -45
- package/dist/space/{Item.d.ts → item.d.ts} +2 -2
- package/dist/spinner/component.js +6 -5
- package/dist/stack/index.d.ts +1 -1
- package/dist/stack/index.js +5 -5
- package/dist/stepped-progress-bar/components/step-bar.js +3 -3
- package/dist/stepped-progress-bar/index.d.ts +2 -2
- package/dist/stepped-progress-bar/index.js +37 -22
- package/dist/sticker/component.js +1 -17
- package/dist/suffix-input/component.js +13 -13
- package/dist/switch/component.js +7 -7
- package/dist/table/components/cells/index.d.ts +1 -2
- package/dist/table/components/empty-list/index.d.ts +1 -2
- package/dist/table/components/error/index.d.ts +2 -3
- package/dist/table/components/error/index.js +1 -1
- package/dist/table/components/loading/index.d.ts +1 -1
- package/dist/table/components/loading/index.js +18 -12
- package/dist/table/components/pagination/index.js +56 -53
- package/dist/table/components/table-header/index.js +59 -56
- package/dist/table/hooks/use-table-data.js +63 -60
- package/dist/table/table.d.ts +1 -1
- package/dist/table/table.js +73 -73
- package/dist/table/types.d.ts +3 -3
- package/dist/table/utils/get-query-from-url.js +1 -8
- package/dist/table/utils/get-tags.d.ts +1 -1
- package/dist/table/utils/get-tags.js +9 -12
- package/dist/table/utils/index.d.ts +1 -1
- package/dist/table/utils/index.js +4 -4
- package/dist/table/utils/parse-query-params.js +5 -1
- package/dist/table/utils/prepare-rows.d.ts +1 -2
- package/dist/table/utils/prepare-rows.js +4 -3
- package/dist/table/utils/query-adapter.d.ts +1 -1
- package/dist/table/utils/query-adapter.js +5 -5
- package/dist/table/utils/remove-query-param.js +3 -1
- package/dist/table/utils/reset-query-param.js +16 -9
- package/dist/table-status/component.js +5 -1
- package/dist/textarea/component.js +36 -28
- package/dist/theme-provider/component.js +33 -29
- package/dist/toast/component.d.ts +7 -8
- package/dist/toast/component.js +65 -63
- package/dist/toast-notifier/component.js +13 -13
- package/dist/toast-notifier/use-timer.d.ts +1 -1
- package/dist/toast-notifier/use-timer.js +5 -5
- package/dist/toast-plate/component.d.ts +3 -3
- package/dist/toast-plate/component.js +7 -7
- package/dist/tooltip/component.js +35 -35
- package/dist/tooltip/node-resolver.js +7 -7
- package/dist/typings/api.d.ts +3 -5
- package/dist/typography/colors.d.ts +1 -1
- package/dist/typography/title/component.d.ts +3 -3
- package/dist/typography/title/index.d.ts +1 -1
- package/dist/typography/title/index.js +3 -3
- package/dist/utils/date/index.js +12 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +14 -14
- package/dist/utils/split-amount/util.js +4 -4
- package/dist/with-suffix/component.d.ts +13 -13
- package/dist/with-suffix/component.js +8 -8
- package/package.json +9 -34
- /package/dist/__internal/utils/{getDataTestId.d.ts → get-data-test-id.d.ts} +0 -0
- /package/dist/__internal/utils/{getDataTestId.js → get-data-test-id.js} +0 -0
- /package/dist/calendar/components/header/{/321/201omponent.d.ts" → component.d.ts} +0 -0
- /package/dist/calendar/components/months-table/{/321/201omponent.d.ts" → component.d.ts} +0 -0
- /package/dist/calendar/components/years-table/{/321/201omponent.d.ts" → component.d.ts} +0 -0
- /package/dist/picker-button/field/{Component.js → component.js} +0 -0
- /package/dist/space/{Item.js → item.js} +0 -0
|
@@ -1,41 +1,47 @@
|
|
|
1
1
|
import { jsx as e, jsxs as v } from "react/jsx-runtime";
|
|
2
|
-
import N from "
|
|
3
|
-
import x from "
|
|
2
|
+
import N from "classnames";
|
|
3
|
+
import x from "react";
|
|
4
4
|
import { FlexColumns as S } from "../flex-columns/component.js";
|
|
5
5
|
import { SidepanelHeader as g } from "../sidepanel-header/component.js";
|
|
6
|
-
import { Skeleton as
|
|
6
|
+
import { Skeleton as j } from "../skeleton/component.js";
|
|
7
7
|
import r from "./index.module.css.js";
|
|
8
8
|
const R = ({
|
|
9
|
-
dataTestId:
|
|
9
|
+
dataTestId: o,
|
|
10
10
|
title: m,
|
|
11
|
-
loading:
|
|
12
|
-
headerRightAddons:
|
|
13
|
-
subtitle:
|
|
14
|
-
noCloser:
|
|
11
|
+
loading: i,
|
|
12
|
+
headerRightAddons: t,
|
|
13
|
+
subtitle: a,
|
|
14
|
+
noCloser: l,
|
|
15
15
|
showCloser: n,
|
|
16
16
|
headerBottomAddons: c,
|
|
17
17
|
noStickyFooter: d,
|
|
18
18
|
noStickyHeader: p,
|
|
19
|
-
bottomAddons:
|
|
19
|
+
bottomAddons: s,
|
|
20
20
|
children: f,
|
|
21
21
|
...h
|
|
22
|
-
}) => /* @__PURE__ */ e(
|
|
22
|
+
}) => /* @__PURE__ */ e(x.Fragment, { children: i ? /* @__PURE__ */ e(S, { className: r.loader, columns: 1, gr: 20, children: ["s1", "s2", "s3", "s4", "s5", "s6", "s7"].map((u) => /* @__PURE__ */ e(j, { animate: !0, visible: !0, className: r.input }, u)) }) : /* @__PURE__ */ v("div", { children: [
|
|
23
23
|
/* @__PURE__ */ e(
|
|
24
24
|
g,
|
|
25
25
|
{
|
|
26
26
|
title: m,
|
|
27
27
|
className: p ? void 0 : r.header,
|
|
28
|
-
subtitle:
|
|
29
|
-
noCloser:
|
|
28
|
+
subtitle: a,
|
|
29
|
+
noCloser: l,
|
|
30
30
|
showCloser: n,
|
|
31
|
-
dataTestId:
|
|
32
|
-
rightAddons:
|
|
31
|
+
dataTestId: o,
|
|
32
|
+
rightAddons: t,
|
|
33
33
|
bottomAddons: c,
|
|
34
34
|
...h
|
|
35
35
|
}
|
|
36
36
|
),
|
|
37
37
|
/* @__PURE__ */ e("div", { className: r.content, children: f }),
|
|
38
|
-
|
|
38
|
+
s && /* @__PURE__ */ e(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: N(r.footer, { [r.noSticky]: d }),
|
|
42
|
+
children: s
|
|
43
|
+
}
|
|
44
|
+
)
|
|
39
45
|
] }) });
|
|
40
46
|
export {
|
|
41
47
|
R as Sidepanel
|
|
@@ -18,22 +18,23 @@ const h = ({ title: m, subtitle: l }) => /* @__PURE__ */ a(w, { columns: 1, gr:
|
|
|
18
18
|
bottomAddons: n,
|
|
19
19
|
noCloser: f,
|
|
20
20
|
showCloser: v
|
|
21
|
-
}) => /* @__PURE__ */ a(
|
|
22
|
-
"div",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
)
|
|
21
|
+
}) => /* @__PURE__ */ a("div", { "data-test-id": l, className: p(e.wrapper, m), children: [
|
|
22
|
+
(i || o || s) && /* @__PURE__ */ a("div", { className: e.heading, children: [
|
|
23
|
+
i && d && /* @__PURE__ */ r(g, { onClick: i, t: d }),
|
|
24
|
+
!i && o && /* @__PURE__ */ r(h, { title: o, subtitle: c }),
|
|
25
|
+
s && /* @__PURE__ */ r(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: p(e.rightAddons, {
|
|
29
|
+
[e.noCloser]: !!f || v === !1
|
|
30
|
+
}),
|
|
31
|
+
children: s
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] }),
|
|
35
|
+
!!i && o && /* @__PURE__ */ r(h, { title: o, subtitle: c }),
|
|
36
|
+
!!n && /* @__PURE__ */ r("div", { className: e.bottomAddons, children: n })
|
|
37
|
+
] });
|
|
37
38
|
export {
|
|
38
39
|
u as SidepanelHeader
|
|
39
40
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import i from "
|
|
3
|
-
import s from "
|
|
2
|
+
import i from "classnames";
|
|
3
|
+
import s from "react";
|
|
4
4
|
import o from "./index.module.css.js";
|
|
5
5
|
const d = ({
|
|
6
6
|
visible: e,
|
|
@@ -11,11 +11,11 @@ const d = ({
|
|
|
11
11
|
}) => e ? /* @__PURE__ */ r(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
|
-
className:
|
|
14
|
+
className: i(o.component, { [o.animate]: m }, a),
|
|
15
15
|
"data-test-id": n,
|
|
16
16
|
children: t
|
|
17
17
|
}
|
|
18
|
-
) : /* @__PURE__ */ r(
|
|
18
|
+
) : /* @__PURE__ */ r(s.Fragment, { children: t });
|
|
19
19
|
export {
|
|
20
20
|
d as Skeleton
|
|
21
21
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Align, Direction, Size } from './utils';
|
|
3
3
|
export type SpaceProps = {
|
|
4
4
|
align?: Align;
|
|
5
5
|
direction?: Direction;
|
|
6
6
|
size?: Size | [Size, Size];
|
|
7
7
|
className?: string;
|
|
8
|
-
children
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
dataTestId?: string;
|
|
10
10
|
wrap?: boolean;
|
|
11
11
|
divider?: string | ReactNode;
|
package/dist/space/component.js
CHANGED
|
@@ -1,70 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import d from "classnames";
|
|
3
|
+
import W, { forwardRef as w, Children as A, isValidElement as I } from "react";
|
|
4
|
+
import t from "./index.module.css.js";
|
|
5
|
+
import k from "./item.js";
|
|
6
|
+
const x = {
|
|
7
7
|
s: 12,
|
|
8
8
|
m: 16,
|
|
9
9
|
l: 20
|
|
10
|
-
}, F = (
|
|
10
|
+
}, F = (r) => typeof r == "string" ? x[r] : r || 0, E = w((r, u) => {
|
|
11
11
|
const {
|
|
12
|
-
children:
|
|
12
|
+
children: h,
|
|
13
13
|
className: N,
|
|
14
14
|
align: n = "start",
|
|
15
15
|
direction: o = "vertical",
|
|
16
|
-
size:
|
|
17
|
-
wrap:
|
|
16
|
+
size: a = "m",
|
|
17
|
+
wrap: l = !1,
|
|
18
18
|
divider: g = !1,
|
|
19
|
-
fullWidth:
|
|
20
|
-
} =
|
|
21
|
-
() => (Array.isArray(
|
|
22
|
-
(
|
|
19
|
+
fullWidth: i = !1
|
|
20
|
+
} = r, [y, m] = W.useMemo(
|
|
21
|
+
() => (Array.isArray(a) ? a : [a, a]).map(
|
|
22
|
+
(e) => F(e)
|
|
23
23
|
),
|
|
24
|
-
[
|
|
25
|
-
),
|
|
26
|
-
if (
|
|
24
|
+
[a]
|
|
25
|
+
), s = A.toArray(h);
|
|
26
|
+
if (s.length === 0)
|
|
27
27
|
return null;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const C = t[o], S = t[n], v = d(
|
|
29
|
+
t.spaceContainer,
|
|
30
|
+
C,
|
|
31
31
|
{
|
|
32
32
|
[S]: n,
|
|
33
|
-
[
|
|
33
|
+
[t.spaceContainerFullWidth]: i
|
|
34
34
|
},
|
|
35
35
|
N
|
|
36
|
-
),
|
|
37
|
-
[
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
`${m}-${p}`
|
|
54
|
-
)
|
|
36
|
+
), c = d(t.spaceItem, {
|
|
37
|
+
[t.spaceItemFullWidth]: i
|
|
38
|
+
}), z = s.map((e, p) => /* @__PURE__ */ f(
|
|
39
|
+
k,
|
|
40
|
+
{
|
|
41
|
+
className: c,
|
|
42
|
+
direction: o,
|
|
43
|
+
horizontalSize: y,
|
|
44
|
+
verticalSize: m,
|
|
45
|
+
length: s.length,
|
|
46
|
+
index: p,
|
|
47
|
+
wrap: l,
|
|
48
|
+
divider: g,
|
|
49
|
+
children: e
|
|
50
|
+
},
|
|
51
|
+
I(e) && e.key != null ? e.key : `${c}-${p}`
|
|
55
52
|
));
|
|
56
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ f(
|
|
57
54
|
"div",
|
|
58
55
|
{
|
|
59
56
|
className: v,
|
|
60
57
|
style: {
|
|
61
|
-
...
|
|
58
|
+
...l && { flexWrap: "wrap", marginBottom: -m }
|
|
62
59
|
},
|
|
63
|
-
ref:
|
|
64
|
-
children:
|
|
60
|
+
ref: u,
|
|
61
|
+
children: z
|
|
65
62
|
}
|
|
66
63
|
);
|
|
67
64
|
});
|
|
68
65
|
export {
|
|
69
|
-
|
|
66
|
+
E as Space
|
|
70
67
|
};
|
|
@@ -5,11 +5,11 @@ export interface ItemProps {
|
|
|
5
5
|
horizontalSize: number;
|
|
6
6
|
verticalSize: number;
|
|
7
7
|
length: number;
|
|
8
|
-
children
|
|
8
|
+
children?: React.ReactNode;
|
|
9
9
|
index: number;
|
|
10
10
|
direction?: Direction;
|
|
11
11
|
divider?: string | React.ReactNode;
|
|
12
12
|
wrap?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare const Item: (props: ItemProps) =>
|
|
14
|
+
declare const Item: (props: ItemProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
15
|
export default Item;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import i from "classnames";
|
|
3
3
|
import e from "./index.module.css.js";
|
|
4
4
|
const m = ({
|
|
5
|
-
size:
|
|
5
|
+
size: s = "s",
|
|
6
6
|
id: t,
|
|
7
7
|
view: n = "default",
|
|
8
8
|
className: a,
|
|
@@ -12,17 +12,18 @@ const m = ({
|
|
|
12
12
|
{
|
|
13
13
|
id: t,
|
|
14
14
|
"data-test-id": c,
|
|
15
|
-
className:
|
|
15
|
+
className: i(e.spinnerWrapper, e[s], a),
|
|
16
16
|
children: /* @__PURE__ */ r(
|
|
17
17
|
"svg",
|
|
18
18
|
{
|
|
19
|
-
className:
|
|
19
|
+
className: i(e.spinner, e[s]),
|
|
20
20
|
preserveAspectRatio: "xMinYMin meet",
|
|
21
21
|
viewBox: "0 0 50 50",
|
|
22
|
+
"aria-hidden": "true",
|
|
22
23
|
children: /* @__PURE__ */ r(
|
|
23
24
|
"circle",
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
26
|
+
className: i(e.path, e[n]),
|
|
26
27
|
cx: "25",
|
|
27
28
|
cy: "25",
|
|
28
29
|
r: "20",
|
package/dist/stack/index.d.ts
CHANGED
package/dist/stack/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Stack as o } from "./component.js";
|
|
2
|
+
import { StackingContext as a, stackingOrder as c } from "./context.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
o as Stack,
|
|
5
|
+
a as StackingContext,
|
|
6
|
+
c as stackingOrder
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import s from "
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import { memo as s } from "react";
|
|
4
4
|
import t from "../index.module.css.js";
|
|
5
|
-
const c =
|
|
5
|
+
const c = s(({ isDone: o, view: m = "positive" }) => /* @__PURE__ */ r("span", { "data-test-id": o ? "on" : "off", className: p(t.bar, o && t[m]) }));
|
|
6
6
|
export {
|
|
7
7
|
c as StepBar
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { SteppedProgressBarView } from './components/step-bar';
|
|
3
3
|
export type SteppedProgressBarProps = {
|
|
4
4
|
maxStep: number;
|
|
@@ -14,7 +14,7 @@ export declare const useSteps: ({ maxStep, initialStep, }: {
|
|
|
14
14
|
initialStep?: number;
|
|
15
15
|
}) => {
|
|
16
16
|
step: number;
|
|
17
|
-
setStep:
|
|
17
|
+
setStep: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
18
18
|
nextStep: () => void;
|
|
19
19
|
prevStep: () => void;
|
|
20
20
|
};
|
|
@@ -1,34 +1,49 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { StepBar as
|
|
1
|
+
import { jsxs as S, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import { useMemo as g, useState as y } from "react";
|
|
4
|
+
import { Typography as v } from "../typography/component.js";
|
|
5
|
+
import { StepBar as h } from "./components/step-bar.js";
|
|
6
6
|
import n from "./index.module.css.js";
|
|
7
|
-
const
|
|
7
|
+
const T = ({
|
|
8
8
|
maxStep: e,
|
|
9
|
-
description:
|
|
9
|
+
description: o,
|
|
10
10
|
step: t = 0,
|
|
11
11
|
view: r,
|
|
12
|
-
dataTestId:
|
|
13
|
-
className:
|
|
12
|
+
dataTestId: i,
|
|
13
|
+
className: a
|
|
14
14
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const m = e <= 0 ? 1 : e, l = typeof r == "string", d = g(
|
|
16
|
+
() => Array.from({ length: m }, (c, s) => ({
|
|
17
|
+
id: `progress-step-${s + 1}`,
|
|
18
|
+
stepIndex: s
|
|
19
|
+
})),
|
|
20
|
+
[m]
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ S("div", { className: f(n.component, a), "data-test-id": i, children: [
|
|
23
|
+
/* @__PURE__ */ p("div", { className: n.stepsContainer, children: d.map(({ id: c, stepIndex: s }) => /* @__PURE__ */ p(
|
|
24
|
+
h,
|
|
19
25
|
{
|
|
20
|
-
isDone:
|
|
21
|
-
view:
|
|
26
|
+
isDone: s < t,
|
|
27
|
+
view: l ? r : r?.[s]
|
|
22
28
|
},
|
|
23
|
-
|
|
29
|
+
c
|
|
24
30
|
)) }),
|
|
25
|
-
|
|
31
|
+
o && /* @__PURE__ */ p(
|
|
32
|
+
v.Text,
|
|
33
|
+
{
|
|
34
|
+
color: "secondary",
|
|
35
|
+
tag: "div",
|
|
36
|
+
className: n.description,
|
|
37
|
+
view: "primary-small",
|
|
38
|
+
children: o
|
|
39
|
+
}
|
|
40
|
+
)
|
|
26
41
|
] });
|
|
27
|
-
},
|
|
42
|
+
}, w = ({
|
|
28
43
|
maxStep: e,
|
|
29
|
-
initialStep:
|
|
44
|
+
initialStep: o = 1
|
|
30
45
|
}) => {
|
|
31
|
-
const [t, r] =
|
|
46
|
+
const [t, r] = y(o);
|
|
32
47
|
return {
|
|
33
48
|
step: t,
|
|
34
49
|
setStep: r,
|
|
@@ -41,6 +56,6 @@ const A = ({
|
|
|
41
56
|
};
|
|
42
57
|
};
|
|
43
58
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
T as SteppedProgressBar,
|
|
60
|
+
w as useSteps
|
|
46
61
|
};
|
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import s from "classnames";
|
|
3
3
|
import o from "./index.module.css.js";
|
|
4
|
-
const a = ({
|
|
5
|
-
className: r,
|
|
6
|
-
text: e,
|
|
7
|
-
color: i,
|
|
8
|
-
dataTestId: m
|
|
9
|
-
}) => /* @__PURE__ */ t(
|
|
10
|
-
"div",
|
|
11
|
-
{
|
|
12
|
-
className: s(
|
|
13
|
-
o.component,
|
|
14
|
-
o[i],
|
|
15
|
-
r
|
|
16
|
-
),
|
|
17
|
-
"data-test-id": m,
|
|
18
|
-
children: /* @__PURE__ */ t("span", { children: e })
|
|
19
|
-
}
|
|
20
|
-
);
|
|
4
|
+
const a = ({ className: r, text: e, color: i, dataTestId: m }) => /* @__PURE__ */ t("div", { className: s(o.component, o[i], r), "data-test-id": m, children: /* @__PURE__ */ t("span", { children: e }) });
|
|
21
5
|
export {
|
|
22
6
|
a as Sticker
|
|
23
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as S, useState as v, useEffect as y, useCallback as A, Fragment as j } from "react";
|
|
3
2
|
import m from "classnames";
|
|
3
|
+
import { forwardRef as S, useState as v, useEffect as y, useCallback as A, Fragment as j } from "react";
|
|
4
4
|
import { Input as w } from "../input/component.js";
|
|
5
|
-
import { withSuffix as
|
|
5
|
+
import { withSuffix as $ } from "../with-suffix/component.js";
|
|
6
6
|
import t from "./index.module.css.js";
|
|
7
|
-
const
|
|
7
|
+
const k = $(w), z = S(
|
|
8
8
|
({
|
|
9
9
|
value: e,
|
|
10
10
|
suffix: c,
|
|
@@ -16,34 +16,34 @@ const B = k(w), z = S(
|
|
|
16
16
|
dataTestId: C,
|
|
17
17
|
clear: N = !1,
|
|
18
18
|
onChange: o,
|
|
19
|
-
onClear:
|
|
19
|
+
onClear: i,
|
|
20
20
|
...I
|
|
21
21
|
}, b) => {
|
|
22
|
-
const [
|
|
23
|
-
y(() =>
|
|
24
|
-
}, [e]);
|
|
22
|
+
const [r, s] = v(e);
|
|
23
|
+
y(() => r !== e ? s(e) : () => {
|
|
24
|
+
}, [e, r]);
|
|
25
25
|
const g = (n) => {
|
|
26
26
|
const u = n.target.value;
|
|
27
27
|
o && o(n, { value: Number.isInteger(+u) ? +u : void 0 });
|
|
28
28
|
}, V = A(
|
|
29
29
|
(n) => {
|
|
30
|
-
s(void 0),
|
|
30
|
+
s(void 0), i && i(n);
|
|
31
31
|
},
|
|
32
|
-
[
|
|
32
|
+
[i]
|
|
33
33
|
);
|
|
34
34
|
return /* @__PURE__ */ a(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
className: m(t.container, {
|
|
38
38
|
[t.bold]: p,
|
|
39
|
-
[t.filled]: !!
|
|
39
|
+
[t.filled]: !!r
|
|
40
40
|
}),
|
|
41
41
|
children: /* @__PURE__ */ a(
|
|
42
|
-
|
|
42
|
+
k,
|
|
43
43
|
{
|
|
44
44
|
...I,
|
|
45
45
|
suffix: /* @__PURE__ */ f(j, { children: [
|
|
46
|
-
|
|
46
|
+
r,
|
|
47
47
|
/* @__PURE__ */ f("span", { className: t.minorPartAndCurrency, children: [
|
|
48
48
|
" ",
|
|
49
49
|
c
|
|
@@ -53,7 +53,7 @@ const B = k(w), z = S(
|
|
|
53
53
|
clear: N,
|
|
54
54
|
required: h,
|
|
55
55
|
placeholder: l,
|
|
56
|
-
value: Number.isInteger(e) ?
|
|
56
|
+
value: Number.isInteger(e) ? `${e}` : void 0,
|
|
57
57
|
type: "number",
|
|
58
58
|
className: m(t.component, d),
|
|
59
59
|
focusedClassName: x,
|
package/dist/switch/component.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as d, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import v from "react
|
|
4
|
-
import C from "
|
|
2
|
+
import y from "classnames";
|
|
3
|
+
import { forwardRef as g, useRef as j, useCallback as v } from "react";
|
|
4
|
+
import C from "react-merge-refs";
|
|
5
5
|
import { useFocus as F } from "../hooks/useFocus/index.js";
|
|
6
6
|
import e from "./index.module.css.js";
|
|
7
|
-
const E =
|
|
7
|
+
const E = g(
|
|
8
8
|
({
|
|
9
9
|
reversed: i = !1,
|
|
10
10
|
checked: t = !1,
|
|
@@ -21,7 +21,7 @@ const E = y(
|
|
|
21
21
|
dataTestId: N,
|
|
22
22
|
...b
|
|
23
23
|
}, x) => {
|
|
24
|
-
const m =
|
|
24
|
+
const m = j(null), [R] = F(m, "keyboard"), w = v(
|
|
25
25
|
(f) => {
|
|
26
26
|
o && o(f, { checked: f.target.checked, name: a });
|
|
27
27
|
},
|
|
@@ -32,14 +32,14 @@ const E = y(
|
|
|
32
32
|
/* @__PURE__ */ d(
|
|
33
33
|
"label",
|
|
34
34
|
{
|
|
35
|
-
className:
|
|
35
|
+
className: y(e.component, e[p], k, {
|
|
36
36
|
[e.disabled]: n,
|
|
37
37
|
[e.checked]: t,
|
|
38
38
|
[e.reversed]: i,
|
|
39
39
|
[e.focused]: R,
|
|
40
40
|
[e.block]: h
|
|
41
41
|
}),
|
|
42
|
-
ref:
|
|
42
|
+
ref: C([m, x]),
|
|
43
43
|
children: [
|
|
44
44
|
/* @__PURE__ */ s(
|
|
45
45
|
"input",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Query, QueryDTO, TableColumns } from '../../types';
|
|
3
2
|
type Props<T extends object> = {
|
|
4
3
|
columns: TableColumns<T>;
|
|
@@ -7,5 +6,5 @@ type Props<T extends object> = {
|
|
|
7
6
|
addParam: ({ sort, order }: Pick<Query, 'order' | 'sort'>) => void;
|
|
8
7
|
compact?: boolean;
|
|
9
8
|
};
|
|
10
|
-
export declare function Cells<T extends object>({ columns, sort, order, addParam, compact, }: Props<T>):
|
|
9
|
+
export declare function Cells<T extends object>({ columns, sort, order, addParam, compact, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -4,5 +4,5 @@ import { translate as e } from "../../languages/index.js";
|
|
|
4
4
|
import i from "./index.module.css.js";
|
|
5
5
|
const a = ({ language: o }) => /* @__PURE__ */ r("div", { className: i.empty_list, children: /* @__PURE__ */ r(t.Text, { color: "primary", view: "title", children: e(o)("error") }) });
|
|
6
6
|
export {
|
|
7
|
-
a as
|
|
7
|
+
a as TableError
|
|
8
8
|
};
|
|
@@ -2,5 +2,5 @@ import { default as React } from 'react';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
columnsLength: number;
|
|
4
4
|
};
|
|
5
|
-
export declare const Loading: React.MemoExoticComponent<({ columnsLength }: Props) =>
|
|
5
|
+
export declare const Loading: React.MemoExoticComponent<({ columnsLength }: Props) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
export {};
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { TableCell as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import l from "classnames";
|
|
3
|
+
import s, { memo as c, useMemo as i } from "react";
|
|
4
|
+
import { TableCell as n } from "../cell/component.js";
|
|
5
|
+
import t from "./index.module.css.js";
|
|
6
|
+
const d = ["r1", "r2", "r3", "r4", "r5"], M = c(({ columnsLength: e }) => {
|
|
7
|
+
const a = i(
|
|
8
|
+
() => Array.from({ length: e }, (o, m) => `col-${m + 1}`),
|
|
9
|
+
[e]
|
|
10
|
+
);
|
|
11
|
+
return /* @__PURE__ */ r(s.Fragment, { children: d.map((o) => /* @__PURE__ */ r("tr", { className: l(t.row, t.tr), children: a.map((m) => /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: t.td,
|
|
15
|
+
style: { width: `${Math.floor(Math.random() * 51) + 50}%` }
|
|
16
|
+
}
|
|
17
|
+
) }, `${o}-${m}`)) }, o)) });
|
|
18
|
+
});
|
|
13
19
|
export {
|
|
14
|
-
|
|
20
|
+
M as Loading
|
|
15
21
|
};
|