@robuust-digital/vue-components 1.3.2 → 2.0.0-rc.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.
Files changed (73) hide show
  1. package/README.md +47 -52
  2. package/dist/_shared/ButtonBase-CQjlJ85F.js +87 -0
  3. package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +55 -0
  4. package/dist/_shared/FormInput-abFMz_J4.js +82 -0
  5. package/dist/_shared/Modal-COVlUEud.js +193 -0
  6. package/dist/_shared/Tooltip-BKXJoJ1x.js +126 -0
  7. package/dist/_shared/XMarkIcon-90mcPzBs.js +19 -0
  8. package/dist/_shared/icon-spinner-CmxIOqaK.js +26 -0
  9. package/dist/combobox/combobox.css +203 -0
  10. package/dist/combobox/index.js +349 -0
  11. package/dist/combobox/styles.css +1 -0
  12. package/dist/core/accordion.css +47 -0
  13. package/dist/core/alert.css +169 -0
  14. package/dist/core/badge.css +121 -0
  15. package/dist/core/button.css +393 -0
  16. package/dist/core/checkbox.css +60 -0
  17. package/dist/core/empty-state.css +56 -0
  18. package/dist/core/index.js +779 -0
  19. package/dist/core/input.css +92 -0
  20. package/dist/core/pagination.css +48 -0
  21. package/dist/core/radio.css +61 -0
  22. package/dist/core/select.css +81 -0
  23. package/dist/core/styles.css +92 -0
  24. package/dist/core/table.css +87 -0
  25. package/dist/core/tabs.css +74 -0
  26. package/dist/core/textarea.css +48 -0
  27. package/dist/core/theme.css +11 -0
  28. package/dist/dialogs/drawer.css +72 -0
  29. package/dist/dialogs/index.js +200 -0
  30. package/dist/dialogs/modal.css +98 -0
  31. package/dist/dialogs/styles.css +2 -0
  32. package/dist/dropdown/dropdown.css +89 -0
  33. package/dist/dropdown/index.js +136 -0
  34. package/dist/dropdown/styles.css +1 -0
  35. package/dist/lightswitch/index.js +48 -0
  36. package/dist/lightswitch/lightswitch.css +68 -0
  37. package/dist/lightswitch/styles.css +1 -0
  38. package/dist/rich-text-editor/index.js +262 -0
  39. package/dist/rich-text-editor/rich-text.css +83 -0
  40. package/dist/rich-text-editor/styles.css +1 -0
  41. package/dist/toast/index.js +100 -0
  42. package/dist/toast/styles.css +1 -0
  43. package/dist/toast/toast.css +187 -0
  44. package/dist/tooltip/index.js +5 -0
  45. package/dist/tooltip/styles.css +1 -0
  46. package/dist/tooltip/tooltip.css +69 -0
  47. package/package.json +55 -52
  48. package/dist/nuxt-module.js +0 -27
  49. package/dist/style.css +0 -1
  50. package/dist/tailwind/base/index.js +0 -72
  51. package/dist/tailwind/components/accordion.js +0 -59
  52. package/dist/tailwind/components/alert.js +0 -166
  53. package/dist/tailwind/components/badge.js +0 -119
  54. package/dist/tailwind/components/button.js +0 -292
  55. package/dist/tailwind/components/checkbox.js +0 -70
  56. package/dist/tailwind/components/combobox.js +0 -226
  57. package/dist/tailwind/components/drawer.js +0 -104
  58. package/dist/tailwind/components/dropdown.js +0 -97
  59. package/dist/tailwind/components/empty-state.js +0 -69
  60. package/dist/tailwind/components/input.js +0 -101
  61. package/dist/tailwind/components/lightswitch.js +0 -79
  62. package/dist/tailwind/components/modal.js +0 -132
  63. package/dist/tailwind/components/pagination.js +0 -62
  64. package/dist/tailwind/components/radio.js +0 -75
  65. package/dist/tailwind/components/rich-text.js +0 -100
  66. package/dist/tailwind/components/select.js +0 -88
  67. package/dist/tailwind/components/table.js +0 -109
  68. package/dist/tailwind/components/tabs.js +0 -95
  69. package/dist/tailwind/components/textarea.js +0 -53
  70. package/dist/tailwind/components/toast.js +0 -188
  71. package/dist/tailwind/components/tooltip.js +0 -74
  72. package/dist/tailwind/index.js +0 -94
  73. package/dist/vue-components.es.js +0 -2401
@@ -1,104 +0,0 @@
1
- /**
2
- * Drawer component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
7
- ':root': {
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)',
25
- '--rvc-drawer-footer-justify-content': 'space-between',
26
- },
27
-
28
- '.rvc-drawer': {
29
- zIndex: 500,
30
- position: 'relative',
31
- ...theme('components.drawer'),
32
-
33
- // Backdrop
34
- '.rvc-drawer-backdrop': {
35
- backgroundColor: 'var(--rvc-drawer-backdrop-bg-color)',
36
- ...theme('components.drawer[.rvc-drawer-backdrop]'),
37
- },
38
-
39
- // Header
40
- '.rvc-drawer-header': {
41
- paddingTop: 'var(--rvc-drawer-padding-y)',
42
- paddingRight: 'var(--rvc-drawer-padding-x)',
43
- paddingBottom: 'var(--rvc-drawer-padding-y)',
44
- paddingLeft: 'var(--rvc-drawer-padding-x)',
45
- borderColor: 'var(--rvc-drawer-border-color)',
46
- borderBottomWidth: 'var(--rvc-drawer-border-width)',
47
- borderBottomStyle: 'var(--rvc-drawer-border-style)',
48
- backgroundColor: 'var(--rvc-drawer-header-bg-color)',
49
- ...theme('components.drawer[.rvc-drawer-header]'),
50
- },
51
-
52
- // Title
53
- '.rvc-drawer-title': {
54
- fontSize: 'var(--rvc-drawer-title-font-size)',
55
- fontWeight: 'var(--rvc-drawer-title-font-weight)',
56
- color: 'var(--rvc-drawer-title-color)',
57
- fontFamily: 'var(--rvc-drawer-title-font-family)',
58
- ...theme('components.drawer[.rvc-drawer-title]'),
59
- },
60
-
61
- // Close
62
- '.rvc-drawer-close': {
63
- width: 'var(--rvc-drawer-close-size)',
64
- height: 'var(--rvc-drawer-close-size)',
65
- color: 'var(--rvc-drawer-close-color)',
66
- ...theme('components.drawer[.rvc-drawer-close]'),
67
-
68
- '&:hover': {
69
- color: 'var(--rvc-drawer-close-color-hover)',
70
- ...theme('components.drawer[.rvc-drawer-close][&:hover]'),
71
- },
72
- },
73
-
74
- // Content
75
- '.rvc-drawer-content': {
76
- paddingTop: 'var(--rvc-drawer-padding-y)',
77
- paddingRight: 'var(--rvc-drawer-padding-x)',
78
- paddingBottom: 'var(--rvc-drawer-padding-y)',
79
- paddingLeft: 'var(--rvc-drawer-padding-x)',
80
- backgroundColor: 'var(--rvc-drawer-content-bg-color)',
81
- ...theme('components.drawer[.rvc-drawer-content]'),
82
- },
83
-
84
- // Footer
85
- '.rvc-drawer-footer': {
86
- paddingTop: 'var(--rvc-drawer-padding-y)',
87
- paddingRight: 'var(--rvc-drawer-padding-x)',
88
- paddingBottom: 'var(--rvc-drawer-padding-y)',
89
- paddingLeft: 'var(--rvc-drawer-padding-x)',
90
- borderColor: 'var(--rvc-drawer-border-color)',
91
- borderTopWidth: 'var(--rvc-drawer-border-width)',
92
- borderTopStyle: 'var(--rvc-drawer-border-style)',
93
- backgroundColor: 'var(--rvc-drawer-footer-bg-color)',
94
- gap: 'var(--rvc-drawer-footer-gap)',
95
- justifyContent: 'var(--rvc-drawer-footer-justify-content)',
96
- ...theme('components.drawer[.rvc-drawer-footer]'),
97
- },
98
-
99
- // Larger screens
100
- [`@media (min-width: ${theme('screens.sm')})`]: {
101
- ...theme('components.drawer[screen-sm]'),
102
- },
103
- },
104
- });
@@ -1,97 +0,0 @@
1
- /**
2
- * Dropdown component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
7
- ':root': {
8
- '--rvc-dropdown-bg-color': 'var(--rvc-base-input-bg-color)',
9
- '--rvc-dropdown-border-radius': 'var(--rvc-base-border-radius)',
10
- '--rvc-dropdown-border-width': 'var(--rvc-base-border-width)',
11
- '--rvc-dropdown-border-color': 'var(--rvc-base-border-color)',
12
- '--rvc-dropdown-icon-size': 'var(--rvc-base-input-icon-size)',
13
- '--rvc-dropdown-icon-color': 'var(--rvc-base-input-icon-color)',
14
- '--rvc-dropdown-icon-color-hover': 'var(--rvc-base-input-icon-color)',
15
- '--rvc-dropdown-item-color': 'var(--rvc-base-input-color)',
16
- '--rvc-dropdown-font-size': 'var(--rvc-base-font-size)',
17
- '--rvc-dropdown-width': theme('width.56'),
18
- '--rvc-dropdown-padding-x': theme('padding.6'),
19
- '--rvc-dropdown-padding-y': theme('padding.6'),
20
- '--rvc-dropdown-gap': theme('gap.2'),
21
- '--rvc-dropdown-z-index': theme('zIndex.50'),
22
- '--rvc-dropdown-item-gap': theme('gap.3'),
23
- '--rvc-dropdown-item-border-radius': theme('borderRadius.none'),
24
- '--rvc-dropdown-item-bg-color': 'transparent',
25
- '--rvc-dropdown-item-bg-color-hover': 'transparent',
26
- '--rvc-dropdown-item-color-hover': theme('colors.slate.600'),
27
- '--rvc-dropdown-item-padding-x': theme('padding.0'),
28
- '--rvc-dropdown-item-padding-y': theme('padding.0'),
29
- },
30
-
31
- '.rvc-dropdown': {
32
- width: 'var(--rvc-dropdown-width)',
33
- backgroundColor: 'var(--rvc-dropdown-bg-color)',
34
- borderRadius: 'var(--rvc-dropdown-border-radius)',
35
- borderWidth: 'var(--rvc-dropdown-border-width)',
36
- borderColor: 'var(--rvc-dropdown-border-color)',
37
- paddingRight: 'var(--rvc-dropdown-padding-x)',
38
- paddingLeft: 'var(--rvc-dropdown-padding-x)',
39
- paddingTop: 'var(--rvc-dropdown-padding-y)',
40
- paddingBottom: 'var(--rvc-dropdown-padding-y)',
41
- fontSize: 'var(--rvc-dropdown-font-size)',
42
- gap: 'var(--rvc-dropdown-gap)',
43
- zIndex: 'var(--rvc-dropdown-z-index)',
44
- marginTop: theme('margin.1'),
45
- position: 'absolute',
46
- display: 'flex',
47
- flexDirection: 'column',
48
- alignItems: 'flex-start',
49
- right: '0',
50
- ...theme('components.dropdown'),
51
-
52
- '&.rvc-dropdown-left': {
53
- left: '0',
54
- right: 'auto',
55
- },
56
-
57
- '&.rvc-dropdown-full': {
58
- left: '0',
59
- right: '0',
60
- width: '100%',
61
- },
62
-
63
- '.rvc-dropdown-item': {
64
- color: 'var(--rvc-dropdown-item-color)',
65
- backgroundColor: 'var(--rvc-dropdown-item-bg-color)',
66
- gap: 'var(--rvc-dropdown-item-gap)',
67
- paddingRight: 'var(--rvc-dropdown-item-padding-x)',
68
- paddingLeft: 'var(--rvc-dropdown-item-padding-x)',
69
- paddingTop: 'var(--rvc-dropdown-item-padding-y)',
70
- paddingBottom: 'var(--rvc-dropdown-item-padding-y)',
71
- borderRadius: 'var(--rvc-dropdown-item-border-radius)',
72
- display: 'flex',
73
- alignItems: 'center',
74
- width: '100%',
75
- ...theme('components.dropdown[.rvc-dropdown-item]'),
76
-
77
- '&:hover': {
78
- color: 'var(--rvc-dropdown-item-color-hover)',
79
- backgroundColor: 'var(--rvc-dropdown-item-bg-color-hover)',
80
- textDecoration: 'underline',
81
- ...theme('components.dropdown[.rvc-dropdown-item][&:hover]'),
82
-
83
- '.rvc-dropdown-item-icon': {
84
- color: 'var(--rvc-dropdown-icon-color-hover)',
85
- ...theme('components.dropdown[.rvc-dropdown-item][&:hover][.rvc-dropdown-item-icon]'),
86
- },
87
- },
88
-
89
- '.rvc-dropdown-item-icon': {
90
- width: 'var(--rvc-dropdown-icon-size)',
91
- height: 'var(--rvc-dropdown-icon-size)',
92
- color: 'var(--rvc-dropdown-icon-color)',
93
- ...theme('components.dropdown[.rvc-dropdown-item][.rvc-dropdown-item-icon]'),
94
- },
95
- },
96
- },
97
- });
@@ -1,69 +0,0 @@
1
- /**
2
- * Empty State component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
7
- ':root': {
8
- '--rvc-empty-state-border-radius': 'var(--rvc-base-border-radius)',
9
- '--rvc-empty-state-color': theme('colors.slate.700'),
10
- '--rvc-empty-state-bg-color': theme('colors.slate.50'),
11
- '--rvc-empty-state-padding-x': theme('padding.12'),
12
- '--rvc-empty-state-padding-y': theme('padding.12'),
13
- '--rvc-empty-state-title-color': theme('colors.slate.900'),
14
- '--rvc-empty-state-title-fontweight': theme('fontWeight.medium'),
15
- '--rvc-empty-state-icon-size': theme('width.10'),
16
- '--rvc-empty-state-anchor-color': theme('colors.indigo.600'),
17
- '--rvc-empty-state-anchor-hover-color': theme('colors.indigo.800'),
18
- '--rvc-empty-state-anchor-decoration': 'underline',
19
- },
20
-
21
- '.rvc-empty-state': {
22
- color: 'var(--rvc-empty-state-color)',
23
- ...theme('components.emptyState-state'),
24
-
25
- '&.rvc-empty-state-bg': {
26
- backgroundColor: 'var(--rvc-empty-state-bg-color)',
27
- paddingTop: 'var(--rvc-empty-state-padding-y)',
28
- paddingBottom: 'var(--rvc-empty-state-padding-y)',
29
- paddingLeft: 'var(--rvc-empty-state-padding-x)',
30
- paddingRight: 'var(--rvc-empty-state-padding-x)',
31
- borderRadius: 'var(--rvc-empty-state-border-radius)',
32
- display: 'flex',
33
- flexDirection: 'column',
34
- alignItems: 'center',
35
- ...theme('components.emptyState[.rvc-empty-state-bg]'),
36
- },
37
-
38
- a: {
39
- textDecoration: 'var(--rvc-empty-state-anchor-decoration)',
40
- color: 'var(--rvc-empty-state-anchor-color)',
41
- ...theme('components.emptyState.a'),
42
-
43
- '&:hover': {
44
- color: 'var(--rvc-empty-state-anchor-hover-color)',
45
- ...theme('components.emptyState.a[&:hover]'),
46
- },
47
- },
48
-
49
- '.rvc-button': {
50
- marginTop: theme('margin.4'),
51
- ...theme('components.emptyState[.rvc-button]'),
52
- },
53
-
54
- '.rvc-empty-state-title': {
55
- color: 'var(--rvc-empty-state-title-color)',
56
- fontWeight: 'var(--rvc-empty-state-title-fontweight)',
57
- marginBottom: theme('margin.2'),
58
- display: 'block',
59
- ...theme('components.emptyState[.rvc-empty-state-title]'),
60
- },
61
-
62
- '.rvc-empty-state-icon': {
63
- width: 'var(--rvc-empty-state-icon-size)',
64
- height: 'var(--rvc-empty-state-icon-size)',
65
- marginBottom: theme('margin.2'),
66
- ...theme('components.emptyState[.rvc-empty-state-icon]'),
67
- },
68
- },
69
- });
@@ -1,101 +0,0 @@
1
- /**
2
- * Input component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
7
- ':root': {
8
- '--rvc-input-border-radius': 'var(--rvc-base-border-radius)',
9
- '--rvc-input-border-width': 'var(--rvc-base-border-width)',
10
- '--rvc-input-border-color': 'var(--rvc-base-border-color)',
11
- '--rvc-input-font-size': 'var(--rvc-base-input-font-size)',
12
- '--rvc-input-font-weight': 'var(--rvc-base-input-font-weight)',
13
- '--rvc-input-box-shadow': 'var(--rvc-base-box-shadow)',
14
- '--rvc-input-color': 'var(--rvc-base-input-color)',
15
- '--rvc-input-bg-color': 'var(--rvc-base-input-bg-color)',
16
- '--rvc-input-icon-size': 'var(--rvc-base-input-icon-size)',
17
- '--rvc-input-icon-color': 'var(--rvc-base-input-icon-color)',
18
- '--rvc-input-padding-x': 'var(--rvc-base-input-padding-x)',
19
- '--rvc-input-height': 'var(--rvc-base-input-height)',
20
- '--rvc-input-placeholder-color': 'var(--rvc-base-input-placeholder-color)',
21
- },
22
-
23
- '.rvc-input': {
24
- display: 'grid',
25
- gridTemplateColumns: theme('gridTemplateColumns.1'),
26
- ...theme('components.input'),
27
-
28
- input: {
29
- borderRadius: 'var(--rvc-input-border-radius)',
30
- borderWidth: 'var(--rvc-input-border-width)',
31
- borderColor: 'var(--rvc-input-border-color)',
32
- paddingRight: 'var(--rvc-input-padding-x)',
33
- paddingLeft: 'var(--rvc-input-padding-x)',
34
- backgroundColor: 'var(--rvc-input-bg-color)',
35
- fontSize: 'var(--rvc-input-font-size)',
36
- fontWeight: 'var(--rvc-input-font-weight)',
37
- color: 'var(--rvc-input-color)',
38
- boxShadow: 'var(--rvc-input-box-shadow)',
39
- height: 'var(--rvc-input-height)',
40
- backgroundImage: 'none',
41
- width: '100%',
42
- position: 'relative',
43
- gridColumnStart: '1',
44
- gridRowStart: '1',
45
- appearance: 'none',
46
- outlineWidth: 0,
47
- ...theme('components.input.input'),
48
-
49
- // Extra left padding
50
- '&:nth-child(2)': {
51
- paddingLeft: 'calc(var(--rvc-input-padding-x) + var(--rvc-input-icon-size) + 0.25rem)',
52
- },
53
-
54
- '&::placeholder': {
55
- color: 'var(--rvc-input-placeholder-color)',
56
- ...theme('components.input.input[&::placeholder]'),
57
- },
58
- },
59
-
60
- // Extra right padding
61
- '&:has(svg:last-child) input': {
62
- paddingRight: 'calc(var(--rvc-input-padding-x) + var(--rvc-input-icon-size) + 0.25rem)',
63
- },
64
-
65
- '.rvc-input-prefix, svg': {
66
- color: 'var(--rvc-input-icon-color)',
67
- position: 'relative',
68
- gridColumnStart: '1',
69
- gridRowStart: '1',
70
- alignSelf: 'center',
71
- pointerEvents: 'none',
72
- zIndex: '1',
73
- },
74
-
75
- '.rvc-input-prefix': {
76
- marginLeft: 'var(--rvc-input-padding-x)',
77
- justifySelf: 'start',
78
- ...theme('components.input[.rvc-input-prefix]'),
79
- },
80
-
81
- svg: {
82
- width: 'var(--rvc-input-icon-size)',
83
- height: 'var(--rvc-input-icon-size)',
84
- justifySelf: 'end',
85
- ...theme('components.input.svg'),
86
-
87
- '&:last-child:not(:first-child)': {
88
- marginRight: 'var(--rvc-input-padding-x)',
89
- },
90
- },
91
-
92
- // Size variants
93
- '&.rvc-input-sm': {
94
- '--rvc-input-font-size': 'calc(var(--rvc-base-input-font-size) * 0.9)',
95
- '--rvc-input-padding-x': 'calc(var(--rvc-base-input-padding-x) * 0.85)',
96
- '--rvc-input-icon-size': 'calc(var(--rvc-base-input-icon-size) * 0.85)',
97
- '--rvc-input-height': '1.875rem',
98
- ...theme('components.input.sm'),
99
- },
100
- },
101
- });
@@ -1,79 +0,0 @@
1
- /**
2
- * Lightswitch component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
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)',
12
- '--rvc-lightswitch-border-radius': theme('borderRadius.full'),
13
- '--rvc-lightswitch-height': '1.875rem',
14
- '--rvc-lightswitch-width': '3.125rem',
15
- '--rvc-lightswitch-bg-color': theme('colors.slate.200'),
16
- '--rvc-lightswitch-bg-color-enabled': theme('colors.green.400'),
17
- '--rvc-lightswitch-transition-property': theme('transitionProperty.colors'),
18
- '--rvc-lightswitch-label-offset': '0.5rem',
19
- '--rvc-lightswitch-toggle-offset': '0.1875rem',
20
- '--rvc-lightswitch-toggle-size': theme('width.6'),
21
- '--rvc-lightswitch-toggle-bg-color': theme('colors.white'),
22
- '--rvc-lightswitch-toggle-transition-property': theme('transitionProperty.transform'),
23
- },
24
-
25
- '.rvc-lightswitch-group': {
26
- display: 'inline-block',
27
- ...theme('components.lightswitch'),
28
-
29
- '&:has(label)': {
30
- display: 'inline-flex',
31
- alignItems: 'center',
32
- ...theme('components.lightswitch[&:has(label)]'),
33
- },
34
-
35
- label: {
36
- cursor: 'pointer',
37
- paddingLeft: 'var(--rvc-lightswitch-label-offset)',
38
- ...theme('components.lightswitch.label'),
39
- },
40
-
41
- '.rvc-lightswitch': {
42
- height: 'var(--rvc-lightswitch-height)',
43
- transitionProperty: 'var(--rvc-lightswitch-transition-property)',
44
- transitionDuration: 'var(--rvc-lightswitch-transition-duration)',
45
- transitionTimingFunction: 'var(--rvc-lightswitch-transition-timing-function)',
46
- width: 'var(--rvc-lightswitch-width)',
47
- borderRadius: 'var(--rvc-lightswitch-border-radius)',
48
- backgroundColor: 'var(--rvc-lightswitch-bg-color)',
49
- position: 'relative',
50
- display: 'inline-flex',
51
- alignItems: 'center',
52
- ...theme('components.lightswitch[.rvc-lightswitch]'),
53
-
54
- '.rvc-lightswitch-toggle': {
55
- width: 'var(--rvc-lightswitch-toggle-size)',
56
- height: 'var(--rvc-lightswitch-toggle-size)',
57
- transform: 'translateX(var(--rvc-lightswitch-toggle-offset))',
58
- borderRadius: 'var(--rvc-lightswitch-border-radius)',
59
- backgroundColor: 'var(--rvc-lightswitch-toggle-bg-color)',
60
- transitionProperty: 'var(--rvc-lightswitch-toggle-transition-property)',
61
- transitionDuration: 'var(--rvc-lightswitch-toggle-transition-duration)',
62
- transitionTimingFunction: 'var(--rvc-lightswitch-toggle-transition-timing-function)',
63
- display: 'inline-block',
64
- boxShadow: theme('boxShadow.md'),
65
- ...theme('components.lightswitch[.rvc-lightswitch][.rvc-lightswitch-toggle]'),
66
- },
67
-
68
- '&.rvc-lightswitch-enabled': {
69
- backgroundColor: 'var(--rvc-lightswitch-bg-color-enabled)',
70
- ...theme('components.lightswitch[.rvc-lightswitch][&.rvc-lightswitch-enabled]'),
71
-
72
- '.rvc-lightswitch-toggle': {
73
- transform: 'translateX(calc(var(--rvc-lightswitch-width) - var(--rvc-lightswitch-toggle-size) - var(--rvc-lightswitch-toggle-offset)))',
74
- ...theme('components.lightswitch[.rvc-lightswitch][&.rvc-lightswitch-enabled][.rvc-lightswitch-toggle]'),
75
- },
76
- },
77
- },
78
- },
79
- });
@@ -1,132 +0,0 @@
1
- /**
2
- * Modal component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
7
- ':root': {
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)',
26
- '--rvc-modal-box-shadow': theme('boxShadow.xl'),
27
- '--rvc-modal-margin-y': 0,
28
- },
29
-
30
- '.rvc-modal': {
31
- zIndex: 600,
32
- position: 'relative',
33
- ...theme('components.modal'),
34
-
35
- // Backdrop
36
- '.rvc-modal-backdrop': {
37
- backgroundColor: 'var(--rvc-modal-backdrop-bg-color)',
38
- ...theme('components.modal[.rvc-modal-backdrop]'),
39
- },
40
-
41
- // Panel
42
- '.rvc-modal-panel': {
43
- borderColor: 'var(--rvc-modal-border-color)',
44
- borderWidth: 'var(--rvc-modal-border-width)',
45
- borderStyle: 'var(--rvc-modal-border-style)',
46
- borderRadius: 'var(--rvc-modal-border-radius)',
47
- boxShadow: 'var(--rvc-modal-box-shadow)',
48
- marginTop: 'var(--rvc-modal-margin-y)',
49
- marginBottom: 'var(--rvc-modal-margin-y)',
50
- display: 'flex',
51
- height: '100%',
52
- flexDirection: 'column',
53
- position: 'relative',
54
- transform: 'translate(0, 0)',
55
- overflow: 'hidden',
56
- width: '100%',
57
- textAlign: 'left',
58
- ...theme('components.modal[.rvc-modal-panel]'),
59
- },
60
-
61
- // Header
62
- '.rvc-modal-header': {
63
- paddingTop: 'var(--rvc-modal-padding-y)',
64
- paddingRight: 'var(--rvc-modal-padding-x)',
65
- paddingBottom: 'var(--rvc-modal-padding-y)',
66
- paddingLeft: 'var(--rvc-modal-padding-x)',
67
- backgroundColor: 'var(--rvc-modal-header-bg-color)',
68
- borderBottomColor: 'var(--rvc-modal-border-color)',
69
- borderBottomWidth: 'var(--rvc-modal-border-width)',
70
- borderBottomStyle: 'var(--rvc-modal-border-style)',
71
- ...theme('components.modal[.rvc-modal-header]'),
72
- },
73
-
74
- // Title
75
- '.rvc-modal-title': {
76
- fontSize: 'var(--rvc-modal-title-font-size)',
77
- fontWeight: 'var(--rvc-modal-title-font-weight)',
78
- fontFamily: 'var(--rvc-modal-title-font-family)',
79
- color: 'var(--rvc-modal-title-color)',
80
- ...theme('components.modal[.rvc-modal-title]'),
81
- },
82
-
83
- // Close
84
- '.rvc-modal-close': {
85
- width: 'var(--rvc-modal-close-size)',
86
- height: 'var(--rvc-modal-close-size)',
87
- color: 'var(--rvc-modal-close-color)',
88
- ...theme('components.modal[.rvc-modal-close]'),
89
-
90
- '&:hover': {
91
- color: 'var(--rvc-modal-close-color-hover)',
92
- ...theme('components.modal[.rvc-modal-close][&:hover]'),
93
- },
94
- },
95
-
96
- // Content
97
- '.rvc-modal-content': {
98
- paddingTop: 'var(--rvc-modal-padding-y)',
99
- paddingRight: 'var(--rvc-modal-padding-x)',
100
- paddingBottom: 'var(--rvc-modal-padding-y)',
101
- paddingLeft: 'var(--rvc-modal-padding-x)',
102
- backgroundColor: 'var(--rvc-modal-content-bg-color)',
103
- ...theme('components.modal[.rvc-modal-content]'),
104
- },
105
-
106
- // Footer
107
- '.rvc-modal-footer': {
108
- paddingTop: 'var(--rvc-modal-padding-y)',
109
- paddingRight: 'var(--rvc-modal-padding-x)',
110
- paddingBottom: 'var(--rvc-modal-padding-y)',
111
- paddingLeft: 'var(--rvc-modal-padding-x)',
112
- gap: 'var(--rvc-modal-footer-gap)',
113
- backgroundColor: 'var(--rvc-modal-footer-bg-color)',
114
- borderTopColor: 'var(--rvc-modal-border-color)',
115
- borderTopWidth: 'var(--rvc-modal-border-width)',
116
- borderTopStyle: 'var(--rvc-modal-border-style)',
117
- display: 'flex',
118
- flexDirection: 'column',
119
- ...theme('components.modal[.rvc-modal-footer]'),
120
-
121
- [`@media (min-width: ${theme('screens.sm')})`]: {
122
- flexDirection: 'row-reverse',
123
- ...theme('components.modal[.rvc-modal-footer][screen-sm]'),
124
- },
125
- },
126
-
127
- // Larger screens
128
- [`@media (min-width: ${theme('screens.sm')})`]: {
129
- ...theme('components.modal[screen-sm]'),
130
- },
131
- },
132
- });
@@ -1,62 +0,0 @@
1
- /**
2
- * Pagination component
3
- *
4
- * @param {Object} theme - The global theme object
5
- */
6
- export default (theme) => ({
7
- ':root': {
8
- '--rvc-pagination-transition-duration': 'var(--rvc-base-transition-duration)',
9
- '--rvc-pagination-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
10
- '--rvc-pagination-border-radius': theme('borderRadius.md'),
11
- '--rvc-pagination-size': theme('width.6'),
12
- '--rvc-pagination-font-size': theme('fontSize.sm'),
13
- '--rvc-pagination-font-weight': theme('fontWeight.normal'),
14
- '--rvc-pagination-font-weight-active': theme('fontWeight.semibold'),
15
- '--rvc-pagination-color': theme('colors.slate.600'),
16
- '--rvc-pagination-color-active': theme('colors.slate.800'),
17
- '--rvc-pagination-transition-property': theme('transitionProperty.colors'),
18
- '--rvc-pagination-bg-color': 'transparent',
19
- '--rvc-pagination-bg-color-hover': theme('colors.slate.100'),
20
- '--rvc-pagination-info-color': theme('colors.slate.400'),
21
- '--rvc-pagination-info-font-size': theme('fontSize.sm'),
22
- },
23
-
24
- '.rvc-pagination': {
25
- ...theme('components.pagination'),
26
-
27
- '.rvc-pagination-button': {
28
- borderRadius: 'var(--rvc-pagination-border-radius)',
29
- width: 'var(--rvc-pagination-size)',
30
- height: 'var(--rvc-pagination-size)',
31
- fontSize: 'var(--rvc-pagination-font-size)',
32
- fontWeight: 'var(--rvc-pagination-font-weight)',
33
- color: 'var(--rvc-pagination-color)',
34
- transitionProperty: 'var(--rvc-pagination-transition-property)',
35
- transitionDuration: 'var(--rvc-pagination-transition-duration)',
36
- transitionTimingFunction: 'var(--rvc-pagination-transition-timing-function)',
37
- backgroundColor: 'var(--rvc-pagination-bg-color)',
38
- display: 'flex',
39
- alignItems: 'center',
40
- justifyContent: 'center',
41
- textAlign: 'center',
42
- ...theme('components.pagination[.rvc-pagination-button]'),
43
-
44
- '&.rvc-pagination-button-active': {
45
- fontWeight: 'var(--rvc-pagination-font-weight-active)',
46
- color: 'var(--rvc-pagination-color-active)',
47
- ...theme('components.pagination[.rvc-pagination-button-active]'),
48
- },
49
-
50
- '&:not([disabled]):hover': {
51
- backgroundColor: 'var(--rvc-pagination-bg-color-hover)',
52
- ...theme('components.pagination[.rvc-pagination-button]:not([disabled]):hover'),
53
- },
54
- },
55
-
56
- '.rvc-pagination-info': {
57
- fontSize: 'var(--rvc-pagination-info-font-size)',
58
- color: 'var(--rvc-pagination-info-color)',
59
- ...theme('components.pagination[.rvc-pagination-info]'),
60
- },
61
- },
62
- });