@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.
@@ -3596,6 +3596,7 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
3596
3596
  else
3597
3597
  return transformedBlock;
3598
3598
  }
3599
+ const camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
3599
3600
  function throttle(func, wait, options = {}) {
3600
3601
  let context;
3601
3602
  let args;
@@ -3642,7 +3643,6 @@ function assign(target, ..._args) {
3642
3643
  }
3643
3644
  return to;
3644
3645
  }
3645
- const camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
3646
3646
  function bindAnimations(animations) {
3647
3647
  for (const animation of animations)
3648
3648
  switch (animation.trigger) {
@@ -3693,7 +3693,7 @@ function triggerAnimation(animation) {
3693
3693
  element.style.transitionDelay = "0";
3694
3694
  assign(element.style, animation.steps[0].styles);
3695
3695
  setTimeout(() => {
3696
- element.style.transition = `all ${animation.duration}s ${camelCaseToKebabCase(animation.easing)}`;
3696
+ element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
3697
3697
  if (animation.delay)
3698
3698
  element.style.transitionDelay = animation.delay + "s";
3699
3699
  assign(element.style, animation.steps[1].styles);
@@ -3751,7 +3751,7 @@ function bindScrollInViewAnimation(animation) {
3751
3751
  }
3752
3752
  attachDefaultState();
3753
3753
  setTimeout(() => {
3754
- element.style.transition = `all ${animation.duration}s ${camelCaseToKebabCase(animation.easing)}`;
3754
+ element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
3755
3755
  if (animation.delay)
3756
3756
  element.style.transitionDelay = animation.delay + "s";
3757
3757
  });
@@ -3762,7 +3762,6 @@ function bindScrollInViewAnimation(animation) {
3762
3762
  immediateOnScroll();
3763
3763
  });
3764
3764
  }
3765
- const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
3766
3765
  const convertStyleMapToCSSArray = (style) => {
3767
3766
  const cssProps = Object.entries(style).map(([key, value]) => {
3768
3767
  if (typeof value === "string")
@@ -3866,7 +3865,8 @@ const shouldPassLinkComponent = (block) => {
3866
3865
  "Symbol",
3867
3866
  "Columns",
3868
3867
  "Form:Form",
3869
- "Builder: Tabs"
3868
+ "Builder: Tabs",
3869
+ "Builder:Accordion"
3870
3870
  ].includes(block.name));
3871
3871
  };
3872
3872
  const shouldPassRegisteredComponents = (block) => {
@@ -3874,7 +3874,8 @@ const shouldPassRegisteredComponents = (block) => {
3874
3874
  "Symbol",
3875
3875
  "Columns",
3876
3876
  "Form:Form",
3877
- "Builder: Tabs"
3877
+ "Builder: Tabs",
3878
+ "Builder:Accordion"
3878
3879
  ].includes(block.name));
3879
3880
  };
3880
3881
  const SIZES = {
@@ -3992,7 +3993,7 @@ const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
3992
3993
  className: `${className}:hover`,
3993
3994
  styles: {
3994
3995
  ...hoverStyles,
3995
- transition: `all ${hoverAnimation.duration}s ${camelCaseToKebabCase(hoverAnimation.easing)}`,
3996
+ transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
3996
3997
  transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
3997
3998
  }
3998
3999
  }) || "";
@@ -4583,7 +4584,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4583
4584
  }, 1, "jN_4") : null
4584
4585
  }, 1, "jN_5");
4585
4586
  }, "Block_component_nnPv0RY0U0k"));
4586
- const onClick$1 = function onClick2(props, state, className) {
4587
+ const onClick$3 = function onClick2(props, state, className) {
4587
4588
  var _a, _b;
4588
4589
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
4589
4590
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -4630,7 +4631,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
4630
4631
  },
4631
4632
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
4632
4633
  const [className2, props2, state2] = useLexicalScope();
4633
- return onClick$1(props2);
4634
+ return onClick$3(props2);
4634
4635
  }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
4635
4636
  className,
4636
4637
  props,
@@ -4638,7 +4639,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
4638
4639
  ]),
4639
4640
  onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
4640
4641
  const [className2, props2, state2] = useLexicalScope();
4641
- return onClick$1(props2);
4642
+ return onClick$3(props2);
4642
4643
  }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
4643
4644
  className,
4644
4645
  props,
@@ -5313,7 +5314,7 @@ const handleABTesting = async ({ item, canTrack }) => {
5313
5314
  };
5314
5315
  };
5315
5316
  const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
5316
- const componentInfo$g = {
5317
+ const componentInfo$h = {
5317
5318
  name: "Core:Button",
5318
5319
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
5319
5320
  defaultStyles: {
@@ -5351,7 +5352,7 @@ const componentInfo$g = {
5351
5352
  static: true,
5352
5353
  noWrap: true
5353
5354
  };
5354
- const componentInfo$f = {
5355
+ const componentInfo$g = {
5355
5356
  // TODO: ways to statically preprocess JSON for references, functions, etc
5356
5357
  name: "Columns",
5357
5358
  isRSC: true,
@@ -5593,14 +5594,14 @@ const componentInfo$f = {
5593
5594
  }
5594
5595
  ]
5595
5596
  };
5596
- const componentInfo$e = {
5597
+ const componentInfo$f = {
5597
5598
  name: "Fragment",
5598
5599
  static: true,
5599
5600
  hidden: true,
5600
5601
  canHaveChildren: true,
5601
5602
  noWrap: true
5602
5603
  };
5603
- const componentInfo$d = {
5604
+ const componentInfo$e = {
5604
5605
  name: "Image",
5605
5606
  static: true,
5606
5607
  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",
@@ -5748,7 +5749,7 @@ const componentInfo$d = {
5748
5749
  }
5749
5750
  ]
5750
5751
  };
5751
- const componentInfo$c = {
5752
+ const componentInfo$d = {
5752
5753
  name: "Core:Section",
5753
5754
  static: true,
5754
5755
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -5793,7 +5794,7 @@ const componentInfo$c = {
5793
5794
  }
5794
5795
  ]
5795
5796
  };
5796
- const componentInfo$b = {
5797
+ const componentInfo$c = {
5797
5798
  name: "Slot",
5798
5799
  isRSC: true,
5799
5800
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -5848,7 +5849,7 @@ const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
5848
5849
  }
5849
5850
  }, 0, "B1_1");
5850
5851
  }, "Slot_component_WWgWgfV0bb0"));
5851
- const componentInfo$a = {
5852
+ const componentInfo$b = {
5852
5853
  name: "Symbol",
5853
5854
  noWrap: true,
5854
5855
  static: true,
@@ -5928,7 +5929,7 @@ const defaultElement = {
5928
5929
  }
5929
5930
  }
5930
5931
  };
5931
- const componentInfo$9 = {
5932
+ const componentInfo$a = {
5932
5933
  name: "Builder: Tabs",
5933
5934
  inputs: [
5934
5935
  {
@@ -6059,8 +6060,11 @@ const componentInfo$9 = {
6059
6060
  const activeTabContent = function activeTabContent2(props, state, active) {
6060
6061
  return props.tabs && props.tabs[active].content;
6061
6062
  };
6062
- const getActiveTabStyle = function getActiveTabStyle2(props, state, index) {
6063
- return state.activeTab === index ? props.activeTabStyle : {};
6063
+ const onClick$2 = function onClick22(props, state, index) {
6064
+ if (index === state.activeTab && props.collapsible)
6065
+ state.activeTab = -1;
6066
+ else
6067
+ state.activeTab = index;
6064
6068
  };
6065
6069
  const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
6066
6070
  _jsxBranch();
@@ -6083,16 +6087,15 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
6083
6087
  class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
6084
6088
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
6085
6089
  const [index2, props2, state2] = useLexicalScope();
6086
- if (index2 === state2.activeTab && props2.collapsible)
6087
- state2.activeTab = -1;
6088
- else
6089
- state2.activeTab = index2;
6090
+ return onClick$2(props2, state2, index2);
6090
6091
  }, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
6091
6092
  index,
6092
6093
  props,
6093
6094
  state
6094
6095
  ]),
6095
- style: getActiveTabStyle(props, state, index)
6096
+ style: {
6097
+ ...state.activeTab === index ? props.activeTabStyle : {}
6098
+ }
6096
6099
  }, null, /* @__PURE__ */ _jsxC(Blocks, {
6097
6100
  get parent() {
6098
6101
  return props.builderBlock.id;
@@ -6164,7 +6167,7 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
6164
6167
  }, 3, "6k_1"), 1, "6k_2") : null
6165
6168
  ], 1, "6k_3");
6166
6169
  }, "Tabs_component_MhWcxXy0lMY"));
6167
- const componentInfo$8 = {
6170
+ const componentInfo$9 = {
6168
6171
  name: "Text",
6169
6172
  static: true,
6170
6173
  isRSC: true,
@@ -6199,6 +6202,364 @@ const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
6199
6202
  }
6200
6203
  }, null, 3, "yO_0");
6201
6204
  }, "Text_component_15p0cKUxgIE"));
6205
+ const convertOrderNumberToString = (order) => {
6206
+ return order.toString();
6207
+ };
6208
+ const getAccordionTitleClassName = function getAccordionTitleClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
6209
+ return `builder-accordion-title builder-accordion-title-${state.open.includes(index) ? "open" : "closed"}`;
6210
+ };
6211
+ const getAccordionDetailClassName = function getAccordionDetailClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
6212
+ return `builder-accordion-detail builder-accordion-detail-${state.open.includes(index) ? "open" : "closed"}`;
6213
+ };
6214
+ const onClick$1 = function onClick23(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
6215
+ if (state.open.includes(index))
6216
+ state.open = onlyOneAtATime.value ? [] : state.open.filter((item) => item !== index);
6217
+ else
6218
+ state.open = onlyOneAtATime.value ? [
6219
+ index
6220
+ ] : state.open.concat(index);
6221
+ };
6222
+ const Accordion = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
6223
+ const state = useStore({
6224
+ open: []
6225
+ });
6226
+ const onlyOneAtATime = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
6227
+ const [props2] = useLexicalScope();
6228
+ return Boolean(props2.grid || props2.oneAtATime);
6229
+ }, "Accordion_component_onlyOneAtATime_useComputed_QYD7IoPU2HY", [
6230
+ props
6231
+ ]));
6232
+ const accordionStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
6233
+ const [props2] = useLexicalScope();
6234
+ const styles = {
6235
+ display: "flex",
6236
+ alignItems: "stretch",
6237
+ flexDirection: "column",
6238
+ ...props2.grid && {
6239
+ flexDirection: "row",
6240
+ alignItems: "flex-start",
6241
+ flexWrap: "wrap"
6242
+ }
6243
+ };
6244
+ return styles;
6245
+ }, "Accordion_component_accordionStyles_useComputed_Jrd0cwGn25U", [
6246
+ props
6247
+ ]));
6248
+ const accordionTitleStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
6249
+ const shared = {
6250
+ display: "flex",
6251
+ flexDirection: "column"
6252
+ };
6253
+ const styles = {
6254
+ ...shared,
6255
+ alignItems: "stretch",
6256
+ cursor: "pointer"
6257
+ };
6258
+ return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
6259
+ }, "Accordion_component_accordionTitleStyles_useComputed_FopdBMH0V6U"));
6260
+ const openGridItemOrder = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
6261
+ const [props2, state2] = useLexicalScope();
6262
+ let itemOrder = null;
6263
+ const getOpenGridItemPosition = props2.grid && state2.open.length;
6264
+ if (getOpenGridItemPosition && document) {
6265
+ const openItemIndex = state2.open[0];
6266
+ const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
6267
+ let subjectItem = openItem;
6268
+ itemOrder = openItemIndex;
6269
+ if (subjectItem) {
6270
+ let prevItemRect = subjectItem.getBoundingClientRect();
6271
+ while (subjectItem = subjectItem && subjectItem.nextElementSibling)
6272
+ if (subjectItem) {
6273
+ if (subjectItem.classList.contains("builder-accordion-detail"))
6274
+ continue;
6275
+ const subjectItemRect = subjectItem.getBoundingClientRect();
6276
+ if (subjectItemRect.left > prevItemRect.left) {
6277
+ const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
6278
+ if (!isNaN(index)) {
6279
+ prevItemRect = subjectItemRect;
6280
+ itemOrder = index;
6281
+ }
6282
+ } else
6283
+ break;
6284
+ }
6285
+ }
6286
+ }
6287
+ if (typeof itemOrder === "number")
6288
+ itemOrder = itemOrder + 1;
6289
+ return itemOrder;
6290
+ }, "Accordion_component_openGridItemOrder_useComputed_cCQY1Vnxll0", [
6291
+ props,
6292
+ state
6293
+ ]));
6294
+ const accordionDetailStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
6295
+ const [openGridItemOrder2, props2] = useLexicalScope();
6296
+ const styles = {
6297
+ order: typeof openGridItemOrder2.value === "number" ? openGridItemOrder2.value : void 0,
6298
+ ...props2.grid && {
6299
+ width: "100%"
6300
+ }
6301
+ };
6302
+ return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
6303
+ }, "Accordion_component_accordionDetailStyles_useComputed_S0QmQzGJoRo", [
6304
+ openGridItemOrder,
6305
+ props
6306
+ ]));
6307
+ return /* @__PURE__ */ _jsxQ("div", null, {
6308
+ class: "builder-accordion",
6309
+ style: _fnSignal((p0) => p0.value, [
6310
+ accordionStyles
6311
+ ], "p0.value")
6312
+ }, (props.items || []).map((item, index) => {
6313
+ _jsxBranch();
6314
+ return /* @__PURE__ */ _jsxC(Fragment$1, {
6315
+ children: [
6316
+ /* @__PURE__ */ _jsxQ("div", {
6317
+ class: getAccordionTitleClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index),
6318
+ "data-index": index,
6319
+ onClick$: /* @__PURE__ */ inlinedQrl((event) => {
6320
+ const [accordionDetailStyles2, accordionStyles2, accordionTitleStyles2, index2, onlyOneAtATime2, openGridItemOrder2, props2, state2] = useLexicalScope();
6321
+ return onClick$1(props2, state2, onlyOneAtATime2, accordionStyles2, accordionTitleStyles2, openGridItemOrder2, accordionDetailStyles2, index2);
6322
+ }, "Accordion_component_div_Fragment_div_onClick_VtzhhJnK0XI", [
6323
+ accordionDetailStyles,
6324
+ accordionStyles,
6325
+ accordionTitleStyles,
6326
+ index,
6327
+ onlyOneAtATime,
6328
+ openGridItemOrder,
6329
+ props,
6330
+ state
6331
+ ]),
6332
+ style: {
6333
+ ...accordionTitleStyles.value,
6334
+ width: props.grid ? props.gridRowWidth : void 0,
6335
+ order: openGridItemOrder.value !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
6336
+ }
6337
+ }, null, /* @__PURE__ */ _jsxC(Blocks, {
6338
+ get blocks() {
6339
+ return item.title;
6340
+ },
6341
+ path: `items.${index}.title`,
6342
+ get parent() {
6343
+ return props.builderBlock.id;
6344
+ },
6345
+ get context() {
6346
+ return props.builderContext;
6347
+ },
6348
+ get registeredComponents() {
6349
+ return props.builderComponents;
6350
+ },
6351
+ get linkComponent() {
6352
+ return props.builderLinkComponent;
6353
+ },
6354
+ [_IMMUTABLE]: {
6355
+ blocks: _wrapProp(item, "title"),
6356
+ context: _fnSignal((p0) => p0.builderContext, [
6357
+ props
6358
+ ], "p0.builderContext"),
6359
+ linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
6360
+ props
6361
+ ], "p0.builderLinkComponent"),
6362
+ parent: _fnSignal((p0) => p0.builderBlock.id, [
6363
+ props
6364
+ ], "p0.builderBlock.id"),
6365
+ registeredComponents: _fnSignal((p0) => p0.builderComponents, [
6366
+ props
6367
+ ], "p0.builderComponents")
6368
+ }
6369
+ }, 3, "hf_0"), 0, null),
6370
+ state.open.includes(index) ? /* @__PURE__ */ _jsxQ("div", {
6371
+ class: getAccordionDetailClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index)
6372
+ }, {
6373
+ style: _fnSignal((p0) => p0.value, [
6374
+ accordionDetailStyles
6375
+ ], "p0.value")
6376
+ }, /* @__PURE__ */ _jsxC(Blocks, {
6377
+ get blocks() {
6378
+ return item.detail;
6379
+ },
6380
+ path: `items.${index}.detail`,
6381
+ get parent() {
6382
+ return props.builderBlock.id;
6383
+ },
6384
+ get context() {
6385
+ return props.builderContext;
6386
+ },
6387
+ get registeredComponents() {
6388
+ return props.builderComponents;
6389
+ },
6390
+ get linkComponent() {
6391
+ return props.builderLinkComponent;
6392
+ },
6393
+ [_IMMUTABLE]: {
6394
+ blocks: _wrapProp(item, "detail"),
6395
+ context: _fnSignal((p0) => p0.builderContext, [
6396
+ props
6397
+ ], "p0.builderContext"),
6398
+ linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
6399
+ props
6400
+ ], "p0.builderLinkComponent"),
6401
+ parent: _fnSignal((p0) => p0.builderBlock.id, [
6402
+ props
6403
+ ], "p0.builderBlock.id"),
6404
+ registeredComponents: _fnSignal((p0) => p0.builderComponents, [
6405
+ props
6406
+ ], "p0.builderComponents")
6407
+ }
6408
+ }, 3, "hf_1"), 1, "hf_2") : null
6409
+ ]
6410
+ }, 1, "hf_3");
6411
+ }), 1, "hf_4");
6412
+ }, "Accordion_component_jkuUCHm0nt0"));
6413
+ const defaultTitle = {
6414
+ "@type": "@builder.io/sdk:Element",
6415
+ layerName: "Accordion item title",
6416
+ responsiveStyles: {
6417
+ large: {
6418
+ marginTop: "10px",
6419
+ position: "relative",
6420
+ display: "flex",
6421
+ alignItems: "stretch",
6422
+ flexDirection: "column",
6423
+ paddingBottom: "10px"
6424
+ }
6425
+ },
6426
+ children: [
6427
+ {
6428
+ "@type": "@builder.io/sdk:Element",
6429
+ responsiveStyles: {
6430
+ large: {
6431
+ textAlign: "left",
6432
+ display: "flex",
6433
+ flexDirection: "column"
6434
+ }
6435
+ },
6436
+ component: {
6437
+ name: "Text",
6438
+ options: {
6439
+ text: "I am an accordion title. Click me!"
6440
+ }
6441
+ }
6442
+ }
6443
+ ]
6444
+ };
6445
+ const defaultDetail = {
6446
+ "@type": "@builder.io/sdk:Element",
6447
+ layerName: "Accordion item detail",
6448
+ responsiveStyles: {
6449
+ large: {
6450
+ position: "relative",
6451
+ display: "flex",
6452
+ alignItems: "stretch",
6453
+ flexDirection: "column",
6454
+ marginTop: "10px",
6455
+ paddingBottom: "10px"
6456
+ }
6457
+ },
6458
+ children: [
6459
+ {
6460
+ "@type": "@builder.io/sdk:Element",
6461
+ responsiveStyles: {
6462
+ large: {
6463
+ paddingTop: "50px",
6464
+ textAlign: "left",
6465
+ display: "flex",
6466
+ flexDirection: "column",
6467
+ paddingBottom: "50px"
6468
+ }
6469
+ },
6470
+ component: {
6471
+ name: "Text",
6472
+ options: {
6473
+ text: "I am an accordion detail, hello!"
6474
+ }
6475
+ }
6476
+ }
6477
+ ]
6478
+ };
6479
+ const componentInfo$8 = {
6480
+ name: "Builder:Accordion",
6481
+ canHaveChildren: true,
6482
+ image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
6483
+ defaultStyles: {
6484
+ display: "flex",
6485
+ flexDirection: "column",
6486
+ alignItems: "stretch"
6487
+ },
6488
+ inputs: [
6489
+ {
6490
+ name: "items",
6491
+ type: "list",
6492
+ broadcast: true,
6493
+ subFields: [
6494
+ {
6495
+ name: "title",
6496
+ type: "uiBlocks",
6497
+ hideFromUI: true,
6498
+ defaultValue: [
6499
+ defaultTitle
6500
+ ]
6501
+ },
6502
+ {
6503
+ name: "detail",
6504
+ type: "uiBlocks",
6505
+ hideFromUI: true,
6506
+ defaultValue: [
6507
+ defaultDetail
6508
+ ]
6509
+ }
6510
+ ],
6511
+ defaultValue: [
6512
+ {
6513
+ title: [
6514
+ defaultTitle
6515
+ ],
6516
+ detail: [
6517
+ defaultDetail
6518
+ ]
6519
+ },
6520
+ {
6521
+ title: [
6522
+ defaultTitle
6523
+ ],
6524
+ detail: [
6525
+ defaultDetail
6526
+ ]
6527
+ }
6528
+ ],
6529
+ showIf: (options) => !options.get("useChildrenForItems")
6530
+ },
6531
+ {
6532
+ name: "oneAtATime",
6533
+ helperText: "Only allow opening one at a time (collapse all others when new item openned)",
6534
+ type: "boolean",
6535
+ defaultValue: false
6536
+ },
6537
+ {
6538
+ name: "grid",
6539
+ helperText: "Display as a grid",
6540
+ type: "boolean",
6541
+ defaultValue: false
6542
+ },
6543
+ {
6544
+ name: "gridRowWidth",
6545
+ helperText: "Display as a grid",
6546
+ type: "string",
6547
+ showIf: (options) => options.get("grid"),
6548
+ defaultValue: "25%"
6549
+ },
6550
+ {
6551
+ name: "useChildrenForItems",
6552
+ type: "boolean",
6553
+ helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
6554
+ advanced: true,
6555
+ defaultValue: false,
6556
+ onChange: (options) => {
6557
+ if (options.get("useChildrenForItems") === true)
6558
+ options.set("items", []);
6559
+ }
6560
+ }
6561
+ ]
6562
+ };
6202
6563
  const componentInfo$7 = {
6203
6564
  name: "Custom Code",
6204
6565
  static: true,
@@ -7443,40 +7804,44 @@ const getExtraComponents = () => [
7443
7804
  const getDefaultRegisteredComponents = () => [
7444
7805
  {
7445
7806
  component: Button,
7446
- ...componentInfo$g
7807
+ ...componentInfo$h
7447
7808
  },
7448
7809
  {
7449
7810
  component: Columns,
7450
- ...componentInfo$f
7811
+ ...componentInfo$g
7451
7812
  },
7452
7813
  {
7453
7814
  component: FragmentComponent,
7454
- ...componentInfo$e
7815
+ ...componentInfo$f
7455
7816
  },
7456
7817
  {
7457
7818
  component: Image,
7458
- ...componentInfo$d
7819
+ ...componentInfo$e
7459
7820
  },
7460
7821
  {
7461
7822
  component: SectionComponent,
7462
- ...componentInfo$c
7823
+ ...componentInfo$d
7463
7824
  },
7464
7825
  {
7465
7826
  component: Slot,
7466
- ...componentInfo$b
7827
+ ...componentInfo$c
7467
7828
  },
7468
7829
  {
7469
7830
  component: Symbol$1,
7470
- ...componentInfo$a
7831
+ ...componentInfo$b
7471
7832
  },
7472
7833
  {
7473
7834
  component: Text,
7474
- ...componentInfo$8
7835
+ ...componentInfo$9
7475
7836
  },
7476
7837
  ...[
7477
7838
  {
7478
7839
  component: Tabs,
7479
- ...componentInfo$9
7840
+ ...componentInfo$a
7841
+ },
7842
+ {
7843
+ component: Accordion,
7844
+ ...componentInfo$8
7480
7845
  }
7481
7846
  ],
7482
7847
  ...getExtraComponents()
@@ -7935,7 +8300,7 @@ function isFromTrustedHost(trustedHosts, e) {
7935
8300
  const url = new URL(e.origin), hostname = url.hostname;
7936
8301
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
7937
8302
  }
7938
- const SDK_VERSION = "0.14.21";
8303
+ const SDK_VERSION = "0.14.22";
7939
8304
  const registry = {};
7940
8305
  function register(type, info) {
7941
8306
  let typeList = registry[type];
@@ -8256,7 +8621,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps,
8256
8621
  enableCache: false
8257
8622
  });
8258
8623
  };
8259
- const onClick = function onClick22(props, state, showContentProps, elementRef, event) {
8624
+ const onClick = function onClick24(props, state, showContentProps, elementRef, event) {
8260
8625
  var _a, _b;
8261
8626
  if (props.builderContextSignal.content) {
8262
8627
  const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
@@ -8415,7 +8780,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8415
8780
  useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
8416
8781
  const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8417
8782
  if (!props2.apiKey)
8418
- logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
8783
+ logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
8419
8784
  evaluateJsCode(props2);
8420
8785
  runHttpRequests(props2, state2, showContentProps2, elementRef2);
8421
8786
  emitStateUpdate(props2);