@salemcobalt/ui 0.2.0-rc.30 → 0.2.0-rc.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +43 -1
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @salemcobalt/ui 0.2.0-rc.
|
|
1
|
+
/* @salemcobalt/ui 0.2.0-rc.32 — requires @salemcobalt/tokens/css. */
|
|
2
2
|
@layer sc {
|
|
3
3
|
/* ---- base.css ---- */
|
|
4
4
|
/* Shared: focus ring, reduced motion. Component files follow. */
|
|
@@ -20,6 +20,26 @@
|
|
|
20
20
|
outline: var(--sc-border-width-focus) solid var(--sc-color-border-focus);
|
|
21
21
|
outline-offset: var(--sc-border-width-focus);
|
|
22
22
|
}
|
|
23
|
+
/* Controls on an accent fill. The scope repoints the semantic tokens its descendants read, the way raised surfaces
|
|
24
|
+
repoint the washes (docs/adr/0003), so secondary and ghost Buttons, IconButtons, muted text and focus rings inside
|
|
25
|
+
need no rules of their own: text, strong borders and focus rings take text.on-accent; hover and pressed take
|
|
26
|
+
accent.hover and accent.active, the primary Button's states. The element's own focus ring is outside the fill, so it
|
|
27
|
+
keeps its colour by setting it again. Contrast: packages/tokens/test/contrast.test.ts. */
|
|
28
|
+
.sc-on-accent,
|
|
29
|
+
.sc-toast[data-tone='accent'] {
|
|
30
|
+
--sc-color-text-default: var(--sc-color-text-on-accent);
|
|
31
|
+
--sc-color-text-muted: var(--sc-color-text-on-accent);
|
|
32
|
+
--sc-color-border-strong: var(--sc-color-text-on-accent);
|
|
33
|
+
--sc-color-border-focus: var(--sc-color-text-on-accent);
|
|
34
|
+
--sc-color-surface-hover: var(--sc-color-accent-hover);
|
|
35
|
+
--sc-color-surface-active: var(--sc-color-accent-active);
|
|
36
|
+
background: var(--sc-color-accent-default);
|
|
37
|
+
color: var(--sc-color-text-on-accent);
|
|
38
|
+
}
|
|
39
|
+
.sc-on-accent:focus-visible,
|
|
40
|
+
.sc-toast[data-tone='accent']:focus-visible {
|
|
41
|
+
outline-color: var(--sc-color-accent-default);
|
|
42
|
+
}
|
|
23
43
|
/* Keeps content for assistive tech only. */
|
|
24
44
|
.sc-visually-hidden {
|
|
25
45
|
position: absolute;
|
|
@@ -906,17 +926,20 @@
|
|
|
906
926
|
font-weight: var(--sc-font-weight-semibold);
|
|
907
927
|
letter-spacing: var(--sc-font-tracking-snug);
|
|
908
928
|
padding-inline-end: var(--sc-spacing-xl);
|
|
929
|
+
text-wrap-style: balance;
|
|
909
930
|
}
|
|
910
931
|
.sc-dialog__description {
|
|
911
932
|
margin: var(--sc-spacing-2xs) 0 0;
|
|
912
933
|
font-size: var(--sc-font-size-sm);
|
|
913
934
|
line-height: var(--sc-font-line-height-normal);
|
|
914
935
|
color: var(--sc-color-text-muted);
|
|
936
|
+
text-wrap-style: pretty;
|
|
915
937
|
}
|
|
916
938
|
.sc-dialog__body {
|
|
917
939
|
margin-block-start: var(--sc-spacing-md);
|
|
918
940
|
font-size: var(--sc-font-size-sm);
|
|
919
941
|
line-height: var(--sc-font-line-height-normal);
|
|
942
|
+
text-wrap-style: pretty;
|
|
920
943
|
}
|
|
921
944
|
/* Content wraps instead of widening the popup: long URLs break, fields and media stay inside the box. */
|
|
922
945
|
.sc-dialog__title,
|
|
@@ -1340,6 +1363,7 @@
|
|
|
1340
1363
|
min-inline-size: 0;
|
|
1341
1364
|
color: var(--sc-color-text-muted);
|
|
1342
1365
|
font-size: var(--sc-font-size-xs);
|
|
1366
|
+
text-wrap-style: pretty;
|
|
1343
1367
|
}
|
|
1344
1368
|
.sc-menu__trailing {
|
|
1345
1369
|
grid-column: 3;
|
|
@@ -1422,11 +1446,13 @@
|
|
|
1422
1446
|
margin: 0;
|
|
1423
1447
|
color: var(--sc-color-text-muted);
|
|
1424
1448
|
font-size: var(--sc-font-size-xs);
|
|
1449
|
+
text-wrap-style: pretty;
|
|
1425
1450
|
}
|
|
1426
1451
|
.sc-field__error {
|
|
1427
1452
|
margin: 0;
|
|
1428
1453
|
color: var(--sc-color-danger-text);
|
|
1429
1454
|
font-size: var(--sc-font-size-xs);
|
|
1455
|
+
text-wrap-style: pretty;
|
|
1430
1456
|
}
|
|
1431
1457
|
/* Input */
|
|
1432
1458
|
.sc-input-wrap {
|
|
@@ -1765,6 +1791,7 @@
|
|
|
1765
1791
|
grid-column: 2;
|
|
1766
1792
|
color: var(--sc-color-text-muted);
|
|
1767
1793
|
font-size: var(--sc-font-size-xs);
|
|
1794
|
+
text-wrap-style: pretty;
|
|
1768
1795
|
}
|
|
1769
1796
|
.sc-choice[data-label-position='start'] > .sc-choice__description {
|
|
1770
1797
|
grid-column: 1;
|
|
@@ -2335,6 +2362,7 @@
|
|
|
2335
2362
|
font-size: var(--sc-font-size-md);
|
|
2336
2363
|
line-height: var(--sc-font-line-height-snug);
|
|
2337
2364
|
font-weight: var(--sc-font-weight-semibold);
|
|
2365
|
+
text-wrap-style: balance;
|
|
2338
2366
|
}
|
|
2339
2367
|
.sc-popover__title:has(~ .sc-popover__close),
|
|
2340
2368
|
.sc-popover__close ~ .sc-popover__title {
|
|
@@ -2343,6 +2371,7 @@
|
|
|
2343
2371
|
.sc-popover__description {
|
|
2344
2372
|
margin: var(--sc-spacing-2xs) 0 0;
|
|
2345
2373
|
color: var(--sc-color-text-muted);
|
|
2374
|
+
text-wrap-style: pretty;
|
|
2346
2375
|
}
|
|
2347
2376
|
.sc-popover__close {
|
|
2348
2377
|
position: absolute;
|
|
@@ -2839,6 +2868,7 @@
|
|
|
2839
2868
|
font-size: var(--sc-font-size-xs);
|
|
2840
2869
|
text-align: start;
|
|
2841
2870
|
caption-side: top;
|
|
2871
|
+
text-wrap-style: pretty;
|
|
2842
2872
|
}
|
|
2843
2873
|
.sc-table__header,
|
|
2844
2874
|
.sc-table__cell {
|
|
@@ -3130,6 +3160,10 @@
|
|
|
3130
3160
|
.sc-toast[data-tone='danger'] {
|
|
3131
3161
|
border-inline-start-color: var(--sc-color-danger-solid);
|
|
3132
3162
|
}
|
|
3163
|
+
/* Filled; the fill, text and button states come from the .sc-on-accent scope (base.css). */
|
|
3164
|
+
.sc-toast[data-tone='accent'] {
|
|
3165
|
+
border-color: var(--sc-color-accent-default);
|
|
3166
|
+
}
|
|
3133
3167
|
.sc-toast[data-starting-style],
|
|
3134
3168
|
.sc-toast[data-ending-style] {
|
|
3135
3169
|
opacity: 0;
|
|
@@ -3143,11 +3177,13 @@
|
|
|
3143
3177
|
margin: 0;
|
|
3144
3178
|
font-size: inherit;
|
|
3145
3179
|
font-weight: var(--sc-font-weight-medium);
|
|
3180
|
+
text-wrap-style: balance;
|
|
3146
3181
|
}
|
|
3147
3182
|
.sc-toast__description {
|
|
3148
3183
|
margin: 0;
|
|
3149
3184
|
color: var(--sc-color-text-muted);
|
|
3150
3185
|
font-size: var(--sc-font-size-xs);
|
|
3186
|
+
text-wrap-style: pretty;
|
|
3151
3187
|
}
|
|
3152
3188
|
.sc-toast__action,
|
|
3153
3189
|
.sc-toast__close {
|
|
@@ -3252,6 +3288,7 @@
|
|
|
3252
3288
|
grid-area: hint;
|
|
3253
3289
|
color: var(--sc-color-text-muted);
|
|
3254
3290
|
font-size: var(--sc-font-size-xs);
|
|
3291
|
+
text-wrap-style: pretty;
|
|
3255
3292
|
}
|
|
3256
3293
|
|
|
3257
3294
|
/* ---- chip.css ---- */
|
|
@@ -5018,6 +5055,7 @@
|
|
|
5018
5055
|
.sc-file-preview__note {
|
|
5019
5056
|
margin: var(--sc-spacing-xs) 0 0;
|
|
5020
5057
|
color: var(--sc-color-text-muted);
|
|
5058
|
+
text-wrap-style: pretty;
|
|
5021
5059
|
}
|
|
5022
5060
|
.sc-file-preview__tab > .sc-file-preview__note {
|
|
5023
5061
|
margin: 0;
|
|
@@ -5258,6 +5296,7 @@
|
|
|
5258
5296
|
background: var(--sc-color-surface-sunken);
|
|
5259
5297
|
font-size: var(--sc-font-size-xs);
|
|
5260
5298
|
color: var(--sc-color-text-muted);
|
|
5299
|
+
text-wrap-style: pretty;
|
|
5261
5300
|
}
|
|
5262
5301
|
@media (height <= 820px) {
|
|
5263
5302
|
.sc-flow__rail-note {
|
|
@@ -5362,6 +5401,7 @@
|
|
|
5362
5401
|
.sc-flow__step-description {
|
|
5363
5402
|
max-inline-size: 60ch;
|
|
5364
5403
|
color: var(--sc-color-text-muted);
|
|
5404
|
+
text-wrap-style: pretty;
|
|
5365
5405
|
}
|
|
5366
5406
|
|
|
5367
5407
|
/* Footer: back at the start, hint and primary action at the end, every button a 44px target. */
|
|
@@ -5615,6 +5655,7 @@
|
|
|
5615
5655
|
font-size: var(--sc-font-size-sm);
|
|
5616
5656
|
line-height: var(--sc-font-line-height-ui);
|
|
5617
5657
|
color: var(--sc-color-text-muted);
|
|
5658
|
+
text-wrap-style: pretty;
|
|
5618
5659
|
}
|
|
5619
5660
|
.sc-reason-list[data-size='sm'] {
|
|
5620
5661
|
--_m: 7px;
|
|
@@ -5752,6 +5793,7 @@
|
|
|
5752
5793
|
font-size: var(--sc-font-size-sm);
|
|
5753
5794
|
line-height: var(--sc-font-line-height-ui);
|
|
5754
5795
|
color: var(--sc-color-text-muted);
|
|
5796
|
+
text-wrap-style: pretty;
|
|
5755
5797
|
}
|
|
5756
5798
|
.sc-quote__label {
|
|
5757
5799
|
display: inline;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salemcobalt/ui",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.32",
|
|
4
4
|
"description": "React components for the Salem Cobalt design system: Button, IconButton, Icon set, BroomIcon, Badge, Card, Stack, Inline, Kbd, Dialog, FullScreenFlow, Tooltip, Menu, Popover, PriorityNav, Toolbar, Banner, Spinner, Progress, Tabs, Input, Textarea, Select, FileInput, Checkbox, Switch, Heading, Text, Table, Stat, Chip, Disclosure, EmptyState, Skeleton, Score, ReasonList, WordDiff, Quote; TextEditor (CodeMirror 6, inline word diffs) at @salemcobalt/ui/editor.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"diff": "^8.0.4",
|
|
47
47
|
"react": "^19.0.0",
|
|
48
48
|
"react-dom": "^19.0.0",
|
|
49
|
-
"@salemcobalt/tokens": "^0.2.0-rc.
|
|
49
|
+
"@salemcobalt/tokens": "^0.2.0-rc.32"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@codemirror/commands": {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"tsup": "^9.0.0",
|
|
110
110
|
"typescript": "^5.9.3",
|
|
111
111
|
"vitest": "^5.0.5",
|
|
112
|
-
"@salemcobalt/tokens": "^0.2.0-rc.
|
|
112
|
+
"@salemcobalt/tokens": "^0.2.0-rc.32"
|
|
113
113
|
},
|
|
114
114
|
"publishConfig": {
|
|
115
115
|
"access": "public"
|