@slotted/styles 0.1.0-beta.37 → 0.1.0-beta.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slotted/styles",
3
- "version": "0.1.0-beta.37",
3
+ "version": "0.1.0-beta.38",
4
4
  "description": "Per-family stylesheets of Slotted, bundled by the React and Angular bindings.",
5
5
  "keywords": [
6
6
  "slotted",
@@ -487,6 +487,12 @@
487
487
  font-weight: var(--slotted-font-weight-semibold, 600);
488
488
  }
489
489
 
490
+ /* The disc says it, and the rest of the day keeps its own ink. */
491
+ [data-ui-calendar]:where([data-layout='fill'][data-today-mark='disc'])
492
+ [data-part-day][data-today] {
493
+ color: inherit;
494
+ }
495
+
490
496
  [data-ui-calendar] [data-part-day]::before {
491
497
  /* Reserved in every cell and painted in one, so the row keeps its line. */
492
498
  background-color: transparent;
@@ -746,6 +752,17 @@
746
752
  background-color: transparent;
747
753
  }
748
754
 
755
+ /* A day that holds nothing to choose answers nothing, in the ink of any day. */
756
+ [data-ui-calendar] [data-part-cell][data-inert] [data-part-day] {
757
+ cursor: default;
758
+ }
759
+
760
+ [data-ui-calendar]
761
+ [data-part-cell][data-inert]:not([data-selected], [data-in-range])
762
+ [data-part-day]:is(:hover, :active):not([data-disabled]) {
763
+ background-color: transparent;
764
+ }
765
+
749
766
  /**
750
767
  * The chosen date. A fill rather than a ring, so it and today can be true at
751
768
  * once and still read as two facts.
@@ -903,6 +920,90 @@
903
920
  padding-block: var(--slotted-space-2, 0.25rem);
904
921
  }
905
922
 
923
+ /**
924
+ * The content at the start of the day: the number on the first line, the
925
+ * figure on the end of its own, the marks on the last. Every number stands in
926
+ * the middle of one box, so the digits of a column line up whatever their
927
+ * count, and today's disc is that box filled.
928
+ */
929
+ [data-ui-calendar][data-layout='fill'] [data-part-day-number] {
930
+ --_number: calc(1em + 2 * var(--slotted-space-2, 0.25rem));
931
+ }
932
+
933
+ [data-ui-calendar][data-layout='fill']:is([data-day-align='start'], [data-today-mark='disc'])
934
+ [data-part-day-number] {
935
+ block-size: var(--_number);
936
+ border-radius: var(--slotted-radius-full, 9999px);
937
+ display: grid;
938
+ flex: none;
939
+ min-inline-size: var(--_number);
940
+ place-items: center;
941
+ }
942
+
943
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-week-header] {
944
+ padding-inline: calc(
945
+ var(--slotted-border-width-thin, 1px) + var(--slotted-space-2, 0.25rem) +
946
+ var(--slotted-space-1, 0.125rem)
947
+ );
948
+ text-align: start;
949
+ }
950
+
951
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day] {
952
+ align-items: start;
953
+ padding-inline: var(--slotted-space-2, 0.25rem);
954
+ }
955
+
956
+ /* Under the middle of the number's box. */
957
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day]::before,
958
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-mark] {
959
+ margin-inline-start: calc(0.5em + var(--slotted-space-2, 0.25rem) / 2);
960
+ }
961
+
962
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-content] {
963
+ align-items: start;
964
+ flex: 1;
965
+ min-block-size: 0;
966
+ }
967
+
968
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-marks] {
969
+ justify-content: start;
970
+ padding-inline: var(--slotted-space-1, 0.125rem);
971
+ }
972
+
973
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-marks]:last-child {
974
+ margin-block-start: auto;
975
+ }
976
+
977
+ /* Today in a disc: the dot leaves, its row with it. */
978
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc'] [data-part-day]::before {
979
+ display: none;
980
+ }
981
+
982
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
983
+ [data-part-cell]:not([data-outside-month])
984
+ [data-part-day][data-today]
985
+ > [data-part-day-number] {
986
+ background-color: var(--slotted-calendar-today-background, var(--slotted-tone-accent-solid));
987
+ color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-on-solid));
988
+ }
989
+
990
+ /* On the ground of a chosen day the disc is that ground and its ink, exchanged. */
991
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
992
+ [data-part-cell][data-selected]:not([data-outside-month])
993
+ [data-part-day][data-today]
994
+ > [data-part-day-number] {
995
+ background-color: var(--slotted-calendar-today-background, var(--slotted-tone-accent-on-solid));
996
+ color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-solid));
997
+ }
998
+
999
+ [data-ui-calendar][data-part-root][data-layout='fill'][data-today-mark='disc'][data-disabled]
1000
+ [data-part-cell]:not([data-outside-month])
1001
+ [data-part-day][data-today]
1002
+ > [data-part-day-number] {
1003
+ background-color: var(--slotted-disabled-background);
1004
+ color: var(--slotted-disabled-foreground);
1005
+ }
1006
+
906
1007
  /* Between the days and not around them: the lines divide a plane, they frame nothing. */
907
1008
  [data-ui-calendar][data-layout='fill'][data-lines]
908
1009
  [data-part-week]
@@ -941,11 +1042,11 @@
941
1042
  --_mark: var(--slotted-tone-accent-solid, currentcolor);
942
1043
 
943
1044
  background-color: var(--_mark);
944
- block-size: var(--slotted-space-3, 0.375rem);
1045
+ block-size: var(--slotted-calendar-day-mark-size, var(--slotted-space-3, 0.375rem));
945
1046
  border: var(--slotted-border-width-thin, 1px) solid var(--_mark);
946
1047
  border-radius: var(--slotted-radius-full, 9999px);
947
1048
  box-sizing: border-box;
948
- inline-size: var(--slotted-space-3, 0.375rem);
1049
+ inline-size: var(--slotted-calendar-day-mark-size, var(--slotted-space-3, 0.375rem));
949
1050
  }
950
1051
 
951
1052
  [data-ui-calendar] [data-part-day-mark][data-hollow] {
@@ -1012,6 +1113,15 @@
1012
1113
  }
1013
1114
 
1014
1115
  @media (forced-colors: active) {
1116
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
1117
+ [data-part-cell]:not([data-outside-month])
1118
+ [data-part-day][data-today]
1119
+ > [data-part-day-number] {
1120
+ background-color: Highlight;
1121
+ color: HighlightText;
1122
+ forced-color-adjust: none;
1123
+ }
1124
+
1015
1125
  [data-ui-calendar] [data-part-day-mark] {
1016
1126
  background-color: CanvasText;
1017
1127
  border-color: CanvasText;
@@ -6,6 +6,7 @@
6
6
  "--slotted-calendar-cell-size",
7
7
  "--slotted-calendar-color",
8
8
  "--slotted-calendar-day-height",
9
+ "--slotted-calendar-day-mark-size",
9
10
  "--slotted-calendar-day-radius",
10
11
  "--slotted-calendar-disabled-color",
11
12
  "--slotted-calendar-hover-background",
@@ -23,6 +24,7 @@
23
24
  "--slotted-calendar-range-hover-background",
24
25
  "--slotted-calendar-selected-background",
25
26
  "--slotted-calendar-selected-color",
27
+ "--slotted-calendar-today-background",
26
28
  "--slotted-calendar-today-color",
27
29
  "--slotted-calendar-trigger-color",
28
30
  "--slotted-calendar-unavailable-color",
@@ -1261,9 +1261,11 @@
1261
1261
  * stand in the plain ink.
1262
1262
  */
1263
1263
  :scope {
1264
+ --_tile-surface: var(--slotted-surface);
1265
+
1264
1266
  display: inline-flex;
1265
1267
  flex-direction: column;
1266
- gap: var(--slotted-space-3, 0.375rem);
1268
+ gap: var(--slotted-message-activity-gap, var(--slotted-space-3, 0.375rem));
1267
1269
  box-sizing: border-box;
1268
1270
  max-inline-size: 100%;
1269
1271
  padding-block: var(--_pad-block);
@@ -1279,6 +1281,8 @@
1279
1281
 
1280
1282
  /* On a rail, with no bubbles, a frame is a block floating in the turn. */
1281
1283
  :scope[data-variant='plain'] {
1284
+ --_tile-surface: var(--slotted-surface-raised);
1285
+
1282
1286
  padding: 0;
1283
1287
  border: 0;
1284
1288
  border-radius: 0;
@@ -1289,7 +1293,7 @@
1289
1293
  [data-part-activity-step] {
1290
1294
  display: flex;
1291
1295
  align-items: center;
1292
- gap: var(--slotted-space-4, 0.5rem);
1296
+ gap: var(--slotted-message-activity-step-gap, var(--slotted-space-4, 0.5rem));
1293
1297
  min-inline-size: 0;
1294
1298
  transition:
1295
1299
  opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
@@ -1298,7 +1302,7 @@
1298
1302
 
1299
1303
  @starting-style {
1300
1304
  opacity: 0;
1301
- translate: 0 var(--slotted-space-2, 0.25rem);
1305
+ translate: 0 var(--slotted-message-activity-rise, var(--slotted-space-2, 0.25rem));
1302
1306
  }
1303
1307
  }
1304
1308
 
@@ -1315,27 +1319,40 @@
1315
1319
  }
1316
1320
 
1317
1321
  [data-part-activity-step][data-complete] > :first-child {
1318
- color: var(--slotted-tone-success-text);
1322
+ color: var(--slotted-message-activity-color-complete, var(--slotted-tone-success-text));
1319
1323
  }
1320
1324
 
1321
1325
  /**
1322
1326
  * The source of a step, in a tile: the icon of what the step consulted,
1323
1327
  * and the tick in its place once the step is complete. The tile is edged
1324
1328
  * in the accent while the step is current, which is the state the ring
1325
- * says where no icon is given.
1329
+ * says where no icon is given. Its ground is a step away from what it
1330
+ * stands on: the surface inside the raised frame, the raised surface where
1331
+ * there is no frame.
1326
1332
  */
1327
1333
  [data-part-activity-step] > [data-part-activity-step-icon] {
1334
+ --_tile-glyph: var(--slotted-message-activity-icon-glyph-size, 0.75rem);
1335
+ --slotted-icon-size: var(--_tile-glyph);
1336
+
1328
1337
  inline-size: var(--slotted-message-activity-icon-size, 1.375rem);
1329
1338
  block-size: var(--slotted-message-activity-icon-size, 1.375rem);
1330
1339
  box-sizing: border-box;
1331
1340
  border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
1332
- border-radius: var(--slotted-radius-sm, 4px);
1333
- background-color: var(--slotted-surface);
1341
+ border-radius: var(--slotted-message-activity-icon-radius, var(--slotted-radius-md, 6px));
1342
+ background-color: var(--slotted-message-activity-icon-surface, var(--_tile-surface));
1334
1343
  transition: border-color var(--slotted-duration-medium) var(--slotted-easing-standard, ease);
1335
1344
  }
1336
1345
 
1346
+ [data-part-activity-step-icon] > svg {
1347
+ inline-size: var(--_tile-glyph);
1348
+ block-size: var(--_tile-glyph);
1349
+ }
1350
+
1337
1351
  [data-part-activity-step][data-current] > [data-part-activity-step-icon] {
1338
- border-color: var(--slotted-tone-accent-border);
1352
+ border-color: var(
1353
+ --slotted-message-activity-icon-border-color-current,
1354
+ var(--slotted-tone-accent-border)
1355
+ );
1339
1356
  }
1340
1357
 
1341
1358
  [data-part-activity-step][data-current] {
@@ -1346,7 +1363,7 @@
1346
1363
  color: var(--slotted-tone-accent-text);
1347
1364
  }
1348
1365
 
1349
- [data-part-activity-step][data-current] > :last-child {
1366
+ :scope[data-shimmer] [data-part-activity-step][data-current] > :last-child {
1350
1367
  --_base: color-mix(in oklab, var(--slotted-text) 72%, var(--slotted-text-muted));
1351
1368
 
1352
1369
  background-image: linear-gradient(
@@ -1364,7 +1381,7 @@
1364
1381
  }
1365
1382
 
1366
1383
  @media (prefers-reduced-motion: reduce) {
1367
- [data-part-activity-step][data-current] > :last-child {
1384
+ :scope[data-shimmer] [data-part-activity-step][data-current] > :last-child {
1368
1385
  animation: none;
1369
1386
  background-image: none;
1370
1387
  color: inherit;
@@ -29,7 +29,15 @@
29
29
  "--slotted-font-weight-semibold",
30
30
  "--slotted-line-height-md",
31
31
  "--slotted-line-height-xs",
32
+ "--slotted-message-activity-color-complete",
33
+ "--slotted-message-activity-gap",
34
+ "--slotted-message-activity-icon-border-color-current",
35
+ "--slotted-message-activity-icon-glyph-size",
36
+ "--slotted-message-activity-icon-radius",
32
37
  "--slotted-message-activity-icon-size",
38
+ "--slotted-message-activity-icon-surface",
39
+ "--slotted-message-activity-rise",
40
+ "--slotted-message-activity-step-gap",
33
41
  "--slotted-message-avatar-size",
34
42
  "--slotted-message-bubble-padding-block",
35
43
  "--slotted-message-bubble-padding-inline",
@@ -1331,7 +1331,11 @@
1331
1331
  --_node-child: round(var(--slotted-table-mark-child-size, 1.25rem), 1px);
1332
1332
  }
1333
1333
 
1334
- /* An expander written before the mark keeps its room in every row. */
1334
+ /* An expander written before the mark keeps its room in every row, and in a
1335
+ table where no row folds when the table asks for it. */
1336
+ [data-ui-table][data-guides='branch'][data-expander-room='always']:has(
1337
+ [data-part-row][data-level] [data-part-mark]
1338
+ ),
1335
1339
  [data-ui-table][data-guides='branch']:has(
1336
1340
  [data-part-row][data-level] > * > [data-part-expander] + [data-part-mark]
1337
1341
  ) {