@1337exp/taoui 1.8.0 → 1.10.0

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
@@ -29,7 +29,7 @@ change a handful of CSS variables and the whole kit follows.
29
29
  - **TaoFlex** — flexbox wrapper: justify / align / direction / wrap / gap
30
30
  - **TaoSpace** — even gap between children
31
31
  - **TaoGrid** / **TaoGridItem** — tiles: `min` is a catalog (auto-fill), `cols` is bento. Item `col` / `row` span; below ~560px span resets. Not masonry
32
- - **TaoDivider** — `line` (hairline), `text` (line with a label), `gap` (empty space, size: small / medium / large)
32
+ - **TaoDivider** — `solid` (plain border) / `dashed` / `colored` (accent) / `gap`. Optional `text` sits in the middle of any of them; `fade` softens the line ends; `size` is for `gap` (small / medium / large)
33
33
  - **TaoSplit** — two panes and a gutter. `row` / `column` like Flex. `v-model` is the start size in `%` or `px`; `resizable="false"` locks the gutter. Not Divider.
34
34
  - **TaoFieldset** — grouped frame: `legend` sits on the top border, `align` is start / center / end
35
35
  - **TaoAnimatedBorder** — rainbow border wrapper (decorative, not tied to the theme)
@@ -54,7 +54,7 @@ change a handful of CSS variables and the whole kit follows.
54
54
 
55
55
  ### Data display
56
56
 
57
- - **TaoTable** — simple table: columns, empty, loading, sort via `v-model:sort`. Not a datagrid.
57
+ - **TaoTable** — simple table: columns, empty, loading, sort via `v-model:sort`. `head` tints the header, `lines` draws row rules (both on by default). `striped` starts on the first row; `striped="even"` starts on the second. Not a datagrid.
58
58
  - **TaoPagination** — pages with ellipsis. Clicking “…” jumps `jump` pages (5 by default)
59
59
  - **TaoEmpty** — empty list, no results, no access
60
60
  - **TaoList** / **TaoListItem** — list row: icon, title, caption, hover action. Not Select, not a table
package/README.ru.md CHANGED
@@ -29,7 +29,7 @@
29
29
  - **TaoFlex** — обёртка над flexbox с пропами justify/align/direction/wrap/gap
30
30
  - **TaoSpace** — авто-расстановка дочерних элементов с равномерным gap
31
31
  - **TaoGrid** / **TaoGridItem** — плитки: `min` — каталог (auto-fill), `cols` — bento. У item `col` / `row`; уже ~560px span сбрасывается. Не masonry
32
- - **TaoDivider** — разделитель: line (тонкая линия), text (линия с текстом), gap (пустой отступ, size: small/medium/large)
32
+ - **TaoDivider** — `solid` (обычный border) / `dashed` / `colored` (акцент) / `gap`. Подпись — опциональный `text` на любом варианте; `fade` — плавные края линии; `size` только у `gap` (small / medium / large)
33
33
  - **TaoSplit** — две панели и полоса. `row` / `column` как у Flex. `v-model` — размер start в `%` или `px`; `resizable="false"` фиксирует полосу. Не Divider.
34
34
  - **TaoFieldset** — рамка-группа: `legend` сидит на верхней границе, `align` — start / center / end
35
35
  - **TaoAnimatedBorder** — контейнер с анимированной радужной рамкой (декоративный, не завязан на тему)
@@ -54,7 +54,7 @@
54
54
 
55
55
  ### Отображение данных
56
56
 
57
- - **TaoTable** — простая таблица: колонки, empty, loading, сортировка через `v-model:sort`. Не datagrid.
57
+ - **TaoTable** — простая таблица: колонки, empty, loading, сортировка через `v-model:sort`. `head` — подсветка шапки, `lines` — линии между рядами (оба по умолчанию включены). `striped` — зебра с первой строки, `striped="even"` — со второй. Не datagrid.
58
58
  - **TaoPagination** — страницы с многоточием. Клик по «…» прыгает на `jump` страниц (5 по умолчанию)
59
59
  - **TaoEmpty** — пустой список, нет результатов, нет прав
60
60
  - **TaoList** / **TaoListItem** — строка списка: иконка, заголовок, подпись, действие по ховеру. Не Select и не таблица
package/dist/index.cjs CHANGED
@@ -2462,41 +2462,58 @@
2462
2462
  };
2463
2463
  }
2464
2464
  });
2465
- const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-f353f529"]]);
2466
- const _hoisted_1$y = {
2465
+ const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-cbbbf8f3"]]);
2466
+ const _hoisted_1$y = ["role", "aria-hidden"];
2467
+ const _hoisted_2$v = {
2467
2468
  key: 1,
2468
- class: "tao-divider-text"
2469
+ class: "tao-divider__text"
2469
2470
  };
2470
- const _hoisted_2$v = { class: "tao-divider-text__value" };
2471
2471
  const _hoisted_3$o = {
2472
2472
  key: 2,
2473
- class: "tao-divider-line"
2473
+ class: "tao-divider__line tao-divider__line--end"
2474
2474
  };
2475
2475
  const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
2476
2476
  ...{ name: "TaoDivider" },
2477
2477
  __name: "TaoDivider",
2478
2478
  props: {
2479
- variant: { default: "line" },
2480
- size: { default: "medium" }
2479
+ variant: { default: "solid" },
2480
+ size: { default: "medium" },
2481
+ text: { default: "" },
2482
+ fade: { type: Boolean, default: false }
2481
2483
  },
2482
2484
  setup(__props) {
2483
2485
  const props = __props;
2486
+ const slots = vue.useSlots();
2484
2487
  const gapSize = vue.computed(() => props.size === "big" ? "large" : props.size);
2488
+ const hasLabel = vue.computed(() => Boolean(props.text) || Boolean(slots.default));
2485
2489
  return (_ctx, _cache) => {
2486
- return __props.variant === "gap" ? (vue.openBlock(), vue.createElementBlock("div", {
2487
- key: 0,
2488
- class: vue.normalizeClass(["tao-divider-gap", `tao-divider-gap--${gapSize.value}`])
2489
- }, null, 2)) : __props.variant === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
2490
- _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--left" }, null, -1)),
2491
- vue.createElementVNode("span", _hoisted_2$v, [
2492
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2493
- ]),
2494
- _cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--right" }, null, -1))
2495
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$o));
2490
+ return vue.openBlock(), vue.createElementBlock("div", {
2491
+ class: vue.normalizeClass(["tao-divider", [
2492
+ `tao-divider--${__props.variant}`,
2493
+ {
2494
+ "tao-divider--labeled": hasLabel.value,
2495
+ "tao-divider--fade": __props.fade && __props.variant !== "gap",
2496
+ [`tao-divider--gap-${gapSize.value}`]: __props.variant === "gap"
2497
+ }
2498
+ ]]),
2499
+ role: __props.variant === "gap" && !hasLabel.value ? void 0 : "separator",
2500
+ "aria-hidden": __props.variant === "gap" && !hasLabel.value ? true : void 0
2501
+ }, [
2502
+ __props.variant !== "gap" ? (vue.openBlock(), vue.createElementBlock("span", {
2503
+ key: 0,
2504
+ class: vue.normalizeClass(["tao-divider__line", { "tao-divider__line--start": hasLabel.value }])
2505
+ }, null, 2)) : vue.createCommentVNode("", true),
2506
+ hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$v, [
2507
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
2508
+ vue.createTextVNode(vue.toDisplayString(__props.text), 1)
2509
+ ], true)
2510
+ ])) : vue.createCommentVNode("", true),
2511
+ __props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$o)) : vue.createCommentVNode("", true)
2512
+ ], 10, _hoisted_1$y);
2496
2513
  };
2497
2514
  }
2498
2515
  });
2499
- const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-8187a15d"]]);
2516
+ const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-c1d072e5"]]);
2500
2517
  const _hoisted_1$x = {
2501
2518
  key: 0,
2502
2519
  class: "tao-fieldset__legend"
@@ -6188,9 +6205,11 @@
6188
6205
  rowKey: { type: [String, Function], default: "id" },
6189
6206
  loading: { type: Boolean, default: false },
6190
6207
  emptyText: { default: "Нет данных" },
6191
- striped: { type: Boolean, default: false },
6208
+ striped: { type: [Boolean, String], default: false },
6192
6209
  compact: { type: Boolean, default: false },
6193
6210
  hover: { type: Boolean, default: true },
6211
+ head: { type: Boolean, default: true },
6212
+ lines: { type: Boolean, default: true },
6194
6213
  sticky: { type: Boolean, default: false },
6195
6214
  maxHeight: { default: "" },
6196
6215
  clickable: { type: Boolean, default: false },
@@ -6203,6 +6222,15 @@
6203
6222
  const emit = __emit;
6204
6223
  const colCount = vue.computed(() => Math.max(props.columns.length, 1));
6205
6224
  const isEmpty = vue.computed(() => !props.rows.length && !props.loading);
6225
+ const stripeFrom = vue.computed(() => {
6226
+ if (props.striped === "even") {
6227
+ return "even";
6228
+ }
6229
+ if (props.striped === "odd" || props.striped === true) {
6230
+ return "odd";
6231
+ }
6232
+ return null;
6233
+ });
6206
6234
  function columnWidth(column) {
6207
6235
  if (column.width == null) {
6208
6236
  return void 0;
@@ -6253,9 +6281,12 @@
6253
6281
  }, [
6254
6282
  vue.createElementVNode("table", {
6255
6283
  class: vue.normalizeClass(["tao-table", {
6256
- "tao-table--striped": __props.striped,
6284
+ "tao-table--striped": stripeFrom.value === "odd",
6285
+ "tao-table--striped-even": stripeFrom.value === "even",
6257
6286
  "tao-table--compact": __props.compact,
6258
6287
  "tao-table--hover": __props.hover,
6288
+ "tao-table--head": __props.head,
6289
+ "tao-table--lines": __props.lines,
6259
6290
  "tao-table--clickable": __props.clickable,
6260
6291
  "tao-table--sticky": __props.sticky
6261
6292
  }])
@@ -6340,7 +6371,7 @@
6340
6371
  };
6341
6372
  }
6342
6373
  });
6343
- const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5ce586b8"]]);
6374
+ const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-497e62e7"]]);
6344
6375
  function buildPaginationItems(page, pageCount, siblingCount = 1) {
6345
6376
  if (pageCount <= 0) {
6346
6377
  return [];