@1337exp/taoui 5.9.0 → 5.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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +2 -1
- package/skills/taoui/references/components.md +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.10.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate.
|
|
6
|
+
|
|
7
|
+
- **`variant` on the text fields:** `TaoInput`, `TaoInputNumber` and `TaoCombobox` take `outline` (the frame, the default), `filled` (a fill only) and `plain` (no frame, no fill, no inset), the names `TaoTextarea` already uses. On a plain `TaoInputNumber` the ± buttons lose their lines too. A `plain` field reads as text, for an item of a list being edited: the caret shows the focus, and an error is a red line under the text, so the text does not move. The height is the same in all three. `filled` takes a fill of the text colour, so it shows on a page, a card or glass alike.
|
|
8
|
+
- A test now fails for any field whose control takes the field id (`:id="controlId"`) but does not split its attributes with `useControlAttrs`, so a new field cannot put its `aria-label` on the wrapper again.
|
|
9
|
+
- Showcase: the variants in the TaoInput section.
|
|
10
|
+
|
|
3
11
|
## 5.9.0
|
|
4
12
|
|
|
5
13
|
A new component; nothing to migrate.
|
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
- **TaoCard** — card with media / header / title / footer slots and a `#corner` (a tag, a menu button). `#media` can be a photo or `TaoCarousel`; `closable` adds a cross and the `close` event. `flush` is a tile (no padding/shadow, fills the cell); `#overlay` is a scrim on the media; `stripe="top | left | bottom"` with `stripeTone` (a tone or the palette `gradient`) draws a coloured stripe the corners clip
|
|
57
57
|
- **TaoCopy** — clipboard icon. After a click, a “Copied” tooltip; if the trigger is gone, the tooltip is too
|
|
58
58
|
- **TaoMarquee** — one line that never wraps: when it does not fit it runs round with fading edges and a pause at the start of every round, when it fits it stands still. Stops on hover, on focus and on a tap (WCAG 2.2.2); wraps with «reduce motion»; a screen reader reads it once. `text` or inline content in the slot, `speed`, `gap`, `fade` (the left fade takes that much room left of the text: give the parent the padding), `paused`
|
|
59
|
-
- **TaoInput** — text field with v-model, validation, and `#prefix` / `#suffix` slots (icon or text inside the frame)
|
|
59
|
+
- **TaoInput** — text field with v-model, validation, and `#prefix` / `#suffix` slots (icon or text inside the frame); `variant` `outline` / `filled` / `plain` (no frame: an item of a list being edited; `TaoInputNumber`, `TaoCombobox` and `TaoTextarea` take it too)
|
|
60
60
|
- **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
|
|
61
61
|
- **TaoModal** — modal with animation and slots; `fullscreen` (or `fullscreen="narrow"`: a page on a phone, a dialog on a computer)
|
|
62
62
|
- **TaoDrawer** — side panel (filters, settings), or a bottom sheet with `side="bottom"`. Esc, backdrop click, focus trap — same as the modal
|
package/README.ru.md
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
- **TaoCard** — карточка со слотами media / header / title / footer и `#corner` (тег, кнопка меню). В `#media` — фото или `TaoCarousel`; `closable` добавляет крестик и событие `close`. `flush` — плитка без padding/тени на всю ячейку; `#overlay` — scrim на media; `stripe="top | left | bottom"` со `stripeTone` (тон или `gradient` палитры) рисует цветную полосу, которую обрезают углы
|
|
57
57
|
- **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
|
|
58
58
|
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`
|
|
59
|
-
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки)
|
|
59
|
+
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
|
|
60
60
|
- **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
|
|
61
61
|
- **TaoModal** — модальное окно с анимацией и слотами; `fullscreen` (или `fullscreen="narrow"`: страница на телефоне, окно на компьютере)
|
|
62
62
|
- **TaoDrawer** — боковая панель (фильтры, настройки) или нижний лист с `side="bottom"`. Esc, клик по фону, ловушка фокуса — как у модалки
|
package/dist/index.d.ts
CHANGED
|
@@ -701,12 +701,12 @@ label: string;
|
|
|
701
701
|
variant: "solid" | "ghost" | "text";
|
|
702
702
|
bottom: string | number;
|
|
703
703
|
right: string | number;
|
|
704
|
+
outline: boolean;
|
|
704
705
|
side: "left" | "right";
|
|
705
706
|
offset: string | number;
|
|
706
707
|
labelSide: "left" | "right";
|
|
707
708
|
zIndex: number;
|
|
708
709
|
boundary: number;
|
|
709
|
-
outline: boolean;
|
|
710
710
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
711
711
|
|
|
712
712
|
declare const __VLS_component_3: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
|
|
@@ -715,6 +715,7 @@ type: string;
|
|
|
715
715
|
placeholder: string;
|
|
716
716
|
disabled: boolean;
|
|
717
717
|
error: boolean;
|
|
718
|
+
variant: string;
|
|
718
719
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
719
720
|
blur: (...args: any[]) => void;
|
|
720
721
|
focus: (...args: any[]) => void;
|
|
@@ -725,6 +726,7 @@ type: string;
|
|
|
725
726
|
placeholder: string;
|
|
726
727
|
disabled: boolean;
|
|
727
728
|
error: boolean;
|
|
729
|
+
variant: string;
|
|
728
730
|
}>>> & Readonly<{
|
|
729
731
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
730
732
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -734,6 +736,7 @@ type: "text" | "password" | "email" | "number" | "tel";
|
|
|
734
736
|
disabled: boolean;
|
|
735
737
|
placeholder: string;
|
|
736
738
|
error: boolean;
|
|
739
|
+
variant: "outline" | "filled" | "plain";
|
|
737
740
|
modelValue: string | number;
|
|
738
741
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
739
742
|
|
|
@@ -1644,6 +1647,13 @@ error?: boolean;
|
|
|
1644
1647
|
/** Control size, same scale as TaoButton; without it — the size of ancestors. / Размер, шкала как у TaoButton; без него — размер предков. */
|
|
1645
1648
|
size?: TaoSize;
|
|
1646
1649
|
placeholder?: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1652
|
+
* text, its error a red line under the text.
|
|
1653
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1654
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1655
|
+
*/
|
|
1656
|
+
variant?: "outline" | "filled" | "plain";
|
|
1647
1657
|
controls?: boolean;
|
|
1648
1658
|
incrementLabel?: string;
|
|
1649
1659
|
decrementLabel?: string;
|
|
@@ -1654,6 +1664,7 @@ disabled: boolean;
|
|
|
1654
1664
|
error: boolean;
|
|
1655
1665
|
placeholder: string;
|
|
1656
1666
|
controls: boolean;
|
|
1667
|
+
variant: string;
|
|
1657
1668
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1658
1669
|
blur: (event: FocusEvent) => void;
|
|
1659
1670
|
focus: (event: FocusEvent) => void;
|
|
@@ -1671,6 +1682,13 @@ error?: boolean;
|
|
|
1671
1682
|
/** Control size, same scale as TaoButton; without it — the size of ancestors. / Размер, шкала как у TaoButton; без него — размер предков. */
|
|
1672
1683
|
size?: TaoSize;
|
|
1673
1684
|
placeholder?: string;
|
|
1685
|
+
/**
|
|
1686
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1687
|
+
* text, its error a red line under the text.
|
|
1688
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1689
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1690
|
+
*/
|
|
1691
|
+
variant?: "outline" | "filled" | "plain";
|
|
1674
1692
|
controls?: boolean;
|
|
1675
1693
|
incrementLabel?: string;
|
|
1676
1694
|
decrementLabel?: string;
|
|
@@ -1681,6 +1699,7 @@ disabled: boolean;
|
|
|
1681
1699
|
error: boolean;
|
|
1682
1700
|
placeholder: string;
|
|
1683
1701
|
controls: boolean;
|
|
1702
|
+
variant: string;
|
|
1684
1703
|
}>>> & Readonly<{
|
|
1685
1704
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1686
1705
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -1690,6 +1709,7 @@ onCommit?: ((value: number | null) => any) | undefined;
|
|
|
1690
1709
|
disabled: boolean;
|
|
1691
1710
|
placeholder: string;
|
|
1692
1711
|
error: boolean;
|
|
1712
|
+
variant: "outline" | "filled" | "plain";
|
|
1693
1713
|
step: number;
|
|
1694
1714
|
modelValue: number | null;
|
|
1695
1715
|
controls: boolean;
|
|
@@ -1708,6 +1728,13 @@ clearText?: string;
|
|
|
1708
1728
|
clearable?: boolean;
|
|
1709
1729
|
/** Control size, same scale as TaoButton and TaoSelect; without it — the size of ancestors. / Размер контрола, шкала как у TaoButton и TaoSelect; без него — размер предков. */
|
|
1710
1730
|
size?: TaoSize;
|
|
1731
|
+
/**
|
|
1732
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1733
|
+
* text, its error a red line under the text.
|
|
1734
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1735
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1736
|
+
*/
|
|
1737
|
+
variant?: "outline" | "filled" | "plain";
|
|
1711
1738
|
/** Можно оставить то, чего нет в списке. */
|
|
1712
1739
|
allowCreate?: boolean;
|
|
1713
1740
|
}>, {
|
|
@@ -1717,6 +1744,7 @@ disabled: boolean;
|
|
|
1717
1744
|
error: boolean;
|
|
1718
1745
|
clearable: boolean;
|
|
1719
1746
|
allowCreate: boolean;
|
|
1747
|
+
variant: string;
|
|
1720
1748
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1721
1749
|
change: (value: string | number | null) => void;
|
|
1722
1750
|
"update:modelValue": (value: string | number | null) => void;
|
|
@@ -1734,6 +1762,13 @@ clearText?: string;
|
|
|
1734
1762
|
clearable?: boolean;
|
|
1735
1763
|
/** Control size, same scale as TaoButton and TaoSelect; without it — the size of ancestors. / Размер контрола, шкала как у TaoButton и TaoSelect; без него — размер предков. */
|
|
1736
1764
|
size?: TaoSize;
|
|
1765
|
+
/**
|
|
1766
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1767
|
+
* text, its error a red line under the text.
|
|
1768
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1769
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1770
|
+
*/
|
|
1771
|
+
variant?: "outline" | "filled" | "plain";
|
|
1737
1772
|
/** Можно оставить то, чего нет в списке. */
|
|
1738
1773
|
allowCreate?: boolean;
|
|
1739
1774
|
}>, {
|
|
@@ -1743,6 +1778,7 @@ disabled: boolean;
|
|
|
1743
1778
|
error: boolean;
|
|
1744
1779
|
clearable: boolean;
|
|
1745
1780
|
allowCreate: boolean;
|
|
1781
|
+
variant: string;
|
|
1746
1782
|
}>>> & Readonly<{
|
|
1747
1783
|
onChange?: ((value: string | number | null) => any) | undefined;
|
|
1748
1784
|
"onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
@@ -1750,6 +1786,7 @@ onCreate?: ((value: string) => any) | undefined;
|
|
|
1750
1786
|
}>, {
|
|
1751
1787
|
disabled: boolean;
|
|
1752
1788
|
error: boolean;
|
|
1789
|
+
variant: "outline" | "filled" | "plain";
|
|
1753
1790
|
modelValue: string | number | null;
|
|
1754
1791
|
options: TaoSelectOption[];
|
|
1755
1792
|
clearable: boolean;
|
|
@@ -5801,6 +5838,13 @@ declare interface Props_3 {
|
|
|
5801
5838
|
size?: TaoSize;
|
|
5802
5839
|
/** Red frame. The message goes to TaoFormField `error`. / Красная рамка. Текст ошибки — в `error` у TaoFormField. */
|
|
5803
5840
|
error?: boolean;
|
|
5841
|
+
/**
|
|
5842
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill: a field that reads as text (an item of a
|
|
5843
|
+
* list being edited), its error a red line under the text.
|
|
5844
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки: поле, которое читается как текст
|
|
5845
|
+
* (пункт списка в правке), его ошибка — красная черта под текстом.
|
|
5846
|
+
*/
|
|
5847
|
+
variant?: 'outline' | 'filled' | 'plain';
|
|
5804
5848
|
id?: string;
|
|
5805
5849
|
}
|
|
5806
5850
|
|
package/dist/index.js
CHANGED
|
@@ -329,6 +329,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
329
329
|
disabled: { type: Boolean, default: false },
|
|
330
330
|
size: {},
|
|
331
331
|
error: { type: Boolean, default: false },
|
|
332
|
+
variant: { default: "outline" },
|
|
332
333
|
id: {}
|
|
333
334
|
},
|
|
334
335
|
emits: ["update:modelValue", "blur", "focus"],
|
|
@@ -356,6 +357,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
356
357
|
}), [
|
|
357
358
|
createElementVNode("div", {
|
|
358
359
|
class: normalizeClass(["tao-input-shell", {
|
|
360
|
+
[`tao-input-shell--${__props.variant}`]: __props.variant !== "outline",
|
|
359
361
|
"tao-input-shell--focused": focused.value,
|
|
360
362
|
"tao-input-shell--invalid": unref(invalid),
|
|
361
363
|
"tao-input-shell--disabled": __props.disabled,
|
|
@@ -387,7 +389,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
387
389
|
};
|
|
388
390
|
}
|
|
389
391
|
});
|
|
390
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-
|
|
392
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-5b617319"]]);
|
|
391
393
|
const _hoisted_1$13 = {
|
|
392
394
|
key: 0,
|
|
393
395
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
@@ -840,6 +842,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
840
842
|
error: { type: Boolean, default: false },
|
|
841
843
|
size: {},
|
|
842
844
|
placeholder: { default: "" },
|
|
845
|
+
variant: { default: "outline" },
|
|
843
846
|
controls: { type: Boolean, default: true },
|
|
844
847
|
incrementLabel: {},
|
|
845
848
|
decrementLabel: {}
|
|
@@ -964,7 +967,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
964
967
|
const atMax = computed(() => props.max !== void 0 && (props.modelValue ?? 0) >= props.max);
|
|
965
968
|
return (_ctx, _cache) => {
|
|
966
969
|
return openBlock(), createElementBlock("div", mergeProps(unref(rootAttrs)(), {
|
|
967
|
-
class: ["tao-input-number", [unref(sizeClass)(__props.size), { "tao-input-number--invalid": unref(invalid), "tao-input-number--controls": __props.controls }]]
|
|
970
|
+
class: ["tao-input-number", [unref(sizeClass)(__props.size), { [`tao-input-number--${__props.variant}`]: __props.variant !== "outline", "tao-input-number--invalid": unref(invalid), "tao-input-number--controls": __props.controls }]]
|
|
968
971
|
}), [
|
|
969
972
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
970
973
|
id: unref(controlId),
|
|
@@ -1020,7 +1023,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1020
1023
|
};
|
|
1021
1024
|
}
|
|
1022
1025
|
});
|
|
1023
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-
|
|
1026
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-dc5bb759"]]);
|
|
1024
1027
|
const _hoisted_1$11 = ["aria-label", "disabled"];
|
|
1025
1028
|
const _hoisted_2$T = { "aria-hidden": "true" };
|
|
1026
1029
|
const _hoisted_3$L = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
@@ -8172,6 +8175,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8172
8175
|
clearText: {},
|
|
8173
8176
|
clearable: { type: Boolean, default: true },
|
|
8174
8177
|
size: {},
|
|
8178
|
+
variant: { default: "outline" },
|
|
8175
8179
|
allowCreate: { type: Boolean, default: false }
|
|
8176
8180
|
},
|
|
8177
8181
|
emits: ["update:modelValue", "change", "create"],
|
|
@@ -8489,6 +8493,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8489
8493
|
class: ["tao-combobox", [
|
|
8490
8494
|
unref(sizeClass)(__props.size),
|
|
8491
8495
|
{
|
|
8496
|
+
[`tao-combobox--${__props.variant}`]: __props.variant !== "outline",
|
|
8492
8497
|
"tao-combobox--open": open.value,
|
|
8493
8498
|
"tao-combobox--invalid": unref(invalid),
|
|
8494
8499
|
"tao-combobox--disabled": __props.disabled
|
|
@@ -8599,7 +8604,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8599
8604
|
};
|
|
8600
8605
|
}
|
|
8601
8606
|
});
|
|
8602
|
-
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
8607
|
+
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-0961b3a0"]]);
|
|
8603
8608
|
const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
8604
8609
|
function formatTaoDateIso(parts) {
|
|
8605
8610
|
return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
|