@dolanske/vui 1.4.1 → 1.4.3
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.
- package/package.json +1 -2
- package/src/App.vue +0 -103
- package/src/components/Accordion/Accordion.vue +0 -98
- package/src/components/Accordion/AccordionGroup.vue +0 -49
- package/src/components/Accordion/accordion.scss +0 -97
- package/src/components/Alert/Alert.vue +0 -59
- package/src/components/Alert/alert.scss +0 -162
- package/src/components/Avatar/Avatar.vue +0 -53
- package/src/components/Avatar/avatar.scss +0 -52
- package/src/components/Badge/Badge.vue +0 -21
- package/src/components/Badge/badge.scss +0 -210
- package/src/components/Breadcrumbs/BreadcrumbItem.vue +0 -26
- package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -29
- package/src/components/Breadcrumbs/breadcrumbs.scss +0 -31
- package/src/components/Button/Button.vue +0 -86
- package/src/components/Button/button.scss +0 -292
- package/src/components/ButtonGroup/ButtonGroup.vue +0 -28
- package/src/components/ButtonGroup/button-group.scss +0 -51
- package/src/components/Calendar/Calendar.vue +0 -66
- package/src/components/Calendar/calendar.scss +0 -88
- package/src/components/Card/Card.vue +0 -48
- package/src/components/Card/card.scss +0 -55
- package/src/components/Checkbox/Checkbox.vue +0 -54
- package/src/components/Checkbox/checkbox.scss +0 -80
- package/src/components/CopyClipboard/CopyClipboard.vue +0 -98
- package/src/components/CopyClipboard/copy-clipboard.scss +0 -25
- package/src/components/Divider/Divider.vue +0 -38
- package/src/components/Divider/divider.scss +0 -37
- package/src/components/Drawer/Drawer.vue +0 -102
- package/src/components/Drawer/drawer.scss +0 -37
- package/src/components/Dropdown/Dropdown.vue +0 -120
- package/src/components/Dropdown/DropdownItem.vue +0 -33
- package/src/components/Dropdown/DropdownTitle.vue +0 -14
- package/src/components/Dropdown/dropdown-item.scss +0 -84
- package/src/components/Dropdown/dropdown.scss +0 -53
- package/src/components/Flex/Flex.vue +0 -113
- package/src/components/Grid/Grid.vue +0 -87
- package/src/components/Input/Color.vue +0 -26
- package/src/components/Input/Counter.vue +0 -66
- package/src/components/Input/Dropzone.vue +0 -65
- package/src/components/Input/File.vue +0 -15
- package/src/components/Input/Input.vue +0 -123
- package/src/components/Input/Password.vue +0 -35
- package/src/components/Input/Textarea.vue +0 -78
- package/src/components/Input/input.scss +0 -302
- package/src/components/Kbd/Kbd.vue +0 -48
- package/src/components/Kbd/KbdGroup.vue +0 -28
- package/src/components/Kbd/kbd.scss +0 -19
- package/src/components/Modal/Confirm.vue +0 -56
- package/src/components/Modal/Modal.vue +0 -103
- package/src/components/Modal/modal.scss +0 -54
- package/src/components/OTP/OTP.vue +0 -133
- package/src/components/OTP/OTPItem.vue +0 -37
- package/src/components/OTP/otp.scss +0 -84
- package/src/components/Pagination/Pagination.vue +0 -92
- package/src/components/Pagination/pagination.ts +0 -78
- package/src/components/Popout/Popout.vue +0 -73
- package/src/components/Popout/popout.scss +0 -16
- package/src/components/Progress/Progress.vue +0 -103
- package/src/components/Progress/progress.scss +0 -47
- package/src/components/Radio/Radio.vue +0 -38
- package/src/components/Radio/RadioGroup.vue +0 -34
- package/src/components/Radio/radio.scss +0 -78
- package/src/components/Select/Select.vue +0 -212
- package/src/components/Select/select.scss +0 -82
- package/src/components/Sheet/Sheet.vue +0 -106
- package/src/components/Sheet/sheet.scss +0 -71
- package/src/components/Sidebar/Sidebar.vue +0 -116
- package/src/components/Sidebar/sidebar.scss +0 -124
- package/src/components/Skeleton/Skeleton.vue +0 -43
- package/src/components/Skeleton/skeleton.scss +0 -14
- package/src/components/Spinner/Spinner.vue +0 -42
- package/src/components/Spinner/spinner.scss +0 -47
- package/src/components/Switch/Switch.vue +0 -31
- package/src/components/Switch/switch.scss +0 -93
- package/src/components/Table/Cell.vue +0 -23
- package/src/components/Table/Head.vue +0 -66
- package/src/components/Table/Root.vue +0 -66
- package/src/components/Table/SelectAll.vue +0 -23
- package/src/components/Table/SelectRow.vue +0 -30
- package/src/components/Table/index.ts +0 -7
- package/src/components/Table/table.scss +0 -155
- package/src/components/Table/table.ts +0 -248
- package/src/components/Tabs/Tab.vue +0 -25
- package/src/components/Tabs/Tabs.vue +0 -90
- package/src/components/Tabs/tabs.scss +0 -87
- package/src/components/Toast/Toasts.vue +0 -52
- package/src/components/Toast/toast.scss +0 -45
- package/src/components/Toast/toast.ts +0 -75
- package/src/components/Tooltip/Tooltip.vue +0 -78
- package/src/components/Tooltip/tooltip.scss +0 -5
- package/src/examples/ExampleAccordions.vue +0 -69
- package/src/examples/ExampleAlerts.vue +0 -78
- package/src/examples/ExampleAvatars.vue +0 -44
- package/src/examples/ExampleBadges.vue +0 -48
- package/src/examples/ExampleBreadcrumbs.vue +0 -46
- package/src/examples/ExampleButtons.vue +0 -148
- package/src/examples/ExampleCalendars.vue +0 -40
- package/src/examples/ExampleCards.vue +0 -94
- package/src/examples/ExampleCheckboxes.vue +0 -123
- package/src/examples/ExampleCopyClipboard.vue +0 -47
- package/src/examples/ExampleDividers.vue +0 -39
- package/src/examples/ExampleDrawers.vue +0 -67
- package/src/examples/ExampleDropdowns.vue +0 -114
- package/src/examples/ExampleFlexGrid.vue +0 -124
- package/src/examples/ExampleInputs.vue +0 -236
- package/src/examples/ExampleKBD.vue +0 -65
- package/src/examples/ExampleModals.vue +0 -143
- package/src/examples/ExamplePalette.vue +0 -165
- package/src/examples/ExamplePopouts.vue +0 -41
- package/src/examples/ExampleSheets.vue +0 -77
- package/src/examples/ExampleSidebars.vue +0 -276
- package/src/examples/ExampleSkeletons.vue +0 -26
- package/src/examples/ExampleSpinners.vue +0 -80
- package/src/examples/ExampleTables.vue +0 -359
- package/src/examples/ExampleTabs.vue +0 -142
- package/src/examples/ExampleToasts.vue +0 -96
- package/src/examples/ExampleTooltips.vue +0 -70
- package/src/examples/shared/ExampleColor.vue +0 -28
- package/src/index.ts +0 -116
- package/src/internal/Backdrop/Backdrop.vue +0 -22
- package/src/internal/Backdrop/backdrop.scss +0 -34
- package/src/main.ts +0 -5
- package/src/shared/helpers.ts +0 -124
- package/src/shared/slots.ts +0 -61
- package/src/shared/theme.ts +0 -22
- package/src/shared/types.ts +0 -29
- package/src/style/animation.scss +0 -50
- package/src/style/core.scss +0 -133
- package/src/style/fonts.scss +0 -73
- package/src/style/layout.scss +0 -179
- package/src/style/media-query.scss +0 -29
- package/src/style/reset.scss +0 -135
- package/src/style/text.scss +0 -137
- package/src/style/theme.scss +0 -195
- package/src/style/tooltip.scss +0 -146
- package/src/style/typography.scss +0 -435
- package/src/style/utils.scss +0 -36
- package/src/style.scss +0 -1
- package/src/vite-env.d.ts +0 -1
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, onBeforeMount, ref } from 'vue'
|
|
3
|
-
import Accordion from '../components/Accordion/Accordion.vue'
|
|
4
|
-
import Divider from '../components/Divider/Divider.vue'
|
|
5
|
-
import { paginate } from '../components/Pagination/pagination'
|
|
6
|
-
import Pagination from '../components/Pagination/Pagination.vue'
|
|
7
|
-
import * as Table from '../components/Table/index'
|
|
8
|
-
import { defineTable } from '../components/Table/table'
|
|
9
|
-
import Tooltip from '../components/Tooltip/Tooltip.vue'
|
|
10
|
-
|
|
11
|
-
interface Item {
|
|
12
|
-
'ID Nation': string
|
|
13
|
-
'ID Year': number
|
|
14
|
-
'Nation': string
|
|
15
|
-
'Population': number
|
|
16
|
-
'Slug Nation': string
|
|
17
|
-
'Year': string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface StrippedItem {
|
|
21
|
-
Nation: string
|
|
22
|
-
Population: number
|
|
23
|
-
Year: string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const data = ref<StrippedItem[]>([])
|
|
27
|
-
|
|
28
|
-
onBeforeMount(async () => {
|
|
29
|
-
data.value = await fetch('https://datausa.io/api/data?drilldowns=Nation&measures=Population')
|
|
30
|
-
.then(response => response.json())
|
|
31
|
-
.then(({ data }: { data: Item[] }) => {
|
|
32
|
-
return data.map(row => ({
|
|
33
|
-
Nation: row.Nation,
|
|
34
|
-
Population: row.Population,
|
|
35
|
-
Year: row.Year,
|
|
36
|
-
}))
|
|
37
|
-
})
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const {
|
|
41
|
-
rows,
|
|
42
|
-
headers,
|
|
43
|
-
pagination,
|
|
44
|
-
allRows,
|
|
45
|
-
setPage,
|
|
46
|
-
selectedRows,
|
|
47
|
-
} = defineTable(data, {
|
|
48
|
-
pagination: {
|
|
49
|
-
enabled: true,
|
|
50
|
-
perPage: 3,
|
|
51
|
-
},
|
|
52
|
-
select: true,
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
// Example
|
|
56
|
-
//
|
|
57
|
-
const testData = ['Jan', 'Andrew', 'Kasper', 'Anton', 'Felix', 'Daniel', 'Gabriel', 'Ayalga', 'Floris']
|
|
58
|
-
const page = ref(1)
|
|
59
|
-
const paginationExample = computed(() => paginate(testData.length, page.value, 2))
|
|
60
|
-
const exampleToRender = computed(() => testData.slice(paginationExample.value.startIndex, paginationExample.value.endIndex + 1))
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<template>
|
|
64
|
-
<div class="mb-xxl">
|
|
65
|
-
<h3 class="mb-l">
|
|
66
|
-
Tables
|
|
67
|
-
</h3>
|
|
68
|
-
|
|
69
|
-
<p class="mb-l">
|
|
70
|
-
This library has two way to define tables. By default, you can use the classic <code>table</code> element and compose simple tables. <br> Or you can go overkill with the <code>{{ `<Table />` }}</code> component, which comes with its own composable function
|
|
71
|
-
</p>
|
|
72
|
-
|
|
73
|
-
<strong class="mb-s block">Simple vertical table</strong>
|
|
74
|
-
|
|
75
|
-
<table class="mb-l">
|
|
76
|
-
<thead>
|
|
77
|
-
<tr>
|
|
78
|
-
<th>One</th>
|
|
79
|
-
<th>Two</th>
|
|
80
|
-
<th>Three</th>
|
|
81
|
-
</tr>
|
|
82
|
-
</thead>
|
|
83
|
-
<tbody>
|
|
84
|
-
<tr>
|
|
85
|
-
<td>First </td>
|
|
86
|
-
<td>Second</td>
|
|
87
|
-
<td>Third</td>
|
|
88
|
-
</tr>
|
|
89
|
-
</tbody>
|
|
90
|
-
</table>
|
|
91
|
-
|
|
92
|
-
<strong class="mb-s block">Simple horizontal table</strong>
|
|
93
|
-
|
|
94
|
-
<table class="mb-xxl">
|
|
95
|
-
<tbody>
|
|
96
|
-
<tr>
|
|
97
|
-
<th>One</th>
|
|
98
|
-
<td>First</td>
|
|
99
|
-
</tr>
|
|
100
|
-
<tr>
|
|
101
|
-
<th>Two</th>
|
|
102
|
-
<td>Second</td>
|
|
103
|
-
</tr>
|
|
104
|
-
<tr>
|
|
105
|
-
<th>Three</th>
|
|
106
|
-
<td>Third</td>
|
|
107
|
-
</tr>
|
|
108
|
-
</tbody>
|
|
109
|
-
</table>
|
|
110
|
-
|
|
111
|
-
<h5 class="mb-s">
|
|
112
|
-
Data table
|
|
113
|
-
</h5>
|
|
114
|
-
|
|
115
|
-
<p class="mb-s">
|
|
116
|
-
This example demonstrates the full capability of the table component. Including column sorting, pagination and row selection.
|
|
117
|
-
</p>
|
|
118
|
-
|
|
119
|
-
<Table.Root separate-cells class="mb-l">
|
|
120
|
-
<template #header>
|
|
121
|
-
<Table.SelectAll />
|
|
122
|
-
<Table.Head v-for="header in headers" :key="header.label" :header sort />
|
|
123
|
-
</template>
|
|
124
|
-
<template #body>
|
|
125
|
-
<tr v-for="row in rows" :key="row.Year">
|
|
126
|
-
<Table.SelectRow :row />
|
|
127
|
-
<Table.Cell>{{ row.Nation }}</Table.Cell>
|
|
128
|
-
<Table.Cell>{{ row.Population }}</Table.Cell>
|
|
129
|
-
<Table.Cell>{{ row.Year }}</Table.Cell>
|
|
130
|
-
</tr>
|
|
131
|
-
</template>
|
|
132
|
-
<template #pagination>
|
|
133
|
-
<Pagination :pagination :first-last="false" @change="setPage" />
|
|
134
|
-
</template>
|
|
135
|
-
</Table.Root>
|
|
136
|
-
|
|
137
|
-
<Accordion :label="`Selected rows (${selectedRows.size})`" class="mb-xl">
|
|
138
|
-
<pre>
|
|
139
|
-
{{ selectedRows }}
|
|
140
|
-
</pre>
|
|
141
|
-
</Accordion>
|
|
142
|
-
|
|
143
|
-
<h5 class="mb-s">
|
|
144
|
-
Variations
|
|
145
|
-
</h5>
|
|
146
|
-
|
|
147
|
-
<div class="typeset mb-xl">
|
|
148
|
-
<ul>
|
|
149
|
-
<li><p><code>separate-rows</code> Adds a border between rows (default: <code>true</code>)</p></li>
|
|
150
|
-
<li><p><code>separate-cells</code> Adds a border between cells (default: <code>false</code>)</p></li>
|
|
151
|
-
<li><p><code>outer-border</code> Adds a border around the entire table component (default: <code>true</code>)</p></li>
|
|
152
|
-
<li><p><code>nowrap</code> Adds ellipsis to text which overflows to keep row size consistent (default: <code>false</code>)</p></li>
|
|
153
|
-
<li><p><code>fixed</code> Keeps all the columns the same size (default: <code>false</code>)</p></li>
|
|
154
|
-
</ul>
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<div class="container container-s mb-xxl ml-0">
|
|
158
|
-
<Table.Root :outer-border="false" :separate-cells="true" nowrap fixed>
|
|
159
|
-
<template #body>
|
|
160
|
-
<tr v-for="row in allRows" :key="row.Year">
|
|
161
|
-
<Table.Cell>{{ `${row.Nation} ${row.Nation}` }}</Table.Cell>
|
|
162
|
-
<Table.Cell>{{ row.Population }}</Table.Cell>
|
|
163
|
-
<Table.Cell>{{ row.Year }}</Table.Cell>
|
|
164
|
-
</tr>
|
|
165
|
-
</template>
|
|
166
|
-
</Table.Root>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
<h5 class="mb-s">
|
|
170
|
-
Pagination
|
|
171
|
-
</h5>
|
|
172
|
-
|
|
173
|
-
<p class="mb-m">
|
|
174
|
-
Pagination does not need to be used with table only. The calculation of pages is done via an external function and the pagination component accepts all the necesary props to implement it for any kind of dataset and UI
|
|
175
|
-
</p>
|
|
176
|
-
|
|
177
|
-
<p class="mb-m">
|
|
178
|
-
Here we have a list of names and we're gonna paginate through them:<br><br> {{ testData.join(', ') }}
|
|
179
|
-
</p>
|
|
180
|
-
<Pagination :pagination="paginationExample" @change="(num) => page = num" />
|
|
181
|
-
<div class="typeset">
|
|
182
|
-
<ul>
|
|
183
|
-
<li
|
|
184
|
-
v-for="name in exampleToRender"
|
|
185
|
-
:key="name"
|
|
186
|
-
>
|
|
187
|
-
{{ name }}
|
|
188
|
-
</li>
|
|
189
|
-
</ul>
|
|
190
|
-
</div>
|
|
191
|
-
|
|
192
|
-
<Divider :size="40" class="w-40" />
|
|
193
|
-
|
|
194
|
-
<p>The <code>defineTable</code> hook can also be used with other UI components. Not just tables. That's why all the table interactivity is not within the component, but in a hook. It's very flexible and allows custom functionality.</p>
|
|
195
|
-
|
|
196
|
-
<Divider :size="40" />
|
|
197
|
-
|
|
198
|
-
<h5 class="mb-s">
|
|
199
|
-
Responsitivity
|
|
200
|
-
</h5>
|
|
201
|
-
|
|
202
|
-
<p class="mb-m">
|
|
203
|
-
Table can be made responsible if they overflow their width and are wrapped in a <code>.vui-table-container</code> element.
|
|
204
|
-
</p>
|
|
205
|
-
|
|
206
|
-
<div class="container container-m">
|
|
207
|
-
<div class="vui-table-overflow">
|
|
208
|
-
<table>
|
|
209
|
-
<thead>
|
|
210
|
-
<tr>
|
|
211
|
-
<th>
|
|
212
|
-
<Tooltip placement="top">
|
|
213
|
-
ID
|
|
214
|
-
<template #tooltip>
|
|
215
|
-
<p>ID</p>
|
|
216
|
-
</template>
|
|
217
|
-
</Tooltip>
|
|
218
|
-
</th>
|
|
219
|
-
<th>
|
|
220
|
-
<Tooltip placement="top">
|
|
221
|
-
Name
|
|
222
|
-
<template #tooltip>
|
|
223
|
-
<p>Name</p>
|
|
224
|
-
</template>
|
|
225
|
-
</Tooltip>
|
|
226
|
-
</th>
|
|
227
|
-
<th>
|
|
228
|
-
<Tooltip placement="top">
|
|
229
|
-
Email
|
|
230
|
-
<template #tooltip>
|
|
231
|
-
<p>Email</p>
|
|
232
|
-
</template>
|
|
233
|
-
</Tooltip>
|
|
234
|
-
</th>
|
|
235
|
-
<th>
|
|
236
|
-
<Tooltip placement="top">
|
|
237
|
-
Phone
|
|
238
|
-
<template #tooltip>
|
|
239
|
-
<p>Phone</p>
|
|
240
|
-
</template>
|
|
241
|
-
</Tooltip>
|
|
242
|
-
</th>
|
|
243
|
-
<th>
|
|
244
|
-
<Tooltip placement="top">
|
|
245
|
-
Address
|
|
246
|
-
<template #tooltip>
|
|
247
|
-
<p>Address</p>
|
|
248
|
-
</template>
|
|
249
|
-
</Tooltip>
|
|
250
|
-
</th>
|
|
251
|
-
<th>
|
|
252
|
-
<Tooltip placement="top">
|
|
253
|
-
City
|
|
254
|
-
<template #tooltip>
|
|
255
|
-
<p>City</p>
|
|
256
|
-
</template>
|
|
257
|
-
</Tooltip>
|
|
258
|
-
</th>
|
|
259
|
-
<th>
|
|
260
|
-
<Tooltip placement="top">
|
|
261
|
-
State
|
|
262
|
-
<template #tooltip>
|
|
263
|
-
<p>State</p>
|
|
264
|
-
</template>
|
|
265
|
-
</Tooltip>
|
|
266
|
-
</th>
|
|
267
|
-
<th>
|
|
268
|
-
<Tooltip placement="top">
|
|
269
|
-
Zip
|
|
270
|
-
<template #tooltip>
|
|
271
|
-
<p>Zip</p>
|
|
272
|
-
</template>
|
|
273
|
-
</Tooltip>
|
|
274
|
-
</th>
|
|
275
|
-
<th>
|
|
276
|
-
<Tooltip placement="top">
|
|
277
|
-
Country
|
|
278
|
-
<template #tooltip>
|
|
279
|
-
<p>Country</p>
|
|
280
|
-
</template>
|
|
281
|
-
</Tooltip>
|
|
282
|
-
</th>
|
|
283
|
-
<th>
|
|
284
|
-
<Tooltip placement="top">
|
|
285
|
-
Status
|
|
286
|
-
<template #tooltip>
|
|
287
|
-
<p>Status</p>
|
|
288
|
-
</template>
|
|
289
|
-
</Tooltip>
|
|
290
|
-
</th>
|
|
291
|
-
</tr>
|
|
292
|
-
</thead>
|
|
293
|
-
<tbody>
|
|
294
|
-
<tr>
|
|
295
|
-
<td>001</td>
|
|
296
|
-
<td>John Doe</td>
|
|
297
|
-
<td>john.doe@example.com</td>
|
|
298
|
-
<td>(555) 123-4567</td>
|
|
299
|
-
<td>123 Main St</td>
|
|
300
|
-
<td>New York</td>
|
|
301
|
-
<td>NY</td>
|
|
302
|
-
<td>10001</td>
|
|
303
|
-
<td>USA</td>
|
|
304
|
-
<td>Active</td>
|
|
305
|
-
</tr>
|
|
306
|
-
<tr>
|
|
307
|
-
<td>002</td>
|
|
308
|
-
<td>Jane Smith</td>
|
|
309
|
-
<td>jane.smith@example.com</td>
|
|
310
|
-
<td>(555) 987-6543</td>
|
|
311
|
-
<td>456 Oak Ave</td>
|
|
312
|
-
<td>Los Angeles</td>
|
|
313
|
-
<td>CA</td>
|
|
314
|
-
<td>90001</td>
|
|
315
|
-
<td>USA</td>
|
|
316
|
-
<td>Inactive</td>
|
|
317
|
-
</tr>
|
|
318
|
-
<tr>
|
|
319
|
-
<td>003</td>
|
|
320
|
-
<td>Robert Johnson</td>
|
|
321
|
-
<td>robert.j@example.com</td>
|
|
322
|
-
<td>(555) 456-7890</td>
|
|
323
|
-
<td>789 Pine Blvd</td>
|
|
324
|
-
<td>Chicago</td>
|
|
325
|
-
<td>IL</td>
|
|
326
|
-
<td>60601</td>
|
|
327
|
-
<td>USA</td>
|
|
328
|
-
<td>Active</td>
|
|
329
|
-
</tr>
|
|
330
|
-
<tr>
|
|
331
|
-
<td>004</td>
|
|
332
|
-
<td>Emily Davis</td>
|
|
333
|
-
<td>emily.d@example.com</td>
|
|
334
|
-
<td>(555) 234-5678</td>
|
|
335
|
-
<td>321 Cedar Ln</td>
|
|
336
|
-
<td>Houston</td>
|
|
337
|
-
<td>TX</td>
|
|
338
|
-
<td>77001</td>
|
|
339
|
-
<td>USA</td>
|
|
340
|
-
<td>Pending</td>
|
|
341
|
-
</tr>
|
|
342
|
-
<tr>
|
|
343
|
-
<td>005</td>
|
|
344
|
-
<td>Michael Wilson</td>
|
|
345
|
-
<td>michael.w@example.com</td>
|
|
346
|
-
<td>(555) 876-5432</td>
|
|
347
|
-
<td>654 Maple Dr</td>
|
|
348
|
-
<td>Miami</td>
|
|
349
|
-
<td>FL</td>
|
|
350
|
-
<td>33101</td>
|
|
351
|
-
<td>USA</td>
|
|
352
|
-
<td>Active</td>
|
|
353
|
-
</tr>
|
|
354
|
-
</tbody>
|
|
355
|
-
</table>
|
|
356
|
-
</div>
|
|
357
|
-
</div>
|
|
358
|
-
</div>
|
|
359
|
-
</template>
|
|
@@ -1,142 +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 Flex from '../components/Flex/Flex.vue'
|
|
6
|
-
import Tab from '../components/Tabs/Tab.vue'
|
|
7
|
-
import Tabs from '../components/Tabs/Tabs.vue'
|
|
8
|
-
// import Flex from '../components/Flex/Flex.vue'
|
|
9
|
-
|
|
10
|
-
const activeTab = ref('Home')
|
|
11
|
-
const noActiveNow = ref('')
|
|
12
|
-
|
|
13
|
-
// Dynamic test
|
|
14
|
-
const dynamicTabs = ref(['First', 'Second', 'Third'])
|
|
15
|
-
const activeDynamic = ref(dynamicTabs.value[0])
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div class="mb-xxl">
|
|
20
|
-
<h3 class="mb-l">
|
|
21
|
-
Tabs
|
|
22
|
-
</h3>
|
|
23
|
-
<table>
|
|
24
|
-
<tbody>
|
|
25
|
-
<tr>
|
|
26
|
-
<th>Base + nothing active at first</th>
|
|
27
|
-
<td>
|
|
28
|
-
<Tabs v-model="noActiveNow">
|
|
29
|
-
<Tab value="Home" />
|
|
30
|
-
<Tab value="About" />
|
|
31
|
-
<Tab value="You" />
|
|
32
|
-
</Tabs>
|
|
33
|
-
</td>
|
|
34
|
-
</tr>
|
|
35
|
-
<tr>
|
|
36
|
-
<th>Filled</th>
|
|
37
|
-
<td>
|
|
38
|
-
<Tabs v-model="activeTab" variant="filled">
|
|
39
|
-
<Tab value="Home" />
|
|
40
|
-
<Tab value="About" />
|
|
41
|
-
<Tab value="You" />
|
|
42
|
-
</Tabs>
|
|
43
|
-
</td>
|
|
44
|
-
</tr>
|
|
45
|
-
<tr class="w-100">
|
|
46
|
-
<th>Expanded</th>
|
|
47
|
-
<td class="w-100">
|
|
48
|
-
<Tabs v-model="activeTab" expand>
|
|
49
|
-
<Tab value="Home" />
|
|
50
|
-
<Tab value="About" />
|
|
51
|
-
<Tab value="You" />
|
|
52
|
-
</Tabs>
|
|
53
|
-
|
|
54
|
-
<div class="mb-xl" />
|
|
55
|
-
|
|
56
|
-
<Tabs v-model="activeTab" expand variant="filled">
|
|
57
|
-
<Tab value="Home" />
|
|
58
|
-
<Tab value="About" />
|
|
59
|
-
<Tab value="You" />
|
|
60
|
-
</Tabs>
|
|
61
|
-
</td>
|
|
62
|
-
</tr>
|
|
63
|
-
<tr>
|
|
64
|
-
<th>With slots</th>
|
|
65
|
-
<td class="w-100">
|
|
66
|
-
<Tabs v-model="activeTab">
|
|
67
|
-
<template #start>
|
|
68
|
-
<Button>
|
|
69
|
-
<template #start>
|
|
70
|
-
<Icon icon="ph:sidebar" />
|
|
71
|
-
</template>
|
|
72
|
-
Sidebar
|
|
73
|
-
</Button>
|
|
74
|
-
</template>
|
|
75
|
-
<Tab value="Home" />
|
|
76
|
-
<Tab value="About" />
|
|
77
|
-
<Tab value="You" />
|
|
78
|
-
</Tabs>
|
|
79
|
-
|
|
80
|
-
<div class="mb-xl" />
|
|
81
|
-
|
|
82
|
-
<Tabs v-model="activeTab" variant="filled">
|
|
83
|
-
<Tab value="Home" />
|
|
84
|
-
<Tab value="About" />
|
|
85
|
-
<Tab value="You" />
|
|
86
|
-
|
|
87
|
-
<template #end>
|
|
88
|
-
<Button icon="ph:x" plain />
|
|
89
|
-
</template>
|
|
90
|
-
</Tabs>
|
|
91
|
-
</td>
|
|
92
|
-
</tr>
|
|
93
|
-
<tr>
|
|
94
|
-
<th>With slots expanded</th>
|
|
95
|
-
<td class="w-100">
|
|
96
|
-
<Tabs v-model="activeTab" expand>
|
|
97
|
-
<template #start>
|
|
98
|
-
<Button>
|
|
99
|
-
<template #start>
|
|
100
|
-
<Icon icon="ph:sidebar" />
|
|
101
|
-
</template>
|
|
102
|
-
Sidebar
|
|
103
|
-
</Button>
|
|
104
|
-
</template>
|
|
105
|
-
<Tab value="Home" />
|
|
106
|
-
<Tab value="About" />
|
|
107
|
-
<Tab value="You" />
|
|
108
|
-
</Tabs>
|
|
109
|
-
|
|
110
|
-
<div class="mb-xl" />
|
|
111
|
-
|
|
112
|
-
<Tabs v-model="activeTab" expand variant="filled">
|
|
113
|
-
<Tab value="Home" />
|
|
114
|
-
<Tab value="About" />
|
|
115
|
-
<Tab value="You" />
|
|
116
|
-
|
|
117
|
-
<template #end>
|
|
118
|
-
<Button icon="ph:x" plain />
|
|
119
|
-
</template>
|
|
120
|
-
</Tabs>
|
|
121
|
-
</td>
|
|
122
|
-
</tr>
|
|
123
|
-
<tr>
|
|
124
|
-
<th>Dynamic</th>
|
|
125
|
-
<td>
|
|
126
|
-
<Flex>
|
|
127
|
-
<Button @click="dynamicTabs.push(`Tab ${dynamicTabs.length}`)">
|
|
128
|
-
Add
|
|
129
|
-
</Button>
|
|
130
|
-
<Button @click="dynamicTabs.shift()">
|
|
131
|
-
Remove
|
|
132
|
-
</Button>
|
|
133
|
-
</Flex>
|
|
134
|
-
<Tabs v-model="activeDynamic">
|
|
135
|
-
<Tab v-for="tab in dynamicTabs" :key="tab" :value="tab" />
|
|
136
|
-
</Tabs>
|
|
137
|
-
</td>
|
|
138
|
-
</tr>
|
|
139
|
-
</tbody>
|
|
140
|
-
</table>
|
|
141
|
-
</div>
|
|
142
|
-
</template>
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { defineComponent, h, markRaw } from 'vue'
|
|
3
|
-
import Button from '../components/Button/Button.vue'
|
|
4
|
-
import { pushToast, removeToast } from '../components/Toast/toast'
|
|
5
|
-
import Toasts from '../components/Toast/Toasts.vue'
|
|
6
|
-
|
|
7
|
-
const testBody = markRaw(defineComponent((props) => {
|
|
8
|
-
return () => h('h2', `${props.data.title} ${props.toastId}`)
|
|
9
|
-
}, {
|
|
10
|
-
props: {
|
|
11
|
-
data: Object,
|
|
12
|
-
toastId: Number,
|
|
13
|
-
},
|
|
14
|
-
}))
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<div class="mb-xxl">
|
|
19
|
-
<h3 class="mb-l">
|
|
20
|
-
Toasts
|
|
21
|
-
</h3>
|
|
22
|
-
|
|
23
|
-
<table>
|
|
24
|
-
<tbody>
|
|
25
|
-
<tr>
|
|
26
|
-
<th>Base</th>
|
|
27
|
-
<td>
|
|
28
|
-
<Button @click="pushToast('Hello')">
|
|
29
|
-
Push toast
|
|
30
|
-
</Button>
|
|
31
|
-
</td>
|
|
32
|
-
</tr>
|
|
33
|
-
<tr>
|
|
34
|
-
<th>+ Description</th>
|
|
35
|
-
<td>
|
|
36
|
-
<Button @click="pushToast('Hello', { description: 'Lorem ipsum dolor sit amet and others stuff but I never learned it past that.' })">
|
|
37
|
-
Push toast
|
|
38
|
-
</Button>
|
|
39
|
-
</td>
|
|
40
|
-
</tr>
|
|
41
|
-
<tr>
|
|
42
|
-
<th>+ Action</th>
|
|
43
|
-
<td>
|
|
44
|
-
<Button
|
|
45
|
-
@click="pushToast('Hello', {
|
|
46
|
-
action: {
|
|
47
|
-
label: 'Close',
|
|
48
|
-
handler: (id) => {
|
|
49
|
-
removeToast(id)
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
})"
|
|
53
|
-
>
|
|
54
|
-
Push toast
|
|
55
|
-
</Button>
|
|
56
|
-
</td>
|
|
57
|
-
</tr>
|
|
58
|
-
<tr>
|
|
59
|
-
<th>+ persist</th>
|
|
60
|
-
<td>
|
|
61
|
-
<Button
|
|
62
|
-
@click="pushToast('Read the description!!', {
|
|
63
|
-
description: 'So when you add an action, the handler exposes the ID of the toast. And you can then manually remove it. This toast will also stay up until you close it. It persists!!',
|
|
64
|
-
action: {
|
|
65
|
-
label: 'Close',
|
|
66
|
-
handler: (id) => {
|
|
67
|
-
removeToast(id)
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
persist: true,
|
|
71
|
-
})"
|
|
72
|
-
>
|
|
73
|
-
Push toast
|
|
74
|
-
</Button>
|
|
75
|
-
</td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<th>Custom body</th>
|
|
79
|
-
<td>
|
|
80
|
-
<Button
|
|
81
|
-
@click="pushToast('uhhh', {
|
|
82
|
-
bodyProps: {
|
|
83
|
-
title: 'Bro im a custom component and my id is',
|
|
84
|
-
},
|
|
85
|
-
body: testBody,
|
|
86
|
-
})"
|
|
87
|
-
>
|
|
88
|
-
Push toast
|
|
89
|
-
</Button>
|
|
90
|
-
</td>
|
|
91
|
-
</tr>
|
|
92
|
-
</tbody>
|
|
93
|
-
</table>
|
|
94
|
-
<Toasts />
|
|
95
|
-
</div>
|
|
96
|
-
</template>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import Flex from '../components/Flex/Flex.vue'
|
|
3
|
-
import Tooltip from '../components/Tooltip/Tooltip.vue'
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<div class="mb-xxl">
|
|
8
|
-
<h3 class="mb-l">
|
|
9
|
-
Tooltips
|
|
10
|
-
</h3>
|
|
11
|
-
|
|
12
|
-
<table>
|
|
13
|
-
<tbody>
|
|
14
|
-
<tr>
|
|
15
|
-
<th>Base</th>
|
|
16
|
-
<td>
|
|
17
|
-
<Tooltip>
|
|
18
|
-
<span>Hover me</span>
|
|
19
|
-
<template #tooltip>
|
|
20
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam minus labore commodi aliquid molestiae non voluptas, veritatis nesciunt. Nihil quod necessitatibus veritatis nam enim eius deleniti unde recusandae reprehenderit voluptate?</p>
|
|
21
|
-
</template>
|
|
22
|
-
</Tooltip>
|
|
23
|
-
</td>
|
|
24
|
-
</tr>
|
|
25
|
-
<tr>
|
|
26
|
-
<th>Hover delay</th>
|
|
27
|
-
<td>
|
|
28
|
-
<Tooltip :delay="500">
|
|
29
|
-
<span>Hover me</span>
|
|
30
|
-
<template #tooltip>
|
|
31
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
|
|
32
|
-
</template>
|
|
33
|
-
</Tooltip>
|
|
34
|
-
</td>
|
|
35
|
-
</tr>
|
|
36
|
-
<tr>
|
|
37
|
-
<th>Custom placement</th>
|
|
38
|
-
<td>
|
|
39
|
-
<Flex>
|
|
40
|
-
<Tooltip placement="top">
|
|
41
|
-
<span>Above</span>
|
|
42
|
-
<template #tooltip>
|
|
43
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
|
|
44
|
-
</template>
|
|
45
|
-
</Tooltip>
|
|
46
|
-
<Tooltip placement="right">
|
|
47
|
-
<span>Right</span>
|
|
48
|
-
<template #tooltip>
|
|
49
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
|
|
50
|
-
</template>
|
|
51
|
-
</Tooltip>
|
|
52
|
-
<Tooltip placement="left">
|
|
53
|
-
<span>Left</span>
|
|
54
|
-
<template #tooltip>
|
|
55
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
|
|
56
|
-
</template>
|
|
57
|
-
</Tooltip>
|
|
58
|
-
<Tooltip placement="bottom">
|
|
59
|
-
<span>Bottom</span>
|
|
60
|
-
<template #tooltip>
|
|
61
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
|
|
62
|
-
</template>
|
|
63
|
-
</Tooltip>
|
|
64
|
-
</Flex>
|
|
65
|
-
</td>
|
|
66
|
-
</tr>
|
|
67
|
-
</tbody>
|
|
68
|
-
</table>
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import Grid from '../../components/Grid/Grid.vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
name: string
|
|
6
|
-
color: string
|
|
7
|
-
}>()
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<Grid columns="212px 32px" y-center>
|
|
12
|
-
<span>{{ props.name }}</span>
|
|
13
|
-
<div
|
|
14
|
-
class="cube" :style="{
|
|
15
|
-
backgroundColor: `var(${props.color})`,
|
|
16
|
-
}"
|
|
17
|
-
/>
|
|
18
|
-
</Grid>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<style scoped>
|
|
22
|
-
.cube {
|
|
23
|
-
display: block;
|
|
24
|
-
width: 32px;
|
|
25
|
-
height: 32px;
|
|
26
|
-
border-radius: var(--border-radius-xs);
|
|
27
|
-
}
|
|
28
|
-
</style>
|