@arthurzakharov/ui-kit 1.0.6 → 1.0.7
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/assets/card-image-DQ9c4G_r.css +1 -0
- package/dist/assets/card-text-fgHu9TyO.css +1 -0
- package/dist/assets/checkbox-n_3O8ZLW.css +1 -0
- package/dist/assets/dropdown-DKR8xas9.css +1 -0
- package/dist/assets/radio-BkD7BKk0.css +1 -0
- package/dist/assets/text-Dt0DeN-I.css +1 -0
- package/dist/assets/textarea-qkrRnSO5.css +1 -0
- package/dist/components/certifications/certifications.component.d.ts +5 -1
- package/dist/components/control/components/box/box.component.d.ts +9 -1
- package/dist/components/control/components/box/box.component.js +13 -13
- package/dist/components/control/components/button/button.component.d.ts +12 -1
- package/dist/components/control/components/button/button.component.js +26 -26
- package/dist/components/control/components/card-image/card-image.component.d.ts +6 -1
- package/dist/components/control/components/card-image/card-image.component.js +57 -5
- package/dist/components/control/components/card-text/card-text.component.d.ts +5 -1
- package/dist/components/control/components/card-text/card-text.component.js +45 -5
- package/dist/components/control/components/checkbox/checkbox.component.d.ts +5 -1
- package/dist/components/control/components/checkbox/checkbox.component.js +49 -5
- package/dist/components/control/components/choice/choice.component.d.ts +8 -1
- package/dist/components/control/components/dropdown/dropdown.component.d.ts +14 -1
- package/dist/components/control/components/dropdown/dropdown.component.js +95 -9
- package/dist/components/control/components/hidden-input/hidden-input.component.d.ts +11 -1
- package/dist/components/control/components/hidden-input/hidden-input.component.js +14 -15
- package/dist/components/control/components/input/input.component.d.ts +7 -1
- package/dist/components/control/components/input/input.component.js +25 -25
- package/dist/components/control/components/label/label.component.d.ts +6 -1
- package/dist/components/control/components/radio/radio.component.d.ts +6 -1
- package/dist/components/control/components/radio/radio.component.js +54 -5
- package/dist/components/control/components/radio-label/radio-label.component.d.ts +16 -2
- package/dist/components/control/components/radio-text/radio-text.component.d.ts +6 -1
- package/dist/components/control/components/text/text.component.d.ts +6 -1
- package/dist/components/control/components/text/text.component.js +47 -5
- package/dist/components/control/components/textarea/textarea.component.d.ts +8 -1
- package/dist/components/control/components/textarea/textarea.component.js +34 -4
- package/dist/components/control/control.component.d.ts +17 -0
- package/dist/components/control/control.component.js +35 -0
- package/dist/main.d.ts +2 -2
- package/dist/main.js +1 -1
- package/dist/utils/converter/converter.d.ts +2 -1
- package/package.json +12 -4
- package/dist/assets/index-CqamBlbE.css +0 -1
- package/dist/components/certifications/certifications.types.d.ts +0 -5
- package/dist/components/certifications/certifications.types.js +0 -1
- package/dist/components/certifications/index.d.ts +0 -1
- package/dist/components/certifications/index.js +0 -4
- package/dist/components/control/components/box/box.types.d.ts +0 -9
- package/dist/components/control/components/box/box.types.js +0 -1
- package/dist/components/control/components/box/index.d.ts +0 -1
- package/dist/components/control/components/box/index.js +0 -4
- package/dist/components/control/components/button/button.types.d.ts +0 -16
- package/dist/components/control/components/button/button.types.js +0 -1
- package/dist/components/control/components/button/index.d.ts +0 -1
- package/dist/components/control/components/button/index.js +0 -4
- package/dist/components/control/components/card-image/card-image.types.d.ts +0 -6
- package/dist/components/control/components/card-image/card-image.types.js +0 -1
- package/dist/components/control/components/card-image/index.d.ts +0 -1
- package/dist/components/control/components/card-image/index.js +0 -4
- package/dist/components/control/components/card-text/card-text.types.d.ts +0 -5
- package/dist/components/control/components/card-text/card-text.types.js +0 -1
- package/dist/components/control/components/card-text/index.d.ts +0 -1
- package/dist/components/control/components/card-text/index.js +0 -4
- package/dist/components/control/components/checkbox/checkbox.types.d.ts +0 -5
- package/dist/components/control/components/checkbox/checkbox.types.js +0 -1
- package/dist/components/control/components/checkbox/index.d.ts +0 -1
- package/dist/components/control/components/checkbox/index.js +0 -4
- package/dist/components/control/components/choice/choice.types.d.ts +0 -8
- package/dist/components/control/components/choice/choice.types.js +0 -1
- package/dist/components/control/components/choice/index.d.ts +0 -1
- package/dist/components/control/components/choice/index.js +0 -4
- package/dist/components/control/components/dropdown/dropdown.types.d.ts +0 -14
- package/dist/components/control/components/dropdown/dropdown.types.js +0 -1
- package/dist/components/control/components/dropdown/index.d.ts +0 -1
- package/dist/components/control/components/dropdown/index.js +0 -4
- package/dist/components/control/components/hidden-input/hidden-input.types.d.ts +0 -11
- package/dist/components/control/components/hidden-input/hidden-input.types.js +0 -1
- package/dist/components/control/components/hidden-input/index.d.ts +0 -1
- package/dist/components/control/components/hidden-input/index.js +0 -4
- package/dist/components/control/components/input/index.d.ts +0 -1
- package/dist/components/control/components/input/index.js +0 -4
- package/dist/components/control/components/input/input.types.d.ts +0 -7
- package/dist/components/control/components/input/input.types.js +0 -1
- package/dist/components/control/components/label/index.d.ts +0 -1
- package/dist/components/control/components/label/index.js +0 -4
- package/dist/components/control/components/label/label.types.d.ts +0 -8
- package/dist/components/control/components/label/label.types.js +0 -1
- package/dist/components/control/components/radio/index.d.ts +0 -1
- package/dist/components/control/components/radio/index.js +0 -4
- package/dist/components/control/components/radio/radio.types.d.ts +0 -6
- package/dist/components/control/components/radio/radio.types.js +0 -1
- package/dist/components/control/components/radio-label/index.d.ts +0 -1
- package/dist/components/control/components/radio-label/index.js +0 -4
- package/dist/components/control/components/radio-label/radio-label.types.d.ts +0 -17
- package/dist/components/control/components/radio-label/radio-label.types.js +0 -1
- package/dist/components/control/components/radio-text/index.d.ts +0 -1
- package/dist/components/control/components/radio-text/index.js +0 -4
- package/dist/components/control/components/radio-text/radio-text.types.d.ts +0 -6
- package/dist/components/control/components/radio-text/radio-text.types.js +0 -1
- package/dist/components/control/components/text/index.d.ts +0 -1
- package/dist/components/control/components/text/index.js +0 -4
- package/dist/components/control/components/text/text.types.d.ts +0 -6
- package/dist/components/control/components/text/text.types.js +0 -1
- package/dist/components/control/components/textarea/index.d.ts +0 -1
- package/dist/components/control/components/textarea/index.js +0 -4
- package/dist/components/control/components/textarea/textarea.types.d.ts +0 -8
- package/dist/components/control/components/textarea/textarea.types.js +0 -1
- package/dist/components/control/hooks/index.d.ts +0 -1
- package/dist/components/control/hooks/index.js +0 -4
- package/dist/components/control/hooks/useChoice/index.d.ts +0 -1
- package/dist/components/control/hooks/useChoice/index.js +0 -4
- package/dist/components/control/index.d.ts +0 -17
- package/dist/components/control/index.js +0 -12
- package/dist/components/control/types.js +0 -1
- package/dist/components/control/utils/index.d.ts +0 -1
- package/dist/components/control/utils/index.js +0 -6
- package/dist/enums.d.ts +0 -14
- package/dist/enums.js +0 -4
- package/dist/index-DtupH5zG.js +0 -405
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -1
- package/dist/utils/converter/index.d.ts +0 -1
- package/dist/utils/converter/index.js +0 -4
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -6
- package/dist/utils/time/index.d.ts +0 -1
- package/dist/utils/time/index.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._CardImage_dw1xq_1{--font-size: 12px;--line-height: 14px;--img-size: 110px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--rm-ui-padding-xs)}._CardImageContent_dw1xq_13{width:135px;height:130px;padding:6px;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}._CardImageContent_dw1xq_13:hover{cursor:pointer}._CardImageTop_dw1xq_27{position:relative;flex-grow:1}._CardImageWrap_dw1xq_32{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--img-size);height:var(--img-size);background-repeat:no-repeat;background-size:700%}._CardImageBottom_dw1xq_43{flex-basis:calc(var(--line-height) * 2);display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center;gap:var(--rm-ui-padding-xs)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._CardText_1eht8_1{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--rm-ui-padding-sm)}._CardTextLabel_1eht8_9{position:relative;padding:var(--rm-ui-padding-md) var(--rm-ui-padding-sm);flex-basis:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._CardTextLabel_1eht8_9:hover{cursor:pointer}._CardTextChoice_1eht8_24{display:flex;flex-direction:row;align-items:center;justify-content:center}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Checkbox_1l6ko_1{position:relative;display:inline-flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._Checkbox_1l6ko_1:hover{cursor:pointer}._CheckboxChoice_1l6ko_14{position:relative;left:0;top:3px}._CheckboxContent_1l6ko_20{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-primary)}._CheckboxContent_1l6ko_20 button{background-color:transparent;border:none;padding:0;font-family:inherit;font-size:inherit;line-height:inherit;color:var(--rm-ui-color-action)}._CheckboxContent_1l6ko_20 button:hover{cursor:pointer;text-decoration:underline}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Dropdown_152mp_1{--transition-time: .2s;--under-chevron: linear-gradient(90deg, rgba(255, 255, 255, 0) -10%, rgba(255, 255, 255, .5411764706) 25%, #fff 50%);--border-radius: 3px;position:relative;font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-primary);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xxs)}._DropdownBorder_152mp_17{position:relative;min-height:60px;flex-grow:1;display:flex;align-items:center;justify-content:flex-start;padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);overflow:hidden}._DropdownContent_152mp_28{display:flex;flex-direction:column;align-items:flex-start;justify-content:center}._DropdownBorder_152mp_17:hover{cursor:pointer}._DropdownChevron_152mp_39{width:24px;height:24px;transition:transform var(--transition-time) ease-out}._DropdownChevron_152mp_39[data-open=false]{transform:rotate(0)}._DropdownChevron_152mp_39[data-open=true]{transform:rotate(180deg)}._DropdownChevronWrap_152mp_53{position:absolute;z-index:1;right:0;top:50%;transform:translateY(-50%);background:var(--under-chevron);border-radius:10px;width:80px;height:100%;padding-right:var(--rm-ui-padding-sm);display:flex;justify-content:flex-end;align-items:center}._DropdownBox_152mp_69{flex-grow:1;border-radius:10px;background-color:var(--rm-ui-grey-50)}._DropdownBoxVisible_152mp_75{display:block}._DropdownBoxHidden_152mp_79{display:none}._DropdownSearch_152mp_83{position:relative;border-bottom:1px var(--rm-ui-grey-300) solid;padding:var(--rm-ui-padding-sm)}._DropdownSearchVisible_152mp_89{display:block}._DropdownSearchHidden_152mp_93{display:none}._DropdownClose_152mp_97{border-top:1px var(--rm-ui-grey-300) solid;padding:var(--rm-ui-padding-sm);display:flex;flex-direction:row;align-items:center;justify-content:flex-end}._DropdownInput_152mp_106{width:100%;border-radius:10px;padding:var(--rm-ui-padding-xs) calc(var(--rm-ui-padding-sm) * 2 + 12px) var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);border:1px var(--rm-ui-grey-300) solid;box-sizing:border-box;font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-primary);outline-color:var(--rm-ui-color-accent-primary)}._DropdownGlass_152mp_120{position:absolute;z-index:1;right:calc(var(--rm-ui-padding-sm) * 2);top:50%;transform:translateY(-50%);width:24px;height:24px;color:var(--rm-ui-grey-300)}._DropdownChoices_152mp_131{list-style:none;margin:0;padding:0;max-height:228px;overflow-y:scroll;border-radius:10px}._DropdownChoice_152mp_131{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-sm);padding:6px var(--rm-ui-padding-sm)}._DropdownChoice_152mp_131:hover{cursor:pointer;background-color:#fff}._DropdownChoiceNoResult_152mp_154{color:var(--rm-ui-grey-600);text-align:center}html[dir=rtl] ._DropdownGlass_152mp_120{left:31px;right:initial}html[dir=rtl] ._DropdownChevronWrap_152mp_53{left:19px;right:initial}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Radio_1wc8m_1{display:inline-flex}._RadioOrientationHorizontal_1wc8m_5{flex-direction:row;gap:var(--rm-ui-padding-lg)}._RadioOrientationVertical_1wc8m_10{flex-direction:column;gap:var(--rm-ui-padding-xxs)}._RadioLabel_1wc8m_15{position:relative;display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._RadioLabel_1wc8m_15:hover{cursor:pointer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Text_1ble1_1{box-sizing:border-box;position:relative;flex-grow:1;height:58px;padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);display:flex;flex-direction:row;justify-content:stretch;align-items:flex-end}._Text_1ble1_1:hover{cursor:pointer}._TextLabel_1ble1_17{position:absolute;left:var(--rm-ui-padding-sm);transition:top .15s ease-out}._TextLabelIdle_1ble1_23{top:50%;transform:translateY(-50%)}._TextLabelActive_1ble1_28{top:var(--rm-ui-padding-xs);transform:translateY(0)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Textarea_1ltsl_1{resize:none;outline:none;box-sizing:border-box;width:100%;border:none;border-radius:10px;padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);font-family:var(--rm-ui-font-family-medium),sans-serif;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-primary)}._Textarea_1ltsl_1:hover{cursor:pointer}._Textarea_1ltsl_1:disabled{opacity:.33}._Textarea_1ltsl_1:disabled,._Textarea_1ltsl_1:-webkit-autofill,._Textarea_1ltsl_1:-webkit-autofill:hover,._Textarea_1ltsl_1:-webkit-autofill:focus,._Textarea_1ltsl_1:-webkit-autofill:active,._Textarea_1ltsl_1:autofill,._Textarea_1ltsl_1:autofill:hover,._Textarea_1ltsl_1:autofill:focus,._Textarea_1ltsl_1:autofill:active{background:transparent;transition:background 7200s ease-in-out 0s}._Textarea_1ltsl_1:-webkit-autofill{animation-name:_autofill-start_1ltsl_1;animation-duration:.1s;-webkit-text-fill-color:var(--rm-ui-grey-500)}._Textarea_1ltsl_1:not(:-webkit-autofill){animation-name:_autofill-cancel_1ltsl_1;animation-duration:.1s}@keyframes _autofill-start_1ltsl_1{}@keyframes _autofill-cancel_1ltsl_1{}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type CertificationIcon = 'free' | 'gdpr' | 'ssl';
|
|
2
|
+
type CertificationsProps = Readonly<{
|
|
3
|
+
icons?: CertificationIcon[];
|
|
4
|
+
}>;
|
|
2
5
|
export declare const Certifications: ({ icons }: CertificationsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { State } from '../../types';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
export interface BoxProps extends PropsWithChildren {
|
|
4
|
+
state?: State;
|
|
5
|
+
focused?: boolean;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
2
10
|
export declare const Box: import('react').ForwardRefExoticComponent<BoxProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as _ } from "react";
|
|
3
|
-
import
|
|
4
|
-
import '../../../../assets/box-b_yPaNPs.css';const
|
|
5
|
-
Box:
|
|
6
|
-
BoxChecked:
|
|
3
|
+
import l from "clsx";
|
|
4
|
+
import '../../../../assets/box-b_yPaNPs.css';const i = "_Box_1tiwz_1", S = "_BoxChecked_1tiwz_15", n = "_BoxStateIdle_1tiwz_21", u = "_BoxFocused_1tiwz_25", m = "_BoxStateError_1tiwz_30", f = "_BoxStateSuccess_1tiwz_34", o = {
|
|
5
|
+
Box: i,
|
|
6
|
+
BoxChecked: S,
|
|
7
7
|
BoxStateIdle: n,
|
|
8
8
|
BoxFocused: u,
|
|
9
9
|
BoxStateError: m,
|
|
10
10
|
BoxStateSuccess: f
|
|
11
|
-
},
|
|
12
|
-
const { children:
|
|
11
|
+
}, z = _((e, c) => {
|
|
12
|
+
const { children: s, className: x, focused: r, checked: B = !1, state: t = "idle", onClick: a } = e;
|
|
13
13
|
return /* @__PURE__ */ d(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
16
|
"data-testid": "box",
|
|
17
|
-
ref:
|
|
18
|
-
className:
|
|
19
|
-
[o.BoxFocused]:
|
|
20
|
-
[o.BoxChecked]:
|
|
17
|
+
ref: c,
|
|
18
|
+
className: l(o.Box, x, {
|
|
19
|
+
[o.BoxFocused]: r,
|
|
20
|
+
[o.BoxChecked]: B,
|
|
21
21
|
[o.BoxStateIdle]: t === "idle",
|
|
22
22
|
[o.BoxStateError]: t === "error",
|
|
23
23
|
[o.BoxStateSuccess]: t === "success"
|
|
24
24
|
}),
|
|
25
|
-
onClick: () =>
|
|
26
|
-
children:
|
|
25
|
+
onClick: () => a?.call(null),
|
|
26
|
+
children: s
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
z as Box
|
|
32
32
|
};
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export interface ButtonProps extends PropsWithChildren {
|
|
3
|
+
color: 'next' | 'previous';
|
|
4
|
+
size: 'sm' | 'md' | 'lg';
|
|
5
|
+
type: 'submit' | 'reset' | 'button';
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
info?: string;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
onFocus?: () => void;
|
|
11
|
+
onBlur?: () => void;
|
|
12
|
+
}
|
|
2
13
|
export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import h from "clsx";
|
|
3
3
|
import { containsHtml as m } from "../../utils/utils.js";
|
|
4
|
-
import '../../../../assets/button-XGvsKGqH.css';const S = "_Button_hr1uu_1", x = "_ButtonSizeSm_hr1uu_10", z = "_ButtonText_hr1uu_15", f = "_ButtonSizeMd_hr1uu_21",
|
|
4
|
+
import '../../../../assets/button-XGvsKGqH.css';const S = "_Button_hr1uu_1", x = "_ButtonSizeSm_hr1uu_10", z = "_ButtonText_hr1uu_15", f = "_ButtonSizeMd_hr1uu_21", C = "_ButtonSizeLg_hr1uu_22", p = "_ButtonColorNext_hr1uu_37", N = "_ButtonColorPrevious_hr1uu_45", g = "_ButtonFullWidth_hr1uu_61", F = "_ButtonInfo_hr1uu_69", t = {
|
|
5
5
|
Button: S,
|
|
6
6
|
ButtonSizeSm: x,
|
|
7
7
|
ButtonText: z,
|
|
8
8
|
ButtonSizeMd: f,
|
|
9
|
-
ButtonSizeLg:
|
|
10
|
-
ButtonColorNext:
|
|
9
|
+
ButtonSizeLg: C,
|
|
10
|
+
ButtonColorNext: p,
|
|
11
11
|
ButtonColorPrevious: N,
|
|
12
12
|
ButtonFullWidth: g,
|
|
13
|
-
ButtonInfo:
|
|
14
|
-
},
|
|
13
|
+
ButtonInfo: F
|
|
14
|
+
}, M = (e) => {
|
|
15
15
|
const {
|
|
16
|
-
children:
|
|
17
|
-
color:
|
|
16
|
+
children: s,
|
|
17
|
+
color: l,
|
|
18
18
|
size: n,
|
|
19
|
-
type:
|
|
20
|
-
disabled:
|
|
19
|
+
type: B,
|
|
20
|
+
disabled: r = !1,
|
|
21
21
|
info: o = "",
|
|
22
|
-
fullWidth:
|
|
23
|
-
onClick:
|
|
24
|
-
onFocus:
|
|
25
|
-
onBlur:
|
|
26
|
-
} =
|
|
22
|
+
fullWidth: i = !1,
|
|
23
|
+
onClick: c,
|
|
24
|
+
onFocus: _,
|
|
25
|
+
onBlur: a
|
|
26
|
+
} = e;
|
|
27
27
|
return /* @__PURE__ */ d(
|
|
28
28
|
"button",
|
|
29
29
|
{
|
|
30
30
|
"data-testid": "button",
|
|
31
|
-
type:
|
|
32
|
-
disabled:
|
|
31
|
+
type: B,
|
|
32
|
+
disabled: r,
|
|
33
33
|
className: h(t.Button, {
|
|
34
34
|
[t.ButtonSizeSm]: n === "sm",
|
|
35
35
|
[t.ButtonSizeMd]: n === "md",
|
|
36
36
|
[t.ButtonSizeLg]: n === "lg",
|
|
37
|
-
[t.ButtonColorNext]:
|
|
38
|
-
[t.ButtonColorPrevious]:
|
|
39
|
-
[t.ButtonFullWidth]:
|
|
37
|
+
[t.ButtonColorNext]: l === "next",
|
|
38
|
+
[t.ButtonColorPrevious]: l === "previous",
|
|
39
|
+
[t.ButtonFullWidth]: i
|
|
40
40
|
}),
|
|
41
|
-
onClick: () =>
|
|
42
|
-
onFocus: () =>
|
|
43
|
-
onBlur: () =>
|
|
41
|
+
onClick: () => c?.call(null),
|
|
42
|
+
onFocus: () => _?.call(null),
|
|
43
|
+
onBlur: () => a?.call(null),
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
m(o) && o ? /* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ u("span", { className: t.ButtonText, children: s }),
|
|
46
|
+
m(o) && o ? /* @__PURE__ */ u("span", { className: t.ButtonInfo, dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ u("span", { className: t.ButtonInfo, children: o })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
M as Button
|
|
53
53
|
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Interactive, RadioChoice, ChoiceValue, State } from '../../types';
|
|
2
|
+
export interface CardImageProps extends Interactive<ChoiceValue> {
|
|
3
|
+
sprite: string;
|
|
4
|
+
choices: RadioChoice[];
|
|
5
|
+
state?: State;
|
|
6
|
+
}
|
|
2
7
|
export declare const CardImage: (props: CardImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,59 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
1
|
+
import { jsx as a, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { Box as f } from "../box/box.component.js";
|
|
3
|
+
import { Choice as q } from "../choice/choice.component.js";
|
|
4
|
+
import { HiddenInput as w } from "../hidden-input/hidden-input.component.js";
|
|
5
|
+
import { RadioLabel as B } from "../radio-label/radio-label.component.js";
|
|
6
|
+
import { RadioText as N } from "../radio-text/radio-text.component.js";
|
|
7
|
+
import { useChoice as T } from "../../hooks/useChoice/useChoice.hook.js";
|
|
8
|
+
import { getChoiceId as b } from "../../utils/utils.js";
|
|
9
|
+
import '../../../../assets/card-image-DQ9c4G_r.css';const W = "_CardImage_dw1xq_1", j = "_CardImageContent_dw1xq_13", y = "_CardImageTop_dw1xq_27", R = "_CardImageWrap_dw1xq_32", $ = "_CardImageBottom_dw1xq_43", r = {
|
|
10
|
+
CardImage: W,
|
|
11
|
+
CardImageContent: j,
|
|
12
|
+
CardImageTop: y,
|
|
13
|
+
CardImageWrap: R,
|
|
14
|
+
CardImageBottom: $
|
|
15
|
+
}, J = (l) => {
|
|
16
|
+
const { sprite: I, choices: p, state: c = "idle", id: d, value: t, disabled: n, onChange: _ } = l, { type: i, onChoiceChange: v } = T(t, d, _);
|
|
17
|
+
return /* @__PURE__ */ a("div", { className: r.CardImage, children: p.map((e, h, u) => {
|
|
18
|
+
const m = b(d, e.value, h);
|
|
19
|
+
return /* @__PURE__ */ a(B, { id: m, value: t, state: c, choice: e, choices: u, children: ({ focused: s, hovered: x, checked: o, state: C }) => /* @__PURE__ */ a(f, { state: C, checked: o, focused: s, children: /* @__PURE__ */ g("div", { className: r.CardImageContent, children: [
|
|
20
|
+
/* @__PURE__ */ a(
|
|
21
|
+
w,
|
|
22
|
+
{
|
|
23
|
+
type: i,
|
|
24
|
+
id: m,
|
|
25
|
+
name: d,
|
|
26
|
+
value: e.value,
|
|
27
|
+
checked: o,
|
|
28
|
+
disabled: n,
|
|
29
|
+
onChange: () => v(e.value)
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ a("div", { className: r.CardImageTop, children: /* @__PURE__ */ a(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
"data-image": e.icon,
|
|
36
|
+
style: { backgroundImage: `url(${I})` },
|
|
37
|
+
className: r.CardImageWrap
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ g("div", { className: r.CardImageBottom, children: [
|
|
41
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
42
|
+
q,
|
|
43
|
+
{
|
|
44
|
+
type: i,
|
|
45
|
+
state: C,
|
|
46
|
+
checked: o,
|
|
47
|
+
focused: s,
|
|
48
|
+
hovered: x,
|
|
49
|
+
disabled: n
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ a(N, { size: "md", checked: o, children: e.label })
|
|
53
|
+
] })
|
|
54
|
+
] }) }) }, m);
|
|
55
|
+
}) });
|
|
56
|
+
};
|
|
5
57
|
export {
|
|
6
|
-
|
|
58
|
+
J as CardImage
|
|
7
59
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Interactive, RadioChoice, ChoiceValue, State } from '../../types';
|
|
2
|
+
export interface CardTextProps extends Interactive<ChoiceValue> {
|
|
3
|
+
choices: RadioChoice[];
|
|
4
|
+
state?: State;
|
|
5
|
+
}
|
|
2
6
|
export declare const CardText: (props: CardTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,47 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
1
|
+
import { jsx as e, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import { Box as b } from "../box/box.component.js";
|
|
3
|
+
import { Choice as g } from "../choice/choice.component.js";
|
|
4
|
+
import { HiddenInput as L } from "../hidden-input/hidden-input.component.js";
|
|
5
|
+
import { RadioLabel as I } from "../radio-label/radio-label.component.js";
|
|
6
|
+
import { RadioText as N } from "../radio-text/radio-text.component.js";
|
|
7
|
+
import { useChoice as j } from "../../hooks/useChoice/useChoice.hook.js";
|
|
8
|
+
import { getChoiceId as R } from "../../utils/utils.js";
|
|
9
|
+
import '../../../../assets/card-text-fgHu9TyO.css';const y = "_CardText_1eht8_1", z = "_CardTextLabel_1eht8_9", B = "_CardTextChoice_1eht8_24", i = {
|
|
10
|
+
CardText: y,
|
|
11
|
+
CardTextLabel: z,
|
|
12
|
+
CardTextChoice: B
|
|
13
|
+
}, J = (m) => {
|
|
14
|
+
const { choices: x, state: c = "idle", id: r, value: d, disabled: n = !1, onChange: h } = m, { type: l, onChoiceChange: T } = j(d, r, h);
|
|
15
|
+
return /* @__PURE__ */ e("div", { className: i.CardText, children: x.map((t, p, _) => {
|
|
16
|
+
const o = R(r, t.value, p);
|
|
17
|
+
return /* @__PURE__ */ e(I, { id: o, value: d, state: c, choice: t, choices: _, children: ({ focused: s, hovered: f, checked: a, state: C }) => /* @__PURE__ */ e(b, { state: C, checked: a, focused: s, children: /* @__PURE__ */ v("div", { className: i.CardTextLabel, children: [
|
|
18
|
+
/* @__PURE__ */ e(
|
|
19
|
+
L,
|
|
20
|
+
{
|
|
21
|
+
type: l,
|
|
22
|
+
id: o,
|
|
23
|
+
name: r,
|
|
24
|
+
value: t.value,
|
|
25
|
+
checked: a,
|
|
26
|
+
disabled: n,
|
|
27
|
+
onChange: (H, u) => T(t.value, u)
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ e("div", { className: i.CardTextChoice, children: /* @__PURE__ */ e(
|
|
31
|
+
g,
|
|
32
|
+
{
|
|
33
|
+
type: l,
|
|
34
|
+
state: C,
|
|
35
|
+
checked: a,
|
|
36
|
+
focused: s,
|
|
37
|
+
hovered: f,
|
|
38
|
+
disabled: n
|
|
39
|
+
}
|
|
40
|
+
) }),
|
|
41
|
+
/* @__PURE__ */ e(N, { size: "lg", checked: a, children: t.label })
|
|
42
|
+
] }) }) }, o);
|
|
43
|
+
}) });
|
|
44
|
+
};
|
|
5
45
|
export {
|
|
6
|
-
|
|
46
|
+
J as CardText
|
|
7
47
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Interactive, State } from '../../types';
|
|
3
|
+
export interface CheckboxProps extends PropsWithChildren, Interactive<boolean> {
|
|
4
|
+
state?: State;
|
|
5
|
+
}
|
|
2
6
|
export declare const Checkbox: (props: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,51 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "usehooks-ts";
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
1
|
+
import { jsxs as v, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useToggle as a } from "usehooks-ts";
|
|
3
|
+
import { Choice as _ } from "../choice/choice.component.js";
|
|
4
|
+
import { HiddenInput as B } from "../hidden-input/hidden-input.component.js";
|
|
5
|
+
import { Converter as F } from "../../../../utils/converter/converter.js";
|
|
6
|
+
import '../../../../assets/checkbox-n_3O8ZLW.css';const I = "_Checkbox_1l6ko_1", N = "_CheckboxChoice_1l6ko_14", j = "_CheckboxContent_1l6ko_20", l = {
|
|
7
|
+
Checkbox: I,
|
|
8
|
+
CheckboxChoice: N,
|
|
9
|
+
CheckboxContent: j
|
|
10
|
+
}, D = (i) => {
|
|
11
|
+
const { children: u, state: k = "idle", id: o, value: n, disabled: e = !1, onChange: r, onFocus: b, onBlur: x } = i, [s, h] = a(!1), [d, C] = a(!1), m = (t) => {
|
|
12
|
+
e || s || (t.preventDefault(), r(!n, o));
|
|
13
|
+
}, p = (t) => {
|
|
14
|
+
e || (t.stopPropagation(), r(!n, o));
|
|
15
|
+
}, f = () => {
|
|
16
|
+
e || (h(), b?.call(null, o));
|
|
17
|
+
}, g = () => {
|
|
18
|
+
e || (h(), x?.call(null, o));
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ v(
|
|
21
|
+
"label",
|
|
22
|
+
{
|
|
23
|
+
htmlFor: o,
|
|
24
|
+
className: l.Checkbox,
|
|
25
|
+
onClick: m,
|
|
26
|
+
onFocus: f,
|
|
27
|
+
onBlur: g,
|
|
28
|
+
onMouseEnter: () => C(),
|
|
29
|
+
onMouseLeave: () => C(),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ c(
|
|
32
|
+
B,
|
|
33
|
+
{
|
|
34
|
+
type: "checkbox",
|
|
35
|
+
id: o,
|
|
36
|
+
name: o,
|
|
37
|
+
value: F.Boolean.ToBooleanString(n),
|
|
38
|
+
checked: n,
|
|
39
|
+
disabled: e,
|
|
40
|
+
onChange: p
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ c("div", { className: l.CheckboxChoice, children: /* @__PURE__ */ c(_, { type: "checkbox", state: k, checked: n, focused: s, hovered: d, disabled: e }) }),
|
|
44
|
+
/* @__PURE__ */ c("div", { className: l.CheckboxContent, children: u })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
5
49
|
export {
|
|
6
|
-
|
|
50
|
+
D as Checkbox
|
|
7
51
|
};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
export interface ChoiceProps {
|
|
2
|
+
type: 'radio' | 'checkbox';
|
|
3
|
+
checked: boolean;
|
|
4
|
+
state?: 'idle' | 'error' | 'success';
|
|
5
|
+
focused?: boolean;
|
|
6
|
+
hovered?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
2
9
|
export declare const Choice: (props: ChoiceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionChoice } from '../../types';
|
|
2
|
+
export interface DropdownProps {
|
|
3
|
+
choices: QuestionChoice[];
|
|
4
|
+
value: QuestionChoice[];
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
noResult?: string;
|
|
8
|
+
isSearchHidden?: boolean;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
closeButton?: string;
|
|
11
|
+
onChange: (values: QuestionChoice[]) => void;
|
|
12
|
+
onOpen?: (height: number, width: number) => void;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
2
15
|
export declare const Dropdown: (props: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,97 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "usehooks-ts";
|
|
4
|
-
import "lucide-react";
|
|
5
|
-
import "clsx";
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
1
|
+
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useState as C, useEffect as N, useMemo as K } from "react";
|
|
3
|
+
import { useBoolean as M, useResizeObserver as T, useOnClickOutside as E } from "usehooks-ts";
|
|
4
|
+
import { ChevronDown as $, Search as q } from "lucide-react";
|
|
5
|
+
import R from "clsx";
|
|
6
|
+
import { Box as k } from "../box/box.component.js";
|
|
7
|
+
import { Button as J } from "../button/button.component.js";
|
|
8
|
+
import { Choice as P } from "../choice/choice.component.js";
|
|
9
|
+
import { Label as Q } from "../label/label.component.js";
|
|
10
|
+
import { RadioText as f } from "../radio-text/radio-text.component.js";
|
|
11
|
+
import { clickHasNode as U } from "../../utils/utils.js";
|
|
12
|
+
import { Converter as X } from "../../../../utils/converter/converter.js";
|
|
13
|
+
import '../../../../assets/dropdown-DKR8xas9.css';const Y = "_Dropdown_152mp_1", Z = "_DropdownBorder_152mp_17", oo = "_DropdownContent_152mp_28", eo = "_DropdownChevron_152mp_39", no = "_DropdownChevronWrap_152mp_53", ro = "_DropdownBox_152mp_69", so = "_DropdownBoxVisible_152mp_75", co = "_DropdownBoxHidden_152mp_79", io = "_DropdownSearch_152mp_83", lo = "_DropdownSearchVisible_152mp_89", to = "_DropdownSearchHidden_152mp_93", po = "_DropdownClose_152mp_97", ao = "_DropdownInput_152mp_106", ho = "_DropdownGlass_152mp_120", wo = "_DropdownChoices_152mp_131", Do = "_DropdownChoice_152mp_131", mo = "_DropdownChoiceNoResult_152mp_154", e = {
|
|
14
|
+
Dropdown: Y,
|
|
15
|
+
DropdownBorder: Z,
|
|
16
|
+
DropdownContent: oo,
|
|
17
|
+
DropdownChevron: eo,
|
|
18
|
+
DropdownChevronWrap: no,
|
|
19
|
+
DropdownBox: ro,
|
|
20
|
+
DropdownBoxVisible: so,
|
|
21
|
+
DropdownBoxHidden: co,
|
|
22
|
+
DropdownSearch: io,
|
|
23
|
+
DropdownSearchVisible: lo,
|
|
24
|
+
DropdownSearchHidden: to,
|
|
25
|
+
DropdownClose: po,
|
|
26
|
+
DropdownInput: ao,
|
|
27
|
+
DropdownGlass: ho,
|
|
28
|
+
DropdownChoices: wo,
|
|
29
|
+
DropdownChoice: Do,
|
|
30
|
+
DropdownChoiceNoResult: mo
|
|
31
|
+
}, ko = (s) => {
|
|
32
|
+
const { choices: v = [], value: a = [], isSearchHidden: H = !1, multiple: l = !1, onChange: h, onOpen: z, onClose: V } = s, y = s.label || "", I = s.placeholder || "Wählen Sie Ihre private Krankenversicherung...", O = s.noResult || "Keine Versicherung gefunden.", W = s.closeButton || "Schließen", x = u(null), w = u(null), B = u(null), { value: t, setFalse: D, toggle: A } = M(!1), [m, G] = C(""), [c, L] = C({ width: 0, height: 0 }), [p, S] = C([]);
|
|
33
|
+
T({
|
|
34
|
+
ref: w,
|
|
35
|
+
onResize: (o) => L({ width: o.width || 0, height: o.height || 0 })
|
|
36
|
+
}), E(w, (o) => {
|
|
37
|
+
U(o, x) || (l && h(p), D());
|
|
38
|
+
}), N(() => S(Array.isArray(a) ? a : []), [a]), N(() => {
|
|
39
|
+
t && c.width && c.height ? (B.current?.focus(), z?.call(null, c.height, c.width)) : V?.call(null);
|
|
40
|
+
}, [t, c]);
|
|
41
|
+
const j = (o, d) => {
|
|
42
|
+
S((i) => i.some(({ value: _ }) => _ === o) ? i.filter(({ value: _ }) => _ !== o) : [...i, { value: o, label: d }]);
|
|
43
|
+
}, F = () => {
|
|
44
|
+
D(), h(p);
|
|
45
|
+
}, b = K(
|
|
46
|
+
() => v.filter(({ label: o }) => o.toLowerCase().includes(m.toLowerCase())),
|
|
47
|
+
[m, v]
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ r("div", { className: e.Dropdown, children: [
|
|
50
|
+
/* @__PURE__ */ n(k, { ref: x, onClick: A, children: /* @__PURE__ */ r("div", { className: e.DropdownBorder, children: [
|
|
51
|
+
/* @__PURE__ */ r("div", { className: e.DropdownContent, children: [
|
|
52
|
+
/* @__PURE__ */ n(Q, { position: "active", children: y }),
|
|
53
|
+
/* @__PURE__ */ n(f, { size: "lg", checked: !0, oneLine: !0, children: X.Answer.FromArrayToMultiple(p.map(({ label: o }) => o)) || I })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ n("div", { className: e.DropdownChevronWrap, children: /* @__PURE__ */ n($, { "data-open": t, className: e.DropdownChevron }) })
|
|
56
|
+
] }) }),
|
|
57
|
+
/* @__PURE__ */ n(k, { ref: w, className: t ? e.DropdownBoxVisible : e.DropdownBoxHidden, children: /* @__PURE__ */ r("div", { className: e.DropdownBox, children: [
|
|
58
|
+
/* @__PURE__ */ r("div", { className: R(e.DropdownSearch, H ? e.DropdownSearchHidden : e.DropdownSearchVisible), children: [
|
|
59
|
+
/* @__PURE__ */ n(
|
|
60
|
+
"input",
|
|
61
|
+
{
|
|
62
|
+
ref: B,
|
|
63
|
+
value: m,
|
|
64
|
+
type: "text",
|
|
65
|
+
className: e.DropdownInput,
|
|
66
|
+
onChange: (o) => G(o.target.value)
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ n(q, { className: e.DropdownGlass })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ n("ul", { className: e.DropdownChoices, children: b.length ? b.map(({ value: o, label: d }, i) => /* @__PURE__ */ r(
|
|
72
|
+
"li",
|
|
73
|
+
{
|
|
74
|
+
className: e.DropdownChoice,
|
|
75
|
+
onClick: () => {
|
|
76
|
+
l ? j(o, d) : (D(), h([{ value: o, label: d }]));
|
|
77
|
+
},
|
|
78
|
+
children: [
|
|
79
|
+
l && /* @__PURE__ */ n(
|
|
80
|
+
P,
|
|
81
|
+
{
|
|
82
|
+
type: "checkbox",
|
|
83
|
+
checked: p.some((g) => g.value === o)
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ n(f, { size: "lg", checked: !1, children: d })
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
o + i
|
|
90
|
+
)) : /* @__PURE__ */ n("li", { className: R(e.DropdownChoice, e.DropdownChoiceNoResult), children: /* @__PURE__ */ n(f, { size: "lg", checked: !1, children: O }) }) }),
|
|
91
|
+
l && /* @__PURE__ */ n("div", { className: e.DropdownClose, children: /* @__PURE__ */ n(J, { color: "next", size: "sm", type: "button", onClick: () => F(), children: W }) })
|
|
92
|
+
] }) })
|
|
93
|
+
] });
|
|
94
|
+
};
|
|
9
95
|
export {
|
|
10
|
-
|
|
96
|
+
ko as Dropdown
|
|
11
97
|
};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { InputChangeSource } from '../../types';
|
|
3
|
+
export interface HiddenInputProps {
|
|
4
|
+
id: string;
|
|
5
|
+
value: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: 'radio' | 'checkbox';
|
|
8
|
+
checked: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onChange: (e: ChangeEvent<HTMLInputElement>, source?: InputChangeSource) => void;
|
|
11
|
+
}
|
|
2
12
|
export declare const HiddenInput: (props: HiddenInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../../../assets/hidden-input-DHJQHUKd.css';const
|
|
3
|
-
HiddenInput:
|
|
4
|
-
},
|
|
5
|
-
const { type:
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import '../../../../assets/hidden-input-DHJQHUKd.css';const o = "_HiddenInput_bej3d_1", c = {
|
|
3
|
+
HiddenInput: o
|
|
4
|
+
}, v = (d) => {
|
|
5
|
+
const { type: a, id: i, name: u, value: p, disabled: n = !1, checked: r, onChange: t } = d;
|
|
6
|
+
return /* @__PURE__ */ s(
|
|
7
7
|
"input",
|
|
8
8
|
{
|
|
9
9
|
"data-testid": "hidden-input",
|
|
10
|
-
type:
|
|
11
|
-
id:
|
|
12
|
-
name:
|
|
13
|
-
value:
|
|
14
|
-
checked:
|
|
10
|
+
type: a,
|
|
11
|
+
id: i,
|
|
12
|
+
name: u,
|
|
13
|
+
value: p,
|
|
14
|
+
checked: r,
|
|
15
15
|
disabled: n,
|
|
16
|
-
className:
|
|
16
|
+
className: c.HiddenInput,
|
|
17
17
|
onChange: (e) => {
|
|
18
|
-
|
|
19
|
-
n || (e.preventDefault(), (d = e.nativeEvent) != null && d.pageX || e.nativeEvent.pageY ? (e.currentTarget.blur(), t(e, "mouse")) : t(e, "keyboard"));
|
|
18
|
+
n || (e.preventDefault(), e.nativeEvent?.pageX || e.nativeEvent.pageY ? (e.currentTarget.blur(), t(e, "mouse")) : t(e, "keyboard"));
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
);
|
|
23
22
|
};
|
|
24
23
|
export {
|
|
25
|
-
|
|
24
|
+
v as HiddenInput
|
|
26
25
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTMLInputTypeAttribute } from 'react';
|
|
2
|
+
import { Interactive } from '../../types';
|
|
3
|
+
export interface InputProps extends Interactive<string> {
|
|
4
|
+
type?: HTMLInputTypeAttribute;
|
|
5
|
+
onAutofill?: (id: string) => void;
|
|
6
|
+
onAutofillCancel?: (id: string) => void;
|
|
7
|
+
}
|
|
2
8
|
export declare const Input: ({ id, value, disabled, type, onAutofill, onAutofillCancel, onChange, onFocus, onBlur, }: InputProps) => import("react/jsx-runtime").JSX.Element;
|