@blueshed/joined 0.2.2 → 0.3.1
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/.claude/skills/joined/SKILL.md +9 -1
- package/.claude/skills/joined/reference.md +316 -63
- package/.claude/skills/joined-door/SKILL.md +57 -0
- package/README.md +19 -50
- package/docs/design.md +158 -37
- package/docs/introduction.md +27 -27
- package/docs/light-and-shadow.svg +2 -1
- package/docs/links-and-trust.svg +1 -0
- package/docs/stories-to-code.svg +2 -1
- package/docs/wire-op.svg +1 -0
- package/examples/README.md +20 -0
- package/examples/account/account.json +1 -0
- package/examples/account/derive.ts +41 -0
- package/examples/account/generated/elements.ts +52 -0
- package/examples/account/generated/rows.ts +22 -0
- package/examples/account/generated/rules.ts +32 -0
- package/examples/account/routes.ts +5 -0
- package/examples/app.css +11 -1
- package/examples/cafe/books.html +2 -2
- package/examples/cafe/cafe.css +96 -85
- package/examples/cafe/generated/books.rows.ts +22 -0
- package/examples/cafe/generated/books.rules.ts +3 -2
- package/examples/cafe/generated/kitchen.rows.ts +27 -0
- package/examples/cafe/generated/kitchen.rules.ts +11 -1
- package/examples/cafe/generated/menu.rows.ts +22 -0
- package/examples/cafe/generated/menu.rules.ts +3 -2
- package/examples/cafe/generated/order.rows.ts +27 -0
- package/examples/cafe/generated/order.rules.ts +11 -1
- package/examples/cafe/generated/staff.elements.ts +7 -2
- package/examples/cafe/generated/staff.rows.ts +22 -0
- package/examples/cafe/generated/staff.rules.ts +9 -1
- package/examples/cafe/generated/supplies.queries.ts +4 -2
- package/examples/cafe/generated/supplies.rows.ts +22 -0
- package/examples/cafe/generated/supplies.rules.ts +17 -1
- package/examples/cafe/generated/till.queries.ts +2 -0
- package/examples/cafe/generated/till.rows.ts +27 -0
- package/examples/cafe/generated/till.rules.ts +11 -1
- package/examples/cafe/index.html +14 -15
- package/examples/cafe/kitchen.css +11 -19
- package/examples/cafe/kitchen.ts +7 -3
- package/examples/cafe/look.ts +30 -0
- package/examples/cafe/menu.html +10 -26
- package/examples/cafe/menu.ts +8 -80
- package/examples/cafe/migrations/002-guard-supplies.ts +15 -0
- package/examples/cafe/order.html +8 -7
- package/examples/cafe/order.ts +6 -2
- package/examples/cafe/routes.ts +0 -1
- package/examples/cafe/staff.json +5 -0
- package/examples/cafe/stories.jsonl +6 -2
- package/examples/cafe/supplies.html +35 -34
- package/examples/cafe/supplies.ts +59 -39
- package/examples/cafe/till.ts +19 -11
- package/examples/cafe/views.ts +7 -5
- package/examples/chart/arches.ts +150 -0
- package/examples/chart/chart.css +11 -0
- package/examples/chart/chart.json +87 -0
- package/examples/chart/generated/elements.ts +105 -0
- package/examples/chart/generated/queries.ts +36 -0
- package/examples/chart/generated/rows.ts +27 -0
- package/examples/chart/generated/rules.ts +111 -0
- package/examples/chart/grid.ts +118 -0
- package/examples/chart/index.html +78 -0
- package/examples/chart/migrations/001-chart.ts +6 -0
- package/examples/chart/migrations/002-create-conditions.ts +6 -0
- package/examples/chart/page.ts +20 -0
- package/examples/chart/routes.ts +7 -0
- package/examples/chart/stories.jsonl +14 -0
- package/examples/chart/teeth.ts +57 -0
- package/examples/desk/desk.css +6 -10
- package/examples/desk/generated/elements.ts +1 -1
- package/examples/desk/generated/rows.ts +22 -0
- package/examples/desk/generated/rules.ts +34 -1
- package/examples/desk/index.html +10 -3
- package/examples/desk/lanes.css +21 -19
- package/examples/desk/routes.ts +0 -2
- package/examples/desk/stories.jsonl +4 -3
- package/examples/desk/tally.css +1 -1
- package/examples/desk/thumbs.ts +2 -2
- package/examples/docs.ts +7 -4
- package/examples/hello/generated/elements.ts +2 -2
- package/examples/hello/generated/rules.ts +3 -2
- package/examples/hello/hello.css +2 -4
- package/examples/hello/index.html +10 -3
- package/examples/hello/page.ts +4 -4
- package/examples/index.html +20 -12
- package/examples/notes/generated/elements.ts +112 -0
- package/examples/notes/generated/queries.ts +42 -0
- package/examples/notes/generated/rows.ts +27 -0
- package/examples/notes/generated/rules.ts +133 -0
- package/examples/notes/index.html +32 -0
- package/examples/notes/look.ts +41 -0
- package/examples/notes/migrations/001-notes.ts +7 -0
- package/examples/notes/notes.json +78 -0
- package/examples/notes/page.ts +21 -0
- package/examples/notes/routes.ts +6 -0
- package/examples/notes/stories.jsonl +24 -0
- package/examples/page.ts +9 -2
- package/examples/people/generated/rows.ts +22 -0
- package/examples/people/generated/rules.ts +11 -1
- package/examples/people/links.ts +8 -9
- package/examples/people/people.css +1 -1
- package/examples/people/routes.ts +1 -3
- package/examples/people/stories.jsonl +1 -0
- package/examples/people/view.ts +5 -2
- package/examples/trip/generated/elements.ts +5 -3
- package/examples/trip/generated/queries.ts +12 -1
- package/examples/trip/generated/rows.ts +27 -0
- package/examples/trip/generated/rules.ts +56 -2
- package/examples/trip/index.html +58 -12
- package/examples/trip/line.css +186 -0
- package/examples/trip/line.ts +51 -40
- package/examples/trip/page.ts +65 -71
- package/examples/trip/routes.ts +9 -5
- package/examples/trip/stays.css +13 -13
- package/examples/trip/stays.ts +15 -10
- package/examples/trip/stories.jsonl +2 -0
- package/examples/trip/told.ts +3 -26
- package/examples/trip/trip.css +16 -0
- package/examples/trips/generated/elements.ts +1 -1
- package/examples/trips/generated/rows.ts +22 -0
- package/examples/trips/generated/rules.ts +9 -1
- package/examples/trips/index.html +10 -10
- package/examples/trips/map.ts +3 -14
- package/examples/trips/new-trip.ts +14 -16
- package/examples/trips/trips.css +24 -23
- package/examples/weeks/generated/elements.ts +1 -1
- package/examples/weeks/generated/queries.ts +11 -0
- package/examples/weeks/generated/rows.ts +22 -0
- package/examples/weeks/generated/rules.ts +11 -5
- package/examples/weeks/routes.ts +3 -2
- package/examples/weeks/stories.jsonl +1 -0
- package/examples/welcome.css +43 -33
- package/package.json +8 -2
- package/src/attachment.ts +17 -2
- package/src/awesome.ts +103 -0
- package/src/board.css +76 -0
- package/src/board.ts +173 -0
- package/src/cli.ts +28 -3
- package/src/compile.ts +821 -109
- package/src/definitions.ts +113 -27
- package/src/demo.css +2 -5
- package/src/draft.ts +48 -27
- package/src/drawer.ts +248 -0
- package/src/engine.ts +253 -170
- package/src/fields.ts +341 -0
- package/src/file-value.ts +12 -2
- package/src/files.ts +113 -33
- package/src/ground.ts +110 -0
- package/src/icon-names.ts +19 -2
- package/src/keep.ts +16 -3
- package/src/kit.ts +51 -0
- package/src/link.ts +3 -3
- package/src/map.css +140 -0
- package/src/map.ts +200 -0
- package/src/mcp.ts +129 -24
- package/src/members/demo.ts +13 -12
- package/src/members/generated/rows.ts +22 -0
- package/src/members/generated/rules.ts +3 -2
- package/src/members/group.ts +105 -55
- package/src/members/keys.ts +95 -79
- package/src/members/panel.css +40 -35
- package/src/members/panel.ts +58 -37
- package/src/migrate.ts +178 -125
- package/src/migrations/005-change-kept.ts +7 -0
- package/src/month.css +129 -0
- package/src/month.ts +179 -0
- package/src/ops.ts +40 -1
- package/src/page.css +11 -2
- package/src/page.ts +68 -17
- package/src/parts.css +614 -230
- package/src/parts.ts +259 -36
- package/src/plane.css +61 -0
- package/src/plane.ts +153 -0
- package/src/postgres-server.ts +60 -0
- package/src/reading.css +73 -0
- package/src/reading.ts +238 -0
- package/src/rows.css +289 -0
- package/src/rows.ts +864 -0
- package/src/search.css +80 -0
- package/src/search.ts +130 -0
- package/src/server.ts +355 -137
- package/src/settings.ts +9 -4
- package/src/sheet.ts +116 -0
- package/src/skill.ts +40 -0
- package/src/slots.css +90 -0
- package/src/slots.ts +213 -0
- package/src/specs.ts +38 -0
- package/src/starter.ts +19 -2
- package/src/store.ts +224 -161
- package/src/stories.ts +43 -11
- package/src/surface.ts +164 -0
- package/src/time.ts +2 -0
- package/src/timeline.css +111 -0
- package/src/timeline.ts +235 -0
- package/src/toast.ts +21 -48
- package/src/together.ts +15 -24
- package/src/tokens.css +89 -3
- package/src/tokens.json +287 -7
- package/src/tool.ts +210 -0
- package/src/upkeep.ts +47 -22
- package/src/views.css +43 -0
- package/src/views.ts +111 -0
- package/src/week.css +150 -0
- package/src/week.ts +254 -0
- package/src/write.ts +326 -78
- package/starter/CHANGELOG.md +8 -0
- package/starter/CLAUDE.md +9 -3
- package/starter/bunfig +5 -0
- package/starter/githooks/pre-commit +13 -0
- package/starter/prettierignore +5 -0
- package/starter/tests/hello.test.ts +2 -0
- package/starter/tests/records.test.ts +40 -0
- package/starter/todo.jsonl +0 -0
- package/docs/learning.md +0 -76
- package/examples/cafe/trust.ts +0 -20
- package/examples/desk/trust.ts +0 -24
- package/examples/people/trust.ts +0 -14
- package/examples/trip/answer-rows.ts +0 -70
- package/examples/trip/bar.ts +0 -89
- package/examples/trip/calendar-map.css +0 -711
- package/examples/trip/calendar-map.ts +0 -249
- package/examples/trip/drags.ts +0 -143
- package/examples/trip/drawer.ts +0 -250
- package/examples/trip/event-form.ts +0 -200
- package/examples/trip/holding.ts +0 -61
- package/examples/trip/map.ts +0 -234
- package/examples/trip/month.ts +0 -87
- package/examples/trip/other-weeks.ts +0 -67
- package/examples/trip/peek.ts +0 -71
- package/examples/trip/people-chips.ts +0 -74
- package/examples/trip/shell.ts +0 -39
- package/examples/trip/trust.ts +0 -51
- package/examples/trip/week.ts +0 -237
- package/examples/trip/writes.ts +0 -91
- package/examples/trip/zones.ts +0 -16
- package/examples/weeks/derive.ts +0 -23
- package/src/scrim.ts +0 -81
package/src/parts.css
CHANGED
|
@@ -4,31 +4,34 @@
|
|
|
4
4
|
sits, or what it alone has). A layer, joined, beneath any rule of an app's, which wins whatever its
|
|
5
5
|
specificity. Its colours and its motion are src/tokens.css's.
|
|
6
6
|
|
|
7
|
-
.act a button with words, its icon before them:
|
|
7
|
+
.act a button with words, its icon before them: a field's 16px (600 for .ink), 32px tall (44px under a finger)
|
|
8
8
|
.ink the one that makes or keeps (Add, Save)
|
|
9
|
-
.danger the one that takes away: its words red; in a
|
|
9
|
+
.danger the one that takes away: its words red; in a modal, the answer, filled
|
|
10
10
|
.quiet a way out, its words alone (Sign out)
|
|
11
11
|
.icon-only a harmless action, its icon alone, its words its label (src/icons.ts)
|
|
12
12
|
.small a lesser tool among words, its words small
|
|
13
|
-
.j-tabs one of a few, side by side
|
|
14
13
|
.j-choices a list to pick one from, each a row
|
|
15
14
|
.j-face a person: their initial in their hue; empty, their dot
|
|
16
15
|
.j-chips people as chips, a face and a name each; a button one toggles (.j-chip, one shown)
|
|
17
16
|
.j-file a file field: its picture or its PDF's link, a way to choose one, and to take it off
|
|
17
|
+
.j-open a row (Row): the button that opens it, all of the row but its other buttons, its words and the
|
|
18
|
+
mark that says it opens; what holds it is the row, a hairline under it, marked while it's open
|
|
19
|
+
.j-tick a tick on a row: Web Awesome's wa-checkbox, a finger wide
|
|
20
|
+
.j-mention a thing named where it isn't its own place: a small tool that peeks at it
|
|
21
|
+
.j-peek a peek (Peek): a wa-popover, a little more of a thing, by what was tapped, read not written, with
|
|
22
|
+
the way to open it whole. It dims nothing
|
|
18
23
|
a field every input and select (a box to tick aside), as tall as a tool beside it, its words 16px
|
|
19
24
|
(or a phone zooms in); a textarea the same, taller. A field drawn otherwise (a name changed
|
|
20
25
|
in place) says so in its own sheet: these weigh nothing, so any rule there wins.
|
|
21
26
|
a label over its field: 13px, 600, in plain case
|
|
22
|
-
.drawer where a thing is changed: docked at the right,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
a
|
|
29
|
-
|
|
30
|
-
behind by its one scrim (src/scrim.ts), which a modal dims by anywhere. Under reduced motion,
|
|
31
|
-
nothing moves.
|
|
27
|
+
.drawer where a thing is changed: docked at the right, 360px, sliding in from it (src/surface.ts).
|
|
28
|
+
Its head the thing's name (h2, 17px) and its ×; its deeds at its foot, removing first.
|
|
29
|
+
.sheet a popover that holds a list (the group, People): its head a title and its ×.
|
|
30
|
+
wa-drawer on a phone, a drawer and a sheet are Web Awesome's, risen from the foot: rounded at the top,
|
|
31
|
+
a grabber, the page dimmed behind.
|
|
32
|
+
wa-dialog a modal, new or delete, anywhere: its title (h2, 17px) and its ×, a line saying what follows,
|
|
33
|
+
its deeds. Asked first (.j-ask), roomier: its answers a finger tall, sharing its width, Never mind
|
|
34
|
+
first. Under reduced motion, nothing moves.
|
|
32
35
|
.j-foot a foot fixed at the screen's foot, run on past it, so nothing shows under it in Safari */
|
|
33
36
|
|
|
34
37
|
/* the layers, named in their order wherever joined's sheets are: an app's resets (button { font: inherit }) in
|
|
@@ -36,23 +39,32 @@
|
|
|
36
39
|
@layer reset, joined;
|
|
37
40
|
|
|
38
41
|
@layer joined {
|
|
42
|
+
/* hidden always hides: whatever display a part's or an app's own rules give it (a tab, a reading, a bar). An
|
|
43
|
+
important declaration in this layer outweighs any an app makes, so no rule of its can undo it (docs/design.md,
|
|
44
|
+
How the look is built). Adopted in the page and in every display's shadow */
|
|
45
|
+
[hidden] {
|
|
46
|
+
display: none !important;
|
|
47
|
+
}
|
|
39
48
|
.act {
|
|
40
49
|
box-sizing: border-box;
|
|
41
|
-
min-height:
|
|
50
|
+
min-height: var(--size-touch);
|
|
42
51
|
display: inline-flex;
|
|
43
52
|
align-items: center;
|
|
44
53
|
justify-content: center;
|
|
45
|
-
gap:
|
|
46
|
-
padding: 0
|
|
54
|
+
gap: var(--space-6);
|
|
55
|
+
padding: 0 var(--space-12);
|
|
47
56
|
border: 1px solid var(--ink);
|
|
48
|
-
border-radius:
|
|
57
|
+
border-radius: var(--radius);
|
|
49
58
|
background: var(--card);
|
|
50
59
|
color: var(--ink);
|
|
51
60
|
font: var(--font-tool);
|
|
52
61
|
white-space: nowrap;
|
|
53
62
|
cursor: pointer;
|
|
54
63
|
}
|
|
64
|
+
/* the deed that makes or keeps: heavier than the rest, never lighter than a field (Apple's HIG: the main action is
|
|
65
|
+
the bolder) */
|
|
55
66
|
.act.ink {
|
|
67
|
+
font-weight: 600;
|
|
56
68
|
border-color: var(--add);
|
|
57
69
|
background: var(--add);
|
|
58
70
|
color: var(--add-ink);
|
|
@@ -64,7 +76,7 @@
|
|
|
64
76
|
border-color: var(--danger);
|
|
65
77
|
color: var(--danger);
|
|
66
78
|
}
|
|
67
|
-
dialog .act.danger {
|
|
79
|
+
wa-dialog .act.danger {
|
|
68
80
|
background: var(--danger);
|
|
69
81
|
color: var(--danger-ink);
|
|
70
82
|
}
|
|
@@ -74,23 +86,32 @@
|
|
|
74
86
|
background: var(--accent);
|
|
75
87
|
color: var(--card);
|
|
76
88
|
}
|
|
89
|
+
/* a refusal said in a form's note (a Draft's, refused: src/draft.ts) is danger, wherever the note is (design.md, Colour) */
|
|
90
|
+
.j-refused {
|
|
91
|
+
color: var(--danger);
|
|
92
|
+
}
|
|
93
|
+
/* focus, from the keyboard, is accent on whatever takes it: an app's own buttons and links too (design.md, Colour) */
|
|
94
|
+
:where(button, a[href], summary, [tabindex]):focus-visible {
|
|
95
|
+
outline: var(--size-ring) solid var(--accent);
|
|
96
|
+
outline-offset: var(--size-ring);
|
|
97
|
+
}
|
|
77
98
|
.act.quiet {
|
|
78
99
|
border-color: transparent;
|
|
79
100
|
background: none;
|
|
80
|
-
padding: 0
|
|
101
|
+
padding: 0 var(--space-4);
|
|
81
102
|
color: var(--muted);
|
|
82
103
|
}
|
|
83
104
|
.icon-only {
|
|
84
105
|
box-sizing: border-box;
|
|
85
|
-
width:
|
|
86
|
-
height:
|
|
106
|
+
width: var(--size-touch);
|
|
107
|
+
height: var(--size-touch);
|
|
87
108
|
display: inline-flex;
|
|
88
109
|
align-items: center;
|
|
89
110
|
justify-content: center;
|
|
90
111
|
flex: none;
|
|
91
112
|
padding: 0;
|
|
92
113
|
border: 0;
|
|
93
|
-
border-radius:
|
|
114
|
+
border-radius: var(--radius);
|
|
94
115
|
background: none;
|
|
95
116
|
color: var(--muted);
|
|
96
117
|
cursor: pointer;
|
|
@@ -116,50 +137,27 @@
|
|
|
116
137
|
:is(.act, .icon-only) > svg.icon {
|
|
117
138
|
margin: 0;
|
|
118
139
|
}
|
|
119
|
-
|
|
120
|
-
|
|
140
|
+
/* one not offered isn't there: hidden wins over a tool's own display */
|
|
141
|
+
/* one that can't be pressed yet is quiet, whatever it is (Save before there's anything to keep, a flavour's, a
|
|
142
|
+
danger's): its edge and its words muted, no ground; never a grey slab */
|
|
143
|
+
:is(.act, .icon-only):disabled,
|
|
144
|
+
:is(.act, .icon-only):disabled:hover {
|
|
145
|
+
border-color: var(--line);
|
|
146
|
+
background: none;
|
|
147
|
+
color: var(--muted);
|
|
121
148
|
cursor: default;
|
|
122
149
|
}
|
|
123
|
-
/* a lesser tool among words, its
|
|
150
|
+
/* a lesser tool among words, its edge quieter and its padding less: a way to what links here, to another week. Its
|
|
151
|
+
words are a tool's, as every control's are */
|
|
124
152
|
.act.small {
|
|
125
|
-
min-height:
|
|
126
|
-
padding: 0
|
|
153
|
+
min-height: var(--size-touch);
|
|
154
|
+
padding: 0 var(--space-8);
|
|
127
155
|
border-color: var(--control-edge);
|
|
128
|
-
font: var(--font-small);
|
|
129
156
|
}
|
|
130
157
|
.act.small:hover {
|
|
131
158
|
background: var(--card-hover);
|
|
132
159
|
}
|
|
133
160
|
|
|
134
|
-
/* .j-tabs: one of a few, side by side in a well, the chosen raised on card (the group's People and Agents) */
|
|
135
|
-
.j-tabs {
|
|
136
|
-
display: flex;
|
|
137
|
-
gap: 4px;
|
|
138
|
-
padding: 2px;
|
|
139
|
-
border: 1px solid var(--edge);
|
|
140
|
-
border-radius: 4px;
|
|
141
|
-
background: var(--paper);
|
|
142
|
-
}
|
|
143
|
-
.j-tabs > button {
|
|
144
|
-
flex: 1;
|
|
145
|
-
display: inline-flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
min-height: 28px;
|
|
149
|
-
border: 0;
|
|
150
|
-
border-radius: 3px;
|
|
151
|
-
background: none;
|
|
152
|
-
color: var(--muted);
|
|
153
|
-
font: var(--font-small);
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
}
|
|
156
|
-
.j-tabs > [aria-selected="true"] {
|
|
157
|
-
background: var(--card);
|
|
158
|
-
color: var(--ink);
|
|
159
|
-
font-weight: 600;
|
|
160
|
-
box-shadow: 0 0 0 1px var(--edge);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
161
|
/* .j-choices: a list to pick one from, each a row's words, tinted under the pointer (places found, a row's
|
|
164
162
|
menu); the one that takes away last, apart, in red */
|
|
165
163
|
.j-choices {
|
|
@@ -171,26 +169,32 @@
|
|
|
171
169
|
}
|
|
172
170
|
.j-choices > button {
|
|
173
171
|
box-sizing: border-box;
|
|
174
|
-
min-height:
|
|
172
|
+
min-height: var(--size-touch);
|
|
175
173
|
display: flex;
|
|
176
174
|
align-items: center;
|
|
177
|
-
gap:
|
|
178
|
-
padding:
|
|
175
|
+
gap: var(--space-6);
|
|
176
|
+
padding: var(--space-4) var(--space-8);
|
|
179
177
|
border: 0;
|
|
180
|
-
border-radius:
|
|
178
|
+
border-radius: var(--radius-inner);
|
|
181
179
|
background: none;
|
|
182
180
|
color: var(--ink);
|
|
183
181
|
font: var(--font-row);
|
|
184
182
|
text-align: left;
|
|
185
183
|
cursor: pointer;
|
|
186
184
|
}
|
|
187
|
-
.j-choices > button:is(:hover, :focus-visible) {
|
|
185
|
+
.j-choices > button:is(:hover, :focus-visible, [aria-selected="true"]) {
|
|
188
186
|
background: color-mix(in srgb, var(--ink) 6%, transparent);
|
|
189
187
|
}
|
|
188
|
+
/* a typeahead's active match, what Enter chooses: ringed as a focused button is, inside its row (the focus itself
|
|
189
|
+
stays in the field) */
|
|
190
|
+
.j-choices > button[aria-selected="true"] {
|
|
191
|
+
outline: var(--size-ring) solid var(--accent);
|
|
192
|
+
outline-offset: calc(-1 * var(--size-ring));
|
|
193
|
+
}
|
|
190
194
|
.j-choices > button.danger {
|
|
191
|
-
margin-top:
|
|
195
|
+
margin-top: var(--space-4);
|
|
192
196
|
border-top: 1px solid var(--line);
|
|
193
|
-
border-radius: 0 0
|
|
197
|
+
border-radius: 0 0 var(--radius-inner) var(--radius-inner);
|
|
194
198
|
color: var(--danger);
|
|
195
199
|
}
|
|
196
200
|
|
|
@@ -204,8 +208,8 @@
|
|
|
204
208
|
place-items: center;
|
|
205
209
|
width: 22px;
|
|
206
210
|
height: 22px;
|
|
207
|
-
border:
|
|
208
|
-
border-radius:
|
|
211
|
+
border: var(--size-ring) solid var(--hue);
|
|
212
|
+
border-radius: var(--radius-dot);
|
|
209
213
|
background: color-mix(in srgb, var(--hue) var(--tint-strong), var(--card));
|
|
210
214
|
color: var(--ink);
|
|
211
215
|
font: var(--font-tiny);
|
|
@@ -216,8 +220,8 @@
|
|
|
216
220
|
content: attr(data-initial);
|
|
217
221
|
}
|
|
218
222
|
.j-face:not([data-initial]) {
|
|
219
|
-
width:
|
|
220
|
-
height:
|
|
223
|
+
width: var(--size-dot);
|
|
224
|
+
height: var(--size-dot);
|
|
221
225
|
border: 0;
|
|
222
226
|
background: var(--hue);
|
|
223
227
|
}
|
|
@@ -225,17 +229,17 @@
|
|
|
225
229
|
display: flex;
|
|
226
230
|
flex-wrap: wrap;
|
|
227
231
|
align-items: center;
|
|
228
|
-
gap:
|
|
232
|
+
gap: var(--space-6);
|
|
229
233
|
}
|
|
230
234
|
:is(.j-chip, .j-chips > button) {
|
|
231
235
|
box-sizing: border-box;
|
|
232
236
|
display: inline-flex;
|
|
233
237
|
align-items: center;
|
|
234
|
-
gap:
|
|
235
|
-
min-height:
|
|
236
|
-
padding: 0
|
|
238
|
+
gap: var(--space-6);
|
|
239
|
+
min-height: var(--size-touch);
|
|
240
|
+
padding: 0 var(--space-10) 0 var(--space-4);
|
|
237
241
|
border: 1px solid var(--control-edge);
|
|
238
|
-
border-radius:
|
|
242
|
+
border-radius: var(--radius);
|
|
239
243
|
background: var(--card);
|
|
240
244
|
color: var(--muted);
|
|
241
245
|
font: var(--font-tool);
|
|
@@ -247,11 +251,11 @@
|
|
|
247
251
|
.j-chip > .icon-only {
|
|
248
252
|
width: 24px;
|
|
249
253
|
height: 24px;
|
|
250
|
-
margin-right: -
|
|
254
|
+
margin-right: calc(-1 * var(--space-6));
|
|
251
255
|
}
|
|
252
256
|
:is(.j-chip, .j-chips > button[aria-pressed="true"]) {
|
|
253
257
|
border-color: transparent;
|
|
254
|
-
border-left:
|
|
258
|
+
border-left: var(--size-stripe) solid var(--hue);
|
|
255
259
|
background: color-mix(in srgb, var(--hue) var(--tint), var(--card));
|
|
256
260
|
color: var(--ink);
|
|
257
261
|
}
|
|
@@ -261,26 +265,90 @@
|
|
|
261
265
|
|
|
262
266
|
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]), select, textarea) {
|
|
263
267
|
box-sizing: border-box;
|
|
264
|
-
min-height:
|
|
268
|
+
min-height: var(--size-touch);
|
|
265
269
|
min-width: 0;
|
|
266
|
-
padding: 0
|
|
270
|
+
padding: 0 var(--space-10);
|
|
267
271
|
border: 1px solid var(--control-edge);
|
|
268
|
-
border-radius:
|
|
272
|
+
border-radius: var(--radius);
|
|
269
273
|
background: var(--card);
|
|
270
274
|
color: var(--ink);
|
|
271
275
|
font: var(--font-field);
|
|
272
276
|
}
|
|
277
|
+
/* a select's chevron is joined's (--choose), set in from its edge as its words are, with room between them: a
|
|
278
|
+
browser's own sits at the edge (Chrome's), or is two (Safari's). The whole field is what's tapped, the chevron
|
|
279
|
+
only says it opens */
|
|
280
|
+
:where(select) {
|
|
281
|
+
appearance: none;
|
|
282
|
+
padding-inline-end: calc(var(--space-10) * 2 + var(--space-16));
|
|
283
|
+
background: var(--card) var(--choose) no-repeat right var(--space-10) center / var(--space-16);
|
|
284
|
+
}
|
|
285
|
+
/* a disclosure (<details>): its summary says it opens by the same chevron, turned to point at it while closed,
|
|
286
|
+
down once open; never the browser's triangle */
|
|
287
|
+
:where(summary) {
|
|
288
|
+
display: flex;
|
|
289
|
+
align-items: center;
|
|
290
|
+
gap: var(--space-4);
|
|
291
|
+
min-height: var(--size-touch);
|
|
292
|
+
font: var(--font-tool);
|
|
293
|
+
list-style: none;
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
}
|
|
296
|
+
:where(summary)::-webkit-details-marker {
|
|
297
|
+
display: none;
|
|
298
|
+
}
|
|
299
|
+
:where(summary)::before {
|
|
300
|
+
content: "";
|
|
301
|
+
flex: none;
|
|
302
|
+
width: var(--space-16);
|
|
303
|
+
height: var(--space-16);
|
|
304
|
+
background: var(--choose) no-repeat center / contain;
|
|
305
|
+
transform: rotate(-90deg);
|
|
306
|
+
}
|
|
307
|
+
:where(details[open]) > :where(summary)::before {
|
|
308
|
+
transform: none;
|
|
309
|
+
}
|
|
310
|
+
/* a file's field: its button a tool's, as an .act is drawn (design.md, Surfaces); "no file chosen" in muted */
|
|
311
|
+
:where(input[type="file"]) {
|
|
312
|
+
min-height: auto;
|
|
313
|
+
padding: 0;
|
|
314
|
+
border: 0;
|
|
315
|
+
background: none;
|
|
316
|
+
color: var(--muted);
|
|
317
|
+
font: var(--font-small);
|
|
318
|
+
}
|
|
319
|
+
:where(input[type="file"])::file-selector-button {
|
|
320
|
+
box-sizing: border-box;
|
|
321
|
+
min-height: var(--size-touch);
|
|
322
|
+
margin-right: var(--space-8);
|
|
323
|
+
padding: 0 var(--space-12);
|
|
324
|
+
border: 1px solid var(--ink);
|
|
325
|
+
border-radius: var(--radius);
|
|
326
|
+
background: var(--card);
|
|
327
|
+
color: var(--ink);
|
|
328
|
+
font: var(--font-tool);
|
|
329
|
+
cursor: pointer;
|
|
330
|
+
}
|
|
331
|
+
/* a field said, not asked (a value once it's there, joined/kit's readonly): its words, with no box to type in */
|
|
332
|
+
:where(input:read-only:not([type="checkbox"], [type="radio"], [type="hidden"])) {
|
|
333
|
+
padding-inline: 0;
|
|
334
|
+
border-color: transparent;
|
|
335
|
+
background: none;
|
|
336
|
+
}
|
|
273
337
|
:where(textarea) {
|
|
274
338
|
min-height: 4.5rem;
|
|
275
|
-
padding:
|
|
339
|
+
padding: var(--space-8) var(--space-10);
|
|
276
340
|
resize: vertical;
|
|
277
341
|
}
|
|
278
|
-
|
|
342
|
+
/* a field's hint (<j-field hint="…">): a line under its words, muted, as Web Awesome's own hint is */
|
|
343
|
+
.j-hint {
|
|
344
|
+
color: var(--muted);
|
|
345
|
+
font: var(--font-small);
|
|
346
|
+
}
|
|
347
|
+
:where(form, wa-dialog) label {
|
|
279
348
|
display: grid;
|
|
280
|
-
gap:
|
|
349
|
+
gap: var(--space-4);
|
|
281
350
|
font: var(--font-label);
|
|
282
351
|
}
|
|
283
|
-
|
|
284
352
|
/* a request's refusal, said beside what sent it (Said): its why in danger; nothing while there's none */
|
|
285
353
|
.said {
|
|
286
354
|
margin: 0;
|
|
@@ -297,10 +365,7 @@
|
|
|
297
365
|
display: flex;
|
|
298
366
|
flex-wrap: wrap;
|
|
299
367
|
align-items: center;
|
|
300
|
-
gap:
|
|
301
|
-
}
|
|
302
|
-
.j-file > [hidden] {
|
|
303
|
-
display: none;
|
|
368
|
+
gap: var(--space-8);
|
|
304
369
|
}
|
|
305
370
|
.j-file > a.act {
|
|
306
371
|
text-decoration: none;
|
|
@@ -316,13 +381,13 @@
|
|
|
316
381
|
max-height: 240px;
|
|
317
382
|
object-fit: cover;
|
|
318
383
|
border: 1px solid var(--edge);
|
|
319
|
-
border-radius:
|
|
384
|
+
border-radius: var(--radius);
|
|
320
385
|
}
|
|
321
386
|
.j-file label {
|
|
322
387
|
position: relative;
|
|
323
388
|
}
|
|
324
389
|
.j-file label:focus-within {
|
|
325
|
-
outline:
|
|
390
|
+
outline: var(--size-ring) solid var(--accent);
|
|
326
391
|
}
|
|
327
392
|
.j-file input[type="file"] {
|
|
328
393
|
position: absolute;
|
|
@@ -331,30 +396,32 @@
|
|
|
331
396
|
opacity: 0;
|
|
332
397
|
}
|
|
333
398
|
|
|
334
|
-
/*
|
|
335
|
-
|
|
399
|
+
/* joined's surfaces, wider than a phone: the docked drawer and the sheet (src/surface.ts), each a card in a 1px edge,
|
|
400
|
+
4px corners, no shadow */
|
|
401
|
+
:where(.drawer, .sheet) {
|
|
336
402
|
box-sizing: border-box;
|
|
337
403
|
border: 1px solid var(--edge);
|
|
338
|
-
border-radius:
|
|
404
|
+
border-radius: var(--radius);
|
|
339
405
|
background: var(--card);
|
|
340
406
|
color: var(--ink);
|
|
341
407
|
font: var(--font-row);
|
|
342
408
|
}
|
|
343
|
-
:where(.drawer, .sheet
|
|
409
|
+
:where(.drawer, .sheet) h2 {
|
|
344
410
|
flex: 1;
|
|
345
411
|
margin: 0;
|
|
346
412
|
font: var(--font-title);
|
|
347
413
|
}
|
|
348
|
-
:where(.drawer, .sheet
|
|
414
|
+
:where(.drawer, .sheet) header {
|
|
349
415
|
display: flex;
|
|
350
416
|
align-items: center;
|
|
351
|
-
gap:
|
|
417
|
+
gap: var(--space-8);
|
|
352
418
|
}
|
|
353
419
|
/* its head and its foot always show, what it is and what you may do: only what's between them scrolls (each to its
|
|
354
420
|
surface's edge, over what scrolls under it, a band of its card between; held past its padding, which a held thing
|
|
355
421
|
stops at, its foot past --pad-end, the padding at its foot where that's more) */
|
|
356
|
-
:where(.drawer, .sheet
|
|
357
|
-
:where(.drawer, .sheet
|
|
422
|
+
:where(.drawer, .sheet) > :is(header, h2):first-child,
|
|
423
|
+
:where(.drawer, .sheet) > :is(form, div) > header:first-child,
|
|
424
|
+
.drawer > div > form > header:first-child {
|
|
358
425
|
position: sticky;
|
|
359
426
|
top: calc(-1 * var(--pad));
|
|
360
427
|
z-index: 1;
|
|
@@ -362,75 +429,478 @@
|
|
|
362
429
|
padding: var(--pad) var(--pad) var(--space-8);
|
|
363
430
|
background: var(--card);
|
|
364
431
|
}
|
|
365
|
-
:where(.drawer, .sheet
|
|
432
|
+
:where(.drawer, .sheet) footer {
|
|
366
433
|
position: sticky;
|
|
367
434
|
bottom: calc(-1 * var(--pad-end, var(--pad)));
|
|
368
435
|
z-index: 1;
|
|
369
436
|
margin: 0 calc(-1 * var(--pad)) calc(-1 * var(--pad-end, var(--pad)));
|
|
370
|
-
|
|
437
|
+
/* its deeds stand apart from the last field, more than the fields from each other: never glued to a row */
|
|
438
|
+
padding: var(--space-16) var(--pad) var(--pad-end, var(--pad));
|
|
371
439
|
background: var(--card);
|
|
372
440
|
display: flex;
|
|
373
441
|
flex-wrap: wrap;
|
|
374
442
|
justify-content: flex-end;
|
|
375
|
-
gap:
|
|
443
|
+
gap: var(--space-8);
|
|
376
444
|
}
|
|
377
445
|
/* removing stands apart, first at the foot */
|
|
378
|
-
:where(.drawer, .sheet
|
|
446
|
+
:where(.drawer, .sheet) footer > .danger:first-child {
|
|
379
447
|
margin-right: auto;
|
|
380
448
|
}
|
|
381
449
|
.drawer {
|
|
382
450
|
position: fixed;
|
|
383
451
|
inset: 0 0 0 auto;
|
|
384
452
|
z-index: 15;
|
|
385
|
-
width: min(
|
|
453
|
+
width: min(var(--size-panel), 100vw);
|
|
386
454
|
overflow: auto;
|
|
387
|
-
--pad:
|
|
455
|
+
--pad: var(--space-14);
|
|
388
456
|
padding: var(--pad);
|
|
389
457
|
border-width: 0 0 0 1px;
|
|
390
458
|
border-radius: 0;
|
|
391
459
|
}
|
|
392
460
|
/* its one column no wider than it, where a scrollbar takes room too (Windows, Linux): a field's least width would
|
|
393
461
|
push it sideways */
|
|
394
|
-
:where(.drawer, .sheet
|
|
462
|
+
:where(.drawer, .sheet) form {
|
|
395
463
|
display: grid;
|
|
396
464
|
grid-template-columns: minmax(0, 1fr);
|
|
397
|
-
gap:
|
|
465
|
+
gap: var(--space-12);
|
|
398
466
|
}
|
|
399
|
-
|
|
400
|
-
width: min(
|
|
401
|
-
|
|
467
|
+
.sheet {
|
|
468
|
+
width: min(var(--size-sheet), calc(100vw - 2 * var(--space-16)));
|
|
469
|
+
max-height: calc(100dvh - 2 * var(--space-16));
|
|
470
|
+
overflow: auto;
|
|
471
|
+
--pad: var(--space-12);
|
|
402
472
|
padding: var(--pad);
|
|
473
|
+
/* its one column no wider than it: a field (your name, changed in place) would stretch it past its edge */
|
|
474
|
+
grid-template-columns: minmax(0, 1fr);
|
|
475
|
+
/* over the page's foot, even as it leaves the top layer to go */
|
|
476
|
+
z-index: 20;
|
|
403
477
|
}
|
|
404
|
-
|
|
478
|
+
.sheet:popover-open {
|
|
405
479
|
display: grid;
|
|
406
|
-
gap:
|
|
480
|
+
gap: var(--space-10);
|
|
481
|
+
}
|
|
482
|
+
/* on a phone, a sheet an app pops itself (joined's own are Web Awesome's there, by Surface) rises from the foot:
|
|
483
|
+
the screen's width, rounded at the top */
|
|
484
|
+
@media (max-width: 40rem) {
|
|
485
|
+
.sheet {
|
|
486
|
+
inset: auto 0 0;
|
|
487
|
+
width: auto;
|
|
488
|
+
max-height: 88dvh;
|
|
489
|
+
margin: 0;
|
|
490
|
+
border: 0;
|
|
491
|
+
border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
|
|
492
|
+
padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom));
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* Web Awesome's surfaces (src/awesome.ts): a modal (wa-dialog) anywhere, and on a phone a drawer or a sheet
|
|
497
|
+
(wa-drawer, src/surface.ts), risen from the foot, rounded at its top, as tall as it needs; each its head its title
|
|
498
|
+
(h2) and its ×, its foot its deeds, removing apart, first; only what's between them scrolls. */
|
|
499
|
+
:where(wa-drawer, wa-dialog) {
|
|
500
|
+
--spacing: var(--space-14);
|
|
501
|
+
font: var(--font-row);
|
|
502
|
+
}
|
|
503
|
+
wa-drawer {
|
|
504
|
+
--size: var(--size-panel);
|
|
505
|
+
}
|
|
506
|
+
wa-drawer::part(dialog) {
|
|
507
|
+
border-left: 1px solid var(--edge);
|
|
407
508
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
dialog::backdrop {
|
|
411
|
-
background: var(--scrim);
|
|
509
|
+
wa-drawer[placement="bottom"] {
|
|
510
|
+
--size: auto;
|
|
412
511
|
}
|
|
413
|
-
dialog
|
|
512
|
+
wa-drawer[placement="bottom"]::part(dialog) {
|
|
513
|
+
max-height: calc(100dvh - var(--space-48));
|
|
514
|
+
border: 0;
|
|
515
|
+
border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
|
|
516
|
+
}
|
|
517
|
+
wa-dialog {
|
|
518
|
+
--width: var(--size-modal);
|
|
519
|
+
}
|
|
520
|
+
wa-dialog::part(dialog) {
|
|
521
|
+
border: 1px solid var(--edge);
|
|
522
|
+
}
|
|
523
|
+
wa-dialog p {
|
|
414
524
|
margin: 0;
|
|
415
525
|
font: var(--font-small);
|
|
416
526
|
color: var(--muted);
|
|
417
527
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
528
|
+
/* a surface of Web Awesome's without its own head (what it holds brings its own: a form's header, its footer): those
|
|
529
|
+
held at the edges of what scrolls, as joined's drawer's are, a band of its card between */
|
|
530
|
+
:is(wa-dialog, wa-drawer)[without-header] :is(form, div) > header:first-child {
|
|
531
|
+
position: sticky;
|
|
532
|
+
top: calc(-1 * var(--spacing));
|
|
533
|
+
z-index: 1;
|
|
534
|
+
margin: calc(-1 * var(--spacing)) calc(-1 * var(--spacing)) 0;
|
|
535
|
+
padding: var(--spacing) var(--spacing) var(--space-8);
|
|
536
|
+
background: var(--card);
|
|
537
|
+
}
|
|
538
|
+
/* the foot of a page's sheet, on a phone (src/surface.ts): its form or deeds held at the foot, as a sheet's are wider */
|
|
539
|
+
:is(wa-dialog, wa-drawer)[without-header] form > footer,
|
|
540
|
+
wa-drawer > .j-sheet-body > footer:last-child {
|
|
541
|
+
position: sticky;
|
|
542
|
+
bottom: calc(-1 * var(--spacing));
|
|
543
|
+
z-index: 1;
|
|
544
|
+
margin: 0 calc(-1 * var(--spacing)) calc(-1 * var(--spacing));
|
|
545
|
+
padding: var(--space-16) var(--spacing) var(--spacing);
|
|
546
|
+
background: var(--card);
|
|
547
|
+
}
|
|
548
|
+
wa-drawer > .j-sheet-body > footer:last-child {
|
|
549
|
+
display: flex;
|
|
550
|
+
flex-wrap: wrap;
|
|
551
|
+
justify-content: flex-end;
|
|
552
|
+
gap: var(--space-8);
|
|
553
|
+
}
|
|
554
|
+
/* what scrolls goes under a band of the head's own and over one of the foot's, never touching a title or a button */
|
|
555
|
+
:where(wa-drawer, wa-dialog)::part(header) {
|
|
556
|
+
padding-block-end: var(--space-8);
|
|
557
|
+
}
|
|
558
|
+
:where(wa-drawer, wa-dialog)::part(footer) {
|
|
559
|
+
padding-block-start: var(--space-16);
|
|
560
|
+
}
|
|
561
|
+
:where(wa-drawer, wa-dialog) h2 {
|
|
562
|
+
flex: 1;
|
|
563
|
+
margin: 0;
|
|
564
|
+
font: var(--font-title);
|
|
565
|
+
}
|
|
566
|
+
/* a modal with nothing to say past its question: no empty body between its head and foot */
|
|
567
|
+
wa-dialog:not(:has(> :not([slot])))::part(body) {
|
|
568
|
+
display: none;
|
|
569
|
+
}
|
|
570
|
+
/* asked first (askFirst, the group's): room around it, its title saying what will happen, a line saying what
|
|
571
|
+
follows in the ink's own size, and its two answers a finger tall, sharing its width, Never mind first, apart */
|
|
572
|
+
wa-dialog.j-ask {
|
|
573
|
+
--spacing: var(--space-24);
|
|
574
|
+
}
|
|
575
|
+
wa-dialog.j-ask::part(body) {
|
|
576
|
+
padding-block: 0 var(--space-16);
|
|
577
|
+
}
|
|
578
|
+
wa-dialog.j-ask > p {
|
|
579
|
+
font: var(--font-row);
|
|
580
|
+
}
|
|
581
|
+
wa-dialog.j-ask > p + * {
|
|
582
|
+
margin-top: var(--space-16);
|
|
583
|
+
}
|
|
584
|
+
wa-dialog.j-ask footer {
|
|
585
|
+
gap: var(--space-12);
|
|
586
|
+
}
|
|
587
|
+
wa-dialog.j-ask footer .act {
|
|
588
|
+
flex: 1 1 0;
|
|
589
|
+
min-height: var(--size-finger);
|
|
590
|
+
}
|
|
591
|
+
/* a head of its own (a form's header): its title, then its × at its end, on one line */
|
|
592
|
+
:where(wa-drawer, wa-dialog) :is(form, div) > header:first-child {
|
|
593
|
+
display: flex;
|
|
594
|
+
align-items: center;
|
|
595
|
+
gap: var(--space-8);
|
|
596
|
+
}
|
|
597
|
+
:where(wa-drawer, wa-dialog) footer {
|
|
598
|
+
display: flex;
|
|
599
|
+
flex-wrap: wrap;
|
|
600
|
+
justify-content: flex-end;
|
|
601
|
+
gap: var(--space-8);
|
|
602
|
+
width: 100%;
|
|
603
|
+
}
|
|
604
|
+
:where(wa-drawer, wa-dialog) footer > :is([variant="danger"], .act.danger):first-child {
|
|
605
|
+
margin-right: auto;
|
|
606
|
+
}
|
|
607
|
+
:where(wa-drawer, wa-dialog) form {
|
|
608
|
+
display: grid;
|
|
425
609
|
grid-template-columns: minmax(0, 1fr);
|
|
426
|
-
|
|
427
|
-
z-index: 20;
|
|
610
|
+
gap: var(--space-12);
|
|
428
611
|
}
|
|
429
|
-
|
|
612
|
+
/* a phone's sheet has its grabber on its head */
|
|
613
|
+
wa-drawer[placement="bottom"]::part(header)::before {
|
|
614
|
+
content: "";
|
|
615
|
+
position: absolute;
|
|
616
|
+
top: var(--space-6);
|
|
617
|
+
left: 50%;
|
|
618
|
+
width: var(--space-32);
|
|
619
|
+
height: var(--space-4);
|
|
620
|
+
border-radius: var(--radius-pill);
|
|
621
|
+
background: var(--edge);
|
|
622
|
+
translate: -50% 0;
|
|
623
|
+
}
|
|
624
|
+
wa-drawer[placement="bottom"]::part(header) {
|
|
625
|
+
position: relative;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/* Web Awesome's fields: a label as joined's (13px, its weight), a field a control tall (32px), a finger tall on a
|
|
629
|
+
phone; a number written from its start; said, not changed (readonly), as its words alone */
|
|
630
|
+
:root {
|
|
631
|
+
--wa-form-control-height: var(--size-control);
|
|
632
|
+
--wa-form-control-padding-block: var(--space-6);
|
|
633
|
+
--wa-form-control-padding-inline: var(--space-10);
|
|
634
|
+
}
|
|
635
|
+
@media (max-width: 40rem) {
|
|
636
|
+
:root {
|
|
637
|
+
--wa-form-control-height: var(--size-finger);
|
|
638
|
+
--wa-form-control-padding-block: var(--space-12);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
:where(wa-input, wa-number-input, wa-textarea, wa-select)::part(form-control-label) {
|
|
642
|
+
font: var(--font-label);
|
|
643
|
+
}
|
|
644
|
+
/* a field in a line of its own (a box to add by): its label its name for a screen reader alone */
|
|
645
|
+
:where(wa-input, wa-number-input, wa-textarea, wa-select).j-bare::part(form-control-label) {
|
|
646
|
+
position: absolute;
|
|
647
|
+
width: 1px;
|
|
648
|
+
height: 1px;
|
|
649
|
+
overflow: hidden;
|
|
650
|
+
clip-path: inset(50%);
|
|
651
|
+
}
|
|
652
|
+
wa-number-input::part(input) {
|
|
653
|
+
text-align: start;
|
|
654
|
+
}
|
|
655
|
+
wa-number-input::part(start),
|
|
656
|
+
wa-number-input::part(end) {
|
|
657
|
+
flex: none;
|
|
658
|
+
margin: 0;
|
|
659
|
+
}
|
|
660
|
+
:where(wa-input, wa-number-input, wa-textarea)[readonly]::part(base) {
|
|
661
|
+
border-color: transparent;
|
|
662
|
+
background: transparent;
|
|
663
|
+
}
|
|
664
|
+
:where(wa-input, wa-number-input, wa-textarea)[readonly]::part(input) {
|
|
665
|
+
padding-inline: 0;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/* a card (wa-card): what holds a part of a page, in a 1px edge, 4px corners, card's ground and no shadow; an app
|
|
669
|
+
sets its --spacing, and lays out what's in it */
|
|
670
|
+
wa-card {
|
|
671
|
+
--spacing: var(--space-12);
|
|
672
|
+
box-shadow: none;
|
|
673
|
+
}
|
|
674
|
+
/* (clipped to its corners, never a box that scrolls: what's held at the screen's foot in it still is) */
|
|
675
|
+
wa-card::part(body) {
|
|
676
|
+
overflow: clip;
|
|
677
|
+
border-radius: inherit;
|
|
678
|
+
}
|
|
679
|
+
/* a toast (src/toast.ts), as the group's notice is: as wide as its words, as the page allows less 1rem a side, at
|
|
680
|
+
its middle */
|
|
681
|
+
wa-toast {
|
|
682
|
+
--width: min(calc(var(--size-said) + 2 * var(--space-16)), 100%);
|
|
683
|
+
padding-inline: var(--space-16);
|
|
684
|
+
}
|
|
685
|
+
wa-toast-item {
|
|
686
|
+
align-self: center;
|
|
687
|
+
width: max-content;
|
|
688
|
+
max-width: 100%;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/* a row (Row, design.md "A row"): whatever holds a .j-open is one. All of it is the one target but its other
|
|
692
|
+
buttons, which do something else (a tick, a grip); a finger tall at least; a hairline between it and the next.
|
|
693
|
+
Under the pointer it says it opens, all its width; the one whose drawer is open ([aria-current] on its
|
|
694
|
+
.j-open) keeps that ground, and a stripe of accent at its left. Zero weight: an app's own rule for its item wins */
|
|
695
|
+
:where(:has(> .j-open)) {
|
|
696
|
+
position: relative;
|
|
697
|
+
display: flex;
|
|
698
|
+
align-items: stretch;
|
|
699
|
+
border-bottom: 1px solid var(--line);
|
|
700
|
+
}
|
|
701
|
+
:where(:has(> .j-open)):last-child {
|
|
702
|
+
border-bottom: 0;
|
|
703
|
+
}
|
|
704
|
+
:where(:has(> .j-open:is(:hover, [aria-current]):enabled)) {
|
|
705
|
+
background: var(--card-hover);
|
|
706
|
+
}
|
|
707
|
+
:where(:has(> .j-open[aria-current]))::before {
|
|
708
|
+
content: "";
|
|
709
|
+
position: absolute;
|
|
710
|
+
inset: 0 auto 0 0;
|
|
711
|
+
width: 3px;
|
|
712
|
+
background: var(--accent);
|
|
713
|
+
}
|
|
714
|
+
.j-open {
|
|
715
|
+
flex: 1;
|
|
716
|
+
box-sizing: border-box;
|
|
717
|
+
min-width: 0;
|
|
718
|
+
min-height: var(--size-finger);
|
|
719
|
+
display: flex;
|
|
720
|
+
align-items: center;
|
|
721
|
+
gap: var(--space-12);
|
|
722
|
+
padding: var(--space-10) var(--space-12) var(--space-10) var(--space-16);
|
|
723
|
+
border: 0;
|
|
724
|
+
background: none;
|
|
725
|
+
color: var(--ink);
|
|
726
|
+
font: var(--font-row);
|
|
727
|
+
text-align: left;
|
|
728
|
+
cursor: pointer;
|
|
729
|
+
}
|
|
730
|
+
/* after a tick, its words start where the tick's room ends */
|
|
731
|
+
.j-tick + .j-open {
|
|
732
|
+
padding-left: var(--space-4);
|
|
733
|
+
}
|
|
734
|
+
.j-open:focus-visible {
|
|
735
|
+
outline: var(--size-ring) solid var(--accent);
|
|
736
|
+
outline-offset: -2px;
|
|
737
|
+
}
|
|
738
|
+
/* its words, and under them what more is said of it, one line, cut short */
|
|
739
|
+
.j-open > .j-words {
|
|
740
|
+
flex: 1;
|
|
741
|
+
min-width: 0;
|
|
430
742
|
display: grid;
|
|
431
|
-
gap:
|
|
743
|
+
gap: var(--space-4);
|
|
744
|
+
}
|
|
745
|
+
.j-open > .j-words > b {
|
|
746
|
+
font: inherit;
|
|
747
|
+
/* the row's name bold, as the kit's rows draw it (src/rows.css) */
|
|
748
|
+
font-weight: 600;
|
|
749
|
+
overflow-wrap: anywhere;
|
|
750
|
+
}
|
|
751
|
+
.j-open > .j-words > span {
|
|
752
|
+
overflow: hidden;
|
|
753
|
+
color: var(--muted);
|
|
754
|
+
font: var(--font-small);
|
|
755
|
+
text-overflow: ellipsis;
|
|
756
|
+
white-space: nowrap;
|
|
757
|
+
}
|
|
758
|
+
.j-open > .j-words > span:empty {
|
|
759
|
+
display: none;
|
|
760
|
+
}
|
|
761
|
+
/* the mark that it opens, at its end: faint, ink under the pointer and while it's open */
|
|
762
|
+
.j-open > svg.icon {
|
|
763
|
+
flex: none;
|
|
764
|
+
color: var(--edge);
|
|
765
|
+
}
|
|
766
|
+
.j-open:is(:hover, [aria-current]) > svg.icon {
|
|
767
|
+
color: var(--ink);
|
|
768
|
+
}
|
|
769
|
+
/* one this person may not open: its words alone, no mark, nothing to press */
|
|
770
|
+
.j-open:disabled {
|
|
771
|
+
color: var(--ink);
|
|
772
|
+
cursor: default;
|
|
773
|
+
}
|
|
774
|
+
.j-open:disabled > svg.icon {
|
|
775
|
+
display: none;
|
|
776
|
+
}
|
|
777
|
+
/* .j-tick: a tick on a row (a wa-checkbox), a finger wide, in line with a card's 16px edge; its words its name for
|
|
778
|
+
a screen reader alone. Its state is its own, never a colour of the row's */
|
|
779
|
+
.j-tick {
|
|
780
|
+
flex: none;
|
|
781
|
+
display: inline-flex;
|
|
782
|
+
align-items: center;
|
|
783
|
+
justify-content: center;
|
|
784
|
+
width: var(--size-finger);
|
|
785
|
+
height: var(--size-finger);
|
|
786
|
+
margin-left: var(--space-4);
|
|
787
|
+
}
|
|
788
|
+
.j-tick::part(label) {
|
|
789
|
+
position: absolute;
|
|
790
|
+
width: 1px;
|
|
791
|
+
height: 1px;
|
|
792
|
+
overflow: hidden;
|
|
793
|
+
clip-path: inset(50%);
|
|
432
794
|
}
|
|
433
795
|
|
|
796
|
+
/* .j-mention: a thing named away from its own place (design.md, "A peek"): a pill in the page's ground, its words
|
|
797
|
+
small; a tap peeks. In a row it stands under the row's words, in line with them */
|
|
798
|
+
.j-mention {
|
|
799
|
+
display: flex;
|
|
800
|
+
align-items: center;
|
|
801
|
+
box-sizing: border-box;
|
|
802
|
+
max-width: calc(100% - 2 * var(--space-16));
|
|
803
|
+
padding: 0;
|
|
804
|
+
border: 0;
|
|
805
|
+
background: none;
|
|
806
|
+
color: var(--ink);
|
|
807
|
+
cursor: pointer;
|
|
808
|
+
}
|
|
809
|
+
/* its look, a pill: what's tapped may be taller than what's drawn (a finger tall on a phone, below) */
|
|
810
|
+
.j-mention > span {
|
|
811
|
+
display: block;
|
|
812
|
+
min-width: 0;
|
|
813
|
+
padding: 0 var(--space-10);
|
|
814
|
+
border: 1px solid var(--edge);
|
|
815
|
+
border-radius: var(--radius-pill);
|
|
816
|
+
background: var(--paper);
|
|
817
|
+
font: var(--font-tool);
|
|
818
|
+
line-height: calc(var(--space-24) - 2 * 1px);
|
|
819
|
+
overflow: hidden;
|
|
820
|
+
text-overflow: ellipsis;
|
|
821
|
+
white-space: nowrap;
|
|
822
|
+
}
|
|
823
|
+
.j-mention:is(:hover, :focus-visible, [aria-expanded="true"]) > span {
|
|
824
|
+
border-color: var(--ink);
|
|
825
|
+
}
|
|
826
|
+
/* a row that mentions something: its words keep their line, all its width, and the mention stands under them */
|
|
827
|
+
:where(:has(> .j-open)):has(> .j-mention) {
|
|
828
|
+
flex-wrap: wrap;
|
|
829
|
+
}
|
|
830
|
+
:has(> .j-mention) > .j-open {
|
|
831
|
+
flex-basis: 100%;
|
|
832
|
+
}
|
|
833
|
+
:has(> .j-mention) > .j-tick + .j-open {
|
|
834
|
+
flex-basis: calc(100% - var(--size-finger) - var(--space-4));
|
|
835
|
+
padding-bottom: var(--space-4);
|
|
836
|
+
}
|
|
837
|
+
.j-open ~ .j-mention {
|
|
838
|
+
margin: 0 var(--space-16) var(--space-10);
|
|
839
|
+
}
|
|
840
|
+
.j-tick ~ .j-open ~ .j-mention {
|
|
841
|
+
margin-left: calc(var(--size-finger) + var(--space-8));
|
|
842
|
+
}
|
|
843
|
+
/* .j-peek: a little more of a thing, where it was tapped: Web Awesome's wa-popover, by its mention (peek(),
|
|
844
|
+
src/parts.ts), no wider than a sheet. Its head the thing's name and its ×; then what's said of it; at its foot the
|
|
845
|
+
way to open it whole. A tap elsewhere or Escape takes it away, and the page isn't dimmed */
|
|
846
|
+
.j-peek {
|
|
847
|
+
--max-width: min(var(--size-sheet), calc(100vw - 2 * var(--gutter)));
|
|
848
|
+
--arrow-size: 0px;
|
|
849
|
+
}
|
|
850
|
+
.j-peek::part(body) {
|
|
851
|
+
width: var(--max-width);
|
|
852
|
+
box-sizing: border-box;
|
|
853
|
+
padding: var(--space-12) var(--space-16) var(--space-16);
|
|
854
|
+
}
|
|
855
|
+
.j-peek > header {
|
|
856
|
+
display: flex;
|
|
857
|
+
align-items: center;
|
|
858
|
+
justify-content: space-between;
|
|
859
|
+
gap: var(--space-8);
|
|
860
|
+
margin-right: calc(-1 * var(--space-8));
|
|
861
|
+
}
|
|
862
|
+
.j-peek > header > b {
|
|
863
|
+
min-width: 0;
|
|
864
|
+
font: var(--font-title);
|
|
865
|
+
overflow-wrap: anywhere;
|
|
866
|
+
}
|
|
867
|
+
.j-peek > .j-peek-body {
|
|
868
|
+
display: grid;
|
|
869
|
+
gap: var(--space-8);
|
|
870
|
+
margin: var(--space-4) 0 var(--space-16);
|
|
871
|
+
color: var(--muted);
|
|
872
|
+
font: var(--font-body);
|
|
873
|
+
}
|
|
874
|
+
.j-peek > .j-peek-body:empty {
|
|
875
|
+
margin-top: 0;
|
|
876
|
+
}
|
|
877
|
+
.j-peek > footer {
|
|
878
|
+
display: flex;
|
|
879
|
+
justify-content: flex-end;
|
|
880
|
+
}
|
|
881
|
+
/* a place popped: a small map of it, its pin at its middle, on the well a map has before its tiles */
|
|
882
|
+
.j-place {
|
|
883
|
+
position: relative;
|
|
884
|
+
overflow: hidden;
|
|
885
|
+
height: calc(5 * var(--space-32));
|
|
886
|
+
border: 1px solid var(--edge);
|
|
887
|
+
border-radius: var(--radius);
|
|
888
|
+
background: var(--well);
|
|
889
|
+
}
|
|
890
|
+
.j-place > img {
|
|
891
|
+
position: absolute;
|
|
892
|
+
}
|
|
893
|
+
.j-place > i {
|
|
894
|
+
position: absolute;
|
|
895
|
+
inset: 50% auto auto 50%;
|
|
896
|
+
width: var(--size-pin);
|
|
897
|
+
height: var(--size-pin);
|
|
898
|
+
margin: calc(var(--size-pin) / -2);
|
|
899
|
+
box-sizing: border-box;
|
|
900
|
+
border: calc(var(--space-4) / 2) solid var(--card);
|
|
901
|
+
border-radius: var(--radius-dot);
|
|
902
|
+
background: var(--accent);
|
|
903
|
+
}
|
|
434
904
|
/* .j-foot: a foot fixed at the screen's foot (a quick add, a balance), run on past it by 40vh, its words lifted by as
|
|
435
905
|
much, so nothing of the page shows under it, where an iPhone's address bar floats over the page and comes and
|
|
436
906
|
goes; its own padding below its words is --foot-pad, and the safe area's below that. An app sets its sides and its
|
|
@@ -445,31 +915,9 @@
|
|
|
445
915
|
background: var(--card);
|
|
446
916
|
}
|
|
447
917
|
|
|
448
|
-
/*
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
.j-scrim {
|
|
452
|
-
position: fixed;
|
|
453
|
-
inset: 0;
|
|
454
|
-
z-index: 12;
|
|
455
|
-
background: var(--scrim);
|
|
456
|
-
opacity: 0;
|
|
457
|
-
pointer-events: none;
|
|
458
|
-
transition: opacity var(--fall);
|
|
459
|
-
}
|
|
460
|
-
.j-scrim.j-on {
|
|
461
|
-
opacity: 1;
|
|
462
|
-
pointer-events: auto;
|
|
463
|
-
transition: opacity var(--rise);
|
|
464
|
-
}
|
|
465
|
-
.j-scrim.j-asking {
|
|
466
|
-
z-index: 30;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/* motion, as an iPhone's (src/tokens.json, motion): a drawer and a sheet rise into place and go back the way they
|
|
470
|
-
came (from the foot on a phone; wider, a drawer from the right, a sheet a little from below); a modal settles in
|
|
471
|
-
from a little larger and fades as it goes; a menu drops from its button. Under prefers-reduced-motion, nothing
|
|
472
|
-
moves */
|
|
918
|
+
/* motion, as an iPhone's (src/tokens.json, motion): wider, a docked drawer comes from the right and a sheet a little
|
|
919
|
+
from below, and each goes back the way it came; a menu drops from its button (on a phone, the sheet rises as Web
|
|
920
|
+
Awesome's drawer does). Under prefers-reduced-motion, nothing moves */
|
|
473
921
|
@media (prefers-reduced-motion: no-preference) {
|
|
474
922
|
:is(.drawer, .sheet) {
|
|
475
923
|
transition:
|
|
@@ -504,28 +952,6 @@
|
|
|
504
952
|
transform: translateY(12px);
|
|
505
953
|
}
|
|
506
954
|
}
|
|
507
|
-
dialog {
|
|
508
|
-
transition:
|
|
509
|
-
opacity var(--ask),
|
|
510
|
-
transform var(--ask),
|
|
511
|
-
display var(--ask) allow-discrete,
|
|
512
|
-
overlay var(--ask) allow-discrete;
|
|
513
|
-
}
|
|
514
|
-
dialog:not([open]) {
|
|
515
|
-
opacity: 0;
|
|
516
|
-
transform: scale(0.96);
|
|
517
|
-
transition:
|
|
518
|
-
opacity var(--ask-out),
|
|
519
|
-
transform var(--ask-out),
|
|
520
|
-
display var(--ask-out) allow-discrete,
|
|
521
|
-
overlay var(--ask-out) allow-discrete;
|
|
522
|
-
}
|
|
523
|
-
@starting-style {
|
|
524
|
-
dialog[open] {
|
|
525
|
-
opacity: 0;
|
|
526
|
-
transform: scale(1.06);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
955
|
.j-choices[popover] {
|
|
530
956
|
transition:
|
|
531
957
|
opacity var(--drop),
|
|
@@ -545,74 +971,32 @@
|
|
|
545
971
|
}
|
|
546
972
|
}
|
|
547
973
|
|
|
548
|
-
/* on a phone, the drawer and a sheet are a phone's sheet: the width of the screen, risen from the foot, rounded at
|
|
549
|
-
the top and edged by nothing but the scrim behind; a grabber on its head, which stays in view as it scrolls */
|
|
550
|
-
@media (max-width: 40rem) {
|
|
551
|
-
:is(.drawer, .sheet) {
|
|
552
|
-
inset: auto 0 0;
|
|
553
|
-
width: auto;
|
|
554
|
-
max-height: 88dvh;
|
|
555
|
-
overflow: auto;
|
|
556
|
-
margin: 0;
|
|
557
|
-
border: 0;
|
|
558
|
-
border-radius: 14px 14px 0 0;
|
|
559
|
-
--pad: var(--space-16);
|
|
560
|
-
--pad-end: calc(var(--space-16) + env(safe-area-inset-bottom));
|
|
561
|
-
padding-bottom: var(--pad-end);
|
|
562
|
-
}
|
|
563
|
-
/* the drawer leaves the page in view above it: what it changes is there */
|
|
564
|
-
.drawer {
|
|
565
|
-
max-height: 70dvh;
|
|
566
|
-
}
|
|
567
|
-
:where(.drawer, .sheet) > :is(header, h2):first-child,
|
|
568
|
-
:where(.drawer, .sheet) > form > header:first-child {
|
|
569
|
-
padding-top: var(--space-20);
|
|
570
|
-
border-radius: 14px 14px 0 0;
|
|
571
|
-
}
|
|
572
|
-
:where(.drawer, .sheet) > :is(header, h2):first-child::before,
|
|
573
|
-
:where(.drawer, .sheet) > form > header:first-child::before {
|
|
574
|
-
content: "";
|
|
575
|
-
position: absolute;
|
|
576
|
-
top: var(--space-6);
|
|
577
|
-
left: 50%;
|
|
578
|
-
width: 36px;
|
|
579
|
-
height: 5px;
|
|
580
|
-
border-radius: 3px;
|
|
581
|
-
background: var(--edge);
|
|
582
|
-
transform: translateX(-50%);
|
|
583
|
-
}
|
|
584
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
585
|
-
.drawer[hidden],
|
|
586
|
-
.sheet:not(:popover-open) {
|
|
587
|
-
opacity: 1;
|
|
588
|
-
transform: translateY(100%);
|
|
589
|
-
}
|
|
590
|
-
@starting-style {
|
|
591
|
-
.drawer:not([hidden]),
|
|
592
|
-
.sheet:popover-open {
|
|
593
|
-
opacity: 1;
|
|
594
|
-
transform: translateY(100%);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
974
|
@media (max-width: 40rem), (pointer: coarse) {
|
|
975
|
+
/* every tool, a small one too (.act.small outweighs .act: named here), and a file's button */
|
|
600
976
|
.act,
|
|
977
|
+
.act.small,
|
|
978
|
+
:where(input[type="file"])::file-selector-button,
|
|
979
|
+
:where(summary),
|
|
601
980
|
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]), select) {
|
|
602
|
-
min-height:
|
|
981
|
+
min-height: var(--size-finger);
|
|
982
|
+
}
|
|
983
|
+
/* a mention is pressed too: a finger tall, its pill drawn as it is anywhere (Apple's HIG: the target 44pt, not
|
|
984
|
+
the drawing) */
|
|
985
|
+
.j-mention {
|
|
986
|
+
min-height: var(--size-finger);
|
|
603
987
|
}
|
|
604
988
|
.icon-only {
|
|
605
|
-
width:
|
|
606
|
-
height:
|
|
989
|
+
width: var(--size-finger);
|
|
990
|
+
height: var(--size-finger);
|
|
607
991
|
}
|
|
608
992
|
:is(.j-choices, .j-chips) > button,
|
|
609
993
|
.j-chip:has(> .icon-only) {
|
|
610
|
-
min-height:
|
|
994
|
+
min-height: var(--size-finger);
|
|
611
995
|
}
|
|
612
996
|
.j-chip > .icon-only {
|
|
613
|
-
width:
|
|
614
|
-
height:
|
|
615
|
-
margin-right: -
|
|
997
|
+
width: var(--size-finger);
|
|
998
|
+
height: var(--size-finger);
|
|
999
|
+
margin-right: calc(-1 * var(--space-10));
|
|
616
1000
|
}
|
|
617
1001
|
}
|
|
618
1002
|
}
|