@arthurzakharov/ui-kit 1.5.3 → 1.5.5
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/fade-grow/fade-grow.component.d.ts +2 -0
- package/dist/animations/{animation-fade-grow/animation-fade-grow.component.js → fade-grow/fade-grow.component.js} +9 -9
- package/dist/animations/fade-grow/index.d.ts +1 -0
- package/dist/animations/fade-grow/index.js +4 -0
- package/dist/animations/fade-scale/fade-scale.component.d.ts +2 -0
- package/dist/animations/{animation-fade-scale/animation-fade-scale.component.js → fade-scale/fade-scale.component.js} +10 -10
- package/dist/animations/fade-scale/index.d.ts +1 -0
- package/dist/animations/fade-scale/index.js +4 -0
- package/dist/animations/fade-slide/fade-slide.component.d.ts +6 -0
- package/dist/animations/{animation-fade-slide/animation-fade-slide.component.js → fade-slide/fade-slide.component.js} +8 -8
- package/dist/animations/fade-slide/index.d.ts +1 -0
- package/dist/animations/fade-slide/index.js +4 -0
- package/dist/animations/rotate/index.d.ts +1 -0
- package/dist/animations/rotate/index.js +4 -0
- package/dist/animations/{animation-rotate/animation-rotate.component.d.ts → rotate/rotate.component.d.ts} +2 -2
- package/dist/animations/{animation-rotate/animation-rotate.component.js → rotate/rotate.component.js} +6 -6
- package/dist/animations/utils/default-props.d.ts +1 -1
- package/dist/assets/box-5bAcfszB.css +1 -0
- package/dist/assets/button-card-B-nlEbJU.css +1 -0
- package/dist/assets/button-radio-CPeNePW2.css +1 -0
- package/dist/assets/button-text-BKSERdhL.css +1 -0
- package/dist/assets/caption-B28SGRY1.css +1 -0
- package/dist/assets/card-image-LY9zvE8g.css +1 -0
- package/dist/assets/card-text-sR2uSJyo.css +1 -0
- package/dist/assets/checkbox-BzL5bg8o.css +1 -0
- package/dist/assets/choice-j496CvVc.css +1 -0
- package/dist/assets/dropdown-DLhCAHEx.css +1 -0
- package/dist/assets/error-message-CQHYhXbt.css +1 -0
- package/dist/assets/hidden-input-DHJQHUKd.css +1 -0
- package/dist/assets/input-D66hMzHc.css +1 -0
- package/dist/assets/label-BKXQlPJi.css +1 -0
- package/dist/assets/{main-DlyWXITA.css → main-Dz2hrn4n.css} +1 -1
- package/dist/assets/radio-VoXwCoAp.css +1 -0
- package/dist/assets/radio-label-CZHWBUUt.css +1 -0
- package/dist/assets/signature-D9gYlpze.css +1 -0
- package/dist/assets/status-ZxxbM9u1.css +1 -0
- package/dist/assets/text-area-Dgc2jHSx.css +1 -0
- package/dist/assets/text-field-Bp4Ra0yN.css +1 -0
- package/dist/components/accordion-table/accordion-table.component.js +18 -18
- package/dist/components/bottom-bar/bottom-bar.component.d.ts +1 -1
- package/dist/components/bottom-bar/bottom-bar.component.js +25 -27
- package/dist/components/dialog/dialog.component.js +19108 -60
- package/dist/components/dialog-article/dialog-article.component.d.ts +0 -4
- package/dist/components/dialog-article/dialog-article.component.js +20 -20
- package/dist/components/main-attachment/main-attachment.component.js +7 -7
- package/dist/components/payment/components/glass/glass.component.js +2 -2
- package/dist/components/sidebar/sidebar.component.d.ts +1 -1
- package/dist/components/sidebar/sidebar.component.js +14 -14
- package/dist/components/signature/signature.component.d.ts +1 -1
- package/dist/components/signature/signature.component.js +848 -783
- package/dist/components/text/text.component.d.ts +2 -2
- package/dist/components/user-panel/user-panel.component.js +13 -13
- package/dist/controls/box/box.component.d.ts +10 -0
- package/dist/controls/box/box.component.js +40 -0
- package/dist/controls/box/index.d.ts +1 -0
- package/dist/controls/box/index.js +4 -0
- package/dist/controls/{control-button/control-button.component.d.ts → button/button.component.d.ts} +5 -4
- package/dist/controls/button/button.component.js +82 -0
- package/dist/controls/button/index.d.ts +1 -0
- package/dist/controls/button/index.js +4 -0
- package/dist/controls/{control-button-card/control-button-card.component.d.ts → button-card/button-card.component.d.ts} +5 -4
- package/dist/controls/button-card/button-card.component.js +79 -0
- package/dist/controls/button-card/index.d.ts +1 -0
- package/dist/controls/button-card/index.js +4 -0
- package/dist/controls/button-radio/button-radio.component.d.ts +20 -0
- package/dist/controls/button-radio/button-radio.component.js +83 -0
- package/dist/controls/button-radio/index.d.ts +1 -0
- package/dist/controls/button-radio/index.js +4 -0
- package/dist/controls/{control-button-text/control-button-text.component.d.ts → button-text/button-text.component.d.ts} +4 -4
- package/dist/controls/button-text/button-text.component.js +87 -0
- package/dist/controls/button-text/index.d.ts +1 -0
- package/dist/controls/button-text/index.js +4 -0
- package/dist/controls/caption/caption.component.d.ts +10 -0
- package/dist/controls/caption/caption.component.js +48 -0
- package/dist/controls/caption/index.d.ts +1 -0
- package/dist/controls/caption/index.js +4 -0
- package/dist/controls/card-image/card-image.component.d.ts +10 -0
- package/dist/controls/card-image/card-image.component.js +81 -0
- package/dist/controls/card-image/index.d.ts +1 -0
- package/dist/controls/card-image/index.js +4 -0
- package/dist/controls/card-text/card-text.component.d.ts +9 -0
- package/dist/controls/card-text/card-text.component.js +75 -0
- package/dist/controls/card-text/index.d.ts +1 -0
- package/dist/controls/card-text/index.js +4 -0
- package/dist/controls/checkbox/checkbox.component.d.ts +10 -0
- package/dist/controls/checkbox/checkbox.component.js +103 -0
- package/dist/controls/checkbox/index.d.ts +1 -0
- package/dist/controls/checkbox/index.js +4 -0
- package/dist/controls/choice/choice.component.d.ts +12 -0
- package/dist/controls/choice/choice.component.js +67 -0
- package/dist/controls/choice/index.d.ts +1 -0
- package/dist/controls/choice/index.js +4 -0
- package/dist/controls/{control-dropdown/control-dropdown.component.d.ts → dropdown/dropdown.component.d.ts} +3 -3
- package/dist/controls/dropdown/dropdown.component.js +127 -0
- package/dist/controls/dropdown/index.d.ts +1 -0
- package/dist/controls/dropdown/index.js +4 -0
- package/dist/controls/error-message/error-message.component.d.ts +5 -0
- package/dist/controls/error-message/error-message.component.js +22 -0
- package/dist/controls/error-message/index.d.ts +1 -0
- package/dist/controls/error-message/index.js +4 -0
- package/dist/controls/hidden-input/hidden-input.component.d.ts +15 -0
- package/dist/controls/hidden-input/hidden-input.component.js +38 -0
- package/dist/controls/hidden-input/index.d.ts +1 -0
- package/dist/controls/hidden-input/index.js +4 -0
- package/dist/controls/hooks/index.d.ts +1 -0
- package/dist/controls/hooks/index.js +3 -1
- package/dist/controls/hooks/use-choice/use-choice.hook.d.ts +2 -2
- package/dist/controls/hooks/use-control-interaction/index.d.ts +1 -0
- package/dist/controls/hooks/use-control-interaction/index.js +4 -0
- package/dist/controls/hooks/use-control-interaction/use-control-interaction.hook.d.ts +7 -0
- package/dist/controls/hooks/use-control-interaction/use-control-interaction.hook.js +25 -0
- package/dist/controls/index.d.ts +22 -0
- package/dist/controls/index.js +50 -0
- package/dist/controls/input/index.d.ts +1 -0
- package/dist/controls/input/index.js +4 -0
- package/dist/controls/input/input.component.d.ts +9 -0
- package/dist/controls/input/input.component.js +143 -0
- package/dist/controls/input/input.utils.d.ts +10 -0
- package/dist/controls/input/input.utils.js +24 -0
- package/dist/controls/label/index.d.ts +1 -0
- package/dist/controls/label/index.js +4 -0
- package/dist/controls/label/label.component.d.ts +8 -0
- package/dist/controls/label/label.component.js +33 -0
- package/dist/controls/radio/index.d.ts +1 -0
- package/dist/controls/radio/index.js +4 -0
- package/dist/controls/radio/radio.component.d.ts +12 -0
- package/dist/controls/radio/radio.component.js +109 -0
- package/dist/controls/radio-label/index.d.ts +1 -0
- package/dist/controls/radio-label/index.js +4 -0
- package/dist/controls/radio-label/radio-label.component.d.ts +19 -0
- package/dist/controls/radio-label/radio-label.component.js +49 -0
- package/dist/controls/status/index.d.ts +1 -0
- package/dist/controls/status/index.js +4 -0
- package/dist/controls/status/status.component.d.ts +6 -0
- package/dist/controls/status/status.component.js +36 -0
- package/dist/controls/text-area/index.d.ts +1 -0
- package/dist/controls/text-area/index.js +4 -0
- package/dist/controls/text-area/text-area.component.d.ts +8 -0
- package/dist/controls/text-area/text-area.component.js +62 -0
- package/dist/controls/text-field/index.d.ts +1 -0
- package/dist/controls/text-field/index.js +4 -0
- package/dist/controls/text-field/text-field.component.d.ts +10 -0
- package/dist/controls/text-field/text-field.component.js +100 -0
- package/dist/controls/utils/functions/functions.util.d.ts +0 -1
- package/dist/controls/utils/functions/functions.util.js +3 -14
- package/dist/controls/utils/functions/index.js +3 -4
- package/dist/controls/utils/index.js +3 -4
- package/dist/controls/utils/types.d.ts +8 -5
- package/dist/{index-PfP8s0Qf.js → index-CPvYWadf.js} +1 -1
- package/dist/main.d.ts +25 -24
- package/dist/main.js +101 -99
- package/dist/{proxy-Cx6n7mT2.js → proxy-CmTphuYR.js} +1762 -1717
- package/dist/utils/converter/index.d.ts +1 -0
- package/dist/utils/converter/index.js +4 -0
- package/dist/utils/functions/functions.util.js +10 -10
- package/dist/utils/story/grey-box/grey-box.component.d.ts +9 -0
- package/dist/utils/story/grey-box/grey-box.component.js +24 -0
- package/dist/utils/story/grey-box/index.d.ts +1 -0
- package/dist/utils/story/grey-box/index.js +4 -0
- package/dist/utils/story/size-box/index.d.ts +1 -0
- package/dist/utils/story/size-box/index.js +4 -0
- package/dist/utils/story/size-box/size-box.component.d.ts +6 -0
- package/dist/utils/story/size-box/size-box.component.js +5 -0
- package/package.json +10 -18
- package/dist/_commonjsHelpers-CqEciG1_.js +0 -31
- package/dist/animations/animation-fade-grow/animation-fade-grow.component.d.ts +0 -2
- package/dist/animations/animation-fade-grow/index.d.ts +0 -1
- package/dist/animations/animation-fade-grow/index.js +0 -4
- package/dist/animations/animation-fade-scale/animation-fade-scale.component.d.ts +0 -2
- package/dist/animations/animation-fade-scale/index.d.ts +0 -1
- package/dist/animations/animation-fade-scale/index.js +0 -4
- package/dist/animations/animation-fade-slide/animation-fade-slide.component.d.ts +0 -6
- package/dist/animations/animation-fade-slide/index.d.ts +0 -1
- package/dist/animations/animation-fade-slide/index.js +0 -4
- package/dist/animations/animation-rotate/index.d.ts +0 -1
- package/dist/animations/animation-rotate/index.js +0 -4
- package/dist/assets/control-box-Dx-QKPgf.css +0 -1
- package/dist/assets/control-button-card-Cb8_vJbQ.css +0 -1
- package/dist/assets/control-button-radio-BodzD0rU.css +0 -1
- package/dist/assets/control-button-text-BbE_5ebO.css +0 -1
- package/dist/assets/control-card-image-BYT3bzTE.css +0 -1
- package/dist/assets/control-card-text-Cvv3bL2p.css +0 -1
- package/dist/assets/control-checkbox-uLtXjmYN.css +0 -1
- package/dist/assets/control-choice-BAHN-VTm.css +0 -1
- package/dist/assets/control-dropdown-DaS5KsvG.css +0 -1
- package/dist/assets/control-error-message-CKgqmo1U.css +0 -1
- package/dist/assets/control-hidden-input-BhMdNmnP.css +0 -1
- package/dist/assets/control-input-nR0XQHHp.css +0 -1
- package/dist/assets/control-label-C8pjaWEU.css +0 -1
- package/dist/assets/control-radio-Bo1rvcg2.css +0 -1
- package/dist/assets/control-radio-label-CgZ-FNj0.css +0 -1
- package/dist/assets/control-radio-text-S7MEO4a2.css +0 -1
- package/dist/assets/control-status-DPNvkGlM.css +0 -1
- package/dist/assets/control-text-n-qi7e2Y.css +0 -1
- package/dist/assets/control-textarea-B6gWlJs3.css +0 -1
- package/dist/assets/signature-EuXLu4YT.css +0 -1
- package/dist/controls/control-box/control-box.component.d.ts +0 -14
- package/dist/controls/control-box/control-box.component.js +0 -33
- package/dist/controls/control-box/index.d.ts +0 -2
- package/dist/controls/control-box/index.js +0 -4
- package/dist/controls/control-button/control-button.component.js +0 -84
- package/dist/controls/control-button/index.d.ts +0 -2
- package/dist/controls/control-button/index.js +0 -4
- package/dist/controls/control-button-card/control-button-card.component.js +0 -65
- package/dist/controls/control-button-card/index.d.ts +0 -2
- package/dist/controls/control-button-card/index.js +0 -4
- package/dist/controls/control-button-radio/control-button-radio.component.d.ts +0 -19
- package/dist/controls/control-button-radio/control-button-radio.component.js +0 -69
- package/dist/controls/control-button-radio/index.d.ts +0 -2
- package/dist/controls/control-button-radio/index.js +0 -4
- package/dist/controls/control-button-text/control-button-text.component.js +0 -87
- package/dist/controls/control-button-text/index.d.ts +0 -2
- package/dist/controls/control-button-text/index.js +0 -4
- package/dist/controls/control-card-image/control-card-image.component.d.ts +0 -8
- package/dist/controls/control-card-image/control-card-image.component.js +0 -53
- package/dist/controls/control-card-image/index.d.ts +0 -2
- package/dist/controls/control-card-image/index.js +0 -4
- package/dist/controls/control-card-text/control-card-text.component.d.ts +0 -7
- package/dist/controls/control-card-text/control-card-text.component.js +0 -48
- package/dist/controls/control-card-text/index.d.ts +0 -2
- package/dist/controls/control-card-text/index.js +0 -4
- package/dist/controls/control-checkbox/control-checkbox.component.d.ts +0 -11
- package/dist/controls/control-checkbox/control-checkbox.component.js +0 -97
- package/dist/controls/control-checkbox/index.d.ts +0 -2
- package/dist/controls/control-checkbox/index.js +0 -4
- package/dist/controls/control-choice/control-choice.component.d.ts +0 -12
- package/dist/controls/control-choice/control-choice.component.js +0 -64
- package/dist/controls/control-choice/index.d.ts +0 -2
- package/dist/controls/control-choice/index.js +0 -4
- package/dist/controls/control-dropdown/control-dropdown.component.js +0 -106
- package/dist/controls/control-dropdown/index.d.ts +0 -2
- package/dist/controls/control-dropdown/index.js +0 -4
- package/dist/controls/control-error-message/control-error-message.component.d.ts +0 -7
- package/dist/controls/control-error-message/control-error-message.component.js +0 -16
- package/dist/controls/control-error-message/index.d.ts +0 -1
- package/dist/controls/control-error-message/index.js +0 -4
- package/dist/controls/control-hidden-input/control-hidden-input.component.d.ts +0 -15
- package/dist/controls/control-hidden-input/control-hidden-input.component.js +0 -41
- package/dist/controls/control-hidden-input/index.d.ts +0 -2
- package/dist/controls/control-hidden-input/index.js +0 -4
- package/dist/controls/control-input/control-input.component.d.ts +0 -11
- package/dist/controls/control-input/control-input.component.js +0 -973
- package/dist/controls/control-input/index.d.ts +0 -2
- package/dist/controls/control-input/index.js +0 -4
- package/dist/controls/control-label/control-label.component.d.ts +0 -13
- package/dist/controls/control-label/control-label.component.js +0 -25
- package/dist/controls/control-label/index.d.ts +0 -1
- package/dist/controls/control-label/index.js +0 -4
- package/dist/controls/control-radio/control-radio.component.d.ts +0 -14
- package/dist/controls/control-radio/control-radio.component.js +0 -79
- package/dist/controls/control-radio/index.d.ts +0 -2
- package/dist/controls/control-radio/index.js +0 -4
- package/dist/controls/control-radio-label/control-radio-label.component.d.ts +0 -22
- package/dist/controls/control-radio-label/control-radio-label.component.js +0 -39
- package/dist/controls/control-radio-label/index.d.ts +0 -1
- package/dist/controls/control-radio-label/index.js +0 -4
- package/dist/controls/control-radio-text/control-radio-text.component.d.ts +0 -10
- package/dist/controls/control-radio-text/control-radio-text.component.js +0 -45
- package/dist/controls/control-radio-text/index.d.ts +0 -2
- package/dist/controls/control-radio-text/index.js +0 -4
- package/dist/controls/control-status/control-status.component.d.ts +0 -11
- package/dist/controls/control-status/control-status.component.js +0 -42
- package/dist/controls/control-status/index.d.ts +0 -1
- package/dist/controls/control-status/index.js +0 -4
- package/dist/controls/control-text/control-text.component.d.ts +0 -11
- package/dist/controls/control-text/control-text.component.js +0 -70
- package/dist/controls/control-text/index.d.ts +0 -2
- package/dist/controls/control-text/index.js +0 -4
- package/dist/controls/control-textarea/control-textarea.component.d.ts +0 -15
- package/dist/controls/control-textarea/control-textarea.component.js +0 -63
- package/dist/controls/control-textarea/index.d.ts +0 -1
- package/dist/controls/control-textarea/index.js +0 -4
- package/dist/index-D3EuHLHH.js +0 -19053
- /package/dist/animations/{hook → hooks}/index.d.ts +0 -0
- /package/dist/animations/{hook → hooks}/index.js +0 -0
- /package/dist/animations/{hook → hooks}/use-animation-lifecycle/index.d.ts +0 -0
- /package/dist/animations/{hook → hooks}/use-animation-lifecycle/index.js +0 -0
- /package/dist/animations/{hook → hooks}/use-animation-lifecycle/use-animation-lifecycle.hook.d.ts +0 -0
- /package/dist/animations/{hook → hooks}/use-animation-lifecycle/use-animation-lifecycle.hook.js +0 -0
- /package/dist/assets/{control-button-Tzg6F5Dp.css → button-Tzg6F5Dp.css} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Interactive } from '../utils';
|
|
2
|
+
import { Base } from '../../utils/types';
|
|
3
|
+
export interface TextAreaProps extends Base, Interactive<string> {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
rows?: number;
|
|
6
|
+
message?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const TextArea: ({ id, value, disabled, state, onChange, onFocus, onBlur, placeholder, rows, message, ...base }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as M, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import N from "clsx";
|
|
3
|
+
import { FadeSlide as _ } from "../../animations/fade-slide/fade-slide.component.js";
|
|
4
|
+
import { Box as I } from "../box/box.component.js";
|
|
5
|
+
import { ErrorMessage as C } from "../error-message/error-message.component.js";
|
|
6
|
+
import { useControlInteraction as k } from "../hooks/use-control-interaction/use-control-interaction.hook.js";
|
|
7
|
+
import { baseProps as t } from "../../utils/functions/functions.util.js";
|
|
8
|
+
import '../../assets/text-area-Dgc2jHSx.css';const B = "_Input_11gck_6", F = "_ErrorMessage_11gck_28", a = {
|
|
9
|
+
Input: B,
|
|
10
|
+
ErrorMessage: F
|
|
11
|
+
}, $ = ({
|
|
12
|
+
// Interactive props
|
|
13
|
+
id: o,
|
|
14
|
+
value: m,
|
|
15
|
+
disabled: s = !1,
|
|
16
|
+
state: n = "idle",
|
|
17
|
+
onChange: i,
|
|
18
|
+
onFocus: l,
|
|
19
|
+
onBlur: d,
|
|
20
|
+
// TextArea props
|
|
21
|
+
placeholder: p = "",
|
|
22
|
+
rows: u = 5,
|
|
23
|
+
message: c = "",
|
|
24
|
+
// Base props
|
|
25
|
+
...r
|
|
26
|
+
}) => {
|
|
27
|
+
const { focused: g, emitChange: x, handleFocus: f, handleBlur: h } = k({
|
|
28
|
+
id: o,
|
|
29
|
+
disabled: s,
|
|
30
|
+
onChange: i,
|
|
31
|
+
onFocus: l,
|
|
32
|
+
onBlur: d
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ M(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
"data-testid": t(r, "data-testid", "textarea"),
|
|
38
|
+
className: N(a.Container, t(r, "className")),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ e(I, { state: n, focused: g, className: t(r, "className"), children: /* @__PURE__ */ e(
|
|
41
|
+
"textarea",
|
|
42
|
+
{
|
|
43
|
+
"data-testid": "textarea-input",
|
|
44
|
+
disabled: s,
|
|
45
|
+
id: o,
|
|
46
|
+
rows: u,
|
|
47
|
+
placeholder: p,
|
|
48
|
+
value: m,
|
|
49
|
+
className: a.Input,
|
|
50
|
+
onChange: (E) => x(E.target.value, "keyboard"),
|
|
51
|
+
onFocus: () => f(),
|
|
52
|
+
onBlur: () => h()
|
|
53
|
+
}
|
|
54
|
+
) }),
|
|
55
|
+
/* @__PURE__ */ e(_, { name: "text-message", condition: n === "error" && !!c, children: /* @__PURE__ */ e(C, { "data-testid": "textarea-error-message", text: c, className: a.ErrorMessage }) })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
$ as TextArea
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextField, type TextFieldProps } from './text-field.component';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Interactive } from '../utils';
|
|
2
|
+
import { Base } from '../../utils/types';
|
|
3
|
+
export interface TextFieldProps extends Base, Interactive<string> {
|
|
4
|
+
mask?: string;
|
|
5
|
+
maxLength?: number;
|
|
6
|
+
label: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextField: ({ id, value, disabled, state, onChange, onFocus, onBlur, mask, maxLength, label, message, placeholder, ...base }: TextFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs as h, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import c from "clsx";
|
|
3
|
+
import { useBoolean as p } from "usehooks-ts";
|
|
4
|
+
import { FadeScale as k } from "../../animations/fade-scale/fade-scale.component.js";
|
|
5
|
+
import { FadeSlide as B } from "../../animations/fade-slide/fade-slide.component.js";
|
|
6
|
+
import { Box as C } from "../box/box.component.js";
|
|
7
|
+
import { Input as $ } from "../input/input.component.js";
|
|
8
|
+
import { Label as w } from "../label/label.component.js";
|
|
9
|
+
import { ErrorMessage as j } from "../error-message/error-message.component.js";
|
|
10
|
+
import { baseProps as f } from "../../utils/functions/functions.util.js";
|
|
11
|
+
import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O = "_Content_14hxo_10", q = "_Label_14hxo_26", y = "_Idle_14hxo_32", z = "_Active_14hxo_37", G = "_Placeholder_14hxo_42", H = "_PlaceholderText_14hxo_49", J = "_ErrorMessage_14hxo_57", K = "_Input_14hxo_61", Q = "_MaskStart_14hxo_65", e = {
|
|
12
|
+
TextField: D,
|
|
13
|
+
Content: O,
|
|
14
|
+
Label: q,
|
|
15
|
+
Idle: y,
|
|
16
|
+
Active: z,
|
|
17
|
+
Placeholder: G,
|
|
18
|
+
PlaceholderText: H,
|
|
19
|
+
ErrorMessage: J,
|
|
20
|
+
Input: K,
|
|
21
|
+
MaskStart: Q
|
|
22
|
+
}, se = ({
|
|
23
|
+
// Interactive props
|
|
24
|
+
id: i,
|
|
25
|
+
value: s = "",
|
|
26
|
+
disabled: u = !1,
|
|
27
|
+
state: l = "idle",
|
|
28
|
+
onChange: I,
|
|
29
|
+
onFocus: F,
|
|
30
|
+
onBlur: M,
|
|
31
|
+
// Text props
|
|
32
|
+
mask: n,
|
|
33
|
+
maxLength: P = -1,
|
|
34
|
+
label: T = "",
|
|
35
|
+
message: d = "",
|
|
36
|
+
placeholder: m = "",
|
|
37
|
+
// Base props
|
|
38
|
+
...x
|
|
39
|
+
}) => {
|
|
40
|
+
const { value: _, setTrue: A, setFalse: S } = p(!1), { value: a, setTrue: b, setFalse: g } = p(!1), r = a || !!s || _, E = !n && !!m && a && !s && !_, N = !!d && l === "error", v = (o) => {
|
|
41
|
+
b(), F?.(o);
|
|
42
|
+
}, L = (o) => {
|
|
43
|
+
g(), M?.(o);
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ h(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"data-testid": f(x, "data-testid", "text-field"),
|
|
49
|
+
className: c(e.TextField, f(x, "className")),
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ t(C, { state: l, focused: a, children: /* @__PURE__ */ h(
|
|
52
|
+
"label",
|
|
53
|
+
{
|
|
54
|
+
htmlFor: i,
|
|
55
|
+
className: e.Content,
|
|
56
|
+
onPointerDown: (o) => {
|
|
57
|
+
a && o.preventDefault();
|
|
58
|
+
},
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
w,
|
|
62
|
+
{
|
|
63
|
+
"data-testid": "text-label",
|
|
64
|
+
text: T,
|
|
65
|
+
position: r ? "active" : "idle",
|
|
66
|
+
state: r ? l : "idle",
|
|
67
|
+
className: c(e.Label, r ? e.Active : e.Idle)
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ t(k, { name: "text-placeholder", condition: E, className: e.Placeholder, children: /* @__PURE__ */ t("span", { "data-testid": "text-placeholder", className: e.PlaceholderText, children: m }) }),
|
|
71
|
+
/* @__PURE__ */ t(
|
|
72
|
+
$,
|
|
73
|
+
{
|
|
74
|
+
"data-testid": "text-input",
|
|
75
|
+
mask: n,
|
|
76
|
+
maxLength: P,
|
|
77
|
+
disabled: u,
|
|
78
|
+
id: i,
|
|
79
|
+
value: s,
|
|
80
|
+
className: c(e.Input, {
|
|
81
|
+
[e.MaskStart]: n && s === "" && !r
|
|
82
|
+
}),
|
|
83
|
+
onAnimationStart: A,
|
|
84
|
+
onAnimationEnd: S,
|
|
85
|
+
onChange: I,
|
|
86
|
+
onFocus: v,
|
|
87
|
+
onBlur: L
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
) }),
|
|
93
|
+
/* @__PURE__ */ t(B, { name: "text-message", direction: "ltr", condition: N, children: /* @__PURE__ */ t(j, { "data-testid": "text-error-message", text: d, className: e.ErrorMessage }) })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
se as TextField
|
|
100
|
+
};
|
|
@@ -2,4 +2,3 @@ import { RefObject } from 'react';
|
|
|
2
2
|
export declare const getChoiceId: (id: string, value: string, index: number) => string;
|
|
3
3
|
export declare const containsHtml: (str?: string) => boolean;
|
|
4
4
|
export declare const clickHasNode: (event: MouseEvent | TouchEvent | FocusEvent, element: RefObject<HTMLElement>) => boolean;
|
|
5
|
-
export declare const findEndIndex: (inputString: string) => number;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
const c = (
|
|
2
|
-
let t = -1;
|
|
3
|
-
for (let n = 0; n < e.length; n++) {
|
|
4
|
-
const r = e[n];
|
|
5
|
-
if (/\d|\//.test(r))
|
|
6
|
-
t = n;
|
|
7
|
-
else
|
|
8
|
-
break;
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
1
|
+
const c = (t, n, r) => [t, r, n.replace(/\s+/g, "-")].join("-"), e = (t) => /<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>|<([a-z][a-z0-9]*)\b[^>]*\/?>/i.test(t || ""), o = (t, n) => !!(n.current && n.current.contains(t.target));
|
|
12
2
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
s as findEndIndex,
|
|
3
|
+
o as clickHasNode,
|
|
4
|
+
e as containsHtml,
|
|
16
5
|
c as getChoiceId
|
|
17
6
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { clickHasNode as
|
|
1
|
+
import { clickHasNode as e, containsHtml as t, getChoiceId as i } from "./functions.util.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
c as findEndIndex,
|
|
3
|
+
e as clickHasNode,
|
|
4
|
+
t as containsHtml,
|
|
6
5
|
i as getChoiceId
|
|
7
6
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { clickHasNode as
|
|
1
|
+
import { clickHasNode as e, containsHtml as t, getChoiceId as i } from "./functions/functions.util.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
c as findEndIndex,
|
|
3
|
+
e as clickHasNode,
|
|
4
|
+
t as containsHtml,
|
|
6
5
|
i as getChoiceId
|
|
7
6
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { FontSize, FontColor } from '../../utils/types';
|
|
2
2
|
export type InputChangeSource = 'mouse' | 'keyboard';
|
|
3
|
+
export type ControlFocusHandler = (id: string) => void;
|
|
4
|
+
export type ControlChangeHandler<V> = (value: V, id: string, source: InputChangeSource) => void;
|
|
3
5
|
export type Interactive<V> = {
|
|
4
6
|
id: string;
|
|
5
7
|
value: V;
|
|
6
8
|
disabled?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
state?: State;
|
|
10
|
+
onChange: ControlChangeHandler<V>;
|
|
11
|
+
onFocus?: ControlFocusHandler;
|
|
12
|
+
onBlur?: ControlFocusHandler;
|
|
10
13
|
};
|
|
11
14
|
export type RadioChoice = {
|
|
12
15
|
label: string;
|
|
@@ -17,8 +20,8 @@ export type ControlChoiceType = 'radio' | 'checkbox';
|
|
|
17
20
|
export type ChoiceValue = string | string[];
|
|
18
21
|
export type State = 'idle' | 'error' | 'success';
|
|
19
22
|
export type ControlLabelPosition = 'idle' | 'active';
|
|
20
|
-
export type
|
|
21
|
-
export type
|
|
23
|
+
export type ControlCaptionSize = Extract<FontSize, 'body-extra-small' | 'body-small' | 'body' | 'body-large'>;
|
|
24
|
+
export type ControlCaptionColor = Extract<FontColor, 'text-primary' | 'text-secondary' | 'accent-primary' | 'accent-secondary'>;
|
|
22
25
|
export type ControlButtonColor = 'primary' | 'secondary' | 'tertiary';
|
|
23
26
|
export type ControlButtonTypeColor = Extract<FontColor, 'text-primary' | 'text-secondary' | 'accent-primary' | 'accent-secondary' | 'theme-primary' | 'theme-secondary'>;
|
|
24
27
|
export type ControlButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as b, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import * as v from "react";
|
|
3
3
|
import { useId as W, useRef as P, useContext as Y, useInsertionEffect as V, useMemo as A, Children as X, isValidElement as _, useState as I } from "react";
|
|
4
|
-
import { M as B, i as T, u as j, P as F, a as G, b as O, L as q } from "./proxy-
|
|
4
|
+
import { M as B, i as T, u as j, P as F, a as G, b as O, L as q } from "./proxy-CmTphuYR.js";
|
|
5
5
|
function D(e, s) {
|
|
6
6
|
if (typeof e == "function")
|
|
7
7
|
return e(s);
|
package/dist/main.d.ts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { type InputChangeSource, type Interactive, type RadioChoice, type ControlChoiceType, type ChoiceValue, type State, type QuestionPath, type QuestionChoice, type Size, } from './controls/utils
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
1
|
+
export { FadeGrow } from './animations/fade-grow';
|
|
2
|
+
export { FadeScale } from './animations/fade-scale';
|
|
3
|
+
export { FadeSlide } from './animations/fade-slide';
|
|
4
|
+
export { Rotate } from './animations/rotate';
|
|
5
|
+
export { type InputChangeSource, type Interactive, type RadioChoice, type ControlChoiceType, type ChoiceValue, type State, type QuestionPath, type QuestionChoice, type Size, } from './controls/utils';
|
|
6
|
+
export { Box, type BoxProps } from './controls/box';
|
|
7
|
+
export { Button, type ButtonProps } from './controls/button';
|
|
8
|
+
export { ButtonCard, type ButtonCardProps } from './controls/button-card';
|
|
9
|
+
export { ButtonRadio, type ButtonRadioProps } from './controls/button-radio';
|
|
10
|
+
export { ButtonText, type ButtonTextProps } from './controls/button-text';
|
|
11
|
+
export { Caption, type CaptionProps } from './controls/caption';
|
|
12
|
+
export { CardImage, type CardImageProps } from './controls/card-image';
|
|
13
|
+
export { CardText, type CardTextProps } from './controls/card-text';
|
|
14
|
+
export { Checkbox, type CheckboxProps } from './controls/checkbox';
|
|
15
|
+
export { Choice, type ChoiceProps } from './controls/choice';
|
|
16
|
+
export { Dropdown, type DropdownProps } from './controls/dropdown';
|
|
17
|
+
export { ErrorMessage, type ErrorMessageProps } from './controls/error-message';
|
|
18
|
+
export { HiddenInput, type HiddenInputProps } from './controls/hidden-input';
|
|
19
|
+
export { Input, type InputProps } from './controls/input';
|
|
20
|
+
export { Label, type LabelProps } from './controls/label';
|
|
21
|
+
export { Radio, type RadioProps } from './controls/radio';
|
|
22
|
+
export { RadioLabel, type RadioLabelProps } from './controls/radio-label';
|
|
23
|
+
export { Status, type StatusProps } from './controls/status';
|
|
24
|
+
export { TextArea, type TextAreaProps } from './controls/text-area';
|
|
25
|
+
export { TextField, type TextFieldProps } from './controls/text-field';
|
|
25
26
|
export { AccordionTable, type AccordionTableProps } from './components/accordion-table/accordion-table.component';
|
|
26
27
|
export { BottomBar } from './components/bottom-bar';
|
|
27
28
|
export { Certifications, type CertificationsProps } from './components/certifications';
|
package/dist/main.js
CHANGED
|
@@ -1,100 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
1
|
+
import { FadeGrow as e } from "./animations/fade-grow/fade-grow.component.js";
|
|
2
|
+
import { FadeScale as x } from "./animations/fade-scale/fade-scale.component.js";
|
|
3
|
+
import { FadeSlide as p } from "./animations/fade-slide/fade-slide.component.js";
|
|
4
|
+
import { Rotate as a } from "./animations/rotate/rotate.component.js";
|
|
5
|
+
import { Box as d } from "./controls/box/box.component.js";
|
|
6
|
+
import { Button as l } from "./controls/button/button.component.js";
|
|
7
|
+
import { ButtonCard as c } from "./controls/button-card/button-card.component.js";
|
|
8
|
+
import { ButtonRadio as g } from "./controls/button-radio/button-radio.component.js";
|
|
9
|
+
import { ButtonText as C } from "./controls/button-text/button-text.component.js";
|
|
10
|
+
import { Caption as b } from "./controls/caption/caption.component.js";
|
|
11
|
+
import { CardImage as S } from "./controls/card-image/card-image.component.js";
|
|
12
|
+
import { CardText as I } from "./controls/card-text/card-text.component.js";
|
|
13
|
+
import { Checkbox as A } from "./controls/checkbox/checkbox.component.js";
|
|
14
|
+
import { Choice as M } from "./controls/choice/choice.component.js";
|
|
15
|
+
import { Dropdown as h } from "./controls/dropdown/dropdown.component.js";
|
|
16
|
+
import { ErrorMessage as y } from "./controls/error-message/error-message.component.js";
|
|
17
|
+
import { HiddenInput as E } from "./controls/hidden-input/hidden-input.component.js";
|
|
18
|
+
import { Input as v } from "./controls/input/input.component.js";
|
|
19
|
+
import { Label as N } from "./controls/label/label.component.js";
|
|
20
|
+
import { Radio as W } from "./controls/radio/radio.component.js";
|
|
21
|
+
import { RadioLabel as q } from "./controls/radio-label/radio-label.component.js";
|
|
22
|
+
import { Status as J } from "./controls/status/status.component.js";
|
|
23
|
+
import { TextArea as O } from "./controls/text-area/text-area.component.js";
|
|
24
|
+
import { TextField as V } from "./controls/text-field/text-field.component.js";
|
|
25
|
+
import { AccordionTable as Y } from "./components/accordion-table/accordion-table.component.js";
|
|
26
|
+
import { BottomBar as _ } from "./components/bottom-bar/bottom-bar.component.js";
|
|
27
|
+
import { Certifications as oo } from "./components/certifications/certifications.component.js";
|
|
28
|
+
import { DataProtectedLabel as eo } from "./components/data-protected-label/data-protected-label.component.js";
|
|
29
|
+
import { Dialog as xo } from "./components/dialog/dialog.component.js";
|
|
30
|
+
import { DialogArticle as po } from "./components/dialog-article/dialog-article.component.js";
|
|
31
|
+
import { Expenses as ao } from "./components/expenses/expenses.component.js";
|
|
32
|
+
import { Footer as io } from "./components/footer/footer.component.js";
|
|
33
|
+
import { FormRow as so } from "./components/form-row/form-row.component.js";
|
|
34
|
+
import { Header as uo } from "./components/header/header.component.js";
|
|
35
|
+
import { InfoPanel as Bo } from "./components/info-panel/info-panel.component.js";
|
|
36
|
+
import { Information as Fo } from "./components/information/information.component.js";
|
|
37
|
+
import { Layout as Lo } from "./components/layout/layout.component.js";
|
|
38
|
+
import { Line as To } from "./components/line/line.component.js";
|
|
39
|
+
import { Loader as Ro } from "./components/loader/loader.component.js";
|
|
40
|
+
import { MainAttachment as Do } from "./components/main-attachment/main-attachment.component.js";
|
|
41
|
+
import { Message as Po } from "./components/message/message.component.js";
|
|
42
|
+
import { MessageBlock as wo } from "./components/message-block/message-block.component.js";
|
|
43
|
+
import { NotFound as ko } from "./components/not-found/not-found.component.js";
|
|
44
|
+
import { Payment as Ho } from "./components/payment/payment.component.js";
|
|
45
|
+
import { Sidebar as Go } from "./components/sidebar/sidebar.component.js";
|
|
46
|
+
import { Signature as Uo } from "./components/signature/signature.component.js";
|
|
47
|
+
import { Svg as jo } from "./utils/svg/svg.component.js";
|
|
48
|
+
import { Text as zo } from "./components/text/text.component.js";
|
|
49
|
+
import { UserPanel as Ko } from "./components/user-panel/user-panel.component.js";
|
|
50
|
+
import { Warranty as Qo } from "./components/warranty/warranty.component.js";
|
|
51
|
+
import './assets/main-Dz2hrn4n.css';export {
|
|
52
|
+
Y as AccordionTable,
|
|
53
|
+
_ as BottomBar,
|
|
54
|
+
d as Box,
|
|
55
|
+
l as Button,
|
|
56
|
+
c as ButtonCard,
|
|
57
|
+
g as ButtonRadio,
|
|
58
|
+
C as ButtonText,
|
|
59
|
+
b as Caption,
|
|
60
|
+
S as CardImage,
|
|
61
|
+
I as CardText,
|
|
62
|
+
oo as Certifications,
|
|
63
|
+
A as Checkbox,
|
|
64
|
+
M as Choice,
|
|
65
|
+
eo as DataProtectedLabel,
|
|
66
|
+
xo as Dialog,
|
|
67
|
+
po as DialogArticle,
|
|
68
|
+
h as Dropdown,
|
|
69
|
+
y as ErrorMessage,
|
|
70
|
+
ao as Expenses,
|
|
71
|
+
e as FadeGrow,
|
|
72
|
+
x as FadeScale,
|
|
73
|
+
p as FadeSlide,
|
|
74
|
+
io as Footer,
|
|
75
|
+
so as FormRow,
|
|
76
|
+
uo as Header,
|
|
77
|
+
E as HiddenInput,
|
|
78
|
+
Bo as InfoPanel,
|
|
79
|
+
Fo as Information,
|
|
80
|
+
v as Input,
|
|
81
|
+
N as Label,
|
|
82
|
+
Lo as Layout,
|
|
83
|
+
To as Line,
|
|
84
|
+
Ro as Loader,
|
|
85
|
+
Do as MainAttachment,
|
|
86
|
+
Po as Message,
|
|
87
|
+
wo as MessageBlock,
|
|
88
|
+
ko as NotFound,
|
|
89
|
+
Ho as Payment,
|
|
90
|
+
W as Radio,
|
|
91
|
+
q as RadioLabel,
|
|
92
|
+
a as Rotate,
|
|
93
|
+
Go as Sidebar,
|
|
94
|
+
Uo as Signature,
|
|
95
|
+
J as Status,
|
|
96
|
+
jo as Svg,
|
|
97
|
+
zo as Text,
|
|
98
|
+
O as TextArea,
|
|
99
|
+
V as TextField,
|
|
100
|
+
Ko as UserPanel,
|
|
101
|
+
Qo as Warranty
|
|
100
102
|
};
|