@drawbridge/components 0.0.51 → 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.
@@ -1,117 +0,0 @@
1
- import {
2
- warning_default
3
- } from "./chunk-Q3UIVGPQ.mjs";
4
-
5
- // components/input-group.js
6
- import { Fragment } from "react";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- var InputGroup = ({
9
- className,
10
- error,
11
- input,
12
- label,
13
- message,
14
- style = {},
15
- ...rest
16
- }) => {
17
- var _a, _b, _c, _d;
18
- const classes = [
19
- "input-group"
20
- ];
21
- if (className) {
22
- classes.push(className);
23
- }
24
- if (error) {
25
- classes.push("error");
26
- }
27
- return /* @__PURE__ */ jsxs(
28
- "div",
29
- {
30
- ...{
31
- className: classes.join(" "),
32
- "aria-live": "polite",
33
- ...(rest == null ? void 0 : rest["data-guide"]) && {
34
- "data-guide": rest["data-guide"]
35
- }
36
- },
37
- children: [
38
- label ? /* @__PURE__ */ jsxs(
39
- "div",
40
- {
41
- ...{
42
- className: "space-y-2"
43
- },
44
- children: [
45
- /* @__PURE__ */ jsx(
46
- "span",
47
- {
48
- ...{
49
- className: "block"
50
- },
51
- children: label
52
- }
53
- ),
54
- input
55
- ]
56
- }
57
- ) : input,
58
- (error || message) && /* @__PURE__ */ jsxs(
59
- "p",
60
- {
61
- ...{
62
- className: "flex items-center justify-start space-x-2 py-1 rounded text-sm " + (error && "px-1.5"),
63
- ...error && {
64
- style: {
65
- 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)"),
66
- color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
67
- }
68
- }
69
- },
70
- children: [
71
- error && /* @__PURE__ */ jsxs(Fragment, { children: [
72
- /* @__PURE__ */ jsx(
73
- warning_default,
74
- {
75
- ...{
76
- className: "w-4 h-4",
77
- "aria-hidden": true
78
- }
79
- }
80
- ),
81
- /* @__PURE__ */ jsxs(
82
- "span",
83
- {
84
- ...{
85
- className: "text-[0px] opacity-0 w-0 h-0 absolute"
86
- },
87
- children: [
88
- label,
89
- ": ",
90
- error
91
- ]
92
- }
93
- )
94
- ] }),
95
- /* @__PURE__ */ jsx(
96
- "span",
97
- {
98
- ...{
99
- ...error && {
100
- "aria-hidden": true
101
- }
102
- },
103
- children: error || message
104
- }
105
- )
106
- ]
107
- }
108
- )
109
- ]
110
- }
111
- );
112
- };
113
- var input_group_default = InputGroup;
114
-
115
- export {
116
- input_group_default
117
- };