@drawbridge/components 0.0.40 → 0.0.43
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/advertisement.js +13 -5
- package/dist/advertisement.mjs +7 -4
- package/dist/{chunk-HDOA3Y3U.mjs → chunk-BHQBSNGK.mjs} +8 -7
- package/dist/chunk-BZ6WMIH7.mjs +37 -0
- package/dist/{chunk-7ZLMDYBR.mjs → chunk-JJH46E7B.mjs} +6 -2
- package/dist/input-group.js +6 -2
- package/dist/input-group.mjs +1 -1
- package/dist/input-name.js +307 -0
- package/dist/input-name.mjs +115 -0
- package/dist/input-number.mjs +3 -3
- package/dist/input-phone.js +183 -0
- package/dist/input-phone.mjs +139 -0
- package/dist/input-text.mjs +3 -32
- package/dist/product.js +10 -5
- package/dist/product.mjs +4 -4
- package/dist/provider-font.js +94 -0
- package/dist/provider-font.mjs +74 -0
- package/dist/video.js +19 -1
- package/dist/video.mjs +19 -1
- package/package.json +15 -2
- package/types/advertisement.d.ts +1 -0
- package/types/input-group.d.ts +1 -0
- package/types/input-name.d.ts +24 -0
- package/types/input-phone.d.ts +20 -0
- package/types/product.d.ts +1 -0
- package/types/provider-font.d.ts +23 -0
- package/types/video.d.ts +2 -0
package/dist/advertisement.js
CHANGED
|
@@ -432,7 +432,8 @@ var InputGroup = ({
|
|
|
432
432
|
input,
|
|
433
433
|
label,
|
|
434
434
|
message,
|
|
435
|
-
style = {}
|
|
435
|
+
style = {},
|
|
436
|
+
...rest
|
|
436
437
|
}) => {
|
|
437
438
|
var _a, _b, _c, _d;
|
|
438
439
|
const classes = [
|
|
@@ -449,7 +450,10 @@ var InputGroup = ({
|
|
|
449
450
|
{
|
|
450
451
|
...{
|
|
451
452
|
className: classes.join(" "),
|
|
452
|
-
"aria-live": "polite"
|
|
453
|
+
"aria-live": "polite",
|
|
454
|
+
...(rest == null ? void 0 : rest["data-guide"]) && {
|
|
455
|
+
"data-guide": rest["data-guide"]
|
|
456
|
+
}
|
|
453
457
|
},
|
|
454
458
|
children: [
|
|
455
459
|
label ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
@@ -924,6 +928,7 @@ var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
924
928
|
);
|
|
925
929
|
var Product = ({
|
|
926
930
|
action = null,
|
|
931
|
+
addToCart = true,
|
|
927
932
|
disabled = false,
|
|
928
933
|
errors = {},
|
|
929
934
|
header,
|
|
@@ -1164,10 +1169,10 @@ var Product = ({
|
|
|
1164
1169
|
"div",
|
|
1165
1170
|
{
|
|
1166
1171
|
...{
|
|
1167
|
-
className: "grid grid-cols-2 gap-3"
|
|
1172
|
+
className: addToCart ? "grid grid-cols-2 gap-3" : ""
|
|
1168
1173
|
},
|
|
1169
1174
|
children: [
|
|
1170
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1175
|
+
addToCart && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1171
1176
|
"button",
|
|
1172
1177
|
{
|
|
1173
1178
|
...{
|
|
@@ -1191,7 +1196,7 @@ var Product = ({
|
|
|
1191
1196
|
"button",
|
|
1192
1197
|
{
|
|
1193
1198
|
...{
|
|
1194
|
-
className: "button justify-center",
|
|
1199
|
+
className: "button justify-center" + (addToCart ? "" : " w-full"),
|
|
1195
1200
|
disabled: disabled || Boolean(action),
|
|
1196
1201
|
onClick: onBuy,
|
|
1197
1202
|
style: buttonStyle(style),
|
|
@@ -1231,6 +1236,7 @@ var Advertisement = ({
|
|
|
1231
1236
|
disabled = false,
|
|
1232
1237
|
errors,
|
|
1233
1238
|
file,
|
|
1239
|
+
fonts,
|
|
1234
1240
|
header,
|
|
1235
1241
|
id,
|
|
1236
1242
|
ImageComponent,
|
|
@@ -1258,6 +1264,7 @@ var Advertisement = ({
|
|
|
1258
1264
|
{
|
|
1259
1265
|
...{
|
|
1260
1266
|
action,
|
|
1267
|
+
addToCart: false,
|
|
1261
1268
|
disabled: preview || disabled,
|
|
1262
1269
|
errors,
|
|
1263
1270
|
header,
|
|
@@ -1282,6 +1289,7 @@ var Advertisement = ({
|
|
|
1282
1289
|
brand: brand || { style },
|
|
1283
1290
|
button,
|
|
1284
1291
|
campaign,
|
|
1292
|
+
fonts,
|
|
1285
1293
|
ImageComponent,
|
|
1286
1294
|
lead,
|
|
1287
1295
|
onClick,
|
package/dist/advertisement.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
product_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BHQBSNGK.mjs";
|
|
5
|
+
import "./chunk-BD3TDNJE.mjs";
|
|
6
|
+
import "./chunk-FYA7EAMR.mjs";
|
|
5
7
|
import "./chunk-2ZYGRSSA.mjs";
|
|
6
8
|
import "./chunk-XWELEL6Z.mjs";
|
|
7
9
|
import {
|
|
8
10
|
card_advertisement_default
|
|
9
11
|
} from "./chunk-TJNIR4PF.mjs";
|
|
10
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-JJH46E7B.mjs";
|
|
11
13
|
import "./chunk-Q3UIVGPQ.mjs";
|
|
12
|
-
import "./chunk-BD3TDNJE.mjs";
|
|
13
|
-
import "./chunk-FYA7EAMR.mjs";
|
|
14
14
|
import "./chunk-FJXG3REN.mjs";
|
|
15
15
|
|
|
16
16
|
// components/advertisement.js
|
|
@@ -24,6 +24,7 @@ var Advertisement = ({
|
|
|
24
24
|
disabled = false,
|
|
25
25
|
errors,
|
|
26
26
|
file,
|
|
27
|
+
fonts,
|
|
27
28
|
header,
|
|
28
29
|
id,
|
|
29
30
|
ImageComponent,
|
|
@@ -51,6 +52,7 @@ var Advertisement = ({
|
|
|
51
52
|
{
|
|
52
53
|
...{
|
|
53
54
|
action,
|
|
55
|
+
addToCart: false,
|
|
54
56
|
disabled: preview || disabled,
|
|
55
57
|
errors,
|
|
56
58
|
header,
|
|
@@ -75,6 +77,7 @@ var Advertisement = ({
|
|
|
75
77
|
brand: brand || { style },
|
|
76
78
|
button,
|
|
77
79
|
campaign,
|
|
80
|
+
fonts,
|
|
78
81
|
ImageComponent,
|
|
79
82
|
lead,
|
|
80
83
|
onClick,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
input_select_default
|
|
3
|
+
} from "./chunk-BD3TDNJE.mjs";
|
|
1
4
|
import {
|
|
2
5
|
loader_default
|
|
3
6
|
} from "./chunk-2ZYGRSSA.mjs";
|
|
@@ -6,10 +9,7 @@ import {
|
|
|
6
9
|
} from "./chunk-XWELEL6Z.mjs";
|
|
7
10
|
import {
|
|
8
11
|
input_group_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
input_select_default
|
|
12
|
-
} from "./chunk-BD3TDNJE.mjs";
|
|
12
|
+
} from "./chunk-JJH46E7B.mjs";
|
|
13
13
|
import {
|
|
14
14
|
buttonStyle,
|
|
15
15
|
inputStyle
|
|
@@ -33,6 +33,7 @@ var DefaultImage = ({ alt, className, src }) => /* @__PURE__ */ jsx(
|
|
|
33
33
|
);
|
|
34
34
|
var Product = ({
|
|
35
35
|
action = null,
|
|
36
|
+
addToCart = true,
|
|
36
37
|
disabled = false,
|
|
37
38
|
errors = {},
|
|
38
39
|
header,
|
|
@@ -273,10 +274,10 @@ var Product = ({
|
|
|
273
274
|
"div",
|
|
274
275
|
{
|
|
275
276
|
...{
|
|
276
|
-
className: "grid grid-cols-2 gap-3"
|
|
277
|
+
className: addToCart ? "grid grid-cols-2 gap-3" : ""
|
|
277
278
|
},
|
|
278
279
|
children: [
|
|
279
|
-
/* @__PURE__ */ jsx(
|
|
280
|
+
addToCart && /* @__PURE__ */ jsx(
|
|
280
281
|
"button",
|
|
281
282
|
{
|
|
282
283
|
...{
|
|
@@ -300,7 +301,7 @@ var Product = ({
|
|
|
300
301
|
"button",
|
|
301
302
|
{
|
|
302
303
|
...{
|
|
303
|
-
className: "button justify-center",
|
|
304
|
+
className: "button justify-center" + (addToCart ? "" : " w-full"),
|
|
304
305
|
disabled: disabled || Boolean(action),
|
|
305
306
|
onClick: onBuy,
|
|
306
307
|
style: buttonStyle(style),
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
inputStyle
|
|
3
|
+
} from "./chunk-FJXG3REN.mjs";
|
|
4
|
+
|
|
5
|
+
// components/input-text.js
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var InputText = ({
|
|
8
|
+
className,
|
|
9
|
+
max,
|
|
10
|
+
onChange,
|
|
11
|
+
style,
|
|
12
|
+
value,
|
|
13
|
+
...rest
|
|
14
|
+
}) => {
|
|
15
|
+
const classes = ["input"];
|
|
16
|
+
if (className) {
|
|
17
|
+
classes.push(className);
|
|
18
|
+
}
|
|
19
|
+
;
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"input",
|
|
22
|
+
{
|
|
23
|
+
...{
|
|
24
|
+
...rest,
|
|
25
|
+
className: classes.join(" "),
|
|
26
|
+
onChange: ({ target }) => onChange(target.value),
|
|
27
|
+
style: inputStyle(style),
|
|
28
|
+
value
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
var input_text_default = InputText;
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
input_text_default
|
|
37
|
+
};
|
|
@@ -11,7 +11,8 @@ var InputGroup = ({
|
|
|
11
11
|
input,
|
|
12
12
|
label,
|
|
13
13
|
message,
|
|
14
|
-
style = {}
|
|
14
|
+
style = {},
|
|
15
|
+
...rest
|
|
15
16
|
}) => {
|
|
16
17
|
var _a, _b, _c, _d;
|
|
17
18
|
const classes = [
|
|
@@ -28,7 +29,10 @@ var InputGroup = ({
|
|
|
28
29
|
{
|
|
29
30
|
...{
|
|
30
31
|
className: classes.join(" "),
|
|
31
|
-
"aria-live": "polite"
|
|
32
|
+
"aria-live": "polite",
|
|
33
|
+
...(rest == null ? void 0 : rest["data-guide"]) && {
|
|
34
|
+
"data-guide": rest["data-guide"]
|
|
35
|
+
}
|
|
32
36
|
},
|
|
33
37
|
children: [
|
|
34
38
|
label ? /* @__PURE__ */ jsxs(
|
package/dist/input-group.js
CHANGED
|
@@ -58,7 +58,8 @@ var InputGroup = ({
|
|
|
58
58
|
input,
|
|
59
59
|
label,
|
|
60
60
|
message,
|
|
61
|
-
style = {}
|
|
61
|
+
style = {},
|
|
62
|
+
...rest
|
|
62
63
|
}) => {
|
|
63
64
|
var _a, _b, _c, _d;
|
|
64
65
|
const classes = [
|
|
@@ -75,7 +76,10 @@ var InputGroup = ({
|
|
|
75
76
|
{
|
|
76
77
|
...{
|
|
77
78
|
className: classes.join(" "),
|
|
78
|
-
"aria-live": "polite"
|
|
79
|
+
"aria-live": "polite",
|
|
80
|
+
...(rest == null ? void 0 : rest["data-guide"]) && {
|
|
81
|
+
"data-guide": rest["data-guide"]
|
|
82
|
+
}
|
|
79
83
|
},
|
|
80
84
|
children: [
|
|
81
85
|
label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
package/dist/input-group.mjs
CHANGED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// components/input-name.js
|
|
20
|
+
var input_name_exports = {};
|
|
21
|
+
__export(input_name_exports, {
|
|
22
|
+
default: () => input_name_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(input_name_exports);
|
|
25
|
+
|
|
26
|
+
// components/input-group.js
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
|
|
29
|
+
// components/icons/warning.js
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
|
+
"svg",
|
|
33
|
+
{
|
|
34
|
+
...{
|
|
35
|
+
fill: "none",
|
|
36
|
+
stroke: "currentColor",
|
|
37
|
+
strokeWidth: 1.5,
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
...props
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
...{
|
|
45
|
+
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
var warning_default = Warning;
|
|
54
|
+
|
|
55
|
+
// components/input-group.js
|
|
56
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
57
|
+
var InputGroup = ({
|
|
58
|
+
className,
|
|
59
|
+
error,
|
|
60
|
+
input,
|
|
61
|
+
label,
|
|
62
|
+
message,
|
|
63
|
+
style = {},
|
|
64
|
+
...rest
|
|
65
|
+
}) => {
|
|
66
|
+
var _a, _b, _c, _d;
|
|
67
|
+
const classes = [
|
|
68
|
+
"input-group"
|
|
69
|
+
];
|
|
70
|
+
if (className) {
|
|
71
|
+
classes.push(className);
|
|
72
|
+
}
|
|
73
|
+
if (error) {
|
|
74
|
+
classes.push("error");
|
|
75
|
+
}
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
...{
|
|
80
|
+
className: classes.join(" "),
|
|
81
|
+
"aria-live": "polite",
|
|
82
|
+
...(rest == null ? void 0 : rest["data-guide"]) && {
|
|
83
|
+
"data-guide": rest["data-guide"]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
children: [
|
|
87
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
...{
|
|
91
|
+
className: "space-y-2"
|
|
92
|
+
},
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
...{
|
|
98
|
+
className: "block"
|
|
99
|
+
},
|
|
100
|
+
children: label
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
input
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
) : input,
|
|
107
|
+
(error || message) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
108
|
+
"p",
|
|
109
|
+
{
|
|
110
|
+
...{
|
|
111
|
+
className: "flex items-center justify-start space-x-2 py-1 rounded text-sm " + (error && "px-1.5"),
|
|
112
|
+
...error && Object.keys(style).length > 0 && {
|
|
113
|
+
style: {
|
|
114
|
+
backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb.replace(")", ",.1)"),
|
|
115
|
+
color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
children: [
|
|
120
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
122
|
+
warning_default,
|
|
123
|
+
{
|
|
124
|
+
...{
|
|
125
|
+
className: "w-4 h-4",
|
|
126
|
+
"aria-hidden": true
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
131
|
+
"span",
|
|
132
|
+
{
|
|
133
|
+
...{
|
|
134
|
+
className: "text-[0px] opacity-0 w-0 h-0 absolute"
|
|
135
|
+
},
|
|
136
|
+
children: [
|
|
137
|
+
label,
|
|
138
|
+
": ",
|
|
139
|
+
error
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] }),
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
145
|
+
"span",
|
|
146
|
+
{
|
|
147
|
+
...{
|
|
148
|
+
...error && {
|
|
149
|
+
"aria-hidden": true
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
children: error || message
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
var input_group_default = InputGroup;
|
|
163
|
+
|
|
164
|
+
// components/styles.js
|
|
165
|
+
var inputStyle = (style) => {
|
|
166
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
167
|
+
return {
|
|
168
|
+
backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
|
|
169
|
+
borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
|
|
170
|
+
borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
|
|
171
|
+
color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// components/input-text.js
|
|
176
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
177
|
+
var InputText = ({
|
|
178
|
+
className,
|
|
179
|
+
max,
|
|
180
|
+
onChange,
|
|
181
|
+
style,
|
|
182
|
+
value,
|
|
183
|
+
...rest
|
|
184
|
+
}) => {
|
|
185
|
+
const classes = ["input"];
|
|
186
|
+
if (className) {
|
|
187
|
+
classes.push(className);
|
|
188
|
+
}
|
|
189
|
+
;
|
|
190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
191
|
+
"input",
|
|
192
|
+
{
|
|
193
|
+
...{
|
|
194
|
+
...rest,
|
|
195
|
+
className: classes.join(" "),
|
|
196
|
+
onChange: ({ target }) => onChange(target.value),
|
|
197
|
+
style: inputStyle(style),
|
|
198
|
+
value
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
};
|
|
203
|
+
var input_text_default = InputText;
|
|
204
|
+
|
|
205
|
+
// components/input-name.js
|
|
206
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
207
|
+
var InputName = ({
|
|
208
|
+
error,
|
|
209
|
+
onChange,
|
|
210
|
+
settings,
|
|
211
|
+
style,
|
|
212
|
+
value = {}
|
|
213
|
+
}) => {
|
|
214
|
+
var _a, _b, _c;
|
|
215
|
+
const inputs = {
|
|
216
|
+
first: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
217
|
+
input_group_default,
|
|
218
|
+
{
|
|
219
|
+
...{
|
|
220
|
+
error: (_a = error == null ? void 0 : error.first) == null ? void 0 : _a.message,
|
|
221
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
222
|
+
input_text_default,
|
|
223
|
+
{
|
|
224
|
+
...{
|
|
225
|
+
"aria-label": "First Name",
|
|
226
|
+
onChange: (first) => onChange({
|
|
227
|
+
...value,
|
|
228
|
+
first
|
|
229
|
+
}),
|
|
230
|
+
style,
|
|
231
|
+
value: (value == null ? void 0 : value.first) || ""
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
label: "First name",
|
|
236
|
+
style
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
last: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
241
|
+
input_group_default,
|
|
242
|
+
{
|
|
243
|
+
...{
|
|
244
|
+
error: (_b = error == null ? void 0 : error.last) == null ? void 0 : _b.message,
|
|
245
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
246
|
+
input_text_default,
|
|
247
|
+
{
|
|
248
|
+
...{
|
|
249
|
+
"aria-label": "Last Name",
|
|
250
|
+
onChange: (last) => onChange({
|
|
251
|
+
...value,
|
|
252
|
+
last
|
|
253
|
+
}),
|
|
254
|
+
style,
|
|
255
|
+
value: (value == null ? void 0 : value.last) || ""
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
label: "Last name",
|
|
260
|
+
style
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
),
|
|
264
|
+
name: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
265
|
+
input_group_default,
|
|
266
|
+
{
|
|
267
|
+
...{
|
|
268
|
+
error: (_c = error == null ? void 0 : error.name) == null ? void 0 : _c.message,
|
|
269
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
270
|
+
input_text_default,
|
|
271
|
+
{
|
|
272
|
+
...{
|
|
273
|
+
onChange: (name) => onChange({
|
|
274
|
+
...value,
|
|
275
|
+
name
|
|
276
|
+
}),
|
|
277
|
+
style,
|
|
278
|
+
value: (value == null ? void 0 : value.name) || ""
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
),
|
|
282
|
+
label: "Full name",
|
|
283
|
+
style
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
};
|
|
288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
289
|
+
"div",
|
|
290
|
+
{
|
|
291
|
+
...{
|
|
292
|
+
className: "flex flex-col space-y-4"
|
|
293
|
+
},
|
|
294
|
+
children: (settings.capture || []).map((input, key) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
295
|
+
"div",
|
|
296
|
+
{
|
|
297
|
+
...{
|
|
298
|
+
className: "w-full"
|
|
299
|
+
},
|
|
300
|
+
children: inputs[input]
|
|
301
|
+
},
|
|
302
|
+
"input-name-" + key
|
|
303
|
+
))
|
|
304
|
+
}
|
|
305
|
+
);
|
|
306
|
+
};
|
|
307
|
+
var input_name_default = InputName;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import {
|
|
2
|
+
input_text_default
|
|
3
|
+
} from "./chunk-BZ6WMIH7.mjs";
|
|
4
|
+
import {
|
|
5
|
+
input_group_default
|
|
6
|
+
} from "./chunk-JJH46E7B.mjs";
|
|
7
|
+
import "./chunk-Q3UIVGPQ.mjs";
|
|
8
|
+
import "./chunk-FJXG3REN.mjs";
|
|
9
|
+
|
|
10
|
+
// components/input-name.js
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var InputName = ({
|
|
13
|
+
error,
|
|
14
|
+
onChange,
|
|
15
|
+
settings,
|
|
16
|
+
style,
|
|
17
|
+
value = {}
|
|
18
|
+
}) => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const inputs = {
|
|
21
|
+
first: /* @__PURE__ */ jsx(
|
|
22
|
+
input_group_default,
|
|
23
|
+
{
|
|
24
|
+
...{
|
|
25
|
+
error: (_a = error == null ? void 0 : error.first) == null ? void 0 : _a.message,
|
|
26
|
+
input: /* @__PURE__ */ jsx(
|
|
27
|
+
input_text_default,
|
|
28
|
+
{
|
|
29
|
+
...{
|
|
30
|
+
"aria-label": "First Name",
|
|
31
|
+
onChange: (first) => onChange({
|
|
32
|
+
...value,
|
|
33
|
+
first
|
|
34
|
+
}),
|
|
35
|
+
style,
|
|
36
|
+
value: (value == null ? void 0 : value.first) || ""
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
label: "First name",
|
|
41
|
+
style
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
last: /* @__PURE__ */ jsx(
|
|
46
|
+
input_group_default,
|
|
47
|
+
{
|
|
48
|
+
...{
|
|
49
|
+
error: (_b = error == null ? void 0 : error.last) == null ? void 0 : _b.message,
|
|
50
|
+
input: /* @__PURE__ */ jsx(
|
|
51
|
+
input_text_default,
|
|
52
|
+
{
|
|
53
|
+
...{
|
|
54
|
+
"aria-label": "Last Name",
|
|
55
|
+
onChange: (last) => onChange({
|
|
56
|
+
...value,
|
|
57
|
+
last
|
|
58
|
+
}),
|
|
59
|
+
style,
|
|
60
|
+
value: (value == null ? void 0 : value.last) || ""
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
label: "Last name",
|
|
65
|
+
style
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
name: /* @__PURE__ */ jsx(
|
|
70
|
+
input_group_default,
|
|
71
|
+
{
|
|
72
|
+
...{
|
|
73
|
+
error: (_c = error == null ? void 0 : error.name) == null ? void 0 : _c.message,
|
|
74
|
+
input: /* @__PURE__ */ jsx(
|
|
75
|
+
input_text_default,
|
|
76
|
+
{
|
|
77
|
+
...{
|
|
78
|
+
onChange: (name) => onChange({
|
|
79
|
+
...value,
|
|
80
|
+
name
|
|
81
|
+
}),
|
|
82
|
+
style,
|
|
83
|
+
value: (value == null ? void 0 : value.name) || ""
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
label: "Full name",
|
|
88
|
+
style
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
};
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
...{
|
|
97
|
+
className: "flex flex-col space-y-4"
|
|
98
|
+
},
|
|
99
|
+
children: (settings.capture || []).map((input, key) => /* @__PURE__ */ jsx(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
...{
|
|
103
|
+
className: "w-full"
|
|
104
|
+
},
|
|
105
|
+
children: inputs[input]
|
|
106
|
+
},
|
|
107
|
+
"input-name-" + key
|
|
108
|
+
))
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
var input_name_default = InputName;
|
|
113
|
+
export {
|
|
114
|
+
input_name_default as default
|
|
115
|
+
};
|
package/dist/input-number.mjs
CHANGED