@drawbridge/components 0.0.52 → 0.0.55

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.
@@ -41,7 +41,7 @@ var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
41
41
  var import_cdn = require("@drawbridge/shopify/cdn");
42
42
  var import_drawbridge_utils = require("@drawbridge/drawbridge-utils");
43
43
 
44
- // components/input-group.js
44
+ // components/input-group-error.js
45
45
  var import_react = require("react");
46
46
 
47
47
  // components/icons/warning.js
@@ -70,8 +70,86 @@ var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
70
  );
71
71
  var warning_default = Warning;
72
72
 
73
- // components/input-group.js
73
+ // components/input-group-error.js
74
74
  var import_jsx_runtime2 = require("react/jsx-runtime");
75
+ var InputGroupError = ({
76
+ className,
77
+ error,
78
+ label,
79
+ message,
80
+ style = {}
81
+ }) => {
82
+ var _a, _b, _c, _d;
83
+ if (!(error || message)) {
84
+ return null;
85
+ }
86
+ const classes = [
87
+ "flex items-center justify-start space-x-2 py-1 rounded text-sm"
88
+ ];
89
+ if (error) {
90
+ classes.push("px-1.5");
91
+ }
92
+ if (className) {
93
+ classes.push(className);
94
+ }
95
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
96
+ "p",
97
+ {
98
+ ...{
99
+ className: classes.join(" "),
100
+ ...error && {
101
+ style: {
102
+ 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)"),
103
+ color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
104
+ }
105
+ }
106
+ },
107
+ children: [
108
+ error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
109
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
110
+ warning_default,
111
+ {
112
+ ...{
113
+ className: "w-4 h-4",
114
+ "aria-hidden": true
115
+ }
116
+ }
117
+ ),
118
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
119
+ "span",
120
+ {
121
+ ...{
122
+ className: "text-[0px] opacity-0 w-0 h-0 absolute"
123
+ },
124
+ children: [
125
+ label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
126
+ label,
127
+ ": "
128
+ ] }) : null,
129
+ error
130
+ ]
131
+ }
132
+ )
133
+ ] }),
134
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
135
+ "span",
136
+ {
137
+ ...{
138
+ ...error && {
139
+ "aria-hidden": true
140
+ }
141
+ },
142
+ children: error || message
143
+ }
144
+ )
145
+ ]
146
+ }
147
+ );
148
+ };
149
+ var input_group_error_default = InputGroupError;
150
+
151
+ // components/input-group.js
152
+ var import_jsx_runtime3 = require("react/jsx-runtime");
75
153
  var InputGroup = ({
76
154
  className,
77
155
  error,
@@ -81,7 +159,6 @@ var InputGroup = ({
81
159
  style = {},
82
160
  ...rest
83
161
  }) => {
84
- var _a, _b, _c, _d;
85
162
  const classes = [
86
163
  "input-group"
87
164
  ];
@@ -91,7 +168,7 @@ var InputGroup = ({
91
168
  if (error) {
92
169
  classes.push("error");
93
170
  }
94
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
171
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
95
172
  "div",
96
173
  {
97
174
  ...{
@@ -102,14 +179,14 @@ var InputGroup = ({
102
179
  }
103
180
  },
104
181
  children: [
105
- label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
182
+ label ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
106
183
  "div",
107
184
  {
108
185
  ...{
109
186
  className: "space-y-2"
110
187
  },
111
188
  children: [
112
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
189
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
113
190
  "span",
114
191
  {
115
192
  ...{
@@ -122,55 +199,15 @@ var InputGroup = ({
122
199
  ]
123
200
  }
124
201
  ) : input,
125
- (error || message) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
126
- "p",
202
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
203
+ input_group_error_default,
127
204
  {
128
205
  ...{
129
- className: "flex items-center justify-start space-x-2 py-1 rounded text-sm " + (error && "px-1.5"),
130
- ...error && {
131
- style: {
132
- 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)"),
133
- color: ((_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) || "rgb( 0, 0, 0 )"
134
- }
135
- }
136
- },
137
- children: [
138
- error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
139
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
140
- warning_default,
141
- {
142
- ...{
143
- className: "w-4 h-4",
144
- "aria-hidden": true
145
- }
146
- }
147
- ),
148
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
149
- "span",
150
- {
151
- ...{
152
- className: "text-[0px] opacity-0 w-0 h-0 absolute"
153
- },
154
- children: [
155
- label,
156
- ": ",
157
- error
158
- ]
159
- }
160
- )
161
- ] }),
162
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
163
- "span",
164
- {
165
- ...{
166
- ...error && {
167
- "aria-hidden": true
168
- }
169
- },
170
- children: error || message
171
- }
172
- )
173
- ]
206
+ error,
207
+ label,
208
+ message,
209
+ style
210
+ }
174
211
  }
175
212
  )
176
213
  ]
@@ -183,8 +220,8 @@ var input_group_default = InputGroup;
183
220
  var import_react2 = require("react");
184
221
 
185
222
  // components/icons/chevron-down.js
186
- var import_jsx_runtime3 = require("react/jsx-runtime");
187
- var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
223
+ var import_jsx_runtime4 = require("react/jsx-runtime");
224
+ var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
188
225
  "svg",
189
226
  {
190
227
  ...{
@@ -194,7 +231,7 @@ var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
194
231
  viewBox: "0 0 24 24",
195
232
  ...props
196
233
  },
197
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
234
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
198
235
  "path",
199
236
  {
200
237
  ...{
@@ -239,7 +276,7 @@ var inputStyle = (style) => {
239
276
  };
240
277
 
241
278
  // components/input-select.js
242
- var import_jsx_runtime4 = require("react/jsx-runtime");
279
+ var import_jsx_runtime5 = require("react/jsx-runtime");
243
280
  var InputSelect = ({
244
281
  onChange,
245
282
  options = [],
@@ -260,14 +297,14 @@ var InputSelect = ({
260
297
  window.removeEventListener("mousedown", click);
261
298
  };
262
299
  }, []);
263
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
300
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
264
301
  "div",
265
302
  {
266
303
  ...{
267
304
  className: "relative"
268
305
  },
269
306
  children: [
270
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
307
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
271
308
  "select",
272
309
  {
273
310
  ...{
@@ -278,7 +315,7 @@ var InputSelect = ({
278
315
  value
279
316
  },
280
317
  children: [
281
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
318
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
282
319
  "option",
283
320
  {
284
321
  ...{
@@ -289,7 +326,7 @@ var InputSelect = ({
289
326
  children: "Select"
290
327
  }
291
328
  ),
292
- options.map(({ label, option, value: optValue }, key) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
329
+ options.map(({ label, option, value: optValue }, key) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
293
330
  "option",
294
331
  {
295
332
  ...{
@@ -302,14 +339,14 @@ var InputSelect = ({
302
339
  ]
303
340
  }
304
341
  ),
305
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
342
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
306
343
  "div",
307
344
  {
308
345
  ...{
309
346
  "aria-hidden": true,
310
347
  className: "h-full flex items-center absolute inset-y-0 right-0 pointer-events-none px-2.5"
311
348
  },
312
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
349
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
313
350
  chevron_down_default,
314
351
  {
315
352
  ...{
@@ -327,7 +364,7 @@ var input_select_default = InputSelect;
327
364
 
328
365
  // components/wrapper-gradient.js
329
366
  var import_react3 = require("react");
330
- var import_jsx_runtime5 = require("react/jsx-runtime");
367
+ var import_jsx_runtime6 = require("react/jsx-runtime");
331
368
  var WrapperGradientContext = (0, import_react3.createContext)(null);
332
369
  var WrapperGradient = ({
333
370
  children,
@@ -341,9 +378,9 @@ var WrapperGradient = ({
341
378
  const showX = horizontal === true || horizontal === "both";
342
379
  const showY = horizontal === false || horizontal === "both";
343
380
  const overflowClass = horizontal === "both" ? "overflow-scroll" : horizontal ? "overflow-x-scroll overflow-y-visible" : "overflow-y-scroll overflow-x-visible";
344
- const overscrollClass = horizontal === "both" ? "overscroll-none" : horizontal ? "overscroll-x-none overscroll-y-auto" : "overscroll-y-none overscroll-x-auto";
381
+ const overscrollClass = horizontal ? "overscroll-x-none" : "";
345
382
  const themed = Boolean(color);
346
- const gradientDefaults = "absolute z-[2] " + (themed ? "pointer-events-none " : "") + "transition-all duration-[100ms] ";
383
+ const gradientDefaults = "absolute z-[2] pointer-events-none transition-all duration-[100ms] ";
347
384
  const classes = {
348
385
  container: [
349
386
  themed ? "relative" : "w-full relative",
@@ -450,14 +487,14 @@ var WrapperGradient = ({
450
487
  }),
451
488
  [scroll.atBottom, scroll.atRight]
452
489
  );
453
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
490
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
454
491
  "div",
455
492
  {
456
493
  ...{
457
494
  className: classes.container.join(" ")
458
495
  },
459
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(WrapperGradientContext.Provider, { value: contextValue, children: [
460
- showY && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
496
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(WrapperGradientContext.Provider, { value: contextValue, children: [
497
+ showY && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
461
498
  "div",
462
499
  {
463
500
  ...{
@@ -473,7 +510,7 @@ var WrapperGradient = ({
473
510
  }
474
511
  }
475
512
  ),
476
- showX && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
513
+ showX && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
477
514
  "div",
478
515
  {
479
516
  ...{
@@ -486,7 +523,7 @@ var WrapperGradient = ({
486
523
  }
487
524
  }
488
525
  ),
489
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
526
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
490
527
  "div",
491
528
  {
492
529
  ...{
@@ -496,7 +533,7 @@ var WrapperGradient = ({
496
533
  children
497
534
  }
498
535
  ),
499
- showY && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
536
+ showY && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
500
537
  "div",
501
538
  {
502
539
  ...{
@@ -509,7 +546,7 @@ var WrapperGradient = ({
509
546
  }
510
547
  }
511
548
  ),
512
- showX && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
549
+ showX && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
513
550
  "div",
514
551
  {
515
552
  ...{
@@ -529,8 +566,8 @@ var WrapperGradient = ({
529
566
  var wrapper_gradient_default = WrapperGradient;
530
567
 
531
568
  // components/icons/loader.js
532
- var import_jsx_runtime6 = require("react/jsx-runtime");
533
- var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
569
+ var import_jsx_runtime7 = require("react/jsx-runtime");
570
+ var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
534
571
  "svg",
535
572
  {
536
573
  ...{
@@ -542,7 +579,7 @@ var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime
542
579
  ...props
543
580
  },
544
581
  children: [
545
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
582
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
546
583
  "circle",
547
584
  {
548
585
  ...{
@@ -555,7 +592,7 @@ var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime
555
592
  }
556
593
  }
557
594
  ),
558
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
595
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
559
596
  "path",
560
597
  {
561
598
  ...{
@@ -571,8 +608,8 @@ var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime
571
608
  var loader_default = Loader;
572
609
 
573
610
  // components/product.js
574
- var import_jsx_runtime7 = require("react/jsx-runtime");
575
- var DefaultImage = ({ alt, className, src, style }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
611
+ var import_jsx_runtime8 = require("react/jsx-runtime");
612
+ var DefaultImage = ({ alt, className, src, style }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
576
613
  "img",
577
614
  {
578
615
  ...{
@@ -586,6 +623,7 @@ var DefaultImage = ({ alt, className, src, style }) => /* @__PURE__ */ (0, impor
586
623
  var Product = ({
587
624
  action = null,
588
625
  addToCart = true,
626
+ buttonFontSize,
589
627
  disabled = false,
590
628
  errors = {},
591
629
  header,
@@ -600,7 +638,7 @@ var Product = ({
600
638
  style = {},
601
639
  variant
602
640
  }) => {
603
- var _a, _b, _c, _d, _e;
641
+ var _a, _b, _c, _d, _e, _f;
604
642
  const resolved = {
605
643
  ...style,
606
644
  background: {
@@ -612,6 +650,7 @@ var Product = ({
612
650
  color: ((_b = style == null ? void 0 : style.text) == null ? void 0 : _b.color) || { hex: "#000000", rgb: "rgb( 0, 0, 0 )" }
613
651
  }
614
652
  };
653
+ const imageRadius = ((_c = resolved == null ? void 0 : resolved.image) == null ? void 0 : _c.radius) != null ? resolved.image.radius + "px" : "12px";
615
654
  const available = (0, import_react4.useMemo)(
616
655
  () => ((product == null ? void 0 : product.variants) || []).filter((v) => v.availableForSale),
617
656
  [product]
@@ -669,7 +708,7 @@ var Product = ({
669
708
  }
670
709
  ;
671
710
  };
672
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
711
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
673
712
  "div",
674
713
  {
675
714
  ...{
@@ -681,7 +720,7 @@ var Product = ({
681
720
  },
682
721
  children: [
683
722
  header,
684
- images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
723
+ images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
685
724
  "div",
686
725
  {
687
726
  ...{
@@ -691,26 +730,29 @@ var Product = ({
691
730
  }
692
731
  },
693
732
  children: [
694
- images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
733
+ images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
695
734
  wrapper_gradient_default,
696
735
  {
697
736
  ...{
698
737
  classNameScroll: "flex flex-col w-12 h-48 space-y-3",
699
738
  color: resolved.background.color.rgb
700
739
  },
701
- children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
740
+ children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
702
741
  "button",
703
742
  {
704
743
  ...{
705
744
  // Active state is conveyed purely by a dimmed image (no border).
706
- className: "relative w-12 h-12 overflow-hidden rounded-xl shrink-0",
745
+ className: "relative w-12 h-12 overflow-hidden shrink-0",
707
746
  onClick: () => {
708
747
  setActiveImage(key);
709
748
  emblaApi == null ? void 0 : emblaApi.scrollTo(key);
710
749
  },
750
+ style: {
751
+ borderRadius: imageRadius
752
+ },
711
753
  type: "button"
712
754
  },
713
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
755
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
714
756
  ImageComponent,
715
757
  {
716
758
  ...{
@@ -734,7 +776,7 @@ var Product = ({
734
776
  ))
735
777
  }
736
778
  ),
737
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
779
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
738
780
  "div",
739
781
  {
740
782
  ...{
@@ -742,14 +784,15 @@ var Product = ({
742
784
  // those sizes live only in this package's dist, and a consuming
743
785
  // app's Tailwind scan of node_modules can lag and drop them,
744
786
  // silently collapsing the carousel. Inline styles are immune.
745
- className: "overflow-hidden rounded-3xl m-auto",
787
+ className: "overflow-hidden m-auto",
746
788
  ref: emblaRef,
747
789
  style: {
790
+ borderRadius: imageRadius,
748
791
  width: "12rem",
749
792
  height: "12rem"
750
793
  }
751
794
  },
752
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
795
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
753
796
  "div",
754
797
  {
755
798
  ...{
@@ -758,7 +801,7 @@ var Product = ({
758
801
  height: "100%"
759
802
  }
760
803
  },
761
- children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
804
+ children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
762
805
  "div",
763
806
  {
764
807
  ...{
@@ -768,7 +811,7 @@ var Product = ({
768
811
  height: "100%"
769
812
  }
770
813
  },
771
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
814
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
772
815
  ImageComponent,
773
816
  {
774
817
  ...{
@@ -791,51 +834,51 @@ var Product = ({
791
834
  ]
792
835
  }
793
836
  ),
794
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
837
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
795
838
  "div",
796
839
  {
797
840
  ...{
798
841
  className: "text-center space-y-2"
799
842
  },
800
843
  children: [
801
- (product == null ? void 0 : product.title) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
844
+ (product == null ? void 0 : product.title) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
802
845
  "h2",
803
846
  {
804
847
  ...{
805
848
  className: "max-w-80 mx-auto",
806
849
  style: {
807
- fontFamily: ((_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
808
- fontWeight: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.weight) || (style == null ? void 0 : style.fontWeight),
809
- textTransform: ((_e = style == null ? void 0 : style.heading) == null ? void 0 : _e.transform) || (style == null ? void 0 : style.textTransform)
850
+ fontFamily: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
851
+ fontWeight: ((_e = style == null ? void 0 : style.heading) == null ? void 0 : _e.weight) || (style == null ? void 0 : style.fontWeight),
852
+ textTransform: ((_f = style == null ? void 0 : style.heading) == null ? void 0 : _f.transform) || (style == null ? void 0 : style.textTransform)
810
853
  }
811
854
  },
812
855
  children: product == null ? void 0 : product.title
813
856
  }
814
857
  ),
815
- !available.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: "Unavailable" }) : (selectedVariant == null ? void 0 : selectedVariant.price) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: (0, import_drawbridge_utils.formatCurrency)({
858
+ !available.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Unavailable" }) : (selectedVariant == null ? void 0 : selectedVariant.price) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: (0, import_drawbridge_utils.formatCurrency)({
816
859
  code: selectedVariant.currency,
817
860
  display: "parts",
818
861
  value: selectedVariant.price
819
862
  }) }),
820
- (product == null ? void 0 : product.description) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
863
+ (product == null ? void 0 : product.description) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
821
864
  wrapper_gradient_default,
822
865
  {
823
866
  ...{
824
867
  classNameScroll: "max-h-[4.5em]",
825
868
  color: resolved.background.color.rgb
826
869
  },
827
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: product.description })
870
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: product.description })
828
871
  }
829
872
  )
830
873
  ]
831
874
  }
832
875
  ),
833
- available.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
876
+ available.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
834
877
  input_group_default,
835
878
  {
836
879
  ...{
837
880
  error: errors == null ? void 0 : errors.variant,
838
- input: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
881
+ input: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
839
882
  input_select_default,
840
883
  {
841
884
  ...{
@@ -854,29 +897,34 @@ var Product = ({
854
897
  }
855
898
  }
856
899
  ),
857
- available.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
900
+ available.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
858
901
  input_group_default,
859
902
  {
860
903
  ...{
861
904
  error: errors == null ? void 0 : errors.root,
862
- input: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
905
+ input: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
863
906
  "div",
864
907
  {
865
908
  ...{
866
909
  className: addToCart ? "grid grid-cols-2 gap-5" : ""
867
910
  },
868
911
  children: [
869
- addToCart && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
912
+ addToCart && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
870
913
  "button",
871
914
  {
872
915
  ...{
873
916
  className: "button justify-center border py-3 px-4 rounded",
874
917
  disabled: disabled || Boolean(action),
875
918
  onClick: onAdd,
876
- style: inputStyle(resolved),
919
+ style: {
920
+ ...inputStyle(resolved),
921
+ ...buttonFontSize && {
922
+ fontSize: buttonFontSize
923
+ }
924
+ },
877
925
  type: "button"
878
926
  },
879
- children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
927
+ children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
880
928
  loader_default,
881
929
  {
882
930
  ...{
@@ -886,17 +934,22 @@ var Product = ({
886
934
  ) : "Add to cart"
887
935
  }
888
936
  ),
889
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
937
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
890
938
  "button",
891
939
  {
892
940
  ...{
893
941
  className: "button justify-center py-3 px-4 rounded" + (addToCart ? "" : " w-full"),
894
942
  disabled: disabled || Boolean(action),
895
943
  onClick: onBuy,
896
- style: buttonStyle(resolved),
944
+ style: {
945
+ ...buttonStyle(resolved),
946
+ ...buttonFontSize && {
947
+ fontSize: buttonFontSize
948
+ }
949
+ },
897
950
  type: "button"
898
951
  },
899
- children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
952
+ children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
900
953
  loader_default,
901
954
  {
902
955
  ...{
@@ -920,8 +973,8 @@ var Product = ({
920
973
  var product_default = Product;
921
974
 
922
975
  // components/advertisement.js
923
- var import_jsx_runtime8 = require("react/jsx-runtime");
924
- var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
976
+ var import_jsx_runtime9 = require("react/jsx-runtime");
977
+ var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
925
978
  "img",
926
979
  {
927
980
  ...{
@@ -931,7 +984,7 @@ var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_
931
984
  }
932
985
  }
933
986
  );
934
- var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
987
+ var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
935
988
  "video",
936
989
  {
937
990
  ...{
@@ -968,14 +1021,15 @@ var Advertisement = ({
968
1021
  variant,
969
1022
  VideoComponent = DefaultVideo
970
1023
  }) => {
971
- var _a, _b, _c, _d, _e;
1024
+ var _a, _b, _c, _d, _e, _f;
972
1025
  if (product) {
973
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1026
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
974
1027
  product_default,
975
1028
  {
976
1029
  ...{
977
1030
  action,
978
1031
  addToCart: false,
1032
+ buttonFontSize: "16px",
979
1033
  disabled: preview || disabled,
980
1034
  errors,
981
1035
  header,
@@ -1003,7 +1057,8 @@ var Advertisement = ({
1003
1057
  }
1004
1058
  };
1005
1059
  const isVideo = (_c = file == null ? void 0 : file.mimetype) == null ? void 0 : _c.includes("video");
1006
- const card = (assetNode) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1060
+ const imageRadius = ((_d = resolved == null ? void 0 : resolved.image) == null ? void 0 : _d.radius) != null ? resolved.image.radius + "px" : "12px";
1061
+ const card = (assetNode) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1007
1062
  "div",
1008
1063
  {
1009
1064
  ...{
@@ -1014,35 +1069,38 @@ var Advertisement = ({
1014
1069
  }
1015
1070
  },
1016
1071
  children: [
1017
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1072
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1018
1073
  "span",
1019
1074
  {
1020
1075
  ...{
1021
- className: "block relative aspect-square rounded overflow-hidden" + ((file == null ? void 0 : file.sizes) ? "" : " bg-gray-light")
1076
+ className: "block relative aspect-square overflow-hidden" + ((file == null ? void 0 : file.sizes) ? "" : " bg-gray-light"),
1077
+ style: {
1078
+ borderRadius: imageRadius
1079
+ }
1022
1080
  },
1023
1081
  children: assetNode
1024
1082
  }
1025
1083
  ),
1026
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1084
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1027
1085
  "span",
1028
1086
  {
1029
1087
  ...{
1030
- className: "flex flex-col items-center justify-between gap-x-4 text-center text-sm rounded",
1088
+ className: "flex flex-col items-center justify-between gap-x-6 text-center text-sm rounded",
1031
1089
  style: {
1032
1090
  ...fonts == null ? void 0 : fonts.body,
1033
1091
  color: resolved.text.color.hex,
1034
- gap: "10px",
1035
- marginTop: "10px"
1092
+ gap: "15px",
1093
+ marginTop: "15px"
1036
1094
  }
1037
1095
  },
1038
1096
  children: [
1039
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1097
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1040
1098
  "div",
1041
1099
  {
1042
1100
  ...{
1043
1101
  className: "flex-1 min-w-0 space-y-2"
1044
1102
  },
1045
- children: title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1103
+ children: title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1046
1104
  "p",
1047
1105
  {
1048
1106
  ...{
@@ -1055,7 +1113,7 @@ var Advertisement = ({
1055
1113
  )
1056
1114
  }
1057
1115
  ),
1058
- button && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1116
+ button && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1059
1117
  "button",
1060
1118
  {
1061
1119
  ...{
@@ -1063,7 +1121,10 @@ var Advertisement = ({
1063
1121
  disabled: !preview && !url,
1064
1122
  onClick: preview ? () => {
1065
1123
  } : onClick,
1066
- style: buttonStyle(resolved),
1124
+ style: {
1125
+ ...buttonStyle(resolved),
1126
+ fontSize: "16px"
1127
+ },
1067
1128
  type: "button"
1068
1129
  },
1069
1130
  children: button
@@ -1077,20 +1138,20 @@ var Advertisement = ({
1077
1138
  );
1078
1139
  if (isVideo) {
1079
1140
  return card(
1080
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1141
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1081
1142
  "div",
1082
1143
  {
1083
1144
  ...{
1084
1145
  className: "relative h-full w-full aspect-[9/16]"
1085
1146
  },
1086
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1147
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1087
1148
  VideoComponent,
1088
1149
  {
1089
1150
  ...{
1090
1151
  className: "w-full h-full",
1091
1152
  hls: (0, import_cdn2.cdnSrc)(file, "hls", file == null ? void 0 : file.updatedAt),
1092
1153
  mp4: (0, import_cdn2.cdnSrc)(file, "original", file == null ? void 0 : file.updatedAt),
1093
- poster: (0, import_cdn2.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) || (0, import_cdn2.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),
1154
+ poster: (0, import_cdn2.cdnSrc)((_e = file == null ? void 0 : file.frames) == null ? void 0 : _e[file == null ? void 0 : file.poster], "500x500", file == null ? void 0 : file.updatedAt) || (0, import_cdn2.cdnSrc)((_f = file == null ? void 0 : file.frames) == null ? void 0 : _f[file == null ? void 0 : file.poster], "1080x1920", file == null ? void 0 : file.updatedAt),
1094
1155
  style: resolved
1095
1156
  }
1096
1157
  }
@@ -1100,7 +1161,7 @@ var Advertisement = ({
1100
1161
  );
1101
1162
  }
1102
1163
  return card(
1103
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1164
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1104
1165
  ImageComponent,
1105
1166
  {
1106
1167
  ...{