@abuzareal/contour-ui 0.4.0 → 0.5.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 (136) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CONTRACTS.md +7 -1
  3. package/NEXTJS.md +3 -1
  4. package/OVERLAYS.md +52 -0
  5. package/PUBLIC-API.md +179 -162
  6. package/README.md +40 -26
  7. package/RELEASING.md +1 -1
  8. package/SIZE.md +45 -0
  9. package/STYLING.md +68 -0
  10. package/dist/actions.css +7 -0
  11. package/dist/components/hero/Sculpture.js +2 -1
  12. package/dist/components/three/ObjectStudy.js +2 -1
  13. package/dist/components/ui/Alert.d.ts +2 -1
  14. package/dist/components/ui/Alert.js +3 -3
  15. package/dist/components/ui/Avatar.d.ts +3 -1
  16. package/dist/components/ui/Avatar.js +3 -3
  17. package/dist/components/ui/Badge.js +2 -2
  18. package/dist/components/ui/BrandMark.js +2 -1
  19. package/dist/components/ui/Breadcrumbs.d.ts +2 -1
  20. package/dist/components/ui/Breadcrumbs.js +3 -2
  21. package/dist/components/ui/Button.d.ts +2 -0
  22. package/dist/components/ui/Button.js +3 -2
  23. package/dist/components/ui/Card.js +2 -2
  24. package/dist/components/ui/Checkbox.js +3 -3
  25. package/dist/components/ui/CountUp.d.ts +2 -1
  26. package/dist/components/ui/CountUp.js +6 -3
  27. package/dist/components/ui/DataTable.d.ts +1 -0
  28. package/dist/components/ui/DataTable.js +12 -8
  29. package/dist/components/ui/DepthButton.js +2 -2
  30. package/dist/components/ui/Dialog.d.ts +5 -1
  31. package/dist/components/ui/Dialog.js +49 -18
  32. package/dist/components/ui/Disclosure.js +2 -1
  33. package/dist/components/ui/Divider.js +3 -2
  34. package/dist/components/ui/DropdownMenu.d.ts +11 -4
  35. package/dist/components/ui/DropdownMenu.js +109 -66
  36. package/dist/components/ui/EmptyState.js +2 -1
  37. package/dist/components/ui/Field.js +2 -2
  38. package/dist/components/ui/FlipCard.js +2 -2
  39. package/dist/components/ui/FloatingPortal.d.ts +10 -0
  40. package/dist/components/ui/FloatingPortal.js +51 -0
  41. package/dist/components/ui/IconButton.js +2 -2
  42. package/dist/components/ui/Kbd.js +2 -1
  43. package/dist/components/ui/Magnetic.js +2 -1
  44. package/dist/components/ui/Marquee.js +3 -2
  45. package/dist/components/ui/OverlayTrigger.d.ts +11 -0
  46. package/dist/components/ui/OverlayTrigger.js +5 -0
  47. package/dist/components/ui/Pagination.d.ts +5 -1
  48. package/dist/components/ui/Pagination.js +3 -2
  49. package/dist/components/ui/Popover.d.ts +18 -8
  50. package/dist/components/ui/Popover.js +58 -17
  51. package/dist/components/ui/ProgressBar.js +2 -2
  52. package/dist/components/ui/RadioGroup.js +5 -5
  53. package/dist/components/ui/Reveal.d.ts +0 -1
  54. package/dist/components/ui/Reveal.js +4 -3
  55. package/dist/components/ui/RevealHeading.js +2 -1
  56. package/dist/components/ui/ScrollProgress.js +2 -1
  57. package/dist/components/ui/SectionLabel.js +2 -1
  58. package/dist/components/ui/SegmentedControl.js +6 -3
  59. package/dist/components/ui/SelectField.js +3 -2
  60. package/dist/components/ui/Skeleton.js +2 -2
  61. package/dist/components/ui/Slider.js +3 -3
  62. package/dist/components/ui/Spinner.js +2 -2
  63. package/dist/components/ui/Stat.js +2 -1
  64. package/dist/components/ui/Stepper.js +3 -3
  65. package/dist/components/ui/Switch.d.ts +2 -0
  66. package/dist/components/ui/Switch.js +6 -7
  67. package/dist/components/ui/Tabs.js +7 -5
  68. package/dist/components/ui/Tag.d.ts +2 -1
  69. package/dist/components/ui/Tag.js +4 -3
  70. package/dist/components/ui/TextArea.js +2 -1
  71. package/dist/components/ui/TextField.js +3 -2
  72. package/dist/components/ui/ThemeScope.d.ts +13 -0
  73. package/dist/components/ui/ThemeScope.js +10 -0
  74. package/dist/components/ui/ThemeToggle.d.ts +3 -0
  75. package/dist/components/ui/ThemeToggle.js +4 -3
  76. package/dist/components/ui/TiltCard.js +3 -2
  77. package/dist/components/ui/Timeline.js +2 -2
  78. package/dist/components/ui/ToastProvider.d.ts +5 -2
  79. package/dist/components/ui/ToastProvider.js +5 -5
  80. package/dist/components/ui/Tooltip.d.ts +4 -4
  81. package/dist/components/ui/Tooltip.js +70 -10
  82. package/dist/data-display.css +5 -0
  83. package/dist/effects.css +6 -0
  84. package/dist/feedback.css +5 -0
  85. package/dist/fonts-latin.css +10 -4
  86. package/dist/fonts.css +8 -0
  87. package/dist/forms.css +5 -0
  88. package/dist/hooks/useDismiss.d.ts +12 -3
  89. package/dist/hooks/useDismiss.js +5 -21
  90. package/dist/hooks/useFloatingPanel.d.ts +14 -0
  91. package/dist/hooks/useFloatingPanel.js +157 -0
  92. package/dist/hooks/useLayerDismiss.d.ts +4 -0
  93. package/dist/hooks/useLayerDismiss.js +48 -0
  94. package/dist/hooks/useMobileMenu.d.ts +0 -1
  95. package/dist/hooks/useMobileMenu.js +11 -16
  96. package/dist/hooks/usePanelFocus.d.ts +10 -0
  97. package/dist/hooks/usePanelFocus.js +60 -0
  98. package/dist/hooks/useTheme.d.ts +1 -0
  99. package/dist/hooks/useTheme.js +18 -5
  100. package/dist/index.d.ts +5 -0
  101. package/dist/index.js +1 -0
  102. package/dist/kit/forms.css +11 -2
  103. package/dist/kit/navigation.css +4 -0
  104. package/dist/kit/overlays.css +8 -4
  105. package/dist/lib/classNames.d.ts +2 -0
  106. package/dist/lib/classNames.js +16 -1
  107. package/dist/lib/componentClasses.d.ts +1 -0
  108. package/dist/lib/componentClasses.js +2 -0
  109. package/dist/lib/keyboard.d.ts +1 -1
  110. package/dist/lib/keyboard.js +5 -2
  111. package/dist/lib/layers.d.ts +18 -0
  112. package/dist/lib/layers.js +128 -0
  113. package/dist/lib/themeScope.d.ts +5 -0
  114. package/dist/lib/themeScope.js +3 -0
  115. package/dist/minimal-reset.css +6 -0
  116. package/dist/navigation.css +5 -0
  117. package/dist/overlays.css +5 -0
  118. package/dist/scoped/base.css +183 -0
  119. package/dist/scoped/kit/actions.css +209 -0
  120. package/dist/scoped/kit/data-display.css +492 -0
  121. package/dist/scoped/kit/effects.css +140 -0
  122. package/dist/scoped/kit/feedback.css +309 -0
  123. package/dist/scoped/kit/forms.css +370 -0
  124. package/dist/scoped/kit/navigation.css +266 -0
  125. package/dist/scoped/kit/overlays.css +299 -0
  126. package/dist/scoped/marquee.css +58 -0
  127. package/dist/scoped/spinner.css +20 -0
  128. package/dist/scoped/theme-toggle.css +38 -0
  129. package/dist/scoped/tokens.css +119 -0
  130. package/dist/scoped/ui.css +127 -0
  131. package/dist/scoped/utilities.css +17 -0
  132. package/dist/scoped-tokens.css +1 -0
  133. package/dist/scoped.css +12 -0
  134. package/dist/theme-toggle.css +2 -2
  135. package/dist/tokens.json +710 -0
  136. package/package.json +26 -5
@@ -0,0 +1,299 @@
1
+ /* Kit — overlays: tooltip, dialog and drawer, dropdown menu, and popover. */
2
+
3
+ .contour-tooltip-anchor {
4
+ position: relative;
5
+ display: inline-flex;
6
+ }
7
+
8
+ .contour-tooltip {
9
+ position: absolute;
10
+ z-index: 40;
11
+ width: max-content;
12
+ max-width: 220px;
13
+ overflow: auto;
14
+ overflow-wrap: anywhere;
15
+ padding: 6px 10px;
16
+ background: var(--contour-invert-bg);
17
+ color: var(--contour-invert-fg);
18
+ pointer-events: auto;
19
+ opacity: 0;
20
+ visibility: hidden;
21
+ transition:
22
+ opacity var(--contour-duration-fast),
23
+ transform var(--contour-duration-fast) var(--contour-ease),
24
+ visibility var(--contour-duration-fast);
25
+ }
26
+
27
+ .contour-tooltip.contour-is-open {
28
+ opacity: 1;
29
+ visibility: visible;
30
+ }
31
+
32
+ .contour-tooltip-top {
33
+ bottom: calc(100% + 10px);
34
+ left: 50%;
35
+ transform: translate(-50%, 4px);
36
+ }
37
+
38
+ .contour-tooltip-bottom {
39
+ top: calc(100% + 10px);
40
+ left: 50%;
41
+ transform: translate(-50%, -4px);
42
+ }
43
+
44
+ .contour-tooltip-left {
45
+ right: calc(100% + 10px);
46
+ top: 50%;
47
+ transform: translate(4px, -50%);
48
+ }
49
+
50
+ .contour-tooltip-right {
51
+ left: calc(100% + 10px);
52
+ top: 50%;
53
+ transform: translate(-4px, -50%);
54
+ }
55
+
56
+ .contour-tooltip-top.contour-is-open,
57
+ .contour-tooltip-bottom.contour-is-open {
58
+ transform: translate(-50%, 0);
59
+ }
60
+
61
+ .contour-tooltip-left.contour-is-open,
62
+ .contour-tooltip-right.contour-is-open {
63
+ transform: translate(0, -50%);
64
+ }
65
+
66
+ .contour-dialog {
67
+ overscroll-behavior: contain;
68
+ width: min(560px, calc(100vw - 32px));
69
+ max-width: none;
70
+ max-height: calc(100dvh - 48px);
71
+ padding: 0;
72
+ border: 0;
73
+ background: var(--contour-bg);
74
+ color: var(--contour-fg);
75
+ box-shadow: var(--contour-shadow-floating);
76
+ }
77
+
78
+ .contour-dialog::backdrop {
79
+ background: var(--contour-overlay);
80
+ backdrop-filter: blur(6px);
81
+ }
82
+
83
+ .contour-dialog[open] {
84
+ animation: contour-dialog-in var(--contour-duration-slow) var(--contour-ease) both;
85
+ }
86
+
87
+ .contour-dialog-panel {
88
+ display: grid;
89
+ gap: 24px;
90
+ padding: 32px;
91
+ }
92
+
93
+ .contour-dialog-header {
94
+ display: flex;
95
+ justify-content: space-between;
96
+ align-items: flex-start;
97
+ gap: 24px;
98
+ padding-bottom: 20px;
99
+ border-bottom: 1px solid var(--contour-line);
100
+ }
101
+
102
+ .contour-dialog-header h2 {
103
+ font-size: 32px;
104
+ line-height: 1.1;
105
+ }
106
+
107
+ .contour-dialog-description {
108
+ margin-top: 10px;
109
+ font-size: 14px;
110
+ line-height: 1.6;
111
+ color: var(--contour-muted);
112
+ }
113
+
114
+ .contour-dialog-close {
115
+ display: grid;
116
+ place-items: center;
117
+ flex-shrink: 0;
118
+ width: 38px;
119
+ height: 38px;
120
+ border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
121
+ border-radius: 50%;
122
+ transition:
123
+ background var(--contour-duration-fast),
124
+ transform var(--contour-duration-base) var(--contour-ease);
125
+ }
126
+
127
+ .contour-dialog-close:hover {
128
+ background: var(--contour-acid);
129
+ border-color: var(--contour-acid);
130
+ color: var(--contour-ink);
131
+ transform: rotate(90deg);
132
+ }
133
+
134
+ .contour-dialog-body {
135
+ font-size: 15px;
136
+ line-height: 1.7;
137
+ color: var(--contour-muted);
138
+ }
139
+
140
+ .contour-dialog-footer {
141
+ display: flex;
142
+ flex-wrap: wrap;
143
+ justify-content: flex-end;
144
+ gap: 12px;
145
+ }
146
+
147
+ /* Drawers: full-height sheets from either edge. */
148
+ .contour-dialog-left,
149
+ .contour-dialog-right {
150
+ width: min(420px, calc(100vw - 48px));
151
+ height: 100dvh;
152
+ max-height: none;
153
+ margin: 0;
154
+ }
155
+
156
+ .contour-dialog-right {
157
+ margin-inline-start: auto;
158
+ }
159
+
160
+ .contour-dialog-left[open] {
161
+ animation-name: contour-drawer-from-left;
162
+ }
163
+
164
+ .contour-dialog-right[open] {
165
+ animation-name: contour-drawer-from-right;
166
+ }
167
+
168
+ .contour-dialog-left .contour-dialog-panel,
169
+ .contour-dialog-right .contour-dialog-panel {
170
+ align-content: start;
171
+ min-height: 100%;
172
+ }
173
+
174
+ @keyframes contour-dialog-in {
175
+ from {
176
+ opacity: 0;
177
+ transform: translateY(24px) scale(0.98);
178
+ }
179
+ }
180
+
181
+ @keyframes contour-drawer-from-left {
182
+ from {
183
+ transform: translateX(-100%);
184
+ }
185
+ }
186
+
187
+ @keyframes contour-drawer-from-right {
188
+ from {
189
+ transform: translateX(100%);
190
+ }
191
+ }
192
+
193
+ .contour-menu,
194
+ .contour-popover {
195
+ position: relative;
196
+ display: inline-block;
197
+ }
198
+
199
+ .contour-menu-trigger {
200
+ display: inline-flex;
201
+ align-items: center;
202
+ gap: 10px;
203
+ height: 40px;
204
+ padding-inline: 18px 14px;
205
+ border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
206
+ border-radius: var(--contour-radius-pill);
207
+ font-size: 13px;
208
+ transition:
209
+ background var(--contour-duration-fast),
210
+ border-color var(--contour-duration-fast);
211
+ }
212
+
213
+ .contour-menu-trigger:hover {
214
+ border-color: var(--contour-fg);
215
+ }
216
+
217
+ .contour-menu-chevron {
218
+ transition: transform var(--contour-duration-base) var(--contour-ease);
219
+ }
220
+
221
+ .contour-menu-trigger[aria-expanded="true"] .contour-menu-chevron {
222
+ transform: rotate(180deg);
223
+ }
224
+
225
+ .contour-menu-list,
226
+ .contour-popover-panel {
227
+ position: absolute;
228
+ top: calc(100% + 8px);
229
+ z-index: 30;
230
+ min-width: min(220px, calc(100vw - 16px));
231
+ overflow: auto;
232
+ overflow-wrap: anywhere;
233
+ padding: 6px;
234
+ border: 1px solid var(--contour-line);
235
+ background: var(--contour-surface);
236
+ box-shadow: var(--contour-shadow-floating);
237
+ animation: contour-menu-in var(--contour-duration-base) var(--contour-ease) both;
238
+ }
239
+
240
+ .contour-menu-start .contour-menu-list,
241
+ .contour-popover-start .contour-popover-panel {
242
+ left: 0;
243
+ }
244
+
245
+ .contour-menu-end .contour-menu-list,
246
+ .contour-popover-end .contour-popover-panel {
247
+ right: 0;
248
+ }
249
+
250
+ .contour-menu-item {
251
+ display: flex;
252
+ align-items: center;
253
+ gap: 12px;
254
+ width: 100%;
255
+ padding: 10px 12px;
256
+ font-size: 14px;
257
+ text-align: start;
258
+ transition: background var(--contour-duration-fast);
259
+ }
260
+
261
+ .contour-menu-item:hover,
262
+ .contour-menu-item:focus-visible {
263
+ background: color-mix(in srgb, var(--contour-fg) 7%, transparent);
264
+ outline: none;
265
+ }
266
+
267
+ .contour-menu-item:focus-visible {
268
+ box-shadow: inset 2px 0 0 var(--contour-fg);
269
+ }
270
+
271
+ .contour-menu-item-danger {
272
+ color: var(--contour-danger);
273
+ }
274
+
275
+ .contour-popover-panel {
276
+ display: grid;
277
+ gap: 10px;
278
+ width: 300px;
279
+ padding: 20px;
280
+ font-size: 14px;
281
+ line-height: 1.6;
282
+ color: var(--contour-muted);
283
+ }
284
+
285
+ .contour-popover-panel[hidden] {
286
+ display: none;
287
+ }
288
+
289
+ .contour-popover-title {
290
+ font: 500 18px / 1.3 var(--contour-font-display);
291
+ color: var(--contour-fg);
292
+ }
293
+
294
+ @keyframes contour-menu-in {
295
+ from {
296
+ opacity: 0;
297
+ transform: translateY(-6px);
298
+ }
299
+ }
@@ -0,0 +1,58 @@
1
+ /* Kit — data display: badges, tags, avatars, keys, stats, cards, tables, timelines, dividers, marquee, empty states. */
2
+
3
+ /* Overlapping stack; each avatar is ringed in the page colour. */
4
+
5
+ /* Rail and marker drawn from the entry so they never drift from the text. */
6
+
7
+ .contour-marquee {
8
+ overflow: hidden;
9
+ background: var(--contour-invert-bg);
10
+ color: var(--contour-invert-fg);
11
+ mask-image: linear-gradient(
12
+ to right,
13
+ transparent,
14
+ #000 8%,
15
+ #000 92%,
16
+ transparent
17
+ );
18
+ }
19
+
20
+ .contour-marquee-inner {
21
+ display: flex;
22
+ width: max-content;
23
+ animation: contour-marquee var(--marquee-duration, 28s) linear infinite;
24
+ }
25
+
26
+ .contour-marquee:hover .contour-marquee-inner {
27
+ animation-play-state: paused;
28
+ }
29
+
30
+ .contour-marquee-track {
31
+ display: flex;
32
+ }
33
+
34
+ .contour-marquee-track li {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 18px;
38
+ padding: 18px 28px 18px 0;
39
+ font: 500 28px / 1.1 var(--contour-font-display);
40
+ white-space: nowrap;
41
+ }
42
+
43
+ .contour-marquee-track svg {
44
+ color: var(--contour-inverse-accent);
45
+ }
46
+
47
+ @keyframes contour-marquee {
48
+ to {
49
+ transform: translateX(-50%);
50
+ }
51
+ }
52
+
53
+ @media (max-width: 767px) {
54
+
55
+ .contour-marquee-track li {
56
+ font-size: 22px;
57
+ }
58
+ }
@@ -0,0 +1,20 @@
1
+ /* Kit — feedback: alerts, toasts, progress, spinner, and skeletons. */
2
+
3
+ /* Banner: one-line announcement strip on the inverted surface. */
4
+
5
+ .contour-spinner {
6
+ display: inline-grid;
7
+ place-items: center;
8
+ color: var(--contour-olive);
9
+ }
10
+
11
+ .contour-spinner svg {
12
+ animation: contour-spin 1.1s linear infinite;
13
+ }
14
+
15
+ .contour-button .contour-spinner {
16
+ color: inherit;
17
+ }
18
+
19
+ @media (max-width: 767px) {
20
+ }
@@ -0,0 +1,38 @@
1
+ .contour-theme-toggle {
2
+ display: grid;
3
+ place-items: center;
4
+ width: 38px;
5
+ height: 38px;
6
+ border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
7
+ border-radius: 50%;
8
+ overflow: hidden;
9
+ transition:
10
+ background 250ms,
11
+ color 250ms,
12
+ border-color 250ms;
13
+ }
14
+
15
+ .contour-theme-toggle:hover {
16
+ background: var(--contour-acid);
17
+ border-color: var(--contour-acid);
18
+ color: var(--contour-ink);
19
+ }
20
+
21
+ .contour-theme-toggle svg {
22
+ grid-area: 1 / 1;
23
+ transition:
24
+ transform 700ms var(--contour-ease),
25
+ opacity 400ms ease;
26
+ }
27
+
28
+ /* The icon for the theme you can switch to is shown; the other spins away. */
29
+ .contour-theme-icon-sun,
30
+ .contour-theme-toggle[aria-pressed="true"] .contour-theme-icon-moon {
31
+ opacity: 0;
32
+ transform: rotate(-120deg) scale(0.3);
33
+ }
34
+
35
+ .contour-theme-toggle[aria-pressed="true"] .contour-theme-icon-sun {
36
+ opacity: 1;
37
+ transform: none;
38
+ }
@@ -0,0 +1,119 @@
1
+ /* Generated from tokens/schema.json by scripts/build-styles.mjs. */
2
+ :where(:root) {
3
+ --contour-ink: #171817;
4
+ --contour-paper: #f2f3ee;
5
+ --contour-white: #fcfcf9;
6
+ --contour-acid: #d0f344;
7
+ --contour-ease: cubic-bezier(0.22, 1, 0.36, 1);
8
+ --contour-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
9
+ --contour-font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
10
+ --contour-font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
11
+ --contour-radius-sm: 4px;
12
+ --contour-radius-md: 8px;
13
+ --contour-radius-pill: 999px;
14
+ --contour-duration-fast: 160ms;
15
+ --contour-duration-base: 300ms;
16
+ --contour-duration-slow: 700ms;
17
+ --contour-bg: var(--contour-paper);
18
+ --contour-fg: var(--contour-ink);
19
+ --contour-muted: #63665f;
20
+ --contour-line: #d6d8d0;
21
+ --contour-line-strong: #b4b8ac;
22
+ --contour-surface: #fbfbf8;
23
+ --contour-surface-sunken: #e8e9e1;
24
+ --contour-overlay: #171817b8;
25
+ --contour-shadow-raised: 0 1px 2px #1718170d, 0 10px 28px #17181712;
26
+ --contour-shadow-floating: 0 24px 56px #1718172e;
27
+ --contour-olive: #75901a;
28
+ --contour-signal: #4d7522;
29
+ --contour-success: #3f6119;
30
+ --contour-success-soft: #e4ecc9;
31
+ --contour-info: #2f6a82;
32
+ --contour-info-soft: #dbe8ec;
33
+ --contour-warning: #7a5100;
34
+ --contour-warning-soft: #f5e6c3;
35
+ --contour-danger: #a8321c;
36
+ --contour-danger-soft: #f7dcd3;
37
+ --contour-invert-bg: var(--contour-ink);
38
+ --contour-invert-fg: var(--contour-paper);
39
+ --contour-menu-shadow: #00000012;
40
+ --contour-space-4: 4px;
41
+ --contour-space-8: 8px;
42
+ --contour-space-12: 12px;
43
+ --contour-space-16: 16px;
44
+ --contour-space-24: 24px;
45
+ --contour-space-32: 32px;
46
+ --contour-space-48: 48px;
47
+ --contour-space-64: 64px;
48
+ --contour-space-104: 104px;
49
+ --contour-text-body: 15px;
50
+ --contour-text-small: 13px;
51
+ --contour-text-label: 11px;
52
+ --contour-text-lead: 24px;
53
+ --contour-text-display: clamp(48px, 8vw, 116px);
54
+ --contour-z-overlay: 30;
55
+ --contour-inverse-accent: var(--contour-acid);
56
+ --contour-inverse-mark: var(--contour-acid);
57
+ --contour-depth-base: var(--contour-ink);
58
+ --contour-floating-outline: transparent;
59
+ }
60
+ :where(:root[data-theme="dark"], [data-contour-theme="dark"]) {
61
+ --contour-bg: #0f100d;
62
+ --contour-fg: #eef0e6;
63
+ --contour-muted: #9a9e90;
64
+ --contour-line: #2a2d24;
65
+ --contour-line-strong: #444939;
66
+ --contour-surface: #171913;
67
+ --contour-surface-sunken: #0a0b09;
68
+ --contour-overlay: #050605cc;
69
+ --contour-shadow-raised: 0 1px 2px #0000004d, 0 10px 28px #00000059;
70
+ --contour-shadow-floating: 0 24px 56px #00000099;
71
+ --contour-olive: #c2e042;
72
+ --contour-signal: var(--contour-acid);
73
+ --contour-success: #b5d33f;
74
+ --contour-success-soft: #222914;
75
+ --contour-info: #8fc0d6;
76
+ --contour-info-soft: #152227;
77
+ --contour-warning: #f0c063;
78
+ --contour-warning-soft: #2b2311;
79
+ --contour-danger: #ff8a70;
80
+ --contour-danger-soft: #2f1914;
81
+ --contour-invert-bg: var(--contour-paper);
82
+ --contour-invert-fg: var(--contour-ink);
83
+ --contour-menu-shadow: #00000066;
84
+ --contour-inverse-accent: #5a7210;
85
+ --contour-inverse-mark: var(--contour-ink);
86
+ --contour-depth-base: #5a7210;
87
+ --contour-floating-outline: #353733;
88
+ color-scheme: dark;
89
+ }
90
+ :where([data-contour-theme="light"]) {
91
+ --contour-bg: var(--contour-paper);
92
+ --contour-fg: var(--contour-ink);
93
+ --contour-muted: #63665f;
94
+ --contour-line: #d6d8d0;
95
+ --contour-line-strong: #b4b8ac;
96
+ --contour-surface: #fbfbf8;
97
+ --contour-surface-sunken: #e8e9e1;
98
+ --contour-overlay: #171817b8;
99
+ --contour-shadow-raised: 0 1px 2px #1718170d, 0 10px 28px #17181712;
100
+ --contour-shadow-floating: 0 24px 56px #1718172e;
101
+ --contour-olive: #75901a;
102
+ --contour-signal: #4d7522;
103
+ --contour-success: #3f6119;
104
+ --contour-success-soft: #e4ecc9;
105
+ --contour-info: #2f6a82;
106
+ --contour-info-soft: #dbe8ec;
107
+ --contour-warning: #7a5100;
108
+ --contour-warning-soft: #f5e6c3;
109
+ --contour-danger: #a8321c;
110
+ --contour-danger-soft: #f7dcd3;
111
+ --contour-invert-bg: var(--contour-ink);
112
+ --contour-invert-fg: var(--contour-paper);
113
+ --contour-menu-shadow: #00000012;
114
+ --contour-inverse-accent: var(--contour-acid);
115
+ --contour-inverse-mark: var(--contour-acid);
116
+ --contour-depth-base: var(--contour-ink);
117
+ --contour-floating-outline: transparent;
118
+ color-scheme: light;
119
+ }
@@ -0,0 +1,127 @@
1
+ /* Shared UI patterns: brand mark, section scaffolding, links, disclosures, and reveal animations. */
2
+
3
+ .contour-brand {
4
+ font-family: var(--contour-font-display);
5
+ font-size: 34px;
6
+ line-height: 1;
7
+ font-weight: 700;
8
+ }
9
+
10
+ .contour-brand > span {
11
+ color: var(--contour-olive);
12
+ }
13
+
14
+ .contour-section-label {
15
+ display: flex;
16
+ justify-content: space-between;
17
+ gap: 24px;
18
+ text-transform: uppercase;
19
+ padding-bottom: 24px;
20
+ border-bottom: 1px solid var(--contour-line);
21
+ }
22
+
23
+ .contour-text-link {
24
+ width: fit-content;
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 18px;
28
+ font-size: 12px;
29
+ border-bottom: 1px solid currentColor;
30
+ padding-block: 8px;
31
+ transition: gap 300ms var(--contour-ease);
32
+ }
33
+
34
+ .contour-text-link:hover {
35
+ gap: 26px;
36
+ }
37
+
38
+ /* Disclosure: native details/summary with a plus icon that rotates into a cross. */
39
+ .contour-disclosure > summary {
40
+ list-style: none;
41
+ cursor: pointer;
42
+ }
43
+
44
+ .contour-disclosure > summary::-webkit-details-marker {
45
+ display: none;
46
+ }
47
+
48
+ .contour-disclosure-icon {
49
+ transition: transform 300ms;
50
+ }
51
+
52
+ .contour-disclosure[open] .contour-disclosure-icon {
53
+ transform: rotate(45deg);
54
+ }
55
+
56
+ /* Two-column intro + content layout used by Experience and Expertise. */
57
+
58
+ /* Reveal: content fades up once, and heading lines slide up inside a clip. */
59
+ .contour-reveal {
60
+ opacity: 0;
61
+ transform: translateY(24px);
62
+ transition:
63
+ opacity 700ms var(--contour-ease),
64
+ transform 700ms var(--contour-ease);
65
+ }
66
+
67
+ .contour-reveal.contour-is-visible {
68
+ opacity: 1;
69
+ transform: translateY(0);
70
+ }
71
+
72
+ .contour-type-line {
73
+ display: block;
74
+ overflow: clip;
75
+ padding-block: 0.09em;
76
+ margin-block: -0.09em;
77
+ }
78
+
79
+ .contour-type-run {
80
+ display: block;
81
+ opacity: 0;
82
+ transform: translateY(105%);
83
+ transition:
84
+ transform 850ms var(--contour-ease),
85
+ opacity 650ms ease;
86
+ }
87
+
88
+ .contour-type-line:nth-child(2) .contour-type-run {
89
+ transition-delay: 110ms;
90
+ }
91
+
92
+ .contour-type-line:nth-child(3) .contour-type-run {
93
+ transition-delay: 220ms;
94
+ }
95
+
96
+ .contour-reveal.contour-is-visible .contour-type-run {
97
+ opacity: 1;
98
+ transform: translateY(0);
99
+ }
100
+
101
+ @keyframes contour-rise-in {
102
+ from {
103
+ opacity: 0;
104
+ transform: translateY(18px);
105
+ }
106
+ to {
107
+ opacity: 1;
108
+ transform: translateY(0);
109
+ }
110
+ }
111
+
112
+ @media (max-width: 1023px) {
113
+ }
114
+
115
+ @media (max-width: 767px) {
116
+ .contour-brand {
117
+ font-size: 30px;
118
+ }
119
+
120
+ .contour-section-label {
121
+ padding-bottom: 19px;
122
+ }
123
+
124
+ .contour-section-label > span:last-child {
125
+ display: none;
126
+ }
127
+ }
@@ -0,0 +1,17 @@
1
+ /* Shared accessibility and typography utilities also work with an application-owned reset. */
2
+ .contour-mono {
3
+ font-family: var(--contour-font-mono);
4
+ font-size: var(--contour-text-label);
5
+ line-height: 1.6;
6
+ }
7
+ .contour-visually-hidden {
8
+ position: absolute;
9
+ width: 1px;
10
+ height: 1px;
11
+ margin: -1px;
12
+ padding: 0;
13
+ overflow: hidden;
14
+ clip-path: inset(50%);
15
+ white-space: nowrap;
16
+ border: 0;
17
+ }
@@ -0,0 +1 @@
1
+ @import "./scoped/tokens.css";
@@ -0,0 +1,12 @@
1
+ @import "./scoped/tokens.css";
2
+ @import "./scoped/base.css";
3
+ @import "./scoped/utilities.css";
4
+ @import "./scoped/ui.css";
5
+ @import "./scoped/kit/actions.css";
6
+ @import "./scoped/kit/forms.css";
7
+ @import "./scoped/kit/navigation.css";
8
+ @import "./scoped/kit/data-display.css";
9
+ @import "./scoped/kit/feedback.css";
10
+ @import "./scoped/kit/overlays.css";
11
+ @import "./scoped/kit/effects.css";
12
+ @import "./scoped/theme-toggle.css";
@@ -27,12 +27,12 @@
27
27
 
28
28
  /* The icon for the theme you can switch to is shown; the other spins away. */
29
29
  .theme-icon-sun,
30
- :root[data-theme="dark"] .theme-icon-moon {
30
+ .theme-toggle[aria-pressed="true"] .theme-icon-moon {
31
31
  opacity: 0;
32
32
  transform: rotate(-120deg) scale(0.3);
33
33
  }
34
34
 
35
- :root[data-theme="dark"] .theme-icon-sun {
35
+ .theme-toggle[aria-pressed="true"] .theme-icon-sun {
36
36
  opacity: 1;
37
37
  transform: none;
38
38
  }