@alphakits/ui 2.3.1 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +31 -34
- 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 +77 -80
- 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/modal/hooks/use-modal.js +22 -22
- 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 +77 -79
- 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 +3 -3
- package/dist/table/components/empty-list/index.js +6 -3
- package/dist/table/components/error/index.d.ts +3 -3
- package/dist/table/components/error/index.js +8 -5
- 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 +64 -59
- package/dist/table/table.d.ts +1 -1
- package/dist/table/table.js +80 -80
- 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 +6 -6
- 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,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as j, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import u from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import { forwardRef as $, useRef as v, useState as I, useCallback as p, useEffect as u, useMemo as M } from "react";
|
|
4
|
+
import { ResizeObserver as O } from "resize-observer";
|
|
5
|
+
import { Link as P } from "../link/component.js";
|
|
6
|
+
import { debounce as _ } from "../utils/debounce.js";
|
|
7
7
|
import c from "./index.module.css.js";
|
|
8
8
|
const K = $((E, w) => {
|
|
9
9
|
const {
|
|
10
|
-
expanded:
|
|
11
|
-
defaultExpanded:
|
|
10
|
+
expanded: s,
|
|
11
|
+
defaultExpanded: b,
|
|
12
12
|
collapsedLabel: m,
|
|
13
13
|
expandedLabel: h,
|
|
14
|
-
children:
|
|
14
|
+
children: g,
|
|
15
15
|
className: C,
|
|
16
16
|
contentClassName: z,
|
|
17
17
|
id: L,
|
|
@@ -19,64 +19,55 @@ const K = $((E, w) => {
|
|
|
19
19
|
onTransitionEnd: a,
|
|
20
20
|
dataTestId: R,
|
|
21
21
|
linkProps: x
|
|
22
|
-
} = E, d =
|
|
22
|
+
} = E, d = s === void 0, o = v(null), r = v(null), [y, N] = I(b || s), n = d ? y : s, t = p(() => {
|
|
23
23
|
let e;
|
|
24
|
-
!
|
|
25
|
-
}, [n]), k =
|
|
26
|
-
a && a(
|
|
27
|
-
}, [
|
|
28
|
-
d && N(!n),
|
|
24
|
+
!r.current || !o.current || (n ? e = r.current.offsetHeight : e = 0, o.current.style.height = `${e}px`);
|
|
25
|
+
}, [n]), k = p(() => {
|
|
26
|
+
a && a(s);
|
|
27
|
+
}, [s, a]), H = p(() => {
|
|
28
|
+
d && N(!n), i && i();
|
|
29
29
|
}, [n, i, d]);
|
|
30
|
-
|
|
31
|
-
const e =
|
|
30
|
+
u(() => {
|
|
31
|
+
const e = _(() => t(), 300);
|
|
32
32
|
return window.addEventListener("resize", e), () => {
|
|
33
33
|
e.cancel(), window.removeEventListener("resize", e);
|
|
34
34
|
};
|
|
35
|
-
}, [t]),
|
|
36
|
-
const e = new
|
|
37
|
-
return
|
|
35
|
+
}, [t]), u(() => {
|
|
36
|
+
const e = new O(t);
|
|
37
|
+
return r.current && e.observe(r.current), () => {
|
|
38
38
|
e.disconnect();
|
|
39
39
|
};
|
|
40
|
-
}, [t]),
|
|
40
|
+
}, [t]), u(() => t(), [t]);
|
|
41
41
|
const S = M(() => {
|
|
42
|
-
const e =
|
|
42
|
+
const e = o.current?.offsetHeight;
|
|
43
43
|
return {
|
|
44
44
|
height: n && !e ? "0px" : `${e}px`
|
|
45
45
|
};
|
|
46
46
|
}, [n]), T = !!h || !!m;
|
|
47
|
-
return /* @__PURE__ */ j(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
size: x?.size || "m",
|
|
72
|
-
pseudo: !0,
|
|
73
|
-
onClick: H,
|
|
74
|
-
children: n ? h : m
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
47
|
+
return /* @__PURE__ */ j("div", { ref: w, className: f(C, c.collapse), id: L, "data-test-id": R, children: [
|
|
48
|
+
/* @__PURE__ */ l(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
onTransitionEnd: k,
|
|
52
|
+
ref: o,
|
|
53
|
+
className: f(c.content, z, {
|
|
54
|
+
[c.expandedContent]: n
|
|
55
|
+
}),
|
|
56
|
+
style: S,
|
|
57
|
+
children: /* @__PURE__ */ l("div", { className: f(c.children_wrap), ref: r, children: g })
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
T && /* @__PURE__ */ l(
|
|
61
|
+
P,
|
|
62
|
+
{
|
|
63
|
+
view: x?.view || "secondary",
|
|
64
|
+
size: x?.size || "m",
|
|
65
|
+
pseudo: !0,
|
|
66
|
+
onClick: H,
|
|
67
|
+
children: n ? h : m
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] });
|
|
80
71
|
});
|
|
81
72
|
export {
|
|
82
73
|
K as Collapse
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { TextProps } from '../typography/text';
|
|
3
2
|
export type CopyButtonProps = {
|
|
4
3
|
text: string;
|
|
5
4
|
color?: TextProps['color'];
|
|
6
5
|
fullText?: string;
|
|
7
6
|
};
|
|
8
|
-
export declare const CopyButton: ({ text, fullText, color
|
|
7
|
+
export declare const CopyButton: ({ text, fullText, color }: CopyButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,11 +4,7 @@ import { IconButton as n } from "../icon-button/component.js";
|
|
|
4
4
|
import { ToastNotifier as a } from "../toast-notifier/component.js";
|
|
5
5
|
import { Typography as c } from "../typography/component.js";
|
|
6
6
|
import i from "./index.module.css.js";
|
|
7
|
-
const y = ({
|
|
8
|
-
text: o,
|
|
9
|
-
fullText: r,
|
|
10
|
-
color: e
|
|
11
|
-
}) => /* @__PURE__ */ m("div", { className: i.wrapper, children: [
|
|
7
|
+
const y = ({ text: o, fullText: r, color: e }) => /* @__PURE__ */ m("div", { className: i.wrapper, children: [
|
|
12
8
|
/* @__PURE__ */ t(c.Text, { view: "title", weight: "medium", color: e || "primary", children: o }),
|
|
13
9
|
/* @__PURE__ */ t(
|
|
14
10
|
n,
|
package/dist/date/component.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { Typography as i } from "../typography/component.js";
|
|
3
|
-
import "../toast-notifier/component.js";
|
|
4
3
|
import { formatDate as y } from "../utils/format-date/index.js";
|
|
4
|
+
import "../toast-notifier/component.js";
|
|
5
5
|
const c = ({
|
|
6
6
|
className: t,
|
|
7
7
|
dataTestId: o,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
export interface DateSwitcherProps {
|
|
3
2
|
view?: 'day' | 'week';
|
|
4
3
|
startDate: string;
|
|
@@ -7,4 +6,4 @@ export interface DateSwitcherProps {
|
|
|
7
6
|
maxDate?: string;
|
|
8
7
|
todayLabel: string;
|
|
9
8
|
}
|
|
10
|
-
export declare const DateSwitcher: ({ view, startDate, onChange, minDate, maxDate, todayLabel, }: DateSwitcherProps) =>
|
|
9
|
+
export declare const DateSwitcher: ({ view, startDate, onChange, minDate, maxDate, todayLabel, }: DateSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,10 +2,10 @@ import { jsxs as A, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import D from "@alphakits/icons/dist/ChevronBackM";
|
|
3
3
|
import B from "@alphakits/icons/dist/ChevronForwardM";
|
|
4
4
|
import F from "classnames";
|
|
5
|
-
import {
|
|
6
|
-
import { Button as I } from "../button/component.js";
|
|
5
|
+
import { Button as x } from "../button/component.js";
|
|
7
6
|
import { IconButton as m } from "../icon-button/component.js";
|
|
8
|
-
import { Typography as
|
|
7
|
+
import { Typography as N } from "../typography/component.js";
|
|
8
|
+
import { startOfISOWeek as R, parseISO as i, isAfter as S, isBefore as C, isToday as E, format as t, subDays as I, subWeeks as W, add as c } from "../utils/date/index.js";
|
|
9
9
|
import n from "./index.module.css.js";
|
|
10
10
|
const s = "yyyy-MM-dd", y = "dd.MM.yy", G = ({
|
|
11
11
|
view: r = "day",
|
|
@@ -15,16 +15,16 @@ const s = "yyyy-MM-dd", y = "dd.MM.yy", G = ({
|
|
|
15
15
|
maxDate: f,
|
|
16
16
|
todayLabel: p
|
|
17
17
|
}) => {
|
|
18
|
-
const k =
|
|
18
|
+
const k = R(i(l)), o = r === "day" ? i(l) : k, h = a ? i(a) : /* @__PURE__ */ new Date(), O = () => {
|
|
19
19
|
r === "day" && d(t(c(o, { days: 1 }), s)), r === "week" && d(t(c(o, { days: 7 }), s));
|
|
20
20
|
}, T = () => {
|
|
21
|
-
r === "day" && d(t(
|
|
21
|
+
r === "day" && d(t(I(o, 1), s)), r === "week" && d(t(W(o, 1), s));
|
|
22
22
|
}, u = () => {
|
|
23
23
|
d(t(/* @__PURE__ */ new Date(), s));
|
|
24
24
|
}, M = () => r === "day" ? t(o, y) : `${t(o, y)} - ${t(
|
|
25
25
|
c(o, { days: 6 }),
|
|
26
26
|
y
|
|
27
|
-
)}`, b =
|
|
27
|
+
)}`, b = S(o, h), _ = f ? C(o, i(f)) : !0, w = E(o);
|
|
28
28
|
return /* @__PURE__ */ A("div", { className: n.date_switcher, children: [
|
|
29
29
|
/* @__PURE__ */ e(
|
|
30
30
|
m,
|
|
@@ -34,9 +34,9 @@ const s = "yyyy-MM-dd", y = "dd.MM.yy", G = ({
|
|
|
34
34
|
icon: D
|
|
35
35
|
}
|
|
36
36
|
),
|
|
37
|
-
/* @__PURE__ */ e("div", { className: F(n.date_wrap, n[r]), children: /* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e("div", { className: F(n.date_wrap, n[r]), children: /* @__PURE__ */ e(N.Text, { tag: "div", view: "title", color: "secondary", weight: "bold", children: M() }) }),
|
|
38
38
|
/* @__PURE__ */ e(m, { disabled: !_, onClick: O, icon: B }),
|
|
39
|
-
/* @__PURE__ */ e(
|
|
39
|
+
/* @__PURE__ */ e(x, { disabled: w, onClick: u, view: "ghost", children: p })
|
|
40
40
|
] });
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
@@ -8,26 +8,16 @@ const h = ({
|
|
|
8
8
|
rightAddon: t,
|
|
9
9
|
description: a,
|
|
10
10
|
dataTestId: l
|
|
11
|
-
}) => /* @__PURE__ */ s(
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
className:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
),
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */ s("div", { className: e.textWrap, children: [
|
|
22
|
-
/* @__PURE__ */ s("div", { className: e.title, children: [
|
|
23
|
-
m,
|
|
24
|
-
t && /* @__PURE__ */ c("span", { children: t })
|
|
25
|
-
] }),
|
|
26
|
-
a && /* @__PURE__ */ c("div", { className: e.description, children: a })
|
|
27
|
-
] })
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
);
|
|
11
|
+
}) => /* @__PURE__ */ s("div", { className: d(e.component, i), "data-test-id": l, children: [
|
|
12
|
+
r,
|
|
13
|
+
/* @__PURE__ */ s("div", { className: e.textWrap, children: [
|
|
14
|
+
/* @__PURE__ */ s("div", { className: e.title, children: [
|
|
15
|
+
m,
|
|
16
|
+
t && /* @__PURE__ */ c("span", { children: t })
|
|
17
|
+
] }),
|
|
18
|
+
a && /* @__PURE__ */ c("div", { className: e.description, children: a })
|
|
19
|
+
] })
|
|
20
|
+
] });
|
|
31
21
|
export {
|
|
32
22
|
h as DecoratedItem
|
|
33
23
|
};
|
package/dist/dot/component.js
CHANGED
|
@@ -1,10 +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 c = ({
|
|
5
|
-
color: m = "green",
|
|
6
|
-
size: r = "sm"
|
|
7
|
-
}) => /* @__PURE__ */ t("div", { className: s([o.dot, o[r], o[m]]) });
|
|
4
|
+
const c = ({ color: m = "green", size: r = "sm" }) => /* @__PURE__ */ t("div", { className: s([o.dot, o[r], o[m]]) });
|
|
8
5
|
export {
|
|
9
6
|
c as Dot
|
|
10
7
|
};
|
|
@@ -19,15 +19,7 @@ const N = ({
|
|
|
19
19
|
/* @__PURE__ */ t(y, { columns: 1, gr: 8, className: i.content, children: [
|
|
20
20
|
e && /* @__PURE__ */ r(o.Title, { view: "large", weight: "bold", color: "primary", tag: "div", children: e }),
|
|
21
21
|
/* @__PURE__ */ r(o.Title, { view: "small", weight: "bold", color: "primary", tag: "div", children: a }),
|
|
22
|
-
c && /* @__PURE__ */ r(
|
|
23
|
-
o.Text,
|
|
24
|
-
{
|
|
25
|
-
color: "primary",
|
|
26
|
-
weight: "medium",
|
|
27
|
-
view: "primary-medium",
|
|
28
|
-
children: c
|
|
29
|
-
}
|
|
30
|
-
)
|
|
22
|
+
c && /* @__PURE__ */ r(o.Text, { color: "primary", weight: "medium", view: "primary-medium", children: c })
|
|
31
23
|
] }),
|
|
32
24
|
(!!m?.onClick || m?.href) && /* @__PURE__ */ r(g, { view: d, size: h, ...m, children: n })
|
|
33
25
|
] });
|
package/dist/flex/component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
declare enum Spaces {
|
|
3
3
|
xxxs = 4,
|
|
4
4
|
xxs = 4,
|
|
@@ -19,5 +19,5 @@ type Props = {
|
|
|
19
19
|
direction?: 'row' | 'column';
|
|
20
20
|
justify?: 'start' | 'center' | 'end' | 'between' | 'around';
|
|
21
21
|
};
|
|
22
|
-
export declare const Flex: ({ children, className, gap, marginBottom, wrap, align, direction, justify, }: Props) =>
|
|
22
|
+
export declare const Flex: ({ children, className, gap, marginBottom, wrap, align, direction, justify, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|
package/dist/footer/component.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import w from "@alphakits/icons/dist/
|
|
4
|
-
import C from "@alphakits/icons/dist/
|
|
5
|
-
import M from "@alphakits/icons/dist/
|
|
6
|
-
import F from "@alphakits/icons/dist/
|
|
7
|
-
import S from "
|
|
2
|
+
import b from "@alphakits/icons/dist/AppStoreM";
|
|
3
|
+
import w from "@alphakits/icons/dist/FacebookM";
|
|
4
|
+
import C from "@alphakits/icons/dist/GooglePlayM";
|
|
5
|
+
import M from "@alphakits/icons/dist/InstagramM";
|
|
6
|
+
import F from "@alphakits/icons/dist/YoutubeM";
|
|
7
|
+
import S from "react";
|
|
8
8
|
import { Grid as n } from "../grid/component.js";
|
|
9
9
|
import { IconButton as i } from "../icon-button/component.js";
|
|
10
10
|
import { SectionWrapper as j } from "../section-wrapper/component.js";
|
|
11
11
|
import { ContactBlock as A } from "./contact-block.js";
|
|
12
12
|
import e from "./index.module.css.js";
|
|
13
13
|
const H = ({
|
|
14
|
-
sections:
|
|
15
|
-
contacts:
|
|
14
|
+
sections: v = [],
|
|
15
|
+
contacts: u = [],
|
|
16
16
|
company: h,
|
|
17
17
|
email: p,
|
|
18
18
|
address: f,
|
|
@@ -23,54 +23,58 @@ const H = ({
|
|
|
23
23
|
google: s,
|
|
24
24
|
appstore: a
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
26
|
+
const x = o || c || m, B = N && a && s;
|
|
27
27
|
return /* @__PURE__ */ t(j, { pb: "m", pt: "l", isBlackBg: !0, children: [
|
|
28
|
-
/* @__PURE__ */ r("div", { className: e.wrapper, children: /* @__PURE__ */ r("div", { className: e.row_wrapper, children: /* @__PURE__ */
|
|
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
|
-
|
|
28
|
+
/* @__PURE__ */ r("div", { className: e.wrapper, children: /* @__PURE__ */ r("div", { className: e.row_wrapper, children: /* @__PURE__ */ t(n.Row, { children: [
|
|
29
|
+
v.map((l) => /* @__PURE__ */ r(n.Col, { className: e.gridCol, children: /* @__PURE__ */ t("div", { className: e.block, children: [
|
|
30
|
+
/* @__PURE__ */ r("span", { className: e.title, children: l.title }),
|
|
31
|
+
l.items.map((d) => /* @__PURE__ */ r("a", { className: e.link, href: d.link, children: d.text }, d.text))
|
|
32
|
+
] }) }, l.title)),
|
|
33
|
+
/* @__PURE__ */ r(n.Col, { className: e.gridCol, children: /* @__PURE__ */ t("div", { className: e.contacts, children: [
|
|
34
|
+
u.map((l) => /* @__PURE__ */ r(
|
|
35
|
+
A,
|
|
36
|
+
{
|
|
37
|
+
title: l.title,
|
|
38
|
+
value: l.value
|
|
39
|
+
},
|
|
40
|
+
l.title
|
|
41
|
+
)),
|
|
42
|
+
p && /* @__PURE__ */ r("div", { className: e.email, children: p }),
|
|
43
|
+
/* @__PURE__ */ r("br", {}),
|
|
44
|
+
f && /* @__PURE__ */ r("div", { className: e.text, children: f }),
|
|
45
|
+
/* @__PURE__ */ r("br", {}),
|
|
46
|
+
h && /* @__PURE__ */ r("div", { className: e.text, children: h }),
|
|
47
|
+
/* @__PURE__ */ r("br", {}),
|
|
48
|
+
x && /* @__PURE__ */ t("div", { className: e.buttons, children: [
|
|
49
|
+
o && /* @__PURE__ */ r(
|
|
50
|
+
i,
|
|
51
|
+
{
|
|
52
|
+
href: o,
|
|
53
|
+
icon: w
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
m && /* @__PURE__ */ r(
|
|
57
|
+
i,
|
|
58
|
+
{
|
|
59
|
+
href: m,
|
|
60
|
+
icon: F
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
c && /* @__PURE__ */ r(
|
|
64
|
+
i,
|
|
65
|
+
{
|
|
66
|
+
href: c,
|
|
67
|
+
icon: M
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] })
|
|
71
|
+
] }) }, "cont")
|
|
72
|
+
] }) }) }),
|
|
73
|
+
/* @__PURE__ */ r("div", { className: e.bottomBlock, children: B && /* @__PURE__ */ t(S.Fragment, { children: [
|
|
70
74
|
/* @__PURE__ */ r("div", { className: e.text, children: N }),
|
|
71
75
|
/* @__PURE__ */ t("div", { className: e.buttons, children: [
|
|
72
|
-
a && /* @__PURE__ */ r(i, { href: a, icon:
|
|
73
|
-
s && /* @__PURE__ */ r(i, { href: s, icon:
|
|
76
|
+
a && /* @__PURE__ */ r(i, { href: a, icon: b }),
|
|
77
|
+
s && /* @__PURE__ */ r(i, { href: s, icon: C })
|
|
74
78
|
] })
|
|
75
79
|
] }) })
|
|
76
80
|
] });
|
package/dist/form/component.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Component: () => React.JSX.Element;
|
|
1
|
+
export declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/form/component.js
CHANGED
|
@@ -33,12 +33,7 @@ const E = { baz: "", bar: "" }, M = { buz: "", bur: "" }, V = (l) => {
|
|
|
33
33
|
removing: p,
|
|
34
34
|
close: l?.close,
|
|
35
35
|
t: (b) => b,
|
|
36
|
-
children: ({
|
|
37
|
-
values: b,
|
|
38
|
-
touched: d,
|
|
39
|
-
errors: r,
|
|
40
|
-
handleChange: o
|
|
41
|
-
}) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
|
|
36
|
+
children: ({ values: b, touched: d, errors: r, handleChange: o }) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
|
|
42
37
|
/* @__PURE__ */ e(
|
|
43
38
|
t,
|
|
44
39
|
{
|
|
@@ -91,12 +86,7 @@ const E = { baz: "", bar: "" }, M = { buz: "", bur: "" }, V = (l) => {
|
|
|
91
86
|
removing: p,
|
|
92
87
|
close: l?.close,
|
|
93
88
|
t: (r) => r,
|
|
94
|
-
children: ({
|
|
95
|
-
values: r,
|
|
96
|
-
touched: o,
|
|
97
|
-
errors: n,
|
|
98
|
-
handleChange: s
|
|
99
|
-
}) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
|
|
89
|
+
children: ({ values: r, touched: o, errors: n, handleChange: s }) => /* @__PURE__ */ C(S, { columns: 1, gr: 16, gc: 0, children: [
|
|
100
90
|
/* @__PURE__ */ e(
|
|
101
91
|
t,
|
|
102
92
|
{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { default as React, PropsWithChildren } from 'react';
|
|
2
1
|
import { FormikErrors, FormikProps, FormikValues } from 'formik';
|
|
2
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
3
3
|
import { TFunction } from '../../../modal';
|
|
4
4
|
export type Props<T extends FormikValues> = {
|
|
5
5
|
initialValues: T;
|
|
6
|
-
validate?: (values: T) =>
|
|
6
|
+
validate?: (values: T) => undefined | Record<string, unknown> | Promise<FormikErrors<T>>;
|
|
7
7
|
customValidationFields?: Array<keyof T>;
|
|
8
8
|
enableReinitialize?: boolean;
|
|
9
9
|
loading?: boolean;
|
|
@@ -11,4 +11,4 @@ export type Props<T extends FormikValues> = {
|
|
|
11
11
|
save: (values: any) => any;
|
|
12
12
|
children: (props: FormikProps<FormikValues & T>) => React.ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export declare function BaseForm<T extends FormikValues>({ loading, validate, customValidationFields, initialValues, enableReinitialize, save, children, t, }: PropsWithChildren<Props<T>>):
|
|
14
|
+
export declare function BaseForm<T extends FormikValues>({ loading, validate, customValidationFields, initialValues, enableReinitialize, save, children, t, }: PropsWithChildren<Props<T>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Formik as
|
|
3
|
-
import { FormLoading as
|
|
4
|
-
function
|
|
5
|
-
loading:
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Formik as l } from "formik";
|
|
3
|
+
import { FormLoading as h } from "../../components/form-loading/index.js";
|
|
4
|
+
function v({
|
|
5
|
+
loading: n,
|
|
6
6
|
validate: a,
|
|
7
|
-
customValidationFields:
|
|
8
|
-
initialValues:
|
|
9
|
-
enableReinitialize:
|
|
10
|
-
save:
|
|
11
|
-
children:
|
|
12
|
-
t:
|
|
7
|
+
customValidationFields: d,
|
|
8
|
+
initialValues: m,
|
|
9
|
+
enableReinitialize: f,
|
|
10
|
+
save: u,
|
|
11
|
+
children: s,
|
|
12
|
+
t: p
|
|
13
13
|
}) {
|
|
14
|
-
if (
|
|
15
|
-
const c = (r) => (
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
if (n) return /* @__PURE__ */ i(h, {});
|
|
15
|
+
const c = (r) => (o) => r.reduce(
|
|
16
|
+
(e, t) => ((typeof o == "object" ? o : {})[t] || (e[t] = p("validationErrors:Required")), e),
|
|
17
|
+
{}
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ i(
|
|
20
|
+
l,
|
|
18
21
|
{
|
|
19
|
-
validate: ((r,
|
|
22
|
+
validate: ((r, o) => {
|
|
20
23
|
if (r) return r;
|
|
21
|
-
if (
|
|
22
|
-
})(a,
|
|
23
|
-
initialValues:
|
|
24
|
-
enableReinitialize:
|
|
25
|
-
onSubmit:
|
|
26
|
-
children: (r) => (process.env.REACT_APP_STAGE
|
|
27
|
-
values: r.values,
|
|
28
|
-
errors: r.errors
|
|
29
|
-
}), f({ ...r }))
|
|
24
|
+
if (o) return c(o);
|
|
25
|
+
})(a, d),
|
|
26
|
+
initialValues: m,
|
|
27
|
+
enableReinitialize: f,
|
|
28
|
+
onSubmit: u,
|
|
29
|
+
children: (r) => (process.env.REACT_APP_STAGE, s({ ...r }))
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
v as BaseForm
|
|
35
35
|
};
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import u from "react";
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
2
|
import { Formik as d } from "formik";
|
|
3
|
+
import u from "react";
|
|
4
4
|
import { Button as i } from "../../../button/component.js";
|
|
5
|
-
import { Sidepanel as
|
|
6
|
-
import { getDefaultValues as
|
|
5
|
+
import { Sidepanel as f } from "../../../sidepanel/component.js";
|
|
6
|
+
import { getDefaultValues as p } from "../../utils/get-default-values.js";
|
|
7
7
|
const C = ({
|
|
8
8
|
initialValues: n,
|
|
9
|
-
defaultValues:
|
|
10
|
-
children:
|
|
11
|
-
submitCallback:
|
|
9
|
+
defaultValues: m,
|
|
10
|
+
children: s,
|
|
11
|
+
submitCallback: l,
|
|
12
12
|
close: o,
|
|
13
|
-
t
|
|
13
|
+
t: r
|
|
14
14
|
}) => {
|
|
15
|
-
const a =
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
}, children: (
|
|
19
|
-
|
|
20
|
-
errors: e.errors
|
|
21
|
-
}), /* @__PURE__ */ r(
|
|
22
|
-
b,
|
|
15
|
+
const a = p(n, m);
|
|
16
|
+
return /* @__PURE__ */ e(d, { initialValues: a, onSubmit: (t) => {
|
|
17
|
+
l(t), o();
|
|
18
|
+
}, children: (t) => (process.env.REACT_APP_STAGE, /* @__PURE__ */ e(
|
|
19
|
+
f,
|
|
23
20
|
{
|
|
24
|
-
title:
|
|
21
|
+
title: r("filters"),
|
|
25
22
|
bottomAddons: /* @__PURE__ */ c(u.Fragment, { children: [
|
|
26
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ e(
|
|
27
24
|
i,
|
|
28
25
|
{
|
|
29
26
|
view: "primary",
|
|
30
27
|
size: "s",
|
|
31
28
|
block: !0,
|
|
32
29
|
dataTestId: "buttonSave",
|
|
33
|
-
onClick: () =>
|
|
34
|
-
children:
|
|
30
|
+
onClick: () => t.submitForm(),
|
|
31
|
+
children: r("save")
|
|
35
32
|
}
|
|
36
33
|
),
|
|
37
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ e(
|
|
38
35
|
i,
|
|
39
36
|
{
|
|
40
37
|
block: !0,
|
|
@@ -42,11 +39,11 @@ const C = ({
|
|
|
42
39
|
size: "s",
|
|
43
40
|
dataTestId: "buttonCancel",
|
|
44
41
|
onClick: o,
|
|
45
|
-
children:
|
|
42
|
+
children: r("cancel")
|
|
46
43
|
}
|
|
47
44
|
)
|
|
48
45
|
] }),
|
|
49
|
-
children:
|
|
46
|
+
children: s(t)
|
|
50
47
|
}
|
|
51
48
|
)) });
|
|
52
49
|
};
|