@slotted/styles 0.1.0-beta.28 → 0.1.0-beta.29

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 (34) hide show
  1. package/package.json +3 -1
  2. package/src/attachment/attachment.css +13 -1
  3. package/src/command-palette/command-palette.css +36 -0
  4. package/src/command-palette/command-palette.tokens.json +1 -0
  5. package/src/date-picker/date-picker.css +41 -0
  6. package/src/date-picker/date-picker.tokens.json +4 -0
  7. package/src/date-range-picker/date-range-picker.css +33 -0
  8. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  9. package/src/datetime-picker/datetime-picker.css +42 -0
  10. package/src/datetime-picker/datetime-picker.tokens.json +4 -0
  11. package/src/datetime-range-picker/datetime-range-picker.css +33 -0
  12. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  13. package/src/description-list/description-list.css +23 -8
  14. package/src/description-list/description-list.tokens.json +1 -0
  15. package/src/dialog/dialog.css +59 -45
  16. package/src/drawer/drawer.css +27 -2
  17. package/src/drawer/drawer.tokens.json +2 -0
  18. package/src/entity-picker/entity-picker.css +36 -0
  19. package/src/entity-picker/entity-picker.tokens.json +1 -0
  20. package/src/field-group/field-group.css +18 -5
  21. package/src/field-group/field-group.tokens.json +3 -0
  22. package/src/media-viewer/media-viewer.css +790 -0
  23. package/src/media-viewer/media-viewer.tokens.json +53 -0
  24. package/src/message/message.css +1255 -1248
  25. package/src/message-scroller/message-scroller.css +322 -318
  26. package/src/runtime-properties.mjs +11 -0
  27. package/src/stat-card/stat-card.css +33 -0
  28. package/src/stat-card/stat-card.tokens.json +4 -0
  29. package/src/tag/tag.css +5 -4
  30. package/src/tag/tag.tokens.json +1 -0
  31. package/src/time-picker/time-picker.css +41 -0
  32. package/src/time-picker/time-picker.tokens.json +4 -0
  33. package/src/time-range-picker/time-range-picker.css +33 -0
  34. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
@@ -315,6 +315,17 @@ export const RUNTIME_PROPERTY_PREFIXES = [
315
315
  '--slotted-navigation-menu-viewport-block-start',
316
316
  '--slotted-navigation-menu-arrow-offset',
317
317
  '--slotted-navigation-menu-available-inline-size',
318
+ /**
319
+ * `media-viewer` — the box the picture takes at the current level and its
320
+ * quarter turn, measured from the stage and the picture's own size by the
321
+ * binding. The family also owns theme tokens under the same prefix, so each
322
+ * is named one by one.
323
+ */
324
+ '--slotted-media-viewer-frame-inline-size',
325
+ '--slotted-media-viewer-frame-block-size',
326
+ '--slotted-media-viewer-media-inline-size',
327
+ '--slotted-media-viewer-media-block-size',
328
+ '--slotted-media-viewer-rotation',
318
329
  ];
319
330
 
320
331
  /** Whether a custom property is written by script rather than by a theme. */
@@ -203,6 +203,33 @@
203
203
  --_radius: var(--slotted-radius-none, 0px);
204
204
  }
205
205
 
206
+ /* ── Attention: a figure past a threshold the product states ─────────── */
207
+
208
+ /**
209
+ * The value and the edge take the tone; the delta keeps the tone of its
210
+ * change, and the trend the root's `tone`. The binding writes the
211
+ * attribute on a ready value only. A `plain` card has no edge to paint.
212
+ */
213
+ [data-ui-stat-card][data-attention='warning'] {
214
+ --_attention-ink: var(--slotted-stat-card-attention-ink, var(--slotted-tone-warning-text));
215
+ --_attention-edge: var(
216
+ --slotted-stat-card-attention-border-color,
217
+ var(--slotted-tone-warning-border)
218
+ );
219
+ }
220
+
221
+ [data-ui-stat-card][data-attention='danger'] {
222
+ --_attention-ink: var(--slotted-stat-card-attention-ink, var(--slotted-tone-danger-text));
223
+ --_attention-edge: var(
224
+ --slotted-stat-card-attention-border-color,
225
+ var(--slotted-tone-danger-border)
226
+ );
227
+ }
228
+
229
+ [data-ui-stat-card][data-attention]:not([data-fill='plain']) {
230
+ --_edge: var(--_attention-edge);
231
+ }
232
+
206
233
  /* ── The body ─────────────────────────────────────────────────────────── */
207
234
 
208
235
  /**
@@ -549,6 +576,12 @@
549
576
  }
550
577
  }
551
578
 
579
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
580
+ :scope[data-attention] [data-part-value] {
581
+ color: var(--_attention-ink);
582
+ }
583
+ }
584
+
552
585
  /* The unit is in the value's own line, a step down in size and weight, so
553
586
  `$` and `%` read as annotation of the number rather than as digits. */
554
587
  @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
@@ -38,6 +38,8 @@
38
38
  "--slotted-sparkline-block-size",
39
39
  "--slotted-sparkline-block-size-lg",
40
40
  "--slotted-sparkline-block-size-sm",
41
+ "--slotted-stat-card-attention-border-color",
42
+ "--slotted-stat-card-attention-ink",
41
43
  "--slotted-stat-card-background",
42
44
  "--slotted-stat-card-background-subtle",
43
45
  "--slotted-stat-card-border-color",
@@ -93,9 +95,11 @@
93
95
  "--slotted-text",
94
96
  "--slotted-text-muted",
95
97
  "--slotted-tone-accent-text",
98
+ "--slotted-tone-danger-border",
96
99
  "--slotted-tone-danger-text",
97
100
  "--slotted-tone-info-text",
98
101
  "--slotted-tone-secondary-text",
99
102
  "--slotted-tone-success-text",
103
+ "--slotted-tone-warning-border",
100
104
  "--slotted-tone-warning-text"
101
105
  ]
package/src/tag/tag.css CHANGED
@@ -65,10 +65,11 @@
65
65
  * `tags-input` set it from the room their frame has left); and the edge,
66
66
  * so a host can mark one chip — the one that answered a duplicate —
67
67
  * without reaching into this sheet. Both are read here, once, and a host
68
- * writes `[data-ui-tag]` nowhere.
68
+ * writes `[data-ui-tag]` nowhere. The inline inset is a theme's: the room
69
+ * between the edge and the text at every size, which a host leaves alone.
69
70
  */
70
71
  --_inset-block: var(--slotted-tag-inset-block, var(--slotted-space-2, 0.25rem));
71
- --_inset-inline: var(--slotted-space-4, 0.5rem);
72
+ --_inset-inline: var(--slotted-tag-inset-inline, var(--slotted-space-4, 0.5rem));
72
73
  --_gap: var(--slotted-space-2, 0.25rem);
73
74
 
74
75
  --_line-height: var(--slotted-line-height-xs, 1.4);
@@ -262,7 +263,7 @@
262
263
  [data-ui-tag][data-part-root][data-size='sm'] {
263
264
  --_font-size: var(--slotted-control-font-size-sm, 12px);
264
265
  --_inset-block: var(--slotted-tag-inset-block, var(--slotted-space-1, 0.125rem));
265
- --_inset-inline: var(--slotted-space-3, 0.375rem);
266
+ --_inset-inline: var(--slotted-tag-inset-inline, var(--slotted-space-3, 0.375rem));
266
267
  }
267
268
 
268
269
  /**
@@ -276,7 +277,7 @@
276
277
  --_icon-size: var(--slotted-control-icon-size-md, 16px);
277
278
  --_inner-size: var(--slotted-control-inner-size-md, 24px);
278
279
  --_inset-block: var(--slotted-tag-inset-block, var(--slotted-space-3, 0.375rem));
279
- --_inset-inline: var(--slotted-space-5, 0.75rem);
280
+ --_inset-inline: var(--slotted-tag-inset-inline, var(--slotted-space-5, 0.75rem));
280
281
  --_gap: var(--slotted-space-3, 0.375rem);
281
282
  }
282
283
 
@@ -34,6 +34,7 @@
34
34
  "--slotted-tag-font-weight",
35
35
  "--slotted-tag-group-gap",
36
36
  "--slotted-tag-inset-block",
37
+ "--slotted-tag-inset-inline",
37
38
  "--slotted-tag-state-layer-active",
38
39
  "--slotted-tag-state-layer-hover",
39
40
  "--slotted-target-comfortable",
@@ -53,6 +53,15 @@
53
53
  position: relative;
54
54
  }
55
55
 
56
+ /**
57
+ * The `time-field` is the control's flex item, and its own basis is its
58
+ * content. It grows to the control, so the frame takes the width the field
59
+ * gave the root: the whole field at `full`, the step at `short` and `medium`.
60
+ */
61
+ [data-ui-time-picker] [data-part-control] > [data-ui-time-field] {
62
+ flex: 1 1 auto;
63
+ }
64
+
56
65
  [data-ui-time-picker][data-part-root][data-size='sm'] [data-part-control] {
57
66
  --_icon-size: var(--slotted-control-icon-size-sm, 14px);
58
67
  --_height: var(--slotted-control-height-sm, 30px);
@@ -656,6 +665,38 @@
656
665
  padding-block-end: var(--slotted-space-3, 0.375rem);
657
666
  padding-inline-end: 0;
658
667
  }
668
+
669
+ /**
670
+ * The grip every bottom sheet carries, in the drawer's geometry and line
671
+ * colour: a pill three rem by a quarter, centred in a row one target tall
672
+ * that the content keeps clear at its top. A pull down on it dismisses the
673
+ * sheet; Escape and the press outside stay the accessible ways out.
674
+ */
675
+ [data-ui-time-picker][data-part-positioner][data-presentation='sheet'] > [data-part-content] {
676
+ padding-block-start: var(--slotted-target-min, 24px);
677
+ position: relative;
678
+ }
679
+
680
+ [data-ui-time-picker][data-part-positioner][data-presentation='sheet']
681
+ > [data-part-content]
682
+ > [data-part-grip] {
683
+ background-clip: content-box;
684
+ background-color: var(
685
+ --slotted-drawer-resizer-line-color,
686
+ var(--slotted-border-strong, ButtonBorder)
687
+ );
688
+ block-size: var(--slotted-space-2, 0.25rem);
689
+ border-radius: var(--slotted-radius-full, 9999px);
690
+ box-sizing: content-box;
691
+ cursor: grab;
692
+ inline-size: var(--slotted-space-11, 3rem);
693
+ inset-block-start: 0;
694
+ inset-inline: 0;
695
+ margin-inline: auto;
696
+ padding-block: calc((var(--slotted-target-min, 24px) - var(--slotted-space-2, 0.25rem)) / 2);
697
+ position: absolute;
698
+ touch-action: none;
699
+ }
659
700
  }
660
701
 
661
702
  @media (forced-colors: active) {
@@ -1,4 +1,5 @@
1
1
  [
2
+ "--slotted-border-strong",
2
3
  "--slotted-border-subtle",
3
4
  "--slotted-border-width-thin",
4
5
  "--slotted-control-border-width",
@@ -12,6 +13,7 @@
12
13
  "--slotted-control-transition-duration",
13
14
  "--slotted-control-transition-easing",
14
15
  "--slotted-disabled-foreground",
16
+ "--slotted-drawer-resizer-line-color",
15
17
  "--slotted-duration-medium",
16
18
  "--slotted-duration-short",
17
19
  "--slotted-easing-enter",
@@ -20,9 +22,11 @@
20
22
  "--slotted-focus-ring-color-invalid",
21
23
  "--slotted-focus-ring-offset",
22
24
  "--slotted-focus-ring-width",
25
+ "--slotted-radius-full",
23
26
  "--slotted-radius-lg",
24
27
  "--slotted-shadow-md",
25
28
  "--slotted-space-1",
29
+ "--slotted-space-11",
26
30
  "--slotted-space-2",
27
31
  "--slotted-space-3",
28
32
  "--slotted-space-4",
@@ -1250,6 +1250,39 @@
1250
1250
  var(--slotted-target-comfortable, 44px)
1251
1251
  );
1252
1252
  }
1253
+
1254
+ /**
1255
+ * The grip every bottom sheet carries, in the drawer's geometry and line
1256
+ * colour: a pill three rem by a quarter, centred in a row one target tall
1257
+ * that the content keeps clear at its top. A pull down on it dismisses the
1258
+ * sheet; Escape and the press outside stay the accessible ways out.
1259
+ */
1260
+ [data-ui-time-range-picker][data-part-positioner][data-presentation='sheet']
1261
+ > [data-part-content] {
1262
+ padding-block-start: var(--slotted-target-min, 24px);
1263
+ position: relative;
1264
+ }
1265
+
1266
+ [data-ui-time-range-picker][data-part-positioner][data-presentation='sheet']
1267
+ > [data-part-content]
1268
+ > [data-part-grip] {
1269
+ background-clip: content-box;
1270
+ background-color: var(
1271
+ --slotted-drawer-resizer-line-color,
1272
+ var(--slotted-border-strong, ButtonBorder)
1273
+ );
1274
+ block-size: var(--slotted-space-2, 0.25rem);
1275
+ border-radius: var(--slotted-radius-full, 9999px);
1276
+ box-sizing: content-box;
1277
+ cursor: grab;
1278
+ inline-size: var(--slotted-space-11, 3rem);
1279
+ inset-block-start: 0;
1280
+ inset-inline: 0;
1281
+ margin-inline: auto;
1282
+ padding-block: calc((var(--slotted-target-min, 24px) - var(--slotted-space-2, 0.25rem)) / 2);
1283
+ position: absolute;
1284
+ touch-action: none;
1285
+ }
1253
1286
  }
1254
1287
 
1255
1288
  @media (forced-colors: active) {
@@ -1,4 +1,5 @@
1
1
  [
2
+ "--slotted-border-strong",
2
3
  "--slotted-border-subtle",
3
4
  "--slotted-border-width-thin",
4
5
  "--slotted-control-border-color",
@@ -29,6 +30,7 @@
29
30
  "--slotted-disabled-background",
30
31
  "--slotted-disabled-border",
31
32
  "--slotted-disabled-foreground",
33
+ "--slotted-drawer-resizer-line-color",
32
34
  "--slotted-duration-medium",
33
35
  "--slotted-duration-short",
34
36
  "--slotted-easing-enter",
@@ -44,6 +46,7 @@
44
46
  "--slotted-font-weight-semibold",
45
47
  "--slotted-letter-spacing-wide",
46
48
  "--slotted-line-height-sm",
49
+ "--slotted-radius-full",
47
50
  "--slotted-radius-lg",
48
51
  "--slotted-radius-none",
49
52
  "--slotted-radius-pill",
@@ -51,6 +54,7 @@
51
54
  "--slotted-radius-xs",
52
55
  "--slotted-shadow-md",
53
56
  "--slotted-space-1",
57
+ "--slotted-space-11",
54
58
  "--slotted-space-2",
55
59
  "--slotted-space-3",
56
60
  "--slotted-space-4",