@acorex/styles 21.0.3-next.35 → 21.0.3-next.37
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/components/_editor-container.css +45 -23
- package/components/_general-button.css +3 -1
- package/package.json +1 -1
- package/themes/default.css +130 -101
- package/tailwind-base.js +0 -324
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
@layer base {
|
|
4
4
|
.ax-editor-container {
|
|
5
|
-
@apply h-
|
|
5
|
+
@apply rounded-default relative flex h-default min-h-default items-center justify-between overflow-hidden px-3 py-3 text-sm leading-5;
|
|
6
|
+
|
|
6
7
|
.ax-content {
|
|
7
8
|
@apply text-sm;
|
|
8
9
|
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.ax-editor-container {
|
|
12
|
-
@apply rounded-default relative flex h-9 min-h-9 items-center justify-between overflow-hidden px-3 py-3 text-sm leading-5;
|
|
13
10
|
|
|
14
11
|
.ax-editor-container {
|
|
15
12
|
@apply p-0;
|
|
@@ -30,40 +27,65 @@
|
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
&.ax-state-error {
|
|
33
|
-
@apply border-danger-600
|
|
30
|
+
@apply border-danger-600!;
|
|
31
|
+
&:focus-within {
|
|
32
|
+
@apply outline-2 outline-offset-0 outline-danger-light;
|
|
33
|
+
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
/* Keep end padding for spin/clear controls, but not when a suffix button is attached */
|
|
37
|
+
&:has(.ax-general-button-control, .ax-general-button-icon):not(:has(ax-suffix > ax-button)) {
|
|
37
38
|
@apply pe-2;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
ax-suffix > ax-icon,
|
|
42
|
+
ax-prefix > ax-icon {
|
|
43
|
+
@apply text-muted;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
ax-prefix,
|
|
47
|
+
ax-suffix {
|
|
48
|
+
@apply flex items-center self-stretch gap-2;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
ax-prefix
|
|
49
|
-
|
|
51
|
+
ax-prefix:has(> ax-button),
|
|
52
|
+
ax-suffix:has(> ax-button) {
|
|
53
|
+
@apply items-stretch;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
|
-
ax-
|
|
53
|
-
@apply
|
|
56
|
+
ax-prefix {
|
|
57
|
+
@apply pe-2;
|
|
54
58
|
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
/* Components layer so these beat button size utilities and spin-button pe-2 */
|
|
63
|
+
@layer components {
|
|
64
|
+
.ax-editor-container {
|
|
65
|
+
&:has(ax-prefix > ax-button),
|
|
66
|
+
&:has(ax-suffix > ax-button) {
|
|
67
|
+
@apply py-0;
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
ax-prefix
|
|
62
|
-
|
|
63
|
-
@apply flex items-center gap-2;
|
|
70
|
+
&:has(ax-prefix > ax-button) {
|
|
71
|
+
@apply ps-0!;
|
|
64
72
|
}
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
|
|
74
|
+
&:has(ax-suffix > ax-button) {
|
|
75
|
+
@apply pe-0!;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
ax-prefix > ax-button,
|
|
79
|
+
ax-suffix > ax-button {
|
|
80
|
+
@apply self-stretch shrink-0 rounded-none!;
|
|
81
|
+
|
|
82
|
+
> button {
|
|
83
|
+
@apply h-full min-h-0 rounded-[inherit]!;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.ax-button-icon > button {
|
|
87
|
+
@apply aspect-square size-auto! h-full w-auto!;
|
|
88
|
+
}
|
|
67
89
|
}
|
|
68
90
|
}
|
|
69
91
|
}
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
@apply disabled:cursor-not-allowed disabled:opacity-50;
|
|
8
8
|
@apply text-text-default/50 hover:text-text-default/70;
|
|
9
9
|
@apply hover:bg-bg-default/10;
|
|
10
|
-
|
|
10
|
+
&:focus-visible {
|
|
11
|
+
@apply ax-focus-ring;
|
|
12
|
+
}
|
|
11
13
|
* {
|
|
12
14
|
@apply cursor-[inherit];
|
|
13
15
|
}
|
package/package.json
CHANGED
package/themes/default.css
CHANGED
|
@@ -48,37 +48,27 @@ html.ax-dark {
|
|
|
48
48
|
color: rgba(var(--ax-sys-color-on-darkest-surface));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.ax-xs {
|
|
52
|
-
--ax-sys-size: ax-xs;
|
|
53
|
-
}
|
|
54
|
-
.ax-sm {
|
|
55
|
-
--ax-sys-size: ax-sm;
|
|
56
|
-
}
|
|
57
|
-
.ax-md {
|
|
58
|
-
--ax-sys-size: ax-md;
|
|
59
|
-
}
|
|
60
|
-
.ax-lg {
|
|
61
|
-
--ax-sys-size: ax-lg;
|
|
62
|
-
}
|
|
63
|
-
.ax-xl {
|
|
64
|
-
--ax-sys-size: ax-xl;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
51
|
:root {
|
|
68
52
|
--ax-sys-theme-isDark: 0;
|
|
69
53
|
--ax-sys-icon-size: 100%;
|
|
70
54
|
--ax-sys-icon-weight: 400;
|
|
71
|
-
|
|
55
|
+
/* Immutable md control height (40px) — size utilities step ±8px from this */
|
|
56
|
+
--ax-sys-size-md: 2.5rem; /* 40px */
|
|
57
|
+
--ax-sys-size-step: 0.5rem; /* 8px */
|
|
58
|
+
/* Padding / spacing scale steps ±4px from md */
|
|
59
|
+
--ax-sys-padding-step: 0.25rem; /* 4px */
|
|
60
|
+
/* Default matches ax-md */
|
|
61
|
+
--ax-sys-size-base: var(--ax-sys-size-md);
|
|
72
62
|
--ax-overlay-full-width: 93;
|
|
73
63
|
--ax-sys-icon-width: inherit;
|
|
74
64
|
--ax-sys-icon-height: inherit;
|
|
75
|
-
--ax-sys-body-font-size:
|
|
65
|
+
--ax-sys-body-font-size: 0.875rem; /* 14px — matches ax-md */
|
|
76
66
|
--ax-sys-border-radius-base: 0.5rem;
|
|
77
67
|
--ax-sys-spacing-base: 0.25rem;
|
|
78
|
-
--ax-sys-text-xs-base: 0.75rem;
|
|
79
|
-
--ax-sys-text-sm-base: 0.875rem;
|
|
80
|
-
--ax-sys-text-lg-base:
|
|
81
|
-
--ax-sys-text-xl-base:
|
|
68
|
+
--ax-sys-text-xs-base: 0.75rem; /* 12px */
|
|
69
|
+
--ax-sys-text-sm-base: 0.875rem; /* 14px */
|
|
70
|
+
--ax-sys-text-lg-base: 0.875rem; /* 14px */
|
|
71
|
+
--ax-sys-text-xl-base: 1rem; /* 16px */
|
|
82
72
|
--ax-sys-leading-3-base: 0.75rem;
|
|
83
73
|
--ax-sys-leading-4-base: 1rem;
|
|
84
74
|
--ax-sys-leading-5-base: 1.25rem;
|
|
@@ -1776,6 +1766,9 @@ html.ax-dark {
|
|
|
1776
1766
|
--color-text-default: rgba(var(--ax-sys-color-text-default));
|
|
1777
1767
|
--color-border-default: rgba(var(--ax-sys-color-border-default));
|
|
1778
1768
|
--radius-default: var(--ax-sys-border-radius);
|
|
1769
|
+
--spacing-default: var(--ax-sys-size-base);
|
|
1770
|
+
--height-default: var(--ax-sys-size-base);
|
|
1771
|
+
--min-height-default: var(--ax-sys-size-base);
|
|
1779
1772
|
--breakpoint-3xl: 1920px;
|
|
1780
1773
|
--breakpoint-4xl: 2560px;
|
|
1781
1774
|
/* Surface Surfaces */
|
|
@@ -2245,17 +2238,12 @@ html.ax-dark {
|
|
|
2245
2238
|
--color-on-accent6-darkest: rgba(var(--ax-sys-color-on-accent6-darkest-surface));
|
|
2246
2239
|
--color-border-accent6-darkest: rgba(var(--ax-sys-color-border-accent6-darkest-surface));
|
|
2247
2240
|
|
|
2248
|
-
/*
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
--text-xl: var(--ax-sys-text-xl-base);
|
|
2255
|
-
--leading-3: var(--ax-sys-leading-3-base);
|
|
2256
|
-
--leading-4: var(--ax-sys-leading-4-base);
|
|
2257
|
-
--leading-5: var(--ax-sys-leading-5-base);
|
|
2258
|
-
--leading-6: var(--ax-sys-leading-6-base);
|
|
2241
|
+
/*
|
|
2242
|
+
* Do NOT put --spacing / --text-* / --leading-* in @theme inline.
|
|
2243
|
+
* inline would bake var(--ax-sys-*-base) into utilities (e.g. p-3 → calc(var(--ax-sys-spacing-base) * 3)),
|
|
2244
|
+
* so ax-sm/ax-lg overrides of --spacing would never take effect.
|
|
2245
|
+
* Those tokens live on :root (and size utilities) so utilities keep referencing var(--spacing) etc.
|
|
2246
|
+
*/
|
|
2259
2247
|
}
|
|
2260
2248
|
|
|
2261
2249
|
@utility text-muted {
|
|
@@ -3224,6 +3212,14 @@ html.ax-dark {
|
|
|
3224
3212
|
@apply cursor-text opacity-70 *:cursor-text;
|
|
3225
3213
|
}
|
|
3226
3214
|
|
|
3215
|
+
@utility ax-focus-ring {
|
|
3216
|
+
@apply shadow-[0_0_0_1px_var(--ax-comp-text,var(--color-on-primary)),0_0_0_3px_var(--ax-comp-bg-light,var(--color-primary-light))] outline-none;
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
@utility ax-focus-ring-editor {
|
|
3220
|
+
@apply outline-2 outline-offset-0 outline-(--ax-comp-bg-light,var(--color-primary-light));
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3227
3223
|
@utility ax-fill {
|
|
3228
3224
|
@apply bg-(--ax-comp-bg-lightest,var(--color-lighter)) text-(--ax-comp-text-lightest,var(--color-on-lighter)) dark:bg-(--ax-comp-bg-lightest,var(--color-darker)) dark:text-(--ax-comp-text-lightest,var(--color-on-darker));
|
|
3229
3225
|
&.ax-default {
|
|
@@ -3233,7 +3229,9 @@ html.ax-dark {
|
|
|
3233
3229
|
@apply bg-(--ax-comp-bg-lighter,var(--color-light)) text-(--ax-comp-text-lighter,var(--color-on-light)) dark:bg-(--ax-comp-bg-lighter,var(--color-dark)) dark:text-(--ax-comp-text-lighter,var(--color-on-dark));
|
|
3234
3230
|
}
|
|
3235
3231
|
&.ax-editor-container {
|
|
3236
|
-
|
|
3232
|
+
&:focus-within {
|
|
3233
|
+
@apply ax-focus-ring-editor;
|
|
3234
|
+
}
|
|
3237
3235
|
}
|
|
3238
3236
|
}
|
|
3239
3237
|
|
|
@@ -3257,7 +3255,7 @@ html.ax-dark {
|
|
|
3257
3255
|
}
|
|
3258
3256
|
&:focus-visible,
|
|
3259
3257
|
&.ax-state-focus {
|
|
3260
|
-
@apply
|
|
3258
|
+
@apply ax-focus-ring;
|
|
3261
3259
|
}
|
|
3262
3260
|
}
|
|
3263
3261
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3275,7 +3273,9 @@ html.ax-dark {
|
|
|
3275
3273
|
@apply border-(--ax-comp-bg-darker,var(--color-border-light)) text-(--ax-comp-bg-darker,var(--color-on-light));
|
|
3276
3274
|
}
|
|
3277
3275
|
&.ax-editor-container {
|
|
3278
|
-
|
|
3276
|
+
&:focus-within {
|
|
3277
|
+
border-color: var(--ax-comp-bg, var(--color-primary)) !important;
|
|
3278
|
+
}
|
|
3279
3279
|
}
|
|
3280
3280
|
}
|
|
3281
3281
|
|
|
@@ -3295,7 +3295,7 @@ html.ax-dark {
|
|
|
3295
3295
|
}
|
|
3296
3296
|
&:focus-visible,
|
|
3297
3297
|
&.ax-state-focus {
|
|
3298
|
-
@apply
|
|
3298
|
+
@apply ax-focus-ring;
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
3301
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3313,7 +3313,9 @@ html.ax-dark {
|
|
|
3313
3313
|
@apply bg-(--ax-comp-bg-darker,var(--color-light)) text-(--ax-comp-text-darker,var(--color-on-light)) dark:bg-(--ax-comp-bg-darker,var(--color-dark)) dark:text-(--ax-comp-text-darker,var(--color-on-dark));
|
|
3314
3314
|
}
|
|
3315
3315
|
&.ax-editor-container {
|
|
3316
|
-
|
|
3316
|
+
&:focus-within {
|
|
3317
|
+
@apply ax-focus-ring-editor;
|
|
3318
|
+
}
|
|
3317
3319
|
}
|
|
3318
3320
|
}
|
|
3319
3321
|
|
|
@@ -3337,7 +3339,7 @@ html.ax-dark {
|
|
|
3337
3339
|
}
|
|
3338
3340
|
&:focus-visible,
|
|
3339
3341
|
&.ax-state-focus {
|
|
3340
|
-
@apply
|
|
3342
|
+
@apply ax-focus-ring;
|
|
3341
3343
|
}
|
|
3342
3344
|
}
|
|
3343
3345
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3361,7 +3363,9 @@ html.ax-dark {
|
|
|
3361
3363
|
@apply border-(--ax-comp-bg-darker,var(--color-border-light)) text-(--ax-comp-bg-darker,var(--color-on-light));
|
|
3362
3364
|
}
|
|
3363
3365
|
&.ax-editor-container {
|
|
3364
|
-
|
|
3366
|
+
&:focus-within {
|
|
3367
|
+
@apply ax-focus-ring-editor;
|
|
3368
|
+
}
|
|
3365
3369
|
}
|
|
3366
3370
|
}
|
|
3367
3371
|
|
|
@@ -3381,7 +3385,7 @@ html.ax-dark {
|
|
|
3381
3385
|
}
|
|
3382
3386
|
&:focus-visible,
|
|
3383
3387
|
&.ax-state-focus {
|
|
3384
|
-
@apply
|
|
3388
|
+
@apply ax-focus-ring;
|
|
3385
3389
|
}
|
|
3386
3390
|
}
|
|
3387
3391
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3417,7 +3421,7 @@ html.ax-dark {
|
|
|
3417
3421
|
}
|
|
3418
3422
|
&:focus-visible,
|
|
3419
3423
|
&.ax-state-focus {
|
|
3420
|
-
@apply
|
|
3424
|
+
@apply ax-focus-ring;
|
|
3421
3425
|
}
|
|
3422
3426
|
}
|
|
3423
3427
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3453,7 +3457,7 @@ html.ax-dark {
|
|
|
3453
3457
|
}
|
|
3454
3458
|
&:focus-visible,
|
|
3455
3459
|
&.ax-state-focus {
|
|
3456
|
-
@apply
|
|
3460
|
+
@apply ax-focus-ring;
|
|
3457
3461
|
}
|
|
3458
3462
|
}
|
|
3459
3463
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3484,7 +3488,7 @@ html.ax-dark {
|
|
|
3484
3488
|
}
|
|
3485
3489
|
&:focus-visible,
|
|
3486
3490
|
&.ax-state-focus {
|
|
3487
|
-
@apply
|
|
3491
|
+
@apply ax-focus-ring;
|
|
3488
3492
|
}
|
|
3489
3493
|
}
|
|
3490
3494
|
&:not(.ax-state-disabled, .ax-state-loading, .ax-state-selected):active {
|
|
@@ -3561,54 +3565,69 @@ html.ax-dark {
|
|
|
3561
3565
|
}
|
|
3562
3566
|
|
|
3563
3567
|
@utility ax-xs {
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
--ax-sys-
|
|
3568
|
+
--ax-sys-size: ax-xs;
|
|
3569
|
+
/* Control height — 24px (md − 16px) */
|
|
3570
|
+
--ax-sys-size-base: calc(var(--ax-sys-size-md) - 2 * var(--ax-sys-size-step));
|
|
3567
3571
|
|
|
3568
|
-
/*
|
|
3569
|
-
--
|
|
3570
|
-
|
|
3571
|
-
--
|
|
3572
|
-
|
|
3573
|
-
|
|
3572
|
+
/* Spacing — unit 2px (md − 2×4px on the 4px base unit scale via half step) */
|
|
3573
|
+
--spacing: calc(var(--ax-sys-spacing-base) - 0.5 * var(--ax-sys-padding-step));
|
|
3574
|
+
/* Border radius — 4px */
|
|
3575
|
+
--ax-sys-border-radius: calc(var(--ax-sys-border-radius-base) - var(--ax-sys-padding-step));
|
|
3576
|
+
|
|
3577
|
+
/* Typography — 12px */
|
|
3578
|
+
--text-xs: 0.75rem;
|
|
3579
|
+
--text-sm: 0.75rem;
|
|
3580
|
+
--text-base: 0.75rem;
|
|
3581
|
+
--text-lg: 0.75rem;
|
|
3582
|
+
--text-xl: 0.75rem;
|
|
3574
3583
|
|
|
3575
3584
|
/* Line Heights */
|
|
3576
3585
|
--leading-3: var(--ax-sys-leading-3-base);
|
|
3577
|
-
--leading-4:
|
|
3578
|
-
--leading-5:
|
|
3579
|
-
--leading-6:
|
|
3586
|
+
--leading-4: var(--ax-sys-leading-4-base);
|
|
3587
|
+
--leading-5: var(--ax-sys-leading-5-base);
|
|
3588
|
+
--leading-6: var(--ax-sys-leading-6-base);
|
|
3580
3589
|
}
|
|
3581
3590
|
|
|
3582
3591
|
@utility ax-sm {
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
--ax-sys-
|
|
3592
|
+
--ax-sys-size: ax-sm;
|
|
3593
|
+
/* Control height — 32px (md − 8px) */
|
|
3594
|
+
--ax-sys-size-base: calc(var(--ax-sys-size-md) - var(--ax-sys-size-step));
|
|
3595
|
+
|
|
3596
|
+
/* Spacing — unit 3px */
|
|
3597
|
+
--spacing: calc(var(--ax-sys-spacing-base) - 0.25 * var(--ax-sys-padding-step));
|
|
3598
|
+
/* Border radius — 4px */
|
|
3599
|
+
--ax-sys-border-radius: calc(var(--ax-sys-border-radius-base) - var(--ax-sys-padding-step));
|
|
3586
3600
|
|
|
3587
|
-
/* Typography */
|
|
3588
|
-
--text-xs:
|
|
3589
|
-
--text-sm:
|
|
3590
|
-
--text-base:
|
|
3591
|
-
--text-lg:
|
|
3592
|
-
--text-xl:
|
|
3601
|
+
/* Typography — 14px */
|
|
3602
|
+
--text-xs: 0.875rem;
|
|
3603
|
+
--text-sm: 0.875rem;
|
|
3604
|
+
--text-base: 0.875rem;
|
|
3605
|
+
--text-lg: 0.875rem;
|
|
3606
|
+
--text-xl: 0.875rem;
|
|
3593
3607
|
|
|
3594
3608
|
/* Line Heights */
|
|
3595
|
-
--leading-3:
|
|
3609
|
+
--leading-3: var(--ax-sys-leading-3-base);
|
|
3596
3610
|
--leading-4: var(--ax-sys-leading-4-base);
|
|
3597
|
-
--leading-5:
|
|
3598
|
-
--leading-6:
|
|
3611
|
+
--leading-5: var(--ax-sys-leading-5-base);
|
|
3612
|
+
--leading-6: var(--ax-sys-leading-6-base);
|
|
3599
3613
|
}
|
|
3600
3614
|
|
|
3601
3615
|
@utility ax-md {
|
|
3602
|
-
|
|
3616
|
+
--ax-sys-size: ax-md;
|
|
3617
|
+
/* Control height — 40px */
|
|
3618
|
+
--ax-sys-size-base: var(--ax-sys-size-md);
|
|
3619
|
+
|
|
3620
|
+
/* Tailwind Default Scale — spacing unit 4px */
|
|
3603
3621
|
--spacing: var(--ax-sys-spacing-base);
|
|
3622
|
+
/* Border radius — 8px */
|
|
3604
3623
|
--ax-sys-border-radius: var(--ax-sys-border-radius-base);
|
|
3605
3624
|
|
|
3606
|
-
/* Typography */
|
|
3607
|
-
--text-xs:
|
|
3608
|
-
--text-sm:
|
|
3609
|
-
--text-base:
|
|
3610
|
-
--text-lg:
|
|
3611
|
-
--text-xl:
|
|
3625
|
+
/* Typography — 14px */
|
|
3626
|
+
--text-xs: 0.875rem;
|
|
3627
|
+
--text-sm: 0.875rem;
|
|
3628
|
+
--text-base: 0.875rem;
|
|
3629
|
+
--text-lg: 0.875rem;
|
|
3630
|
+
--text-xl: 0.875rem;
|
|
3612
3631
|
|
|
3613
3632
|
/* Line Heights */
|
|
3614
3633
|
--leading-3: var(--ax-sys-leading-3-base);
|
|
@@ -3618,39 +3637,49 @@ html.ax-dark {
|
|
|
3618
3637
|
}
|
|
3619
3638
|
|
|
3620
3639
|
@utility ax-lg {
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
--ax-sys-
|
|
3640
|
+
--ax-sys-size: ax-lg;
|
|
3641
|
+
/* Control height — 48px (md + 8px) */
|
|
3642
|
+
--ax-sys-size-base: calc(var(--ax-sys-size-md) + var(--ax-sys-size-step));
|
|
3643
|
+
|
|
3644
|
+
/* Spacing — unit 5px */
|
|
3645
|
+
--spacing: calc(var(--ax-sys-spacing-base) + 0.25 * var(--ax-sys-padding-step));
|
|
3646
|
+
/* Border radius — 8px (same as md) */
|
|
3647
|
+
--ax-sys-border-radius: var(--ax-sys-border-radius-base);
|
|
3624
3648
|
|
|
3625
|
-
/* Typography */
|
|
3626
|
-
--text-xs:
|
|
3627
|
-
--text-sm:
|
|
3628
|
-
--text-base:
|
|
3629
|
-
--text-lg:
|
|
3630
|
-
--text-xl:
|
|
3649
|
+
/* Typography — 14px */
|
|
3650
|
+
--text-xs: 0.875rem;
|
|
3651
|
+
--text-sm: 0.875rem;
|
|
3652
|
+
--text-base: 0.875rem;
|
|
3653
|
+
--text-lg: 0.875rem;
|
|
3654
|
+
--text-xl: 0.875rem;
|
|
3631
3655
|
|
|
3632
3656
|
/* Line Heights */
|
|
3633
|
-
--leading-3:
|
|
3634
|
-
--leading-4:
|
|
3635
|
-
--leading-5:
|
|
3636
|
-
--leading-6:
|
|
3657
|
+
--leading-3: var(--ax-sys-leading-3-base);
|
|
3658
|
+
--leading-4: var(--ax-sys-leading-4-base);
|
|
3659
|
+
--leading-5: var(--ax-sys-leading-5-base);
|
|
3660
|
+
--leading-6: var(--ax-sys-leading-6-base);
|
|
3637
3661
|
}
|
|
3638
3662
|
|
|
3639
3663
|
@utility ax-xl {
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
--ax-sys-
|
|
3664
|
+
--ax-sys-size: ax-xl;
|
|
3665
|
+
/* Control height — 56px (md + 16px) */
|
|
3666
|
+
--ax-sys-size-base: calc(var(--ax-sys-size-md) + 2 * var(--ax-sys-size-step));
|
|
3667
|
+
|
|
3668
|
+
/* Spacing — unit 6px */
|
|
3669
|
+
--spacing: calc(var(--ax-sys-spacing-base) + 0.5 * var(--ax-sys-padding-step));
|
|
3670
|
+
/* Border radius — 8px (same as md) */
|
|
3671
|
+
--ax-sys-border-radius: var(--ax-sys-border-radius-base);
|
|
3643
3672
|
|
|
3644
|
-
/* Typography */
|
|
3645
|
-
--text-xs:
|
|
3646
|
-
--text-sm:
|
|
3647
|
-
--text-base:
|
|
3648
|
-
--text-lg:
|
|
3649
|
-
--text-xl:
|
|
3673
|
+
/* Typography — 16px */
|
|
3674
|
+
--text-xs: 1rem;
|
|
3675
|
+
--text-sm: 1rem;
|
|
3676
|
+
--text-base: 1rem;
|
|
3677
|
+
--text-lg: 1rem;
|
|
3678
|
+
--text-xl: 1rem;
|
|
3650
3679
|
|
|
3651
3680
|
/* Line Heights */
|
|
3652
|
-
--leading-3:
|
|
3653
|
-
--leading-4:
|
|
3654
|
-
--leading-5:
|
|
3655
|
-
--leading-6:
|
|
3681
|
+
--leading-3: var(--ax-sys-leading-3-base);
|
|
3682
|
+
--leading-4: var(--ax-sys-leading-4-base);
|
|
3683
|
+
--leading-5: var(--ax-sys-leading-5-base);
|
|
3684
|
+
--leading-6: var(--ax-sys-leading-6-base);
|
|
3656
3685
|
}
|
package/tailwind-base.js
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
const { withAnimations } = require('animated-tailwindcss');
|
|
3
|
-
const {
|
|
4
|
-
createBorderSurfaces,
|
|
5
|
-
createOnSurfaces,
|
|
6
|
-
createPalette,
|
|
7
|
-
createSurfaces,
|
|
8
|
-
createColorSurfaces,
|
|
9
|
-
createColoredSurfaces,
|
|
10
|
-
} = require('./generators/index');
|
|
11
|
-
|
|
12
|
-
const childSelector = plugin(function ({ addVariant }) {
|
|
13
|
-
addVariant('child', '& > *');
|
|
14
|
-
addVariant('child-hover', '& > *:hover');
|
|
15
|
-
addVariant('child-focus', '& > *:focus');
|
|
16
|
-
addVariant('child-focus-within', '& > *:focus-within');
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const SURFACE_BG = {
|
|
20
|
-
DEFAULT: 'rgba(var(--ax-sys-color-lightest-surface), <alpha-value>)',
|
|
21
|
-
default: 'rgba(var(--ax-sys-color-lightest-surface), <alpha-value>)',
|
|
22
|
-
|
|
23
|
-
lightest: 'rgba(var(--ax-sys-color-lightest-surface), <alpha-value>)',
|
|
24
|
-
lighter: 'rgba(var(--ax-sys-color-lighter-surface), <alpha-value>)',
|
|
25
|
-
light: 'rgba(var(--ax-sys-color-light-surface), <alpha-value>)',
|
|
26
|
-
|
|
27
|
-
surface: 'rgba(var(--ax-sys-color-surface), <alpha-value>)',
|
|
28
|
-
|
|
29
|
-
dark: 'rgba(var(--ax-sys-color-dark-surface), <alpha-value>)',
|
|
30
|
-
darker: 'rgba(var(--ax-sys-color-darker-surface), <alpha-value>)',
|
|
31
|
-
darkest: 'rgba(var(--ax-sys-color-darkest-surface), <alpha-value>)',
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const SURFACES_ON = {
|
|
35
|
-
on: {
|
|
36
|
-
DEFAULT: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
|
|
37
|
-
default: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
|
|
38
|
-
|
|
39
|
-
lightest: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
|
|
40
|
-
lighter: 'rgba(var(--ax-sys-color-on-lighter-surface), <alpha-value>)',
|
|
41
|
-
light: 'rgba(var(--ax-sys-color-on-light-surface), <alpha-value>)',
|
|
42
|
-
|
|
43
|
-
surface: 'rgba(var(--ax-sys-color-on-surface), <alpha-value>)',
|
|
44
|
-
|
|
45
|
-
dark: 'rgba(var(--ax-sys-color-on-dark-surface), <alpha-value>)',
|
|
46
|
-
darker: 'rgba(var(--ax-sys-color-on-darker-surface), <alpha-value>)',
|
|
47
|
-
darkest: 'rgba(var(--ax-sys-color-on-darkest-surface), <alpha-value>)',
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const SURFACE_BORDER = {
|
|
52
|
-
DEFAULT: 'rgba(var(--ax-sys-color-border-lightest-surface), <alpha-value>)',
|
|
53
|
-
default: 'rgba(var(--ax-sys-color-border-lightest-surface), <alpha-value>)',
|
|
54
|
-
|
|
55
|
-
lightest: 'rgba(var(--ax-sys-color-border-lightest-surface), <alpha-value>)',
|
|
56
|
-
lighter: 'rgba(var(--ax-sys-color-border-lighter-surface), <alpha-value>)',
|
|
57
|
-
light: 'rgba(var(--ax-sys-color-border-light-surface), <alpha-value>)',
|
|
58
|
-
|
|
59
|
-
surface: 'rgba(var(--ax-sys-color-border-surface), <alpha-value>)',
|
|
60
|
-
|
|
61
|
-
dark: 'rgba(var(--ax-sys-color-border-dark-surface), <alpha-value>)',
|
|
62
|
-
darker: 'rgba(var(--ax-sys-color-border-darker-surface), <alpha-value>)',
|
|
63
|
-
darkest: 'rgba(var(--ax-sys-color-border-darkest-surface), <alpha-value>)',
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const dynamicSurfaceClasses = {
|
|
67
|
-
...createColoredSurfaces('primary'),
|
|
68
|
-
...createColoredSurfaces('secondary'),
|
|
69
|
-
...createColoredSurfaces('success'),
|
|
70
|
-
...createColoredSurfaces('warning'),
|
|
71
|
-
...createColoredSurfaces('danger'),
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const UTILITY_CLASSES = {
|
|
75
|
-
...dynamicSurfaceClasses,
|
|
76
|
-
'.h1': {
|
|
77
|
-
'font-size': '2.5rem',
|
|
78
|
-
'font-weight': '500',
|
|
79
|
-
'line-height': '2.5rem',
|
|
80
|
-
},
|
|
81
|
-
'.h2': {
|
|
82
|
-
'font-size': '2rem',
|
|
83
|
-
'font-weight': '500',
|
|
84
|
-
'line-height': '2rem',
|
|
85
|
-
},
|
|
86
|
-
'.h3': {
|
|
87
|
-
'font-size': '1.75rem',
|
|
88
|
-
'font-weight': '500',
|
|
89
|
-
'line-height': '1.75rem',
|
|
90
|
-
},
|
|
91
|
-
'.h4': {
|
|
92
|
-
'font-size': '1.5rem',
|
|
93
|
-
'font-weight': '500',
|
|
94
|
-
'line-height': '1.5rem',
|
|
95
|
-
},
|
|
96
|
-
'.h5': {
|
|
97
|
-
'font-size': '1.125rem',
|
|
98
|
-
'font-weight': '500',
|
|
99
|
-
'line-height': '1.125rem',
|
|
100
|
-
},
|
|
101
|
-
'.h6': {
|
|
102
|
-
'font-size': '1rem',
|
|
103
|
-
'font-weight': '500',
|
|
104
|
-
'line-height': '1rem',
|
|
105
|
-
},
|
|
106
|
-
'.heading': {
|
|
107
|
-
width: '100%',
|
|
108
|
-
'border-bottom': '1px solid',
|
|
109
|
-
'border-color': 'rgba(var(--ax-sys-color-border-lightest-surface))',
|
|
110
|
-
'line-height': '0.1em',
|
|
111
|
-
margin: '1rem auto',
|
|
112
|
-
},
|
|
113
|
-
'.heading > span': {
|
|
114
|
-
background: 'rgba(var(--ax-sys-color-surface))',
|
|
115
|
-
padding: '0 0.75rem',
|
|
116
|
-
},
|
|
117
|
-
'.heading-start': {
|
|
118
|
-
'text-align': 'start',
|
|
119
|
-
},
|
|
120
|
-
'.heading-center': {
|
|
121
|
-
'text-align': 'center',
|
|
122
|
-
},
|
|
123
|
-
'.heading-end': {
|
|
124
|
-
'text-align': 'end',
|
|
125
|
-
},
|
|
126
|
-
'.subtitle': {
|
|
127
|
-
opacity: '74%',
|
|
128
|
-
display: 'block',
|
|
129
|
-
'font-size': '1rem',
|
|
130
|
-
'font-weight': '400',
|
|
131
|
-
'line-height': '1.625rem',
|
|
132
|
-
},
|
|
133
|
-
'.links': {
|
|
134
|
-
color: 'rgba(var(--ax-sys-color-primary-surface))',
|
|
135
|
-
cursor: 'pointer',
|
|
136
|
-
},
|
|
137
|
-
'.links:hover': {
|
|
138
|
-
'text-decoration': 'underline',
|
|
139
|
-
},
|
|
140
|
-
'.links:visited': {
|
|
141
|
-
color: 'rgba(var(--ax-sys-color-primary-darker))',
|
|
142
|
-
},
|
|
143
|
-
'.animate-slow': {
|
|
144
|
-
animationDuration: '2s',
|
|
145
|
-
},
|
|
146
|
-
'.animate-slower': {
|
|
147
|
-
animationDuration: '3s',
|
|
148
|
-
},
|
|
149
|
-
'.animate-2xslower': {
|
|
150
|
-
animationDuration: '5s',
|
|
151
|
-
},
|
|
152
|
-
'.animate-fast': {
|
|
153
|
-
animationDuration: '800ms',
|
|
154
|
-
},
|
|
155
|
-
'.animate-faster': {
|
|
156
|
-
animationDuration: '500ms',
|
|
157
|
-
},
|
|
158
|
-
'.animate-2xfaster': {
|
|
159
|
-
animationDuration: '250ms',
|
|
160
|
-
},
|
|
161
|
-
'.card': {
|
|
162
|
-
backgroundColor: 'rgb(var(--ax-sys-color-surface))',
|
|
163
|
-
border: '1px solid',
|
|
164
|
-
borderColor: 'rgb(var(--ax-sys-color-border-lightest-surface))',
|
|
165
|
-
borderRadius: 'var(--ax-sys-border-radius)',
|
|
166
|
-
},
|
|
167
|
-
'.tabs-fit': {
|
|
168
|
-
width: '100%',
|
|
169
|
-
},
|
|
170
|
-
'.xs': {
|
|
171
|
-
'--ax-sys-size-base': '1.5rem',
|
|
172
|
-
},
|
|
173
|
-
'.sm': {
|
|
174
|
-
'--ax-sys-size-base': '2rem',
|
|
175
|
-
},
|
|
176
|
-
'.md': {
|
|
177
|
-
'--ax-sys-size-base': '2.5rem',
|
|
178
|
-
},
|
|
179
|
-
'.lg': {
|
|
180
|
-
'--ax-sys-size-base': '3.375rem',
|
|
181
|
-
},
|
|
182
|
-
'.xl': {
|
|
183
|
-
'--ax-sys-size-base': '4rem',
|
|
184
|
-
},
|
|
185
|
-
'.surface': {
|
|
186
|
-
backgroundColor: 'rgb(var(--ax-sys-color-surface))',
|
|
187
|
-
color: 'rgb(var(--ax-sys-color-on-surface))',
|
|
188
|
-
borderColor: 'rgb(var(--ax-sys-color-border-surface))',
|
|
189
|
-
},
|
|
190
|
-
'.lightest-surface': {
|
|
191
|
-
backgroundColor: 'rgb(var(--ax-sys-color-lightest-surface))',
|
|
192
|
-
color: 'rgb(var(--ax-sys-color-on-lightest-surface))',
|
|
193
|
-
borderColor: 'rgb(var(--ax-sys-color-border-lightest-surface))',
|
|
194
|
-
},
|
|
195
|
-
'.lighter-surface': {
|
|
196
|
-
backgroundColor: 'rgb(var(--ax-sys-color-lighter-surface))',
|
|
197
|
-
color: 'rgb(var(--ax-sys-color-on-lighter-surface))',
|
|
198
|
-
borderColor: 'rgb(var(--ax-sys-color-border-lighter-surface))',
|
|
199
|
-
},
|
|
200
|
-
'.light-surface': {
|
|
201
|
-
backgroundColor: 'rgb(var(--ax-sys-color-light-surface))',
|
|
202
|
-
color: 'rgb(var(--ax-sys-color-on-light-surface))',
|
|
203
|
-
borderColor: 'rgb(var(--ax-sys-color-border-light-surface))',
|
|
204
|
-
},
|
|
205
|
-
'.dark-surface': {
|
|
206
|
-
backgroundColor: 'rgb(var(--ax-sys-color-dark-surface))',
|
|
207
|
-
color: 'rgb(var(--ax-sys-color-on-dark-surface))',
|
|
208
|
-
borderColor: 'rgb(var(--ax-sys-color-border-dark-surface))',
|
|
209
|
-
},
|
|
210
|
-
'.darker-surface': {
|
|
211
|
-
backgroundColor: 'rgb(var(--ax-sys-color-darker-surface))',
|
|
212
|
-
color: 'rgb(var(--ax-sys-color-on-darker-surface))',
|
|
213
|
-
borderColor: 'rgb(var(--ax-sys-color-border-darker-surface))',
|
|
214
|
-
},
|
|
215
|
-
'.darkest-surface': {
|
|
216
|
-
backgroundColor: 'rgb(var(--ax-sys-color-darkest-surface))',
|
|
217
|
-
color: 'rgb(var(--ax-sys-color-on-darkest-surface))',
|
|
218
|
-
borderColor: 'rgb(var(--ax-sys-color-border-darkest-surface))',
|
|
219
|
-
},
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
module.exports = withAnimations({
|
|
223
|
-
content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
|
|
224
|
-
darkMode: 'class',
|
|
225
|
-
safelist: [
|
|
226
|
-
{
|
|
227
|
-
pattern: /(?:(?:on|border)-)?(?:lightest|lighter|light|surface|dark|darker|darkest)/,
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
pattern:
|
|
231
|
-
/(?:bg|text)(?:-(?:primary|secondary|danger|success|warning))?-(?:50|100|200|300|400|500|600|700|800|900|950)/,
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
theme: {
|
|
235
|
-
extend: {
|
|
236
|
-
colors: {
|
|
237
|
-
...SURFACE_BG,
|
|
238
|
-
...SURFACES_ON,
|
|
239
|
-
primary: createPalette('primary'),
|
|
240
|
-
secondary: createPalette('secondary'),
|
|
241
|
-
success: createPalette('success'),
|
|
242
|
-
danger: createPalette('danger'),
|
|
243
|
-
warning: createPalette('warning'),
|
|
244
|
-
},
|
|
245
|
-
textColor: {
|
|
246
|
-
DEFAULT: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
|
|
247
|
-
default: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
|
|
248
|
-
primary: createOnSurfaces('primary'),
|
|
249
|
-
secondary: createOnSurfaces('secondary'),
|
|
250
|
-
success: createOnSurfaces('success'),
|
|
251
|
-
danger: createOnSurfaces('danger'),
|
|
252
|
-
warning: createOnSurfaces('warning'),
|
|
253
|
-
...SURFACES_ON,
|
|
254
|
-
},
|
|
255
|
-
backgroundColor: {
|
|
256
|
-
primary: createSurfaces('primary'),
|
|
257
|
-
secondary: createSurfaces('secondary'),
|
|
258
|
-
success: createSurfaces('success'),
|
|
259
|
-
danger: createSurfaces('danger'),
|
|
260
|
-
warning: createSurfaces('warning'),
|
|
261
|
-
...SURFACE_BG,
|
|
262
|
-
...SURFACES_ON,
|
|
263
|
-
},
|
|
264
|
-
borderColor: {
|
|
265
|
-
primary: createBorderSurfaces('primary'),
|
|
266
|
-
secondary: createBorderSurfaces('secondary'),
|
|
267
|
-
success: createBorderSurfaces('success'),
|
|
268
|
-
danger: createBorderSurfaces('danger'),
|
|
269
|
-
warning: createBorderSurfaces('warning'),
|
|
270
|
-
...SURFACE_BORDER,
|
|
271
|
-
},
|
|
272
|
-
maxWidth: {
|
|
273
|
-
'8xl': '90rem',
|
|
274
|
-
'9xl': '100rem',
|
|
275
|
-
},
|
|
276
|
-
borderRadius: {
|
|
277
|
-
default: 'var(--ax-sys-border-radius)',
|
|
278
|
-
},
|
|
279
|
-
lineHeight: {
|
|
280
|
-
11: '2.5rem',
|
|
281
|
-
12: '3rem',
|
|
282
|
-
12: '3rem',
|
|
283
|
-
14: '3.5rem',
|
|
284
|
-
16: '4rem',
|
|
285
|
-
20: '5rem',
|
|
286
|
-
},
|
|
287
|
-
spacing: {
|
|
288
|
-
default: 'var(--ax-sys-size-base)',
|
|
289
|
-
},
|
|
290
|
-
minWidth: {
|
|
291
|
-
default: 'var(--ax-sys-size-base)',
|
|
292
|
-
},
|
|
293
|
-
width: {
|
|
294
|
-
default: 'var(--ax-sys-size-base)',
|
|
295
|
-
},
|
|
296
|
-
minHeight: {
|
|
297
|
-
default: 'var(--ax-sys-size-base)',
|
|
298
|
-
},
|
|
299
|
-
height: {
|
|
300
|
-
default: 'var(--ax-sys-size-base)',
|
|
301
|
-
},
|
|
302
|
-
maxHeight: {
|
|
303
|
-
default: 'var(--ax-sys-size-base)',
|
|
304
|
-
},
|
|
305
|
-
keyframes: {
|
|
306
|
-
floating: {
|
|
307
|
-
'0%': { transform: 'translatey(0px)' },
|
|
308
|
-
'50%': { transform: 'translatey(-20px)' },
|
|
309
|
-
'100%': { transform: 'translatey(0px)' },
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
animation: {
|
|
313
|
-
floating: 'floating 6s ease-in-out infinite',
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
},
|
|
317
|
-
|
|
318
|
-
plugins: [
|
|
319
|
-
plugin(function ({ addUtilities }) {
|
|
320
|
-
addUtilities(UTILITY_CLASSES, ['responsive', 'hover', 'focus']);
|
|
321
|
-
}),
|
|
322
|
-
childSelector,
|
|
323
|
-
],
|
|
324
|
-
});
|