@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.
Files changed (121) hide show
  1. package/LICENSE +177 -0
  2. package/NOTICE +13 -0
  3. package/README.md +24 -2
  4. package/assets/fonts/Hypography-Italic.woff2 +0 -0
  5. package/assets/fonts/Hypography-Regular.woff2 +0 -0
  6. package/assets/fonts/PPFraktionMono-Variable.ttf +0 -0
  7. package/assets/fonts/PPFraktionMonoItalic-Variable.ttf +0 -0
  8. package/assets/fonts/PPFraktionSans-Variable.ttf +0 -0
  9. package/assets/fonts/PPFraktionSansItalic-Variable.ttf +0 -0
  10. package/bin/gem-elm.js +3 -0
  11. package/dist/browser/boot.d.ts +10 -0
  12. package/dist/browser/boot.js +14 -0
  13. package/dist/browser/color-scheme.d.ts +9 -0
  14. package/dist/browser/color-scheme.js +76 -0
  15. package/dist/browser/ports.d.ts +37 -0
  16. package/dist/browser/ports.js +90 -0
  17. package/dist/browser/router.d.ts +5 -0
  18. package/dist/browser/router.js +35 -0
  19. package/dist/browser/runtime.d.ts +12 -0
  20. package/dist/browser/runtime.js +22 -0
  21. package/dist/browser/tabs.d.ts +9 -0
  22. package/dist/browser/tabs.js +69 -0
  23. package/dist/default/theme.css +4664 -0
  24. package/dist/default/theme.js +13652 -0
  25. package/dist/node/build.d.ts +16 -0
  26. package/dist/node/build.js +48 -0
  27. package/dist/node/cli.d.ts +2 -0
  28. package/dist/node/cli.js +21 -0
  29. package/elm.json +28 -0
  30. package/package.json +86 -4
  31. package/src/app/Gem/App.elm +1275 -0
  32. package/src/app/Gem/CharmSticker.elm +35 -0
  33. package/src/app/Gem/Components.elm +292 -0
  34. package/src/app/Gem/Main.elm +17 -0
  35. package/src/app/Gem/Ports.elm +32 -0
  36. package/src/app/Gem/Shell.elm +964 -0
  37. package/src/browser/theme.d.ts +1 -0
  38. package/src/core/Gem/Node.elm +219 -0
  39. package/src/core/Gem/Page.elm +409 -0
  40. package/src/core/Gem/Render.elm +472 -0
  41. package/src/core/Gem/Slots.elm +11 -0
  42. package/src/styles/docs.scss +1083 -0
  43. package/src/styles/fonts.scss +51 -0
  44. package/src/styles/gem.scss +362 -0
  45. package/src/styles/theme.scss +8 -0
  46. package/src/styles/ui/burger.scss +272 -0
  47. package/src/styles/ui/button.scss +350 -0
  48. package/src/styles/ui/charmtone.scss +70 -0
  49. package/src/styles/ui/controls-extra.scss +316 -0
  50. package/src/styles/ui/controls.scss +110 -0
  51. package/src/styles/ui/display.scss +359 -0
  52. package/src/styles/ui/dropdown.scss +341 -0
  53. package/src/styles/ui/form.scss +314 -0
  54. package/src/styles/ui/menu.scss +200 -0
  55. package/src/styles/ui/meter.scss +124 -0
  56. package/src/styles/ui/modal.scss +545 -0
  57. package/src/styles/ui/oauth.scss +50 -0
  58. package/src/styles/ui/page-nav.scss +63 -0
  59. package/src/styles/ui/reset.scss +111 -0
  60. package/src/styles/ui/scrollbar.scss +39 -0
  61. package/src/styles/ui/search.scss +164 -0
  62. package/src/styles/ui/sidebar.scss +229 -0
  63. package/src/styles/ui/squircle.scss +60 -0
  64. package/src/styles/ui/table.scss +97 -0
  65. package/src/styles/ui/theme.scss +132 -0
  66. package/src/styles/ui/toast.scss +587 -0
  67. package/src/styles/ui/toc.scss +128 -0
  68. package/src/styles/ui/typography.scss +21 -0
  69. package/src/styles/ui/ui.scss +33 -0
  70. package/src/ui/Ui/Badge.elm +51 -0
  71. package/src/ui/Ui/Banner.elm +97 -0
  72. package/src/ui/Ui/Burger.elm +259 -0
  73. package/src/ui/Ui/Button.elm +261 -0
  74. package/src/ui/Ui/Card.elm +32 -0
  75. package/src/ui/Ui/Cards.elm +15 -0
  76. package/src/ui/Ui/ChoiceGroup.elm +62 -0
  77. package/src/ui/Ui/CopyButton.elm +139 -0
  78. package/src/ui/Ui/Divider.elm +16 -0
  79. package/src/ui/Ui/Dropdown.elm +600 -0
  80. package/src/ui/Ui/Empty.elm +41 -0
  81. package/src/ui/Ui/ErrorBubble.elm +34 -0
  82. package/src/ui/Ui/Field.elm +45 -0
  83. package/src/ui/Ui/FormStatus.elm +32 -0
  84. package/src/ui/Ui/Icon.elm +381 -0
  85. package/src/ui/Ui/InlineForm.elm +51 -0
  86. package/src/ui/Ui/Input.elm +113 -0
  87. package/src/ui/Ui/KeyValue.elm +25 -0
  88. package/src/ui/Ui/ListRow.elm +67 -0
  89. package/src/ui/Ui/Loader.elm +32 -0
  90. package/src/ui/Ui/Logo/Charm.elm +21 -0
  91. package/src/ui/Ui/Logo/CharmMark.elm +32 -0
  92. package/src/ui/Ui/Logo/CharmSticker.elm +35 -0
  93. package/src/ui/Ui/Logo/Discord.elm +26 -0
  94. package/src/ui/Ui/Logo/GitHub.elm +21 -0
  95. package/src/ui/Ui/Logo/Google.elm +21 -0
  96. package/src/ui/Ui/Logo/Hexy.elm +29 -0
  97. package/src/ui/Ui/Logo/Hyper.elm +42 -0
  98. package/src/ui/Ui/Logo/Integration.elm +117 -0
  99. package/src/ui/Ui/Logo/Prism.elm +35 -0
  100. package/src/ui/Ui/Logos.elm +115 -0
  101. package/src/ui/Ui/Menu.elm +348 -0
  102. package/src/ui/Ui/Meter.elm +132 -0
  103. package/src/ui/Ui/Modal.elm +247 -0
  104. package/src/ui/Ui/Motion.elm +32 -0
  105. package/src/ui/Ui/NumberBox.elm +86 -0
  106. package/src/ui/Ui/OAuthButton.elm +39 -0
  107. package/src/ui/Ui/PageNav.elm +65 -0
  108. package/src/ui/Ui/Pager.elm +49 -0
  109. package/src/ui/Ui/Search.elm +396 -0
  110. package/src/ui/Ui/SearchBox.elm +78 -0
  111. package/src/ui/Ui/Section.elm +21 -0
  112. package/src/ui/Ui/Sidebar.elm +239 -0
  113. package/src/ui/Ui/Stat.elm +29 -0
  114. package/src/ui/Ui/Switch.elm +34 -0
  115. package/src/ui/Ui/Table.elm +89 -0
  116. package/src/ui/Ui/Tabs.elm +280 -0
  117. package/src/ui/Ui/ToC.elm +120 -0
  118. package/src/ui/Ui/Toast.elm +1145 -0
  119. package/src/ui/Ui/Toolbar.elm +31 -0
  120. package/src/ui/Ui/TwoStepConfirm.elm +159 -0
  121. package/src/ui/Ui/Typography.elm +33 -0
@@ -0,0 +1,359 @@
1
+ @use "charmtone";
2
+ @use "controls" as *;
3
+ @use "sass:color";
4
+
5
+ // Data display: badges, counts, empty states, banners, pagers, list
6
+ // rows, key/value readouts.
7
+
8
+ // Status chips: translucent fills with the saturated text on top, the
9
+ // idiom the team page's role badges set.
10
+ .badge {
11
+ display: inline-block;
12
+ align-self: flex-start;
13
+ margin-left: 0.35rem;
14
+ padding: 0.3rem 0.55rem;
15
+ border-radius: calc(1rem * var(--squircle-scale, 1));
16
+ background: color-mix(in srgb, var(--muted) 12%, transparent);
17
+ color: var(--muted);
18
+ font-size: 0.6875rem;
19
+ font-weight: 620;
20
+ white-space: nowrap;
21
+
22
+ &.active {
23
+ background: color-mix(in srgb, var(--ok) 16%, transparent);
24
+ color: var(--ok);
25
+ }
26
+
27
+ &.revoked {
28
+ background: color-mix(in srgb, var(--danger) 16%, transparent);
29
+ color: var(--danger);
30
+ }
31
+
32
+ &.expired {
33
+ background: color-mix(in srgb, var(--warn) 18%, transparent);
34
+ color: var(--warn);
35
+ }
36
+ }
37
+
38
+ // The count line above lists ("6 members"), in the team page's
39
+ // style: small, quiet, proportional figures, closed by the hairline
40
+ // that heads the entries. The control riding the line's right end
41
+ // aligns its baseline with the figure's.
42
+ // The big-number readout with its quiet caption: a proportional
43
+ // figure beside a small label, baseline-aligned.
44
+ .count {
45
+ display: flex;
46
+ align-items: baseline;
47
+ gap: 0.4rem;
48
+ font-size: 0.75rem;
49
+ font-weight: 400;
50
+ color: var(--muted);
51
+ font-variant-numeric: tabular-nums;
52
+
53
+ .figure {
54
+ line-height: 1;
55
+ font-size: 1.375rem;
56
+ font-weight: 650;
57
+ color: var(--fg);
58
+ }
59
+ }
60
+
61
+ // Plain empty copy: loading, failed, no-match messages.
62
+ .empty {
63
+ font-weight: inherit;
64
+ color: var(--muted);
65
+ }
66
+
67
+ // Empty-card CTA: shown when a list has nothing yet.
68
+ .empty-card {
69
+ display: flex;
70
+ flex-direction: column;
71
+ align-items: center;
72
+ justify-content: center;
73
+ gap: 0.35rem;
74
+ padding: 2.5rem 1.5rem;
75
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
76
+ background: $control-fill;
77
+ text-align: center;
78
+
79
+ h3 {
80
+ margin: 0;
81
+ font-size: 1.0625rem;
82
+ font-weight: 620;
83
+ }
84
+
85
+ p {
86
+ margin: 0;
87
+ max-width: 22rem;
88
+ color: var(--muted);
89
+ font-size: 0.9375rem;
90
+ }
91
+
92
+ button,
93
+ > a {
94
+ margin-top: 0.75rem;
95
+ }
96
+ }
97
+
98
+ // Banner: neutral by default, a hairline frame with no status to color
99
+ // it. The success, warning and destructive modifiers tint it.
100
+ .banner {
101
+ padding: 1.15rem 1.25rem;
102
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
103
+ border: $control-border solid var(--frame);
104
+
105
+ .title {
106
+ margin: 0;
107
+ font-weight: 650;
108
+ }
109
+
110
+ p {
111
+ margin: 0.75rem 0 0;
112
+ font-size: 0.9375rem;
113
+ line-height: 1.5;
114
+ }
115
+
116
+ button {
117
+ margin-top: 0.75rem;
118
+ }
119
+
120
+ &.destructive {
121
+ background: color-mix(in srgb, var(--danger) 8%, transparent);
122
+ border-color: color-mix(in srgb, var(--danger) 35%, transparent);
123
+
124
+ .title {
125
+ color: var(--danger);
126
+ }
127
+ }
128
+
129
+ &.warning {
130
+ background: color-mix(in srgb, var(--warn) 8%, transparent);
131
+ border-color: color-mix(in srgb, var(--warn) 35%, transparent);
132
+
133
+ .title {
134
+ color: var(--warn);
135
+ }
136
+ }
137
+
138
+ &.success {
139
+ background: color-mix(in srgb, var(--ok) 8%, transparent);
140
+ border-color: color-mix(in srgb, var(--ok) 35%, transparent);
141
+ }
142
+ }
143
+
144
+ // The page-number pager.
145
+ .pager {
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: space-between;
149
+ gap: 1rem;
150
+ flex-wrap: wrap;
151
+
152
+ .summary,
153
+ .position {
154
+ font-size: 0.8125rem;
155
+ font-weight: 550;
156
+ color: var(--muted);
157
+ }
158
+
159
+ .pages {
160
+ display: flex;
161
+ align-items: center;
162
+ gap: 0.75rem;
163
+
164
+ button {
165
+ @include control-size($control-height-sm);
166
+ padding-inline: 1rem;
167
+ font-size: 0.875rem;
168
+ }
169
+ }
170
+ }
171
+
172
+ // The list row: keys, members, invoices, devices — lists, not
173
+ // tables: one entry per row, a hairline between entries, no header
174
+ // row. Row controls sit at the pager buttons' scale.
175
+ .list-row {
176
+ display: flex;
177
+ align-items: center;
178
+ gap: 0.75rem;
179
+ padding: 0.6rem 0;
180
+
181
+ &:not(:last-child) {
182
+ border-bottom: 1px solid var(--frame);
183
+ }
184
+
185
+ .lead {
186
+ font-weight: 620;
187
+ }
188
+
189
+ .meta {
190
+ display: flex;
191
+ flex-direction: column;
192
+ gap: 0.3rem;
193
+ margin-top: 0.3rem;
194
+ font-size: 0.875rem;
195
+ font-weight: 550;
196
+ color: var(--muted);
197
+ }
198
+
199
+ .row-actions {
200
+ margin-left: auto;
201
+ display: flex;
202
+ justify-content: flex-end;
203
+ gap: 0.5rem;
204
+
205
+ button {
206
+ padding: 0.35rem 1rem;
207
+ font-size: 0.875rem;
208
+ }
209
+ }
210
+
211
+ &.muted-row .lead {
212
+ text-decoration: line-through;
213
+ color: var(--muted);
214
+ }
215
+
216
+ &.failed .lead {
217
+ color: var(--danger);
218
+ }
219
+ }
220
+
221
+ // The key/value readout row, in the settings profile's style.
222
+ .detail {
223
+ display: flex;
224
+ flex-direction: column;
225
+ gap: 0.3rem;
226
+
227
+ .label {
228
+ font-size: 0.8125rem;
229
+ font-weight: 620;
230
+ color: var(--muted);
231
+ }
232
+
233
+ .value {
234
+ font-weight: 550;
235
+ }
236
+ }
237
+
238
+ // The toolbar row: page heading with right-aligned actions riding
239
+ // the same line.
240
+ .toolbar {
241
+ margin-bottom: 1rem;
242
+
243
+ .toolbar-head {
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: space-between;
247
+ gap: 1.5rem;
248
+ }
249
+
250
+ h1 {
251
+ font-size: 2.7rem;
252
+ font-weight: 800;
253
+ font-variation-settings: "OPTK" -15;
254
+ margin: 0;
255
+ }
256
+
257
+ .actions {
258
+ display: flex;
259
+ flex-wrap: wrap;
260
+ align-items: center;
261
+ gap: 0.5rem;
262
+ }
263
+ }
264
+
265
+ // The bordered card shell: the shared hairline-framed surface on the
266
+ // page color, the same box the dark table shell wears.
267
+ .card {
268
+ display: flex;
269
+ flex-direction: column;
270
+ padding: 1.25rem;
271
+ border: 1px solid var(--frame);
272
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
273
+ background: var(--bg);
274
+ }
275
+
276
+ // The cards group: a responsive grid of link cards. Anchored cards
277
+ // lift their border to the primary token on hover — the "pick your
278
+ // tool" affordance — and the title travels with the card's color.
279
+ .cards {
280
+ display: grid;
281
+ grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
282
+ gap: 0.75rem;
283
+ margin: 1.25rem 0;
284
+ }
285
+
286
+ // The grouped cards band: one underline tab bar over the card sets.
287
+ // Until boot's tab behavior runs, the first set stands alone.
288
+ .cards-root {
289
+ margin: 1.25rem 0;
290
+ }
291
+
292
+ .cards-group {
293
+ // The panel that is not `hidden` is the one on show. Render marks every
294
+ // group but the first hidden, and boot's tab behavior moves the mark;
295
+ // relying on `:first-child` here failed because the nav is the first
296
+ // child, so no group ever displayed.
297
+ &[hidden] {
298
+ display: none;
299
+ }
300
+
301
+ .cards {
302
+ margin: 0.9rem 0 0;
303
+ }
304
+ }
305
+
306
+ a.card {
307
+ text-decoration: none;
308
+ transition: border-color 125ms ease;
309
+
310
+ .card-title {
311
+ color: var(--fg);
312
+ }
313
+
314
+ &:hover {
315
+ border-color: var(--primary);
316
+
317
+ .card-title {
318
+ color: var(--primary);
319
+ }
320
+ }
321
+ }
322
+
323
+ .card-title {
324
+ font-size: 0.9375rem;
325
+ font-weight: 620;
326
+ color: var(--fg);
327
+ }
328
+
329
+ .card-desc {
330
+ margin: 0.4rem 0 0;
331
+ font-size: 0.85rem;
332
+ line-height: 1.55;
333
+ color: var(--muted);
334
+ }
335
+
336
+ // The copy-to-clipboard icon button: a bare icon whose click feedback
337
+ // is the glyph swap alone, the check tinted julep for the moment it
338
+ // shows.
339
+ button.copy {
340
+ display: inline-flex;
341
+ align-items: center;
342
+ justify-content: center;
343
+ padding: 0.25rem;
344
+ border: none;
345
+ background: transparent;
346
+ color: var(--tertiary);
347
+ cursor: pointer;
348
+ transition: color 125ms ease;
349
+
350
+ .copy-icon,
351
+ .check-icon {
352
+ width: 1.05rem;
353
+ height: 1.05rem;
354
+ }
355
+
356
+ &.done {
357
+ color: charmtone.$julep;
358
+ }
359
+ }
@@ -0,0 +1,341 @@
1
+ @use "charmtone";
2
+ @use "controls" as *;
3
+
4
+ .dropdown {
5
+ position: relative;
6
+ user-select: none;
7
+ // Keep the widget self-contained: outside the nav, no ancestor sets
8
+ // this, and every var(--border-width) below then collapses to unset,
9
+ // taking the button and menu borders with it.
10
+ --border-width: #{$control-border};
11
+ }
12
+
13
+ // Lift the open widget above later siblings: plain position:relative
14
+ // creates no stacking context, so the next row's dropdown button would
15
+ // otherwise paint over the open menu.
16
+ .dropdown.open {
17
+ z-index: 10;
18
+ }
19
+
20
+ .dropdown > button {
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: space-between;
24
+ text-align: left;
25
+ white-space: nowrap;
26
+ width: 100%;
27
+ overflow: hidden;
28
+ @include control-size($control-height);
29
+ padding-inline: 0.85rem;
30
+ border: var(--border-width) solid transparent;
31
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
32
+ // Closed, the trigger reads as a field: the same recessed fill the
33
+ // one-line inputs carry, which is also what the retired native
34
+ // select showed. Hover and the open state swap to the charple
35
+ // activator below.
36
+ background: $control-fill;
37
+ color: inherit;
38
+ font-family: inherit;
39
+ font-size: inherit;
40
+ font-weight: 500;
41
+ line-height: 1.2;
42
+ cursor: pointer;
43
+ transition:
44
+ background 125ms ease,
45
+ border-color 125ms ease,
46
+ color 125ms ease,
47
+ box-shadow 125ms ease;
48
+
49
+ &:focus-visible {
50
+ @include control-focus;
51
+ }
52
+ }
53
+
54
+ // The dense trigger used next to table actions and pagers.
55
+ .dropdown.compact > button {
56
+ @include control-size($control-height-sm);
57
+ padding-inline: 0.75rem;
58
+ font-size: 0.875rem;
59
+ }
60
+
61
+ .dropdown > button:hover,
62
+ .dropdown.open > button {
63
+ border-color: charmtone.$charple;
64
+ background: charmtone.$charple;
65
+ color: charmtone.$salt;
66
+ }
67
+
68
+ .dropdown > button .chevron {
69
+ // The glyph paints itself in currentColor, so it tracks the label's
70
+ // color in every state and text and chevron never disagree. Its 24px
71
+ // base is sized down here, the one place the trigger's own width
72
+ // budgets for it.
73
+ width: 1.2rem;
74
+ height: 1.2rem;
75
+ flex-shrink: 0;
76
+ margin-left: 0.5rem;
77
+
78
+ svg {
79
+ width: 100%;
80
+ height: 100%;
81
+ }
82
+
83
+ transition:
84
+ color 125ms ease,
85
+ transform 150ms ease;
86
+ // The shared glyph points up, so the closed trigger turns it down.
87
+ transform: rotate(180deg);
88
+ }
89
+
90
+ .dropdown > button:hover .chevron,
91
+ .dropdown.open > button .chevron {
92
+ color: charmtone.$salt;
93
+ }
94
+
95
+ .dropdown.open > button .chevron {
96
+ transform: rotate(0deg);
97
+ }
98
+
99
+ .dropdown > button .copy {
100
+ display: flex;
101
+ flex-direction: column;
102
+ align-items: flex-start;
103
+ flex: 1;
104
+ min-width: 0;
105
+ overflow: hidden;
106
+ }
107
+
108
+ .dropdown > button .label,
109
+ .dropdown > button .detail {
110
+ overflow: hidden;
111
+ text-overflow: ellipsis;
112
+ white-space: nowrap;
113
+ max-width: 100%;
114
+ }
115
+
116
+ // The optional second line on a trigger or option: muted until the
117
+ // surrounding row is highlighted, then it follows the label up.
118
+ .dropdown > button .detail {
119
+ font-size: 0.75rem;
120
+ font-weight: 520;
121
+ color: var(--tertiary);
122
+ }
123
+
124
+ .dropdown > button:hover .detail,
125
+ .dropdown.open > button .detail {
126
+ color: charmtone.$salt;
127
+ }
128
+
129
+ .dropdown .menu {
130
+ position: absolute;
131
+ top: calc(100% + 0.25rem);
132
+ left: 0;
133
+ right: auto;
134
+ min-width: 100%;
135
+ max-width: 30rem;
136
+ // The gutter the options' inset boxes float in.
137
+ padding: 0.25rem;
138
+ white-space: nowrap;
139
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
140
+ // The menu wears its open colors while closed too: it is hidden then,
141
+ // except for the fade-out, which would otherwise play in a different
142
+ // surface than the one that was open.
143
+ background: charmtone.$charple;
144
+ color: charmtone.$salt;
145
+ overflow: hidden;
146
+ opacity: 0;
147
+ visibility: hidden;
148
+ transition:
149
+ opacity 150ms ease,
150
+ visibility 150ms ease;
151
+ }
152
+
153
+ // Small screens: triggers often sit near the viewport's right edge
154
+ // (toolbars), so the menu grows leftward — a left-anchored menu would
155
+ // hang off-screen even while hidden and scroll the page.
156
+ @media (max-width: 768px) {
157
+ .dropdown .menu {
158
+ left: auto;
159
+ right: 0;
160
+ }
161
+ }
162
+
163
+ .dropdown.flip .menu {
164
+ top: auto;
165
+ bottom: calc(100% + 0.25rem);
166
+ }
167
+
168
+ .dropdown.open .menu {
169
+ opacity: 1;
170
+ visibility: visible;
171
+ }
172
+
173
+ // The highlight paints a rounded inset box rather than the full row;
174
+ // the menu's padding supplies the gutter around it. Options are real
175
+ // buttons so a keyboard can reach them; the resets undo the shared
176
+ // button chrome they would otherwise inherit.
177
+ .dropdown .option {
178
+ display: flex;
179
+ flex-direction: column;
180
+ align-items: flex-start;
181
+ width: 100%;
182
+ padding: 0.5rem 0.75rem;
183
+ border: none;
184
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
185
+ background: transparent;
186
+ color: inherit;
187
+ font-family: inherit;
188
+ font-size: inherit;
189
+ font-weight: inherit;
190
+ text-align: left;
191
+ white-space: nowrap;
192
+ overflow: hidden;
193
+ text-overflow: ellipsis;
194
+ cursor: pointer;
195
+ }
196
+
197
+ .dropdown .option .label,
198
+ .dropdown .option .detail {
199
+ overflow: hidden;
200
+ text-overflow: ellipsis;
201
+ max-width: 100%;
202
+ }
203
+
204
+ .dropdown .option .detail {
205
+ font-size: 0.75rem;
206
+ font-weight: 520;
207
+ color: rgba(charmtone.$salt, 0.7);
208
+ }
209
+
210
+ // The no-matches row in a filtered menu, matching the option inset.
211
+ .dropdown .empty {
212
+ padding: 0.5rem 0.75rem;
213
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
214
+ color: rgba(charmtone.$salt, 0.75);
215
+ font-weight: 520;
216
+ }
217
+
218
+ .dropdown .option:hover {
219
+ background: charmtone.$jelly;
220
+ color: charmtone.$salt;
221
+ }
222
+
223
+ .dropdown .option:hover .detail {
224
+ color: charmtone.$salt;
225
+ }
226
+
227
+ // Optional filter field pinned to the top of the open menu. The field
228
+ // is a dark inset on the charple surface, the same bbq channel the
229
+ // page's own search box uses, and the clear button mirrors it.
230
+ .dropdown .search {
231
+ position: sticky;
232
+ top: 0;
233
+ z-index: 1;
234
+ display: flex;
235
+ padding: 0.25rem;
236
+ background: charmtone.$charple;
237
+ }
238
+
239
+ .dropdown .search .query {
240
+ flex: 1;
241
+ width: 100%;
242
+ height: $control-height-sm;
243
+ padding: 0.4rem 2.25rem 0.4rem 0.65rem;
244
+ border: $control-border solid transparent;
245
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
246
+ // The page's bg as the recess, so the field tracks the active
247
+ // theme's depth instead of pinning to the char swatch.
248
+ background: var(--bg);
249
+ color: charmtone.$salt;
250
+ font-family: inherit;
251
+ font-size: 0.875rem;
252
+ transition:
253
+ border-color 125ms ease,
254
+ box-shadow 125ms ease;
255
+
256
+ &::placeholder {
257
+ color: var(--tertiary);
258
+ }
259
+
260
+ &::-webkit-search-cancel-button,
261
+ &::-webkit-search-decoration {
262
+ appearance: none;
263
+ }
264
+
265
+ &:focus-visible {
266
+ @include control-focus;
267
+ }
268
+ }
269
+
270
+ .dropdown .search .clear {
271
+ position: absolute;
272
+ top: 50%;
273
+ right: 0.5rem;
274
+ translate: 0 -50%;
275
+ display: flex;
276
+ align-items: center;
277
+ justify-content: center;
278
+ width: 1.75rem;
279
+ height: 1.75rem;
280
+ padding: 0;
281
+ border: none;
282
+ border-radius: 50%;
283
+ background: transparent;
284
+ color: var(--tertiary);
285
+ opacity: 0;
286
+ pointer-events: none;
287
+ cursor: pointer;
288
+ transition:
289
+ color 125ms ease,
290
+ opacity 150ms ease;
291
+
292
+ svg {
293
+ width: 0.95rem;
294
+ height: 0.95rem;
295
+ }
296
+
297
+ &.visible {
298
+ opacity: 1;
299
+ pointer-events: auto;
300
+ }
301
+
302
+ &:hover {
303
+ color: charmtone.$coral;
304
+ }
305
+ }
306
+
307
+ // Optional footer control pinned below the options, e.g. "Create
308
+ // team". An inset row like the options, held against the menu's
309
+ // bottom edge while the list scrolls.
310
+ .dropdown .action {
311
+ position: sticky;
312
+ bottom: 0;
313
+ z-index: 1;
314
+ display: flex;
315
+ align-items: center;
316
+ gap: 0.4rem;
317
+ width: 100%;
318
+ margin: 0;
319
+ padding: 0.55rem 0.75rem;
320
+ border: none;
321
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
322
+ background: charmtone.$charple;
323
+ color: charmtone.$salt;
324
+ font-family: inherit;
325
+ font-size: 0.875rem;
326
+ font-weight: 580;
327
+ text-align: left;
328
+ white-space: nowrap;
329
+ cursor: pointer;
330
+
331
+ .plus {
332
+ font-weight: 720;
333
+ font-size: 1.05rem;
334
+ line-height: 1;
335
+ }
336
+
337
+ &:hover {
338
+ background: charmtone.$jelly;
339
+ color: charmtone.$salt;
340
+ }
341
+ }