@dolanske/vui 1.0.3 → 1.1.0
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/LICENSE +673 -673
- package/README.md +42 -42
- package/dist/components/Accordion/Accordion.vue.d.ts +3 -2
- package/dist/components/Accordion/AccordionGroup.vue.d.ts +5 -2
- package/dist/components/Alert/Alert.vue.d.ts +3 -2
- package/dist/components/Avatar/Avatar.vue.d.ts +3 -2
- package/dist/components/Badge/Badge.vue.d.ts +3 -2
- package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +3 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +3 -2
- package/dist/components/Button/Button.vue.d.ts +3 -2
- package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +3 -2
- package/dist/components/Calendar/Calendar.vue.d.ts +6 -6
- package/dist/components/Card/Card.vue.d.ts +4 -3
- package/dist/components/Checkbox/Checkbox.vue.d.ts +7 -6
- package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +2 -1
- package/dist/components/Divider/Divider.vue.d.ts +3 -2
- package/dist/components/Drawer/Drawer.vue.d.ts +10 -9
- package/dist/components/Dropdown/Dropdown.vue.d.ts +66 -3
- package/dist/components/Dropdown/DropdownItem.vue.d.ts +3 -2
- package/dist/components/Dropdown/DropdownTitle.vue.d.ts +6 -6
- package/dist/components/Flex/Flex.vue.d.ts +13 -12
- package/dist/components/Grid/Grid.vue.d.ts +7 -6
- package/dist/components/Input/Color.vue.d.ts +5 -5
- package/dist/components/Input/Counter.vue.d.ts +5 -5
- package/dist/components/Input/Dropzone.vue.d.ts +95 -10
- package/dist/components/Input/File.vue.d.ts +4 -3
- package/dist/components/Input/Input.vue.d.ts +7 -6
- package/dist/components/Input/Password.vue.d.ts +1 -1
- package/dist/components/Input/Textarea.vue.d.ts +7 -6
- package/dist/components/Kbd/Kbd.vue.d.ts +1 -1
- package/dist/components/Kbd/KbdGroup.vue.d.ts +2 -1
- package/dist/components/Modal/Confirm.vue.d.ts +7 -9
- package/dist/components/Modal/Modal.vue.d.ts +16 -13
- package/dist/components/OTP/OTP.vue.d.ts +7 -6
- package/dist/components/OTP/OTPItem.vue.d.ts +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts +3 -2
- package/dist/components/Popout/Popout.vue.d.ts +3 -2
- package/dist/components/Progress/Progress.vue.d.ts +5 -5
- package/dist/components/Radio/Radio.vue.d.ts +7 -6
- package/dist/components/Radio/RadioGroup.vue.d.ts +7 -6
- package/dist/components/Select/Select.vue.d.ts +4 -8
- package/dist/components/Sheet/Sheet.vue.d.ts +22 -13
- package/dist/components/Sidebar/Sidebar.vue.d.ts +7 -6
- package/dist/components/Skeleton/Skeleton.vue.d.ts +1 -1
- package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +7 -6
- package/dist/components/Table/Cell.vue.d.ts +5 -2
- package/dist/components/Table/Head.vue.d.ts +3 -2
- package/dist/components/Table/Root.vue.d.ts +3 -2
- package/dist/components/Table/table.d.ts +2 -2
- package/dist/components/Tabs/Tab.vue.d.ts +3 -2
- package/dist/components/Tabs/Tabs.vue.d.ts +7 -6
- package/dist/components/Toast/toast.d.ts +6 -6
- package/dist/components/Tooltip/Tooltip.vue.d.ts +2 -1
- package/dist/internal/Backdrop/Backdrop.vue.d.ts +3 -2
- package/dist/vui.css +1 -0
- package/dist/vui.js +8090 -7884
- package/package.json +73 -72
- package/src/App.vue +95 -95
- package/src/components/Accordion/Accordion.vue +91 -91
- package/src/components/Accordion/AccordionGroup.vue +43 -43
- package/src/components/Accordion/accordion.scss +82 -82
- package/src/components/Alert/Alert.vue +59 -59
- package/src/components/Alert/alert.scss +161 -161
- package/src/components/Avatar/Avatar.vue +53 -53
- package/src/components/Avatar/avatar.scss +52 -52
- package/src/components/Badge/Badge.vue +21 -21
- package/src/components/Badge/badge.scss +210 -206
- package/src/components/Breadcrumbs/BreadcrumbItem.vue +26 -26
- package/src/components/Breadcrumbs/Breadcrumbs.vue +30 -30
- package/src/components/Breadcrumbs/breadcrumbs.scss +31 -31
- package/src/components/Button/Button.vue +85 -85
- package/src/components/Button/button.scss +279 -279
- package/src/components/ButtonGroup/ButtonGroup.vue +28 -28
- package/src/components/ButtonGroup/button-group.scss +51 -51
- package/src/components/Calendar/Calendar.vue +66 -66
- package/src/components/Calendar/calendar.scss +83 -83
- package/src/components/Card/Card.vue +48 -48
- package/src/components/Card/card.scss +53 -53
- package/src/components/Checkbox/Checkbox.vue +54 -54
- package/src/components/Checkbox/checkbox.scss +80 -80
- package/src/components/CopyClipboard/CopyClipboard.vue +91 -91
- package/src/components/CopyClipboard/copy-clipboard.scss +25 -25
- package/src/components/Divider/Divider.vue +44 -44
- package/src/components/Divider/divider.scss +35 -35
- package/src/components/Drawer/Drawer.vue +102 -97
- package/src/components/Drawer/drawer.scss +37 -37
- package/src/components/Dropdown/Dropdown.vue +135 -135
- package/src/components/Dropdown/DropdownItem.vue +33 -33
- package/src/components/Dropdown/DropdownTitle.vue +14 -14
- package/src/components/Dropdown/dropdown-item.scss +84 -84
- package/src/components/Dropdown/dropdown.scss +53 -53
- package/src/components/Flex/Flex.vue +113 -113
- package/src/components/Grid/Grid.vue +79 -80
- package/src/components/Input/Color.vue +26 -26
- package/src/components/Input/Counter.vue +66 -66
- package/src/components/Input/Dropzone.vue +65 -65
- package/src/components/Input/File.vue +15 -15
- package/src/components/Input/Input.vue +123 -123
- package/src/components/Input/Password.vue +35 -35
- package/src/components/Input/Textarea.vue +78 -78
- package/src/components/Input/input.scss +302 -302
- package/src/components/Kbd/Kbd.vue +48 -48
- package/src/components/Kbd/KbdGroup.vue +27 -27
- package/src/components/Kbd/kbd.scss +19 -19
- package/src/components/Modal/Confirm.vue +56 -56
- package/src/components/Modal/Modal.vue +103 -99
- package/src/components/Modal/modal.scss +54 -54
- package/src/components/OTP/OTP.vue +133 -133
- package/src/components/OTP/OTPItem.vue +37 -37
- package/src/components/OTP/otp.scss +84 -84
- package/src/components/Pagination/Pagination.vue +77 -77
- package/src/components/Pagination/pagination.ts +78 -78
- package/src/components/Popout/Popout.vue +52 -52
- package/src/components/Popout/popout.scss +15 -15
- package/src/components/Progress/Progress.vue +103 -103
- package/src/components/Progress/progress.scss +47 -47
- package/src/components/Radio/Radio.vue +38 -38
- package/src/components/Radio/RadioGroup.vue +40 -40
- package/src/components/Radio/radio.scss +78 -78
- package/src/components/Select/Select.vue +211 -211
- package/src/components/Select/select.scss +77 -77
- package/src/components/Sheet/Sheet.vue +108 -98
- package/src/components/Sheet/sheet.scss +69 -69
- package/src/components/Sidebar/Sidebar.vue +115 -115
- package/src/components/Sidebar/sidebar.scss +124 -124
- package/src/components/Skeleton/Skeleton.vue +43 -43
- package/src/components/Skeleton/skeleton.scss +14 -14
- package/src/components/Spinner/Spinner.vue +42 -42
- package/src/components/Spinner/spinner.scss +47 -47
- package/src/components/Switch/Switch.vue +31 -31
- package/src/components/Switch/switch.scss +93 -93
- package/src/components/Table/Cell.vue +23 -23
- package/src/components/Table/Head.vue +59 -59
- package/src/components/Table/Root.vue +66 -66
- package/src/components/Table/SelectAll.vue +23 -23
- package/src/components/Table/SelectRow.vue +30 -30
- package/src/components/Table/index.ts +7 -7
- package/src/components/Table/table.scss +154 -154
- package/src/components/Table/table.ts +248 -248
- package/src/components/Tabs/Tab.vue +25 -25
- package/src/components/Tabs/Tabs.vue +90 -90
- package/src/components/Tabs/tabs.scss +87 -87
- package/src/components/Toast/Toasts.vue +52 -52
- package/src/components/Toast/toast.scss +45 -45
- package/src/components/Toast/toast.ts +75 -75
- package/src/components/Tooltip/Tooltip.vue +86 -86
- package/src/components/Tooltip/tooltip.scss +8 -8
- package/src/examples/ExampleAccordions.vue +58 -58
- package/src/examples/ExampleAlerts.vue +78 -78
- package/src/examples/ExampleAvatars.vue +44 -44
- package/src/examples/ExampleBadges.vue +48 -48
- package/src/examples/ExampleBreadcrumbs.vue +46 -46
- package/src/examples/ExampleButtons.vue +140 -140
- package/src/examples/ExampleCalendars.vue +40 -40
- package/src/examples/ExampleCards.vue +94 -94
- package/src/examples/ExampleCheckboxes.vue +123 -123
- package/src/examples/ExampleCopyClipboard.vue +47 -47
- package/src/examples/ExampleDividers.vue +39 -39
- package/src/examples/ExampleDrawers.vue +67 -67
- package/src/examples/ExampleDropdowns.vue +114 -114
- package/src/examples/ExampleFlexGrid.vue +124 -122
- package/src/examples/ExampleInputs.vue +234 -234
- package/src/examples/ExampleKBD.vue +65 -65
- package/src/examples/ExampleModals.vue +143 -143
- package/src/examples/ExamplePalette.vue +159 -159
- package/src/examples/ExamplePopouts.vue +41 -41
- package/src/examples/ExampleSheets.vue +77 -77
- package/src/examples/ExampleSidebars.vue +270 -270
- package/src/examples/ExampleSkeletons.vue +26 -26
- package/src/examples/ExampleSpinners.vue +80 -78
- package/src/examples/ExampleTables.vue +195 -195
- package/src/examples/ExampleTabs.vue +119 -119
- package/src/examples/ExampleToasts.vue +96 -96
- package/src/examples/ExampleTooltips.vue +70 -70
- package/src/examples/shared/ExampleColor.vue +28 -28
- package/src/index.ts +116 -116
- package/src/internal/Backdrop/Backdrop.vue +22 -22
- package/src/internal/Backdrop/backdrop.scss +34 -34
- package/src/main.ts +5 -5
- package/src/shared/helpers.ts +117 -117
- package/src/shared/theme.ts +22 -22
- package/src/shared/types.ts +29 -29
- package/src/style/animation.scss +22 -22
- package/src/style/core.scss +119 -125
- package/src/style/layout.scss +207 -233
- package/src/style/media-query.scss +29 -29
- package/src/style/reset.scss +135 -135
- package/src/style/text.scss +137 -124
- package/src/style/theme.scss +195 -195
- package/src/style/tooltip.scss +146 -146
- package/src/style/typography.scss +415 -415
- package/src/style/utils.scss +36 -36
- package/src/{index.scss → style.scss} +1 -1
- package/dist/style.css +0 -1
|
@@ -1,67 +1,67 @@
|
|
|
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 Drawer from '../components/Drawer/Drawer.vue'
|
|
6
|
-
import Flex from '../components/Flex/Flex.vue'
|
|
7
|
-
|
|
8
|
-
const open = ref(false)
|
|
9
|
-
const open2 = ref(false)
|
|
10
|
-
|
|
11
|
-
const size = ref<Sizes | 'full'>('s')
|
|
12
|
-
function setSize(s: any) {
|
|
13
|
-
size.value = s
|
|
14
|
-
open.value = true
|
|
15
|
-
}
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div class="mb-xxl">
|
|
20
|
-
<h3 class="mb-l">
|
|
21
|
-
Drawers
|
|
22
|
-
</h3>
|
|
23
|
-
|
|
24
|
-
<table>
|
|
25
|
-
<tbody>
|
|
26
|
-
<tr>
|
|
27
|
-
<th>Base</th>
|
|
28
|
-
<td>
|
|
29
|
-
<Flex>
|
|
30
|
-
<Button square @click="setSize('s')">
|
|
31
|
-
S
|
|
32
|
-
</Button>
|
|
33
|
-
<Button square @click="setSize('m')">
|
|
34
|
-
M
|
|
35
|
-
</Button>
|
|
36
|
-
<Button square @click="setSize('l')">
|
|
37
|
-
L
|
|
38
|
-
</Button>
|
|
39
|
-
<Button square @click="setSize('xl')">
|
|
40
|
-
XL
|
|
41
|
-
</Button>
|
|
42
|
-
<Button square @click="setSize('full')">
|
|
43
|
-
Full
|
|
44
|
-
</Button>
|
|
45
|
-
</Flex>
|
|
46
|
-
<Drawer
|
|
47
|
-
<h2>Hello</h2>
|
|
48
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta cupiditate laudantium maiores? Nesciunt harum doloribus accusantium architecto, quod rem porro iusto, quia dicta ex sapiente nulla earum voluptatibus, dolor veritatis?</p>
|
|
49
|
-
</Drawer>
|
|
50
|
-
</td>
|
|
51
|
-
</tr>
|
|
52
|
-
<tr>
|
|
53
|
-
<th>With animation + no handle</th>
|
|
54
|
-
<td>
|
|
55
|
-
<Button @click="open2 = !open2">
|
|
56
|
-
Open
|
|
57
|
-
</Button>
|
|
58
|
-
<Drawer
|
|
59
|
-
<h2>Hello</h2>
|
|
60
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta cupiditate laudantium maiores? Nesciunt harum doloribus accusantium architecto, quod rem porro iusto, quia dicta ex sapiente nulla earum voluptatibus, dolor veritatis?</p>
|
|
61
|
-
</Drawer>
|
|
62
|
-
</td>
|
|
63
|
-
</tr>
|
|
64
|
-
</tbody>
|
|
65
|
-
</table>
|
|
66
|
-
</div>
|
|
67
|
-
</template>
|
|
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 Drawer from '../components/Drawer/Drawer.vue'
|
|
6
|
+
import Flex from '../components/Flex/Flex.vue'
|
|
7
|
+
|
|
8
|
+
const open = ref(false)
|
|
9
|
+
const open2 = ref(false)
|
|
10
|
+
|
|
11
|
+
const size = ref<Sizes | 'full'>('s')
|
|
12
|
+
function setSize(s: any) {
|
|
13
|
+
size.value = s
|
|
14
|
+
open.value = true
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="mb-xxl">
|
|
20
|
+
<h3 class="mb-l">
|
|
21
|
+
Drawers
|
|
22
|
+
</h3>
|
|
23
|
+
|
|
24
|
+
<table>
|
|
25
|
+
<tbody>
|
|
26
|
+
<tr>
|
|
27
|
+
<th>Base</th>
|
|
28
|
+
<td>
|
|
29
|
+
<Flex>
|
|
30
|
+
<Button square @click="setSize('s')">
|
|
31
|
+
S
|
|
32
|
+
</Button>
|
|
33
|
+
<Button square @click="setSize('m')">
|
|
34
|
+
M
|
|
35
|
+
</Button>
|
|
36
|
+
<Button square @click="setSize('l')">
|
|
37
|
+
L
|
|
38
|
+
</Button>
|
|
39
|
+
<Button square @click="setSize('xl')">
|
|
40
|
+
XL
|
|
41
|
+
</Button>
|
|
42
|
+
<Button square @click="setSize('full')">
|
|
43
|
+
Full
|
|
44
|
+
</Button>
|
|
45
|
+
</Flex>
|
|
46
|
+
<Drawer :open title="Hello" :container-size="size" @close="open = false">
|
|
47
|
+
<h2>Hello</h2>
|
|
48
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta cupiditate laudantium maiores? Nesciunt harum doloribus accusantium architecto, quod rem porro iusto, quia dicta ex sapiente nulla earum voluptatibus, dolor veritatis?</p>
|
|
49
|
+
</Drawer>
|
|
50
|
+
</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<th>With animation + no handle</th>
|
|
54
|
+
<td>
|
|
55
|
+
<Button @click="open2 = !open2">
|
|
56
|
+
Open
|
|
57
|
+
</Button>
|
|
58
|
+
<Drawer :open="open2" :handle="false" title="Hello" :container-size="size" @close="open2 = false">
|
|
59
|
+
<h2>Hello</h2>
|
|
60
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta cupiditate laudantium maiores? Nesciunt harum doloribus accusantium architecto, quod rem porro iusto, quia dicta ex sapiente nulla earum voluptatibus, dolor veritatis?</p>
|
|
61
|
+
</Drawer>
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
</tbody>
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
@@ -1,114 +1,114 @@
|
|
|
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
|
+
<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,122 +1,124 @@
|
|
|
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>justify-start</code><code>justify-end</code><code>justify-center</code>
|
|
63
|
-
<code>space-between</code><code>space-around</code><code>space-evenly</code>
|
|
64
|
-
</Flex>
|
|
65
|
-
</td>
|
|
66
|
-
</tr>
|
|
67
|
-
<tr>
|
|
68
|
-
<th>Align props</th>
|
|
69
|
-
<td>
|
|
70
|
-
<Flex>
|
|
71
|
-
<code>align-start</code><code>align-end</code><code>
|
|
72
|
-
<code>align-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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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>justify-start</code><code>justify-end</code><code>justify-center</code>
|
|
63
|
+
<code>space-between</code><code>space-around</code><code>space-evenly</code>
|
|
64
|
+
</Flex>
|
|
65
|
+
</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<th>Align props</th>
|
|
69
|
+
<td>
|
|
70
|
+
<Flex>
|
|
71
|
+
<code>align-start</code><code>align-end</code><code>y-center</code>
|
|
72
|
+
<code>align-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>
|