@dolanske/vui 0.3.4 → 0.5.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 +41 -40
- package/dist/components/Dropdown/DropdownItem.vue.d.ts +1 -0
- package/dist/components/Flex/Flex.vue.d.ts +3 -1
- package/dist/components/Grid/Grid.vue.d.ts +3 -1
- package/dist/components/Tabs/Tabs.vue.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/vui.js +1547 -1534
- package/package.json +68 -68
- package/src/App.vue +176 -175
- package/src/components/Accordion/Accordion.vue +91 -91
- package/src/components/Accordion/AccordionGroup.vue +43 -43
- package/src/components/Accordion/accordion.scss +81 -80
- package/src/components/Alert/Alert.vue +53 -53
- package/src/components/Alert/alert.scss +80 -80
- package/src/components/Avatar/Avatar.vue +50 -50
- package/src/components/Avatar/avatar.scss +52 -52
- package/src/components/Badge/Badge.vue +21 -21
- package/src/components/Badge/badge.scss +89 -89
- package/src/components/Breadcrumbs/BreadcrumbItem.vue +26 -26
- package/src/components/Breadcrumbs/Breadcrumbs.vue +33 -33
- package/src/components/Breadcrumbs/breadcrumbs.scss +30 -30
- package/src/components/Button/Button.vue +90 -90
- package/src/components/Button/button.scss +178 -176
- package/src/components/ButtonGroup/ButtonGroup.vue +25 -25
- package/src/components/ButtonGroup/button-group.scss +51 -51
- package/src/components/Calendar/Calendar.vue +63 -60
- package/src/components/Calendar/calendar.scss +60 -56
- package/src/components/Card/Card.vue +48 -48
- package/src/components/Card/card.scss +53 -53
- package/src/components/Checkbox/Checkbox.vue +51 -52
- package/src/components/Checkbox/checkbox.scss +75 -66
- package/src/components/CopyClipboard/CopyClipboard.vue +82 -82
- package/src/components/CopyClipboard/copy-clipboard.scss +17 -17
- package/src/components/Divider/Divider.vue +44 -44
- package/src/components/Divider/divider.scss +35 -35
- package/src/components/Drawer/Drawer.vue +97 -97
- package/src/components/Drawer/drawer.scss +36 -36
- package/src/components/Dropdown/Dropdown.vue +111 -111
- package/src/components/Dropdown/DropdownItem.vue +33 -29
- package/src/components/Dropdown/DropdownTitle.vue +8 -8
- package/src/components/Dropdown/dropdown-item.scss +77 -0
- package/src/components/Dropdown/dropdown.scss +39 -117
- package/src/components/Flex/Flex.vue +113 -106
- package/src/components/Grid/Grid.vue +60 -54
- package/src/components/Input/Counter.vue +70 -70
- package/src/components/Input/Dropzone.vue +65 -65
- package/src/components/Input/File.vue +15 -15
- package/src/components/Input/Input.vue +121 -121
- package/src/components/Input/Password.vue +47 -47
- package/src/components/Input/Textarea.vue +76 -76
- package/src/components/Input/input.scss +208 -208
- package/src/components/Kbd/Kbd.vue +48 -48
- package/src/components/Kbd/KbdGroup.vue +31 -31
- package/src/components/Kbd/kbd.scss +18 -18
- package/src/components/Modal/Confirm.vue +56 -56
- package/src/components/Modal/Modal.vue +91 -91
- package/src/components/Modal/modal.scss +49 -49
- package/src/components/OTP/OTP.vue +133 -133
- package/src/components/OTP/OTPItem.vue +37 -37
- package/src/components/OTP/otp.scss +83 -83
- package/src/components/Pagination/Pagination.vue +74 -74
- package/src/components/Pagination/pagination.ts +78 -78
- package/src/components/Popout/Popout.vue +42 -42
- package/src/components/Popout/popout.scss +8 -8
- package/src/components/Progress/Progress.vue +90 -90
- package/src/components/Progress/progress.scss +41 -41
- package/src/components/Radio/Radio.vue +36 -36
- package/src/components/Radio/RadioGroup.vue +40 -40
- package/src/components/Radio/radio.scss +68 -59
- package/src/components/Select/Select.vue +180 -180
- package/src/components/Select/select.scss +44 -44
- package/src/components/Sheet/Sheet.vue +92 -92
- package/src/components/Sheet/sheet.scss +60 -60
- package/src/components/Sidebar/Sidebar.vue +102 -0
- package/src/components/Sidebar/sidebar.scss +123 -0
- 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 +46 -46
- package/src/components/Switch/Switch.vue +30 -30
- package/src/components/Switch/switch.scss +60 -52
- package/src/components/Table/Cell.vue +23 -23
- package/src/components/Table/Header.vue +59 -59
- package/src/components/Table/Row.vue +9 -9
- package/src/components/Table/SelectAll.vue +23 -23
- package/src/components/Table/SelectRow.vue +29 -29
- package/src/components/Table/Table.vue +66 -66
- package/src/components/Table/table.scss +134 -134
- package/src/components/Table/table.ts +244 -244
- package/src/components/Tabs/Tab.vue +27 -27
- package/src/components/Tabs/Tabs.vue +89 -82
- package/src/components/Tabs/tabs.scss +80 -79
- package/src/components/Toast/Toasts.vue +47 -47
- package/src/components/Toast/toast.scss +41 -41
- package/src/components/Toast/toast.ts +68 -68
- package/src/components/Tooltip/Tooltip.vue +86 -86
- package/src/components/Tooltip/tooltip.scss +4 -4
- package/src/index.scss +1 -1
- package/src/index.ts +119 -119
- package/src/internal/Backdrop/Backdrop.vue +22 -22
- package/src/internal/Backdrop/backdrop.scss +28 -28
- package/src/main.ts +5 -5
- package/src/shared/helpers.ts +74 -74
- package/src/shared/types.ts +29 -29
- package/src/style/animation.scss +21 -21
- package/src/style/core.scss +150 -148
- package/src/style/layout.scss +168 -136
- package/src/style/media-query.scss +29 -29
- package/src/style/reset.scss +135 -135
- package/src/style/{fonts.scss → text.scss} +74 -53
- package/src/style/tooltip.scss +128 -128
- package/src/style/typography.scss +338 -338
- package/src/style/utils.scss +36 -36
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import type { VNode } from 'vue'
|
|
3
|
-
import type { BreadcrumbItemProps } from './BreadcrumbItem.vue'
|
|
4
|
-
import { Icon } from '@iconify/vue'
|
|
5
|
-
import './breadcrumbs.scss'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
separator?: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
separator = 'ph:caret-right',
|
|
13
|
-
} = defineProps<Props>()
|
|
14
|
-
|
|
15
|
-
const slots = defineSlots<{
|
|
16
|
-
default: () => Array<VNode & { props: BreadcrumbItemProps }>
|
|
17
|
-
}>()
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<ul class="vui-breadcrumbs">
|
|
22
|
-
<template v-for="(vnode, index) of slots.default()" :key="vnode.props.label">
|
|
23
|
-
<component
|
|
24
|
-
:is="vnode"
|
|
25
|
-
v-bind="vnode.props"
|
|
26
|
-
/>
|
|
27
|
-
<template v-if="index !== slots.default().length - 1">
|
|
28
|
-
<Icon v-if="separator.length > 1 && separator.includes(':')" class="vui-breadcrumb-custom-separator" :icon="separator" />
|
|
29
|
-
<span v-else class="vui-breadcrumb-custom-separator">{{ separator }}</span>
|
|
30
|
-
</template>
|
|
31
|
-
</template>
|
|
32
|
-
</ul>
|
|
33
|
-
</template>
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { VNode } from 'vue'
|
|
3
|
+
import type { BreadcrumbItemProps } from './BreadcrumbItem.vue'
|
|
4
|
+
import { Icon } from '@iconify/vue'
|
|
5
|
+
import './breadcrumbs.scss'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
separator?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
separator = 'ph:caret-right',
|
|
13
|
+
} = defineProps<Props>()
|
|
14
|
+
|
|
15
|
+
const slots = defineSlots<{
|
|
16
|
+
default: () => Array<VNode & { props: BreadcrumbItemProps }>
|
|
17
|
+
}>()
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<ul class="vui-breadcrumbs">
|
|
22
|
+
<template v-for="(vnode, index) of slots.default()" :key="vnode.props.label">
|
|
23
|
+
<component
|
|
24
|
+
:is="vnode"
|
|
25
|
+
v-bind="vnode.props"
|
|
26
|
+
/>
|
|
27
|
+
<template v-if="index !== slots.default().length - 1">
|
|
28
|
+
<Icon v-if="separator.length > 1 && separator.includes(':')" class="vui-breadcrumb-custom-separator" :icon="separator" />
|
|
29
|
+
<span v-else class="vui-breadcrumb-custom-separator">{{ separator }}</span>
|
|
30
|
+
</template>
|
|
31
|
+
</template>
|
|
32
|
+
</ul>
|
|
33
|
+
</template>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
.vui-breadcrumbs {
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: var(--space-m);
|
|
4
|
-
align-items: center;
|
|
5
|
-
|
|
6
|
-
.vui-breadcrumb-custom-separator {
|
|
7
|
-
color: var(--color-text-lighter);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
li {
|
|
11
|
-
font-size: var(--font-size-s);
|
|
12
|
-
color: var(--color-text-lighter);
|
|
13
|
-
|
|
14
|
-
.vui-breadcrumb-text-simple {
|
|
15
|
-
color: var(--color-text-lighter);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.vui-breadcrumb-link {
|
|
19
|
-
color: var(--color-text);
|
|
20
|
-
background: transparent;
|
|
21
|
-
text-underline-offset: 4px;
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
text-decoration: underline;
|
|
26
|
-
}
|
|
27
|
-
// cursor: pointer;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
.vui-breadcrumbs {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: var(--space-m);
|
|
4
|
+
align-items: center;
|
|
5
|
+
|
|
6
|
+
.vui-breadcrumb-custom-separator {
|
|
7
|
+
color: var(--color-text-lighter);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
li {
|
|
11
|
+
font-size: var(--font-size-s);
|
|
12
|
+
color: var(--color-text-lighter);
|
|
13
|
+
|
|
14
|
+
.vui-breadcrumb-text-simple {
|
|
15
|
+
color: var(--color-text-lighter);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.vui-breadcrumb-link {
|
|
19
|
+
color: var(--color-text);
|
|
20
|
+
background: transparent;
|
|
21
|
+
text-underline-offset: 4px;
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
text-decoration: underline;
|
|
26
|
+
}
|
|
27
|
+
// cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Sizes } from '../../shared/types'
|
|
3
|
-
import { Icon } from '@iconify/vue'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
import { Size } from '../../shared/types'
|
|
6
|
-
import Spinner from '../Spinner/Spinner.vue'
|
|
7
|
-
import './button.scss'
|
|
8
|
-
|
|
9
|
-
export type Variants = 'default' | 'danger' | 'success' | 'link' | 'blue' | 'accent'
|
|
10
|
-
|
|
11
|
-
interface Props {
|
|
12
|
-
// Provide URL to turn button into anchor
|
|
13
|
-
// href?: string
|
|
14
|
-
// target?: string
|
|
15
|
-
|
|
16
|
-
// State props
|
|
17
|
-
loading?: boolean
|
|
18
|
-
expand?: boolean
|
|
19
|
-
square?: boolean
|
|
20
|
-
dashed?: boolean
|
|
21
|
-
disabled?: boolean
|
|
22
|
-
size?: Sizes
|
|
23
|
-
/**
|
|
24
|
-
* Sets the hover styling property
|
|
25
|
-
*/
|
|
26
|
-
active?: boolean
|
|
27
|
-
/**
|
|
28
|
-
* No styling applied to the button unless hovered
|
|
29
|
-
*/
|
|
30
|
-
plain?: boolean
|
|
31
|
-
variant?: Variants
|
|
32
|
-
/**
|
|
33
|
-
* The children will be set to an icon and the icon will become a square
|
|
34
|
-
*/
|
|
35
|
-
icon?: string
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const {
|
|
39
|
-
loading,
|
|
40
|
-
disabled,
|
|
41
|
-
expand,
|
|
42
|
-
size = 'm',
|
|
43
|
-
variant = 'default',
|
|
44
|
-
icon,
|
|
45
|
-
dashed,
|
|
46
|
-
} = defineProps<Props>()
|
|
47
|
-
|
|
48
|
-
const height = computed(() => {
|
|
49
|
-
switch (size) {
|
|
50
|
-
case Size.s: return '24px'
|
|
51
|
-
case Size.l: return '40px'
|
|
52
|
-
case Size.m:
|
|
53
|
-
default: return '
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
const padding = computed(() => {
|
|
58
|
-
switch (size) {
|
|
59
|
-
case Size.s: return '5px'
|
|
60
|
-
case Size.l: return '16px'
|
|
61
|
-
case Size.m:
|
|
62
|
-
default: return '8px'
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
</script>
|
|
66
|
-
|
|
67
|
-
<template>
|
|
68
|
-
<button
|
|
69
|
-
class="vui-button"
|
|
70
|
-
:class="[{ loading, expand, disabled, plain, active, icon, square, dashed }, `vui-button-variant-${variant}`]"
|
|
71
|
-
:disabled
|
|
72
|
-
role="button"
|
|
73
|
-
:style="{
|
|
74
|
-
'--button-height': height,
|
|
75
|
-
'--button-padding': padding,
|
|
76
|
-
}"
|
|
77
|
-
>
|
|
78
|
-
<Spinner size="s" />
|
|
79
|
-
<div class="vui-button-slot">
|
|
80
|
-
<div class="vui-button-slot-start">
|
|
81
|
-
<slot name="start" />
|
|
82
|
-
</div>
|
|
83
|
-
<Icon v-if="icon" :icon="icon" />
|
|
84
|
-
<slot v-else />
|
|
85
|
-
<div class="vui-button-slot-end">
|
|
86
|
-
<slot name="end" />
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</button>
|
|
90
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Sizes } from '../../shared/types'
|
|
3
|
+
import { Icon } from '@iconify/vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import { Size } from '../../shared/types'
|
|
6
|
+
import Spinner from '../Spinner/Spinner.vue'
|
|
7
|
+
import './button.scss'
|
|
8
|
+
|
|
9
|
+
export type Variants = 'default' | 'danger' | 'success' | 'link' | 'blue' | 'accent'
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
// Provide URL to turn button into anchor
|
|
13
|
+
// href?: string
|
|
14
|
+
// target?: string
|
|
15
|
+
|
|
16
|
+
// State props
|
|
17
|
+
loading?: boolean
|
|
18
|
+
expand?: boolean
|
|
19
|
+
square?: boolean
|
|
20
|
+
dashed?: boolean
|
|
21
|
+
disabled?: boolean
|
|
22
|
+
size?: Sizes
|
|
23
|
+
/**
|
|
24
|
+
* Sets the hover styling property
|
|
25
|
+
*/
|
|
26
|
+
active?: boolean
|
|
27
|
+
/**
|
|
28
|
+
* No styling applied to the button unless hovered
|
|
29
|
+
*/
|
|
30
|
+
plain?: boolean
|
|
31
|
+
variant?: Variants
|
|
32
|
+
/**
|
|
33
|
+
* The children will be set to an icon and the icon will become a square
|
|
34
|
+
*/
|
|
35
|
+
icon?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
loading,
|
|
40
|
+
disabled,
|
|
41
|
+
expand,
|
|
42
|
+
size = 'm',
|
|
43
|
+
variant = 'default',
|
|
44
|
+
icon,
|
|
45
|
+
dashed,
|
|
46
|
+
} = defineProps<Props>()
|
|
47
|
+
|
|
48
|
+
const height = computed(() => {
|
|
49
|
+
switch (size) {
|
|
50
|
+
case Size.s: return '24px'
|
|
51
|
+
case Size.l: return '40px'
|
|
52
|
+
case Size.m:
|
|
53
|
+
default: return 'var(--interactive-el-height)'
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const padding = computed(() => {
|
|
58
|
+
switch (size) {
|
|
59
|
+
case Size.s: return '5px'
|
|
60
|
+
case Size.l: return '16px'
|
|
61
|
+
case Size.m:
|
|
62
|
+
default: return '8px'
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<button
|
|
69
|
+
class="vui-button"
|
|
70
|
+
:class="[{ loading, expand, disabled, plain, active, icon, square, dashed }, `vui-button-variant-${variant}`]"
|
|
71
|
+
:disabled
|
|
72
|
+
role="button"
|
|
73
|
+
:style="{
|
|
74
|
+
'--button-height': height,
|
|
75
|
+
'--button-padding': padding,
|
|
76
|
+
}"
|
|
77
|
+
>
|
|
78
|
+
<Spinner size="s" />
|
|
79
|
+
<div class="vui-button-slot">
|
|
80
|
+
<div class="vui-button-slot-start">
|
|
81
|
+
<slot name="start" />
|
|
82
|
+
</div>
|
|
83
|
+
<Icon v-if="icon" :icon="icon" />
|
|
84
|
+
<slot v-else />
|
|
85
|
+
<div class="vui-button-slot-end">
|
|
86
|
+
<slot name="end" />
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</button>
|
|
90
|
+
</template>
|
|
@@ -1,176 +1,178 @@
|
|
|
1
|
-
.vui-button {
|
|
2
|
-
--button-height:
|
|
3
|
-
--button-padding: 8px;
|
|
4
|
-
|
|
5
|
-
&.disabled {
|
|
6
|
-
pointer-events: none;
|
|
7
|
-
color: var(--color-text-lighter) !important;
|
|
8
|
-
cursor: not-allowed !important;
|
|
9
|
-
filter: saturate(50%) opacity(0.65);
|
|
10
|
-
|
|
11
|
-
svg path {
|
|
12
|
-
color: var(--color-text-lighter) !important;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.expand {
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.loading {
|
|
21
|
-
.vui-spinner {
|
|
22
|
-
opacity: 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.vui-button-slot {
|
|
26
|
-
opacity: 0;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.icon {
|
|
31
|
-
width: var(--button-height);
|
|
32
|
-
padding: 0;
|
|
33
|
-
|
|
34
|
-
.vui-button-slot {
|
|
35
|
-
svg {
|
|
36
|
-
width: 18px;
|
|
37
|
-
height: 18px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&.square {
|
|
43
|
-
width: var(--button-height);
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
1
|
+
.vui-button {
|
|
2
|
+
--button-height: var(--interactive-el-height);
|
|
3
|
+
--button-padding: 8px;
|
|
4
|
+
|
|
5
|
+
&.disabled {
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
color: var(--color-text-lighter) !important;
|
|
8
|
+
cursor: not-allowed !important;
|
|
9
|
+
filter: saturate(50%) opacity(0.65);
|
|
10
|
+
|
|
11
|
+
svg path {
|
|
12
|
+
color: var(--color-text-lighter) !important;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.expand {
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.loading {
|
|
21
|
+
.vui-spinner {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vui-button-slot {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.icon {
|
|
31
|
+
width: var(--button-height);
|
|
32
|
+
padding: 0;
|
|
33
|
+
|
|
34
|
+
.vui-button-slot {
|
|
35
|
+
svg {
|
|
36
|
+
width: 18px;
|
|
37
|
+
height: 18px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.square {
|
|
43
|
+
width: var(--button-height);
|
|
44
|
+
min-width: var(--button-height);
|
|
45
|
+
min-height: var(--button-height);
|
|
46
|
+
padding: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.dashed {
|
|
50
|
+
border-style: dashed;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
height: var(--button-height);
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
border-radius: var(--border-radius-s);
|
|
58
|
+
background: transparent;
|
|
59
|
+
padding-inline: var(--button-padding);
|
|
60
|
+
font-size: var(--font-size-s);
|
|
61
|
+
position: relative;
|
|
62
|
+
transition: var(--transition);
|
|
63
|
+
border: 1px solid transparent;
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
color: var(--color-text);
|
|
66
|
+
|
|
67
|
+
// Default gray
|
|
68
|
+
|
|
69
|
+
.vui-button-slot {
|
|
70
|
+
display: flex;
|
|
71
|
+
place-items: center;
|
|
72
|
+
transition: var(--transition);
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.vui-button-slot-start,
|
|
77
|
+
.vui-button-slot-end {
|
|
78
|
+
display: flex;
|
|
79
|
+
place-items: center;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.vui-button-slot-start {
|
|
83
|
+
margin-right: 6px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.vui-button-slot-end {
|
|
87
|
+
margin-left: 6px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.vui-spinner {
|
|
91
|
+
transition: var(--transition);
|
|
92
|
+
opacity: 0;
|
|
93
|
+
position: absolute;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Variants
|
|
98
|
+
&.vui-button-variant-default {
|
|
99
|
+
&:not(.plain) {
|
|
100
|
+
color: var(--color-text);
|
|
101
|
+
background-color: var(--color-button-gray);
|
|
102
|
+
border: 1px solid var(--color-border);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.active,
|
|
106
|
+
&:hover {
|
|
107
|
+
background-color: var(--color-button-gray-hover);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.vui-button-variant-danger {
|
|
112
|
+
&:not(.plain) {
|
|
113
|
+
color: var(--color-text);
|
|
114
|
+
background-color: var(--color-bg-red-lowered);
|
|
115
|
+
border: 1px solid var(--color-border-red);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&.active,
|
|
119
|
+
&:hover {
|
|
120
|
+
border: 1px solid var(--color-bg-red-raised);
|
|
121
|
+
background-color: var(--color-bg-red-raised);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&.vui-button-variant-success {
|
|
126
|
+
&:not(.plain) {
|
|
127
|
+
color: var(--color-text);
|
|
128
|
+
background-color: var(--color-bg-green-lowered);
|
|
129
|
+
border: 1px solid var(--color-border-green);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.active,
|
|
133
|
+
&:hover {
|
|
134
|
+
border: 1px solid var(--color-bg-green-raised);
|
|
135
|
+
background-color: var(--color-bg-green-raised);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.vui-button-variant-blue {
|
|
140
|
+
&:not(.plain) {
|
|
141
|
+
color: var(--color-text);
|
|
142
|
+
background-color: var(--color-bg-blue-lowered);
|
|
143
|
+
border: 1px solid var(--color-border-blue);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.active,
|
|
147
|
+
&:hover {
|
|
148
|
+
border: 1px solid var(--color-bg-blue-raised);
|
|
149
|
+
background-color: var(--color-bg-blue-raised);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.vui-button-variant-accent {
|
|
154
|
+
&:not(.plain) {
|
|
155
|
+
color: var(--color-text);
|
|
156
|
+
background-color: var(--color-bg-accent-lowered);
|
|
157
|
+
border: 1px solid var(--color-border-accent);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.active,
|
|
161
|
+
&:hover {
|
|
162
|
+
border: 1px solid var(--color-bg-accent-raised);
|
|
163
|
+
background-color: var(--color-bg-accent-raised);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&.vui-button-variant-link {
|
|
168
|
+
color: var(--color-text);
|
|
169
|
+
background: transparent;
|
|
170
|
+
text-underline-offset: 4px;
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
|
|
173
|
+
&.active,
|
|
174
|
+
&:hover {
|
|
175
|
+
text-decoration: underline;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|