@strands.gg/accui 2.11.22 → 2.11.24

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.
package/dist/index.es.js CHANGED
@@ -1456,6 +1456,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1456
1456
  step: {},
1457
1457
  autocomplete: {},
1458
1458
  spellcheck: { type: Boolean, default: true },
1459
+ hasLeadingIcon: { type: Boolean, default: false },
1460
+ hasTrailingIcon: { type: Boolean, default: false },
1459
1461
  label: {},
1460
1462
  helpText: {},
1461
1463
  modelValue: {},
@@ -1473,7 +1475,6 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1473
1475
  setup(__props, { emit: __emit }) {
1474
1476
  const props = __props;
1475
1477
  const emit = __emit;
1476
- const slots = useSlots();
1477
1478
  const showPassword = ref(false);
1478
1479
  const computedType = computed(() => {
1479
1480
  if (props.type === "password") {
@@ -1481,8 +1482,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1481
1482
  }
1482
1483
  return props.type;
1483
1484
  });
1484
- const hasTrailingIcon = computed(() => {
1485
- return slots["trailing-icon"] || props.type === "password" || props.type === "search" && props.modelValue;
1485
+ const hasTrailingIconComputed = computed(() => {
1486
+ return props.hasTrailingIcon || props.type === "password" || props.type === "search" && props.modelValue;
1486
1487
  });
1487
1488
  const buttonTabindex = computed(() => {
1488
1489
  if (props.tabindex === void 0) return;
@@ -1498,12 +1499,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1498
1499
  });
1499
1500
  const paddingClasses = computed(() => {
1500
1501
  const classes = [];
1501
- if (slots["leading-icon"]) {
1502
+ if (props.hasLeadingIcon) {
1502
1503
  classes.push("input-padding-left-icon");
1503
1504
  } else {
1504
1505
  classes.push("input-padding-left");
1505
1506
  }
1506
- if (hasTrailingIcon.value) {
1507
+ if (hasTrailingIconComputed.value) {
1507
1508
  classes.push("input-padding-right-icon");
1508
1509
  } else {
1509
1510
  classes.push("input-padding-right");
@@ -1537,7 +1538,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1537
1538
  return openBlock(), createElementBlock("div", {
1538
1539
  class: normalizeClass(["input-field-wrapper", wrapperClasses.value])
1539
1540
  }, [
1540
- _ctx.$slots["leading-icon"] ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
1541
+ props.hasLeadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
1541
1542
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
1542
1543
  ])) : createCommentVNode("", true),
1543
1544
  createElementVNode("input", {
@@ -1592,14 +1593,14 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1592
1593
  ]),
1593
1594
  _: 1
1594
1595
  }, 8, ["tabindex"])
1595
- ])) : hasTrailingIcon.value ? (openBlock(), createElementBlock("div", _hoisted_5$x, [
1596
+ ])) : props.hasTrailingIcon ? (openBlock(), createElementBlock("div", _hoisted_5$x, [
1596
1597
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
1597
1598
  ])) : createCommentVNode("", true)
1598
1599
  ], 2);
1599
1600
  };
1600
1601
  }
1601
1602
  });
1602
- const UiInputText = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-67ba177d"]]);
1603
+ const UiInputText = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-b3152b5d"]]);
1603
1604
  const _hoisted_1$M = {
1604
1605
  key: 0,
1605
1606
  class: "input-leading-icon"
@@ -1618,6 +1619,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1618
1619
  autocomplete: {},
1619
1620
  spellcheck: { type: Boolean, default: true },
1620
1621
  resizable: { type: Boolean, default: true },
1622
+ hasLeadingIcon: { type: Boolean, default: false },
1623
+ hasTrailingIcon: { type: Boolean, default: false },
1621
1624
  label: {},
1622
1625
  helpText: {},
1623
1626
  modelValue: {},
@@ -1635,7 +1638,6 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1635
1638
  setup(__props, { emit: __emit }) {
1636
1639
  const props = __props;
1637
1640
  const emit = __emit;
1638
- const slots = useSlots();
1639
1641
  const wrapperClasses = computed(() => {
1640
1642
  const classes = [];
1641
1643
  if (props.error) classes.push("input-error");
@@ -1646,12 +1648,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1646
1648
  });
1647
1649
  const paddingClasses = computed(() => {
1648
1650
  const classes = [];
1649
- if (slots["leading-icon"]) {
1651
+ if (props.hasLeadingIcon) {
1650
1652
  classes.push("input-padding-left-icon");
1651
1653
  } else {
1652
1654
  classes.push("input-padding-left");
1653
1655
  }
1654
- if (slots["trailing-icon"]) {
1656
+ if (props.hasTrailingIcon) {
1655
1657
  classes.push("input-padding-right-icon");
1656
1658
  } else {
1657
1659
  classes.push("input-padding-right");
@@ -1675,7 +1677,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1675
1677
  return openBlock(), createElementBlock("div", {
1676
1678
  class: normalizeClass(["input-field-wrapper input-textarea", wrapperClasses.value])
1677
1679
  }, [
1678
- _ctx.$slots["leading-icon"] ? (openBlock(), createElementBlock("div", _hoisted_1$M, [
1680
+ props.hasLeadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$M, [
1679
1681
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
1680
1682
  ])) : createCommentVNode("", true),
1681
1683
  createElementVNode("div", {
@@ -1703,14 +1705,14 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1703
1705
  onKeydown: handleKeydown
1704
1706
  }, null, 42, _hoisted_2$G)
1705
1707
  ], 2),
1706
- _ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_3$D, [
1708
+ props.hasTrailingIcon ? (openBlock(), createElementBlock("div", _hoisted_3$D, [
1707
1709
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
1708
1710
  ])) : createCommentVNode("", true)
1709
1711
  ], 2);
1710
1712
  };
1711
1713
  }
1712
1714
  });
1713
- const UiInputTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-b18ddba2"]]);
1715
+ const UiInputTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-4f57fd4b"]]);
1714
1716
  function useFloatingPosition(options) {
1715
1717
  const {
1716
1718
  trigger,
@@ -1961,6 +1963,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1961
1963
  maxDropdownHeight: { default: 400 },
1962
1964
  noOptionsText: { default: "No options available" },
1963
1965
  searchPlaceholder: { default: "" },
1966
+ hasLeadingIcon: { type: Boolean, default: false },
1967
+ hasTrailingIcon: { type: Boolean, default: false },
1964
1968
  label: {},
1965
1969
  helpText: {},
1966
1970
  modelValue: {},
@@ -1978,7 +1982,6 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1978
1982
  setup(__props, { emit: __emit }) {
1979
1983
  const props = __props;
1980
1984
  const emit = __emit;
1981
- const slots = useSlots();
1982
1985
  const selectTriggerRef = ref();
1983
1986
  const dropdownRef = ref();
1984
1987
  const searchInputRef = ref();
@@ -2084,12 +2087,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2084
2087
  });
2085
2088
  const paddingClasses = computed(() => {
2086
2089
  const classes = [];
2087
- if (slots["leading-icon"]) {
2090
+ if (props.hasLeadingIcon) {
2088
2091
  classes.push("input-padding-left-icon");
2089
2092
  } else {
2090
2093
  classes.push("input-padding-left");
2091
2094
  }
2092
- if (slots["trailing-icon"]) {
2095
+ if (props.hasTrailingIcon) {
2093
2096
  classes.push("input-padding-right-icon");
2094
2097
  } else {
2095
2098
  classes.push("input-padding-right");
@@ -2263,7 +2266,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2263
2266
  paddingClasses.value
2264
2267
  ]])
2265
2268
  }, [
2266
- _ctx.$slots["leading-icon"] ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
2269
+ props.hasLeadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
2267
2270
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
2268
2271
  ])) : createCommentVNode("", true),
2269
2272
  createElementVNode("div", {
@@ -2288,7 +2291,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2288
2291
  createVNode(unref(ChevronDown))
2289
2292
  ], 2)
2290
2293
  ], 42, _hoisted_2$F),
2291
- _ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_6$r, [
2294
+ props.hasTrailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6$r, [
2292
2295
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
2293
2296
  ])) : createCommentVNode("", true)
2294
2297
  ], 2),
@@ -2362,7 +2365,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2362
2365
  };
2363
2366
  }
2364
2367
  });
2365
- const UiInputSelect = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-662c22e1"]]);
2368
+ const UiInputSelect = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-302debb0"]]);
2366
2369
  const _hoisted_1$K = { class: "input-leading-icon" };
2367
2370
  const _hoisted_2$E = ["src"];
2368
2371
  const _hoisted_3$B = ["id", "accept", "multiple", "disabled", "required"];
@@ -2408,6 +2411,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2408
2411
  dragDropText: {},
2409
2412
  selectedText: {},
2410
2413
  preview: {},
2414
+ hasLeadingIcon: { type: Boolean, default: false },
2415
+ hasTrailingIcon: { type: Boolean, default: false },
2411
2416
  label: {},
2412
2417
  helpText: {},
2413
2418
  modelValue: {},
@@ -2605,7 +2610,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2605
2610
  src: previewImageUrl.value,
2606
2611
  alt: "Preview",
2607
2612
  class: "input-file-preview"
2608
- }, null, 8, _hoisted_2$E)) : _ctx.$slots["leading-icon"] ? renderSlot(_ctx.$slots, "leading-icon", { key: 1 }, void 0, true) : (openBlock(), createBlock(unref(FileInput), { key: 2 }))
2613
+ }, null, 8, _hoisted_2$E)) : props.hasLeadingIcon ? renderSlot(_ctx.$slots, "leading-icon", { key: 1 }, void 0, true) : (openBlock(), createBlock(unref(FileInput), { key: 2 }))
2609
2614
  ]),
2610
2615
  createElementVNode("div", {
2611
2616
  class: normalizeClass(["input-file-area", {
@@ -2667,14 +2672,14 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2667
2672
  }, [
2668
2673
  createVNode(unref(X))
2669
2674
  ])
2670
- ])) : _ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_18$f, [
2675
+ ])) : props.hasTrailingIcon ? (openBlock(), createElementBlock("div", _hoisted_18$f, [
2671
2676
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
2672
2677
  ])) : createCommentVNode("", true)
2673
2678
  ], 2);
2674
2679
  };
2675
2680
  }
2676
2681
  });
2677
- const UiInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-86bf65ec"]]);
2682
+ const UiInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-e1fd712d"]]);
2678
2683
  const _hoisted_1$J = { class: "tabs-wrapper" };
2679
2684
  const _hoisted_2$D = {
2680
2685
  key: 0,
@@ -25264,6 +25269,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
25264
25269
  maxLength: { default: 6 },
25265
25270
  variant: { default: "numeric" },
25266
25271
  divider: {},
25272
+ hasLeadingIcon: { type: Boolean, default: false },
25273
+ hasTrailingIcon: { type: Boolean, default: false },
25267
25274
  label: {},
25268
25275
  helpText: {},
25269
25276
  modelValue: {},
@@ -25443,7 +25450,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
25443
25450
  class: normalizeClass(["pincode-wrapper", [`pincode-size-${_ctx.size}`, { "pincode-error": _ctx.error }]])
25444
25451
  }, [
25445
25452
  createElementVNode("div", _hoisted_1$F, [
25446
- _ctx.$slots["leading-icon"] ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
25453
+ props.hasLeadingIcon ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
25447
25454
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25448
25455
  ])) : createCommentVNode("", true),
25449
25456
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.maxLength, (index) => {
@@ -25475,7 +25482,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
25475
25482
  }, dividerProps.value, { class: "pincode-custom-divider" }), null, 16)) : shouldShowDivider(index) ? (openBlock(), createElementBlock("span", _hoisted_4$w, toDisplayString(dividerCharacter.value), 1)) : createCommentVNode("", true)
25476
25483
  ], 64);
25477
25484
  }), 128)),
25478
- _ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_5$r, [
25485
+ props.hasTrailingIcon ? (openBlock(), createElementBlock("div", _hoisted_5$r, [
25479
25486
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25480
25487
  ])) : createCommentVNode("", true)
25481
25488
  ])
@@ -25483,7 +25490,19 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
25483
25490
  };
25484
25491
  }
25485
25492
  });
25486
- const UiInputPincode = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-dc5d46fa"]]);
25493
+ const UiInputPincode = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-78a9c50b"]]);
25494
+ function hasSlotContent(slots, slotName) {
25495
+ const slot = slots[slotName];
25496
+ if (!slot) return false;
25497
+ const content = slot();
25498
+ if (!content || content.length === 0) return false;
25499
+ return content.some((vnode) => {
25500
+ if (vnode.children && vnode.children !== "") return true;
25501
+ if (vnode.type && typeof vnode.type === "object") return true;
25502
+ if (vnode.props && Object.keys(vnode.props).length > 0) return true;
25503
+ return false;
25504
+ });
25505
+ }
25487
25506
  const _hoisted_1$E = ["for"];
25488
25507
  const _hoisted_2$z = {
25489
25508
  key: 0,
@@ -25510,6 +25529,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25510
25529
  step: {},
25511
25530
  autocomplete: {},
25512
25531
  spellcheck: { type: Boolean },
25532
+ hasLeadingIcon: { type: Boolean },
25533
+ hasTrailingIcon: { type: Boolean },
25513
25534
  label: {},
25514
25535
  helpText: {},
25515
25536
  modelValue: {},
@@ -25553,18 +25574,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25553
25574
  const emit = __emit;
25554
25575
  const slots = useSlots();
25555
25576
  const inputId = computed(() => `input-${Math.random().toString(36).substring(2, 11)}`);
25556
- const hasSlotContent = (slotName) => {
25557
- const slot = slots[slotName];
25558
- if (!slot) return false;
25559
- const content = slot();
25560
- if (!content || content.length === 0) return false;
25561
- return content.some((vnode) => {
25562
- if (vnode.children && vnode.children !== "") return true;
25563
- if (vnode.type && typeof vnode.type === "object") return true;
25564
- if (vnode.props && Object.keys(vnode.props).length > 0) return true;
25565
- return false;
25566
- });
25567
- };
25577
+ const hasSlotContent$1 = (slotName) => hasSlotContent(slots, slotName);
25568
25578
  const isTextInput = computed(() => {
25569
25579
  const textTypes = ["text", "email", "password", "number", "tel", "url", "search"];
25570
25580
  const inputType = props.type || "text";
@@ -25625,26 +25635,21 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25625
25635
  error: Boolean(props.error && props.error !== true && props.error !== ""),
25626
25636
  size: props.size,
25627
25637
  tabindex: _ctx.tabindex,
25638
+ "has-leading-icon": hasSlotContent$1("leading-icon"),
25639
+ "has-trailing-icon": hasSlotContent$1("trailing-icon"),
25628
25640
  "onUpdate:modelValue": handleInput,
25629
25641
  onBlur: handleBlur,
25630
25642
  onFocus: handleFocus,
25631
25643
  onKeydown: handleKeydown
25632
- }, createSlots({ _: 2 }, [
25633
- hasSlotContent("leading-icon") ? {
25634
- name: "leading-icon",
25635
- fn: withCtx(() => [
25636
- renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25637
- ]),
25638
- key: "0"
25639
- } : void 0,
25640
- hasSlotContent("trailing-icon") ? {
25641
- name: "trailing-icon",
25642
- fn: withCtx(() => [
25643
- renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25644
- ]),
25645
- key: "1"
25646
- } : void 0
25647
- ]), 1032, ["model-value", "type", "placeholder", "disabled", "readonly", "required", "min", "max", "step", "autocomplete", "spellcheck", "input-id", "error", "size", "tabindex"])) : _ctx.type === "textarea" ? (openBlock(), createBlock(UiInputTextarea, {
25644
+ }, {
25645
+ "leading-icon": withCtx(() => [
25646
+ renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25647
+ ]),
25648
+ "trailing-icon": withCtx(() => [
25649
+ renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25650
+ ]),
25651
+ _: 3
25652
+ }, 8, ["model-value", "type", "placeholder", "disabled", "readonly", "required", "min", "max", "step", "autocomplete", "spellcheck", "input-id", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : _ctx.type === "textarea" ? (openBlock(), createBlock(UiInputTextarea, {
25648
25653
  key: 1,
25649
25654
  "model-value": _ctx.modelValue,
25650
25655
  placeholder: _ctx.placeholder,
@@ -25661,26 +25666,21 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25661
25666
  error: props.error,
25662
25667
  size: props.size,
25663
25668
  tabindex: _ctx.tabindex,
25669
+ "has-leading-icon": hasSlotContent$1("leading-icon"),
25670
+ "has-trailing-icon": hasSlotContent$1("trailing-icon"),
25664
25671
  "onUpdate:modelValue": handleInput,
25665
25672
  onBlur: handleBlur,
25666
25673
  onFocus: handleFocus,
25667
25674
  onKeydown: handleKeydown
25668
- }, createSlots({ _: 2 }, [
25669
- hasSlotContent("leading-icon") ? {
25670
- name: "leading-icon",
25671
- fn: withCtx(() => [
25672
- renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25673
- ]),
25674
- key: "0"
25675
- } : void 0,
25676
- hasSlotContent("trailing-icon") ? {
25677
- name: "trailing-icon",
25678
- fn: withCtx(() => [
25679
- renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25680
- ]),
25681
- key: "1"
25682
- } : void 0
25683
- ]), 1032, ["model-value", "placeholder", "disabled", "readonly", "required", "rows", "cols", "maxlength", "autocomplete", "spellcheck", "resizable", "input-id", "error", "size", "tabindex"])) : _ctx.type === "select" ? (openBlock(), createBlock(UiInputSelect, {
25675
+ }, {
25676
+ "leading-icon": withCtx(() => [
25677
+ renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25678
+ ]),
25679
+ "trailing-icon": withCtx(() => [
25680
+ renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25681
+ ]),
25682
+ _: 3
25683
+ }, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "rows", "cols", "maxlength", "autocomplete", "spellcheck", "resizable", "input-id", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : _ctx.type === "select" ? (openBlock(), createBlock(UiInputSelect, {
25684
25684
  key: 2,
25685
25685
  "model-value": _ctx.modelValue,
25686
25686
  options: props.options,
@@ -25696,25 +25696,20 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25696
25696
  error: props.error,
25697
25697
  size: props.size,
25698
25698
  tabindex: _ctx.tabindex,
25699
+ "has-leading-icon": hasSlotContent$1("leading-icon"),
25700
+ "has-trailing-icon": hasSlotContent$1("trailing-icon"),
25699
25701
  "onUpdate:modelValue": handleInput,
25700
25702
  onBlur: handleBlur,
25701
25703
  onFocus: handleFocus
25702
- }, createSlots({ _: 2 }, [
25703
- hasSlotContent("leading-icon") ? {
25704
- name: "leading-icon",
25705
- fn: withCtx(() => [
25706
- renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25707
- ]),
25708
- key: "0"
25709
- } : void 0,
25710
- hasSlotContent("trailing-icon") ? {
25711
- name: "trailing-icon",
25712
- fn: withCtx(() => [
25713
- renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25714
- ]),
25715
- key: "1"
25716
- } : void 0
25717
- ]), 1032, ["model-value", "options", "placeholder", "disabled", "multiple", "searchable", "allow-insert", "max-dropdown-height", "no-options-text", "search-placeholder", "input-id", "error", "size", "tabindex"])) : _ctx.type === "file" ? (openBlock(), createBlock(UiInputFile, {
25704
+ }, {
25705
+ "leading-icon": withCtx(() => [
25706
+ renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25707
+ ]),
25708
+ "trailing-icon": withCtx(() => [
25709
+ renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25710
+ ]),
25711
+ _: 3
25712
+ }, 8, ["model-value", "options", "placeholder", "disabled", "multiple", "searchable", "allow-insert", "max-dropdown-height", "no-options-text", "search-placeholder", "input-id", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : _ctx.type === "file" ? (openBlock(), createBlock(UiInputFile, {
25718
25713
  key: 3,
25719
25714
  "model-value": _ctx.modelValue,
25720
25715
  accept: props.accept,
@@ -25729,27 +25724,22 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25729
25724
  error: props.error,
25730
25725
  size: props.size,
25731
25726
  tabindex: _ctx.tabindex,
25727
+ "has-leading-icon": hasSlotContent$1("leading-icon"),
25728
+ "has-trailing-icon": hasSlotContent$1("trailing-icon"),
25732
25729
  "onUpdate:modelValue": handleInput,
25733
25730
  onFileError: handleFileError,
25734
25731
  onClearPreview: handleClearPreview,
25735
25732
  onBlur: handleBlur,
25736
25733
  onFocus: handleFocus
25737
- }, createSlots({ _: 2 }, [
25738
- hasSlotContent("leading-icon") ? {
25739
- name: "leading-icon",
25740
- fn: withCtx(() => [
25741
- renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25742
- ]),
25743
- key: "0"
25744
- } : void 0,
25745
- hasSlotContent("trailing-icon") ? {
25746
- name: "trailing-icon",
25747
- fn: withCtx(() => [
25748
- renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25749
- ]),
25750
- key: "1"
25751
- } : void 0
25752
- ]), 1032, ["model-value", "accept", "multiple", "max-file-size", "drag-drop-text", "selected-text", "preview", "disabled", "required", "input-id", "error", "size", "tabindex"])) : _ctx.type === "date" ? (openBlock(), createBlock(_sfc_main$M, {
25734
+ }, {
25735
+ "leading-icon": withCtx(() => [
25736
+ renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25737
+ ]),
25738
+ "trailing-icon": withCtx(() => [
25739
+ renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
25740
+ ]),
25741
+ _: 3
25742
+ }, 8, ["model-value", "accept", "multiple", "max-file-size", "drag-drop-text", "selected-text", "preview", "disabled", "required", "input-id", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : _ctx.type === "date" ? (openBlock(), createBlock(_sfc_main$M, {
25753
25743
  key: 4,
25754
25744
  "model-value": _ctx.modelValue,
25755
25745
  placeholder: _ctx.placeholder,
@@ -25826,14 +25816,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25826
25816
  onFocus: handleFocus,
25827
25817
  onComplete: handlePincodeComplete
25828
25818
  }, createSlots({ _: 2 }, [
25829
- hasSlotContent("leading-icon") ? {
25819
+ hasSlotContent$1("leading-icon") ? {
25830
25820
  name: "leading-icon",
25831
25821
  fn: withCtx(() => [
25832
25822
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25833
25823
  ]),
25834
25824
  key: "0"
25835
25825
  } : void 0,
25836
- hasSlotContent("trailing-icon") ? {
25826
+ hasSlotContent$1("trailing-icon") ? {
25837
25827
  name: "trailing-icon",
25838
25828
  fn: withCtx(() => [
25839
25829
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
@@ -25850,7 +25840,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25850
25840
  };
25851
25841
  }
25852
25842
  });
25853
- const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-6486063c"]]);
25843
+ const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-96984fc3"]]);
25854
25844
  const _hoisted_1$D = ["disabled", "aria-disabled"];
25855
25845
  const _hoisted_2$y = ["href", "target", "rel", "aria-disabled"];
25856
25846
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
@@ -0,0 +1,9 @@
1
+ import type { Slots } from 'vue';
2
+ /**
3
+ * Check if a slot has actual content (not just empty/whitespace)
4
+ *
5
+ * @param slots - Vue slots object from useSlots()
6
+ * @param slotName - Name of the slot to check
7
+ * @returns true if slot has content, false otherwise
8
+ */
9
+ export declare function hasSlotContent(slots: Slots, slotName: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.11.22",
3
+ "version": "2.11.24",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",