@topvisor/ui 0.0.35 → 0.0.36

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 (266) hide show
  1. package/{src/components/forms/inputDate/datepicker.css → .chunks/datepicker-1e725859.amd.js} +3 -2
  2. package/.chunks/datepicker-1e725859.amd.js.map +1 -0
  3. package/.chunks/datepicker-ad465c48.es.js +275 -0
  4. package/.chunks/datepicker-ad465c48.es.js.map +1 -0
  5. package/.chunks/forms-2891e074.amd.js +3 -0
  6. package/.chunks/forms-2891e074.amd.js.map +1 -0
  7. package/.chunks/forms-db4cb24d.es.js +946 -0
  8. package/.chunks/forms-db4cb24d.es.js.map +1 -0
  9. package/.chunks/popup-0f540839.es.js +700 -0
  10. package/.chunks/popup-0f540839.es.js.map +1 -0
  11. package/.chunks/popup-e49a9bab.amd.js +341 -0
  12. package/.chunks/popup-e49a9bab.amd.js.map +1 -0
  13. package/README.md +63 -30
  14. package/common/common.amd.js +2 -0
  15. package/common/common.amd.js.map +1 -0
  16. package/common/common.js +2 -0
  17. package/common/common.js.map +1 -0
  18. package/core/core.amd.js +2 -0
  19. package/core/core.amd.js.map +1 -0
  20. package/core/core.js +6 -0
  21. package/core/core.js.map +1 -0
  22. package/core.css +1 -0
  23. package/dark.css +1 -0
  24. package/forms/forms.amd.js +2 -0
  25. package/forms/forms.amd.js.map +1 -0
  26. package/forms/forms.js +15 -0
  27. package/forms/forms.js.map +1 -0
  28. package/forms/helpers.amd.js +2 -0
  29. package/forms/helpers.amd.js.map +1 -0
  30. package/forms/helpers.js +9 -0
  31. package/forms/helpers.js.map +1 -0
  32. package/forms.css +1 -0
  33. package/formsExt/formsExt.amd.js +3 -0
  34. package/formsExt/formsExt.amd.js.map +1 -0
  35. package/formsExt/formsExt.js +207 -0
  36. package/formsExt/formsExt.js.map +1 -0
  37. package/formsExt.css +1 -0
  38. package/light.css +1 -0
  39. package/package.json +1 -50
  40. package/popup/popup.amd.js +3 -0
  41. package/popup/popup.amd.js.map +1 -0
  42. package/popup/popup.js +144 -0
  43. package/popup/popup.js.map +1 -0
  44. package/popup/worker.amd.js +2 -0
  45. package/popup/worker.amd.js.map +1 -0
  46. package/popup/worker.js +154 -0
  47. package/popup/worker.js.map +1 -0
  48. package/popup.css +1 -0
  49. package/tabs/tabs.amd.js +3 -0
  50. package/tabs/tabs.amd.js.map +1 -0
  51. package/tabs/tabs.js +97 -0
  52. package/tabs/tabs.js.map +1 -0
  53. package/tabs.css +1 -0
  54. package/utils/date.amd.js +2 -0
  55. package/utils/date.amd.js.map +1 -0
  56. package/utils/date.js +6 -0
  57. package/utils/date.js.map +1 -0
  58. package/utils/device.amd.js +2 -0
  59. package/utils/device.amd.js.map +1 -0
  60. package/utils/device.js +6 -0
  61. package/utils/device.js.map +1 -0
  62. package/utils/dom.amd.js +2 -0
  63. package/utils/dom.amd.js.map +1 -0
  64. package/utils/dom.js +64 -0
  65. package/utils/dom.js.map +1 -0
  66. package/.storybook/TopTheme.js +0 -82
  67. package/.storybook/TopThemeManager.js +0 -44
  68. package/.storybook/main.ts +0 -43
  69. package/.storybook/manager.ts +0 -28
  70. package/.storybook/preview-head.html +0 -16
  71. package/.storybook/preview.ts +0 -48
  72. package/.storybook/vue/coreDecorator.ts +0 -19
  73. package/.storybook/vue/vModelDecorator.ts +0 -27
  74. package/.vscode/extensions.json +0 -11
  75. package/.vscode/keybindings.example.json +0 -121
  76. package/.vscode/settings.json +0 -46
  77. package/Dockerfile +0 -3
  78. package/NPM.md +0 -25
  79. package/PUBLISH.md +0 -18
  80. package/STORYBOOK.md +0 -27
  81. package/USE_IN_PROJECT.md +0 -29
  82. package/build/afterBuild.sh +0 -12
  83. package/build/cssModules.ts +0 -39
  84. package/build/plugin/amdFix.ts +0 -46
  85. package/build/rollup.config.ts +0 -18
  86. package/nbproject/project.properties +0 -11
  87. package/nbproject/project.xml +0 -9
  88. package/public/README.md +0 -63
  89. package/src/components/common/common.ts +0 -1
  90. package/src/components/common/icon/icon.ts +0 -4
  91. package/src/components/common/icon/icon.vue +0 -15
  92. package/src/components/component.ts +0 -133
  93. package/src/components/forms/button/button.stories.ts +0 -112
  94. package/src/components/forms/button/button.ts +0 -51
  95. package/src/components/forms/button/button.vue +0 -75
  96. package/src/components/forms/button/stories/README.md +0 -35
  97. package/src/components/forms/button/stories/overview.vue +0 -33
  98. package/src/components/forms/button/style/button.css +0 -124
  99. package/src/components/forms/button/style/style-outline.css +0 -42
  100. package/src/components/forms/button/style/style-soft.css +0 -31
  101. package/src/components/forms/button/style/style-transparent.css +0 -35
  102. package/src/components/forms/checkbox/checkbox.stories.ts +0 -33
  103. package/src/components/forms/checkbox/checkbox.ts +0 -23
  104. package/src/components/forms/checkbox/checkbox.vue +0 -135
  105. package/src/components/forms/checkbox/stories/overview.vue +0 -171
  106. package/src/components/forms/controlLabel/controlLabel.stories.ts +0 -38
  107. package/src/components/forms/controlLabel/controlLabel.ts +0 -4
  108. package/src/components/forms/controlLabel/controlLabel.vue +0 -48
  109. package/src/components/forms/forms.ts +0 -10
  110. package/src/components/forms/helpers.ts +0 -10
  111. package/src/components/forms/hint/hint.stories.ts +0 -46
  112. package/src/components/forms/hint/hint.ts +0 -8
  113. package/src/components/forms/hint/hint.vue +0 -32
  114. package/src/components/forms/input/input.stories.ts +0 -31
  115. package/src/components/forms/input/input.ts +0 -34
  116. package/src/components/forms/input/input.vue +0 -170
  117. package/src/components/forms/input/stories/overview.vue +0 -61
  118. package/src/components/forms/inputDate/datepicker.ts +0 -101
  119. package/src/components/forms/inputDate/inputDate.stories.ts +0 -41
  120. package/src/components/forms/inputDate/inputDate.ts +0 -4
  121. package/src/components/forms/inputDate/inputDate.vue +0 -127
  122. package/src/components/forms/inputDate/stories/overview.vue +0 -35
  123. package/src/components/forms/radio/radio.stories.ts +0 -34
  124. package/src/components/forms/radio/radio.ts +0 -15
  125. package/src/components/forms/radio/radio.vue +0 -107
  126. package/src/components/forms/radio/stories/overview.vue +0 -79
  127. package/src/components/forms/select/select.stories.ts +0 -34
  128. package/src/components/forms/select/select.ts +0 -36
  129. package/src/components/forms/select/select.vue +0 -253
  130. package/src/components/forms/select/stories/exampleOptions.ts +0 -71
  131. package/src/components/forms/select/stories/overview.vue +0 -60
  132. package/src/components/forms/switcher/stories/overview.vue +0 -139
  133. package/src/components/forms/switcher/switcher.stories.ts +0 -33
  134. package/src/components/forms/switcher/switcher.ts +0 -22
  135. package/src/components/forms/switcher/switcher.vue +0 -113
  136. package/src/components/forms/textarea/stories/overview.vue +0 -62
  137. package/src/components/forms/textarea/textarea.stories.ts +0 -33
  138. package/src/components/forms/textarea/textarea.ts +0 -38
  139. package/src/components/forms/textarea/textarea.vue +0 -119
  140. package/src/components/formsExt/editArea/editArea.stories.ts +0 -72
  141. package/src/components/formsExt/editArea/editArea.ts +0 -25
  142. package/src/components/formsExt/editArea/editArea.vue +0 -172
  143. package/src/components/formsExt/editArea/stories/README.md +0 -17
  144. package/src/components/formsExt/editArea/stories/overview.vue +0 -66
  145. package/src/components/formsExt/editInput/editInput.stories.ts +0 -36
  146. package/src/components/formsExt/editInput/editInput.ts +0 -20
  147. package/src/components/formsExt/editInput/editInput.vue +0 -57
  148. package/src/components/formsExt/editInput/stories/overview.vue +0 -54
  149. package/src/components/formsExt/formsExt.ts +0 -3
  150. package/src/components/formsExt/radioGroup/radioGroup.stories.ts +0 -51
  151. package/src/components/formsExt/radioGroup/radioGroup.ts +0 -28
  152. package/src/components/formsExt/radioGroup/radioGroup.vue +0 -143
  153. package/src/components/formsExt/radioGroup/stories/overview.vue +0 -78
  154. package/src/components/formsExt/radioGroup/styles/top-scrollBar.css +0 -52
  155. package/src/components/helper.js +0 -10
  156. package/src/components/helpersStories.ts +0 -151
  157. package/src/components/popup/lib/popup.globalEvents.js +0 -205
  158. package/src/components/popup/lib/popup.js +0 -702
  159. package/src/components/popup/lib/worker.globalEvents.js +0 -78
  160. package/src/components/popup/lib/worker.js +0 -232
  161. package/src/components/popup/popup/listItem.vue +0 -42
  162. package/src/components/popup/popup/opener.vue +0 -74
  163. package/src/components/popup/popup/popup.stories.ts +0 -68
  164. package/src/components/popup/popup/popup.ts +0 -93
  165. package/src/components/popup/popup/popup.vue +0 -95
  166. package/src/components/popup/popup/stories/README.md +0 -34
  167. package/src/components/popup/popup/stories/listItems.vue +0 -44
  168. package/src/components/popup/popup/stories/listSubItems.vue +0 -52
  169. package/src/components/popup/popup/stories/overview.vue +0 -208
  170. package/src/components/popup/popup/style/popup.css +0 -243
  171. package/src/components/popup/popup/style/popup.m.css +0 -71
  172. package/src/components/popup/popup/style/popup.pc.css +0 -28
  173. package/src/components/popup/popup.ts +0 -3
  174. package/src/components/popup/worker.ts +0 -1
  175. package/src/components/tabs/tabs/content.vue +0 -24
  176. package/src/components/tabs/tabs/stories/README.md +0 -10
  177. package/src/components/tabs/tabs/tab.vue +0 -52
  178. package/src/components/tabs/tabs/tabs.stories.ts +0 -171
  179. package/src/components/tabs/tabs/tabs.ts +0 -22
  180. package/src/components/tabs/tabs/tabs.vue +0 -64
  181. package/src/components/tabs/tabs.ts +0 -3
  182. package/src/core/base/Colors.stories.ts +0 -15
  183. package/src/core/base/Layout.stories.ts +0 -15
  184. package/src/core/base/Properties.stories.ts +0 -15
  185. package/src/core/base/base.mdx +0 -21
  186. package/src/core/core/core.ts +0 -144
  187. package/src/core/core/events.ts +0 -54
  188. package/src/core/core/options.ts +0 -15
  189. package/src/core/core/state.ts +0 -44
  190. package/src/core/directives/tooltip.ts +0 -55
  191. package/src/core/theme/Colors.stories.ts +0 -15
  192. package/src/core/theme/Properties.stories.ts +0 -15
  193. package/src/core/theme/theme.mdx +0 -15
  194. package/src/core/utils/date.ts +0 -164
  195. package/src/core/utils/device.ts +0 -48
  196. package/src/core/utils/dom.ts +0 -185
  197. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272/gallery.vue" +0 -72
  198. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.mdx" +0 -31
  199. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.stories.ts" +0 -14
  200. package/src/docs/CSS/FAQ.mdx +0 -43
  201. package/src/docs/CSS//320/236/320/261/321/211/320/270/320/265 /320/274/320/276/320/264/320/270/321/204/320/270/320/272/320/260/321/202/320/276/321/200/321/213.mdx" +0 -156
  202. package/src/docs/CSS//320/237/320/265/321/200/320/265/320/274/320/265/320/275/320/275/321/213/320/265.mdx +0 -47
  203. package/src/docs/CSS//320/237/321/200/320/265/320/264/320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/321/200/321/213.mdx +0 -15
  204. package/src/docs/CSS//320/240/320/265/320/272/320/276/320/274/320/265/320/275/320/264/320/260/321/206/320/270/320/270 /320/221/320/255/320/234.mdx" +0 -49
  205. package/src/docs/CSS//320/241/321/202/320/270/320/273/320/270.md +0 -53
  206. package/src/docs/CSS//320/241/321/202/320/270/320/273/320/270.mdx +0 -4
  207. package/src/docs/CSS//320/247/321/202/320/276 /321/202/320/260/320/272/320/276/320/265 css /320/274/320/276/320/264/321/203/320/273/321/214.mdx" +0 -53
  208. package/src/docs/ROADMAP.md +0 -17
  209. package/src/docs/Roadmap.mdx +0 -4
  210. package/src/docs//320/222/320/262/320/265/320/264/320/265/320/275/320/270/320/265 /320/262 Storybook.mdx" +0 -323
  211. package/src/docs//320/232/320/276/320/274/320/277/320/276/320/275/320/265/320/275/321/202/321/213.mdx +0 -20
  212. package/src/docs//320/237/320/276/320/273/320/265/320/267/320/275/320/260/321/217 /320/270/320/275/321/204/320/276/321/200/320/274/320/260/321/206/320/270/321/217.mdx" +0 -8
  213. package/src/docs//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260/IDE.mdx" +0 -42
  214. package/src/docs//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/233/320/270/320/275/321/202/320/265/321/200.mdx" +0 -72
  215. package/src/docs//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260.mdx" +0 -29
  216. package/src/globals.d.ts +0 -1
  217. package/src/resources/styles/core/colors.css +0 -204
  218. package/src/resources/styles/core/components.css +0 -70
  219. package/src/resources/styles/core/core.ts +0 -10
  220. package/src/resources/styles/core/forms/clear.css +0 -19
  221. package/src/resources/styles/core/forms/controls.css +0 -20
  222. package/src/resources/styles/core/forms/focusable.css +0 -26
  223. package/src/resources/styles/core/forms/forms.css +0 -100
  224. package/src/resources/styles/core/icon.css +0 -58
  225. package/src/resources/styles/core/layout.css +0 -40
  226. package/src/resources/styles/core/modifiers/as.css +0 -9
  227. package/src/resources/styles/core/modifiers/ellipsis.css +0 -18
  228. package/src/resources/styles/core/modifiers/modifiers.css +0 -81
  229. package/src/resources/styles/core/modifiers/only.css +0 -19
  230. package/src/resources/styles/core/select.css +0 -16
  231. package/src/resources/styles/jquery-ui.min.css +0 -6
  232. package/src/resources/styles/storybook.css +0 -11
  233. package/src/resources/styles/themes/dark/theme.css +0 -139
  234. package/src/resources/styles/themes/dark.ts +0 -1
  235. package/src/resources/styles/themes/light/theme.css +0 -139
  236. package/src/resources/styles/themes/light.ts +0 -1
  237. package/src/storybook/components/color.vue +0 -45
  238. package/src/storybook/components/colors.vue +0 -34
  239. package/src/storybook/components/icomoon.ts +0 -38
  240. package/src/storybook/components/properties.vue +0 -82
  241. package/src/storybook/resources/accessibility.png +0 -0
  242. package/src/storybook/resources/accessibility.svg +0 -5
  243. package/src/storybook/resources/addon-library.png +0 -0
  244. package/src/storybook/resources/assets.png +0 -0
  245. package/src/storybook/resources/context.png +0 -0
  246. package/src/storybook/resources/discord.svg +0 -15
  247. package/src/storybook/resources/docs.png +0 -0
  248. package/src/storybook/resources/figma-plugin.png +0 -0
  249. package/src/storybook/resources/github.svg +0 -3
  250. package/src/storybook/resources/share.png +0 -0
  251. package/src/storybook/resources/styling.png +0 -0
  252. package/src/storybook/resources/testing.png +0 -0
  253. package/src/storybook/resources/theming.png +0 -0
  254. package/src/storybook/resources/tutorials.svg +0 -12
  255. package/src/storybook/resources/youtube.svg +0 -4
  256. package/src//320/224/320/276/320/261/321/200/320/276 /320/277/320/276/320/266/320/260/320/273/320/276/320/262/320/260/321/202/321/214.mdx" +0 -3
  257. package/tsconfig.json +0 -62
  258. package/vite.config.ts +0 -91
  259. /package/{src/resources/icomoon → icomoon}/demo-files/demo.css +0 -0
  260. /package/{src/resources/icomoon → icomoon}/demo-files/demo.js +0 -0
  261. /package/{src/resources/icomoon → icomoon}/demo.html +0 -0
  262. /package/{src/resources/icomoon → icomoon}/fonts/Topvisor-2.svg +0 -0
  263. /package/{src/resources/icomoon → icomoon}/fonts/Topvisor-2.ttf +0 -0
  264. /package/{src/resources/icomoon → icomoon}/fonts/Topvisor-2.woff +0 -0
  265. /package/{src/resources/icomoon → icomoon}/selection.json +0 -0
  266. /package/{src/resources/icomoon → icomoon}/style.css +0 -0
@@ -1,33 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
-
3
- import { genArgsTypes, genOverviewStory } from '@/components/helpersStories';
4
- import Component from './checkbox.vue';
5
- import * as ComponentsConst from './checkbox';
6
- import OverviewComponent from './stories/overview.vue';
7
-
8
- const argTypes = genArgsTypes(Component, ComponentsConst, true);
9
-
10
- const meta = {
11
- component: Component,
12
- tags: ['autodocs'],
13
- argTypes,
14
- args: {
15
- modelValue: false,
16
- },
17
- } satisfies Meta<typeof Component>;
18
-
19
- type Story = StoryObj<typeof meta>;
20
-
21
- export const Playground = {
22
- args: {
23
- default: 'Чекбокс',
24
- },
25
- } satisfies Story;
26
-
27
- export const Overview: Story = genOverviewStory({
28
- args: {
29
- isError: false,
30
- },
31
- }, OverviewComponent);
32
-
33
- export default meta;
@@ -1,23 +0,0 @@
1
- type ModelValue = boolean | string[] | Set<string>;
2
-
3
- export interface Props {
4
- /**
5
- * Может быть одного из трех типов:
6
- * - boolean
7
- * - string[]
8
- * - Set
9
- *
10
- * [подробнее](https://vuejs.org/guide/essentials/forms.html#checkbox)
11
- */
12
- modelValue: ModelValue;
13
- name?: string;
14
- value?: string;
15
- description?: string;
16
- disabled?: boolean;
17
- indeterminate?: boolean;
18
- isError?: boolean;
19
- }
20
-
21
- export interface Emits {
22
- (e: 'update:modelValue', value: ModelValue): void;
23
- }
@@ -1,135 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue';
3
- import type { Props, Emits } from './checkbox';
4
- import ControlLabel from '../controlLabel/controlLabel.vue';
5
-
6
- const props = defineProps<Props>();
7
- const emit = defineEmits<Emits>();
8
-
9
- const localValue = computed({
10
- get() {
11
- return props.modelValue;
12
- },
13
- set(value) {
14
- emit('update:modelValue', value);
15
- },
16
- });
17
-
18
- </script>
19
-
20
- <template>
21
- <label
22
- :class="{
23
- ['top-forms-optionWrapper']: true,
24
- ['top-checkbox']: true,
25
- ['top-checkbox_' + name]: name !== '',
26
- ['top-disabled']: disabled,
27
- ['top-error']: isError && !disabled,
28
- }"
29
- >
30
- <input
31
- type="checkbox"
32
- :class="{
33
- ['top-forms-focusable']: !disabled,
34
- ['top-forms-option']: true,
35
- ['top-checkbox_input']: true,
36
- ['top-error']: isError && !disabled,
37
- }"
38
- :name="name"
39
- v-model="localValue"
40
- :value="value"
41
- :indeterminate="indeterminate"
42
- :disabled="disabled"
43
- >
44
-
45
- <ControlLabel
46
- v-if="$slots.default"
47
- :description="description"
48
- :disabled="disabled"
49
- >
50
- <!-- @slot Слот с заголовком -->
51
- <slot></slot>
52
- </ControlLabel>
53
- </label>
54
- </template>
55
-
56
- <style module>
57
- .top-checkbox {
58
- cursor: pointer;
59
- display: inline-flex;
60
- }
61
-
62
- .top-checkbox_input {
63
- cursor: inherit;
64
- border-radius: 4px;
65
- background: var(--content-background-color);
66
- border: 1px solid var(--top-forms-border-color);
67
- width: calc(var(--top-forms-option-height) - 3px * 2);
68
- height: calc(var(--top-forms-option-height) - 3px * 2);
69
- }
70
-
71
- .top-checkbox_input:before {
72
- content: ' ';
73
- color: #FFF;
74
- font-family: 'Topvisor-2';
75
- font-size: 16px;
76
- }
77
-
78
- .top-checkbox_input:hover {
79
- border-color: var(--top-forms-option-color);
80
- background: var(--color-theme-50)
81
- }
82
-
83
- /* checked / indeterminate */
84
- .top-checkbox_input:checked,
85
- .top-checkbox_input:indeterminate {
86
- border-color: var(--top-forms-option-color);
87
- background: var(--top-forms-option-color);
88
- }
89
-
90
- .top-checkbox_input:checked:before {
91
- content: '';
92
- }
93
-
94
- .top-checkbox_input:indeterminate:before {
95
- content: '';
96
- }
97
-
98
- .top-checkbox_input:checked:hover,
99
- .top-checkbox_input:indeterminate:hover {
100
- border-color: var(--top-forms-option-color-hover);
101
- background: var(--top-forms-option-color-hover);
102
- }
103
-
104
- /* disabled selected */
105
- .top-checkbox_input:disabled {
106
- border-color: var(--color-line-1-opacity);
107
- background: var(--color-theme-50);
108
- }
109
-
110
- .top-checkbox_input:checked:disabled,
111
- .top-checkbox_input:indeterminate:disabled {
112
- border-color: transparent;
113
- background: var(--color-theme-400);
114
- }
115
-
116
- /* isError */
117
- .top-checkbox_input.top-error {
118
- border-color: var(--color-negative);
119
- }
120
-
121
- .top-checkbox_input.top-error:hover {
122
- border-color: var(--color-negative-2);
123
- }
124
-
125
- /* isError selected */
126
- .top-checkbox_input:checked.top-error,
127
- .top-checkbox_input:indeterminate.top-error {
128
- background: var(--color-negative);
129
- }
130
-
131
- .top-checkbox_input:checked.top-error:hover,
132
- .top-checkbox_input:indeterminate.top-error:hover {
133
- background: var(--color-negative-2);
134
- }
135
- </style>
@@ -1,171 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue';
3
- import type { Props } from '../checkbox';
4
- import Checkbox from '../checkbox.vue';
5
-
6
- defineProps<Props>();
7
-
8
- const checkbox1 = ref(false);
9
- const checkbox2 = ref([]);
10
- const checkbox3 = ref(new Set<string>());
11
- </script>
12
-
13
- <template>
14
- <div>
15
- <h2>Чекбокс:</h2>
16
-
17
- <Checkbox
18
- :="$props"
19
- :indeterminate="false"
20
- :disabled="false"
21
- >
22
- Чекбокс
23
- </Checkbox>
24
-
25
- <Checkbox
26
- :="$props"
27
- :modelValue="true"
28
- :indeterminate="false"
29
- :disabled="false"
30
- >
31
- Чекбокс
32
- </Checkbox>
33
-
34
- <Checkbox
35
- :="$props"
36
- :indeterminate="true"
37
- :disabled="false"
38
- >
39
- Чекбокс
40
- </Checkbox>
41
-
42
- <h2>Чекбокс disabled:</h2>
43
-
44
- <Checkbox
45
- :="$props"
46
- :indeterminate="false"
47
- :disabled="true"
48
- >
49
- Чекбокс
50
- </Checkbox>
51
-
52
- <Checkbox
53
- :="$props"
54
- :modelValue="true"
55
- :indeterminate="false"
56
- :disabled="true"
57
- >
58
- Чекбокс
59
- </Checkbox>
60
-
61
- <Checkbox
62
- :="$props"
63
- :indeterminate="true"
64
- :disabled="true"
65
- >
66
- Чекбокс
67
- </Checkbox>
68
-
69
- <h2>Чекбокс с описанием:</h2>
70
-
71
- <Checkbox
72
- :="$props"
73
- :indeterminate="false"
74
- description="Перед вам потрясающий чекбокс"
75
- >
76
- Чекбокс
77
- </Checkbox>
78
-
79
- <Checkbox
80
- :="$props"
81
- :modelValue="true"
82
- :indeterminate="false"
83
- description="А этот чекбокс уже отмечен"
84
- >
85
- Чекбокс
86
- </Checkbox>
87
-
88
- <Checkbox
89
- :="$props"
90
- :indeterminate="true"
91
- description="indeterminate - неопределенное состояние"
92
- >
93
- Чекбокс
94
- </Checkbox>
95
-
96
- <h2>Поддерижваемые типы v-model</h2>
97
-
98
- <h3>boolean</h3>
99
-
100
- <p>
101
- <b>Ваш выбор:</b> {{ checkbox1 }}
102
- </p>
103
-
104
- <Checkbox
105
- :="$props"
106
- v-model="checkbox1"
107
- />
108
-
109
- <h3>string[]</h3>
110
-
111
- <p>
112
- <b>Ваш выбор:</b> {{ checkbox2 }}
113
- </p>
114
-
115
- <Checkbox
116
- :="$props"
117
- value="Яблоко"
118
- v-model="checkbox2"
119
- >
120
- Яблоко
121
- </Checkbox>
122
-
123
- <Checkbox
124
- :="$props"
125
- value="Груша"
126
- v-model="checkbox2"
127
- >
128
- Груша
129
- </Checkbox>
130
-
131
- <Checkbox
132
- :="$props"
133
- value="Банан"
134
- v-model="checkbox2"
135
- indeterminate
136
- >
137
- Банан
138
- </Checkbox>
139
-
140
- <h3>Set[]</h3>
141
-
142
- <p>
143
- <b>Ваш выбор:</b> {{ checkbox3 }}
144
- </p>
145
-
146
- <Checkbox
147
- :="$props"
148
- value="Яблоко"
149
- v-model="checkbox3"
150
- >
151
- Яблоко
152
- </Checkbox>
153
-
154
- <Checkbox
155
- :="$props"
156
- value="Груша"
157
- v-model="checkbox3"
158
- >
159
- Груша
160
- </Checkbox>
161
-
162
- <Checkbox
163
- :="$props"
164
- value="Банан"
165
- v-model="checkbox3"
166
- indeterminate
167
- >
168
- Банан
169
- </Checkbox>
170
- </div>
171
- </template>
@@ -1,38 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
-
3
- import { genArgsTypes } from '@/components/helpersStories';
4
- import Component from './controlLabel.vue';
5
- import * as ComponentsConst from './controlLabel';
6
-
7
- const argTypes = genArgsTypes(Component, ComponentsConst);
8
-
9
- /**
10
- * Компонент для вставки заголовка с описанием к элементу управления формы.
11
- *
12
- * Элементы управления:
13
- * - checkbox
14
- * - radio
15
- * - switcher
16
- */
17
- const meta = {
18
- component: Component,
19
- tags: ['autodocs'],
20
- argTypes,
21
- } satisfies Meta<typeof Component>;
22
-
23
- /**
24
- * test 2
25
- */
26
- type Story = StoryObj<typeof meta>;
27
-
28
- export const Playground = {
29
- args: {
30
- title: 'Заголовок',
31
- description: 'Комментарий',
32
- }
33
- } satisfies Story;
34
-
35
- /**
36
- * test 3
37
- */
38
- export default meta;
@@ -1,4 +0,0 @@
1
- export interface Props {
2
- description?: string
3
- disabled?: boolean
4
- }
@@ -1,48 +0,0 @@
1
- <script setup lang="ts">
2
- import type { Props } from './controlLabel';
3
-
4
- defineProps<Props>();
5
- </script>
6
-
7
- <template>
8
- <div class="top-forms-optionLabel">
9
- <div
10
- :class="{
11
- 'top-forms-optionLabel_title': true,
12
- 'top-forms-optionLabel_title-disabled': disabled,
13
- }"
14
- >
15
- <!-- @slot Слот с заголовком -->
16
- <slot></slot>
17
- </div>
18
-
19
- <div
20
- v-if="description"
21
- class="top-forms-optionLabel_description"
22
- >
23
- {{ description }}
24
- </div>
25
- </div>
26
- </template>
27
-
28
- <style module>
29
- .top-forms-optionLabel {
30
- flex-grow: 1;
31
- }
32
-
33
- .top-forms-optionLabel_title {
34
- min-height: var(--top-forms-option-height);
35
- display: flex;
36
- align-items: center;
37
- }
38
-
39
- .top-forms-optionLabel_title-disabled {
40
- color: var(--color-text-3);
41
- }
42
-
43
- .top-forms-optionLabel_description {
44
- color: var(--color-text-3);
45
- font-size: 0.85em;
46
- line-height: var(--top-forms-option-height);
47
- }
48
- </style>
@@ -1,10 +0,0 @@
1
- export { default as Button } from './button/button.vue'
2
- export { default as Checkbox } from './checkbox/checkbox.vue'
3
- export { default as ControlLabel } from './controlLabel/controlLabel.vue'
4
- export { default as Hint } from './hint/hint.vue'
5
- export { default as Input } from './input/input.vue'
6
- export { default as InputDate } from './inputDate/inputDate.vue'
7
- export { default as Radio } from './radio/radio.vue'
8
- export { default as Switcher } from './switcher/switcher.vue'
9
- export { default as Textarea } from './textarea/textarea.vue'
10
- export { default as Select } from './select/select.vue'
@@ -1,10 +0,0 @@
1
- /**
2
- * Размеры
3
- */
4
- export const sizes = {
5
- s: 's',
6
- l: 'l',
7
- xl: 'xl',
8
- } as const;
9
-
10
- export type Size = typeof sizes[keyof typeof sizes];
@@ -1,46 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
-
3
- import { genArgsTypes, genOverviewStory } from '@/components/helpersStories';
4
- import Component from './hint.vue';
5
- import * as ComponentsConst from './hint';
6
- import TabsTab from '@/components/tabs/tabs/tab.vue';
7
- import TabsContent from '@/components/tabs/tabs/content.vue';
8
- import Button from '@/components/forms/button/button.vue';
9
- import Textarea from '@/components/forms/textarea/textarea.vue';
10
- import Hint from '@/components/forms/hint/hint.vue';
11
-
12
- const argTypes = genArgsTypes(Component, ComponentsConst);
13
-
14
- /**
15
- * Компонент для вывода иконки с подсказкой
16
- *
17
- * Для настройки tooltip см. директиву v-top-tooltip
18
- */
19
- const meta = {
20
- component: Component,
21
- tags: ['autodocs'],
22
- args: {
23
- hint: 'Текст подсказки',
24
- },
25
- argTypes,
26
- } satisfies Meta<typeof Component>;
27
-
28
- type Story = StoryObj<typeof meta>;
29
-
30
- export const Playground = {} satisfies Story;
31
-
32
- export const Tooltip = {
33
- render: (args) => ({
34
- components: {
35
- Hint: Component,
36
- },
37
- setup() {
38
- return { args };
39
- },
40
- template: `
41
- <Hint :hint="args.hint" v-top-tooltip></Hint>
42
- `,
43
- }),
44
- } satisfies Story;
45
-
46
- export default meta;
@@ -1,8 +0,0 @@
1
- export interface Props {
2
- /**
3
- * Текст подсказки, значение атрибута title
4
- *
5
- * Для подключения tooltip используйте директиву **v-top-tooltip**
6
- */
7
- hint: string;
8
- }
@@ -1,32 +0,0 @@
1
- <script setup lang="ts">
2
- import type { Props } from './hint';
3
-
4
- const props = defineProps<Props>();
5
- </script>
6
-
7
- <template>
8
- <span
9
- class="top-hint"
10
- data-top-icon=""
11
- :title="hint"
12
- ></span>
13
- </template>
14
-
15
- <style module>
16
- .top-hint {
17
- --top-icon-size: 16px;
18
- --top-icon-width: var(--top-icon-size);
19
-
20
- border-radius: 50%;
21
- background: var(--content-background-color);
22
- padding: 1px;
23
- color: var(--color-text-4);
24
- line-height: 1;
25
- z-index: 1;
26
- pointer-events: all;
27
- }
28
-
29
- .top-hint:hover {
30
- color: var(--color-text-3);
31
- }
32
- </style>
@@ -1,31 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
-
3
- import { genArgsTypes, genOverviewStory } from '@/components/helpersStories';
4
- import Component from './input.vue';
5
- import * as ComponentsConst from './input';
6
- import OverviewComponent from './stories/overview.vue';
7
-
8
- const argTypes = genArgsTypes(Component, ComponentsConst, true);
9
-
10
- const meta = {
11
- component: Component,
12
- tags: ['autodocs'],
13
- argTypes,
14
- args: {
15
- modelValue: '',
16
- },
17
- } satisfies Meta<typeof Component>;
18
-
19
- type Story = StoryObj<typeof meta>;
20
-
21
- export const Playground = {} satisfies Story;
22
-
23
- export const Overview: Story = genOverviewStory({
24
- args: {
25
- title: 'Заголовок поля',
26
- captionType: '',
27
- isError: false,
28
- },
29
- }, OverviewComponent);
30
-
31
- export default meta;
@@ -1,34 +0,0 @@
1
- import type { Size } from '@/components/forms/helpers';
2
- import { sizes } from '@/components/forms/helpers';
3
-
4
- export interface Props {
5
- modelValue: string;
6
-
7
- name?: string;
8
- disabled?: boolean;
9
- readonly?: boolean;
10
-
11
- title?: string;
12
- captionType?: CaptionType;
13
-
14
- size?: Size;
15
- icon?: string;
16
- icon2?: string;
17
- addCleaner?: boolean;
18
- isError?: boolean;
19
- modificator?: string;
20
- }
21
-
22
- export interface Emits {
23
- (e: 'update:modelValue', value: string): void;
24
- }
25
-
26
- export const captionTypes = {
27
- none: '',
28
- slide: 'slide',
29
- top: 'top',
30
- } as const;
31
-
32
- export type CaptionType = typeof captionTypes[keyof typeof captionTypes];
33
-
34
- export { sizes };