@robuust-digital/vue-components 1.2.2 → 1.2.3

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 CHANGED
@@ -38,14 +38,8 @@ export default {
38
38
  // Customize component styles here
39
39
  components: (theme) => ({
40
40
  button: {
41
- primary: {
42
- backgroundColor: theme('colors.yellow.500'),
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,50 @@
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.09375rem', // 1.5px
10
- '--rvc-base-focus-outline-width': '0.09375rem', // 1.5px
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
+
27
+ // Base Dialog styling
28
+ '--rvc-dialog-backdrop-bg-color': withAlphaValue(theme('colors.slate.900'), 0.5),
29
+ '--rvc-dialog-padding-x': theme('padding.4'),
30
+ '--rvc-dialog-padding-y': theme('padding.4'),
31
+ '--rvc-dialog-header-bg-color': theme('colors.white'),
32
+ '--rvc-dialog-close-size': theme('width.6'),
33
+ '--rvc-dialog-close-color': theme('colors.slate.700'),
34
+ '--rvc-dialog-close-color-hover': theme('colors.slate.900'),
35
+ '--rvc-dialog-title-color': theme('colors.slate.900'),
36
+ '--rvc-dialog-title-font-size': theme('fontSize.xl'),
37
+ '--rvc-dialog-title-font-weight': theme('fontWeight.bold'),
38
+ '--rvc-dialog-title-font-family': theme('fontFamily.sans'),
39
+ '--rvc-dialog-content-bg-color': theme('colors.white'),
40
+ '--rvc-dialog-footer-bg-color': theme('colors.slate.50'),
41
+ '--rvc-dialog-footer-gap': theme('gap.2'),
42
+
13
43
  ...theme('components.base'),
44
+
45
+ [`@media (min-width: ${theme('screens.sm')})`]: {
46
+ '--rvc-dialog-padding-x': theme('padding.6'),
47
+ '--rvc-dialog-padding-y': theme('padding.4'),
48
+ '--rvc-dialog-footer-gap': theme('gap.3'),
49
+ ...theme('components.base[screen-sm]'),
50
+ },
14
51
  },
15
52
 
16
- '*:focus, .rvc-focus': {
53
+ '[class^="rvc-"] *:focus, [class^="rvc-"]:focus, .rvc-focus': {
17
54
  outlineStyle: 'var(--rvc-base-focus-outline-style)',
18
55
  outlineWidth: 'var(--rvc-base-focus-outline-offset)',
19
56
  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': theme('borderWidth.DEFAULT'),
9
- '--rvc-accordion-border-style': theme('borderStyle.solid'),
10
- '--rvc-accordion-border-color': theme('colors.slate.200'),
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': withAlphaValue(theme('colors.slate.900'), 0.5),
11
- '--rvc-drawer-padding-x': theme('padding.4'),
12
- '--rvc-drawer-padding-y': theme('padding.4'),
13
- '--rvc-drawer-border-color': theme('colors.slate.200'),
14
- '--rvc-drawer-border-width': theme('borderWidth.DEFAULT'),
15
- '--rvc-drawer-border-style': 'solid',
16
- '--rvc-drawer-header-bg-color': theme('colors.white'),
17
- '--rvc-drawer-title-font-size': theme('fontSize.2xl'),
18
- '--rvc-drawer-title-font-weight': theme('fontWeight.bold'),
19
- '--rvc-drawer-title-color': theme('colors.slate.900'),
20
- '--rvc-drawer-close-size': theme('width.6'),
21
- '--rvc-drawer-close-color': theme('colors.slate.700'),
22
- '--rvc-drawer-close-color-hover': theme('colors.slate.900'),
23
- '--rvc-drawer-content-bg-color': theme('colors.white'),
24
- '--rvc-drawer-footer-bg-color': theme('colors.slate.50'),
25
- '--rvc-drawer-footer-gap': theme('gap.3'),
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': withAlphaValue(theme('colors.slate.900'), 0.5),
11
- '--rvc-modal-border-color': theme('colors.slate.200'),
12
- '--rvc-modal-border-width': theme('borderWidth.DEFAULT'),
13
- '--rvc-modal-border-style': 'solid',
14
- '--rvc-modal-border-radius': theme('borderRadius.DEFAULT'),
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
  },
@@ -5,10 +5,10 @@
5
5
  */
6
6
  export default (theme) => ({
7
7
  ':root': {
8
- '--rvc-table-head-border-color': theme('colors.slate.300'),
9
- '--rvc-table-border-color': theme('colors.slate.200'),
10
- '--rvc-table-border-style': 'solid',
11
- '--rvc-table-border-width': theme('borderWidth.DEFAULT'),
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robuust-digital/vue-components",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "description": "A modern and customizable component library built with **Vue 3** and **Tailwind CSS**, designed to deliver a flexible, cohesive UI experience across all projects. Quickly integrate reusable components with ease, and customize them to suit your unique branding needs.",
6
6
  "directories": {