@robuust-digital/vue-components 1.2.2 → 1.2.4
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 +2 -8
- package/dist/tailwind/base/index.js +50 -3
- package/dist/tailwind/components/accordion.js +3 -3
- package/dist/tailwind/components/alert.js +3 -3
- package/dist/tailwind/components/button.js +6 -6
- package/dist/tailwind/components/checkbox.js +2 -2
- package/dist/tailwind/components/drawer.js +18 -20
- package/dist/tailwind/components/lightswitch.js +4 -4
- package/dist/tailwind/components/modal.js +19 -22
- package/dist/tailwind/components/select.js +61 -0
- package/dist/tailwind/components/table.js +4 -4
- package/dist/tailwind/components/tooltip.js +3 -3
- package/dist/tailwind/index.js +3 -0
- package/dist/vue-components.es.js +811 -732
- package/dist/vue-components.umd.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,14 +38,8 @@ export default {
|
|
|
38
38
|
// Customize component styles here
|
|
39
39
|
components: (theme) => ({
|
|
40
40
|
button: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
color: '#000',
|
|
44
|
-
},
|
|
45
|
-
secondary: {
|
|
46
|
-
backgroundColor: theme('colors.blue.500'),
|
|
47
|
-
color: '#fff',
|
|
48
|
-
},
|
|
41
|
+
'--rvc-button-height': theme('height.9'),
|
|
42
|
+
// ...
|
|
49
43
|
},
|
|
50
44
|
}),
|
|
51
45
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Base styles
|
|
3
5
|
*
|
|
@@ -5,15 +7,60 @@
|
|
|
5
7
|
*/
|
|
6
8
|
export default (theme) => ({
|
|
7
9
|
':root': {
|
|
10
|
+
// Focus styling
|
|
8
11
|
'--rvc-base-focus-outline-style': 'dashed',
|
|
9
|
-
'--rvc-base-focus-outline-offset': '0.
|
|
10
|
-
'--rvc-base-focus-outline-width': '0.
|
|
12
|
+
'--rvc-base-focus-outline-offset': '0.0625rem', // 1px
|
|
13
|
+
'--rvc-base-focus-outline-width': '0.0625rem', // 1px
|
|
11
14
|
'--rvc-base-focus-outline-color': theme('colors.indigo.600'),
|
|
12
15
|
|
|
16
|
+
// Base styling
|
|
17
|
+
'--rvc-base-border-radius': theme('borderRadius.md'),
|
|
18
|
+
'--rvc-base-transition-duration': theme('transitionDuration.DEFAULT'),
|
|
19
|
+
'--rvc-base-transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
|
|
20
|
+
'--rvc-base-loading-animation': theme('animation.spin'),
|
|
21
|
+
'--rvc-base-border-width': theme('borderWidth.DEFAULT'),
|
|
22
|
+
'--rvc-base-border-style': 'solid',
|
|
23
|
+
'--rvc-base-border-color': theme('colors.slate.200'),
|
|
24
|
+
'--rvc-base-border-dark-color': theme('colors.slate.300'),
|
|
25
|
+
'--rvc-base-box-shadow': 'none',
|
|
26
|
+
'--rvc-base-font-size': '0.9375rem',
|
|
27
|
+
'--rvc-base-line-height': '1.5rem',
|
|
28
|
+
|
|
29
|
+
// Base Dialog styling
|
|
30
|
+
'--rvc-dialog-backdrop-bg-color': withAlphaValue(theme('colors.slate.900'), 0.5),
|
|
31
|
+
'--rvc-dialog-padding-x': theme('padding.4'),
|
|
32
|
+
'--rvc-dialog-padding-y': theme('padding.4'),
|
|
33
|
+
'--rvc-dialog-header-bg-color': theme('colors.white'),
|
|
34
|
+
'--rvc-dialog-close-size': theme('width.6'),
|
|
35
|
+
'--rvc-dialog-close-color': theme('colors.slate.700'),
|
|
36
|
+
'--rvc-dialog-close-color-hover': theme('colors.slate.900'),
|
|
37
|
+
'--rvc-dialog-title-color': theme('colors.slate.900'),
|
|
38
|
+
'--rvc-dialog-title-font-size': theme('fontSize.xl'),
|
|
39
|
+
'--rvc-dialog-title-font-weight': theme('fontWeight.bold'),
|
|
40
|
+
'--rvc-dialog-title-font-family': theme('fontFamily.sans'),
|
|
41
|
+
'--rvc-dialog-content-bg-color': theme('colors.white'),
|
|
42
|
+
'--rvc-dialog-footer-bg-color': theme('colors.slate.50'),
|
|
43
|
+
'--rvc-dialog-footer-gap': theme('gap.2'),
|
|
44
|
+
|
|
45
|
+
// Base Input styling
|
|
46
|
+
'--rvc-input-color': theme('colors.slate.600'),
|
|
47
|
+
'--rvc-input-bg-color': theme('colors.white'),
|
|
48
|
+
'--rvc-input-icon-color': theme('colors.slate.400'),
|
|
49
|
+
'--rvc-input-icon-size': theme('width.5'),
|
|
50
|
+
'--rvc-input-padding-y': theme('padding[1.5]'),
|
|
51
|
+
'--rvc-input-padding-x': theme('padding.8'),
|
|
52
|
+
|
|
13
53
|
...theme('components.base'),
|
|
54
|
+
|
|
55
|
+
[`@media (min-width: ${theme('screens.sm')})`]: {
|
|
56
|
+
'--rvc-dialog-padding-x': theme('padding.6'),
|
|
57
|
+
'--rvc-dialog-padding-y': theme('padding.4'),
|
|
58
|
+
'--rvc-dialog-footer-gap': theme('gap.3'),
|
|
59
|
+
...theme('components.base[screen-sm]'),
|
|
60
|
+
},
|
|
14
61
|
},
|
|
15
62
|
|
|
16
|
-
'*:focus, .rvc-focus': {
|
|
63
|
+
'[class^="rvc-"] *:focus, [class^="rvc-"]:focus, .rvc-focus': {
|
|
17
64
|
outlineStyle: 'var(--rvc-base-focus-outline-style)',
|
|
18
65
|
outlineWidth: 'var(--rvc-base-focus-outline-offset)',
|
|
19
66
|
outlineOffset: 'var(--rvc-base-focus-outline-width)',
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export default (theme) => ({
|
|
7
7
|
':root': {
|
|
8
|
-
'--rvc-accordion-border-width':
|
|
9
|
-
'--rvc-accordion-border-style':
|
|
10
|
-
'--rvc-accordion-border-color':
|
|
8
|
+
'--rvc-accordion-border-width': 'var(--rvc-base-border-width)',
|
|
9
|
+
'--rvc-accordion-border-style': 'var(--rvc-base-border-style)',
|
|
10
|
+
'--rvc-accordion-border-color': 'var(--rvc-base-border-color)',
|
|
11
11
|
'--rvc-accordion-padding-y': theme('padding.6'),
|
|
12
12
|
'--rvc-accordion-font-weight': theme('fontWeight.normal'),
|
|
13
13
|
'--rvc-accordion-font-size': theme('fontSize.base.0'),
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
export default (theme) => ({
|
|
7
7
|
':root': {
|
|
8
8
|
// Custom properties
|
|
9
|
+
'--rvc-alert-border-radius': 'var(--rvc-base-border-radius)',
|
|
10
|
+
'--rvc-alert-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
11
|
+
'--rvc-alert-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
9
12
|
'--rvc-alert-padding-x': theme('padding.6'),
|
|
10
13
|
'--rvc-alert-padding-y': theme('padding.6'),
|
|
11
|
-
'--rvc-alert-border-radius': theme('borderRadius.md'),
|
|
12
14
|
'--rvc-alert-font-size': theme('fontSize.base.0'),
|
|
13
15
|
'--rvc-alert-gap': theme('gap[1.5]'),
|
|
14
16
|
'--rvc-alert-anchor-decoration': 'underline',
|
|
15
17
|
'--rvc-alert-icon-size': theme('width.6'),
|
|
16
18
|
'--rvc-alert-title-font-weight': theme('fontWeight.medium'),
|
|
17
19
|
'--rvc-alert-transition-property': theme('transitionProperty.colors'),
|
|
18
|
-
'--rvc-alert-transition-duration': theme('transitionDuration.DEFAULT'),
|
|
19
|
-
'--rvc-alert-transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
|
|
20
20
|
|
|
21
21
|
// Default color variables
|
|
22
22
|
'--rvc-alert-bg-color': theme('colors.blue.50'),
|
|
@@ -15,20 +15,20 @@ export default (theme) => {
|
|
|
15
15
|
return {
|
|
16
16
|
':root': {
|
|
17
17
|
// Custom properties
|
|
18
|
+
'--rvc-button-border-radius': 'var(--rvc-base-border-radius)',
|
|
19
|
+
'--rvc-button-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
20
|
+
'--rvc-button-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
21
|
+
'--rvc-button-icon-loading-animation': 'var(--rvc-base-loading-animation)',
|
|
22
|
+
'--rvc-button-border-width': 'var(--rvc-base-border-width)',
|
|
23
|
+
'--rvc-button-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
18
24
|
'--rvc-button-height': theme('height.9'),
|
|
19
|
-
'--rvc-button-border-width': theme('borderWidth.DEFAULT'),
|
|
20
25
|
'--rvc-button-padding-x': theme('padding.3'),
|
|
21
26
|
'--rvc-button-gap': theme('gap[1.5]'),
|
|
22
|
-
'--rvc-button-border-radius': theme('borderRadius.md'),
|
|
23
27
|
'--rvc-button-font-weight': theme('fontWeight.semibold'),
|
|
24
28
|
'--rvc-button-font-size': theme('fontSize.base.0'),
|
|
25
29
|
'--rvc-button-transition-property': theme('transitionProperty.colors'),
|
|
26
|
-
'--rvc-button-transition-duration': theme('transitionDuration.DEFAULT'),
|
|
27
|
-
'--rvc-button-transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
|
|
28
30
|
'--rvc-button-icon-size': theme('width.5'),
|
|
29
31
|
'--rvc-button-icon-loading-size': theme('width.4'),
|
|
30
|
-
'--rvc-button-icon-loading-animation': theme('animation.spin'),
|
|
31
|
-
'--rvc-button-box-shadow': 'none',
|
|
32
32
|
|
|
33
33
|
// Default color variables
|
|
34
34
|
'--rvc-button-bg-color': '#d9ff00',
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export default (theme) => ({
|
|
7
7
|
':root': {
|
|
8
|
+
'--rvc-checkbox-input-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
9
|
+
'--rvc-checkbox-input-border-color': 'var(--rvc-base-border-color)',
|
|
8
10
|
'--rvc-checkbox-gap': theme('gap.2'),
|
|
9
11
|
'--rvc-checkbox-font-size': theme('fontSize.base.0'),
|
|
10
12
|
'--rvc-checkbox-font-weight': theme('fontWeight.medium'),
|
|
11
13
|
'--rvc-checkbox-color': theme('colors.slate.950'),
|
|
12
14
|
'--rvc-checkbox-input-size': theme('width.4'),
|
|
13
|
-
'--rvc-checkbox-input-box-shadow': theme('boxShadow.sm'),
|
|
14
15
|
'--rvc-checkbox-input-border-radius': theme('borderRadius.DEFAULT'),
|
|
15
16
|
'--rvc-checkbox-input-border-width': theme('borderWidth.DEFAULT'),
|
|
16
|
-
'--rvc-checkbox-input-border-color': theme('colors.slate.200'),
|
|
17
17
|
'--rvc-checkbox-input-checked-bg-color': theme('colors.indigo.600'),
|
|
18
18
|
'--rvc-checkbox-input-checked-border-color': theme('colors.indigo.600'),
|
|
19
19
|
'--rvc-checkbox-input-checked-icon-color': theme('colors.white'),
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Drawer component
|
|
5
3
|
*
|
|
@@ -7,22 +5,23 @@ import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
|
7
5
|
*/
|
|
8
6
|
export default (theme) => ({
|
|
9
7
|
':root': {
|
|
10
|
-
'--rvc-drawer-backdrop-bg-color':
|
|
11
|
-
'--rvc-drawer-padding-x':
|
|
12
|
-
'--rvc-drawer-padding-y':
|
|
13
|
-
'--rvc-drawer-border-color':
|
|
14
|
-
'--rvc-drawer-border-width':
|
|
15
|
-
'--rvc-drawer-border-style': '
|
|
16
|
-
'--rvc-drawer-header-bg-color':
|
|
17
|
-
'--rvc-drawer-title-font-size':
|
|
18
|
-
'--rvc-drawer-title-font-weight':
|
|
19
|
-
'--rvc-drawer-title-
|
|
20
|
-
'--rvc-drawer-
|
|
21
|
-
'--rvc-drawer-close-
|
|
22
|
-
'--rvc-drawer-close-color
|
|
23
|
-
'--rvc-drawer-
|
|
24
|
-
'--rvc-drawer-
|
|
25
|
-
'--rvc-drawer-footer-
|
|
8
|
+
'--rvc-drawer-backdrop-bg-color': 'var(--rvc-dialog-backdrop-bg-color)',
|
|
9
|
+
'--rvc-drawer-padding-x': 'var(--rvc-dialog-padding-x)',
|
|
10
|
+
'--rvc-drawer-padding-y': 'var(--rvc-dialog-padding-y)',
|
|
11
|
+
'--rvc-drawer-border-color': 'var(--rvc-base-border-color)',
|
|
12
|
+
'--rvc-drawer-border-width': 'var(--rvc-base-border-width)',
|
|
13
|
+
'--rvc-drawer-border-style': 'var(--rvc-base-border-style)',
|
|
14
|
+
'--rvc-drawer-header-bg-color': 'var(--rvc-dialog-header-bg-color)',
|
|
15
|
+
'--rvc-drawer-title-font-size': 'var(--rvc-dialog-title-font-size)',
|
|
16
|
+
'--rvc-drawer-title-font-weight': 'var(--rvc-dialog-title-font-weight)',
|
|
17
|
+
'--rvc-drawer-title-font-family': 'var(--rvc-dialog-title-font-family)',
|
|
18
|
+
'--rvc-drawer-title-color': 'var(--rvc-dialog-title-color)',
|
|
19
|
+
'--rvc-drawer-close-size': 'var(--rvc-dialog-close-size)',
|
|
20
|
+
'--rvc-drawer-close-color': 'var(--rvc-dialog-close-color)',
|
|
21
|
+
'--rvc-drawer-close-color-hover': 'var(--rvc-dialog-close-color-hover)',
|
|
22
|
+
'--rvc-drawer-content-bg-color': 'var(--rvc-dialog-content-bg-color)',
|
|
23
|
+
'--rvc-drawer-footer-bg-color': 'var(--rvc-dialog-footer-bg-color)',
|
|
24
|
+
'--rvc-drawer-footer-gap': 'var(--rvc-dialog-footer-gap)',
|
|
26
25
|
'--rvc-drawer-footer-justify-content': 'space-between',
|
|
27
26
|
},
|
|
28
27
|
|
|
@@ -55,6 +54,7 @@ export default (theme) => ({
|
|
|
55
54
|
fontSize: 'var(--rvc-drawer-title-font-size)',
|
|
56
55
|
fontWeight: 'var(--rvc-drawer-title-font-weight)',
|
|
57
56
|
color: 'var(--rvc-drawer-title-color)',
|
|
57
|
+
fontFamily: 'var(--rvc-drawer-title-font-family)',
|
|
58
58
|
...theme('components.drawer[.rvc-drawer-title]'),
|
|
59
59
|
},
|
|
60
60
|
|
|
@@ -98,8 +98,6 @@ export default (theme) => ({
|
|
|
98
98
|
|
|
99
99
|
// Larger screens
|
|
100
100
|
[`@media (min-width: ${theme('screens.sm')})`]: {
|
|
101
|
-
'--rvc-drawer-padding-x': theme('padding.6'),
|
|
102
|
-
'--rvc-drawer-padding-y': theme('padding.6'),
|
|
103
101
|
...theme('components.drawer[screen-sm]'),
|
|
104
102
|
},
|
|
105
103
|
},
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export default (theme) => ({
|
|
7
7
|
':root': {
|
|
8
|
+
'--rvc-lightswitch-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
9
|
+
'--rvc-lightswitch-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
10
|
+
'--rvc-lightswitch-toggle-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
11
|
+
'--rvc-lightswitch-toggle-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
8
12
|
'--rvc-lightswitch-border-radius': theme('borderRadius.full'),
|
|
9
13
|
'--rvc-lightswitch-height': '1.875rem',
|
|
10
14
|
'--rvc-lightswitch-width': '3.125rem',
|
|
11
15
|
'--rvc-lightswitch-bg-color': theme('colors.slate.200'),
|
|
12
16
|
'--rvc-lightswitch-bg-color-enabled': theme('colors.green.400'),
|
|
13
17
|
'--rvc-lightswitch-transition-property': theme('transitionProperty.colors'),
|
|
14
|
-
'--rvc-lightswitch-transition-duration': theme('transitionDuration.DEFAULT'),
|
|
15
|
-
'--rvc-lightswitch-transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
|
|
16
18
|
'--rvc-lightswitch-label-offset': '0.5rem',
|
|
17
19
|
'--rvc-lightswitch-toggle-offset': '0.1875rem',
|
|
18
20
|
'--rvc-lightswitch-toggle-size': theme('width.6'),
|
|
19
21
|
'--rvc-lightswitch-toggle-bg-color': theme('colors.white'),
|
|
20
22
|
'--rvc-lightswitch-toggle-transition-property': theme('transitionProperty.transform'),
|
|
21
|
-
'--rvc-lightswitch-toggle-transition-duration': theme('transitionDuration.DEFAULT'),
|
|
22
|
-
'--rvc-lightswitch-toggle-transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
'.rvc-lightswitch-group': {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Modal component
|
|
5
3
|
*
|
|
@@ -7,25 +5,26 @@ import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
|
7
5
|
*/
|
|
8
6
|
export default (theme) => ({
|
|
9
7
|
':root': {
|
|
10
|
-
'--rvc-modal-backdrop-bg-color':
|
|
11
|
-
'--rvc-modal-border-color':
|
|
12
|
-
'--rvc-modal-border-width':
|
|
13
|
-
'--rvc-modal-border-style': '
|
|
14
|
-
'--rvc-modal-border-radius':
|
|
8
|
+
'--rvc-modal-backdrop-bg-color': 'var(--rvc-dialog-backdrop-bg-color)',
|
|
9
|
+
'--rvc-modal-border-color': 'var(--rvc-base-border-color)',
|
|
10
|
+
'--rvc-modal-border-width': 'var(--rvc-base-border-width)',
|
|
11
|
+
'--rvc-modal-border-style': 'var(--rvc-base-border-style)',
|
|
12
|
+
'--rvc-modal-border-radius': 'var(--rvc-base-border-radius)',
|
|
13
|
+
'--rvc-modal-padding-x': 'var(--rvc-dialog-padding-x)',
|
|
14
|
+
'--rvc-modal-padding-y': 'var(--rvc-dialog-padding-y)',
|
|
15
|
+
'--rvc-modal-header-bg-color': 'var(--rvc-dialog-header-bg-color)',
|
|
16
|
+
'--rvc-modal-title-font-size': 'var(--rvc-dialog-title-font-size)',
|
|
17
|
+
'--rvc-modal-title-font-weight': 'var(--rvc-dialog-title-font-weight)',
|
|
18
|
+
'--rvc-modal-title-font-family': 'var(--rvc-dialog-title-font-family)',
|
|
19
|
+
'--rvc-modal-title-color': 'var(--rvc-dialog-title-color)',
|
|
20
|
+
'--rvc-modal-close-size': 'var(--rvc-dialog-close-size)',
|
|
21
|
+
'--rvc-modal-close-color': 'var(--rvc-dialog-close-color)',
|
|
22
|
+
'--rvc-modal-close-color-hover': 'var(--rvc-dialog-close-color-hover)',
|
|
23
|
+
'--rvc-modal-content-bg-color': 'var(--rvc-dialog-content-bg-color)',
|
|
24
|
+
'--rvc-modal-footer-bg-color': 'var(--rvc-dialog-footer-bg-color)',
|
|
25
|
+
'--rvc-modal-footer-gap': 'var(--rvc-dialog-footer-gap)',
|
|
15
26
|
'--rvc-modal-box-shadow': theme('boxShadow.xl'),
|
|
16
27
|
'--rvc-modal-margin-y': 0,
|
|
17
|
-
'--rvc-modal-padding-x': theme('padding.4'),
|
|
18
|
-
'--rvc-modal-padding-y': theme('padding.4'),
|
|
19
|
-
'--rvc-modal-header-bg-color': theme('colors.slate.50'),
|
|
20
|
-
'--rvc-modal-title-font-size': theme('fontSize.xl'),
|
|
21
|
-
'--rvc-modal-title-font-weight': theme('fontWeight.bold'),
|
|
22
|
-
'--rvc-modal-title-color': theme('colors.slate.900'),
|
|
23
|
-
'--rvc-modal-close-size': theme('width.6'),
|
|
24
|
-
'--rvc-modal-close-color': theme('colors.slate.700'),
|
|
25
|
-
'--rvc-modal-close-color-hover': theme('colors.slate.900'),
|
|
26
|
-
'--rvc-modal-content-bg-color': theme('colors.white'),
|
|
27
|
-
'--rvc-modal-footer-bg-color': theme('colors.white'),
|
|
28
|
-
'--rvc-modal-footer-gap': theme('gap.2'),
|
|
29
28
|
},
|
|
30
29
|
|
|
31
30
|
'.rvc-modal': {
|
|
@@ -76,6 +75,7 @@ export default (theme) => ({
|
|
|
76
75
|
'.rvc-modal-title': {
|
|
77
76
|
fontSize: 'var(--rvc-modal-title-font-size)',
|
|
78
77
|
fontWeight: 'var(--rvc-modal-title-font-weight)',
|
|
78
|
+
fontFamily: 'var(--rvc-modal-title-font-family)',
|
|
79
79
|
color: 'var(--rvc-modal-title-color)',
|
|
80
80
|
...theme('components.modal[.rvc-modal-title]'),
|
|
81
81
|
},
|
|
@@ -126,9 +126,6 @@ export default (theme) => ({
|
|
|
126
126
|
|
|
127
127
|
// Larger screens
|
|
128
128
|
[`@media (min-width: ${theme('screens.sm')})`]: {
|
|
129
|
-
'--rvc-modal-padding-x': theme('padding.6'),
|
|
130
|
-
'--rvc-modal-padding-y': theme('padding.4'),
|
|
131
|
-
'--rvc-modal-footer-gap': theme('gap.3'),
|
|
132
129
|
...theme('components.modal[screen-sm]'),
|
|
133
130
|
},
|
|
134
131
|
},
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select component
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} theme - The global theme object
|
|
5
|
+
*/
|
|
6
|
+
export default (theme) => ({
|
|
7
|
+
':root': {
|
|
8
|
+
'--rvc-select-border-radius': 'var(--rvc-base-border-radius)',
|
|
9
|
+
'--rvc-select-border-width': 'var(--rvc-base-border-width)',
|
|
10
|
+
'--rvc-select-border-color': 'var(--rvc-base-border-color)',
|
|
11
|
+
'--rvc-select-font-size': 'var(--rvc-base-font-size)',
|
|
12
|
+
'--rvc-select-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
13
|
+
'--rvc-select-color': 'var(--rvc-input-color)',
|
|
14
|
+
'--rvc-select-bg-color': 'var(--rvc-input-bg-color)',
|
|
15
|
+
'--rvc-select-icon-size': 'var(--rvc-input-icon-size)',
|
|
16
|
+
'--rvc-select-icon-color': 'var(--rvc-input-icon-color)',
|
|
17
|
+
'--rvc-select-padding-y': 'var(--rvc-input-padding-y)',
|
|
18
|
+
'--rvc-select-padding-x': 'var(--rvc-input-padding-x)',
|
|
19
|
+
'--rvc-select-line-height': '1.375rem',
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'.rvc-select': {
|
|
23
|
+
display: 'grid',
|
|
24
|
+
gridTemplateColumns: theme('gridTemplateColumns.1'),
|
|
25
|
+
...theme('components.select'),
|
|
26
|
+
|
|
27
|
+
select: {
|
|
28
|
+
borderRadius: 'var(--rvc-select-border-radius)',
|
|
29
|
+
borderWidth: 'var(--rvc-select-border-width)',
|
|
30
|
+
borderColor: 'var(--rvc-select-border-color)',
|
|
31
|
+
paddingTop: 'var(--rvc-select-padding-y)',
|
|
32
|
+
paddingRight: 'var(--rvc-select-padding-x)',
|
|
33
|
+
paddingBottom: 'var(--rvc-select-padding-y)',
|
|
34
|
+
paddingLeft: 'calc(var(--rvc-select-padding-x) - var(--rvc-select-icon-size))',
|
|
35
|
+
backgroundColor: 'var(--rvc-select-bg-color)',
|
|
36
|
+
fontSize: 'var(--rvc-select-font-size)',
|
|
37
|
+
lineHeight: 'var(--rvc-select-line-height)',
|
|
38
|
+
color: 'var(--rvc-select-color)',
|
|
39
|
+
boxShadow: 'var(--rvc-select-box-shadow)',
|
|
40
|
+
width: '100%',
|
|
41
|
+
gridColumnStart: '1',
|
|
42
|
+
gridRowStart: '1',
|
|
43
|
+
appearance: 'none',
|
|
44
|
+
outlineWidth: 0,
|
|
45
|
+
...theme('components.select.select'),
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
svg: {
|
|
49
|
+
width: 'var(--rvc-select-icon-size)',
|
|
50
|
+
height: 'var(--rvc-select-icon-size)',
|
|
51
|
+
marginRight: 'calc(var(--rvc-select-padding-x) - var(--rvc-select-icon-size) - 2px)',
|
|
52
|
+
color: 'var(--rvc-select-icon-color)',
|
|
53
|
+
gridColumnStart: '1',
|
|
54
|
+
gridRowStart: '1',
|
|
55
|
+
alignSelf: 'center',
|
|
56
|
+
justifySelf: 'end',
|
|
57
|
+
pointerEvents: 'none',
|
|
58
|
+
...theme('components.select.svg'),
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export default (theme) => ({
|
|
7
7
|
':root': {
|
|
8
|
-
'--rvc-table-head-border-color':
|
|
9
|
-
'--rvc-table-border-color':
|
|
10
|
-
'--rvc-table-border-style': '
|
|
11
|
-
'--rvc-table-border-width':
|
|
8
|
+
'--rvc-table-head-border-color': 'var(--rvc-base-border-dark-color)',
|
|
9
|
+
'--rvc-table-border-color': 'var(--rvc-base-border-color)',
|
|
10
|
+
'--rvc-table-border-style': 'var(--rvc-base-border-style)',
|
|
11
|
+
'--rvc-table-border-width': 'var(--rvc-base-border-width)',
|
|
12
12
|
'--rvc-table-head-bg-color': theme('colors.slate.200'),
|
|
13
13
|
'--rvc-table-bg-color': theme('colors.slate.50'),
|
|
14
14
|
'--rvc-table-font-size': '0.875rem',
|
|
@@ -7,15 +7,15 @@ import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
|
7
7
|
*/
|
|
8
8
|
export default (theme) => ({
|
|
9
9
|
':root': {
|
|
10
|
+
'--rvc-tooltip-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
11
|
+
'--rvc-tooltip-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
12
|
+
'--rvc-tooltip-border-radius': 'var(--rvc-base-border-radius)',
|
|
10
13
|
'--rvc-tooltip-color': theme('colors.white'),
|
|
11
14
|
'--rvc-tooltip-transition-property': 'opacity, visibility',
|
|
12
|
-
'--rvc-tooltip-transition-duration': theme('transitionDuration.DEFAULT'),
|
|
13
|
-
'--rvc-tooltip-transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
|
|
14
15
|
'--rvc-tooltip-text-align': 'left',
|
|
15
16
|
'--rvc-tooltip-padding-x': theme('padding.4'),
|
|
16
17
|
'--rvc-tooltip-padding-y': theme('padding.4'),
|
|
17
18
|
'--rvc-tooltip-width': theme('width.max'),
|
|
18
|
-
'--rvc-tooltip-border-radius': theme('borderRadius.DEFAULT'),
|
|
19
19
|
'--rvc-tooltip-bg-color': withAlphaValue(theme('colors.neutral.700'), 0.6),
|
|
20
20
|
'--rvc-tooltip-arrow-size': theme('width.3'),
|
|
21
21
|
'--rvc-tooltip-blur-size': theme('blur.sm'),
|
package/dist/tailwind/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import checkbox from './components/checkbox.js';
|
|
|
12
12
|
import drawer from './components/drawer.js';
|
|
13
13
|
import lightswitch from './components/lightswitch.js';
|
|
14
14
|
import modal from './components/modal.js';
|
|
15
|
+
import select from './components/select.js';
|
|
15
16
|
import table from './components/table.js';
|
|
16
17
|
import tooltip from './components/tooltip.js';
|
|
17
18
|
|
|
@@ -37,6 +38,7 @@ export default plugin.withOptions(
|
|
|
37
38
|
drawer(theme),
|
|
38
39
|
lightswitch(theme),
|
|
39
40
|
modal(theme),
|
|
41
|
+
select(theme),
|
|
40
42
|
table(theme),
|
|
41
43
|
tooltip(theme),
|
|
42
44
|
], { respectPrefix: false });
|
|
@@ -54,6 +56,7 @@ export default plugin.withOptions(
|
|
|
54
56
|
'rvc-drawer',
|
|
55
57
|
'rvc-lightswitch-group',
|
|
56
58
|
'rvc-modal',
|
|
59
|
+
'rvc-select',
|
|
57
60
|
'rvc-table',
|
|
58
61
|
'rvc-tooltip',
|
|
59
62
|
],
|