@pfct/purple 1.7.0-next.3 → 1.7.0-next.4
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/chunks/index.9fap07Gq.js +60 -0
- package/dist/chunks/index.B-Bfcjo7.js +1 -0
- package/dist/chunks/index.BfjI33ZB.js +41 -0
- package/dist/chunks/{index.Dud5PpT2.js → index.BmifSqQX.js} +26 -26
- package/dist/chunks/{index.BRcoZnsL.js → index.BngGCpBd.js} +1 -1
- package/dist/chunks/{index.B04X8ryw.js → index.BtGja8CI.js} +1 -1
- package/dist/chunks/{index.BKkcGVEJ.js → index.C1WOc90r.js} +81 -81
- package/dist/chunks/index.C3oZfEx6.js +283 -0
- package/dist/chunks/{index.CtswiKeA.js → index.CDVf4iB0.js} +1 -1
- package/dist/chunks/{index.DrALxeqy.js → index.CIUK7hO2.js} +23 -23
- package/dist/chunks/{index.DIsmU7qE.js → index.CVogEmtp.js} +1 -1
- package/dist/chunks/index.CqHp_goI.js +1 -0
- package/dist/chunks/{index.B3rAhBCw.js → index.CskkVMdK.js} +1 -1
- package/dist/chunks/{index.93u2Cu_l.js → index.DIaW0faE.js} +1 -1
- package/dist/chunks/{index.-8MfVPUU.js → index.DVHp5IZe.js} +47 -47
- package/dist/chunks/index.QJBZMz2E.js +5 -0
- package/dist/chunks/index.eYfYnSCV.js +1 -0
- package/dist/chunks/index.ps14_l3u.js +1 -0
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.es.js +176 -176
- package/dist/components/Badge/BaseBadge/index.cjs.js +1 -1
- package/dist/components/Badge/BaseBadge/index.es.js +10 -10
- package/dist/components/Badge/BaseBadge/index.styled.cjs.js +1 -1
- package/dist/components/Badge/BaseBadge/index.styled.es.js +1 -1
- package/dist/components/Badge/IconBadge/index.cjs.js +1 -1
- package/dist/components/Badge/IconBadge/index.es.js +6 -6
- package/dist/components/Badge/TextBadge/index.cjs.js +1 -1
- package/dist/components/Badge/TextBadge/index.es.js +7 -7
- package/dist/components/BottomSheet/BaseBottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/BaseBottomSheet/index.es.js +32 -32
- package/dist/components/BottomSheet/NavBottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/NavBottomSheet/index.es.js +8 -8
- package/dist/components/BottomSheet/TitleBottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/TitleBottomSheet/index.es.js +15 -15
- package/dist/components/Button/BaseButton/index.cjs.js +1 -1
- package/dist/components/Button/BaseButton/index.es.js +4 -4
- package/dist/components/Button/DoubleButton/index.cjs.js +1 -1
- package/dist/components/Button/DoubleButton/index.es.js +6 -6
- package/dist/components/Button/FloatBaseButton/index.cjs.js +1 -1
- package/dist/components/Button/FloatBaseButton/index.es.js +16 -16
- package/dist/components/Button/FloatDoubleButton/index.cjs.js +1 -1
- package/dist/components/Button/FloatDoubleButton/index.es.js +13 -13
- package/dist/components/Button/FloatSingleButton/index.cjs.js +1 -1
- package/dist/components/Button/FloatSingleButton/index.es.js +8 -8
- package/dist/components/Button/SingleButton/index.cjs.js +1 -1
- package/dist/components/Button/SingleButton/index.es.js +3 -3
- package/dist/components/Button/TestButton/index.cjs.js +1 -1
- package/dist/components/Button/TestButton/index.es.js +2 -2
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.es.js +7 -7
- package/dist/components/Chips/BasicChips/index.cjs.js +1 -1
- package/dist/components/Chips/BasicChips/index.es.js +8 -8
- package/dist/components/Chips/BasicChips/index.styled.cjs.js +1 -1
- package/dist/components/Chips/BasicChips/index.styled.es.js +1 -1
- package/dist/components/Chips/ChipItem/index.cjs.js +1 -1
- package/dist/components/Chips/ChipItem/index.es.js +31 -34
- package/dist/components/Chips/ChipsFrame/index.cjs.js +1 -1
- package/dist/components/Chips/ChipsFrame/index.es.js +14 -14
- package/dist/components/Chips/ChipsFrame/index.styled.cjs.js +1 -1
- package/dist/components/Chips/ChipsFrame/index.styled.es.js +1 -1
- package/dist/components/Comment/Group/index.cjs.js +1 -1
- package/dist/components/Comment/Group/index.es.js +3 -3
- package/dist/components/Comment/Item/index.cjs.js +1 -1
- package/dist/components/Comment/Item/index.es.js +6 -6
- package/dist/components/Control/CheckMark/CheckMark.cjs.js +1 -1
- package/dist/components/Control/CheckMark/CheckMark.es.js +3 -3
- package/dist/components/Control/CheckMark/index.cjs.js +1 -1
- package/dist/components/Control/CheckMark/index.es.js +7 -7
- package/dist/components/Control/RadioButton/index.cjs.js +1 -1
- package/dist/components/Control/RadioButton/index.es.js +11 -11
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.es.js +71 -71
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/ActiveDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/ActiveDateOfMonth.es.js +12 -12
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.es.js +12 -12
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/NoneDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/NoneDateOfMonth.es.js +3 -3
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeEndFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeEndFocusDateOfMonth.es.js +14 -14
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.es.js +18 -18
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.es.js +13 -13
- package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.es.js +3 -3
- package/dist/components/DatePicker/BaseDatePicker/Month/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/Month/index.es.js +4 -4
- package/dist/components/DatePicker/BaseDatePicker/Week/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/Week/index.es.js +3 -3
- package/dist/components/DatePicker/BaseDatePicker/YearMonthController/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/YearMonthController/index.es.js +16 -16
- package/dist/components/DatePicker/BaseDatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/index.es.js +31 -31
- package/dist/components/DatePicker/RangeDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/RangeDatePickerModal/index.es.js +27 -27
- package/dist/components/DatePicker/SingleDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.es.js +14 -14
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.es.js +17 -17
- package/dist/components/Input/BaseInput/index.cjs.js +1 -1
- package/dist/components/Input/BaseInput/index.es.js +44 -44
- package/dist/components/Input/NumberInput/index.cjs.js +1 -1
- package/dist/components/Input/NumberInput/index.es.js +23 -23
- package/dist/components/Input/PostfixInput/index.cjs.js +1 -1
- package/dist/components/Input/PostfixInput/index.es.js +61 -61
- package/dist/components/Input/ResidentNumberInput/index.cjs.js +1 -1
- package/dist/components/Input/ResidentNumberInput/index.es.js +65 -65
- package/dist/components/Input/TextField/index.cjs.js +1 -1
- package/dist/components/Input/TextField/index.es.js +32 -32
- package/dist/components/Input/common/InputFrame/index.cjs.js +1 -1
- package/dist/components/Input/common/InputFrame/index.es.js +17 -17
- package/dist/components/Input/index.cjs.js +1 -1
- package/dist/components/Input/index.es.js +1 -1
- package/dist/components/LegacyModal/BaseModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/BaseModal/index.es.js +8 -8
- package/dist/components/LegacyModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/index.es.js +19 -19
- package/dist/components/List/index.cjs.js +1 -1
- package/dist/components/List/index.es.js +11 -11
- package/dist/components/Loading/ProgressBar/index.cjs.js +1 -1
- package/dist/components/Loading/ProgressBar/index.es.js +3 -3
- package/dist/components/Loading/Skeleton/index.cjs.js +1 -1
- package/dist/components/Loading/Skeleton/index.es.js +5 -5
- package/dist/components/Loading/Spinner/index.cjs.js +1 -1
- package/dist/components/Loading/Spinner/index.es.js +3 -3
- package/dist/components/MiniButton/BoxMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/BoxMiniButton/index.es.js +4 -4
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.es.js +27 -30
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.es.js +40 -43
- package/dist/components/MiniButton/common/ButtonTag.cjs.js +1 -1
- package/dist/components/MiniButton/common/ButtonTag.es.js +3 -3
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +42 -42
- package/dist/components/Navigation/BaseNavigation/index.cjs.js +1 -1
- package/dist/components/Navigation/BaseNavigation/index.es.js +14 -14
- package/dist/components/Navigation/BottomNavigationBar/index.cjs.js +1 -1
- package/dist/components/Navigation/BottomNavigationBar/index.es.js +10 -10
- package/dist/components/Navigation/PageNavigationBar/index.cjs.js +1 -1
- package/dist/components/Navigation/PageNavigationBar/index.es.js +21 -21
- package/dist/components/Navigation/TitleNavigationBar/index.cjs.js +1 -1
- package/dist/components/Navigation/TitleNavigationBar/index.es.js +12 -12
- package/dist/components/Navigation/index.cjs.js +1 -1
- package/dist/components/Navigation/index.es.js +21 -21
- package/dist/components/OverlayRoot/index.cjs.js +1 -1
- package/dist/components/OverlayRoot/index.es.js +6 -6
- package/dist/components/Segment/BaseSegment/index.cjs.js +1 -1
- package/dist/components/Segment/BaseSegment/index.es.js +16 -16
- package/dist/components/Segment/ExtendSegment/index.cjs.js +1 -1
- package/dist/components/Segment/ExtendSegment/index.es.js +18 -18
- package/dist/components/SelectBox/index.cjs.js +1 -1
- package/dist/components/SelectBox/index.es.js +42 -42
- package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/FillTabs/index.es.js +11 -11
- package/dist/components/Tabs/TextTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/TextTabs/index.es.js +18 -18
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.es.js +7 -8
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.es.js +26 -26
- package/dist/components/TextArea/index.cjs.js +1 -1
- package/dist/components/TextArea/index.es.js +17 -17
- package/dist/components/Title/index.cjs.js +1 -1
- package/dist/components/Title/index.es.js +12 -12
- package/dist/components/Toast/index.cjs.js +1 -1
- package/dist/components/Toast/index.es.js +4 -4
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/ui/bottomSheet.cjs.js +1 -1
- package/dist/components/ui/bottomSheet.es.js +92 -92
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.es.js +13 -14
- package/dist/components/ui/checkbox.cjs.js +1 -1
- package/dist/components/ui/checkbox.es.js +88 -88
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.es.js +48 -48
- package/dist/components/ui/drawer.cjs.js +2 -2
- package/dist/components/ui/drawer.es.js +159 -159
- package/dist/components/ui/impact-tooltip.cjs.js +1 -1
- package/dist/components/ui/impact-tooltip.es.js +133 -133
- package/dist/components/ui/share-ui.cjs.js +1 -1
- package/dist/components/ui/share-ui.es.js +34 -34
- package/dist/components/ui/tooltip.cjs.js +1 -1
- package/dist/components/ui/tooltip.es.js +138 -138
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.es.js +3 -3
- package/dist/core/Display/Mobile.cjs.js +1 -1
- package/dist/core/Display/Mobile.es.js +4 -4
- package/dist/core/Display/Pc.cjs.js +1 -1
- package/dist/core/Display/Pc.es.js +4 -4
- package/dist/core/Typography/BaseTypography/index.cjs.js +1 -1
- package/dist/core/Typography/BaseTypography/index.es.js +3 -3
- package/dist/core/Typography/index.cjs.js +1 -1
- package/dist/core/Typography/index.es.js +19 -19
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.d.ts +1 -1
- package/dist/icons/src/icons/index.d.ts.map +1 -1
- package/dist/icons/src/icons/index.es.js +4 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/library/BasicForm/index.cjs.js +1 -1
- package/dist/library/BasicForm/index.es.js +10 -10
- package/dist/library/BasicLayout/Body.cjs.js +1 -1
- package/dist/library/BasicLayout/Body.es.js +7 -7
- package/dist/library/BasicLayout/Footer.cjs.js +1 -1
- package/dist/library/BasicLayout/Footer.es.js +71 -71
- package/dist/library/BasicLayout/index.cjs.js +1 -1
- package/dist/library/BasicLayout/index.es.js +35 -35
- package/dist/library/BasicLayout/index.styled.cjs.js +1 -1
- package/dist/library/BasicLayout/index.styled.es.js +1 -1
- package/dist/library/IconWithImage/index.cjs.js +1 -1
- package/dist/library/IconWithImage/index.es.js +4 -4
- package/dist/library/List/BottomSheetItemList/index.cjs.js +1 -1
- package/dist/library/List/BottomSheetItemList/index.es.js +5 -5
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.es.js +47 -47
- package/dist/library/Spacing/index.cjs.js +1 -1
- package/dist/library/Spacing/index.es.js +3 -3
- package/package.json +1 -1
- package/dist/chunks/index.9yN3bH7k.js +0 -283
- package/dist/chunks/index.BTUe9yKh.js +0 -1
- package/dist/chunks/index.Beaq4T1c.js +0 -1
- package/dist/chunks/index.BspO8Abs.js +0 -41
- package/dist/chunks/index.CtIpJqp4.js +0 -5
- package/dist/chunks/index.DcvrUsoU.js +0 -1
- package/dist/chunks/index._MxrBNop.js +0 -60
- package/dist/chunks/index.mCMIO9lL.js +0 -1
- package/dist/chunks/jsx-runtime.B0Vkbtvx.js +0 -14
- package/dist/chunks/jsx-runtime.C63F304d.js +0 -615
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useReducer as
|
|
3
|
-
import { extractNumber as
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { useReducer as R, useRef as k, useLayoutEffect as L, useEffect as P, useCallback as A } from "react";
|
|
3
|
+
import { extractNumber as C, formatKoreaCurrency as I } from "../../../utils/format.util.es.js";
|
|
4
4
|
import "../../../core/Colors/index.es.js";
|
|
5
5
|
import "../../../utils/GenerateColorStyle/datepicker.es.js";
|
|
6
6
|
import "../../../utils/GenerateColorStyle/mini-button.es.js";
|
|
7
7
|
import "@emotion/react";
|
|
8
|
-
import { BaseInput as
|
|
9
|
-
const
|
|
10
|
-
const [, l] =
|
|
8
|
+
import { BaseInput as _ } from "../BaseInput/index.es.js";
|
|
9
|
+
const $ = (t) => {
|
|
10
|
+
const [, l] = R((e) => e + 1, 0), s = k(null), {
|
|
11
11
|
replace: u,
|
|
12
12
|
append: f
|
|
13
|
-
} = t, i = u ? u(t.format(t.value)) : t.format(t.value), m =
|
|
13
|
+
} = t, i = u ? u(t.format(t.value)) : t.format(t.value), m = k(!1), v = (e) => {
|
|
14
14
|
if (process.env.NODE_ENV !== "production") {
|
|
15
15
|
if (e.target.type === "number") {
|
|
16
16
|
console.error("Rifm does not support input type=number, use type=tel instead.");
|
|
@@ -50,16 +50,16 @@ const _ = (t) => {
|
|
|
50
50
|
E
|
|
51
51
|
] = s.current;
|
|
52
52
|
s.current = null;
|
|
53
|
-
const
|
|
53
|
+
const N = h && E, S = e.slice(n.selectionStart).search(t.accept || /\d/g), O = S !== -1 ? S : 0, d = (r) => (r.match(t.accept || /\d/g) || []).join(""), w = d(e.substr(0, n.selectionStart)), x = (r) => {
|
|
54
54
|
let c = 0, p = 0;
|
|
55
55
|
for (let g = 0; g !== w.length; ++g) {
|
|
56
|
-
let V = r.indexOf(w[g], c) + 1,
|
|
57
|
-
|
|
56
|
+
let V = r.indexOf(w[g], c) + 1, y = d(r).indexOf(w[g], p) + 1;
|
|
57
|
+
y - p > 1 && (V = c, y = p), p = Math.max(y, p), c = Math.max(c, V);
|
|
58
58
|
}
|
|
59
59
|
return c;
|
|
60
60
|
};
|
|
61
61
|
if (t.mask === !0 && o && !E) {
|
|
62
|
-
let r =
|
|
62
|
+
let r = x(e);
|
|
63
63
|
const c = d(e.substr(r))[0];
|
|
64
64
|
r = e.indexOf(c, r), e = `${e.substr(0, r)}${e.substr(r + 1)}`;
|
|
65
65
|
}
|
|
@@ -68,11 +68,11 @@ const _ = (t) => {
|
|
|
68
68
|
n.selectionStart === e.length && !E && (o ? a = f(a) : d(a.slice(-1)) === "" && (a = a.slice(0, -1)));
|
|
69
69
|
const D = u ? u(a) : a;
|
|
70
70
|
return i === D ? l() : t.onChange(D), () => {
|
|
71
|
-
let r =
|
|
72
|
-
if (t.mask != null && (o || h && !
|
|
71
|
+
let r = x(a);
|
|
72
|
+
if (t.mask != null && (o || h && !N))
|
|
73
73
|
for (; a[r] && d(a[r]) === ""; )
|
|
74
74
|
r += 1;
|
|
75
|
-
n.selectionStart = n.selectionEnd = r + (
|
|
75
|
+
n.selectionStart = n.selectionEnd = r + (N ? 1 + O : 0);
|
|
76
76
|
};
|
|
77
77
|
}), P(() => {
|
|
78
78
|
const e = (o) => {
|
|
@@ -87,27 +87,27 @@ const _ = (t) => {
|
|
|
87
87
|
value: s.current != null ? s.current[0] : i,
|
|
88
88
|
onChange: v
|
|
89
89
|
};
|
|
90
|
-
},
|
|
91
|
-
const l =
|
|
90
|
+
}, B = (t) => {
|
|
91
|
+
const l = $(t);
|
|
92
92
|
return t.children(l);
|
|
93
93
|
}, X = (t) => {
|
|
94
94
|
const { originValue: l, onValueChange: s, postfix: u = "", prefix: f = "", max: i = Number.MAX_SAFE_INTEGER, ...m } = t, v = A(
|
|
95
|
-
(e) =>
|
|
95
|
+
(e) => C(e).length > 0 ? `${f}${I(e)} ${u}` : "",
|
|
96
96
|
[u, f]
|
|
97
97
|
);
|
|
98
|
-
return /* @__PURE__ */ b
|
|
99
|
-
|
|
98
|
+
return /* @__PURE__ */ b(
|
|
99
|
+
B,
|
|
100
100
|
{
|
|
101
101
|
accept: /[\d]/g,
|
|
102
102
|
format: v,
|
|
103
|
-
onChange: (e) => s?.(
|
|
103
|
+
onChange: (e) => s?.(C(e)),
|
|
104
104
|
value: l,
|
|
105
|
-
children: ({ value: e, onChange: n }) => /* @__PURE__ */ b
|
|
106
|
-
|
|
105
|
+
children: ({ value: e, onChange: n }) => /* @__PURE__ */ b(
|
|
106
|
+
_,
|
|
107
107
|
{
|
|
108
108
|
format: u,
|
|
109
109
|
onChange: (o) => {
|
|
110
|
-
const h =
|
|
110
|
+
const h = C(o.target.value);
|
|
111
111
|
Number(h) > i && (o.target.value = l), n(o);
|
|
112
112
|
},
|
|
113
113
|
type: "tel",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("react"),z=require("../../../core/Colors/index.cjs.js"),A=require("../../../core/Typography/BaseTypography/index.cjs.js"),L=require("../../../chunks/index.styled.yIsvimnv.js"),O=require("../common/InputFrame/index.cjs.js"),s=require("./index.styled.cjs.js"),G=a=>a&&typeof a=="object"&&"default"in a?a:{default:a},H=G(n),J=H.default.forwardRef((a,S)=>{const{realValue:u,postfix:F,onBlur:P,onFocus:v,onClick:y,disabled:c,label:r,placeholder:_,errorValidation:l,logRocketMasking:D,focus:d=!1,max:b,decoration:g,updateRealValue:I,formatRealValue:C,formatDisplayValue:i,type:j,pattern:w,...E}=a,[p,M]=n.useState(""),[U,f]=n.useState(""),[h,B]=n.useState(d),m=n.useRef(null),x=h||!!p,T=!(r||x)&&!!_,V=n.useCallback(e=>{if(e.length===0||e==="0"){f("");return}if(l)for(let t=0;t<l.length;t++){if(!l[t]?.condition(e)&&e.length!==0){f(l[t]?.errorText??"");break}f("")}},[l]),k=n.useCallback(e=>{const{type:t}=e;B(t==="focus")},[]),N=n.useCallback(e=>{y?.(e),m.current?.focus()},[y]),W=n.useCallback(e=>{const t=C?.(e)||e,R=Number(b),q=Number(t);R&&!Number.isNaN(q)&&q>R||I(t)},[b,I,C]);return n.useEffect(()=>{let e=u;i&&(e=i?.(e)||""),M(e),V(u)},[i,V,u]),n.useEffect(()=>{d&&m.current?.focus()},[d]),o.jsxs(O.InputFrame,{active:x,disabled:!!c,errorText:U,focused:h,handleClickInput:N,label:r,children:[o.jsxs(s.InputAndUnitWrapper,{children:[o.jsx(s.InputSizer,{displayValue:p,focused:h,children:o.jsx(s.InputTag,{...E,className:s.className.inputTag,"data-private":D,decoration:!1,disabled:c,hasLabel:!!r,name:r,onBlur:e=>{P?.(e),k(e)},onChange:e=>{const t=e.currentTarget.value;W(t)},onClick:N,onFocus:e=>{v?.(e),k(e)},pattern:j==="number"?"\\d*":w,placeholder:T?_:"",ref:S||m,size:T?void 0:1,type:j,value:i?p:u})}),o.jsx(s.UnitWrapper,{children:x&&o.jsx(s.Unit,{hasLabel:!!r,hasValue:!!p,children:o.jsx(A.BaseTypography,{color:c?z.basicColors.gray200:void 0,md:"Title1",children:F})})})]}),g&&o.jsx(L.DecorationItemWrapper,{disabled:c,children:g})]})});exports.PostfixInput=J;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { basicColors as
|
|
4
|
-
import { BaseTypography as
|
|
5
|
-
import { D as
|
|
6
|
-
import { InputFrame as
|
|
7
|
-
import { InputAndUnitWrapper as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as v, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import O, { useState as h, useRef as q, useCallback as c, useEffect as w } from "react";
|
|
3
|
+
import { basicColors as G } from "../../../core/Colors/index.es.js";
|
|
4
|
+
import { BaseTypography as H } from "../../../core/Typography/BaseTypography/index.es.js";
|
|
5
|
+
import { D as J } from "../../../chunks/index.styled.BNOtFd_Z.js";
|
|
6
|
+
import { InputFrame as K } from "../common/InputFrame/index.es.js";
|
|
7
|
+
import { InputAndUnitWrapper as Q, InputSizer as X, InputTag as Y, className as Z, UnitWrapper as $, Unit as ee } from "./index.styled.es.js";
|
|
8
|
+
const ie = O.forwardRef((P, S) => {
|
|
9
9
|
const {
|
|
10
10
|
realValue: n,
|
|
11
|
-
postfix:
|
|
12
|
-
onBlur:
|
|
13
|
-
onFocus:
|
|
14
|
-
onClick:
|
|
15
|
-
disabled:
|
|
11
|
+
postfix: U,
|
|
12
|
+
onBlur: W,
|
|
13
|
+
onFocus: j,
|
|
14
|
+
onClick: b,
|
|
15
|
+
disabled: l,
|
|
16
16
|
label: a,
|
|
17
|
-
placeholder:
|
|
17
|
+
placeholder: g,
|
|
18
18
|
errorValidation: r,
|
|
19
|
-
logRocketMasking:
|
|
19
|
+
logRocketMasking: z,
|
|
20
20
|
focus: u = !1,
|
|
21
|
-
max:
|
|
22
|
-
decoration:
|
|
23
|
-
updateRealValue:
|
|
24
|
-
formatRealValue:
|
|
25
|
-
formatDisplayValue:
|
|
26
|
-
type:
|
|
27
|
-
pattern:
|
|
28
|
-
...
|
|
29
|
-
} =
|
|
21
|
+
max: y,
|
|
22
|
+
decoration: V,
|
|
23
|
+
updateRealValue: x,
|
|
24
|
+
formatRealValue: B,
|
|
25
|
+
formatDisplayValue: s,
|
|
26
|
+
type: I,
|
|
27
|
+
pattern: A,
|
|
28
|
+
...E
|
|
29
|
+
} = P, [i, L] = h(""), [M, p] = h(""), [d, N] = h(u), f = q(null), m = d || !!i, T = !(a || m) && !!g, k = c(
|
|
30
30
|
(e) => {
|
|
31
31
|
if (e.length === 0 || e === "0") {
|
|
32
32
|
p("");
|
|
@@ -42,73 +42,73 @@ const le = _.forwardRef((v, w) => {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
[r]
|
|
45
|
-
),
|
|
45
|
+
), C = c((e) => {
|
|
46
46
|
const { type: o } = e;
|
|
47
|
-
|
|
48
|
-
}, []),
|
|
47
|
+
N(o === "focus");
|
|
48
|
+
}, []), R = c(
|
|
49
49
|
(e) => {
|
|
50
|
-
|
|
50
|
+
b?.(e), f.current?.focus();
|
|
51
51
|
},
|
|
52
|
-
[
|
|
53
|
-
),
|
|
52
|
+
[b]
|
|
53
|
+
), _ = c(
|
|
54
54
|
(e) => {
|
|
55
|
-
const o =
|
|
56
|
-
|
|
55
|
+
const o = B?.(e) || e, D = Number(y), F = Number(o);
|
|
56
|
+
D && !Number.isNaN(F) && F > D || x(o);
|
|
57
57
|
},
|
|
58
|
-
[
|
|
58
|
+
[y, x, B]
|
|
59
59
|
);
|
|
60
|
-
return
|
|
60
|
+
return w(() => {
|
|
61
61
|
let e = n;
|
|
62
|
-
|
|
63
|
-
}, [
|
|
62
|
+
s && (e = s?.(e) || ""), L(e), k(n);
|
|
63
|
+
}, [s, k, n]), w(() => {
|
|
64
64
|
u && f.current?.focus();
|
|
65
|
-
}, [u]), /* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
}, [u]), /* @__PURE__ */ v(
|
|
66
|
+
K,
|
|
67
67
|
{
|
|
68
68
|
active: m,
|
|
69
|
-
disabled: !!
|
|
70
|
-
errorText:
|
|
69
|
+
disabled: !!l,
|
|
70
|
+
errorText: M,
|
|
71
71
|
focused: d,
|
|
72
|
-
handleClickInput:
|
|
72
|
+
handleClickInput: R,
|
|
73
73
|
label: a,
|
|
74
74
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */ t
|
|
77
|
-
|
|
75
|
+
/* @__PURE__ */ v(Q, { children: [
|
|
76
|
+
/* @__PURE__ */ t(X, { displayValue: i, focused: d, children: /* @__PURE__ */ t(
|
|
77
|
+
Y,
|
|
78
78
|
{
|
|
79
|
-
...
|
|
80
|
-
className:
|
|
81
|
-
"data-private":
|
|
79
|
+
...E,
|
|
80
|
+
className: Z.inputTag,
|
|
81
|
+
"data-private": z,
|
|
82
82
|
decoration: !1,
|
|
83
|
-
disabled:
|
|
83
|
+
disabled: l,
|
|
84
84
|
hasLabel: !!a,
|
|
85
85
|
name: a,
|
|
86
86
|
onBlur: (e) => {
|
|
87
|
-
|
|
87
|
+
W?.(e), C(e);
|
|
88
88
|
},
|
|
89
89
|
onChange: (e) => {
|
|
90
90
|
const o = e.currentTarget.value;
|
|
91
|
-
|
|
91
|
+
_(o);
|
|
92
92
|
},
|
|
93
|
-
onClick:
|
|
93
|
+
onClick: R,
|
|
94
94
|
onFocus: (e) => {
|
|
95
|
-
|
|
95
|
+
j?.(e), C(e);
|
|
96
96
|
},
|
|
97
|
-
pattern:
|
|
98
|
-
placeholder:
|
|
99
|
-
ref:
|
|
100
|
-
size:
|
|
101
|
-
type:
|
|
102
|
-
value:
|
|
97
|
+
pattern: I === "number" ? "\\d*" : A,
|
|
98
|
+
placeholder: T ? g : "",
|
|
99
|
+
ref: S || f,
|
|
100
|
+
size: T ? void 0 : 1,
|
|
101
|
+
type: I,
|
|
102
|
+
value: s ? i : n
|
|
103
103
|
}
|
|
104
104
|
) }),
|
|
105
|
-
/* @__PURE__ */ t
|
|
105
|
+
/* @__PURE__ */ t($, { children: m && /* @__PURE__ */ t(ee, { hasLabel: !!a, hasValue: !!i, children: /* @__PURE__ */ t(H, { color: l ? G.gray200 : void 0, md: "Title1", children: U }) }) })
|
|
106
106
|
] }),
|
|
107
|
-
|
|
107
|
+
V && /* @__PURE__ */ t(J, { disabled: l, children: V })
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
});
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
ie as PostfixInput
|
|
114
114
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),t=require("react"),A=require("../common/InputFrame/index.cjs.js"),o=require("./index.styled.cjs.js"),M=/[^0-9]/g,$=N=>{const{label:s,placeholder:v,value:B,setValue:V,disabled:a=!1,errorValidation:d=[],rrnInputType:w=13,rrn6:h,defaultRRN7Only:j}=N,[p,L]=t.useState(h||""),[f,P]=t.useState(j||""),[r,T]=t.useState(""),[c,E]=t.useState(B||""),[u,i]=t.useState(!1),k=u||!!B,q=!(s||k)&&!!v,[D,g]=t.useState(""),S=t.useRef(null),y=t.useRef(null),I=t.useRef(null),C=!!c,H=t.useMemo(()=>{let e="";for(let l=1;l<=r.length;l+=1)e+="●";return e},[r]),m=t.useCallback((e,l,b,_)=>{const{value:O}=e.target,R=O.trim();R.length<=b?(l(R.replace(M,"")),R.length===b&&_?.current?.focus()):_?.current?.focus()},[]),F=t.useCallback((e,l,b)=>{if(l.length<=0&&e.key==="Backspace")return b?.current?.focus()},[]),x=t.useCallback(e=>{for(let l=0;l<d.length;l++){if(!d[l]?.condition(e)&&e.length!==0){g(d[l]?.errorText??"");break}g("")}},[d]);return t.useEffect(()=>{const e=`${p}${f}${r}`;E(e),V(e)},[p,f,r,V]),t.useEffect(()=>{c||g(""),c.length>0&&!u&&x(c),c.length===13&&x(c)},[u,x,c]),t.useEffect(()=>{u&&g("")},[u]),t.useEffect(()=>{h&&i(!0)},[h]),n.jsxs(A.InputFrame,{active:k,disabled:a,errorText:D,focused:u,label:s,children:[n.jsx(o.BirthInput,{disabled:a,focused:u||C,hasLabel:!!s,onBlur:()=>i(!1),onChange:e=>m(e,L,6,y),onFocus:()=>i(!0),placeholder:q?v:"",ref:S,type:"tel",value:p}),(u||C)&&n.jsxs(n.Fragment,{children:[n.jsx(o.Hyphen,{disabled:a,hasLabel:!!s,visible:p.length>=6,children:"-"}),n.jsx(o.GenderNumberInput,{disabled:a,hasLabel:!!s,onBlur:()=>i(!1),onChange:e=>m(e,P,1,I),onFocus:()=>i(!0),onKeyDown:e=>F(e,f,S),ref:y,type:"tel",value:f}),n.jsx(o.FakeInputWrapper,{hasLabel:!!s,children:w===7?n.jsx(o.VirtualPlaceHolderSevenTypeInput,{disabled:a,onClick:()=>y?.current?.focus(),visible:f.length>0,children:"●●●●●●"}):n.jsxs(n.Fragment,{children:[n.jsx(o.VirtualPlaceHolder,{disabled:a,children:H}),n.jsx(o.SecurityPlaceHolder,{visible:f.length>0,children:"●●●●●●"}),n.jsx(o.FakeSecurityInput,{autoFocus:!!(h&&j),disabled:a,hasLabel:!!s,onBlur:()=>i(!1),onChange:e=>m(e,T,6),onClick:()=>{I.current?.setSelectionRange(r.length,r.length)},onFocus:()=>{i(!0)},onKeyDown:e=>{if(e.key==="ArrowLeft"||e.key==="ArrowRight"){e.preventDefault(),e.stopPropagation();return}F(e,r,y)},ref:I,type:"tel",value:r})]})})]})]})};exports.ResidentNumberInput=$;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as i, useRef as
|
|
3
|
-
import { InputFrame as
|
|
4
|
-
import { BirthInput as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as V, jsx as o, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i, useRef as k, useMemo as W, useCallback as R, useEffect as b } from "react";
|
|
3
|
+
import { InputFrame as q } from "../common/InputFrame/index.es.js";
|
|
4
|
+
import { BirthInput as z, Hyphen as J, GenderNumberInput as Q, FakeInputWrapper as X, VirtualPlaceHolderSevenTypeInput as Y, VirtualPlaceHolder as Z, SecurityPlaceHolder as _, FakeSecurityInput as ee } from "./index.styled.es.js";
|
|
5
|
+
const te = /[^0-9]/g, ae = (H) => {
|
|
6
6
|
const {
|
|
7
7
|
label: r,
|
|
8
|
-
placeholder:
|
|
9
|
-
value:
|
|
10
|
-
setValue:
|
|
8
|
+
placeholder: C,
|
|
9
|
+
value: F,
|
|
10
|
+
setValue: w,
|
|
11
11
|
disabled: a = !1,
|
|
12
12
|
errorValidation: h = [],
|
|
13
|
-
rrnInputType:
|
|
13
|
+
rrnInputType: A = 13,
|
|
14
14
|
rrn6: f,
|
|
15
|
-
defaultRRN7Only:
|
|
16
|
-
} =
|
|
15
|
+
defaultRRN7Only: x
|
|
16
|
+
} = H, [p, O] = i(f || ""), [c, $] = i(x || ""), [n, j] = i(""), [u, E] = i(F || ""), [l, s] = i(!1), L = l || !!F, G = !(r || L) && !!C, [K, d] = i(""), S = k(null), g = k(null), m = k(null), N = !!u, M = W(() => {
|
|
17
17
|
let e = "";
|
|
18
|
-
for (let
|
|
18
|
+
for (let t = 1; t <= n.length; t += 1)
|
|
19
19
|
e += "●";
|
|
20
20
|
return e;
|
|
21
|
-
}, [
|
|
22
|
-
(e,
|
|
23
|
-
const { value:
|
|
24
|
-
|
|
21
|
+
}, [n]), I = R(
|
|
22
|
+
(e, t, y, T) => {
|
|
23
|
+
const { value: U } = e.target, v = U.trim();
|
|
24
|
+
v.length <= y ? (t(v.replace(te, "")), v.length === y && T?.current?.focus()) : T?.current?.focus();
|
|
25
25
|
},
|
|
26
26
|
[]
|
|
27
|
-
),
|
|
28
|
-
(e,
|
|
29
|
-
if (
|
|
27
|
+
), P = R(
|
|
28
|
+
(e, t, y) => {
|
|
29
|
+
if (t.length <= 0 && e.key === "Backspace")
|
|
30
30
|
return y?.current?.focus();
|
|
31
31
|
},
|
|
32
32
|
[]
|
|
33
|
-
),
|
|
33
|
+
), B = R(
|
|
34
34
|
(e) => {
|
|
35
|
-
for (let
|
|
36
|
-
if (!h[
|
|
37
|
-
d(h[
|
|
35
|
+
for (let t = 0; t < h.length; t++) {
|
|
36
|
+
if (!h[t]?.condition(e) && e.length !== 0) {
|
|
37
|
+
d(h[t]?.errorText ?? "");
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
40
|
d("");
|
|
@@ -42,82 +42,82 @@ const _ = /[^0-9]/g, oe = (P) => {
|
|
|
42
42
|
},
|
|
43
43
|
[h]
|
|
44
44
|
);
|
|
45
|
-
return
|
|
46
|
-
const e = `${p}${c}${
|
|
47
|
-
E(e),
|
|
48
|
-
}, [p, c,
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
|
|
52
|
-
}, [
|
|
53
|
-
f &&
|
|
54
|
-
}, [f]), /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
45
|
+
return b(() => {
|
|
46
|
+
const e = `${p}${c}${n}`;
|
|
47
|
+
E(e), w(e);
|
|
48
|
+
}, [p, c, n, w]), b(() => {
|
|
49
|
+
u || d(""), u.length > 0 && !l && B(u), u.length === 13 && B(u);
|
|
50
|
+
}, [l, B, u]), b(() => {
|
|
51
|
+
l && d("");
|
|
52
|
+
}, [l]), b(() => {
|
|
53
|
+
f && s(!0);
|
|
54
|
+
}, [f]), /* @__PURE__ */ V(q, { active: L, disabled: a, errorText: K, focused: l, label: r, children: [
|
|
55
|
+
/* @__PURE__ */ o(
|
|
56
|
+
z,
|
|
57
57
|
{
|
|
58
58
|
disabled: a,
|
|
59
|
-
focused:
|
|
59
|
+
focused: l || N,
|
|
60
60
|
hasLabel: !!r,
|
|
61
|
-
onBlur: () =>
|
|
62
|
-
onChange: (e) =>
|
|
63
|
-
onFocus: () =>
|
|
64
|
-
placeholder:
|
|
65
|
-
ref:
|
|
61
|
+
onBlur: () => s(!1),
|
|
62
|
+
onChange: (e) => I(e, O, 6, g),
|
|
63
|
+
onFocus: () => s(!0),
|
|
64
|
+
placeholder: G ? C : "",
|
|
65
|
+
ref: S,
|
|
66
66
|
type: "tel",
|
|
67
67
|
value: p
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
(
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
70
|
+
(l || N) && /* @__PURE__ */ V(D, { children: [
|
|
71
|
+
/* @__PURE__ */ o(J, { disabled: a, hasLabel: !!r, visible: p.length >= 6, children: "-" }),
|
|
72
|
+
/* @__PURE__ */ o(
|
|
73
|
+
Q,
|
|
74
74
|
{
|
|
75
75
|
disabled: a,
|
|
76
76
|
hasLabel: !!r,
|
|
77
|
-
onBlur: () =>
|
|
78
|
-
onChange: (e) =>
|
|
79
|
-
onFocus: () =>
|
|
80
|
-
onKeyDown: (e) =>
|
|
77
|
+
onBlur: () => s(!1),
|
|
78
|
+
onChange: (e) => I(e, $, 1, m),
|
|
79
|
+
onFocus: () => s(!0),
|
|
80
|
+
onKeyDown: (e) => P(e, c, S),
|
|
81
81
|
ref: g,
|
|
82
82
|
type: "tel",
|
|
83
83
|
value: c
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ o(X, { hasLabel: !!r, children: A === 7 ? /* @__PURE__ */ o(
|
|
87
|
+
Y,
|
|
88
88
|
{
|
|
89
89
|
disabled: a,
|
|
90
90
|
onClick: () => g?.current?.focus(),
|
|
91
91
|
visible: c.length > 0,
|
|
92
92
|
children: "●●●●●●"
|
|
93
93
|
}
|
|
94
|
-
) : /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
94
|
+
) : /* @__PURE__ */ V(D, { children: [
|
|
95
|
+
/* @__PURE__ */ o(Z, { disabled: a, children: M }),
|
|
96
|
+
/* @__PURE__ */ o(_, { visible: c.length > 0, children: "●●●●●●" }),
|
|
97
|
+
/* @__PURE__ */ o(
|
|
98
|
+
ee,
|
|
99
99
|
{
|
|
100
|
-
autoFocus: !!(f &&
|
|
100
|
+
autoFocus: !!(f && x),
|
|
101
101
|
disabled: a,
|
|
102
102
|
hasLabel: !!r,
|
|
103
|
-
onBlur: () =>
|
|
104
|
-
onChange: (e) =>
|
|
103
|
+
onBlur: () => s(!1),
|
|
104
|
+
onChange: (e) => I(e, j, 6),
|
|
105
105
|
onClick: () => {
|
|
106
|
-
|
|
106
|
+
m.current?.setSelectionRange(n.length, n.length);
|
|
107
107
|
},
|
|
108
108
|
onFocus: () => {
|
|
109
|
-
|
|
109
|
+
s(!0);
|
|
110
110
|
},
|
|
111
111
|
onKeyDown: (e) => {
|
|
112
112
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
113
113
|
e.preventDefault(), e.stopPropagation();
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
P(e, n, g);
|
|
117
117
|
},
|
|
118
|
-
ref:
|
|
118
|
+
ref: m,
|
|
119
119
|
type: "tel",
|
|
120
|
-
value:
|
|
120
|
+
value: n
|
|
121
121
|
}
|
|
122
122
|
)
|
|
123
123
|
] }) })
|
|
@@ -125,5 +125,5 @@ const _ = /[^0-9]/g, oe = (P) => {
|
|
|
125
125
|
] });
|
|
126
126
|
};
|
|
127
127
|
export {
|
|
128
|
-
|
|
128
|
+
ae as ResidentNumberInput
|
|
129
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),w=require("../../ui/typography.cjs.js");require("../../../icons/src/icons/Alarm_fill.cjs.js");require("../../../icons/src/icons/Calendar.cjs.js");require("../../../icons/src/icons/Cancel.cjs.js");const N=require("../../../icons/src/icons/Cancel_circle.cjs.js");require("../../../icons/src/icons/Cart_fill.cjs.js");require("../../../icons/src/icons/Check.cjs.js");require("../../../icons/src/icons/Chevron_down.cjs.js");require("../../../icons/src/icons/Chevron_left.cjs.js");require("../../../icons/src/icons/Chevron_right.cjs.js");require("../../../icons/src/icons/Chevron_up.cjs.js");require("../../../icons/src/icons/Double_Chevron_left.cjs.js");require("../../../icons/src/icons/Double_Chevron_right.cjs.js");require("../../../icons/src/icons/Eye_fill.cjs.js");require("../../../icons/src/icons/Eye_slash_fill.cjs.js");require("../../../icons/src/icons/Filter.cjs.js");require("../../../icons/src/icons/Information.cjs.js");require("../../../icons/src/icons/Menu.cjs.js");require("../../../icons/src/icons/More.cjs.js");require("../../../icons/src/icons/Person_fill.cjs.js");require("../../../icons/src/icons/Plus.cjs.js");require("../../../icons/src/icons/Question_circle.cjs.js");require("../../../icons/src/icons/Re.cjs.js");require("../../../icons/src/icons/Search.cjs.js");require("../../../icons/src/icons/Setting_fill.cjs.js");require("../../../icons/src/icons/Share.cjs.js");require("../../../icons/src/icons/Store.cjs.js");const i=require("../../../lib/utils.cjs.js"),_=o=>o&&typeof o=="object"&&"default"in o?o:{default:o},F=_(n),f=F.default.forwardRef(({className:o,type:h,label:a,error:s,decoration:l,placeholder:y,onDelete:d,guideMessage:x,...r},g)=>{const[u,p]=n.useState(!1),[b,q]=n.useState(!1),c=u||b,m=a&&c||!a,v=!l&&d!==void 0&&u&&b,j=e=>{e.stopPropagation(),d?.()};return n.useEffect(()=>{q(!!r.value)},[r.value]),t.jsxs("div",{className:"relative",children:[t.jsxs("div",{className:i.cn("relative flex items-center rounded-[10px] bg-white","border border-transparent hover:border hover:border-gray-600","transition-colors duration-200",u?"border border-gray-600":"",s?"border border-red-400 hover:border-red-400":"",r.disabled&&"cursor-not-allowed border border-gray-50 bg-gray-25 hover:border-gray-50"),children:[a&&t.jsx("label",{className:i.cn("absolute left-[20px] text-gray-200 transition-all duration-200",c?"typo-b2 top-[11px]":"typo-t1 top-1/2 -translate-y-1/2",r.disabled&&"cursor-not-allowed"),htmlFor:r.id,children:a}),t.jsxs("div",{className:"flex w-full items-end justify-between pr-[15px]",children:[t.jsx("input",{className:i.cn("typo-t1 w-full py-[20px] pl-[20px] outline-none","file:border-0 file:bg-transparent","typo-t1 placeholder:text-gray-200","disabled:cursor-not-allowed disabled:text-gray-200",a&&c&&"pt-[30px] pb-[10px] pl-[20px]",l&&"pr-10",o),onBlur:e=>{p(!1),r.onBlur?.(e)},onChange:e=>{q(e.target.value.length>0),r.onChange?.(e)},onFocus:e=>{p(!0),r.onFocus?.(e)},placeholder:m?y:void 0,ref:g,type:h,...r}),v&&t.jsx("button",{className:i.cn("absolute right-[15px] cursor-pointer",a?"bottom-[10px]":"bottom-[19px]"),onClick:j,onMouseDown:e=>e.preventDefault(),type:"button",children:t.jsx(N.default,{className:"text-gray-200"})})]}),l&&t.jsx("div",{className:"absolute right-[15px] flex items-center",children:l})]}),(s||x)&&t.jsx(w.Typography,{className:i.cn("mt-[9px] ml-[5px]",s?"text-red-400":"text-gray-400"),variant:"b2",children:s||x})]})});f.displayName="TextField";exports.TextField=f;
|