adata-ui 0.1.0 → 0.1.4

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 (43) hide show
  1. package/README.md +3 -20
  2. package/dist/adata-ui.common.js +591 -42
  3. package/dist/adata-ui.common.js.map +1 -1
  4. package/dist/adata-ui.css +1 -1
  5. package/dist/adata-ui.umd.js +591 -42
  6. package/dist/adata-ui.umd.js.map +1 -1
  7. package/dist/adata-ui.umd.min.js +1 -1
  8. package/dist/adata-ui.umd.min.js.map +1 -1
  9. package/package-lock.json +8132 -241
  10. package/package.json +70 -52
  11. package/src/App.vue +1 -6
  12. package/src/components/Alert/Alert.stories.js +17 -0
  13. package/src/components/Alert/Alert.vue +63 -0
  14. package/src/components/Button/BaseButton.vue +241 -0
  15. package/src/components/Button/Button.stories.js +23 -0
  16. package/src/components/Footer/Footer.stories.js +20 -0
  17. package/src/components/Footer/Footer.vue +233 -0
  18. package/src/components/Header/Header.stories.js +0 -0
  19. package/src/components/Header/Header.vue +135 -0
  20. package/src/components/PasswordField/PasswordField.stories.js +16 -0
  21. package/src/components/PasswordField/PasswordField.vue +68 -0
  22. package/src/components/TextField/TextField.stories.js +17 -0
  23. package/src/components/TextField/TextField.vue +355 -0
  24. package/src/components/index.js +8 -2
  25. package/src/stories/Button.stories.js +46 -0
  26. package/src/stories/Button.vue +54 -0
  27. package/src/stories/Header.stories.js +21 -0
  28. package/src/stories/Header.vue +59 -0
  29. package/src/stories/Introduction.stories.mdx +211 -0
  30. package/src/stories/Page.stories.js +25 -0
  31. package/src/stories/Page.vue +88 -0
  32. package/src/stories/assets/code-brackets.svg +1 -0
  33. package/src/stories/assets/colors.svg +1 -0
  34. package/src/stories/assets/comments.svg +1 -0
  35. package/src/stories/assets/direction.svg +1 -0
  36. package/src/stories/assets/flow.svg +1 -0
  37. package/src/stories/assets/plugin.svg +1 -0
  38. package/src/stories/assets/repo.svg +1 -0
  39. package/src/stories/assets/stackalt.svg +1 -0
  40. package/src/stories/button.css +30 -0
  41. package/src/stories/header.css +26 -0
  42. package/src/stories/page.css +69 -0
  43. package/src/components/HelloWorld.vue +0 -58
@@ -0,0 +1,233 @@
1
+ <template>
2
+ <footer class="footer" :class="[{'paddinged': hasBottomMenu}]">
3
+ <div class="footer__top">
4
+ <ul class="nav">
5
+ <a class="logo adata-logo" href="https://adata.kz">
6
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
7
+ <path d="M62.926 38.22v-28h10.316c10.342 0 15.511 4.55 15.508 13.652 0 4.36-1.41 7.843-4.232 10.448-2.822 2.605-6.58 3.907-11.276 3.904l-10.316-.004zm6.56-22.868v17.752h3.248c2.839 0 5.069-.82 6.69-2.46 1.622-1.64 2.43-3.873 2.424-6.7 0-2.667-.8-4.767-2.403-6.3-1.602-1.533-3.853-2.297-6.752-2.292h-3.206zM118.5 38.22h-7.131l-2.079-6.228H98.958l-2.079 6.228h-7.093l10.598-28h7.775l10.341 28zm-10.723-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.162c-.07.83-.24 1.649-.508 2.44l-3.168 9.492h7.451zm31.833-11.796h-8.316V38.22h-6.557V15.352h-8.274v-5.136h23.147v5.136zM166 38.22h-7.143l-2.079-6.228h-10.349l-2.05 6.228h-7.106l10.598-28h7.776l10.353 28zm-10.719-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.163c-.069.83-.239 1.649-.507 2.44l-3.168 9.492h7.451zM24.553 15.252h-.163c-.069.83-.24 1.649-.507 2.44L20.715 27.2h7.45l-3.126-9.412a12.02 12.02 0 01-.486-2.536z"></path>
8
+ <path d="M44.905 0H4.99a5.091 5.091 0 00-3.528 1.406A4.71 4.71 0 000 4.8v38.4a4.71 4.71 0 001.461 3.394A5.091 5.091 0 004.99 48h39.916a5.091 5.091 0 003.528-1.406 4.71 4.71 0 001.462-3.394V4.8a4.71 4.71 0 00-1.462-3.394A5.091 5.091 0 0044.905 0zM31.737 38.26l-2.079-6.232H19.305l-2.05 6.232h-7.097l10.598-28h7.776l10.353 28h-7.148z"></path>
9
+ </svg>
10
+ </a>
11
+ <div class="social">
12
+ <a target="_blank" href="https://www.facebook.com/adata.kz">
13
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
14
+ <path d="M13.6562 0H2.34375C1.05151 0 0 1.05151 0 2.34375V13.6562C0 14.9485 1.05151 16 2.34375 16H7.0625V10.3438H5.1875V7.53125H7.0625V5.625C7.0625 4.0741 8.3241 2.8125 9.875 2.8125H12.7188V5.625H9.875V7.53125H12.7188L12.25 10.3438H9.875V16H13.6562C14.9485 16 16 14.9485 16 13.6562V2.34375C16 1.05151 14.9485 0 13.6562 0Z" fill="#2C3E50"></path>
15
+ </svg>
16
+ </a>
17
+ <a target="_blank" href="https://www.instagram.com/adata.kz/?igshid=253i4qxg3els">
18
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
19
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01562 0.0166016C1.35877 0.0166016 0.015625 1.35975 0.015625 3.0166V13.001C0.015625 14.6578 1.35877 16.001 3.01562 16.001H13C14.6569 16.001 16 14.6578 16 13.001V3.0166C16 1.35975 14.6569 0.0166016 13 0.0166016H3.01562ZM14.3891 3.20021C14.3891 3.6416 14.0313 3.99943 13.5899 3.99943C13.1485 3.99943 12.7906 3.6416 12.7906 3.20021C12.7906 2.75881 13.1485 2.40099 13.5899 2.40099C14.0313 2.40099 14.3891 2.75881 14.3891 3.20021ZM8.01132 11.5982C9.99761 11.5982 11.6078 9.98805 11.6078 8.00176C11.6078 6.01548 9.99761 4.40528 8.01132 4.40528C6.02504 4.40528 4.41484 6.01548 4.41484 8.00176C4.41484 9.98805 6.02504 11.5982 8.01132 11.5982ZM8.01132 12.7971C10.6597 12.7971 12.8066 10.6501 12.8066 8.00176C12.8066 5.35339 10.6597 3.20645 8.01132 3.20645C5.36295 3.20645 3.21601 5.35339 3.21601 8.00176C3.21601 10.6501 5.36295 12.7971 8.01132 12.7971Z" fill="#2C3E50"></path>
20
+ </svg>
21
+ </a>
22
+ <a target="_blank" href="https://www.youtube.com/channel/UCPkbtgwgTZbMJXjmTi3R8Uw/about">
23
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
24
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2 0C0.895431 0 0 0.895431 0 2V14C0 15.1046 0.895431 16 2 16H14C15.1046 16 16 15.1046 16 14V2C16 0.895431 15.1046 0 14 0H2ZM13.7528 4.98132C13.6144 4.46732 13.2092 4.06205 12.6952 3.92367C11.7561 3.66667 7.99997 3.66667 7.99997 3.66667C7.99997 3.66667 4.24381 3.66667 3.30477 3.91378C2.80066 4.05217 2.3855 4.46732 2.24712 4.98132C2 5.92036 2 7.86764 2 7.86764C2 7.86764 2 9.82479 2.24712 10.7539C2.3855 11.268 2.79077 11.6732 3.30477 11.8116C4.2537 12.0686 7.99997 12.0686 7.99997 12.0686C7.99997 12.0686 11.7561 12.0686 12.6952 11.8215C13.2092 11.6831 13.6144 11.2778 13.7528 10.7638C13.9999 9.82479 13.9999 7.87752 13.9999 7.87752C13.9999 7.87752 14.0098 5.92036 13.7528 4.98132ZM6.80392 9.59801L9.92747 7.799L6.80392 6V9.59801Z" fill="#2C3E50"></path>
25
+ </svg> </a>
26
+ <a target="_blank" href="https://www.tiktok.com/@adata.kz?lang=ru-RU" >
27
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
28
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2 0C0.895431 0 0 0.895431 0 2V14C0 15.1046 0.895431 16 2 16H14C15.1046 16 16 15.1046 16 14V2C16 0.895431 15.1046 0 14 0H2ZM8.27136 9.89447C8.27136 10.8688 7.54987 11.506 6.65988 11.506C5.76988 11.506 5.04839 10.7845 5.04839 9.89447C5.04839 9.0988 5.7895 8.37096 6.68689 8.40404C6.86305 8.40404 7.06987 8.44599 7.15006 8.47436V6.62331C5.55588 6.30091 3.14893 7.62001 3.14893 9.89447C3.14893 11.506 4.38899 13.3333 6.65988 13.3333C8.93076 13.3333 10.1985 11.506 10.1985 9.89447V6.23373C10.5643 6.52374 11.6152 7.04631 12.8511 7.04631V5.229C11.406 5.25812 10.0956 3.98482 10.204 2.66667H8.27136V9.89447Z" fill="#2C3E50"></path>
29
+ </svg>
30
+ </a>
31
+ </div>
32
+ <li class="nav__item">
33
+ <a href="https://adata.kz/tariffs" class="nav__link">Тарифы</a>
34
+ </li>
35
+ <li class="nav__item">
36
+ <a href="https://adata.kz/about" class="nav__link">О сервисе</a>
37
+ </li>
38
+ <li class="nav__item">
39
+ <a href="https://adata.kz/apiInfo" class="nav__link">Описание API</a>
40
+ </li>
41
+ <li class="nav__item">
42
+ <a href="https://adata.kz/user-agreements" class="nav__link">Пользовательское соглашение</a>
43
+ </li>
44
+ <li class="nav__item">
45
+ <a href="https://adata.kz/vacancy" class="nav__link">Вакансии</a>
46
+ </li>
47
+ <li class="nav__item">
48
+ <a href="https://adata.kz/contacts" class="nav__link">Контакты</a>
49
+ </li>
50
+ </ul>
51
+ </div>
52
+ <div class="footer__bottom"><span>2022 © ТОО "Alldata"</span></div>
53
+ </footer>
54
+ </template>
55
+
56
+ <script>
57
+ export default {
58
+ props: {
59
+ name: "Footer",
60
+ hasBottomMenu: {
61
+ type: Boolean,
62
+ default: false
63
+ }
64
+ }
65
+ };
66
+ </script>
67
+ <style lang="scss" scoped>
68
+ ul, li {
69
+ list-style: none;
70
+ text-decoration: none;
71
+ }
72
+
73
+ a {
74
+ text-decoration: none;
75
+ background-color: transparent;
76
+ }
77
+
78
+ * {
79
+ font-family: "Open Sans", sans-serif;
80
+ box-sizing: border-box;
81
+ margin: 0;
82
+ padding: 0;
83
+ }
84
+
85
+ .footer {
86
+ background: #BDC7CE4C;
87
+ font-size: 14px;
88
+ margin-top: 20px;
89
+ @media(max-width: 1025px) {
90
+ background: #F6F6F7;
91
+ &.paddinged {
92
+ padding-bottom: 60px;
93
+ }
94
+ }
95
+ &__top {
96
+ display: flex;
97
+ justify-content: space-between;
98
+ max-width: 900px;
99
+ width: 100%;
100
+ margin: 0 auto;
101
+ padding: 20px 24px;
102
+ @media(max-width: 1025px) {
103
+ flex-direction: column;
104
+ padding: 16px 16px;
105
+ }
106
+
107
+ .adata-logo {
108
+ display: none;
109
+ @media(max-width: 1025px) {
110
+ display: flex;
111
+ width: 77px;
112
+ height: 24px;
113
+ }
114
+ }
115
+
116
+ .nav {
117
+ width: 100%;
118
+ display: flex;
119
+ justify-content: space-between;
120
+ align-items: center;
121
+ @media(max-width: 1025px) {
122
+ display: grid;
123
+ grid-template-columns: 0.7fr 1fr;
124
+ column-gap: 15px;
125
+ row-gap: 15px;
126
+ }
127
+
128
+ &__link {
129
+ line-height: 19px;
130
+ color: #2c3e50;
131
+ @media(max-width: 1025px) {
132
+ font-size: 12px;
133
+ }
134
+
135
+ &:hover {
136
+ color: #9da3ac;
137
+ }
138
+
139
+ &:active {
140
+ color: #c4c4c4;
141
+ }
142
+ }
143
+ }
144
+
145
+ .social {
146
+ $self: &;
147
+ display: flex;
148
+ align-items: center;
149
+ margin-left: 15px;
150
+ order: 1;
151
+ @media (max-width: 1025px) {
152
+ margin-left: 0;
153
+ order: 0;
154
+ }
155
+ a {
156
+ display: flex;
157
+ align-items: center;
158
+ line-height: 19px;
159
+ text-decoration-line: none;
160
+ color: #007aff;
161
+ .social__icon {
162
+ margin: 2px 10px 2px 2px;
163
+ @media (max-width: 1025px) {
164
+ margin: 0 8px 0 0;
165
+ }
166
+ }
167
+ @media(max-width: 1025px) {
168
+ margin-left: 0;
169
+ &:not(:first-child) {
170
+ margin-left: 8px;
171
+ }
172
+ }
173
+ &:hover {
174
+ text-decoration: underline;
175
+ }
176
+
177
+ &:active {
178
+ color: #0055bb;
179
+ text-decoration-line: none;
180
+ }
181
+ }
182
+
183
+ svg {
184
+ width: 16px;
185
+ height: 16px;
186
+ fill: #2C3E50;
187
+ @media(max-width: 1025px) {
188
+ width: 20px;
189
+ height: 20px;
190
+ }
191
+
192
+ &#{$self}__icon {
193
+ cursor: pointer;
194
+ }
195
+
196
+ &:hover {
197
+ fill: #9da3ac !important;
198
+ }
199
+
200
+ &:active {
201
+ fill: #c4c4c4 !important;
202
+ }
203
+ }
204
+ }
205
+ }
206
+
207
+ &__bottom {
208
+ text-align: center;
209
+ padding: 11.5px 0 13px;
210
+ border: 1px solid #BDC7CE;
211
+ @media(max-width: 1025px) {
212
+ background: #EFEFF0;
213
+ border: none;
214
+ border-top: 1px solid #bdc7ce;
215
+ }
216
+ span {
217
+ font-size: 10px;
218
+ line-height: 12px;
219
+ color: #71757a;
220
+ @media(max-width: 1025px) {
221
+ font-size: 10px;
222
+ line-height: 16px;
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ .mobile-head-wrapper {
229
+ display: flex;
230
+ justify-content: space-between;
231
+ align-items: center;
232
+ }
233
+ </style>
File without changes
@@ -0,0 +1,135 @@
1
+ <template>
2
+ <header class="header">
3
+ <div class="container">
4
+ <div class="header__inner">
5
+ <div class="header__left">
6
+ <NuxtLink class="logo" to="/">
7
+ <BaseIcon class="adata-logo">logo</BaseIcon>
8
+ </NuxtLink>
9
+ <div class="right mobile">
10
+ <div class="right-mobile">
11
+ <div v-if="currentCountry === 'kz' && checkRuRate" class="country-button-arrow"
12
+ @click="isGeoOpen = !isGeoOpen">
13
+ <BaseIcon class="ic-18">kz</BaseIcon>
14
+ </div>
15
+ <div v-if="currentCountry === 'ru' && checkRuRate" class="country-button-arrow"
16
+ @click="isGeoOpen = !isGeoOpen">
17
+ <BaseIcon class="ic-18">ru</BaseIcon>
18
+ </div>
19
+ <MobileToggle v-slot:default="{ animationClass }">
20
+ <div class="geo__filters" :class="animationClass" v-show="isGeoOpen">
21
+ <slot>
22
+ <div class="geo-button">
23
+ <div class="geo-button-text">
24
+ Выбор страны
25
+ </div>
26
+ <div class="geo-button-arrow" @click="isGeoOpen = false">
27
+ <BaseIcon class="ic-18">cross</BaseIcon>
28
+ </div>
29
+ </div>
30
+ <div class="country-button" @click="selectCountry('kz')">
31
+ <div class="country-button-arrow" @click="isGeoOpen = false">
32
+ <BaseIcon class="ic-18">kz</BaseIcon>
33
+ </div>
34
+ <div class="country-button-text">
35
+ Казахстан
36
+ </div>
37
+ </div>
38
+ <div class="country-button" @click="selectCountry('ru')">
39
+ <div class="country-button-arrow" @click="isGeoOpen = false">
40
+ <BaseIcon class="ic-18">ru</BaseIcon>
41
+ </div>
42
+ <div class="country-button-text">
43
+ Россия
44
+ </div>
45
+ </div>
46
+ </slot>
47
+ </div>
48
+ </MobileToggle>
49
+ <Profile v-bind:profileDropDown="profileDropDown"/>
50
+ </div>
51
+ <svg @click="changeValue">
52
+ <use
53
+ :xlink:href="require('@/assets/icons/sprite.svg') + '#icon_hamburger'"
54
+ />
55
+ </svg>
56
+ </div>
57
+ <div class="menu desktop" v-if="subheaderItems.length > 0">
58
+ <div
59
+ v-for="(item, index) in subheaderItems"
60
+ :key="index"
61
+ class="menu__wrapper"
62
+ >
63
+ <nuxt-link
64
+ class="menu__items"
65
+ :class="{active: isMain && item.name === 'Контрагенты'}"
66
+ active-class="active"
67
+ :to="item.url"
68
+ v-if="isExternalLink(item.url)"
69
+ >
70
+ {{ item.name }}
71
+ </nuxt-link>
72
+ <a :href="item.url" class="menu__items" v-else>
73
+ {{ item.name }}
74
+ </a>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <div class="header__right desktop">
79
+ <Profile v-bind:profileDropDown="profileDropDown"/>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ <MobileToggle v-slot="{ animationClass }">
84
+ <div
85
+ class="menu_mobile"
86
+ :class="animationClass"
87
+ v-show="subheaderItems.length > 0 && isOpen"
88
+ >
89
+ <div class="mobile-table-head">
90
+ <svg @click.stop="changeValue">
91
+ <use :xlink:href="require('@/assets/icons/sprite.svg') + '#close_hamburger'"></use>
92
+ </svg>
93
+ </div>
94
+ <div class="bb">
95
+ <div
96
+ v-for="(item, index) in subheaderItems"
97
+ :key="index"
98
+ class="menu_mobile-wrapper"
99
+ >
100
+ <div
101
+ @click="goToPage(item.url)"
102
+ class="menu_mobile-accordion"
103
+ :class="{'active-burger-tab': isActiveTab(item.url)}"
104
+ >
105
+ <span class="menu_mobile-items">
106
+ {{ item.name }}
107
+ </span>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </MobileToggle>
113
+ <SubHeader :list="subheaderItems" class="desktop"/>
114
+ <SubHeaderMobile :list="subheaderItems" class="mobile" v-if="isProfilePage || isFinesPage"/>
115
+ <Navbar :options="searchDetailSidebar" :type_id="1" v-if="isCompanyPage && isMobile" class="mobile"/>
116
+ <Navbar :options="searchDetailSidebarRU" :type_id="1" v-if="isRussianPage && isMobile " class="mobile"/>
117
+ <Navbar :options="individualNavbarItems" :type_id="2" v-if="isIndividualPage && isMobile" class="mobile"/>
118
+ </header>
119
+ </template>
120
+
121
+ <script>
122
+ export default {
123
+ name: "Header",
124
+ props: {
125
+ isMobile: {
126
+ type: Boolean,
127
+ default: false
128
+ }
129
+ }
130
+ }
131
+ </script>
132
+
133
+ <style scoped>
134
+
135
+ </style>
@@ -0,0 +1,16 @@
1
+ import PasswordField from "./PasswordField.vue";
2
+
3
+ export default {
4
+ title: 'PasswordField',
5
+ component: PasswordField,
6
+ template: "<text-field label='Example'></text-field>>"
7
+ }
8
+
9
+ const Template = (args, { argTypes }) => ({
10
+ components: { PasswordField },
11
+ props: Object.keys(argTypes),
12
+ template: '<password-field v-bind="$props"></password-field>'
13
+ })
14
+
15
+ export const BasePasswordField = Template.bind({});
16
+ BasePasswordField.args = {label: 'Password'}
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div class="adt-text-block">
3
+ <div class="adt-text-block__field">
4
+ <input
5
+ ref="input"
6
+ :type="type"
7
+ :value="value"
8
+ required
9
+ @input="$emit('input', $event.target.value)"
10
+ class="adt-text-block__input"
11
+ :class="{ error: !!errorText }"
12
+ />
13
+ <label class="adt-text-block__label">{{ label }}</label>
14
+ <div v-if="showPassword" @click="showPassword = false" class="adt-text-block__icon desktop">
15
+ <svg width="12" height="12" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 511.992 511.992" id="openedEye">
16
+ <path
17
+ d="M510.096 249.937c-4.032-5.867-100.928-143.275-254.101-143.275-131.435 0-248.555 136.619-253.483 142.443-3.349 3.968-3.349 9.792 0 13.781C7.44 268.71 124.56 405.329 255.995 405.329S504.549 268.71 509.477 262.886c3.094-3.669 3.371-8.981.619-12.949zM255.995 383.996c-105.365 0-205.547-100.48-230.997-128 25.408-27.541 125.483-128 230.997-128 123.285 0 210.304 100.331 231.552 127.424-24.534 26.645-125.291 128.576-231.552 128.576z"></path>
18
+ <path
19
+ d="M255.995 170.662c-47.061 0-85.333 38.272-85.333 85.333s38.272 85.333 85.333 85.333 85.333-38.272 85.333-85.333-38.272-85.333-85.333-85.333zm0 149.334c-35.285 0-64-28.715-64-64s28.715-64 64-64 64 28.715 64 64-28.715 64-64 64z"></path>
20
+ </svg>
21
+ </div>
22
+ <div v-else @click="showPassword = true" class="adt-text-block__icon desktop">
23
+ <svg width="12" height="12" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512.001 512.001" id="closedEye">
24
+ <path
25
+ d="M316.332 195.662c-4.16-4.16-10.923-4.16-15.083 0s-4.16 10.944 0 15.083c12.075 12.075 18.752 28.139 18.752 45.248 0 35.285-28.715 64-64 64-17.109 0-33.173-6.656-45.248-18.752-4.16-4.16-10.923-4.16-15.083 0-4.16 4.139-4.16 10.923 0 15.083 16.085 16.128 37.525 25.003 60.331 25.003 47.061 0 85.333-38.272 85.333-85.333 0-22.807-8.874-44.247-25.002-60.332zm-45.462-23.531c-4.843-.853-9.792-1.472-14.869-1.472-47.061 0-85.333 38.272-85.333 85.333 0 5.077.619 10.027 1.493 14.869.917 5.163 5.419 8.811 10.475 8.811.619 0 1.237-.043 1.877-.171 5.781-1.024 9.664-6.571 8.64-12.352-.661-3.627-1.152-7.317-1.152-11.157 0-35.285 28.715-64 64-64 3.84 0 7.531.491 11.157 1.131 5.675 1.152 11.328-2.859 12.352-8.64 1.024-5.781-2.858-11.328-8.64-12.352z"></path>
26
+ <path
27
+ d="M509.462 249.102c-2.411-2.859-60.117-70.208-139.712-111.445-5.163-2.709-11.669-.661-14.379 4.587-2.709 5.227-.661 11.669 4.587 14.379 61.312 31.744 110.293 81.28 127.04 99.371-25.429 27.541-125.504 128-230.997 128-35.797 0-71.872-8.64-107.264-25.707-5.248-2.581-11.669-.341-14.229 4.971-2.581 5.291-.341 11.669 4.971 14.229 38.293 18.496 77.504 27.84 116.523 27.84 131.435 0 248.555-136.619 253.483-142.443 3.369-3.969 3.348-9.793-.023-13.782zM325.996 118.947c-24.277-8.171-47.829-12.288-69.995-12.288-131.435 0-248.555 136.619-253.483 142.443-3.115 3.669-3.371 9.003-.597 12.992 1.472 2.112 36.736 52.181 97.856 92.779a10.48 10.48 0 005.888 1.792c3.435 0 6.827-1.664 8.875-4.8 3.264-4.885 1.92-11.52-2.987-14.763-44.885-29.845-75.605-65.877-87.104-80.533 24.555-26.667 125.291-128.576 231.552-128.576 19.861 0 41.131 3.755 63.189 11.157 5.589 2.005 11.648-1.088 13.504-6.699 1.878-5.589-1.109-11.626-6.698-13.504z"></path>
28
+ <path
29
+ d="M444.865 67.128c-4.16-4.16-10.923-4.16-15.083 0L67.116 429.795c-4.16 4.16-4.16 10.923 0 15.083a10.716 10.716 0 007.552 3.115c2.731 0 5.461-1.045 7.531-3.115L444.865 82.211c4.16-4.16 4.16-10.923 0-15.083z"></path>
30
+ </svg>
31
+ </div>
32
+ </div>
33
+ <div class="adt-text-block__error" v-if="!!errorText">
34
+ {{ errorText }}
35
+ </div>
36
+ </div>
37
+ </template>
38
+
39
+ <script>
40
+ export default {
41
+ name: "PasswordField",
42
+ props: {
43
+ errorText: {
44
+ type: String,
45
+ default: ""
46
+ },
47
+ label: {
48
+ type: String,
49
+ required: true,
50
+ },
51
+ value: {
52
+ type: [String, null],
53
+ required: true,
54
+ }
55
+ },
56
+ data() {
57
+ return {
58
+ showPassword: false
59
+ }
60
+ },
61
+ computed: {
62
+ type() {
63
+ return this.showPassword ? "text" : "password";
64
+ }
65
+ }
66
+ }
67
+ </script>
68
+
@@ -0,0 +1,17 @@
1
+ import TextField from "./TextField.vue";
2
+
3
+ export default {
4
+ title: 'TextField',
5
+ component: TextField,
6
+ data: () => ({ value: "" }),
7
+ template: "<text-field @input='(val) => {this.value = val}' label='Example'></text-field>>"
8
+ }
9
+
10
+ const Template = (args, { argTypes }) => ({
11
+ components: { TextField },
12
+ props: Object.keys(argTypes),
13
+ template: '<text-field v-bind="$props"></text-field>'
14
+ })
15
+
16
+ export const Clearable = Template.bind({});
17
+ Clearable.args = {label: 'Clearable', clearable: true}