Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
84339d5
toast: стилизация и сторисы
Mar 18, 2026
3fe1364
фикс наложения при вызове компонента в Docs
Apr 6, 2026
8f3f50e
фикс изменения ширины при вызове компонентов в разделе Width
Apr 6, 2026
1a1ba46
добавлен блок с примерами для сторис с размерами
Apr 8, 2026
2c543b0
фикс конфликтов
Apr 8, 2026
5d542cc
toast: ширина через CSS-классы вместо перезаписи переменной
Apr 18, 2026
afb7ed1
toast: исправить форматирование prettier в SIZES
Apr 18, 2026
f6989d1
toast: размеры через дизайн-токены messages.{sm,lg,xlg}.width
Apr 20, 2026
eaa8ade
message/toast: Полная настройка (донастройка) компонента, обёртки и S…
anatoly-rodin May 19, 2026
fd5f0c0
toast: экспорт usePBlockToast и PBlockToastMessageIcon из primeBlocks…
May 20, 2026
3d7e50d
toast: импорты из @cdek-it/vue-ui-kit в примерах кода и из @/primeBlo…
May 20, 2026
13f04fe
message/toast: Донастройка icon в конфиге вызова toast.
anatoly-rodin May 20, 2026
f493c3b
toast: fix detailColor — использовать токен соответствующего severity…
May 20, 2026
b758556
message/toast: Донастройка интерактива для пропса width.
anatoly-rodin May 22, 2026
931474a
файл лицензии MIT
May 29, 2026
3078e9d
message/toast: Добавил иконки таблера.
anatoly-rodin May 31, 2026
2402407
message/toast: Перенастройка иконок, Stories, стилей.
anatoly-rodin May 31, 2026
14171cf
Merge branch 'main' into messages/toast
anatoly-rodin Jun 2, 2026
2d2dc6c
Merge remote-tracking branch 'origin/storybook-update' into messages/…
anatoly-rodin Jun 2, 2026
221496f
Merge remote-tracking branch 'origin/storybook-update' into messages/…
anatoly-rodin Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PrimeVue from 'primevue/config';
import { getPrimeVueConfig } from '@/plugins/prime';
import Tooltip from 'primevue/tooltip';
import ConfirmationService from 'primevue/confirmationservice';
import ToastService from 'primevue/toastservice';

import '../src/tailwind.css';
import './themes/base.css';
Expand Down Expand Up @@ -45,6 +46,7 @@ setup((app) => {
registerToastification(app);
app.use(PrimeVue, mergedConfig);
app.use(ConfirmationService);
app.use(ToastService);
app.directive('tooltip', Tooltip);
});

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 CDEK-IT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
78 changes: 78 additions & 0 deletions src/plugins/prime/stories/Toast/Toast.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { Meta, Canvas, Controls, Title, Description } from '@storybook/addon-docs/blocks';
import * as ToastStories from './Toast.stories';

<Meta of={ToastStories} />

<Title />
<Description />

## Варианты использования

<br />

### Базовый
Базовый вариант `Toast`. Используйте таблицу ниже для настройки пропсов. Кнопки внизу позволяют показать живые тосты.
Иконки для каждого типа `Toast` уже "вшиты", но это поведение можно изменить (см. ниже).
<Canvas of={ToastStories.Default} />

#### Полный список аргументов и событий компонента.
<Controls of={ToastStories.Default} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут можно сделать width селектором? Чтобы рукчами не вводить

Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сейчас вообще объект ждёт

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Skosov Доработал этот момент. Теперь интерактивно на всех Story можно менять размер Toast.


<hr />

### С кнопкой закрытия
Базовый вариант `Toast` с кнопкой закрытия.
<Canvas of={ToastStories.DefaultButton} />

### Кастомный контент
`Toast` с кастомным контейнером.
<Canvas of={ToastStories.WithContent} />

#### Аргументы и события
<Controls of={ToastStories.WithContent}/>

<hr />

### С кастомным контейнером и кнопкой закрытия
`Toast` с кастомным контейнером и кнопкой закрытия.
<Canvas of={ToastStories.WithContentAndCloseButton} />

#### Аргументы и события
<Controls of={ToastStories.WithContentAndCloseButton} />

<hr />

### Ширина Toast
Ширина `Toast` задаётся через `props` — `width`. Доступные значения:
<details>
<summary>Примеры кода</summary>

- `sm` (20rem)
```html dark
<PBlockToast width="sm" />
```
- `md` (25rem, по умолчанию)
```html dark
<PBlockToast />
```
- `lg` (30rem)
```html dark
<PBlockToast width="lg" />
```
- `xlg` (45rem)
```html dark
<PBlockToast width="xlg" />
```
</details>

<Canvas of={ToastStories.Width} />

#### Аргументы и события
<Controls of={ToastStories.Width} />

### Позиция
Демонстрация всех доступных позиций `Toast`. Каждая кнопка показывает уведомление в соответствующей позиции.
<Canvas of={ToastStories.Position} />

#### Аргументы и события
<Controls of={ToastStories.Position} />
Loading
Loading