@acorex/styles 7.23.0 → 7.23.2

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/tailwind-base.js CHANGED
@@ -1,235 +1,235 @@
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
- const _colors = {
21
- ghost: 'rgba(var(--ax-color-ghost), <alpha-value>)',
22
- 'ghost-fore': 'rgba(var(--ax-color-ghost-fore), <alpha-value>)',
23
-
24
- surface: 'rgba(var(--ax-color-surface), <alpha-value>)',
25
- 'surface-fore': 'rgba(var(--ax-color-surface-fore), <alpha-value>)',
26
-
27
- 'on-surface': 'rgba(var(--ax-color-on-surface), <alpha-value>)',
28
- 'on-surface-fore': 'rgba(var(--ax-color-on-surface-fore), <alpha-value>)',
29
-
30
- 'input-surface': 'rgba(var(--ax-color-input-surface), <alpha-value>)',
31
- 'input-surface-fore':
32
- 'rgba(var(--ax-color-input-surface-fore), <alpha-value>)',
33
- };
34
-
35
- const createPalete = function (colorName) {
36
- return {
37
- DEFAULT: `rgba(var(--ax-color-${colorName}-500), <alpha-value>)`,
38
- fore: `rgba(var(--ax-color-${colorName}-fore), <alpha-value>)`,
39
- 'fore-tint': `rgba(var(--ax-color-${colorName}-fore-tint), <alpha-value>)`,
40
- 50: `rgba(var(--ax-color-${colorName}-50), <alpha-value>)`,
41
- 100: `rgba(var(--ax-color-${colorName}-100), <alpha-value>)`,
42
- 200: `rgba(var(--ax-color-${colorName}-200), <alpha-value>)`,
43
- 300: `rgba(var(--ax-color-${colorName}-300), <alpha-value>)`,
44
- 400: `rgba(var(--ax-color-${colorName}-400), <alpha-value>)`,
45
- 500: `rgba(var(--ax-color-${colorName}-500), <alpha-value>)`,
46
- 600: `rgba(var(--ax-color-${colorName}-600), <alpha-value>)`,
47
- 700: `rgba(var(--ax-color-${colorName}-700), <alpha-value>)`,
48
- 800: `rgba(var(--ax-color-${colorName}-800), <alpha-value>)`,
49
- 900: `rgba(var(--ax-color-${colorName}-900), <alpha-value>)`,
50
- 950: `rgba(var(--ax-color-${colorName}-950), <alpha-value>)`,
51
- };
52
- };
53
-
54
- module.exports = withAnimations({
55
- prefix: 'ax-',
56
- content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
57
- darkMode: 'class',
58
- theme: {
59
- extend: {
60
- colors: {
61
- primary: createPalete('primary'),
62
- secondary: createPalete('secondary'),
63
- success: createPalete('success'),
64
- danger: createPalete('danger'),
65
- warning: createPalete('warning'),
66
- info: createPalete('info'),
67
- neutral: createPalete('neutral'),
68
- ..._colors,
69
- },
70
- textColor: {
71
- DEFAULT: withOpacityValue('--ax-color-text-default'),
72
- default: withOpacityValue('--ax-color-text-default'),
73
- ..._colors,
74
- },
75
- backgroundColor: {
76
- default: 'rgba(var(--ax-color-background-default), <alpha-value>)',
77
- 'border-default': 'rgba(var(--ax-color-border-default), <alpha-value>)',
78
- },
79
-
80
- borderColor: {
81
- DEFAULT: 'rgba(var(--ax-color-border-default), <alpha-value>)',
82
- default: 'rgba(var(--ax-color-border-default), <alpha-value>)',
83
- ..._colors,
84
- },
85
- maxWidth: {
86
- '8xl': '90rem',
87
- },
88
- borderRadius: {
89
- default: 'var(--ax-rounded-border-default)',
90
- },
91
- lineHeight: {
92
- 11: '2.5rem',
93
- 12: '3rem',
94
- 12: '3rem',
95
- 14: '3.5rem',
96
- 16: '4rem',
97
- 20: '5rem',
98
- },
99
- spacing: {
100
- default: 'var(--ax-size-default)',
101
- },
102
- minWidth: {
103
- default: 'var(--ax-size-default)',
104
- },
105
- width: {
106
- default: 'var(--ax-size-default)',
107
- },
108
- maxHeight: {
109
- default: 'var(--ax-size-default)',
110
- },
111
- minHeight: {
112
- default: 'var(--ax-size-default)',
113
- },
114
- height: {
115
- default: 'var(--ax-size-default)',
116
- },
117
- maxHeight: {
118
- default: 'var(--ax-size-default)',
119
- },
120
- },
121
- },
122
- corePlugins: {
123
- preflight: false,
124
- },
125
- plugins: [
126
- plugin(function ({ addUtilities }) {
127
- const acorexClasses = {
128
- '.h1': {
129
- 'font-size': '3rem',
130
- 'font-weight': '700',
131
- 'line-height': '3rem',
132
- },
133
- '.h2': {
134
- 'font-size': '2.5rem',
135
- 'font-weight': '700',
136
- 'line-height': '2.5rem',
137
- },
138
- '.h3': {
139
- 'font-size': '1.875rem',
140
- 'font-weight': '700',
141
- 'line-height': '1.875rem',
142
- },
143
- '.h4': {
144
- 'font-size': '1.5rem',
145
- 'font-weight': '700',
146
- 'line-height': '1.5rem',
147
- },
148
- '.h5': {
149
- 'font-size': '1.25rem',
150
- 'font-weight': '700',
151
- 'line-height': '1.25rem',
152
- },
153
- '.h6': {
154
- 'font-size': '1.125rem',
155
- 'font-weight': '700',
156
- 'line-height': '1.125rem',
157
- },
158
- '.heading': {
159
- width: '100%',
160
- 'border-bottom': '1px solid',
161
- 'border-color': 'rgba(var(--ax-color-border-default))',
162
- 'line-height': '0.1em',
163
- margin: '1rem auto',
164
- },
165
- '.heading > span': {
166
- background: 'rgba(var(--ax-color-surface))',
167
- padding: '0 0.75rem',
168
- },
169
- '.heading-start': {
170
- 'text-align': 'start',
171
- },
172
- '.heading-center': {
173
- 'text-align': 'center',
174
- },
175
- '.heading-end': {
176
- 'text-align': 'end',
177
- },
178
- '.link': {
179
- color: 'rgba(var(--ax-color-primary-500))',
180
- cursor: 'pointer',
181
- },
182
- '.link:hover': {
183
- 'text-decoration': 'underline',
184
- },
185
- '.link:visited': {
186
- color: 'rgba(var(--ax-color-primary-700))',
187
- },
188
- '.animate-slow': {
189
- animationDuration: '2s',
190
- },
191
- '.animate-slower': {
192
- animationDuration: '3s',
193
- },
194
- '.animate-2xslower': {
195
- animationDuration: '5s',
196
- },
197
- '.animate-fast': {
198
- animationDuration: '800ms',
199
- },
200
- '.animate-faster': {
201
- animationDuration: '500ms',
202
- },
203
- '.animate-2xfaster': {
204
- animationDuration: '250ms',
205
- },
206
- '.card': {
207
- backgroundColor: 'rgb(var(--ax-color-surface))',
208
- border: '1px solid',
209
- borderColor: 'rgb(var(--ax-color-border-default))',
210
- borderRadius: 'var(--ax-rounded-border-default)',
211
- },
212
- '.tabs-fit': {
213
- width: '100%',
214
- },
215
- '.xs': {
216
- '--ax-size-default': '2rem',
217
- },
218
- '.sm': {
219
- '--ax-size-default': '2.25rem',
220
- },
221
- '.md': {
222
- '--ax-size-default': '2.5rem',
223
- },
224
- '.lg': {
225
- '--ax-size-default': '3rem',
226
- },
227
- '.xl': {
228
- '--ax-size-default': '3.5rem',
229
- },
230
- };
231
- addUtilities(acorexClasses, ['responsive', 'hover', 'focus']);
232
- }),
233
- childSelector,
234
- ],
235
- });
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
+ const _colors = {
21
+ ghost: 'rgba(var(--ax-color-ghost), <alpha-value>)',
22
+ 'ghost-fore': 'rgba(var(--ax-color-ghost-fore), <alpha-value>)',
23
+
24
+ surface: 'rgba(var(--ax-color-surface), <alpha-value>)',
25
+ 'surface-fore': 'rgba(var(--ax-color-surface-fore), <alpha-value>)',
26
+
27
+ 'on-surface': 'rgba(var(--ax-color-on-surface), <alpha-value>)',
28
+ 'on-surface-fore': 'rgba(var(--ax-color-on-surface-fore), <alpha-value>)',
29
+
30
+ 'input-surface': 'rgba(var(--ax-color-input-surface), <alpha-value>)',
31
+ 'input-surface-fore':
32
+ 'rgba(var(--ax-color-input-surface-fore), <alpha-value>)',
33
+ };
34
+
35
+ const createPalete = function (colorName) {
36
+ return {
37
+ DEFAULT: `rgba(var(--ax-color-${colorName}-500), <alpha-value>)`,
38
+ fore: `rgba(var(--ax-color-${colorName}-fore), <alpha-value>)`,
39
+ 'fore-tint': `rgba(var(--ax-color-${colorName}-fore-tint), <alpha-value>)`,
40
+ 50: `rgba(var(--ax-color-${colorName}-50), <alpha-value>)`,
41
+ 100: `rgba(var(--ax-color-${colorName}-100), <alpha-value>)`,
42
+ 200: `rgba(var(--ax-color-${colorName}-200), <alpha-value>)`,
43
+ 300: `rgba(var(--ax-color-${colorName}-300), <alpha-value>)`,
44
+ 400: `rgba(var(--ax-color-${colorName}-400), <alpha-value>)`,
45
+ 500: `rgba(var(--ax-color-${colorName}-500), <alpha-value>)`,
46
+ 600: `rgba(var(--ax-color-${colorName}-600), <alpha-value>)`,
47
+ 700: `rgba(var(--ax-color-${colorName}-700), <alpha-value>)`,
48
+ 800: `rgba(var(--ax-color-${colorName}-800), <alpha-value>)`,
49
+ 900: `rgba(var(--ax-color-${colorName}-900), <alpha-value>)`,
50
+ 950: `rgba(var(--ax-color-${colorName}-950), <alpha-value>)`,
51
+ };
52
+ };
53
+
54
+ module.exports = withAnimations({
55
+ prefix: 'ax-',
56
+ content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
57
+ darkMode: 'class',
58
+ theme: {
59
+ extend: {
60
+ colors: {
61
+ primary: createPalete('primary'),
62
+ secondary: createPalete('secondary'),
63
+ success: createPalete('success'),
64
+ danger: createPalete('danger'),
65
+ warning: createPalete('warning'),
66
+ info: createPalete('info'),
67
+ neutral: createPalete('neutral'),
68
+ ..._colors,
69
+ },
70
+ textColor: {
71
+ DEFAULT: withOpacityValue('--ax-color-text-default'),
72
+ default: withOpacityValue('--ax-color-text-default'),
73
+ ..._colors,
74
+ },
75
+ backgroundColor: {
76
+ default: 'rgba(var(--ax-color-background-default), <alpha-value>)',
77
+ 'border-default': 'rgba(var(--ax-color-border-default), <alpha-value>)',
78
+ },
79
+
80
+ borderColor: {
81
+ DEFAULT: 'rgba(var(--ax-color-border-default), <alpha-value>)',
82
+ default: 'rgba(var(--ax-color-border-default), <alpha-value>)',
83
+ ..._colors,
84
+ },
85
+ maxWidth: {
86
+ '8xl': '90rem',
87
+ },
88
+ borderRadius: {
89
+ default: 'var(--ax-rounded-border-default)',
90
+ },
91
+ lineHeight: {
92
+ 11: '2.5rem',
93
+ 12: '3rem',
94
+ 12: '3rem',
95
+ 14: '3.5rem',
96
+ 16: '4rem',
97
+ 20: '5rem',
98
+ },
99
+ spacing: {
100
+ default: 'var(--ax-size-default)',
101
+ },
102
+ minWidth: {
103
+ default: 'var(--ax-size-default)',
104
+ },
105
+ width: {
106
+ default: 'var(--ax-size-default)',
107
+ },
108
+ maxHeight: {
109
+ default: 'var(--ax-size-default)',
110
+ },
111
+ minHeight: {
112
+ default: 'var(--ax-size-default)',
113
+ },
114
+ height: {
115
+ default: 'var(--ax-size-default)',
116
+ },
117
+ maxHeight: {
118
+ default: 'var(--ax-size-default)',
119
+ },
120
+ },
121
+ },
122
+ corePlugins: {
123
+ preflight: false,
124
+ },
125
+ plugins: [
126
+ plugin(function ({ addUtilities }) {
127
+ const acorexClasses = {
128
+ '.h1': {
129
+ 'font-size': '3rem',
130
+ 'font-weight': '700',
131
+ 'line-height': '3rem',
132
+ },
133
+ '.h2': {
134
+ 'font-size': '2.5rem',
135
+ 'font-weight': '700',
136
+ 'line-height': '2.5rem',
137
+ },
138
+ '.h3': {
139
+ 'font-size': '1.875rem',
140
+ 'font-weight': '700',
141
+ 'line-height': '1.875rem',
142
+ },
143
+ '.h4': {
144
+ 'font-size': '1.5rem',
145
+ 'font-weight': '700',
146
+ 'line-height': '1.5rem',
147
+ },
148
+ '.h5': {
149
+ 'font-size': '1.25rem',
150
+ 'font-weight': '700',
151
+ 'line-height': '1.25rem',
152
+ },
153
+ '.h6': {
154
+ 'font-size': '1.125rem',
155
+ 'font-weight': '700',
156
+ 'line-height': '1.125rem',
157
+ },
158
+ '.heading': {
159
+ width: '100%',
160
+ 'border-bottom': '1px solid',
161
+ 'border-color': 'rgba(var(--ax-color-border-default))',
162
+ 'line-height': '0.1em',
163
+ margin: '1rem auto',
164
+ },
165
+ '.heading > span': {
166
+ background: 'rgba(var(--ax-color-surface))',
167
+ padding: '0 0.75rem',
168
+ },
169
+ '.heading-start': {
170
+ 'text-align': 'start',
171
+ },
172
+ '.heading-center': {
173
+ 'text-align': 'center',
174
+ },
175
+ '.heading-end': {
176
+ 'text-align': 'end',
177
+ },
178
+ '.link': {
179
+ color: 'rgba(var(--ax-color-primary-500))',
180
+ cursor: 'pointer',
181
+ },
182
+ '.link:hover': {
183
+ 'text-decoration': 'underline',
184
+ },
185
+ '.link:visited': {
186
+ color: 'rgba(var(--ax-color-primary-700))',
187
+ },
188
+ '.animate-slow': {
189
+ animationDuration: '2s',
190
+ },
191
+ '.animate-slower': {
192
+ animationDuration: '3s',
193
+ },
194
+ '.animate-2xslower': {
195
+ animationDuration: '5s',
196
+ },
197
+ '.animate-fast': {
198
+ animationDuration: '800ms',
199
+ },
200
+ '.animate-faster': {
201
+ animationDuration: '500ms',
202
+ },
203
+ '.animate-2xfaster': {
204
+ animationDuration: '250ms',
205
+ },
206
+ '.card': {
207
+ backgroundColor: 'rgb(var(--ax-color-surface))',
208
+ border: '1px solid',
209
+ borderColor: 'rgb(var(--ax-color-border-default))',
210
+ borderRadius: 'var(--ax-rounded-border-default)',
211
+ },
212
+ '.tabs-fit': {
213
+ width: '100%',
214
+ },
215
+ '.xs': {
216
+ '--ax-size-default': '2rem',
217
+ },
218
+ '.sm': {
219
+ '--ax-size-default': '2.25rem',
220
+ },
221
+ '.md': {
222
+ '--ax-size-default': '2.5rem',
223
+ },
224
+ '.lg': {
225
+ '--ax-size-default': '3rem',
226
+ },
227
+ '.xl': {
228
+ '--ax-size-default': '3.5rem',
229
+ },
230
+ };
231
+ addUtilities(acorexClasses, ['responsive', 'hover', 'focus']);
232
+ }),
233
+ childSelector,
234
+ ],
235
+ });