@charmland/gem 0.0.0-stage → 0.1.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/LICENSE +177 -0
- package/NOTICE +13 -0
- package/README.md +24 -2
- package/assets/fonts/Hypography-Italic.woff2 +0 -0
- package/assets/fonts/Hypography-Regular.woff2 +0 -0
- package/assets/fonts/PPFraktionMono-Variable.ttf +0 -0
- package/assets/fonts/PPFraktionMonoItalic-Variable.ttf +0 -0
- package/assets/fonts/PPFraktionSans-Variable.ttf +0 -0
- package/assets/fonts/PPFraktionSansItalic-Variable.ttf +0 -0
- package/bin/gem-elm.js +3 -0
- package/dist/browser/boot.d.ts +10 -0
- package/dist/browser/boot.js +14 -0
- package/dist/browser/color-scheme.d.ts +9 -0
- package/dist/browser/color-scheme.js +76 -0
- package/dist/browser/ports.d.ts +37 -0
- package/dist/browser/ports.js +90 -0
- package/dist/browser/router.d.ts +5 -0
- package/dist/browser/router.js +35 -0
- package/dist/browser/runtime.d.ts +12 -0
- package/dist/browser/runtime.js +22 -0
- package/dist/browser/tabs.d.ts +9 -0
- package/dist/browser/tabs.js +69 -0
- package/dist/default/theme.css +4664 -0
- package/dist/default/theme.js +13652 -0
- package/dist/node/build.d.ts +16 -0
- package/dist/node/build.js +48 -0
- package/dist/node/cli.d.ts +2 -0
- package/dist/node/cli.js +21 -0
- package/elm.json +28 -0
- package/package.json +86 -4
- package/src/app/Gem/App.elm +1275 -0
- package/src/app/Gem/CharmSticker.elm +35 -0
- package/src/app/Gem/Components.elm +292 -0
- package/src/app/Gem/Main.elm +17 -0
- package/src/app/Gem/Ports.elm +32 -0
- package/src/app/Gem/Shell.elm +964 -0
- package/src/browser/theme.d.ts +1 -0
- package/src/core/Gem/Node.elm +219 -0
- package/src/core/Gem/Page.elm +409 -0
- package/src/core/Gem/Render.elm +472 -0
- package/src/core/Gem/Slots.elm +11 -0
- package/src/styles/docs.scss +1083 -0
- package/src/styles/fonts.scss +51 -0
- package/src/styles/gem.scss +362 -0
- package/src/styles/theme.scss +8 -0
- package/src/styles/ui/burger.scss +272 -0
- package/src/styles/ui/button.scss +350 -0
- package/src/styles/ui/charmtone.scss +70 -0
- package/src/styles/ui/controls-extra.scss +316 -0
- package/src/styles/ui/controls.scss +110 -0
- package/src/styles/ui/display.scss +359 -0
- package/src/styles/ui/dropdown.scss +341 -0
- package/src/styles/ui/form.scss +314 -0
- package/src/styles/ui/menu.scss +200 -0
- package/src/styles/ui/meter.scss +124 -0
- package/src/styles/ui/modal.scss +545 -0
- package/src/styles/ui/oauth.scss +50 -0
- package/src/styles/ui/page-nav.scss +63 -0
- package/src/styles/ui/reset.scss +111 -0
- package/src/styles/ui/scrollbar.scss +39 -0
- package/src/styles/ui/search.scss +164 -0
- package/src/styles/ui/sidebar.scss +229 -0
- package/src/styles/ui/squircle.scss +60 -0
- package/src/styles/ui/table.scss +97 -0
- package/src/styles/ui/theme.scss +132 -0
- package/src/styles/ui/toast.scss +587 -0
- package/src/styles/ui/toc.scss +128 -0
- package/src/styles/ui/typography.scss +21 -0
- package/src/styles/ui/ui.scss +33 -0
- package/src/ui/Ui/Badge.elm +51 -0
- package/src/ui/Ui/Banner.elm +97 -0
- package/src/ui/Ui/Burger.elm +259 -0
- package/src/ui/Ui/Button.elm +261 -0
- package/src/ui/Ui/Card.elm +32 -0
- package/src/ui/Ui/Cards.elm +15 -0
- package/src/ui/Ui/ChoiceGroup.elm +62 -0
- package/src/ui/Ui/CopyButton.elm +139 -0
- package/src/ui/Ui/Divider.elm +16 -0
- package/src/ui/Ui/Dropdown.elm +600 -0
- package/src/ui/Ui/Empty.elm +41 -0
- package/src/ui/Ui/ErrorBubble.elm +34 -0
- package/src/ui/Ui/Field.elm +45 -0
- package/src/ui/Ui/FormStatus.elm +32 -0
- package/src/ui/Ui/Icon.elm +381 -0
- package/src/ui/Ui/InlineForm.elm +51 -0
- package/src/ui/Ui/Input.elm +113 -0
- package/src/ui/Ui/KeyValue.elm +25 -0
- package/src/ui/Ui/ListRow.elm +67 -0
- package/src/ui/Ui/Loader.elm +32 -0
- package/src/ui/Ui/Logo/Charm.elm +21 -0
- package/src/ui/Ui/Logo/CharmMark.elm +32 -0
- package/src/ui/Ui/Logo/CharmSticker.elm +35 -0
- package/src/ui/Ui/Logo/Discord.elm +26 -0
- package/src/ui/Ui/Logo/GitHub.elm +21 -0
- package/src/ui/Ui/Logo/Google.elm +21 -0
- package/src/ui/Ui/Logo/Hexy.elm +29 -0
- package/src/ui/Ui/Logo/Hyper.elm +42 -0
- package/src/ui/Ui/Logo/Integration.elm +117 -0
- package/src/ui/Ui/Logo/Prism.elm +35 -0
- package/src/ui/Ui/Logos.elm +115 -0
- package/src/ui/Ui/Menu.elm +348 -0
- package/src/ui/Ui/Meter.elm +132 -0
- package/src/ui/Ui/Modal.elm +247 -0
- package/src/ui/Ui/Motion.elm +32 -0
- package/src/ui/Ui/NumberBox.elm +86 -0
- package/src/ui/Ui/OAuthButton.elm +39 -0
- package/src/ui/Ui/PageNav.elm +65 -0
- package/src/ui/Ui/Pager.elm +49 -0
- package/src/ui/Ui/Search.elm +396 -0
- package/src/ui/Ui/SearchBox.elm +78 -0
- package/src/ui/Ui/Section.elm +21 -0
- package/src/ui/Ui/Sidebar.elm +239 -0
- package/src/ui/Ui/Stat.elm +29 -0
- package/src/ui/Ui/Switch.elm +34 -0
- package/src/ui/Ui/Table.elm +89 -0
- package/src/ui/Ui/Tabs.elm +280 -0
- package/src/ui/Ui/ToC.elm +120 -0
- package/src/ui/Ui/Toast.elm +1145 -0
- package/src/ui/Ui/Toolbar.elm +31 -0
- package/src/ui/Ui/TwoStepConfirm.elm +159 -0
- package/src/ui/Ui/Typography.elm +33 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
@use "charmtone";
|
|
2
|
+
@use "controls" as *;
|
|
3
|
+
|
|
4
|
+
// Form controls: one-line fields and textareas share the recessed
|
|
5
|
+
// fill so they read as surfaces on the page. The border stays
|
|
6
|
+
// transparent so the focus ring can paint without shifting the
|
|
7
|
+
// layout. Selects are not styled here: the select-shaped role is
|
|
8
|
+
// Ui.Dropdown, rendered as a button plus menu.
|
|
9
|
+
|
|
10
|
+
input[type="text"],
|
|
11
|
+
input[type="search"],
|
|
12
|
+
input[type="email"],
|
|
13
|
+
input[type="password"],
|
|
14
|
+
input[type="number"],
|
|
15
|
+
input[type="date"],
|
|
16
|
+
input[type="url"],
|
|
17
|
+
textarea {
|
|
18
|
+
border: $control-border solid transparent;
|
|
19
|
+
border-radius: calc(#{$control-radius} * var(--squircle-scale, 1));
|
|
20
|
+
background: $control-fill;
|
|
21
|
+
color: var(--fg);
|
|
22
|
+
font: inherit;
|
|
23
|
+
transition:
|
|
24
|
+
border-color 125ms ease,
|
|
25
|
+
box-shadow 125ms ease;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
input[type="text"],
|
|
29
|
+
input[type="search"],
|
|
30
|
+
input[type="email"],
|
|
31
|
+
input[type="password"],
|
|
32
|
+
input[type="number"],
|
|
33
|
+
input[type="date"],
|
|
34
|
+
input[type="url"] {
|
|
35
|
+
height: $control-height;
|
|
36
|
+
padding: 0 0.75rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
textarea {
|
|
40
|
+
padding: 0.5rem 0.75rem;
|
|
41
|
+
line-height: 1.4;
|
|
42
|
+
resize: vertical;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
input::placeholder,
|
|
46
|
+
textarea::placeholder {
|
|
47
|
+
color: var(--tertiary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
input.compact {
|
|
51
|
+
height: $control-height-sm;
|
|
52
|
+
padding-inline: 0.65rem;
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// A field that can't be edited dims the way a disabled button does.
|
|
57
|
+
:is(
|
|
58
|
+
input[type="text"],
|
|
59
|
+
input[type="search"],
|
|
60
|
+
input[type="email"],
|
|
61
|
+
input[type="password"],
|
|
62
|
+
input[type="number"],
|
|
63
|
+
input[type="date"],
|
|
64
|
+
input[type="url"],
|
|
65
|
+
textarea
|
|
66
|
+
):disabled {
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// A refused value: the border turns to the danger token and stays there
|
|
72
|
+
// under focus, which rings in danger rather than purple, as the
|
|
73
|
+
// destructive buttons do.
|
|
74
|
+
input[aria-invalid="true"],
|
|
75
|
+
textarea[aria-invalid="true"] {
|
|
76
|
+
border-color: var(--danger);
|
|
77
|
+
|
|
78
|
+
&:focus-visible {
|
|
79
|
+
@include control-focus-danger;
|
|
80
|
+
border-color: var(--danger);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
input[type="text"]:focus-visible,
|
|
85
|
+
input[type="search"]:focus-visible,
|
|
86
|
+
input[type="email"]:focus-visible,
|
|
87
|
+
input[type="password"]:focus-visible,
|
|
88
|
+
input[type="number"]:focus-visible,
|
|
89
|
+
input[type="date"]:focus-visible,
|
|
90
|
+
input[type="url"]:focus-visible,
|
|
91
|
+
textarea:focus-visible {
|
|
92
|
+
@include control-focus;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The mono device-code field (XXXX-XXXX inputs).
|
|
96
|
+
input.code {
|
|
97
|
+
font-family: $mono;
|
|
98
|
+
letter-spacing: 0.08em;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// The on/off switch: a checkbox restyled as a sliding thumb in a
|
|
102
|
+
// recessed track, charple when on.
|
|
103
|
+
input.switch {
|
|
104
|
+
appearance: none;
|
|
105
|
+
display: inline-block;
|
|
106
|
+
width: 2.75rem;
|
|
107
|
+
height: 1.5rem;
|
|
108
|
+
min-width: 2.75rem;
|
|
109
|
+
margin: 0;
|
|
110
|
+
padding: 0;
|
|
111
|
+
border: $control-border solid transparent;
|
|
112
|
+
border-radius: 9999px;
|
|
113
|
+
background: var(--well);
|
|
114
|
+
position: relative;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
transition: background-color 150ms ease;
|
|
117
|
+
vertical-align: middle;
|
|
118
|
+
|
|
119
|
+
&::after {
|
|
120
|
+
content: "";
|
|
121
|
+
display: block;
|
|
122
|
+
width: 1.25rem;
|
|
123
|
+
height: 1.25rem;
|
|
124
|
+
border-radius: 9999px;
|
|
125
|
+
background: charmtone.$salt;
|
|
126
|
+
box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
|
|
127
|
+
transition: transform 150ms ease;
|
|
128
|
+
transform: translateX(0);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:checked {
|
|
132
|
+
background: charmtone.$charple;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:checked::after {
|
|
136
|
+
// The drop shadow alone leaves the white thumb without an edge once
|
|
137
|
+
// the track turns green, so a 1px ring (no blur) separates the two
|
|
138
|
+
// light-on-light tones. It has to come first: box-shadow paints its
|
|
139
|
+
// layers in order.
|
|
140
|
+
box-shadow:
|
|
141
|
+
0 0 0 1px rgba(charmtone.$pepper, 0.18),
|
|
142
|
+
0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
|
|
143
|
+
transform: translateX(1.25rem);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:disabled {
|
|
147
|
+
cursor: not-allowed;
|
|
148
|
+
opacity: 0.5;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:focus-visible {
|
|
152
|
+
@include control-focus;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// The number box: the browser's spinner replaced by our own chevrons.
|
|
157
|
+
// The extra right padding keeps the typed value clear of them.
|
|
158
|
+
.number-box {
|
|
159
|
+
position: relative;
|
|
160
|
+
|
|
161
|
+
input {
|
|
162
|
+
width: 100%;
|
|
163
|
+
padding-right: 2rem;
|
|
164
|
+
appearance: textfield;
|
|
165
|
+
-webkit-appearance: textfield;
|
|
166
|
+
|
|
167
|
+
&::-webkit-outer-spin-button,
|
|
168
|
+
&::-webkit-inner-spin-button {
|
|
169
|
+
appearance: none;
|
|
170
|
+
-webkit-appearance: none;
|
|
171
|
+
margin: 0;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:focus-within .steppers svg {
|
|
176
|
+
fill: var(--fg);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.steppers {
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: 50%;
|
|
183
|
+
right: 0.55rem;
|
|
184
|
+
translate: 0 -50%;
|
|
185
|
+
display: flex;
|
|
186
|
+
flex-direction: column;
|
|
187
|
+
|
|
188
|
+
button {
|
|
189
|
+
display: flex;
|
|
190
|
+
padding: 0.15rem;
|
|
191
|
+
border: none;
|
|
192
|
+
background: transparent;
|
|
193
|
+
line-height: 0;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
|
|
196
|
+
svg {
|
|
197
|
+
width: 0.7rem;
|
|
198
|
+
height: 0.7rem;
|
|
199
|
+
color: var(--muted);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&.down svg {
|
|
203
|
+
transform: rotate(180deg);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&:hover svg,
|
|
207
|
+
&:focus-visible svg {
|
|
208
|
+
fill: var(--fg);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// The inline form (toolbar-style create): a row of labeled controls
|
|
214
|
+
// ending in a submit button, all bottom-aligned.
|
|
215
|
+
.inline-form {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-wrap: wrap;
|
|
218
|
+
align-items: flex-end;
|
|
219
|
+
gap: 0.75rem;
|
|
220
|
+
|
|
221
|
+
label {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: 0.35rem;
|
|
225
|
+
font-size: 0.8125rem;
|
|
226
|
+
font-weight: 550;
|
|
227
|
+
color: var(--muted);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
input,
|
|
231
|
+
textarea {
|
|
232
|
+
min-width: 10rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.dropdown {
|
|
236
|
+
min-width: 10rem;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Stacked fields (settings-style).
|
|
241
|
+
.fields {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
gap: 1rem;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.field {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
align-items: flex-start;
|
|
251
|
+
gap: 0.5rem;
|
|
252
|
+
|
|
253
|
+
label {
|
|
254
|
+
display: flex;
|
|
255
|
+
flex-direction: column;
|
|
256
|
+
gap: 0.35rem;
|
|
257
|
+
width: 100%;
|
|
258
|
+
font-size: 0.8125rem;
|
|
259
|
+
font-weight: 550;
|
|
260
|
+
color: var(--muted);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
input,
|
|
264
|
+
textarea {
|
|
265
|
+
width: 100%;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.error {
|
|
269
|
+
margin: 0;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Form status lines.
|
|
274
|
+
.error {
|
|
275
|
+
margin: 0;
|
|
276
|
+
color: charmtone.$uni;
|
|
277
|
+
font-size: 0.875rem;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.sent {
|
|
281
|
+
margin: 0;
|
|
282
|
+
color: charmtone.$julep;
|
|
283
|
+
font-size: 0.875rem;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.action-error {
|
|
287
|
+
margin: 0;
|
|
288
|
+
color: var(--warn);
|
|
289
|
+
font-size: 0.875rem;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// The button-group radio (expiry picker, invite roles).
|
|
293
|
+
.expiry {
|
|
294
|
+
display: grid;
|
|
295
|
+
grid-template-columns: repeat(2, 1fr);
|
|
296
|
+
gap: 0.5rem;
|
|
297
|
+
|
|
298
|
+
button {
|
|
299
|
+
padding: 0.4rem 0.9rem;
|
|
300
|
+
background: transparent;
|
|
301
|
+
color: var(--fg);
|
|
302
|
+
border-color: var(--frame);
|
|
303
|
+
|
|
304
|
+
&:hover {
|
|
305
|
+
border-color: charmtone.$blush;
|
|
306
|
+
color: charmtone.$blush;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&.active {
|
|
310
|
+
border-color: charmtone.$blush;
|
|
311
|
+
color: charmtone.$blush;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
@use "charmtone";
|
|
2
|
+
@use "controls" as *;
|
|
3
|
+
|
|
4
|
+
// The popover menu: a ghost trigger button that opens a floating
|
|
5
|
+
// panel of grouped items — the account control from the dashboard's
|
|
6
|
+
// rail, adapted from the Dropdown's open treatment but styled as a
|
|
7
|
+
// ghost button rather than a bordered field.
|
|
8
|
+
|
|
9
|
+
.menu {
|
|
10
|
+
position: relative;
|
|
11
|
+
font-size: 0.8125rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// The ghost trigger: full-width, no border, a hover fill that turns
|
|
15
|
+
// charple/salt and stays up while the panel is open.
|
|
16
|
+
.menu-trigger {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
gap: 0.4rem;
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding: 0.5rem 1rem;
|
|
23
|
+
border: none;
|
|
24
|
+
border-radius: calc(0.75rem * var(--squircle-scale, 1));
|
|
25
|
+
background: none;
|
|
26
|
+
color: inherit;
|
|
27
|
+
font: inherit;
|
|
28
|
+
font-weight: 520;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.menu-trigger .label {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
row-gap: 0.25rem;
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.menu-trigger .label .name {
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
font-weight: 620;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.menu-trigger .label .detail {
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
max-width: 100%;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
font-size: 0.75rem;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
opacity: 0.7;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.menu-trigger .chevron {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
margin-left: 3px;
|
|
62
|
+
color: var(--tertiary);
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
transform: rotate(180deg);
|
|
66
|
+
transition:
|
|
67
|
+
fill 125ms ease,
|
|
68
|
+
opacity 125ms ease,
|
|
69
|
+
transform 150ms ease;
|
|
70
|
+
|
|
71
|
+
svg {
|
|
72
|
+
width: 14px;
|
|
73
|
+
height: 14px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.menu-trigger:hover,
|
|
78
|
+
.menu.open .menu-trigger {
|
|
79
|
+
background: charmtone.$charple;
|
|
80
|
+
color: charmtone.$salt;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.menu-trigger:hover .chevron,
|
|
84
|
+
.menu.open .menu-trigger .chevron {
|
|
85
|
+
fill: charmtone.$salt;
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.menu.open .menu-trigger .chevron {
|
|
90
|
+
transform: rotate(0deg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// The panel: floats above the trigger by default (menu-above) or
|
|
94
|
+
// below (menu-below). Charple surface with inset option rows.
|
|
95
|
+
.menu-panel {
|
|
96
|
+
position: absolute;
|
|
97
|
+
left: 0;
|
|
98
|
+
min-width: 14rem;
|
|
99
|
+
max-width: 20rem;
|
|
100
|
+
border-radius: calc(0.75rem * var(--squircle-scale, 1));
|
|
101
|
+
background: charmtone.$charple;
|
|
102
|
+
color: charmtone.$salt;
|
|
103
|
+
box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
z-index: 40;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.menu-above .menu-panel {
|
|
109
|
+
bottom: calc(100% + 0.5rem);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.menu-below .menu-panel {
|
|
113
|
+
top: calc(100% + 0.5rem);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// The identity head: name + detail, separated from the items by a
|
|
117
|
+
// hairline.
|
|
118
|
+
.menu-head {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
row-gap: 0.25rem;
|
|
122
|
+
padding: 0.75rem 0.75rem 0.75rem 1rem;
|
|
123
|
+
border-bottom: 1px solid rgba(charmtone.$salt, 0.2);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.menu-head .name {
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
text-overflow: ellipsis;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
font-weight: 620;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.menu-head .detail {
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
text-overflow: ellipsis;
|
|
136
|
+
white-space: nowrap;
|
|
137
|
+
font-size: 0.75rem;
|
|
138
|
+
color: rgba(charmtone.$salt, 0.7);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// The items list: inset rows with rounded hover boxes.
|
|
142
|
+
.menu-panel ul {
|
|
143
|
+
list-style: none;
|
|
144
|
+
margin: 0;
|
|
145
|
+
padding: 0.25rem 0;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.menu-panel li {
|
|
151
|
+
padding: 0 0.25rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.menu-item {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 0.5rem;
|
|
158
|
+
width: 100%;
|
|
159
|
+
padding: 0.5rem 0.75rem;
|
|
160
|
+
border: none;
|
|
161
|
+
border-radius: calc(0.5rem * var(--squircle-scale, 1));
|
|
162
|
+
background: none;
|
|
163
|
+
color: inherit;
|
|
164
|
+
font: inherit;
|
|
165
|
+
text-align: left;
|
|
166
|
+
text-decoration: none;
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
text-overflow: ellipsis;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
|
|
172
|
+
.icon {
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
width: 1rem;
|
|
177
|
+
height: 1rem;
|
|
178
|
+
flex-shrink: 0;
|
|
179
|
+
|
|
180
|
+
svg {
|
|
181
|
+
width: 0.85rem;
|
|
182
|
+
height: 0.85rem;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&:hover {
|
|
187
|
+
// The hover steps the menu surface down a rung of the purple
|
|
188
|
+
// ladder rather than swapping in an accent, so every salt label
|
|
189
|
+
// keeps its contrast: salt on blush is 1.95:1, on jelly it is 7.2:1.
|
|
190
|
+
background: charmtone.$jelly;
|
|
191
|
+
color: charmtone.$salt;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Section dividers get a gutter on both sides.
|
|
196
|
+
.menu-divider {
|
|
197
|
+
margin-top: 0.25rem;
|
|
198
|
+
padding-top: 0.25rem;
|
|
199
|
+
border-top: 1px solid rgba(charmtone.$salt, 0.2);
|
|
200
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@use "charmtone";
|
|
2
|
+
@use "controls" as *;
|
|
3
|
+
|
|
4
|
+
// The credit meter: SVG gradient progress bar with an animated reveal
|
|
5
|
+
// clip, plus the error bubble from the auth screens.
|
|
6
|
+
|
|
7
|
+
.credit-meter {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: minmax(0, 1fr) max-content;
|
|
10
|
+
column-gap: 0.5rem;
|
|
11
|
+
align-items: center;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
|
|
14
|
+
.meter-heading {
|
|
15
|
+
grid-column: 1;
|
|
16
|
+
grid-row: 1;
|
|
17
|
+
margin: 0;
|
|
18
|
+
|
|
19
|
+
.meter-max {
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
color: var(--muted);
|
|
22
|
+
font-size: 0.8125rem;
|
|
23
|
+
margin-left: 0.4rem;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.percentage {
|
|
28
|
+
grid-column: 2;
|
|
29
|
+
grid-row: 2;
|
|
30
|
+
align-self: center;
|
|
31
|
+
transform: translateY(0.125rem);
|
|
32
|
+
font-variant-numeric: normal;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
> svg {
|
|
37
|
+
grid-column: 1;
|
|
38
|
+
grid-row: 2;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
display: block;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 1.125rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.track {
|
|
46
|
+
fill: var(--fg);
|
|
47
|
+
rx: 0.5625rem;
|
|
48
|
+
ry: 0.5625rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.reveal,
|
|
52
|
+
.gradient {
|
|
53
|
+
rx: 0.375rem;
|
|
54
|
+
ry: 0.375rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.gradient {
|
|
58
|
+
width: calc(100% - 0.4375rem);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.hazy {
|
|
62
|
+
stop-color: charmtone.$charple;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.charple {
|
|
66
|
+
stop-color: charmtone.$dolly;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:root[data-theme="light"] & {
|
|
70
|
+
.hazy {
|
|
71
|
+
stop-color: charmtone.$zest;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.charple {
|
|
75
|
+
stop-color: charmtone.$bok;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.meter-return {
|
|
80
|
+
grid-column: 1 / -1;
|
|
81
|
+
grid-row: 3;
|
|
82
|
+
min-height: 1lh;
|
|
83
|
+
margin-top: 0.5rem;
|
|
84
|
+
color: var(--muted);
|
|
85
|
+
font-size: 0.875rem;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// The dismissible error balloon with a tail pointing at the field
|
|
90
|
+
// that failed.
|
|
91
|
+
.error-bubble {
|
|
92
|
+
position: absolute;
|
|
93
|
+
bottom: 100%;
|
|
94
|
+
left: 0.625rem;
|
|
95
|
+
margin-bottom: 1.125rem;
|
|
96
|
+
padding: 0.5rem 0.75rem;
|
|
97
|
+
border-radius: calc(0.5rem * var(--squircle-scale, 1));
|
|
98
|
+
background: charmtone.$cherry;
|
|
99
|
+
color: charmtone.$salt;
|
|
100
|
+
font-size: 0.875rem;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
line-height: 1.4;
|
|
103
|
+
white-space: normal;
|
|
104
|
+
z-index: 10;
|
|
105
|
+
opacity: 0;
|
|
106
|
+
// An invisible bubble must not block the controls beneath it.
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
transition: opacity 125ms ease;
|
|
110
|
+
|
|
111
|
+
&.visible {
|
|
112
|
+
opacity: 1;
|
|
113
|
+
pointer-events: auto;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.tail {
|
|
117
|
+
position: absolute;
|
|
118
|
+
bottom: -0.64rem;
|
|
119
|
+
left: 0.75rem;
|
|
120
|
+
width: 1.08rem;
|
|
121
|
+
height: 0.64rem;
|
|
122
|
+
fill: charmtone.$cherry;
|
|
123
|
+
}
|
|
124
|
+
}
|