@acorex/styles 21.0.0-next.65 → 21.0.0-next.66

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.
Files changed (82) hide show
  1. package/base/_preflight.scss +421 -0
  2. package/base/index.scss +15 -0
  3. package/components/{_action-item.css → _action-item.scss} +37 -12
  4. package/components/{_actionsheet.css → _actionsheet.scss} +9 -13
  5. package/components/{_check-box.css → _check-box.scss} +24 -8
  6. package/components/{_drop-down.css → _drop-down.scss} +17 -18
  7. package/components/_editor-container.scss +293 -0
  8. package/components/_general-button.scss +75 -0
  9. package/components/{_list.css → _list.scss} +56 -25
  10. package/components/_radio.scss +51 -0
  11. package/components/{_ripple.css → _ripple.scss} +8 -8
  12. package/components/{_table.css → _table.scss} +23 -20
  13. package/components/{_uploader.css → _uploader.scss} +20 -1
  14. package/components/index.scss +11 -0
  15. package/generators/index.js +1 -0
  16. package/generators/tailwind-class-generator.js +68 -0
  17. package/icons/fontawesome/_variables.scss +227 -0
  18. package/icons/fontawesome/index.scss +714 -0
  19. package/icons/huge/huge-bulk/_variables.scss +209 -0
  20. package/icons/huge/huge-bulk/index.scss +656 -0
  21. package/icons/huge/huge-duotone/_variables.scss +209 -0
  22. package/icons/huge/huge-duotone/index.scss +657 -0
  23. package/icons/huge/huge-solid-rounded/_variables.scss +209 -0
  24. package/icons/huge/huge-solid-rounded/index.scss +643 -0
  25. package/icons/huge/huge-solid-sharp/_variables.scss +209 -0
  26. package/icons/huge/huge-solid-sharp/index.scss +656 -0
  27. package/icons/huge/huge-solid-standard/_variables.scss +209 -0
  28. package/icons/huge/huge-solid-standard/index.scss +656 -0
  29. package/icons/huge/huge-stroke-rounded/_variables.scss +209 -0
  30. package/icons/huge/huge-stroke-rounded/index.scss +656 -0
  31. package/icons/huge/huge-stroke-sharp/_variables.scss +209 -0
  32. package/icons/huge/huge-stroke-sharp/index.scss +656 -0
  33. package/icons/huge/huge-stroke-standard/_variables.scss +209 -0
  34. package/icons/huge/huge-stroke-standard/index.scss +656 -0
  35. package/icons/huge/huge-twotone/_variables.scss +209 -0
  36. package/icons/huge/huge-twotone/index.scss +656 -0
  37. package/icons/material/_variables.scss +227 -0
  38. package/icons/material/index.scss +718 -0
  39. package/index.scss +7 -0
  40. package/mixins/_editor-looks.scss +32 -0
  41. package/mixins/_media.scss +73 -0
  42. package/mixins/_scroll-bar.scss +35 -0
  43. package/mixins/_util.scss +19 -0
  44. package/mixins/index.scss +4 -0
  45. package/package.json +4 -7
  46. package/tailwind-base.js +4 -0
  47. package/themes/default.scss +74 -0
  48. package/utils/_theme-generator.scss +238 -0
  49. package/utils/_utils.scss +278 -0
  50. package/utils/index.scss +2 -0
  51. package/variables/_colors.scss +14 -0
  52. package/variables/_looks.scss +1 -0
  53. package/variables/index.scss +2 -0
  54. package/components/_editor-container copy.css +0 -267
  55. package/components/_editor-container.css +0 -82
  56. package/components/_general-button.css +0 -37
  57. package/components/_radio.css +0 -33
  58. package/components/index.css +0 -11
  59. package/icons/fontawesome/_variables.css +0 -229
  60. package/icons/fontawesome/index.css +0 -557
  61. package/icons/huge/huge-bulk/_variables.css +0 -211
  62. package/icons/huge/huge-bulk/index.css +0 -522
  63. package/icons/huge/huge-duotone/_variables.css +0 -211
  64. package/icons/huge/huge-duotone/index.css +0 -519
  65. package/icons/huge/huge-solid-rounded/_variables.css +0 -211
  66. package/icons/huge/huge-solid-rounded/index.css +0 -519
  67. package/icons/huge/huge-solid-sharp/_variables.css +0 -213
  68. package/icons/huge/huge-solid-sharp/index.css +0 -519
  69. package/icons/huge/huge-solid-standard/_variables.css +0 -211
  70. package/icons/huge/huge-solid-standard/index.css +0 -518
  71. package/icons/huge/huge-stroke-rounded/_variables.css +0 -211
  72. package/icons/huge/huge-stroke-rounded/index.css +0 -517
  73. package/icons/huge/huge-stroke-sharp/_variables.css +0 -142
  74. package/icons/huge/huge-stroke-sharp/index.css +0 -517
  75. package/icons/huge/huge-stroke-standard/_variables.css +0 -141
  76. package/icons/huge/huge-stroke-standard/index.css +0 -517
  77. package/icons/huge/huge-twotone/_variables.css +0 -211
  78. package/icons/huge/huge-twotone/index.css +0 -518
  79. package/icons/material/_variables.css +0 -229
  80. package/icons/material/index.css +0 -575
  81. package/index.css +0 -2
  82. package/themes/default.css +0 -3067
@@ -0,0 +1,278 @@
1
+ @use 'sass:color';
2
+ @use 'sass:meta';
3
+ @use 'sass:math';
4
+ @use 'sass:map';
5
+
6
+ @function strip-rgba($color) {
7
+ @if meta.type-of($color) == 'color' {
8
+ $r: math.round(color.channel($color, 'red', rgb));
9
+ $g: math.round(color.channel($color, 'green', rgb));
10
+ $b: math.round(color.channel($color, 'blue', rgb));
11
+ @return $r, $g, $b;
12
+ }
13
+ @error "Invalid input: #{$color}. It must be a color.";
14
+ }
15
+
16
+ @mixin convert-to-rgb($variable-map) {
17
+ @each $key, $value in $variable-map {
18
+ --#{$key}: #{strip-rgba($value)};
19
+ }
20
+ }
21
+
22
+ // A helper function to clamp a value between $min and $max.
23
+ // Renamed to avoid conflict with the built-in `clamp()` function.
24
+ @function clamp-value($value, $min, $max) {
25
+ @return max($min, min($value, $max));
26
+ }
27
+
28
+ // Gamma correction for converting linear sRGB to sRGB.
29
+ // Uses the piecewise function:
30
+ // if (channel <= 0.0031308) then sRGB = 12.92 * channel
31
+ // else sRGB = 1.055 * (channel^(1/2.4)) - 0.055
32
+ @function gamma-correct($channel) {
33
+ @if $channel <= 0.0031308 {
34
+ @return 12.92 * $channel;
35
+ } @else {
36
+ @return 1.055 * math.pow($channel, 1/2.4) - 0.055;
37
+ }
38
+ }
39
+
40
+ // Converts an Oklch value to an rgba() color.
41
+ // The input can be either:
42
+ // • a color (e.g. one produced by `oklch()`), or
43
+ // • a list of numbers: (L, C, H) or (L, C, H, alpha)
44
+ // In the first case, the built-in color channels are used via `color.channel()`.
45
+ // In the second, a manual conversion is performed.
46
+ @function oklch-to-rgba($color) {
47
+ // If the input is a color, extract its components using the new API.
48
+ @if meta.type-of($color) == 'color' {
49
+ $r: round(color.channel($color, 'red', $space: rgb));
50
+ $g: round(color.channel($color, 'green', $space: rgb));
51
+ $b: round(color.channel($color, 'blue', $space: rgb));
52
+ $a: color.channel($color, 'alpha', $space: rgb);
53
+ @return rgba($r, $g, $b, $a);
54
+ }
55
+ // Otherwise, if the input is a list with at least 3 elements, assume it's (L, C, H, [alpha]).
56
+ @else if type-of($color) == 'list' {
57
+ @if length($color) >= 3 {
58
+ $l: nth($color, 1);
59
+ $c: nth($color, 2);
60
+ $h: nth($color, 3);
61
+ $alpha: if(length($color) >= 4, nth($color, 4), 1);
62
+
63
+ // Convert hue from degrees to radians.
64
+ $h_rad: $h * math.pi() / 180;
65
+
66
+ // Convert from Oklch to OKLab.
67
+ $a: $c * math.cos($h_rad);
68
+ $b: $c * math.sin($h_rad);
69
+
70
+ // Compute intermediate OKLab values.
71
+ $l_oklab: $l;
72
+ $l_: $l_oklab + 0.3963377774 * $a + 0.2158037573 * $b;
73
+ $m_: $l_oklab - 0.1055613458 * $a - 0.0638541728 * $b;
74
+ $s_: $l_oklab - 0.0894841775 * $a - 1.291485548 * $b;
75
+
76
+ // Cube the intermediate values.
77
+ $l_cube: $l_ * $l_ * $l_;
78
+ $m_cube: $m_ * $m_ * $m_;
79
+ $s_cube: $s_ * $s_ * $s_;
80
+
81
+ // Convert OKLab (cubed) to linear sRGB.
82
+ $r_linear: 4.0767416621 * $l_cube - 3.3077115913 * $m_cube + 0.2309699292 * $s_cube;
83
+ $g_linear: -1.2684380046 * $l_cube + 2.6097574011 * $m_cube - 0.3413193965 * $s_cube;
84
+ $b_linear: -0.0041960863 * $l_cube - 0.7034186147 * $m_cube + 1.707614701 * $s_cube;
85
+
86
+ // Gamma correction.
87
+ $r: gamma-correct($r_linear);
88
+ $g: gamma-correct($g_linear);
89
+ $b: gamma-correct($b_linear);
90
+
91
+ // Clamp the sRGB values to the 0–1 range.
92
+ $r: clamp-value($r, 0, 1);
93
+ $g: clamp-value($g, 0, 1);
94
+ $b: clamp-value($b, 0, 1);
95
+
96
+ // Convert the 0–1 values to 0–255 integers.
97
+ $r_int: round($r * 255);
98
+ $g_int: round($g * 255);
99
+ $b_int: round($b * 255);
100
+
101
+ @return rgba($r_int, $g_int, $b_int, $alpha);
102
+ } @else {
103
+ @error "Invalid input for oklch-to-rgba: list must have at least 3 elements.";
104
+ }
105
+ } @else {
106
+ @error "Invalid input for oklch-to-rgba: expected a color or a list of numbers.";
107
+ }
108
+ }
109
+
110
+ @function shift-dark-mode-color($color, $lightness: 20%, $saturation: 10%) {
111
+ // Convert the color to HSL
112
+ $hsl: hsl(hue($color), saturation($color), lightness($color));
113
+
114
+ // Check if the color is already dark (lightness < 40%)
115
+ @if lightness($hsl) < 40% {
116
+ // If the color is dark, adjust it slightly or leave it unchanged
117
+ @return $color; // Or adjust slightly, e.g., darken($color, 5%);
118
+ } @else {
119
+ // If the color is light, darken it
120
+ $new-lightness: max(0%, lightness($hsl) - $lightness); // Ensure lightness doesn't go below 0%
121
+ $new-saturation: min(100%, saturation($hsl) + $saturation); // Ensure saturation doesn't exceed 100%
122
+ @return hsl(hue($hsl), $new-saturation, $new-lightness);
123
+ }
124
+ }
125
+
126
+ // Function to calculate text color based on surface color
127
+ @function lightness-calc($hue) {
128
+ @if ($hue <= 80) {
129
+ @return 0.06 * $hue + 75;
130
+ }
131
+ @if ($hue < 270) {
132
+ @return -0.07 * $hue + 85.82;
133
+ }
134
+ @return 0.09 * $hue + 42.6;
135
+ }
136
+ @function is-dark-on-surface($lightness, $hue, $is-dark) {
137
+ @if ($is-dark) {
138
+ @return $lightness >= math.div(lightness-calc(math.div($hue, 1deg)) - 15, 100);
139
+ } @else {
140
+ @return $lightness >= math.div(lightness-calc(math.div($hue, 1deg)), 100);
141
+ }
142
+ }
143
+
144
+ @function contrast-text($color, $is-dark: false) {
145
+ $hue: color.channel($color, 'hue', $space: oklch);
146
+ $chroma: color.channel($color, 'chroma', $space: oklch);
147
+ $lightness: color.channel($color, 'lightness', $space: oklch);
148
+ $lightness: math.div($lightness, 100%);
149
+ $l: null;
150
+ @if ($is-dark) {
151
+ @if (is-dark-on-surface($lightness, $hue, true)) {
152
+ $l: 0.2;
153
+ } @else {
154
+ $l: 0.995;
155
+ }
156
+ } @else {
157
+ @if (is-dark-on-surface($lightness, $hue, false)) {
158
+ $l: 0.3;
159
+ } @else {
160
+ $l: 0.995;
161
+ }
162
+ }
163
+ $oklch-color: oklch($l $chroma $hue);
164
+ @return color.to-gamut($oklch-color, $space: rgb, $method: local-minde);
165
+ }
166
+
167
+ @function border-color($color, $is-dark) {
168
+ @if $is-dark {
169
+ // Dark theme: lightening the border color for contrast
170
+ @return color.adjust($color, $lightness: 9%);
171
+ } @else {
172
+ // Light theme: darkening the border color for contrast
173
+ @return color.adjust($color, $lightness: -7%);
174
+ }
175
+ }
176
+
177
+ @function light-palette-generator($color) {
178
+ $shades: (
179
+ 50: 40,
180
+ 100: 90,
181
+ 200: 160,
182
+ 300: 270,
183
+ 400: 410,
184
+ 500: 500,
185
+ 600: 590,
186
+ 700: 700,
187
+ 800: 790,
188
+ 900: 860,
189
+ 950: 1060,
190
+ );
191
+ $palette: ();
192
+ $hue: color.channel($color, 'hue', $space: oklch);
193
+ $chroma: color.channel($color, 'chroma', $space: oklch);
194
+ $lightness: color.channel($color, 'lightness', $space: oklch);
195
+ $lightness: math.div($lightness, 100%);
196
+ @if ($color) {
197
+ @each $name, $shade in $shades {
198
+ $l: null;
199
+ @if (meta.type-of($shade) == number) {
200
+ @if ($shade <= 500) {
201
+ $l: math.div((-$shade + $shade * $lightness + 500), 500);
202
+ } @else {
203
+ $l: (1 - math.div(($shade - 500), 500)) * ($lightness - 0.3) + 0.3;
204
+ }
205
+ $palette: map.set($palette, $name, $l);
206
+ }
207
+ $oklch-color: oklch((map.get($palette, $name) * 100%) $chroma $hue);
208
+ $gamut-oklch: color.to-gamut($oklch-color, $space: rgb, $method: local-minde);
209
+ @if ($name==950) {
210
+ $gamut-oklch: color.scale($gamut-oklch, $chroma: -50%, $space: oklch);
211
+ }
212
+ @if ($name==900) {
213
+ $gamut-oklch: color.scale($gamut-oklch, $chroma: -33%, $space: oklch);
214
+ }
215
+ @if ($name==800) {
216
+ $gamut-oklch: color.scale($gamut-oklch, $chroma: -8%, $space: oklch);
217
+ }
218
+ $palette: map.set($palette, $name, $gamut-oklch);
219
+ }
220
+ }
221
+ @return $palette;
222
+ }
223
+
224
+ @function dark-palette-generator($color) {
225
+ $shades: (
226
+ 50: 50,
227
+ 100: 100,
228
+ 200: 200,
229
+ 300: 300,
230
+ 400: 400,
231
+ 500: 500,
232
+ 600: 600,
233
+ 700: 700,
234
+ 800: 800,
235
+ 900: 900,
236
+ 950: 950,
237
+ );
238
+ $palette: ();
239
+ $hue: color.channel($color, 'hue', $space: oklch);
240
+ $chroma: color.channel($color, 'chroma', $space: oklch);
241
+ $lightness: color.channel($color, 'lightness', $space: oklch);
242
+ $lightness: math.div($lightness, 100%);
243
+ @each $name, $shade in $shades {
244
+ $l: null;
245
+ @if (meta.type-of($shade) == number) {
246
+ @if ($shade <= 700) {
247
+ $l: math.div((-$shade + $shade * $lightness + 700), 700);
248
+ } @else {
249
+ $l: (1 - math.div(($shade - 700), 700)) * ($lightness - 0.3) + 0.3;
250
+ }
251
+ $palette: map.set($palette, $name, $l);
252
+ }
253
+ $oklch-color: oklch((map.get($palette, $name) * 100%) $chroma $hue);
254
+ $gamut-oklch: color.to-gamut($oklch-color, $space: rgb, $method: local-minde);
255
+ $palette: map.set($palette, $name, $gamut-oklch);
256
+ }
257
+ @return $palette;
258
+ }
259
+
260
+ @function generate-color-ranges-variables($name, $color, $is-dark: false) {
261
+ $colors: ();
262
+ $light-shades: (50, 100, 200, 300, 400);
263
+ $dark-shades: (600, 700, 800, 900, 950);
264
+ @if ($color) {
265
+ @if $is-dark {
266
+ $palette: dark-palette-generator($color);
267
+ @each $shade, $color in $palette {
268
+ $colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
269
+ }
270
+ } @else {
271
+ $palette: light-palette-generator($color);
272
+ @each $shade, $color in $palette {
273
+ $colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
274
+ }
275
+ }
276
+ }
277
+ @return $colors;
278
+ }
@@ -0,0 +1,2 @@
1
+ @forward './theme-generator';
2
+ @forward './utils';
@@ -0,0 +1,14 @@
1
+ $theme-colors: (
2
+ 'primary': #3b82f6,
3
+ 'secondary': #64748b,
4
+ 'success': #22c55e,
5
+ 'warning': #f59e0b,
6
+ 'danger': #f43f5e,
7
+ 'accent1': null,
8
+ 'accent2': null,
9
+ 'accent3': null,
10
+ 'accent4': null,
11
+ 'accent5': null,
12
+ 'accent6': null,
13
+ 'accent7': null,
14
+ ) !default;
@@ -0,0 +1 @@
1
+ $theme-looks: 'solid', 'outline', 'twotone', 'blank', 'link' !default;
@@ -0,0 +1,2 @@
1
+ @forward './colors';
2
+ @forward './looks';
@@ -1,267 +0,0 @@
1
- .ax-editor-container {
2
- @apply border-default rounded-default relative flex h-9 w-full items-center justify-between gap-2 overflow-hidden border px-2 text-sm;
3
- }
4
-
5
- .ax-editor-container .ax-icon {
6
- font-size: var(--ax-comp-editor-icon-font-size);
7
- }
8
-
9
- .ax-editor-container:has(> ax-prefix) {
10
- padding-inline-start: 0;
11
- }
12
-
13
- .ax-editor-container:has(> ax-prefix) > ax-prefix:has(ax-button, .ax-editor-container) {
14
- --ax-comp-editor-space-start-size: 0px;
15
- }
16
-
17
- .ax-editor-container:has(> ax-prefix) > ax-prefix {
18
- padding-inline-start: var(--ax-comp-editor-space-start-size);
19
- }
20
-
21
- .ax-editor-container:has(> ax-suffix) {
22
- padding-inline-end: 0;
23
- }
24
-
25
- .ax-editor-container:has(> ax-suffix) > ax-suffix:has(ax-button, .ax-editor-container) {
26
- --ax-comp-editor-space-end-size: 0px;
27
- }
28
-
29
- .ax-editor-container:has(> ax-suffix) > ax-suffix {
30
- padding-inline-end: var(--ax-comp-editor-space-end-size);
31
- }
32
-
33
- .ax-editor-container:not(.ax-state-disabled):focus-within {
34
- border-color: rgba(var(--ax-comp-editor-focused-border-color));
35
- outline-width: var(--ax-comp-editor-box-outline-width);
36
- outline-style: solid;
37
- outline-color: rgba(var(--ax-comp-editor-focused-border-color));
38
- }
39
-
40
- .ax-editor-container.ax-state-error {
41
- border-color: rgba(var(--ax-comp-editor-error-border-color));
42
- outline-width: var(--ax-comp-editor-box-outline-width);
43
- outline-color: rgba(var(--ax-comp-editor-error-border-color));
44
- outline-style: solid;
45
- }
46
-
47
- .ax-editor-container.ax-state-error:focus-within {
48
- border-color: rgba(var(--ax-comp-editor-error-border-color));
49
- }
50
-
51
- .ax-editor-container.ax-state-error .ax-input .ax-placeholder,
52
- .ax-editor-container.ax-state-error .ax-input::placeholder {
53
- color: rgba(var(--ax-comp-editor-error-text-color), var(--ax-comp-editor-placeholder-opacity));
54
- }
55
-
56
- .ax-editor-container.ax-solid {
57
- --ax-comp-editor-bg-color: var(--ax-sys-color-lightest-surface);
58
- --ax-comp-editor-border-width: 1px;
59
- }
60
-
61
- .ax-editor-container.ax-outline {
62
- --ax-comp-editor-bg-color: 0, 0, 0, 0;
63
- --ax-comp-editor-border-width: 1px;
64
- }
65
-
66
- .ax-editor-container.ax-flat {
67
- --ax-comp-editor-border-width: 2px;
68
- --ax-comp-editor-border-radius: 0px;
69
- --ax-comp-editor-box-outline-width: 0px;
70
- border-width: 0px !important;
71
- border-bottom-width: var(--ax-comp-editor-border-width) !important;
72
- }
73
-
74
- .ax-editor-container.ax-fill {
75
- --ax-comp-editor-box-outline-width: 2px;
76
- --ax-comp-editor-border-width: 0px;
77
- --ax-comp-editor-bg-color: var(--ax-sys-color-surface);
78
- --ax-comp-editor-text-color: var(--ax-sys-color-on-lighter-surface);
79
- --ax-comp-editor-border-color: var(--ax-sys-color-border-lighter-surface);
80
- }
81
-
82
- .ax-editor-container.ax-none {
83
- --ax-comp-editor-border-radius: 0px;
84
- --ax-comp-editor-box-outline-width: 0px;
85
- --ax-comp-editor-border-width: 0px;
86
- --ax-comp-editor-bg-color: 0, 0, 0, 0;
87
- --ax-comp-editor-border-color: 0, 0, 0, 0;
88
- --ax-comp-editor-text-color: var(--ax-sys-color-on-lighter-surface);
89
- }
90
-
91
- .ax-editor-container .ax-editor-input {
92
- height: 100%;
93
- flex: 1 1 0%;
94
- }
95
-
96
- .ax-editor-container .ax-editor-input .ax-input {
97
- height: 100%;
98
- }
99
-
100
- .ax-editor-container .ax-input {
101
- font-size: var(--ax-comp-editor-font-size);
102
- line-height: var(--ax-comp-editor-font-size);
103
- color: rgba(var(--ax-comp-editor-text-color));
104
- cursor: inherit;
105
- }
106
-
107
- .ax-editor-container .ax-input .ax-placeholder,
108
- .ax-editor-container .ax-input::placeholder {
109
- font-size: inherit;
110
- font-weight: 400;
111
- color: rgb(var(--ax-comp-editor-text-color), var(--ax-comp-editor-placeholder-opacity));
112
- }
113
-
114
- .ax-editor-container .ax-input:focus,
115
- .ax-editor-container .ax-input:focus-visible,
116
- .ax-editor-container .ax-input:focus-within {
117
- outline: none;
118
- }
119
-
120
- .ax-editor-container.ax-state-disabled {
121
- opacity: 0.5;
122
- cursor: not-allowed;
123
- }
124
-
125
- .ax-editor-container .ax-editor-control {
126
- display: flex;
127
- height: 100%;
128
- align-items: center;
129
- justify-content: center;
130
- padding-inline-start: 0.5rem;
131
- font-size: 1.125rem;
132
- line-height: 1.75rem;
133
- color: rgba(var(--ax-comp-editor-text-color));
134
- }
135
-
136
- .ax-editor-container.ax-button-icon {
137
- padding: 0 0.5rem;
138
- }
139
-
140
- .ax-editor-container .ax-input,
141
- .ax-editor-container .ax-text-area {
142
- text-align: inherit;
143
- font-family: inherit;
144
- font-size: inherit;
145
- line-height: inherit;
146
- height: 100%;
147
- width: 100%;
148
- flex: 1 1 0%;
149
- background-color: transparent;
150
- font-weight: inherit;
151
- }
152
-
153
- .ax-editor-container .ax-input:focus,
154
- .ax-editor-container .ax-text-area:focus {
155
- box-shadow: none;
156
- }
157
-
158
- .ax-editor-container .ax-editor-button {
159
- font-size: var(--ax-comp-editor-button-font-size, var(--ax-comp-editor-font-size));
160
- height: var(--ax-comp-editor-button-height, 100%);
161
- display: flex;
162
- align-items: center;
163
- justify-content: center;
164
- min-width: 1.5rem;
165
- }
166
-
167
- .ax-editor-container > ax-prefix,
168
- .ax-editor-container > ax-suffix {
169
- height: 100%;
170
- max-width: fit-content;
171
- }
172
-
173
- .ax-editor-container > ax-prefix ax-button,
174
- .ax-editor-container > ax-prefix ax-text,
175
- .ax-editor-container > ax-prefix ax-icon,
176
- .ax-editor-container > ax-prefix .ax-editor-container,
177
- .ax-editor-container > ax-suffix ax-button,
178
- .ax-editor-container > ax-suffix ax-text,
179
- .ax-editor-container > ax-suffix ax-icon,
180
- .ax-editor-container > ax-suffix .ax-editor-container {
181
- display: flex;
182
- height: 100%;
183
- align-items: center;
184
- justify-content: center;
185
- border-radius: 0px;
186
- }
187
-
188
- .ax-editor-container > ax-prefix ax-title,
189
- .ax-editor-container > ax-suffix ax-title {
190
- padding-left: 1rem;
191
- padding-right: 1rem;
192
- }
193
-
194
- .ax-editor-container > ax-prefix > ax-text,
195
- .ax-editor-container > ax-suffix > ax-text {
196
- display: flex;
197
- align-items: center;
198
- justify-content: center;
199
- }
200
-
201
- .ax-editor-container .ax-button {
202
- height: 100% !important;
203
- border-radius: 0px !important;
204
- }
205
-
206
- .ax-editor-container .ax-button.ax-button-icon {
207
- height: 100%;
208
- width: var(--ax-comp-editor-height);
209
- }
210
-
211
- .ax-editor-container ax-popover {
212
- position: absolute;
213
- }
214
-
215
- .ax-xs .ax-editor-container,
216
- .ax-editor-container.ax-xs {
217
- --ax-comp-editor-font-size: 0.75rem;
218
- --ax-comp-editor-space-start-size: 0.25rem;
219
- --ax-comp-editor-space-end-size: 0.25rem;
220
- --ax-comp-editor-button-font-size: 0.625rem;
221
- --ax-comp-editor-gap: 0.25rem;
222
- --ax-comp-editor-icon-font-size: 0.75rem;
223
- }
224
-
225
- .ax-sm .ax-editor-container,
226
- .ax-editor-container.ax-sm {
227
- --ax-comp-editor-font-size: 0.875rem;
228
- --ax-comp-editor-space-start-size: 0.5rem;
229
- --ax-comp-editor-space-end-size: 0.5rem;
230
- --ax-comp-editor-button-font-size: 0.75rem;
231
- --ax-comp-editor-gap: 0.375rem;
232
- --ax-comp-editor-icon-font-size: 0.875rem;
233
- }
234
-
235
- .ax-md .ax-editor-container,
236
- .ax-editor-container,
237
- .ax-editor-container.ax-md {
238
- --ax-comp-editor-space-start-size: 0.75rem;
239
- --ax-comp-editor-space-end-size: 0.75rem;
240
- --ax-comp-editor-button-font-size: 0.875rem;
241
- --ax-comp-editor-gap: 0.5rem;
242
- --ax-comp-editor-icon-font-size: 1rem;
243
- }
244
-
245
- .ax-lg .ax-editor-container,
246
- .ax-editor-container.ax-lg {
247
- --ax-comp-editor-font-size: 1.125rem;
248
- --ax-comp-editor-space-start-size: 1.125rem;
249
- --ax-comp-editor-space-end-size: 1.125rem;
250
- --ax-comp-editor-button-font-size: 0.875rem;
251
- --ax-comp-editor-gap: 0.625rem;
252
- --ax-comp-editor-icon-font-size: 1.25rem;
253
- }
254
-
255
- .ax-xl .ax-editor-container,
256
- .ax-editor-container.ax-xl {
257
- --ax-comp-editor-font-size: 1.5rem;
258
- --ax-comp-editor-space-start-size: 1.5rem;
259
- --ax-comp-editor-space-end-size: 1.5rem;
260
- --ax-comp-editor-button-font-size: 1rem;
261
- --ax-comp-editor-gap: 0.75rem;
262
- --ax-comp-editor-icon-font-size: 1.5rem;
263
- }
264
-
265
- ax-validation-rule {
266
- position: absolute;
267
- }
@@ -1,82 +0,0 @@
1
- @import '../themes/default.css';
2
-
3
- @layer base {
4
- .ax-xs {
5
- .ax-editor-container {
6
- @apply h-7 min-h-7 px-2 py-1.5 text-xs leading-4;
7
-
8
- .ax-content {
9
- @apply text-xs;
10
- }
11
- }
12
- }
13
- .ax-sm {
14
- .ax-editor-container {
15
- @apply h-8 min-h-8 px-3 py-2 text-sm leading-5;
16
- .ax-content {
17
- @apply text-sm;
18
- }
19
- }
20
- }
21
- .ax-md {
22
- .ax-editor-container {
23
- @apply h-9 min-h-9 px-3 py-3 text-sm leading-5;
24
- .ax-content {
25
- @apply text-sm;
26
- }
27
- }
28
- }
29
- .ax-lg {
30
- .ax-editor-container {
31
- @apply h-10 min-h-10 px-4 py-2.5 text-base leading-6;
32
- .ax-content {
33
- @apply text-base;
34
- }
35
- }
36
- }
37
- .ax-xl {
38
- .ax-editor-container {
39
- @apply h-11 min-h-11 px-4 py-2.5 text-xl leading-7;
40
- .ax-content {
41
- @apply text-xl;
42
- }
43
- }
44
- }
45
- .ax-editor-container {
46
- @apply rounded-default relative flex h-9 min-h-9 items-center justify-between overflow-hidden px-3 py-3 text-sm leading-5;
47
-
48
- .ax-editor-container {
49
- @apply p-0;
50
- .ax-input,
51
- .ax-editor {
52
- @apply p-0;
53
- }
54
- }
55
-
56
- .ax-input,
57
- .ax-editor {
58
- font-size: inherit;
59
-
60
- @apply w-full py-2 outline-0 outline-transparent placeholder:opacity-50;
61
- }
62
- .ax-placeholder {
63
- @apply opacity-50;
64
- }
65
-
66
- &.ax-state-error {
67
- @apply border-danger-600! focus-within:ring-danger-600/30!;
68
- }
69
-
70
- &:has(.ax-general-button-control, .ax-general-button-icon) {
71
- @apply pe-1;
72
- }
73
-
74
- ax-prefix,
75
- ax-suffix {
76
- @apply flex items-center gap-2;
77
- }
78
- ax-prefix {
79
- @apply pe-2;
80
- }
81
- }
82
- }
@@ -1,37 +0,0 @@
1
- @import '../themes/default.css';
2
-
3
- @layer base {
4
- .ax-general-button,
5
- .ax-general-button-icon {
6
- @apply rounded-default inline-flex cursor-pointer items-center justify-center transition select-none;
7
- @apply disabled:cursor-not-allowed disabled:opacity-50;
8
- @apply text-black/50 hover:text-black/70 dark:text-white/50 dark:hover:text-white/70;
9
- @apply hover:bg-black/10 dark:hover:bg-white/10;
10
- @apply size-6 px-2 py-1 text-sm;
11
- @apply focus-visible:ring-primary/30 focus-visible:ring-3 focus-visible:outline-none;
12
-
13
- * {
14
- @apply cursor-[inherit];
15
- }
16
-
17
- &.ax-xs {
18
- @apply size-5 p-1.5 text-xs;
19
- }
20
-
21
- &.ax-sm {
22
- @apply size-6 p-2 text-sm;
23
- }
24
-
25
- &.ax-md {
26
- @apply size-6 p-2 text-sm;
27
- }
28
-
29
- &.ax-lg {
30
- @apply size-8 p-2.5 text-lg;
31
- }
32
-
33
- &.ax-xl {
34
- @apply size-9 p-2.5 text-xl;
35
- }
36
- }
37
- }