@drawbridge/components 0.0.52 → 0.0.53
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 +149 -112
- package/dist/advertisement.mjs +5 -4
- package/dist/{chunk-L5X6LHYZ.mjs → chunk-ASHP6LV5.mjs} +4 -4
- package/dist/chunk-DNK33H3K.mjs +75 -0
- package/dist/chunk-OHJMWJAQ.mjs +86 -0
- package/dist/input-group-error.js +129 -0
- package/dist/input-group-error.mjs +7 -0
- package/dist/input-group.js +91 -52
- package/dist/input-group.mjs +2 -1
- package/dist/input-name.js +101 -64
- package/dist/input-name.mjs +2 -1
- package/dist/product.js +136 -99
- package/dist/product.mjs +5 -4
- package/package.json +5 -1
- package/types/input-group-error.d.ts +14 -0
- package/dist/chunk-3SAKIKZP.mjs +0 -117
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
input_group_error_default
|
|
3
|
+
} from "./chunk-OHJMWJAQ.mjs";
|
|
4
|
+
|
|
5
|
+
// components/input-group.js
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var InputGroup = ({
|
|
8
|
+
className,
|
|
9
|
+
error,
|
|
10
|
+
input,
|
|
11
|
+
label,
|
|
12
|
+
message,
|
|
13
|
+
style = {},
|
|
14
|
+
...rest
|
|
15
|
+
}) => {
|
|
16
|
+
const classes = [
|
|
17
|
+
"input-group"
|
|
18
|
+
];
|
|
19
|
+
if (className) {
|
|
20
|
+
classes.push(className);
|
|
21
|
+
}
|
|
22
|
+
if (error) {
|
|
23
|
+
classes.push("error");
|
|
24
|
+
}
|
|
25
|
+
return /* @__PURE__ */ jsxs(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
...{
|
|
29
|
+
className: classes.join(" "),
|
|
30
|
+
"aria-live": "polite",
|
|
31
|
+
...(rest == null ? void 0 : rest["data-guide"]) && {
|
|
32
|
+
"data-guide": rest["data-guide"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
label ? /* @__PURE__ */ jsxs(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
...{
|
|
40
|
+
className: "space-y-2"
|
|
41
|
+
},
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
...{
|
|
47
|
+
className: "block"
|
|
48
|
+
},
|
|
49
|
+
children: label
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
input
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
) : input,
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
input_group_error_default,
|
|
58
|
+
{
|
|
59
|
+
...{
|
|
60
|
+
error,
|
|
61
|
+
label,
|
|
62
|
+
message,
|
|
63
|
+
style
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
var input_group_default = InputGroup;
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
input_group_default
|
|
75
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
warning_default
|
|
3
|
+
} from "./chunk-Q3UIVGPQ.mjs";
|
|
4
|
+
|
|
5
|
+
// components/input-group-error.js
|
|
6
|
+
import { Fragment } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
var InputGroupError = ({
|
|
9
|
+
className,
|
|
10
|
+
error,
|
|
11
|
+
label,
|
|
12
|
+
message,
|
|
13
|
+
style = {}
|
|
14
|
+
}) => {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
if (!(error || message)) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const classes = [
|
|
20
|
+
"flex items-center justify-start space-x-2 py-1 rounded text-sm"
|
|
21
|
+
];
|
|
22
|
+
if (error) {
|
|
23
|
+
classes.push("px-1.5");
|
|
24
|
+
}
|
|
25
|
+
if (className) {
|
|
26
|
+
classes.push(className);
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ jsxs(
|
|
29
|
+
"p",
|
|
30
|
+
{
|
|
31
|
+
...{
|
|
32
|
+
className: classes.join(" "),
|
|
33
|
+
...error && {
|
|
34
|
+
style: {
|
|
35
|
+
backgroundColor: (((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || "rgb( 0, 0, 0 )").replace(")", ",.1)"),
|
|
36
|
+
color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
children: [
|
|
41
|
+
error && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
warning_default,
|
|
44
|
+
{
|
|
45
|
+
...{
|
|
46
|
+
className: "w-4 h-4",
|
|
47
|
+
"aria-hidden": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ jsxs(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
...{
|
|
55
|
+
className: "text-[0px] opacity-0 w-0 h-0 absolute"
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
label ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
label,
|
|
60
|
+
": "
|
|
61
|
+
] }) : null,
|
|
62
|
+
error
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
"span",
|
|
69
|
+
{
|
|
70
|
+
...{
|
|
71
|
+
...error && {
|
|
72
|
+
"aria-hidden": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
children: error || message
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
var input_group_error_default = InputGroupError;
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
input_group_error_default
|
|
86
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
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-group-error.js
|
|
20
|
+
var input_group_error_exports = {};
|
|
21
|
+
__export(input_group_error_exports, {
|
|
22
|
+
default: () => input_group_error_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(input_group_error_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
|
|
27
|
+
// components/icons/warning.js
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
|
+
"svg",
|
|
31
|
+
{
|
|
32
|
+
...{
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: 1.5,
|
|
36
|
+
viewBox: "0 0 24 24",
|
|
37
|
+
...props
|
|
38
|
+
},
|
|
39
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
"path",
|
|
41
|
+
{
|
|
42
|
+
...{
|
|
43
|
+
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",
|
|
44
|
+
strokeLinecap: "round",
|
|
45
|
+
strokeLinejoin: "round"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
var warning_default = Warning;
|
|
52
|
+
|
|
53
|
+
// components/input-group-error.js
|
|
54
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
55
|
+
var InputGroupError = ({
|
|
56
|
+
className,
|
|
57
|
+
error,
|
|
58
|
+
label,
|
|
59
|
+
message,
|
|
60
|
+
style = {}
|
|
61
|
+
}) => {
|
|
62
|
+
var _a, _b, _c, _d;
|
|
63
|
+
if (!(error || message)) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const classes = [
|
|
67
|
+
"flex items-center justify-start space-x-2 py-1 rounded text-sm"
|
|
68
|
+
];
|
|
69
|
+
if (error) {
|
|
70
|
+
classes.push("px-1.5");
|
|
71
|
+
}
|
|
72
|
+
if (className) {
|
|
73
|
+
classes.push(className);
|
|
74
|
+
}
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
76
|
+
"p",
|
|
77
|
+
{
|
|
78
|
+
...{
|
|
79
|
+
className: classes.join(" "),
|
|
80
|
+
...error && {
|
|
81
|
+
style: {
|
|
82
|
+
backgroundColor: (((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || "rgb( 0, 0, 0 )").replace(")", ",.1)"),
|
|
83
|
+
color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
90
|
+
warning_default,
|
|
91
|
+
{
|
|
92
|
+
...{
|
|
93
|
+
className: "w-4 h-4",
|
|
94
|
+
"aria-hidden": true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
...{
|
|
102
|
+
className: "text-[0px] opacity-0 w-0 h-0 absolute"
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
106
|
+
label,
|
|
107
|
+
": "
|
|
108
|
+
] }) : null,
|
|
109
|
+
error
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
115
|
+
"span",
|
|
116
|
+
{
|
|
117
|
+
...{
|
|
118
|
+
...error && {
|
|
119
|
+
"aria-hidden": true
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
children: error || message
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
};
|
|
129
|
+
var input_group_error_default = InputGroupError;
|
package/dist/input-group.js
CHANGED
|
@@ -22,6 +22,8 @@ __export(input_group_exports, {
|
|
|
22
22
|
default: () => input_group_default
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(input_group_exports);
|
|
25
|
+
|
|
26
|
+
// components/input-group-error.js
|
|
25
27
|
var import_react = require("react");
|
|
26
28
|
|
|
27
29
|
// components/icons/warning.js
|
|
@@ -50,8 +52,86 @@ var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
|
50
52
|
);
|
|
51
53
|
var warning_default = Warning;
|
|
52
54
|
|
|
53
|
-
// components/input-group.js
|
|
55
|
+
// components/input-group-error.js
|
|
54
56
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
57
|
+
var InputGroupError = ({
|
|
58
|
+
className,
|
|
59
|
+
error,
|
|
60
|
+
label,
|
|
61
|
+
message,
|
|
62
|
+
style = {}
|
|
63
|
+
}) => {
|
|
64
|
+
var _a, _b, _c, _d;
|
|
65
|
+
if (!(error || message)) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const classes = [
|
|
69
|
+
"flex items-center justify-start space-x-2 py-1 rounded text-sm"
|
|
70
|
+
];
|
|
71
|
+
if (error) {
|
|
72
|
+
classes.push("px-1.5");
|
|
73
|
+
}
|
|
74
|
+
if (className) {
|
|
75
|
+
classes.push(className);
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
78
|
+
"p",
|
|
79
|
+
{
|
|
80
|
+
...{
|
|
81
|
+
className: classes.join(" "),
|
|
82
|
+
...error && {
|
|
83
|
+
style: {
|
|
84
|
+
backgroundColor: (((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || "rgb( 0, 0, 0 )").replace(")", ",.1)"),
|
|
85
|
+
color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
children: [
|
|
90
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
92
|
+
warning_default,
|
|
93
|
+
{
|
|
94
|
+
...{
|
|
95
|
+
className: "w-4 h-4",
|
|
96
|
+
"aria-hidden": true
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
101
|
+
"span",
|
|
102
|
+
{
|
|
103
|
+
...{
|
|
104
|
+
className: "text-[0px] opacity-0 w-0 h-0 absolute"
|
|
105
|
+
},
|
|
106
|
+
children: [
|
|
107
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
108
|
+
label,
|
|
109
|
+
": "
|
|
110
|
+
] }) : null,
|
|
111
|
+
error
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
117
|
+
"span",
|
|
118
|
+
{
|
|
119
|
+
...{
|
|
120
|
+
...error && {
|
|
121
|
+
"aria-hidden": true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
children: error || message
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
};
|
|
131
|
+
var input_group_error_default = InputGroupError;
|
|
132
|
+
|
|
133
|
+
// components/input-group.js
|
|
134
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
55
135
|
var InputGroup = ({
|
|
56
136
|
className,
|
|
57
137
|
error,
|
|
@@ -61,7 +141,6 @@ var InputGroup = ({
|
|
|
61
141
|
style = {},
|
|
62
142
|
...rest
|
|
63
143
|
}) => {
|
|
64
|
-
var _a, _b, _c, _d;
|
|
65
144
|
const classes = [
|
|
66
145
|
"input-group"
|
|
67
146
|
];
|
|
@@ -71,7 +150,7 @@ var InputGroup = ({
|
|
|
71
150
|
if (error) {
|
|
72
151
|
classes.push("error");
|
|
73
152
|
}
|
|
74
|
-
return /* @__PURE__ */ (0,
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
75
154
|
"div",
|
|
76
155
|
{
|
|
77
156
|
...{
|
|
@@ -82,14 +161,14 @@ var InputGroup = ({
|
|
|
82
161
|
}
|
|
83
162
|
},
|
|
84
163
|
children: [
|
|
85
|
-
label ? /* @__PURE__ */ (0,
|
|
164
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
86
165
|
"div",
|
|
87
166
|
{
|
|
88
167
|
...{
|
|
89
168
|
className: "space-y-2"
|
|
90
169
|
},
|
|
91
170
|
children: [
|
|
92
|
-
/* @__PURE__ */ (0,
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
93
172
|
"span",
|
|
94
173
|
{
|
|
95
174
|
...{
|
|
@@ -102,55 +181,15 @@ var InputGroup = ({
|
|
|
102
181
|
]
|
|
103
182
|
}
|
|
104
183
|
) : input,
|
|
105
|
-
|
|
106
|
-
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
185
|
+
input_group_error_default,
|
|
107
186
|
{
|
|
108
187
|
...{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
children: [
|
|
118
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
119
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
120
|
-
warning_default,
|
|
121
|
-
{
|
|
122
|
-
...{
|
|
123
|
-
className: "w-4 h-4",
|
|
124
|
-
"aria-hidden": true
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
129
|
-
"span",
|
|
130
|
-
{
|
|
131
|
-
...{
|
|
132
|
-
className: "text-[0px] opacity-0 w-0 h-0 absolute"
|
|
133
|
-
},
|
|
134
|
-
children: [
|
|
135
|
-
label,
|
|
136
|
-
": ",
|
|
137
|
-
error
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
)
|
|
141
|
-
] }),
|
|
142
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
143
|
-
"span",
|
|
144
|
-
{
|
|
145
|
-
...{
|
|
146
|
-
...error && {
|
|
147
|
-
"aria-hidden": true
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
children: error || message
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
]
|
|
188
|
+
error,
|
|
189
|
+
label,
|
|
190
|
+
message,
|
|
191
|
+
style
|
|
192
|
+
}
|
|
154
193
|
}
|
|
155
194
|
)
|
|
156
195
|
]
|