@robuust-digital/vue-components 1.1.0-rc.0 → 1.2.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/dist/style.css CHANGED
@@ -1 +1 @@
1
- .rvc-pointer-events-none{pointer-events:none}.rvc-pointer-events-auto{pointer-events:auto}.rvc-fixed{position:fixed}.rvc-absolute{position:absolute}.rvc-relative{position:relative}.rvc-sticky{position:sticky}.rvc-inset-0{top:0;right:0;bottom:0;left:0}.rvc-inset-y-0{top:0;bottom:0}.rvc-left-0{left:0}.rvc-right-0{right:0}.rvc-top-0{top:0}.rvc-z-10{z-index:10}.rvc-ml-3{margin-left:.75rem}.rvc-flex{display:flex}.rvc-size-full{width:100%;height:100%}.rvc-h-7{height:1.75rem}.rvc-h-full{height:100%}.rvc-min-h-0{min-height:0px}.rvc-w-full{width:100%}.rvc-w-screen{width:100vw}.rvc-max-w-full{max-width:100%}.rvc-max-w-xl{max-width:36rem}.rvc-flex-1{flex:1 1 0%}.rvc-shrink-0{flex-shrink:0}.rvc-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-flex-col{flex-direction:column}.rvc-flex-col-reverse{flex-direction:column-reverse}.rvc-items-center{align-items:center}.rvc-justify-between{justify-content:space-between}.rvc-overflow-hidden{overflow:hidden}.rvc-overflow-y-scroll{overflow-y:scroll}.rvc-pl-10{padding-left:2.5rem}.rvc-font-black{font-weight:900}.rvc-opacity-0{opacity:0}.rvc-opacity-100{opacity:1}.rvc-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.rvc-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-duration-500{transition-duration:.5s}.rvc-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 640px){.sm\:rvc-duration-700{transition-duration:.7s}}
1
+ .rvc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.rvc-pointer-events-none{pointer-events:none}.rvc-pointer-events-auto{pointer-events:auto}.rvc-invisible{visibility:hidden}.rvc-fixed{position:fixed}.rvc-absolute{position:absolute}.rvc-relative{position:relative}.rvc-sticky{position:sticky}.rvc-inset-0{top:0;right:0;bottom:0;left:0}.rvc-inset-y-0{top:0;bottom:0}.rvc-left-0{left:0}.rvc-right-0{right:0}.rvc-top-0{top:0}.rvc-z-10{z-index:10}.rvc--my-1{margin-top:-.25rem;margin-bottom:-.25rem}.rvc-mx-auto{margin-left:auto;margin-right:auto}.rvc-my-3{margin-top:.75rem;margin-bottom:.75rem}.rvc-my-4{margin-top:1rem;margin-bottom:1rem}.rvc--ml-2{margin-left:-.5rem}.rvc-mb-3{margin-bottom:.75rem}.rvc-mb-4{margin-bottom:1rem}.rvc-mb-6{margin-bottom:1.5rem}.rvc-mb-8{margin-bottom:2rem}.rvc-ml-2{margin-left:.5rem}.rvc-ml-3{margin-left:.75rem}.rvc-mt-3{margin-top:.75rem}.rvc-block{display:block}.rvc-flex{display:flex}.rvc-inline-flex{display:inline-flex}.rvc-table{display:table}.rvc-aspect-square{aspect-ratio:1 / 1}.rvc-size-4{width:1rem;height:1rem}.rvc-size-5{width:1.25rem;height:1.25rem}.rvc-size-6{width:1.5rem;height:1.5rem}.rvc-size-7{width:1.75rem;height:1.75rem}.rvc-size-full{width:100%;height:100%}.rvc-h-7{height:1.75rem}.rvc-h-full{height:100%}.rvc-min-h-0{min-height:0px}.rvc-min-h-full{min-height:100%}.rvc-w-fit{width:-moz-fit-content;width:fit-content}.rvc-w-full{width:100%}.rvc-w-screen{width:100vw}.rvc-max-w-full{max-width:100%}.rvc-max-w-xl{max-width:36rem}.rvc-flex-1{flex:1 1 0%}.rvc-shrink-0{flex-shrink:0}.rvc-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-x-3{--tw-translate-x: .75rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-cursor-pointer{cursor:pointer}.rvc-flex-row-reverse{flex-direction:row-reverse}.rvc-flex-col{flex-direction:column}.rvc-flex-col-reverse{flex-direction:column-reverse}.rvc-flex-wrap{flex-wrap:wrap}.rvc-items-start{align-items:flex-start}.rvc-items-center{align-items:center}.rvc-justify-start{justify-content:flex-start}.rvc-justify-center{justify-content:center}.rvc-justify-between{justify-content:space-between}.rvc-gap-1{gap:.25rem}.rvc-gap-3{gap:.75rem}.rvc-gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.rvc-gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.rvc-gap-y-3{row-gap:.75rem}.rvc-overflow-hidden{overflow:hidden}.rvc-overflow-x-auto{overflow-x:auto}.rvc-overflow-y-auto{overflow-y:auto}.rvc-overflow-y-scroll{overflow-y:scroll}.rvc-rounded-full{border-radius:9999px}.rvc-border{border-width:1px}.rvc-border-solid{border-style:solid}.rvc-border-neutral-500{--tw-border-opacity: 1;border-color:rgb(115 115 115 / var(--tw-border-opacity))}.rvc-bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.rvc-bg-green-300{--tw-bg-opacity: 1;background-color:rgb(134 239 172 / var(--tw-bg-opacity))}.rvc-bg-red-300{--tw-bg-opacity: 1;background-color:rgb(252 165 165 / var(--tw-bg-opacity))}.rvc-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.rvc-p-1{padding:.25rem}.rvc-p-4{padding:1rem}.rvc-px-12{padding-left:3rem;padding-right:3rem}.rvc-py-48{padding-top:12rem;padding-bottom:12rem}.rvc-pb-4{padding-bottom:1rem}.rvc-pl-10{padding-left:2.5rem}.rvc-text-left{text-align:left}.rvc-text-center{text-align:center}.rvc-text-right{text-align:right}.rvc-text-2xl{font-size:1.5rem;line-height:2rem}.rvc-text-3xl{font-size:1.875rem;line-height:2.25rem}.rvc-text-sm{font-size:.8125rem;line-height:1.25rem}.rvc-font-bold{font-weight:700}.rvc-font-medium{font-weight:500}.rvc-font-normal{font-weight:400}.rvc-font-semibold{font-weight:600}.rvc-text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.rvc-text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.rvc-text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.rvc-text-neutral-950{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity))}.rvc-text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.rvc-text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.rvc-text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.rvc-text-stone-600{--tw-text-opacity: 1;color:rgb(87 83 78 / var(--tw-text-opacity))}.rvc-opacity-0{opacity:0}.rvc-opacity-100{opacity:1}.rvc-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.rvc-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-duration-200{transition-duration:.2s}.rvc-duration-300{transition-duration:.3s}.rvc-duration-500{transition-duration:.5s}.rvc-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.rvc-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.rvc-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.rvc-peer\/checkbox:focus~.peer-focus\/checkbox\:rvc-focus{outline-style:var(--rvc-base-focus-outline-style);outline-width:var(--rvc-base-focus-outline-offset);outline-offset:var(--rvc-base-focus-outline-width);outline-color:var(--rvc-base-focus-outline-color)}.placeholder\:rvc-text-neutral-300::-moz-placeholder{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.placeholder\:rvc-text-neutral-300::placeholder{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.hover\:rvc-underline:hover{text-decoration-line:underline}.rvc-group\/accordion[open] .group-open\/accordion\:rvc-rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-group\/tooltip:hover .group-hover\/tooltip\:rvc-visible{visibility:visible}.rvc-group\/table:hover .group-hover\/table\:rvc-opacity-30{opacity:.3}.rvc-group\/tooltip:hover .group-hover\/tooltip\:rvc-opacity-100{opacity:1}@media (min-width: 640px){.sm\:rvc-max-w-3xl{max-width:48rem}.sm\:rvc-max-w-lg{max-width:32rem}.sm\:rvc-translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:rvc-scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:rvc-scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:rvc-p-0{padding:0}.sm\:rvc-duration-700{transition-duration:.7s}}@media (min-width: 768px){.md\:rvc-col-span-2{grid-column:span 2 / span 2}.md\:rvc-grid{display:grid}.md\:rvc-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:rvc-gap-6{gap:1.5rem}}@media (min-width: 1024px){.lg\:rvc-max-w-6xl{max-width:72rem}}.less-opacity-class .\[\.less-opacity-class_\&\]\:rvc-opacity-50{opacity:.5}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Base styles
3
+ *
4
+ * @param {Object} theme - The global theme object
5
+ */
6
+ export default (theme) => ({
7
+ ':root': {
8
+ '--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
11
+ '--rvc-base-focus-outline-color': theme('colors.indigo.600'),
12
+
13
+ ...theme('components.base'),
14
+ },
15
+
16
+ '*:focus, .rvc-focus': {
17
+ outlineStyle: 'var(--rvc-base-focus-outline-style)',
18
+ outlineWidth: 'var(--rvc-base-focus-outline-offset)',
19
+ outlineOffset: 'var(--rvc-base-focus-outline-width)',
20
+ outlineColor: 'var(--rvc-base-focus-outline-color)',
21
+ },
22
+ });
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Accordion component
3
+ *
4
+ * @param {Object} theme - The global theme object
5
+ */
6
+ export default (theme) => ({
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'),
11
+ '--rvc-accordion-padding-y': theme('padding.6'),
12
+ '--rvc-accordion-font-weight': theme('fontWeight.normal'),
13
+ '--rvc-accordion-font-size': theme('fontSize.base.0'),
14
+ '--rvc-accordion-color': theme('colors.slate.600'),
15
+ '--rvc-accordion-summary-font-weight': theme('fontWeight.medium'),
16
+ '--rvc-accordion-summary-font-size': theme('fontSize.lg.0'),
17
+ '--rvc-accordion-summary-color': theme('colors.black'),
18
+ '--rvc-accordion-summary-hover-decoration': 'underline',
19
+ },
20
+
21
+ '.rvc-accordion': {
22
+ ...theme('components.accordion'),
23
+
24
+ details: {
25
+ borderTopWidth: 'var(--rvc-accordion-border-width)',
26
+ borderTopColor: 'var(--rvc-accordion-border-color)',
27
+ },
28
+
29
+ summary: {
30
+ paddingTop: 'var(--rvc-accordion-padding-y)',
31
+ paddingBottom: 'var(--rvc-accordion-padding-y)',
32
+ fontWeight: 'var(--rvc-accordion-summary-font-weight)',
33
+ fontSize: 'var(--rvc-accordion-summary-font-size)',
34
+ color: 'var(--rvc-accordion-summary-color)',
35
+ width: theme('width.full'),
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ justifyContent: 'space-between',
39
+ cursor: 'pointer',
40
+ userSelect: 'none',
41
+
42
+ '&:hover': {
43
+ textDecoration: 'var(--rvc-accordion-summary-hover-decoration)',
44
+ },
45
+ },
46
+
47
+ '.rvc-accordion-content': {
48
+ paddingBottom: 'var(--rvc-accordion-padding-y)',
49
+ fontWeight: 'var(--rvc-accordion-font-weight)',
50
+ fontSize: 'var(--rvc-accordion-font-size)',
51
+ color: 'var(--rvc-accordion-color)',
52
+ },
53
+ },
54
+ });
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Alert component
3
+ *
4
+ * @param {Object} theme - The global theme object
5
+ */
6
+ export default (theme) => ({
7
+ ':root': {
8
+ // Custom properties
9
+ '--rvc-alert-padding-x': theme('padding.6'),
10
+ '--rvc-alert-padding-y': theme('padding.6'),
11
+ '--rvc-alert-border-radius': theme('borderRadius.md'),
12
+ '--rvc-alert-font-size': theme('fontSize.base.0'),
13
+ '--rvc-alert-gap': theme('gap[1.5]'),
14
+ '--rvc-alert-anchor-decoration': 'underline',
15
+ '--rvc-alert-icon-size': theme('width.6'),
16
+ '--rvc-alert-title-font-weight': theme('fontWeight.medium'),
17
+ '--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
+
21
+ // Default color variables
22
+ '--rvc-alert-bg-color': theme('colors.blue.50'),
23
+ '--rvc-alert-color': theme('colors.blue.700'),
24
+ '--rvc-alert-icon-color': theme('colors.blue.400'),
25
+ '--rvc-alert-icon-hover-color': theme('colors.blue.800'),
26
+ '--rvc-alert-title-color': theme('colors.blue.800'),
27
+ '--rvc-alert-close-bg-color': theme('colors.blue.100'),
28
+ '--rvc-alert-close-hover-bg-color': theme('colors.blue.200'),
29
+ '--rvc-alert-anchor-color': 'inherit',
30
+ '--rvc-alert-anchor-hover-color': theme('colors.blue.600'),
31
+ },
32
+
33
+ '.rvc-alert': {
34
+ gap: 'var(--rvc-alert-gap)',
35
+ paddingTop: 'var(--rvc-alert-padding-y)',
36
+ paddingBottom: 'var(--rvc-alert-padding-y)',
37
+ paddingLeft: 'var(--rvc-alert-padding-x)',
38
+ paddingRight: 'var(--rvc-alert-padding-x)',
39
+ borderRadius: 'var(--rvc-alert-border-radius)',
40
+ fontSize: 'var(--rvc-alert-font-size)',
41
+ backgroundColor: 'var(--rvc-alert-bg-color)',
42
+ color: 'var(--rvc-alert-color)',
43
+ display: 'flex',
44
+ position: 'relative',
45
+ overflow: 'hidden',
46
+ ...theme('components.alert'),
47
+
48
+ // Elements
49
+ a: {
50
+ textDecoration: 'var(--rvc-alert-anchor-decoration)',
51
+ transitionProperty: 'var(--rvc-alert-transition-property)',
52
+ transitionDuration: 'var(--rvc-alert-transition-duration)',
53
+ transitionTimingFunction: 'var(--rvc-alert-transition-timing-function)',
54
+ color: 'var(--rvc-alert-anchor-color)',
55
+
56
+ '&:hover': {
57
+ color: 'var(--rvc-alert-anchor-hover-color)',
58
+ },
59
+ },
60
+
61
+ 'ul, ol': {
62
+ listStylePosition: 'inside',
63
+ margin: 0,
64
+ paddingLeft: theme('padding.2'),
65
+ },
66
+
67
+ ul: {
68
+ listStyleType: 'disc',
69
+ },
70
+
71
+ ol: {
72
+ listStyleType: 'decimal',
73
+ },
74
+
75
+ '.rvc-alert-close': {
76
+ backgroundColor: 'var(--rvc-alert-close-bg-color)',
77
+ color: 'var(--rvc-alert-icon-color)',
78
+ borderBottomLeftRadius: 'var(--rvc-alert-border-radius)',
79
+ transitionProperty: 'var(--rvc-alert-transition-property)',
80
+ transitionDuration: 'var(--rvc-alert-transition-duration)',
81
+ transitionTimingFunction: 'var(--rvc-alert-transition-timing-function)',
82
+ display: 'inline-flex',
83
+ justifyContent: 'center',
84
+ alignItems: 'center',
85
+ position: 'absolute',
86
+ top: '0',
87
+ right: '0',
88
+ padding: theme('padding[1.5]'),
89
+
90
+ '&:hover': {
91
+ backgroundColor: 'var(--rvc-alert-close-hover-bg-color)',
92
+ color: 'var(--rvc-alert-icon-hover-color)',
93
+ },
94
+ },
95
+
96
+ '.rvc-alert-icon': {
97
+ width: 'var(--rvc-alert-icon-size)',
98
+ height: 'var(--rvc-alert-icon-size)',
99
+ color: 'var(--rvc-alert-icon-color)',
100
+ display: 'block',
101
+ flexShrink: '0',
102
+ },
103
+
104
+ '.rvc-alert-title': {
105
+ color: 'var(--rvc-alert-title-color)',
106
+ fontWeight: 'var(--rvc-alert-title-font-weight)',
107
+ display: 'block',
108
+ marginBottom: theme('margin.2'),
109
+
110
+ '&:last-child': {
111
+ marginBottom: '0',
112
+ },
113
+ },
114
+
115
+ // Color variants
116
+ '&.rvc-alert-info': {
117
+ ...theme('components.alert.info'),
118
+ },
119
+
120
+ '&.rvc-alert-warning': {
121
+ '--rvc-alert-bg-color': theme('colors.yellow.50'),
122
+ '--rvc-alert-color': theme('colors.yellow.700'),
123
+ '--rvc-alert-icon-color': theme('colors.yellow.400'),
124
+ '--rvc-alert-icon-hover-color': theme('colors.yellow.800'),
125
+ '--rvc-alert-title-color': theme('colors.yellow.800'),
126
+ '--rvc-alert-close-bg-color': theme('colors.yellow.100'),
127
+ '--rvc-alert-close-hover-bg-color': theme('colors.yellow.200'),
128
+ '--rvc-alert-anchor-hover-color': theme('colors.yellow.600'),
129
+ ...theme('components.alert.warning'),
130
+ },
131
+
132
+ '&.rvc-alert-success': {
133
+ '--rvc-alert-bg-color': theme('colors.green.50'),
134
+ '--rvc-alert-color': theme('colors.green.700'),
135
+ '--rvc-alert-icon-color': theme('colors.green.400'),
136
+ '--rvc-alert-icon-hover-color': theme('colors.green.800'),
137
+ '--rvc-alert-title-color': theme('colors.green.800'),
138
+ '--rvc-alert-close-bg-color': theme('colors.green.100'),
139
+ '--rvc-alert-close-hover-bg-color': theme('colors.green.200'),
140
+ '--rvc-alert-anchor-hover-color': theme('colors.green.600'),
141
+ ...theme('components.alert.success'),
142
+ },
143
+
144
+ '&.rvc-alert-danger': {
145
+ '--rvc-alert-bg-color': theme('colors.red.50'),
146
+ '--rvc-alert-color': theme('colors.red.700'),
147
+ '--rvc-alert-icon-color': theme('colors.red.400'),
148
+ '--rvc-alert-icon-hover-color': theme('colors.red.800'),
149
+ '--rvc-alert-title-color': theme('colors.red.800'),
150
+ '--rvc-alert-close-bg-color': theme('colors.red.100'),
151
+ '--rvc-alert-close-hover-bg-color': theme('colors.red.200'),
152
+ '--rvc-alert-anchor-hover-color': theme('colors.red.600'),
153
+ ...theme('components.alert.danger'),
154
+ },
155
+ },
156
+ });
@@ -6,218 +6,113 @@
6
6
  export default (theme) => {
7
7
  const customColors = theme('components.badge.custom') || {};
8
8
  const customColorStyles = Object.keys(customColors).reduce((acc, colorName) => {
9
- acc[`&.badge-custom-${colorName}`] = {
9
+ acc[`&.rvc-badge-custom-${colorName}`] = {
10
10
  ...customColors[colorName],
11
11
  };
12
12
  return acc;
13
13
  }, {});
14
14
 
15
15
  return {
16
- '.badge': {
16
+ ':root': {
17
+ // Custom properties
18
+ '--rvc-badge-height': theme('height.8'),
19
+ '--rvc-badge-padding-x': theme('padding.3'),
20
+ '--rvc-badge-padding-y': theme('padding.1.5'),
21
+ '--rvc-badge-font-weight': theme('fontWeight.medium'),
22
+ '--rvc-badge-border-radius': theme('borderRadius.full'),
23
+ '--rvc-badge-font-size': theme('fontSize.base.0'),
24
+ '--rvc-badge-gap': theme('gap.1'),
25
+
26
+ // Default color variables
27
+ '--rvc-badge-bg-color': '#fcffc4',
28
+ '--rvc-badge-color': '#576d07',
29
+ },
30
+
31
+ '.rvc-badge': {
32
+ height: 'var(--rvc-badge-height)',
33
+ paddingTop: 'var(--rvc-badge-padding-y)',
34
+ paddingBottom: 'var(--rvc-badge-padding-y)',
35
+ paddingLeft: 'var(--rvc-badge-padding-x)',
36
+ paddingRight: 'var(--rvc-badge-padding-x)',
37
+ fontWeight: 'var(--rvc-badge-font-weight)',
38
+ borderRadius: 'var(--rvc-badge-border-radius)',
39
+ fontSize: 'var(--rvc-badge-font-size)',
40
+ gap: 'var(--rvc-badge-gap)',
41
+ backgroundColor: 'var(--rvc-badge-bg-color)',
42
+ color: 'var(--rvc-badge-color)',
17
43
  display: 'inline-flex',
18
44
  alignItems: 'center',
19
45
  justifyContent: 'center',
20
46
  textAlign: 'center',
21
47
  position: 'relative',
22
48
  width: 'fit-content',
23
- paddingTop: theme('padding[0.5]'),
24
- paddingBottom: theme('padding[0.5]'),
25
- paddingLeft: theme('padding[2.5]'),
26
- paddingRight: theme('padding[2.5]'),
27
- fontWeight: theme('fontWeight.semibold'),
28
- borderRadius: theme('borderRadius.full'),
29
- borderWidth: theme('borderWidth.DEFAULT'),
30
- borderStyle: 'solid',
31
- fontSize: theme('fontSize.sm.0'),
32
- lineHeight: theme('lineHeight.5'),
33
- gap: theme('gap.1'),
34
49
  whiteSpace: 'nowrap',
35
50
  textDecoration: 'none',
36
51
  ...theme('components.badge'),
37
52
 
38
- '&[type=button], &:where(a.badge)': {
39
- transitionProperty: theme('transitionProperty.colors'),
40
- transitionDuration: theme('transitionDuration.300'),
41
- transitionTimingFunction: theme('transitionTimingFunction.DEFAULT'),
42
- },
43
-
44
53
  // Color variants
45
- '&.badge-primary': {
46
- backgroundColor: theme('colors.lime.300'),
47
- borderColor: theme('colors.lime.600'),
48
- color: theme('colors.lime.900'),
49
- ...theme('components.badge.primary'),
50
-
51
- '&[type=button]:hover, &:where(a.badge):hover': {
52
- backgroundColor: theme('colors.lime.200'),
53
- ...theme('components.badge.primary.hover'),
54
- },
55
- },
56
- '&.badge-primary-soft': {
57
- backgroundColor: theme('colors.lime.100'),
58
- borderColor: theme('colors.lime.300'),
59
- color: theme('colors.lime.500'),
60
- ...theme('components.badge.primary-soft'),
61
-
62
- '&[type=button]:hover, &:where(a.badge):hover': {
63
- backgroundColor: theme('colors.lime.200'),
64
- ...theme('components.badge.primary-soft.hover'),
65
- },
66
- },
67
- '&.badge-secondary': {
68
- backgroundColor: theme('colors.indigo.300'),
69
- borderColor: theme('colors.indigo.600'),
70
- color: theme('colors.indigo.900'),
71
- ...theme('components.badge.secondary'),
72
-
73
- '&[type=button]:hover, &:where(a.badge):hover': {
74
- backgroundColor: theme('colors.indigo.200'),
75
- ...theme('components.badge.secondary.hover'),
76
- },
54
+ '&.rvc-badge-default': {
55
+ ...theme('components.badge.default'),
77
56
  },
78
- '&.badge-secondary-soft': {
79
- backgroundColor: theme('colors.indigo.100'),
80
- borderColor: theme('colors.indigo.300'),
81
- color: theme('colors.indigo.500'),
82
- ...theme('components.badge.secondary-soft'),
83
57
 
84
- '&[type=button]:hover, &:where(a.badge):hover': {
85
- backgroundColor: theme('colors.indigo.200'),
86
- ...theme('components.badge.secondary-hover.hover'),
87
- },
58
+ '&.rvc-badge-gray': {
59
+ '--rvc-badge-bg-color': theme('colors.slate.100'),
60
+ '--rvc-badge-color': theme('colors.slate.700'),
61
+ ...theme('components.badge.gray'),
88
62
  },
89
- '&.badge-tertiary': {
90
- backgroundColor: theme('colors.orange.300'),
91
- borderColor: theme('colors.orange.600'),
92
- color: theme('colors.orange.900'),
93
- ...theme('components.badge.tertiary'),
94
63
 
95
- '&[type=button]:hover, &:where(a.badge):hover': {
96
- backgroundColor: theme('colors.orange.200'),
97
- ...theme('components.badge.tertiary.hover'),
98
- },
64
+ '&.rvc-badge-red': {
65
+ '--rvc-badge-bg-color': theme('colors.red.100'),
66
+ '--rvc-badge-color': theme('colors.red.700'),
67
+ ...theme('components.badge.red'),
99
68
  },
100
- '&.badge-tertiary-soft': {
101
- backgroundColor: theme('colors.orange.100'),
102
- borderColor: theme('colors.orange.300'),
103
- color: theme('colors.orange.500'),
104
- ...theme('components.badge.tertiary-soft'),
105
69
 
106
- '&[type=button]:hover, &:where(a.badge):hover': {
107
- backgroundColor: theme('colors.orange.200'),
108
- ...theme('components.badge.tertiary-soft.hover'),
109
- },
70
+ '&.rvc-badge-yellow': {
71
+ '--rvc-badge-bg-color': theme('colors.yellow.100'),
72
+ '--rvc-badge-color': theme('colors.yellow.700'),
73
+ ...theme('components.badge.yellow'),
110
74
  },
111
- '&.badge-danger': {
112
- backgroundColor: theme('colors.red.300'),
113
- borderColor: theme('colors.red.600'),
114
- color: theme('colors.red.900'),
115
- ...theme('components.badge.danger'),
116
75
 
117
- '&[type=button]:hover, &:where(a.badge):hover': {
118
- backgroundColor: theme('colors.red.200'),
119
- ...theme('components.badge.danger.hover'),
120
- },
76
+ '&.rvc-badge-green': {
77
+ '--rvc-badge-bg-color': theme('colors.green.100'),
78
+ '--rvc-badge-color': theme('colors.green.700'),
79
+ ...theme('components.badge.green'),
121
80
  },
122
- '&.badge-danger-soft': {
123
- backgroundColor: theme('colors.red.100'),
124
- borderColor: theme('colors.red.300'),
125
- color: theme('colors.red.500'),
126
- ...theme('components.badge.danger-soft'),
127
81
 
128
- '&[type=button]:hover, &:where(a.badge):hover': {
129
- backgroundColor: theme('colors.red.200'),
130
- ...theme('components.badge.danger-soft.hover'),
131
- },
82
+ '&.rvc-badge-blue': {
83
+ '--rvc-badge-bg-color': theme('colors.blue.100'),
84
+ '--rvc-badge-color': theme('colors.blue.700'),
85
+ ...theme('components.badge.blue'),
132
86
  },
133
- '&.badge-warning': {
134
- backgroundColor: theme('colors.yellow.300'),
135
- borderColor: theme('colors.yellow.600'),
136
- color: theme('colors.yellow.900'),
137
- ...theme('components.badge.warning'),
138
87
 
139
- '&[type=button]:hover, &:where(a.badge):hover': {
140
- backgroundColor: theme('colors.yellow.200'),
141
- ...theme('components.badge.warning.hover'),
142
- },
88
+ '&.rvc-badge-violet': {
89
+ '--rvc-badge-bg-color': theme('colors.violet.100'),
90
+ '--rvc-badge-color': theme('colors.violet.700'),
91
+ ...theme('components.badge.violet'),
143
92
  },
144
- '&.badge-warning-soft': {
145
- backgroundColor: theme('colors.yellow.100'),
146
- borderColor: theme('colors.yellow.300'),
147
- color: theme('colors.yellow.500'),
148
- ...theme('components.badge.warning-soft'),
149
93
 
150
- '&[type=button]:hover, &:where(a.badge):hover': {
151
- backgroundColor: theme('colors.yellow.200'),
152
- ...theme('components.badge.warning-soft.hover'),
153
- },
94
+ '&.rvc-badge-purple': {
95
+ '--rvc-badge-bg-color': theme('colors.purple.100'),
96
+ '--rvc-badge-color': theme('colors.purple.700'),
97
+ ...theme('components.badge.purple'),
154
98
  },
155
- '&.badge-success': {
156
- backgroundColor: theme('colors.green.300'),
157
- borderColor: theme('colors.green.600'),
158
- color: theme('colors.green.900'),
159
- ...theme('components.badge.success'),
160
99
 
161
- '&[type=button]:hover, &:where(a.badge):hover': {
162
- backgroundColor: theme('colors.green.200'),
163
- ...theme('components.badge.success.hover'),
164
- },
100
+ '&.rvc-badge-pink': {
101
+ '--rvc-badge-bg-color': theme('colors.pink.100'),
102
+ '--rvc-badge-color': theme('colors.pink.700'),
103
+ ...theme('components.badge.pink'),
165
104
  },
166
- '&.badge-success-soft': {
167
- backgroundColor: theme('colors.green.100'),
168
- borderColor: theme('colors.green.300'),
169
- color: theme('colors.green.500'),
170
- ...theme('components.badge.success-soft'),
171
105
 
172
- '&[type=button]:hover, &:where(a.badge):hover': {
173
- backgroundColor: theme('colors.green.200'),
174
- ...theme('components.badge.success-soft.hover'),
175
- },
176
- },
177
- '&.badge-light': {
178
- backgroundColor: theme('colors.stone.100'),
179
- borderColor: theme('colors.stone.500'),
180
- color: theme('colors.stone.700'),
181
- ...theme('components.badge.light'),
182
-
183
- '&[type=button]:hover, &:where(a.badge):hover': {
184
- backgroundColor: theme('colors.stone.200'),
185
- ...theme('components.badge.light.hover'),
186
- },
187
- },
188
- '&.badge-dark': {
189
- backgroundColor: theme('colors.stone.800'),
190
- borderColor: theme('colors.stone.500'),
191
- color: theme('colors.stone.100'),
192
- ...theme('components.badge.dark'),
193
-
194
- '&[type=button]:hover, &:where(a.badge):hover': {
195
- backgroundColor: theme('colors.stone.700'),
196
- ...theme('components.badge.dark.hover'),
197
- },
198
- },
199
- '&.badge-clear': {
200
- backgroundColor: theme('colors.transparent'),
201
- color: theme('colors.stone.800'),
202
- borderColor: theme('colors.transparent'),
203
- ...theme('components.badge.clear'),
204
-
205
- '&[type=button]:hover, &:where(a.badge):hover': {
206
- color: theme('colors.stone.700'),
207
- ...theme('components.badge.clear.hover'),
208
- },
209
- },
210
106
  ...customColorStyles,
211
107
 
212
108
  // Size variants
213
- '&.badge-lg': {
214
- paddingTop: theme('padding[1.5]'),
215
- paddingRight: theme('padding.4'),
216
- paddingBottom: theme('padding[1.5]'),
217
- paddingLeft: theme('padding.4'),
218
- fontSize: theme('fontSize.base.0'),
219
- gap: theme('gap.2'),
220
- ...theme('components.badge.lg'),
109
+ '&.rvc-badge-sm': {
110
+ '--rvc-badge-height': theme('height.6'),
111
+ '--rvc-badge-padding-x': theme('padding.2'),
112
+ '--rvc-badge-padding-y': theme('padding.1'),
113
+ '--rvc-badge-font-size': theme('fontSize.sm.0'),
114
+
115
+ ...theme('components.badge.sm'),
221
116
  },
222
117
  },
223
118
  };