@arthurzakharov/ui-kit 1.4.2 → 1.4.3
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/animations/utils/types.d.ts +1 -1
- package/dist/components/dialog-article/dialog-article.component.d.ts +2 -2
- package/dist/components/form-row/form-row.component.d.ts +2 -2
- package/dist/components/information/information.component.js +1 -1
- package/dist/components/payment/components/block/block.component.d.ts +1 -1
- package/dist/components/payment/components/block/block.component.js +9 -12
- package/dist/components/payment/components/glass/glass.component.d.ts +3 -2
- package/dist/components/payment/components/glass/glass.component.js +28 -22
- package/dist/components/payment/payment.component.d.ts +2 -2
- package/dist/components/sidebar/components/board/board.component.d.ts +2 -1
- package/dist/components/sidebar/components/board/board.component.js +14 -8
- package/dist/components/sidebar/sidebar.component.d.ts +3 -2
- package/dist/components/sidebar/sidebar.component.js +31 -34
- package/dist/controls/control-box/control-box.component.d.ts +3 -4
- package/dist/controls/control-button/control-button.component.d.ts +2 -2
- package/dist/controls/control-button-card/control-button-card.component.d.ts +1 -1
- package/dist/controls/control-button-radio/control-button-radio.component.d.ts +1 -1
- package/dist/controls/control-button-text/control-button-text.component.d.ts +2 -2
- package/dist/controls/control-checkbox/control-checkbox.component.d.ts +4 -4
- package/dist/controls/control-checkbox/control-checkbox.component.js +28 -27
- package/dist/controls/control-label/control-label.component.d.ts +2 -2
- package/dist/controls/control-label/control-label.component.js +1 -6
- package/dist/controls/control-radio-text/control-radio-text.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { AnimationGeneratorName, EasingDefinition } from 'motion';
|
|
3
3
|
import { Base } from '../../utils/types';
|
|
4
|
-
export interface BaseAnimationProps extends Base
|
|
4
|
+
export interface BaseAnimationProps extends PropsWithChildren<Base> {
|
|
5
5
|
name: string;
|
|
6
6
|
condition: boolean;
|
|
7
7
|
animateOnStart?: boolean;
|
|
@@ -4,7 +4,7 @@ interface DialogActionButton {
|
|
|
4
4
|
text: string;
|
|
5
5
|
fn: () => void;
|
|
6
6
|
}
|
|
7
|
-
interface DialogArticleProps extends Base {
|
|
7
|
+
interface DialogArticleProps extends PropsWithChildren<Base> {
|
|
8
8
|
cancel?: DialogActionButton;
|
|
9
9
|
confirm?: DialogActionButton;
|
|
10
10
|
}
|
|
@@ -12,5 +12,5 @@ interface DialogArticleProps extends Base {
|
|
|
12
12
|
* Dialog article section with optional action buttons (cancel/confirm).
|
|
13
13
|
* Automatically adjusts bottom padding on mobile to prevent button overlap.
|
|
14
14
|
*/
|
|
15
|
-
export declare const DialogArticle: (props:
|
|
15
|
+
export declare const DialogArticle: (props: DialogArticleProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Size } from '../../utils/types';
|
|
1
|
+
import { Base, Size } from '../../utils/types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
export interface FormRowProps extends PropsWithChildren {
|
|
3
|
+
export interface FormRowProps extends PropsWithChildren<Base> {
|
|
4
4
|
gap: Size;
|
|
5
5
|
}
|
|
6
6
|
export declare const FormRow: (props: FormRowProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -11,8 +11,8 @@ import '../../assets/information-D-nqKgE6.css';const e = "_Information_1g632_1",
|
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
13
|
"data-testid": r(t, "data-testid", "information"),
|
|
14
|
-
ref: s,
|
|
15
14
|
className: f(o.Information, r(t, "className")),
|
|
15
|
+
ref: s,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ n(c, { className: o.Icon }),
|
|
18
18
|
/* @__PURE__ */ n("div", { className: o.Text, children: m })
|
|
@@ -2,4 +2,4 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
export interface PaymentBlockProps extends PropsWithChildren {
|
|
3
3
|
title: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const Block: (
|
|
5
|
+
export declare const Block: ({ children, title }: PaymentBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import '../../../../assets/block-F5TXCTG0.css';const
|
|
3
|
-
Block:
|
|
4
|
-
BlockTitle:
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
o
|
|
10
|
-
] });
|
|
11
|
-
};
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import '../../../../assets/block-F5TXCTG0.css';const e = "_Block_qsuc1_1", k = "_BlockTitle_qsuc1_10", c = {
|
|
3
|
+
Block: e,
|
|
4
|
+
BlockTitle: k
|
|
5
|
+
}, B = ({ children: l, title: o }) => /* @__PURE__ */ s("div", { className: c.Block, children: [
|
|
6
|
+
/* @__PURE__ */ t("h6", { className: c.BlockTitle, dangerouslySetInnerHTML: { __html: o } }),
|
|
7
|
+
l
|
|
8
|
+
] });
|
|
12
9
|
export {
|
|
13
|
-
|
|
10
|
+
B as Block
|
|
14
11
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
2
|
+
import { Base } from '../../../../utils/types';
|
|
3
|
+
export interface PaymentGlassProps extends PropsWithChildren<Base> {
|
|
3
4
|
on: boolean;
|
|
4
5
|
withLoader?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const Glass: (
|
|
7
|
+
export declare const Glass: ({ children, on, withLoader, ...base }: PaymentGlassProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import m from "clsx";
|
|
3
|
+
import { Loader as l } from "../../../loader/loader.component.js";
|
|
4
|
+
import { baseProps as o } from "../../../../utils/functions/functions.util.js";
|
|
3
5
|
import { m as n } from "../../../../proxy-Cx6n7mT2.js";
|
|
4
|
-
import { A as
|
|
5
|
-
import '../../../../assets/glass-CfX3rUed.css';const
|
|
6
|
-
Glass:
|
|
7
|
-
Cover:
|
|
8
|
-
}, h = (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
6
|
+
import { A as p } from "../../../../index-PfP8s0Qf.js";
|
|
7
|
+
import '../../../../assets/glass-CfX3rUed.css';const d = "_Glass_12crp_1", f = "_Cover_12crp_5", r = {
|
|
8
|
+
Glass: d,
|
|
9
|
+
Cover: f
|
|
10
|
+
}, h = ({ children: t, on: e, withLoader: i = !1, ...a }) => /* @__PURE__ */ c(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
"data-testid": o(a, "data-testid", "payment-glass"),
|
|
14
|
+
className: m(r.Glass, o(a, "className")),
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ s(p, { mode: "sync", children: e && /* @__PURE__ */ s(
|
|
17
|
+
n.div,
|
|
18
|
+
{
|
|
19
|
+
initial: { opacity: 0, scale: 0.75 },
|
|
20
|
+
animate: { opacity: 1, scale: 1 },
|
|
21
|
+
exit: { opacity: 0, scale: 0.75 },
|
|
22
|
+
transition: { duration: 0.125 },
|
|
23
|
+
className: r.Cover,
|
|
24
|
+
children: i && /* @__PURE__ */ s(l, { size: "lg", color: "accent-primary" })
|
|
25
|
+
}
|
|
26
|
+
) }),
|
|
27
|
+
t
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
25
31
|
export {
|
|
26
32
|
h as Glass
|
|
27
33
|
};
|
|
@@ -3,8 +3,8 @@ export type { PaymentGlassProps } from './components/glass/glass.component';
|
|
|
3
3
|
export type { PaymentSidebarProps } from './components/sidebar/sidebar.component';
|
|
4
4
|
export type { PaymentTextBlocksProps, PaymentTextBlockItem, } from './components/text-blocks/text-blocks.component';
|
|
5
5
|
export declare const Payment: {
|
|
6
|
-
Block: (
|
|
7
|
-
Glass: (
|
|
6
|
+
Block: ({ children, title }: import('./components/block/block.component').PaymentBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Glass: ({ children, on, withLoader, ...base }: import('./components/glass/glass.component').PaymentGlassProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Sidebar: (props: import('./components/sidebar/sidebar.component').PaymentSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
TextBlocks: (props: import('./components/text-blocks/text-blocks.component').PaymentTextBlocksProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
2
|
+
import { Base } from '../../../../utils/types';
|
|
3
|
+
export declare const Board: ({ children, ...base }: PropsWithChildren<Base>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import { baseProps as a } from "../../../../utils/functions/functions.util.js";
|
|
4
|
+
import '../../../../assets/board-DdRugbJz.css';const t = "_Board_daowi_1", i = {
|
|
5
|
+
Board: t
|
|
6
|
+
}, p = ({ children: r, ...o }) => /* @__PURE__ */ d(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
"data-testid": a(o, "data-testid", "sidebar-board"),
|
|
10
|
+
className: s(i.Board, a(o, "className")),
|
|
11
|
+
children: r
|
|
12
|
+
}
|
|
13
|
+
);
|
|
8
14
|
export {
|
|
9
|
-
|
|
15
|
+
p as Board
|
|
10
16
|
};
|
|
@@ -3,7 +3,8 @@ import { CertificationsProps } from '../certifications';
|
|
|
3
3
|
import { UserPanelProps } from '../user-panel';
|
|
4
4
|
import { InfoProps } from './components/info/info.component';
|
|
5
5
|
import { StepsProps } from './components/steps/steps.component';
|
|
6
|
-
|
|
6
|
+
import { Base } from '../../utils/types';
|
|
7
|
+
export interface SidebarProps extends PropsWithChildren<Base> {
|
|
7
8
|
isButtonVisible: boolean;
|
|
8
9
|
isUserOpen: boolean;
|
|
9
10
|
title: string;
|
|
@@ -12,4 +13,4 @@ export interface SidebarProps extends PropsWithChildren {
|
|
|
12
13
|
user: UserPanelProps;
|
|
13
14
|
certifications: CertificationsProps['icons'];
|
|
14
15
|
}
|
|
15
|
-
export declare const Sidebar: (
|
|
16
|
+
export declare const Sidebar: ({ children, isButtonVisible, isUserOpen, title, steps, info, certifications, user, }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { AnimationFadeScale as
|
|
3
|
-
import { Certifications as
|
|
4
|
-
import { Line as
|
|
5
|
-
import { Text as
|
|
6
|
-
import { UserPanel as
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { AnimationFadeScale as r } from "../../animations/animation-fade-scale/animation-fade-scale.component.js";
|
|
3
|
+
import { Certifications as f } from "../certifications/certifications.component.js";
|
|
4
|
+
import { Line as o } from "../line/line.component.js";
|
|
5
|
+
import { Text as S } from "../text/text.component.js";
|
|
6
|
+
import { UserPanel as p } from "../user-panel/user-panel.component.js";
|
|
7
7
|
import { Board as h } from "./components/board/board.component.js";
|
|
8
|
-
import { Info as
|
|
8
|
+
import { Info as u } from "./components/info/info.component.js";
|
|
9
9
|
import { Steps as T } from "./components/steps/steps.component.js";
|
|
10
|
-
import '../../assets/sidebar-B3KPFpFU.css';const _ = "_SidebarTitle_1sscs_1",
|
|
10
|
+
import '../../assets/sidebar-B3KPFpFU.css';const _ = "_SidebarTitle_1sscs_1", B = "_SidebarButton_1sscs_2", a = {
|
|
11
11
|
SidebarTitle: _,
|
|
12
|
-
SidebarButton:
|
|
13
|
-
}, F = (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ t(
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */ t(p, { icons: f })
|
|
36
|
-
] });
|
|
37
|
-
};
|
|
12
|
+
SidebarButton: B
|
|
13
|
+
}, F = ({
|
|
14
|
+
children: n,
|
|
15
|
+
isButtonVisible: d = !1,
|
|
16
|
+
isUserOpen: m = !1,
|
|
17
|
+
title: c = "Ihre Übersicht",
|
|
18
|
+
steps: s = [],
|
|
19
|
+
info: l = [],
|
|
20
|
+
certifications: b = [],
|
|
21
|
+
user: i
|
|
22
|
+
}) => /* @__PURE__ */ e(h, { children: [
|
|
23
|
+
/* @__PURE__ */ t("div", { className: a.SidebarTitle, children: /* @__PURE__ */ t(S.SidebarTitle, { children: c }) }),
|
|
24
|
+
/* @__PURE__ */ t(T, { data: s }),
|
|
25
|
+
/* @__PURE__ */ t(o, {}),
|
|
26
|
+
/* @__PURE__ */ t(u, { data: l }),
|
|
27
|
+
/* @__PURE__ */ t(o, {}),
|
|
28
|
+
/* @__PURE__ */ e(r, { name: "user", condition: m, children: [
|
|
29
|
+
/* @__PURE__ */ t(p, { title: i.title, button: i.button, data: i.data, onClick: i.onClick }),
|
|
30
|
+
/* @__PURE__ */ t(o, {})
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ t(r, { name: "button", condition: d, duration: 0.2, delay: 0.1, children: /* @__PURE__ */ t("div", { className: a.SidebarButton, children: n }) }),
|
|
33
|
+
/* @__PURE__ */ t(f, { icons: b })
|
|
34
|
+
] });
|
|
38
35
|
export {
|
|
39
36
|
F as Sidebar
|
|
40
37
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
1
2
|
import { State } from '../utils/types';
|
|
2
3
|
import { Base } from '../../utils/types';
|
|
3
|
-
export interface ControlBoxProps extends Base {
|
|
4
|
+
export interface ControlBoxProps extends PropsWithChildren<Base> {
|
|
4
5
|
state?: State;
|
|
5
6
|
focused?: boolean;
|
|
6
7
|
checked?: boolean;
|
|
@@ -10,6 +11,4 @@ export interface ControlBoxProps extends Base {
|
|
|
10
11
|
* `ControlBox` provides a consistent frame for checkbox/radio-like controls. It handles visual
|
|
11
12
|
* states (`idle`, `error`, `success`) plus `focused` and `checked` modifiers.
|
|
12
13
|
*/
|
|
13
|
-
export declare const ControlBox: import('react').ForwardRefExoticComponent<ControlBoxProps &
|
|
14
|
-
children?: import('react').ReactNode | undefined;
|
|
15
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const ControlBox: import('react').ForwardRefExoticComponent<ControlBoxProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { ControlButtonColor, ControlButtonSize, ControlButtonType } from '../utils/types';
|
|
3
3
|
import { Base } from '../../utils/types';
|
|
4
|
-
export interface ControlButtonProps extends Base {
|
|
4
|
+
export interface ControlButtonProps extends PropsWithChildren<Base> {
|
|
5
5
|
color?: ControlButtonColor;
|
|
6
6
|
size?: ControlButtonSize;
|
|
7
7
|
type?: ControlButtonType;
|
|
@@ -15,4 +15,4 @@ export interface ControlButtonProps extends Base {
|
|
|
15
15
|
onFocus?: () => void;
|
|
16
16
|
onBlur?: () => void;
|
|
17
17
|
}
|
|
18
|
-
export declare const ControlButton: ({ children, color, size, type, disabled, info, fullWidth, loading, preventDefault, blurAfterClick, onClick, onFocus, onBlur, ...base }:
|
|
18
|
+
export declare const ControlButton: ({ children, color, size, type, disabled, info, fullWidth, loading, preventDefault, blurAfterClick, onClick, onFocus, onBlur, ...base }: ControlButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { SvgProps } from '../../utils/svg';
|
|
3
3
|
import { Base } from '../../utils/types';
|
|
4
|
-
export interface ControlButtonCardProps extends Base
|
|
4
|
+
export interface ControlButtonCardProps extends PropsWithChildren<Base> {
|
|
5
5
|
icon?: SvgProps['icon'];
|
|
6
6
|
iconPosition?: 'top' | 'left';
|
|
7
7
|
active?: boolean;
|
|
@@ -5,7 +5,7 @@ type ControlButtonRadioInfo = {
|
|
|
5
5
|
hintLeft?: string;
|
|
6
6
|
hintRight?: string;
|
|
7
7
|
};
|
|
8
|
-
export interface ControlButtonRadioProps extends Base
|
|
8
|
+
export interface ControlButtonRadioProps extends PropsWithChildren<Base> {
|
|
9
9
|
active?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
preventDefault?: boolean;
|
|
@@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ControlButtonSize, ControlButtonType, ControlButtonTypeColor } from '../utils';
|
|
3
3
|
import { Base, FontWeight } from '../../utils/types';
|
|
4
4
|
import { SvgProps } from '../../utils/svg';
|
|
5
|
-
export interface ControlButtonTextProps extends Base {
|
|
5
|
+
export interface ControlButtonTextProps extends PropsWithChildren<Base> {
|
|
6
6
|
color?: ControlButtonTypeColor;
|
|
7
7
|
size?: ControlButtonSize;
|
|
8
8
|
type?: ControlButtonType;
|
|
@@ -17,4 +17,4 @@ export interface ControlButtonTextProps extends Base {
|
|
|
17
17
|
onFocus?: () => void;
|
|
18
18
|
onBlur?: () => void;
|
|
19
19
|
}
|
|
20
|
-
export declare const ControlButtonText: ({ children, size, color, weight, type, icon, iconPosition, underlined, disabled, preventDefault, blurAfterClick, onClick, onFocus, onBlur, className, ...rest }:
|
|
20
|
+
export declare const ControlButtonText: ({ children, size, color, weight, type, icon, iconPosition, underlined, disabled, preventDefault, blurAfterClick, onClick, onFocus, onBlur, className, ...rest }: ControlButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,10 +2,10 @@ import { PropsWithChildren, ReactNode } from 'react';
|
|
|
2
2
|
import { Interactive, State } from '../utils/types';
|
|
3
3
|
import { ControlChoiceProps } from '../control-choice';
|
|
4
4
|
import { Base, FontSize } from '../../utils/types';
|
|
5
|
-
export interface ControlCheckboxProps extends
|
|
5
|
+
export interface ControlCheckboxProps extends Interactive<boolean>, PropsWithChildren<Base> {
|
|
6
6
|
state?: State;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
iconSize?: ControlChoiceProps['size'];
|
|
8
|
+
textSize?: Extract<FontSize, 'body' | 'body-small'>;
|
|
9
9
|
message?: ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare const ControlCheckbox: (props:
|
|
11
|
+
export declare const ControlCheckbox: (props: ControlCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useToggle as u } from "usehooks-ts";
|
|
3
|
-
import
|
|
3
|
+
import x from "clsx";
|
|
4
4
|
import { ControlChoice as F } from "../control-choice/control-choice.component.js";
|
|
5
5
|
import { ControlHiddenInput as L } from "../control-hidden-input/control-hidden-input.component.js";
|
|
6
6
|
import { Converter as N } from "../../utils/converter/converter.util.js";
|
|
7
|
-
import { AnimationFadeSlide as
|
|
8
|
-
import { ControlErrorMessage as
|
|
9
|
-
import
|
|
7
|
+
import { AnimationFadeSlide as I } from "../../animations/animation-fade-slide/animation-fade-slide.component.js";
|
|
8
|
+
import { ControlErrorMessage as z } from "../control-error-message/control-error-message.component.js";
|
|
9
|
+
import { baseProps as _ } from "../../utils/functions/functions.util.js";
|
|
10
|
+
import '../../assets/control-checkbox-uLtXjmYN.css';const j = "_ControlCheckbox_1x82h_1", H = "_Label_1x82h_6", P = "_Choice_1x82h_19", T = "_Content_1x82h_25", A = "_Body_1x82h_44", D = "_BodySmall_1x82h_49", $ = "_ErrorMessage_1x82h_54", e = {
|
|
10
11
|
ControlCheckbox: j,
|
|
11
12
|
Label: H,
|
|
12
|
-
Choice:
|
|
13
|
-
Content:
|
|
13
|
+
Choice: P,
|
|
14
|
+
Content: T,
|
|
14
15
|
Body: A,
|
|
15
16
|
BodySmall: D,
|
|
16
|
-
ErrorMessage:
|
|
17
|
-
},
|
|
17
|
+
ErrorMessage: $
|
|
18
|
+
}, V = (b) => {
|
|
18
19
|
const {
|
|
19
|
-
children:
|
|
20
|
+
children: p,
|
|
20
21
|
state: l = "idle",
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
iconSize: f = "md",
|
|
23
|
+
textSize: c = "body-small",
|
|
23
24
|
id: o,
|
|
24
25
|
value: t,
|
|
25
26
|
disabled: n = !1,
|
|
26
27
|
message: a = "",
|
|
27
28
|
onChange: i,
|
|
28
|
-
onFocus:
|
|
29
|
+
onFocus: g = () => {
|
|
29
30
|
},
|
|
30
|
-
onBlur:
|
|
31
|
+
onBlur: y = () => {
|
|
31
32
|
},
|
|
32
|
-
|
|
33
|
-
} =
|
|
33
|
+
...B
|
|
34
|
+
} = b, [d, m] = u(!1), [k, h] = u(!1), v = (s) => {
|
|
34
35
|
n || d || (s.preventDefault(), i(!t, o));
|
|
35
|
-
},
|
|
36
|
+
}, S = (s) => {
|
|
36
37
|
n || (s.stopPropagation(), i(!t, o));
|
|
37
38
|
}, M = () => {
|
|
38
|
-
n || (m(),
|
|
39
|
+
n || (m(), g(o));
|
|
39
40
|
}, E = () => {
|
|
40
|
-
n || (m(),
|
|
41
|
+
n || (m(), y(o));
|
|
41
42
|
};
|
|
42
|
-
return /* @__PURE__ */ C("div", {
|
|
43
|
+
return /* @__PURE__ */ C("div", { "data-testid": _(B, "className", "control-checkbox"), className: x(e.ControlCheckbox, _), children: [
|
|
43
44
|
/* @__PURE__ */ C(
|
|
44
45
|
"label",
|
|
45
46
|
{
|
|
46
47
|
htmlFor: o,
|
|
47
48
|
className: e.Label,
|
|
48
|
-
onClick:
|
|
49
|
+
onClick: v,
|
|
49
50
|
onFocus: M,
|
|
50
51
|
onBlur: E,
|
|
51
52
|
onMouseEnter: () => h(),
|
|
@@ -60,37 +61,37 @@ import '../../assets/control-checkbox-uLtXjmYN.css';const j = "_ControlCheckbox_
|
|
|
60
61
|
value: N.Boolean.ToBooleanString(t),
|
|
61
62
|
checked: t,
|
|
62
63
|
disabled: n,
|
|
63
|
-
onChange:
|
|
64
|
+
onChange: S
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
/* @__PURE__ */ r("div", { className: e.Choice, children: /* @__PURE__ */ r(
|
|
67
68
|
F,
|
|
68
69
|
{
|
|
69
70
|
type: "checkbox",
|
|
70
|
-
size:
|
|
71
|
+
size: f,
|
|
71
72
|
state: l,
|
|
72
73
|
checked: t,
|
|
73
74
|
focused: d,
|
|
74
|
-
hovered:
|
|
75
|
+
hovered: k,
|
|
75
76
|
disabled: n
|
|
76
77
|
}
|
|
77
78
|
) }),
|
|
78
79
|
/* @__PURE__ */ r(
|
|
79
80
|
"div",
|
|
80
81
|
{
|
|
81
|
-
className:
|
|
82
|
+
className: x(e.Content, {
|
|
82
83
|
[e.Body]: c === "body",
|
|
83
84
|
[e.BodySmall]: c === "body-small"
|
|
84
85
|
}),
|
|
85
|
-
children:
|
|
86
|
+
children: p
|
|
86
87
|
}
|
|
87
88
|
)
|
|
88
89
|
]
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
|
-
/* @__PURE__ */ r(
|
|
92
|
+
/* @__PURE__ */ r(I, { name: "text-message", condition: l === "error" && !!a, children: /* @__PURE__ */ r(z, { className: e.ErrorMessage, children: a }) })
|
|
92
93
|
] });
|
|
93
94
|
};
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
V as ControlCheckbox
|
|
96
97
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { State } from '../utils/types';
|
|
3
3
|
import { Base } from '../../utils/types';
|
|
4
|
-
interface ControlLabelProps extends Base {
|
|
4
|
+
interface ControlLabelProps extends PropsWithChildren<Base> {
|
|
5
5
|
state?: State;
|
|
6
6
|
position?: 'idle' | 'active';
|
|
7
7
|
}
|
|
@@ -9,5 +9,5 @@ interface ControlLabelProps extends Base {
|
|
|
9
9
|
* `ControlLabel` renders field label text with active/idle positioning and validation color states.
|
|
10
10
|
* Use it to keep label behavior and appearance consistent across inputs.
|
|
11
11
|
*/
|
|
12
|
-
export declare const ControlLabel: ({ children, position, state, ...base }:
|
|
12
|
+
export declare const ControlLabel: ({ children, position, state, ...base }: ControlLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -7,12 +7,7 @@ import '../../assets/control-label-C8pjaWEU.css';const _ = "_ControlLabel_l2cwl_
|
|
|
7
7
|
Active: d,
|
|
8
8
|
Error: "_Error_l2cwl_17",
|
|
9
9
|
Success: i
|
|
10
|
-
}, u = ({
|
|
11
|
-
children: s,
|
|
12
|
-
position: c = "idle",
|
|
13
|
-
state: e = "idle",
|
|
14
|
-
...o
|
|
15
|
-
}) => /* @__PURE__ */ t(
|
|
10
|
+
}, u = ({ children: s, position: c = "idle", state: e = "idle", ...o }) => /* @__PURE__ */ t(
|
|
16
11
|
"span",
|
|
17
12
|
{
|
|
18
13
|
"data-testid": r(o, "data-testid", "control-label"),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { Base } from '../../utils/types';
|
|
3
3
|
import { ControlRadioTextColor, ControlRadioTextSize } from '../utils';
|
|
4
|
-
export interface ControlRadioTextProps extends Base {
|
|
4
|
+
export interface ControlRadioTextProps extends PropsWithChildren<Base> {
|
|
5
5
|
size?: ControlRadioTextSize;
|
|
6
6
|
color?: ControlRadioTextColor;
|
|
7
7
|
checked?: boolean;
|
|
8
8
|
oneLine?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const ControlRadioText: ({ children, size, color, checked, oneLine, className, }:
|
|
10
|
+
export declare const ControlRadioText: ({ children, size, color, checked, oneLine, className, }: ControlRadioTextProps) => import("react/jsx-runtime").JSX.Element;
|