@strands.gg/accui 2.11.21 → 2.11.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.
package/dist/index.es.js CHANGED
@@ -25551,7 +25551,20 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25551
25551
  setup(__props, { emit: __emit }) {
25552
25552
  const props = __props;
25553
25553
  const emit = __emit;
25554
+ const slots = useSlots();
25554
25555
  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
+ };
25555
25568
  const isTextInput = computed(() => {
25556
25569
  const textTypes = ["text", "email", "password", "number", "tel", "url", "search"];
25557
25570
  const inputType = props.type || "text";
@@ -25617,14 +25630,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25617
25630
  onFocus: handleFocus,
25618
25631
  onKeydown: handleKeydown
25619
25632
  }, createSlots({ _: 2 }, [
25620
- _ctx.$slots["leading-icon"] ? {
25633
+ hasSlotContent("leading-icon") ? {
25621
25634
  name: "leading-icon",
25622
25635
  fn: withCtx(() => [
25623
25636
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25624
25637
  ]),
25625
25638
  key: "0"
25626
25639
  } : void 0,
25627
- _ctx.$slots["trailing-icon"] ? {
25640
+ hasSlotContent("trailing-icon") ? {
25628
25641
  name: "trailing-icon",
25629
25642
  fn: withCtx(() => [
25630
25643
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
@@ -25653,14 +25666,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25653
25666
  onFocus: handleFocus,
25654
25667
  onKeydown: handleKeydown
25655
25668
  }, createSlots({ _: 2 }, [
25656
- _ctx.$slots["leading-icon"] ? {
25669
+ hasSlotContent("leading-icon") ? {
25657
25670
  name: "leading-icon",
25658
25671
  fn: withCtx(() => [
25659
25672
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25660
25673
  ]),
25661
25674
  key: "0"
25662
25675
  } : void 0,
25663
- _ctx.$slots["trailing-icon"] ? {
25676
+ hasSlotContent("trailing-icon") ? {
25664
25677
  name: "trailing-icon",
25665
25678
  fn: withCtx(() => [
25666
25679
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
@@ -25687,14 +25700,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25687
25700
  onBlur: handleBlur,
25688
25701
  onFocus: handleFocus
25689
25702
  }, createSlots({ _: 2 }, [
25690
- _ctx.$slots["leading-icon"] ? {
25703
+ hasSlotContent("leading-icon") ? {
25691
25704
  name: "leading-icon",
25692
25705
  fn: withCtx(() => [
25693
25706
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25694
25707
  ]),
25695
25708
  key: "0"
25696
25709
  } : void 0,
25697
- _ctx.$slots["trailing-icon"] ? {
25710
+ hasSlotContent("trailing-icon") ? {
25698
25711
  name: "trailing-icon",
25699
25712
  fn: withCtx(() => [
25700
25713
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
@@ -25722,14 +25735,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25722
25735
  onBlur: handleBlur,
25723
25736
  onFocus: handleFocus
25724
25737
  }, createSlots({ _: 2 }, [
25725
- _ctx.$slots["leading-icon"] ? {
25738
+ hasSlotContent("leading-icon") ? {
25726
25739
  name: "leading-icon",
25727
25740
  fn: withCtx(() => [
25728
25741
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25729
25742
  ]),
25730
25743
  key: "0"
25731
25744
  } : void 0,
25732
- _ctx.$slots["trailing-icon"] ? {
25745
+ hasSlotContent("trailing-icon") ? {
25733
25746
  name: "trailing-icon",
25734
25747
  fn: withCtx(() => [
25735
25748
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
@@ -25813,14 +25826,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25813
25826
  onFocus: handleFocus,
25814
25827
  onComplete: handlePincodeComplete
25815
25828
  }, createSlots({ _: 2 }, [
25816
- _ctx.$slots["leading-icon"] ? {
25829
+ hasSlotContent("leading-icon") ? {
25817
25830
  name: "leading-icon",
25818
25831
  fn: withCtx(() => [
25819
25832
  renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true)
25820
25833
  ]),
25821
25834
  key: "0"
25822
25835
  } : void 0,
25823
- _ctx.$slots["trailing-icon"] ? {
25836
+ hasSlotContent("trailing-icon") ? {
25824
25837
  name: "trailing-icon",
25825
25838
  fn: withCtx(() => [
25826
25839
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
@@ -25837,7 +25850,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
25837
25850
  };
25838
25851
  }
25839
25852
  });
25840
- const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-a9c816f5"]]);
25853
+ const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-6486063c"]]);
25841
25854
  const _hoisted_1$D = ["disabled", "aria-disabled"];
25842
25855
  const _hoisted_2$y = ["href", "target", "rel", "aria-disabled"];
25843
25856
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.11.21",
3
+ "version": "2.11.22",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",