Package not found. Please check the package name and try again.
@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
package/dist/link/component.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type LinkProps = NativeProps & {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
dataTestId?: string;
|
|
12
12
|
onClick?: NativeProps['onClick'];
|
|
13
|
-
children
|
|
13
|
+
children?: ReactNode;
|
|
14
14
|
};
|
|
15
15
|
export declare const Link: React.ForwardRefExoticComponent<NativeProps & {
|
|
16
16
|
href?: string | undefined;
|
|
@@ -22,6 +22,6 @@ export declare const Link: React.ForwardRefExoticComponent<NativeProps & {
|
|
|
22
22
|
className?: string | undefined;
|
|
23
23
|
dataTestId?: string | undefined;
|
|
24
24
|
onClick?: NativeProps['onClick'];
|
|
25
|
-
children
|
|
25
|
+
children?: ReactNode;
|
|
26
26
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
27
27
|
export {};
|
package/dist/link/component.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import n from "classnames";
|
|
2
3
|
import R, { forwardRef as k, useRef as b } from "react";
|
|
3
4
|
import j from "react-merge-refs";
|
|
4
|
-
import n from "classnames";
|
|
5
5
|
import { useFocus as w } from "../hooks/useFocus/index.js";
|
|
6
6
|
import e from "./index.module.css.js";
|
|
7
7
|
const g = k(
|
package/dist/loader/component.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import t from "classnames";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "./index.module.css.js";
|
|
4
|
+
const d = ({ className: r, dataTestId: e }) => /* @__PURE__ */ i(
|
|
5
5
|
"svg",
|
|
6
6
|
{
|
|
7
7
|
height: "24",
|
|
8
8
|
width: "24",
|
|
9
9
|
viewBox: "0 0 24 24",
|
|
10
|
-
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
className: t(o.component, r),
|
|
11
12
|
"data-test-id": e,
|
|
12
13
|
children: [
|
|
13
14
|
/* @__PURE__ */ c("circle", { cx: "4", cy: "12", r: "2" }),
|
|
@@ -17,5 +18,5 @@ const l = ({ className: r, dataTestId: e }) => /* @__PURE__ */ o(
|
|
|
17
18
|
}
|
|
18
19
|
);
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
d as Loader
|
|
21
22
|
};
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
-
import M
|
|
3
|
-
import w from "react
|
|
4
|
-
import P from "
|
|
2
|
+
import M from "classnames";
|
|
3
|
+
import w, { useRef as l, useState as m, useCallback as c, useEffect as i } from "react";
|
|
4
|
+
import P from "react-merge-refs";
|
|
5
5
|
import { createTextMaskInputElement as v } from "text-mask-core";
|
|
6
6
|
import { Input as A } from "../input/component.js";
|
|
7
7
|
import L from "./index.module.css.js";
|
|
8
|
-
const T = " ", q =
|
|
9
|
-
({
|
|
10
|
-
mask: p,
|
|
11
|
-
value: n,
|
|
12
|
-
defaultValue: s,
|
|
13
|
-
className: d,
|
|
14
|
-
onBeforeDisplay: f,
|
|
15
|
-
onChange: u,
|
|
16
|
-
onClear: o,
|
|
17
|
-
...x
|
|
18
|
-
}, C) => {
|
|
8
|
+
const T = " ", q = w.forwardRef(
|
|
9
|
+
({ mask: p, value: n, defaultValue: s, className: d, onBeforeDisplay: f, onChange: u, onClear: o, ...x }, C) => {
|
|
19
10
|
const r = l(null), a = l(null), [R, h] = m(n || s || ""), [k, E] = m(!0), t = c((e = "") => {
|
|
20
11
|
a.current && r.current && (a.current.update(e), h(r.current.value));
|
|
21
12
|
}, []), H = c(
|
|
@@ -52,11 +43,11 @@ const T = " ", q = M.forwardRef(
|
|
|
52
43
|
A,
|
|
53
44
|
{
|
|
54
45
|
...x,
|
|
55
|
-
className:
|
|
46
|
+
className: M(d, { [L.textHidden]: k }),
|
|
56
47
|
value: R,
|
|
57
48
|
onChange: H,
|
|
58
49
|
onClear: I,
|
|
59
|
-
ref:
|
|
50
|
+
ref: P([C, r])
|
|
60
51
|
}
|
|
61
52
|
);
|
|
62
53
|
}
|
package/dist/menu/component.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import s from "classnames";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { ContentHeader as S } from "./components/content-header/index.js";
|
|
4
|
+
import { MenuAvatar as j } from "./components/menu-avatar/index.js";
|
|
5
|
+
import { MenuBackButton as L } from "./components/menu-back-button/index.js";
|
|
6
|
+
import { MenuButtonsList as T } from "./components/menu-buttons-list/index.js";
|
|
7
|
+
import { UserButton as W } from "./components/user-button/index.js";
|
|
8
|
+
import { useMenu as $ } from "./hooks/use-menu.js";
|
|
9
9
|
import t from "./index.module.css.js";
|
|
10
10
|
const E = ({
|
|
11
11
|
pathname: i,
|
|
@@ -22,12 +22,7 @@ const E = ({
|
|
|
22
22
|
navigate: v,
|
|
23
23
|
t: c
|
|
24
24
|
}) => {
|
|
25
|
-
const {
|
|
26
|
-
staticMenu: n,
|
|
27
|
-
setStaticMenu: B,
|
|
28
|
-
showMenu: a,
|
|
29
|
-
ref: C
|
|
30
|
-
} = S(), r = n || a, l = `/${i.split("/").slice(-1)[0]}`, N = () => v("/app/calendar"), y = s(t.left_menu, {
|
|
25
|
+
const { staticMenu: n, setStaticMenu: B, showMenu: a, ref: C } = $(), r = n || a, l = `/${i.split("/").slice(-1)[0]}`, N = () => v("/app/calendar"), y = s(t.left_menu, {
|
|
31
26
|
[t.menu_static]: n,
|
|
32
27
|
[t.hidden_menu_opened]: a
|
|
33
28
|
}), x = s(t.content_wrapper, {
|
|
@@ -37,7 +32,7 @@ const E = ({
|
|
|
37
32
|
return /* @__PURE__ */ o("div", { className: s(t.layout_wrapper), children: [
|
|
38
33
|
/* @__PURE__ */ o("div", { ref: C, className: y, children: [
|
|
39
34
|
/* @__PURE__ */ e(
|
|
40
|
-
|
|
35
|
+
j,
|
|
41
36
|
{
|
|
42
37
|
title: _,
|
|
43
38
|
showTitle: r,
|
|
@@ -45,9 +40,9 @@ const E = ({
|
|
|
45
40
|
onClick: k
|
|
46
41
|
}
|
|
47
42
|
),
|
|
48
|
-
u && /* @__PURE__ */ e(
|
|
43
|
+
u && /* @__PURE__ */ e(L, { showTitle: r, onClick: N }),
|
|
49
44
|
/* @__PURE__ */ e(
|
|
50
|
-
|
|
45
|
+
T,
|
|
51
46
|
{
|
|
52
47
|
routes: p,
|
|
53
48
|
showLabels: r,
|
|
@@ -60,13 +55,13 @@ const E = ({
|
|
|
60
55
|
/* @__PURE__ */ o("div", { className: x, children: [
|
|
61
56
|
/* @__PURE__ */ o("div", { className: t.content_header, children: [
|
|
62
57
|
/* @__PURE__ */ e(
|
|
63
|
-
|
|
58
|
+
S,
|
|
64
59
|
{
|
|
65
60
|
onClick: () => B(!n),
|
|
66
61
|
title: c(`menu.${l}`)
|
|
67
62
|
}
|
|
68
63
|
),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
64
|
+
/* @__PURE__ */ e(W, { photo: f, fullName: d, options: h })
|
|
70
65
|
] }),
|
|
71
66
|
m
|
|
72
67
|
] })
|
|
@@ -4,15 +4,7 @@ import { IconButton as m } from "../../../icon-button/component.js";
|
|
|
4
4
|
import { Typography as n } from "../../../typography/component.js";
|
|
5
5
|
import p from "./index.module.css.js";
|
|
6
6
|
const f = ({ onClick: r, title: t }) => /* @__PURE__ */ e("div", { children: [
|
|
7
|
-
/* @__PURE__ */ o(
|
|
8
|
-
m,
|
|
9
|
-
{
|
|
10
|
-
size: "m",
|
|
11
|
-
icon: i,
|
|
12
|
-
onClick: r,
|
|
13
|
-
className: p.open_button
|
|
14
|
-
}
|
|
15
|
-
),
|
|
7
|
+
/* @__PURE__ */ o(m, { size: "m", icon: i, onClick: r, className: p.open_button }),
|
|
16
8
|
/* @__PURE__ */ o(n.Title, { color: "primary", tag: "div", view: "xsmall", weight: "regular", children: t })
|
|
17
9
|
] });
|
|
18
10
|
export {
|
|
@@ -3,12 +3,7 @@ import n from "classnames";
|
|
|
3
3
|
import { Avatar as c } from "../../../avatar/component.js";
|
|
4
4
|
import { Typography as d } from "../../../typography/component.js";
|
|
5
5
|
import r from "./index.module.css.js";
|
|
6
|
-
const u = ({
|
|
7
|
-
showTitle: o,
|
|
8
|
-
title: e,
|
|
9
|
-
image: i,
|
|
10
|
-
onClick: t
|
|
11
|
-
}) => {
|
|
6
|
+
const u = ({ showTitle: o, title: e, image: i, onClick: t }) => {
|
|
12
7
|
const a = () => {
|
|
13
8
|
t && t();
|
|
14
9
|
};
|
|
@@ -20,16 +20,7 @@ const f = ({
|
|
|
20
20
|
to: s,
|
|
21
21
|
children: [
|
|
22
22
|
o && /* @__PURE__ */ t("div", { className: e.leftAddons, children: o }),
|
|
23
|
-
/* @__PURE__ */ t(
|
|
24
|
-
d.Text,
|
|
25
|
-
{
|
|
26
|
-
view: "title",
|
|
27
|
-
weight: "medium",
|
|
28
|
-
color: "secondary",
|
|
29
|
-
className: e.text,
|
|
30
|
-
children: m
|
|
31
|
-
}
|
|
32
|
-
),
|
|
23
|
+
/* @__PURE__ */ t(d.Text, { view: "title", weight: "medium", color: "secondary", className: e.text, children: m }),
|
|
33
24
|
i && /* @__PURE__ */ t("div", { className: e.rightAddons, children: i })
|
|
34
25
|
]
|
|
35
26
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { MenuButton as p } from "../menu-button/index.js";
|
|
3
3
|
import a from "./index.module.css.js";
|
|
4
|
-
const d = ({
|
|
5
|
-
routes: e,
|
|
6
|
-
showLabels: o,
|
|
7
|
-
currentPath: s,
|
|
8
|
-
t: l,
|
|
9
|
-
Link: m
|
|
10
|
-
}) => /* @__PURE__ */ i("div", { className: a.component, children: !!e.length && e.map((t) => {
|
|
4
|
+
const d = ({ routes: e, showLabels: o, currentPath: s, t: l, Link: m }) => /* @__PURE__ */ i("div", { className: a.component, children: !!e.length && e.map((t) => {
|
|
11
5
|
const n = `/${t.path.split("/").slice(-1)[0]}`;
|
|
12
6
|
return /* @__PURE__ */ i(
|
|
13
7
|
p,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { useState as
|
|
1
|
+
import { useState as c, useRef as i, useCallback as m, useEffect as l } from "react";
|
|
2
2
|
const d = () => {
|
|
3
|
-
const [e,
|
|
4
|
-
e ||
|
|
5
|
-
}, [e]), u =
|
|
6
|
-
t.current && clearTimeout(t.current), t.current = setTimeout(
|
|
7
|
-
}, [
|
|
3
|
+
const [e, a] = c(!0), [f, n] = c(!1), t = i(void 0), o = i(null), s = m(() => {
|
|
4
|
+
e || n(!0);
|
|
5
|
+
}, [e]), u = m(() => {
|
|
6
|
+
t.current && clearTimeout(t.current), t.current = setTimeout(s, 600);
|
|
7
|
+
}, [s]);
|
|
8
8
|
return l(() => {
|
|
9
|
-
const r =
|
|
9
|
+
const r = o.current;
|
|
10
10
|
if (!(e || !r))
|
|
11
11
|
return r.addEventListener("mousemove", u), r.addEventListener("mouseleave", () => {
|
|
12
|
-
clearTimeout(t.current),
|
|
12
|
+
clearTimeout(t.current), n(!1);
|
|
13
13
|
}), () => {
|
|
14
14
|
r.removeEventListener("mousemove", u), clearTimeout(t.current);
|
|
15
15
|
};
|
|
16
|
-
}, [e,
|
|
17
|
-
ref:
|
|
16
|
+
}, [e, u]), {
|
|
17
|
+
ref: o,
|
|
18
18
|
staticMenu: e,
|
|
19
|
-
showMenu:
|
|
20
|
-
setStaticMenu:
|
|
19
|
+
showMenu: f,
|
|
20
|
+
setStaticMenu: a
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
@@ -5,18 +5,18 @@ import { Flex as j } from "../flex/component.js";
|
|
|
5
5
|
import { Image as p } from "../image/component.js";
|
|
6
6
|
import { ImageGallery as I } from "../image-gallery/component.js";
|
|
7
7
|
import { Padding as z } from "../padding/component.js";
|
|
8
|
-
import { Typography as
|
|
8
|
+
import { Typography as l } from "../typography/component.js";
|
|
9
9
|
import i from "./index.module.css.js";
|
|
10
10
|
const P = ({
|
|
11
11
|
className: h,
|
|
12
12
|
dataTestId: g,
|
|
13
13
|
title: m,
|
|
14
|
-
date:
|
|
15
|
-
rightAddons:
|
|
14
|
+
date: s,
|
|
15
|
+
rightAddons: o,
|
|
16
16
|
answer: d,
|
|
17
17
|
text: f,
|
|
18
18
|
image: y,
|
|
19
|
-
photos:
|
|
19
|
+
photos: a = [],
|
|
20
20
|
withImage: v = !0
|
|
21
21
|
}) => {
|
|
22
22
|
const [w, c] = n(!1), [x, u] = n(0);
|
|
@@ -24,30 +24,49 @@ const P = ({
|
|
|
24
24
|
/* @__PURE__ */ r("div", { className: i.topRow, children: [
|
|
25
25
|
/* @__PURE__ */ r("div", { className: i.leftSide, children: [
|
|
26
26
|
v && /* @__PURE__ */ e(p, { src: y, size: "s", text: m, view: "circle" }),
|
|
27
|
-
/* @__PURE__ */ e(
|
|
28
|
-
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
l.Text,
|
|
29
|
+
{
|
|
30
|
+
color: "primary",
|
|
31
|
+
className: i.title,
|
|
32
|
+
view: "title",
|
|
33
|
+
weight: "bold",
|
|
34
|
+
children: m
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
s && /* @__PURE__ */ e(l.Text, { view: "title", color: "secondary", weight: "regular", children: s })
|
|
29
38
|
] }),
|
|
30
|
-
|
|
39
|
+
o && /* @__PURE__ */ e("div", { className: i.rightAddons, children: o })
|
|
31
40
|
] }),
|
|
32
41
|
/* @__PURE__ */ r("div", { className: i.text, children: [
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
!!d && /* @__PURE__ */ e(
|
|
35
|
-
|
|
42
|
+
/* @__PURE__ */ e(l.Text, { view: "primary-medium", color: "primary", weight: "medium", children: f }),
|
|
43
|
+
!!d && /* @__PURE__ */ e(
|
|
44
|
+
l.Text,
|
|
45
|
+
{
|
|
46
|
+
className: i.answer,
|
|
47
|
+
view: "primary-small",
|
|
48
|
+
color: "secondary",
|
|
49
|
+
weight: "medium",
|
|
50
|
+
children: d
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
!!a.length && /* @__PURE__ */ r(S.Fragment, { children: [
|
|
36
54
|
/* @__PURE__ */ e(z, { padding: "8px 0" }),
|
|
37
|
-
/* @__PURE__ */ e(j, { justify: "start", gap: "md", children:
|
|
55
|
+
/* @__PURE__ */ e(j, { justify: "start", gap: "md", children: a.map((t, N) => /* @__PURE__ */ e(
|
|
38
56
|
T,
|
|
39
57
|
{
|
|
40
58
|
view: "ghost",
|
|
41
59
|
onClick: () => {
|
|
42
60
|
u(N), c(!0);
|
|
43
61
|
},
|
|
44
|
-
children: /* @__PURE__ */ e(p, { src:
|
|
45
|
-
}
|
|
62
|
+
children: /* @__PURE__ */ e(p, { src: t, size: "xl", view: "default" })
|
|
63
|
+
},
|
|
64
|
+
t
|
|
46
65
|
)) }),
|
|
47
66
|
/* @__PURE__ */ e(
|
|
48
67
|
I,
|
|
49
68
|
{
|
|
50
|
-
photos:
|
|
69
|
+
photos: a.map((t) => ({ src: t })),
|
|
51
70
|
initialSlide: x || 0,
|
|
52
71
|
open: w,
|
|
53
72
|
onClose: () => c(!1)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ModalObject, TFunction } from '../../types';
|
|
3
2
|
import { ModalsProps } from '.';
|
|
4
3
|
type ModalProps = {
|
|
@@ -6,5 +5,5 @@ type ModalProps = {
|
|
|
6
5
|
index: number;
|
|
7
6
|
t: TFunction;
|
|
8
7
|
} & Pick<ModalsProps, 'dirtyModals' | 'closeModal' | 'currentModalId'>;
|
|
9
|
-
export declare const Modal: ({ modal, t, index, dirtyModals, closeModal, currentModalId
|
|
8
|
+
export declare const Modal: ({ modal, t, index, dirtyModals, closeModal, currentModalId }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import y
|
|
3
|
-
import
|
|
4
|
-
import { ButtonArrow as
|
|
1
|
+
import { jsxs as k, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import y from "classnames";
|
|
3
|
+
import { useState as C, useLayoutEffect as d, useCallback as b, useEffect as z } from "react";
|
|
4
|
+
import { ButtonArrow as v } from "../../../button-arrow/component.js";
|
|
5
5
|
import o from "./index.module.css.js";
|
|
6
|
-
const
|
|
6
|
+
const h = {
|
|
7
7
|
s: 488,
|
|
8
8
|
m: 888,
|
|
9
9
|
full: "96%"
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
t: b,
|
|
13
|
-
index: l,
|
|
14
|
-
dirtyModals: p,
|
|
15
|
-
closeModal: a,
|
|
16
|
-
currentModalId: r
|
|
17
|
-
}) => {
|
|
18
|
-
const c = -k[e.props.size] - 102, [w, f] = C(c);
|
|
10
|
+
}, j = ({ modal: e, t: l, index: p, dirtyModals: a, closeModal: f, currentModalId: r }) => {
|
|
11
|
+
const c = -h[e.props.size] - 102, [w, m] = C(c);
|
|
19
12
|
d(() => {
|
|
20
|
-
setTimeout(() =>
|
|
13
|
+
setTimeout(() => m(0), 0);
|
|
21
14
|
}, []);
|
|
22
|
-
const
|
|
15
|
+
const u = b(
|
|
23
16
|
(s) => (
|
|
24
17
|
// eslint-disable-next-line no-restricted-globals
|
|
25
|
-
!
|
|
18
|
+
!a[s] || confirm(l("common:exitConfirm"))
|
|
26
19
|
),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
|
+
[a, l]
|
|
22
|
+
), t = b(
|
|
23
|
+
(s) => {
|
|
24
|
+
const { id: i } = e;
|
|
25
|
+
u(s || i) && (m(c), setTimeout(() => {
|
|
26
|
+
e.props.closeCallback && e.props.closeCallback(), f(s || i);
|
|
27
|
+
}, 250));
|
|
28
|
+
},
|
|
29
|
+
[f, u, e, c]
|
|
30
|
+
);
|
|
34
31
|
return z(() => {
|
|
35
32
|
const s = (i) => {
|
|
36
33
|
(i.key === "27" || i.key === "Escape") && t(r);
|
|
@@ -38,27 +35,27 @@ const k = {
|
|
|
38
35
|
return e.id === r && window?.addEventListener("keydown", s), () => {
|
|
39
36
|
window?.removeEventListener("keydown", s);
|
|
40
37
|
};
|
|
41
|
-
}, [t, r, e.id]), /* @__PURE__ */
|
|
38
|
+
}, [t, r, e.id]), /* @__PURE__ */ k(
|
|
42
39
|
"div",
|
|
43
40
|
{
|
|
44
41
|
className: o.container,
|
|
45
42
|
style: {
|
|
46
|
-
zIndex: 9999998 +
|
|
43
|
+
zIndex: 9999998 + p
|
|
47
44
|
},
|
|
48
45
|
children: [
|
|
49
46
|
/* @__PURE__ */ n(
|
|
50
47
|
"div",
|
|
51
48
|
{
|
|
52
|
-
className:
|
|
49
|
+
className: y(o.right, o.content),
|
|
53
50
|
style: {
|
|
54
|
-
zIndex: 9999999 +
|
|
55
|
-
width:
|
|
51
|
+
zIndex: 9999999 + p,
|
|
52
|
+
width: h[e.props.size],
|
|
56
53
|
right: w
|
|
57
54
|
},
|
|
58
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ k("div", { className: o.inner, children: [
|
|
59
56
|
/* @__PURE__ */ n(e.modal, { ...e.props, close: () => t() }),
|
|
60
57
|
e.props.showCloser !== !1 && /* @__PURE__ */ n(
|
|
61
|
-
|
|
58
|
+
v,
|
|
62
59
|
{
|
|
63
60
|
className: o.button,
|
|
64
61
|
size: "s",
|
|
@@ -80,8 +77,8 @@ const k = {
|
|
|
80
77
|
)
|
|
81
78
|
]
|
|
82
79
|
}
|
|
83
|
-
)
|
|
80
|
+
);
|
|
84
81
|
};
|
|
85
82
|
export {
|
|
86
|
-
|
|
83
|
+
j as Modal
|
|
87
84
|
};
|
package/dist/modal/context.js
CHANGED
|
@@ -11,14 +11,7 @@ const u = M.createContext({
|
|
|
11
11
|
setModalDirty: () => {
|
|
12
12
|
}
|
|
13
13
|
}), h = ({ children: l, t: i, portal: o }) => {
|
|
14
|
-
const {
|
|
15
|
-
modals: r,
|
|
16
|
-
openModal: t,
|
|
17
|
-
setModalDirty: d,
|
|
18
|
-
currentModalId: e,
|
|
19
|
-
dirtyModals: n,
|
|
20
|
-
closeModal: s
|
|
21
|
-
} = f(i);
|
|
14
|
+
const { modals: r, openModal: t, setModalDirty: d, currentModalId: e, dirtyModals: n, closeModal: s } = f(i);
|
|
22
15
|
return /* @__PURE__ */ m(
|
|
23
16
|
u.Provider,
|
|
24
17
|
{
|
|
@@ -29,7 +22,17 @@ const u = M.createContext({
|
|
|
29
22
|
currentModalId: e
|
|
30
23
|
},
|
|
31
24
|
children: [
|
|
32
|
-
/* @__PURE__ */ a(c, { getPortalContainer: o ? () => o : void 0, children: /* @__PURE__ */ a(
|
|
25
|
+
/* @__PURE__ */ a(c, { getPortalContainer: o ? () => o : void 0, children: /* @__PURE__ */ a(
|
|
26
|
+
p,
|
|
27
|
+
{
|
|
28
|
+
modals: r,
|
|
29
|
+
dirtyModals: n,
|
|
30
|
+
closeModal: s,
|
|
31
|
+
openModal: t,
|
|
32
|
+
setModalDirty: d,
|
|
33
|
+
currentModalId: e
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
33
36
|
l
|
|
34
37
|
]
|
|
35
38
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ModalObject, ModalSize, OwnModalProps, TFunction } from '../types';
|
|
3
3
|
export declare const useModal: (t: TFunction) => {
|
|
4
|
-
openModal: <T
|
|
4
|
+
openModal: <T>(modal: React.FC<T>, size?: ModalSize, showCloser?: boolean) => (props?: OwnModalProps<T>, closeCallback?: () => void) => void;
|
|
5
5
|
modals: ModalObject[];
|
|
6
6
|
setModalDirty: (id: string, isDirty: boolean) => void;
|
|
7
7
|
currentModalId: string;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import n, {
|
|
2
|
-
import { v4 as
|
|
1
|
+
import n, { useCallback as I, useEffect as S } from "react";
|
|
2
|
+
import { v4 as b } from "uuid";
|
|
3
3
|
import { deletePropertyById as g } from "../utils/delete-property-by-id.js";
|
|
4
4
|
const x = (c) => {
|
|
5
|
-
const [
|
|
5
|
+
const [r, l] = n.useState([]), [u, M] = n.useState(""), [p, a] = n.useState({}), f = (t) => {
|
|
6
6
|
a((o) => g(o, t)), l((o) => o.filter((e) => e.id !== t));
|
|
7
|
-
},
|
|
7
|
+
}, i = (t) => {
|
|
8
8
|
l((o) => [...o, t]);
|
|
9
|
-
},
|
|
10
|
-
a((e) =>
|
|
9
|
+
}, m = I((t, o) => {
|
|
10
|
+
t && a((e) => e[t] === o ? e : {
|
|
11
11
|
...e,
|
|
12
12
|
[t]: o
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
return
|
|
16
|
-
const t = [...
|
|
17
|
-
M(t || ""), document.body.style.overflow =
|
|
18
|
-
}, [
|
|
13
|
+
});
|
|
14
|
+
}, []);
|
|
15
|
+
return S(() => {
|
|
16
|
+
const t = [...r].pop()?.id;
|
|
17
|
+
M(t || ""), document.body.style.overflow = r.length ? "hidden" : "unset";
|
|
18
|
+
}, [r]), {
|
|
19
19
|
openModal: (t, o = "s", e = !0) => {
|
|
20
|
-
const y = (
|
|
21
|
-
id:
|
|
20
|
+
const y = (s, d) => ({
|
|
21
|
+
id: b(),
|
|
22
22
|
modal: t,
|
|
23
23
|
props: {
|
|
24
24
|
size: o,
|
|
25
25
|
showCloser: e,
|
|
26
|
-
closeCallback:
|
|
26
|
+
closeCallback: d,
|
|
27
27
|
t: c,
|
|
28
|
-
...
|
|
28
|
+
...s
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
return (
|
|
32
|
-
|
|
31
|
+
return (s, d) => {
|
|
32
|
+
i(y(s, d));
|
|
33
33
|
};
|
|
34
34
|
},
|
|
35
|
-
modals:
|
|
36
|
-
setModalDirty:
|
|
35
|
+
modals: r,
|
|
36
|
+
setModalDirty: m,
|
|
37
37
|
currentModalId: u,
|
|
38
|
-
dirtyModals:
|
|
39
|
-
closeModal:
|
|
38
|
+
dirtyModals: p,
|
|
39
|
+
closeModal: f
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
export {
|
package/dist/mq/component.js
CHANGED
|
@@ -2,12 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect as m, Fragment as p } from "react";
|
|
3
3
|
import { useMatchMedia as u } from "./use-match-media.js";
|
|
4
4
|
import { isPointerEventsSupported as f, isTouchSupported as d } from "./utils.js";
|
|
5
|
-
const e = typeof window < "u", S = e && (f() || d()), R = ({
|
|
6
|
-
children: i,
|
|
7
|
-
query: s = "",
|
|
8
|
-
touch: r,
|
|
9
|
-
onMatchChange: t
|
|
10
|
-
}) => {
|
|
5
|
+
const e = typeof window < "u", S = e && (f() || d()), R = ({ children: i, query: s = "", touch: r, onMatchChange: t }) => {
|
|
11
6
|
const [c] = u(s), o = (r === void 0 ? !0 : r === S) && (!s || c);
|
|
12
7
|
return m(() => {
|
|
13
8
|
t && t(o);
|