@dolanske/vui 0.3.0 → 0.3.1
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/README.md +1 -10
- package/dist/style.css +1 -1
- package/dist/vui.js +185 -179
- package/package.json +1 -1
- package/src/App.vue +2 -6
- package/src/components/Accordion/accordion.scss +1 -1
- package/src/components/Avatar/avatar.scss +4 -0
- package/src/components/Button/Button.vue +3 -0
- package/src/components/Dropdown/Dropdown.vue +6 -1
- package/src/components/Popout/popout.scss +1 -0
- package/src/components/Select/select.scss +1 -0
- package/src/components/Tabs/Tab.vue +7 -1
- package/src/components/Tabs/tabs.scss +1 -0
- package/src/components/Tooltip/Tooltip.vue +1 -0
- package/src/style/core.scss +5 -0
- package/src/style/fonts.scss +31 -1
- package/src/style/layout.scss +22 -27
- package/src/style/typography.scss +3 -4
- package/src/style/utils.scss +1 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -26,7 +26,7 @@ const tab = ref('components')
|
|
|
26
26
|
<div v-if="tab === 'components'">
|
|
27
27
|
<h1 class="mb-xl">
|
|
28
28
|
Hii
|
|
29
|
-
<span class="counter text-color-accent">
|
|
29
|
+
<span class="counter text-color-accent">129</span>
|
|
30
30
|
</h1>
|
|
31
31
|
<p>I am down</p>
|
|
32
32
|
|
|
@@ -35,17 +35,13 @@ const tab = ref('components')
|
|
|
35
35
|
<Divider />
|
|
36
36
|
|
|
37
37
|
<Tooltip>
|
|
38
|
-
<span>Hello world</span>
|
|
38
|
+
<span cl>Hello world</span>
|
|
39
39
|
<template #tooltip>
|
|
40
40
|
<p>
|
|
41
41
|
Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro, animi! Nobis maxime neque cumque, in a amet voluptatibus tenetur dicta eos delectus illo soluta aliquam voluptatum nulla? In, incidunt asperiores?
|
|
42
42
|
</p>
|
|
43
43
|
</template>
|
|
44
44
|
</Tooltip>
|
|
45
|
-
|
|
46
|
-
<Button size="l">
|
|
47
|
-
Hii
|
|
48
|
-
</Button>
|
|
49
45
|
</div>
|
|
50
46
|
<div v-else-if="tab === 'typography'" class="typeset" :style="{ maxWidth: '688px', margin: 'auto' }">
|
|
51
47
|
<h1>The Joke Tax Chronicles</h1>
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
&:hover {
|
|
28
28
|
text-decoration: inherit;
|
|
29
29
|
text-underline-offset: inherit;
|
|
30
|
-
|
|
31
30
|
background-color: var(--color-button-gray);
|
|
32
31
|
}
|
|
33
32
|
}
|
|
@@ -67,6 +66,7 @@
|
|
|
67
66
|
|
|
68
67
|
svg {
|
|
69
68
|
transition: var(--transition);
|
|
69
|
+
color: var(--color-text-light);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -12,6 +12,8 @@ interface Props {
|
|
|
12
12
|
// Provide URL to turn button into anchor
|
|
13
13
|
// href?: string
|
|
14
14
|
// target?: string
|
|
15
|
+
|
|
16
|
+
// State props
|
|
15
17
|
loading?: boolean
|
|
16
18
|
expand?: boolean
|
|
17
19
|
square?: boolean
|
|
@@ -67,6 +69,7 @@ const padding = computed(() => {
|
|
|
67
69
|
class="vui-button"
|
|
68
70
|
:class="[{ loading, expand, disabled, plain, active, icon, square, dashed }, `vui-button-variant-${variant}`]"
|
|
69
71
|
:disabled
|
|
72
|
+
role="button"
|
|
70
73
|
:style="{
|
|
71
74
|
'--button-height': height,
|
|
72
75
|
'--button-padding': padding,
|
|
@@ -71,10 +71,15 @@ const w = computed(() => expand ? `${anchorWidth.value}px` : 'initial')
|
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
73
|
<div
|
|
74
|
-
ref="anchor"
|
|
74
|
+
ref="anchor"
|
|
75
|
+
class="vui-dropdown-trigger-wrap"
|
|
76
|
+
:style="{
|
|
75
77
|
minWidth: mW,
|
|
76
78
|
width: w,
|
|
77
79
|
}"
|
|
80
|
+
role="button"
|
|
81
|
+
:aria-expanded="showMenu"
|
|
82
|
+
:aria-haspopup="true"
|
|
78
83
|
>
|
|
79
84
|
<slot name="trigger" :open :is-open="showMenu" :close :toggle />
|
|
80
85
|
</div>
|
|
@@ -14,7 +14,13 @@ const id = computed(() => props.id ?? props.label)
|
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
|
-
<button
|
|
17
|
+
<button
|
|
18
|
+
class="vui-tab"
|
|
19
|
+
:data-tab-id="id"
|
|
20
|
+
:class="{ disabled: props.disabled }"
|
|
21
|
+
role="tab"
|
|
22
|
+
:name="id"
|
|
23
|
+
>
|
|
18
24
|
<Icon v-if="props.icon" :icon="props.icon" />
|
|
19
25
|
{{ props.label }}
|
|
20
26
|
</button>
|
package/src/style/core.scss
CHANGED
|
@@ -131,6 +131,11 @@ body {
|
|
|
131
131
|
min-height: 100dvh;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
// Set base icon color
|
|
135
|
+
.iconify {
|
|
136
|
+
color: var(--color-text-light);
|
|
137
|
+
}
|
|
138
|
+
|
|
134
139
|
@include meta.load-css('typography.scss');
|
|
135
140
|
@include meta.load-css('layout.scss');
|
|
136
141
|
@include meta.load-css('animation.scss');
|
package/src/style/fonts.scss
CHANGED
|
@@ -18,6 +18,36 @@ $colors: 'light', 'lighter', 'lightest', 'red', 'green', 'yellow', 'blue';
|
|
|
18
18
|
|
|
19
19
|
@each $color in $colors {
|
|
20
20
|
.text-color-#{$color} {
|
|
21
|
-
|
|
21
|
+
color: var(--color-text-#{$color});
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
// Font weights
|
|
26
|
+
|
|
27
|
+
.text-light {
|
|
28
|
+
font-weight: 300;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.text-regular {
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.text-medium {
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text-semibold {
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.text-bold {
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.text-extra-bold {
|
|
48
|
+
font-weight: 800;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.text-black {
|
|
52
|
+
font-weight: 900;
|
|
53
|
+
}
|
package/src/style/layout.scss
CHANGED
|
@@ -19,10 +19,25 @@ $containers: 'xs', 's', 'm', 'l', 'xl', 'xxl';
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// Layout
|
|
23
|
+
.flex {
|
|
24
|
+
display: flex;
|
|
25
|
+
}
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
.inline-flex {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.block {
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.inline-block {
|
|
36
|
+
display: inline-block;
|
|
37
|
+
}
|
|
25
38
|
|
|
39
|
+
// Sizes
|
|
40
|
+
// Paddings & margins
|
|
26
41
|
.mx-auto {
|
|
27
42
|
margin-inline: auto;
|
|
28
43
|
}
|
|
@@ -112,30 +127,10 @@ $sizes: 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl';
|
|
|
112
127
|
}
|
|
113
128
|
|
|
114
129
|
// Z-index
|
|
115
|
-
|
|
116
|
-
z-index: 0;
|
|
117
|
-
}
|
|
130
|
+
$zindexes: 0, 10, 20, 30, 40, 50, auto;
|
|
118
131
|
|
|
119
|
-
|
|
120
|
-
z
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.z-20 {
|
|
124
|
-
z-index: 20;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.z-30 {
|
|
128
|
-
z-index: 30;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.z-40 {
|
|
132
|
-
z-index: 40;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.z-50 {
|
|
136
|
-
z-index: 50;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.z-auto {
|
|
140
|
-
z-index: auto;
|
|
132
|
+
@each $zindex in $zindexes {
|
|
133
|
+
.z-#{$zindex} {
|
|
134
|
+
z-index: $zindex;
|
|
135
|
+
}
|
|
141
136
|
}
|
|
@@ -223,7 +223,6 @@ dl {
|
|
|
223
223
|
article,
|
|
224
224
|
.typeset {
|
|
225
225
|
width: 100%;
|
|
226
|
-
// overflow: hidden;
|
|
227
226
|
|
|
228
227
|
ol,
|
|
229
228
|
ul {
|
|
@@ -236,7 +235,7 @@ article,
|
|
|
236
235
|
margin-bottom: var(--space-m);
|
|
237
236
|
font-size: var(--font-size-m);
|
|
238
237
|
position: relative;
|
|
239
|
-
padding-left:
|
|
238
|
+
padding-left: 28px;
|
|
240
239
|
|
|
241
240
|
& > ul {
|
|
242
241
|
margin-top: 0;
|
|
@@ -245,7 +244,7 @@ article,
|
|
|
245
244
|
&:before {
|
|
246
245
|
content: '';
|
|
247
246
|
position: absolute;
|
|
248
|
-
top:
|
|
247
|
+
top: 5px;
|
|
249
248
|
left: 12px;
|
|
250
249
|
}
|
|
251
250
|
|
|
@@ -261,7 +260,7 @@ article,
|
|
|
261
260
|
width: 6px;
|
|
262
261
|
height: 6px;
|
|
263
262
|
border-radius: 100%;
|
|
264
|
-
background-color: var(--color-text-
|
|
263
|
+
background-color: var(--color-text-lighter);
|
|
265
264
|
}
|
|
266
265
|
}
|
|
267
266
|
}
|