@alphakits/ui 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__internal/utils/index.d.ts +1 -1
- package/dist/__internal/utils/index.js +4 -4
- package/dist/amount-input/component.js +41 -41
- package/dist/avatar/component.js +2 -18
- package/dist/badge/component.d.ts +1 -1
- package/dist/base-card/component.js +1 -7
- package/dist/bottom-sheet/component.d.ts +1 -1
- package/dist/bottom-sheet/component.js +9 -13
- package/dist/box/component.d.ts +2 -2
- package/dist/box/component.js +4 -4
- package/dist/button/component.js +9 -9
- package/dist/button-arrow/component.js +6 -1
- package/dist/calendar/component.d.ts +1 -2
- package/dist/calendar/component.js +77 -74
- package/dist/calendar/components/days-table/component.js +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 +51 -56
- package/dist/form/templates/rest-form/index.d.ts +3 -3
- package/dist/form/templates/rest-form/index.js +16 -27
- package/dist/form/utils/get-default-values.js +3 -6
- package/dist/form/utils/remove-undefined-from-object.js +1 -3
- package/dist/form-control/component.js +1 -1
- package/dist/formik/index.d.ts +2 -2
- package/dist/header-search/component.js +1 -6
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +10 -10
- package/dist/hooks/use-get-one/index.js +16 -16
- package/dist/icon-button/component.d.ts +3 -3
- package/dist/icon-button/component.js +2 -8
- package/dist/image/component.js +52 -30
- package/dist/image/image-base.js +1 -7
- package/dist/image/use-image-render-component.d.ts +1 -1
- package/dist/image/use-image-render-component.js +11 -14
- package/dist/image-gallery/component.js +40 -45
- package/dist/image-uploader/component.js +56 -53
- package/dist/index.js +41 -41
- package/dist/info-block-wrapper/component.d.ts +1 -1
- package/dist/input/component.js +1 -1
- package/dist/input-autocomplete/autocomplete-field/index.d.ts +1 -2
- package/dist/input-autocomplete/autocomplete-field/index.js +6 -6
- package/dist/input-autocomplete/component.d.ts +26 -26
- package/dist/input-ghost/component.d.ts +1 -1
- package/dist/link/component.d.ts +2 -2
- package/dist/link/component.js +1 -1
- package/dist/loader/component.js +6 -5
- package/dist/masked-input/component.js +7 -16
- package/dist/menu/component.js +12 -17
- package/dist/menu/components/content-header/index.js +1 -9
- package/dist/menu/components/menu-avatar/index.js +1 -6
- package/dist/menu/components/menu-button/index.js +1 -10
- package/dist/menu/components/menu-buttons-list/index.d.ts +1 -1
- package/dist/menu/components/menu-buttons-list/index.js +1 -7
- package/dist/menu/hooks/use-menu.js +12 -12
- package/dist/message/component.js +33 -14
- package/dist/modal/components/modals/modal.d.ts +1 -2
- package/dist/modal/components/modals/modal.js +30 -33
- package/dist/modal/context.js +12 -9
- package/dist/modal/hooks/use-modal.d.ts +1 -1
- package/dist/mq/component.js +1 -6
- package/dist/notification/component.js +14 -12
- package/dist/page-container/component.js +1 -6
- package/dist/page-loading/component.d.ts +1 -2
- package/dist/page-with-controls/component.js +4 -7
- package/dist/picker-button/common/labeled-button/index.js +18 -12
- package/dist/picker-button/component.js +5 -5
- package/dist/picker-button/field/{Component.d.ts → component.d.ts} +1 -2
- package/dist/picker-button/field/index.d.ts +1 -1
- package/dist/picker-button/field/index.js +1 -1
- package/dist/picker-button/index.d.ts +1 -1
- package/dist/picker-button/index.js +4 -4
- package/dist/popover/component.d.ts +2 -2
- package/dist/popover/component.js +56 -56
- package/dist/radio/component.js +7 -7
- package/dist/radio-groups/component.d.ts +1 -2
- package/dist/radio-groups/component.js +9 -7
- package/dist/select/component.d.ts +8 -9
- package/dist/select/component.js +1 -9
- package/dist/select/components/arrow/component.d.ts +1 -2
- package/dist/select/components/base-select/component.js +97 -90
- package/dist/select/components/checkmark/component.d.ts +1 -2
- package/dist/select/components/field/component.d.ts +1 -2
- package/dist/select/components/field/component.js +8 -5
- package/dist/select/components/native-select/component.js +4 -11
- package/dist/select/components/optgroup/component.d.ts +1 -2
- package/dist/select/components/optgroup/component.js +4 -4
- package/dist/select/components/option/component.js +1 -1
- package/dist/select/components/options-list/component.d.ts +1 -2
- package/dist/select/components/options-list/component.js +25 -23
- package/dist/select/components/select-search/index.d.ts +1 -1
- package/dist/select/components/select-search/index.js +28 -26
- package/dist/select/components/virtual-options-list/component.d.ts +1 -2
- package/dist/select/components/virtual-options-list/component.js +52 -45
- package/dist/select/index.js +4 -4
- package/dist/select/presets/index.d.ts +1 -1
- package/dist/select/presets/index.js +4 -4
- package/dist/select/presets/use-lazy-loading/index.d.ts +3 -4
- package/dist/select/presets/use-lazy-loading/index.js +45 -43
- package/dist/select/presets/use-select-with-loading/hook.d.ts +1 -2
- package/dist/select/presets/use-select-with-loading/hook.js +8 -1
- package/dist/select/utils.js +32 -32
- package/dist/sidepanel/component.js +21 -15
- package/dist/sidepanel-header/component.js +17 -16
- package/dist/skeleton/component.js +4 -4
- package/dist/space/component.d.ts +2 -2
- package/dist/space/component.js +42 -45
- package/dist/space/{Item.d.ts → item.d.ts} +2 -2
- package/dist/spinner/component.js +6 -5
- package/dist/stack/index.d.ts +1 -1
- package/dist/stack/index.js +5 -5
- package/dist/stepped-progress-bar/components/step-bar.js +3 -3
- package/dist/stepped-progress-bar/index.d.ts +2 -2
- package/dist/stepped-progress-bar/index.js +37 -22
- package/dist/sticker/component.js +1 -17
- package/dist/suffix-input/component.js +13 -13
- package/dist/switch/component.js +7 -7
- package/dist/table/components/cells/index.d.ts +1 -2
- package/dist/table/components/empty-list/index.d.ts +1 -2
- package/dist/table/components/error/index.d.ts +2 -3
- package/dist/table/components/error/index.js +1 -1
- package/dist/table/components/loading/index.d.ts +1 -1
- package/dist/table/components/loading/index.js +18 -12
- package/dist/table/components/pagination/index.js +56 -53
- package/dist/table/components/table-header/index.js +59 -56
- package/dist/table/hooks/use-table-data.js +63 -60
- package/dist/table/table.d.ts +1 -1
- package/dist/table/table.js +73 -73
- package/dist/table/types.d.ts +3 -3
- package/dist/table/utils/get-query-from-url.js +1 -8
- package/dist/table/utils/get-tags.d.ts +1 -1
- package/dist/table/utils/get-tags.js +9 -12
- package/dist/table/utils/index.d.ts +1 -1
- package/dist/table/utils/index.js +4 -4
- package/dist/table/utils/parse-query-params.js +5 -1
- package/dist/table/utils/prepare-rows.d.ts +1 -2
- package/dist/table/utils/prepare-rows.js +4 -3
- package/dist/table/utils/query-adapter.d.ts +1 -1
- package/dist/table/utils/query-adapter.js +5 -5
- package/dist/table/utils/remove-query-param.js +3 -1
- package/dist/table/utils/reset-query-param.js +16 -9
- package/dist/table-status/component.js +5 -1
- package/dist/textarea/component.js +36 -28
- package/dist/theme-provider/component.js +33 -29
- package/dist/toast/component.d.ts +7 -8
- package/dist/toast/component.js +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,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 { useFloating as U, autoUpdate as z, offset as V, flip as q, shift as B, arrow as G } from "@floating-ui/react-dom";
|
|
4
|
-
import { CSSTransition as H } from "react-transition-group";
|
|
1
|
+
import { jsx as r, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import { useFloating as $, autoUpdate as j, offset as D, flip as U, shift as z, arrow as V } from "@floating-ui/react-dom";
|
|
5
3
|
import m from "classnames";
|
|
4
|
+
import { useRef as g, useLayoutEffect as q, useEffect as N, useMemo as B, useCallback as G } from "react";
|
|
5
|
+
import { CSSTransition as H } from "react-transition-group";
|
|
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,77 +14,77 @@ 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:
|
|
22
|
+
}, ct = ({
|
|
23
|
+
children: R,
|
|
24
24
|
getPortalContainer: A,
|
|
25
|
-
transition:
|
|
25
|
+
transition: f = W,
|
|
26
26
|
anchorElement: d,
|
|
27
27
|
offset: a = [0, 0],
|
|
28
|
-
withArrow:
|
|
28
|
+
withArrow: i = !1,
|
|
29
29
|
withTransition: b = !0,
|
|
30
30
|
position: y = "left",
|
|
31
|
-
preventFlip:
|
|
32
|
-
popperClassName:
|
|
33
|
-
arrowClassName:
|
|
34
|
-
className:
|
|
35
|
-
open:
|
|
31
|
+
preventFlip: T,
|
|
32
|
+
popperClassName: h,
|
|
33
|
+
arrowClassName: E,
|
|
34
|
+
className: O,
|
|
35
|
+
open: u,
|
|
36
36
|
dataTestId: C,
|
|
37
37
|
update: l,
|
|
38
|
-
transitionDuration: F = `${
|
|
39
|
-
zIndex: w =
|
|
38
|
+
transitionDuration: F = `${f.timeout}ms`,
|
|
39
|
+
zIndex: w = Q.POPOVER
|
|
40
40
|
}) => {
|
|
41
|
-
const
|
|
42
|
-
refs:
|
|
41
|
+
const p = g(null), x = g(null), {
|
|
42
|
+
refs: n,
|
|
43
43
|
floatingStyles: I,
|
|
44
44
|
middlewareData: c,
|
|
45
|
-
placement:
|
|
45
|
+
placement: S,
|
|
46
46
|
update: o
|
|
47
|
-
} =
|
|
47
|
+
} = $({
|
|
48
48
|
placement: y,
|
|
49
|
-
whileElementsMounted:
|
|
49
|
+
whileElementsMounted: j,
|
|
50
50
|
middleware: [
|
|
51
|
-
|
|
51
|
+
D(
|
|
52
52
|
{
|
|
53
53
|
crossAxis: a[0],
|
|
54
54
|
mainAxis: a[1]
|
|
55
55
|
},
|
|
56
56
|
[a]
|
|
57
57
|
),
|
|
58
|
-
...
|
|
59
|
-
|
|
60
|
-
...
|
|
58
|
+
...T ? [] : [U()],
|
|
59
|
+
z({ padding: 4 }),
|
|
60
|
+
...i ? [V({ element: p })] : []
|
|
61
61
|
]
|
|
62
62
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, [d,
|
|
63
|
+
q(() => {
|
|
64
|
+
n.setReference(d);
|
|
65
|
+
}, [d, n]), N(() => {
|
|
66
66
|
l && o && (l.current = o);
|
|
67
|
-
}, [o, l]),
|
|
67
|
+
}, [o, l]), N(() => {
|
|
68
68
|
o();
|
|
69
|
-
}, [o
|
|
70
|
-
const M =
|
|
71
|
-
if (!
|
|
69
|
+
}, [o]);
|
|
70
|
+
const M = B(() => {
|
|
71
|
+
if (!i || !c.arrow)
|
|
72
72
|
return {};
|
|
73
|
-
const { x: t, y:
|
|
73
|
+
const { x: t, y: s } = c.arrow, k = S.split("-")[0], L = Z[k] ?? "bottom";
|
|
74
74
|
return {
|
|
75
75
|
position: "absolute",
|
|
76
76
|
left: t != null ? `${t}px` : void 0,
|
|
77
|
-
top:
|
|
77
|
+
top: s != null ? `${s}px` : void 0,
|
|
78
78
|
right: "",
|
|
79
79
|
bottom: "",
|
|
80
80
|
[L]: "-4px"
|
|
81
81
|
};
|
|
82
|
-
}, [
|
|
82
|
+
}, [i, c.arrow, S]), _ = G(
|
|
83
83
|
(t) => {
|
|
84
|
-
|
|
84
|
+
x.current = t, n.setFloating(t);
|
|
85
85
|
},
|
|
86
|
-
[
|
|
87
|
-
),
|
|
86
|
+
[n]
|
|
87
|
+
), v = (t, s) => /* @__PURE__ */ r(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
ref: _,
|
|
@@ -92,21 +92,21 @@ const W = {
|
|
|
92
92
|
zIndex: t,
|
|
93
93
|
...I
|
|
94
94
|
},
|
|
95
|
-
className: m(e.component,
|
|
96
|
-
children: /* @__PURE__ */
|
|
95
|
+
className: m(e.component, O),
|
|
96
|
+
children: /* @__PURE__ */ P(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
"data-test-id": C,
|
|
100
|
-
className: m(e.inner,
|
|
101
|
-
style:
|
|
100
|
+
className: m(e.inner, h),
|
|
101
|
+
style: s,
|
|
102
102
|
children: [
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
R,
|
|
104
|
+
i && /* @__PURE__ */ r(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
ref:
|
|
107
|
+
ref: p,
|
|
108
108
|
style: M,
|
|
109
|
-
className: m(e.arrow,
|
|
109
|
+
className: m(e.arrow, E)
|
|
110
110
|
}
|
|
111
111
|
)
|
|
112
112
|
]
|
|
@@ -114,18 +114,18 @@ const W = {
|
|
|
114
114
|
)
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
|
-
return /* @__PURE__ */ r(
|
|
118
|
-
|
|
117
|
+
return /* @__PURE__ */ r(K, { value: w, children: (t) => /* @__PURE__ */ r(J, { getPortalContainer: A, children: b ? /* @__PURE__ */ r(
|
|
118
|
+
Y,
|
|
119
119
|
{
|
|
120
120
|
unmountOnExit: !0,
|
|
121
121
|
classNames: X,
|
|
122
|
-
...
|
|
123
|
-
in:
|
|
124
|
-
nodeRef:
|
|
125
|
-
children:
|
|
122
|
+
...f,
|
|
123
|
+
in: u,
|
|
124
|
+
nodeRef: x,
|
|
125
|
+
children: v(t, { transitionDuration: F })
|
|
126
126
|
}
|
|
127
|
-
) :
|
|
127
|
+
) : u && v(t) }) });
|
|
128
128
|
};
|
|
129
129
|
export {
|
|
130
|
-
|
|
130
|
+
ct as Popover
|
|
131
131
|
};
|
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;
|