@soroka282/migrant.ui-kit 0.0.19 → 0.0.21

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.
Files changed (36) hide show
  1. package/README.md +118 -3
  2. package/dist/migrant.ui-kit.es.js +2 -3
  3. package/dist/migrant.ui-kit.umd.js +5 -5
  4. package/dist/src/App.vue.d.ts +1 -22
  5. package/dist/src/components/UI/button/UIButton.stories.d.ts +1 -82
  6. package/dist/src/components/UI/button/UIButton.vue.d.ts +15 -7
  7. package/dist/src/components/UI/card/UICard.stories.d.ts +1 -59
  8. package/dist/src/components/UI/card/UICard.vue.d.ts +14 -6
  9. package/dist/src/components/UI/inputs/UIInput.stories.d.ts +1 -32
  10. package/dist/src/components/UI/inputs/UIInput.vue.d.ts +1 -1
  11. package/dist/src/components/UI/loader/UILoader.stories.d.ts +1 -14
  12. package/dist/src/components/UI/modal/UIModal.stories.d.ts +1 -1
  13. package/dist/src/components/UI/modal/UIModal.vue.d.ts +14 -4
  14. package/dist/src/components/UI/swiper/UISwiper.stories.d.ts +1 -31
  15. package/dist/src/components/UI/swiper/UISwiper.vue.d.ts +14 -6
  16. package/dist/src/components/UI/toaster/UIToastNotification.stories.d.ts +4 -0
  17. package/dist/src/components/UI/toaster/UIToaster.d.ts +14 -0
  18. package/dist/src/store/modal.store.d.ts +66 -66
  19. package/package.json +26 -5
  20. package/src/App.vue +5 -1
  21. package/src/assets/scss/common/swiper.scss +1 -1
  22. package/src/assets/scss/common/variables.scss +1 -1
  23. package/src/assets/scss/index.scss +1 -2
  24. package/src/assets/scss/mixins/flex.minix.scss +3 -3
  25. package/src/assets/scss/mixins/identation.mixin.scss +11 -7
  26. package/src/assets/scss/mixins/index.mixin.scss +1 -1
  27. package/src/assets/scss/mixins/typograph.mixin.scss +2 -2
  28. package/src/components/UI/button/UIButton.stories.ts +3 -3
  29. package/src/components/UI/card/UICard.stories.ts +2 -2
  30. package/src/components/UI/inputs/BaseMaskedInput.vue +0 -1
  31. package/src/components/UI/toaster/UIToastNotification.stories.ts +146 -0
  32. package/src/components/UI/toaster/UIToaster.ts +57 -0
  33. package/src/composables/useRequestHandler.ts +6 -6
  34. package/src/main.ts +4 -1
  35. package/src/style.css +13 -10
  36. package/src/App.vue.d.ts +0 -23
package/README.md CHANGED
@@ -1,5 +1,120 @@
1
- # Vue 3 + TypeScript + Vite
1
+ # 📖 Migrant UI Kit
2
2
 
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3
+ Библиотека переиспользуемых компонентов для проектов Migrant. Построена на [Vue 3](https://vuejs.org/) с поддержкой TypeScript и scoped-стилей.
4
+
5
+ ## 📦 Установка
6
+
7
+ ```bash
8
+ npm install @soroka282/migrant.ui-kit
9
+ # или
10
+ yarn add @soroka282/migrant.ui-kit
11
+ ```
12
+
13
+ ## 💻 Разработка
14
+
15
+ ```bash
16
+ npm run dev
17
+ ```
18
+
19
+ ## 🧪 Коммиты
20
+
21
+ Формат коммитов:
22
+
23
+ ```
24
+ <номер задачи>/<тип>(<scope>): <описание>
25
+ ```
26
+
27
+ Если задача в трекере отсутствует:
28
+
29
+ ```
30
+ <тип>(<scope>): <описание>
31
+ ```
32
+
33
+ ### Типы коммитов:
34
+
35
+ - `feat` — добавление нового функционала
36
+ - `fix` — исправление ошибок
37
+ - `docs` — изменение документации
38
+ - `build` — сборка и настройка инфраструктуры (vite, tsconfig и т.п.)
39
+
40
+ ### Примеры:
41
+
42
+ ```
43
+ EVOLVE-1/feat(useIframeHandler): добавлен новый composable метод
44
+ EVOLVE-2/fix(UIInput): обработка событий при потере фокуса
45
+ EVOLVE-3/build(vite.config): релиз библиотеки
46
+
47
+ feat(useIframeHandler): добавлен новый composable метод
48
+ build(vite.config): релиз библиотеки
49
+ ```
50
+
51
+ ## 🛠️ Сборка библиотеки
52
+
53
+ ```bash
54
+ npm run build # билд библиотеки
55
+ npm run ts # генерация .d.ts
56
+ npm run publish:npm # билд + публикация
57
+ ```
58
+
59
+ ## 📖 Storybook
60
+
61
+ ```bash
62
+ npm run storybook # запуск
63
+ npm run build:storybook # сборка
64
+ ```
65
+
66
+ ## 🥉 Используемые зависимости
67
+
68
+ - [Vue 3](https://vuejs.org/) — основной фреймворк
69
+ - [Pinia](https://pinia.vuejs.org/) — управление состоянием
70
+ - [Maska](https://beholdr.github.io/maska/) — маски ввода
71
+ - [Swiper](https://swiperjs.com/) — свайпер/карусель
72
+ - [Vue-toastification](https://vue-toastification.maronato.dev/) — уведомления (тосты)
73
+
74
+ ## 🛠️ Использование компонентов
75
+
76
+ ```
77
+ <script setup lang="ts">
78
+ import {
79
+ UIButton,
80
+ UIColor,
81
+ UIColorName,
82
+ UISize,
83
+ } from '@soroka282/migrant.ui-kit';
84
+ </script>
85
+
86
+ <template>
87
+ <UIButton
88
+ is-box-shadow
89
+ :size="UISize.S"
90
+ :color="UIColor[UIColorName.White]"
91
+ :bg-color="UIColor[UIColorName.PurpleMain]"
92
+ >
93
+ Кнопка
94
+ </UIButton>
95
+ </template>
96
+ ```
97
+
98
+ ## ⚙️ TypeScript автодополнение
99
+
100
+ Убедитесь, что `tsconfig.json` содержит:
101
+
102
+ ```json
103
+ {
104
+ "compilerOptions": {
105
+ "moduleResolution": "bundler",
106
+ "paths": {
107
+ "@soroka282/migrant.ui-kit": ["node_modules/@soroka282/migrant.ui-kit"]
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## 🎨 Глобальные стили (optional)
114
+
115
+ В `main.ts`:
116
+
117
+ ```ts
118
+ import '@soroka282/migrant.ui-kit/dist/style.css';
119
+ ```
4
120
 
5
- Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).