@scalewing/react 1.56.0 → 1.58.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 (51) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +68 -1
  3. package/dist/components/Field.d.ts +3 -72
  4. package/dist/components/Field.js +6 -4
  5. package/dist/components/FixtureGroup.d.ts +3 -2
  6. package/dist/components/FixtureGroup.js +4 -3
  7. package/dist/components/FixtureRow.d.ts +4 -2
  8. package/dist/components/FixtureRow.js +12 -22
  9. package/dist/components/Table.d.ts +2 -2
  10. package/dist/components/Table.js +1 -1
  11. package/dist/components/Text.d.ts +19 -0
  12. package/dist/components/Text.js +6 -2
  13. package/dist/components/field/FieldDescription.d.ts +15 -0
  14. package/dist/components/field/FieldDescription.js +20 -0
  15. package/dist/components/field/field-checks.d.ts +4 -4
  16. package/dist/components/field/field-checks.js +6 -4
  17. package/dist/components/field/field-props.d.ts +82 -0
  18. package/dist/components/field/field-props.js +1 -0
  19. package/dist/components/fixture/FixtureScoreBoxes.d.ts +19 -0
  20. package/dist/components/fixture/FixtureScoreBoxes.js +57 -0
  21. package/dist/components/fixture/row-parts.d.ts +17 -0
  22. package/dist/components/fixture/row-parts.js +19 -0
  23. package/dist/components/fixture/score-digits.d.ts +7 -0
  24. package/dist/components/fixture/score-digits.js +9 -0
  25. package/dist/components/fixture/types.d.ts +68 -4
  26. package/dist/components/fixture/validate-score.d.ts +10 -0
  27. package/dist/components/fixture/validate-score.js +39 -0
  28. package/dist/components/fixture/validate.d.ts +6 -6
  29. package/dist/components/fixture/validate.js +12 -8
  30. package/dist/components/table/TableRow.d.ts +18 -2
  31. package/dist/components/table/TableRow.js +4 -3
  32. package/dist/css/css-field-description.d.ts +2 -0
  33. package/dist/css/css-field-description.js +39 -0
  34. package/dist/css/css-field.js +4 -0
  35. package/dist/css/css-fixture-detail.d.ts +2 -0
  36. package/dist/css/css-fixture-detail.js +44 -0
  37. package/dist/css/css-fixture-list.d.ts +1 -0
  38. package/dist/css/css-fixture-list.js +50 -0
  39. package/dist/css/css-fixture-score.d.ts +2 -0
  40. package/dist/css/css-fixture-score.js +97 -0
  41. package/dist/css/css-fixture.js +11 -50
  42. package/dist/css/css-font-mono.js +2 -1
  43. package/dist/css/css-table-ledger.d.ts +4 -0
  44. package/dist/css/css-table-ledger.js +6 -0
  45. package/dist/css/css-table-row-rule.d.ts +2 -0
  46. package/dist/css/css-table-row-rule.js +22 -0
  47. package/dist/css/css-table.js +4 -0
  48. package/dist/index.d.ts +4 -4
  49. package/dist/index.js +3 -3
  50. package/dist/styles.css +112 -0
  51. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ import { typographyVariants } from '@scalewing/tokens';
2
+ const caption = typographyVariants.caption;
3
+ /*
4
+ * The run: one grid whose columns are the select, the home side, the
5
+ * centre, the away side, the end (details and status), the chevron and the
6
+ * action. Each item is a subgrid of it, and its row a subgrid of every
7
+ * column but the select's and the action's, so every row's centre, end and
8
+ * action line up down the run. The space between the columns is the
9
+ * centre's, the end's, the chevron's, the select's and the action's own
10
+ * margin, so a run with none of them keeps no gap.
11
+ */
12
+ export function cssFixtureListRules() {
13
+ return `.sw-fixture-group {
14
+ display: flex;
15
+ flex-direction: column;
16
+ }
17
+
18
+ .sw-fixture-group-title {
19
+ color: var(--sw-color-muted);
20
+ font-family: var(--sw-font-sans);
21
+ font-size: ${caption.fontSize}px;
22
+ font-weight: 600;
23
+ letter-spacing: ${caption.letterSpacing}px;
24
+ line-height: ${caption.lineHeight}px;
25
+ padding-block: var(--sw-space-2) var(--sw-space-1);
26
+ }
27
+
28
+ .sw-fixture-list {
29
+ display: grid;
30
+ grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto auto;
31
+ list-style: none;
32
+ margin: 0;
33
+ padding: 0;
34
+ }
35
+
36
+ .sw-fixture-item,
37
+ .sw-fixture-row {
38
+ display: grid;
39
+ grid-column: 1 / -1;
40
+ grid-template-columns: subgrid;
41
+ }
42
+
43
+ .sw-fixture-row {
44
+ grid-column: 2 / -2;
45
+ }
46
+
47
+ .sw-fixture-item {
48
+ border-top: 1px solid var(--sw-color-border);
49
+ }`;
50
+ }
@@ -0,0 +1,2 @@
1
+ export declare function cssFixtureScoreClasses(): string;
2
+ export declare function fixtureScoreClassCatalog(): string[];
@@ -0,0 +1,97 @@
1
+ import { typographyVariants } from '@scalewing/tokens';
2
+ import { breakpointQuery } from './breakpoints.js';
3
+ import { coarsePointerQuery, touchTarget } from './touch-target.js';
4
+ const body = typographyVariants.body;
5
+ const caption = typographyVariants.caption;
6
+ const belowMd = breakpointQuery('below', 'md');
7
+ /*
8
+ * A box is a text input, so the canvas already draws it as a control
9
+ * (`[data-theme] :is(input[type='text'], …)`: the surface, the hairline,
10
+ * the focus ring and the disabled look). `input.sw-fixture-score-box`
11
+ * matches that rule's specificity and comes later in the sheet, so the
12
+ * box's own size and figures win. It is a square the sm control height
13
+ * (32 px) on a fine pointer, so the row keeps its 44 px height, and the
14
+ * 44 px touch target on a coarse one; two tabular digits at weight 700
15
+ * fit it centred.
16
+ */
17
+ const box = '[data-theme] input.sw-fixture-score-box';
18
+ function boxRules() {
19
+ return `.sw-fixture-score {
20
+ align-items: center;
21
+ display: inline-flex;
22
+ gap: var(--sw-space-1);
23
+ }
24
+
25
+ ${box} {
26
+ block-size: var(--sw-control-sm-min-height);
27
+ font-size: ${body.fontSize}px;
28
+ font-variant-numeric: tabular-nums;
29
+ font-weight: 700;
30
+ inline-size: var(--sw-control-sm-min-height);
31
+ line-height: ${body.lineHeight}px;
32
+ min-height: 0;
33
+ padding: 0;
34
+ text-align: center;
35
+ }
36
+
37
+ @media ${coarsePointerQuery} {
38
+ ${box} {
39
+ block-size: ${touchTarget};
40
+ inline-size: ${touchTarget};
41
+ }
42
+ }
43
+
44
+ /* A phone's run is narrow: the boxes keep a space-2 margin, not the centre's space-3, so the names keep room. */
45
+ @media ${belowMd} {
46
+ .sw-fixture-score { margin-inline: var(--sw-space-2); }
47
+ }
48
+
49
+ [data-theme] input.sw-fixture-score-box[aria-invalid='true'] {
50
+ border-color: var(--sw-color-danger);
51
+ }
52
+
53
+ .sw-fixture-score-dash {
54
+ color: var(--sw-color-muted);
55
+ }`;
56
+ }
57
+ /*
58
+ * The score's message, under the row in the run's columns from the home
59
+ * side's start to the action's end, in caption type and the danger ink.
60
+ * Empty, it takes no room, but stays in place as the live region.
61
+ */
62
+ function errorRules() {
63
+ return `.sw-fixture-score-error {
64
+ color: var(--sw-color-danger);
65
+ display: block;
66
+ font-family: var(--sw-font-sans);
67
+ font-size: ${caption.fontSize}px;
68
+ grid-column: 2 / -1;
69
+ grid-row: 2;
70
+ letter-spacing: ${caption.letterSpacing}px;
71
+ line-height: ${caption.lineHeight}px;
72
+ padding-inline: var(--sw-space-2);
73
+ }
74
+
75
+ .sw-fixture-score-error:not(:empty) {
76
+ padding-block-end: var(--sw-space-2);
77
+ }
78
+
79
+ @media (forced-colors: active) {
80
+ [data-theme] input.sw-fixture-score-box[aria-invalid='true'] { border-color: Mark; }
81
+ .sw-fixture-score-dash { color: CanvasText; }
82
+ }`;
83
+ }
84
+ /* FixtureRow's score (see components/fixture/FixtureScoreBoxes.tsx); after the row rules. */
85
+ export function cssFixtureScoreClasses() {
86
+ return `${boxRules()}
87
+
88
+ ${errorRules()}`;
89
+ }
90
+ export function fixtureScoreClassCatalog() {
91
+ return [
92
+ 'sw-fixture-score',
93
+ 'sw-fixture-score-box',
94
+ 'sw-fixture-score-dash',
95
+ 'sw-fixture-score-error',
96
+ ];
97
+ }
@@ -3,7 +3,10 @@ import { breakpointQuery } from './breakpoints.js';
3
3
  import { chevronStrokeIn } from './chevron.js';
4
4
  import { quietFill } from './quiet-fill.js';
5
5
  import { cssFixtureActionClasses, fixtureActionClassCatalog, } from './css-fixture-action.js';
6
+ import { cssFixtureListRules } from './css-fixture-list.js';
7
+ import { cssFixtureDetailClasses, fixtureDetailClassCatalog, } from './css-fixture-detail.js';
6
8
  import { cssFixtureFlagClasses, fixtureFlagClassCatalog, } from './css-fixture-flag.js';
9
+ import { cssFixtureScoreClasses, fixtureScoreClassCatalog, } from './css-fixture-score.js';
7
10
  import { cssFixtureSelectClasses, fixtureSelectClassCatalog, } from './css-fixture-select.js';
8
11
  import { touchTarget } from './touch-target.js';
9
12
  const caption = typographyVariants.caption;
@@ -11,54 +14,6 @@ const label = typographyVariants.label;
11
14
  export const fixtureCenterKinds = ['time', 'score'];
12
15
  export { fixtureFlagTones } from './css-fixture-flag.js';
13
16
  const belowMd = breakpointQuery('below', 'md');
14
- /*
15
- * The run: one grid whose columns are the select, the home side, the
16
- * centre, the away side, the end (details and status), the chevron and the
17
- * action. Each item is a subgrid of it, and its row a subgrid of every
18
- * column but the select's and the action's, so every row's centre, end and
19
- * action line up down the run. The space between the columns is the
20
- * centre's, the end's, the chevron's, the select's and the action's own
21
- * margin, so a run with none of them keeps no gap.
22
- */
23
- function listRules() {
24
- return `.sw-fixture-group {
25
- display: flex;
26
- flex-direction: column;
27
- }
28
-
29
- .sw-fixture-group-title {
30
- color: var(--sw-color-muted);
31
- font-family: var(--sw-font-sans);
32
- font-size: ${caption.fontSize}px;
33
- font-weight: 600;
34
- letter-spacing: ${caption.letterSpacing}px;
35
- line-height: ${caption.lineHeight}px;
36
- padding-block: var(--sw-space-2) var(--sw-space-1);
37
- }
38
-
39
- .sw-fixture-list {
40
- display: grid;
41
- grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto auto;
42
- list-style: none;
43
- margin: 0;
44
- padding: 0;
45
- }
46
-
47
- .sw-fixture-item,
48
- .sw-fixture-row {
49
- display: grid;
50
- grid-column: 1 / -1;
51
- grid-template-columns: subgrid;
52
- }
53
-
54
- .sw-fixture-row {
55
- grid-column: 2 / -2;
56
- }
57
-
58
- .sw-fixture-item {
59
- border-top: 1px solid var(--sw-color-border);
60
- }`;
61
- }
62
17
  /*
63
18
  * A row: the md control height (44 px), its parts centred on one line a
64
19
  * space-3 apart; a link or button row is the whole target, the text
@@ -243,7 +198,7 @@ function fallbackRules() {
243
198
  }
244
199
  /* FixtureGroup and FixtureRow (see components/FixtureRow.tsx). */
245
200
  export function cssFixtureClasses() {
246
- return `${listRules()}
201
+ return `${cssFixtureListRules()}
247
202
 
248
203
  ${rowRules()}
249
204
 
@@ -255,7 +210,11 @@ ${cssFixtureFlagClasses()}
255
210
 
256
211
  ${cssFixtureSelectClasses()}
257
212
 
258
- ${cssFixtureActionClasses()}`;
213
+ ${cssFixtureActionClasses()}
214
+
215
+ ${cssFixtureScoreClasses()}
216
+
217
+ ${cssFixtureDetailClasses()}`;
259
218
  }
260
219
  export function fixtureClassCatalog() {
261
220
  return [
@@ -277,5 +236,7 @@ export function fixtureClassCatalog() {
277
236
  ...fixtureFlagClassCatalog(),
278
237
  ...fixtureSelectClassCatalog(),
279
238
  ...fixtureActionClassCatalog(),
239
+ ...fixtureScoreClassCatalog(),
240
+ ...fixtureDetailClassCatalog(),
280
241
  ];
281
242
  }
@@ -8,7 +8,8 @@ import { typedInputs } from './css-document.js';
8
8
  export const monospaceFamilies = 'ui-monospace, monospace';
9
9
  /*
10
10
  * Monospace text, for words read as typed code or marks (a Markdown source
11
- * being written), at the size the text already has. It outranks the
11
+ * being written, or a code set with `Text font="mono"`), at the size the
12
+ * text already has; it outranks a Text variant's sans family. It outranks the
12
13
  * canvas's text controls, which take the page's family, so a `textarea` or
13
14
  * a text input can take it too.
14
15
  */
@@ -7,7 +7,11 @@ export type TableCellTone = (typeof tableCellTones)[number];
7
7
  */
8
8
  export declare const tableRowVariants: readonly ["default", "sub", "total"];
9
9
  export type TableRowVariant = (typeof tableRowVariants)[number];
10
+ /** A rule a row draws: `after`, a line under it, such as a cut. */
11
+ export declare const tableRowRules: readonly ["after"];
12
+ export type TableRowRule = (typeof tableRowRules)[number];
10
13
  export declare function assertTableCellTone(tone: unknown): void;
11
14
  export declare function assertTableRowVariant(variant: unknown): void;
15
+ export declare function assertTableRowRule(rule: unknown): void;
12
16
  export declare function cssTableLedgerClasses(): string;
13
17
  export declare function tableLedgerClassCatalog(): string[];
@@ -5,6 +5,8 @@ export const tableCellTones = ['success', 'danger', 'muted', 'accent'];
5
5
  * or a total of the rows above it, mid-table.
6
6
  */
7
7
  export const tableRowVariants = ['default', 'sub', 'total'];
8
+ /** A rule a row draws: `after`, a line under it, such as a cut. */
9
+ export const tableRowRules = ['after'];
8
10
  export function assertTableCellTone(tone) {
9
11
  if (tone !== undefined && !tableCellTones.includes(tone))
10
12
  throw new RangeError(`Unknown TableCell tone: ${String(tone)}`);
@@ -13,6 +15,10 @@ export function assertTableRowVariant(variant) {
13
15
  if (!tableRowVariants.includes(variant))
14
16
  throw new RangeError(`Unknown TableRow variant: ${String(variant)}`);
15
17
  }
18
+ export function assertTableRowRule(rule) {
19
+ if (rule !== undefined && !tableRowRules.includes(rule))
20
+ throw new RangeError(`Unknown TableRow rule: ${String(rule)}`);
21
+ }
16
22
  function toneRules() {
17
23
  return tableCellTones
18
24
  .map((tone) => `.sw-table .sw-table-tone-${tone} {
@@ -0,0 +1,2 @@
1
+ export declare function cssTableRowRuleClasses(): string;
2
+ export declare function tableRowRuleClassCatalog(): string[];
@@ -0,0 +1,22 @@
1
+ /*
2
+ * A rule under a row (`TableRow rule="after"`), such as the cut under the
3
+ * last playoff place: its cells' bottom border 2 px in the muted grey, a
4
+ * line that reads stronger than the 1 px hairlines between rows (3:1 on
5
+ * the surface, as a line that carries meaning needs) without taking a
6
+ * colour's meaning. The collapsed-border model resolves it over the next
7
+ * row's top, and a border, so forced colours keep it (in `CanvasText`) and
8
+ * right-to-left needs nothing. The row's words and fill are unchanged; say
9
+ * what the line means in words beside the table.
10
+ */
11
+ export function cssTableRowRuleClasses() {
12
+ return `.sw-table .sw-table-row-rule-after > :is(th, td) {
13
+ border-bottom: 2px solid var(--sw-color-muted);
14
+ }
15
+
16
+ @media (forced-colors: active) {
17
+ .sw-table .sw-table-row-rule-after > :is(th, td) { border-bottom-color: CanvasText; }
18
+ }`;
19
+ }
20
+ export function tableRowRuleClassCatalog() {
21
+ return ['sw-table-row-rule-after'];
22
+ }
@@ -6,6 +6,7 @@ import { cssTableLayoutClasses, tableLayoutClassCatalog, } from './css-table-lay
6
6
  import { cssTableLedgerClasses, tableLedgerClassCatalog, } from './css-table-ledger.js';
7
7
  import { cssTableFooterClasses, tableFooterClassCatalog, } from './css-table-footer.js';
8
8
  import { cssTablePagePinClasses, tablePagePinClassCatalog, } from './css-table-page-pin.js';
9
+ import { cssTableRowRuleClasses, tableRowRuleClassCatalog, } from './css-table-row-rule.js';
9
10
  import { cssTableTotalRowClasses, tableTotalRowClassCatalog, } from './css-table-total-row.js';
10
11
  import { cssTableSelectClasses, tableSelectClassCatalog, } from './css-table-select.js';
11
12
  import { cssTablePressClasses, tablePressClassCatalog, } from './css-table-press.js';
@@ -96,6 +97,8 @@ ${cssTableLedgerClasses()}
96
97
 
97
98
  ${cssTableTotalRowClasses()}
98
99
 
100
+ ${cssTableRowRuleClasses()}
101
+
99
102
  ${cssTableFooterClasses()}
100
103
 
101
104
  ${cssTablePagePinClasses()}
@@ -122,6 +125,7 @@ export function tableClassCatalog() {
122
125
  ...tableSortClassCatalog(),
123
126
  ...tableLedgerClassCatalog(),
124
127
  ...tableTotalRowClassCatalog(),
128
+ ...tableRowRuleClassCatalog(),
125
129
  ...tableFooterClassCatalog(),
126
130
  ...tablePagePinClassCatalog(),
127
131
  ...tableBoundedClassCatalog(),
package/dist/index.d.ts CHANGED
@@ -47,7 +47,7 @@ export { StatTile, type StatTileAppearance, statTileAppearances, type StatTileEm
47
47
  export { TabPanel, type TabItem, type TabPanelProps, Tabs, type TabsProps, tabId, tabPanelId, } from './components/Tabs.js';
48
48
  export { Toast, toastPlacements, toastTones, type ToastAction, type ToastPlacement, } from './components/Toast.js';
49
49
  export type { ToastProps, ToastTone } from './components/Toast.js';
50
- export { Field, fieldVariants, type FieldProps, type FieldSize, type FieldVariant, } from './components/Field.js';
50
+ export { Field, fieldDescriptionTones, fieldVariants, type FieldDescriptionTone, type FieldProps, type FieldSize, type FieldVariant, } from './components/Field.js';
51
51
  export { fieldWidths, type FieldWidth } from './css/css-field-width.js';
52
52
  export { requiredMarks, type RequiredMark, } from './components/FieldLabelText.js';
53
53
  export { Step, type StepHeadingLevel, type StepProps, Steps, type StepsLabels, type StepsProps, type StepStatus, } from './components/Steps.js';
@@ -59,7 +59,7 @@ export type { SplitProps } from './components/Split.js';
59
59
  export { Nav, navAppearances, type NavAppearance, type NavProps, } from './components/Nav.js';
60
60
  export { NavCount, navCountTones, type NavCountProps, type NavCountTone, } from './components/NavCount.js';
61
61
  export { FixtureGroup, type FixtureGroupProps, } from './components/FixtureGroup.js';
62
- export { FixtureRow, type FixtureRowProps, type FixtureFlag, type FixtureSelect, type FixtureSide, type FixtureStatus, } from './components/FixtureRow.js';
62
+ export { FixtureRow, type FixtureRowProps, type FixtureFlag, type FixtureScore, type FixtureScoreBox, type FixtureScoreSide, type FixtureSelect, type FixtureSide, type FixtureStatus, } from './components/FixtureRow.js';
63
63
  export { defaultScheduleGridLabels, ScheduleGrid, type ScheduleGridAxisEntry, type ScheduleGridCarryMode, type ScheduleGridDisabledCell, type ScheduleGridDropCheck, type ScheduleGridItem, type ScheduleGridLabels, type ScheduleGridProps, type ScheduleGridSlot, type ScheduleGridTarget, } from './components/ScheduleGrid.js';
64
64
  export { DateToggleCalendar, type DateToggleCalendarProps, } from './components/DateToggleCalendar.js';
65
65
  export { CommandPalette, commandPaletteShortcuts, type CommandPaletteGroup, type CommandPaletteItem, type CommandPaletteProps, type CommandPaletteShortcut, } from './components/CommandPalette.js';
@@ -73,8 +73,8 @@ export { Select } from './components/Select.js';
73
73
  export type { SelectAction, SelectOption, SelectProps, SelectWidth, } from './components/Select.js';
74
74
  export { MultiSelect, type MultiSelectAlign, type MultiSelectOption, type MultiSelectProps, } from './components/MultiSelect.js';
75
75
  export { Stack, type Align, type Justify, type StackProps, } from './components/Stack.js';
76
- export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, TableSelectCell, tableCellTones, tableRowVariants, type TableBodyProps, type TableCellProps, type TableCellTone, type TableColumnWidth, type TableDensity, type TableFooterProps, type TableHeaderProps, type TableLayout, type TableMaxHeight, type TableProps, type TableRowProps, type TableRowVariant, type TableSelectCellProps, type TableSort, type TableStickyHeader, type TableVerticalAlign, } from './components/Table.js';
77
- export { Text, type TextAlign, type TextElement, type TextProps, } from './components/Text.js';
76
+ export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, TableSelectCell, tableCellTones, tableRowRules, tableRowVariants, type TableBodyProps, type TableCellProps, type TableCellTone, type TableColumnWidth, type TableDensity, type TableFooterProps, type TableHeaderProps, type TableLayout, type TableMaxHeight, type TableProps, type TableRowProps, type TableRowRule, type TableRowVariant, type TableSelectCellProps, type TableSort, type TableStickyHeader, type TableVerticalAlign, } from './components/Table.js';
77
+ export { Text, textFonts, type TextAlign, type TextElement, type TextFont, type TextProps, } from './components/Text.js';
78
78
  export { ThemeProvider, useTheme, type ThemeProviderProps, } from './theme/ThemeProvider.js';
79
79
  export { themeCanvases, type ThemeCanvas } from './css/css-canvas-grouped.js';
80
80
  export { themeFrames, type ThemeFrame } from './css/css-theme-frame.js';
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ export { Dialog, dialogAppearances, dialogPlacements, dialogSizes, } from './com
45
45
  export { StatTile, statTileAppearances, statTileTones, } from './components/StatTile.js';
46
46
  export { TabPanel, Tabs, tabId, tabPanelId, } from './components/Tabs.js';
47
47
  export { Toast, toastPlacements, toastTones, } from './components/Toast.js';
48
- export { Field, fieldVariants, } from './components/Field.js';
48
+ export { Field, fieldDescriptionTones, fieldVariants, } from './components/Field.js';
49
49
  export { fieldWidths } from './css/css-field-width.js';
50
50
  export { requiredMarks, } from './components/FieldLabelText.js';
51
51
  export { Step, Steps, } from './components/Steps.js';
@@ -69,8 +69,8 @@ export { Combobox, comboboxSizes, } from './components/Combobox.js';
69
69
  export { Select } from './components/Select.js';
70
70
  export { MultiSelect, } from './components/MultiSelect.js';
71
71
  export { Stack, } from './components/Stack.js';
72
- export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, TableSelectCell, tableCellTones, tableRowVariants, } from './components/Table.js';
73
- export { Text, } from './components/Text.js';
72
+ export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, TableSelectCell, tableCellTones, tableRowRules, tableRowVariants, } from './components/Table.js';
73
+ export { Text, textFonts, } from './components/Text.js';
74
74
  export { ThemeProvider, useTheme, } from './theme/ThemeProvider.js';
75
75
  export { themeCanvases } from './css/css-canvas-grouped.js';
76
76
  export { themeFrames } from './css/css-theme-frame.js';
package/dist/styles.css CHANGED
@@ -2021,6 +2021,14 @@ body {
2021
2021
  .sw-table .sw-table-row-total > :is(th, td) { border-top-color: CanvasText; }
2022
2022
  }
2023
2023
 
2024
+ .sw-table .sw-table-row-rule-after > :is(th, td) {
2025
+ border-bottom: 2px solid var(--sw-color-muted);
2026
+ }
2027
+
2028
+ @media (forced-colors: active) {
2029
+ .sw-table .sw-table-row-rule-after > :is(th, td) { border-bottom-color: CanvasText; }
2030
+ }
2031
+
2024
2032
  .sw-table tfoot :is(th, td) {
2025
2033
  font-weight: 600;
2026
2034
  position: relative;
@@ -3605,6 +3613,87 @@ button.sw-date-toggle-day[aria-disabled='true'] {
3605
3613
  }
3606
3614
  }
3607
3615
 
3616
+ .sw-fixture-score {
3617
+ align-items: center;
3618
+ display: inline-flex;
3619
+ gap: var(--sw-space-1);
3620
+ }
3621
+
3622
+ [data-theme] input.sw-fixture-score-box {
3623
+ block-size: var(--sw-control-sm-min-height);
3624
+ font-size: 17px;
3625
+ font-variant-numeric: tabular-nums;
3626
+ font-weight: 700;
3627
+ inline-size: var(--sw-control-sm-min-height);
3628
+ line-height: 25px;
3629
+ min-height: 0;
3630
+ padding: 0;
3631
+ text-align: center;
3632
+ }
3633
+
3634
+ @media (pointer: coarse) {
3635
+ [data-theme] input.sw-fixture-score-box {
3636
+ block-size: var(--sw-control-md-min-height);
3637
+ inline-size: var(--sw-control-md-min-height);
3638
+ }
3639
+ }
3640
+
3641
+ /* A phone's run is narrow: the boxes keep a space-2 margin, not the centre's space-3, so the names keep room. */
3642
+ @media not all and (min-width: 48rem) {
3643
+ .sw-fixture-score { margin-inline: var(--sw-space-2); }
3644
+ }
3645
+
3646
+ [data-theme] input.sw-fixture-score-box[aria-invalid='true'] {
3647
+ border-color: var(--sw-color-danger);
3648
+ }
3649
+
3650
+ .sw-fixture-score-dash {
3651
+ color: var(--sw-color-muted);
3652
+ }
3653
+
3654
+ .sw-fixture-score-error {
3655
+ color: var(--sw-color-danger);
3656
+ display: block;
3657
+ font-family: var(--sw-font-sans);
3658
+ font-size: 13px;
3659
+ grid-column: 2 / -1;
3660
+ grid-row: 2;
3661
+ letter-spacing: -0.08px;
3662
+ line-height: 18px;
3663
+ padding-inline: var(--sw-space-2);
3664
+ }
3665
+
3666
+ .sw-fixture-score-error:not(:empty) {
3667
+ padding-block-end: var(--sw-space-2);
3668
+ }
3669
+
3670
+ @media (forced-colors: active) {
3671
+ [data-theme] input.sw-fixture-score-box[aria-invalid='true'] { border-color: Mark; }
3672
+ .sw-fixture-score-dash { color: CanvasText; }
3673
+ }
3674
+
3675
+ .sw-fixture-item-below > .sw-fixture-row {
3676
+ grid-row: 1;
3677
+ }
3678
+
3679
+ .sw-fixture-detail {
3680
+ grid-column: 2 / -1;
3681
+ grid-row: 3;
3682
+ min-width: 0;
3683
+ padding: 0 var(--sw-space-2) var(--sw-space-2);
3684
+ }
3685
+
3686
+ @supports not (grid-template-columns: subgrid) {
3687
+ .sw-fixture-item-below {
3688
+ flex-wrap: wrap;
3689
+ }
3690
+
3691
+ .sw-fixture-item-below > :is(.sw-fixture-score-error, .sw-fixture-detail) {
3692
+ flex: 1 0 100%;
3693
+ order: 1;
3694
+ }
3695
+ }
3696
+
3608
3697
  .sw-schedule-grid {
3609
3698
  max-width: 100%;
3610
3699
  overflow-x: auto;
@@ -9474,6 +9563,29 @@ html:has(.sw-site-header-sticky) {
9474
9563
  .sw-field-description { color: var(--sw-color-muted); }
9475
9564
  .sw-field-error { color: var(--sw-color-danger); }
9476
9565
 
9566
+ .sw-field-description-warning {
9567
+ align-items: flex-start;
9568
+ color: var(--sw-color-warning);
9569
+ display: flex;
9570
+ gap: var(--sw-space-1);
9571
+ }
9572
+
9573
+ .sw-field-description-glyph {
9574
+ fill: none;
9575
+ flex: none;
9576
+ height: var(--sw-space-4);
9577
+ margin-block: 1px;
9578
+ stroke: currentColor;
9579
+ stroke-linecap: round;
9580
+ stroke-linejoin: round;
9581
+ stroke-width: 2;
9582
+ width: var(--sw-space-4);
9583
+ }
9584
+
9585
+ @media (forced-colors: active) {
9586
+ .sw-field-description-warning { color: CanvasText; }
9587
+ }
9588
+
9477
9589
  /* An error region is always rendered as a live region; empty, it leaves the layout (and its gap) but stays in the accessibility tree. */
9478
9590
  .sw-field-error:empty { position: absolute; }
9479
9591
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalewing/react",
3
- "version": "1.56.0",
3
+ "version": "1.58.0",
4
4
  "description": "Scalewing DOM components and package-owned CSS utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",