@drawbridge/components 0.0.53 → 0.0.56

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.
@@ -378,9 +378,9 @@ var WrapperGradient = ({
378
378
  const showX = horizontal === true || horizontal === "both";
379
379
  const showY = horizontal === false || horizontal === "both";
380
380
  const overflowClass = horizontal === "both" ? "overflow-scroll" : horizontal ? "overflow-x-scroll overflow-y-visible" : "overflow-y-scroll overflow-x-visible";
381
- 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" : "";
382
382
  const themed = Boolean(color);
383
- 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] ";
384
384
  const classes = {
385
385
  container: [
386
386
  themed ? "relative" : "w-full relative",
@@ -623,6 +623,7 @@ var DefaultImage = ({ alt, className, src, style }) => /* @__PURE__ */ (0, impor
623
623
  var Product = ({
624
624
  action = null,
625
625
  addToCart = true,
626
+ buttonFontSize,
626
627
  disabled = false,
627
628
  errors = {},
628
629
  header,
@@ -637,7 +638,7 @@ var Product = ({
637
638
  style = {},
638
639
  variant
639
640
  }) => {
640
- var _a, _b, _c, _d, _e;
641
+ var _a, _b, _c, _d, _e, _f;
641
642
  const resolved = {
642
643
  ...style,
643
644
  background: {
@@ -649,6 +650,7 @@ var Product = ({
649
650
  color: ((_b = style == null ? void 0 : style.text) == null ? void 0 : _b.color) || { hex: "#000000", rgb: "rgb( 0, 0, 0 )" }
650
651
  }
651
652
  };
653
+ const imageRadius = ((_c = resolved == null ? void 0 : resolved.image) == null ? void 0 : _c.radius) != null ? resolved.image.radius + "px" : "12px";
652
654
  const available = (0, import_react4.useMemo)(
653
655
  () => ((product == null ? void 0 : product.variants) || []).filter((v) => v.availableForSale),
654
656
  [product]
@@ -740,11 +742,14 @@ var Product = ({
740
742
  {
741
743
  ...{
742
744
  // Active state is conveyed purely by a dimmed image (no border).
743
- className: "relative w-12 h-12 overflow-hidden rounded-xl shrink-0",
745
+ className: "relative w-12 h-12 overflow-hidden shrink-0",
744
746
  onClick: () => {
745
747
  setActiveImage(key);
746
748
  emblaApi == null ? void 0 : emblaApi.scrollTo(key);
747
749
  },
750
+ style: {
751
+ borderRadius: imageRadius
752
+ },
748
753
  type: "button"
749
754
  },
750
755
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -779,9 +784,10 @@ var Product = ({
779
784
  // those sizes live only in this package's dist, and a consuming
780
785
  // app's Tailwind scan of node_modules can lag and drop them,
781
786
  // silently collapsing the carousel. Inline styles are immune.
782
- className: "overflow-hidden rounded-3xl m-auto",
787
+ className: "overflow-hidden m-auto",
783
788
  ref: emblaRef,
784
789
  style: {
790
+ borderRadius: imageRadius,
785
791
  width: "12rem",
786
792
  height: "12rem"
787
793
  }
@@ -841,9 +847,9 @@ var Product = ({
841
847
  ...{
842
848
  className: "max-w-80 mx-auto",
843
849
  style: {
844
- fontFamily: ((_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
845
- fontWeight: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.weight) || (style == null ? void 0 : style.fontWeight),
846
- 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)
847
853
  }
848
854
  },
849
855
  children: product == null ? void 0 : product.title
@@ -910,7 +916,12 @@ var Product = ({
910
916
  className: "button justify-center border py-3 px-4 rounded",
911
917
  disabled: disabled || Boolean(action),
912
918
  onClick: onAdd,
913
- style: inputStyle(resolved),
919
+ style: {
920
+ ...inputStyle(resolved),
921
+ ...buttonFontSize && {
922
+ fontSize: buttonFontSize
923
+ }
924
+ },
914
925
  type: "button"
915
926
  },
916
927
  children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -930,7 +941,12 @@ var Product = ({
930
941
  className: "button justify-center py-3 px-4 rounded" + (addToCart ? "" : " w-full"),
931
942
  disabled: disabled || Boolean(action),
932
943
  onClick: onBuy,
933
- style: buttonStyle(resolved),
944
+ style: {
945
+ ...buttonStyle(resolved),
946
+ ...buttonFontSize && {
947
+ fontSize: buttonFontSize
948
+ }
949
+ },
934
950
  type: "button"
935
951
  },
936
952
  children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -1005,7 +1021,7 @@ var Advertisement = ({
1005
1021
  variant,
1006
1022
  VideoComponent = DefaultVideo
1007
1023
  }) => {
1008
- var _a, _b, _c, _d, _e;
1024
+ var _a, _b, _c, _d, _e, _f;
1009
1025
  if (product) {
1010
1026
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1011
1027
  product_default,
@@ -1013,6 +1029,7 @@ var Advertisement = ({
1013
1029
  ...{
1014
1030
  action,
1015
1031
  addToCart: false,
1032
+ buttonFontSize: "16px",
1016
1033
  disabled: preview || disabled,
1017
1034
  errors,
1018
1035
  header,
@@ -1040,6 +1057,7 @@ var Advertisement = ({
1040
1057
  }
1041
1058
  };
1042
1059
  const isVideo = (_c = file == null ? void 0 : file.mimetype) == null ? void 0 : _c.includes("video");
1060
+ const imageRadius = ((_d = resolved == null ? void 0 : resolved.image) == null ? void 0 : _d.radius) != null ? resolved.image.radius + "px" : "12px";
1043
1061
  const card = (assetNode) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1044
1062
  "div",
1045
1063
  {
@@ -1055,7 +1073,10 @@ var Advertisement = ({
1055
1073
  "span",
1056
1074
  {
1057
1075
  ...{
1058
- 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
+ }
1059
1080
  },
1060
1081
  children: assetNode
1061
1082
  }
@@ -1064,12 +1085,12 @@ var Advertisement = ({
1064
1085
  "span",
1065
1086
  {
1066
1087
  ...{
1067
- 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",
1068
1089
  style: {
1069
1090
  ...fonts == null ? void 0 : fonts.body,
1070
1091
  color: resolved.text.color.hex,
1071
- gap: "10px",
1072
- marginTop: "10px"
1092
+ gap: "15px",
1093
+ marginTop: "15px"
1073
1094
  }
1074
1095
  },
1075
1096
  children: [
@@ -1100,7 +1121,10 @@ var Advertisement = ({
1100
1121
  disabled: !preview && !url,
1101
1122
  onClick: preview ? () => {
1102
1123
  } : onClick,
1103
- style: buttonStyle(resolved),
1124
+ style: {
1125
+ ...buttonStyle(resolved),
1126
+ fontSize: "16px"
1127
+ },
1104
1128
  type: "button"
1105
1129
  },
1106
1130
  children: button
@@ -1127,7 +1151,7 @@ var Advertisement = ({
1127
1151
  className: "w-full h-full",
1128
1152
  hls: (0, import_cdn2.cdnSrc)(file, "hls", file == null ? void 0 : file.updatedAt),
1129
1153
  mp4: (0, import_cdn2.cdnSrc)(file, "original", file == null ? void 0 : file.updatedAt),
1130
- 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),
1131
1155
  style: resolved
1132
1156
  }
1133
1157
  }
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  product_default
4
- } from "./chunk-ASHP6LV5.mjs";
4
+ } from "./chunk-7AIAMVTM.mjs";
5
+ import "./chunk-PT7UR6AO.mjs";
5
6
  import "./chunk-3SXAH7B7.mjs";
6
7
  import "./chunk-FYA7EAMR.mjs";
7
8
  import "./chunk-2ZYGRSSA.mjs";
8
- import "./chunk-XWELEL6Z.mjs";
9
9
  import "./chunk-DNK33H3K.mjs";
10
10
  import "./chunk-OHJMWJAQ.mjs";
11
11
  import "./chunk-Q3UIVGPQ.mjs";
@@ -63,7 +63,7 @@ var Advertisement = ({
63
63
  variant,
64
64
  VideoComponent = DefaultVideo
65
65
  }) => {
66
- var _a, _b, _c, _d, _e;
66
+ var _a, _b, _c, _d, _e, _f;
67
67
  if (product) {
68
68
  return /* @__PURE__ */ jsx(
69
69
  product_default,
@@ -71,6 +71,7 @@ var Advertisement = ({
71
71
  ...{
72
72
  action,
73
73
  addToCart: false,
74
+ buttonFontSize: "16px",
74
75
  disabled: preview || disabled,
75
76
  errors,
76
77
  header,
@@ -98,6 +99,7 @@ var Advertisement = ({
98
99
  }
99
100
  };
100
101
  const isVideo = (_c = file == null ? void 0 : file.mimetype) == null ? void 0 : _c.includes("video");
102
+ const imageRadius = ((_d = resolved == null ? void 0 : resolved.image) == null ? void 0 : _d.radius) != null ? resolved.image.radius + "px" : "12px";
101
103
  const card = (assetNode) => /* @__PURE__ */ jsxs(
102
104
  "div",
103
105
  {
@@ -113,7 +115,10 @@ var Advertisement = ({
113
115
  "span",
114
116
  {
115
117
  ...{
116
- className: "block relative aspect-square rounded overflow-hidden" + ((file == null ? void 0 : file.sizes) ? "" : " bg-gray-light")
118
+ className: "block relative aspect-square overflow-hidden" + ((file == null ? void 0 : file.sizes) ? "" : " bg-gray-light"),
119
+ style: {
120
+ borderRadius: imageRadius
121
+ }
117
122
  },
118
123
  children: assetNode
119
124
  }
@@ -122,12 +127,12 @@ var Advertisement = ({
122
127
  "span",
123
128
  {
124
129
  ...{
125
- className: "flex flex-col items-center justify-between gap-x-4 text-center text-sm rounded",
130
+ className: "flex flex-col items-center justify-between gap-x-6 text-center text-sm rounded",
126
131
  style: {
127
132
  ...fonts == null ? void 0 : fonts.body,
128
133
  color: resolved.text.color.hex,
129
- gap: "10px",
130
- marginTop: "10px"
134
+ gap: "15px",
135
+ marginTop: "15px"
131
136
  }
132
137
  },
133
138
  children: [
@@ -158,7 +163,10 @@ var Advertisement = ({
158
163
  disabled: !preview && !url,
159
164
  onClick: preview ? () => {
160
165
  } : onClick,
161
- style: buttonStyle(resolved),
166
+ style: {
167
+ ...buttonStyle(resolved),
168
+ fontSize: "16px"
169
+ },
162
170
  type: "button"
163
171
  },
164
172
  children: button
@@ -185,7 +193,7 @@ var Advertisement = ({
185
193
  className: "w-full h-full",
186
194
  hls: cdnSrc(file, "hls", file == null ? void 0 : file.updatedAt),
187
195
  mp4: cdnSrc(file, "original", file == null ? void 0 : file.updatedAt),
188
- 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),
196
+ poster: 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) || 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),
189
197
  style: resolved
190
198
  }
191
199
  }
@@ -1,12 +1,12 @@
1
+ import {
2
+ wrapper_gradient_default
3
+ } from "./chunk-PT7UR6AO.mjs";
1
4
  import {
2
5
  input_select_default
3
6
  } from "./chunk-3SXAH7B7.mjs";
4
7
  import {
5
8
  loader_default
6
9
  } from "./chunk-2ZYGRSSA.mjs";
7
- import {
8
- wrapper_gradient_default
9
- } from "./chunk-XWELEL6Z.mjs";
10
10
  import {
11
11
  input_group_default
12
12
  } from "./chunk-DNK33H3K.mjs";
@@ -35,6 +35,7 @@ var DefaultImage = ({ alt, className, src, style }) => /* @__PURE__ */ jsx(
35
35
  var Product = ({
36
36
  action = null,
37
37
  addToCart = true,
38
+ buttonFontSize,
38
39
  disabled = false,
39
40
  errors = {},
40
41
  header,
@@ -49,7 +50,7 @@ var Product = ({
49
50
  style = {},
50
51
  variant
51
52
  }) => {
52
- var _a, _b, _c, _d, _e;
53
+ var _a, _b, _c, _d, _e, _f;
53
54
  const resolved = {
54
55
  ...style,
55
56
  background: {
@@ -61,6 +62,7 @@ var Product = ({
61
62
  color: ((_b = style == null ? void 0 : style.text) == null ? void 0 : _b.color) || { hex: "#000000", rgb: "rgb( 0, 0, 0 )" }
62
63
  }
63
64
  };
65
+ const imageRadius = ((_c = resolved == null ? void 0 : resolved.image) == null ? void 0 : _c.radius) != null ? resolved.image.radius + "px" : "12px";
64
66
  const available = useMemo(
65
67
  () => ((product == null ? void 0 : product.variants) || []).filter((v) => v.availableForSale),
66
68
  [product]
@@ -152,11 +154,14 @@ var Product = ({
152
154
  {
153
155
  ...{
154
156
  // Active state is conveyed purely by a dimmed image (no border).
155
- className: "relative w-12 h-12 overflow-hidden rounded-xl shrink-0",
157
+ className: "relative w-12 h-12 overflow-hidden shrink-0",
156
158
  onClick: () => {
157
159
  setActiveImage(key);
158
160
  emblaApi == null ? void 0 : emblaApi.scrollTo(key);
159
161
  },
162
+ style: {
163
+ borderRadius: imageRadius
164
+ },
160
165
  type: "button"
161
166
  },
162
167
  children: /* @__PURE__ */ jsx(
@@ -191,9 +196,10 @@ var Product = ({
191
196
  // those sizes live only in this package's dist, and a consuming
192
197
  // app's Tailwind scan of node_modules can lag and drop them,
193
198
  // silently collapsing the carousel. Inline styles are immune.
194
- className: "overflow-hidden rounded-3xl m-auto",
199
+ className: "overflow-hidden m-auto",
195
200
  ref: emblaRef,
196
201
  style: {
202
+ borderRadius: imageRadius,
197
203
  width: "12rem",
198
204
  height: "12rem"
199
205
  }
@@ -253,9 +259,9 @@ var Product = ({
253
259
  ...{
254
260
  className: "max-w-80 mx-auto",
255
261
  style: {
256
- fontFamily: ((_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
257
- fontWeight: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.weight) || (style == null ? void 0 : style.fontWeight),
258
- textTransform: ((_e = style == null ? void 0 : style.heading) == null ? void 0 : _e.transform) || (style == null ? void 0 : style.textTransform)
262
+ fontFamily: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
263
+ fontWeight: ((_e = style == null ? void 0 : style.heading) == null ? void 0 : _e.weight) || (style == null ? void 0 : style.fontWeight),
264
+ textTransform: ((_f = style == null ? void 0 : style.heading) == null ? void 0 : _f.transform) || (style == null ? void 0 : style.textTransform)
259
265
  }
260
266
  },
261
267
  children: product == null ? void 0 : product.title
@@ -322,7 +328,12 @@ var Product = ({
322
328
  className: "button justify-center border py-3 px-4 rounded",
323
329
  disabled: disabled || Boolean(action),
324
330
  onClick: onAdd,
325
- style: inputStyle(resolved),
331
+ style: {
332
+ ...inputStyle(resolved),
333
+ ...buttonFontSize && {
334
+ fontSize: buttonFontSize
335
+ }
336
+ },
326
337
  type: "button"
327
338
  },
328
339
  children: action === "add" ? /* @__PURE__ */ jsx(
@@ -342,7 +353,12 @@ var Product = ({
342
353
  className: "button justify-center py-3 px-4 rounded" + (addToCart ? "" : " w-full"),
343
354
  disabled: disabled || Boolean(action),
344
355
  onClick: onBuy,
345
- style: buttonStyle(resolved),
356
+ style: {
357
+ ...buttonStyle(resolved),
358
+ ...buttonFontSize && {
359
+ fontSize: buttonFontSize
360
+ }
361
+ },
346
362
  type: "button"
347
363
  },
348
364
  children: action === "buy" ? /* @__PURE__ */ jsx(
@@ -15,9 +15,9 @@ var WrapperGradient = ({
15
15
  const showX = horizontal === true || horizontal === "both";
16
16
  const showY = horizontal === false || horizontal === "both";
17
17
  const overflowClass = horizontal === "both" ? "overflow-scroll" : horizontal ? "overflow-x-scroll overflow-y-visible" : "overflow-y-scroll overflow-x-visible";
18
- const overscrollClass = horizontal === "both" ? "overscroll-none" : horizontal ? "overscroll-x-none overscroll-y-auto" : "overscroll-y-none overscroll-x-auto";
18
+ const overscrollClass = horizontal ? "overscroll-x-none" : "";
19
19
  const themed = Boolean(color);
20
- const gradientDefaults = "absolute z-[2] " + (themed ? "pointer-events-none " : "") + "transition-all duration-[100ms] ";
20
+ const gradientDefaults = "absolute z-[2] pointer-events-none transition-all duration-[100ms] ";
21
21
  const classes = {
22
22
  container: [
23
23
  themed ? "relative" : "w-full relative",
@@ -0,0 +1,41 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // components/embla-fade.js
31
+ var embla_fade_exports = {};
32
+ __export(embla_fade_exports, {
33
+ default: () => import_embla_carousel_fade.default
34
+ });
35
+ module.exports = __toCommonJS(embla_fade_exports);
36
+ var import_embla_carousel_fade = __toESM(require("embla-carousel-fade"));
37
+ __reExport(embla_fade_exports, require("embla-carousel-fade"), module.exports);
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ ...require("embla-carousel-fade")
41
+ });
@@ -0,0 +1,6 @@
1
+ // components/embla-fade.js
2
+ import { default as default2 } from "embla-carousel-fade";
3
+ export * from "embla-carousel-fade";
4
+ export {
5
+ default2 as default
6
+ };
@@ -38,6 +38,32 @@ var import_react = require("react");
38
38
  var import_input = __toESM(require("react-phone-number-input/input"));
39
39
  var import_phone = require("@drawbridge/drawbridge-utils/phone");
40
40
 
41
+ // components/icons/chevron-down.js
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "svg",
45
+ {
46
+ ...{
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ strokeWidth: 1.5,
50
+ viewBox: "0 0 24 24",
51
+ ...props
52
+ },
53
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ "path",
55
+ {
56
+ ...{
57
+ d: "m19.5 8.25-7.5 7.5-7.5-7.5",
58
+ strokeLinecap: "round",
59
+ strokeLinejoin: "round"
60
+ }
61
+ }
62
+ )
63
+ }
64
+ );
65
+ var chevron_down_default = ChevronDown;
66
+
41
67
  // components/styles.js
42
68
  var WHITE = "rgb( 255, 255, 255 )";
43
69
  var BLACK = "rgb( 0, 0, 0 )";
@@ -61,7 +87,7 @@ var inputStyle = (style) => {
61
87
  var inputPhoneStyle = (style) => inputStyle(style);
62
88
 
63
89
  // components/input-phone.js
64
- var import_jsx_runtime = require("react/jsx-runtime");
90
+ var import_jsx_runtime2 = require("react/jsx-runtime");
65
91
  var isValidPhone = (number = "", country = "") => {
66
92
  const valid = (0, import_phone.isValid)(number, country);
67
93
  return valid;
@@ -112,7 +138,7 @@ var InputPhone = ({
112
138
  },
113
139
  []
114
140
  );
115
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
141
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
116
142
  "div",
117
143
  {
118
144
  ...{
@@ -120,30 +146,57 @@ var InputPhone = ({
120
146
  style: inputPhoneStyle(style)
121
147
  },
122
148
  children: [
123
- (countries == null ? void 0 : countries.length) > 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
- "select",
149
+ (countries == null ? void 0 : countries.length) > 1 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
150
+ "div",
125
151
  {
126
152
  ...{
127
- className: "px-3 bg-none appearance-none border-none " + (keyboard ? "focus-visible:!border focus-visible:!border-inherit !rounded-none " : "focus-visible:!outline-0 focus-visible:!ring-0"),
128
- onChange: ({ target }) => {
129
- setCountry(target.value);
130
- setNumber("");
131
- },
132
- style: inputPhoneStyle(style),
133
- value: country
153
+ className: "relative"
134
154
  },
135
- children: countries.map((item, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
- "option",
137
- {
138
- ...{
139
- value: item
140
- },
141
- children: item
142
- },
143
- "input-phone-country-" + item + "-" + key
144
- ))
155
+ children: [
156
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
157
+ "select",
158
+ {
159
+ ...{
160
+ className: "pl-3 pr-6 bg-none appearance-none border-none " + (keyboard ? "focus-visible:!border focus-visible:!border-inherit !rounded-none " : "focus-visible:!outline-0 focus-visible:!ring-0"),
161
+ onChange: ({ target }) => {
162
+ setCountry(target.value);
163
+ setNumber("");
164
+ },
165
+ style: inputPhoneStyle(style),
166
+ value: country
167
+ },
168
+ children: countries.map((item, key) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
169
+ "option",
170
+ {
171
+ ...{
172
+ value: item
173
+ },
174
+ children: item
175
+ },
176
+ "input-phone-country-" + item + "-" + key
177
+ ))
178
+ }
179
+ ),
180
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
181
+ "div",
182
+ {
183
+ ...{
184
+ "aria-hidden": true,
185
+ className: "h-full flex items-center absolute inset-y-0 right-1.5 pointer-events-none"
186
+ },
187
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
188
+ chevron_down_default,
189
+ {
190
+ ...{
191
+ className: "w-4 h-4 text-inherit"
192
+ }
193
+ }
194
+ )
195
+ }
196
+ )
197
+ ]
145
198
  }
146
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
199
+ ) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
147
200
  "span",
148
201
  {
149
202
  ...{
@@ -153,7 +206,7 @@ var InputPhone = ({
153
206
  children: (countries == null ? void 0 : countries[0]) || ""
154
207
  }
155
208
  ),
156
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
209
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
157
210
  "div",
158
211
  {
159
212
  ...{
@@ -162,7 +215,7 @@ var InputPhone = ({
162
215
  borderLeft: "solid 1px " + ((_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.hex)
163
216
  }
164
217
  },
165
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
218
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
166
219
  import_input.default,
167
220
  {
168
221
  ...{
@@ -1,4 +1,7 @@
1
1
  "use client";
2
+ import {
3
+ chevron_down_default
4
+ } from "./chunk-FYA7EAMR.mjs";
2
5
  import {
3
6
  inputPhoneStyle
4
7
  } from "./chunk-FJ7PKMAC.mjs";
@@ -66,28 +69,55 @@ var InputPhone = ({
66
69
  style: inputPhoneStyle(style)
67
70
  },
68
71
  children: [
69
- (countries == null ? void 0 : countries.length) > 1 ? /* @__PURE__ */ jsx(
70
- "select",
72
+ (countries == null ? void 0 : countries.length) > 1 ? /* @__PURE__ */ jsxs(
73
+ "div",
71
74
  {
72
75
  ...{
73
- className: "px-3 bg-none appearance-none border-none " + (keyboard ? "focus-visible:!border focus-visible:!border-inherit !rounded-none " : "focus-visible:!outline-0 focus-visible:!ring-0"),
74
- onChange: ({ target }) => {
75
- setCountry(target.value);
76
- setNumber("");
77
- },
78
- style: inputPhoneStyle(style),
79
- value: country
76
+ className: "relative"
80
77
  },
81
- children: countries.map((item, key) => /* @__PURE__ */ jsx(
82
- "option",
83
- {
84
- ...{
85
- value: item
86
- },
87
- children: item
88
- },
89
- "input-phone-country-" + item + "-" + key
90
- ))
78
+ children: [
79
+ /* @__PURE__ */ jsx(
80
+ "select",
81
+ {
82
+ ...{
83
+ className: "pl-3 pr-6 bg-none appearance-none border-none " + (keyboard ? "focus-visible:!border focus-visible:!border-inherit !rounded-none " : "focus-visible:!outline-0 focus-visible:!ring-0"),
84
+ onChange: ({ target }) => {
85
+ setCountry(target.value);
86
+ setNumber("");
87
+ },
88
+ style: inputPhoneStyle(style),
89
+ value: country
90
+ },
91
+ children: countries.map((item, key) => /* @__PURE__ */ jsx(
92
+ "option",
93
+ {
94
+ ...{
95
+ value: item
96
+ },
97
+ children: item
98
+ },
99
+ "input-phone-country-" + item + "-" + key
100
+ ))
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsx(
104
+ "div",
105
+ {
106
+ ...{
107
+ "aria-hidden": true,
108
+ className: "h-full flex items-center absolute inset-y-0 right-1.5 pointer-events-none"
109
+ },
110
+ children: /* @__PURE__ */ jsx(
111
+ chevron_down_default,
112
+ {
113
+ ...{
114
+ className: "w-4 h-4 text-inherit"
115
+ }
116
+ }
117
+ )
118
+ }
119
+ )
120
+ ]
91
121
  }
92
122
  ) : /* @__PURE__ */ jsx(
93
123
  "span",
package/dist/product.js CHANGED
@@ -375,9 +375,9 @@ var WrapperGradient = ({
375
375
  const showX = horizontal === true || horizontal === "both";
376
376
  const showY = horizontal === false || horizontal === "both";
377
377
  const overflowClass = horizontal === "both" ? "overflow-scroll" : horizontal ? "overflow-x-scroll overflow-y-visible" : "overflow-y-scroll overflow-x-visible";
378
- const overscrollClass = horizontal === "both" ? "overscroll-none" : horizontal ? "overscroll-x-none overscroll-y-auto" : "overscroll-y-none overscroll-x-auto";
378
+ const overscrollClass = horizontal ? "overscroll-x-none" : "";
379
379
  const themed = Boolean(color);
380
- const gradientDefaults = "absolute z-[2] " + (themed ? "pointer-events-none " : "") + "transition-all duration-[100ms] ";
380
+ const gradientDefaults = "absolute z-[2] pointer-events-none transition-all duration-[100ms] ";
381
381
  const classes = {
382
382
  container: [
383
383
  themed ? "relative" : "w-full relative",
@@ -620,6 +620,7 @@ var DefaultImage = ({ alt, className, src, style }) => /* @__PURE__ */ (0, impor
620
620
  var Product = ({
621
621
  action = null,
622
622
  addToCart = true,
623
+ buttonFontSize,
623
624
  disabled = false,
624
625
  errors = {},
625
626
  header,
@@ -634,7 +635,7 @@ var Product = ({
634
635
  style = {},
635
636
  variant
636
637
  }) => {
637
- var _a, _b, _c, _d, _e;
638
+ var _a, _b, _c, _d, _e, _f;
638
639
  const resolved = {
639
640
  ...style,
640
641
  background: {
@@ -646,6 +647,7 @@ var Product = ({
646
647
  color: ((_b = style == null ? void 0 : style.text) == null ? void 0 : _b.color) || { hex: "#000000", rgb: "rgb( 0, 0, 0 )" }
647
648
  }
648
649
  };
650
+ const imageRadius = ((_c = resolved == null ? void 0 : resolved.image) == null ? void 0 : _c.radius) != null ? resolved.image.radius + "px" : "12px";
649
651
  const available = (0, import_react4.useMemo)(
650
652
  () => ((product == null ? void 0 : product.variants) || []).filter((v) => v.availableForSale),
651
653
  [product]
@@ -737,11 +739,14 @@ var Product = ({
737
739
  {
738
740
  ...{
739
741
  // Active state is conveyed purely by a dimmed image (no border).
740
- className: "relative w-12 h-12 overflow-hidden rounded-xl shrink-0",
742
+ className: "relative w-12 h-12 overflow-hidden shrink-0",
741
743
  onClick: () => {
742
744
  setActiveImage(key);
743
745
  emblaApi == null ? void 0 : emblaApi.scrollTo(key);
744
746
  },
747
+ style: {
748
+ borderRadius: imageRadius
749
+ },
745
750
  type: "button"
746
751
  },
747
752
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -776,9 +781,10 @@ var Product = ({
776
781
  // those sizes live only in this package's dist, and a consuming
777
782
  // app's Tailwind scan of node_modules can lag and drop them,
778
783
  // silently collapsing the carousel. Inline styles are immune.
779
- className: "overflow-hidden rounded-3xl m-auto",
784
+ className: "overflow-hidden m-auto",
780
785
  ref: emblaRef,
781
786
  style: {
787
+ borderRadius: imageRadius,
782
788
  width: "12rem",
783
789
  height: "12rem"
784
790
  }
@@ -838,9 +844,9 @@ var Product = ({
838
844
  ...{
839
845
  className: "max-w-80 mx-auto",
840
846
  style: {
841
- fontFamily: ((_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
842
- fontWeight: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.weight) || (style == null ? void 0 : style.fontWeight),
843
- textTransform: ((_e = style == null ? void 0 : style.heading) == null ? void 0 : _e.transform) || (style == null ? void 0 : style.textTransform)
847
+ fontFamily: ((_d = style == null ? void 0 : style.heading) == null ? void 0 : _d.family) || (style == null ? void 0 : style.fontFamily) || "Roboto Flex",
848
+ fontWeight: ((_e = style == null ? void 0 : style.heading) == null ? void 0 : _e.weight) || (style == null ? void 0 : style.fontWeight),
849
+ textTransform: ((_f = style == null ? void 0 : style.heading) == null ? void 0 : _f.transform) || (style == null ? void 0 : style.textTransform)
844
850
  }
845
851
  },
846
852
  children: product == null ? void 0 : product.title
@@ -907,7 +913,12 @@ var Product = ({
907
913
  className: "button justify-center border py-3 px-4 rounded",
908
914
  disabled: disabled || Boolean(action),
909
915
  onClick: onAdd,
910
- style: inputStyle(resolved),
916
+ style: {
917
+ ...inputStyle(resolved),
918
+ ...buttonFontSize && {
919
+ fontSize: buttonFontSize
920
+ }
921
+ },
911
922
  type: "button"
912
923
  },
913
924
  children: action === "add" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -927,7 +938,12 @@ var Product = ({
927
938
  className: "button justify-center py-3 px-4 rounded" + (addToCart ? "" : " w-full"),
928
939
  disabled: disabled || Boolean(action),
929
940
  onClick: onBuy,
930
- style: buttonStyle(resolved),
941
+ style: {
942
+ ...buttonStyle(resolved),
943
+ ...buttonFontSize && {
944
+ fontSize: buttonFontSize
945
+ }
946
+ },
931
947
  type: "button"
932
948
  },
933
949
  children: action === "buy" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
package/dist/product.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  product_default
4
- } from "./chunk-ASHP6LV5.mjs";
4
+ } from "./chunk-7AIAMVTM.mjs";
5
+ import "./chunk-PT7UR6AO.mjs";
5
6
  import "./chunk-3SXAH7B7.mjs";
6
7
  import "./chunk-FYA7EAMR.mjs";
7
8
  import "./chunk-2ZYGRSSA.mjs";
8
- import "./chunk-XWELEL6Z.mjs";
9
9
  import "./chunk-DNK33H3K.mjs";
10
10
  import "./chunk-OHJMWJAQ.mjs";
11
11
  import "./chunk-Q3UIVGPQ.mjs";
@@ -40,9 +40,9 @@ var WrapperGradient = ({
40
40
  const showX = horizontal === true || horizontal === "both";
41
41
  const showY = horizontal === false || horizontal === "both";
42
42
  const overflowClass = horizontal === "both" ? "overflow-scroll" : horizontal ? "overflow-x-scroll overflow-y-visible" : "overflow-y-scroll overflow-x-visible";
43
- const overscrollClass = horizontal === "both" ? "overscroll-none" : horizontal ? "overscroll-x-none overscroll-y-auto" : "overscroll-y-none overscroll-x-auto";
43
+ const overscrollClass = horizontal ? "overscroll-x-none" : "";
44
44
  const themed = Boolean(color);
45
- const gradientDefaults = "absolute z-[2] " + (themed ? "pointer-events-none " : "") + "transition-all duration-[100ms] ";
45
+ const gradientDefaults = "absolute z-[2] pointer-events-none transition-all duration-[100ms] ";
46
46
  const classes = {
47
47
  container: [
48
48
  themed ? "relative" : "w-full relative",
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  useWrapperGradient,
4
4
  wrapper_gradient_default
5
- } from "./chunk-XWELEL6Z.mjs";
5
+ } from "./chunk-PT7UR6AO.mjs";
6
6
  export {
7
7
  wrapper_gradient_default as default,
8
8
  useWrapperGradient
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/components",
3
- "version": "0.0.53",
3
+ "version": "0.0.56",
4
4
  "exports": {
5
5
  "./advertisement": {
6
6
  "types": "./types/advertisement.d.ts",
@@ -10,6 +10,10 @@
10
10
  "types": "./types/embla.d.ts",
11
11
  "default": "./dist/embla.js"
12
12
  },
13
+ "./embla-fade": {
14
+ "types": "./types/embla-fade.d.ts",
15
+ "default": "./dist/embla-fade.js"
16
+ },
13
17
  "./icons/arrow-down-tray": {
14
18
  "types": "./types/icons/arrow-down-tray.d.ts",
15
19
  "default": "./dist/icons/arrow-down-tray.js"
@@ -339,7 +343,8 @@
339
343
  },
340
344
  "scripts": {
341
345
  "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install && npx drawbridge-agents-sync",
342
- "build": "tsup && npm publish"
346
+ "test": ". \"$HOME/.nvm/nvm.sh\" && nvm use && node --test",
347
+ "build": ". \"$HOME/.nvm/nvm.sh\" && nvm use && tsup && node --test && npm publish"
343
348
  },
344
349
  "peerDependencies": {
345
350
  "@drawbridge/drawbridge-utils": ">=0.0.61",
@@ -352,7 +357,8 @@
352
357
  "tsup": "8.5.1"
353
358
  },
354
359
  "dependencies": {
355
- "@drawbridge/drawbridge-agents": "0.0.10",
360
+ "@drawbridge/drawbridge-agents": "0.0.11",
361
+ "embla-carousel-fade": "8.6.0",
356
362
  "embla-carousel-react": "8.6.0",
357
363
  "react-player": "2.16.0",
358
364
  "react-phone-number-input": "3.4.12"
@@ -0,0 +1,2 @@
1
+ export { default } from 'embla-carousel-fade';
2
+ export * from 'embla-carousel-fade';