@1337exp/taoui 1.10.1 → 1.10.3

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.d.ts CHANGED
@@ -382,8 +382,8 @@ onChange?: ((value: boolean) => any) | undefined;
382
382
  error: boolean;
383
383
  label: string;
384
384
  disabled: boolean;
385
- modelValue: boolean;
386
385
  value: boolean;
386
+ modelValue: boolean;
387
387
  indeterminate: boolean;
388
388
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
389
389
 
@@ -1722,6 +1722,7 @@ shadowBottomOnly: boolean;
1722
1722
  hover: boolean;
1723
1723
  active: boolean;
1724
1724
  overflow: boolean;
1725
+ flush: boolean;
1725
1726
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_6<__VLS_TypePropsToRuntimeProps_6<Props_4>, {
1726
1727
  padding: number;
1727
1728
  radius: number;
@@ -1730,6 +1731,7 @@ shadowBottomOnly: boolean;
1730
1731
  hover: boolean;
1731
1732
  active: boolean;
1732
1733
  overflow: boolean;
1734
+ flush: boolean;
1733
1735
  }>>> & Readonly<{}>, {
1734
1736
  padding: number | number[];
1735
1737
  radius: number;
@@ -1738,6 +1740,7 @@ hover: boolean;
1738
1740
  shadowBottomOnly: boolean;
1739
1741
  active: boolean;
1740
1742
  overflow: boolean;
1743
+ flush: boolean;
1741
1744
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1742
1745
 
1743
1746
  declare const __VLS_component_8: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_7<Props_5>, {
@@ -2445,6 +2448,7 @@ declare function __VLS_template_6(): {
2445
2448
 
2446
2449
  declare function __VLS_template_7(): {
2447
2450
  cover?(_: {}): any;
2451
+ overlay?(_: {}): any;
2448
2452
  headerTitle?(_: {}): any;
2449
2453
  header?(_: {}): any;
2450
2454
  headerSecondary?(_: {}): any;
@@ -3762,6 +3766,8 @@ declare interface Props_4 {
3762
3766
  hover?: boolean;
3763
3767
  active?: boolean;
3764
3768
  overflow?: boolean;
3769
+ /** Плитка: без отступа и без тени, cover/body тянутся на ячейку. */
3770
+ flush?: boolean;
3765
3771
  }
3766
3772
 
3767
3773
  declare interface Props_5 {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, renderSlot, computed, normalizeStyle, inject, useId, ref, unref, watch, createTextVNode, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, withModifiers, nextTick, Fragment, renderList, onMounted, provide, resolveDynamicComponent, useCssVars, useSlots, reactive, onBeforeMount, withDirectives, vModelText, getCurrentInstance, mergeProps, TransitionGroup, onUpdated, createApp } from "vue";
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, renderSlot, computed, normalizeStyle, inject, useId, ref, unref, watch, createTextVNode, useSlots, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, withModifiers, nextTick, Fragment, renderList, onMounted, provide, resolveDynamicComponent, useCssVars, reactive, onBeforeMount, withDirectives, vModelText, getCurrentInstance, mergeProps, TransitionGroup, onUpdated, createApp } from "vue";
2
2
  const _hoisted_1$P = ["type", "disabled"];
3
3
  const _hoisted_2$I = {
4
4
  key: 0,
@@ -624,26 +624,34 @@ const _hoisted_1$K = {
624
624
  };
625
625
  const _hoisted_2$D = {
626
626
  key: 0,
627
- class: "tao-card__header-title"
627
+ class: "tao-card__overlay"
628
+ };
629
+ const _hoisted_3$w = {
630
+ key: 1,
631
+ class: "tao-card__overlay"
628
632
  };
629
- const _hoisted_3$w = { key: 0 };
630
633
  const _hoisted_4$r = {
634
+ key: 0,
635
+ class: "tao-card__header-title"
636
+ };
637
+ const _hoisted_5$j = { key: 0 };
638
+ const _hoisted_6$f = {
631
639
  key: 2,
632
640
  class: "tao-card__title-block"
633
641
  };
634
- const _hoisted_5$j = {
642
+ const _hoisted_7$c = {
635
643
  key: 0,
636
644
  class: "tao-card__title"
637
645
  };
638
- const _hoisted_6$f = {
646
+ const _hoisted_8$b = {
639
647
  key: 1,
640
648
  class: "tao-card__sub"
641
649
  };
642
- const _hoisted_7$c = {
650
+ const _hoisted_9$5 = {
643
651
  key: 3,
644
652
  class: "tao-card__body"
645
653
  };
646
- const _hoisted_8$b = {
654
+ const _hoisted_10$5 = {
647
655
  key: 4,
648
656
  class: "tao-card__footer"
649
657
  };
@@ -657,36 +665,54 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
657
665
  shadowBottomOnly: { type: Boolean, default: false },
658
666
  hover: { type: Boolean, default: false },
659
667
  active: { type: Boolean, default: false },
660
- overflow: { type: Boolean, default: false }
668
+ overflow: { type: Boolean, default: false },
669
+ flush: { type: Boolean, default: false }
661
670
  },
662
671
  setup(__props) {
663
672
  const props = __props;
673
+ const slots = useSlots();
674
+ const hasContent = computed(
675
+ () => Boolean(slots.headerTitle) || Boolean(slots.header) || Boolean(slots.headerSecondary) || Boolean(slots.title) || Boolean(slots.sub) || Boolean(slots.default) || Boolean(slots.footer)
676
+ );
677
+ const coverOnly = computed(() => Boolean(slots.cover) && !hasContent.value);
664
678
  const paddingStyle = computed(() => {
679
+ if (props.flush) {
680
+ return { padding: "0" };
681
+ }
665
682
  if (Array.isArray(props.padding)) {
666
683
  return { padding: `${props.padding.map((p) => `${p}px`).join(" ")}` };
667
684
  }
668
685
  return { padding: `${props.padding}px` };
669
686
  });
670
687
  const radiusStyle = computed(() => ({ borderRadius: `${props.radius}px` }));
688
+ const showPanelShadow = computed(() => props.shadow && !props.shadowBottomOnly && !props.flush);
671
689
  return (_ctx, _cache) => {
672
690
  return openBlock(), createElementBlock("div", {
673
691
  class: normalizeClass(["tao-card", {
674
- "tao-card--shadow": __props.shadow && !__props.shadowBottomOnly,
692
+ "tao-card--shadow": showPanelShadow.value,
675
693
  "tao-card--shadow-bottom": __props.shadowBottomOnly,
676
694
  "tao-card--hover": __props.hover,
677
695
  "tao-card--active": __props.active,
678
- "tao-card--overflow": __props.overflow
696
+ "tao-card--overflow": __props.overflow,
697
+ "tao-card--flush": __props.flush,
698
+ "tao-card--cover-only": coverOnly.value
679
699
  }]),
680
700
  style: normalizeStyle(radiusStyle.value)
681
701
  }, [
682
702
  _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$K, [
683
- renderSlot(_ctx.$slots, "cover", {}, void 0, true)
703
+ renderSlot(_ctx.$slots, "cover", {}, void 0, true),
704
+ _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
705
+ renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
706
+ ])) : createCommentVNode("", true)
707
+ ])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
708
+ renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
684
709
  ])) : createCommentVNode("", true),
685
- createElementVNode("div", {
710
+ hasContent.value ? (openBlock(), createElementBlock("div", {
711
+ key: 2,
686
712
  class: "tao-card__content",
687
713
  style: normalizeStyle(paddingStyle.value)
688
714
  }, [
689
- _ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_2$D, [
715
+ _ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_4$r, [
690
716
  renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
691
717
  ])) : createCommentVNode("", true),
692
718
  _ctx.$slots.header || _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("div", {
@@ -696,30 +722,30 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
696
722
  createElementVNode("span", null, [
697
723
  renderSlot(_ctx.$slots, "header", {}, void 0, true)
698
724
  ]),
699
- _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_3$w, [
725
+ _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_5$j, [
700
726
  renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
701
727
  ])) : createCommentVNode("", true)
702
728
  ], 2)) : createCommentVNode("", true),
703
- _ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_4$r, [
704
- _ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_5$j, [
729
+ _ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$f, [
730
+ _ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_7$c, [
705
731
  renderSlot(_ctx.$slots, "title", {}, void 0, true)
706
732
  ])) : createCommentVNode("", true),
707
- _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$f, [
733
+ _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
708
734
  renderSlot(_ctx.$slots, "sub", {}, void 0, true)
709
735
  ])) : createCommentVNode("", true)
710
736
  ])) : createCommentVNode("", true),
711
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_7$c, [
737
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_9$5, [
712
738
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
713
739
  ])) : createCommentVNode("", true),
714
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
740
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
715
741
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
716
742
  ])) : createCommentVNode("", true)
717
- ], 4)
743
+ ], 4)) : createCommentVNode("", true)
718
744
  ], 6);
719
745
  };
720
746
  }
721
747
  });
722
- const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-2ff3d055"]]);
748
+ const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-f4fc87bb"]]);
723
749
  const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
724
750
  function getFocusable(root) {
725
751
  return [...root.querySelectorAll(FOCUSABLE)].filter(
@@ -1037,7 +1063,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1037
1063
  };
1038
1064
  }
1039
1065
  });
1040
- const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-bf16735e"]]);
1066
+ const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-a17ac487"]]);
1041
1067
  function listenFocusLoss(onLoss) {
1042
1068
  function onVisibilityChange() {
1043
1069
  if (document.hidden) {
@@ -6123,7 +6149,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
6123
6149
  };
6124
6150
  }
6125
6151
  });
6126
- const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-1a9357a1"]]);
6152
+ const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-acd5de66"]]);
6127
6153
  const _hoisted_1$f = ["role", "aria-live"];
6128
6154
  const _hoisted_2$d = { class: "tao-alert__body" };
6129
6155
  const _hoisted_3$b = {