@drawbridge/components 0.0.45 → 0.0.47

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,23 +1,42 @@
1
1
  "use client";
2
2
  import {
3
3
  product_default
4
- } from "./chunk-EKWIDBFA.mjs";
5
- import "./chunk-BD3TDNJE.mjs";
6
- import "./chunk-FYA7EAMR.mjs";
4
+ } from "./chunk-V3RUI64W.mjs";
7
5
  import "./chunk-2ZYGRSSA.mjs";
8
6
  import "./chunk-XWELEL6Z.mjs";
9
- import {
10
- card_advertisement_default
11
- } from "./chunk-TJNIR4PF.mjs";
12
- import "./chunk-JJH46E7B.mjs";
7
+ import "./chunk-3SAKIKZP.mjs";
13
8
  import "./chunk-Q3UIVGPQ.mjs";
14
- import "./chunk-FJXG3REN.mjs";
9
+ import "./chunk-3SXAH7B7.mjs";
10
+ import "./chunk-FYA7EAMR.mjs";
11
+ import {
12
+ buttonStyle
13
+ } from "./chunk-FJ7PKMAC.mjs";
15
14
 
16
15
  // components/advertisement.js
17
- import { jsx } from "react/jsx-runtime";
16
+ import { cdnSrc } from "@drawbridge/drawbridge-utils/cdn";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+ var DefaultImage = ({ alt, className, src }) => /* @__PURE__ */ jsx(
19
+ "img",
20
+ {
21
+ ...{
22
+ alt,
23
+ className,
24
+ src
25
+ }
26
+ }
27
+ );
28
+ var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ jsx(
29
+ "video",
30
+ {
31
+ ...{
32
+ className,
33
+ poster,
34
+ src: mp4 || hls
35
+ }
36
+ }
37
+ );
18
38
  var Advertisement = ({
19
39
  action = null,
20
- affiliate,
21
40
  brand,
22
41
  button,
23
42
  campaign,
@@ -26,16 +45,13 @@ var Advertisement = ({
26
45
  file,
27
46
  fonts,
28
47
  header,
29
- id,
30
- ImageComponent,
48
+ ImageComponent = DefaultImage,
31
49
  lead,
32
50
  onAdd,
33
51
  onBuy,
34
52
  onClick = () => {
35
53
  },
36
54
  onVariantChange,
37
- onVariantSelect = () => {
38
- },
39
55
  organization,
40
56
  page,
41
57
  preview = false,
@@ -44,8 +60,9 @@ var Advertisement = ({
44
60
  title,
45
61
  url,
46
62
  variant,
47
- VideoComponent
63
+ VideoComponent = DefaultVideo
48
64
  }) => {
65
+ var _a, _b, _c, _d, _e;
49
66
  if (product) {
50
67
  return /* @__PURE__ */ jsx(
51
68
  product_default,
@@ -67,30 +84,131 @@ var Advertisement = ({
67
84
  }
68
85
  );
69
86
  }
70
- return /* @__PURE__ */ jsx(
71
- card_advertisement_default,
87
+ const base = (brand == null ? void 0 : brand.style) || style;
88
+ const resolved = {
89
+ ...base,
90
+ background: {
91
+ ...base == null ? void 0 : base.background,
92
+ color: ((_a = base == null ? void 0 : base.background) == null ? void 0 : _a.color) || { hex: "#FFFFFF", rgb: "rgb( 255, 255, 255 )" }
93
+ },
94
+ text: {
95
+ ...base == null ? void 0 : base.text,
96
+ color: ((_b = base == null ? void 0 : base.text) == null ? void 0 : _b.color) || { hex: "#000000", rgb: "rgb( 0, 0, 0 )" }
97
+ }
98
+ };
99
+ const isVideo = (_c = file == null ? void 0 : file.mimetype) == null ? void 0 : _c.includes("video");
100
+ const card = (assetNode) => /* @__PURE__ */ jsxs(
101
+ "div",
72
102
  {
73
103
  ...{
74
- advertisement: id,
75
- affiliate,
76
- asset: file,
77
- brand: brand || { style },
78
- button,
79
- campaign,
80
- fonts,
81
- ImageComponent,
82
- lead,
83
- onClick,
84
- onVariantSelect,
85
- organization,
86
- page,
87
- preview,
88
- title,
89
- url,
90
- VideoComponent
91
- }
104
+ className: "block w-full space-y-2",
105
+ style: {
106
+ backgroundColor: resolved.background.color.hex,
107
+ color: resolved.text.color.hex
108
+ }
109
+ },
110
+ children: [
111
+ /* @__PURE__ */ jsx(
112
+ "span",
113
+ {
114
+ ...{
115
+ className: "block relative aspect-square rounded overflow-hidden" + ((file == null ? void 0 : file.sizes) ? "" : " bg-gray-light")
116
+ },
117
+ children: assetNode
118
+ }
119
+ ),
120
+ /* @__PURE__ */ jsxs(
121
+ "span",
122
+ {
123
+ ...{
124
+ className: "flex flex-col items-center justify-between gap-x-4 text-center text-sm rounded",
125
+ style: {
126
+ ...fonts == null ? void 0 : fonts.body,
127
+ color: resolved.text.color.hex,
128
+ gap: "10px",
129
+ marginTop: "10px"
130
+ }
131
+ },
132
+ children: [
133
+ /* @__PURE__ */ jsx(
134
+ "div",
135
+ {
136
+ ...{
137
+ className: "flex-1 min-w-0 space-y-2"
138
+ },
139
+ children: title && /* @__PURE__ */ jsx(
140
+ "p",
141
+ {
142
+ ...{
143
+ style: {
144
+ fontSize: "18px"
145
+ }
146
+ },
147
+ children: title
148
+ }
149
+ )
150
+ }
151
+ ),
152
+ button && /* @__PURE__ */ jsx(
153
+ "button",
154
+ {
155
+ ...{
156
+ className: "flex items-center justify-center py-3 px-4 w-full border",
157
+ disabled: !preview && !url,
158
+ onClick: preview ? () => {
159
+ } : onClick,
160
+ style: buttonStyle(resolved),
161
+ type: "button"
162
+ },
163
+ children: button
164
+ }
165
+ )
166
+ ]
167
+ }
168
+ )
169
+ ]
92
170
  }
93
171
  );
172
+ if (isVideo) {
173
+ return card(
174
+ /* @__PURE__ */ jsx(
175
+ "div",
176
+ {
177
+ ...{
178
+ className: "relative h-full w-full aspect-[9/16]"
179
+ },
180
+ children: /* @__PURE__ */ jsx(
181
+ VideoComponent,
182
+ {
183
+ ...{
184
+ className: "w-full h-full",
185
+ hls: cdnSrc(file, "hls", file == null ? void 0 : file.updatedAt),
186
+ mp4: cdnSrc(file, "original", file == null ? void 0 : file.updatedAt),
187
+ poster: cdnSrc((_d = file == null ? void 0 : file.frames) == null ? void 0 : _d[file == null ? void 0 : file.poster], "500x500", file == null ? void 0 : file.updatedAt) || cdnSrc((_e = file == null ? void 0 : file.frames) == null ? void 0 : _e[file == null ? void 0 : file.poster], "1080x1920", file == null ? void 0 : file.updatedAt),
188
+ style: resolved
189
+ }
190
+ }
191
+ )
192
+ }
193
+ )
194
+ );
195
+ }
196
+ return card(
197
+ /* @__PURE__ */ jsx(
198
+ ImageComponent,
199
+ {
200
+ ...{
201
+ alt: file == null ? void 0 : file.filename,
202
+ className: "w-full h-full object-cover",
203
+ fill: true,
204
+ priority: false,
205
+ sizes: "100%",
206
+ src: cdnSrc(file, "400x400", file == null ? void 0 : file.updatedAt)
207
+ }
208
+ },
209
+ file == null ? void 0 : file.id
210
+ )
211
+ );
94
212
  };
95
213
  var advertisement_default = Advertisement;
96
214
  export {
@@ -60,10 +60,10 @@ var InputGroup = ({
60
60
  {
61
61
  ...{
62
62
  className: "flex items-center justify-start space-x-2 py-1 rounded text-sm " + (error && "px-1.5"),
63
- ...error && Object.keys(style).length > 0 && {
63
+ ...error && {
64
64
  style: {
65
- backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb.replace(")", ",.1)"),
66
- color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
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
67
  }
68
68
  }
69
69
  },
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-FYA7EAMR.mjs";
4
4
  import {
5
5
  inputStyle
6
- } from "./chunk-FJXG3REN.mjs";
6
+ } from "./chunk-FJ7PKMAC.mjs";
7
7
 
8
8
  // components/input-select.js
9
9
  import { useEffect, useState } from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  inputStyle
3
- } from "./chunk-FJXG3REN.mjs";
3
+ } from "./chunk-FJ7PKMAC.mjs";
4
4
 
5
5
  // components/input-text.js
6
6
  import { jsx } from "react/jsx-runtime";
@@ -0,0 +1,88 @@
1
+ // components/styles.js
2
+ var WHITE = "rgb( 255, 255, 255 )";
3
+ var BLACK = "rgb( 0, 0, 0 )";
4
+ var bgColor = (style) => {
5
+ var _a, _b;
6
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
7
+ };
8
+ var textColor = (style) => {
9
+ var _a, _b;
10
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
11
+ };
12
+ var backgroundStyle = (style) => ({
13
+ backgroundColor: bgColor(style),
14
+ color: textColor(style)
15
+ });
16
+ var borderStyle = (style) => ({
17
+ borderColor: textColor(style)
18
+ });
19
+ var buttonStyle = (style) => {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
21
+ return {
22
+ backgroundColor: ((_c = (_b = (_a = style == null ? void 0 : style.button) == null ? void 0 : _a.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) || textColor(style),
23
+ borderColor: ((_f = (_e = (_d = style == null ? void 0 : style.button) == null ? void 0 : _d.background) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb) || textColor(style),
24
+ borderRadius: ((_g = style == null ? void 0 : style.button) == null ? void 0 : _g.radius) != null ? style.button.radius / 4 + "px" : void 0,
25
+ color: ((_j = (_i = (_h = style == null ? void 0 : style.button) == null ? void 0 : _h.text) == null ? void 0 : _i.color) == null ? void 0 : _j.rgb) || bgColor(style)
26
+ };
27
+ };
28
+ var closeStyle = (style) => ({
29
+ backgroundColor: textColor(style),
30
+ color: bgColor(style)
31
+ });
32
+ var headerStyle = (style) => {
33
+ var _a, _b, _c;
34
+ return {
35
+ fontFamily: (_a = style == null ? void 0 : style.heading) == null ? void 0 : _a.family,
36
+ fontWeight: (_b = style == null ? void 0 : style.heading) == null ? void 0 : _b.weight,
37
+ textTransform: (_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.transform
38
+ };
39
+ };
40
+ var inputStyle = (style) => {
41
+ var _a;
42
+ return {
43
+ backgroundColor: bgColor(style),
44
+ borderColor: textColor(style),
45
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
46
+ color: textColor(style)
47
+ };
48
+ };
49
+ var inputCheckboxStyle = (style) => {
50
+ var _a;
51
+ return {
52
+ ...inputStyle(style),
53
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? Math.min(style.input.radius / 4, 6) + "px" : void 0
54
+ };
55
+ };
56
+ var inputNameStyle = (style) => inputStyle(style);
57
+ var inputPhoneStyle = (style) => inputStyle(style);
58
+ var menuStyle = (style) => ({
59
+ backgroundColor: bgColor(style),
60
+ borderColor: textColor(style),
61
+ color: textColor(style)
62
+ });
63
+ var selectStyle = (style) => {
64
+ var _a;
65
+ return {
66
+ borderColor: textColor(style).replace(")", ", 0.3)"),
67
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
68
+ color: textColor(style)
69
+ };
70
+ };
71
+ var textStyle = (style) => ({
72
+ color: textColor(style)
73
+ });
74
+
75
+ export {
76
+ backgroundStyle,
77
+ borderStyle,
78
+ buttonStyle,
79
+ closeStyle,
80
+ headerStyle,
81
+ inputStyle,
82
+ inputCheckboxStyle,
83
+ inputNameStyle,
84
+ inputPhoneStyle,
85
+ menuStyle,
86
+ selectStyle,
87
+ textStyle
88
+ };
@@ -1,6 +1,3 @@
1
- import {
2
- input_select_default
3
- } from "./chunk-BD3TDNJE.mjs";
4
1
  import {
5
2
  loader_default
6
3
  } from "./chunk-2ZYGRSSA.mjs";
@@ -9,11 +6,14 @@ import {
9
6
  } from "./chunk-XWELEL6Z.mjs";
10
7
  import {
11
8
  input_group_default
12
- } from "./chunk-JJH46E7B.mjs";
9
+ } from "./chunk-3SAKIKZP.mjs";
10
+ import {
11
+ input_select_default
12
+ } from "./chunk-3SXAH7B7.mjs";
13
13
  import {
14
14
  buttonStyle,
15
15
  inputStyle
16
- } from "./chunk-FJXG3REN.mjs";
16
+ } from "./chunk-FJ7PKMAC.mjs";
17
17
 
18
18
  // components/product.js
19
19
  import { useEffect, useMemo, useState } from "react";
@@ -121,7 +121,7 @@ var Product = ({
121
121
  "div",
122
122
  {
123
123
  ...{
124
- className: "space-y-6 pb-12",
124
+ className: "space-y-6",
125
125
  style: {
126
126
  backgroundColor: resolved.background.color.rgb,
127
127
  color: resolved.text.color.rgb
@@ -133,7 +133,10 @@ var Product = ({
133
133
  "div",
134
134
  {
135
135
  ...{
136
- className: "flex items-center h-48 " + (images.length > 1 && "pr-12")
136
+ className: "flex items-center " + (images.length > 1 ? "pr-12" : ""),
137
+ style: {
138
+ height: "12rem"
139
+ }
137
140
  },
138
141
  children: [
139
142
  images.length > 1 && /* @__PURE__ */ jsx(
@@ -179,20 +182,35 @@ var Product = ({
179
182
  "div",
180
183
  {
181
184
  ...{
182
- className: "w-48 h-48 overflow-hidden rounded-3xl m-auto",
183
- ref: emblaRef
185
+ // Dimensions are inline rather than Tailwind size utilities:
186
+ // those sizes live only in this package's dist, and a consuming
187
+ // app's Tailwind scan of node_modules can lag and drop them,
188
+ // silently collapsing the carousel. Inline styles are immune.
189
+ className: "overflow-hidden rounded-3xl m-auto",
190
+ ref: emblaRef,
191
+ style: {
192
+ width: "12rem",
193
+ height: "12rem"
194
+ }
184
195
  },
185
196
  children: /* @__PURE__ */ jsx(
186
197
  "div",
187
198
  {
188
199
  ...{
189
- className: "flex h-full"
200
+ className: "flex",
201
+ style: {
202
+ height: "100%"
203
+ }
190
204
  },
191
205
  children: images.map(({ src }, key) => /* @__PURE__ */ jsx(
192
206
  "div",
193
207
  {
194
208
  ...{
195
- className: "min-w-0 flex-[0_0_100%] relative h-full bg-gray-100"
209
+ className: "min-w-0 relative bg-gray-100",
210
+ style: {
211
+ flex: "0 0 100%",
212
+ height: "100%"
213
+ }
196
214
  },
197
215
  children: /* @__PURE__ */ jsx(
198
216
  ImageComponent,
@@ -296,7 +314,7 @@ var Product = ({
296
314
  "button",
297
315
  {
298
316
  ...{
299
- className: "button justify-center border",
317
+ className: "button justify-center border py-3 px-4 rounded",
300
318
  disabled: disabled || Boolean(action),
301
319
  onClick: onAdd,
302
320
  style: inputStyle(resolved),
@@ -316,7 +334,7 @@ var Product = ({
316
334
  "button",
317
335
  {
318
336
  ...{
319
- className: "button justify-center" + (addToCart ? "" : " w-full"),
337
+ className: "button justify-center py-3 px-4 rounded" + (addToCart ? "" : " w-full"),
320
338
  disabled: disabled || Boolean(action),
321
339
  onClick: onBuy,
322
340
  style: buttonStyle(resolved),
@@ -50,13 +50,23 @@ var Check = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
50
  var check_default = Check;
51
51
 
52
52
  // components/styles.js
53
+ var WHITE = "rgb( 255, 255, 255 )";
54
+ var BLACK = "rgb( 0, 0, 0 )";
55
+ var bgColor = (style) => {
56
+ var _a, _b;
57
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
58
+ };
59
+ var textColor = (style) => {
60
+ var _a, _b;
61
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
62
+ };
53
63
  var inputStyle = (style) => {
54
- var _a, _b, _c, _d, _e, _f, _g;
64
+ var _a;
55
65
  return {
56
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
57
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
58
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
59
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
66
+ backgroundColor: bgColor(style),
67
+ borderColor: textColor(style),
68
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
69
+ color: textColor(style)
60
70
  };
61
71
  };
62
72
  var inputCheckboxStyle = (style) => {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GFDZ7ER6.mjs";
4
4
  import {
5
5
  inputCheckboxStyle
6
- } from "./chunk-FJXG3REN.mjs";
6
+ } from "./chunk-FJ7PKMAC.mjs";
7
7
 
8
8
  // components/input-checkbox.js
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -107,10 +107,10 @@ var InputGroup = ({
107
107
  {
108
108
  ...{
109
109
  className: "flex items-center justify-start space-x-2 py-1 rounded text-sm " + (error && "px-1.5"),
110
- ...error && Object.keys(style).length > 0 && {
110
+ ...error && {
111
111
  style: {
112
- backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb.replace(")", ",.1)"),
113
- color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
112
+ 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)"),
113
+ color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
114
114
  }
115
115
  }
116
116
  },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  input_group_default
3
- } from "./chunk-JJH46E7B.mjs";
3
+ } from "./chunk-3SAKIKZP.mjs";
4
4
  import "./chunk-Q3UIVGPQ.mjs";
5
5
  export {
6
6
  input_group_default as default
@@ -109,10 +109,10 @@ var InputGroup = ({
109
109
  {
110
110
  ...{
111
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 && {
112
+ ...error && {
113
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
114
+ 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)"),
115
+ color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
116
116
  }
117
117
  }
118
118
  },
@@ -162,13 +162,23 @@ var InputGroup = ({
162
162
  var input_group_default = InputGroup;
163
163
 
164
164
  // components/styles.js
165
+ var WHITE = "rgb( 255, 255, 255 )";
166
+ var BLACK = "rgb( 0, 0, 0 )";
167
+ var bgColor = (style) => {
168
+ var _a, _b;
169
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
170
+ };
171
+ var textColor = (style) => {
172
+ var _a, _b;
173
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
174
+ };
165
175
  var inputStyle = (style) => {
166
- var _a, _b, _c, _d, _e, _f, _g;
176
+ var _a;
167
177
  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
178
+ backgroundColor: bgColor(style),
179
+ borderColor: textColor(style),
180
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
181
+ color: textColor(style)
172
182
  };
173
183
  };
174
184
 
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  input_text_default
3
- } from "./chunk-BZ6WMIH7.mjs";
3
+ } from "./chunk-B6Y2SNRW.mjs";
4
4
  import {
5
5
  input_group_default
6
- } from "./chunk-JJH46E7B.mjs";
6
+ } from "./chunk-3SAKIKZP.mjs";
7
7
  import "./chunk-Q3UIVGPQ.mjs";
8
- import "./chunk-FJXG3REN.mjs";
8
+ import "./chunk-FJ7PKMAC.mjs";
9
9
 
10
10
  // components/input-name.js
11
11
  import { jsx } from "react/jsx-runtime";
@@ -76,13 +76,23 @@ var Plus = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
76
76
  var plus_default = Plus;
77
77
 
78
78
  // components/styles.js
79
+ var WHITE = "rgb( 255, 255, 255 )";
80
+ var BLACK = "rgb( 0, 0, 0 )";
81
+ var bgColor = (style) => {
82
+ var _a, _b;
83
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
84
+ };
85
+ var textColor = (style) => {
86
+ var _a, _b;
87
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
88
+ };
79
89
  var inputStyle = (style) => {
80
- var _a, _b, _c, _d, _e, _f, _g;
90
+ var _a;
81
91
  return {
82
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
83
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
84
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
85
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
92
+ backgroundColor: bgColor(style),
93
+ borderColor: textColor(style),
94
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
95
+ color: textColor(style)
86
96
  };
87
97
  };
88
98
 
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-HH7WF5BT.mjs";
7
7
  import {
8
8
  inputStyle
9
- } from "./chunk-FJXG3REN.mjs";
9
+ } from "./chunk-FJ7PKMAC.mjs";
10
10
 
11
11
  // components/input-number.js
12
12
  import { useCallback } from "react";
@@ -39,13 +39,23 @@ var import_input = __toESM(require("react-phone-number-input/input"));
39
39
  var import_phone = require("@drawbridge/drawbridge-utils/phone");
40
40
 
41
41
  // components/styles.js
42
+ var WHITE = "rgb( 255, 255, 255 )";
43
+ var BLACK = "rgb( 0, 0, 0 )";
44
+ var bgColor = (style) => {
45
+ var _a, _b;
46
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
47
+ };
48
+ var textColor = (style) => {
49
+ var _a, _b;
50
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
51
+ };
42
52
  var inputStyle = (style) => {
43
- var _a, _b, _c, _d, _e, _f, _g;
53
+ var _a;
44
54
  return {
45
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
46
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
47
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
48
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
55
+ backgroundColor: bgColor(style),
56
+ borderColor: textColor(style),
57
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
58
+ color: textColor(style)
49
59
  };
50
60
  };
51
61
  var inputPhoneStyle = (style) => inputStyle(style);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  inputPhoneStyle
4
- } from "./chunk-FJXG3REN.mjs";
4
+ } from "./chunk-FJ7PKMAC.mjs";
5
5
 
6
6
  // components/input-phone.js
7
7
  import { useEffect, useState } from "react";