@acorex/styles 7.11.5 → 7.12.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
@@ -17,183 +17,72 @@ const childSelector = plugin(function ({ addVariant }) {
17
17
  addVariant('child-focus-within', '& > *:focus-within');
18
18
  });
19
19
 
20
- const _color = {
21
- surface: withOpacityValue('--ax-color-surface'),
22
- 'surface-fore': withOpacityValue('--ax-color-surface-fore'),
20
+ const _colors = {
21
+ ghost: 'rgba(var(--ax-color-ghost), <alpha-value>)',
22
+ 'ghost-fore': 'rgba(var(--ax-color-ghost-fore), <alpha-value>)',
23
23
 
24
- 'on-surface': withOpacityValue('--ax-color-on-surface'),
25
- 'on-surface-fore': withOpacityValue('--ax-color-on-surface-fore'),
24
+ surface: 'rgba(var(--ax-color-surface), <alpha-value>)',
25
+ 'surface-fore': 'rgba(var(--ax-color-surface-fore), <alpha-value>)',
26
26
 
27
- 'input-surface': withOpacityValue('--ax-color-input-surface'),
28
- 'input-surface-fore': withOpacityValue('--ax-color-input-surface-fore'),
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
29
 
30
- 'primary-fore': withOpacityValue('--ax-color-primary-fore'),
31
- 'primary-fore-lighten': withOpacityValue('--ax-color-primary-fore-lighten'),
32
-
33
- 'secondary-fore': withOpacityValue('--ax-color-secondary-fore'),
34
- 'secondary-fore-lighten': withOpacityValue('--ax-color-secondary-fore-lighten'),
35
-
36
- 'success-fore': withOpacityValue('--ax-color-success-fore'),
37
- 'success-fore-lighten': withOpacityValue('--ax-color-success-fore-lighten'),
38
-
39
- 'warning-fore': withOpacityValue('--ax-color-warning-fore'),
40
- 'warning-fore-lighten': withOpacityValue('--ax-color-warning-fore-lighten'),
41
-
42
- 'danger-fore': withOpacityValue('--ax-color-danger-fore'),
43
- 'danger-fore-lighten': withOpacityValue('--ax-color-danger-fore-lighten'),
44
-
45
- 'info-fore': withOpacityValue('--ax-color-info-fore'),
46
- 'info-fore-lighten': withOpacityValue('--ax-color-info-fore-lighten'),
30
+ 'input-surface': 'rgba(var(--ax-color-input-surface), <alpha-value>)',
31
+ 'input-surface-fore': 'rgba(var(--ax-color-input-surface-fore), <alpha-value>)',
32
+ };
47
33
 
48
- 'neutral-fore': withOpacityValue('--ax-color-neutral-fore'),
49
- 'neutral-fore-lighten': withOpacityValue('--ax-color-neutral-fore-lighten'),
34
+ const createPalete = function (colorName) {
35
+ return {
36
+ DEFAULT: `rgba(var(--ax-color-${colorName}), <alpha-value>)`,
37
+ fore: `rgba(var(--ax-color-${colorName}-fore), <alpha-value>)`,
38
+ 'fore-tint': `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>), black 30%)`,
39
+ 50: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>) 5%, white)`,
40
+ 100: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>) 10%, white)`,
41
+ 200: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>) 30%, white)`,
42
+ 300: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>) 50%, white)`,
43
+ 400: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>) 70%, white)`,
44
+ 500: `rgba(var(--ax-color-${colorName}), <alpha-value>)`,
45
+ 600: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>), black 10%)`,
46
+ 700: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>), black 30%)`,
47
+ 800: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>), black 50%)`,
48
+ 900: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>), black 70%)`,
49
+ 950: `color-mix(in srgb, rgba(var(--ax-color-${colorName}), <alpha-value>), black 90%)`,
50
+ };
50
51
  };
51
52
 
52
53
  module.exports = withAnimations({
53
54
  prefix: 'ax-',
54
- corePlugins: {
55
- preflight: false,
56
- },
55
+ // corePlugins: {
56
+ // preflight: false,
57
+ // },
57
58
  content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
59
+
58
60
  darkMode: 'class',
59
61
  theme: {
60
62
  extend: {
61
63
  colors: {
62
- primary: {
63
- DEFAULT: withOpacityValue('--ax-color-primary-500'),
64
- fore: withOpacityValue('--ax-color-primary-fore'),
65
- foreLighten: withOpacityValue('--ax-color-primary-lighten'),
66
- 50: withOpacityValue('--ax-color-primary-50'),
67
- 100: withOpacityValue('--ax-color-primary-100'),
68
- 200: withOpacityValue('--ax-color-primary-200'),
69
- 300: withOpacityValue('--ax-color-primary-300'),
70
- 400: withOpacityValue('--ax-color-primary-400'),
71
- 500: withOpacityValue('--ax-color-primary-500'),
72
- 600: withOpacityValue('--ax-color-primary-600'),
73
- 700: withOpacityValue('--ax-color-primary-700'),
74
- 800: withOpacityValue('--ax-color-primary-800'),
75
- 900: withOpacityValue('--ax-color-primary-900'),
76
- 950: withOpacityValue('--ax-color-primary-950'),
77
- },
78
- secondary: {
79
- DEFAULT: withOpacityValue('--ax-color-secondary-500'),
80
- fore: withOpacityValue('--ax-color-secondary-fore'),
81
- foreLighten: withOpacityValue('--ax-color-secondary-lighten'),
82
- 50: withOpacityValue('--ax-color-secondary-50'),
83
- 100: withOpacityValue('--ax-color-secondary-100'),
84
- 200: withOpacityValue('--ax-color-secondary-200'),
85
- 300: withOpacityValue('--ax-color-secondary-300'),
86
- 400: withOpacityValue('--ax-color-secondary-400'),
87
- 500: withOpacityValue('--ax-color-secondary-500'),
88
- 600: withOpacityValue('--ax-color-secondary-600'),
89
- 700: withOpacityValue('--ax-color-secondary-700'),
90
- 800: withOpacityValue('--ax-color-secondary-800'),
91
- 900: withOpacityValue('--ax-color-secondary-900'),
92
- 950: withOpacityValue('--ax-color-secondary-950'),
93
- },
94
- success: {
95
- DEFAULT: withOpacityValue('--ax-color-success-500'),
96
- fore: withOpacityValue('--ax-color-success-fore'),
97
- foreLighten: withOpacityValue('--ax-color-success-lighten'),
98
- 50: withOpacityValue('--ax-color-success-50'),
99
- 100: withOpacityValue('--ax-color-success-100'),
100
- 200: withOpacityValue('--ax-color-success-200'),
101
- 300: withOpacityValue('--ax-color-success-300'),
102
- 400: withOpacityValue('--ax-color-success-400'),
103
- 500: withOpacityValue('--ax-color-success-500'),
104
- 600: withOpacityValue('--ax-color-success-600'),
105
- 700: withOpacityValue('--ax-color-success-700'),
106
- 800: withOpacityValue('--ax-color-success-800'),
107
- 900: withOpacityValue('--ax-color-success-900'),
108
- 950: withOpacityValue('--ax-color-success-950'),
109
- },
110
- danger: {
111
- DEFAULT: withOpacityValue('--ax-color-danger-500'),
112
- fore: withOpacityValue('--ax-color-danger-fore'),
113
- foreLighten: withOpacityValue('--ax-color-danger-lighten'),
114
- 50: withOpacityValue('--ax-color-danger-50'),
115
- 100: withOpacityValue('--ax-color-danger-100'),
116
- 200: withOpacityValue('--ax-color-danger-200'),
117
- 300: withOpacityValue('--ax-color-danger-300'),
118
- 400: withOpacityValue('--ax-color-danger-400'),
119
- 500: withOpacityValue('--ax-color-danger-500'),
120
- 600: withOpacityValue('--ax-color-danger-600'),
121
- 700: withOpacityValue('--ax-color-danger-700'),
122
- 800: withOpacityValue('--ax-color-danger-800'),
123
- 900: withOpacityValue('--ax-color-danger-900'),
124
- 950: withOpacityValue('--ax-color-danger-950'),
125
- },
126
- warning: {
127
- DEFAULT: withOpacityValue('--ax-color-warning-500'),
128
- fore: withOpacityValue('--ax-color-warning-fore'),
129
- foreLighten: withOpacityValue('--ax-color-warning-lighten'),
130
- 50: withOpacityValue('--ax-color-warning-50'),
131
- 100: withOpacityValue('--ax-color-warning-100'),
132
- 200: withOpacityValue('--ax-color-warning-200'),
133
- 300: withOpacityValue('--ax-color-warning-300'),
134
- 400: withOpacityValue('--ax-color-warning-400'),
135
- 500: withOpacityValue('--ax-color-warning-500'),
136
- 600: withOpacityValue('--ax-color-warning-600'),
137
- 700: withOpacityValue('--ax-color-warning-700'),
138
- 800: withOpacityValue('--ax-color-warning-800'),
139
- 900: withOpacityValue('--ax-color-warning-900'),
140
- 950: withOpacityValue('--ax-color-warning-950'),
141
- },
142
- info: {
143
- DEFAULT: withOpacityValue('--ax-color-info-500'),
144
- fore: withOpacityValue('--ax-color-info-fore'),
145
- foreLighten: withOpacityValue('--ax-color-info-lighten'),
146
- 50: withOpacityValue('--ax-color-info-50'),
147
- 100: withOpacityValue('--ax-color-info-100'),
148
- 200: withOpacityValue('--ax-color-info-200'),
149
- 300: withOpacityValue('--ax-color-info-300'),
150
- 400: withOpacityValue('--ax-color-info-400'),
151
- 500: withOpacityValue('--ax-color-info-500'),
152
- 600: withOpacityValue('--ax-color-info-600'),
153
- 700: withOpacityValue('--ax-color-info-700'),
154
- 800: withOpacityValue('--ax-color-info-800'),
155
- 900: withOpacityValue('--ax-color-info-900'),
156
- 950: withOpacityValue('--ax-color-info-950'),
157
- },
158
- neutral: {
159
- DEFAULT: withOpacityValue('--ax-color-neutral-500'),
160
- fore: withOpacityValue('--ax-color-neutral-fore'),
161
- foreLighten: withOpacityValue('--ax-color-neutral-lighten'),
162
- 50: withOpacityValue('--ax-color-neutral-50'),
163
- 100: withOpacityValue('--ax-color-neutral-100'),
164
- 200: withOpacityValue('--ax-color-neutral-200'),
165
- 300: withOpacityValue('--ax-color-neutral-300'),
166
- 400: withOpacityValue('--ax-color-neutral-400'),
167
- 500: withOpacityValue('--ax-color-neutral-500'),
168
- 600: withOpacityValue('--ax-color-neutral-600'),
169
- 700: withOpacityValue('--ax-color-neutral-700'),
170
- 800: withOpacityValue('--ax-color-neutral-800'),
171
- 900: withOpacityValue('--ax-color-neutral-900'),
172
- 950: withOpacityValue('--ax-color-neutral-950'),
173
- },
64
+ primary: createPalete('primary'),
65
+ secondary: createPalete('secondary'),
66
+ success: createPalete('success'),
67
+ danger: createPalete('danger'),
68
+ warning: createPalete('warning'),
69
+ info: createPalete('info'),
70
+ neutral: createPalete('neutral'),
71
+ ..._colors,
174
72
  },
175
73
  textColor: {
176
74
  DEFAULT: withOpacityValue('--ax-color-text-default'),
177
75
  default: withOpacityValue('--ax-color-text-default'),
178
- ..._color,
76
+ ..._colors,
179
77
  },
180
- fill: {
181
- ..._color,
182
- },
183
- stroke: {
184
- ..._color,
185
- },
186
-
187
78
  backgroundColor: {
188
- default: withOpacityValue('--ax-color-background-default'),
189
- surface: withOpacityValue('--ax-color-surface'),
190
- 'on-surface': withOpacityValue('--ax-color-on-surface'),
191
- 'input-surface': withOpacityValue('--ax-color-input-surface'),
79
+ default: 'rgba(var(--ax-color-background-default), <alpha-value>)',
192
80
  },
81
+
193
82
  borderColor: {
194
83
  DEFAULT: 'rgba(var(--ax-color-border-default))',
195
84
  default: 'rgba(var(--ax-color-border-default))',
196
- ..._color,
85
+ ..._colors,
197
86
  },
198
87
  maxWidth: {
199
88
  '8xl': '90rem',
@@ -209,6 +98,27 @@ module.exports = withAnimations({
209
98
  16: '4rem',
210
99
  20: '5rem',
211
100
  },
101
+ spacing: {
102
+ default: 'var(--ax-size-default)',
103
+ },
104
+ minWidth: {
105
+ default: 'var(--ax-size-default)',
106
+ },
107
+ width: {
108
+ default: 'var(--ax-size-default)',
109
+ },
110
+ maxHeight: {
111
+ default: 'var(--ax-size-default)',
112
+ },
113
+ minHeight: {
114
+ default: 'var(--ax-size-default)',
115
+ },
116
+ height: {
117
+ default: 'var(--ax-size-default)',
118
+ },
119
+ maxHeight: {
120
+ default: 'var(--ax-size-default)',
121
+ },
212
122
  },
213
123
  },
214
124
 
@@ -281,12 +191,24 @@ module.exports = withAnimations({
281
191
  '.link:visited': {
282
192
  color: 'rgba(var(--ax-color-primary-700))',
283
193
  },
194
+ '.animate-slow': {
195
+ animationDuration: '2s',
196
+ },
197
+ '.animate-slower': {
198
+ animationDuration: '3s',
199
+ },
200
+ '.animate-2xslower': {
201
+ animationDuration: '5s',
202
+ },
284
203
  '.animate-fast': {
285
204
  animationDuration: '800ms',
286
205
  },
287
206
  '.animate-faster': {
288
207
  animationDuration: '500ms',
289
208
  },
209
+ '.animate-2xfaster': {
210
+ animationDuration: '250ms',
211
+ },
290
212
  '.card': {
291
213
  backgroundColor: 'rgb(var(--ax-color-surface))',
292
214
  border: '1px solid',
@@ -1,88 +0,0 @@
1
- .ax-animate-fadeIn {
2
- animation-name: ax-fadeIn;
3
- animation-duration: 1s;
4
- animation-duration: 1000ms;
5
- }
6
- .ax-animate-bounceIn {
7
- animation: 0.75s cubic-bezier(0.215, 0.61, 0.355, 1) both ax-bounceIn;
8
- }
9
- .ax-animate-faster {
10
- animation-duration: 0.5s;
11
- animation-duration: 500ms;
12
- }
13
-
14
- .ax-animate-zoomIn {
15
- animation-name: ax-zoomIn;
16
- }
17
- .ax-animate-slideInUp {
18
- animation-name: ax-slideInUp;
19
- }
20
- @keyframes ax-slideInUp {
21
- from {
22
- transform: translate3d(0, 100%, 0);
23
- visibility: visible;
24
- }
25
-
26
- to {
27
- transform: translate3d(0, 0, 0);
28
- }
29
- }
30
-
31
- @keyframes ax-zoomIn {
32
- from {
33
- opacity: 0;
34
- transform: scale3d(0.3, 0.3, 0.3);
35
- }
36
-
37
- 50% {
38
- opacity: 1;
39
- }
40
- }
41
-
42
- @keyframes ax-fadeIn {
43
- from {
44
- opacity: 0;
45
- }
46
-
47
- to {
48
- opacity: 1;
49
- }
50
- }
51
-
52
- @keyframes ax-bounceIn {
53
- from,
54
- 20%,
55
- 40%,
56
- 60%,
57
- 80%,
58
- to {
59
- animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
60
- }
61
-
62
- 0% {
63
- opacity: 0;
64
- transform: scale3d(0.3, 0.3, 0.3);
65
- }
66
-
67
- 20% {
68
- transform: scale3d(1.1, 1.1, 1.1);
69
- }
70
-
71
- 40% {
72
- transform: scale3d(0.9, 0.9, 0.9);
73
- }
74
-
75
- 60% {
76
- opacity: 1;
77
- transform: scale3d(1.03, 1.03, 1.03);
78
- }
79
-
80
- 80% {
81
- transform: scale3d(0.97, 0.97, 0.97);
82
- }
83
-
84
- to {
85
- opacity: 1;
86
- transform: scale3d(1, 1, 1);
87
- }
88
- }