@1337exp/taoui 1.3.5 → 1.5.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 +24 -4
- package/README.ru.md +24 -4
- package/dist/index.cjs +742 -334
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +255 -88
- package/dist/index.mjs +743 -335
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +395 -103
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ change a handful of CSS variables and the whole kit follows.
|
|
|
10
10
|
### Basics
|
|
11
11
|
|
|
12
12
|
- **TaoBlock** — container with padding and radius
|
|
13
|
-
- **TaoButton** — `primary` / `secondary` / `ghost` / `danger
|
|
13
|
+
- **TaoButton** — `primary` / `secondary` / `ghost` / `text` / `danger`. `tone` tints ghost and text (danger, success, warning, info)
|
|
14
14
|
- **TaoCard** — card with cover / header / footer slots. `#cover` can be a photo or `TaoCarousel`
|
|
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)
|
|
@@ -20,7 +20,7 @@ change a handful of CSS variables and the whole kit follows.
|
|
|
20
20
|
- **TaoSpoiler** — disclosure. `v-model` and `aria-expanded`. Neighbours do not close each other
|
|
21
21
|
- **TaoSpoilerGroup** — accordion: `v-model` is the open panel key (`null` = all closed); spoilers take `name`
|
|
22
22
|
- **TaoTabs** — tabbed sections
|
|
23
|
-
- **TaoTooltip** — hover hint
|
|
23
|
+
- **TaoTooltip** — hover hint. `top` / `bottom` / `left` / `right`, flips at the viewport edge
|
|
24
24
|
- **TaoPopover** — click panel with any slot content, Esc and outside click. Not a tooltip, not an action menu
|
|
25
25
|
|
|
26
26
|
### Layout
|
|
@@ -36,7 +36,8 @@ change a handful of CSS variables and the whole kit follows.
|
|
|
36
36
|
|
|
37
37
|
- **TaoCheckbox** — checkbox with v-model, pre/post slots, and `indeterminate`
|
|
38
38
|
- **TaoSwitch** — boolean toggle (`role="switch"`)
|
|
39
|
-
- **TaoRadio** / **TaoRadioGroup** —
|
|
39
|
+
- **TaoRadio** / **TaoRadioGroup** — classic radios: longer labels, can stack vertically
|
|
40
|
+
- **TaoSegmented** / **TaoSegmentedOption** — compact exclusive choice among 2–5 short options. Not tabs
|
|
40
41
|
- **TaoSelect** — dropdown with keyboard, same chrome as Input. Clear via “Clear” in the list or Delete
|
|
41
42
|
- **TaoCombobox** — Select with a field: type to filter, `allow-create` writes a custom value into `v-model`, `create` lets the parent append the list
|
|
42
43
|
- **TaoDate** — a single day: `YYYY-MM-DD`, no time, no timezone. Calendar popup like Select
|
|
@@ -59,7 +60,7 @@ change a handful of CSS variables and the whole kit follows.
|
|
|
59
60
|
- **TaoCounter** — flipping digits (not an input)
|
|
60
61
|
- **TaoCarousel** — strip: full slide with `autoplay`, card with `peek`, row with `per-view`. Arrows via `controls` or `#prev` / `#next`, dots via `dots`
|
|
61
62
|
- **TaoAvatar** — photo or initials, sizes `small` / `medium` / `large`. Status `dot` and `count`
|
|
62
|
-
- **TaoTag** — badge with tones (
|
|
63
|
+
- **TaoTag** — badge with tones. `#prefix` (avatar), `closable` dismisses the chip, `flat` drops the border
|
|
63
64
|
- **TaoAlert** — inline page/form banner (success / error / warning / info)
|
|
64
65
|
- **TaoProgress** — static bar (`progress` in %). Percent centered on top, or `showPercentage="right"`; `#left` / `#right` slots are captions, then the percent sits in parentheses on the right. `false` hides it. Width is `minWidth` / `maxWidth`, not the value domain
|
|
65
66
|
- **TaoLoader** — four-dot spinner
|
|
@@ -232,15 +233,34 @@ confirm.defaults({ ok: 'Yes', cancel: 'No' })
|
|
|
232
233
|
<TaoRadio value="pro" label="Pro" />
|
|
233
234
|
</TaoRadioGroup>
|
|
234
235
|
|
|
236
|
+
<TaoSegmented v-model="period" legend="Period">
|
|
237
|
+
<TaoSegmentedOption value="week">Week</TaoSegmentedOption>
|
|
238
|
+
<TaoSegmentedOption value="month">Month</TaoSegmentedOption>
|
|
239
|
+
<TaoSegmentedOption value="year">Year</TaoSegmentedOption>
|
|
240
|
+
</TaoSegmented>
|
|
241
|
+
|
|
235
242
|
<TaoAlert type="warning" title="Draft">Save before you leave.</TaoAlert>
|
|
236
243
|
```
|
|
237
244
|
|
|
245
|
+
`TaoSegmented` is a short exclusive choice with every option visible. It is not page navigation — that is `TaoTabs`. Longer labels or more than 5–6 items belong in `TaoRadioGroup` or `TaoSelect`.
|
|
246
|
+
|
|
238
247
|
`TaoSelect` opens from the keyboard (arrows, Enter, Esc); the list flips at the viewport edge. Delete or “Clear” at the bottom of the list resets the value to `null`.
|
|
239
248
|
|
|
240
249
|
`TaoCombobox` is the same menu with a field. Typing filters options. `allow-create` writes the typed string into `v-model` when there is no exact match. The list does not mutate itself: listen to `create` and append an option from the parent.
|
|
241
250
|
|
|
242
251
|
`TaoFormField` also wraps `TaoTextarea` and `TaoCheckbox` — id, hint, and error are forwarded for you.
|
|
243
252
|
|
|
253
|
+
`TaoTag` can be a chip: `#prefix` on the left (usually `TaoAvatar`), `closable` draws a cross and emits `close`. The close click does not bubble. `flat` drops the border and keeps the fill.
|
|
254
|
+
|
|
255
|
+
```vue
|
|
256
|
+
<TaoTag type="neutral" closable @close="remove">
|
|
257
|
+
<template #prefix>
|
|
258
|
+
<TaoAvatar name="Anna Kozlova" size="small" />
|
|
259
|
+
</template>
|
|
260
|
+
Anna Kozlova
|
|
261
|
+
</TaoTag>
|
|
262
|
+
```
|
|
263
|
+
|
|
244
264
|
## Table and pagination
|
|
245
265
|
|
|
246
266
|
The table renders what you pass in: it does not slice or sort the data. That works for both server-side and client-side paging — the page is cut outside.
|
package/README.ru.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
### Базовые
|
|
11
11
|
|
|
12
12
|
- **TaoBlock** — базовый контейнер с настраиваемыми отступами и скруглением
|
|
13
|
-
- **TaoButton** —
|
|
13
|
+
- **TaoButton** — кнопка: `primary` / `secondary` / `ghost` / `text` / `danger`. `tone` красит ghost и text (danger, success, warning, info)
|
|
14
14
|
- **TaoCard** — карточка со слотами cover / header / footer. В `#cover` — фото или `TaoCarousel`
|
|
15
15
|
- **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
|
|
16
16
|
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
- **TaoSpoiler** — раскрывающийся блок. `v-model` и `aria-expanded`. Несколько подряд сами друг друга не закрывают
|
|
21
21
|
- **TaoSpoilerGroup** — аккордеон: `v-model` — ключ открытой панели (`null` — все закрыты), у спойлера `name`
|
|
22
22
|
- **TaoTabs** — вкладки для переключения между секциями контента
|
|
23
|
-
- **TaoTooltip** — всплывающая подсказка при
|
|
23
|
+
- **TaoTooltip** — всплывающая подсказка при наведении. `top` / `bottom` / `left` / `right`, у края экрана переворачивается
|
|
24
24
|
- **TaoPopover** — панель по клику: слот с любым контентом, Esc и клик снаружи. Не тултип и не меню действий
|
|
25
25
|
|
|
26
26
|
### Layout
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
|
|
37
37
|
- **TaoCheckbox** — чекбокс с v-model, слотами pre/post и `indeterminate` (частично выбран)
|
|
38
38
|
- **TaoSwitch** — переключатель для булевых настроек (`role="switch"`)
|
|
39
|
-
- **TaoRadio** / **TaoRadioGroup** —
|
|
39
|
+
- **TaoRadio** / **TaoRadioGroup** — классические радиокнопки: длинные подписи, можно столбиком
|
|
40
|
+
- **TaoSegmented** / **TaoSegmentedOption** — компактный выбор из 2–5 коротких вариантов. Не вкладки
|
|
40
41
|
- **TaoSelect** — выпадающий список с клавиатурой, тот же визуал, что у Input. Сброс — «Очистить» в списке или Delete
|
|
41
42
|
- **TaoCombobox** — Select с полем: фильтр по вводу, `allow-create` пишет своё в `v-model`, `create` — чтобы родитель дополнил список
|
|
42
43
|
- **TaoDate** — один день: `YYYY-MM-DD`, без часов и пояса. Календарь как у Select
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
- **TaoCounter** — витрина числа с переворотом цифр (не инпут)
|
|
60
61
|
- **TaoCarousel** — лента: целый слайд с `autoplay`, карточка с `peek`, полоса с `per-view`. Стрелки через `controls` или `#prev` / `#next`, точки — `dots`
|
|
61
62
|
- **TaoAvatar** — фото или инициалы, размеры `small` / `medium` / `large`. Точка `dot` и счётчик `count`
|
|
62
|
-
- **TaoTag** — тег/бейдж со
|
|
63
|
+
- **TaoTag** — тег/бейдж со статусами. `#prefix` (аватар), `closable` убирает чип, `flat` — без рамки
|
|
63
64
|
- **TaoAlert** — инлайн-баннер страницы или ошибки формы (success / error / warning / info)
|
|
64
65
|
- **TaoProgress** — статичная полоса (`progress` в %). Проценты сверху по центру или `showPercentage="right"` справа; слоты `#left` / `#right` — подписи, тогда процент справа в скобках. `false` прячет. Ширина — `minWidth` / `maxWidth`, не диапазон значения
|
|
65
66
|
- **TaoLoader** — анимированный лоадер (четыре точки)
|
|
@@ -233,15 +234,34 @@ confirm.defaults({ ok: 'Yes', cancel: 'No' })
|
|
|
233
234
|
<TaoRadio value="pro" label="Pro" />
|
|
234
235
|
</TaoRadioGroup>
|
|
235
236
|
|
|
237
|
+
<TaoSegmented v-model="period" legend="Период">
|
|
238
|
+
<TaoSegmentedOption value="week">Неделя</TaoSegmentedOption>
|
|
239
|
+
<TaoSegmentedOption value="month">Месяц</TaoSegmentedOption>
|
|
240
|
+
<TaoSegmentedOption value="year">Год</TaoSegmentedOption>
|
|
241
|
+
</TaoSegmented>
|
|
242
|
+
|
|
236
243
|
<TaoAlert type="warning" title="Черновик">Сохраните, прежде чем уйти.</TaoAlert>
|
|
237
244
|
```
|
|
238
245
|
|
|
246
|
+
`TaoSegmented` — короткий взаимоисключающий выбор, все варианты видны сразу. Не для навигации по страницам: это `TaoTabs`. Длинные подписи или больше 5–6 пунктов — `TaoRadioGroup` или `TaoSelect`.
|
|
247
|
+
|
|
239
248
|
`TaoSelect` открывается с клавиатуры (стрелки, Enter, Esc), список переворачивается у края экрана. Delete или «Очистить» внизу списка сбрасывает значение в `null`.
|
|
240
249
|
|
|
241
250
|
`TaoCombobox` — то же меню, но с полем. Печатаете — варианты режутся. `allow-create` пишет введённое в `v-model`, если точного совпадения нет. Список сам не меняется: слушайте `create` и добавьте option снаружи.
|
|
242
251
|
|
|
243
252
|
`TaoFormField` также оборачивает `TaoTextarea` и `TaoCheckbox` — id, hint и error прокидываются сами.
|
|
244
253
|
|
|
254
|
+
`TaoTag` может быть чипом: `#prefix` слева (обычно `TaoAvatar`), `closable` рисует крестик и эмитит `close`. Клик по крестику наружу не всплывает. `flat` снимает рамку, заливка остаётся.
|
|
255
|
+
|
|
256
|
+
```vue
|
|
257
|
+
<TaoTag type="neutral" closable @close="remove">
|
|
258
|
+
<template #prefix>
|
|
259
|
+
<TaoAvatar name="Анна Козлова" size="small" />
|
|
260
|
+
</template>
|
|
261
|
+
Анна Козлова
|
|
262
|
+
</TaoTag>
|
|
263
|
+
```
|
|
264
|
+
|
|
245
265
|
## Таблица и пагинация
|
|
246
266
|
|
|
247
267
|
Таблица рендерит то, что передали: сама данные не режет и не сортирует. Это удобно и для серверной выборки, и для клиентской — страница режется снаружи.
|