@acorex/styles 7.1.1 → 7.1.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.
@@ -1,183 +1,183 @@
1
- const plugin = require('tailwindcss/plugin');
2
- const { withAnimations } = require('animated-tailwindcss');
3
-
4
- function withOpacityValue(variable) {
5
- return ({ opacityValue }) => {
6
- if (opacityValue === undefined) {
7
- return `rgb(var(${variable}))`;
8
- }
9
- return `rgb(var(${variable}) ,${opacityValue})`;
10
- };
11
- }
12
-
13
- const childSelector = plugin(function ({ addVariant }) {
14
- addVariant('child', '& > *');
15
- addVariant('child-hover', '& > *:hover');
16
- addVariant('child-focus', '& > *:focus');
17
- addVariant('child-focus-within', '& > *:focus-within');
18
- });
19
-
20
- module.exports = withAnimations({
21
- prefix: 'ax-',
22
- corePlugins: {
23
- preflight: false,
24
- },
25
- content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
26
- darkMode: 'class',
27
- theme: {
28
- extend: {
29
- colors: {
30
- ghost: {
31
- DEFAULT: withOpacityValue('--ax-color-ghost-500'),
32
- 50: withOpacityValue('--ax-color-ghost-50'),
33
- 100: withOpacityValue('--ax-color-ghost-100'),
34
- 200: withOpacityValue('--ax-color-ghost-200'),
35
- 300: withOpacityValue('--ax-color-ghost-300'),
36
- 400: withOpacityValue('--ax-color-ghost-400'),
37
- 500: withOpacityValue('--ax-color-ghost-500'),
38
- 600: withOpacityValue('--ax-color-ghost-600'),
39
- 700: withOpacityValue('--ax-color-ghost-700'),
40
- 800: withOpacityValue('--ax-color-ghost-800'),
41
- 900: withOpacityValue('--ax-color-ghost-900'),
42
- },
43
- primary: {
44
- DEFAULT: withOpacityValue('--ax-color-primary-500'),
45
- 50: withOpacityValue('--ax-color-primary-50'),
46
- 100: withOpacityValue('--ax-color-primary-100'),
47
- 200: withOpacityValue('--ax-color-primary-200'),
48
- 300: withOpacityValue('--ax-color-primary-300'),
49
- 400: withOpacityValue('--ax-color-primary-400'),
50
- 500: withOpacityValue('--ax-color-primary-500'),
51
- 600: withOpacityValue('--ax-color-primary-600'),
52
- 700: withOpacityValue('--ax-color-primary-700'),
53
- 800: withOpacityValue('--ax-color-primary-800'),
54
- 900: withOpacityValue('--ax-color-primary-900'),
55
- },
56
- secondary: {
57
- DEFAULT: withOpacityValue('--ax-color-secondary-500'),
58
- 50: withOpacityValue('--ax-color-secondary-50'),
59
- 100: withOpacityValue('--ax-color-secondary-100'),
60
- 200: withOpacityValue('--ax-color-secondary-200'),
61
- 300: withOpacityValue('--ax-color-secondary-300'),
62
- 400: withOpacityValue('--ax-color-secondary-400'),
63
- 500: withOpacityValue('--ax-color-secondary-500'),
64
- 600: withOpacityValue('--ax-color-secondary-600'),
65
- 700: withOpacityValue('--ax-color-secondary-700'),
66
- 800: withOpacityValue('--ax-color-secondary-800'),
67
- 900: withOpacityValue('--ax-color-secondary-900'),
68
- },
69
- success: {
70
- DEFAULT: withOpacityValue('--ax-color-success-500'),
71
- 50: withOpacityValue('--ax-color-success-50'),
72
- 100: withOpacityValue('--ax-color-success-100'),
73
- 200: withOpacityValue('--ax-color-success-200'),
74
- 300: withOpacityValue('--ax-color-success-300'),
75
- 400: withOpacityValue('--ax-color-success-400'),
76
- 500: withOpacityValue('--ax-color-success-500'),
77
- 600: withOpacityValue('--ax-color-success-600'),
78
- 700: withOpacityValue('--ax-color-success-700'),
79
- 800: withOpacityValue('--ax-color-success-800'),
80
- 900: withOpacityValue('--ax-color-success-900'),
81
- },
82
- danger: {
83
- DEFAULT: withOpacityValue('--ax-color-danger-500'),
84
- 50: withOpacityValue('--ax-color-danger-50'),
85
- 100: withOpacityValue('--ax-color-danger-100'),
86
- 200: withOpacityValue('--ax-color-danger-200'),
87
- 300: withOpacityValue('--ax-color-danger-300'),
88
- 400: withOpacityValue('--ax-color-danger-400'),
89
- 500: withOpacityValue('--ax-color-danger-500'),
90
- 600: withOpacityValue('--ax-color-danger-600'),
91
- 700: withOpacityValue('--ax-color-danger-700'),
92
- 800: withOpacityValue('--ax-color-danger-800'),
93
- 900: withOpacityValue('--ax-color-danger-900'),
94
- },
95
- warning: {
96
- DEFAULT: withOpacityValue('--ax-color-warning-500'),
97
- 50: withOpacityValue('--ax-color-warning-50'),
98
- 100: withOpacityValue('--ax-color-warning-100'),
99
- 200: withOpacityValue('--ax-color-warning-200'),
100
- 300: withOpacityValue('--ax-color-warning-300'),
101
- 400: withOpacityValue('--ax-color-warning-400'),
102
- 500: withOpacityValue('--ax-color-warning-500'),
103
- 600: withOpacityValue('--ax-color-warning-600'),
104
- 700: withOpacityValue('--ax-color-warning-700'),
105
- 800: withOpacityValue('--ax-color-warning-800'),
106
- 900: withOpacityValue('--ax-color-warning-900'),
107
- },
108
- },
109
- textColor: {
110
- DEFAULT: withOpacityValue('--ax-color-text-default'),
111
- default: withOpacityValue('--ax-color-text-default'),
112
- 'surface-fore': withOpacityValue('--ax-color-surface-fore'),
113
- 'on-surface-fore': withOpacityValue('--ax-color-on-surface-fore'),
114
- 'primary-fore': withOpacityValue('--ax-color-primary-fore'),
115
- 'secondary-fore': withOpacityValue('--ax-color-secondary-fore'),
116
- 'success-fore': withOpacityValue('--ax-color-success-fore'),
117
- 'warning-fore': withOpacityValue('--ax-color-warning-fore'),
118
- 'danger-fore': withOpacityValue('--ax-color-danger-fore'),
119
- 'ghost-fore': withOpacityValue('--ax-color-ghost-fore'),
120
- },
121
- backgroundColor: {
122
- default: withOpacityValue('--ax-color-background-default'),
123
- surface: withOpacityValue('--ax-color-surface'),
124
- 'on-surface': withOpacityValue('--ax-color-on-surface'),
125
- },
126
- borderColor: {
127
- DEFAULT: 'rgba(var(--ax-color-border-default))',
128
- default: 'rgba(var(--ax-color-border-default))',
129
- },
130
- maxWidth: {
131
- '8xl': '90rem',
132
- },
133
- borderRadius: {
134
- default: 'var(--ax-rounded-border-default)',
135
- },
136
- },
137
- },
138
-
139
- plugins: [
140
- plugin(function ({ addUtilities }) {
141
- const acorexClasses = {
142
- '.animate-fast': {
143
- animationDuration: '800ms',
144
- },
145
- '.animate-faster': {
146
- animationDuration: '500ms',
147
- },
148
- '.card': {
149
- backgroundColor: 'rgb(var(--ax-color-surface))',
150
- border: '1px solid',
151
- borderColor: 'rgb(var(--ax-color-border-default))',
152
- borderRadius: 'var(--ax-rounded-border-default)',
153
- },
154
- '.tabs-fit': {
155
- width: '100%',
156
- },
157
- '.skeleton': {
158
- position: 'relative',
159
- overflow: 'hidden',
160
- backgroundColor: 'rgba(var(--ax-color-ghost), 0.15)',
161
- },
162
- '.skeleton-animate': {},
163
- '.xs': {
164
- '--ax-size-default': '2rem',
165
- },
166
- '.sm': {
167
- '--ax-size-default': '2.25rem',
168
- },
169
- '.md': {
170
- '--ax-size-default': '2.5rem',
171
- },
172
- '.lg': {
173
- '--ax-size-default': '3rem',
174
- },
175
- '.xl': {
176
- '--ax-size-default': '3.5rem',
177
- },
178
- };
179
- addUtilities(acorexClasses, ['responsive', 'hover', 'focus']);
180
- }),
181
- childSelector,
182
- ],
183
- });
1
+ const plugin = require('tailwindcss/plugin');
2
+ const { withAnimations } = require('animated-tailwindcss');
3
+
4
+ function withOpacityValue(variable) {
5
+ return ({ opacityValue }) => {
6
+ if (opacityValue === undefined) {
7
+ return `rgb(var(${variable}))`;
8
+ }
9
+ return `rgb(var(${variable}) ,${opacityValue})`;
10
+ };
11
+ }
12
+
13
+ const childSelector = plugin(function ({ addVariant }) {
14
+ addVariant('child', '& > *');
15
+ addVariant('child-hover', '& > *:hover');
16
+ addVariant('child-focus', '& > *:focus');
17
+ addVariant('child-focus-within', '& > *:focus-within');
18
+ });
19
+
20
+ module.exports = withAnimations({
21
+ prefix: 'ax-',
22
+ corePlugins: {
23
+ preflight: false,
24
+ },
25
+ content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
26
+ darkMode: 'class',
27
+ theme: {
28
+ extend: {
29
+ colors: {
30
+ ghost: {
31
+ DEFAULT: withOpacityValue('--ax-color-ghost-500'),
32
+ 50: withOpacityValue('--ax-color-ghost-50'),
33
+ 100: withOpacityValue('--ax-color-ghost-100'),
34
+ 200: withOpacityValue('--ax-color-ghost-200'),
35
+ 300: withOpacityValue('--ax-color-ghost-300'),
36
+ 400: withOpacityValue('--ax-color-ghost-400'),
37
+ 500: withOpacityValue('--ax-color-ghost-500'),
38
+ 600: withOpacityValue('--ax-color-ghost-600'),
39
+ 700: withOpacityValue('--ax-color-ghost-700'),
40
+ 800: withOpacityValue('--ax-color-ghost-800'),
41
+ 900: withOpacityValue('--ax-color-ghost-900'),
42
+ },
43
+ primary: {
44
+ DEFAULT: withOpacityValue('--ax-color-primary-500'),
45
+ 50: withOpacityValue('--ax-color-primary-50'),
46
+ 100: withOpacityValue('--ax-color-primary-100'),
47
+ 200: withOpacityValue('--ax-color-primary-200'),
48
+ 300: withOpacityValue('--ax-color-primary-300'),
49
+ 400: withOpacityValue('--ax-color-primary-400'),
50
+ 500: withOpacityValue('--ax-color-primary-500'),
51
+ 600: withOpacityValue('--ax-color-primary-600'),
52
+ 700: withOpacityValue('--ax-color-primary-700'),
53
+ 800: withOpacityValue('--ax-color-primary-800'),
54
+ 900: withOpacityValue('--ax-color-primary-900'),
55
+ },
56
+ secondary: {
57
+ DEFAULT: withOpacityValue('--ax-color-secondary-500'),
58
+ 50: withOpacityValue('--ax-color-secondary-50'),
59
+ 100: withOpacityValue('--ax-color-secondary-100'),
60
+ 200: withOpacityValue('--ax-color-secondary-200'),
61
+ 300: withOpacityValue('--ax-color-secondary-300'),
62
+ 400: withOpacityValue('--ax-color-secondary-400'),
63
+ 500: withOpacityValue('--ax-color-secondary-500'),
64
+ 600: withOpacityValue('--ax-color-secondary-600'),
65
+ 700: withOpacityValue('--ax-color-secondary-700'),
66
+ 800: withOpacityValue('--ax-color-secondary-800'),
67
+ 900: withOpacityValue('--ax-color-secondary-900'),
68
+ },
69
+ success: {
70
+ DEFAULT: withOpacityValue('--ax-color-success-500'),
71
+ 50: withOpacityValue('--ax-color-success-50'),
72
+ 100: withOpacityValue('--ax-color-success-100'),
73
+ 200: withOpacityValue('--ax-color-success-200'),
74
+ 300: withOpacityValue('--ax-color-success-300'),
75
+ 400: withOpacityValue('--ax-color-success-400'),
76
+ 500: withOpacityValue('--ax-color-success-500'),
77
+ 600: withOpacityValue('--ax-color-success-600'),
78
+ 700: withOpacityValue('--ax-color-success-700'),
79
+ 800: withOpacityValue('--ax-color-success-800'),
80
+ 900: withOpacityValue('--ax-color-success-900'),
81
+ },
82
+ danger: {
83
+ DEFAULT: withOpacityValue('--ax-color-danger-500'),
84
+ 50: withOpacityValue('--ax-color-danger-50'),
85
+ 100: withOpacityValue('--ax-color-danger-100'),
86
+ 200: withOpacityValue('--ax-color-danger-200'),
87
+ 300: withOpacityValue('--ax-color-danger-300'),
88
+ 400: withOpacityValue('--ax-color-danger-400'),
89
+ 500: withOpacityValue('--ax-color-danger-500'),
90
+ 600: withOpacityValue('--ax-color-danger-600'),
91
+ 700: withOpacityValue('--ax-color-danger-700'),
92
+ 800: withOpacityValue('--ax-color-danger-800'),
93
+ 900: withOpacityValue('--ax-color-danger-900'),
94
+ },
95
+ warning: {
96
+ DEFAULT: withOpacityValue('--ax-color-warning-500'),
97
+ 50: withOpacityValue('--ax-color-warning-50'),
98
+ 100: withOpacityValue('--ax-color-warning-100'),
99
+ 200: withOpacityValue('--ax-color-warning-200'),
100
+ 300: withOpacityValue('--ax-color-warning-300'),
101
+ 400: withOpacityValue('--ax-color-warning-400'),
102
+ 500: withOpacityValue('--ax-color-warning-500'),
103
+ 600: withOpacityValue('--ax-color-warning-600'),
104
+ 700: withOpacityValue('--ax-color-warning-700'),
105
+ 800: withOpacityValue('--ax-color-warning-800'),
106
+ 900: withOpacityValue('--ax-color-warning-900'),
107
+ },
108
+ },
109
+ textColor: {
110
+ DEFAULT: withOpacityValue('--ax-color-text-default'),
111
+ default: withOpacityValue('--ax-color-text-default'),
112
+ 'surface-fore': withOpacityValue('--ax-color-surface-fore'),
113
+ 'on-surface-fore': withOpacityValue('--ax-color-on-surface-fore'),
114
+ 'primary-fore': withOpacityValue('--ax-color-primary-fore'),
115
+ 'secondary-fore': withOpacityValue('--ax-color-secondary-fore'),
116
+ 'success-fore': withOpacityValue('--ax-color-success-fore'),
117
+ 'warning-fore': withOpacityValue('--ax-color-warning-fore'),
118
+ 'danger-fore': withOpacityValue('--ax-color-danger-fore'),
119
+ 'ghost-fore': withOpacityValue('--ax-color-ghost-fore'),
120
+ },
121
+ backgroundColor: {
122
+ default: withOpacityValue('--ax-color-background-default'),
123
+ surface: withOpacityValue('--ax-color-surface'),
124
+ 'on-surface': withOpacityValue('--ax-color-on-surface'),
125
+ },
126
+ borderColor: {
127
+ DEFAULT: 'rgba(var(--ax-color-border-default))',
128
+ default: 'rgba(var(--ax-color-border-default))',
129
+ },
130
+ maxWidth: {
131
+ '8xl': '90rem',
132
+ },
133
+ borderRadius: {
134
+ default: 'var(--ax-rounded-border-default)',
135
+ },
136
+ },
137
+ },
138
+
139
+ plugins: [
140
+ plugin(function ({ addUtilities }) {
141
+ const acorexClasses = {
142
+ '.animate-fast': {
143
+ animationDuration: '800ms',
144
+ },
145
+ '.animate-faster': {
146
+ animationDuration: '500ms',
147
+ },
148
+ '.card': {
149
+ backgroundColor: 'rgb(var(--ax-color-surface))',
150
+ border: '1px solid',
151
+ borderColor: 'rgb(var(--ax-color-border-default))',
152
+ borderRadius: 'var(--ax-rounded-border-default)',
153
+ },
154
+ '.tabs-fit': {
155
+ width: '100%',
156
+ },
157
+ '.skeleton': {
158
+ position: 'relative',
159
+ overflow: 'hidden',
160
+ backgroundColor: 'rgba(var(--ax-color-ghost), 0.15)',
161
+ },
162
+ '.skeleton-animate': {},
163
+ '.xs': {
164
+ '--ax-size-default': '2rem',
165
+ },
166
+ '.sm': {
167
+ '--ax-size-default': '2.25rem',
168
+ },
169
+ '.md': {
170
+ '--ax-size-default': '2.5rem',
171
+ },
172
+ '.lg': {
173
+ '--ax-size-default': '3rem',
174
+ },
175
+ '.xl': {
176
+ '--ax-size-default': '3.5rem',
177
+ },
178
+ };
179
+ addUtilities(acorexClasses, ['responsive', 'hover', 'focus']);
180
+ }),
181
+ childSelector,
182
+ ],
183
+ });