shared-ritm 1.3.124 → 1.3.126

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 (80) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +502 -481
  3. package/dist/shared-ritm.umd.js +2 -2
  4. package/dist/types/api/services/PhotoService.d.ts +40 -0
  5. package/dist/types/stories/Button.stories.d.ts +13 -0
  6. package/dist/types/stories/Checkbox.stories.d.ts +7 -0
  7. package/dist/types/stories/Confirm.stories.d.ts +8 -0
  8. package/dist/types/stories/DatePicker.stories.d.ts +8 -0
  9. package/dist/types/stories/Dropdown.stories.d.ts +8 -0
  10. package/dist/types/stories/File.stories.d.ts +8 -0
  11. package/dist/types/stories/Icon.stories.d.ts +7 -0
  12. package/dist/types/stories/Input.stories.d.ts +11 -0
  13. package/dist/types/stories/InputNew.stories.d.ts +12 -0
  14. package/dist/types/stories/InputSearch.stories.d.ts +10 -0
  15. package/dist/types/stories/Loader.stories.d.ts +8 -0
  16. package/dist/types/stories/Select.stories.d.ts +7 -0
  17. package/dist/types/stories/Toggle.stories.d.ts +8 -0
  18. package/package.json +70 -70
  19. package/src/App.vue +2461 -2461
  20. package/src/api/services/AuthService.ts +67 -67
  21. package/src/api/services/ControlsService.ts +100 -100
  22. package/src/api/services/EquipmentService.ts +68 -68
  23. package/src/api/services/GanttService.ts +58 -58
  24. package/src/api/services/InstrumentsService.ts +76 -76
  25. package/src/api/services/RepairsService.ts +111 -111
  26. package/src/api/services/TasksService.ts +165 -165
  27. package/src/api/services/UserIssueService.ts +32 -32
  28. package/src/api/services/UserService.ts +129 -129
  29. package/src/api/services/VideoService.ts +118 -118
  30. package/src/api/settings/ApiService.ts +185 -185
  31. package/src/api/types/Api_Auth.ts +121 -121
  32. package/src/api/types/Api_Controls.ts +112 -112
  33. package/src/api/types/Api_Equipment.ts +54 -54
  34. package/src/api/types/Api_Instruments.ts +182 -182
  35. package/src/api/types/Api_Metrics.ts +89 -89
  36. package/src/api/types/Api_Repairs.ts +200 -200
  37. package/src/api/types/Api_Search.ts +81 -81
  38. package/src/api/types/Api_Tasks.ts +378 -378
  39. package/src/api/types/Api_User.ts +161 -161
  40. package/src/api/types/Api_User_Issue.ts +36 -36
  41. package/src/api/types/Api_Video.ts +244 -244
  42. package/src/common/app-button/Button.stories.ts +369 -369
  43. package/src/common/app-checkbox/AppCheckbox.vue +33 -31
  44. package/src/common/app-checkbox/Checkbox.stories.ts +252 -252
  45. package/src/common/app-date-picker/DatePicker.stories.ts +66 -66
  46. package/src/common/app-datepicker/Datepicker.stories.ts +145 -145
  47. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  48. package/src/common/app-dialogs/Confirm.stories.ts +93 -93
  49. package/src/common/app-dropdown/Dropdown.stories.ts +94 -94
  50. package/src/common/app-file/File.stories.ts +104 -104
  51. package/src/common/app-icon/AppIcon.vue +110 -110
  52. package/src/common/app-icon/Icon.stories.ts +91 -91
  53. package/src/common/app-input/AppInput.vue +150 -150
  54. package/src/common/app-input/Input.stories.ts +160 -160
  55. package/src/common/app-input-new/AppInputNew.vue +181 -181
  56. package/src/common/app-input-new/InputNew.stories.ts +240 -240
  57. package/src/common/app-input-search/InputSearch.stories.ts +149 -149
  58. package/src/common/app-layout/components/AppLayoutHeader.vue +289 -289
  59. package/src/common/app-loader/Loader.stories.ts +114 -114
  60. package/src/common/app-modal/index.vue +101 -101
  61. package/src/common/app-select/AppSelect.vue +159 -159
  62. package/src/common/app-select/Select.stories.ts +155 -155
  63. package/src/common/app-sheet-new/AppSheetNew.vue +254 -254
  64. package/src/common/app-sidebar/AppSidebar.vue +177 -177
  65. package/src/common/app-table/AppTable.vue +313 -313
  66. package/src/common/app-table/components/ModalSelect.stories.ts +323 -323
  67. package/src/common/app-table/components/ModalSelect.vue +311 -302
  68. package/src/common/app-table/components/TableModal.vue +369 -369
  69. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  70. package/src/common/app-table/controllers/useTableModel.ts +98 -98
  71. package/src/common/app-toggle/AppToggle.vue +12 -12
  72. package/src/common/app-toggle/Toggle.stories.ts +245 -245
  73. package/src/common/app-wrapper/AppWrapper.vue +31 -31
  74. package/src/configs/storybook.ts +14 -14
  75. package/src/icons/sidebar/user-requests-icon.vue +23 -23
  76. package/src/index.ts +134 -134
  77. package/src/shared/styles/general.css +140 -140
  78. package/src/styles/variables.sass +12 -12
  79. package/src/utils/files.ts +38 -38
  80. package/src/utils/helpers.ts +59 -59
@@ -1,150 +1,150 @@
1
- <template>
2
- <q-input
3
- v-model="value"
4
- :class="[inputClasses, $style['app-input']]"
5
- standout
6
- outlined
7
- :clearable="clearable"
8
- dense
9
- :rules="rules"
10
- :type="inputType"
11
- autocomplete="h87h58g7h8hd"
12
- :readonly="readonly || field"
13
- :disable="disabled"
14
- :placeholder="placeholder"
15
- >
16
- </q-input>
17
- </template>
18
-
19
- <script lang="ts" setup>
20
- import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
21
-
22
- interface AppQInputProps {
23
- name?: string | undefined
24
- mask?: string | undefined
25
- fillMask?: boolean | string | undefined
26
- reverseFillMask?: boolean | undefined
27
- unmaskedValue?: boolean | undefined
28
- modelValue: string | number | null | undefined
29
- error?: boolean | undefined
30
- errorMessage?: string | undefined
31
- noErrorIcon?: boolean | undefined
32
- rules?: any | undefined
33
- reactiveRules?: boolean | undefined
34
- lazyRules?: boolean | 'ondemand' | undefined
35
- label?: string | undefined
36
- stackLabel?: boolean | undefined
37
- hint?: string | undefined
38
- hideHint?: boolean | undefined
39
- prefix?: string | undefined
40
- suffix?: string | undefined
41
- labelColor?: string | undefined
42
- color?: string | undefined
43
- bgColor?: string | undefined
44
- dark?: boolean | undefined
45
- loading?: boolean | undefined
46
- clearable?: boolean | undefined
47
- clearIcon?: string | undefined
48
- filled?: boolean | undefined
49
- outlined?: boolean | undefined
50
- borderless?: boolean | undefined
51
- standout?: boolean | string | undefined
52
- labelSlot?: boolean | undefined
53
- bottomSlots?: boolean | undefined
54
- hideBottomSpace?: boolean | undefined
55
- counter?: boolean | undefined
56
- rounded?: boolean | undefined
57
- square?: boolean | undefined
58
- dense?: boolean | undefined
59
- itemAligned?: boolean | undefined
60
- disable?: boolean | undefined
61
- readonly?: boolean | undefined
62
- autofocus?: boolean | undefined
63
- for?: string | undefined
64
- shadowText?: string | undefined
65
- type?:
66
- | 'text'
67
- | 'password'
68
- | 'textarea'
69
- | 'email'
70
- | 'search'
71
- | 'tel'
72
- | 'file'
73
- | 'number'
74
- | 'url'
75
- | 'time'
76
- | 'date'
77
- | undefined
78
- debounce?: string | number | undefined
79
- disabled?: boolean | undefined
80
- maxlength?: string | number | undefined
81
- autogrow?: boolean | undefined
82
- inputClass?: any | undefined
83
- inputStyle?: any | undefined
84
- onClear?: (value: any) => void
85
- 'onUpdate:modelValue'?: (value: string | number | null) => void
86
- onFocus?: (evt: Event) => void
87
- onBlur?: (evt: Event) => void
88
- onClick?: (evt: Event) => void
89
- placeholder?: string | undefined
90
- }
91
-
92
- interface AppInputProps extends AppQInputProps {
93
- field?: boolean
94
- required?: boolean
95
- datePicker?: boolean
96
- timePicker?: boolean
97
- withIcon?: boolean
98
- withButton?: boolean
99
- withArrow?: boolean
100
- borderColor?: string
101
- borderRadius?: string
102
- borderWidth?: string
103
- width?: string
104
- height?: string
105
- clearable?: boolean
106
- }
107
-
108
- const props = withDefaults(defineProps<AppInputProps>(), {
109
- dense: true,
110
- outlined: true,
111
- error: undefined,
112
- modelValue: '',
113
- borderRadius: '8px',
114
- borderWidth: '1px',
115
- width: 'auto',
116
- height: 'auto',
117
- })
118
-
119
- const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
120
- const passwordVisibility = ref(false)
121
- const inputType = computed(() => {
122
- if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
123
- return props.type || 'text'
124
- })
125
-
126
- const value = computed({
127
- get: () =>
128
- props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
129
- ? +props.modelValue
130
- : props.modelValue,
131
- set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
132
- })
133
-
134
- const inputClasses = computed(() => {
135
- return {
136
- 'app-input': true,
137
- '--required': props.required,
138
- '--field': props.field,
139
- 'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
140
- }
141
- })
142
- </script>
143
-
144
- <style module lang="scss">
145
- .app-input {
146
- &:global(.q-field--dense .q-field__control) {
147
- height: v-bind(height);
148
- }
149
- }
150
- </style>
1
+ <template>
2
+ <q-input
3
+ v-model="value"
4
+ :class="[inputClasses, $style['app-input']]"
5
+ standout
6
+ outlined
7
+ :clearable="clearable"
8
+ dense
9
+ :rules="rules"
10
+ :type="inputType"
11
+ autocomplete="h87h58g7h8hd"
12
+ :readonly="readonly || field"
13
+ :disable="disabled"
14
+ :placeholder="placeholder"
15
+ >
16
+ </q-input>
17
+ </template>
18
+
19
+ <script lang="ts" setup>
20
+ import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
21
+
22
+ interface AppQInputProps {
23
+ name?: string | undefined
24
+ mask?: string | undefined
25
+ fillMask?: boolean | string | undefined
26
+ reverseFillMask?: boolean | undefined
27
+ unmaskedValue?: boolean | undefined
28
+ modelValue: string | number | null | undefined
29
+ error?: boolean | undefined
30
+ errorMessage?: string | undefined
31
+ noErrorIcon?: boolean | undefined
32
+ rules?: any | undefined
33
+ reactiveRules?: boolean | undefined
34
+ lazyRules?: boolean | 'ondemand' | undefined
35
+ label?: string | undefined
36
+ stackLabel?: boolean | undefined
37
+ hint?: string | undefined
38
+ hideHint?: boolean | undefined
39
+ prefix?: string | undefined
40
+ suffix?: string | undefined
41
+ labelColor?: string | undefined
42
+ color?: string | undefined
43
+ bgColor?: string | undefined
44
+ dark?: boolean | undefined
45
+ loading?: boolean | undefined
46
+ clearable?: boolean | undefined
47
+ clearIcon?: string | undefined
48
+ filled?: boolean | undefined
49
+ outlined?: boolean | undefined
50
+ borderless?: boolean | undefined
51
+ standout?: boolean | string | undefined
52
+ labelSlot?: boolean | undefined
53
+ bottomSlots?: boolean | undefined
54
+ hideBottomSpace?: boolean | undefined
55
+ counter?: boolean | undefined
56
+ rounded?: boolean | undefined
57
+ square?: boolean | undefined
58
+ dense?: boolean | undefined
59
+ itemAligned?: boolean | undefined
60
+ disable?: boolean | undefined
61
+ readonly?: boolean | undefined
62
+ autofocus?: boolean | undefined
63
+ for?: string | undefined
64
+ shadowText?: string | undefined
65
+ type?:
66
+ | 'text'
67
+ | 'password'
68
+ | 'textarea'
69
+ | 'email'
70
+ | 'search'
71
+ | 'tel'
72
+ | 'file'
73
+ | 'number'
74
+ | 'url'
75
+ | 'time'
76
+ | 'date'
77
+ | undefined
78
+ debounce?: string | number | undefined
79
+ disabled?: boolean | undefined
80
+ maxlength?: string | number | undefined
81
+ autogrow?: boolean | undefined
82
+ inputClass?: any | undefined
83
+ inputStyle?: any | undefined
84
+ onClear?: (value: any) => void
85
+ 'onUpdate:modelValue'?: (value: string | number | null) => void
86
+ onFocus?: (evt: Event) => void
87
+ onBlur?: (evt: Event) => void
88
+ onClick?: (evt: Event) => void
89
+ placeholder?: string | undefined
90
+ }
91
+
92
+ interface AppInputProps extends AppQInputProps {
93
+ field?: boolean
94
+ required?: boolean
95
+ datePicker?: boolean
96
+ timePicker?: boolean
97
+ withIcon?: boolean
98
+ withButton?: boolean
99
+ withArrow?: boolean
100
+ borderColor?: string
101
+ borderRadius?: string
102
+ borderWidth?: string
103
+ width?: string
104
+ height?: string
105
+ clearable?: boolean
106
+ }
107
+
108
+ const props = withDefaults(defineProps<AppInputProps>(), {
109
+ dense: true,
110
+ outlined: true,
111
+ error: undefined,
112
+ modelValue: '',
113
+ borderRadius: '8px',
114
+ borderWidth: '1px',
115
+ width: 'auto',
116
+ height: 'auto',
117
+ })
118
+
119
+ const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
120
+ const passwordVisibility = ref(false)
121
+ const inputType = computed(() => {
122
+ if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
123
+ return props.type || 'text'
124
+ })
125
+
126
+ const value = computed({
127
+ get: () =>
128
+ props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
129
+ ? +props.modelValue
130
+ : props.modelValue,
131
+ set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
132
+ })
133
+
134
+ const inputClasses = computed(() => {
135
+ return {
136
+ 'app-input': true,
137
+ '--required': props.required,
138
+ '--field': props.field,
139
+ 'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
140
+ }
141
+ })
142
+ </script>
143
+
144
+ <style module lang="scss">
145
+ .app-input {
146
+ &:global(.q-field--dense .q-field__control) {
147
+ height: v-bind(height);
148
+ }
149
+ }
150
+ </style>
@@ -1,160 +1,160 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
2
- import AppInput from '@/common/app-input/AppInput.vue'
3
-
4
- const meta: Meta<typeof AppInput> = {
5
- title: 'Components/AppInput',
6
- component: AppInput,
7
- tags: ['autodocs'],
8
- argTypes: {
9
- modelValue: {
10
- control: 'text',
11
- table: { category: 'Используется' },
12
- },
13
- placeholder: {
14
- control: 'text',
15
- description: 'Текст-подсказка внутри поля.',
16
- table: { category: 'Используется' },
17
- },
18
- type: {
19
- control: 'select',
20
- options: ['text', 'password', 'number', 'email', 'search', 'tel', 'date', 'url'],
21
- description: 'Тип HTML-инпута.',
22
- table: { category: 'Используется' },
23
- },
24
-
25
- width: {
26
- control: 'text',
27
- description: 'Ширина поля (CSS-значение, например "300px", "100%").',
28
- table: { disable: true },
29
- },
30
- height: {
31
- control: 'text',
32
- description: 'Высота поля (например, "48px").',
33
- table: { category: 'Используется' },
34
- },
35
- borderRadius: {
36
- control: 'text',
37
- description: 'Скругление углов (например, "8px").',
38
- table: { disable: true },
39
- },
40
- borderWidth: {
41
- control: 'text',
42
- description: 'Толщина границы (например, "1px").',
43
- table: { disable: true },
44
- },
45
-
46
- disabled: {
47
- control: 'boolean',
48
- description: 'Отключает поле ввода.',
49
- table: { category: 'Используется' },
50
- },
51
- readonly: {
52
- control: 'boolean',
53
- description: 'Делает поле доступным только для чтения.',
54
- table: { category: 'Используется' },
55
- },
56
- field: {
57
- control: 'boolean',
58
- description: 'Делает поле доступным только для чтения.',
59
- table: { category: 'Используется' },
60
- },
61
- required: {
62
- control: 'boolean',
63
- description: 'Добавляет визуальный признак обязательного поля (стиль --required).',
64
- table: { disable: true },
65
- },
66
-
67
- withArrow: {
68
- control: 'boolean',
69
- description: 'Для type="number": показывать ли стрелки вверх/вниз.',
70
- table: { disable: true },
71
- },
72
- mask: { control: 'text', table: { disable: true } },
73
- debounce: { control: 'number', table: { disable: true } },
74
- datePicker: { table: { disable: true } },
75
- timePicker: { table: { disable: true } },
76
- withIcon: { table: { disable: true } },
77
- withButton: { table: { disable: true } },
78
- rules: { description: 'Правила для валидации.', table: { category: 'Используется' } },
79
- borderColor: { table: { disable: true } },
80
- name: { table: { disable: true } },
81
- label: { table: { disable: true } },
82
- hint: { table: { disable: true } },
83
- },
84
- args: {
85
- modelValue: '',
86
- placeholder: 'Введите значение...',
87
- type: 'text',
88
- height: '48px',
89
- },
90
- }
91
-
92
- export default meta
93
-
94
- type Story = StoryObj<typeof AppInput>
95
-
96
- export const Default: Story = {}
97
-
98
- export const InputTypes: Story = {
99
- render: () => ({
100
- components: { AppInput },
101
- template: `
102
- <div style="display: flex; flex-direction: column; gap: 16px;">
103
- <AppInput v-model="textValue" placeholder="Текст" type="text" />
104
- <AppInput v-model="passwordValue" placeholder="Пароль" type="password" />
105
- <AppInput v-model="emailValue" placeholder="Email" type="email" />
106
- <AppInput v-model="telValue" placeholder="Телефон" type="tel" />
107
- <AppInput v-model="numValue" placeholder="Число" type="number"/>
108
- </div>
109
- `,
110
- data() {
111
- return {
112
- textValue: '',
113
- passwordValue: '',
114
- emailValue: '',
115
- telValue: '',
116
- numValue: 0,
117
- }
118
- },
119
- }),
120
- }
121
-
122
- export const States: Story = {
123
- render: () => ({
124
- components: { AppInput },
125
- template: `
126
- <div style="display: flex; flex-direction: column; gap: 16px;">
127
- <AppInput v-model="activeValue" placeholder="Активное" />
128
- <AppInput v-model="disabledValue" :disabled="true" />
129
- <AppInput v-model="readonlyValue" :readonly="true" />
130
- </div>
131
- `,
132
- data() {
133
- return {
134
- activeValue: '',
135
- disabledValue: 'недоступно',
136
- readonlyValue: 'только чтение',
137
- }
138
- },
139
- }),
140
- }
141
-
142
- export const Sizes: Story = {
143
- render: () => ({
144
- components: { AppInput },
145
- template: `
146
- <div style="display: flex; gap: 16px; flex-wrap: wrap; align-items: end;">
147
- <AppInput v-model="val1" placeholder="40px" height="40px" width="180px" />
148
- <AppInput v-model="val2" placeholder="48px" height="48px" width="200px" />
149
- <AppInput v-model="val3" placeholder="60px" height="60px" width="220px" border-radius="12px" />
150
- </div>
151
- `,
152
- data() {
153
- return {
154
- val1: '',
155
- val2: '',
156
- val3: '',
157
- }
158
- },
159
- }),
160
- }
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import AppInput from '@/common/app-input/AppInput.vue'
3
+
4
+ const meta: Meta<typeof AppInput> = {
5
+ title: 'Components/AppInput',
6
+ component: AppInput,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ modelValue: {
10
+ control: 'text',
11
+ table: { category: 'Используется' },
12
+ },
13
+ placeholder: {
14
+ control: 'text',
15
+ description: 'Текст-подсказка внутри поля.',
16
+ table: { category: 'Используется' },
17
+ },
18
+ type: {
19
+ control: 'select',
20
+ options: ['text', 'password', 'number', 'email', 'search', 'tel', 'date', 'url'],
21
+ description: 'Тип HTML-инпута.',
22
+ table: { category: 'Используется' },
23
+ },
24
+
25
+ width: {
26
+ control: 'text',
27
+ description: 'Ширина поля (CSS-значение, например "300px", "100%").',
28
+ table: { disable: true },
29
+ },
30
+ height: {
31
+ control: 'text',
32
+ description: 'Высота поля (например, "48px").',
33
+ table: { category: 'Используется' },
34
+ },
35
+ borderRadius: {
36
+ control: 'text',
37
+ description: 'Скругление углов (например, "8px").',
38
+ table: { disable: true },
39
+ },
40
+ borderWidth: {
41
+ control: 'text',
42
+ description: 'Толщина границы (например, "1px").',
43
+ table: { disable: true },
44
+ },
45
+
46
+ disabled: {
47
+ control: 'boolean',
48
+ description: 'Отключает поле ввода.',
49
+ table: { category: 'Используется' },
50
+ },
51
+ readonly: {
52
+ control: 'boolean',
53
+ description: 'Делает поле доступным только для чтения.',
54
+ table: { category: 'Используется' },
55
+ },
56
+ field: {
57
+ control: 'boolean',
58
+ description: 'Делает поле доступным только для чтения.',
59
+ table: { category: 'Используется' },
60
+ },
61
+ required: {
62
+ control: 'boolean',
63
+ description: 'Добавляет визуальный признак обязательного поля (стиль --required).',
64
+ table: { disable: true },
65
+ },
66
+
67
+ withArrow: {
68
+ control: 'boolean',
69
+ description: 'Для type="number": показывать ли стрелки вверх/вниз.',
70
+ table: { disable: true },
71
+ },
72
+ mask: { control: 'text', table: { disable: true } },
73
+ debounce: { control: 'number', table: { disable: true } },
74
+ datePicker: { table: { disable: true } },
75
+ timePicker: { table: { disable: true } },
76
+ withIcon: { table: { disable: true } },
77
+ withButton: { table: { disable: true } },
78
+ rules: { description: 'Правила для валидации.', table: { category: 'Используется' } },
79
+ borderColor: { table: { disable: true } },
80
+ name: { table: { disable: true } },
81
+ label: { table: { disable: true } },
82
+ hint: { table: { disable: true } },
83
+ },
84
+ args: {
85
+ modelValue: '',
86
+ placeholder: 'Введите значение...',
87
+ type: 'text',
88
+ height: '48px',
89
+ },
90
+ }
91
+
92
+ export default meta
93
+
94
+ type Story = StoryObj<typeof AppInput>
95
+
96
+ export const Default: Story = {}
97
+
98
+ export const InputTypes: Story = {
99
+ render: () => ({
100
+ components: { AppInput },
101
+ template: `
102
+ <div style="display: flex; flex-direction: column; gap: 16px;">
103
+ <AppInput v-model="textValue" placeholder="Текст" type="text" />
104
+ <AppInput v-model="passwordValue" placeholder="Пароль" type="password" />
105
+ <AppInput v-model="emailValue" placeholder="Email" type="email" />
106
+ <AppInput v-model="telValue" placeholder="Телефон" type="tel" />
107
+ <AppInput v-model="numValue" placeholder="Число" type="number"/>
108
+ </div>
109
+ `,
110
+ data() {
111
+ return {
112
+ textValue: '',
113
+ passwordValue: '',
114
+ emailValue: '',
115
+ telValue: '',
116
+ numValue: 0,
117
+ }
118
+ },
119
+ }),
120
+ }
121
+
122
+ export const States: Story = {
123
+ render: () => ({
124
+ components: { AppInput },
125
+ template: `
126
+ <div style="display: flex; flex-direction: column; gap: 16px;">
127
+ <AppInput v-model="activeValue" placeholder="Активное" />
128
+ <AppInput v-model="disabledValue" :disabled="true" />
129
+ <AppInput v-model="readonlyValue" :readonly="true" />
130
+ </div>
131
+ `,
132
+ data() {
133
+ return {
134
+ activeValue: '',
135
+ disabledValue: 'недоступно',
136
+ readonlyValue: 'только чтение',
137
+ }
138
+ },
139
+ }),
140
+ }
141
+
142
+ export const Sizes: Story = {
143
+ render: () => ({
144
+ components: { AppInput },
145
+ template: `
146
+ <div style="display: flex; gap: 16px; flex-wrap: wrap; align-items: end;">
147
+ <AppInput v-model="val1" placeholder="40px" height="40px" width="180px" />
148
+ <AppInput v-model="val2" placeholder="48px" height="48px" width="200px" />
149
+ <AppInput v-model="val3" placeholder="60px" height="60px" width="220px" border-radius="12px" />
150
+ </div>
151
+ `,
152
+ data() {
153
+ return {
154
+ val1: '',
155
+ val2: '',
156
+ val3: '',
157
+ }
158
+ },
159
+ }),
160
+ }