@acorex/styles 7.23.2 → 7.24.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/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
+ });
@@ -0,0 +1 @@
1
+ :root{--ax-size-base: 2.5rem;--ax-size-default: var(--ax-size-base);--ax-icon-weight: 400;--ax-icon-size: 100%;--ax-rounded-border-default: 0.5rem;--ax-color-border-default: 209, 213, 219;--ax-color-background-default: 249, 250, 251;--ax-color-text-default: 22, 22, 22;--ax-color-surface: 255, 255, 255;--ax-color-surface-fore: 22, 22, 22;--ax-color-on-surface: 243, 244, 246;--ax-color-on-surface-fore: 22, 22, 22;--ax-color-input-surface: 255, 255, 255;--ax-color-input-surface-fore: 22, 22, 22;--ax-color-ghost: 255, 255, 255;--ax-color-ghost-fore: 22, 22, 22;--ax-color-primary-fore: 255, 255, 255;--ax-color-primary-fore-tint: 11, 30, 71;--ax-color-primary-50: 244, 247, 254;--ax-color-primary-100: 233, 239, 253;--ax-color-primary-200: 190, 208, 249;--ax-color-primary-300: 146, 177, 245;--ax-color-primary-400: 102, 146, 241;--ax-color-primary-500: 37, 99, 235;--ax-color-primary-600: 33, 89, 212;--ax-color-primary-700: 26, 69, 165;--ax-color-primary-800: 19, 50, 118;--ax-color-primary-900: 11, 30, 71;--ax-color-primary-950: 4, 10, 23;--ax-color-secondary-fore: 255, 255, 255;--ax-color-secondary-fore-tint: 9, 12, 18;--ax-color-secondary-50: 244, 244, 245;--ax-color-secondary-100: 233, 234, 235;--ax-color-secondary-200: 188, 191, 196;--ax-color-secondary-300: 143, 148, 157;--ax-color-secondary-400: 98, 105, 118;--ax-color-secondary-500: 30, 41, 59;--ax-color-secondary-600: 27, 37, 53;--ax-color-secondary-700: 21, 29, 41;--ax-color-secondary-800: 15, 21, 30;--ax-color-secondary-900: 9, 12, 18;--ax-color-secondary-950: 3, 4, 6;--ax-color-success-fore: 255, 255, 255;--ax-color-success-fore-tint: 6, 78, 59;--ax-color-success-50: 236, 253, 245;--ax-color-success-100: 209, 250, 229;--ax-color-success-200: 167, 243, 208;--ax-color-success-300: 110, 231, 183;--ax-color-success-400: 52, 211, 153;--ax-color-success-500: 16, 185, 129;--ax-color-success-600: 5, 150, 105;--ax-color-success-700: 4, 120, 87;--ax-color-success-800: 6, 95, 70;--ax-color-success-900: 6, 78, 59;--ax-color-success-950: 2, 44, 34;--ax-color-warning-fore: 48, 26, 10;--ax-color-warning-fore-tint: 255, 111, 0;--ax-color-warning-50: 255, 248, 225;--ax-color-warning-100: 255, 236, 179;--ax-color-warning-200: 255, 224, 130;--ax-color-warning-300: 255, 213, 79;--ax-color-warning-400: 255, 202, 40;--ax-color-warning-500: 255, 193, 7;--ax-color-warning-600: 255, 179, 0;--ax-color-warning-700: 255, 160, 0;--ax-color-warning-800: 255, 143, 0;--ax-color-warning-900: 255, 111, 0;--ax-color-warning-950: 72, 40, 15;--ax-color-danger-fore: 255, 255, 255;--ax-color-danger-fore-tint: 127, 29, 29;--ax-color-danger-50: 254, 242, 242;--ax-color-danger-100: 254, 226, 226;--ax-color-danger-200: 254, 202, 202;--ax-color-danger-300: 252, 165, 165;--ax-color-danger-400: 248, 113, 113;--ax-color-danger-500: 239, 68, 68;--ax-color-danger-600: 220, 38, 38;--ax-color-danger-700: 185, 28, 28;--ax-color-danger-800: 153, 27, 27;--ax-color-danger-900: 127, 29, 29;--ax-color-danger-950: 69, 10, 10;--ax-color-info-fore: 255, 255, 255;--ax-color-info-fore-tint: 49, 46, 129;--ax-color-info-50: 238, 242, 255;--ax-color-info-100: 224, 231, 255;--ax-color-info-200: 199, 210, 254;--ax-color-info-300: 165, 180, 252;--ax-color-info-400: 129, 140, 248;--ax-color-info-500: 99, 102, 241;--ax-color-info-600: 79, 70, 229;--ax-color-info-700: 67, 56, 202;--ax-color-info-800: 55, 48, 163;--ax-color-info-900: 49, 46, 129;--ax-color-info-950: 30, 27, 75;--ax-color-neutral-fore: 255, 255, 255;--ax-color-neutral-fore-tint: 17, 24, 39;--ax-color-neutral-50: 249, 250, 251;--ax-color-neutral-100: 243, 244, 246;--ax-color-neutral-200: 229, 231, 235;--ax-color-neutral-300: 209, 213, 219;--ax-color-neutral-400: 156, 163, 175;--ax-color-neutral-500: 107, 114, 128;--ax-color-neutral-600: 75, 85, 99;--ax-color-neutral-700: 55, 65, 81;--ax-color-neutral-800: 31, 41, 55;--ax-color-neutral-900: 17, 24, 39;--ax-color-neutral-950: 3, 7, 18}.ax-dark{--ax-color-border-default: 75, 85, 99;--ax-color-background-default: 24, 32, 43;--ax-color-text-default: 255, 255, 255;--ax-color-surface: 31, 41, 55;--ax-color-surface-fore: 255, 255, 255;--ax-color-on-surface: 55, 65, 81;--ax-color-on-surface-fore: 255, 255, 255;--ax-color-input-surface: 38, 45, 57;--ax-color-input-surface-fore: 224, 224, 224;--ax-color-ghost: 77, 91, 113;--ax-color-ghost-fore: 255, 255, 255}