@robuust-digital/vue-components 1.1.1 → 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-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-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-5{width:1.25rem;height:1.25rem}.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-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-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
+ });
@@ -4,59 +4,81 @@
4
4
  * @param {Object} theme - The global theme object
5
5
  */
6
6
  export default (theme) => ({
7
- '.alert': {
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)',
8
43
  display: 'flex',
9
44
  position: 'relative',
10
- width: '100%',
11
45
  overflow: 'hidden',
12
- paddingTop: theme('padding.6'),
13
- paddingBottom: theme('padding.6'),
14
- paddingLeft: theme('padding.6'),
15
- paddingRight: theme('padding.6'),
16
- borderRadius: theme('borderRadius.md'),
17
- borderStyle: 'solid',
18
- fontSize: theme('fontSize.base.0'),
19
- backgroundColor: theme('colors.blue.50'),
20
- color: theme('colors.blue.700'),
21
46
  ...theme('components.alert'),
22
47
 
48
+ // Elements
23
49
  a: {
24
- textDecoration: 'underline',
25
- color: 'inherit',
26
- ...theme('components.alert.link'),
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'),
27
65
  },
28
66
 
29
67
  ul: {
30
68
  listStyleType: 'disc',
31
- listStylePosition: 'inside',
32
- marginTop: '0',
33
- marginBottom: '0',
34
- marginLeft: theme('margin.2'),
35
- paddingLeft: '0',
36
- ...theme('components.alert.list'),
37
-
38
- li: {
39
- marginTop: '0',
40
- ...theme('components.alert.listitem'),
41
- },
42
69
  },
43
70
 
44
71
  ol: {
45
72
  listStyleType: 'decimal',
46
- listStylePosition: 'inside',
47
- marginTop: '0',
48
- marginBottom: '0',
49
- marginLeft: theme('margin.2'),
50
- paddingLeft: '0',
51
- ...theme('components.alert.orderedlist'),
52
-
53
- li: {
54
- marginTop: '0',
55
- ...theme('components.alert.orderedlistitem'),
56
- },
57
73
  },
58
74
 
59
- '.alert-close': {
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)',
60
82
  display: 'inline-flex',
61
83
  justifyContent: 'center',
62
84
  alignItems: 'center',
@@ -64,125 +86,71 @@ export default (theme) => ({
64
86
  top: '0',
65
87
  right: '0',
66
88
  padding: theme('padding[1.5]'),
67
- borderBottomLeftRadius: theme('borderRadius.md'),
68
- backgroundColor: theme('colors.blue.100'),
69
- color: theme('colors.blue.400'),
70
- transitionProperty: theme('transitionProperty.colors'),
71
- transitionDuration: theme('transitionDuration.300'),
72
- transitionTimingFunction: theme('transitionTimingFunction.DEFAULT'),
73
- ...theme('components.alert.close'),
74
89
 
75
90
  '&:hover': {
76
- backgroundColor: theme('colors.blue.200'),
77
- color: theme('colors.blue.800'),
78
- ...theme('components.alert.close.hover'),
91
+ backgroundColor: 'var(--rvc-alert-close-hover-bg-color)',
92
+ color: 'var(--rvc-alert-icon-hover-color)',
79
93
  },
80
94
  },
81
95
 
82
- '.alert-icon': {
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)',
83
100
  display: 'block',
84
- width: theme('width.6'),
85
- height: theme('height.6'),
86
- marginRight: theme('margin.1'),
87
- flexShrink: theme('flexShrink.0'),
88
- color: theme('colors.blue.400'),
89
- ...theme('components.alert.icon'),
101
+ flexShrink: '0',
90
102
  },
91
103
 
92
- '.alert-title': {
104
+ '.rvc-alert-title': {
105
+ color: 'var(--rvc-alert-title-color)',
106
+ fontWeight: 'var(--rvc-alert-title-font-weight)',
93
107
  display: 'block',
94
108
  marginBottom: theme('margin.2'),
95
- fontWeight: theme('fontWeight.medium'),
96
- color: theme('colors.blue.800'),
97
- ...theme('components.alert.title'),
98
109
 
99
110
  '&:last-child': {
100
111
  marginBottom: '0',
101
- ...theme('components.alert.title.last'),
102
112
  },
103
113
  },
104
114
 
105
115
  // Color variants
106
- '&.alert-warning': {
107
- backgroundColor: theme('colors.yellow.50'),
108
- color: theme('colors.yellow.700'),
109
- ...theme('components.alert.warning'),
110
-
111
- '.alert-close': {
112
- backgroundColor: theme('colors.yellow.100'),
113
- color: theme('colors.yellow.400'),
114
- ...theme('components.alert.warning.close'),
115
-
116
- '&:hover': {
117
- backgroundColor: theme('colors.yellow.200'),
118
- color: theme('colors.yellow.800'),
119
- ...theme('components.alert.warning.close.hover'),
120
- },
121
- },
122
-
123
- '.alert-icon': {
124
- color: theme('colors.yellow.400'),
125
- ...theme('components.alert.warning.icon'),
126
- },
127
-
128
- '.alert-title': {
129
- color: theme('colors.yellow.800'),
130
- ...theme('components.alert.warning.title'),
131
- },
116
+ '&.rvc-alert-info': {
117
+ ...theme('components.alert.info'),
132
118
  },
133
- '&.alert-success': {
134
- backgroundColor: theme('colors.green.50'),
135
- color: theme('colors.green.700'),
136
- ...theme('components.alert.success'),
137
-
138
- '.alert-close': {
139
- backgroundColor: theme('colors.green.100'),
140
- color: theme('colors.green.400'),
141
- ...theme('components.alert.success.close'),
142
-
143
- '&:hover': {
144
- backgroundColor: theme('colors.green.200'),
145
- color: theme('colors.green.800'),
146
- ...theme('components.alert.success.close.hover'),
147
- },
148
- },
149
119
 
150
- '.alert-icon': {
151
- color: theme('colors.green.400'),
152
- ...theme('components.alert.success.icon'),
153
- },
154
-
155
- '.alert-title': {
156
- color: theme('colors.green.800'),
157
- ...theme('components.alert.success.title'),
158
- },
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'),
159
130
  },
160
- '&.alert-danger': {
161
- backgroundColor: theme('colors.red.50'),
162
- color: theme('colors.red.700'),
163
- ...theme('components.alert.danger'),
164
-
165
- '.alert-close': {
166
- backgroundColor: theme('colors.red.100'),
167
- color: theme('colors.red.400'),
168
- ...theme('components.alert.danger.close'),
169
131
 
170
- '&:hover': {
171
- backgroundColor: theme('colors.red.200'),
172
- color: theme('colors.red.800'),
173
- ...theme('components.alert.danger.close.hover'),
174
- },
175
- },
176
-
177
- '.alert-icon': {
178
- color: theme('colors.red.400'),
179
- ...theme('components.alert.danger.icon'),
180
- },
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
+ },
181
143
 
182
- '.alert-title': {
183
- color: theme('colors.red.800'),
184
- ...theme('components.alert.danger.title'),
185
- },
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'),
186
154
  },
187
155
  },
188
156
  });