@soroka282/migrant.ui-kit 0.0.38 → 0.0.39

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 (101) hide show
  1. package/README.md +147 -147
  2. package/dist/List-Bfz0Zcqt.js +46 -0
  3. package/dist/index-CouJGyo3.js +6994 -0
  4. package/dist/index-T3jqfug4.js +3431 -0
  5. package/dist/migrant.ui-kit.es.js +32 -4734
  6. package/dist/migrant.ui-kit.umd.js +7 -3
  7. package/dist/src/App.vue.d.ts +1 -1
  8. package/dist/src/components/UI/button/UIButton.vue.d.ts +7 -12
  9. package/dist/src/components/UI/container/UIContainer.stories.d.ts +5 -0
  10. package/dist/src/components/UI/container/UIContainer.vue.d.ts +23 -0
  11. package/dist/src/components/UI/description/UIDescription.stories.d.ts +5 -0
  12. package/dist/src/components/UI/description/UIDescription.vue.d.ts +18 -0
  13. package/dist/src/components/UI/radioButton/UIRadioButton.stories.d.ts +5 -0
  14. package/dist/src/components/UI/radioButton/UIRadioButton.vue.d.ts +15 -0
  15. package/dist/src/components/UI/select/UISelect.stories.d.ts +18 -0
  16. package/dist/src/components/UI/select/UISelect.vue.d.ts +16 -0
  17. package/dist/src/components/UI/select/components/List.vue.d.ts +22 -0
  18. package/dist/src/components/UI/svg-icon/UISvgIcon.stories.d.ts +5 -0
  19. package/dist/src/components/UI/svg-icon/UISvgIcon.vue.d.ts +11 -0
  20. package/dist/src/components/UI/title/UITitle.stories.d.ts +5 -0
  21. package/dist/src/components/UI/title/UITitle.vue.d.ts +20 -0
  22. package/dist/src/components/modules/form/ModuleForm.vue.d.ts +25 -0
  23. package/dist/src/components/modules/form/ModulesForm.stories.d.ts +6 -0
  24. package/dist/src/components/modules/form/components/Field.vue.d.ts +9 -0
  25. package/dist/src/components/modules/form/types/inputType.d.ts +24 -0
  26. package/dist/src/index.d.ts +7 -0
  27. package/dist/src/store/modal.store.d.ts +7 -0
  28. package/dist/src/types/UI/ui-button.type.d.ts +20 -0
  29. package/dist/src/types/UI/ui-input.type.d.ts +2 -1
  30. package/dist/src/types/UI/ui-select.type.d.ts +15 -0
  31. package/dist/src/types/index.d.ts +1 -0
  32. package/package.json +115 -113
  33. package/scripts/postinstall.js +35 -35
  34. package/scripts/verify-commit.js +35 -35
  35. package/src/App.vue +52 -9
  36. package/src/assets/scss/common/swiper.scss +19 -19
  37. package/src/assets/scss/common/variables.scss +14 -14
  38. package/src/assets/scss/index.scss +8 -8
  39. package/src/assets/scss/mixins/flex.minix.scss +6 -6
  40. package/src/assets/scss/mixins/identation.mixin.scss +20 -20
  41. package/src/assets/scss/mixins/index.mixin.scss +2 -2
  42. package/src/assets/scss/mixins/typograph.mixin.scss +4 -4
  43. package/src/components/UI/button/UIButton.stories.ts +60 -60
  44. package/src/components/UI/button/UIButton.vue +127 -118
  45. package/src/components/UI/card/UICard.stories.ts +57 -57
  46. package/src/components/UI/card/UICard.vue +52 -52
  47. package/src/components/UI/container/UIContainer.stories.ts +28 -0
  48. package/src/components/UI/container/UIContainer.vue +24 -0
  49. package/src/components/UI/description/UIDescription.stories.ts +37 -0
  50. package/src/components/UI/description/UIDescription.vue +34 -0
  51. package/src/components/UI/inputs/BaseMaskedInput.vue +100 -100
  52. package/src/components/UI/inputs/UIInput.stories.ts +92 -92
  53. package/src/components/UI/inputs/UIInput.vue +187 -184
  54. package/src/components/UI/loader/UILoader.stories.ts +31 -31
  55. package/src/components/UI/loader/UILoader.vue +69 -69
  56. package/src/components/UI/modal/UIModal.stories.ts +39 -40
  57. package/src/components/UI/modal/UIModal.vue +307 -307
  58. package/src/components/UI/radioButton/UIRadioButton.stories.ts +45 -0
  59. package/src/components/UI/radioButton/UIRadioButton.vue +44 -0
  60. package/src/components/UI/select/UISelect.stories.ts +112 -0
  61. package/src/components/UI/select/UISelect.vue +163 -0
  62. package/src/components/UI/select/components/List.vue +107 -0
  63. package/src/components/UI/svg-icon/UISvgIcon.stories.ts +34 -0
  64. package/src/components/UI/svg-icon/UISvgIcon.vue +35 -0
  65. package/src/components/UI/swiper/UISwiper.stories.ts +33 -33
  66. package/src/components/UI/title/UITitle.stories.ts +35 -0
  67. package/src/components/UI/title/UITitle.vue +37 -0
  68. package/src/components/UI/toaster/UIToastNotification.stories.ts +146 -146
  69. package/src/components/UI/toaster/UIToaster.ts +57 -57
  70. package/src/components/modules/form/ModuleForm.vue +37 -0
  71. package/src/components/modules/form/ModulesForm.stories.ts +189 -0
  72. package/src/components/modules/form/components/Field.vue +129 -0
  73. package/src/components/modules/form/types/inputType.ts +25 -0
  74. package/src/composables/index.ts +2 -2
  75. package/src/composables/useIframeHandlers.ts +52 -52
  76. package/src/composables/useRequestHandler.ts +49 -49
  77. package/src/constants/index.ts +1 -1
  78. package/src/constants/ui-color.constant.ts +19 -19
  79. package/src/index.ts +24 -15
  80. package/src/main.ts +11 -12
  81. package/src/modules/auth/components/LinkMailStep.vue +59 -0
  82. package/src/modules/auth/components/auth-link/AuthLink.vue +55 -0
  83. package/src/modules/auth/components/auth-link/AuthLinkWrapper.vue +46 -0
  84. package/src/plugins/formatter.ts +136 -136
  85. package/src/plugins/global-install-plugin.ts +18 -13
  86. package/src/plugins/index.ts +3 -3
  87. package/src/plugins/plural-endings.ts +19 -19
  88. package/src/store/index.ts +1 -1
  89. package/src/store/modal.store.ts +83 -82
  90. package/src/style.css +81 -81
  91. package/src/types/UI/ui-button.type.ts +22 -0
  92. package/src/types/UI/ui-color.type.ts +22 -22
  93. package/src/types/UI/ui-input.type.ts +64 -63
  94. package/src/types/UI/ui-modal.type.ts +7 -7
  95. package/src/types/UI/ui-select.type.ts +16 -0
  96. package/src/types/UI/ui-size.type.ts +7 -7
  97. package/src/types/common.type.ts +2 -2
  98. package/src/types/index.ts +7 -6
  99. package/src/types/plugin.type.ts +6 -6
  100. package/src/utils/debounce.util.ts +7 -7
  101. package/src/utils/index.ts +1 -1
package/README.md CHANGED
@@ -1,147 +1,147 @@
1
- # 📖 Migrant UI Kit
2
-
3
- Библиотека переиспользуемых компонентов для проектов Migrant. Построена на [Vue 3](https://vuejs.org/) с поддержкой TypeScript и scoped-стилей.
4
-
5
- ## 📦 Установка и использование библиотеки
6
-
7
- ```bash
8
- npm install @soroka282/migrant.ui-kit
9
- ```
10
- или
11
- ```bash
12
- yarn add @soroka282/migrant.ui-kit
13
- ```
14
-
15
- ### 🛠️ Использование компонентов
16
-
17
- ```
18
- <script setup lang="ts">
19
- import {
20
- UIButton,
21
- UIColor,
22
- UIColorName,
23
- UISize,
24
- } from '@soroka282/migrant.ui-kit';
25
- </script>
26
-
27
- <template>
28
- <UIButton
29
- is-box-shadow
30
- :size="UISize.S"
31
- :color="UIColor[UIColorName.White]"
32
- :bg-color="UIColor[UIColorName.PurpleMain]"
33
- >
34
- Кнопка
35
- </UIButton>
36
- </template>
37
- ```
38
-
39
- ### ⚙️ TypeScript автодополнение
40
-
41
- Убедитесь, что `tsconfig.json` содержит:
42
-
43
- ```json
44
- {
45
- "compilerOptions": {
46
- "moduleResolution": "bundler",
47
- "paths": {
48
- "@soroka282/migrant.ui-kit": ["node_modules/@soroka282/migrant.ui-kit"]
49
- }
50
- }
51
- }
52
- ```
53
-
54
- ## 💻 Разработка
55
-
56
- #### Установка зависимостей
57
- ```bash
58
- npm i
59
- ```
60
- Проверить, что установился .husky и commit-msg (.husky/commit-msg) имеет:
61
- ```
62
- node scripts/verify-commit.js
63
- ```
64
-
65
- #### Запуск локального проекта:
66
- ```bash
67
- npm run dev
68
- ```
69
-
70
- #### Запуск локального сторибука
71
- ```bash
72
- npm run storybook
73
- ```
74
-
75
- ## 🧪 Коммиты
76
-
77
- Формат коммитов:
78
- ```
79
- <номер задачи>/<тип>(<scope>): <описание>
80
- ```
81
-
82
- Если задача в трекере отсутствует:
83
- ```
84
- <тип>(<scope>): <описание>
85
- ```
86
-
87
- #### Типы коммитов:
88
-
89
- - `feat` — добавление нового функционала
90
- - `fix` — исправление ошибок
91
- - `docs` — изменение документации
92
- - `build` — сборка и настройка инфраструктуры (vite, tsconfig и т.п.)
93
-
94
- #### Примеры:
95
-
96
- ```
97
- EVOLVE-1/feat(useIframeHandler): добавлен новый composable метод
98
- EVOLVE-2/fix(UIInput): обработка событий при потере фокуса
99
- EVOLVE-3/build(vite.config): релиз библиотеки
100
-
101
- feat(useIframeHandler): добавлен новый composable метод
102
- build(vite.config): релиз библиотеки
103
- ```
104
-
105
- ## 🛠️ Сборка библиотеки
106
-
107
- Билд библиотеки:
108
- ```bash
109
- npm run build
110
- ```
111
-
112
- Генерация .d.ts:
113
- ```bash
114
- npm run ts
115
- ```
116
-
117
- ### Публикация пакета в npm
118
-
119
- - Поднять version в package.json
120
- - Опубликовать:
121
- ```bash
122
- npm run publish:npm
123
- ```
124
-
125
- ## 📖 Storybook
126
-
127
- Сборка:
128
- ```bash
129
- npm run build:storybook
130
- ```
131
-
132
- ## 🥉 Используемые зависимости
133
-
134
- - [Vue 3](https://vuejs.org/) — основной фреймворк
135
- - [Pinia](https://pinia.vuejs.org/) — управление состоянием
136
- - [Maska](https://beholdr.github.io/maska/) — маски ввода
137
- - [Swiper](https://swiperjs.com/) — свайпер/карусель
138
- - [Vue-toastification](https://vue-toastification.maronato.dev/) — уведомления (тосты)
139
-
140
- ## 🎨 Глобальные стили (optional)
141
-
142
- В `main.ts`:
143
-
144
- ```ts
145
- import '@soroka282/migrant.ui-kit/dist/style.css';
146
- ```
147
-
1
+ # 📖 Migrant UI Kit
2
+
3
+ Библиотека переиспользуемых компонентов для проектов Migrant. Построена на [Vue 3](https://vuejs.org/) с поддержкой TypeScript и scoped-стилей.
4
+
5
+ ## 📦 Установка и использование библиотеки
6
+
7
+ ```bash
8
+ npm install @soroka282/migrant.ui-kit
9
+ ```
10
+ или
11
+ ```bash
12
+ yarn add @soroka282/migrant.ui-kit
13
+ ```
14
+
15
+ ### 🛠️ Использование компонентов
16
+
17
+ ```
18
+ <script setup lang="ts">
19
+ import {
20
+ UIButton,
21
+ UIColor,
22
+ UIColorName,
23
+ UISize,
24
+ } from '@soroka282/migrant.ui-kit';
25
+ </script>
26
+
27
+ <template>
28
+ <UIButton
29
+ is-box-shadow
30
+ :size="UISize.S"
31
+ :color="UIColor[UIColorName.White]"
32
+ :bg-color="UIColor[UIColorName.PurpleMain]"
33
+ >
34
+ Кнопка
35
+ </UIButton>
36
+ </template>
37
+ ```
38
+
39
+ ### ⚙️ TypeScript автодополнение
40
+
41
+ Убедитесь, что `tsconfig.json` содержит:
42
+
43
+ ```json
44
+ {
45
+ "compilerOptions": {
46
+ "moduleResolution": "bundler",
47
+ "paths": {
48
+ "@soroka282/migrant.ui-kit": ["node_modules/@soroka282/migrant.ui-kit"]
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## 💻 Разработка
55
+
56
+ #### Установка зависимостей
57
+ ```bash
58
+ npm i
59
+ ```
60
+ Проверить, что установился .husky и commit-msg (.husky/commit-msg) имеет:
61
+ ```
62
+ node scripts/verify-commit.js
63
+ ```
64
+
65
+ #### Запуск локального проекта:
66
+ ```bash
67
+ npm run dev
68
+ ```
69
+
70
+ #### Запуск локального сторибука
71
+ ```bash
72
+ npm run storybook
73
+ ```
74
+
75
+ ## 🧪 Коммиты
76
+
77
+ Формат коммитов:
78
+ ```
79
+ <номер задачи>/<тип>(<scope>): <описание>
80
+ ```
81
+
82
+ Если задача в трекере отсутствует:
83
+ ```
84
+ <тип>(<scope>): <описание>
85
+ ```
86
+
87
+ #### Типы коммитов:
88
+
89
+ - `feat` — добавление нового функционала
90
+ - `fix` — исправление ошибок
91
+ - `docs` — изменение документации
92
+ - `build` — сборка и настройка инфраструктуры (vite, tsconfig и т.п.)
93
+
94
+ #### Примеры:
95
+
96
+ ```
97
+ EVOLVE-1/feat(useIframeHandler): добавлен новый composable метод
98
+ EVOLVE-2/fix(UIInput): обработка событий при потере фокуса
99
+ EVOLVE-3/build(vite.config): релиз библиотеки
100
+
101
+ feat(useIframeHandler): добавлен новый composable метод
102
+ build(vite.config): релиз библиотеки
103
+ ```
104
+
105
+ ## 🛠️ Сборка библиотеки
106
+
107
+ Билд библиотеки:
108
+ ```bash
109
+ npm run build
110
+ ```
111
+
112
+ Генерация .d.ts:
113
+ ```bash
114
+ npm run ts
115
+ ```
116
+
117
+ ### Публикация пакета в npm
118
+
119
+ - Поднять version в package.json
120
+ - Опубликовать:
121
+ ```bash
122
+ npm run publish:npm
123
+ ```
124
+
125
+ ## 📖 Storybook
126
+
127
+ Сборка:
128
+ ```bash
129
+ npm run build:storybook
130
+ ```
131
+
132
+ ## 🥉 Используемые зависимости
133
+
134
+ - [Vue 3](https://vuejs.org/) — основной фреймворк
135
+ - [Pinia](https://pinia.vuejs.org/) — управление состоянием
136
+ - [Maska](https://beholdr.github.io/maska/) — маски ввода
137
+ - [Swiper](https://swiperjs.com/) — свайпер/карусель
138
+ - [Vue-toastification](https://vue-toastification.maronato.dev/) — уведомления (тосты)
139
+
140
+ ## 🎨 Глобальные стили (optional)
141
+
142
+ В `main.ts`:
143
+
144
+ ```ts
145
+ import '@soroka282/migrant.ui-kit/dist/style.css';
146
+ ```
147
+
@@ -0,0 +1,46 @@
1
+ import { defineComponent as m, ref as h, computed as f, createElementBlock as l, openBlock as r, createCommentVNode as _, createElementVNode as v, createVNode as k, Fragment as y, renderList as I, toDisplayString as C } from "vue";
2
+ import { u as S, U as V, _ as w } from "./index-CouJGyo3.js";
3
+ const L = { class: "select-list" }, B = {
4
+ key: 0,
5
+ class: "search-wrapper"
6
+ }, N = ["onClick"], U = /* @__PURE__ */ m({
7
+ __name: "List",
8
+ props: {
9
+ showSearchInput: { type: Boolean, default: !0 },
10
+ placeholderSearchInput: { default: "Поиск..." },
11
+ options: {}
12
+ },
13
+ emits: ["select", "close"],
14
+ setup(c, { emit: u }) {
15
+ const a = u, n = c, [i] = S(), o = h(""), p = f(() => {
16
+ if (!o.value) return n.options;
17
+ const e = o.value.toLowerCase();
18
+ return n.options.filter((s) => s.label.toLowerCase().includes(e));
19
+ }), d = (e) => {
20
+ a("select", e), a("close");
21
+ };
22
+ return (e, s) => (r(), l("div", L, [
23
+ e.showSearchInput ? (r(), l("div", B, [
24
+ k(V, {
25
+ modelValue: o.value,
26
+ "onUpdate:modelValue": s[0] || (s[0] = (t) => o.value = t),
27
+ placeholder: e.placeholderSearchInput
28
+ }, null, 8, ["modelValue", "placeholder"])
29
+ ])) : _("", !0),
30
+ v("ul", {
31
+ ref_key: "list",
32
+ ref: i,
33
+ class: "options-list"
34
+ }, [
35
+ (r(!0), l(y, null, I(p.value, (t) => (r(), l("li", {
36
+ key: t.value,
37
+ class: "option-item",
38
+ onClick: (b) => d(t)
39
+ }, C(t.label), 9, N))), 128))
40
+ ], 512)
41
+ ]));
42
+ }
43
+ }), E = /* @__PURE__ */ w(U, [["__scopeId", "data-v-9dc05778"]]);
44
+ export {
45
+ E as default
46
+ };