@fpkit/acss 3.9.0 → 4.1.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.
Files changed (96) hide show
  1. package/libs/components/alert/alert.css +1 -1
  2. package/libs/components/alert/alert.css.map +1 -1
  3. package/libs/components/alert/alert.min.css +2 -2
  4. package/libs/components/badge/badge.css +1 -1
  5. package/libs/components/badge/badge.css.map +1 -1
  6. package/libs/components/badge/badge.min.css +2 -2
  7. package/libs/components/buttons/button.css +1 -1
  8. package/libs/components/buttons/button.css.map +1 -1
  9. package/libs/components/buttons/button.min.css +2 -2
  10. package/libs/components/cards/card.css +1 -1
  11. package/libs/components/cards/card.css.map +1 -1
  12. package/libs/components/cards/card.min.css +2 -2
  13. package/libs/components/details/details.css +1 -1
  14. package/libs/components/details/details.css.map +1 -1
  15. package/libs/components/details/details.min.css +2 -2
  16. package/libs/components/dialog/dialog.css +1 -1
  17. package/libs/components/dialog/dialog.css.map +1 -1
  18. package/libs/components/dialog/dialog.min.css +2 -2
  19. package/libs/components/form/checkbox.css +1 -1
  20. package/libs/components/form/checkbox.css.map +1 -1
  21. package/libs/components/form/checkbox.min.css +2 -2
  22. package/libs/components/form/form.css +1 -1
  23. package/libs/components/form/form.css.map +1 -1
  24. package/libs/components/form/form.min.css +2 -2
  25. package/libs/components/icons/icon.d.cts +1 -1
  26. package/libs/components/icons/icon.d.ts +1 -1
  27. package/libs/components/link/link.css +1 -1
  28. package/libs/components/link/link.css.map +1 -1
  29. package/libs/components/link/link.min.css +2 -2
  30. package/libs/components/nav/nav.css +1 -1
  31. package/libs/components/nav/nav.css.map +1 -1
  32. package/libs/components/nav/nav.min.css +2 -2
  33. package/libs/components/progress/progress.css +1 -1
  34. package/libs/components/progress/progress.css.map +1 -1
  35. package/libs/components/progress/progress.min.css +2 -2
  36. package/libs/components/tag/tag.css +1 -1
  37. package/libs/components/tag/tag.css.map +1 -1
  38. package/libs/components/tag/tag.min.css +2 -2
  39. package/libs/components/text-to-speech/text-to-speech.css +1 -1
  40. package/libs/components/text-to-speech/text-to-speech.css.map +1 -1
  41. package/libs/components/text-to-speech/text-to-speech.min.css +2 -2
  42. package/libs/components/title/title.css +1 -1
  43. package/libs/components/title/title.css.map +1 -1
  44. package/libs/components/title/title.min.css +2 -2
  45. package/libs/{icons-df8e744f.d.ts → icons-952d9bc5.d.ts} +32 -32
  46. package/libs/icons.d.cts +1 -1
  47. package/libs/icons.d.ts +1 -1
  48. package/libs/index.css +1 -1
  49. package/libs/index.css.map +1 -1
  50. package/libs/index.d.cts +2 -2
  51. package/libs/index.d.ts +2 -2
  52. package/package.json +2 -2
  53. package/src/components/alert/alert.scss +22 -22
  54. package/src/components/badge/badge.scss +1 -1
  55. package/src/components/buttons/button.scss +8 -8
  56. package/src/components/cards/card.scss +7 -7
  57. package/src/components/details/details.scss +2 -3
  58. package/src/components/dialog/dialog.scss +4 -4
  59. package/src/components/form/checkbox.scss +11 -11
  60. package/src/components/form/form.scss +19 -10
  61. package/src/components/link/link.scss +1 -1
  62. package/src/components/nav/nav.scss +1 -1
  63. package/src/components/progress/progress.scss +2 -2
  64. package/src/components/tag/tag.scss +7 -7
  65. package/src/components/text-to-speech/text-to-speech.scss +1 -1
  66. package/src/components/title/title.scss +4 -4
  67. package/src/index.scss +15 -1
  68. package/src/sass/_globals.scss +3 -3
  69. package/src/sass/styles/_colors.scss +16 -0
  70. package/src/sass/tokens/_color-primitives.scss +112 -0
  71. package/src/sass/tokens/_color-semantic.scss +144 -0
  72. package/src/sass/tokens/_index.scss +15 -0
  73. package/src/sass/utilities/_color-bg.scss +62 -0
  74. package/src/sass/utilities/_color-border.scss +61 -0
  75. package/src/sass/utilities/_color-text.scss +58 -0
  76. package/src/sass/utilities/_index.scss +17 -0
  77. package/src/sass/utilities/color-utilities.stories.tsx +608 -0
  78. package/src/styles/alert/alert.css +19 -19
  79. package/src/styles/badge/badge.css +1 -1
  80. package/src/styles/buttons/button.css +8 -8
  81. package/src/styles/cards/card.css +7 -7
  82. package/src/styles/details/details.css +2 -3
  83. package/src/styles/details/details.css.map +1 -1
  84. package/src/styles/dialog/dialog.css +4 -4
  85. package/src/styles/form/checkbox.css +11 -11
  86. package/src/styles/form/form.css +26 -21
  87. package/src/styles/form/form.css.map +1 -1
  88. package/src/styles/index.css +516 -82
  89. package/src/styles/index.css.map +1 -1
  90. package/src/styles/link/link.css +1 -1
  91. package/src/styles/nav/nav.css +1 -1
  92. package/src/styles/progress/progress.css +2 -2
  93. package/src/styles/tag/tag.css +7 -7
  94. package/src/styles/text-to-speech/text-to-speech.css +1 -1
  95. package/src/styles/title/title.css +4 -4
  96. package/src/styles/title/title.css.map +1 -1
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Color Semantic Tokens - Purpose Layer (Tier 2)
3
+ *
4
+ * Intent-based color mappings for common use cases.
5
+ * All semantic tokens reference primitive tokens (Tier 1).
6
+ *
7
+ * Pattern: --color-{purpose}-{variant}
8
+ *
9
+ * This layer provides meaning to colors and enables easy theming.
10
+ * To theme the application, override these semantic tokens.
11
+ */
12
+
13
+ :root {
14
+ /* ========================================
15
+ Brand Colors
16
+ Purpose: Primary and secondary brand identity
17
+ ======================================== */
18
+
19
+ /* Primary brand color - Main CTAs, primary buttons, primary links */
20
+ --color-primary: var(--color-blue-600); /* #2563eb */
21
+ --color-primary-hover: var(--color-blue-700); /* #1d4ed8 */
22
+ --color-primary-active: var(--color-blue-800); /* #1e40af */
23
+ --color-primary-light: var(--color-blue-100); /* #dbeafe */
24
+
25
+ /* Secondary brand color - Secondary actions, alternative emphasis */
26
+ --color-secondary: var(--color-neutral-700); /* #404040 */
27
+ --color-secondary-hover: var(--color-neutral-800);/* #262626 */
28
+ --color-secondary-light: var(--color-neutral-100);/* #f5f5f5 */
29
+
30
+ /* ========================================
31
+ State Colors - Success
32
+ Purpose: Positive feedback, valid inputs, confirmations
33
+ ======================================== */
34
+
35
+ --color-success: var(--color-green-600); /* #16a34a */
36
+ --color-success-bg: var(--color-green-100); /* #dcfce7 */
37
+ --color-success-border: var(--color-green-600); /* #16a34a */
38
+ --color-success-text: var(--color-green-800); /* #166534 */
39
+ --color-success-hover: var(--color-green-700); /* #15803d */
40
+
41
+ /* ========================================
42
+ State Colors - Error
43
+ Purpose: Errors, validation failures, destructive actions
44
+ ======================================== */
45
+
46
+ --color-error: var(--color-red-600); /* #dc2626 */
47
+ --color-error-bg: var(--color-red-100); /* #fee2e2 */
48
+ --color-error-border: var(--color-red-600); /* #dc2626 */
49
+ --color-error-text: var(--color-red-800); /* #991b1b */
50
+ --color-error-hover: var(--color-red-700); /* #b91c1c */
51
+
52
+ /* ========================================
53
+ State Colors - Warning
54
+ Purpose: Warnings, cautions, pending actions
55
+ ======================================== */
56
+
57
+ --color-warning: var(--color-amber-600); /* #d97706 */
58
+ --color-warning-bg: var(--color-amber-100); /* #fef3c7 */
59
+ --color-warning-border: var(--color-amber-600); /* #d97706 */
60
+ --color-warning-text: var(--color-amber-800); /* #92400e */
61
+ --color-warning-hover: var(--color-amber-700); /* #b45309 */
62
+
63
+ /* ========================================
64
+ State Colors - Info
65
+ Purpose: Informational messages, tips, notices
66
+ ======================================== */
67
+
68
+ --color-info: var(--color-blue-500); /* #3b82f6 */
69
+ --color-info-bg: var(--color-blue-100); /* #dbeafe */
70
+ --color-info-border: var(--color-blue-500); /* #3b82f6 */
71
+ --color-info-text: var(--color-blue-900); /* #1e3a8a */
72
+ --color-info-hover: var(--color-blue-600); /* #2563eb */
73
+
74
+ /* ========================================
75
+ UI Surface Colors
76
+ Purpose: Backgrounds, containers, cards, modals
77
+ ======================================== */
78
+
79
+ --color-surface: var(--color-neutral-0); /* #ffffff - Primary background */
80
+ --color-surface-secondary: var(--color-neutral-50);/* #fafafa - Secondary background */
81
+ --color-surface-tertiary: var(--color-neutral-100);/* #f5f5f5 - Tertiary background */
82
+ --color-surface-elevated: var(--color-neutral-0); /* #ffffff - Cards, modals, raised elements */
83
+ --color-surface-overlay: rgba(0, 0, 0, 0.5); /* Modal overlay, backdrop */
84
+
85
+ /* ========================================
86
+ Border Colors
87
+ Purpose: Borders, dividers, separators, outlines
88
+ ======================================== */
89
+
90
+ --color-border: var(--color-neutral-300); /* #d4d4d4 - Default borders */
91
+ --color-border-subtle: var(--color-neutral-200); /* #e5e5e5 - Subtle borders, dividers */
92
+ --color-border-strong: var(--color-neutral-400); /* #a3a3a3 - Emphasized borders */
93
+ --color-border-interactive: var(--color-neutral-400);/* #a3a3a3 - Hover borders on inputs */
94
+
95
+ /* ========================================
96
+ Text Colors
97
+ Purpose: Body text, headings, labels, captions
98
+ ======================================== */
99
+
100
+ --color-text: var(--color-neutral-800); /* #262626 - Primary body text */
101
+ --color-text-secondary: var(--color-neutral-700); /* #404040 - Secondary text, labels */
102
+ --color-text-tertiary: var(--color-neutral-600); /* #525252 - Tertiary text, captions */
103
+ --color-text-disabled: var(--color-neutral-500); /* #737373 - Disabled text */
104
+ --color-text-inverse: var(--color-neutral-0); /* #ffffff - Text on dark backgrounds */
105
+
106
+ /* ========================================
107
+ Interactive States
108
+ Purpose: Focus, hover, active, disabled states
109
+ ======================================== */
110
+
111
+ --color-focus: var(--color-blue-600); /* #2563eb - Focus outlines (WCAG 3:1 contrast) */
112
+ --color-focus-ring: var(--color-blue-600); /* #2563eb - Focus rings on inputs */
113
+ --color-hover-overlay: rgba(0, 0, 0, 0.05); /* Subtle hover overlay on buttons */
114
+ --color-active-overlay: rgba(0, 0, 0, 0.1); /* Active/pressed overlay on buttons */
115
+ --color-disabled-bg: var(--color-neutral-100); /* #f5f5f5 - Disabled backgrounds */
116
+ --color-disabled-text: var(--color-neutral-500); /* #737373 - Disabled text */
117
+
118
+ /* ========================================
119
+ Link Colors
120
+ Purpose: Hyperlinks, navigation links
121
+ ======================================== */
122
+
123
+ --color-link: var(--color-blue-700); /* #1d4ed8 - Default link color */
124
+ --color-link-hover: var(--color-blue-800); /* #1e40af - Link hover state */
125
+ --color-link-visited: var(--color-blue-900); /* #1e3a8a - Visited link color */
126
+ --color-link-active: var(--color-blue-800); /* #1e40af - Link active/pressed state */
127
+
128
+ /* ========================================
129
+ Validation Colors
130
+ Purpose: Form validation, required fields
131
+ ======================================== */
132
+
133
+ --color-required: var(--color-red-600); /* #dc2626 - Required field indicators */
134
+ --color-valid: var(--color-green-600); /* #16a34a - Valid input indicators */
135
+ --color-invalid: var(--color-red-600); /* #dc2626 - Invalid input indicators */
136
+
137
+ /* ========================================
138
+ Skip Link & Accessibility
139
+ Purpose: Skip navigation, accessibility utilities
140
+ ======================================== */
141
+
142
+ --color-skip-link-bg: var(--color-neutral-100); /* #f5f5f5 - Skip link background */
143
+ --color-skip-link-text: var(--color-text); /* Inherits default text color */
144
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Color Tokens - Main Export
3
+ *
4
+ * This file exports the complete color token system.
5
+ * Import order matters: primitives must load before semantic tokens.
6
+ *
7
+ * Usage in main index.scss:
8
+ * @use "./sass/tokens";
9
+ */
10
+
11
+ /* Tier 1: Primitive color scales (foundation) */
12
+ @forward "./color-primitives";
13
+
14
+ /* Tier 2: Semantic color mappings (purpose-based) */
15
+ @forward "./color-semantic";
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Background Color Utilities
3
+ *
4
+ * Semantic background color utility classes for quick styling.
5
+ * All utilities reference semantic tokens (Tier 2), not primitives.
6
+ *
7
+ * Usage:
8
+ * <div class="bg-primary">Primary background</div>
9
+ * <div class="bg-success">Success background</div>
10
+ */
11
+
12
+ /* ========================================
13
+ Brand Backgrounds
14
+ ======================================== */
15
+
16
+ .bg-primary {
17
+ background-color: var(--color-primary);
18
+ }
19
+
20
+ .bg-primary-light {
21
+ background-color: var(--color-primary-light);
22
+ }
23
+
24
+ .bg-secondary {
25
+ background-color: var(--color-secondary-light);
26
+ }
27
+
28
+ /* ========================================
29
+ State Backgrounds
30
+ ======================================== */
31
+
32
+ .bg-success {
33
+ background-color: var(--color-success-bg);
34
+ }
35
+
36
+ .bg-error {
37
+ background-color: var(--color-error-bg);
38
+ }
39
+
40
+ .bg-warning {
41
+ background-color: var(--color-warning-bg);
42
+ }
43
+
44
+ .bg-info {
45
+ background-color: var(--color-info-bg);
46
+ }
47
+
48
+ /* ========================================
49
+ Surface Backgrounds
50
+ ======================================== */
51
+
52
+ .bg-surface {
53
+ background-color: var(--color-surface);
54
+ }
55
+
56
+ .bg-surface-secondary {
57
+ background-color: var(--color-surface-secondary);
58
+ }
59
+
60
+ .bg-transparent {
61
+ background-color: transparent;
62
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Border Color Utilities
3
+ *
4
+ * Semantic border color utility classes for quick styling.
5
+ * All utilities reference semantic tokens (Tier 2), not primitives.
6
+ *
7
+ * Note: These utilities only set border-color.
8
+ * You may need to set border-width and border-style separately.
9
+ *
10
+ * Usage:
11
+ * <div class="border-primary" style="border: 1px solid;">
12
+ * <div class="border-error" style="border-width: 2px; border-style: solid;">
13
+ */
14
+
15
+ /* ========================================
16
+ Brand Borders
17
+ ======================================== */
18
+
19
+ .border-primary {
20
+ border-color: var(--color-primary);
21
+ }
22
+
23
+ .border-secondary {
24
+ border-color: var(--color-secondary);
25
+ }
26
+
27
+ /* ========================================
28
+ State Borders
29
+ ======================================== */
30
+
31
+ .border-success {
32
+ border-color: var(--color-success-border);
33
+ }
34
+
35
+ .border-error {
36
+ border-color: var(--color-error-border);
37
+ }
38
+
39
+ .border-warning {
40
+ border-color: var(--color-warning-border);
41
+ }
42
+
43
+ .border-info {
44
+ border-color: var(--color-info-border);
45
+ }
46
+
47
+ /* ========================================
48
+ UI Borders
49
+ ======================================== */
50
+
51
+ .border-default {
52
+ border-color: var(--color-border);
53
+ }
54
+
55
+ .border-subtle {
56
+ border-color: var(--color-border-subtle);
57
+ }
58
+
59
+ .border-transparent {
60
+ border-color: transparent;
61
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Text Color Utilities
3
+ *
4
+ * Semantic text color utility classes for quick styling.
5
+ * All utilities reference semantic tokens (Tier 2), not primitives.
6
+ *
7
+ * Usage:
8
+ * <p class="text-primary">Primary text</p>
9
+ * <span class="text-error">Error message</span>
10
+ */
11
+
12
+ /* ========================================
13
+ Brand Text Colors
14
+ ======================================== */
15
+
16
+ .text-primary {
17
+ color: var(--color-primary);
18
+ }
19
+
20
+ .text-secondary {
21
+ color: var(--color-secondary);
22
+ }
23
+
24
+ /* ========================================
25
+ State Text Colors
26
+ ======================================== */
27
+
28
+ .text-success {
29
+ color: var(--color-success-text);
30
+ }
31
+
32
+ .text-error {
33
+ color: var(--color-error-text);
34
+ }
35
+
36
+ .text-warning {
37
+ color: var(--color-warning-text);
38
+ }
39
+
40
+ .text-info {
41
+ color: var(--color-info-text);
42
+ }
43
+
44
+ /* ========================================
45
+ Text Hierarchy Colors
46
+ ======================================== */
47
+
48
+ .text-muted {
49
+ color: var(--color-text-tertiary);
50
+ }
51
+
52
+ .text-disabled {
53
+ color: var(--color-text-disabled);
54
+ }
55
+
56
+ .text-inverse {
57
+ color: var(--color-text-inverse);
58
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Utilities - Main Export
3
+ *
4
+ * This file exports all utility classes.
5
+ * Utilities are loaded after tokens and base styles, before components.
6
+ *
7
+ * Usage in main index.scss:
8
+ * @use "./sass/utilities";
9
+ */
10
+
11
+ /* Existing utilities */
12
+ @forward "../../styles/utilities/disabled";
13
+
14
+ /* New color utilities (semantic only) */
15
+ @forward "./color-text";
16
+ @forward "./color-bg";
17
+ @forward "./color-border";