@scalewing/react 1.55.0 → 1.57.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.
- package/CHANGELOG.md +12 -0
- package/README.md +71 -4
- package/dist/components/DateToggleCalendar.d.ts +3 -1
- package/dist/components/DateToggleCalendar.js +4 -2
- package/dist/components/FixtureRow.d.ts +6 -4
- package/dist/components/FixtureRow.js +18 -20
- package/dist/components/ScheduleGrid.d.ts +3 -2
- package/dist/components/ScheduleGrid.js +21 -2
- package/dist/components/Table.d.ts +2 -2
- package/dist/components/Table.js +1 -1
- package/dist/components/date-toggle/types.d.ts +9 -2
- package/dist/components/fixture/FixtureScoreBoxes.d.ts +19 -0
- package/dist/components/fixture/FixtureScoreBoxes.js +57 -0
- package/dist/components/fixture/row-parts.d.ts +17 -0
- package/dist/components/fixture/row-parts.js +19 -0
- package/dist/components/fixture/score-digits.d.ts +7 -0
- package/dist/components/fixture/score-digits.js +9 -0
- package/dist/components/fixture/types.d.ts +80 -4
- package/dist/components/fixture/validate-score.d.ts +10 -0
- package/dist/components/fixture/validate-score.js +39 -0
- package/dist/components/fixture/validate.d.ts +6 -5
- package/dist/components/fixture/validate.js +17 -7
- package/dist/components/schedule-grid/labels.js +6 -1
- package/dist/components/schedule-grid/types.d.ts +10 -2
- package/dist/components/schedule-grid/use-schedule-carry.d.ts +5 -3
- package/dist/components/schedule-grid/use-schedule-carry.js +38 -16
- package/dist/components/table/TableRow.d.ts +18 -2
- package/dist/components/table/TableRow.js +4 -3
- package/dist/css/css-fixture-action.js +3 -3
- package/dist/css/css-fixture-detail.d.ts +2 -0
- package/dist/css/css-fixture-detail.js +44 -0
- package/dist/css/css-fixture-flag.js +12 -1
- package/dist/css/css-fixture-list.d.ts +1 -0
- package/dist/css/css-fixture-list.js +50 -0
- package/dist/css/css-fixture-score.d.ts +2 -0
- package/dist/css/css-fixture-score.js +97 -0
- package/dist/css/css-fixture-select.d.ts +2 -0
- package/dist/css/css-fixture-select.js +47 -0
- package/dist/css/css-fixture.js +16 -50
- package/dist/css/css-table-ledger.d.ts +4 -0
- package/dist/css/css-table-ledger.js +6 -0
- package/dist/css/css-table-row-rule.d.ts +2 -0
- package/dist/css/css-table-row-rule.js +22 -0
- package/dist/css/css-table.js +4 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/styles.css +125 -5
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { coarsePointerQuery } from './touch-target.js';
|
|
2
|
+
/*
|
|
3
|
+
* The select sits before the row in the run's first column, centred on
|
|
4
|
+
* the row's height, outside the row's press area, with the row's start
|
|
5
|
+
* padding before it (none on a coarse pointer, where the 44 px target
|
|
6
|
+
* already pads the box). The box is Checkbox's, its label visually hidden, so
|
|
7
|
+
* it is its own size on a fine pointer and 44 × 44 px on a coarse one
|
|
8
|
+
* (`.sw-checkbox-label-hidden`). The run's first column is `auto`, so a
|
|
9
|
+
* run without a select keeps no space for it.
|
|
10
|
+
*/
|
|
11
|
+
function selectRules() {
|
|
12
|
+
return `.sw-fixture-select {
|
|
13
|
+
align-items: center;
|
|
14
|
+
align-self: center;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
grid-column: 1;
|
|
17
|
+
grid-row: 1;
|
|
18
|
+
padding-inline-start: var(--sw-space-2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media ${coarsePointerQuery} {
|
|
22
|
+
.sw-fixture-select { padding-inline-start: 0; }
|
|
23
|
+
}`;
|
|
24
|
+
}
|
|
25
|
+
/* Without subgrid each item is a flex row: the select, the row, the action. */
|
|
26
|
+
function selectFallbackRules() {
|
|
27
|
+
return `@supports not (grid-template-columns: subgrid) {
|
|
28
|
+
.sw-fixture-item-select {
|
|
29
|
+
align-items: center;
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sw-fixture-item-select > .sw-fixture-row {
|
|
34
|
+
flex: 1 1 auto;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
}
|
|
37
|
+
}`;
|
|
38
|
+
}
|
|
39
|
+
/* FixtureRow's select (see components/FixtureRow.tsx); after the row rules. */
|
|
40
|
+
export function cssFixtureSelectClasses() {
|
|
41
|
+
return `${selectRules()}
|
|
42
|
+
|
|
43
|
+
${selectFallbackRules()}`;
|
|
44
|
+
}
|
|
45
|
+
export function fixtureSelectClassCatalog() {
|
|
46
|
+
return ['sw-fixture-item-select', 'sw-fixture-select'];
|
|
47
|
+
}
|
package/dist/css/css-fixture.js
CHANGED
|
@@ -3,60 +3,17 @@ 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';
|
|
10
|
+
import { cssFixtureSelectClasses, fixtureSelectClassCatalog, } from './css-fixture-select.js';
|
|
7
11
|
import { touchTarget } from './touch-target.js';
|
|
8
12
|
const caption = typographyVariants.caption;
|
|
9
13
|
const label = typographyVariants.label;
|
|
10
14
|
export const fixtureCenterKinds = ['time', 'score'];
|
|
11
15
|
export { fixtureFlagTones } from './css-fixture-flag.js';
|
|
12
16
|
const belowMd = breakpointQuery('below', 'md');
|
|
13
|
-
/*
|
|
14
|
-
* The run: one grid whose columns are the home side, the centre, the away
|
|
15
|
-
* side, the end (details and status), the chevron and the action. Each
|
|
16
|
-
* item is a subgrid of it, and its row a subgrid of every column but the
|
|
17
|
-
* action's, so every row's centre, end and action line up down the run.
|
|
18
|
-
* The space between the columns is the centre's, the end's, the chevron's
|
|
19
|
-
* and the action's own margin, so a run with none of them keeps no gap.
|
|
20
|
-
*/
|
|
21
|
-
function listRules() {
|
|
22
|
-
return `.sw-fixture-group {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.sw-fixture-group-title {
|
|
28
|
-
color: var(--sw-color-muted);
|
|
29
|
-
font-family: var(--sw-font-sans);
|
|
30
|
-
font-size: ${caption.fontSize}px;
|
|
31
|
-
font-weight: 600;
|
|
32
|
-
letter-spacing: ${caption.letterSpacing}px;
|
|
33
|
-
line-height: ${caption.lineHeight}px;
|
|
34
|
-
padding-block: var(--sw-space-2) var(--sw-space-1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.sw-fixture-list {
|
|
38
|
-
display: grid;
|
|
39
|
-
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto auto;
|
|
40
|
-
list-style: none;
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.sw-fixture-item,
|
|
46
|
-
.sw-fixture-row {
|
|
47
|
-
display: grid;
|
|
48
|
-
grid-column: 1 / -1;
|
|
49
|
-
grid-template-columns: subgrid;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.sw-fixture-row {
|
|
53
|
-
grid-column: 1 / -2;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.sw-fixture-item {
|
|
57
|
-
border-top: 1px solid var(--sw-color-border);
|
|
58
|
-
}`;
|
|
59
|
-
}
|
|
60
17
|
/*
|
|
61
18
|
* A row: the md control height (44 px), its parts centred on one line a
|
|
62
19
|
* space-3 apart; a link or button row is the whole target, the text
|
|
@@ -200,7 +157,7 @@ function rowRules() {
|
|
|
200
157
|
function narrowRules() {
|
|
201
158
|
return `@media ${belowMd} {
|
|
202
159
|
.sw-fixture-list {
|
|
203
|
-
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
|
|
160
|
+
grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
|
|
204
161
|
}
|
|
205
162
|
|
|
206
163
|
.sw-fixture-end {
|
|
@@ -241,7 +198,7 @@ function fallbackRules() {
|
|
|
241
198
|
}
|
|
242
199
|
/* FixtureGroup and FixtureRow (see components/FixtureRow.tsx). */
|
|
243
200
|
export function cssFixtureClasses() {
|
|
244
|
-
return `${
|
|
201
|
+
return `${cssFixtureListRules()}
|
|
245
202
|
|
|
246
203
|
${rowRules()}
|
|
247
204
|
|
|
@@ -251,7 +208,13 @@ ${fallbackRules()}
|
|
|
251
208
|
|
|
252
209
|
${cssFixtureFlagClasses()}
|
|
253
210
|
|
|
254
|
-
${
|
|
211
|
+
${cssFixtureSelectClasses()}
|
|
212
|
+
|
|
213
|
+
${cssFixtureActionClasses()}
|
|
214
|
+
|
|
215
|
+
${cssFixtureScoreClasses()}
|
|
216
|
+
|
|
217
|
+
${cssFixtureDetailClasses()}`;
|
|
255
218
|
}
|
|
256
219
|
export function fixtureClassCatalog() {
|
|
257
220
|
return [
|
|
@@ -271,6 +234,9 @@ export function fixtureClassCatalog() {
|
|
|
271
234
|
'sw-fixture-end',
|
|
272
235
|
'sw-fixture-chevron',
|
|
273
236
|
...fixtureFlagClassCatalog(),
|
|
237
|
+
...fixtureSelectClassCatalog(),
|
|
274
238
|
...fixtureActionClassCatalog(),
|
|
239
|
+
...fixtureScoreClassCatalog(),
|
|
240
|
+
...fixtureDetailClassCatalog(),
|
|
275
241
|
];
|
|
276
242
|
}
|
|
@@ -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,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
|
+
}
|
package/dist/css/css-table.js
CHANGED
|
@@ -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
|
@@ -59,8 +59,8 @@ 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 FixtureSide, type FixtureStatus, } from './components/FixtureRow.js';
|
|
63
|
-
export { defaultScheduleGridLabels, ScheduleGrid, type ScheduleGridAxisEntry, type ScheduleGridDisabledCell, type ScheduleGridDropCheck, type ScheduleGridItem, type ScheduleGridLabels, type ScheduleGridProps, type ScheduleGridSlot, type ScheduleGridTarget, } from './components/ScheduleGrid.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
|
+
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';
|
|
66
66
|
export { CommandPaletteTrigger, type CommandPaletteTriggerProps, } from './components/CommandPaletteTrigger.js';
|
|
@@ -73,7 +73,7 @@ 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';
|
|
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
77
|
export { Text, type TextAlign, type TextElement, 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';
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ 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';
|
|
72
|
+
export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, TableSelectCell, tableCellTones, tableRowRules, tableRowVariants, } from './components/Table.js';
|
|
73
73
|
export { Text, } from './components/Text.js';
|
|
74
74
|
export { ThemeProvider, useTheme, } from './theme/ThemeProvider.js';
|
|
75
75
|
export { themeCanvases } from './css/css-canvas-grouped.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;
|
|
@@ -3302,7 +3310,7 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3302
3310
|
|
|
3303
3311
|
.sw-fixture-list {
|
|
3304
3312
|
display: grid;
|
|
3305
|
-
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto auto;
|
|
3313
|
+
grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto auto;
|
|
3306
3314
|
list-style: none;
|
|
3307
3315
|
margin: 0;
|
|
3308
3316
|
padding: 0;
|
|
@@ -3316,7 +3324,7 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3316
3324
|
}
|
|
3317
3325
|
|
|
3318
3326
|
.sw-fixture-row {
|
|
3319
|
-
grid-column:
|
|
3327
|
+
grid-column: 2 / -2;
|
|
3320
3328
|
}
|
|
3321
3329
|
|
|
3322
3330
|
.sw-fixture-item {
|
|
@@ -3456,7 +3464,7 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3456
3464
|
|
|
3457
3465
|
@media not all and (min-width: 48rem) {
|
|
3458
3466
|
.sw-fixture-list {
|
|
3459
|
-
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
|
|
3467
|
+
grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
|
|
3460
3468
|
}
|
|
3461
3469
|
|
|
3462
3470
|
.sw-fixture-end {
|
|
@@ -3539,6 +3547,37 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3539
3547
|
.sw-fixture-row-flagged .sw-fixture-end {
|
|
3540
3548
|
padding-inline-start: calc(var(--sw-space-4) + var(--sw-space-2));
|
|
3541
3549
|
}
|
|
3550
|
+
|
|
3551
|
+
.sw-fixture-row-flag-inline .sw-fixture-flag { grid-row: 1; }
|
|
3552
|
+
|
|
3553
|
+
.sw-fixture-row-flag-inline .sw-fixture-team-home {
|
|
3554
|
+
padding-inline-start: calc(var(--sw-space-4) + var(--sw-space-2));
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
.sw-fixture-select {
|
|
3559
|
+
align-items: center;
|
|
3560
|
+
align-self: center;
|
|
3561
|
+
display: inline-flex;
|
|
3562
|
+
grid-column: 1;
|
|
3563
|
+
grid-row: 1;
|
|
3564
|
+
padding-inline-start: var(--sw-space-2);
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
@media (pointer: coarse) {
|
|
3568
|
+
.sw-fixture-select { padding-inline-start: 0; }
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3571
|
+
@supports not (grid-template-columns: subgrid) {
|
|
3572
|
+
.sw-fixture-item-select {
|
|
3573
|
+
align-items: center;
|
|
3574
|
+
display: flex;
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
.sw-fixture-item-select > .sw-fixture-row {
|
|
3578
|
+
flex: 1 1 auto;
|
|
3579
|
+
min-width: 0;
|
|
3580
|
+
}
|
|
3542
3581
|
}
|
|
3543
3582
|
|
|
3544
3583
|
.sw-fixture-action {
|
|
@@ -3552,11 +3591,11 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3552
3591
|
|
|
3553
3592
|
@supports selector(:has(*)) {
|
|
3554
3593
|
@media (hover: hover) {
|
|
3555
|
-
.sw-fixture-item-action:has(> .sw-fixture-row-pressable:hover) {
|
|
3594
|
+
:is(.sw-fixture-item-action, .sw-fixture-item-select):has(> .sw-fixture-row-pressable:hover) {
|
|
3556
3595
|
background: color-mix(in srgb, var(--sw-color-muted) 16%, transparent);
|
|
3557
3596
|
}
|
|
3558
3597
|
|
|
3559
|
-
.sw-fixture-item-action > .sw-fixture-row-pressable:hover {
|
|
3598
|
+
:is(.sw-fixture-item-action, .sw-fixture-item-select) > .sw-fixture-row-pressable:hover {
|
|
3560
3599
|
background: transparent;
|
|
3561
3600
|
}
|
|
3562
3601
|
}
|
|
@@ -3574,6 +3613,87 @@ button.sw-date-toggle-day[aria-disabled='true'] {
|
|
|
3574
3613
|
}
|
|
3575
3614
|
}
|
|
3576
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
|
+
|
|
3577
3697
|
.sw-schedule-grid {
|
|
3578
3698
|
max-width: 100%;
|
|
3579
3699
|
overflow-x: auto;
|