@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,77 +1,77 @@
|
|
|
1
|
-
.vui-input-container {
|
|
2
|
-
&.vui-select {
|
|
3
|
-
width: auto;
|
|
4
|
-
|
|
5
|
-
&.expand {
|
|
6
|
-
.vui-dropdown-trigger-wrap,
|
|
7
|
-
.vui-dropdown-trigger-content {
|
|
8
|
-
width: 100%;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.disabled {
|
|
13
|
-
.vui-input-style {
|
|
14
|
-
cursor: not-allowed;
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
border-color: var(--color-border);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.vui-select-trigger-container {
|
|
23
|
-
&.has-value span {
|
|
24
|
-
color: var(--color-text);
|
|
25
|
-
font-weight: var(--font-weight-medium);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
span {
|
|
29
|
-
white-space: nowrap;
|
|
30
|
-
text-overflow: ellipsis;
|
|
31
|
-
overflow-x: hidden;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.vue-select-no-results {
|
|
36
|
-
text-align: center;
|
|
37
|
-
padding-block: var(--space-xs);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.vui-input-style {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: space-between;
|
|
44
|
-
gap: var(--space-s);
|
|
45
|
-
|
|
46
|
-
& > button {
|
|
47
|
-
margin-right: -6px;
|
|
48
|
-
|
|
49
|
-
.vui-button-slot svg {
|
|
50
|
-
color: var(--color-text-light);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:hover {
|
|
55
|
-
border-color: var(--color-border-strong);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
select {
|
|
62
|
-
display: block;
|
|
63
|
-
height: var(--interactive-el-height);
|
|
64
|
-
line-height: var(--interactive-el-height);
|
|
65
|
-
background-color: var(--color-bg);
|
|
66
|
-
border: 1px solid var(--color-border);
|
|
67
|
-
border-radius: var(--border-radius-s);
|
|
68
|
-
padding-inline: var(--space-xs);
|
|
69
|
-
transition: var(--transition-fast);
|
|
70
|
-
z-index: 1;
|
|
71
|
-
font-size: var(--font-size-m);
|
|
72
|
-
color: var(--color-text);
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
border-color: var(--color-border-strong);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
.vui-input-container {
|
|
2
|
+
&.vui-select {
|
|
3
|
+
width: auto;
|
|
4
|
+
|
|
5
|
+
&.expand {
|
|
6
|
+
.vui-dropdown-trigger-wrap,
|
|
7
|
+
.vui-dropdown-trigger-content {
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.disabled {
|
|
13
|
+
.vui-input-style {
|
|
14
|
+
cursor: not-allowed;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
border-color: var(--color-border);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.vui-select-trigger-container {
|
|
23
|
+
&.has-value span {
|
|
24
|
+
color: var(--color-text);
|
|
25
|
+
font-weight: var(--font-weight-medium);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
span {
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
overflow-x: hidden;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.vue-select-no-results {
|
|
36
|
+
text-align: center;
|
|
37
|
+
padding-block: var(--space-xs);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.vui-input-style {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
gap: var(--space-s);
|
|
45
|
+
|
|
46
|
+
& > button {
|
|
47
|
+
margin-right: -6px;
|
|
48
|
+
|
|
49
|
+
.vui-button-slot svg {
|
|
50
|
+
color: var(--color-text-light);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
border-color: var(--color-border-strong);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
select {
|
|
62
|
+
display: block;
|
|
63
|
+
height: var(--interactive-el-height);
|
|
64
|
+
line-height: var(--interactive-el-height);
|
|
65
|
+
background-color: var(--color-bg);
|
|
66
|
+
border: 1px solid var(--color-border);
|
|
67
|
+
border-radius: var(--border-radius-s);
|
|
68
|
+
padding-inline: var(--space-xs);
|
|
69
|
+
transition: var(--transition-fast);
|
|
70
|
+
z-index: 1;
|
|
71
|
+
font-size: var(--font-size-m);
|
|
72
|
+
color: var(--color-text);
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
border-color: var(--color-border-strong);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,98 +1,108 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import Backdrop from '../../internal/Backdrop/Backdrop.vue'
|
|
4
|
-
import { formatUnitValue } from '../../shared/helpers'
|
|
5
|
-
import Button from '../Button/Button.vue'
|
|
6
|
-
import Divider from '../Divider/Divider.vue'
|
|
7
|
-
import './sheet.scss'
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.sheet-enter-
|
|
94
|
-
.sheet-leave-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import Backdrop from '../../internal/Backdrop/Backdrop.vue'
|
|
4
|
+
import { formatUnitValue } from '../../shared/helpers'
|
|
5
|
+
import Button from '../Button/Button.vue'
|
|
6
|
+
import Divider from '../Divider/Divider.vue'
|
|
7
|
+
import './sheet.scss'
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
/**
|
|
11
|
+
* Controls the visibility of the sheet
|
|
12
|
+
*/
|
|
13
|
+
open?: boolean
|
|
14
|
+
/**
|
|
15
|
+
* Controls the position of the sheet
|
|
16
|
+
*/
|
|
17
|
+
position?: 'left' | 'right' | 'top' | 'bottom'
|
|
18
|
+
/**
|
|
19
|
+
* Sets the width of the sheet
|
|
20
|
+
*/
|
|
21
|
+
size?: number | string
|
|
22
|
+
/**
|
|
23
|
+
* Wether to show a divider between header and content
|
|
24
|
+
*/
|
|
25
|
+
separator?: boolean
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
position = 'right',
|
|
30
|
+
size = 398,
|
|
31
|
+
separator,
|
|
32
|
+
open = false,
|
|
33
|
+
} = defineProps<Props>()
|
|
34
|
+
|
|
35
|
+
const emit = defineEmits<{ close: [] }>()
|
|
36
|
+
|
|
37
|
+
const TRANSITION_OFFSET = 16
|
|
38
|
+
|
|
39
|
+
const style = computed(() => {
|
|
40
|
+
if (position === 'left' || position === 'right') {
|
|
41
|
+
return { width: formatUnitValue(size) }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return undefined
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
// Used to compute base location so that sheet appears to animate form the edge of the screen
|
|
48
|
+
const baseTransform = computed(() => {
|
|
49
|
+
switch (position) {
|
|
50
|
+
case 'left': return `translate(-${TRANSITION_OFFSET}px, 0)`
|
|
51
|
+
case 'top': return `translate(0, -${TRANSITION_OFFSET}px)`
|
|
52
|
+
case 'bottom': return `translate(0, ${TRANSITION_OFFSET}px)`
|
|
53
|
+
case 'right':
|
|
54
|
+
default: return `translate(${TRANSITION_OFFSET}px, 0)`
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<Teleport to="body">
|
|
61
|
+
<Transition appear name="sheet">
|
|
62
|
+
<Backdrop v-if="open" @close="emit('close')">
|
|
63
|
+
<div v-if="open" class="vui-sheet" :class="[`vui-sheet-position-${position}`]" :style>
|
|
64
|
+
<div class="vui-sheet-header">
|
|
65
|
+
<div class="flex-1">
|
|
66
|
+
<slot name="header" :close="() => emit('close')" />
|
|
67
|
+
</div>
|
|
68
|
+
<Button plain square icon="ph:x" @click="emit('close')" />
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<Divider v-if="separator && $slots.header" :size="1" />
|
|
72
|
+
|
|
73
|
+
<div v-if="$slots.default" class="vui-sheet-content">
|
|
74
|
+
<slot :close="() => emit('close')" />
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<Divider v-if="separator && $slots.footer" :size="1" />
|
|
78
|
+
|
|
79
|
+
<div class="vui-sheet-footer">
|
|
80
|
+
<slot name="footer" :close="() => emit('close')" />
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</Backdrop>
|
|
84
|
+
</Transition>
|
|
85
|
+
</Teleport>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<style scoped lang="scss">
|
|
89
|
+
.vui-backdrop {
|
|
90
|
+
padding: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.sheet-enter-active,
|
|
94
|
+
.sheet-leave-active {
|
|
95
|
+
transition: var(--transition);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.sheet-enter-to,
|
|
99
|
+
.sheet-leave-from {
|
|
100
|
+
transform: translate(0, 0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.sheet-enter-from,
|
|
104
|
+
.sheet-leave-to {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
transform: v-bind(baseTransform);
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
.vui-sheet {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
position: absolute;
|
|
5
|
-
background-color: var(--color-bg);
|
|
6
|
-
border-color: var(--color-border);
|
|
7
|
-
height: 100dvh;
|
|
8
|
-
|
|
9
|
-
&.vui-sheet-position-top {
|
|
10
|
-
top: 0;
|
|
11
|
-
border-bottom: 1px solid var(--color-border);
|
|
12
|
-
height: auto;
|
|
13
|
-
border-bottom-right-radius: var(--border-radius-l);
|
|
14
|
-
border-bottom-left-radius: var(--border-radius-l);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&.vui-sheet-position-bottom {
|
|
18
|
-
bottom: 0;
|
|
19
|
-
border-top: 1px solid var(--color-border);
|
|
20
|
-
height: auto;
|
|
21
|
-
border-top-right-radius: var(--border-radius-l);
|
|
22
|
-
border-top-left-radius: var(--border-radius-l);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.vui-sheet-position-right {
|
|
26
|
-
right: 0;
|
|
27
|
-
top: 0;
|
|
28
|
-
border-left: 1px solid var(--color-border);
|
|
29
|
-
border-top-left-radius: var(--border-radius-l);
|
|
30
|
-
border-bottom-left-radius: var(--border-radius-l);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.vui-sheet-position-left {
|
|
34
|
-
left: 0;
|
|
35
|
-
top: 0;
|
|
36
|
-
border-right: 1px solid var(--color-border);
|
|
37
|
-
border-top-right-radius: var(--border-radius-l);
|
|
38
|
-
border-bottom-right-radius: var(--border-radius-l);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.vui-sheet-position-top,
|
|
42
|
-
&.vui-sheet-position-bottom {
|
|
43
|
-
max-height: 35dvh;
|
|
44
|
-
width: 100%;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.vui-sheet-footer,
|
|
48
|
-
.vui-sheet-header,
|
|
49
|
-
.vui-sheet-content {
|
|
50
|
-
width: 100%;
|
|
51
|
-
padding: var(--space-m);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.vui-sheet-content {
|
|
55
|
-
flex: 1 1 0%;
|
|
56
|
-
overflow-y: auto;
|
|
57
|
-
height: 100%;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.vui-sheet-header {
|
|
61
|
-
display: flex;
|
|
62
|
-
gap: var(--space-m);
|
|
63
|
-
align-self: flex-start;
|
|
64
|
-
|
|
65
|
-
& + .vui-sheet-content {
|
|
66
|
-
padding-top: var(--space-s);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
.vui-sheet {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
position: absolute;
|
|
5
|
+
background-color: var(--color-bg);
|
|
6
|
+
border-color: var(--color-border);
|
|
7
|
+
height: 100dvh;
|
|
8
|
+
|
|
9
|
+
&.vui-sheet-position-top {
|
|
10
|
+
top: 0;
|
|
11
|
+
border-bottom: 1px solid var(--color-border);
|
|
12
|
+
height: auto;
|
|
13
|
+
border-bottom-right-radius: var(--border-radius-l);
|
|
14
|
+
border-bottom-left-radius: var(--border-radius-l);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.vui-sheet-position-bottom {
|
|
18
|
+
bottom: 0;
|
|
19
|
+
border-top: 1px solid var(--color-border);
|
|
20
|
+
height: auto;
|
|
21
|
+
border-top-right-radius: var(--border-radius-l);
|
|
22
|
+
border-top-left-radius: var(--border-radius-l);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.vui-sheet-position-right {
|
|
26
|
+
right: 0;
|
|
27
|
+
top: 0;
|
|
28
|
+
border-left: 1px solid var(--color-border);
|
|
29
|
+
border-top-left-radius: var(--border-radius-l);
|
|
30
|
+
border-bottom-left-radius: var(--border-radius-l);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.vui-sheet-position-left {
|
|
34
|
+
left: 0;
|
|
35
|
+
top: 0;
|
|
36
|
+
border-right: 1px solid var(--color-border);
|
|
37
|
+
border-top-right-radius: var(--border-radius-l);
|
|
38
|
+
border-bottom-right-radius: var(--border-radius-l);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.vui-sheet-position-top,
|
|
42
|
+
&.vui-sheet-position-bottom {
|
|
43
|
+
max-height: 35dvh;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.vui-sheet-footer,
|
|
48
|
+
.vui-sheet-header,
|
|
49
|
+
.vui-sheet-content {
|
|
50
|
+
width: 100%;
|
|
51
|
+
padding: var(--space-m);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.vui-sheet-content {
|
|
55
|
+
flex: 1 1 0%;
|
|
56
|
+
overflow-y: auto;
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.vui-sheet-header {
|
|
61
|
+
display: flex;
|
|
62
|
+
gap: var(--space-m);
|
|
63
|
+
align-self: flex-start;
|
|
64
|
+
|
|
65
|
+
& + .vui-sheet-content {
|
|
66
|
+
padding-top: var(--space-s);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|