@builder.io/sdk-qwik 0.14.21 → 0.14.22

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.
@@ -499,6 +499,7 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
499
499
  else
500
500
  return transformedBlock;
501
501
  }
502
+ const camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
502
503
  function throttle(func, wait, options = {}) {
503
504
  let context;
504
505
  let args;
@@ -545,7 +546,6 @@ function assign(target, ..._args) {
545
546
  }
546
547
  return to;
547
548
  }
548
- const camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
549
549
  function bindAnimations(animations) {
550
550
  for (const animation of animations)
551
551
  switch (animation.trigger) {
@@ -596,7 +596,7 @@ function triggerAnimation(animation) {
596
596
  element.style.transitionDelay = "0";
597
597
  assign(element.style, animation.steps[0].styles);
598
598
  setTimeout(() => {
599
- element.style.transition = `all ${animation.duration}s ${camelCaseToKebabCase(animation.easing)}`;
599
+ element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
600
600
  if (animation.delay)
601
601
  element.style.transitionDelay = animation.delay + "s";
602
602
  assign(element.style, animation.steps[1].styles);
@@ -654,7 +654,7 @@ function bindScrollInViewAnimation(animation) {
654
654
  }
655
655
  attachDefaultState();
656
656
  setTimeout(() => {
657
- element.style.transition = `all ${animation.duration}s ${camelCaseToKebabCase(animation.easing)}`;
657
+ element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
658
658
  if (animation.delay)
659
659
  element.style.transitionDelay = animation.delay + "s";
660
660
  });
@@ -665,7 +665,6 @@ function bindScrollInViewAnimation(animation) {
665
665
  immediateOnScroll();
666
666
  });
667
667
  }
668
- const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
669
668
  const convertStyleMapToCSSArray = (style) => {
670
669
  const cssProps = Object.entries(style).map(([key, value]) => {
671
670
  if (typeof value === "string")
@@ -769,7 +768,8 @@ const shouldPassLinkComponent = (block) => {
769
768
  "Symbol",
770
769
  "Columns",
771
770
  "Form:Form",
772
- "Builder: Tabs"
771
+ "Builder: Tabs",
772
+ "Builder:Accordion"
773
773
  ].includes(block.name));
774
774
  };
775
775
  const shouldPassRegisteredComponents = (block) => {
@@ -777,7 +777,8 @@ const shouldPassRegisteredComponents = (block) => {
777
777
  "Symbol",
778
778
  "Columns",
779
779
  "Form:Form",
780
- "Builder: Tabs"
780
+ "Builder: Tabs",
781
+ "Builder:Accordion"
781
782
  ].includes(block.name));
782
783
  };
783
784
  const SIZES = {
@@ -895,7 +896,7 @@ const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
895
896
  className: `${className}:hover`,
896
897
  styles: {
897
898
  ...hoverStyles,
898
- transition: `all ${hoverAnimation.duration}s ${camelCaseToKebabCase(hoverAnimation.easing)}`,
899
+ transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
899
900
  transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
900
901
  }
901
902
  }) || "";
@@ -1486,7 +1487,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1486
1487
  }, 1, "jN_4") : null
1487
1488
  }, 1, "jN_5");
1488
1489
  }, "Block_component_nnPv0RY0U0k"));
1489
- const onClick$1 = function onClick2(props, state, className) {
1490
+ const onClick$3 = function onClick2(props, state, className) {
1490
1491
  var _a, _b;
1491
1492
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
1492
1493
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -1533,7 +1534,7 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
1533
1534
  },
1534
1535
  onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1535
1536
  const [className2, props2, state2] = qwik.useLexicalScope();
1536
- return onClick$1(props2);
1537
+ return onClick$3(props2);
1537
1538
  }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
1538
1539
  className,
1539
1540
  props,
@@ -1541,7 +1542,7 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
1541
1542
  ]),
1542
1543
  onKeyPress$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1543
1544
  const [className2, props2, state2] = qwik.useLexicalScope();
1544
- return onClick$1(props2);
1545
+ return onClick$3(props2);
1545
1546
  }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
1546
1547
  className,
1547
1548
  props,
@@ -2216,7 +2217,7 @@ const handleABTesting = async ({ item, canTrack }) => {
2216
2217
  };
2217
2218
  };
2218
2219
  const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
2219
- const componentInfo$g = {
2220
+ const componentInfo$h = {
2220
2221
  name: "Core:Button",
2221
2222
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
2222
2223
  defaultStyles: {
@@ -2254,7 +2255,7 @@ const componentInfo$g = {
2254
2255
  static: true,
2255
2256
  noWrap: true
2256
2257
  };
2257
- const componentInfo$f = {
2258
+ const componentInfo$g = {
2258
2259
  // TODO: ways to statically preprocess JSON for references, functions, etc
2259
2260
  name: "Columns",
2260
2261
  isRSC: true,
@@ -2496,14 +2497,14 @@ const componentInfo$f = {
2496
2497
  }
2497
2498
  ]
2498
2499
  };
2499
- const componentInfo$e = {
2500
+ const componentInfo$f = {
2500
2501
  name: "Fragment",
2501
2502
  static: true,
2502
2503
  hidden: true,
2503
2504
  canHaveChildren: true,
2504
2505
  noWrap: true
2505
2506
  };
2506
- const componentInfo$d = {
2507
+ const componentInfo$e = {
2507
2508
  name: "Image",
2508
2509
  static: true,
2509
2510
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -2651,7 +2652,7 @@ const componentInfo$d = {
2651
2652
  }
2652
2653
  ]
2653
2654
  };
2654
- const componentInfo$c = {
2655
+ const componentInfo$d = {
2655
2656
  name: "Core:Section",
2656
2657
  static: true,
2657
2658
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -2696,7 +2697,7 @@ const componentInfo$c = {
2696
2697
  }
2697
2698
  ]
2698
2699
  };
2699
- const componentInfo$b = {
2700
+ const componentInfo$c = {
2700
2701
  name: "Slot",
2701
2702
  isRSC: true,
2702
2703
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -2751,7 +2752,7 @@ const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
2751
2752
  }
2752
2753
  }, 0, "B1_1");
2753
2754
  }, "Slot_component_WWgWgfV0bb0"));
2754
- const componentInfo$a = {
2755
+ const componentInfo$b = {
2755
2756
  name: "Symbol",
2756
2757
  noWrap: true,
2757
2758
  static: true,
@@ -2831,7 +2832,7 @@ const defaultElement = {
2831
2832
  }
2832
2833
  }
2833
2834
  };
2834
- const componentInfo$9 = {
2835
+ const componentInfo$a = {
2835
2836
  name: "Builder: Tabs",
2836
2837
  inputs: [
2837
2838
  {
@@ -2962,8 +2963,11 @@ const componentInfo$9 = {
2962
2963
  const activeTabContent = function activeTabContent2(props, state, active) {
2963
2964
  return props.tabs && props.tabs[active].content;
2964
2965
  };
2965
- const getActiveTabStyle = function getActiveTabStyle2(props, state, index) {
2966
- return state.activeTab === index ? props.activeTabStyle : {};
2966
+ const onClick$2 = function onClick22(props, state, index) {
2967
+ if (index === state.activeTab && props.collapsible)
2968
+ state.activeTab = -1;
2969
+ else
2970
+ state.activeTab = index;
2967
2971
  };
2968
2972
  const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
2969
2973
  qwik._jsxBranch();
@@ -2986,16 +2990,15 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
2986
2990
  class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
2987
2991
  onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
2988
2992
  const [index2, props2, state2] = qwik.useLexicalScope();
2989
- if (index2 === state2.activeTab && props2.collapsible)
2990
- state2.activeTab = -1;
2991
- else
2992
- state2.activeTab = index2;
2993
+ return onClick$2(props2, state2, index2);
2993
2994
  }, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
2994
2995
  index,
2995
2996
  props,
2996
2997
  state
2997
2998
  ]),
2998
- style: getActiveTabStyle(props, state, index)
2999
+ style: {
3000
+ ...state.activeTab === index ? props.activeTabStyle : {}
3001
+ }
2999
3002
  }, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
3000
3003
  get parent() {
3001
3004
  return props.builderBlock.id;
@@ -3067,7 +3070,7 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
3067
3070
  }, 3, "6k_1"), 1, "6k_2") : null
3068
3071
  ], 1, "6k_3");
3069
3072
  }, "Tabs_component_MhWcxXy0lMY"));
3070
- const componentInfo$8 = {
3073
+ const componentInfo$9 = {
3071
3074
  name: "Text",
3072
3075
  static: true,
3073
3076
  isRSC: true,
@@ -3102,6 +3105,364 @@ const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
3102
3105
  }
3103
3106
  }, null, 3, "yO_0");
3104
3107
  }, "Text_component_15p0cKUxgIE"));
3108
+ const convertOrderNumberToString = (order) => {
3109
+ return order.toString();
3110
+ };
3111
+ const getAccordionTitleClassName = function getAccordionTitleClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
3112
+ return `builder-accordion-title builder-accordion-title-${state.open.includes(index) ? "open" : "closed"}`;
3113
+ };
3114
+ const getAccordionDetailClassName = function getAccordionDetailClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
3115
+ return `builder-accordion-detail builder-accordion-detail-${state.open.includes(index) ? "open" : "closed"}`;
3116
+ };
3117
+ const onClick$1 = function onClick23(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
3118
+ if (state.open.includes(index))
3119
+ state.open = onlyOneAtATime.value ? [] : state.open.filter((item) => item !== index);
3120
+ else
3121
+ state.open = onlyOneAtATime.value ? [
3122
+ index
3123
+ ] : state.open.concat(index);
3124
+ };
3125
+ const Accordion = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
3126
+ const state = qwik.useStore({
3127
+ open: []
3128
+ });
3129
+ const onlyOneAtATime = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
3130
+ const [props2] = qwik.useLexicalScope();
3131
+ return Boolean(props2.grid || props2.oneAtATime);
3132
+ }, "Accordion_component_onlyOneAtATime_useComputed_QYD7IoPU2HY", [
3133
+ props
3134
+ ]));
3135
+ const accordionStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
3136
+ const [props2] = qwik.useLexicalScope();
3137
+ const styles = {
3138
+ display: "flex",
3139
+ alignItems: "stretch",
3140
+ flexDirection: "column",
3141
+ ...props2.grid && {
3142
+ flexDirection: "row",
3143
+ alignItems: "flex-start",
3144
+ flexWrap: "wrap"
3145
+ }
3146
+ };
3147
+ return styles;
3148
+ }, "Accordion_component_accordionStyles_useComputed_Jrd0cwGn25U", [
3149
+ props
3150
+ ]));
3151
+ const accordionTitleStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
3152
+ const shared = {
3153
+ display: "flex",
3154
+ flexDirection: "column"
3155
+ };
3156
+ const styles = {
3157
+ ...shared,
3158
+ alignItems: "stretch",
3159
+ cursor: "pointer"
3160
+ };
3161
+ return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
3162
+ }, "Accordion_component_accordionTitleStyles_useComputed_FopdBMH0V6U"));
3163
+ const openGridItemOrder = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
3164
+ const [props2, state2] = qwik.useLexicalScope();
3165
+ let itemOrder = null;
3166
+ const getOpenGridItemPosition = props2.grid && state2.open.length;
3167
+ if (getOpenGridItemPosition && document) {
3168
+ const openItemIndex = state2.open[0];
3169
+ const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
3170
+ let subjectItem = openItem;
3171
+ itemOrder = openItemIndex;
3172
+ if (subjectItem) {
3173
+ let prevItemRect = subjectItem.getBoundingClientRect();
3174
+ while (subjectItem = subjectItem && subjectItem.nextElementSibling)
3175
+ if (subjectItem) {
3176
+ if (subjectItem.classList.contains("builder-accordion-detail"))
3177
+ continue;
3178
+ const subjectItemRect = subjectItem.getBoundingClientRect();
3179
+ if (subjectItemRect.left > prevItemRect.left) {
3180
+ const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
3181
+ if (!isNaN(index)) {
3182
+ prevItemRect = subjectItemRect;
3183
+ itemOrder = index;
3184
+ }
3185
+ } else
3186
+ break;
3187
+ }
3188
+ }
3189
+ }
3190
+ if (typeof itemOrder === "number")
3191
+ itemOrder = itemOrder + 1;
3192
+ return itemOrder;
3193
+ }, "Accordion_component_openGridItemOrder_useComputed_cCQY1Vnxll0", [
3194
+ props,
3195
+ state
3196
+ ]));
3197
+ const accordionDetailStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
3198
+ const [openGridItemOrder2, props2] = qwik.useLexicalScope();
3199
+ const styles = {
3200
+ order: typeof openGridItemOrder2.value === "number" ? openGridItemOrder2.value : void 0,
3201
+ ...props2.grid && {
3202
+ width: "100%"
3203
+ }
3204
+ };
3205
+ return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
3206
+ }, "Accordion_component_accordionDetailStyles_useComputed_S0QmQzGJoRo", [
3207
+ openGridItemOrder,
3208
+ props
3209
+ ]));
3210
+ return /* @__PURE__ */ qwik._jsxQ("div", null, {
3211
+ class: "builder-accordion",
3212
+ style: qwik._fnSignal((p0) => p0.value, [
3213
+ accordionStyles
3214
+ ], "p0.value")
3215
+ }, (props.items || []).map((item, index) => {
3216
+ qwik._jsxBranch();
3217
+ return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
3218
+ children: [
3219
+ /* @__PURE__ */ qwik._jsxQ("div", {
3220
+ class: getAccordionTitleClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index),
3221
+ "data-index": index,
3222
+ onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
3223
+ const [accordionDetailStyles2, accordionStyles2, accordionTitleStyles2, index2, onlyOneAtATime2, openGridItemOrder2, props2, state2] = qwik.useLexicalScope();
3224
+ return onClick$1(props2, state2, onlyOneAtATime2, accordionStyles2, accordionTitleStyles2, openGridItemOrder2, accordionDetailStyles2, index2);
3225
+ }, "Accordion_component_div_Fragment_div_onClick_VtzhhJnK0XI", [
3226
+ accordionDetailStyles,
3227
+ accordionStyles,
3228
+ accordionTitleStyles,
3229
+ index,
3230
+ onlyOneAtATime,
3231
+ openGridItemOrder,
3232
+ props,
3233
+ state
3234
+ ]),
3235
+ style: {
3236
+ ...accordionTitleStyles.value,
3237
+ width: props.grid ? props.gridRowWidth : void 0,
3238
+ order: openGridItemOrder.value !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
3239
+ }
3240
+ }, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
3241
+ get blocks() {
3242
+ return item.title;
3243
+ },
3244
+ path: `items.${index}.title`,
3245
+ get parent() {
3246
+ return props.builderBlock.id;
3247
+ },
3248
+ get context() {
3249
+ return props.builderContext;
3250
+ },
3251
+ get registeredComponents() {
3252
+ return props.builderComponents;
3253
+ },
3254
+ get linkComponent() {
3255
+ return props.builderLinkComponent;
3256
+ },
3257
+ [qwik._IMMUTABLE]: {
3258
+ blocks: qwik._wrapProp(item, "title"),
3259
+ context: qwik._fnSignal((p0) => p0.builderContext, [
3260
+ props
3261
+ ], "p0.builderContext"),
3262
+ linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
3263
+ props
3264
+ ], "p0.builderLinkComponent"),
3265
+ parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
3266
+ props
3267
+ ], "p0.builderBlock.id"),
3268
+ registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
3269
+ props
3270
+ ], "p0.builderComponents")
3271
+ }
3272
+ }, 3, "hf_0"), 0, null),
3273
+ state.open.includes(index) ? /* @__PURE__ */ qwik._jsxQ("div", {
3274
+ class: getAccordionDetailClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index)
3275
+ }, {
3276
+ style: qwik._fnSignal((p0) => p0.value, [
3277
+ accordionDetailStyles
3278
+ ], "p0.value")
3279
+ }, /* @__PURE__ */ qwik._jsxC(Blocks, {
3280
+ get blocks() {
3281
+ return item.detail;
3282
+ },
3283
+ path: `items.${index}.detail`,
3284
+ get parent() {
3285
+ return props.builderBlock.id;
3286
+ },
3287
+ get context() {
3288
+ return props.builderContext;
3289
+ },
3290
+ get registeredComponents() {
3291
+ return props.builderComponents;
3292
+ },
3293
+ get linkComponent() {
3294
+ return props.builderLinkComponent;
3295
+ },
3296
+ [qwik._IMMUTABLE]: {
3297
+ blocks: qwik._wrapProp(item, "detail"),
3298
+ context: qwik._fnSignal((p0) => p0.builderContext, [
3299
+ props
3300
+ ], "p0.builderContext"),
3301
+ linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
3302
+ props
3303
+ ], "p0.builderLinkComponent"),
3304
+ parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
3305
+ props
3306
+ ], "p0.builderBlock.id"),
3307
+ registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
3308
+ props
3309
+ ], "p0.builderComponents")
3310
+ }
3311
+ }, 3, "hf_1"), 1, "hf_2") : null
3312
+ ]
3313
+ }, 1, "hf_3");
3314
+ }), 1, "hf_4");
3315
+ }, "Accordion_component_jkuUCHm0nt0"));
3316
+ const defaultTitle = {
3317
+ "@type": "@builder.io/sdk:Element",
3318
+ layerName: "Accordion item title",
3319
+ responsiveStyles: {
3320
+ large: {
3321
+ marginTop: "10px",
3322
+ position: "relative",
3323
+ display: "flex",
3324
+ alignItems: "stretch",
3325
+ flexDirection: "column",
3326
+ paddingBottom: "10px"
3327
+ }
3328
+ },
3329
+ children: [
3330
+ {
3331
+ "@type": "@builder.io/sdk:Element",
3332
+ responsiveStyles: {
3333
+ large: {
3334
+ textAlign: "left",
3335
+ display: "flex",
3336
+ flexDirection: "column"
3337
+ }
3338
+ },
3339
+ component: {
3340
+ name: "Text",
3341
+ options: {
3342
+ text: "I am an accordion title. Click me!"
3343
+ }
3344
+ }
3345
+ }
3346
+ ]
3347
+ };
3348
+ const defaultDetail = {
3349
+ "@type": "@builder.io/sdk:Element",
3350
+ layerName: "Accordion item detail",
3351
+ responsiveStyles: {
3352
+ large: {
3353
+ position: "relative",
3354
+ display: "flex",
3355
+ alignItems: "stretch",
3356
+ flexDirection: "column",
3357
+ marginTop: "10px",
3358
+ paddingBottom: "10px"
3359
+ }
3360
+ },
3361
+ children: [
3362
+ {
3363
+ "@type": "@builder.io/sdk:Element",
3364
+ responsiveStyles: {
3365
+ large: {
3366
+ paddingTop: "50px",
3367
+ textAlign: "left",
3368
+ display: "flex",
3369
+ flexDirection: "column",
3370
+ paddingBottom: "50px"
3371
+ }
3372
+ },
3373
+ component: {
3374
+ name: "Text",
3375
+ options: {
3376
+ text: "I am an accordion detail, hello!"
3377
+ }
3378
+ }
3379
+ }
3380
+ ]
3381
+ };
3382
+ const componentInfo$8 = {
3383
+ name: "Builder:Accordion",
3384
+ canHaveChildren: true,
3385
+ image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
3386
+ defaultStyles: {
3387
+ display: "flex",
3388
+ flexDirection: "column",
3389
+ alignItems: "stretch"
3390
+ },
3391
+ inputs: [
3392
+ {
3393
+ name: "items",
3394
+ type: "list",
3395
+ broadcast: true,
3396
+ subFields: [
3397
+ {
3398
+ name: "title",
3399
+ type: "uiBlocks",
3400
+ hideFromUI: true,
3401
+ defaultValue: [
3402
+ defaultTitle
3403
+ ]
3404
+ },
3405
+ {
3406
+ name: "detail",
3407
+ type: "uiBlocks",
3408
+ hideFromUI: true,
3409
+ defaultValue: [
3410
+ defaultDetail
3411
+ ]
3412
+ }
3413
+ ],
3414
+ defaultValue: [
3415
+ {
3416
+ title: [
3417
+ defaultTitle
3418
+ ],
3419
+ detail: [
3420
+ defaultDetail
3421
+ ]
3422
+ },
3423
+ {
3424
+ title: [
3425
+ defaultTitle
3426
+ ],
3427
+ detail: [
3428
+ defaultDetail
3429
+ ]
3430
+ }
3431
+ ],
3432
+ showIf: (options) => !options.get("useChildrenForItems")
3433
+ },
3434
+ {
3435
+ name: "oneAtATime",
3436
+ helperText: "Only allow opening one at a time (collapse all others when new item openned)",
3437
+ type: "boolean",
3438
+ defaultValue: false
3439
+ },
3440
+ {
3441
+ name: "grid",
3442
+ helperText: "Display as a grid",
3443
+ type: "boolean",
3444
+ defaultValue: false
3445
+ },
3446
+ {
3447
+ name: "gridRowWidth",
3448
+ helperText: "Display as a grid",
3449
+ type: "string",
3450
+ showIf: (options) => options.get("grid"),
3451
+ defaultValue: "25%"
3452
+ },
3453
+ {
3454
+ name: "useChildrenForItems",
3455
+ type: "boolean",
3456
+ helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
3457
+ advanced: true,
3458
+ defaultValue: false,
3459
+ onChange: (options) => {
3460
+ if (options.get("useChildrenForItems") === true)
3461
+ options.set("items", []);
3462
+ }
3463
+ }
3464
+ ]
3465
+ };
3105
3466
  const componentInfo$7 = {
3106
3467
  name: "Custom Code",
3107
3468
  static: true,
@@ -4346,40 +4707,44 @@ const getExtraComponents = () => [
4346
4707
  const getDefaultRegisteredComponents = () => [
4347
4708
  {
4348
4709
  component: Button,
4349
- ...componentInfo$g
4710
+ ...componentInfo$h
4350
4711
  },
4351
4712
  {
4352
4713
  component: Columns,
4353
- ...componentInfo$f
4714
+ ...componentInfo$g
4354
4715
  },
4355
4716
  {
4356
4717
  component: FragmentComponent,
4357
- ...componentInfo$e
4718
+ ...componentInfo$f
4358
4719
  },
4359
4720
  {
4360
4721
  component: Image,
4361
- ...componentInfo$d
4722
+ ...componentInfo$e
4362
4723
  },
4363
4724
  {
4364
4725
  component: SectionComponent,
4365
- ...componentInfo$c
4726
+ ...componentInfo$d
4366
4727
  },
4367
4728
  {
4368
4729
  component: Slot,
4369
- ...componentInfo$b
4730
+ ...componentInfo$c
4370
4731
  },
4371
4732
  {
4372
4733
  component: Symbol$1,
4373
- ...componentInfo$a
4734
+ ...componentInfo$b
4374
4735
  },
4375
4736
  {
4376
4737
  component: Text,
4377
- ...componentInfo$8
4738
+ ...componentInfo$9
4378
4739
  },
4379
4740
  ...[
4380
4741
  {
4381
4742
  component: Tabs,
4382
- ...componentInfo$9
4743
+ ...componentInfo$a
4744
+ },
4745
+ {
4746
+ component: Accordion,
4747
+ ...componentInfo$8
4383
4748
  }
4384
4749
  ],
4385
4750
  ...getExtraComponents()
@@ -4838,7 +5203,7 @@ function isFromTrustedHost(trustedHosts, e) {
4838
5203
  const url = new URL(e.origin), hostname = url.hostname;
4839
5204
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4840
5205
  }
4841
- const SDK_VERSION = "0.14.21";
5206
+ const SDK_VERSION = "0.14.22";
4842
5207
  const registry = {};
4843
5208
  function register(type, info) {
4844
5209
  let typeList = registry[type];
@@ -5159,7 +5524,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps,
5159
5524
  enableCache: false
5160
5525
  });
5161
5526
  };
5162
- const onClick = function onClick22(props, state, showContentProps, elementRef, event) {
5527
+ const onClick = function onClick24(props, state, showContentProps, elementRef, event) {
5163
5528
  var _a, _b;
5164
5529
  if (props.builderContextSignal.content) {
5165
5530
  const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
@@ -5318,7 +5683,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
5318
5683
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
5319
5684
  const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
5320
5685
  if (!props2.apiKey)
5321
- logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
5686
+ logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
5322
5687
  evaluateJsCode(props2);
5323
5688
  runHttpRequests(props2, state2, showContentProps2, elementRef2);
5324
5689
  emitStateUpdate(props2);