@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/README.md CHANGED
@@ -11,7 +11,7 @@ change a handful of CSS variables and the whole kit follows.
11
11
 
12
12
  - **TaoBlock** — container with padding and radius
13
13
  - **TaoButton** — `primary` / `secondary` / `ghost` / `text` / `danger`. `tone` tints ghost and text (danger, success, warning, info)
14
- - **TaoCard** — card with cover / header / footer slots. `#cover` can be a photo or `TaoCarousel`
14
+ - **TaoCard** — card with cover / header / footer slots. `#cover` can be a photo or `TaoCarousel`. `flush` is a tile (no padding/shadow, fills the cell); `#overlay` is a scrim on the cover
15
15
  - **TaoCopy** — clipboard icon. After a click, a “Copied” tooltip; if the trigger is gone, the tooltip is too
16
16
  - **TaoInput** — text field with v-model, validation, and `#prefix` / `#suffix` slots (icon or text inside the frame)
17
17
  - **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
@@ -475,7 +475,7 @@ document.documentElement.setAttribute('data-tao-theme', 'light')
475
475
  - `--tao-color-selection`, `--tao-color-selection-text` — text selection (`::selection`)
476
476
  - `--tao-color-surface*` — container backgrounds (default / raised / sunken / hover)
477
477
  - `--tao-color-border*` — borders
478
- - `--tao-color-text*` — text (default / strong / muted / disabled)
478
+ - `--tao-color-text*` — text (default / strong / subtle / muted / disabled)
479
479
  - `--tao-color-danger*`, `--tao-color-success*`, `--tao-color-warning*`, `--tao-color-info*` — status colors
480
480
  - `--tao-color-input-*` — fields, because input bg/text often differs from surface/text
481
481
  - `--tao-radius-control`, `--tao-radius-panel` — radii (small controls vs large panels)
package/README.ru.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  - **TaoBlock** — базовый контейнер с настраиваемыми отступами и скруглением
13
13
  - **TaoButton** — кнопка: `primary` / `secondary` / `ghost` / `text` / `danger`. `tone` красит ghost и text (danger, success, warning, info)
14
- - **TaoCard** — карточка со слотами cover / header / footer. В `#cover` — фото или `TaoCarousel`
14
+ - **TaoCard** — карточка со слотами cover / header / footer. В `#cover` — фото или `TaoCarousel`. `flush` — плитка без padding/тени на всю ячейку; `#overlay` — scrim на обложке
15
15
  - **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
16
16
  - **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки)
17
17
  - **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
@@ -478,7 +478,7 @@ document.documentElement.setAttribute('data-tao-theme', 'light')
478
478
  - `--tao-color-selection`, `--tao-color-selection-text` — выделение текста (`::selection`)
479
479
  - `--tao-color-surface*` — фоны контейнеров (обычный / приподнятый / утопленный / hover)
480
480
  - `--tao-color-border*` — границы
481
- - `--tao-color-text*` — текст (обычный / усиленный / приглушённый / disabled)
481
+ - `--tao-color-text*` — текст (обычный / усиленный / subtle / приглушённый / disabled)
482
482
  - `--tao-color-danger*`, `--tao-color-success*`, `--tao-color-warning*`, `--tao-color-info*` — статусные цвета
483
483
  - `--tao-color-input-*` — поля ввода отдельно, т.к. фон/текст полей часто не совпадают с surface/text
484
484
  - `--tao-radius-control`, `--tao-radius-panel` — скругления (мелкие контролы vs крупные панели)
package/dist/index.cjs CHANGED
@@ -627,26 +627,34 @@
627
627
  };
628
628
  const _hoisted_2$D = {
629
629
  key: 0,
630
- class: "tao-card__header-title"
630
+ class: "tao-card__overlay"
631
+ };
632
+ const _hoisted_3$w = {
633
+ key: 1,
634
+ class: "tao-card__overlay"
631
635
  };
632
- const _hoisted_3$w = { key: 0 };
633
636
  const _hoisted_4$r = {
637
+ key: 0,
638
+ class: "tao-card__header-title"
639
+ };
640
+ const _hoisted_5$j = { key: 0 };
641
+ const _hoisted_6$f = {
634
642
  key: 2,
635
643
  class: "tao-card__title-block"
636
644
  };
637
- const _hoisted_5$j = {
645
+ const _hoisted_7$c = {
638
646
  key: 0,
639
647
  class: "tao-card__title"
640
648
  };
641
- const _hoisted_6$f = {
649
+ const _hoisted_8$b = {
642
650
  key: 1,
643
651
  class: "tao-card__sub"
644
652
  };
645
- const _hoisted_7$c = {
653
+ const _hoisted_9$5 = {
646
654
  key: 3,
647
655
  class: "tao-card__body"
648
656
  };
649
- const _hoisted_8$b = {
657
+ const _hoisted_10$5 = {
650
658
  key: 4,
651
659
  class: "tao-card__footer"
652
660
  };
@@ -660,36 +668,54 @@
660
668
  shadowBottomOnly: { type: Boolean, default: false },
661
669
  hover: { type: Boolean, default: false },
662
670
  active: { type: Boolean, default: false },
663
- overflow: { type: Boolean, default: false }
671
+ overflow: { type: Boolean, default: false },
672
+ flush: { type: Boolean, default: false }
664
673
  },
665
674
  setup(__props) {
666
675
  const props = __props;
676
+ const slots = vue.useSlots();
677
+ const hasContent = vue.computed(
678
+ () => Boolean(slots.headerTitle) || Boolean(slots.header) || Boolean(slots.headerSecondary) || Boolean(slots.title) || Boolean(slots.sub) || Boolean(slots.default) || Boolean(slots.footer)
679
+ );
680
+ const coverOnly = vue.computed(() => Boolean(slots.cover) && !hasContent.value);
667
681
  const paddingStyle = vue.computed(() => {
682
+ if (props.flush) {
683
+ return { padding: "0" };
684
+ }
668
685
  if (Array.isArray(props.padding)) {
669
686
  return { padding: `${props.padding.map((p) => `${p}px`).join(" ")}` };
670
687
  }
671
688
  return { padding: `${props.padding}px` };
672
689
  });
673
690
  const radiusStyle = vue.computed(() => ({ borderRadius: `${props.radius}px` }));
691
+ const showPanelShadow = vue.computed(() => props.shadow && !props.shadowBottomOnly && !props.flush);
674
692
  return (_ctx, _cache) => {
675
693
  return vue.openBlock(), vue.createElementBlock("div", {
676
694
  class: vue.normalizeClass(["tao-card", {
677
- "tao-card--shadow": __props.shadow && !__props.shadowBottomOnly,
695
+ "tao-card--shadow": showPanelShadow.value,
678
696
  "tao-card--shadow-bottom": __props.shadowBottomOnly,
679
697
  "tao-card--hover": __props.hover,
680
698
  "tao-card--active": __props.active,
681
- "tao-card--overflow": __props.overflow
699
+ "tao-card--overflow": __props.overflow,
700
+ "tao-card--flush": __props.flush,
701
+ "tao-card--cover-only": coverOnly.value
682
702
  }]),
683
703
  style: vue.normalizeStyle(radiusStyle.value)
684
704
  }, [
685
705
  _ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
686
- vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true)
706
+ vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true),
707
+ _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$D, [
708
+ vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
709
+ ])) : vue.createCommentVNode("", true)
710
+ ])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$w, [
711
+ vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
687
712
  ])) : vue.createCommentVNode("", true),
688
- vue.createElementVNode("div", {
713
+ hasContent.value ? (vue.openBlock(), vue.createElementBlock("div", {
714
+ key: 2,
689
715
  class: "tao-card__content",
690
716
  style: vue.normalizeStyle(paddingStyle.value)
691
717
  }, [
692
- _ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_2$D, [
718
+ _ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$r, [
693
719
  vue.renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
694
720
  ])) : vue.createCommentVNode("", true),
695
721
  _ctx.$slots.header || _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -699,30 +725,30 @@
699
725
  vue.createElementVNode("span", null, [
700
726
  vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
701
727
  ]),
702
- _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$w, [
728
+ _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$j, [
703
729
  vue.renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
704
730
  ])) : vue.createCommentVNode("", true)
705
731
  ], 2)) : vue.createCommentVNode("", true),
706
- _ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$r, [
707
- _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_5$j, [
732
+ _ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$f, [
733
+ _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_7$c, [
708
734
  vue.renderSlot(_ctx.$slots, "title", {}, void 0, true)
709
735
  ])) : vue.createCommentVNode("", true),
710
- _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$f, [
736
+ _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$b, [
711
737
  vue.renderSlot(_ctx.$slots, "sub", {}, void 0, true)
712
738
  ])) : vue.createCommentVNode("", true)
713
739
  ])) : vue.createCommentVNode("", true),
714
- _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$c, [
740
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$5, [
715
741
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
716
742
  ])) : vue.createCommentVNode("", true),
717
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$b, [
743
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$5, [
718
744
  vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
719
745
  ])) : vue.createCommentVNode("", true)
720
- ], 4)
746
+ ], 4)) : vue.createCommentVNode("", true)
721
747
  ], 6);
722
748
  };
723
749
  }
724
750
  });
725
- const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-2ff3d055"]]);
751
+ const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-f4fc87bb"]]);
726
752
  const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
727
753
  function getFocusable(root) {
728
754
  return [...root.querySelectorAll(FOCUSABLE)].filter(
@@ -1040,7 +1066,7 @@
1040
1066
  };
1041
1067
  }
1042
1068
  });
1043
- const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-bf16735e"]]);
1069
+ const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-a17ac487"]]);
1044
1070
  function listenFocusLoss(onLoss) {
1045
1071
  function onVisibilityChange() {
1046
1072
  if (document.hidden) {
@@ -6126,7 +6152,7 @@
6126
6152
  };
6127
6153
  }
6128
6154
  });
6129
- const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-1a9357a1"]]);
6155
+ const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-acd5de66"]]);
6130
6156
  const _hoisted_1$f = ["role", "aria-live"];
6131
6157
  const _hoisted_2$d = { class: "tao-alert__body" };
6132
6158
  const _hoisted_3$b = {