@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 +2 -2
- package/README.ru.md +2 -2
- package/dist/index.cjs +52 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +38 -6
- package/dist/index.mjs +52 -21
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +137 -92
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -412,20 +412,36 @@ pointer: boolean;
|
|
|
412
412
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
413
413
|
|
|
414
414
|
declare const __VLS_component_25: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_23<__VLS_TypePropsToRuntimeProps_25<{
|
|
415
|
-
|
|
415
|
+
/** `solid` — обычная линия. `dashed` — пунктир. `colored` — акцент. `gap` — пустой отступ. */
|
|
416
|
+
variant?: "solid" | "dashed" | "colored" | "gap";
|
|
416
417
|
size?: "small" | "medium" | "large" | "big";
|
|
418
|
+
/** Подпись посередине. Не меняет стиль линии — для этого `variant`. */
|
|
419
|
+
text?: string;
|
|
420
|
+
/** Плавные края линии. У `gap` ничего не делает. */
|
|
421
|
+
fade?: boolean;
|
|
417
422
|
}>, {
|
|
418
423
|
variant: string;
|
|
419
424
|
size: string;
|
|
425
|
+
text: string;
|
|
426
|
+
fade: boolean;
|
|
420
427
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_23<__VLS_TypePropsToRuntimeProps_25<{
|
|
421
|
-
|
|
428
|
+
/** `solid` — обычная линия. `dashed` — пунктир. `colored` — акцент. `gap` — пустой отступ. */
|
|
429
|
+
variant?: "solid" | "dashed" | "colored" | "gap";
|
|
422
430
|
size?: "small" | "medium" | "large" | "big";
|
|
431
|
+
/** Подпись посередине. Не меняет стиль линии — для этого `variant`. */
|
|
432
|
+
text?: string;
|
|
433
|
+
/** Плавные края линии. У `gap` ничего не делает. */
|
|
434
|
+
fade?: boolean;
|
|
423
435
|
}>, {
|
|
424
436
|
variant: string;
|
|
425
437
|
size: string;
|
|
438
|
+
text: string;
|
|
439
|
+
fade: boolean;
|
|
426
440
|
}>>> & Readonly<{}>, {
|
|
441
|
+
text: string;
|
|
427
442
|
size: "small" | "medium" | "large" | "big";
|
|
428
|
-
variant: "
|
|
443
|
+
variant: "solid" | "dashed" | "colored" | "gap";
|
|
444
|
+
fade: boolean;
|
|
429
445
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
430
446
|
|
|
431
447
|
declare const __VLS_component_26: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_24<__VLS_TypePropsToRuntimeProps_26<{
|
|
@@ -1148,9 +1164,14 @@ rows?: Record<string, unknown>[];
|
|
|
1148
1164
|
rowKey?: string | ((row: Record<string, unknown>, index: number) => string | number);
|
|
1149
1165
|
loading?: boolean;
|
|
1150
1166
|
emptyText?: string;
|
|
1151
|
-
|
|
1167
|
+
/** Зебра. `true` / `odd` — с первой строки, `even` — со второй. */
|
|
1168
|
+
striped?: boolean | "odd" | "even";
|
|
1152
1169
|
compact?: boolean;
|
|
1153
1170
|
hover?: boolean;
|
|
1171
|
+
/** Подсветка шапки. */
|
|
1172
|
+
head?: boolean;
|
|
1173
|
+
/** Горизонтальные линии между рядами. */
|
|
1174
|
+
lines?: boolean;
|
|
1154
1175
|
sticky?: boolean;
|
|
1155
1176
|
maxHeight?: string;
|
|
1156
1177
|
clickable?: boolean;
|
|
@@ -1164,6 +1185,8 @@ emptyText: string;
|
|
|
1164
1185
|
striped: boolean;
|
|
1165
1186
|
compact: boolean;
|
|
1166
1187
|
hover: boolean;
|
|
1188
|
+
head: boolean;
|
|
1189
|
+
lines: boolean;
|
|
1167
1190
|
sticky: boolean;
|
|
1168
1191
|
maxHeight: string;
|
|
1169
1192
|
clickable: boolean;
|
|
@@ -1179,9 +1202,14 @@ rows?: Record<string, unknown>[];
|
|
|
1179
1202
|
rowKey?: string | ((row: Record<string, unknown>, index: number) => string | number);
|
|
1180
1203
|
loading?: boolean;
|
|
1181
1204
|
emptyText?: string;
|
|
1182
|
-
|
|
1205
|
+
/** Зебра. `true` / `odd` — с первой строки, `even` — со второй. */
|
|
1206
|
+
striped?: boolean | "odd" | "even";
|
|
1183
1207
|
compact?: boolean;
|
|
1184
1208
|
hover?: boolean;
|
|
1209
|
+
/** Подсветка шапки. */
|
|
1210
|
+
head?: boolean;
|
|
1211
|
+
/** Горизонтальные линии между рядами. */
|
|
1212
|
+
lines?: boolean;
|
|
1185
1213
|
sticky?: boolean;
|
|
1186
1214
|
maxHeight?: string;
|
|
1187
1215
|
clickable?: boolean;
|
|
@@ -1195,6 +1223,8 @@ emptyText: string;
|
|
|
1195
1223
|
striped: boolean;
|
|
1196
1224
|
compact: boolean;
|
|
1197
1225
|
hover: boolean;
|
|
1226
|
+
head: boolean;
|
|
1227
|
+
lines: boolean;
|
|
1198
1228
|
sticky: boolean;
|
|
1199
1229
|
maxHeight: string;
|
|
1200
1230
|
clickable: boolean;
|
|
@@ -1207,14 +1237,16 @@ onSort?: ((value: TaoTableSort | null) => any) | undefined;
|
|
|
1207
1237
|
}>, {
|
|
1208
1238
|
sort: TaoTableSort | null;
|
|
1209
1239
|
caption: string;
|
|
1240
|
+
head: boolean;
|
|
1210
1241
|
hover: boolean;
|
|
1211
1242
|
loading: boolean;
|
|
1212
1243
|
emptyText: string;
|
|
1213
1244
|
rows: Record<string, unknown>[];
|
|
1214
1245
|
maxHeight: string;
|
|
1215
1246
|
clickable: boolean;
|
|
1247
|
+
lines: boolean;
|
|
1216
1248
|
rowKey: string | ((row: Record<string, unknown>, index: number) => string | number);
|
|
1217
|
-
striped: boolean;
|
|
1249
|
+
striped: boolean | "odd" | "even";
|
|
1218
1250
|
compact: boolean;
|
|
1219
1251
|
sticky: boolean;
|
|
1220
1252
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
package/dist/index.mjs
CHANGED
|
@@ -2459,41 +2459,58 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
2459
2459
|
};
|
|
2460
2460
|
}
|
|
2461
2461
|
});
|
|
2462
|
-
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-
|
|
2463
|
-
const _hoisted_1$y =
|
|
2462
|
+
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-cbbbf8f3"]]);
|
|
2463
|
+
const _hoisted_1$y = ["role", "aria-hidden"];
|
|
2464
|
+
const _hoisted_2$v = {
|
|
2464
2465
|
key: 1,
|
|
2465
|
-
class: "tao-
|
|
2466
|
+
class: "tao-divider__text"
|
|
2466
2467
|
};
|
|
2467
|
-
const _hoisted_2$v = { class: "tao-divider-text__value" };
|
|
2468
2468
|
const _hoisted_3$o = {
|
|
2469
2469
|
key: 2,
|
|
2470
|
-
class: "tao-
|
|
2470
|
+
class: "tao-divider__line tao-divider__line--end"
|
|
2471
2471
|
};
|
|
2472
2472
|
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
2473
2473
|
...{ name: "TaoDivider" },
|
|
2474
2474
|
__name: "TaoDivider",
|
|
2475
2475
|
props: {
|
|
2476
|
-
variant: { default: "
|
|
2477
|
-
size: { default: "medium" }
|
|
2476
|
+
variant: { default: "solid" },
|
|
2477
|
+
size: { default: "medium" },
|
|
2478
|
+
text: { default: "" },
|
|
2479
|
+
fade: { type: Boolean, default: false }
|
|
2478
2480
|
},
|
|
2479
2481
|
setup(__props) {
|
|
2480
2482
|
const props = __props;
|
|
2483
|
+
const slots = useSlots();
|
|
2481
2484
|
const gapSize = computed(() => props.size === "big" ? "large" : props.size);
|
|
2485
|
+
const hasLabel = computed(() => Boolean(props.text) || Boolean(slots.default));
|
|
2482
2486
|
return (_ctx, _cache) => {
|
|
2483
|
-
return
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2487
|
+
return openBlock(), createElementBlock("div", {
|
|
2488
|
+
class: normalizeClass(["tao-divider", [
|
|
2489
|
+
`tao-divider--${__props.variant}`,
|
|
2490
|
+
{
|
|
2491
|
+
"tao-divider--labeled": hasLabel.value,
|
|
2492
|
+
"tao-divider--fade": __props.fade && __props.variant !== "gap",
|
|
2493
|
+
[`tao-divider--gap-${gapSize.value}`]: __props.variant === "gap"
|
|
2494
|
+
}
|
|
2495
|
+
]]),
|
|
2496
|
+
role: __props.variant === "gap" && !hasLabel.value ? void 0 : "separator",
|
|
2497
|
+
"aria-hidden": __props.variant === "gap" && !hasLabel.value ? true : void 0
|
|
2498
|
+
}, [
|
|
2499
|
+
__props.variant !== "gap" ? (openBlock(), createElementBlock("span", {
|
|
2500
|
+
key: 0,
|
|
2501
|
+
class: normalizeClass(["tao-divider__line", { "tao-divider__line--start": hasLabel.value }])
|
|
2502
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
2503
|
+
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$v, [
|
|
2504
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2505
|
+
createTextVNode(toDisplayString(__props.text), 1)
|
|
2506
|
+
], true)
|
|
2507
|
+
])) : createCommentVNode("", true),
|
|
2508
|
+
__props.variant !== "gap" && hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_3$o)) : createCommentVNode("", true)
|
|
2509
|
+
], 10, _hoisted_1$y);
|
|
2493
2510
|
};
|
|
2494
2511
|
}
|
|
2495
2512
|
});
|
|
2496
|
-
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
2513
|
+
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-c1d072e5"]]);
|
|
2497
2514
|
const _hoisted_1$x = {
|
|
2498
2515
|
key: 0,
|
|
2499
2516
|
class: "tao-fieldset__legend"
|
|
@@ -6185,9 +6202,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6185
6202
|
rowKey: { type: [String, Function], default: "id" },
|
|
6186
6203
|
loading: { type: Boolean, default: false },
|
|
6187
6204
|
emptyText: { default: "Нет данных" },
|
|
6188
|
-
striped: { type: Boolean, default: false },
|
|
6205
|
+
striped: { type: [Boolean, String], default: false },
|
|
6189
6206
|
compact: { type: Boolean, default: false },
|
|
6190
6207
|
hover: { type: Boolean, default: true },
|
|
6208
|
+
head: { type: Boolean, default: true },
|
|
6209
|
+
lines: { type: Boolean, default: true },
|
|
6191
6210
|
sticky: { type: Boolean, default: false },
|
|
6192
6211
|
maxHeight: { default: "" },
|
|
6193
6212
|
clickable: { type: Boolean, default: false },
|
|
@@ -6200,6 +6219,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6200
6219
|
const emit = __emit;
|
|
6201
6220
|
const colCount = computed(() => Math.max(props.columns.length, 1));
|
|
6202
6221
|
const isEmpty = computed(() => !props.rows.length && !props.loading);
|
|
6222
|
+
const stripeFrom = computed(() => {
|
|
6223
|
+
if (props.striped === "even") {
|
|
6224
|
+
return "even";
|
|
6225
|
+
}
|
|
6226
|
+
if (props.striped === "odd" || props.striped === true) {
|
|
6227
|
+
return "odd";
|
|
6228
|
+
}
|
|
6229
|
+
return null;
|
|
6230
|
+
});
|
|
6203
6231
|
function columnWidth(column) {
|
|
6204
6232
|
if (column.width == null) {
|
|
6205
6233
|
return void 0;
|
|
@@ -6250,9 +6278,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6250
6278
|
}, [
|
|
6251
6279
|
createElementVNode("table", {
|
|
6252
6280
|
class: normalizeClass(["tao-table", {
|
|
6253
|
-
"tao-table--striped":
|
|
6281
|
+
"tao-table--striped": stripeFrom.value === "odd",
|
|
6282
|
+
"tao-table--striped-even": stripeFrom.value === "even",
|
|
6254
6283
|
"tao-table--compact": __props.compact,
|
|
6255
6284
|
"tao-table--hover": __props.hover,
|
|
6285
|
+
"tao-table--head": __props.head,
|
|
6286
|
+
"tao-table--lines": __props.lines,
|
|
6256
6287
|
"tao-table--clickable": __props.clickable,
|
|
6257
6288
|
"tao-table--sticky": __props.sticky
|
|
6258
6289
|
}])
|
|
@@ -6337,7 +6368,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6337
6368
|
};
|
|
6338
6369
|
}
|
|
6339
6370
|
});
|
|
6340
|
-
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
6371
|
+
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-497e62e7"]]);
|
|
6341
6372
|
function buildPaginationItems(page, pageCount, siblingCount = 1) {
|
|
6342
6373
|
if (pageCount <= 0) {
|
|
6343
6374
|
return [];
|