@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,13 +1,13 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import L from "react
|
|
4
|
-
import
|
|
5
|
-
import q from "
|
|
2
|
+
import F from "classnames";
|
|
3
|
+
import { forwardRef as G, useRef as u, useState as L, useCallback as r, useEffect as R } from "react";
|
|
4
|
+
import M from "react-merge-refs";
|
|
5
|
+
import { useSwipeable as U, LEFT as V, RIGHT as $, UP as q } from "react-swipeable";
|
|
6
6
|
import { Portal as z } from "../portal/component.js";
|
|
7
7
|
import { ToastPlate as B } from "../toast-plate/component.js";
|
|
8
|
-
import { useClickOutside as J } from "./utils/index.js";
|
|
9
8
|
import i from "./index.module.css.js";
|
|
10
|
-
|
|
9
|
+
import { useClickOutside as J } from "./utils/index.js";
|
|
10
|
+
const K = `.${i.notificationComponent}`, v = G(
|
|
11
11
|
({
|
|
12
12
|
className: g,
|
|
13
13
|
children: h,
|
|
@@ -23,7 +23,7 @@ const K = `.${i.notificationComponent}`, v = F(
|
|
|
23
23
|
style: P,
|
|
24
24
|
...k
|
|
25
25
|
}, x) => {
|
|
26
|
-
const d = u(null), T = u(0), w = u(0), [A, C] =
|
|
26
|
+
const d = u(null), T = u(0), w = u(0), [A, C] = L(!1), s = r(() => {
|
|
27
27
|
T.current = window.setTimeout(() => {
|
|
28
28
|
c && c();
|
|
29
29
|
}, p);
|
|
@@ -50,15 +50,17 @@ const K = `.${i.notificationComponent}`, v = F(
|
|
|
50
50
|
[f, s, o]
|
|
51
51
|
), I = r(
|
|
52
52
|
(t) => {
|
|
53
|
-
const y = !!t.target.closest(
|
|
53
|
+
const y = !!t.target.closest(
|
|
54
|
+
K
|
|
55
|
+
);
|
|
54
56
|
m && e && !y && m(t);
|
|
55
57
|
},
|
|
56
58
|
[m, e]
|
|
57
59
|
);
|
|
58
60
|
J(d, I);
|
|
59
|
-
const j =
|
|
61
|
+
const j = U({
|
|
60
62
|
onSwiped: ({ dir: t }) => {
|
|
61
|
-
n && [
|
|
63
|
+
n && [V, $, q].includes(t) && (C(!0), w.current = window.setTimeout(() => {
|
|
62
64
|
C(!1), n();
|
|
63
65
|
}, 100));
|
|
64
66
|
},
|
|
@@ -68,7 +70,7 @@ const K = `.${i.notificationComponent}`, v = F(
|
|
|
68
70
|
return /* @__PURE__ */ l(z, { children: /* @__PURE__ */ l("div", { ...j, children: /* @__PURE__ */ l(
|
|
69
71
|
B,
|
|
70
72
|
{
|
|
71
|
-
className:
|
|
73
|
+
className: F(
|
|
72
74
|
i.notificationComponent,
|
|
73
75
|
{
|
|
74
76
|
[i.isVisible]: e,
|
|
@@ -83,7 +85,7 @@ const K = `.${i.notificationComponent}`, v = F(
|
|
|
83
85
|
},
|
|
84
86
|
onMouseEnter: E,
|
|
85
87
|
onMouseLeave: H,
|
|
86
|
-
ref:
|
|
88
|
+
ref: M([x, d]),
|
|
87
89
|
role: e ? "alert" : void 0,
|
|
88
90
|
hasCloser: S,
|
|
89
91
|
onClose: n,
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import e from "./index.module.css.js";
|
|
3
|
-
const n = ({
|
|
4
|
-
children: r,
|
|
5
|
-
color: i,
|
|
6
|
-
image: a,
|
|
7
|
-
imageDescription: t
|
|
8
|
-
}) => /* @__PURE__ */ o("div", { style: { backgroundColor: i }, className: e.pageContainer, children: [
|
|
3
|
+
const n = ({ children: r, color: i, image: a, imageDescription: t }) => /* @__PURE__ */ o("div", { style: { backgroundColor: i }, className: e.pageContainer, children: [
|
|
9
4
|
a && /* @__PURE__ */ o("section", { children: [
|
|
10
5
|
/* @__PURE__ */ s("img", { className: e.image, src: a, alt: t }),
|
|
11
6
|
/* @__PURE__ */ s("div", { className: e.bg })
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const PageLoading: () => React.JSX.Element;
|
|
1
|
+
export declare const PageLoading: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Button as n } from "../button/component.js";
|
|
3
|
-
import { FlexColumns as
|
|
3
|
+
import { FlexColumns as l } from "../flex-columns/component.js";
|
|
4
4
|
import { Grid as o } from "../grid/component.js";
|
|
5
5
|
import { Typography as s } from "../typography/component.js";
|
|
6
|
-
const f = ({
|
|
7
|
-
children: l,
|
|
8
|
-
|
|
9
|
-
}) => /* @__PURE__ */ h(o.Row, { children: [
|
|
10
|
-
/* @__PURE__ */ r(o.Col, { width: 7, children: /* @__PURE__ */ r(i, { columns: 1, gr: 32, children: l }) }),
|
|
11
|
-
/* @__PURE__ */ r(o.Col, { width: 4, offset: 1, children: /* @__PURE__ */ r(i, { columns: 1, gr: 16, children: t.map(({ text: m, ...e }) => /* @__PURE__ */ r(n, { view: "ghost", ...e, children: /* @__PURE__ */ r(s.Title, { tag: "div", view: "xxsmall", color: "primary", weight: "regular", children: m }) })) }) })
|
|
6
|
+
const f = ({ children: m, buttons: t }) => /* @__PURE__ */ h(o.Row, { children: [
|
|
7
|
+
/* @__PURE__ */ r(o.Col, { width: 7, children: /* @__PURE__ */ r(l, { columns: 1, gr: 32, children: m }) }),
|
|
8
|
+
/* @__PURE__ */ r(o.Col, { width: 4, offset: 1, children: /* @__PURE__ */ r(l, { columns: 1, gr: 16, children: t.map(({ text: i, ...e }) => /* @__PURE__ */ r(n, { view: "ghost", ...e, children: /* @__PURE__ */ r(s.Title, { tag: "div", view: "xxsmall", color: "primary", weight: "regular", children: i }) }, i)) }) })
|
|
12
9
|
] });
|
|
13
10
|
export {
|
|
14
11
|
f as PageWithControls
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import s from "
|
|
2
|
+
import l from "classnames";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
4
|
import { Typography as t } from "../../../typography/component.js";
|
|
5
5
|
import n from "./index.module.css.js";
|
|
6
|
-
const u =
|
|
7
|
-
label: e,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
const u = s(
|
|
7
|
+
({ label: e, value: o, id: i, className: m, onClick: p }, a) => /* @__PURE__ */ c(
|
|
8
|
+
"button",
|
|
9
|
+
{
|
|
10
|
+
className: l(n.wrapper, m),
|
|
11
|
+
ref: a,
|
|
12
|
+
id: i,
|
|
13
|
+
type: "button",
|
|
14
|
+
onClick: p,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ r(t.Text, { view: "caps", weight: "medium", color: "tertiary", children: e }),
|
|
17
|
+
/* @__PURE__ */ r(t.Text, { view: "title", weight: "medium", color: "primary", children: o })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
);
|
|
16
22
|
export {
|
|
17
23
|
u as LabeledButton
|
|
18
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import a from "
|
|
2
|
+
import d from "classnames";
|
|
3
|
+
import { forwardRef as a } from "react";
|
|
4
4
|
import "../select/component.js";
|
|
5
5
|
import { BaseSelect as g } from "../select/components/base-select/component.js";
|
|
6
6
|
import "../form-control/component.js";
|
|
@@ -10,9 +10,9 @@ import { OptionsList as S } from "../select/components/options-list/component.js
|
|
|
10
10
|
import "react-virtual";
|
|
11
11
|
import "../toast-notifier/component.js";
|
|
12
12
|
import "intersection-observer";
|
|
13
|
-
import { Field as b } from "./field/
|
|
13
|
+
import { Field as b } from "./field/component.js";
|
|
14
14
|
import x from "./index.module.css.js";
|
|
15
|
-
const D =
|
|
15
|
+
const D = a(
|
|
16
16
|
({
|
|
17
17
|
OptionsList: t,
|
|
18
18
|
Optgroup: r,
|
|
@@ -45,7 +45,7 @@ const D = d(
|
|
|
45
45
|
},
|
|
46
46
|
Optgroup: r || F,
|
|
47
47
|
OptionsList: t || S,
|
|
48
|
-
className:
|
|
48
|
+
className: d(x.container, s),
|
|
49
49
|
selected: [],
|
|
50
50
|
closeOnSelect: !0
|
|
51
51
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ButtonProps } from '../../button';
|
|
3
2
|
import { SelectFieldProps as BaseFieldProps } from '../../select';
|
|
4
3
|
import { PickerButtonSize } from '..';
|
|
@@ -7,5 +6,5 @@ type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | '
|
|
|
7
6
|
icon?: any;
|
|
8
7
|
fieldComponent?: 'button' | 'iconButton';
|
|
9
8
|
};
|
|
10
|
-
export declare const Field: ({ buttonSize, view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, valueRenderer, fieldComponent, ...restProps }: FieldProps) =>
|
|
9
|
+
export declare const Field: ({ buttonSize, view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, valueRenderer, fieldComponent, ...restProps }: FieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './component';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { LabeledButton as e } from "./common/labeled-button/index.js";
|
|
2
|
+
import { PickerButton as f } from "./component.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
e as LabeledButton,
|
|
5
|
+
f as PickerButton
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React, CSSProperties, MutableRefObject } from 'react';
|
|
2
1
|
import { Placement } from '@floating-ui/react-dom';
|
|
2
|
+
import { default as React, CSSProperties, MutableRefObject } from 'react';
|
|
3
3
|
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
4
4
|
export type Position = Placement;
|
|
5
5
|
export type PopoverProps = {
|
|
@@ -13,7 +13,7 @@ export type PopoverProps = {
|
|
|
13
13
|
popperClassName?: string;
|
|
14
14
|
arrowClassName?: string;
|
|
15
15
|
getPortalContainer?: () => HTMLElement;
|
|
16
|
-
transition?: CSSTransitionProps
|
|
16
|
+
transition?: Omit<CSSTransitionProps<HTMLDivElement>, 'children' | 'nodeRef'>;
|
|
17
17
|
transitionDuration?: CSSProperties['transitionDuration'];
|
|
18
18
|
withTransition?: boolean;
|
|
19
19
|
dataTestId?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { offset as L, flip as P, shift as U, arrow as z, useFloating as V, autoUpdate as q } from "@floating-ui/react-dom";
|
|
3
|
+
import c from "classnames";
|
|
4
|
+
import { useRef as g, useMemo as N, useEffect as B, useCallback as G } from "react";
|
|
4
5
|
import { CSSTransition as H } from "react-transition-group";
|
|
5
|
-
import m from "classnames";
|
|
6
6
|
import { Portal as J } from "../portal/component.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Stack as K } from "../stack/component.js";
|
|
8
|
+
import { stackingOrder as Q } from "../stack/context.js";
|
|
9
9
|
import e from "./index.module.css.js";
|
|
10
10
|
const W = {
|
|
11
11
|
timeout: 150
|
|
@@ -14,99 +14,97 @@ const W = {
|
|
|
14
14
|
enterActive: e.enterActive,
|
|
15
15
|
exit: e.exit,
|
|
16
16
|
exitActive: e.exitActive
|
|
17
|
-
}, Y = {
|
|
17
|
+
}, Y = H, Z = {
|
|
18
18
|
top: "bottom",
|
|
19
19
|
right: "left",
|
|
20
20
|
bottom: "top",
|
|
21
21
|
left: "right"
|
|
22
|
-
},
|
|
23
|
-
children:
|
|
24
|
-
getPortalContainer:
|
|
25
|
-
transition:
|
|
26
|
-
anchorElement:
|
|
27
|
-
offset:
|
|
28
|
-
withArrow:
|
|
29
|
-
withTransition:
|
|
30
|
-
position:
|
|
31
|
-
preventFlip:
|
|
32
|
-
popperClassName:
|
|
33
|
-
arrowClassName:
|
|
34
|
-
className:
|
|
35
|
-
open:
|
|
22
|
+
}, ct = ({
|
|
23
|
+
children: R,
|
|
24
|
+
getPortalContainer: b,
|
|
25
|
+
transition: m = W,
|
|
26
|
+
anchorElement: A,
|
|
27
|
+
offset: n = [0, 0],
|
|
28
|
+
withArrow: o = !1,
|
|
29
|
+
withTransition: T = !0,
|
|
30
|
+
position: h = "left",
|
|
31
|
+
preventFlip: f,
|
|
32
|
+
popperClassName: y,
|
|
33
|
+
arrowClassName: E,
|
|
34
|
+
className: O,
|
|
35
|
+
open: i,
|
|
36
36
|
dataTestId: C,
|
|
37
37
|
update: l,
|
|
38
|
-
transitionDuration: F = `${
|
|
39
|
-
zIndex:
|
|
38
|
+
transitionDuration: F = `${m.timeout}ms`,
|
|
39
|
+
zIndex: I = Q.POPOVER
|
|
40
40
|
}) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
const d = g(null), u = g(null), M = N(
|
|
42
|
+
() => [
|
|
43
|
+
L({
|
|
44
|
+
crossAxis: n[0],
|
|
45
|
+
mainAxis: n[1]
|
|
46
|
+
}),
|
|
47
|
+
...f ? [] : [P()],
|
|
48
|
+
U({ padding: 4 }),
|
|
49
|
+
...o ? [z({ element: d })] : []
|
|
50
|
+
],
|
|
51
|
+
[n[0], n[1], f, o]
|
|
52
|
+
), {
|
|
53
|
+
refs: { setFloating: p },
|
|
54
|
+
floatingStyles: _,
|
|
55
|
+
middlewareData: a,
|
|
56
|
+
placement: x,
|
|
57
|
+
update: S
|
|
58
|
+
} = V({
|
|
59
|
+
placement: h,
|
|
60
|
+
open: i,
|
|
61
|
+
elements: { reference: A },
|
|
62
|
+
whileElementsMounted: i ? q : void 0,
|
|
63
|
+
middleware: M
|
|
62
64
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
o();
|
|
69
|
-
}, [o, f]);
|
|
70
|
-
const M = D(() => {
|
|
71
|
-
if (!s || !c.arrow)
|
|
65
|
+
B(() => {
|
|
66
|
+
l && (l.current = S);
|
|
67
|
+
}, [S, l]);
|
|
68
|
+
const k = N(() => {
|
|
69
|
+
if (!o || !a.arrow)
|
|
72
70
|
return {};
|
|
73
|
-
const { x: t, y:
|
|
71
|
+
const { x: t, y: s } = a.arrow, j = x.split("-")[0], w = Z[j] ?? "bottom";
|
|
74
72
|
return {
|
|
75
73
|
position: "absolute",
|
|
76
74
|
left: t != null ? `${t}px` : void 0,
|
|
77
|
-
top:
|
|
75
|
+
top: s != null ? `${s}px` : void 0,
|
|
78
76
|
right: "",
|
|
79
77
|
bottom: "",
|
|
80
|
-
[
|
|
78
|
+
[w]: "-4px"
|
|
81
79
|
};
|
|
82
|
-
}, [
|
|
80
|
+
}, [o, a.arrow, x]), $ = G(
|
|
83
81
|
(t) => {
|
|
84
|
-
|
|
82
|
+
u.current = t, p(t);
|
|
85
83
|
},
|
|
86
|
-
[
|
|
87
|
-
),
|
|
84
|
+
[p]
|
|
85
|
+
), v = (t, s) => /* @__PURE__ */ r(
|
|
88
86
|
"div",
|
|
89
87
|
{
|
|
90
|
-
ref:
|
|
88
|
+
ref: $,
|
|
91
89
|
style: {
|
|
92
90
|
zIndex: t,
|
|
93
|
-
...
|
|
91
|
+
..._
|
|
94
92
|
},
|
|
95
|
-
className:
|
|
96
|
-
children: /* @__PURE__ */
|
|
93
|
+
className: c(e.component, O),
|
|
94
|
+
children: /* @__PURE__ */ D(
|
|
97
95
|
"div",
|
|
98
96
|
{
|
|
99
97
|
"data-test-id": C,
|
|
100
|
-
className:
|
|
101
|
-
style:
|
|
98
|
+
className: c(e.inner, y),
|
|
99
|
+
style: s,
|
|
102
100
|
children: [
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
R,
|
|
102
|
+
o && /* @__PURE__ */ r(
|
|
105
103
|
"div",
|
|
106
104
|
{
|
|
107
|
-
ref:
|
|
108
|
-
style:
|
|
109
|
-
className:
|
|
105
|
+
ref: d,
|
|
106
|
+
style: k,
|
|
107
|
+
className: c(e.arrow, E)
|
|
110
108
|
}
|
|
111
109
|
)
|
|
112
110
|
]
|
|
@@ -114,18 +112,18 @@ const W = {
|
|
|
114
112
|
)
|
|
115
113
|
}
|
|
116
114
|
);
|
|
117
|
-
return /* @__PURE__ */ r(
|
|
118
|
-
|
|
115
|
+
return /* @__PURE__ */ r(K, { value: I, children: (t) => /* @__PURE__ */ r(J, { getPortalContainer: b, children: T ? /* @__PURE__ */ r(
|
|
116
|
+
Y,
|
|
119
117
|
{
|
|
120
118
|
unmountOnExit: !0,
|
|
121
119
|
classNames: X,
|
|
122
|
-
...
|
|
123
|
-
in:
|
|
124
|
-
nodeRef:
|
|
125
|
-
children:
|
|
120
|
+
...m,
|
|
121
|
+
in: i,
|
|
122
|
+
nodeRef: u,
|
|
123
|
+
children: v(t, { transitionDuration: F })
|
|
126
124
|
}
|
|
127
|
-
) :
|
|
125
|
+
) : i && v(t) }) });
|
|
128
126
|
};
|
|
129
127
|
export {
|
|
130
|
-
|
|
128
|
+
ct as Popover
|
|
131
129
|
};
|
package/dist/radio/component.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import j from "react
|
|
4
|
-
import w from "
|
|
2
|
+
import x from "classnames";
|
|
3
|
+
import { forwardRef as y, useRef as j } from "react";
|
|
4
|
+
import w from "react-merge-refs";
|
|
5
5
|
import { useFocus as C } from "../hooks/useFocus/index.js";
|
|
6
6
|
import e from "./index.module.css.js";
|
|
7
|
-
const E =
|
|
7
|
+
const E = y(
|
|
8
8
|
({
|
|
9
9
|
onChange: r,
|
|
10
10
|
className: d,
|
|
@@ -20,7 +20,7 @@ const E = x(
|
|
|
20
20
|
block: N,
|
|
21
21
|
...b
|
|
22
22
|
}, R) => {
|
|
23
|
-
const t =
|
|
23
|
+
const t = j(null), [k] = C(t, "keyboard"), g = (m) => {
|
|
24
24
|
r && r(m, { checked: m.target.checked, name: a });
|
|
25
25
|
};
|
|
26
26
|
return (
|
|
@@ -28,13 +28,13 @@ const E = x(
|
|
|
28
28
|
/* @__PURE__ */ i(
|
|
29
29
|
"label",
|
|
30
30
|
{
|
|
31
|
-
className:
|
|
31
|
+
className: x(e.container, e[h], e[u], d, {
|
|
32
32
|
[e.disabled]: c,
|
|
33
33
|
[e.checked]: o,
|
|
34
34
|
[e.focused]: k,
|
|
35
35
|
[e.block]: N
|
|
36
36
|
}),
|
|
37
|
-
ref:
|
|
37
|
+
ref: w([t, R]),
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ s(
|
|
40
40
|
"input",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
type Child = {
|
|
3
2
|
id: number;
|
|
4
3
|
title: string;
|
|
@@ -15,5 +14,5 @@ export interface RadioGroupsProps {
|
|
|
15
14
|
collapsable?: boolean;
|
|
16
15
|
onChange: (value: number) => void;
|
|
17
16
|
}
|
|
18
|
-
export declare const RadioGroups: ({ parents, childs, selected, collapsable, onChange, }: RadioGroupsProps) =>
|
|
17
|
+
export declare const RadioGroups: ({ parents, childs, selected, collapsable, onChange, }: RadioGroupsProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import g
|
|
3
|
-
import
|
|
4
|
-
import y from "
|
|
2
|
+
import g from "@alphakits/icons/dist/ChevronDownS";
|
|
3
|
+
import x from "classnames";
|
|
4
|
+
import v, { useState as y } from "react";
|
|
5
5
|
import { Collapse as b } from "../collapse/component.js";
|
|
6
6
|
import { Divider as w } from "../divider/component.js";
|
|
7
7
|
import { FlexColumns as _ } from "../flex-columns/component.js";
|
|
@@ -28,11 +28,11 @@ const P = ({
|
|
|
28
28
|
e.locationId === o.id && (r.parent = o, r.childs.push(e));
|
|
29
29
|
}), r.parent.id && n.push(r);
|
|
30
30
|
});
|
|
31
|
-
const [l, u] =
|
|
31
|
+
const [l, u] = y(n), C = (o) => {
|
|
32
32
|
const r = l.map((i, a) => (a === o && (i.collapsed ? i.collapsed = !1 : i.collapsed = !0), i)), e = l.concat(r);
|
|
33
33
|
u(e.filter((i, a) => e.indexOf(i) === a));
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ t("div", { children: l.map((o, r) => /* @__PURE__ */ c(
|
|
35
|
+
return /* @__PURE__ */ t("div", { children: l.map((o, r) => /* @__PURE__ */ c(v.Fragment, { children: [
|
|
36
36
|
/* @__PURE__ */ c("div", { className: s.list_head, children: [
|
|
37
37
|
/* @__PURE__ */ t(S.Text, { view: "title", color: "primary", weight: "medium", children: o.parent.title }),
|
|
38
38
|
f && /* @__PURE__ */ t(
|
|
@@ -40,8 +40,10 @@ const P = ({
|
|
|
40
40
|
{
|
|
41
41
|
onClick: () => C(r),
|
|
42
42
|
size: "s",
|
|
43
|
-
className:
|
|
44
|
-
|
|
43
|
+
className: x(s.collapse_btn, {
|
|
44
|
+
[s.collapse_btn_collapsed]: o.collapsed
|
|
45
|
+
}),
|
|
46
|
+
icon: g
|
|
45
47
|
}
|
|
46
48
|
)
|
|
47
49
|
] }),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { FormControlProps } from '../form-control';
|
|
3
2
|
import { BaseSelectProps } from './typings';
|
|
4
3
|
export type SelectProps = Omit<BaseSelectProps, 'fieldProps'> & {
|
|
5
4
|
fieldProps?: FormControlProps & Record<string, unknown>;
|
|
6
5
|
showSearch?: boolean;
|
|
7
6
|
};
|
|
8
|
-
export declare const Select:
|
|
9
|
-
fieldProps?: (
|
|
7
|
+
export declare const Select: import('react').ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
|
|
8
|
+
fieldProps?: (import('react').HTMLAttributes<HTMLDivElement> & {
|
|
10
9
|
block?: boolean | undefined;
|
|
11
10
|
size?: "s" | "xs" | "m" | "l" | "xl" | undefined;
|
|
12
11
|
disabled?: boolean | undefined;
|
|
@@ -15,16 +14,16 @@ export declare const Select: React.ForwardRefExoticComponent<Omit<BaseSelectProp
|
|
|
15
14
|
error?: string | boolean | undefined;
|
|
16
15
|
hint?: string | undefined;
|
|
17
16
|
required?: boolean | undefined;
|
|
18
|
-
label?:
|
|
19
|
-
leftAddons?:
|
|
20
|
-
rightAddons?:
|
|
21
|
-
bottomAddons?:
|
|
17
|
+
label?: import('react').ReactNode;
|
|
18
|
+
leftAddons?: import('react').ReactNode;
|
|
19
|
+
rightAddons?: import('react').ReactNode;
|
|
20
|
+
bottomAddons?: import('react').ReactNode;
|
|
22
21
|
className?: string | undefined;
|
|
23
22
|
fieldClassName?: string | undefined;
|
|
24
23
|
labelClassName?: string | undefined;
|
|
25
24
|
addonsClassName?: string | undefined;
|
|
26
25
|
dataTestId?: string | undefined;
|
|
27
|
-
children?:
|
|
26
|
+
children?: import('react').ReactNode;
|
|
28
27
|
} & Record<string, unknown>) | undefined;
|
|
29
28
|
showSearch?: boolean | undefined;
|
|
30
|
-
} &
|
|
29
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/select/component.js
CHANGED
|
@@ -8,15 +8,7 @@ import { Option as l } from "./components/option/component.js";
|
|
|
8
8
|
import { OptionsList as c } from "./components/options-list/component.js";
|
|
9
9
|
import { SelectSearch as w } from "./components/select-search/index.js";
|
|
10
10
|
const R = S(
|
|
11
|
-
({
|
|
12
|
-
Arrow: r,
|
|
13
|
-
Field: t,
|
|
14
|
-
OptionsList: i,
|
|
15
|
-
Optgroup: p,
|
|
16
|
-
Option: m,
|
|
17
|
-
showSearch: s,
|
|
18
|
-
...o
|
|
19
|
-
}, u) => o.options?.length > 8 || s ? /* @__PURE__ */ e(
|
|
11
|
+
({ Arrow: r, Field: t, OptionsList: i, Optgroup: p, Option: m, showSearch: s, ...o }, u) => o.options?.length > 8 || s ? /* @__PURE__ */ e(
|
|
20
12
|
w,
|
|
21
13
|
{
|
|
22
14
|
Option: m || l,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ArrowProps } from '../../typings';
|
|
3
|
-
export declare const Arrow: ({ open, className }: ArrowProps) =>
|
|
2
|
+
export declare const Arrow: ({ open, className }: ArrowProps) => import("react/jsx-runtime").JSX.Element;
|