@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
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as x } from "react";
|
|
3
|
-
import { useHover as v, useToggle as N } from "usehooks-ts";
|
|
4
|
-
import { ControlBox as j } from "../control-box/control-box.component.js";
|
|
5
|
-
import { ControlRadioText as B } from "../control-radio-text/control-radio-text.component.js";
|
|
6
|
-
import { ControlStatus as b } from "../control-status/control-status.component.js";
|
|
7
|
-
import '../../assets/control-button-radio-BodzD0rU.css';const g = "_ControlButtonRadio_1jar9_1", H = "_Row_1jar9_14", T = "_Wrap_1jar9_23", k = "_Content_1jar9_32", w = "_Text_1jar9_42", y = "_Hint_1jar9_50", t = {
|
|
8
|
-
ControlButtonRadio: g,
|
|
9
|
-
Row: H,
|
|
10
|
-
Wrap: T,
|
|
11
|
-
Content: k,
|
|
12
|
-
Text: w,
|
|
13
|
-
Hint: y
|
|
14
|
-
}, S = (i) => {
|
|
15
|
-
const {
|
|
16
|
-
children: d,
|
|
17
|
-
onClick: u,
|
|
18
|
-
onFocus: f,
|
|
19
|
-
onBlur: m,
|
|
20
|
-
info: e,
|
|
21
|
-
active: l = !1,
|
|
22
|
-
disabled: r = !1,
|
|
23
|
-
preventDefault: h = !1,
|
|
24
|
-
blurAfterClick: p = !1,
|
|
25
|
-
className: _
|
|
26
|
-
} = i, s = x(null), C = v(s), [R, a] = N(!1);
|
|
27
|
-
return /* @__PURE__ */ o(j, { ref: s, checked: l || C, state: "idle", focused: R, className: _, children: /* @__PURE__ */ o(
|
|
28
|
-
"button",
|
|
29
|
-
{
|
|
30
|
-
type: "button",
|
|
31
|
-
disabled: r,
|
|
32
|
-
className: t.ControlButtonRadio,
|
|
33
|
-
onClick: (c) => {
|
|
34
|
-
h && c.preventDefault(), p && c.currentTarget.blur(), u?.call(null);
|
|
35
|
-
},
|
|
36
|
-
onFocus: () => {
|
|
37
|
-
a(), f?.call(null);
|
|
38
|
-
},
|
|
39
|
-
onBlur: () => {
|
|
40
|
-
a(), m?.call(null);
|
|
41
|
-
},
|
|
42
|
-
children: /* @__PURE__ */ n("div", { className: t.Wrap, children: [
|
|
43
|
-
/* @__PURE__ */ o(b, { state: l ? "success" : "idle" }),
|
|
44
|
-
/* @__PURE__ */ n("div", { className: t.Content, children: [
|
|
45
|
-
/* @__PURE__ */ n("div", { className: t.Row, children: [
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
B,
|
|
48
|
-
{
|
|
49
|
-
oneLine: !0,
|
|
50
|
-
size: "body",
|
|
51
|
-
checked: l,
|
|
52
|
-
color: r ? "text-secondary" : "text-primary",
|
|
53
|
-
children: d
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
e?.text ? /* @__PURE__ */ o("span", { className: t.Text, children: e.text }) : null
|
|
57
|
-
] }),
|
|
58
|
-
(e?.hintLeft || e?.hintRight) && /* @__PURE__ */ n("div", { className: t.Row, children: [
|
|
59
|
-
/* @__PURE__ */ o("span", { className: t.Hint, children: e.hintLeft }),
|
|
60
|
-
/* @__PURE__ */ o("span", { className: t.Hint, children: e.hintRight })
|
|
61
|
-
] })
|
|
62
|
-
] })
|
|
63
|
-
] })
|
|
64
|
-
}
|
|
65
|
-
) });
|
|
66
|
-
};
|
|
67
|
-
export {
|
|
68
|
-
S as ControlButtonRadio
|
|
69
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsxs as S, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import _ from "clsx";
|
|
3
|
-
import { withControl as f } from "../../utils/functions/functions.util.js";
|
|
4
|
-
import { Svg as g } from "../../utils/svg/svg.component.js";
|
|
5
|
-
import '../../assets/control-button-text-BbE_5ebO.css';const L = "_ControlButtonText_1t9qc_1", M = "_TextPrimary_1t9qc_11", p = "_TextSecondary_1t9qc_15", C = "_AccentPrimary_1t9qc_19", P = "_AccentSecondary_1t9qc_23", B = "_ThemePrimary_1t9qc_27", A = "_ThemeSecondary_1t9qc_31", R = "_Left_1t9qc_35", b = "_Right_1t9qc_39", D = "_Icon_1t9qc_43", G = "_SM_1t9qc_47", I = "_MD_1t9qc_52", U = "_LG_1t9qc_57", N = "_Content_1t9qc_62", j = "_Light_1t9qc_81", v = "_Regular_1t9qc_85", k = "_Medium_1t9qc_89", F = "_Bold_1t9qc_93", $ = "_Underlined_1t9qc_97", t = {
|
|
6
|
-
ControlButtonText: L,
|
|
7
|
-
TextPrimary: M,
|
|
8
|
-
TextSecondary: p,
|
|
9
|
-
AccentPrimary: C,
|
|
10
|
-
AccentSecondary: P,
|
|
11
|
-
ThemePrimary: B,
|
|
12
|
-
ThemeSecondary: A,
|
|
13
|
-
Left: R,
|
|
14
|
-
Right: b,
|
|
15
|
-
Icon: D,
|
|
16
|
-
SM: G,
|
|
17
|
-
MD: I,
|
|
18
|
-
LG: U,
|
|
19
|
-
Content: N,
|
|
20
|
-
Light: j,
|
|
21
|
-
Regular: v,
|
|
22
|
-
Medium: k,
|
|
23
|
-
Bold: F,
|
|
24
|
-
Underlined: $
|
|
25
|
-
}, O = ({
|
|
26
|
-
children: a,
|
|
27
|
-
size: c = "md",
|
|
28
|
-
color: e = "text-primary",
|
|
29
|
-
weight: n = "medium",
|
|
30
|
-
type: m = "button",
|
|
31
|
-
icon: d = null,
|
|
32
|
-
iconPosition: r = "left",
|
|
33
|
-
underlined: s = !1,
|
|
34
|
-
disabled: i = !1,
|
|
35
|
-
preventDefault: l = !1,
|
|
36
|
-
blurAfterClick: y = !1,
|
|
37
|
-
onClick: u = () => {
|
|
38
|
-
},
|
|
39
|
-
onFocus: T = () => {
|
|
40
|
-
},
|
|
41
|
-
onBlur: x = () => {
|
|
42
|
-
},
|
|
43
|
-
className: h = "",
|
|
44
|
-
...q
|
|
45
|
-
}) => /* @__PURE__ */ S(
|
|
46
|
-
"button",
|
|
47
|
-
{
|
|
48
|
-
"data-testid": q["data-testid"],
|
|
49
|
-
type: m,
|
|
50
|
-
disabled: i,
|
|
51
|
-
className: _(t.ControlButtonText, h, {
|
|
52
|
-
[t.Left]: r === "left",
|
|
53
|
-
[t.Right]: r === "right",
|
|
54
|
-
[t.SM]: c === "sm",
|
|
55
|
-
[t.MD]: c === "md",
|
|
56
|
-
[t.LG]: c === "lg",
|
|
57
|
-
[t.TextPrimary]: e === "text-primary",
|
|
58
|
-
[t.TextSecondary]: e === "text-secondary",
|
|
59
|
-
[t.AccentPrimary]: e === "accent-primary",
|
|
60
|
-
[t.AccentSecondary]: e === "accent-secondary",
|
|
61
|
-
[t.ThemePrimary]: e === "theme-primary",
|
|
62
|
-
[t.ThemeSecondary]: e === "theme-secondary"
|
|
63
|
-
}),
|
|
64
|
-
onClick: f(u, { prevent: l, blur: y }),
|
|
65
|
-
onFocus: () => T(),
|
|
66
|
-
onBlur: () => x(),
|
|
67
|
-
children: [
|
|
68
|
-
/* @__PURE__ */ o(g, { icon: d, className: t.Icon }),
|
|
69
|
-
/* @__PURE__ */ o(
|
|
70
|
-
"span",
|
|
71
|
-
{
|
|
72
|
-
className: _(t.Content, {
|
|
73
|
-
[t.Light]: n === "light",
|
|
74
|
-
[t.Regular]: n === "regular",
|
|
75
|
-
[t.Medium]: n === "medium",
|
|
76
|
-
[t.Bold]: n === "bold",
|
|
77
|
-
[t.Underlined]: s
|
|
78
|
-
}),
|
|
79
|
-
children: a
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
export {
|
|
86
|
-
O as ControlButtonText
|
|
87
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Interactive, RadioChoice, ChoiceValue, State } from '../utils/types';
|
|
2
|
-
import { Base } from '../../utils/types';
|
|
3
|
-
export interface ControlCardImageProps extends Base, Interactive<ChoiceValue> {
|
|
4
|
-
sprite: string;
|
|
5
|
-
choices: RadioChoice[];
|
|
6
|
-
state?: State;
|
|
7
|
-
}
|
|
8
|
-
export declare const ControlCardImage: (props: ControlCardImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import N from "clsx";
|
|
3
|
-
import { ControlBox as b } from "../control-box/control-box.component.js";
|
|
4
|
-
import { ControlChoice as B } from "../control-choice/control-choice.component.js";
|
|
5
|
-
import { ControlHiddenInput as T } from "../control-hidden-input/control-hidden-input.component.js";
|
|
6
|
-
import { ControlRadioLabel as W } from "../control-radio-label/control-radio-label.component.js";
|
|
7
|
-
import { ControlRadioText as y } from "../control-radio-text/control-radio-text.component.js";
|
|
8
|
-
import { useChoice as j } from "../hooks/use-choice/use-choice.hook.js";
|
|
9
|
-
import { getChoiceId as R } from "../utils/functions/functions.util.js";
|
|
10
|
-
import '../../assets/control-card-image-BYT3bzTE.css';const $ = "_ControlCardImage_d0esr_1", z = "_Content_d0esr_13", H = "_Top_d0esr_27", L = "_Wrap_d0esr_32", q = "_Bottom_d0esr_43", r = {
|
|
11
|
-
ControlCardImage: $,
|
|
12
|
-
Content: z,
|
|
13
|
-
Top: H,
|
|
14
|
-
Wrap: L,
|
|
15
|
-
Bottom: q
|
|
16
|
-
}, O = (p) => {
|
|
17
|
-
const { sprite: c, choices: _, state: g = "idle", id: a, value: s, disabled: l, onChange: v, className: h } = p, { type: m, onChoiceChange: u } = j(s, a, v);
|
|
18
|
-
return /* @__PURE__ */ o("div", { className: N(r.ControlCardImage, h), children: _.map((t, I, f) => {
|
|
19
|
-
const n = R(a, t.value, I);
|
|
20
|
-
return /* @__PURE__ */ o(W, { id: n, value: s, state: g, choice: t, choices: f, children: ({ focused: i, hovered: x, checked: e, state: d }) => /* @__PURE__ */ o(b, { state: d, checked: e, focused: i, children: /* @__PURE__ */ C("div", { className: r.Content, children: [
|
|
21
|
-
/* @__PURE__ */ o(
|
|
22
|
-
T,
|
|
23
|
-
{
|
|
24
|
-
type: m,
|
|
25
|
-
id: n,
|
|
26
|
-
name: a,
|
|
27
|
-
value: t.value,
|
|
28
|
-
checked: e,
|
|
29
|
-
disabled: l,
|
|
30
|
-
onChange: () => u(t.value)
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ o("div", { className: r.Top, children: /* @__PURE__ */ o("div", { "data-image": t.icon, style: { backgroundImage: `url(${c})` }, className: r.Wrap }) }),
|
|
34
|
-
/* @__PURE__ */ C("div", { className: r.Bottom, children: [
|
|
35
|
-
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
36
|
-
B,
|
|
37
|
-
{
|
|
38
|
-
type: m,
|
|
39
|
-
state: d,
|
|
40
|
-
checked: e,
|
|
41
|
-
focused: i,
|
|
42
|
-
hovered: x,
|
|
43
|
-
disabled: l
|
|
44
|
-
}
|
|
45
|
-
) }),
|
|
46
|
-
/* @__PURE__ */ o(y, { size: "body-small", checked: e, children: t.label })
|
|
47
|
-
] })
|
|
48
|
-
] }) }) }, n);
|
|
49
|
-
}) });
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
O as ControlCardImage
|
|
53
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Interactive, RadioChoice, ChoiceValue, State } from '../utils/types';
|
|
2
|
-
import { Base } from '../../utils/types';
|
|
3
|
-
export interface ControlCardTextProps extends Base, Interactive<ChoiceValue> {
|
|
4
|
-
choices: RadioChoice[];
|
|
5
|
-
state?: State;
|
|
6
|
-
}
|
|
7
|
-
export declare const ControlCardText: (props: ControlCardTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as T } from "react/jsx-runtime";
|
|
2
|
-
import L from "clsx";
|
|
3
|
-
import { ControlBox as g } from "../control-box/control-box.component.js";
|
|
4
|
-
import { ControlChoice as N } from "../control-choice/control-choice.component.js";
|
|
5
|
-
import { ControlHiddenInput as q } from "../control-hidden-input/control-hidden-input.component.js";
|
|
6
|
-
import { ControlRadioLabel as I } from "../control-radio-label/control-radio-label.component.js";
|
|
7
|
-
import { ControlRadioText as j } from "../control-radio-text/control-radio-text.component.js";
|
|
8
|
-
import { useChoice as y } from "../hooks/use-choice/use-choice.hook.js";
|
|
9
|
-
import { getChoiceId as R } from "../utils/functions/functions.util.js";
|
|
10
|
-
import '../../assets/control-card-text-Cvv3bL2p.css';const z = "_ControlCardText_1rrqs_1", B = "_Label_1rrqs_9", H = "_Choice_1rrqs_24", l = {
|
|
11
|
-
ControlCardText: z,
|
|
12
|
-
Label: B,
|
|
13
|
-
Choice: H
|
|
14
|
-
}, O = (d) => {
|
|
15
|
-
const { choices: c, state: h = "idle", id: t, value: n, disabled: i = !1, onChange: p, className: x } = d, { type: s, onChoiceChange: _ } = y(n, t, p);
|
|
16
|
-
return /* @__PURE__ */ o("div", { className: L(l.ControlCardText, x), children: c.map((r, f, b) => {
|
|
17
|
-
const a = R(t, r.value, f);
|
|
18
|
-
return /* @__PURE__ */ o(I, { id: a, value: n, state: h, choice: r, choices: b, children: ({ focused: C, hovered: u, checked: e, state: m }) => /* @__PURE__ */ o(g, { state: m, checked: e, focused: C, children: /* @__PURE__ */ T("div", { className: l.Label, children: [
|
|
19
|
-
/* @__PURE__ */ o(
|
|
20
|
-
q,
|
|
21
|
-
{
|
|
22
|
-
type: s,
|
|
23
|
-
id: a,
|
|
24
|
-
name: t,
|
|
25
|
-
value: r.value,
|
|
26
|
-
checked: e,
|
|
27
|
-
disabled: i,
|
|
28
|
-
onChange: ($, v) => _(r.value, v)
|
|
29
|
-
}
|
|
30
|
-
),
|
|
31
|
-
/* @__PURE__ */ o("div", { className: l.Choice, children: /* @__PURE__ */ o(
|
|
32
|
-
N,
|
|
33
|
-
{
|
|
34
|
-
type: s,
|
|
35
|
-
state: m,
|
|
36
|
-
checked: e,
|
|
37
|
-
focused: C,
|
|
38
|
-
hovered: u,
|
|
39
|
-
disabled: i
|
|
40
|
-
}
|
|
41
|
-
) }),
|
|
42
|
-
/* @__PURE__ */ o(j, { size: "body", checked: e, children: r.label })
|
|
43
|
-
] }) }) }, a);
|
|
44
|
-
}) });
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
O as ControlCardText
|
|
48
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { Interactive, State } from '../utils/types';
|
|
3
|
-
import { ControlChoiceProps } from '../control-choice';
|
|
4
|
-
import { Base, FontSize } from '../../utils/types';
|
|
5
|
-
export interface ControlCheckboxProps extends Interactive<boolean>, PropsWithChildren<Base> {
|
|
6
|
-
state?: State;
|
|
7
|
-
iconSize?: ControlChoiceProps['size'];
|
|
8
|
-
textSize?: Extract<FontSize, 'body' | 'body-small'>;
|
|
9
|
-
message?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export declare const ControlCheckbox: (props: ControlCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useToggle as u } from "usehooks-ts";
|
|
3
|
-
import x from "clsx";
|
|
4
|
-
import { ControlChoice as F } from "../control-choice/control-choice.component.js";
|
|
5
|
-
import { ControlHiddenInput as L } from "../control-hidden-input/control-hidden-input.component.js";
|
|
6
|
-
import { Converter as N } from "../../utils/converter/converter.util.js";
|
|
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 = {
|
|
11
|
-
ControlCheckbox: j,
|
|
12
|
-
Label: H,
|
|
13
|
-
Choice: P,
|
|
14
|
-
Content: T,
|
|
15
|
-
Body: A,
|
|
16
|
-
BodySmall: D,
|
|
17
|
-
ErrorMessage: $
|
|
18
|
-
}, V = (b) => {
|
|
19
|
-
const {
|
|
20
|
-
children: p,
|
|
21
|
-
state: l = "idle",
|
|
22
|
-
iconSize: f = "md",
|
|
23
|
-
textSize: c = "body-small",
|
|
24
|
-
id: o,
|
|
25
|
-
value: t,
|
|
26
|
-
disabled: n = !1,
|
|
27
|
-
message: a = "",
|
|
28
|
-
onChange: i,
|
|
29
|
-
onFocus: g = () => {
|
|
30
|
-
},
|
|
31
|
-
onBlur: y = () => {
|
|
32
|
-
},
|
|
33
|
-
...B
|
|
34
|
-
} = b, [d, m] = u(!1), [k, h] = u(!1), v = (s) => {
|
|
35
|
-
n || d || (s.preventDefault(), i(!t, o));
|
|
36
|
-
}, S = (s) => {
|
|
37
|
-
n || (s.stopPropagation(), i(!t, o));
|
|
38
|
-
}, M = () => {
|
|
39
|
-
n || (m(), g(o));
|
|
40
|
-
}, E = () => {
|
|
41
|
-
n || (m(), y(o));
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ C("div", { "data-testid": _(B, "className", "control-checkbox"), className: x(e.ControlCheckbox, _), children: [
|
|
44
|
-
/* @__PURE__ */ C(
|
|
45
|
-
"label",
|
|
46
|
-
{
|
|
47
|
-
htmlFor: o,
|
|
48
|
-
className: e.Label,
|
|
49
|
-
onClick: v,
|
|
50
|
-
onFocus: M,
|
|
51
|
-
onBlur: E,
|
|
52
|
-
onMouseEnter: () => h(),
|
|
53
|
-
onMouseLeave: () => h(),
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ r(
|
|
56
|
-
L,
|
|
57
|
-
{
|
|
58
|
-
type: "checkbox",
|
|
59
|
-
id: o,
|
|
60
|
-
name: o,
|
|
61
|
-
value: N.Boolean.ToBooleanString(t),
|
|
62
|
-
checked: t,
|
|
63
|
-
disabled: n,
|
|
64
|
-
onChange: S
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ r("div", { className: e.Choice, children: /* @__PURE__ */ r(
|
|
68
|
-
F,
|
|
69
|
-
{
|
|
70
|
-
type: "checkbox",
|
|
71
|
-
size: f,
|
|
72
|
-
state: l,
|
|
73
|
-
checked: t,
|
|
74
|
-
focused: d,
|
|
75
|
-
hovered: k,
|
|
76
|
-
disabled: n
|
|
77
|
-
}
|
|
78
|
-
) }),
|
|
79
|
-
/* @__PURE__ */ r(
|
|
80
|
-
"div",
|
|
81
|
-
{
|
|
82
|
-
className: x(e.Content, {
|
|
83
|
-
[e.Body]: c === "body",
|
|
84
|
-
[e.BodySmall]: c === "body-small"
|
|
85
|
-
}),
|
|
86
|
-
children: p
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ r(I, { name: "text-message", condition: l === "error" && !!a, children: /* @__PURE__ */ r(z, { className: e.ErrorMessage, children: a }) })
|
|
93
|
-
] });
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
V as ControlCheckbox
|
|
97
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { State, ControlChoiceType } from '../utils';
|
|
2
|
-
import { Base, Size } from '../../utils/types';
|
|
3
|
-
export interface ControlChoiceProps extends Base {
|
|
4
|
-
type: ControlChoiceType;
|
|
5
|
-
checked: boolean;
|
|
6
|
-
state?: State;
|
|
7
|
-
size?: Size;
|
|
8
|
-
focused?: boolean;
|
|
9
|
-
hovered?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const ControlChoice: ({ type, checked, state, size, focused, hovered, disabled, className, }: ControlChoiceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Check as t } from "lucide-react";
|
|
3
|
-
import v from "clsx";
|
|
4
|
-
import '../../assets/control-choice-BAHN-VTm.css';const a = "_ControlChoice_f26v8_1", C = "_Focused_f26v8_24", i = "_Disabled_f26v8_24", h = "_Hovered_f26v8_28", x = "_Idle_f26v8_28", L = "_Success_f26v8_40", S = "_Radio_f26v8_50", k = "_Checked_f26v8_54", M = "_ChoiceMark_f26v8_63", m = "_XXS_f26v8_73", b = "_XS_f26v8_78", u = "_SM_f26v8_83", D = "_MD_f26v8_88", F = "_LG_f26v8_93", G = "_XL_f26v8_98", H = "_XXL_f26v8_103", I = "_XXXL_f26v8_108", R = "_Checkbox_f26v8_120", o = {
|
|
5
|
-
ControlChoice: a,
|
|
6
|
-
Focused: C,
|
|
7
|
-
Disabled: i,
|
|
8
|
-
Hovered: h,
|
|
9
|
-
Idle: x,
|
|
10
|
-
Success: L,
|
|
11
|
-
Error: "_Error_f26v8_44",
|
|
12
|
-
Radio: S,
|
|
13
|
-
Checked: k,
|
|
14
|
-
ChoiceMark: M,
|
|
15
|
-
XXS: m,
|
|
16
|
-
XS: b,
|
|
17
|
-
SM: u,
|
|
18
|
-
MD: D,
|
|
19
|
-
LG: F,
|
|
20
|
-
XL: G,
|
|
21
|
-
XXL: H,
|
|
22
|
-
XXXL: I,
|
|
23
|
-
Checkbox: R
|
|
24
|
-
}, g = ({
|
|
25
|
-
type: _,
|
|
26
|
-
checked: s,
|
|
27
|
-
state: e = "idle",
|
|
28
|
-
size: c = "md",
|
|
29
|
-
focused: X = !1,
|
|
30
|
-
hovered: d = !1,
|
|
31
|
-
disabled: l = !1,
|
|
32
|
-
className: n = ""
|
|
33
|
-
}) => /* @__PURE__ */ f(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
"data-testid": "choice",
|
|
37
|
-
className: v(o.ControlChoice, n, {
|
|
38
|
-
[o.Checked]: s,
|
|
39
|
-
[o.Focused]: X,
|
|
40
|
-
[o.Hovered]: d,
|
|
41
|
-
[o.Disabled]: l,
|
|
42
|
-
[o.Radio]: _ === "radio",
|
|
43
|
-
[o.Checkbox]: _ === "checkbox",
|
|
44
|
-
[o.Idle]: e === "idle",
|
|
45
|
-
[o.Error]: e === "error",
|
|
46
|
-
[o.Success]: e === "success" || s,
|
|
47
|
-
[o.XXS]: c === "xxs",
|
|
48
|
-
[o.XS]: c === "xs",
|
|
49
|
-
[o.SM]: c === "sm",
|
|
50
|
-
[o.MD]: c === "md",
|
|
51
|
-
[o.LG]: c === "lg",
|
|
52
|
-
[o.XL]: c === "xl",
|
|
53
|
-
[o.XXL]: c === "xxl",
|
|
54
|
-
[o.XXXL]: c === "xxxl"
|
|
55
|
-
}),
|
|
56
|
-
children: [
|
|
57
|
-
_ === "radio" && /* @__PURE__ */ r("div", { className: o.ChoiceMark }),
|
|
58
|
-
_ === "checkbox" && /* @__PURE__ */ r(t, { className: o.ChoiceMark })
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
export {
|
|
63
|
-
g as ControlChoice
|
|
64
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as p, useState as v, useEffect as R, useMemo as M } from "react";
|
|
3
|
-
import { useBoolean as T, useResizeObserver as $, useOnClickOutside as E } from "usehooks-ts";
|
|
4
|
-
import { ChevronDown as q, Search as J } from "lucide-react";
|
|
5
|
-
import b from "clsx";
|
|
6
|
-
import { ControlBox as k } from "../control-box/control-box.component.js";
|
|
7
|
-
import { ControlButton as P } from "../control-button/control-button.component.js";
|
|
8
|
-
import { ControlChoice as Q } from "../control-choice/control-choice.component.js";
|
|
9
|
-
import { ControlLabel as U } from "../control-label/control-label.component.js";
|
|
10
|
-
import { ControlRadioText as x } from "../control-radio-text/control-radio-text.component.js";
|
|
11
|
-
import { clickHasNode as X } from "../utils/functions/functions.util.js";
|
|
12
|
-
import { Converter as Y } from "../../utils/converter/converter.util.js";
|
|
13
|
-
import '../../assets/control-dropdown-DaS5KsvG.css';const Z = "_ControlDropdown_1jnau_1", ee = "_Border_1jnau_17", oe = "_Content_1jnau_28", ne = "_Chevron_1jnau_39", se = "_ChevronWrap_1jnau_53", ce = "_Box_1jnau_69", le = "_BoxVisible_1jnau_75", te = "_BoxHidden_1jnau_79", ie = "_Search_1jnau_83", re = "_SearchVisible_1jnau_89", ae = "_SearchHidden_1jnau_93", he = "_Close_1jnau_97", de = "_Input_1jnau_106", ue = "_Glass_1jnau_120", Ce = "_Choices_1jnau_131", _e = "_Choice_1jnau_131", me = "_ChoiceNoResult_1jnau_151", o = {
|
|
14
|
-
ControlDropdown: Z,
|
|
15
|
-
Border: ee,
|
|
16
|
-
Content: oe,
|
|
17
|
-
Chevron: ne,
|
|
18
|
-
ChevronWrap: se,
|
|
19
|
-
Box: ce,
|
|
20
|
-
BoxVisible: le,
|
|
21
|
-
BoxHidden: te,
|
|
22
|
-
Search: ie,
|
|
23
|
-
SearchVisible: re,
|
|
24
|
-
SearchHidden: ae,
|
|
25
|
-
Close: he,
|
|
26
|
-
Input: de,
|
|
27
|
-
Glass: ue,
|
|
28
|
-
Choices: Ce,
|
|
29
|
-
Choice: _e,
|
|
30
|
-
ChoiceNoResult: me
|
|
31
|
-
}, ke = (c) => {
|
|
32
|
-
const {
|
|
33
|
-
choices: B = [],
|
|
34
|
-
value: d = [],
|
|
35
|
-
isSearchHidden: y = !1,
|
|
36
|
-
multiple: r = !1,
|
|
37
|
-
onChange: u,
|
|
38
|
-
onOpen: H,
|
|
39
|
-
onClose: z,
|
|
40
|
-
className: D
|
|
41
|
-
} = c, V = c.label || "", I = c.placeholder || "Wählen Sie Ihre private Krankenversicherung...", O = c.noResult || "Keine Versicherung gefunden.", W = c.closeButton || "Schließen", S = p(null), C = p(null), N = p(null), { value: a, setFalse: _, toggle: A } = T(!1), [m, G] = v(""), [l, L] = v({ width: 0, height: 0 }), [h, j] = v([]);
|
|
42
|
-
$({
|
|
43
|
-
ref: C,
|
|
44
|
-
onResize: (e) => L({ width: e.width || 0, height: e.height || 0 })
|
|
45
|
-
}), E(C, (e) => {
|
|
46
|
-
X(e, S) || (r && u(h), _());
|
|
47
|
-
}), R(() => j(Array.isArray(d) ? d : []), [d]), R(() => {
|
|
48
|
-
a && l.width && l.height ? (N.current?.focus(), H?.call(null, l.height, l.width)) : z?.call(null);
|
|
49
|
-
}, [a, l]);
|
|
50
|
-
const F = (e, t) => {
|
|
51
|
-
j((i) => i.some(({ value: f }) => f === e) ? i.filter(({ value: f }) => f !== e) : [...i, { value: e, label: t }]);
|
|
52
|
-
}, K = () => {
|
|
53
|
-
_(), u(h);
|
|
54
|
-
}, g = M(
|
|
55
|
-
() => B.filter(({ label: e }) => e.toLowerCase().includes(m.toLowerCase())),
|
|
56
|
-
[m, B]
|
|
57
|
-
);
|
|
58
|
-
return /* @__PURE__ */ s("div", { className: b(o.ControlDropdown, D), children: [
|
|
59
|
-
/* @__PURE__ */ n(k, { ref: S, onClick: A, children: /* @__PURE__ */ s("div", { className: o.Border, children: [
|
|
60
|
-
/* @__PURE__ */ s("div", { className: o.Content, children: [
|
|
61
|
-
/* @__PURE__ */ n(U, { position: "active", children: V }),
|
|
62
|
-
/* @__PURE__ */ n(x, { size: "body", checked: !0, oneLine: !0, children: Y.Answer.FromArrayToMultiple(h.map(({ label: e }) => e)) || I })
|
|
63
|
-
] }),
|
|
64
|
-
/* @__PURE__ */ n("div", { className: o.ChevronWrap, children: /* @__PURE__ */ n(q, { "data-open": a, className: o.Chevron }) })
|
|
65
|
-
] }) }),
|
|
66
|
-
/* @__PURE__ */ n(k, { ref: C, className: a ? o.BoxVisible : o.BoxHidden, children: /* @__PURE__ */ s("div", { className: o.Box, children: [
|
|
67
|
-
/* @__PURE__ */ s("div", { className: b(o.Search, y ? o.SearchHidden : o.SearchVisible), children: [
|
|
68
|
-
/* @__PURE__ */ n(
|
|
69
|
-
"input",
|
|
70
|
-
{
|
|
71
|
-
ref: N,
|
|
72
|
-
value: m,
|
|
73
|
-
type: "text",
|
|
74
|
-
className: o.Input,
|
|
75
|
-
onChange: (e) => G(e.target.value)
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ n(J, { className: o.Glass })
|
|
79
|
-
] }),
|
|
80
|
-
/* @__PURE__ */ n("ul", { className: o.Choices, children: g.length ? g.map(({ value: e, label: t }, i) => /* @__PURE__ */ s(
|
|
81
|
-
"li",
|
|
82
|
-
{
|
|
83
|
-
className: o.Choice,
|
|
84
|
-
onClick: () => {
|
|
85
|
-
r ? F(e, t) : (_(), u([{ value: e, label: t }]));
|
|
86
|
-
},
|
|
87
|
-
children: [
|
|
88
|
-
r && /* @__PURE__ */ n(
|
|
89
|
-
Q,
|
|
90
|
-
{
|
|
91
|
-
type: "checkbox",
|
|
92
|
-
checked: h.some((w) => w.value === e)
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ n(x, { size: "body", checked: !1, children: t })
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
e + i
|
|
99
|
-
)) : /* @__PURE__ */ n("li", { className: b(o.Choice, o.ChoiceNoResult), children: /* @__PURE__ */ n(x, { size: "body", checked: !1, children: O }) }) }),
|
|
100
|
-
r && /* @__PURE__ */ n("div", { className: o.Close, children: /* @__PURE__ */ n(P, { color: "primary", size: "sm", type: "button", onClick: () => K(), children: W }) })
|
|
101
|
-
] }) })
|
|
102
|
-
] });
|
|
103
|
-
};
|
|
104
|
-
export {
|
|
105
|
-
ke as ControlDropdown
|
|
106
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { Base } from '../../utils/types';
|
|
3
|
-
/**
|
|
4
|
-
* `ControlErrorMessage` renders validation feedback text in an error style. Use it below a control to
|
|
5
|
-
* communicate required fields, invalid input, or any form-level validation issue.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ControlErrorMessage: ({ children, ...base }: PropsWithChildren<Base>) => import("react/jsx-runtime").JSX.Element;
|