@dolanske/vui 1.0.4 → 1.1.1

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 (195) hide show
  1. package/LICENSE +673 -673
  2. package/README.md +42 -42
  3. package/dist/components/Accordion/Accordion.vue.d.ts +3 -2
  4. package/dist/components/Accordion/AccordionGroup.vue.d.ts +5 -2
  5. package/dist/components/Alert/Alert.vue.d.ts +3 -2
  6. package/dist/components/Avatar/Avatar.vue.d.ts +3 -2
  7. package/dist/components/Badge/Badge.vue.d.ts +3 -2
  8. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +3 -2
  9. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +3 -2
  10. package/dist/components/Button/Button.vue.d.ts +3 -2
  11. package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +3 -2
  12. package/dist/components/Calendar/Calendar.vue.d.ts +6 -6
  13. package/dist/components/Card/Card.vue.d.ts +4 -3
  14. package/dist/components/Checkbox/Checkbox.vue.d.ts +7 -6
  15. package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +2 -1
  16. package/dist/components/Divider/Divider.vue.d.ts +3 -2
  17. package/dist/components/Drawer/Drawer.vue.d.ts +10 -9
  18. package/dist/components/Dropdown/Dropdown.vue.d.ts +66 -3
  19. package/dist/components/Dropdown/DropdownItem.vue.d.ts +3 -2
  20. package/dist/components/Dropdown/DropdownTitle.vue.d.ts +6 -6
  21. package/dist/components/Flex/Flex.vue.d.ts +13 -12
  22. package/dist/components/Grid/Grid.vue.d.ts +7 -6
  23. package/dist/components/Input/Color.vue.d.ts +5 -5
  24. package/dist/components/Input/Counter.vue.d.ts +5 -5
  25. package/dist/components/Input/Dropzone.vue.d.ts +95 -10
  26. package/dist/components/Input/File.vue.d.ts +4 -3
  27. package/dist/components/Input/Input.vue.d.ts +7 -6
  28. package/dist/components/Input/Password.vue.d.ts +1 -1
  29. package/dist/components/Input/Textarea.vue.d.ts +7 -6
  30. package/dist/components/Kbd/Kbd.vue.d.ts +1 -1
  31. package/dist/components/Kbd/KbdGroup.vue.d.ts +2 -1
  32. package/dist/components/Modal/Confirm.vue.d.ts +7 -9
  33. package/dist/components/Modal/Modal.vue.d.ts +16 -13
  34. package/dist/components/OTP/OTP.vue.d.ts +7 -6
  35. package/dist/components/OTP/OTPItem.vue.d.ts +1 -1
  36. package/dist/components/Pagination/Pagination.vue.d.ts +3 -2
  37. package/dist/components/Popout/Popout.vue.d.ts +3 -2
  38. package/dist/components/Progress/Progress.vue.d.ts +5 -5
  39. package/dist/components/Radio/Radio.vue.d.ts +7 -6
  40. package/dist/components/Radio/RadioGroup.vue.d.ts +7 -6
  41. package/dist/components/Select/Select.vue.d.ts +4 -8
  42. package/dist/components/Sheet/Sheet.vue.d.ts +22 -13
  43. package/dist/components/Sidebar/Sidebar.vue.d.ts +7 -6
  44. package/dist/components/Skeleton/Skeleton.vue.d.ts +1 -1
  45. package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
  46. package/dist/components/Switch/Switch.vue.d.ts +7 -6
  47. package/dist/components/Table/Cell.vue.d.ts +5 -2
  48. package/dist/components/Table/Head.vue.d.ts +3 -2
  49. package/dist/components/Table/Root.vue.d.ts +3 -2
  50. package/dist/components/Table/table.d.ts +2 -2
  51. package/dist/components/Tabs/Tab.vue.d.ts +3 -2
  52. package/dist/components/Tabs/Tabs.vue.d.ts +7 -6
  53. package/dist/components/Toast/toast.d.ts +6 -6
  54. package/dist/components/Tooltip/Tooltip.vue.d.ts +2 -1
  55. package/dist/internal/Backdrop/Backdrop.vue.d.ts +3 -2
  56. package/dist/vui.css +1 -0
  57. package/dist/vui.js +8090 -7884
  58. package/package.json +73 -72
  59. package/src/App.vue +95 -95
  60. package/src/components/Accordion/Accordion.vue +91 -91
  61. package/src/components/Accordion/AccordionGroup.vue +43 -43
  62. package/src/components/Accordion/accordion.scss +82 -82
  63. package/src/components/Alert/Alert.vue +59 -59
  64. package/src/components/Alert/alert.scss +161 -161
  65. package/src/components/Avatar/Avatar.vue +53 -53
  66. package/src/components/Avatar/avatar.scss +52 -52
  67. package/src/components/Badge/Badge.vue +21 -21
  68. package/src/components/Badge/badge.scss +210 -206
  69. package/src/components/Breadcrumbs/BreadcrumbItem.vue +26 -26
  70. package/src/components/Breadcrumbs/Breadcrumbs.vue +30 -30
  71. package/src/components/Breadcrumbs/breadcrumbs.scss +31 -31
  72. package/src/components/Button/Button.vue +85 -85
  73. package/src/components/Button/button.scss +279 -279
  74. package/src/components/ButtonGroup/ButtonGroup.vue +28 -28
  75. package/src/components/ButtonGroup/button-group.scss +51 -51
  76. package/src/components/Calendar/Calendar.vue +66 -66
  77. package/src/components/Calendar/calendar.scss +83 -83
  78. package/src/components/Card/Card.vue +48 -48
  79. package/src/components/Card/card.scss +53 -53
  80. package/src/components/Checkbox/Checkbox.vue +54 -54
  81. package/src/components/Checkbox/checkbox.scss +80 -80
  82. package/src/components/CopyClipboard/CopyClipboard.vue +91 -91
  83. package/src/components/CopyClipboard/copy-clipboard.scss +25 -25
  84. package/src/components/Divider/Divider.vue +44 -44
  85. package/src/components/Divider/divider.scss +35 -35
  86. package/src/components/Drawer/Drawer.vue +102 -97
  87. package/src/components/Drawer/drawer.scss +37 -37
  88. package/src/components/Dropdown/Dropdown.vue +135 -135
  89. package/src/components/Dropdown/DropdownItem.vue +33 -33
  90. package/src/components/Dropdown/DropdownTitle.vue +14 -14
  91. package/src/components/Dropdown/dropdown-item.scss +84 -84
  92. package/src/components/Dropdown/dropdown.scss +53 -53
  93. package/src/components/Flex/Flex.vue +113 -113
  94. package/src/components/Grid/Grid.vue +79 -80
  95. package/src/components/Input/Color.vue +26 -26
  96. package/src/components/Input/Counter.vue +66 -66
  97. package/src/components/Input/Dropzone.vue +65 -65
  98. package/src/components/Input/File.vue +15 -15
  99. package/src/components/Input/Input.vue +123 -123
  100. package/src/components/Input/Password.vue +35 -35
  101. package/src/components/Input/Textarea.vue +78 -78
  102. package/src/components/Input/input.scss +302 -302
  103. package/src/components/Kbd/Kbd.vue +48 -48
  104. package/src/components/Kbd/KbdGroup.vue +27 -27
  105. package/src/components/Kbd/kbd.scss +19 -19
  106. package/src/components/Modal/Confirm.vue +56 -56
  107. package/src/components/Modal/Modal.vue +103 -99
  108. package/src/components/Modal/modal.scss +54 -54
  109. package/src/components/OTP/OTP.vue +133 -133
  110. package/src/components/OTP/OTPItem.vue +37 -37
  111. package/src/components/OTP/otp.scss +84 -84
  112. package/src/components/Pagination/Pagination.vue +77 -77
  113. package/src/components/Pagination/pagination.ts +78 -78
  114. package/src/components/Popout/Popout.vue +52 -52
  115. package/src/components/Popout/popout.scss +15 -15
  116. package/src/components/Progress/Progress.vue +103 -103
  117. package/src/components/Progress/progress.scss +47 -47
  118. package/src/components/Radio/Radio.vue +38 -38
  119. package/src/components/Radio/RadioGroup.vue +40 -40
  120. package/src/components/Radio/radio.scss +78 -78
  121. package/src/components/Select/Select.vue +211 -211
  122. package/src/components/Select/select.scss +77 -77
  123. package/src/components/Sheet/Sheet.vue +108 -98
  124. package/src/components/Sheet/sheet.scss +69 -69
  125. package/src/components/Sidebar/Sidebar.vue +115 -115
  126. package/src/components/Sidebar/sidebar.scss +124 -124
  127. package/src/components/Skeleton/Skeleton.vue +43 -43
  128. package/src/components/Skeleton/skeleton.scss +14 -14
  129. package/src/components/Spinner/Spinner.vue +42 -42
  130. package/src/components/Spinner/spinner.scss +47 -47
  131. package/src/components/Switch/Switch.vue +31 -31
  132. package/src/components/Switch/switch.scss +93 -93
  133. package/src/components/Table/Cell.vue +23 -23
  134. package/src/components/Table/Head.vue +59 -59
  135. package/src/components/Table/Root.vue +66 -66
  136. package/src/components/Table/SelectAll.vue +23 -23
  137. package/src/components/Table/SelectRow.vue +30 -30
  138. package/src/components/Table/index.ts +7 -7
  139. package/src/components/Table/table.scss +154 -154
  140. package/src/components/Table/table.ts +248 -248
  141. package/src/components/Tabs/Tab.vue +25 -25
  142. package/src/components/Tabs/Tabs.vue +90 -90
  143. package/src/components/Tabs/tabs.scss +87 -87
  144. package/src/components/Toast/Toasts.vue +52 -52
  145. package/src/components/Toast/toast.scss +45 -45
  146. package/src/components/Toast/toast.ts +75 -75
  147. package/src/components/Tooltip/Tooltip.vue +86 -86
  148. package/src/components/Tooltip/tooltip.scss +8 -8
  149. package/src/examples/ExampleAccordions.vue +58 -58
  150. package/src/examples/ExampleAlerts.vue +78 -78
  151. package/src/examples/ExampleAvatars.vue +44 -44
  152. package/src/examples/ExampleBadges.vue +48 -48
  153. package/src/examples/ExampleBreadcrumbs.vue +46 -46
  154. package/src/examples/ExampleButtons.vue +140 -140
  155. package/src/examples/ExampleCalendars.vue +40 -40
  156. package/src/examples/ExampleCards.vue +94 -94
  157. package/src/examples/ExampleCheckboxes.vue +123 -123
  158. package/src/examples/ExampleCopyClipboard.vue +47 -47
  159. package/src/examples/ExampleDividers.vue +39 -39
  160. package/src/examples/ExampleDrawers.vue +67 -67
  161. package/src/examples/ExampleDropdowns.vue +114 -114
  162. package/src/examples/ExampleFlexGrid.vue +124 -122
  163. package/src/examples/ExampleInputs.vue +234 -234
  164. package/src/examples/ExampleKBD.vue +65 -65
  165. package/src/examples/ExampleModals.vue +143 -143
  166. package/src/examples/ExamplePalette.vue +159 -159
  167. package/src/examples/ExamplePopouts.vue +41 -41
  168. package/src/examples/ExampleSheets.vue +77 -77
  169. package/src/examples/ExampleSidebars.vue +270 -270
  170. package/src/examples/ExampleSkeletons.vue +26 -26
  171. package/src/examples/ExampleSpinners.vue +80 -78
  172. package/src/examples/ExampleTables.vue +195 -195
  173. package/src/examples/ExampleTabs.vue +119 -119
  174. package/src/examples/ExampleToasts.vue +96 -96
  175. package/src/examples/ExampleTooltips.vue +70 -70
  176. package/src/examples/shared/ExampleColor.vue +28 -28
  177. package/src/index.ts +116 -116
  178. package/src/internal/Backdrop/Backdrop.vue +22 -22
  179. package/src/internal/Backdrop/backdrop.scss +34 -34
  180. package/src/main.ts +5 -5
  181. package/src/shared/helpers.ts +117 -117
  182. package/src/shared/theme.ts +22 -22
  183. package/src/shared/types.ts +29 -29
  184. package/src/style/animation.scss +22 -22
  185. package/src/style/core.scss +119 -125
  186. package/src/style/layout.scss +207 -233
  187. package/src/style/media-query.scss +29 -29
  188. package/src/style/reset.scss +135 -135
  189. package/src/style/text.scss +137 -124
  190. package/src/style/theme.scss +195 -195
  191. package/src/style/tooltip.scss +146 -146
  192. package/src/style/typography.scss +415 -415
  193. package/src/style/utils.scss +36 -36
  194. package/src/style.scss +1 -1
  195. package/dist/style.css +0 -1
@@ -1,234 +1,234 @@
1
- <script setup lang='ts'>
2
- import { Icon } from '@iconify/vue'
3
- import { ref } from 'vue'
4
- import Button from '../components/Button/Button.vue'
5
- import Divider from '../components/Divider/Divider.vue'
6
- import Flex from '../components/Flex/Flex.vue'
7
- import Grid from '../components/Grid/Grid.vue'
8
- import Color from '../components/Input/Color.vue'
9
- import Counter from '../components/Input/Counter.vue'
10
- import Dropzone from '../components/Input/Dropzone.vue'
11
- import File from '../components/Input/File.vue'
12
- import Input from '../components/Input/Input.vue'
13
- import Password from '../components/Input/Password.vue'
14
- import Textarea from '../components/Input/Textarea.vue'
15
- import OTP from '../components/OTP/OTP.vue'
16
- import OTPItem from '../components/OTP/OTPItem.vue'
17
- import Select from '../components/Select/Select.vue'
18
-
19
- const options = [
20
- { value: 0, label: 'Jan' },
21
- { value: 1, label: 'Andrew' },
22
- { value: 2, label: 'Felix' },
23
- ]
24
-
25
- const longOptions = [
26
- ...options,
27
- {
28
- value: 3,
29
- label: 'Kasper',
30
- },
31
- {
32
- value: 4,
33
- label: 'Margarett',
34
- },
35
- {
36
- value: 5,
37
- label: 'Bridgetson',
38
- },
39
- {
40
- value: 6,
41
- label: 'Jenifer',
42
- },
43
- {
44
- value: 7,
45
- label: 'Christopher',
46
- },
47
- ]
48
-
49
- const selected = ref([])
50
- const selected1 = ref([])
51
- const selected2 = ref([])
52
- </script>
53
-
54
- <template>
55
- <div class="mb-xxl">
56
- <h3 class="mb-l">
57
- Inputs
58
- </h3>
59
-
60
- <h6 class="mb-l">
61
- Input extensions
62
- </h6>
63
-
64
- <Grid gap="l" :columns="3">
65
- <Input placeholder="Margarett Bridgetson" />
66
- <Input label="Default" />
67
- <Input label="Password" placeholder="*******" type="password" model-value="asdasdasdass" />
68
- <Input label="Has hint" hint="What is your birth name?" />
69
- <Input label="Limited" hint="What is your birth name?" limit="65" placeholder="Your name" />
70
- <Input label="With errors" hint="What is your birth name?" limit="65" :errors="['Your name is too short']" />
71
- <Input label="Readonly" hint="What is your birth name?" readonly model-value="Readonly value" />
72
- <Input label="Required" hint="What is your birth name?" required />
73
- <Input label="Disabled" hint="What is your birth name?" disabled />
74
- <Input label="With slot" hint="What is your phone number, sir?">
75
- <template #start>
76
- +358
77
- </template>
78
- </Input>
79
- <Input label="With icon" hint="What is your birth name?" placeholder="Your phone sir">
80
- <template #start>
81
- <Icon icon="ph:phone" />
82
- </template>
83
- </Input>
84
- <Input label="With button" hint="What is your birth name?" placeholder="Your phone sir">
85
- <template #start>
86
- <Icon icon="ph:phone" />
87
- </template>
88
- <template #end>
89
- <Button>Clear</Button>
90
- </template>
91
- </Input>
92
- <Input label="Two buttons" placeholder="Some stuff">
93
- <template #start>
94
- <Button square icon="ph:eye" />
95
- </template>
96
- <template #end>
97
- <Button>Clear</Button>
98
- </template>
99
- </Input>
100
- <Input label="Icon and button" placeholder="Some stuff">
101
- <template #start>
102
- <Button>Start</Button>
103
- </template>
104
- <template #end>
105
- <Icon icon="ph:phone" />
106
- </template>
107
- </Input>
108
- </Grid>
109
-
110
- <Divider :size="48" />
111
-
112
- <h6 class="mb-l">
113
- Default input types
114
- </h6>
115
-
116
- <Grid gap="m" :columns="3">
117
- <Input label="Text" />
118
- <Password label="Password" />
119
- <Color placeholder="Erm uhmm" label="Pick color" hint="A bonus hint idk" />
120
- <Input label="Date" type="date" />
121
- <Input label="Email" type="email" />
122
- <Input label="Number" type="number" />
123
- <Input label="Range" type="range" />
124
- <Input label="Search" type="search" />
125
- <Input label="Tel" type="tel" />
126
- <Input label="Time" type="time" />
127
- <Input label="Url" type="url" :errors="['Bro didnt count enough']" />
128
- <File label="File" />
129
- <Counter label="Counter" hint="It counts!!" />
130
- </Grid>
131
-
132
- <Divider :size="48" />
133
-
134
- <h6 class="mb-l">
135
- Textarea
136
- </h6>
137
-
138
- <Grid :columns="2" gap="m">
139
- <Textarea label="Your story" hint="tell me everything" :resize="false" required />
140
- <Textarea expand label="With limit" :limit="64" :resize="false" placeholder="Bro tell me a short story" />
141
- <Textarea expand label="Resize vertical" />
142
- <Textarea expand label="Resize horizontal" resize="horizontal" />
143
- <Textarea expand label="Resize both" :resize="true" :errors="['Just an error test carry on', 'Whoops another issue']" />
144
- <Textarea expand label="Autoresize" hint="This is not supported in firefox yet" />
145
- <Textarea expand label="Readonly" model-value="Hiiiiiiiii uwuwuwu" readonly />
146
- <Textarea expand label="Disabled" disabled />
147
- </Grid>
148
-
149
- <Divider :size="48" />
150
-
151
- <h6 class="mb-l">
152
- Dropzone
153
- </h6>
154
-
155
- <Dropzone expand />
156
-
157
- <Divider :size="48" />
158
-
159
- <h6 class="mb-l">
160
- Select
161
- </h6>
162
- <Grid gap="xl" :columns="3">
163
- <Select expand :options="longOptions" label="Base, single, search, showClear" search show-clear />
164
- <Select expand :options="options" label="Base readonly" readonly />
165
- <Select expand :options="options" label="Base disabled" disabled placeholder="Custom placeholder bro" />
166
- <Select :options="options" label="Required (single)" expand required />
167
- <Select :options="options" label="Base + errors" expand :errors="['Hello bro']" />
168
- <Select v-model="selected" :options="options" label="Base multi" expand :single="false" />
169
- <Select v-model="selected2" :options="options" label="Multi, max options 2" expand :single="false" :max-active-options="2" />
170
- <Select v-model="selected1" :options="options" label="Multi required" required expand :single="false" hint="Must always have at least one option selected" />
171
-
172
- <select>
173
- <option value="" disabled>
174
- Select option
175
- </option>
176
- <option value="Jan">
177
- Jan
178
- </option>
179
- <option value="Andrew">
180
- Andrew
181
- </option>
182
- <option value="Kasper">
183
- Kasper
184
- </option>
185
- </select>
186
- </Grid>
187
- <Divider :size="48" />
188
-
189
- <h6 class="mb-l">
190
- OTP
191
- </h6>
192
-
193
- <table>
194
- <tbody>
195
- <tr>
196
- <th>Base</th>
197
- <td>
198
- <OTP>
199
- <Flex :gap="0" align-center>
200
- <OTPItem :i="0" />
201
- <OTPItem :i="1" />
202
- <OTPItem :i="2" />
203
- <span class="ml-m mr-m">-</span>
204
- <OTPItem :i="3" />
205
- <OTPItem :i="4" />
206
- <OTPItem :i="5" />
207
- </Flex>
208
- </OTP>
209
- </td>
210
- </tr>
211
- <tr>
212
- <th>Redacted + only numbers</th>
213
- <td>
214
- <OTP redacted mode="num">
215
- <OTPItem :i="0" />
216
- <OTPItem :i="1" />
217
- <OTPItem :i="2" />
218
- </OTP>
219
- </td>
220
- </tr>
221
- <tr>
222
- <th>Only characters</th>
223
- <td>
224
- <OTP redacted mode="char">
225
- <OTPItem :i="0" />
226
- <OTPItem :i="1" />
227
- <OTPItem :i="2" />
228
- </OTP>
229
- </td>
230
- </tr>
231
- </tbody>
232
- </table>
233
- </div>
234
- </template>
1
+ <script setup lang='ts'>
2
+ import { Icon } from '@iconify/vue'
3
+ import { ref } from 'vue'
4
+ import Button from '../components/Button/Button.vue'
5
+ import Divider from '../components/Divider/Divider.vue'
6
+ import Flex from '../components/Flex/Flex.vue'
7
+ import Grid from '../components/Grid/Grid.vue'
8
+ import Color from '../components/Input/Color.vue'
9
+ import Counter from '../components/Input/Counter.vue'
10
+ import Dropzone from '../components/Input/Dropzone.vue'
11
+ import File from '../components/Input/File.vue'
12
+ import Input from '../components/Input/Input.vue'
13
+ import Password from '../components/Input/Password.vue'
14
+ import Textarea from '../components/Input/Textarea.vue'
15
+ import OTP from '../components/OTP/OTP.vue'
16
+ import OTPItem from '../components/OTP/OTPItem.vue'
17
+ import Select from '../components/Select/Select.vue'
18
+
19
+ const options = [
20
+ { value: 0, label: 'Jan' },
21
+ { value: 1, label: 'Andrew' },
22
+ { value: 2, label: 'Felix' },
23
+ ]
24
+
25
+ const longOptions = [
26
+ ...options,
27
+ {
28
+ value: 3,
29
+ label: 'Kasper',
30
+ },
31
+ {
32
+ value: 4,
33
+ label: 'Margarett',
34
+ },
35
+ {
36
+ value: 5,
37
+ label: 'Bridgetson',
38
+ },
39
+ {
40
+ value: 6,
41
+ label: 'Jenifer',
42
+ },
43
+ {
44
+ value: 7,
45
+ label: 'Christopher',
46
+ },
47
+ ]
48
+
49
+ const selected = ref([])
50
+ const selected1 = ref([])
51
+ const selected2 = ref([])
52
+ </script>
53
+
54
+ <template>
55
+ <div class="mb-xxl">
56
+ <h3 class="mb-l">
57
+ Inputs
58
+ </h3>
59
+
60
+ <h6 class="mb-l">
61
+ Input extensions
62
+ </h6>
63
+
64
+ <Grid gap="l" :columns="3">
65
+ <Input placeholder="Margarett Bridgetson" />
66
+ <Input label="Default" />
67
+ <Input label="Password" placeholder="*******" type="password" model-value="asdasdasdass" />
68
+ <Input label="Has hint" hint="What is your birth name?" />
69
+ <Input label="Limited" hint="What is your birth name?" limit="65" placeholder="Your name" />
70
+ <Input label="With errors" hint="What is your birth name?" limit="65" :errors="['Your name is too short']" />
71
+ <Input label="Readonly" hint="What is your birth name?" readonly model-value="Readonly value" />
72
+ <Input label="Required" hint="What is your birth name?" required />
73
+ <Input label="Disabled" hint="What is your birth name?" disabled />
74
+ <Input label="With slot" hint="What is your phone number, sir?">
75
+ <template #start>
76
+ +358
77
+ </template>
78
+ </Input>
79
+ <Input label="With icon" hint="What is your birth name?" placeholder="Your phone sir">
80
+ <template #start>
81
+ <Icon icon="ph:phone" />
82
+ </template>
83
+ </Input>
84
+ <Input label="With button" hint="What is your birth name?" placeholder="Your phone sir">
85
+ <template #start>
86
+ <Icon icon="ph:phone" />
87
+ </template>
88
+ <template #end>
89
+ <Button>Clear</Button>
90
+ </template>
91
+ </Input>
92
+ <Input label="Two buttons" placeholder="Some stuff">
93
+ <template #start>
94
+ <Button square icon="ph:eye" />
95
+ </template>
96
+ <template #end>
97
+ <Button>Clear</Button>
98
+ </template>
99
+ </Input>
100
+ <Input label="Icon and button" placeholder="Some stuff">
101
+ <template #start>
102
+ <Button>Start</Button>
103
+ </template>
104
+ <template #end>
105
+ <Icon icon="ph:phone" />
106
+ </template>
107
+ </Input>
108
+ </Grid>
109
+
110
+ <Divider :size="48" />
111
+
112
+ <h6 class="mb-l">
113
+ Default input types
114
+ </h6>
115
+
116
+ <Grid gap="m" :columns="3">
117
+ <Input label="Text" />
118
+ <Password label="Password" />
119
+ <Color placeholder="Erm uhmm" label="Pick color" hint="A bonus hint idk" />
120
+ <Input label="Date" type="date" />
121
+ <Input label="Email" type="email" />
122
+ <Input label="Number" type="number" />
123
+ <Input label="Range" type="range" />
124
+ <Input label="Search" type="search" />
125
+ <Input label="Tel" type="tel" />
126
+ <Input label="Time" type="time" />
127
+ <Input label="Url" type="url" :errors="['Bro didnt count enough']" />
128
+ <File label="File" />
129
+ <Counter label="Counter" hint="It counts!!" />
130
+ </Grid>
131
+
132
+ <Divider :size="48" />
133
+
134
+ <h6 class="mb-l">
135
+ Textarea
136
+ </h6>
137
+
138
+ <Grid :columns="2" gap="m">
139
+ <Textarea label="Your story" hint="tell me everything" :resize="false" required />
140
+ <Textarea expand label="With limit" :limit="64" :resize="false" placeholder="Bro tell me a short story" />
141
+ <Textarea expand label="Resize vertical" />
142
+ <Textarea expand label="Resize horizontal" resize="horizontal" />
143
+ <Textarea expand label="Resize both" :resize="true" :errors="['Just an error test carry on', 'Whoops another issue']" />
144
+ <Textarea expand label="Autoresize" hint="This is not supported in firefox yet" />
145
+ <Textarea expand label="Readonly" model-value="Hiiiiiiiii uwuwuwu" readonly />
146
+ <Textarea expand label="Disabled" disabled />
147
+ </Grid>
148
+
149
+ <Divider :size="48" />
150
+
151
+ <h6 class="mb-l">
152
+ Dropzone
153
+ </h6>
154
+
155
+ <Dropzone expand />
156
+
157
+ <Divider :size="48" />
158
+
159
+ <h6 class="mb-l">
160
+ Select
161
+ </h6>
162
+ <Grid gap="xl" :columns="3">
163
+ <Select expand :options="longOptions" label="Base, single, search, showClear" search show-clear />
164
+ <Select expand :options="options" label="Base readonly" readonly />
165
+ <Select expand :options="options" label="Base disabled" disabled placeholder="Custom placeholder bro" />
166
+ <Select :options="options" label="Required (single)" expand required />
167
+ <Select :options="options" label="Base + errors" expand :errors="['Hello bro']" />
168
+ <Select v-model="selected" :options="options" label="Base multi" expand :single="false" />
169
+ <Select v-model="selected2" :options="options" label="Multi, max options 2" expand :single="false" :max-active-options="2" />
170
+ <Select v-model="selected1" :options="options" label="Multi required" required expand :single="false" hint="Must always have at least one option selected" />
171
+
172
+ <select>
173
+ <option value="" disabled>
174
+ Select option
175
+ </option>
176
+ <option value="Jan">
177
+ Jan
178
+ </option>
179
+ <option value="Andrew">
180
+ Andrew
181
+ </option>
182
+ <option value="Kasper">
183
+ Kasper
184
+ </option>
185
+ </select>
186
+ </Grid>
187
+ <Divider :size="48" />
188
+
189
+ <h6 class="mb-l">
190
+ OTP
191
+ </h6>
192
+
193
+ <table>
194
+ <tbody>
195
+ <tr>
196
+ <th>Base</th>
197
+ <td>
198
+ <OTP>
199
+ <Flex :gap="0" y-center>
200
+ <OTPItem :i="0" />
201
+ <OTPItem :i="1" />
202
+ <OTPItem :i="2" />
203
+ <span class="ml-m mr-m">-</span>
204
+ <OTPItem :i="3" />
205
+ <OTPItem :i="4" />
206
+ <OTPItem :i="5" />
207
+ </Flex>
208
+ </OTP>
209
+ </td>
210
+ </tr>
211
+ <tr>
212
+ <th>Redacted + only numbers</th>
213
+ <td>
214
+ <OTP redacted mode="num">
215
+ <OTPItem :i="0" />
216
+ <OTPItem :i="1" />
217
+ <OTPItem :i="2" />
218
+ </OTP>
219
+ </td>
220
+ </tr>
221
+ <tr>
222
+ <th>Only characters</th>
223
+ <td>
224
+ <OTP redacted mode="char">
225
+ <OTPItem :i="0" />
226
+ <OTPItem :i="1" />
227
+ <OTPItem :i="2" />
228
+ </OTP>
229
+ </td>
230
+ </tr>
231
+ </tbody>
232
+ </table>
233
+ </div>
234
+ </template>
@@ -1,65 +1,65 @@
1
- <script setup lang='ts'>
2
- import { whenever } from '@vueuse/core'
3
- import { ref } from 'vue'
4
- import Flex from '../components/Flex/Flex.vue'
5
- import Kbd from '../components/Kbd/Kbd.vue'
6
- import KbdGroup from '../components/Kbd/KbdGroup.vue'
7
-
8
- const active = ref(false)
9
-
10
- whenever(active, () => {
11
- setTimeout(() => {
12
- active.value = false
13
- }, 1000)
14
- })
15
- </script>
16
-
17
- <template>
18
- <div class="mb-xxl">
19
- <h3 class="mb-l">
20
- KBD
21
- </h3>
22
-
23
- <table>
24
- <tbody>
25
- <tr>
26
- <th>Base</th>
27
- <td>
28
- <Flex>
29
- <Kbd keys="Ctrl" />
30
- <Kbd keys="Shift" />
31
- <Kbd keys="A" />
32
- </Flex>
33
- </td>
34
- </tr>
35
- <tr>
36
- <th>Group</th>
37
- <td>
38
- <Flex :gap="2">
39
- <KbdGroup @trigger="active = true">
40
- <Kbd highlight keys="Shift" />
41
- <Kbd highlight keys="A" />
42
- </KbdGroup>
43
- {{ active ? 'Pressed' : '' }}
44
- </Flex>
45
- </td>
46
- </tr>
47
- <tr>
48
- <th>Custom labels</th>
49
- <td>
50
- <Flex>
51
- <Kbd highlight keys="Shift" label="Shift bro" />
52
- <Kbd highlight keys="A" label="A key" />
53
- </Flex>
54
- </td>
55
- </tr>
56
- <tr>
57
- <th>Multiple keys in one</th>
58
- <td>
59
- <Kbd keys="Shift+A" highlight />
60
- </td>
61
- </tr>
62
- </tbody>
63
- </table>
64
- </div>
65
- </template>
1
+ <script setup lang='ts'>
2
+ import { whenever } from '@vueuse/core'
3
+ import { ref } from 'vue'
4
+ import Flex from '../components/Flex/Flex.vue'
5
+ import Kbd from '../components/Kbd/Kbd.vue'
6
+ import KbdGroup from '../components/Kbd/KbdGroup.vue'
7
+
8
+ const active = ref(false)
9
+
10
+ whenever(active, () => {
11
+ setTimeout(() => {
12
+ active.value = false
13
+ }, 1000)
14
+ })
15
+ </script>
16
+
17
+ <template>
18
+ <div class="mb-xxl">
19
+ <h3 class="mb-l">
20
+ KBD
21
+ </h3>
22
+
23
+ <table>
24
+ <tbody>
25
+ <tr>
26
+ <th>Base</th>
27
+ <td>
28
+ <Flex>
29
+ <Kbd keys="Ctrl" />
30
+ <Kbd keys="Shift" />
31
+ <Kbd keys="A" />
32
+ </Flex>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <th>Group</th>
37
+ <td>
38
+ <Flex :gap="2">
39
+ <KbdGroup @trigger="active = true">
40
+ <Kbd highlight keys="Shift" />
41
+ <Kbd highlight keys="A" />
42
+ </KbdGroup>
43
+ {{ active ? 'Pressed' : '' }}
44
+ </Flex>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <th>Custom labels</th>
49
+ <td>
50
+ <Flex>
51
+ <Kbd highlight keys="Shift" label="Shift bro" />
52
+ <Kbd highlight keys="A" label="A key" />
53
+ </Flex>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <th>Multiple keys in one</th>
58
+ <td>
59
+ <Kbd keys="Shift+A" highlight />
60
+ </td>
61
+ </tr>
62
+ </tbody>
63
+ </table>
64
+ </div>
65
+ </template>