@x-plat/design-system 0.1.1
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/README.md +123 -0
- package/dist/attributes-DJIWir_0.d.cts +7 -0
- package/dist/attributes-DJIWir_0.d.ts +7 -0
- package/dist/breakpoints-DsXkJgdl.d.cts +35 -0
- package/dist/breakpoints-DsXkJgdl.d.ts +35 -0
- package/dist/colors-BG91q_uV.d.cts +133 -0
- package/dist/colors-BG91q_uV.d.ts +133 -0
- package/dist/components/Button/index.cjs +203 -0
- package/dist/components/Button/index.css +1231 -0
- package/dist/components/Button/index.d.cts +132 -0
- package/dist/components/Button/index.d.ts +132 -0
- package/dist/components/Button/index.js +176 -0
- package/dist/components/Card/index.cjs +56 -0
- package/dist/components/Card/index.css +27 -0
- package/dist/components/Card/index.d.cts +13 -0
- package/dist/components/Card/index.d.ts +13 -0
- package/dist/components/Card/index.js +29 -0
- package/dist/components/Chart/index.cjs +393 -0
- package/dist/components/Chart/index.css +4 -0
- package/dist/components/Chart/index.d.cts +10 -0
- package/dist/components/Chart/index.d.ts +10 -0
- package/dist/components/Chart/index.js +367 -0
- package/dist/components/CheckBox/index.cjs +1116 -0
- package/dist/components/CheckBox/index.css +598 -0
- package/dist/components/CheckBox/index.d.cts +132 -0
- package/dist/components/CheckBox/index.d.ts +132 -0
- package/dist/components/CheckBox/index.js +1089 -0
- package/dist/components/Chip/index.cjs +193 -0
- package/dist/components/Chip/index.css +1227 -0
- package/dist/components/Chip/index.d.cts +132 -0
- package/dist/components/Chip/index.d.ts +132 -0
- package/dist/components/Chip/index.js +166 -0
- package/dist/components/DatePicker/index.cjs +1653 -0
- package/dist/components/DatePicker/index.css +1417 -0
- package/dist/components/DatePicker/index.d.cts +56 -0
- package/dist/components/DatePicker/index.d.ts +56 -0
- package/dist/components/DatePicker/index.js +1613 -0
- package/dist/components/HtmlTypeWriter/index.cjs +172 -0
- package/dist/components/HtmlTypeWriter/index.css +23 -0
- package/dist/components/HtmlTypeWriter/index.d.cts +14 -0
- package/dist/components/HtmlTypeWriter/index.d.ts +14 -0
- package/dist/components/HtmlTypeWriter/index.js +135 -0
- package/dist/components/ImageSelector/index.cjs +1063 -0
- package/dist/components/ImageSelector/index.css +85 -0
- package/dist/components/ImageSelector/index.d.cts +10 -0
- package/dist/components/ImageSelector/index.d.ts +10 -0
- package/dist/components/ImageSelector/index.js +1026 -0
- package/dist/components/Input/index.cjs +410 -0
- package/dist/components/Input/index.css +74 -0
- package/dist/components/Input/index.d.cts +23 -0
- package/dist/components/Input/index.d.ts +23 -0
- package/dist/components/Input/index.js +372 -0
- package/dist/components/Modal/index.cjs +101 -0
- package/dist/components/Modal/index.css +39 -0
- package/dist/components/Modal/index.d.cts +16 -0
- package/dist/components/Modal/index.d.ts +16 -0
- package/dist/components/Modal/index.js +64 -0
- package/dist/components/PopOver/index.cjs +176 -0
- package/dist/components/PopOver/index.css +27 -0
- package/dist/components/PopOver/index.d.cts +15 -0
- package/dist/components/PopOver/index.d.ts +15 -0
- package/dist/components/PopOver/index.js +139 -0
- package/dist/components/Radio/index.cjs +257 -0
- package/dist/components/Radio/index.css +777 -0
- package/dist/components/Radio/index.d.cts +154 -0
- package/dist/components/Radio/index.d.ts +154 -0
- package/dist/components/Radio/index.js +219 -0
- package/dist/components/Select/index.cjs +1203 -0
- package/dist/components/Select/index.css +136 -0
- package/dist/components/Select/index.d.cts +44 -0
- package/dist/components/Select/index.d.ts +44 -0
- package/dist/components/Select/index.js +1165 -0
- package/dist/components/Swiper/index.cjs +144 -0
- package/dist/components/Swiper/index.d.cts +24 -0
- package/dist/components/Swiper/index.d.ts +24 -0
- package/dist/components/Swiper/index.js +128 -0
- package/dist/components/Switch/index.cjs +240 -0
- package/dist/components/Switch/index.css +780 -0
- package/dist/components/Switch/index.d.cts +131 -0
- package/dist/components/Switch/index.d.ts +131 -0
- package/dist/components/Switch/index.js +203 -0
- package/dist/components/Tab/index.cjs +122 -0
- package/dist/components/Tab/index.css +59 -0
- package/dist/components/Tab/index.d.cts +18 -0
- package/dist/components/Tab/index.d.ts +18 -0
- package/dist/components/Tab/index.js +85 -0
- package/dist/components/Table/index.cjs +384 -0
- package/dist/components/Table/index.css +4093 -0
- package/dist/components/Table/index.d.cts +174 -0
- package/dist/components/Table/index.d.ts +174 -0
- package/dist/components/Table/index.js +343 -0
- package/dist/components/TextArea/index.cjs +114 -0
- package/dist/components/TextArea/index.css +34 -0
- package/dist/components/TextArea/index.d.cts +6 -0
- package/dist/components/TextArea/index.d.ts +6 -0
- package/dist/components/TextArea/index.js +77 -0
- package/dist/components/Tooltip/index.cjs +210 -0
- package/dist/components/Tooltip/index.css +599 -0
- package/dist/components/Tooltip/index.d.cts +134 -0
- package/dist/components/Tooltip/index.d.ts +134 -0
- package/dist/components/Tooltip/index.js +173 -0
- package/dist/components/Video/index.cjs +269 -0
- package/dist/components/Video/index.css +71 -0
- package/dist/components/Video/index.d.cts +15 -0
- package/dist/components/Video/index.d.ts +15 -0
- package/dist/components/Video/index.js +232 -0
- package/dist/components/index.cjs +3221 -0
- package/dist/components/index.css +9972 -0
- package/dist/components/index.d.cts +23 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/index.js +3167 -0
- package/dist/index.cjs +8216 -0
- package/dist/index.css +10087 -0
- package/dist/index.d.cts +31 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +7855 -0
- package/dist/layout/Grid/FullGrid/index.cjs +54 -0
- package/dist/layout/Grid/FullGrid/index.css +21 -0
- package/dist/layout/Grid/FullGrid/index.d.cts +9 -0
- package/dist/layout/Grid/FullGrid/index.d.ts +9 -0
- package/dist/layout/Grid/FullGrid/index.js +27 -0
- package/dist/layout/Grid/FullScreen/index.cjs +54 -0
- package/dist/layout/Grid/FullScreen/index.css +23 -0
- package/dist/layout/Grid/FullScreen/index.d.cts +9 -0
- package/dist/layout/Grid/FullScreen/index.d.ts +9 -0
- package/dist/layout/Grid/FullScreen/index.js +27 -0
- package/dist/layout/Grid/GapGrid/index.cjs +32 -0
- package/dist/layout/Grid/GapGrid/index.d.cts +12 -0
- package/dist/layout/Grid/GapGrid/index.d.ts +12 -0
- package/dist/layout/Grid/GapGrid/index.js +11 -0
- package/dist/layout/Grid/Item/index.cjs +71 -0
- package/dist/layout/Grid/Item/index.css +19 -0
- package/dist/layout/Grid/Item/index.d.cts +20 -0
- package/dist/layout/Grid/Item/index.d.ts +20 -0
- package/dist/layout/Grid/Item/index.js +44 -0
- package/dist/layout/Grid/index.cjs +95 -0
- package/dist/layout/Grid/index.css +65 -0
- package/dist/layout/Grid/index.d.cts +5 -0
- package/dist/layout/Grid/index.d.ts +5 -0
- package/dist/layout/Grid/index.js +65 -0
- package/dist/layout/Header/index.cjs +45 -0
- package/dist/layout/Header/index.css +11 -0
- package/dist/layout/Header/index.d.cts +10 -0
- package/dist/layout/Header/index.d.ts +10 -0
- package/dist/layout/Header/index.js +18 -0
- package/dist/layout/Layout/index.cjs +44 -0
- package/dist/layout/Layout/index.css +23 -0
- package/dist/layout/Layout/index.d.cts +15 -0
- package/dist/layout/Layout/index.d.ts +15 -0
- package/dist/layout/Layout/index.js +17 -0
- package/dist/layout/SideBar/index.cjs +101 -0
- package/dist/layout/SideBar/index.css +10 -0
- package/dist/layout/SideBar/index.d.cts +16 -0
- package/dist/layout/SideBar/index.d.ts +16 -0
- package/dist/layout/SideBar/index.js +62 -0
- package/dist/layout/index.cjs +188 -0
- package/dist/layout/index.css +112 -0
- package/dist/layout/index.d.cts +8 -0
- package/dist/layout/index.d.ts +8 -0
- package/dist/layout/index.js +143 -0
- package/dist/tokens/index.cjs +6225 -0
- package/dist/tokens/index.d.cts +593 -0
- package/dist/tokens/index.d.ts +593 -0
- package/dist/tokens/index.js +5900 -0
- package/package.json +86 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/Input/index.ts
|
|
31
|
+
var Input_exports = {};
|
|
32
|
+
__export(Input_exports, {
|
|
33
|
+
Input: () => Input_default,
|
|
34
|
+
PasswordInput: () => PasswordInput_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Input_exports);
|
|
37
|
+
|
|
38
|
+
// src/components/Input/Input.tsx
|
|
39
|
+
var import_react = __toESM(require("react"), 1);
|
|
40
|
+
|
|
41
|
+
// node_modules/clsx/dist/clsx.mjs
|
|
42
|
+
function r(e) {
|
|
43
|
+
var t, f, n = "";
|
|
44
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
45
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
46
|
+
var o = e.length;
|
|
47
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
48
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
49
|
+
return n;
|
|
50
|
+
}
|
|
51
|
+
function clsx() {
|
|
52
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
53
|
+
return n;
|
|
54
|
+
}
|
|
55
|
+
var clsx_default = clsx;
|
|
56
|
+
|
|
57
|
+
// src/tokens/svg/validation/ErrorIcon.tsx
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
+
var ErrorIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
60
|
+
"svg",
|
|
61
|
+
{
|
|
62
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
+
width: "1em",
|
|
64
|
+
height: "1em",
|
|
65
|
+
viewBox: "0 0 16 16",
|
|
66
|
+
fill: "none",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { clipPath: "url(#clip0_1196_9603)", children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
"path",
|
|
71
|
+
{
|
|
72
|
+
d: "M9.57588 5.57559C9.81019 5.34127 10.19 5.34127 10.4243 5.57559C10.6586 5.8099 10.6586 6.18971 10.4243 6.42402L8.84854 7.9998L10.4243 9.57559C10.6586 9.8099 10.6586 10.1897 10.4243 10.424C10.19 10.6583 9.81019 10.6583 9.57588 10.424L8.0001 8.84824L6.42432 10.424C6.19 10.6583 5.81019 10.6583 5.57588 10.424C5.34156 10.1897 5.34156 9.8099 5.57588 9.57559L7.15166 7.9998L5.57588 6.42402C5.34156 6.18971 5.34156 5.8099 5.57588 5.57559C5.81019 5.34127 6.19 5.34127 6.42432 5.57559L8.0001 7.15137L9.57588 5.57559Z",
|
|
73
|
+
fill: "currentColor"
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
"path",
|
|
78
|
+
{
|
|
79
|
+
fillRule: "evenodd",
|
|
80
|
+
clipRule: "evenodd",
|
|
81
|
+
d: "M8.0001 0.733398C12.0131 0.73361 15.2671 3.98679 15.2673 7.9998C15.2672 12.0129 12.0131 15.2668 8.0001 15.267C3.98701 15.2669 0.733016 12.0129 0.73291 7.9998C0.733051 3.98674 3.98704 0.733539 8.0001 0.733398ZM8.0001 1.9334C4.64978 1.93354 1.93383 4.64948 1.93369 7.9998C1.9338 11.3502 4.64975 14.0669 8.0001 14.067C11.3504 14.0668 14.0672 11.3501 14.0673 7.9998C14.0671 4.64953 11.3504 1.93361 8.0001 1.9334Z",
|
|
82
|
+
fill: "currentColor"
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_1196_9603", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
var ErrorIcon_default = ErrorIcon;
|
|
91
|
+
|
|
92
|
+
// src/tokens/svg/validation/InfoIcon.tsx
|
|
93
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
94
|
+
var InfoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
95
|
+
"svg",
|
|
96
|
+
{
|
|
97
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
98
|
+
width: "1em",
|
|
99
|
+
height: "1em",
|
|
100
|
+
viewBox: "0 0 16 16",
|
|
101
|
+
fill: "none",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { clipPath: "url(#clip0_1188_11261)", children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
105
|
+
"path",
|
|
106
|
+
{
|
|
107
|
+
d: "M8.00156 7.39999C8.33293 7.39999 8.60156 7.66862 8.60156 7.99999V10.6664C8.60156 10.9978 8.33293 11.2664 8.00156 11.2664C7.67019 11.2664 7.40156 10.9978 7.40156 10.6664V7.99999C7.40156 7.66862 7.67019 7.39999 8.00156 7.39999Z",
|
|
108
|
+
fill: "currentColor"
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
112
|
+
"path",
|
|
113
|
+
{
|
|
114
|
+
d: "M8.00859 4.73358C8.3398 4.73378 8.60859 5.00233 8.60859 5.33358C8.60849 5.66474 8.33973 5.93338 8.00859 5.93358H8.00156C7.67026 5.93358 7.40167 5.66486 7.40156 5.33358C7.40156 5.00221 7.67019 4.73358 8.00156 4.73358H8.00859Z",
|
|
115
|
+
fill: "currentColor"
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
119
|
+
"path",
|
|
120
|
+
{
|
|
121
|
+
fillRule: "evenodd",
|
|
122
|
+
clipRule: "evenodd",
|
|
123
|
+
d: "M8.00156 0.733582C12.0146 0.733793 15.2686 3.98697 15.2688 7.99999C15.2686 12.013 12.0146 15.267 8.00156 15.2672C3.98848 15.267 0.734481 12.0131 0.734375 7.99999C0.734516 3.98693 3.9885 0.733722 8.00156 0.733582ZM8.00156 1.93358C4.65124 1.93372 1.9353 4.64967 1.93516 7.99999C1.93526 11.3503 4.65122 14.067 8.00156 14.0672C11.3518 14.067 14.0686 11.3503 14.0688 7.99999C14.0686 4.64971 11.3518 1.93379 8.00156 1.93358Z",
|
|
124
|
+
fill: "currentColor"
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_1188_11261", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
var InfoIcon_default = InfoIcon;
|
|
133
|
+
|
|
134
|
+
// src/tokens/svg/validation/SuccessIcon.tsx
|
|
135
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
136
|
+
var SuccessIcon = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
137
|
+
"svg",
|
|
138
|
+
{
|
|
139
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
140
|
+
width: "1em",
|
|
141
|
+
height: "1em",
|
|
142
|
+
viewBox: "0 0 16 16",
|
|
143
|
+
fill: "none",
|
|
144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
145
|
+
"path",
|
|
146
|
+
{
|
|
147
|
+
d: "M12.9084 3.57597C13.1426 3.34172 13.5225 3.34185 13.7568 3.57597C13.9911 3.81028 13.9911 4.19009 13.7568 4.4244L6.424 11.758C6.31157 11.8703 6.15869 11.9337 5.99978 11.9338C5.8409 11.9337 5.68798 11.8703 5.57556 11.758L2.24197 8.4244C2.00782 8.19018 2.00795 7.81028 2.24197 7.57597C2.47626 7.34167 2.85609 7.34172 3.09041 7.57597L5.999 10.4846L12.9084 3.57597Z",
|
|
148
|
+
fill: "currentColor"
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
var SuccessIcon_default = SuccessIcon;
|
|
154
|
+
|
|
155
|
+
// src/components/Input/InputValidations.tsx
|
|
156
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
157
|
+
var InputValidations = (props) => {
|
|
158
|
+
const { message, status = "default" } = props;
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "icon", children: [
|
|
161
|
+
status === "default" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InfoIcon_default, {}),
|
|
162
|
+
status === "success" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SuccessIcon_default, {}),
|
|
163
|
+
status === "warning" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InfoIcon_default, {}),
|
|
164
|
+
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorIcon_default, {})
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "message", children: message })
|
|
167
|
+
] });
|
|
168
|
+
};
|
|
169
|
+
InputValidations.displayName = "InputValidations";
|
|
170
|
+
var InputValidations_default = InputValidations;
|
|
171
|
+
|
|
172
|
+
// src/components/Input/reg.ts
|
|
173
|
+
var numberAndCommaReg = /^[0-9,]+$/;
|
|
174
|
+
var phoneNumberMaxLengthReg = /^.{0,13}$/;
|
|
175
|
+
var creditCardNumberReg = /^(\d{4}-){3}\d{4}$/;
|
|
176
|
+
var anyReg = /^.*$/;
|
|
177
|
+
var inputTypeReg = {
|
|
178
|
+
number: numberAndCommaReg,
|
|
179
|
+
tel: phoneNumberMaxLengthReg,
|
|
180
|
+
creditCard: creditCardNumberReg,
|
|
181
|
+
email: anyReg,
|
|
182
|
+
password: anyReg,
|
|
183
|
+
text: anyReg
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// src/components/Input/utils/tel.ts
|
|
187
|
+
var handleTelBackspace = (prevValue, currValue) => {
|
|
188
|
+
if (!prevValue || !currValue) return currValue;
|
|
189
|
+
if (prevValue.length <= currValue.length) return currValue;
|
|
190
|
+
const prevArr = [...prevValue];
|
|
191
|
+
const currArr = [...currValue];
|
|
192
|
+
const diffIndex = prevArr.findIndex((char, idx) => char !== currArr[idx]);
|
|
193
|
+
if (diffIndex >= 0 && prevArr[diffIndex] === "-") {
|
|
194
|
+
const chars = prevValue.split("");
|
|
195
|
+
for (let i = diffIndex - 1; i >= 0; i--) {
|
|
196
|
+
if (/\d/.test(chars[i])) {
|
|
197
|
+
chars.splice(i, 1);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return chars.join("");
|
|
202
|
+
}
|
|
203
|
+
return currValue;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// src/components/Input/Input.tsx
|
|
207
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
208
|
+
var import_react2 = require("react");
|
|
209
|
+
var formatValue = (type, value) => {
|
|
210
|
+
if (value === null || value === void 0) return "";
|
|
211
|
+
const strValue = Array.isArray(value) ? String(value[0] ?? "") : String(value);
|
|
212
|
+
switch (type) {
|
|
213
|
+
case "number": {
|
|
214
|
+
if (!strValue) return "";
|
|
215
|
+
const n = typeof value === "number" ? value : Number(strValue.replace(/,/g, ""));
|
|
216
|
+
return isNaN(n) ? "" : n.toLocaleString("en-US");
|
|
217
|
+
}
|
|
218
|
+
case "tel": {
|
|
219
|
+
const digits = strValue.replace(/\D/g, "");
|
|
220
|
+
if (!digits) return "";
|
|
221
|
+
if (digits.startsWith("02")) {
|
|
222
|
+
if (digits.length <= 2) return digits;
|
|
223
|
+
if (digits.length <= 6) return digits.replace(/^(02)(\d+)/, "$1-$2");
|
|
224
|
+
return digits.replace(/^(02)(\d{3,4})(\d{0,4})$/, "$1-$2-$3");
|
|
225
|
+
}
|
|
226
|
+
if (/^01[016789]/.test(digits)) {
|
|
227
|
+
if (digits.length <= 3) return digits;
|
|
228
|
+
if (digits.length <= 6)
|
|
229
|
+
return digits.replace(/^(01[016789])(\d+)/, "$1-$2");
|
|
230
|
+
if (digits.length === 10) {
|
|
231
|
+
return digits.replace(/^(01[016789])(\d{3})(\d{0,4})$/, "$1-$2-$3");
|
|
232
|
+
}
|
|
233
|
+
return digits.replace(/^(01[016789])(\d{4})(\d{0,4})$/, "$1-$2-$3");
|
|
234
|
+
}
|
|
235
|
+
if (digits.length <= 3) return digits;
|
|
236
|
+
if (digits.length <= 6) return digits.replace(/^(\d{3})(\d+)/, "$1-$2");
|
|
237
|
+
return digits.replace(/^(\d{3})(\d{3,4})(\d{0,4})$/, "$1-$2-$3");
|
|
238
|
+
}
|
|
239
|
+
default:
|
|
240
|
+
return strValue;
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
var parseValue = (type, value) => {
|
|
244
|
+
switch (type) {
|
|
245
|
+
case "number": {
|
|
246
|
+
if (value === "") return "";
|
|
247
|
+
const n = Number(value.replace(/,/g, ""));
|
|
248
|
+
return isNaN(n) ? 0 : n;
|
|
249
|
+
}
|
|
250
|
+
case "tel":
|
|
251
|
+
return value.replace(/\D/g, "");
|
|
252
|
+
default:
|
|
253
|
+
return value;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
var Input = import_react.default.forwardRef((props, ref) => {
|
|
257
|
+
const {
|
|
258
|
+
value,
|
|
259
|
+
onChange,
|
|
260
|
+
type = "text",
|
|
261
|
+
suffix,
|
|
262
|
+
className,
|
|
263
|
+
disabled,
|
|
264
|
+
validations,
|
|
265
|
+
...inputProps
|
|
266
|
+
} = props;
|
|
267
|
+
const localValue = formatValue(type, value);
|
|
268
|
+
const handleChange = (e) => {
|
|
269
|
+
let val = e.target.value;
|
|
270
|
+
if (val !== "" && !inputTypeReg[type].test(val)) return;
|
|
271
|
+
if (type === "tel" && localValue) {
|
|
272
|
+
val = handleTelBackspace(localValue, val);
|
|
273
|
+
}
|
|
274
|
+
if (onChange) {
|
|
275
|
+
const event = {
|
|
276
|
+
...e,
|
|
277
|
+
target: { value: parseValue(type, val) }
|
|
278
|
+
};
|
|
279
|
+
onChange(event);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: clsx_default("lib-xplat-input-wrap", className), children: [
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
284
|
+
"div",
|
|
285
|
+
{
|
|
286
|
+
className: clsx_default("lib-xplat-input", disabled ? "disabled" : void 0),
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
289
|
+
"input",
|
|
290
|
+
{
|
|
291
|
+
...inputProps,
|
|
292
|
+
ref,
|
|
293
|
+
disabled,
|
|
294
|
+
type: type === "number" ? "text" : type,
|
|
295
|
+
value: localValue,
|
|
296
|
+
onChange: handleChange
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "suffix", children: suffix })
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
validations && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ (0, import_react2.createElement)(
|
|
304
|
+
InputValidations_default,
|
|
305
|
+
{
|
|
306
|
+
...validation,
|
|
307
|
+
key: `${validation.message}_${idx}`
|
|
308
|
+
}
|
|
309
|
+
)) })
|
|
310
|
+
] });
|
|
311
|
+
});
|
|
312
|
+
Input.displayName = "Input";
|
|
313
|
+
var Input_default = Input;
|
|
314
|
+
|
|
315
|
+
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
316
|
+
var import_react3 = __toESM(require("react"), 1);
|
|
317
|
+
|
|
318
|
+
// src/tokens/svg/Input/CloseEyeIcon.tsx
|
|
319
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
320
|
+
var CloseEyeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
321
|
+
"svg",
|
|
322
|
+
{
|
|
323
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
324
|
+
width: "1em",
|
|
325
|
+
height: "1em",
|
|
326
|
+
viewBox: "0 0 20 20",
|
|
327
|
+
fill: "none",
|
|
328
|
+
children: [
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
330
|
+
"path",
|
|
331
|
+
{
|
|
332
|
+
fillRule: "evenodd",
|
|
333
|
+
clipRule: "evenodd",
|
|
334
|
+
d: "M0.219742 0.219551C0.512654 -0.0731039 0.987475 -0.0732631 1.28029 0.219551L19.6133 18.5526C19.9059 18.8454 19.9059 19.3203 19.6133 19.6131C19.3205 19.9059 18.8457 19.9058 18.5527 19.6131L14.7813 15.8416C13.3403 16.784 11.6591 17.3045 9.92873 17.3328H9.91701C6.70085 17.3328 4.22416 15.4963 2.59865 13.7625C1.77931 12.8885 1.15357 12.0171 0.732437 11.3651C0.521591 11.0386 0.360106 10.7651 0.250992 10.5711C0.196584 10.4744 0.154657 10.3968 0.125992 10.3426C0.111712 10.3156 0.100585 10.2933 0.0927887 10.2781C0.0890167 10.2708 0.0852609 10.2649 0.083023 10.2606C0.0819635 10.2585 0.0817067 10.2561 0.0810699 10.2547L0.0800933 10.2528L0.0791168 10.2518C-0.0297164 10.034 -0.0260827 9.77692 0.0888824 9.56232C1.04113 7.78778 2.31584 6.20831 3.84572 4.90607L0.219742 1.2801C-0.0731515 0.987204 -0.0731515 0.512444 0.219742 0.219551ZM4.91115 5.9715C3.58556 7.08096 2.46618 8.41669 1.60646 9.91779C1.70047 10.0817 1.82896 10.2988 1.9922 10.5516C2.37833 11.1494 2.95068 11.9449 3.69337 12.7371C5.19121 14.3347 7.2954 15.8286 9.90822 15.8319C11.2476 15.8092 12.5514 15.4346 13.6934 14.7537L11.6348 12.6951C11.4891 12.7906 11.3365 12.8759 11.1768 12.9471C10.7784 13.1246 10.3482 13.2205 9.91212 13.2283C9.47589 13.236 9.0413 13.1554 8.63673 12.992C8.23247 12.8287 7.86504 12.5854 7.55666 12.2772C7.24809 11.9686 7.00429 11.6007 6.84084 11.1961C6.6774 10.7915 6.59683 10.358 6.60451 9.9217C6.61221 9.48532 6.70813 9.05473 6.88576 8.65607C6.95708 8.49604 7.04011 8.3419 7.13576 8.19611L4.91115 5.9715ZM8.24123 9.30158C8.15522 9.50642 8.10843 9.72574 8.10451 9.94807C8.10037 10.183 8.14345 10.4167 8.23146 10.6346C8.31948 10.8524 8.45111 11.0505 8.6172 11.2166C8.78327 11.3825 8.98157 11.5135 9.19923 11.6014C9.41683 11.6892 9.65018 11.7324 9.88478 11.7283C10.1069 11.7244 10.3257 11.6765 10.5303 11.5906L8.24123 9.30158Z",
|
|
335
|
+
fill: "currentColor"
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
339
|
+
"path",
|
|
340
|
+
{
|
|
341
|
+
d: "M9.91701 2.5008C13.1328 2.5011 15.609 4.33645 17.2344 6.07014C18.0538 6.94422 18.6805 7.81555 19.1016 8.4676C19.3125 8.79427 19.473 9.06857 19.582 9.26252C19.6366 9.35947 19.6784 9.43688 19.707 9.49103C19.7213 9.51797 19.7325 9.53938 19.7402 9.55451C19.744 9.56183 19.7478 9.5677 19.75 9.57209L19.7539 9.5799L19.7901 9.66486C19.8604 9.86248 19.8453 10.0829 19.7451 10.2703C19.2148 11.2625 18.5817 12.1966 17.8574 13.0574C17.5908 13.3743 17.1177 13.4147 16.8008 13.1483C16.4839 12.8816 16.4424 12.4085 16.709 12.0916C17.2798 11.4133 17.7876 10.6845 18.2266 9.91486C18.1327 9.75115 18.0048 9.53442 17.8418 9.28205C17.4558 8.68431 16.8833 7.88875 16.1406 7.0965C14.6413 5.49721 12.5337 4.00013 9.91701 3.99982H9.91505C9.3843 3.99858 8.85471 4.05957 8.33791 4.18049C7.93468 4.27487 7.53105 4.02408 7.43654 3.62092C7.34213 3.21761 7.5928 2.81396 7.99611 2.71955C8.62561 2.57227 9.27051 2.49939 9.91701 2.5008Z",
|
|
342
|
+
fill: "currentColor"
|
|
343
|
+
}
|
|
344
|
+
)
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
var CloseEyeIcon_default = CloseEyeIcon;
|
|
349
|
+
|
|
350
|
+
// src/tokens/svg/Input/OpenEyeIcon.tsx
|
|
351
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
352
|
+
var OpenEyeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
353
|
+
"svg",
|
|
354
|
+
{
|
|
355
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
356
|
+
width: "1em",
|
|
357
|
+
height: "1em",
|
|
358
|
+
viewBox: "0 0 20 20",
|
|
359
|
+
fill: "none",
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
362
|
+
"path",
|
|
363
|
+
{
|
|
364
|
+
fillRule: "evenodd",
|
|
365
|
+
clipRule: "evenodd",
|
|
366
|
+
d: "M10 6.75C11.795 6.75 13.25 8.20507 13.25 10C13.25 11.7949 11.795 13.25 10 13.25C8.20514 13.25 6.75004 11.7949 6.75004 10C6.75004 8.20509 8.20514 6.75002 10 6.75ZM10 8.25C9.03356 8.25002 8.25004 9.03352 8.25004 10C8.25004 10.9665 9.03356 11.75 10 11.75C10.9665 11.75 11.75 10.9665 11.75 10C11.75 9.0335 10.9665 8.25 10 8.25Z",
|
|
367
|
+
fill: "currentColor"
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
371
|
+
"path",
|
|
372
|
+
{
|
|
373
|
+
fillRule: "evenodd",
|
|
374
|
+
clipRule: "evenodd",
|
|
375
|
+
d: "M10.001 2.58301C13.2168 2.5833 15.693 4.41963 17.3184 6.15332C18.1379 7.02746 18.7644 7.8987 19.1856 8.55078C19.3966 8.87754 19.5569 9.15172 19.6661 9.3457C19.7206 9.44274 19.7624 9.52003 19.7911 9.57422C19.8054 9.60124 19.8165 9.62253 19.8243 9.6377C19.8281 9.64511 19.8318 9.65085 19.834 9.65527L19.8379 9.66309L19.8731 9.74512C19.9423 9.93686 19.9301 10.1503 19.8379 10.335L19.834 10.3438C19.8318 10.3481 19.828 10.354 19.8243 10.3613C19.8165 10.3764 19.8053 10.3989 19.7911 10.4258C19.7624 10.4799 19.7204 10.5577 19.6661 10.6543C19.557 10.8482 19.3963 11.1219 19.1856 11.4482C18.7645 12.1003 18.1378 12.9716 17.3184 13.8457C15.693 15.5794 13.2169 17.4157 10.001 17.416C6.78478 17.416 4.30817 15.5796 2.68266 13.8457C1.86324 12.9716 1.23758 12.1003 0.816447 11.4482C0.605537 11.1217 0.444118 10.8483 0.335002 10.6543C0.280535 10.5575 0.23867 10.4799 0.210002 10.4258C0.195664 10.3987 0.184599 10.3765 0.176799 10.3613C0.172971 10.3539 0.169262 10.3481 0.167033 10.3438C0.165933 10.3416 0.165786 10.3393 0.16508 10.3379L0.164103 10.3359L0.163127 10.335C0.0576283 10.1238 0.0575788 9.87516 0.163127 9.66406L0.164103 9.66309L0.16508 9.66113C0.165655 9.65972 0.166042 9.65723 0.167033 9.65527C0.169295 9.6509 0.17306 9.64497 0.176799 9.6377C0.184576 9.62257 0.195818 9.60103 0.210002 9.57422C0.238658 9.52007 0.280573 9.44247 0.335002 9.3457C0.444118 9.15173 0.605537 8.87735 0.816447 8.55078C1.2376 7.89875 1.86341 7.02719 2.68266 6.15332C4.30818 4.41955 6.78494 2.58301 10.001 2.58301ZM10.001 4.08301C7.38417 4.08301 5.27685 5.58037 3.77738 7.17969C3.03465 7.97195 2.46234 8.7674 2.07621 9.36523C1.91278 9.6183 1.78352 9.83509 1.68949 9.99902C1.7836 10.1632 1.91229 10.3809 2.07621 10.6348C2.46234 11.2326 3.03462 12.028 3.77738 12.8203C5.27685 14.4196 7.38421 15.916 10.001 15.916C12.6177 15.9157 14.7253 14.4196 16.2246 12.8203C16.9674 12.028 17.5397 11.2326 17.9258 10.6348C18.0896 10.3812 18.2175 10.1631 18.3116 9.99902C18.2176 9.83513 18.0892 9.61828 17.9258 9.36523C17.5398 8.76747 16.9674 7.97197 16.2246 7.17969C14.7253 5.58039 12.6177 4.0833 10.001 4.08301Z",
|
|
376
|
+
fill: "currentColor"
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
var OpenEyeIcon_default = OpenEyeIcon;
|
|
383
|
+
|
|
384
|
+
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
385
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
386
|
+
var PasswordInput = import_react3.default.forwardRef(
|
|
387
|
+
(props, ref) => {
|
|
388
|
+
const { reg: _reg, ...inputProps } = props;
|
|
389
|
+
const [isView, setIsView] = import_react3.default.useState(false);
|
|
390
|
+
const handleChangeView = () => {
|
|
391
|
+
setIsView((prev) => !prev);
|
|
392
|
+
};
|
|
393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
394
|
+
Input_default,
|
|
395
|
+
{
|
|
396
|
+
...inputProps,
|
|
397
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "wrapper pointer", onClick: handleChangeView, children: isView ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(OpenEyeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CloseEyeIcon_default, {}) }),
|
|
398
|
+
type: isView ? "text" : "password",
|
|
399
|
+
ref
|
|
400
|
+
}
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
PasswordInput.displayName = "PasswordInput";
|
|
405
|
+
var PasswordInput_default = PasswordInput;
|
|
406
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
407
|
+
0 && (module.exports = {
|
|
408
|
+
Input,
|
|
409
|
+
PasswordInput
|
|
410
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* src/components/Input/input.scss */
|
|
2
|
+
.lib-xplat-input-wrap {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 0.5rem;
|
|
6
|
+
}
|
|
7
|
+
.lib-xplat-input-wrap .lib-xplat-input {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
border: 1px solid #D4D4D4;
|
|
11
|
+
border-radius: 0.5rem;
|
|
12
|
+
height: 2.5rem;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
background-color: #FFFFFF;
|
|
15
|
+
padding-right: 0.5rem;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
.lib-xplat-input-wrap .lib-xplat-input.disabled {
|
|
19
|
+
background-color: #F5F5F5;
|
|
20
|
+
cursor: not-allowed;
|
|
21
|
+
}
|
|
22
|
+
.lib-xplat-input-wrap .lib-xplat-input > input {
|
|
23
|
+
border: none;
|
|
24
|
+
outline: none;
|
|
25
|
+
flex: 1;
|
|
26
|
+
padding-left: 1rem;
|
|
27
|
+
padding-right: 0.5rem;
|
|
28
|
+
width: 100%;
|
|
29
|
+
color: #404040;
|
|
30
|
+
}
|
|
31
|
+
.lib-xplat-input-wrap .lib-xplat-input > input :disabled {
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
.lib-xplat-input-wrap .lib-xplat-input > .suffix {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
height: 100%;
|
|
39
|
+
color: #A1A1A1;
|
|
40
|
+
padding-right: 0.5rem;
|
|
41
|
+
}
|
|
42
|
+
.lib-xplat-input-wrap .lib-xplat-input > .suffix > .wrapper {
|
|
43
|
+
font: 500;
|
|
44
|
+
}
|
|
45
|
+
.lib-xplat-input-wrap .lib-xplat-input > .suffix > .wrapper.pointer {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
}
|
|
48
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap {
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: 0.5rem;
|
|
51
|
+
margin-left: 0.25rem;
|
|
52
|
+
}
|
|
53
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation {
|
|
54
|
+
display: flex;
|
|
55
|
+
gap: 0.25rem;
|
|
56
|
+
font-size: 0.75rem;
|
|
57
|
+
align-items: center;
|
|
58
|
+
user-select: none;
|
|
59
|
+
}
|
|
60
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation.default {
|
|
61
|
+
color: #A1A1A1;
|
|
62
|
+
}
|
|
63
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation.success {
|
|
64
|
+
color: #00A34F;
|
|
65
|
+
}
|
|
66
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation.warning {
|
|
67
|
+
color: #D18800;
|
|
68
|
+
}
|
|
69
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation.error {
|
|
70
|
+
color: #F80409;
|
|
71
|
+
}
|
|
72
|
+
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation > .icon {
|
|
73
|
+
font-size: 1rem;
|
|
74
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { I as InputAttributes } from '../../attributes-DJIWir_0.cjs';
|
|
3
|
+
|
|
4
|
+
interface InputProps extends InputAttributes {
|
|
5
|
+
type?: "text" | "number" | "email" | "password" | "tel";
|
|
6
|
+
validations?: {
|
|
7
|
+
status: "error" | "warning" | "success" | "default";
|
|
8
|
+
message: string;
|
|
9
|
+
}[];
|
|
10
|
+
suffix?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
|
|
14
|
+
interface PasswordInputProps extends InputAttributes {
|
|
15
|
+
validations?: {
|
|
16
|
+
status: "error" | "warning" | "success" | "default";
|
|
17
|
+
message: string;
|
|
18
|
+
}[];
|
|
19
|
+
reg?: RegExp;
|
|
20
|
+
}
|
|
21
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
|
|
23
|
+
export { Input, PasswordInput };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { I as InputAttributes } from '../../attributes-DJIWir_0.js';
|
|
3
|
+
|
|
4
|
+
interface InputProps extends InputAttributes {
|
|
5
|
+
type?: "text" | "number" | "email" | "password" | "tel";
|
|
6
|
+
validations?: {
|
|
7
|
+
status: "error" | "warning" | "success" | "default";
|
|
8
|
+
message: string;
|
|
9
|
+
}[];
|
|
10
|
+
suffix?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
|
|
14
|
+
interface PasswordInputProps extends InputAttributes {
|
|
15
|
+
validations?: {
|
|
16
|
+
status: "error" | "warning" | "success" | "default";
|
|
17
|
+
message: string;
|
|
18
|
+
}[];
|
|
19
|
+
reg?: RegExp;
|
|
20
|
+
}
|
|
21
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
|
|
23
|
+
export { Input, PasswordInput };
|