@drawbridge/components 0.1.13 → 0.1.15

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.
Files changed (242) hide show
  1. package/components/styles.css +364 -2
  2. package/dist/advertisement.js +3 -1
  3. package/dist/advertisement.mjs +3 -1
  4. package/dist/bridge/advertisements.js +2 -0
  5. package/dist/bridge/advertisements.mjs +2 -0
  6. package/dist/bridge/countdown.js +2 -1
  7. package/dist/bridge/countdown.mjs +2 -1
  8. package/dist/bridge/form-subdomain-embed.js +18 -20
  9. package/dist/bridge/form-subdomain-embed.mjs +18 -20
  10. package/dist/bridge/form-subdomain-header.js +24 -1
  11. package/dist/bridge/form-subdomain-header.mjs +24 -1
  12. package/dist/bridge/form-subdomain-missions.js +577 -0
  13. package/dist/bridge/form-subdomain-missions.mjs +540 -0
  14. package/dist/bridge/form-subdomain.js +530 -220
  15. package/dist/bridge/form-subdomain.mjs +533 -222
  16. package/dist/bridge/lib/entry.js +59 -0
  17. package/dist/bridge/lib/entry.mjs +29 -0
  18. package/dist/bridge/lib/location.js +38 -0
  19. package/dist/bridge/lib/location.mjs +13 -0
  20. package/dist/bridge/lib/order.js +71 -0
  21. package/dist/bridge/lib/order.mjs +44 -0
  22. package/dist/bridge/lib/url.js +9 -0
  23. package/dist/bridge/lib/url.mjs +7 -0
  24. package/dist/bridge/share-button.js +5 -3
  25. package/dist/bridge/share-button.mjs +5 -3
  26. package/dist/bridge/subdomain-content.js +7 -6
  27. package/dist/bridge/subdomain-content.mjs +7 -6
  28. package/dist/bridge/template-layout.js +59 -21
  29. package/dist/bridge/template-layout.mjs +59 -21
  30. package/dist/bridge/template-modal.js +42 -76
  31. package/dist/bridge/template-modal.mjs +39 -73
  32. package/dist/bridge/template-preview.js +208 -0
  33. package/dist/bridge/template-preview.mjs +173 -0
  34. package/dist/bridge/template-subdomain-gallery.js +6 -2
  35. package/dist/bridge/template-subdomain-gallery.mjs +6 -2
  36. package/dist/bridge/template-subdomain-link.js +6 -1
  37. package/dist/bridge/template-subdomain-link.mjs +6 -1
  38. package/dist/bridge/template-subdomain.js +20 -15
  39. package/dist/bridge/template-subdomain.mjs +20 -15
  40. package/dist/dashboard/accordion.js +74 -39
  41. package/dist/dashboard/accordion.mjs +74 -39
  42. package/dist/dashboard/avatar.js +109 -3
  43. package/dist/dashboard/avatar.mjs +106 -4
  44. package/dist/dashboard/buttons-subscription.js +384 -0
  45. package/dist/dashboard/buttons-subscription.mjs +349 -0
  46. package/dist/dashboard/card-campaign-switch.js +277 -0
  47. package/dist/dashboard/card-campaign-switch.mjs +243 -0
  48. package/dist/dashboard/card-order.js +231 -29
  49. package/dist/dashboard/card-order.mjs +231 -29
  50. package/dist/dashboard/card-section.js +26 -2
  51. package/dist/dashboard/card-section.mjs +26 -2
  52. package/dist/dashboard/card-tile.js +6 -7
  53. package/dist/dashboard/card-tile.mjs +6 -7
  54. package/dist/dashboard/connection-workflows.js +205 -0
  55. package/dist/dashboard/connection-workflows.mjs +171 -0
  56. package/dist/dashboard/device.js +95 -0
  57. package/dist/dashboard/device.mjs +72 -0
  58. package/dist/dashboard/form-admin-campaign.js +19 -50
  59. package/dist/dashboard/form-admin-campaign.mjs +20 -51
  60. package/dist/dashboard/form-ai.js +9 -6
  61. package/dist/dashboard/form-ai.mjs +9 -6
  62. package/dist/dashboard/form-auth.js +35 -25
  63. package/dist/dashboard/form-auth.mjs +36 -26
  64. package/dist/dashboard/form-file.js +10 -1
  65. package/dist/dashboard/form-file.mjs +10 -1
  66. package/dist/dashboard/form-filters-analytics.js +14 -1
  67. package/dist/dashboard/form-filters-analytics.mjs +15 -2
  68. package/dist/dashboard/form-organization-campaign-advertisement.js +15 -1
  69. package/dist/dashboard/form-organization-campaign-advertisement.mjs +16 -2
  70. package/dist/dashboard/form-organization-campaign-agreement.js +215 -164
  71. package/dist/dashboard/form-organization-campaign-agreement.mjs +215 -164
  72. package/dist/dashboard/form-organization-campaign-field-email.js +0 -34
  73. package/dist/dashboard/form-organization-campaign-field-email.mjs +0 -34
  74. package/dist/dashboard/form-organization-campaign-field-list.js +466 -0
  75. package/dist/dashboard/form-organization-campaign-field-list.mjs +437 -0
  76. package/dist/dashboard/form-organization-campaign-field-phone.js +0 -34
  77. package/dist/dashboard/form-organization-campaign-field-phone.mjs +0 -34
  78. package/dist/dashboard/form-organization-campaign-field-remove.js +66 -0
  79. package/dist/dashboard/form-organization-campaign-field-remove.mjs +33 -0
  80. package/dist/dashboard/form-organization-campaign-field-select.js +51 -5
  81. package/dist/dashboard/form-organization-campaign-field-select.mjs +51 -5
  82. package/dist/dashboard/form-organization-campaign-field-textarea.js +46 -8
  83. package/dist/dashboard/form-organization-campaign-field-textarea.mjs +46 -8
  84. package/dist/dashboard/form-organization-campaign-integration-age.js +6 -12
  85. package/dist/dashboard/form-organization-campaign-integration-age.mjs +6 -12
  86. package/dist/dashboard/form-organization-campaign-integration-enable.js +52 -24
  87. package/dist/dashboard/form-organization-campaign-integration-enable.mjs +54 -26
  88. package/dist/dashboard/form-organization-campaign-integration-geocode.js +6 -12
  89. package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +6 -12
  90. package/dist/dashboard/form-organization-campaign-integration-gtm.js +6 -12
  91. package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +6 -12
  92. package/dist/dashboard/form-organization-campaign-link.js +7 -1
  93. package/dist/dashboard/form-organization-campaign-link.mjs +7 -1
  94. package/dist/dashboard/form-organization-campaign-mission.js +291 -0
  95. package/dist/dashboard/form-organization-campaign-mission.mjs +258 -0
  96. package/dist/dashboard/form-organization-campaign-page-embed.js +13 -2
  97. package/dist/dashboard/form-organization-campaign-page-embed.mjs +12 -1
  98. package/dist/dashboard/form-organization-campaign-page.js +20 -11
  99. package/dist/dashboard/form-organization-campaign-page.mjs +20 -11
  100. package/dist/dashboard/form-organization-campaign-prize-edit.js +12 -1
  101. package/dist/dashboard/form-organization-campaign-prize-edit.mjs +12 -1
  102. package/dist/dashboard/form-organization-campaign-section.js +243 -0
  103. package/dist/dashboard/form-organization-campaign-section.mjs +214 -0
  104. package/dist/dashboard/form-organization-campaign.js +114 -469
  105. package/dist/dashboard/form-organization-campaign.mjs +113 -467
  106. package/dist/dashboard/form-organization-export.js +4 -7
  107. package/dist/dashboard/form-organization-export.mjs +4 -7
  108. package/dist/dashboard/form-organization-identity.js +46 -51
  109. package/dist/dashboard/form-organization-identity.mjs +46 -51
  110. package/dist/dashboard/form-organization-workflow.js +708 -687
  111. package/dist/dashboard/form-organization-workflow.mjs +704 -683
  112. package/dist/dashboard/form-organization.js +82 -110
  113. package/dist/dashboard/form-organization.mjs +81 -109
  114. package/dist/dashboard/form-otc.js +4 -5
  115. package/dist/dashboard/form-otc.mjs +4 -5
  116. package/dist/dashboard/form-payment-methods.js +20 -9
  117. package/dist/dashboard/form-payment-methods.mjs +20 -9
  118. package/dist/dashboard/form-stripe.js +30 -0
  119. package/dist/dashboard/form-stripe.mjs +26 -0
  120. package/dist/dashboard/input-array.js +4 -2
  121. package/dist/dashboard/input-array.mjs +4 -2
  122. package/dist/dashboard/input-combobox.js +7 -3
  123. package/dist/dashboard/input-combobox.mjs +7 -3
  124. package/dist/dashboard/input-date.js +7 -0
  125. package/dist/dashboard/input-date.mjs +7 -0
  126. package/dist/dashboard/input-fields.js +80 -20
  127. package/dist/dashboard/input-fields.mjs +80 -20
  128. package/dist/dashboard/input-file.js +21 -1
  129. package/dist/dashboard/input-file.mjs +21 -1
  130. package/dist/dashboard/input-font.js +10 -1
  131. package/dist/dashboard/input-font.mjs +10 -1
  132. package/dist/dashboard/lib/item-list.js +57 -0
  133. package/dist/dashboard/lib/item-list.mjs +33 -0
  134. package/dist/dashboard/lib/menu.js +50 -0
  135. package/dist/dashboard/lib/menu.mjs +26 -0
  136. package/dist/dashboard/locked.js +82 -0
  137. package/dist/dashboard/locked.mjs +53 -0
  138. package/dist/dashboard/menu.js +72 -19
  139. package/dist/dashboard/menu.mjs +72 -19
  140. package/dist/dashboard/note-ai.js +69 -0
  141. package/dist/dashboard/note-ai.mjs +36 -0
  142. package/dist/dashboard/preview.js +419 -0
  143. package/dist/dashboard/preview.mjs +384 -0
  144. package/dist/dashboard/steps.js +39 -13
  145. package/dist/dashboard/steps.mjs +37 -12
  146. package/dist/dashboard/table-contacts.js +136 -0
  147. package/dist/dashboard/table-contacts.mjs +103 -0
  148. package/dist/dashboard/template-not-found.js +4 -2
  149. package/dist/dashboard/template-not-found.mjs +4 -2
  150. package/dist/dashboard/template-socket.js +20 -7
  151. package/dist/dashboard/template-socket.mjs +20 -7
  152. package/dist/icons/desktop.js +46 -0
  153. package/dist/icons/desktop.mjs +27 -0
  154. package/dist/icons/phone.js +46 -0
  155. package/dist/icons/phone.mjs +27 -0
  156. package/dist/icons/puzzle-piece.js +46 -0
  157. package/dist/icons/puzzle-piece.mjs +27 -0
  158. package/dist/icons/tablet.js +46 -0
  159. package/dist/icons/tablet.mjs +27 -0
  160. package/dist/icons/users.js +46 -0
  161. package/dist/icons/users.mjs +27 -0
  162. package/dist/input-checkbox.js +1 -0
  163. package/dist/input-checkbox.mjs +1 -0
  164. package/dist/input-code.js +83 -0
  165. package/dist/input-code.mjs +50 -0
  166. package/dist/input-text.js +2 -1
  167. package/dist/input-text.mjs +2 -1
  168. package/dist/shared/button.js +1 -1
  169. package/dist/shared/button.mjs +1 -1
  170. package/dist/shared/input-checkbox-list.js +0 -1
  171. package/dist/shared/input-checkbox-list.mjs +0 -1
  172. package/dist/shared/input-switch.js +6 -1
  173. package/dist/shared/input-switch.mjs +6 -1
  174. package/dist/shared/lib/campaign.js +123 -0
  175. package/dist/shared/lib/campaign.mjs +96 -0
  176. package/dist/shared/lib/helpers.js +14 -2
  177. package/dist/shared/lib/helpers.mjs +13 -2
  178. package/package.json +133 -13
  179. package/types/bridge/form-subdomain-header.d.ts +2 -0
  180. package/types/bridge/form-subdomain-missions.d.ts +38 -0
  181. package/types/bridge/form-subdomain.d.ts +23 -1
  182. package/types/bridge/lib/entry.d.ts +26 -0
  183. package/types/bridge/lib/location.d.ts +13 -0
  184. package/types/bridge/lib/order.d.ts +30 -0
  185. package/types/bridge/lib/url.d.ts +19 -0
  186. package/types/bridge/template-modal.d.ts +1 -1
  187. package/types/bridge/template-preview.d.ts +10 -0
  188. package/types/bridge/template-subdomain-link.d.ts +2 -0
  189. package/types/dashboard/accordion.d.ts +2 -0
  190. package/types/dashboard/avatar.d.ts +18 -2
  191. package/types/dashboard/buttons-subscription.d.ts +22 -0
  192. package/types/dashboard/card-campaign-switch.d.ts +32 -0
  193. package/types/dashboard/card-order.d.ts +25 -1
  194. package/types/dashboard/card-section.d.ts +2 -0
  195. package/types/dashboard/connection-workflows.d.ts +33 -0
  196. package/types/dashboard/device.d.ts +12 -0
  197. package/types/dashboard/form-admin-campaign.d.ts +3 -2
  198. package/types/dashboard/form-ai.d.ts +2 -2
  199. package/types/dashboard/form-organization-campaign-agreement.d.ts +18 -12
  200. package/types/dashboard/form-organization-campaign-field-email.d.ts +1 -2
  201. package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
  202. package/types/dashboard/form-organization-campaign-field-phone.d.ts +1 -2
  203. package/types/dashboard/form-organization-campaign-field-remove.d.ts +22 -0
  204. package/types/dashboard/form-organization-campaign-field-select.d.ts +2 -1
  205. package/types/dashboard/form-organization-campaign-field-textarea.d.ts +2 -1
  206. package/types/dashboard/form-organization-campaign-integration-age.d.ts +3 -3
  207. package/types/dashboard/form-organization-campaign-integration-enable.d.ts +3 -3
  208. package/types/dashboard/form-organization-campaign-mission.d.ts +40 -0
  209. package/types/dashboard/form-organization-campaign-section.d.ts +29 -0
  210. package/types/dashboard/form-organization-campaign.d.ts +27 -17
  211. package/types/dashboard/form-organization-identity.d.ts +2 -0
  212. package/types/dashboard/form-organization-workflow.d.ts +56 -47
  213. package/types/dashboard/form-organization.d.ts +7 -2
  214. package/types/dashboard/form-stripe.d.ts +3 -0
  215. package/types/dashboard/input-combobox.d.ts +2 -0
  216. package/types/dashboard/input-date.d.ts +2 -0
  217. package/types/dashboard/input-fields.d.ts +3 -2
  218. package/types/dashboard/input-file.d.ts +4 -0
  219. package/types/dashboard/lib/item-list.d.ts +14 -0
  220. package/types/dashboard/lib/menu.d.ts +17 -0
  221. package/types/dashboard/locked.d.ts +10 -0
  222. package/types/dashboard/menu.d.ts +10 -2
  223. package/types/dashboard/note-ai.d.ts +15 -0
  224. package/types/dashboard/preview.d.ts +33 -0
  225. package/types/dashboard/steps.d.ts +19 -4
  226. package/types/dashboard/table-cell-title.d.ts +2 -2
  227. package/types/dashboard/table-contacts.d.ts +2 -0
  228. package/types/icons/desktop.d.ts +5 -0
  229. package/types/icons/phone.d.ts +5 -0
  230. package/types/icons/puzzle-piece.d.ts +5 -0
  231. package/types/icons/tablet.d.ts +5 -0
  232. package/types/icons/users.d.ts +5 -0
  233. package/types/input-code.d.ts +23 -0
  234. package/types/shared/input-switch.d.ts +2 -0
  235. package/types/shared/lib/campaign.d.ts +35 -0
  236. package/types/shared/lib/helpers.d.ts +3 -0
  237. package/dist/dashboard/card-integration.js +0 -187
  238. package/dist/dashboard/card-integration.mjs +0 -158
  239. package/dist/dashboard/iframe.js +0 -159
  240. package/dist/dashboard/iframe.mjs +0 -130
  241. package/types/dashboard/card-integration.d.ts +0 -24
  242. package/types/dashboard/iframe.d.ts +0 -18
@@ -39,10 +39,12 @@ var import_link = __toESM(require("next/link"));
39
39
  var import_template_subdomain_gallery = __toESM(require("./template-subdomain-gallery"));
40
40
  var import_template_subdomain_link = __toESM(require("./template-subdomain-link"));
41
41
  var import_url = require("./lib/url");
42
+ var import_entry = require("./lib/entry");
42
43
  var import_countdown = __toESM(require("./countdown"));
43
44
  var import_form_subdomain_shop = __toESM(require("./form-subdomain-shop"));
44
45
  var import_image = __toESM(require("next/image"));
45
46
  var import_subdomain_content = __toESM(require("./subdomain-content"));
47
+ var import_helpers = require("../shared/lib/helpers");
46
48
  const TemplateSubdomain = ({
47
49
  buttons,
48
50
  cart,
@@ -56,7 +58,7 @@ const TemplateSubdomain = ({
56
58
  style,
57
59
  tracking
58
60
  }) => {
59
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
61
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
60
62
  const [scrollProgress, setScrollProgress] = (0, import_react.useState)(0);
61
63
  (0, import_react.useEffect)(() => {
62
64
  let ticking = false;
@@ -76,6 +78,7 @@ const TemplateSubdomain = ({
76
78
  return () => window.removeEventListener("scroll", onScroll);
77
79
  }, []);
78
80
  const gallery = (data == null ? void 0 : data.gallery) || [];
81
+ const countdown = (0, import_entry.giveawayOn)(data) ? data == null ? void 0 : data.countdown : null;
79
82
  const logo = (_a = data == null ? void 0 : data.images) == null ? void 0 : _a.logo;
80
83
  const opacity = (_d = (_c = (_b = style == null ? void 0 : style.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) == null ? void 0 : _d.replace(")", ",.9)");
81
84
  const controlPaddingTop = 56 - 32 * scrollProgress;
@@ -161,7 +164,7 @@ const TemplateSubdomain = ({
161
164
  import_image.default,
162
165
  {
163
166
  ...{
164
- alt: data.headline + " - logo - " + (logo == null ? void 0 : logo.filename),
167
+ alt: (0, import_helpers.imageAlt)(logo, (_k = data == null ? void 0 : data.descriptions) == null ? void 0 : _k.logo),
165
168
  className: "object-cover object-center rounded-full overflow-hidden ml-1 lg:ml-0",
166
169
  fill: true,
167
170
  priority: true,
@@ -180,7 +183,7 @@ const TemplateSubdomain = ({
180
183
  className: "flex items-center space-x-2 z-30"
181
184
  },
182
185
  children: [
183
- ((_k = data == null ? void 0 : data.products) == null ? void 0 : _k.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
186
+ ((_l = data == null ? void 0 : data.products) == null ? void 0 : _l.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
184
187
  buttons.menu
185
188
  ]
186
189
  }
@@ -195,7 +198,8 @@ const TemplateSubdomain = ({
195
198
  import_template_subdomain_gallery.default,
196
199
  {
197
200
  ...{
198
- compact: ((_m = data == null ? void 0 : data.links) == null ? void 0 : _m.length) > 0 || ((_n = data == null ? void 0 : data.products) == null ? void 0 : _n.length) > 0,
201
+ compact: ((_n = data == null ? void 0 : data.links) == null ? void 0 : _n.length) > 0 || ((_o = data == null ? void 0 : data.products) == null ? void 0 : _o.length) > 0,
202
+ descriptions: (_p = data == null ? void 0 : data.descriptions) == null ? void 0 : _p.gallery,
199
203
  gallery,
200
204
  modal,
201
205
  preview,
@@ -252,7 +256,7 @@ const TemplateSubdomain = ({
252
256
  children: data.description
253
257
  }
254
258
  ) }),
255
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
259
+ buttons.enter && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
256
260
  "div",
257
261
  {
258
262
  ...{
@@ -262,15 +266,15 @@ const TemplateSubdomain = ({
262
266
  children: buttons.enter
263
267
  }
264
268
  ),
265
- data.countdown && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
269
+ countdown && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
266
270
  import_countdown.default,
267
271
  {
268
272
  ...{
269
273
  className: "h-4 mt-1.5",
270
- date: data.countdown
274
+ date: countdown
271
275
  }
272
276
  },
273
- data.countdown
277
+ countdown
274
278
  ),
275
279
  !((_d2 = data == null ? void 0 : data.links) == null ? void 0 : _d2.length) && !((_e2 = data == null ? void 0 : data.products) == null ? void 0 : _e2.length) && buttons.brandingCompact
276
280
  ]
@@ -308,26 +312,27 @@ const TemplateSubdomain = ({
308
312
  {
309
313
  ...{
310
314
  action: buttons.enter,
311
- countdown: (data == null ? void 0 : data.countdown) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
315
+ countdown: countdown ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
312
316
  import_countdown.default,
313
317
  {
314
318
  ...{
315
319
  className: "h-4 mt-4",
316
- date: data.countdown
320
+ date: countdown
317
321
  }
318
322
  },
319
- data.countdown
323
+ countdown
320
324
  ) : null,
321
325
  data,
322
326
  fonts,
323
327
  gallery,
324
- linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ file, icon, slug, title, url }, key) => {
325
- var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o, _p, _q, _r;
328
+ linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ descriptions, file, icon, slug, title, url }, key) => {
329
+ var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p2, _q, _r;
326
330
  return (0, import_url.safeHref)(url) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
327
331
  import_template_subdomain_link.default,
328
332
  {
329
333
  ...{
330
334
  className: "w-full rounded-lg pl-1 pr-4 py-1",
335
+ description: descriptions == null ? void 0 : descriptions.asset,
331
336
  disabled: iframe,
332
337
  element: import_link.default,
333
338
  href: (0, import_url.safeHref)(url),
@@ -358,7 +363,7 @@ const TemplateSubdomain = ({
358
363
  backgroundColor: ((_e3 = (_d3 = (_c3 = style == null ? void 0 : style.button) == null ? void 0 : _c3.background) == null ? void 0 : _d3.color) == null ? void 0 : _e3.rgb) || ((_g3 = (_f3 = style == null ? void 0 : style.text) == null ? void 0 : _f3.color) == null ? void 0 : _g3.rgb),
359
364
  borderColor: ((_j3 = (_i3 = (_h3 = style == null ? void 0 : style.button) == null ? void 0 : _h3.background) == null ? void 0 : _i3.color) == null ? void 0 : _j3.rgb) || ((_l3 = (_k3 = style == null ? void 0 : style.text) == null ? void 0 : _k3.color) == null ? void 0 : _l3.rgb),
360
365
  borderRadius: ((_m3 = style == null ? void 0 : style.button) == null ? void 0 : _m3.radius) != null ? style.button.radius / 4 + "px" : void 0,
361
- color: ((_p = (_o = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o.color) == null ? void 0 : _p.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
366
+ color: ((_p2 = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p2.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
362
367
  }
363
368
  },
364
369
  target: "_blank",
@@ -420,7 +425,7 @@ const TemplateSubdomain = ({
420
425
  ] });
421
426
  }
422
427
  },
423
- (_l = data == null ? void 0 : data.gallery) == null ? void 0 : _l.map((item) => item.id).join(",")
428
+ (_m = data == null ? void 0 : data.gallery) == null ? void 0 : _m.map((item) => item.id).join(",")
424
429
  )
425
430
  ]
426
431
  }
@@ -7,10 +7,12 @@ import Link from "next/link";
7
7
  import TemplateSubdomainGallery from "./template-subdomain-gallery.mjs";
8
8
  import TemplateSubdomainLink from "./template-subdomain-link.mjs";
9
9
  import { safeHref } from "./lib/url.mjs";
10
+ import { giveawayOn } from "./lib/entry.mjs";
10
11
  import Countdown from "./countdown.mjs";
11
12
  import FormSubdomainShop from "./form-subdomain-shop.mjs";
12
13
  import Image from "next/image";
13
14
  import SubdomainContent from "./subdomain-content.mjs";
15
+ import { imageAlt } from "../shared/lib/helpers.mjs";
14
16
  const TemplateSubdomain = ({
15
17
  buttons,
16
18
  cart,
@@ -24,7 +26,7 @@ const TemplateSubdomain = ({
24
26
  style,
25
27
  tracking
26
28
  }) => {
27
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
28
30
  const [scrollProgress, setScrollProgress] = useState(0);
29
31
  useEffect(() => {
30
32
  let ticking = false;
@@ -44,6 +46,7 @@ const TemplateSubdomain = ({
44
46
  return () => window.removeEventListener("scroll", onScroll);
45
47
  }, []);
46
48
  const gallery = (data == null ? void 0 : data.gallery) || [];
49
+ const countdown = giveawayOn(data) ? data == null ? void 0 : data.countdown : null;
47
50
  const logo = (_a = data == null ? void 0 : data.images) == null ? void 0 : _a.logo;
48
51
  const opacity = (_d = (_c = (_b = style == null ? void 0 : style.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) == null ? void 0 : _d.replace(")", ",.9)");
49
52
  const controlPaddingTop = 56 - 32 * scrollProgress;
@@ -129,7 +132,7 @@ const TemplateSubdomain = ({
129
132
  Image,
130
133
  {
131
134
  ...{
132
- alt: data.headline + " - logo - " + (logo == null ? void 0 : logo.filename),
135
+ alt: imageAlt(logo, (_k = data == null ? void 0 : data.descriptions) == null ? void 0 : _k.logo),
133
136
  className: "object-cover object-center rounded-full overflow-hidden ml-1 lg:ml-0",
134
137
  fill: true,
135
138
  priority: true,
@@ -148,7 +151,7 @@ const TemplateSubdomain = ({
148
151
  className: "flex items-center space-x-2 z-30"
149
152
  },
150
153
  children: [
151
- ((_k = data == null ? void 0 : data.products) == null ? void 0 : _k.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
154
+ ((_l = data == null ? void 0 : data.products) == null ? void 0 : _l.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
152
155
  buttons.menu
153
156
  ]
154
157
  }
@@ -163,7 +166,8 @@ const TemplateSubdomain = ({
163
166
  TemplateSubdomainGallery,
164
167
  {
165
168
  ...{
166
- compact: ((_m = data == null ? void 0 : data.links) == null ? void 0 : _m.length) > 0 || ((_n = data == null ? void 0 : data.products) == null ? void 0 : _n.length) > 0,
169
+ compact: ((_n = data == null ? void 0 : data.links) == null ? void 0 : _n.length) > 0 || ((_o = data == null ? void 0 : data.products) == null ? void 0 : _o.length) > 0,
170
+ descriptions: (_p = data == null ? void 0 : data.descriptions) == null ? void 0 : _p.gallery,
167
171
  gallery,
168
172
  modal,
169
173
  preview,
@@ -220,7 +224,7 @@ const TemplateSubdomain = ({
220
224
  children: data.description
221
225
  }
222
226
  ) }),
223
- /* @__PURE__ */ jsx(
227
+ buttons.enter && /* @__PURE__ */ jsx(
224
228
  "div",
225
229
  {
226
230
  ...{
@@ -230,15 +234,15 @@ const TemplateSubdomain = ({
230
234
  children: buttons.enter
231
235
  }
232
236
  ),
233
- data.countdown && /* @__PURE__ */ jsx(
237
+ countdown && /* @__PURE__ */ jsx(
234
238
  Countdown,
235
239
  {
236
240
  ...{
237
241
  className: "h-4 mt-1.5",
238
- date: data.countdown
242
+ date: countdown
239
243
  }
240
244
  },
241
- data.countdown
245
+ countdown
242
246
  ),
243
247
  !((_d2 = data == null ? void 0 : data.links) == null ? void 0 : _d2.length) && !((_e2 = data == null ? void 0 : data.products) == null ? void 0 : _e2.length) && buttons.brandingCompact
244
248
  ]
@@ -276,26 +280,27 @@ const TemplateSubdomain = ({
276
280
  {
277
281
  ...{
278
282
  action: buttons.enter,
279
- countdown: (data == null ? void 0 : data.countdown) ? /* @__PURE__ */ jsx(
283
+ countdown: countdown ? /* @__PURE__ */ jsx(
280
284
  Countdown,
281
285
  {
282
286
  ...{
283
287
  className: "h-4 mt-4",
284
- date: data.countdown
288
+ date: countdown
285
289
  }
286
290
  },
287
- data.countdown
291
+ countdown
288
292
  ) : null,
289
293
  data,
290
294
  fonts,
291
295
  gallery,
292
- linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ file, icon, slug, title, url }, key) => {
293
- var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o, _p, _q, _r;
296
+ linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ descriptions, file, icon, slug, title, url }, key) => {
297
+ var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p2, _q, _r;
294
298
  return safeHref(url) && /* @__PURE__ */ jsx(
295
299
  TemplateSubdomainLink,
296
300
  {
297
301
  ...{
298
302
  className: "w-full rounded-lg pl-1 pr-4 py-1",
303
+ description: descriptions == null ? void 0 : descriptions.asset,
299
304
  disabled: iframe,
300
305
  element: Link,
301
306
  href: safeHref(url),
@@ -326,7 +331,7 @@ const TemplateSubdomain = ({
326
331
  backgroundColor: ((_e3 = (_d3 = (_c3 = style == null ? void 0 : style.button) == null ? void 0 : _c3.background) == null ? void 0 : _d3.color) == null ? void 0 : _e3.rgb) || ((_g3 = (_f3 = style == null ? void 0 : style.text) == null ? void 0 : _f3.color) == null ? void 0 : _g3.rgb),
327
332
  borderColor: ((_j3 = (_i3 = (_h3 = style == null ? void 0 : style.button) == null ? void 0 : _h3.background) == null ? void 0 : _i3.color) == null ? void 0 : _j3.rgb) || ((_l3 = (_k3 = style == null ? void 0 : style.text) == null ? void 0 : _k3.color) == null ? void 0 : _l3.rgb),
328
333
  borderRadius: ((_m3 = style == null ? void 0 : style.button) == null ? void 0 : _m3.radius) != null ? style.button.radius / 4 + "px" : void 0,
329
- color: ((_p = (_o = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o.color) == null ? void 0 : _p.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
334
+ color: ((_p2 = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p2.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
330
335
  }
331
336
  },
332
337
  target: "_blank",
@@ -388,7 +393,7 @@ const TemplateSubdomain = ({
388
393
  ] });
389
394
  }
390
395
  },
391
- (_l = data == null ? void 0 : data.gallery) == null ? void 0 : _l.map((item) => item.id).join(",")
396
+ (_m = data == null ? void 0 : data.gallery) == null ? void 0 : _m.map((item) => item.id).join(",")
392
397
  )
393
398
  ]
394
399
  }
@@ -38,6 +38,7 @@ var import_chevron_down = __toESM(require("../icons/chevron-down"));
38
38
  var import_chevron_up = __toESM(require("../icons/chevron-up"));
39
39
  var import_warning = __toESM(require("../icons/warning"));
40
40
  const Accordion = ({
41
+ active,
41
42
  badge,
42
43
  className,
43
44
  classNameIcon = "w-5 h-5",
@@ -59,6 +60,78 @@ const Accordion = ({
59
60
  classes.container.push(className);
60
61
  }
61
62
  ;
63
+ const header = (open2) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
64
+ "span",
65
+ {
66
+ ...{
67
+ className: "flex items-center justify-between w-full text-left" + (inset ? " p-3" : "")
68
+ },
69
+ children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: title }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
72
+ "span",
73
+ {
74
+ ...{
75
+ className: "flex items-center space-x-3"
76
+ },
77
+ children: [
78
+ badge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
79
+ import_badge.default,
80
+ {
81
+ ...(badge == null ? void 0 : badge.type) && {
82
+ type: badge.type
83
+ },
84
+ children: badge == null ? void 0 : badge.text
85
+ }
86
+ ),
87
+ error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ import_warning.default,
89
+ {
90
+ ...{
91
+ className: classNameIcon + " text-red-dark"
92
+ }
93
+ }
94
+ ),
95
+ open2 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgClose, { className: classNameIcon }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgOpen, { className: classNameIcon })
96
+ ]
97
+ }
98
+ )
99
+ ]
100
+ }
101
+ );
102
+ if (active !== void 0) {
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
104
+ "div",
105
+ {
106
+ ...{
107
+ className: classes.container.join(" ")
108
+ },
109
+ children: [
110
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
111
+ import_button.default,
112
+ {
113
+ ...{
114
+ "aria-expanded": active,
115
+ onClick: () => onClick == null ? void 0 : onClick(active),
116
+ variant: "link"
117
+ },
118
+ children: header(active)
119
+ }
120
+ ),
121
+ active && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
+ "div",
123
+ {
124
+ ...{
125
+ className: classNamePanel
126
+ },
127
+ children
128
+ }
129
+ )
130
+ ]
131
+ }
132
+ );
133
+ }
134
+ ;
62
135
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
136
  import_react.Disclosure,
64
137
  {
@@ -82,45 +155,7 @@ const Accordion = ({
82
155
  onClick: () => onClick(open2)
83
156
  }
84
157
  },
85
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
86
- "span",
87
- {
88
- ...{
89
- className: "flex items-center justify-between w-full text-left" + (inset ? " p-3" : "")
90
- },
91
- children: [
92
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: title }),
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
94
- "span",
95
- {
96
- ...{
97
- className: "flex items-center space-x-3"
98
- },
99
- children: [
100
- badge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
101
- import_badge.default,
102
- {
103
- ...(badge == null ? void 0 : badge.type) && {
104
- type: badge.type
105
- },
106
- children: badge == null ? void 0 : badge.text
107
- }
108
- ),
109
- error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
- import_warning.default,
111
- {
112
- ...{
113
- className: classNameIcon + " text-red-dark"
114
- }
115
- }
116
- ),
117
- open2 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgClose, { className: classNameIcon }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SvgOpen, { className: classNameIcon })
118
- ]
119
- }
120
- )
121
- ]
122
- }
123
- )
158
+ children: header(open2)
124
159
  }
125
160
  ),
126
161
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -6,6 +6,7 @@ import ChevronDown from "../icons/chevron-down.mjs";
6
6
  import ChevronUp from "../icons/chevron-up.mjs";
7
7
  import Warning from "../icons/warning.mjs";
8
8
  const Accordion = ({
9
+ active,
9
10
  badge,
10
11
  className,
11
12
  classNameIcon = "w-5 h-5",
@@ -27,6 +28,78 @@ const Accordion = ({
27
28
  classes.container.push(className);
28
29
  }
29
30
  ;
31
+ const header = (open2) => /* @__PURE__ */ jsxs(
32
+ "span",
33
+ {
34
+ ...{
35
+ className: "flex items-center justify-between w-full text-left" + (inset ? " p-3" : "")
36
+ },
37
+ children: [
38
+ /* @__PURE__ */ jsx("p", { children: title }),
39
+ /* @__PURE__ */ jsxs(
40
+ "span",
41
+ {
42
+ ...{
43
+ className: "flex items-center space-x-3"
44
+ },
45
+ children: [
46
+ badge && /* @__PURE__ */ jsx(
47
+ Badge,
48
+ {
49
+ ...(badge == null ? void 0 : badge.type) && {
50
+ type: badge.type
51
+ },
52
+ children: badge == null ? void 0 : badge.text
53
+ }
54
+ ),
55
+ error && /* @__PURE__ */ jsx(
56
+ Warning,
57
+ {
58
+ ...{
59
+ className: classNameIcon + " text-red-dark"
60
+ }
61
+ }
62
+ ),
63
+ open2 ? /* @__PURE__ */ jsx(SvgClose, { className: classNameIcon }) : /* @__PURE__ */ jsx(SvgOpen, { className: classNameIcon })
64
+ ]
65
+ }
66
+ )
67
+ ]
68
+ }
69
+ );
70
+ if (active !== void 0) {
71
+ return /* @__PURE__ */ jsxs(
72
+ "div",
73
+ {
74
+ ...{
75
+ className: classes.container.join(" ")
76
+ },
77
+ children: [
78
+ /* @__PURE__ */ jsx(
79
+ Button,
80
+ {
81
+ ...{
82
+ "aria-expanded": active,
83
+ onClick: () => onClick == null ? void 0 : onClick(active),
84
+ variant: "link"
85
+ },
86
+ children: header(active)
87
+ }
88
+ ),
89
+ active && /* @__PURE__ */ jsx(
90
+ "div",
91
+ {
92
+ ...{
93
+ className: classNamePanel
94
+ },
95
+ children
96
+ }
97
+ )
98
+ ]
99
+ }
100
+ );
101
+ }
102
+ ;
30
103
  return /* @__PURE__ */ jsx(
31
104
  Disclosure,
32
105
  {
@@ -50,45 +123,7 @@ const Accordion = ({
50
123
  onClick: () => onClick(open2)
51
124
  }
52
125
  },
53
- children: /* @__PURE__ */ jsxs(
54
- "span",
55
- {
56
- ...{
57
- className: "flex items-center justify-between w-full text-left" + (inset ? " p-3" : "")
58
- },
59
- children: [
60
- /* @__PURE__ */ jsx("p", { children: title }),
61
- /* @__PURE__ */ jsxs(
62
- "span",
63
- {
64
- ...{
65
- className: "flex items-center space-x-3"
66
- },
67
- children: [
68
- badge && /* @__PURE__ */ jsx(
69
- Badge,
70
- {
71
- ...(badge == null ? void 0 : badge.type) && {
72
- type: badge.type
73
- },
74
- children: badge == null ? void 0 : badge.text
75
- }
76
- ),
77
- error && /* @__PURE__ */ jsx(
78
- Warning,
79
- {
80
- ...{
81
- className: classNameIcon + " text-red-dark"
82
- }
83
- }
84
- ),
85
- open2 ? /* @__PURE__ */ jsx(SvgClose, { className: classNameIcon }) : /* @__PURE__ */ jsx(SvgOpen, { className: classNameIcon })
86
- ]
87
- }
88
- )
89
- ]
90
- }
91
- )
126
+ children: header(open2)
92
127
  }
93
128
  ),
94
129
  /* @__PURE__ */ jsx(