@velumweb/ui-kit 1.0.0 → 1.0.2

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 (217) hide show
  1. package/changelog.md +11 -0
  2. package/{docs → dist/components}/Button/Button.d.ts +32 -32
  3. package/dist/{Button → components/Button}/Button.stories.d.ts +15 -15
  4. package/dist/{Button → components/Button}/index.d.ts +1 -1
  5. package/dist/{Container → components/Container}/Box.d.ts +33 -33
  6. package/{docs → dist/components}/Container/index.d.ts +1 -1
  7. package/dist/{Input → components/Input}/Input.d.ts +38 -38
  8. package/{docs → dist/components}/Input/Input.stories.d.ts +14 -14
  9. package/{docs → dist/components}/Input/index.d.ts +1 -1
  10. package/{docs → dist/components}/Modal/Modal.d.ts +29 -29
  11. package/{docs → dist/components}/Modal/Modal.stories.d.ts +13 -13
  12. package/{docs → dist/components}/Modal/index.d.ts +1 -1
  13. package/dist/{Toggle → components/Toggle}/Toggle.d.ts +18 -18
  14. package/dist/{Toggle → components/Toggle}/Toggle.stories.d.ts +13 -13
  15. package/dist/{Toggle → components/Toggle}/index.d.ts +1 -1
  16. package/{docs → dist/components}/index.d.ts +6 -5
  17. package/dist/index.d.ts +2 -5
  18. package/dist/index.es.js +583 -569
  19. package/dist/index.es2.js +1 -0
  20. package/dist/theme.d.ts +2 -0
  21. package/dist/ui-kit.css +1 -1
  22. package/package.json +17 -3
  23. package/readme.md +19 -2
  24. package/.storybook/main.ts +0 -14
  25. package/.storybook/manager.ts +0 -32
  26. package/.storybook/preview.ts +0 -14
  27. package/dist/Button/Button.d.ts +0 -32
  28. package/dist/Container/index.d.ts +0 -1
  29. package/dist/Input/Input.stories.d.ts +0 -14
  30. package/dist/Input/index.d.ts +0 -1
  31. package/dist/Modal/Modal.d.ts +0 -29
  32. package/dist/Modal/Modal.stories.d.ts +0 -13
  33. package/dist/Modal/index.d.ts +0 -1
  34. package/dist/index.es.d.ts +0 -2
  35. package/dist/index.umd.js +0 -6
  36. package/docs/Button/Button.stories.d.ts +0 -15
  37. package/docs/Button/index.d.ts +0 -1
  38. package/docs/CNAME +0 -1
  39. package/docs/Container/Box.d.ts +0 -33
  40. package/docs/Input/Input.d.ts +0 -38
  41. package/docs/Toggle/Toggle.d.ts +0 -18
  42. package/docs/Toggle/Toggle.stories.d.ts +0 -13
  43. package/docs/Toggle/index.d.ts +0 -1
  44. package/docs/assets/Button-CfaZpHIg.css +0 -1
  45. package/docs/assets/Button-DBH2W8EG.js +0 -1
  46. package/docs/assets/Button.stories-uPwy2cWr.js +0 -34
  47. package/docs/assets/Input-D117xj27.js +0 -1
  48. package/docs/assets/Input-RjFZkyU_.css +0 -1
  49. package/docs/assets/Input.stories-Ck4AyV-4.js +0 -21
  50. package/docs/assets/Modal-CWKTs3Ep.css +0 -1
  51. package/docs/assets/Modal.stories-3HMpRqSx.js +0 -7
  52. package/docs/assets/Toggle-BmcBtVup.css +0 -1
  53. package/docs/assets/Toggle-DiHagfS3.js +0 -1
  54. package/docs/assets/Toggle.stories-d01loxLD.js +0 -9
  55. package/docs/assets/iframe-D7bwIom8.js +0 -1062
  56. package/docs/assets/jsx-runtime-u17CrQMm.js +0 -1
  57. package/docs/assets/preload-helper-PPVm8Dsz.js +0 -1
  58. package/docs/assets/react-18-CW3OMC0n.js +0 -9
  59. package/docs/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +0 -5
  60. package/docs/assets/svg-lib/about-empty-page-svgrepo-com.svg +0 -5
  61. package/docs/assets/svg-lib/alert-square.svg +0 -26
  62. package/docs/assets/svg-lib/arrow-bottom-svgrepo-com.svg +0 -9
  63. package/docs/assets/svg-lib/arrow-left-svgrepo-com.svg +0 -5
  64. package/docs/assets/svg-lib/arrow-right-svgrepo-com.svg +0 -5
  65. package/docs/assets/svg-lib/arrow-top-svgrepo-com.svg +0 -9
  66. package/docs/assets/svg-lib/checkmark-svgrepo-com.svg +0 -5
  67. package/docs/assets/svg-lib/clock-svgrepo-com.svg +0 -5
  68. package/docs/assets/svg-lib/cross-svgrepo-com.svg +0 -12
  69. package/docs/assets/svg-lib/download-svgrepo-com.svg +0 -5
  70. package/docs/assets/svg-lib/edit-pen-svgrepo-com.svg +0 -5
  71. package/docs/assets/svg-lib/favorite-svgrepo-com.svg +0 -5
  72. package/docs/assets/svg-lib/forbiden-svgrepo-com.svg +0 -9
  73. package/docs/assets/svg-lib/input-svgrepo-com.svg +0 -5
  74. package/docs/assets/svg-lib/link-svgrepo-com.svg +0 -5
  75. package/docs/assets/svg-lib/messages-alert-svgrepo-com.svg +0 -6
  76. package/docs/assets/svg-lib/messages-svgrepo-com.svg +0 -5
  77. package/docs/assets/svg-lib/mic-off-svgrepo-com.svg +0 -6
  78. package/docs/assets/svg-lib/mic-svgrepo-com.svg +0 -5
  79. package/docs/assets/svg-lib/music-svgrepo-com.svg +0 -6
  80. package/docs/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +0 -5
  81. package/docs/assets/svg-lib/notification-alert-svgrepo-com.svg +0 -6
  82. package/docs/assets/svg-lib/notification-svgrepo-com.svg +0 -5
  83. package/docs/assets/svg-lib/notifications-off-svgrepo-com.svg +0 -6
  84. package/docs/assets/svg-lib/party-simple-colored-svgrepo-com.svg +0 -11
  85. package/docs/assets/svg-lib/pattern-circles-svgrepo-com.svg +0 -5
  86. package/docs/assets/svg-lib/play-button-simple-svgrepo-com.svg +0 -5
  87. package/docs/assets/svg-lib/plus-outlined-svgrepo-com.svg +0 -5
  88. package/docs/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +0 -5
  89. package/docs/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +0 -6
  90. package/docs/assets/svg-lib/queue-remove-svgrepo-com.svg +0 -5
  91. package/docs/assets/svg-lib/recent-svgrepo-com.svg +0 -5
  92. package/docs/assets/svg-lib/remove-svgrepo-com.svg +0 -5
  93. package/docs/assets/svg-lib/repeat-svgrepo-com.svg +0 -5
  94. package/docs/assets/svg-lib/schedule-add-svgrepo-com.svg +0 -5
  95. package/docs/assets/svg-lib/schedule-alert-svgrepo-com.svg +0 -6
  96. package/docs/assets/svg-lib/schedule-remove-svgrepo-com.svg +0 -6
  97. package/docs/assets/svg-lib/schedule-svgrepo-com.svg +0 -5
  98. package/docs/assets/svg-lib/search-svgrepo-com.svg +0 -5
  99. package/docs/assets/svg-lib/session-abandon-svgrepo-com.svg +0 -5
  100. package/docs/assets/svg-lib/session-join-svgrepo-com.svg +0 -5
  101. package/docs/assets/svg-lib/session-leave-svgrepo-com.svg +0 -5
  102. package/docs/assets/svg-lib/settings-svgrepo-com.svg +0 -5
  103. package/docs/assets/svg-lib/share-svgrepo-com.svg +0 -5
  104. package/docs/assets/svg-lib/sound-off-svgrepo-com.svg +0 -6
  105. package/docs/assets/svg-lib/sound-svgrepo-com.svg +0 -5
  106. package/docs/assets/svg-lib/spectacles-svgrepo-com.svg +0 -5
  107. package/docs/assets/svg-lib/star-svgrepo-com.svg +0 -5
  108. package/docs/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +0 -6
  109. package/docs/assets/svg-lib/user-banned-svgrepo-com.svg +0 -6
  110. package/docs/assets/svg-lib/user-svgrepo-com.svg +0 -5
  111. package/docs/assets/svglist.png +0 -0
  112. package/docs/favicon-wrapper.svg +0 -46
  113. package/docs/favicon.svg +0 -1
  114. package/docs/iframe.html +0 -686
  115. package/docs/index.html +0 -137
  116. package/docs/index.json +0 -1
  117. package/docs/makeColors.ts +0 -37
  118. package/docs/notes.txt +0 -11
  119. package/docs/nunito-sans-bold-italic.woff2 +0 -0
  120. package/docs/nunito-sans-bold.woff2 +0 -0
  121. package/docs/nunito-sans-italic.woff2 +0 -0
  122. package/docs/nunito-sans-regular.woff2 +0 -0
  123. package/docs/project.json +0 -1
  124. package/docs/sb-addons/storybook-1/manager-bundle.js +0 -3
  125. package/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
  126. package/docs/sb-common-assets/favicon-wrapper.svg +0 -46
  127. package/docs/sb-common-assets/favicon.svg +0 -1
  128. package/docs/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  129. package/docs/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  130. package/docs/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  131. package/docs/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  132. package/docs/sb-manager/globals-runtime.js +0 -75597
  133. package/docs/sb-manager/globals.js +0 -24
  134. package/docs/sb-manager/manager-stores.js +0 -23
  135. package/docs/sb-manager/runtime.js +0 -19698
  136. package/docs/style_setter.js +0 -19
  137. package/docs/vite-inject-mocker-entry.js +0 -2
  138. package/index.html +0 -7
  139. package/public/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +0 -5
  140. package/public/assets/svg-lib/about-empty-page-svgrepo-com.svg +0 -5
  141. package/public/assets/svg-lib/alert-square.svg +0 -26
  142. package/public/assets/svg-lib/arrow-bottom-svgrepo-com.svg +0 -9
  143. package/public/assets/svg-lib/arrow-left-svgrepo-com.svg +0 -5
  144. package/public/assets/svg-lib/arrow-right-svgrepo-com.svg +0 -5
  145. package/public/assets/svg-lib/arrow-top-svgrepo-com.svg +0 -9
  146. package/public/assets/svg-lib/checkmark-svgrepo-com.svg +0 -5
  147. package/public/assets/svg-lib/clock-svgrepo-com.svg +0 -5
  148. package/public/assets/svg-lib/cross-svgrepo-com.svg +0 -12
  149. package/public/assets/svg-lib/download-svgrepo-com.svg +0 -5
  150. package/public/assets/svg-lib/edit-pen-svgrepo-com.svg +0 -5
  151. package/public/assets/svg-lib/favorite-svgrepo-com.svg +0 -5
  152. package/public/assets/svg-lib/forbiden-svgrepo-com.svg +0 -9
  153. package/public/assets/svg-lib/input-svgrepo-com.svg +0 -5
  154. package/public/assets/svg-lib/link-svgrepo-com.svg +0 -5
  155. package/public/assets/svg-lib/messages-alert-svgrepo-com.svg +0 -6
  156. package/public/assets/svg-lib/messages-svgrepo-com.svg +0 -5
  157. package/public/assets/svg-lib/mic-off-svgrepo-com.svg +0 -6
  158. package/public/assets/svg-lib/mic-svgrepo-com.svg +0 -5
  159. package/public/assets/svg-lib/music-svgrepo-com.svg +0 -6
  160. package/public/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +0 -5
  161. package/public/assets/svg-lib/notification-alert-svgrepo-com.svg +0 -6
  162. package/public/assets/svg-lib/notification-svgrepo-com.svg +0 -5
  163. package/public/assets/svg-lib/notifications-off-svgrepo-com.svg +0 -6
  164. package/public/assets/svg-lib/party-simple-colored-svgrepo-com.svg +0 -11
  165. package/public/assets/svg-lib/pattern-circles-svgrepo-com.svg +0 -5
  166. package/public/assets/svg-lib/play-button-simple-svgrepo-com.svg +0 -5
  167. package/public/assets/svg-lib/plus-outlined-svgrepo-com.svg +0 -5
  168. package/public/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +0 -5
  169. package/public/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +0 -6
  170. package/public/assets/svg-lib/queue-remove-svgrepo-com.svg +0 -5
  171. package/public/assets/svg-lib/recent-svgrepo-com.svg +0 -5
  172. package/public/assets/svg-lib/remove-svgrepo-com.svg +0 -5
  173. package/public/assets/svg-lib/repeat-svgrepo-com.svg +0 -5
  174. package/public/assets/svg-lib/schedule-add-svgrepo-com.svg +0 -5
  175. package/public/assets/svg-lib/schedule-alert-svgrepo-com.svg +0 -6
  176. package/public/assets/svg-lib/schedule-remove-svgrepo-com.svg +0 -6
  177. package/public/assets/svg-lib/schedule-svgrepo-com.svg +0 -5
  178. package/public/assets/svg-lib/search-svgrepo-com.svg +0 -5
  179. package/public/assets/svg-lib/session-abandon-svgrepo-com.svg +0 -5
  180. package/public/assets/svg-lib/session-join-svgrepo-com.svg +0 -5
  181. package/public/assets/svg-lib/session-leave-svgrepo-com.svg +0 -5
  182. package/public/assets/svg-lib/settings-svgrepo-com.svg +0 -5
  183. package/public/assets/svg-lib/share-svgrepo-com.svg +0 -5
  184. package/public/assets/svg-lib/sound-off-svgrepo-com.svg +0 -6
  185. package/public/assets/svg-lib/sound-svgrepo-com.svg +0 -5
  186. package/public/assets/svg-lib/spectacles-svgrepo-com.svg +0 -5
  187. package/public/assets/svg-lib/star-svgrepo-com.svg +0 -5
  188. package/public/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +0 -6
  189. package/public/assets/svg-lib/user-banned-svgrepo-com.svg +0 -6
  190. package/public/assets/svg-lib/user-svgrepo-com.svg +0 -5
  191. package/public/assets/svglist.png +0 -0
  192. package/src/components/Button/Button.stories.ts +0 -64
  193. package/src/components/Button/Button.tsx +0 -99
  194. package/src/components/Button/button.scss +0 -147
  195. package/src/components/Button/index.ts +0 -1
  196. package/src/components/Container/Box.tsx +0 -83
  197. package/src/components/Container/box.scss +0 -41
  198. package/src/components/Container/index.ts +0 -1
  199. package/src/components/Input/Input.stories.ts +0 -49
  200. package/src/components/Input/Input.tsx +0 -172
  201. package/src/components/Input/index.ts +0 -1
  202. package/src/components/Input/input.scss +0 -69
  203. package/src/components/Modal/Modal.stories.ts +0 -33
  204. package/src/components/Modal/Modal.tsx +0 -125
  205. package/src/components/Modal/index.ts +0 -1
  206. package/src/components/Modal/modal.scss +0 -54
  207. package/src/components/Toggle/Toggle.stories.ts +0 -35
  208. package/src/components/Toggle/Toggle.tsx +0 -60
  209. package/src/components/Toggle/index.ts +0 -1
  210. package/src/components/Toggle/toggle.scss +0 -97
  211. package/src/components/index.ts +0 -5
  212. package/src/main.scss +0 -46
  213. package/tsconfig.json +0 -15
  214. package/utils/makeColors.ts +0 -37
  215. package/utils/notes.txt +0 -11
  216. package/utils/style_setter.js +0 -19
  217. package/vite.config.ts +0 -32
package/changelog.md ADDED
@@ -0,0 +1,11 @@
1
+ ## [1.0.1] - 24-12-2025
2
+
3
+ ### Исправлено
4
+ - потерявшийся главный файл стилей вернулся в сборку
5
+
6
+ ## [1.0.0] - 23-12-2025
7
+
8
+ ### Добавлено
9
+ - Первый публичный релиз UI-kit.
10
+ - Базовые компоненты: `Button`, `Input`, `Toggle`, `Modal`, `Box`.
11
+ - Поддержка тем с использованием CSS-переменных.
@@ -1,32 +1,32 @@
1
- /**
2
- * Компонент кнопки
3
- * - разные состояния
4
- * - разные типы
5
- * - разные размеры
6
- * - разные углы
7
- * - добавление иконки
8
- */
9
- export interface ButtonProps {
10
- /** Основная / Только текст / Вспомогательная */
11
- type: 'primary' | 'transparent' | 'secondary';
12
- /** Маленькая / Средняя / Большая */
13
- size?: 'small' | 'medium' | 'large';
14
- /** Углы прямые / Закругленные / Круглые */
15
- corners?: 'square' | 'standard' | 'round';
16
- /** Доступность кнопки */
17
- disabled?: boolean;
18
- /** Текст кнопки */
19
- text?: string;
20
- /** Событие при нажатии */
21
- onClick?: (e?: MouseEvent) => void;
22
- /** Дополнительные классы */
23
- cls?: string;
24
- /** Путь до иконки из assets */
25
- iconPath?: string;
26
- /** Расположение текста относительно иконки */
27
- labelAlign?: 'right' | 'left' | 'bottom' | 'top';
28
- /** Это просто информационная иконка */
29
- staticIcon?: boolean;
30
- }
31
- /** Элемент кнопки */
32
- export declare const Button: ({ type, size, corners, disabled, staticIcon, cls, text, iconPath, labelAlign, onClick, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
1
+ /**
2
+ * Компонент кнопки
3
+ * - разные состояния
4
+ * - разные типы
5
+ * - разные размеры
6
+ * - разные углы
7
+ * - добавление иконки
8
+ */
9
+ export interface ButtonProps {
10
+ /** Основная / Только текст / Вспомогательная */
11
+ type: 'primary' | 'transparent' | 'secondary';
12
+ /** Маленькая / Средняя / Большая */
13
+ size?: 'small' | 'medium' | 'large';
14
+ /** Углы прямые / Закругленные / Круглые */
15
+ corners?: 'square' | 'standard' | 'round';
16
+ /** Доступность кнопки */
17
+ disabled?: boolean;
18
+ /** Текст кнопки */
19
+ text?: string;
20
+ /** Событие при нажатии */
21
+ onClick?: (e?: MouseEvent) => void;
22
+ /** Дополнительные классы */
23
+ cls?: string;
24
+ /** Путь до иконки из assets */
25
+ iconPath?: string;
26
+ /** Расположение текста относительно иконки */
27
+ labelAlign?: 'right' | 'left' | 'bottom' | 'top';
28
+ /** Это просто информационная иконка */
29
+ staticIcon?: boolean;
30
+ }
31
+ /** Элемент кнопки */
32
+ export declare const Button: ({ type, size, corners, disabled, staticIcon, cls, text, iconPath, labelAlign, onClick, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: ({ type, size, corners, disabled, staticIcon, cls, text, iconPath, labelAlign, onClick, ...props }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
- parameters: {
6
- layout: string;
7
- };
8
- tags: string[];
9
- decorators: ((Story: any) => any)[];
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const CustomButton: Story;
14
- export declare const IconButton: Story;
15
- export declare const Icon: Story;
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ type, size, corners, disabled, staticIcon, cls, text, iconPath, labelAlign, onClick, ...props }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ decorators: ((Story: any) => any)[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const CustomButton: Story;
14
+ export declare const IconButton: Story;
15
+ export declare const Icon: Story;
@@ -1 +1 @@
1
- export * from './Button';
1
+ export * from './Button';
@@ -1,33 +1,33 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Компоненты контейнеры
4
- * - разные направления
5
- * - семантические обертки
6
- * - позиционирование
7
- */
8
- export interface BoxProps {
9
- /** Направление строка или столбец */
10
- direction?: 'row' | 'column';
11
- /** Горизонтальное выравнивание **/
12
- align?: 'top' | 'center' | 'bottom';
13
- /** Горизонтальное распределение **/
14
- justify?: 'start' | 'end' | 'center' | 'space';
15
- /** Перенос блоков внутри контейнера **/
16
- wrapContent?: boolean;
17
- /** Дополнительные классы */
18
- cls?: string;
19
- /** Расстояние между дочерними элементами */
20
- gap?: number;
21
- /** Внешние отступы */
22
- margin?: number[];
23
- /** Внутренние отступы */
24
- padding?: number[];
25
- /** Родительский тег для семантики */
26
- parent?: 'header' | 'footer' | 'article' | 'section' | 'main' | 'div';
27
- /** Содержимое контейнера **/
28
- children: ReactNode | string;
29
- /** Маска загрузки **/
30
- mask?: boolean;
31
- }
32
- /** Элемент контейнера */
33
- export declare const Box: ({ direction, align, justify, wrapContent, cls, gap, margin, padding, parent, mask, children, ...props }: BoxProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Компоненты контейнеры
4
+ * - разные направления
5
+ * - семантические обертки
6
+ * - позиционирование
7
+ */
8
+ export interface BoxProps {
9
+ /** Направление строка или столбец */
10
+ direction?: 'row' | 'column';
11
+ /** Горизонтальное выравнивание **/
12
+ align?: 'top' | 'center' | 'bottom';
13
+ /** Горизонтальное распределение **/
14
+ justify?: 'start' | 'end' | 'center' | 'space';
15
+ /** Перенос блоков внутри контейнера **/
16
+ wrapContent?: boolean;
17
+ /** Дополнительные классы */
18
+ cls?: string;
19
+ /** Расстояние между дочерними элементами */
20
+ gap?: number;
21
+ /** Внешние отступы */
22
+ margin?: number[];
23
+ /** Внутренние отступы */
24
+ padding?: number[];
25
+ /** Родительский тег для семантики */
26
+ parent?: 'header' | 'footer' | 'article' | 'section' | 'main' | 'div';
27
+ /** Содержимое контейнера **/
28
+ children: ReactNode | string;
29
+ /** Маска загрузки **/
30
+ mask?: boolean;
31
+ }
32
+ /** Элемент контейнера */
33
+ export declare const Box: ({ direction, align, justify, wrapContent, cls, gap, margin, padding, parent, mask, children, ...props }: BoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export * from './Box';
1
+ export * from './Box';
@@ -1,38 +1,38 @@
1
- /**
2
- * Компонент поля для ввода текста
3
- * - тип (текст, цифры, пароль)
4
- * - это поисковая строка (значок лупы)
5
- * - валидация
6
- */
7
- export interface InputProps {
8
- /** Значение */
9
- value?: string | number;
10
- /** Текстовое поле \ цифровое \ пароль \ textarea */
11
- type?: 'text' | 'number' | 'password' | 'email' | 'date' | 'tel' | 'time' | 'textarea';
12
- /** Углы прямые / Закругленные / Круглые */
13
- corners?: 'square' | 'standard' | 'round';
14
- /** Доступность поля */
15
- disabled?: boolean;
16
- /** Текст над полем */
17
- label?: string;
18
- /** Текст под полем */
19
- bottomText?: string;
20
- /** Плейсхолдер */
21
- placeholder?: string;
22
- /** Живой поиск */
23
- live?: boolean;
24
- /** Событие при изменении */
25
- onChange?: (value?: string | number) => void;
26
- /** Это поиск */
27
- isSearch?: boolean;
28
- /** Валидация */
29
- mask?: RegExp;
30
- /** Ошибки валидации */
31
- errorText: string;
32
- /** Ширина в px */
33
- width?: number;
34
- /** Дополнительные классы */
35
- cls?: string;
36
- }
37
- /** Элемент кнопки */
38
- export declare const Input: ({ value, type, corners, disabled, label, bottomText, placeholder, errorText, live, isSearch, mask, width, onChange, cls, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
1
+ /**
2
+ * Компонент поля для ввода текста
3
+ * - тип (текст, цифры, пароль)
4
+ * - это поисковая строка (значок лупы)
5
+ * - валидация
6
+ */
7
+ export interface InputProps {
8
+ /** Значение */
9
+ value?: string | number;
10
+ /** Текстовое поле \ цифровое \ пароль \ textarea */
11
+ type?: 'text' | 'number' | 'password' | 'email' | 'date' | 'tel' | 'time' | 'textarea';
12
+ /** Углы прямые / Закругленные / Круглые */
13
+ corners?: 'square' | 'standard' | 'round';
14
+ /** Доступность поля */
15
+ disabled?: boolean;
16
+ /** Текст над полем */
17
+ label?: string;
18
+ /** Текст под полем */
19
+ bottomText?: string;
20
+ /** Плейсхолдер */
21
+ placeholder?: string;
22
+ /** Живой поиск */
23
+ live?: boolean;
24
+ /** Событие при изменении */
25
+ onChange?: (value?: string | number) => void;
26
+ /** Это поиск */
27
+ isSearch?: boolean;
28
+ /** Валидация */
29
+ mask?: RegExp;
30
+ /** Ошибки валидации */
31
+ errorText: string;
32
+ /** Ширина в px */
33
+ width?: number;
34
+ /** Дополнительные классы */
35
+ cls?: string;
36
+ }
37
+ /** Элемент кнопки */
38
+ export declare const Input: ({ value, type, corners, disabled, label, bottomText, placeholder, errorText, live, isSearch, mask, width, onChange, cls, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,14 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: ({ value, type, corners, disabled, label, bottomText, placeholder, errorText, live, isSearch, mask, width, onChange, cls, ...props }: import('./Input').InputProps) => import("react/jsx-runtime").JSX.Element;
5
- parameters: {
6
- layout: string;
7
- };
8
- tags: string[];
9
- decorators: ((Story: any) => any)[];
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const TextField: Story;
14
- export declare const Search: Story;
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ value, type, corners, disabled, label, bottomText, placeholder, errorText, live, isSearch, mask, width, onChange, cls, ...props }: import('./Input').InputProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ decorators: ((Story: any) => any)[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const TextField: Story;
14
+ export declare const Search: Story;
@@ -1 +1 @@
1
- export * from './Input';
1
+ export * from './Input';
@@ -1,29 +1,29 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Компонент модальное окно
4
- * - размеры
5
- * - углы
6
- * - тип непрозрачности фона
7
- */
8
- export interface ModalProps {
9
- /** Ширина */
10
- width?: number | 'auto';
11
- /** Углы прямые / Закругленные / Круглые */
12
- corners?: 'square' | 'standard' | 'round';
13
- /** Тип непрозрачности фона */
14
- background?: 'blackout' | 'blur';
15
- /** Содержимое контейнера **/
16
- children: ReactNode | string;
17
- /** Дополнительные классы */
18
- cls?: string;
19
- /** Операции при закрытии */
20
- onClose: () => void;
21
- /** Окно открыто */
22
- isOpen?: boolean;
23
- /** Title */
24
- title?: string;
25
- /** Кнопка закрытия в углу */
26
- closeButton?: boolean;
27
- }
28
- /** Элемент модалки */
29
- export declare const Modal: ({ width, corners, background, isOpen, closeButton, title, cls, children, onClose, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Компонент модальное окно
4
+ * - размеры
5
+ * - углы
6
+ * - тип непрозрачности фона
7
+ */
8
+ export interface ModalProps {
9
+ /** Ширина */
10
+ width?: number | 'auto';
11
+ /** Углы прямые / Закругленные / Круглые */
12
+ corners?: 'square' | 'standard' | 'round';
13
+ /** Тип непрозрачности фона */
14
+ background?: 'blackout' | 'blur';
15
+ /** Содержимое контейнера **/
16
+ children: ReactNode | string;
17
+ /** Дополнительные классы */
18
+ cls?: string;
19
+ /** Операции при закрытии */
20
+ onClose: () => void;
21
+ /** Окно открыто */
22
+ isOpen?: boolean;
23
+ /** Title */
24
+ title?: string;
25
+ /** Кнопка закрытия в углу */
26
+ closeButton?: boolean;
27
+ }
28
+ /** Элемент модалки */
29
+ export declare const Modal: ({ width, corners, background, isOpen, closeButton, title, cls, children, onClose, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: ({ width, corners, background, isOpen, closeButton, title, cls, children, onClose, ...props }: import('./Modal').ModalProps) => import("react/jsx-runtime").JSX.Element;
5
- parameters: {
6
- layout: string;
7
- };
8
- tags: string[];
9
- decorators: ((Story: any) => any)[];
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const ModalWindow: Story;
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ width, corners, background, isOpen, closeButton, title, cls, children, onClose, ...props }: import('./Modal').ModalProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ decorators: ((Story: any) => any)[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const ModalWindow: Story;
@@ -1 +1 @@
1
- export * from './Modal';
1
+ export * from './Modal';
@@ -1,18 +1,18 @@
1
- import { default as React } from 'react';
2
- /**
3
- * Компонент переключателя
4
- */
5
- export interface ToggleProps {
6
- /** Маленькая / Средняя / Большая */
7
- size?: 'small' | 'medium' | 'large';
8
- /** Доступность переключателя */
9
- disabled?: boolean;
10
- /** Текст переключателя */
11
- text?: string;
12
- /** Событие при нажатии */
13
- onClick?: (e?: MouseEvent) => void;
14
- /** Дополнительные классы */
15
- cls?: string;
16
- }
17
- /** Элемент кнопки */
18
- export declare const Toggle: React.FC<ToggleProps>;
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Компонент переключателя
4
+ */
5
+ export interface ToggleProps {
6
+ /** Маленькая / Средняя / Большая */
7
+ size?: 'small' | 'medium' | 'large';
8
+ /** Доступность переключателя */
9
+ disabled?: boolean;
10
+ /** Текст переключателя */
11
+ text?: string;
12
+ /** Событие при нажатии */
13
+ onClick?: (e?: MouseEvent) => void;
14
+ /** Дополнительные классы */
15
+ cls?: string;
16
+ }
17
+ /** Элемент кнопки */
18
+ export declare const Toggle: React.FC<ToggleProps>;
@@ -1,13 +1,13 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: import('react').FC<import('./Toggle').ToggleProps>;
5
- parameters: {
6
- layout: string;
7
- };
8
- tags: string[];
9
- decorators: ((Story: any) => any)[];
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const CustomToggle: Story;
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('./Toggle').ToggleProps>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ decorators: ((Story: any) => any)[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const CustomToggle: Story;
@@ -1 +1 @@
1
- export * from './Toggle';
1
+ export * from './Toggle';
@@ -1,5 +1,6 @@
1
- export * from './Button';
2
- export * from './Container';
3
- export * from './Modal';
4
- export * from './Input';
5
- export * from './Toggle';
1
+ export * from './Button';
2
+ export * from './Container';
3
+ export * from './Modal';
4
+ export * from './Input';
5
+ export * from './Toggle';
6
+ export * from '../theme';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- export * from './Button';
2
- export * from './Container';
3
- export * from './Modal';
4
- export * from './Input';
5
- export * from './Toggle';
1
+ export * from './components/index'
2
+ export {}