sid-ui 0.0.0-stage → 0.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 (116) hide show
  1. package/README.md +54 -2
  2. package/package.json +51 -4
  3. package/src/brand/BrandFooter.tsx +45 -0
  4. package/src/brand/BrandHeading.tsx +24 -0
  5. package/src/brand/BrandLockup.tsx +47 -0
  6. package/src/brand/JoinedLogo.tsx +67 -0
  7. package/src/brand/JoinedMark.tsx +76 -0
  8. package/src/brand/geometry.ts +26 -0
  9. package/src/brand/index.ts +11 -0
  10. package/src/brand/name.ts +5 -0
  11. package/src/brand/paint.tsx +56 -0
  12. package/src/components/Action.tsx +44 -0
  13. package/src/components/AddressSelector.tsx +99 -0
  14. package/src/components/BarChart.tsx +132 -0
  15. package/src/components/Calendar.tsx +284 -0
  16. package/src/components/CalendarAgenda.tsx +87 -0
  17. package/src/components/CalendarMonth.tsx +223 -0
  18. package/src/components/CalendarSchedule.tsx +210 -0
  19. package/src/components/Card.tsx +80 -0
  20. package/src/components/Charts.tsx +64 -0
  21. package/src/components/Chat.tsx +35 -0
  22. package/src/components/CitySelector.tsx +81 -0
  23. package/src/components/Clock.tsx +196 -0
  24. package/src/components/CodeInput.tsx +183 -0
  25. package/src/components/Container.tsx +20 -0
  26. package/src/components/Content.tsx +50 -0
  27. package/src/components/Data.tsx +43 -0
  28. package/src/components/DataInput.tsx +107 -0
  29. package/src/components/DateField.tsx +162 -0
  30. package/src/components/DonutChart.tsx +123 -0
  31. package/src/components/Drawer.tsx +110 -0
  32. package/src/components/Feedback.tsx +37 -0
  33. package/src/components/FileUploader.tsx +377 -0
  34. package/src/components/FunnelChart.tsx +83 -0
  35. package/src/components/Glyph.tsx +330 -0
  36. package/src/components/GoogleSignIn.tsx +67 -0
  37. package/src/components/GridSystem.tsx +131 -0
  38. package/src/components/HeatmapCalendar.tsx +167 -0
  39. package/src/components/KanbanBoard.tsx +421 -0
  40. package/src/components/Kpi.tsx +61 -0
  41. package/src/components/LayoutPrimitives.tsx +86 -0
  42. package/src/components/Lists.tsx +19 -0
  43. package/src/components/LocationSelector.tsx +49 -0
  44. package/src/components/MessageList.tsx +80 -0
  45. package/src/components/Nav.tsx +69 -0
  46. package/src/components/Navigation.tsx +52 -0
  47. package/src/components/Notification.tsx +115 -0
  48. package/src/components/NotificationTrigger.tsx +248 -0
  49. package/src/components/Overlay.tsx +50 -0
  50. package/src/components/Page.tsx +143 -0
  51. package/src/components/PageTabs.tsx +28 -0
  52. package/src/components/PickerShell.tsx +138 -0
  53. package/src/components/PillNav.tsx +194 -0
  54. package/src/components/Primitives.tsx +30 -0
  55. package/src/components/Rating.tsx +78 -0
  56. package/src/components/Responsive.tsx +128 -0
  57. package/src/components/ResponsiveFrame.tsx +122 -0
  58. package/src/components/Segment.tsx +190 -0
  59. package/src/components/Sparkline.tsx +52 -0
  60. package/src/components/StateSelector.tsx +39 -0
  61. package/src/components/Sticky.tsx +95 -0
  62. package/src/components/Table.tsx +344 -0
  63. package/src/components/ThemeToggle.tsx +48 -0
  64. package/src/components/Tile.tsx +23 -0
  65. package/src/components/TimeColumns.tsx +155 -0
  66. package/src/components/TimeDial.tsx +260 -0
  67. package/src/components/TimeField.tsx +196 -0
  68. package/src/components/TimeInput.tsx +213 -0
  69. package/src/components/TimeSlots.tsx +83 -0
  70. package/src/components/Timeline.tsx +111 -0
  71. package/src/components/TokenDemo.tsx +378 -0
  72. package/src/components/Tree.tsx +283 -0
  73. package/src/components/TrendChart.tsx +211 -0
  74. package/src/components/breakpoints.ts +42 -0
  75. package/src/components/calendarTypes.ts +26 -0
  76. package/src/components/chartMath.ts +125 -0
  77. package/src/components/chartParts.tsx +116 -0
  78. package/src/components/codeInputRules.ts +58 -0
  79. package/src/components/date.ts +87 -0
  80. package/src/components/hooks.ts +53 -0
  81. package/src/components/index.ts +195 -0
  82. package/src/components/kanban.ts +78 -0
  83. package/src/components/motion.ts +78 -0
  84. package/src/components/places-search.tsx +73 -0
  85. package/src/components/places.ts +209 -0
  86. package/src/components/size.ts +3 -0
  87. package/src/components/time.ts +83 -0
  88. package/src/components/useFileDrop.ts +104 -0
  89. package/src/places/geoapify.ts +129 -0
  90. package/src/styles/astryx.css +5 -0
  91. package/src/styles/components/brand.css +98 -0
  92. package/src/styles/components/calendar.css +680 -0
  93. package/src/styles/components/charts.css +659 -0
  94. package/src/styles/components/code-input.css +233 -0
  95. package/src/styles/components/google.css +11 -0
  96. package/src/styles/components/message-list.css +153 -0
  97. package/src/styles/components/notification.css +350 -0
  98. package/src/styles/components/picker.css +114 -0
  99. package/src/styles/components/pill-nav.css +179 -0
  100. package/src/styles/components/responsive.css +419 -0
  101. package/src/styles/components/sticky.css +23 -0
  102. package/src/styles/components/table.css +267 -0
  103. package/src/styles/components/time.css +526 -0
  104. package/src/styles/components/timeline.css +426 -0
  105. package/src/styles/components/tree.css +269 -0
  106. package/src/styles/components.css +423 -0
  107. package/src/styles/joined.css +4 -0
  108. package/src/styles/theme.css +79 -0
  109. package/src/styles/tokens.css +338 -0
  110. package/src/theme/JoinedProvider.tsx +50 -0
  111. package/src/theme/index.ts +3 -0
  112. package/src/theme/joined.d.ts +11 -0
  113. package/src/theme/joined.js +569 -0
  114. package/src/theme/joined.theme.ts +74 -0
  115. package/src/theme/joined.variants.d.ts +16 -0
  116. package/src/theme/theme.css +786 -0
@@ -0,0 +1,350 @@
1
+ /* Notification — a feed row: unread mark, leading visual, title, time, action. */
2
+
3
+ .os-notes {
4
+ width: 100%;
5
+ color: var(--color-text-primary);
6
+ }
7
+
8
+ .os-notes-header {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ gap: var(--spacing-3);
13
+ margin-bottom: var(--spacing-2);
14
+ }
15
+
16
+ .os-notes-header > * {
17
+ flex: 1;
18
+ min-width: 0;
19
+ }
20
+
21
+ .os-notes-list {
22
+ list-style: none;
23
+ margin: 0;
24
+ padding: 0;
25
+ display: flex;
26
+ flex-direction: column;
27
+ }
28
+
29
+ .os-note {
30
+ display: flex;
31
+ align-items: stretch;
32
+ border-bottom: 1px solid var(--color-border);
33
+ }
34
+
35
+ .os-note:last-child {
36
+ border-bottom: 0;
37
+ }
38
+
39
+ .os-note-main {
40
+ flex: 1;
41
+ min-width: 0;
42
+ display: grid;
43
+ grid-template-columns: 10px auto minmax(0, 1fr) auto;
44
+ column-gap: var(--spacing-3);
45
+ align-items: center;
46
+ padding: var(--spacing-3) var(--spacing-2);
47
+ color: inherit;
48
+ text-decoration: none;
49
+ text-align: start;
50
+ background: transparent;
51
+ border: 0;
52
+ font: inherit;
53
+ cursor: default;
54
+ }
55
+
56
+ a.os-note-main,
57
+ button.os-note-main {
58
+ cursor: pointer;
59
+ }
60
+
61
+ a.os-note-main:hover,
62
+ button.os-note-main:hover {
63
+ background: var(--surface-hover);
64
+ }
65
+
66
+ .os-note-main:focus-visible {
67
+ outline: 2px solid var(--color-accent);
68
+ outline-offset: -2px;
69
+ }
70
+
71
+ .os-note-unread .os-note-title {
72
+ font-weight: var(--font-weight-semibold);
73
+ }
74
+
75
+ .os-note-mark {
76
+ width: 8px;
77
+ height: 8px;
78
+ border-radius: var(--radius-full);
79
+ justify-self: center;
80
+ background: transparent;
81
+ }
82
+
83
+ .os-note-unread .os-note-mark {
84
+ background: var(--color-accent);
85
+ }
86
+
87
+ .os-note-tone-success.os-note-mark {
88
+ background: var(--color-success);
89
+ }
90
+ .os-note-tone-warning.os-note-mark {
91
+ background: var(--color-warning);
92
+ }
93
+ .os-note-tone-danger.os-note-mark {
94
+ background: var(--color-error);
95
+ }
96
+ .os-note-tone-neutral.os-note-mark {
97
+ background: var(--color-text-secondary);
98
+ }
99
+
100
+ .os-note:not(.os-note-unread) .os-note-mark {
101
+ background: transparent;
102
+ }
103
+
104
+ .os-note-start {
105
+ display: flex;
106
+ align-items: center;
107
+ }
108
+
109
+ .os-note-main:has(.os-note-start-empty) {
110
+ grid-template-columns: 10px minmax(0, 1fr) auto;
111
+ }
112
+
113
+ .os-note-start-empty {
114
+ display: none;
115
+ }
116
+
117
+ .os-note-action {
118
+ display: flex;
119
+ align-items: center;
120
+ padding-inline-end: var(--spacing-2);
121
+ }
122
+
123
+ .os-note-body {
124
+ display: flex;
125
+ flex-direction: column;
126
+ gap: var(--spacing-0-5);
127
+ min-width: 0;
128
+ }
129
+
130
+ .os-note-title,
131
+ .os-note-description {
132
+ overflow: hidden;
133
+ text-overflow: ellipsis;
134
+ white-space: nowrap;
135
+ }
136
+
137
+ .os-note-title {
138
+ font-size: var(--font-size-base);
139
+ line-height: 1.3;
140
+ }
141
+
142
+ .os-note-description,
143
+ .os-note-time {
144
+ font-size: var(--font-size-sm);
145
+ color: var(--color-text-secondary);
146
+ line-height: 1.3;
147
+ }
148
+
149
+ .os-note-time {
150
+ white-space: nowrap;
151
+ font-variant-numeric: tabular-nums;
152
+ padding-inline-start: var(--spacing-3);
153
+ }
154
+
155
+ .os-note-dismiss {
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: center;
159
+ align-self: center;
160
+ width: var(--control-height);
161
+ height: var(--control-height);
162
+ margin-inline-end: var(--spacing-1);
163
+ padding: 0;
164
+ border: 0;
165
+ border-radius: var(--radius-element);
166
+ background: transparent;
167
+ color: var(--color-icon-secondary);
168
+ cursor: pointer;
169
+ }
170
+
171
+ .os-note-dismiss:hover {
172
+ background: var(--surface-hover);
173
+ color: var(--color-icon-primary);
174
+ }
175
+
176
+ .os-note-dismiss:focus-visible {
177
+ outline: 2px solid var(--color-accent);
178
+ outline-offset: 1px;
179
+ }
180
+
181
+ /* Triggered messages — a card at a viewport corner.
182
+ The layer is a manual popover so it paints above sticky chrome such as
183
+ the side nav search, the same way toasts do. */
184
+
185
+ .os-note-layer {
186
+ position: fixed;
187
+ inset: 0;
188
+ z-index: 500;
189
+ box-sizing: border-box;
190
+ width: auto;
191
+ height: auto;
192
+ margin: 0;
193
+ padding: 0;
194
+ border: 0;
195
+ background: transparent;
196
+ overflow: visible;
197
+ pointer-events: none;
198
+ }
199
+
200
+ .os-note-layer:popover-open {
201
+ display: block;
202
+ }
203
+
204
+ .os-note-stack {
205
+ position: fixed;
206
+ z-index: 500;
207
+ display: flex;
208
+ flex-direction: column;
209
+ gap: var(--spacing-2);
210
+ width: min(22.5rem, calc(100% - var(--spacing-8)));
211
+ pointer-events: none;
212
+ }
213
+
214
+ .os-note-stack-topStart {
215
+ top: var(--spacing-4);
216
+ inset-inline-start: var(--spacing-4);
217
+ }
218
+ .os-note-stack-topEnd {
219
+ top: var(--spacing-4);
220
+ inset-inline-end: var(--spacing-4);
221
+ }
222
+ .os-note-stack-bottomStart {
223
+ bottom: var(--spacing-4);
224
+ inset-inline-start: var(--spacing-4);
225
+ }
226
+ .os-note-stack-bottomEnd {
227
+ bottom: var(--spacing-4);
228
+ inset-inline-end: var(--spacing-4);
229
+ }
230
+
231
+ .os-note-stack-reverse {
232
+ flex-direction: column-reverse;
233
+ --os-note-from: var(--spacing-4);
234
+ }
235
+
236
+ .os-note-slot {
237
+ display: grid;
238
+ grid-template-rows: 1fr;
239
+ min-height: 0;
240
+ pointer-events: auto;
241
+ animation: os-note-open var(--duration-slow) var(--ease-standard);
242
+ transition: grid-template-rows var(--duration-slow) var(--ease-standard);
243
+ }
244
+
245
+ .os-note-slot-leaving {
246
+ grid-template-rows: 0fr;
247
+ pointer-events: none;
248
+ animation: none;
249
+ }
250
+
251
+ .os-note-card {
252
+ display: flex;
253
+ align-items: flex-start;
254
+ gap: var(--spacing-3);
255
+ min-height: 0;
256
+ overflow: hidden;
257
+ padding: var(--spacing-3) var(--spacing-2) var(--spacing-3) var(--spacing-3);
258
+ background: var(--color-background-surface);
259
+ border: 1px solid var(--color-border);
260
+ border-radius: var(--radius-container);
261
+ box-shadow: 0 var(--spacing-2) var(--spacing-6) var(--color-shadow);
262
+ animation: os-note-in var(--duration-slow) var(--ease-standard);
263
+ }
264
+
265
+ .os-note-slot-leaving .os-note-card {
266
+ animation: os-note-out var(--duration-slow) var(--ease-standard) forwards;
267
+ }
268
+
269
+ @keyframes os-note-open {
270
+ from {
271
+ grid-template-rows: 0fr;
272
+ }
273
+ }
274
+
275
+ @keyframes os-note-in {
276
+ from {
277
+ opacity: 0;
278
+ transform: translateY(var(--os-note-from, calc(-1 * var(--spacing-4))));
279
+ }
280
+ }
281
+
282
+ @keyframes os-note-out {
283
+ to {
284
+ opacity: 0;
285
+ transform: translateY(var(--os-note-from, calc(-1 * var(--spacing-4))));
286
+ }
287
+ }
288
+
289
+ @media (prefers-reduced-motion: reduce) {
290
+ .os-note-slot,
291
+ .os-note-card,
292
+ .os-note-slot-leaving .os-note-card {
293
+ animation: none;
294
+ transition-duration: 0.01ms;
295
+ }
296
+ }
297
+
298
+ .os-note-card-mark {
299
+ width: var(--spacing-2);
300
+ height: var(--spacing-2);
301
+ margin-top: var(--spacing-1);
302
+ border-radius: var(--radius-full);
303
+ background: var(--color-accent);
304
+ flex-shrink: 0;
305
+ }
306
+
307
+ .os-note-card-success .os-note-card-mark {
308
+ background: var(--color-success);
309
+ }
310
+ .os-note-card-warning .os-note-card-mark {
311
+ background: var(--color-warning);
312
+ }
313
+ .os-note-card-danger .os-note-card-mark {
314
+ background: var(--color-error);
315
+ }
316
+ .os-note-card-neutral .os-note-card-mark {
317
+ background: var(--color-text-secondary);
318
+ }
319
+
320
+ .os-note-card-copy {
321
+ flex: 1;
322
+ min-width: 0;
323
+ display: flex;
324
+ flex-direction: column;
325
+ gap: var(--spacing-0-5);
326
+ }
327
+
328
+ .os-note-card-title {
329
+ font-size: var(--font-size-base);
330
+ font-weight: var(--font-weight-semibold);
331
+ line-height: 1.3;
332
+ }
333
+
334
+ .os-note-card-description {
335
+ font-size: var(--font-size-sm);
336
+ color: var(--color-text-secondary);
337
+ line-height: 1.4;
338
+ }
339
+
340
+ .os-sr {
341
+ position: absolute;
342
+ width: 1px;
343
+ height: 1px;
344
+ padding: 0;
345
+ margin: -1px;
346
+ overflow: hidden;
347
+ clip: rect(0, 0, 0, 0);
348
+ white-space: nowrap;
349
+ border: 0;
350
+ }
@@ -0,0 +1,114 @@
1
+ /* Shared pieces for typed date/time fields: glyphs, segments, the dropdown panel.
2
+ Only canonical tokens (--color-*, --spacing-*, --radius-*, --font-size-*) so
3
+ the kit renders the same under tokens.css or the generated theme. */
4
+
5
+ .os-glyph {
6
+ flex: none;
7
+ display: inline-block;
8
+ vertical-align: middle;
9
+ }
10
+
11
+ /* Typed segments — "09 : 30 AM", "09 / 24 / 2026" */
12
+ .os-segments {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ flex: 1;
16
+ min-width: 0;
17
+ gap: 1px;
18
+ font-variant-numeric: tabular-nums;
19
+ font-size: var(--font-size-base);
20
+ }
21
+ .os-control-sm .os-segments {
22
+ font-size: var(--font-size-sm);
23
+ }
24
+ .os-control-lg .os-segments {
25
+ font-size: var(--font-size-lg);
26
+ }
27
+ .os-segment {
28
+ min-width: 2ch;
29
+ padding: 1px 3px;
30
+ border-radius: calc(var(--radius-inner) / 2);
31
+ text-align: center;
32
+ color: var(--color-text-primary);
33
+ outline: none;
34
+ cursor: text;
35
+ user-select: none;
36
+ transition:
37
+ background-color var(--duration-fast) var(--ease-standard),
38
+ color var(--duration-fast) var(--ease-standard);
39
+ }
40
+ .os-segment:hover {
41
+ background: var(--color-overlay-hover);
42
+ }
43
+ .os-segment:focus {
44
+ background: var(--color-accent);
45
+ color: var(--color-on-accent);
46
+ }
47
+ .os-segment-empty {
48
+ color: var(--color-text-disabled);
49
+ }
50
+ .os-segment-divider {
51
+ color: var(--color-text-disabled);
52
+ user-select: none;
53
+ }
54
+ .os-segment + .os-segment {
55
+ margin-left: var(--spacing-1);
56
+ }
57
+
58
+ /* Field shell + dropdown */
59
+ .os-picker {
60
+ position: relative;
61
+ display: flex;
62
+ flex-direction: column;
63
+ width: 100%;
64
+ max-width: var(--os-picker-width, 240px);
65
+ }
66
+ .os-picker-control {
67
+ padding-right: var(--spacing-1);
68
+ cursor: text;
69
+ }
70
+ .os-picker-control-open {
71
+ border-color: var(--color-accent);
72
+ }
73
+ .os-picker-trigger {
74
+ flex: none;
75
+ }
76
+
77
+ .os-picker-panel {
78
+ position: fixed;
79
+ z-index: var(--z-overlay, 100);
80
+ box-sizing: border-box;
81
+ padding: var(--spacing-3);
82
+ background: var(--color-background-popover);
83
+ border-radius: var(--radius-container);
84
+ box-shadow:
85
+ 0 0 0 1px var(--color-border),
86
+ var(--shadow-high, var(--elevation-3));
87
+ animation: os-pop-in var(--duration-fast) var(--ease-standard);
88
+ transform-origin: top left;
89
+ }
90
+ @keyframes os-pop-in {
91
+ from {
92
+ opacity: 0;
93
+ transform: translateY(-4px) scale(0.98);
94
+ }
95
+ }
96
+ .os-picker-body {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: var(--spacing-3);
100
+ }
101
+ .os-picker-footer {
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: space-between;
105
+ gap: var(--spacing-2);
106
+ padding-top: var(--spacing-3);
107
+ border-top: 1px solid var(--color-border);
108
+ }
109
+
110
+ @media (prefers-reduced-motion: reduce) {
111
+ .os-picker-panel {
112
+ animation: none;
113
+ }
114
+ }
@@ -0,0 +1,179 @@
1
+ /* PillNav — icon pills; the current page opens to icon + label in the accent colour while one
2
+ highlight slides beneath it. Uses only tokens the Astryx theme ships (astryx.css, theme.css),
3
+ so the motion and sizes resolve in every app that loads joined.css. */
4
+
5
+ .os-pill-nav {
6
+ min-width: 0;
7
+ }
8
+
9
+ .os-pill-track {
10
+ position: relative;
11
+ }
12
+
13
+ .os-pill-list {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: var(--spacing-1);
17
+ margin: 0;
18
+ padding: 0;
19
+ list-style: none;
20
+ }
21
+
22
+ /* The open pill keeps its full label; icon-only pills give way first on narrow bars. */
23
+ .os-pill-list > li:has(.os-pill[data-active="true"]) {
24
+ flex-shrink: 0;
25
+ }
26
+
27
+ /* The highlight: placed and moved by PillNav, following the active pill frame by frame. */
28
+ .os-pill-indicator {
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ height: 100%;
33
+ border-radius: var(--radius-full);
34
+ background-color: var(--color-accent-muted);
35
+ opacity: 0;
36
+ pointer-events: none;
37
+ transition: opacity var(--duration-fast) var(--ease-standard);
38
+ }
39
+
40
+ .os-pill-indicator[data-visible="true"] {
41
+ opacity: 1;
42
+ }
43
+
44
+ .os-pill {
45
+ position: relative;
46
+ display: inline-flex;
47
+ align-items: center;
48
+ height: calc(var(--size-element-md) + var(--spacing-1));
49
+ padding-inline: var(--spacing-3);
50
+ border-radius: var(--radius-full);
51
+ color: var(--color-icon-secondary);
52
+ font-size: var(--font-size-base);
53
+ font-weight: var(--font-weight-semibold);
54
+ text-decoration: none;
55
+ white-space: nowrap;
56
+ -webkit-tap-highlight-color: transparent;
57
+ transition:
58
+ background-color var(--duration-fast) var(--ease-standard),
59
+ color var(--duration-medium) var(--ease-standard),
60
+ transform var(--duration-fast) var(--ease-standard);
61
+ }
62
+
63
+ .os-pill:hover {
64
+ background-color: var(--color-overlay-hover);
65
+ color: var(--color-icon-primary);
66
+ }
67
+
68
+ .os-pill:active {
69
+ transform: scale(0.96);
70
+ }
71
+
72
+ .os-pill:focus-visible {
73
+ outline: var(--focus-outline-width) var(--focus-outline-style) var(--focus-outline-color);
74
+ outline-offset: var(--spacing-0-5);
75
+ }
76
+
77
+ .os-pill[data-active="true"],
78
+ .os-pill[data-active="true"]:hover {
79
+ background-color: transparent;
80
+ color: var(--color-accent);
81
+ }
82
+
83
+ .os-pill-icon {
84
+ position: relative;
85
+ display: inline-flex;
86
+ font-size: var(--font-size-xl);
87
+ }
88
+
89
+ /* A small count bubble on the icon's top-end corner. */
90
+ .os-pill-count {
91
+ position: absolute;
92
+ top: calc(-1 * var(--spacing-1-5));
93
+ inset-inline-start: calc(100% - var(--spacing-2));
94
+ display: inline-flex;
95
+ align-items: center;
96
+ justify-content: center;
97
+ min-width: var(--spacing-4);
98
+ height: var(--spacing-4);
99
+ padding-inline: var(--spacing-1);
100
+ box-sizing: border-box;
101
+ border-radius: var(--radius-full);
102
+ background: var(--color-accent);
103
+ color: var(--color-on-accent);
104
+ font-size: var(--font-size-xs);
105
+ font-weight: var(--font-weight-semibold);
106
+ line-height: 1;
107
+ font-variant-numeric: tabular-nums;
108
+ box-shadow: 0 0 0 var(--spacing-0-5) var(--color-background-surface);
109
+ pointer-events: none;
110
+ }
111
+
112
+ /* The label track opens from 0 to its natural width (0fr → 1fr), so the pill and every
113
+ neighbour glide instead of jumping. The gap before the text lives inside the track. */
114
+ .os-pill-label {
115
+ display: grid;
116
+ grid-template-columns: 0fr;
117
+ transition: grid-template-columns var(--duration-medium) var(--ease-standard);
118
+ }
119
+
120
+ .os-pill-label > span {
121
+ min-width: 0;
122
+ overflow: hidden;
123
+ padding-inline-start: var(--spacing-1-5);
124
+ opacity: 0;
125
+ transform: translateX(calc(-1 * var(--spacing-1)));
126
+ transition:
127
+ opacity var(--duration-fast) var(--ease-standard),
128
+ transform var(--duration-medium) var(--ease-standard);
129
+ }
130
+
131
+ .os-pill[data-active="true"] .os-pill-label {
132
+ grid-template-columns: 1fr;
133
+ }
134
+
135
+ /* Opening: the text fades in just behind the width, so it never shows clipped. */
136
+ .os-pill[data-active="true"] .os-pill-label > span {
137
+ opacity: 1;
138
+ transform: none;
139
+ transition-delay: var(--duration-fast), 0s;
140
+ }
141
+
142
+ /* Small screens: the same pills as a bar along the bottom edge. */
143
+ .os-pill-nav[data-placement="bottom"] {
144
+ position: fixed;
145
+ inset-inline: 0;
146
+ bottom: 0;
147
+ z-index: 1;
148
+ padding: var(--spacing-2);
149
+ padding-bottom: calc(var(--spacing-2) + env(safe-area-inset-bottom));
150
+ background: var(--color-background-surface);
151
+ border-top: var(--border-width) solid var(--color-border);
152
+ }
153
+
154
+ .os-pill-nav-spacer {
155
+ height: calc(
156
+ var(--size-element-md) + var(--spacing-1) + 2 * var(--spacing-2) + env(safe-area-inset-bottom)
157
+ );
158
+ }
159
+
160
+ .os-pill-nav[data-placement="bottom"] .os-pill-list {
161
+ justify-content: space-between;
162
+ gap: 0;
163
+ }
164
+
165
+ .os-pill-nav[data-placement="bottom"] .os-pill {
166
+ padding-inline: var(--spacing-2);
167
+ }
168
+
169
+ @media (prefers-reduced-motion: reduce) {
170
+ .os-pill,
171
+ .os-pill-label,
172
+ .os-pill-label > span,
173
+ .os-pill-indicator {
174
+ transition: none;
175
+ }
176
+ .os-pill:active {
177
+ transform: none;
178
+ }
179
+ }