css-is-awesome 1.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 (198) hide show
  1. package/AGENTS.md +343 -0
  2. package/CHANGELOG.md +1036 -0
  3. package/CLAUDE.md +9 -0
  4. package/CONTRACT.md +580 -0
  5. package/GEMINI.md +9 -0
  6. package/LICENSE +21 -0
  7. package/LICENSE-third-party +88 -0
  8. package/MIGRATION.md +312 -0
  9. package/README.md +380 -0
  10. package/ROADMAP.md +714 -0
  11. package/THEMING.md +290 -0
  12. package/THREE-TIERS.md +158 -0
  13. package/VERSIONING.md +200 -0
  14. package/_index.scss +34 -0
  15. package/api.scss +16 -0
  16. package/bin/README.md +57 -0
  17. package/bin/cia.cjs +114 -0
  18. package/bin/migrate-bootstrap.cjs +427 -0
  19. package/bin/migrate-tailwind.cjs +832 -0
  20. package/css-is-awesome.instructions.md +533 -0
  21. package/dist/css-is-awesome.core.css +598 -0
  22. package/dist/css-is-awesome.core.min.css +1 -0
  23. package/dist/css-is-awesome.css +3733 -0
  24. package/dist/css-is-awesome.min.css +1 -0
  25. package/dist/css-is-awesome.utilities.css +2445 -0
  26. package/dist/css-is-awesome.utilities.min.css +1 -0
  27. package/dist/tokens.css +508 -0
  28. package/dist/tokens.d.ts +266 -0
  29. package/dist/tokens.min.css +1 -0
  30. package/figma-tokens/README.md +57 -0
  31. package/figma-tokens/primitives-brand.scss +121 -0
  32. package/figma-tokens/semantic-dark.scss +61 -0
  33. package/figma-tokens/semantic-light.scss +61 -0
  34. package/figma-tokens/tokens.json +144 -0
  35. package/llm.txt +183 -0
  36. package/mcp/server.cjs +1495 -0
  37. package/package.json +199 -0
  38. package/public/icons/README.md +278 -0
  39. package/public/icons/arrow-right.svg +4 -0
  40. package/public/icons/check.svg +4 -0
  41. package/public/icons/chevron-down.svg +4 -0
  42. package/public/icons/close.svg +4 -0
  43. package/public/icons/core/arrow-down.svg +13 -0
  44. package/public/icons/core/arrow-left.svg +13 -0
  45. package/public/icons/core/arrow-right.svg +13 -0
  46. package/public/icons/core/arrow-up.svg +13 -0
  47. package/public/icons/core/bell.svg +13 -0
  48. package/public/icons/core/calendar.svg +15 -0
  49. package/public/icons/core/check.svg +12 -0
  50. package/public/icons/core/chevron-down.svg +12 -0
  51. package/public/icons/core/chevron-left.svg +12 -0
  52. package/public/icons/core/chevron-right.svg +12 -0
  53. package/public/icons/core/chevron-up.svg +12 -0
  54. package/public/icons/core/clock.svg +13 -0
  55. package/public/icons/core/close.svg +13 -0
  56. package/public/icons/core/copy.svg +13 -0
  57. package/public/icons/core/download.svg +14 -0
  58. package/public/icons/core/edit.svg +13 -0
  59. package/public/icons/core/error.svg +14 -0
  60. package/public/icons/core/external-link.svg +14 -0
  61. package/public/icons/core/eye-off.svg +15 -0
  62. package/public/icons/core/eye.svg +13 -0
  63. package/public/icons/core/filter.svg +12 -0
  64. package/public/icons/core/heart.svg +12 -0
  65. package/public/icons/core/help.svg +14 -0
  66. package/public/icons/core/home.svg +13 -0
  67. package/public/icons/core/info.svg +14 -0
  68. package/public/icons/core/loading.svg +12 -0
  69. package/public/icons/core/lock.svg +13 -0
  70. package/public/icons/core/mail.svg +13 -0
  71. package/public/icons/core/menu.svg +14 -0
  72. package/public/icons/core/message.svg +12 -0
  73. package/public/icons/core/minus.svg +12 -0
  74. package/public/icons/core/more-horizontal.svg +14 -0
  75. package/public/icons/core/pause.svg +13 -0
  76. package/public/icons/core/play.svg +12 -0
  77. package/public/icons/core/plus.svg +13 -0
  78. package/public/icons/core/refresh.svg +15 -0
  79. package/public/icons/core/save.svg +14 -0
  80. package/public/icons/core/search.svg +13 -0
  81. package/public/icons/core/settings.svg +13 -0
  82. package/public/icons/core/share.svg +14 -0
  83. package/public/icons/core/sort.svg +15 -0
  84. package/public/icons/core/star.svg +12 -0
  85. package/public/icons/core/success.svg +13 -0
  86. package/public/icons/core/trash.svg +16 -0
  87. package/public/icons/core/unlock.svg +13 -0
  88. package/public/icons/core/upload.svg +14 -0
  89. package/public/icons/core/user.svg +13 -0
  90. package/public/icons/core/users.svg +15 -0
  91. package/public/icons/core/warning.svg +14 -0
  92. package/public/icons/download.svg +4 -0
  93. package/public/icons/edit.svg +4 -0
  94. package/public/icons/menu.svg +4 -0
  95. package/public/icons/search.svg +4 -0
  96. package/public/theme.css +4179 -0
  97. package/public/themes/README.md +102 -0
  98. package/public/themes/boilerplate/theme.css +154 -0
  99. package/public/themes/boilerplate-dark/theme.css +171 -0
  100. package/public/themes/boilerplate-light/theme.css +171 -0
  101. package/public/themes/cupertino/theme.css +165 -0
  102. package/public/themes/cupertino-dark/theme.css +200 -0
  103. package/public/themes/cupertino-light/theme.css +227 -0
  104. package/public/themes/glass/theme.css +190 -0
  105. package/public/themes/glass-dark/theme.css +201 -0
  106. package/public/themes/glass-light/theme.css +229 -0
  107. package/public/themes/graphite/theme.css +155 -0
  108. package/public/themes/graphite-dark/theme.css +223 -0
  109. package/public/themes/graphite-light/theme.css +191 -0
  110. package/public/themes/press/theme.css +189 -0
  111. package/public/themes/press-dark/theme.css +199 -0
  112. package/public/themes/press-light/theme.css +235 -0
  113. package/public/themes/prism/theme.css +159 -0
  114. package/public/themes/prism-dark/theme.css +185 -0
  115. package/public/themes/prism-light/theme.css +188 -0
  116. package/public/themes/sketchbook/theme.css +152 -0
  117. package/public/themes/sketchbook-dark/theme.css +194 -0
  118. package/public/themes/sketchbook-light/theme.css +188 -0
  119. package/public/themes/terminal/theme.css +159 -0
  120. package/public/themes/terminal-dark/theme.css +229 -0
  121. package/public/themes/terminal-light/theme.css +152 -0
  122. package/scripts/README.md +70 -0
  123. package/scripts/icon-contract.json +67 -0
  124. package/scripts/icon-validator.js +205 -0
  125. package/scripts/prepare-dist.mjs +65 -0
  126. package/scripts/theme-a11y.js +415 -0
  127. package/scripts/theme-contract.json +171 -0
  128. package/scripts/theme-validator.js +674 -0
  129. package/scss/README.md +55 -0
  130. package/scss/_animations-utilities.scss +107 -0
  131. package/scss/_animations.scss +248 -0
  132. package/scss/_app-styles.scss +15 -0
  133. package/scss/_generator.scss +174 -0
  134. package/scss/_icons.scss +475 -0
  135. package/scss/_index.scss +17 -0
  136. package/scss/_layout.scss +597 -0
  137. package/scss/_mixins.scss +1036 -0
  138. package/scss/_system.scss +291 -0
  139. package/scss/_utilities.scss +377 -0
  140. package/scss/api.scss +61 -0
  141. package/scss/components/_accordion.scss +72 -0
  142. package/scss/components/_buttons.scss +171 -0
  143. package/scss/components/_copy-button.scss +69 -0
  144. package/scss/components/_data.scss +190 -0
  145. package/scss/components/_feedback.scss +197 -0
  146. package/scss/components/_forms.scss +272 -0
  147. package/scss/components/_index.scss +17 -0
  148. package/scss/components/_navigation.scss +186 -0
  149. package/scss/components/_overlay.scss +259 -0
  150. package/scss/components/_stepper.scss +159 -0
  151. package/scss/components/_tabs.scss +72 -0
  152. package/scss/core.scss +54 -0
  153. package/scss/examples/_theming.scss +107 -0
  154. package/scss/examples/_usage.scss +317 -0
  155. package/scss/main.scss +64 -0
  156. package/scss/recipes/README.md +110 -0
  157. package/scss/recipes/_bare-tags.scss +232 -0
  158. package/scss/recipes/_recipe-template.md +119 -0
  159. package/scss/recipes/combobox.md +509 -0
  160. package/scss/recipes/dialog.md +265 -0
  161. package/scss/recipes/print-to-pdf.md +263 -0
  162. package/scss/theme/README.md +67 -0
  163. package/scss/theme/_brand.scss +18 -0
  164. package/scss/theme/_colors-dark.scss +68 -0
  165. package/scss/theme/_colors-light.scss +70 -0
  166. package/scss/theme/_components.scss +94 -0
  167. package/scss/theme/_icons.scss +104 -0
  168. package/scss/theme/_index.scss +62 -0
  169. package/scss/theme/_shadows.scss +65 -0
  170. package/scss/theme/_shape.scss +13 -0
  171. package/scss/theme/_typography.scss +9 -0
  172. package/scss/theme/registry.json +447 -0
  173. package/scss/themes/boilerplate-dark.scss +212 -0
  174. package/scss/themes/boilerplate-light.scss +209 -0
  175. package/scss/themes/boilerplate.scss +181 -0
  176. package/scss/themes/cupertino-dark.scss +238 -0
  177. package/scss/themes/cupertino-light.scss +266 -0
  178. package/scss/themes/cupertino.scss +194 -0
  179. package/scss/themes/glass-dark.scss +238 -0
  180. package/scss/themes/glass-light.scss +266 -0
  181. package/scss/themes/glass.scss +220 -0
  182. package/scss/themes/graphite-dark.scss +260 -0
  183. package/scss/themes/graphite-light.scss +228 -0
  184. package/scss/themes/graphite.scss +182 -0
  185. package/scss/themes/press-dark.scss +237 -0
  186. package/scss/themes/press-light.scss +273 -0
  187. package/scss/themes/press.scss +241 -0
  188. package/scss/themes/prism-dark.scss +217 -0
  189. package/scss/themes/prism-light.scss +220 -0
  190. package/scss/themes/prism.scss +190 -0
  191. package/scss/themes/sketchbook-dark.scss +231 -0
  192. package/scss/themes/sketchbook-light.scss +231 -0
  193. package/scss/themes/sketchbook.scss +178 -0
  194. package/scss/themes/terminal-dark.scss +267 -0
  195. package/scss/themes/terminal-light.scss +175 -0
  196. package/scss/themes/terminal.scss +185 -0
  197. package/scss/tokens.scss +23 -0
  198. package/scss/utilities-only.scss +4 -0
@@ -0,0 +1,197 @@
1
+ // ============================================================================
2
+ // FEEDBACK — Alert, Toast, Badge, Tag, Progress
3
+ // ============================================================================
4
+ @use 'sass:map';
5
+ @use '../theme' as t;
6
+ @use '../system' as s;
7
+ @use '../mixins' as m;
8
+
9
+ // ----------------------------------------------------------------------------
10
+ // ALERT
11
+ // ----------------------------------------------------------------------------
12
+ // Usage:
13
+ // .alert { @include alert-base; }
14
+ // .alert-success { @include alert(success); }
15
+ // .alert-error { @include alert(error); }
16
+
17
+ @mixin alert-base($py: 2, $px: 4, $r: md, $border-width: 1px) {
18
+ display: flex;
19
+ align-items: flex-start;
20
+ gap: m.space(2);
21
+ padding: var(--alert-padding-y, #{m.space($py)}) var(--alert-padding-x, #{m.space($px)});
22
+ border-radius: var(--alert-radius, #{m.radius($r)});
23
+ border: $border-width solid transparent;
24
+ @include m.font(reg, 2);
25
+ }
26
+
27
+ @mixin alert($status: info, $py: 2, $px: 4, $r: md) {
28
+ @include alert-base($py: $py, $px: $px, $r: $r);
29
+ background: m.color(#{$status}-subtle);
30
+ border-color: m.color(#{$status}-default);
31
+ color: m.color(#{$status}-text);
32
+ }
33
+
34
+ // ----------------------------------------------------------------------------
35
+ // TOAST
36
+ // ----------------------------------------------------------------------------
37
+ @mixin toast-base($py: 2, $px: 4, $r: lg, $shadow: 3) {
38
+ display: flex;
39
+ align-items: center;
40
+ gap: m.space(2);
41
+ padding: m.space($py) m.space($px);
42
+ border-radius: m.radius($r);
43
+ background: m.color(surface-default);
44
+ box-shadow: m.shadow($shadow);
45
+ @include m.font(reg, 2);
46
+ }
47
+
48
+ // ----------------------------------------------------------------------------
49
+ // BADGE — moved to _data.scss in v0.8.1 (next to card-base/table-base).
50
+ // (Re-exported via the components barrel, so `cia.badge-base` still works.)
51
+ // ----------------------------------------------------------------------------
52
+
53
+ // ----------------------------------------------------------------------------
54
+ // TAG / CHIP
55
+ // ----------------------------------------------------------------------------
56
+ // Usage:
57
+ // .tag { @include tag; }
58
+ // .tag-x { @include tag($removable: true); }
59
+ @mixin tag(
60
+ $py: 2xs,
61
+ $px: 2,
62
+ $r: md,
63
+ $font-size: 2,
64
+ $removable: false
65
+ ) {
66
+ display: inline-flex;
67
+ align-items: center;
68
+ gap: m.space(2xs);
69
+ padding: var(--tag-padding-y, #{m.space($py)}) var(--tag-padding-x, #{m.space($px)});
70
+ border-radius: var(--tag-radius, #{m.radius($r)});
71
+ @include m.font(reg, $font-size);
72
+ background: m.color(surface-muted);
73
+ color: m.color(text-primary);
74
+ border: 1px solid m.color(border-default);
75
+
76
+ @if $removable {
77
+ padding-right: m.space(2xs);
78
+ }
79
+ }
80
+
81
+ // ----------------------------------------------------------------------------
82
+ // PROGRESS BAR
83
+ // ----------------------------------------------------------------------------
84
+ // Two primitives + a composer.
85
+ //
86
+ // Primitives (compose your own markup):
87
+ // .my-track { @include progress-track-base; }
88
+ // .my-track > .fill { @include progress-fill-base; }
89
+ //
90
+ // Composer (one mixin, data-slot markup):
91
+ // <div class="my-progress" role="progressbar"><span data-slot="fill" style="inline-size: 60%"></span></div>
92
+ // .my-progress { @include progress; }
93
+ //
94
+ // Renamed from progress-track / progress-fill in v0.8.1 (added -base suffix
95
+ // to signal "compose me" intent and unblock the progress() router name).
96
+ @mixin progress-track-base($height: 0.5rem, $r: full, $bg: surface-muted) {
97
+ width: 100%;
98
+ height: $height;
99
+ border-radius: m.radius($r);
100
+ background: m.color($bg);
101
+ overflow: hidden;
102
+ }
103
+
104
+ @mixin progress-fill-base($color: action-primary-default) {
105
+ height: 100%;
106
+ border-radius: inherit;
107
+ background: m.color($color);
108
+ @include m.transition(inline-size, slow);
109
+ }
110
+
111
+ @mixin progress(
112
+ $height: 0.5rem,
113
+ $r: full,
114
+ $bg: surface-muted,
115
+ $fill: action-primary-default,
116
+ ) {
117
+ @include progress-track-base($height, $r, $bg);
118
+ > [data-slot='fill'] { @include progress-fill-base($fill); }
119
+ }
120
+
121
+ // ----------------------------------------------------------------------------
122
+ // SPINNER
123
+ // ----------------------------------------------------------------------------
124
+ // A circular loading indicator. Inherits size from font-size of the parent.
125
+ // Respects prefers-reduced-motion — drops to a pulsing opacity.
126
+ @mixin spinner(
127
+ $size: 1.25em,
128
+ $thickness: 2px,
129
+ $color: action-primary-default
130
+ ) {
131
+ display: inline-block;
132
+ width: $size;
133
+ height: $size;
134
+ border: $thickness solid m.color(border-default);
135
+ border-top-color: m.color($color);
136
+ border-radius: 50%;
137
+ animation: cia-spinner-rotate 0.7s linear infinite;
138
+
139
+ @media (prefers-reduced-motion: reduce) {
140
+ animation: cia-spinner-pulse 1.2s ease-in-out infinite;
141
+ border-top-color: m.color($color);
142
+ }
143
+
144
+ /* Keyframes scoped via @at-root — emit only when the mixin is called */
145
+ @at-root {
146
+ @keyframes cia-spinner-rotate {
147
+ to { transform: rotate(360deg); }
148
+ }
149
+ @keyframes cia-spinner-pulse {
150
+ 0%, 100% { opacity: 0.4; }
151
+ 50% { opacity: 1; }
152
+ }
153
+ }
154
+ }
155
+
156
+ // ----------------------------------------------------------------------------
157
+ // SKELETON
158
+ // ----------------------------------------------------------------------------
159
+ // A placeholder loading shape that shimmers across its surface while waiting
160
+ // for real content. Respects prefers-reduced-motion — drops to a subtle
161
+ // pulse instead of the shimmer sweep.
162
+ @mixin skeleton(
163
+ $bg: surface-muted,
164
+ $highlight: surface-subtle,
165
+ $r: md
166
+ ) {
167
+ display: block;
168
+ background-color: m.color($bg);
169
+ background-image: linear-gradient(
170
+ 90deg,
171
+ transparent 0%,
172
+ m.color($highlight) 50%,
173
+ transparent 100%
174
+ );
175
+ background-size: 200% 100%;
176
+ background-repeat: no-repeat;
177
+ background-position: -100% 0;
178
+ border-radius: m.radius($r);
179
+ animation: cia-skeleton-shimmer 1.6s linear infinite;
180
+
181
+ @media (prefers-reduced-motion: reduce) {
182
+ background-image: none;
183
+ animation: cia-skeleton-pulse 1.6s ease-in-out infinite;
184
+ }
185
+
186
+ /* Keyframes scoped via @at-root — emit only when the mixin is called */
187
+ @at-root {
188
+ @keyframes cia-skeleton-shimmer {
189
+ 0% { background-position: -100% 0; }
190
+ 100% { background-position: 200% 0; }
191
+ }
192
+ @keyframes cia-skeleton-pulse {
193
+ 0%, 100% { opacity: 1; }
194
+ 50% { opacity: 0.7; }
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,272 @@
1
+ // ============================================================================
2
+ // FORM CONTROLS
3
+ // ============================================================================
4
+ // Input, select, textarea, checkbox, radio, label, form layout.
5
+ //
6
+ // Usage:
7
+ // input { @include input-base; }
8
+ // label { @include label-base; }
9
+ // .form { @include form-layout(2); }
10
+ // .field { @include form-group; }
11
+ // ============================================================================
12
+ @use 'sass:map';
13
+ @use '../theme' as t;
14
+ @use '../system' as s;
15
+ @use '../mixins' as m;
16
+
17
+ // ----------------------------------------------------------------------------
18
+ // INPUT
19
+ // ----------------------------------------------------------------------------
20
+ @mixin input-base(
21
+ $py: 1,
22
+ $px: 2,
23
+ $r: md,
24
+ $border-width: 1px,
25
+ $bg: surface-default,
26
+ $border-color: border-default,
27
+ $font-size: null
28
+ ) {
29
+ min-height: var(--touch-target-min, 24px); /* WCAG 2.2 SC 2.5.8 */
30
+ padding: var(--input-padding-y, #{m.space($py)}) var(--input-padding-x, #{m.space($px)});
31
+ border: var(--input-border-width, #{$border-width}) solid m.color($border-color);
32
+ border-radius: var(--input-radius, #{m.radius($r)});
33
+ background: m.color($bg);
34
+ @include m.transition(border-color, box-shadow);
35
+
36
+ @if $font-size {
37
+ font-size: m.font-size($font-size);
38
+ }
39
+
40
+ &:focus {
41
+ outline: none;
42
+ border-color: m.color(border-focus);
43
+ box-shadow: 0 0 0 3px rgba(m.color-static(border-focus), 0.2);
44
+ }
45
+
46
+ &::placeholder {
47
+ color: m.color(text-muted);
48
+ }
49
+
50
+ &:disabled { @include m.disabled; }
51
+ }
52
+
53
+ // ----------------------------------------------------------------------------
54
+ // SELECT
55
+ // ----------------------------------------------------------------------------
56
+ @mixin select-base(
57
+ $py: 1,
58
+ $px: 2,
59
+ $r: md,
60
+ $bg: surface-default,
61
+ $border-color: border-default
62
+ ) {
63
+ @include input-base($py: $py, $px: $px, $r: $r, $bg: $bg, $border-color: $border-color);
64
+ appearance: none;
65
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23525252' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
66
+ background-repeat: no-repeat;
67
+ background-position: right m.space-raw(2) center;
68
+ background-size: 1em;
69
+ padding-right: m.space-raw(6);
70
+ }
71
+
72
+ // ----------------------------------------------------------------------------
73
+ // TEXTAREA
74
+ // ----------------------------------------------------------------------------
75
+ @mixin textarea-base(
76
+ $py: 2,
77
+ $px: 2,
78
+ $r: md,
79
+ $min-height: 6rem,
80
+ $resize: vertical
81
+ ) {
82
+ @include input-base($py: $py, $px: $px, $r: $r);
83
+ min-height: $min-height;
84
+ resize: $resize;
85
+ }
86
+
87
+ // ----------------------------------------------------------------------------
88
+ // CHECKBOX & RADIO
89
+ // ----------------------------------------------------------------------------
90
+ @mixin check-base($size: 1.125rem, $r: sm, $color: action-primary-default) {
91
+ appearance: none;
92
+ width: $size;
93
+ height: $size;
94
+ border: 2px solid m.color(border-default);
95
+ border-radius: m.radius($r);
96
+ background: m.color(surface-default);
97
+ @include m.transition(background-color, border-color);
98
+ cursor: pointer;
99
+ flex-shrink: 0;
100
+
101
+ &:checked {
102
+ background: m.color($color);
103
+ border-color: m.color($color);
104
+ }
105
+
106
+ @include m.focus-ring;
107
+
108
+ &:disabled { @include m.disabled; }
109
+ }
110
+
111
+ @mixin radio-base($size: 1.125rem, $color: action-primary-default) {
112
+ @include check-base($size: $size, $r: full, $color: $color);
113
+ }
114
+
115
+ // ----------------------------------------------------------------------------
116
+ // SWITCH (TOGGLE)
117
+ // ----------------------------------------------------------------------------
118
+ // A pill-shaped on/off control. Styles a raw `<input type="checkbox">`.
119
+ // Usage: input[type="checkbox"].switch { @include switch-base; }
120
+ @mixin switch-base(
121
+ $w: 2.5rem,
122
+ $h: 1.25rem,
123
+ $color: action-primary-default
124
+ ) {
125
+ appearance: none;
126
+ -webkit-appearance: none;
127
+ width: $w;
128
+ height: $h;
129
+ background: m.color(surface-muted);
130
+ border: 1px solid m.color(border-default);
131
+ border-radius: m.radius(full);
132
+ position: relative;
133
+ cursor: pointer;
134
+ @include m.transition(background-color, border-color);
135
+ @include m.focus-ring;
136
+
137
+ &::before {
138
+ content: '';
139
+ position: absolute;
140
+ top: 1px;
141
+ left: 1px;
142
+ width: calc(#{$h} - 4px);
143
+ height: calc(#{$h} - 4px);
144
+ border-radius: 50%;
145
+ background: m.color(surface-default);
146
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
147
+ @include m.transition(transform);
148
+ }
149
+
150
+ &:checked {
151
+ background: m.color($color);
152
+ border-color: m.color($color);
153
+ }
154
+ &:checked::before {
155
+ transform: translateX(calc(#{$w} - #{$h}));
156
+ }
157
+ &:disabled {
158
+ opacity: 0.5;
159
+ cursor: not-allowed;
160
+ }
161
+ }
162
+
163
+ // ----------------------------------------------------------------------------
164
+ // SLIDER (RANGE INPUT)
165
+ // ----------------------------------------------------------------------------
166
+ // A tokenized wrapper for <input type="range">.
167
+ // Tracks `appearance: none` quirks across browsers with vendor selectors.
168
+ @mixin slider-base(
169
+ $track-h: 4px,
170
+ $thumb-size: 1.1rem,
171
+ $color: action-primary-default
172
+ ) {
173
+ appearance: none;
174
+ -webkit-appearance: none;
175
+ width: 100%;
176
+ background: transparent;
177
+ @include m.focus-ring;
178
+
179
+ &::-webkit-slider-runnable-track {
180
+ height: $track-h;
181
+ background: m.color(surface-muted);
182
+ border-radius: m.radius(full);
183
+ }
184
+ &::-moz-range-track {
185
+ height: $track-h;
186
+ background: m.color(surface-muted);
187
+ border-radius: m.radius(full);
188
+ border: 0;
189
+ }
190
+
191
+ &::-webkit-slider-thumb {
192
+ -webkit-appearance: none;
193
+ appearance: none;
194
+ width: $thumb-size;
195
+ height: $thumb-size;
196
+ border-radius: 50%;
197
+ background: m.color($color);
198
+ border: 0;
199
+ margin-top: calc((#{$track-h} - #{$thumb-size}) / 2);
200
+ cursor: pointer;
201
+ @include m.transition(transform);
202
+ }
203
+ &::-moz-range-thumb {
204
+ width: $thumb-size;
205
+ height: $thumb-size;
206
+ border-radius: 50%;
207
+ background: m.color($color);
208
+ border: 0;
209
+ cursor: pointer;
210
+ }
211
+ &:disabled {
212
+ opacity: 0.5;
213
+ cursor: not-allowed;
214
+ }
215
+ &:disabled::-webkit-slider-thumb { cursor: not-allowed; }
216
+ &:disabled::-moz-range-thumb { cursor: not-allowed; }
217
+ }
218
+
219
+ // ----------------------------------------------------------------------------
220
+ // LABEL
221
+ // ----------------------------------------------------------------------------
222
+ // `$margin-bottom: null` emits no margin at all — the right default for a
223
+ // `gap`-driven form layout, where a baked margin fights the container and has
224
+ // to be overridden. Pass a scale step (or a raw length) to opt back in.
225
+ @mixin label-base($size: 2, $weight: medium, $color: text-primary, $margin-bottom: null) {
226
+ display: block;
227
+ @include m.font($weight, $size);
228
+ color: m.color($color);
229
+ @if $margin-bottom {
230
+ margin-bottom: m.space($margin-bottom);
231
+ }
232
+ }
233
+
234
+ // ----------------------------------------------------------------------------
235
+ // FORM LAYOUT
236
+ // ----------------------------------------------------------------------------
237
+ @mixin form-layout($columns: 1, $gap: 4) {
238
+ display: grid;
239
+ gap: m.space($gap);
240
+ @if $columns > 1 {
241
+ @include m.tablet {
242
+ grid-template-columns: repeat($columns, 1fr);
243
+ }
244
+ }
245
+ }
246
+
247
+ @mixin form-group($gap: 1, $direction: column) {
248
+ display: flex;
249
+ flex-direction: $direction;
250
+ gap: m.space($gap);
251
+ }
252
+
253
+ @mixin form-row($gap: 2, $align: center) {
254
+ display: flex;
255
+ align-items: $align;
256
+ gap: m.space($gap);
257
+ }
258
+
259
+ // ----------------------------------------------------------------------------
260
+ // HELPER TEXT
261
+ // ----------------------------------------------------------------------------
262
+ @mixin form-help($color: text-muted, $margin-top: null) {
263
+ @include m.font(reg, 1);
264
+ color: m.color($color);
265
+ @if $margin-top {
266
+ margin-top: m.space($margin-top);
267
+ }
268
+ }
269
+
270
+ @mixin form-error {
271
+ @include form-help($color: error-text);
272
+ }
@@ -0,0 +1,17 @@
1
+ // ============================================================================
2
+ // COMPONENTS BARREL
3
+ // ============================================================================
4
+ // Import all or pick what you need:
5
+ // @use "css-is-awesome/scss/components"; → everything
6
+ // @use "css-is-awesome/scss/components/buttons" as b; → just buttons
7
+ // ============================================================================
8
+ @forward './buttons';
9
+ @forward './forms';
10
+ @forward './feedback';
11
+ @forward './overlay';
12
+ @forward './navigation';
13
+ @forward './data';
14
+ @forward './accordion';
15
+ @forward './tabs';
16
+ @forward './copy-button';
17
+ @forward './stepper';
@@ -0,0 +1,186 @@
1
+ // ============================================================================
2
+ // NAVIGATION — Navbar, Nav, Breadcrumb, Tabs, Pagination
3
+ // ============================================================================
4
+ @use 'sass:map';
5
+ @use '../theme' as t;
6
+ @use '../system' as s;
7
+ @use '../mixins' as m;
8
+
9
+ // ----------------------------------------------------------------------------
10
+ // NAVBAR
11
+ // ----------------------------------------------------------------------------
12
+ // Usage:
13
+ // .navbar { @include navbar-base; }
14
+ // .navbar { @include navbar-base($bg: background-navbar, $sticky: true); }
15
+
16
+ @mixin navbar-base(
17
+ $bg: background-navbar,
18
+ $py: 2,
19
+ $px: 4,
20
+ $shadow: 1,
21
+ $sticky: false,
22
+ $border: true
23
+ ) {
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: space-between;
27
+ padding: m.space($py) m.space($px);
28
+ background: m.color($bg);
29
+
30
+ @if $sticky {
31
+ position: sticky;
32
+ top: 0;
33
+ z-index: m.z(sticky);
34
+ }
35
+
36
+ @if $shadow != none {
37
+ box-shadow: m.shadow($shadow);
38
+ }
39
+
40
+ @if $border {
41
+ border-bottom: 1px solid m.color(border-default);
42
+ }
43
+ }
44
+
45
+ @mixin navbar-brand($gap: 2) {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: m.space($gap);
49
+ text-decoration: none;
50
+ color: m.color(text-primary);
51
+ @include m.font(bold, 4);
52
+ }
53
+
54
+ @mixin navbar-nav($gap: 1) {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: m.space($gap);
58
+ @include m.list-reset;
59
+ }
60
+
61
+ @mixin navbar-link($py: 1, $px: 2, $r: md) {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: m.space(2xs);
65
+ padding: m.space($py) m.space($px);
66
+ border-radius: m.radius($r);
67
+ color: m.color(text-secondary);
68
+ text-decoration: none;
69
+ @include m.font(medium, 2);
70
+ @include m.transition(color, background-color);
71
+
72
+ &:hover {
73
+ color: m.color(text-primary);
74
+ background: m.color(interactive-hover);
75
+ }
76
+
77
+ &[aria-current="page"],
78
+ &.active {
79
+ color: m.color(text-link);
80
+ background: m.color(interactive-hover);
81
+ }
82
+ }
83
+
84
+ // ----------------------------------------------------------------------------
85
+ // NAV (generic list navigation)
86
+ // ----------------------------------------------------------------------------
87
+ // `nav-link` was an alias for `navbar-link`; use `navbar-link` directly.
88
+ @mixin nav-base($direction: row, $gap: 1) {
89
+ display: flex;
90
+ flex-direction: $direction;
91
+ gap: m.space($gap);
92
+ @include m.list-reset;
93
+ }
94
+
95
+ // ----------------------------------------------------------------------------
96
+ // BREADCRUMB
97
+ // ----------------------------------------------------------------------------
98
+ @mixin breadcrumb($gap: 1, $separator: "/") {
99
+ display: flex;
100
+ align-items: center;
101
+ gap: m.space($gap);
102
+ @include m.list-reset;
103
+ @include m.font(reg, 2);
104
+
105
+ li + li::before {
106
+ content: $separator;
107
+ color: m.color(text-muted);
108
+ margin-right: m.space($gap);
109
+ }
110
+
111
+ a {
112
+ color: m.color(text-link);
113
+ text-decoration: none;
114
+
115
+ &:hover { text-decoration: underline; }
116
+ }
117
+
118
+ [aria-current="page"] {
119
+ color: m.color(text-muted);
120
+ }
121
+ }
122
+
123
+ // ----------------------------------------------------------------------------
124
+ // TABS
125
+ // ----------------------------------------------------------------------------
126
+ @mixin tabs-base($gap: 0, $border: true) {
127
+ display: flex;
128
+ gap: m.space($gap);
129
+ @include m.list-reset;
130
+
131
+ @if $border {
132
+ border-bottom: 1px solid m.color(border-default);
133
+ }
134
+ }
135
+
136
+ @mixin tab-item($py: 2, $px: 4, $active-color: action-primary-default) {
137
+ padding: m.space($py) m.space($px);
138
+ color: m.color(text-secondary);
139
+ @include m.font(medium, 2);
140
+ cursor: pointer;
141
+ border-bottom: 2px solid transparent;
142
+ margin-bottom: -1px;
143
+ @include m.transition(color, border-color);
144
+
145
+ &:hover { color: m.color(text-primary); }
146
+
147
+ &[aria-selected="true"],
148
+ &.active {
149
+ color: m.color($active-color);
150
+ border-bottom-color: m.color($active-color);
151
+ }
152
+ }
153
+
154
+ // ----------------------------------------------------------------------------
155
+ // PAGINATION
156
+ // ----------------------------------------------------------------------------
157
+ @mixin pagination($gap: 2xs) {
158
+ display: flex;
159
+ align-items: center;
160
+ gap: m.space($gap);
161
+ @include m.list-reset;
162
+ }
163
+
164
+ @mixin pagination-item($size: 2.25rem, $r: md) {
165
+ @include m.flex($justify: center);
166
+ width: $size;
167
+ height: $size;
168
+ border-radius: m.radius($r);
169
+ @include m.font(medium, 2);
170
+ color: m.color(text-secondary);
171
+ text-decoration: none;
172
+ @include m.transition(background-color, color);
173
+
174
+ &:hover {
175
+ background: m.color(interactive-hover);
176
+ color: m.color(text-primary);
177
+ }
178
+
179
+ &[aria-current="page"],
180
+ &.active {
181
+ background: m.color(action-primary-default);
182
+ color: m.color(text-inverse);
183
+ }
184
+
185
+ &:disabled, &[disabled] { @include m.disabled; }
186
+ }