@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.
@@ -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,
@@ -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
  ...{
@@ -669,7 +706,7 @@ var Product = ({
669
706
  }
670
707
  ;
671
708
  };
672
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
709
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
673
710
  "div",
674
711
  {
675
712
  ...{
@@ -681,7 +718,7 @@ var Product = ({
681
718
  },
682
719
  children: [
683
720
  header,
684
- images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
721
+ images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
685
722
  "div",
686
723
  {
687
724
  ...{
@@ -691,14 +728,14 @@ var Product = ({
691
728
  }
692
729
  },
693
730
  children: [
694
- images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
731
+ images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
695
732
  wrapper_gradient_default,
696
733
  {
697
734
  ...{
698
735
  classNameScroll: "flex flex-col w-12 h-48 space-y-3",
699
736
  color: resolved.background.color.rgb
700
737
  },
701
- children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
738
+ children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
702
739
  "button",
703
740
  {
704
741
  ...{
@@ -710,7 +747,7 @@ var Product = ({
710
747
  },
711
748
  type: "button"
712
749
  },
713
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
750
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
714
751
  ImageComponent,
715
752
  {
716
753
  ...{
@@ -734,7 +771,7 @@ var Product = ({
734
771
  ))
735
772
  }
736
773
  ),
737
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
774
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
738
775
  "div",
739
776
  {
740
777
  ...{
@@ -749,7 +786,7 @@ var Product = ({
749
786
  height: "12rem"
750
787
  }
751
788
  },
752
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
789
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
753
790
  "div",
754
791
  {
755
792
  ...{
@@ -758,7 +795,7 @@ var Product = ({
758
795
  height: "100%"
759
796
  }
760
797
  },
761
- children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
798
+ children: images.map(({ src }, key) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
762
799
  "div",
763
800
  {
764
801
  ...{
@@ -768,7 +805,7 @@ var Product = ({
768
805
  height: "100%"
769
806
  }
770
807
  },
771
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
808
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
772
809
  ImageComponent,
773
810
  {
774
811
  ...{
@@ -791,14 +828,14 @@ var Product = ({
791
828
  ]
792
829
  }
793
830
  ),
794
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
831
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
795
832
  "div",
796
833
  {
797
834
  ...{
798
835
  className: "text-center space-y-2"
799
836
  },
800
837
  children: [
801
- (product == null ? void 0 : product.title) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
838
+ (product == null ? void 0 : product.title) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
802
839
  "h2",
803
840
  {
804
841
  ...{
@@ -812,38 +849,30 @@ var Product = ({
812
849
  children: product == null ? void 0 : product.title
813
850
  }
814
851
  ),
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)({
852
+ !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
853
  code: selectedVariant.currency,
817
854
  display: "parts",
818
855
  value: selectedVariant.price
819
856
  }) }),
820
- (product == null ? void 0 : product.description) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
857
+ (product == null ? void 0 : product.description) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
821
858
  wrapper_gradient_default,
822
859
  {
823
860
  ...{
824
861
  classNameScroll: "max-h-[4.5em]",
825
862
  color: resolved.background.color.rgb
826
863
  },
827
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
828
- "p",
829
- {
830
- ...{
831
- className: "text-sm"
832
- },
833
- children: product.description
834
- }
835
- )
864
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: product.description })
836
865
  }
837
866
  )
838
867
  ]
839
868
  }
840
869
  ),
841
- available.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
870
+ available.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
842
871
  input_group_default,
843
872
  {
844
873
  ...{
845
874
  error: errors == null ? void 0 : errors.variant,
846
- input: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
875
+ input: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
847
876
  input_select_default,
848
877
  {
849
878
  ...{
@@ -862,19 +891,19 @@ var Product = ({
862
891
  }
863
892
  }
864
893
  ),
865
- available.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
894
+ available.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
866
895
  input_group_default,
867
896
  {
868
897
  ...{
869
898
  error: errors == null ? void 0 : errors.root,
870
- input: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
899
+ input: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
871
900
  "div",
872
901
  {
873
902
  ...{
874
- className: addToCart ? "grid grid-cols-2 gap-4" : ""
903
+ className: addToCart ? "grid grid-cols-2 gap-5" : ""
875
904
  },
876
905
  children: [
877
- addToCart && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
906
+ addToCart && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
878
907
  "button",
879
908
  {
880
909
  ...{
@@ -884,7 +913,7 @@ var Product = ({
884
913
  style: inputStyle(resolved),
885
914
  type: "button"
886
915
  },
887
- children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
916
+ children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
888
917
  loader_default,
889
918
  {
890
919
  ...{
@@ -894,7 +923,7 @@ var Product = ({
894
923
  ) : "Add to cart"
895
924
  }
896
925
  ),
897
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
926
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
898
927
  "button",
899
928
  {
900
929
  ...{
@@ -904,7 +933,7 @@ var Product = ({
904
933
  style: buttonStyle(resolved),
905
934
  type: "button"
906
935
  },
907
- children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
936
+ children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
908
937
  loader_default,
909
938
  {
910
939
  ...{
@@ -928,8 +957,8 @@ var Product = ({
928
957
  var product_default = Product;
929
958
 
930
959
  // components/advertisement.js
931
- var import_jsx_runtime8 = require("react/jsx-runtime");
932
- var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
960
+ var import_jsx_runtime9 = require("react/jsx-runtime");
961
+ var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
933
962
  "img",
934
963
  {
935
964
  ...{
@@ -939,7 +968,7 @@ var DefaultImage2 = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_
939
968
  }
940
969
  }
941
970
  );
942
- var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
971
+ var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
943
972
  "video",
944
973
  {
945
974
  ...{
@@ -978,7 +1007,7 @@ var Advertisement = ({
978
1007
  }) => {
979
1008
  var _a, _b, _c, _d, _e;
980
1009
  if (product) {
981
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1010
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
982
1011
  product_default,
983
1012
  {
984
1013
  ...{
@@ -1011,7 +1040,7 @@ var Advertisement = ({
1011
1040
  }
1012
1041
  };
1013
1042
  const isVideo = (_c = file == null ? void 0 : file.mimetype) == null ? void 0 : _c.includes("video");
1014
- const card = (assetNode) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1043
+ const card = (assetNode) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1015
1044
  "div",
1016
1045
  {
1017
1046
  ...{
@@ -1022,7 +1051,7 @@ var Advertisement = ({
1022
1051
  }
1023
1052
  },
1024
1053
  children: [
1025
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1054
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1026
1055
  "span",
1027
1056
  {
1028
1057
  ...{
@@ -1031,7 +1060,7 @@ var Advertisement = ({
1031
1060
  children: assetNode
1032
1061
  }
1033
1062
  ),
1034
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1063
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1035
1064
  "span",
1036
1065
  {
1037
1066
  ...{
@@ -1044,13 +1073,13 @@ var Advertisement = ({
1044
1073
  }
1045
1074
  },
1046
1075
  children: [
1047
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1076
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1048
1077
  "div",
1049
1078
  {
1050
1079
  ...{
1051
1080
  className: "flex-1 min-w-0 space-y-2"
1052
1081
  },
1053
- children: title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1082
+ children: title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1054
1083
  "p",
1055
1084
  {
1056
1085
  ...{
@@ -1063,7 +1092,7 @@ var Advertisement = ({
1063
1092
  )
1064
1093
  }
1065
1094
  ),
1066
- button && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1095
+ button && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1067
1096
  "button",
1068
1097
  {
1069
1098
  ...{
@@ -1085,13 +1114,13 @@ var Advertisement = ({
1085
1114
  );
1086
1115
  if (isVideo) {
1087
1116
  return card(
1088
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1117
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1089
1118
  "div",
1090
1119
  {
1091
1120
  ...{
1092
1121
  className: "relative h-full w-full aspect-[9/16]"
1093
1122
  },
1094
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1123
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1095
1124
  VideoComponent,
1096
1125
  {
1097
1126
  ...{
@@ -1108,7 +1137,7 @@ var Advertisement = ({
1108
1137
  );
1109
1138
  }
1110
1139
  return card(
1111
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1140
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1112
1141
  ImageComponent,
1113
1142
  {
1114
1143
  ...{
@@ -1,13 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  product_default
4
- } from "./chunk-NFF5ANXM.mjs";
4
+ } from "./chunk-ASHP6LV5.mjs";
5
+ import "./chunk-3SXAH7B7.mjs";
6
+ import "./chunk-FYA7EAMR.mjs";
5
7
  import "./chunk-2ZYGRSSA.mjs";
6
8
  import "./chunk-XWELEL6Z.mjs";
7
- import "./chunk-3SAKIKZP.mjs";
9
+ import "./chunk-DNK33H3K.mjs";
10
+ import "./chunk-OHJMWJAQ.mjs";
8
11
  import "./chunk-Q3UIVGPQ.mjs";
9
- import "./chunk-3SXAH7B7.mjs";
10
- import "./chunk-FYA7EAMR.mjs";
11
12
  import {
12
13
  buttonStyle
13
14
  } from "./chunk-FJ7PKMAC.mjs";