@soroka282/migrant.ui-kit 0.0.68 → 0.0.70

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 (139) hide show
  1. package/README.md +147 -147
  2. package/dist/List-DkipCs8x.js +94 -0
  3. package/dist/{index-CP315OU8.js → index-BvOE31Fh.js} +3542 -3437
  4. package/dist/migrant.ui-kit.es.js +33 -32
  5. package/dist/migrant.ui-kit.umd.js +13 -13
  6. package/dist/src/components/UI-kit/button/UIButton.vue.d.ts +1 -1
  7. package/dist/src/components/UI-kit/inputs/UIInput.stories.d.ts +2 -0
  8. package/dist/src/components/UI-kit/inputs/UIInput.vue.d.ts +2 -0
  9. package/dist/src/components/UI-kit/radioButton/UIRadioButton.stories.d.ts +4 -0
  10. package/dist/src/components/UI-kit/radioButton/UIRadioButton.vue.d.ts +1 -0
  11. package/dist/src/components/UI-kit/select/UISelect.stories.d.ts +3 -0
  12. package/dist/src/components/UI-kit/select/UISelect.vue.d.ts +2 -1
  13. package/dist/src/components/UI-kit/select/components/List.vue.d.ts +21 -1
  14. package/dist/src/types/UI/ui-input.type.d.ts +4 -0
  15. package/dist/src/types/UI/ui-radio-button.type.d.ts +1 -0
  16. package/dist/src/types/UI/ui-select.type.d.ts +1 -0
  17. package/dist/src/types/global.d.ts +13 -13
  18. package/package.json +118 -118
  19. package/scripts/postinstall.js +55 -55
  20. package/scripts/verify-commit.js +35 -35
  21. package/src/App.vue +7 -7
  22. package/src/assets/scss/common/swiper.scss +19 -19
  23. package/src/assets/scss/common/variables.scss +24 -24
  24. package/src/assets/scss/index.scss +8 -8
  25. package/src/assets/scss/mixins/flex.minix.scss +6 -6
  26. package/src/assets/scss/mixins/identation.mixin.scss +20 -20
  27. package/src/assets/scss/mixins/index.mixin.scss +2 -2
  28. package/src/assets/scss/mixins/typograph.mixin.scss +4 -4
  29. package/src/components/UI-blocks/components/BlockElement/BlockElement.stories.ts +224 -224
  30. package/src/components/UI-blocks/components/BlockElement/BlockElement.vue +146 -145
  31. package/src/components/UI-kit/button/UIButton.stories.ts +137 -137
  32. package/src/components/UI-kit/button/UIButton.vue +129 -129
  33. package/src/components/UI-kit/card/UICard.stories.ts +57 -57
  34. package/src/components/UI-kit/card/UICard.vue +52 -52
  35. package/src/components/UI-kit/checkbox/UICheckBox.stories.ts +197 -197
  36. package/src/components/UI-kit/checkbox/UICheckBox.vue +89 -89
  37. package/src/components/UI-kit/description/UIDescription.stories.ts +37 -37
  38. package/src/components/UI-kit/description/UIDescription.vue +34 -34
  39. package/src/components/UI-kit/inputs/BaseMaskedInput.vue +100 -100
  40. package/src/components/UI-kit/inputs/UIInput.stories.ts +151 -92
  41. package/src/components/UI-kit/inputs/UIInput.vue +244 -203
  42. package/src/components/UI-kit/loader/UILoader.stories.ts +31 -31
  43. package/src/components/UI-kit/loader/UILoader.vue +69 -69
  44. package/src/components/UI-kit/modal/UIModal.stories.ts +41 -41
  45. package/src/components/UI-kit/modal/UIModal.vue +307 -307
  46. package/src/components/UI-kit/modal/UIModalContainer.vue +20 -20
  47. package/src/components/UI-kit/radioButton/UIRadioButton.stories.ts +435 -240
  48. package/src/components/UI-kit/radioButton/UIRadioButton.vue +147 -61
  49. package/src/components/UI-kit/select/UISelect.stories.ts +325 -180
  50. package/src/components/UI-kit/select/UISelect.vue +204 -182
  51. package/src/components/UI-kit/select/components/List.stories.ts +76 -76
  52. package/src/components/UI-kit/select/components/List.vue +204 -159
  53. package/src/components/UI-kit/svg-icon/UISvgIcon.stories.ts +34 -34
  54. package/src/components/UI-kit/svg-icon/UISvgIcon.vue +21 -21
  55. package/src/components/UI-kit/swiper/UISwiper.stories.ts +33 -33
  56. package/src/components/UI-kit/swiper/UISwiper.vue +47 -47
  57. package/src/components/UI-kit/title/UITitle.stories.ts +35 -35
  58. package/src/components/UI-kit/title/UITitle.vue +37 -37
  59. package/src/components/UI-kit/toaster/UIToastNotification.stories.ts +146 -146
  60. package/src/components/UI-kit/toaster/UIToaster.ts +57 -57
  61. package/src/components/icons/email.svg +10 -10
  62. package/src/components/icons/person.svg +4 -4
  63. package/src/components/modules/auth/assets/styles/index.scss +3 -3
  64. package/src/components/modules/auth/assets/styles/seven-zero-two-themes.scss +96 -96
  65. package/src/components/modules/auth/assets/styles/student-themes.scss +176 -176
  66. package/src/components/modules/auth/auth-test/AuthTest.vue +63 -63
  67. package/src/components/modules/auth/auth-test/AuthTestWrapper.vue +43 -43
  68. package/src/components/modules/auth/components/AccountStep.vue +158 -158
  69. package/src/components/modules/auth/components/ConfirmationStep.vue +163 -163
  70. package/src/components/modules/auth/components/LinkMailStep.vue +199 -199
  71. package/src/components/modules/auth/composables/useMailRedirect.ts +49 -49
  72. package/src/components/modules/auth/config/themes-module-auth.config.ts +94 -94
  73. package/src/components/modules/auth/constants/EStep.enum.ts +5 -5
  74. package/src/components/modules/auth/constants/default-locale-auth-module.ts +21 -21
  75. package/src/components/modules/auth/constants/validation/validate-email.ts +17 -17
  76. package/src/components/modules/auth/index.ts +2 -2
  77. package/src/components/modules/auth/store/authModuleStore.ts +44 -44
  78. package/src/components/modules/auth/types/auth-ui-schema.type.ts +36 -36
  79. package/src/components/modules/auth/types/step.types.ts +1 -1
  80. package/src/components/modules/documents/ModuleDocuments.vue +88 -88
  81. package/src/components/modules/documents/components/composables/useDefaultFields.ts +302 -302
  82. package/src/components/modules/documents/components/composables/useDocumentImage.ts +39 -39
  83. package/src/components/modules/documents/components/constants/default-locale-document-module.ts +57 -57
  84. package/src/components/modules/documents/components/constants/validation/common.validation.ts +42 -42
  85. package/src/components/modules/documents/components/constants/validation/driver-license.validation.ts +25 -25
  86. package/src/components/modules/documents/components/constants/validation/inn.validation.ts +15 -15
  87. package/src/components/modules/documents/components/constants/validation/license-plate.validation.ts +37 -37
  88. package/src/components/modules/documents/components/constants/validation/passport.validation.ts +48 -48
  89. package/src/components/modules/documents/components/constants/validation.ts +5 -5
  90. package/src/components/modules/documents/components/index.ts +5 -5
  91. package/src/components/modules/documents/config/themes-module-document.config.ts +24 -24
  92. package/src/components/modules/documents/index.ts +2 -2
  93. package/src/components/modules/documents/store/module-document.store.ts +5 -5
  94. package/src/components/modules/documents/type/DocumentsType.ts +30 -30
  95. package/src/components/modules/documents/type/document-ui-schema.type.ts +10 -10
  96. package/src/components/modules/documents/type/index.ts +2 -2
  97. package/src/components/modules/form/ModuleForm.vue +44 -44
  98. package/src/components/modules/form/ModulesForm.stories.ts +188 -188
  99. package/src/components/modules/form/components/Field.vue +136 -136
  100. package/src/components/modules/form/types/inputType.ts +26 -26
  101. package/src/composables/index.ts +2 -2
  102. package/src/composables/useIframeHandlers.ts +52 -52
  103. package/src/composables/useRequestHandler.ts +49 -49
  104. package/src/configs/i18n.config.ts +8 -8
  105. package/src/configs/index.ts +1 -1
  106. package/src/constants/default-locale.ts +30 -30
  107. package/src/constants/index.ts +2 -2
  108. package/src/constants/ui-color.constant.ts +25 -25
  109. package/src/index.ts +31 -31
  110. package/src/main.ts +22 -22
  111. package/src/plugins/formatter.ts +136 -136
  112. package/src/plugins/index.ts +3 -3
  113. package/src/plugins/plural-endings.ts +19 -19
  114. package/src/plugins/ui-kit-install.ts +36 -36
  115. package/src/store/config-module.store.ts +66 -66
  116. package/src/store/index.ts +3 -3
  117. package/src/store/language.store.ts +28 -28
  118. package/src/store/modal.store.ts +101 -101
  119. package/src/types/UI/ui-button.type.ts +31 -31
  120. package/src/types/UI/ui-checkbox.type.ts +18 -18
  121. package/src/types/UI/ui-color.type.ts +28 -28
  122. package/src/types/UI/ui-input.type.ts +74 -65
  123. package/src/types/UI/ui-modal.type.ts +7 -7
  124. package/src/types/UI/ui-radio-button.type.ts +1 -0
  125. package/src/types/UI/ui-select.type.ts +28 -27
  126. package/src/types/UI/ui-size.type.ts +7 -7
  127. package/src/types/common.type.ts +2 -2
  128. package/src/types/global.d.ts +13 -13
  129. package/src/types/index.ts +11 -11
  130. package/src/types/language.type.ts +7 -7
  131. package/src/types/plugin.type.ts +6 -6
  132. package/src/types/project-name.type.ts +5 -5
  133. package/src/utils/buildYupChain.util.ts +12 -12
  134. package/src/utils/debounce.util.ts +7 -7
  135. package/src/utils/getGlobalLocale.util.ts +5 -5
  136. package/src/utils/index.ts +5 -5
  137. package/src/utils/scrollIntoView.util.ts +8 -8
  138. package/src/utils/scrollToElement.util.ts +9 -9
  139. package/dist/List-BBKMFaT9.js +0 -70
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,94 @@
1
+ import { defineComponent as b, ref as p, computed as w, createElementBlock as s, openBlock as o, createCommentVNode as a, createElementVNode as d, createVNode as I, renderSlot as V, createBlock as B, resolveDynamicComponent as L, Fragment as g, renderList as _, normalizeStyle as m, normalizeClass as N, createTextVNode as F, toDisplayString as f } from "vue";
2
+ import { u as T, U, _ as $ } from "./index-BvOE31Fh.js";
3
+ const z = { class: "select-list" }, A = {
4
+ key: 0,
5
+ class: "search-wrapper"
6
+ }, D = {
7
+ key: 1,
8
+ class: "infoblock-wrapper"
9
+ }, E = ["onClick"], M = {
10
+ key: 0,
11
+ class: "option-item-icon",
12
+ width: "20",
13
+ height: "20",
14
+ viewBox: "0 0 24 24",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, R = {
18
+ key: 2,
19
+ class: "confirm-button-wrapper"
20
+ }, Z = /* @__PURE__ */ b({
21
+ __name: "List",
22
+ props: {
23
+ showSearchInput: { type: Boolean, default: !0 },
24
+ placeholderSearchInput: { default: "Поиск..." },
25
+ options: {},
26
+ multiple: { type: Boolean, default: !1 },
27
+ selectedValues: { default: () => [] },
28
+ selectedColor: { default: "#7c3aed" },
29
+ infoblockSlot: {},
30
+ multipleButtonConfirmText: { default: "Подтвердить" }
31
+ },
32
+ emits: ["select", "close"],
33
+ setup(C, { emit: h }) {
34
+ const u = h, n = C, [v] = T(), c = p(""), r = p([...n.selectedValues]), k = w(() => {
35
+ if (!c.value) return n.options;
36
+ const e = c.value.toLowerCase();
37
+ return n.options.filter((l) => l.label.toLowerCase().includes(e));
38
+ }), i = (e) => r.value.some((l) => l.value === e.value), y = (e) => {
39
+ if (n.multiple) {
40
+ const l = r.value.findIndex((t) => t.value === e.value);
41
+ l === -1 ? r.value.push(e) : r.value.splice(l, 1), u("select", [...r.value]);
42
+ } else
43
+ u("select", e), u("close");
44
+ }, S = () => {
45
+ u("close");
46
+ };
47
+ return (e, l) => (o(), s("div", z, [
48
+ e.showSearchInput ? (o(), s("div", A, [
49
+ I(U, {
50
+ modelValue: c.value,
51
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => c.value = t),
52
+ placeholder: e.placeholderSearchInput,
53
+ showSearchIcon: !0,
54
+ "color-scheme": e.selectedColor === "#3C6BFF" ? "WIR" : "SIR"
55
+ }, null, 8, ["modelValue", "placeholder", "color-scheme"])
56
+ ])) : a("", !0),
57
+ e.$slots.infoblock || e.infoblockSlot ? (o(), s("div", D, [
58
+ V(e.$slots, "infoblock", {}, () => [
59
+ e.infoblockSlot ? (o(), B(L(e.infoblockSlot), { key: 0 })) : a("", !0)
60
+ ], !0)
61
+ ])) : a("", !0),
62
+ d("ul", {
63
+ ref_key: "list",
64
+ ref: v,
65
+ class: "options-list"
66
+ }, [
67
+ (o(!0), s(g, null, _(k.value, (t) => (o(), s("li", {
68
+ key: t.value,
69
+ class: N(["option-item", { "--selected": e.multiple && i(t) }]),
70
+ style: m(e.multiple && i(t) ? { color: n.selectedColor } : {}),
71
+ onClick: (q) => y(t)
72
+ }, [
73
+ F(f(t.label) + " ", 1),
74
+ e.multiple && i(t) ? (o(), s("svg", M, l[1] || (l[1] = [
75
+ d("path", {
76
+ d: "M10 20C4.47656 20 0 15.5234 0 10C0 4.47656 4.47656 0 10 0C15.5234 0 20 4.47656 20 10C20 15.5234 15.5234 20 10 20ZM14.6094 5.69141C14.1914 5.38672 13.6055 5.48047 13.3008 5.89844L8.63672 12.3125L6.60156 10.2773C6.23438 9.91016 5.64063 9.91016 5.27734 10.2773C4.91406 10.6445 4.91016 11.2383 5.27734 11.6016L8.08984 14.4141C8.28516 14.6094 8.55078 14.707 8.82422 14.6875C9.09766 14.668 9.34766 14.5273 9.50781 14.3047L14.8164 7C15.1211 6.58203 15.0273 5.99609 14.6094 5.69141Z",
77
+ fill: "currentColor"
78
+ }, null, -1)
79
+ ]))) : a("", !0)
80
+ ], 14, E))), 128))
81
+ ], 512),
82
+ e.multiple ? (o(), s("div", R, [
83
+ d("button", {
84
+ class: "confirm-button",
85
+ style: m({ background: e.selectedColor }),
86
+ onClick: S
87
+ }, f(e.multipleButtonConfirmText), 5)
88
+ ])) : a("", !0)
89
+ ]));
90
+ }
91
+ }), W = /* @__PURE__ */ $(Z, [["__scopeId", "data-v-247ea40b"]]);
92
+ export {
93
+ W as default
94
+ };