@drawbridge/components 0.0.44 → 0.0.46

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.
@@ -34,19 +34,28 @@ __export(input_phone_exports, {
34
34
  isValidPhone: () => isValidPhone
35
35
  });
36
36
  module.exports = __toCommonJS(input_phone_exports);
37
- var import_style = require("react-phone-number-input/style.css");
38
37
  var import_react = require("react");
39
38
  var import_input = __toESM(require("react-phone-number-input/input"));
40
39
  var import_phone = require("@drawbridge/drawbridge-utils/phone");
41
40
 
42
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
+ };
43
52
  var inputStyle = (style) => {
44
- var _a, _b, _c, _d, _e, _f, _g;
53
+ var _a;
45
54
  return {
46
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
47
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
48
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
49
- 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)
50
59
  };
51
60
  };
52
61
  var inputPhoneStyle = (style) => inputStyle(style);
@@ -1,10 +1,9 @@
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
- import "react-phone-number-input/style.css";
8
7
  import { useEffect, useState } from "react";
9
8
  import Input from "react-phone-number-input/input";
10
9
  import { isValid } from "@drawbridge/drawbridge-utils/phone";
@@ -52,13 +52,23 @@ var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
52
  var chevron_down_default = ChevronDown;
53
53
 
54
54
  // components/styles.js
55
+ var WHITE = "rgb( 255, 255, 255 )";
56
+ var BLACK = "rgb( 0, 0, 0 )";
57
+ var bgColor = (style) => {
58
+ var _a, _b;
59
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
60
+ };
61
+ var textColor = (style) => {
62
+ var _a, _b;
63
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
64
+ };
55
65
  var inputStyle = (style) => {
56
- var _a, _b, _c, _d, _e, _f, _g;
66
+ var _a;
57
67
  return {
58
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
59
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
60
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
61
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
68
+ backgroundColor: bgColor(style),
69
+ borderColor: textColor(style),
70
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
71
+ color: textColor(style)
62
72
  };
63
73
  };
64
74
 
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  input_select_default
4
- } from "./chunk-BD3TDNJE.mjs";
4
+ } from "./chunk-3SXAH7B7.mjs";
5
5
  import "./chunk-FYA7EAMR.mjs";
6
- import "./chunk-FJXG3REN.mjs";
6
+ import "./chunk-FJ7PKMAC.mjs";
7
7
  export {
8
8
  input_select_default as default
9
9
  };
@@ -24,13 +24,23 @@ __export(input_text_exports, {
24
24
  module.exports = __toCommonJS(input_text_exports);
25
25
 
26
26
  // components/styles.js
27
+ var WHITE = "rgb( 255, 255, 255 )";
28
+ var BLACK = "rgb( 0, 0, 0 )";
29
+ var bgColor = (style) => {
30
+ var _a, _b;
31
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
32
+ };
33
+ var textColor = (style) => {
34
+ var _a, _b;
35
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
36
+ };
27
37
  var inputStyle = (style) => {
28
- var _a, _b, _c, _d, _e, _f, _g;
38
+ var _a;
29
39
  return {
30
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
31
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
32
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
33
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
40
+ backgroundColor: bgColor(style),
41
+ borderColor: textColor(style),
42
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
43
+ color: textColor(style)
34
44
  };
35
45
  };
36
46
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  input_text_default
3
- } from "./chunk-BZ6WMIH7.mjs";
4
- import "./chunk-FJXG3REN.mjs";
3
+ } from "./chunk-B6Y2SNRW.mjs";
4
+ import "./chunk-FJ7PKMAC.mjs";
5
5
  export {
6
6
  input_text_default as default
7
7
  };
@@ -24,13 +24,23 @@ __export(input_textarea_exports, {
24
24
  module.exports = __toCommonJS(input_textarea_exports);
25
25
 
26
26
  // components/styles.js
27
+ var WHITE = "rgb( 255, 255, 255 )";
28
+ var BLACK = "rgb( 0, 0, 0 )";
29
+ var bgColor = (style) => {
30
+ var _a, _b;
31
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
32
+ };
33
+ var textColor = (style) => {
34
+ var _a, _b;
35
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
36
+ };
27
37
  var inputStyle = (style) => {
28
- var _a, _b, _c, _d, _e, _f, _g;
38
+ var _a;
29
39
  return {
30
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
31
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
32
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
33
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
40
+ backgroundColor: bgColor(style),
41
+ borderColor: textColor(style),
42
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
43
+ color: textColor(style)
34
44
  };
35
45
  };
36
46
 
@@ -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-textarea.js
6
6
  import { jsx } from "react/jsx-runtime";
package/dist/product.js CHANGED
@@ -124,10 +124,10 @@ var InputGroup = ({
124
124
  {
125
125
  ...{
126
126
  className: "flex items-center justify-start space-x-2 py-1 rounded text-sm " + (error && "px-1.5"),
127
- ...error && Object.keys(style).length > 0 && {
127
+ ...error && {
128
128
  style: {
129
- backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb.replace(")", ",.1)"),
130
- color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
129
+ 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)"),
130
+ color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
131
131
  }
132
132
  }
133
133
  },
@@ -206,22 +206,32 @@ var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
206
206
  var chevron_down_default = ChevronDown;
207
207
 
208
208
  // components/styles.js
209
+ var WHITE = "rgb( 255, 255, 255 )";
210
+ var BLACK = "rgb( 0, 0, 0 )";
211
+ var bgColor = (style) => {
212
+ var _a, _b;
213
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
214
+ };
215
+ var textColor = (style) => {
216
+ var _a, _b;
217
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
218
+ };
209
219
  var buttonStyle = (style) => {
210
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
220
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
211
221
  return {
212
- 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) || ((_e = (_d = style == null ? void 0 : style.text) == null ? void 0 : _d.color) == null ? void 0 : _e.rgb),
213
- borderColor: ((_h = (_g = (_f = style == null ? void 0 : style.button) == null ? void 0 : _f.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb) || ((_j = (_i = style == null ? void 0 : style.text) == null ? void 0 : _i.color) == null ? void 0 : _j.rgb),
214
- borderRadius: ((_k = style == null ? void 0 : style.button) == null ? void 0 : _k.radius) != null ? style.button.radius / 4 + "px" : void 0,
215
- color: ((_n = (_m = (_l = style == null ? void 0 : style.button) == null ? void 0 : _l.text) == null ? void 0 : _m.color) == null ? void 0 : _n.rgb) || ((_p = (_o = style == null ? void 0 : style.background) == null ? void 0 : _o.color) == null ? void 0 : _p.rgb)
222
+ 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),
223
+ 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),
224
+ borderRadius: ((_g = style == null ? void 0 : style.button) == null ? void 0 : _g.radius) != null ? style.button.radius / 4 + "px" : void 0,
225
+ 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)
216
226
  };
217
227
  };
218
228
  var inputStyle = (style) => {
219
- var _a, _b, _c, _d, _e, _f, _g;
229
+ var _a;
220
230
  return {
221
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
222
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
223
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
224
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
231
+ backgroundColor: bgColor(style),
232
+ borderColor: textColor(style),
233
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
234
+ color: textColor(style)
225
235
  };
226
236
  };
227
237
 
@@ -586,14 +596,25 @@ var Product = ({
586
596
  style = {},
587
597
  variant
588
598
  }) => {
589
- var _a, _b, _c, _d, _e, _f, _g;
599
+ var _a, _b, _c, _d, _e;
600
+ const resolved = {
601
+ ...style,
602
+ background: {
603
+ ...style == null ? void 0 : style.background,
604
+ color: ((_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) || { hex: "#FFFFFF", rgb: "rgb( 255, 255, 255 )" }
605
+ },
606
+ text: {
607
+ ...style == null ? void 0 : style.text,
608
+ color: ((_b = style == null ? void 0 : style.text) == null ? void 0 : _b.color) || { hex: "#000000", rgb: "rgb( 0, 0, 0 )" }
609
+ }
610
+ };
590
611
  const available = (0, import_react4.useMemo)(
591
612
  () => ((product == null ? void 0 : product.variants) || []).filter((v) => v.availableForSale),
592
613
  [product]
593
614
  );
594
615
  const [activeImage, setActiveImage] = (0, import_react4.useState)(0);
595
616
  const [emblaRef, emblaApi] = (0, import_embla_carousel_react.default)();
596
- const selectedVariant = available.find((v) => v.id === variant) || null;
617
+ const selectedVariant = available.find((v) => v.id === variant) || available[0] || null;
597
618
  const images = (0, import_react4.useMemo)(
598
619
  () => {
599
620
  const variants = ((product == null ? void 0 : product.variants) || []).filter((v) => v.availableForSale);
@@ -648,7 +669,11 @@ var Product = ({
648
669
  "div",
649
670
  {
650
671
  ...{
651
- className: "space-y-6 pb-12"
672
+ className: "space-y-6 pb-12",
673
+ style: {
674
+ backgroundColor: resolved.background.color.rgb,
675
+ color: resolved.text.color.rgb
676
+ }
652
677
  },
653
678
  children: [
654
679
  header,
@@ -664,7 +689,7 @@ var Product = ({
664
689
  {
665
690
  ...{
666
691
  classNameScroll: "flex flex-col w-12 h-48 space-y-3",
667
- color: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
692
+ color: resolved.background.color.rgb
668
693
  },
669
694
  children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
670
695
  "button",
@@ -677,7 +702,7 @@ var Product = ({
677
702
  },
678
703
  type: "button",
679
704
  ...activeImage === key && {
680
- style: inputStyle(style)
705
+ style: inputStyle(resolved)
681
706
  }
682
707
  },
683
708
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -771,7 +796,7 @@ var Product = ({
771
796
  {
772
797
  ...{
773
798
  classNameScroll: "max-h-[4.5em]",
774
- color: (_g = (_f = style == null ? void 0 : style.background) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
799
+ color: resolved.background.color.rgb
775
800
  },
776
801
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: product.description })
777
802
  }
@@ -794,12 +819,12 @@ var Product = ({
794
819
  label: v.title,
795
820
  value: v.id
796
821
  })),
797
- style,
822
+ style: resolved,
798
823
  value: variant || ""
799
824
  }
800
825
  }
801
826
  ),
802
- style
827
+ style: resolved
803
828
  }
804
829
  }
805
830
  ),
@@ -819,10 +844,10 @@ var Product = ({
819
844
  "button",
820
845
  {
821
846
  ...{
822
- className: "button justify-center border",
847
+ className: "button justify-center border py-3 px-4 rounded",
823
848
  disabled: disabled || Boolean(action),
824
849
  onClick: onAdd,
825
- style: inputStyle(style),
850
+ style: inputStyle(resolved),
826
851
  type: "button"
827
852
  },
828
853
  children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -839,10 +864,10 @@ var Product = ({
839
864
  "button",
840
865
  {
841
866
  ...{
842
- className: "button justify-center" + (addToCart ? "" : " w-full"),
867
+ className: "button justify-center py-3 px-4 rounded" + (addToCart ? "" : " w-full"),
843
868
  disabled: disabled || Boolean(action),
844
869
  onClick: onBuy,
845
- style: buttonStyle(style),
870
+ style: buttonStyle(resolved),
846
871
  type: "button"
847
872
  },
848
873
  children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -858,7 +883,7 @@ var Product = ({
858
883
  ]
859
884
  }
860
885
  ),
861
- style
886
+ style: resolved
862
887
  }
863
888
  }
864
889
  )
package/dist/product.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  product_default
4
- } from "./chunk-I2HL7C6E.mjs";
5
- import "./chunk-BD3TDNJE.mjs";
6
- import "./chunk-FYA7EAMR.mjs";
4
+ } from "./chunk-X7CR4JVY.mjs";
7
5
  import "./chunk-2ZYGRSSA.mjs";
8
6
  import "./chunk-XWELEL6Z.mjs";
9
- import "./chunk-JJH46E7B.mjs";
7
+ import "./chunk-3SAKIKZP.mjs";
10
8
  import "./chunk-Q3UIVGPQ.mjs";
11
- import "./chunk-FJXG3REN.mjs";
9
+ import "./chunk-3SXAH7B7.mjs";
10
+ import "./chunk-FYA7EAMR.mjs";
11
+ import "./chunk-FJ7PKMAC.mjs";
12
12
  export {
13
13
  product_default as default
14
14
  };
package/dist/styles.js CHANGED
@@ -33,35 +33,36 @@ __export(styles_exports, {
33
33
  textStyle: () => textStyle
34
34
  });
35
35
  module.exports = __toCommonJS(styles_exports);
36
- var backgroundStyle = (style) => {
37
- var _a, _b, _c, _d;
38
- return {
39
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
40
- color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
41
- };
36
+ var WHITE = "rgb( 255, 255, 255 )";
37
+ var BLACK = "rgb( 0, 0, 0 )";
38
+ var bgColor = (style) => {
39
+ var _a, _b;
40
+ return ((_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || WHITE;
42
41
  };
43
- var borderStyle = (style) => {
42
+ var textColor = (style) => {
44
43
  var _a, _b;
45
- return {
46
- borderColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
47
- };
44
+ return ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) || BLACK;
48
45
  };
46
+ var backgroundStyle = (style) => ({
47
+ backgroundColor: bgColor(style),
48
+ color: textColor(style)
49
+ });
50
+ var borderStyle = (style) => ({
51
+ borderColor: textColor(style)
52
+ });
49
53
  var buttonStyle = (style) => {
50
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
51
55
  return {
52
- 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) || ((_e = (_d = style == null ? void 0 : style.text) == null ? void 0 : _d.color) == null ? void 0 : _e.rgb),
53
- borderColor: ((_h = (_g = (_f = style == null ? void 0 : style.button) == null ? void 0 : _f.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb) || ((_j = (_i = style == null ? void 0 : style.text) == null ? void 0 : _i.color) == null ? void 0 : _j.rgb),
54
- borderRadius: ((_k = style == null ? void 0 : style.button) == null ? void 0 : _k.radius) != null ? style.button.radius / 4 + "px" : void 0,
55
- color: ((_n = (_m = (_l = style == null ? void 0 : style.button) == null ? void 0 : _l.text) == null ? void 0 : _m.color) == null ? void 0 : _n.rgb) || ((_p = (_o = style == null ? void 0 : style.background) == null ? void 0 : _o.color) == null ? void 0 : _p.rgb)
56
- };
57
- };
58
- var closeStyle = (style) => {
59
- var _a, _b, _c, _d;
60
- return {
61
- backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
62
- color: (_d = (_c = style == null ? void 0 : style.background) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
56
+ 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),
57
+ 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),
58
+ borderRadius: ((_g = style == null ? void 0 : style.button) == null ? void 0 : _g.radius) != null ? style.button.radius / 4 + "px" : void 0,
59
+ 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)
63
60
  };
64
61
  };
62
+ var closeStyle = (style) => ({
63
+ backgroundColor: textColor(style),
64
+ color: bgColor(style)
65
+ });
65
66
  var headerStyle = (style) => {
66
67
  var _a, _b, _c;
67
68
  return {
@@ -71,12 +72,12 @@ var headerStyle = (style) => {
71
72
  };
72
73
  };
73
74
  var inputStyle = (style) => {
74
- var _a, _b, _c, _d, _e, _f, _g;
75
+ var _a;
75
76
  return {
76
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
77
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
78
- borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
79
- color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
77
+ backgroundColor: bgColor(style),
78
+ borderColor: textColor(style),
79
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
80
+ color: textColor(style)
80
81
  };
81
82
  };
82
83
  var inputCheckboxStyle = (style) => {
@@ -88,28 +89,22 @@ var inputCheckboxStyle = (style) => {
88
89
  };
89
90
  var inputNameStyle = (style) => inputStyle(style);
90
91
  var inputPhoneStyle = (style) => inputStyle(style);
91
- var menuStyle = (style) => {
92
- var _a, _b, _c, _d, _e, _f;
93
- return {
94
- backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
95
- borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
96
- color: (_f = (_e = style == null ? void 0 : style.text) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb
97
- };
98
- };
92
+ var menuStyle = (style) => ({
93
+ backgroundColor: bgColor(style),
94
+ borderColor: textColor(style),
95
+ color: textColor(style)
96
+ });
99
97
  var selectStyle = (style) => {
100
- var _a, _b, _c, _d, _e, _f;
101
- return {
102
- borderColor: (_c = (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) == null ? void 0 : _c.replace(")", ", 0.3)"),
103
- borderRadius: ((_d = style == null ? void 0 : style.input) == null ? void 0 : _d.radius) != null ? style.input.radius / 4 + "px" : void 0,
104
- color: (_f = (_e = style == null ? void 0 : style.text) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb
105
- };
106
- };
107
- var textStyle = (style) => {
108
- var _a, _b;
98
+ var _a;
109
99
  return {
110
- color: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
100
+ borderColor: textColor(style).replace(")", ", 0.3)"),
101
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? style.input.radius / 4 + "px" : void 0,
102
+ color: textColor(style)
111
103
  };
112
104
  };
105
+ var textStyle = (style) => ({
106
+ color: textColor(style)
107
+ });
113
108
  // Annotate the CommonJS export names for ESM import in node:
114
109
  0 && (module.exports = {
115
110
  backgroundStyle,
package/dist/styles.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  menuStyle,
12
12
  selectStyle,
13
13
  textStyle
14
- } from "./chunk-FJXG3REN.mjs";
14
+ } from "./chunk-FJ7PKMAC.mjs";
15
15
  export {
16
16
  backgroundStyle,
17
17
  borderStyle,
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "@drawbridge/components",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "exports": {
5
5
  "./advertisement": {
6
6
  "types": "./types/advertisement.d.ts",
7
7
  "default": "./dist/advertisement.js"
8
8
  },
9
- "./card-advertisement": {
10
- "types": "./types/card-advertisement.d.ts",
11
- "default": "./dist/card-advertisement.js"
12
- },
13
9
  "./embla": {
14
10
  "types": "./types/embla.d.ts",
15
11
  "default": "./dist/embla.js"
@@ -19,7 +19,6 @@ export interface AdvertisementProps {
19
19
  onBuy?: () => void;
20
20
  onClick?: () => void;
21
21
  onVariantChange?: ( value: string ) => void;
22
- onVariantSelect?: ( variant: any ) => void;
23
22
  organization?: string;
24
23
  page?: string;
25
24
  preview?: boolean;