Skip to content

Commit 501d30c

Browse files
committed
adapt docs
1 parent c2eac81 commit 501d30c

File tree

4 files changed

+84
-154
lines changed

4 files changed

+84
-154
lines changed

docs/components/button.md

Lines changed: 35 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -17,71 +17,43 @@ npx @capsuleui/core add Button
1717
### Core Variants
1818

1919
<div class="component-demo">
20-
<capsule-button variant="primary">Primary</capsule-button>
20+
<capsule-button variant="default">Default</capsule-button>
2121
<capsule-button variant="secondary">Secondary</capsule-button>
2222
<capsule-button variant="outline">Outline</capsule-button>
23-
<capsule-button variant="text">Text</capsule-button>
23+
<capsule-button variant="ghost">Ghost</capsule-button>
24+
<capsule-button variant="link">Link</capsule-button>
25+
<capsule-button variant="destructive">Destructive</capsule-button>
2426
</div>
2527

2628
```html
27-
<capsule-button variant="primary">Primary</capsule-button>
29+
<capsule-button variant="default">Default</capsule-button>
2830
<capsule-button variant="secondary">Secondary</capsule-button>
2931
<capsule-button variant="outline">Outline</capsule-button>
30-
<capsule-button variant="text">Text</capsule-button>
31-
```
32-
33-
#### Semantic Colors
34-
35-
<div class="component-demo">
36-
<capsule-button variant="success">Success</capsule-button>
37-
<capsule-button variant="error">Error</capsule-button>
38-
<capsule-button variant="warning">Warning</capsule-button>
39-
<capsule-button variant="info">Info</capsule-button>
40-
</div>
41-
42-
```html
43-
<capsule-button variant="success">Success</capsule-button>
44-
<capsule-button variant="error">Error</capsule-button>
45-
<capsule-button variant="warning">Warning</capsule-button>
46-
<capsule-button variant="info">Info</capsule-button>
32+
<capsule-button variant="ghost">Ghost</capsule-button>
33+
<capsule-button variant="link">Link</capsule-button>
34+
<capsule-button variant="destructive">Destructive</capsule-button>
4735
```
4836

4937
### Sizes
5038

5139
<div class="component-demo">
52-
<capsule-button size="xs">Extra Small</capsule-button>
5340
<capsule-button size="sm">Small</capsule-button>
54-
<capsule-button size="md">Medium</capsule-button>
41+
<capsule-button size="default">Default</capsule-button>
5542
<capsule-button size="lg">Large</capsule-button>
43+
<capsule-button size="icon">
44+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
45+
<path d="M8 0L10.5 5.5L16 8L10.5 10.5L8 16L5.5 10.5L0 8L5.5 5.5L8 0Z"/>
46+
</svg>
47+
</capsule-button>
5648
</div>
5749

5850
```html
59-
<capsule-button size="xs">Extra Small</capsule-button>
6051
<capsule-button size="sm">Small</capsule-button>
61-
<capsule-button size="md">Medium</capsule-button>
52+
<capsule-button size="default">Default</capsule-button>
6253
<capsule-button size="lg">Large</capsule-button>
63-
```
64-
65-
### Rounded
66-
67-
<div class="component-demo">
68-
<capsule-button rounded="none">None</capsule-button>
69-
<capsule-button rounded="xs">Extra Small</capsule-button>
70-
<capsule-button rounded="sm">Small</capsule-button>
71-
<capsule-button rounded="md">Medium</capsule-button>
72-
<capsule-button rounded="lg">Large</capsule-button>
73-
<capsule-button rounded="xl">XL</capsule-button>
74-
<capsule-button rounded="full">Full</capsule-button>
75-
</div>
76-
77-
```html
78-
<capsule-button rounded="none">None</capsule-button>
79-
<capsule-button rounded="xs">Extra Small</capsule-button>
80-
<capsule-button rounded="sm">Small</capsule-button>
81-
<capsule-button rounded="md">Medium</capsule-button>
82-
<capsule-button rounded="lg">Large</capsule-button>
83-
<capsule-button rounded="xl">XL</capsule-button>
84-
<capsule-button rounded="full">Full</capsule-button>
54+
<capsule-button size="icon">
55+
<svg>...</svg>
56+
</capsule-button>
8557
```
8658

8759
### States
@@ -100,42 +72,32 @@ npx @capsuleui/core add Button
10072

10173
### Attributes
10274

103-
| Attribute | Type | Default | Description |
104-
| ---------- | ------- | --------- | --------------------------------------- |
105-
| `variant` | string | `primary` | Button style |
106-
| `size` | string | `md` | Button size |
107-
| `disabled` | boolean | `false` | Disabled state |
108-
| `type` | string | `button` | Button type (`button`/`submit`/`reset`) |
109-
| `rounded` | string | `md` | Border radius degree |
75+
| Attribute | Type | Default | Description |
76+
| ---------- | ------- | ---------- | --------------------------------------- |
77+
| `variant` | string | `default` | Button style variant |
78+
| `size` | string | `default` | Button size |
79+
| `disabled` | boolean | `false` | Disabled state |
80+
| `type` | string | `button` | Button type (`button`/`submit`/`reset`) |
11081

11182
### Allowed Values
11283

11384
- **variant:**
11485

115-
- `primary` — Primary action
86+
- `default` — Primary action (default)
11687
- `secondary` — Secondary action
117-
- `outline` — Outlined button
118-
- `text` — Text-only button
119-
- `success` — Success action
120-
- `error` — Error action
121-
- `warning` — Warning action
122-
- `info` — Informational action
88+
- `outline` — Outlined button with border
89+
- `ghost` — Transparent button with hover effect
90+
- `link` — Link-style button with underline
91+
- `destructive` — Destructive/danger action
12392

12493
- **size:**
12594

126-
- `xs` — Extra small
127-
- `sm` — Small
128-
- `md` — Medium
129-
- `lg` — Large
130-
131-
- **rounded:**
132-
- `none` — No rounding
133-
- `xs` - Extra Small
134-
- `sm` — Small
135-
- `md` — Medium
136-
- `lg` — Large
137-
- `xl` — Extra large
138-
- `full` — Full
95+
- `default` — Default size (2.25rem height)
96+
- `sm` — Small (2rem height)
97+
- `lg` — Large (2.5rem height)
98+
- `icon` — Icon button (2.25rem × 2.25rem)
99+
- `icon-sm` — Small icon button (2rem × 2rem)
100+
- `icon-lg` — Large icon button (2.5rem × 2.5rem)
139101

140102
## Events
141103

docs/components/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,19 @@ CapsuleUI provides a collection of modern, unstyled web components that you can
2828
### Data Display
2929

3030
- **[Badge](/components/badge)** - A badge component
31-
- **[Chip](/components/chip)** - A chip component
3231
- **[Rating](/components/rating)** - A rating component
3332
- **[Divider](/components/divider)** - A divider component
3433
- **[ScrollArea](/components/scroll-area)** - A custom scrollable area component
3534
- **[Icon](/components/icon)** - Icon component with Iconify integration
35+
- **[AspectRatio](/components/aspect-ratio)** - A component for maintaining aspect ratios
36+
- **[Kbd](/components/kbd)** - A keyboard key display component
37+
- **[Calendar](/components/calendar)** - A calendar date picker component
38+
- **[Comparison](/components/comparison)** - A before/after image comparison component
3639

3740
### Overlay
3841

3942
- **[Tooltip](/components/tooltip)** - A tooltip component
40-
- **[Alert](/components/alert)** - An alert dialog component
43+
- **[Tour](/components/tour)** - A guided tour component
4144

4245
### Data Entry
4346

docs/ru/components/button.md

Lines changed: 39 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -17,71 +17,43 @@ npx @capsuleui/core add Button
1717
### Основные варианты
1818

1919
<div class="component-demo">
20-
<capsule-button variant="primary">Primary</capsule-button>
21-
<capsule-button variant="secondary">Secondary</capsule-button>
22-
<capsule-button variant="outline">Outline</capsule-button>
23-
<capsule-button variant="text">Text</capsule-button>
20+
<capsule-button variant="default">По умолчанию</capsule-button>
21+
<capsule-button variant="secondary">Вторичный</capsule-button>
22+
<capsule-button variant="outline">Контурный</capsule-button>
23+
<capsule-button variant="ghost">Прозрачный</capsule-button>
24+
<capsule-button variant="link">Ссылка</capsule-button>
25+
<capsule-button variant="destructive">Опасный</capsule-button>
2426
</div>
2527

2628
```html
27-
<capsule-button variant="primary">Primary</capsule-button>
28-
<capsule-button variant="secondary">Secondary</capsule-button>
29-
<capsule-button variant="outline">Outline</capsule-button>
30-
<capsule-button variant="text">Text</capsule-button>
31-
```
32-
33-
#### Семантические цвета
34-
35-
<div class="component-demo">
36-
<capsule-button variant="success">Success</capsule-button>
37-
<capsule-button variant="error">Error</capsule-button>
38-
<capsule-button variant="warning">Warning</capsule-button>
39-
<capsule-button variant="info">Info</capsule-button>
40-
</div>
41-
42-
```html
43-
<capsule-button variant="success">Success</capsule-button>
44-
<capsule-button variant="error">Error</capsule-button>
45-
<capsule-button variant="warning">Warning</capsule-button>
46-
<capsule-button variant="info">Info</capsule-button>
29+
<capsule-button variant="default">По умолчанию</capsule-button>
30+
<capsule-button variant="secondary">Вторичный</capsule-button>
31+
<capsule-button variant="outline">Контурный</capsule-button>
32+
<capsule-button variant="ghost">Прозрачный</capsule-button>
33+
<capsule-button variant="link">Ссылка</capsule-button>
34+
<capsule-button variant="destructive">Опасный</capsule-button>
4735
```
4836

4937
### Размеры
5038

5139
<div class="component-demo">
52-
<capsule-button size="xs">Extra Small</capsule-button>
53-
<capsule-button size="sm">Small</capsule-button>
54-
<capsule-button size="md">Medium</capsule-button>
55-
<capsule-button size="lg">Large</capsule-button>
56-
</div>
57-
58-
```html
59-
<capsule-button size="xs">Extra Small</capsule-button>
60-
<capsule-button size="sm">Small</capsule-button>
61-
<capsule-button size="md">Medium</capsule-button>
62-
<capsule-button size="lg">Large</capsule-button>
63-
```
64-
65-
### Скругления
66-
67-
<div class="component-demo">
68-
<capsule-button rounded="none">None</capsule-button>
69-
<capsule-button rounded="xs">Extra Small</capsule-button>
70-
<capsule-button rounded="sm">Small</capsule-button>
71-
<capsule-button rounded="md">Medium</capsule-button>
72-
<capsule-button rounded="lg">Large</capsule-button>
73-
<capsule-button rounded="xl">XL</capsule-button>
74-
<capsule-button rounded="full">Full</capsule-button>
40+
<capsule-button size="sm">Маленький</capsule-button>
41+
<capsule-button size="default">По умолчанию</capsule-button>
42+
<capsule-button size="lg">Большой</capsule-button>
43+
<capsule-button size="icon">
44+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
45+
<path d="M8 0L10.5 5.5L16 8L10.5 10.5L8 16L5.5 10.5L0 8L5.5 5.5L8 0Z"/>
46+
</svg>
47+
</capsule-button>
7548
</div>
7649

7750
```html
78-
<capsule-button rounded="none">None</capsule-button>
79-
<capsule-button rounded="xs">Extra Small</capsule-button>
80-
<capsule-button rounded="sm">Small</capsule-button>
81-
<capsule-button rounded="md">Medium</capsule-button>
82-
<capsule-button rounded="lg">Large</capsule-button>
83-
<capsule-button rounded="xl">XL</capsule-button>
84-
<capsule-button rounded="full">Full</capsule-button>
51+
<capsule-button size="sm">Маленький</capsule-button>
52+
<capsule-button size="default">По умолчанию</capsule-button>
53+
<capsule-button size="lg">Большой</capsule-button>
54+
<capsule-button size="icon">
55+
<svg>...</svg>
56+
</capsule-button>
8557
```
8658

8759
### Состояния
@@ -102,40 +74,30 @@ npx @capsuleui/core add Button
10274

10375
| Атрибут | Тип | По умолчанию | Описание |
10476
| ---------- | ------- | ------------ | -------------------------------- |
105-
| `variant` | string | `primary` | Стиль кнопки |
106-
| `size` | string | `md` | Размер кнопки |
77+
| `variant` | string | `default` | Вариант стиля кнопки |
78+
| `size` | string | `default` | Размер кнопки |
10779
| `disabled` | boolean | `false` | Отключенное состояние |
10880
| `type` | string | `button` | Тип кнопки (button/submit/reset) |
109-
| `rounded` | string | `md` | Степень скругления углов |
11081

11182
### Доступные значения
11283

11384
- **variant**:
11485

115-
- `primary` — Основное действие
86+
- `default` — Основное действие (по умолчанию)
11687
- `secondary` — Второстепенное действие
117-
- `outline` — Контурная кнопка
118-
- `text` — Текстовая кнопка
119-
- `success` — Успешное действие
120-
- `error` — Ошибочное действие
121-
- `warning` — Предупреждение
122-
- `info` — Информационное действие
88+
- `outline` — Контурная кнопка с границей
89+
- `ghost` — Прозрачная кнопка с эффектом при наведении
90+
- `link` — Кнопка в стиле ссылки с подчеркиванием
91+
- `destructive` — Опасное/деструктивное действие
12392

12493
- **size**:
12594

126-
- `xs` — Очень маленький
127-
- `sm` — Маленький
128-
- `md` — Средний
129-
- `lg` — Большой
130-
131-
- **rounded**:
132-
- `none` — Без скруглений
133-
- `xs` - Очень маленькое
134-
- `sm` — Маленькое
135-
- `md` — Среднее
136-
- `lg` — Большое
137-
- `xl` — Очень большое
138-
- `full` — Полное
95+
- `default` — Размер по умолчанию (высота 2.25rem)
96+
- `sm` — Маленький (высота 2rem)
97+
- `lg` — Большой (высота 2.5rem)
98+
- `icon` — Кнопка-иконка (2.25rem × 2.25rem)
99+
- `icon-sm` — Маленькая кнопка-иконка (2rem × 2rem)
100+
- `icon-lg` — Большая кнопка-иконка (2.5rem × 2.5rem)
139101

140102
## События
141103

docs/ru/components/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,19 @@ CapsuleUI предоставляет коллекцию современных
2828
### Отображение данных
2929

3030
- **[Badge](/ru/components/badge)** - Компонент значка
31-
- **[Chip](/ru/components/chip)** - Компонент чипа
3231
- **[Rating](/ru/components/rating)** - Компонент рейтинга
3332
- **[Divider](/ru/components/divider)** - Компонент разделителя
3433
- **[ScrollArea](/ru/components/scroll-area)** - Компонент области прокрутки
3534
- **[Icon](/ru/components/icon)** - Компонент иконок с интеграцией Iconify
35+
- **[AspectRatio](/ru/components/aspect-ratio)** - Компонент для поддержания соотношения сторон
36+
- **[Kbd](/ru/components/kbd)** - Компонент отображения клавиш клавиатуры
37+
- **[Calendar](/ru/components/calendar)** - Компонент выбора даты
38+
- **[Comparison](/ru/components/comparison)** - Компонент сравнения изображений до/после
3639

3740
### Всплывающие элементы
3841

3942
- **[Tooltip](/ru/components/tooltip)** - Компонент подсказки
40-
- **[Alert](/ru/components/alert)** - Компонент диалога предупреждения
43+
- **[Tour](/ru/components/tour)** - Компонент интерактивного тура
4144

4245
### Ввод данных
4346

0 commit comments

Comments
 (0)