@dolanske/vui 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/package.json +1 -2
  2. package/src/App.vue +0 -103
  3. package/src/components/Accordion/Accordion.vue +0 -98
  4. package/src/components/Accordion/AccordionGroup.vue +0 -49
  5. package/src/components/Accordion/accordion.scss +0 -97
  6. package/src/components/Alert/Alert.vue +0 -59
  7. package/src/components/Alert/alert.scss +0 -162
  8. package/src/components/Avatar/Avatar.vue +0 -53
  9. package/src/components/Avatar/avatar.scss +0 -52
  10. package/src/components/Badge/Badge.vue +0 -21
  11. package/src/components/Badge/badge.scss +0 -210
  12. package/src/components/Breadcrumbs/BreadcrumbItem.vue +0 -26
  13. package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -29
  14. package/src/components/Breadcrumbs/breadcrumbs.scss +0 -31
  15. package/src/components/Button/Button.vue +0 -86
  16. package/src/components/Button/button.scss +0 -292
  17. package/src/components/ButtonGroup/ButtonGroup.vue +0 -28
  18. package/src/components/ButtonGroup/button-group.scss +0 -51
  19. package/src/components/Calendar/Calendar.vue +0 -66
  20. package/src/components/Calendar/calendar.scss +0 -88
  21. package/src/components/Card/Card.vue +0 -48
  22. package/src/components/Card/card.scss +0 -55
  23. package/src/components/Checkbox/Checkbox.vue +0 -54
  24. package/src/components/Checkbox/checkbox.scss +0 -80
  25. package/src/components/CopyClipboard/CopyClipboard.vue +0 -98
  26. package/src/components/CopyClipboard/copy-clipboard.scss +0 -25
  27. package/src/components/Divider/Divider.vue +0 -38
  28. package/src/components/Divider/divider.scss +0 -37
  29. package/src/components/Drawer/Drawer.vue +0 -102
  30. package/src/components/Drawer/drawer.scss +0 -37
  31. package/src/components/Dropdown/Dropdown.vue +0 -120
  32. package/src/components/Dropdown/DropdownItem.vue +0 -33
  33. package/src/components/Dropdown/DropdownTitle.vue +0 -14
  34. package/src/components/Dropdown/dropdown-item.scss +0 -84
  35. package/src/components/Dropdown/dropdown.scss +0 -53
  36. package/src/components/Flex/Flex.vue +0 -113
  37. package/src/components/Grid/Grid.vue +0 -87
  38. package/src/components/Input/Color.vue +0 -26
  39. package/src/components/Input/Counter.vue +0 -66
  40. package/src/components/Input/Dropzone.vue +0 -65
  41. package/src/components/Input/File.vue +0 -15
  42. package/src/components/Input/Input.vue +0 -123
  43. package/src/components/Input/Password.vue +0 -35
  44. package/src/components/Input/Textarea.vue +0 -78
  45. package/src/components/Input/input.scss +0 -302
  46. package/src/components/Kbd/Kbd.vue +0 -48
  47. package/src/components/Kbd/KbdGroup.vue +0 -28
  48. package/src/components/Kbd/kbd.scss +0 -19
  49. package/src/components/Modal/Confirm.vue +0 -56
  50. package/src/components/Modal/Modal.vue +0 -103
  51. package/src/components/Modal/modal.scss +0 -54
  52. package/src/components/OTP/OTP.vue +0 -133
  53. package/src/components/OTP/OTPItem.vue +0 -37
  54. package/src/components/OTP/otp.scss +0 -84
  55. package/src/components/Pagination/Pagination.vue +0 -92
  56. package/src/components/Pagination/pagination.ts +0 -78
  57. package/src/components/Popout/Popout.vue +0 -73
  58. package/src/components/Popout/popout.scss +0 -16
  59. package/src/components/Progress/Progress.vue +0 -103
  60. package/src/components/Progress/progress.scss +0 -47
  61. package/src/components/Radio/Radio.vue +0 -38
  62. package/src/components/Radio/RadioGroup.vue +0 -34
  63. package/src/components/Radio/radio.scss +0 -78
  64. package/src/components/Select/Select.vue +0 -212
  65. package/src/components/Select/select.scss +0 -82
  66. package/src/components/Sheet/Sheet.vue +0 -106
  67. package/src/components/Sheet/sheet.scss +0 -71
  68. package/src/components/Sidebar/Sidebar.vue +0 -116
  69. package/src/components/Sidebar/sidebar.scss +0 -124
  70. package/src/components/Skeleton/Skeleton.vue +0 -43
  71. package/src/components/Skeleton/skeleton.scss +0 -14
  72. package/src/components/Spinner/Spinner.vue +0 -42
  73. package/src/components/Spinner/spinner.scss +0 -47
  74. package/src/components/Switch/Switch.vue +0 -31
  75. package/src/components/Switch/switch.scss +0 -93
  76. package/src/components/Table/Cell.vue +0 -23
  77. package/src/components/Table/Head.vue +0 -66
  78. package/src/components/Table/Root.vue +0 -66
  79. package/src/components/Table/SelectAll.vue +0 -23
  80. package/src/components/Table/SelectRow.vue +0 -30
  81. package/src/components/Table/index.ts +0 -7
  82. package/src/components/Table/table.scss +0 -155
  83. package/src/components/Table/table.ts +0 -248
  84. package/src/components/Tabs/Tab.vue +0 -25
  85. package/src/components/Tabs/Tabs.vue +0 -90
  86. package/src/components/Tabs/tabs.scss +0 -87
  87. package/src/components/Toast/Toasts.vue +0 -52
  88. package/src/components/Toast/toast.scss +0 -45
  89. package/src/components/Toast/toast.ts +0 -75
  90. package/src/components/Tooltip/Tooltip.vue +0 -78
  91. package/src/components/Tooltip/tooltip.scss +0 -5
  92. package/src/examples/ExampleAccordions.vue +0 -69
  93. package/src/examples/ExampleAlerts.vue +0 -78
  94. package/src/examples/ExampleAvatars.vue +0 -44
  95. package/src/examples/ExampleBadges.vue +0 -48
  96. package/src/examples/ExampleBreadcrumbs.vue +0 -46
  97. package/src/examples/ExampleButtons.vue +0 -148
  98. package/src/examples/ExampleCalendars.vue +0 -40
  99. package/src/examples/ExampleCards.vue +0 -94
  100. package/src/examples/ExampleCheckboxes.vue +0 -123
  101. package/src/examples/ExampleCopyClipboard.vue +0 -47
  102. package/src/examples/ExampleDividers.vue +0 -39
  103. package/src/examples/ExampleDrawers.vue +0 -67
  104. package/src/examples/ExampleDropdowns.vue +0 -114
  105. package/src/examples/ExampleFlexGrid.vue +0 -124
  106. package/src/examples/ExampleInputs.vue +0 -236
  107. package/src/examples/ExampleKBD.vue +0 -65
  108. package/src/examples/ExampleModals.vue +0 -143
  109. package/src/examples/ExamplePalette.vue +0 -165
  110. package/src/examples/ExamplePopouts.vue +0 -41
  111. package/src/examples/ExampleSheets.vue +0 -77
  112. package/src/examples/ExampleSidebars.vue +0 -276
  113. package/src/examples/ExampleSkeletons.vue +0 -26
  114. package/src/examples/ExampleSpinners.vue +0 -80
  115. package/src/examples/ExampleTables.vue +0 -359
  116. package/src/examples/ExampleTabs.vue +0 -142
  117. package/src/examples/ExampleToasts.vue +0 -96
  118. package/src/examples/ExampleTooltips.vue +0 -70
  119. package/src/examples/shared/ExampleColor.vue +0 -28
  120. package/src/index.ts +0 -116
  121. package/src/internal/Backdrop/Backdrop.vue +0 -22
  122. package/src/internal/Backdrop/backdrop.scss +0 -34
  123. package/src/main.ts +0 -5
  124. package/src/shared/helpers.ts +0 -124
  125. package/src/shared/slots.ts +0 -61
  126. package/src/shared/theme.ts +0 -22
  127. package/src/shared/types.ts +0 -29
  128. package/src/style/animation.scss +0 -50
  129. package/src/style/core.scss +0 -133
  130. package/src/style/fonts.scss +0 -73
  131. package/src/style/layout.scss +0 -179
  132. package/src/style/media-query.scss +0 -29
  133. package/src/style/reset.scss +0 -135
  134. package/src/style/text.scss +0 -137
  135. package/src/style/theme.scss +0 -195
  136. package/src/style/tooltip.scss +0 -146
  137. package/src/style/typography.scss +0 -435
  138. package/src/style/utils.scss +0 -36
  139. package/src/style.scss +0 -1
  140. package/src/vite-env.d.ts +0 -1
@@ -1,114 +0,0 @@
1
- <script setup lang="ts">
2
- import { Icon } from '@iconify/vue'
3
- import Button from '../components/Button/Button.vue'
4
- import Dropdown from '../components/Dropdown/Dropdown.vue'
5
- import DropdownItem from '../components/Dropdown/DropdownItem.vue'
6
- import DropdownTitle from '../components/Dropdown/DropdownTitle.vue'
7
- import Flex from '../components/Flex/Flex.vue'
8
-
9
- const placements = ['top', 'bottom', 'left', 'right'] as const
10
- </script>
11
-
12
- <template>
13
- <div class="mb-xxl">
14
- <h3 class="mb-l">
15
- Dropdowns
16
- </h3>
17
-
18
- <table class="mb-xxl">
19
- <tbody>
20
- <tr>
21
- <th>
22
- Base + expand <br> (dropdown takes width of the trigger)
23
- </th>
24
- <td>
25
- <Dropdown expand>
26
- <template #trigger="{ toggle }">
27
- <Button class="btn btn-primary" expand @click="toggle">
28
- Dropdown
29
- </Button>
30
- </template>
31
- <DropdownItem>New user</DropdownItem>
32
- <DropdownItem>Update</DropdownItem>
33
- <DropdownItem>Cancel</DropdownItem>
34
- </Dropdown>
35
- </td>
36
- </tr>
37
- <tr>
38
- <th>
39
- Placements (some)
40
- </th>
41
- <td>
42
- <Flex>
43
- <Dropdown v-for="placement in placements" :key="placement" :placement="placement">
44
- <template #trigger="{ toggle }">
45
- <Button class="btn btn-primary" @click="toggle">
46
- {{ placement }}
47
- </Button>
48
- </template>
49
-
50
- <DropdownItem>New user</DropdownItem>
51
- <DropdownItem>Update</DropdownItem>
52
- <DropdownItem>Cancel</DropdownItem>
53
- </Dropdown>
54
- </Flex>
55
- </td>
56
- </tr>
57
- <tr>
58
- <th>Complex</th>
59
- <td>
60
- <Dropdown>
61
- <template #trigger="{ toggle }">
62
- <Button class="btn btn-primary" @click="toggle">
63
- Dropdown
64
- </Button>
65
- </template>
66
-
67
- <DropdownTitle>
68
- Actions
69
- <template #end>
70
- 3
71
- </template>
72
- </DropdownTitle>
73
-
74
- <DropdownItem icon="ph:user">
75
- New user
76
- <template #hint>
77
- <Icon icon="ic:round-keyboard-command-key" />
78
- + C
79
- </template>
80
- </DropdownItem>
81
- <DropdownItem icon-end="ph:arrow-right">
82
- Update
83
- </DropdownItem>
84
- <DropdownItem>Cancel</DropdownItem>
85
-
86
- <DropdownTitle>Yourself</DropdownTitle>
87
- <DropdownItem icon="ph:x" disabled>
88
- Disabled option
89
- </DropdownItem>
90
- <DropdownItem icon="ph:x">
91
- Delete
92
- </DropdownItem>
93
- </Dropdown>
94
- </td>
95
- </tr>
96
- <tr>
97
- <th>Disabled</th>
98
- <td>
99
- <Dropdown expand>
100
- <template #trigger="{ toggle }">
101
- <Button class="btn btn-primary" disabled @click="toggle">
102
- Dropdown
103
- </Button>
104
- </template>
105
- <DropdownItem>New user</DropdownItem>
106
- <DropdownItem>Update</DropdownItem>
107
- <DropdownItem>Cancel</DropdownItem>
108
- </Dropdown>
109
- </td>
110
- </tr>
111
- </tbody>
112
- </table>
113
- </div>
114
- </template>
@@ -1,124 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue'
3
- import Flex from '../components/Flex/Flex.vue'
4
- import Grid from '../components/Grid/Grid.vue'
5
-
6
- const cols = ref(3)
7
- </script>
8
-
9
- <template>
10
- <div class="mb-xxl">
11
- <h3 class="mb-l">
12
- Layouts
13
- </h3>
14
-
15
- <h6 class="block mb-m">
16
- Flex
17
- </h6>
18
-
19
- <table class="mb-l">
20
- <tbody>
21
- <tr>
22
- <th>Flex + gaps <br> (gap can either be set as a size or a number)</th>
23
- <td class="w-85">
24
- <Flex gap="l" column>
25
- <Flex v-for="size in ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] as const" :key="size" expand :gap="size">
26
- <div v-for="key in 3" :key class="example flex-1">
27
- {{ size.toUpperCase() }}
28
- </div>
29
- </Flex>
30
- </Flex>
31
- </td>
32
- </tr>
33
- </tbody>
34
- </table>
35
-
36
- <p class="mb-s">
37
- All of the following props are boolean props
38
- </p>
39
-
40
- <table class="mb-xl">
41
- <tbody>
42
- <tr>
43
- <th>Display props</th>
44
- <td>
45
- <Flex>
46
- <code>inline</code><code>wrap</code><code>wrap-reverse</code><code>expand</code>
47
- </Flex>
48
- </td>
49
- </tr>
50
- <tr>
51
- <th>Flow props</th>
52
- <td>
53
- <Flex>
54
- <code>row</code><code>column</code><code>row-reverse</code><code>column-reverse</code>
55
- </Flex>
56
- </td>
57
- </tr>
58
- <tr>
59
- <th>Justify props</th>
60
- <td>
61
- <Flex>
62
- <code>x-start</code><code>x-end</code><code>x-center</code>
63
- <code>x-between</code><code>x-around</code><code>x-evenly</code>
64
- </Flex>
65
- </td>
66
- </tr>
67
- <tr>
68
- <th>Align props</th>
69
- <td>
70
- <Flex>
71
- <code>y-start</code><code>y-end</code><code>y-center</code>
72
- <code>y-baseline</code>
73
- </Flex>
74
- </td>
75
- </tr>
76
- </tbody>
77
- </table>
78
-
79
- <h6 class="block mb-m">
80
- Grid
81
- </h6>
82
-
83
- <p class="mb-s">
84
- This grid utility is mostly meant for simple grid layouts. For anything mroe complicated, write your layouts in CSS. It supports setting <code>rows</code> or <code>columns</code> prop with a number or a string (the same way you'd write the CSS properties)
85
- </p>
86
-
87
- <p class="mb-s">
88
- You can also set the `inlin` boolean prop and the `gap` prop which is a size prop or a number
89
- </p>
90
-
91
- <table>
92
- <tbody>
93
- <tr>
94
- <th>
95
- Base
96
- <select v-model="cols" class="mt-s block">
97
- <option v-for="key in 5" :key :value="key + 1">
98
- Cols: {{ key + 1 }}
99
- </option>
100
- </select>
101
- </th>
102
- <td class="w-85">
103
- <Grid :columns="cols" gap="l">
104
- <div v-for="key in 9" :key class="example">
105
- {{ key }}
106
- </div>
107
- </Grid>
108
- </td>
109
- </tr>
110
- </tbody>
111
- </table>
112
- </div>
113
- </template>
114
-
115
- <style scoped>
116
- .example {
117
- display: block;
118
- width: 100%;
119
- height: 24px;
120
- border-radius: var(--border-radius-m);
121
- background-color: var(--color-border);
122
- text-align: center;
123
- }
124
- </style>
@@ -1,236 +0,0 @@
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, showClear" show-clear 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
- <div class="inline-block">
188
- <Select :options="longOptions" label="Short" show-clear />
189
- </div>
190
- <Divider :size="48" />
191
- <h6 class="mb-l">
192
- OTP
193
- </h6>
194
-
195
- <table>
196
- <tbody>
197
- <tr>
198
- <th>Base</th>
199
- <td>
200
- <OTP>
201
- <Flex :gap="0" y-center>
202
- <OTPItem :i="0" />
203
- <OTPItem :i="1" />
204
- <OTPItem :i="2" />
205
- <span class="ml-m mr-m">-</span>
206
- <OTPItem :i="3" />
207
- <OTPItem :i="4" />
208
- <OTPItem :i="5" />
209
- </Flex>
210
- </OTP>
211
- </td>
212
- </tr>
213
- <tr>
214
- <th>Redacted + only numbers</th>
215
- <td>
216
- <OTP redacted mode="num">
217
- <OTPItem :i="0" />
218
- <OTPItem :i="1" />
219
- <OTPItem :i="2" />
220
- </OTP>
221
- </td>
222
- </tr>
223
- <tr>
224
- <th>Only characters</th>
225
- <td>
226
- <OTP redacted mode="char">
227
- <OTPItem :i="0" />
228
- <OTPItem :i="1" />
229
- <OTPItem :i="2" />
230
- </OTP>
231
- </td>
232
- </tr>
233
- </tbody>
234
- </table>
235
- </div>
236
- </template>
@@ -1,65 +0,0 @@
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,143 +0,0 @@
1
- <script setup lang='ts'>
2
- import type { Sizes } from '../shared/types'
3
- import { ref } from 'vue'
4
- import Button from '../components/Button/Button.vue'
5
- import Flex from '../components/Flex/Flex.vue'
6
- import Modal from '../components/Modal/Modal.vue'
7
-
8
- const open = ref(false)
9
- const open2 = ref(false)
10
- const open3 = ref(false)
11
- const open4 = ref(false)
12
- const open5 = ref(false)
13
-
14
- const size = ref<Sizes | 'full'>('s')
15
- function setSize(s: any) {
16
- size.value = s
17
- open2.value = true
18
- }
19
- </script>
20
-
21
- <template>
22
- <div class="mb-xxl">
23
- <h3 class="mb-l">
24
- Modals
25
- </h3>
26
-
27
- <table>
28
- <tbody>
29
- <tr>
30
- <th>Base</th>
31
- <td>
32
- <Button @click="open = !open">
33
- Open
34
- </Button>
35
- <Modal :open="open" @close="open = false">
36
- <template #header>
37
- <h4>Modal </h4>
38
- </template>
39
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad harum id, distinctio voluptatum repellat eveniet repellendus saepe velit rem illo facere aspernatur iste nam, quasi dolores expedita consectetur enim autem?</p>
40
- <template #footer="{ close }">
41
- <Button @click="close">
42
- Close
43
- </Button>
44
- </template>
45
- </Modal>
46
- </td>
47
- </tr>
48
- <tr>
49
- <th>Sizes</th>
50
- <td>
51
- <Flex>
52
- <Button square @click="setSize('s')">
53
- S
54
- </Button>
55
- <Button square @click="setSize('l')">
56
- L
57
- </Button>
58
- <Button square @click="setSize('full')">
59
- Full
60
- </Button>
61
- </Flex>
62
- <Modal :open="open2" :size @close="open2 = false">
63
- <template #header>
64
- <h4>Modal </h4>
65
- </template>
66
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad harum id, distinctio voluptatum repellat eveniet repellendus saepe velit rem illo facere aspernatur iste nam, quasi dolores expedita consectetur enim autem?</p>
67
- <template #footer="{ close }">
68
- <Button @click="close">
69
- Close
70
- </Button>
71
- </template>
72
- </Modal>
73
- </td>
74
- </tr>
75
- <tr>
76
- <th>Centered + separators + can't dismiss</th>
77
- <td>
78
- <Button @click="open3 = !open3">
79
- Open
80
- </Button>
81
- <Modal :open="open3" centered :card="{ separators: true }" :can-dismiss="false" @close="open3 = false">
82
- <template #header>
83
- <h4>What is this?</h4>
84
- </template>
85
- <p>Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop.</p>
86
- <template #footer="{ close }">
87
- <Button @click="close">
88
- Close
89
- </Button>
90
- </template>
91
- </Modal>
92
- </td>
93
- </tr>
94
- <tr>
95
- <th>
96
- Scrollable
97
- </th>
98
- <td>
99
- <Button @click="open4 = !open4">
100
- Open
101
- </Button>
102
- <Modal :open="open4" :card="{ separators: true }" scrollable @close="open4 = false">
103
- <template #header>
104
- <h4>What is this?</h4>
105
- </template>
106
- <p class="text-xxxxl">
107
- Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas nisi eos dolores ipsa perspiciatis ullam voluptates quos. Recusandae quod atque, laudantium quis, ad quaerat cumque vero quibusdam facilis, blanditiis eius.
108
- </p>
109
- <template #footer="{ close }">
110
- <Button @click="close">
111
- Close
112
- </Button>
113
- </template>
114
- </Modal>
115
- </td>
116
- </tr>
117
- <tr>
118
- <th>
119
- Fullscreen
120
- </th>
121
- <td>
122
- <Button @click="open5 = !open5">
123
- Open
124
- </Button>
125
- <Modal :open="open5" size="screen" :card="{ separators: true }" scrollable @close="open5 = false">
126
- <template #header>
127
- <h4>What is this?</h4>
128
- </template>
129
- <p class="text-xxxxl">
130
- Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas nisi eos dolores ipsa perspiciatis ullam voluptates quos. Recusandae quod atque, laudantium quis, ad quaerat cumque vero quibusdam facilis, blanditiis eius. Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis sed, impedit officia ad earum optio molestiae nihil mollitia quas enim neque repudiandae minus? Odio fugit voluptates enim et iste odit? Lorem, ipsum dolor sit amet consectetur adipisicing elit. In mollitia harum consectetur ad soluta laudantium? In earum animi harum impedit modi dolores, quod ex, ipsa ipsum est perferendis laudantium aut? Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat, cupiditate autem aut nisi quas voluptatem dolorem, eaque odit voluptates laboriosam consequuntur dolore alias a provident corporis nemo. Blanditiis, vel! Maiores!
131
- </p>
132
- <template #footer="{ close }">
133
- <Button @click="close">
134
- Close
135
- </Button>
136
- </template>
137
- </Modal>
138
- </td>
139
- </tr>
140
- </tbody>
141
- </table>
142
- </div>
143
- </template>