@blocknote/ariakit 0.13.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 (52) hide show
  1. package/LICENSE +373 -0
  2. package/dist/blocknote-ariakit.js +1146 -0
  3. package/dist/blocknote-ariakit.js.map +1 -0
  4. package/dist/blocknote-ariakit.umd.cjs +28 -0
  5. package/dist/blocknote-ariakit.umd.cjs.map +1 -0
  6. package/dist/style.css +1 -0
  7. package/dist/webpack-stats.json +1 -0
  8. package/package.json +84 -0
  9. package/src/ariakitStyles.css +1005 -0
  10. package/src/index.tsx +103 -0
  11. package/src/input/Form.tsx +12 -0
  12. package/src/input/TextInput.tsx +48 -0
  13. package/src/menu/Menu.tsx +130 -0
  14. package/src/panel/Panel.tsx +55 -0
  15. package/src/panel/PanelButton.tsx +24 -0
  16. package/src/panel/PanelFileInput.tsx +28 -0
  17. package/src/panel/PanelTab.tsx +18 -0
  18. package/src/panel/PanelTextInput.tsx +29 -0
  19. package/src/popover/Popover.tsx +47 -0
  20. package/src/sideMenu/SideMenu.tsx +20 -0
  21. package/src/sideMenu/SideMenuButton.tsx +44 -0
  22. package/src/style.css +136 -0
  23. package/src/suggestionMenu/SuggestionMenu.tsx +24 -0
  24. package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +20 -0
  25. package/src/suggestionMenu/SuggestionMenuItem.tsx +43 -0
  26. package/src/suggestionMenu/SuggestionMenuLabel.tsx +20 -0
  27. package/src/suggestionMenu/SuggestionMenuLoader.tsx +18 -0
  28. package/src/tableHandle/TableHandle.tsx +42 -0
  29. package/src/toolbar/Toolbar.tsx +26 -0
  30. package/src/toolbar/ToolbarButton.tsx +73 -0
  31. package/src/toolbar/ToolbarSelect.tsx +47 -0
  32. package/types/src/index.d.ts +6 -0
  33. package/types/src/input/Form.d.ts +2 -0
  34. package/types/src/input/TextInput.d.ts +13 -0
  35. package/types/src/menu/Menu.d.ts +24 -0
  36. package/types/src/panel/Panel.d.ts +12 -0
  37. package/types/src/panel/PanelButton.d.ts +11 -0
  38. package/types/src/panel/PanelFileInput.d.ts +7 -0
  39. package/types/src/panel/PanelTab.d.ts +5 -0
  40. package/types/src/panel/PanelTextInput.d.ts +8 -0
  41. package/types/src/popover/Popover.d.ts +11 -0
  42. package/types/src/sideMenu/SideMenu.d.ts +5 -0
  43. package/types/src/sideMenu/SideMenuButton.d.ts +15 -0
  44. package/types/src/suggestionMenu/SuggestionMenu.d.ts +6 -0
  45. package/types/src/suggestionMenu/SuggestionMenuEmptyItem.d.ts +5 -0
  46. package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +8 -0
  47. package/types/src/suggestionMenu/SuggestionMenuLabel.d.ts +5 -0
  48. package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +5 -0
  49. package/types/src/tableHandle/TableHandle.d.ts +14 -0
  50. package/types/src/toolbar/Toolbar.d.ts +10 -0
  51. package/types/src/toolbar/ToolbarButton.d.ts +8 -0
  52. package/types/src/toolbar/ToolbarSelect.d.ts +12 -0
@@ -0,0 +1,1005 @@
1
+ /* This file contains styles copied directly from Ariakit's website, and is
2
+ responsible for the majority of the styling. */
3
+
4
+ /* https://ariakit.org/examples/menu-nested */
5
+ .bn-ak-button {
6
+ --border: rgb(0 0 0/13%);
7
+ --highlight: rgb(255 255 255/20%);
8
+ --shadow: rgb(0 0 0/10%);
9
+ display: flex;
10
+ height: 2.5rem;
11
+ user-select: none;
12
+ align-items: center;
13
+ justify-content: center;
14
+ gap: 0.25rem;
15
+ white-space: nowrap;
16
+ border-radius: 0.5rem;
17
+ border-style: none;
18
+ background-color: hsl(204 20% 100%);
19
+ padding-left: 1rem;
20
+ padding-right: 1rem;
21
+ font-size: 1rem;
22
+ line-height: 1.5rem;
23
+ color: hsl(204 4% 0%);
24
+ text-decoration-line: none;
25
+ outline-width: 2px;
26
+ outline-offset: 2px;
27
+ outline-color: hsl(204 100% 40%);
28
+ box-shadow:
29
+ inset 0 0 0 1px var(--border),
30
+ inset 0 2px 0 var(--highlight),
31
+ inset 0 -1px 0 var(--shadow),
32
+ 0 1px 1px var(--shadow);
33
+ font-weight: 500;
34
+ }
35
+
36
+ .bn-ak-button:where(.dark, .dark *) {
37
+ --border: rgb(255 255 255/10%);
38
+ --highlight: rgb(255 255 255/5%);
39
+ --shadow: rgb(0 0 0/25%);
40
+ background-color: hsl(204 20% 100% / 0.05);
41
+ color: hsl(204 20% 100%);
42
+ box-shadow:
43
+ inset 0 0 0 1px var(--border),
44
+ inset 0 -1px 0 1px var(--shadow),
45
+ inset 0 1px 0 var(--highlight);
46
+ }
47
+
48
+ .bn-ak-button:not(:active):hover {
49
+ --border: rgb(0 0 0/33%);
50
+ }
51
+
52
+ .bn-ak-button:where(.dark, .dark *):not(:active):hover {
53
+ --border: rgb(255 255 255/25%);
54
+ }
55
+
56
+ .bn-ak-button[aria-disabled="true"] {
57
+ opacity: 0.5;
58
+ }
59
+
60
+ .bn-ak-button[data-focus-visible] {
61
+ outline-style: solid;
62
+ }
63
+
64
+ .bn-ak-button:active,
65
+ .bn-ak-button[data-active] {
66
+ padding-top: 0.125rem;
67
+ box-shadow:
68
+ inset 0 0 0 1px var(--border),
69
+ inset 0 2px 0 var(--border);
70
+ }
71
+
72
+ @media (min-width: 640px) {
73
+ .bn-ak-button {
74
+ gap: 0.5rem;
75
+ }
76
+ }
77
+
78
+ .bn-ak-button:active:where(.dark, .dark *),
79
+ .bn-ak-button[data-active]:where(.dark, .dark *) {
80
+ box-shadow:
81
+ inset 0 0 0 1px var(--border),
82
+ inset 0 1px 1px 1px var(--shadow);
83
+ }
84
+
85
+ .bn-ak-menu {
86
+ position: relative;
87
+ z-index: 50;
88
+ display: flex;
89
+ max-height: var(--popover-available-height);
90
+ min-width: 180px;
91
+ flex-direction: column;
92
+ overscroll-behavior: contain;
93
+ border-radius: 0.5rem;
94
+ border-width: 1px;
95
+ border-style: solid;
96
+ border-color: hsl(204 20% 88%);
97
+ background-color: hsl(204 20% 100%);
98
+ padding: 0.5rem;
99
+ color: hsl(204 4% 0%);
100
+ box-shadow:
101
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
102
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
103
+ outline: none !important;
104
+ overflow: visible;
105
+ }
106
+
107
+ .bn-ak-menu:where(.dark, .dark *) {
108
+ border-color: hsl(204 4% 24%);
109
+ background-color: hsl(204 4% 16%);
110
+ color: hsl(204 20% 100%);
111
+ box-shadow:
112
+ 0 10px 15px -3px rgb(0 0 0 / 0.25),
113
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
114
+ }
115
+
116
+ .bn-ak-menu-item {
117
+ display: flex;
118
+ cursor: default;
119
+ scroll-margin: 0.5rem;
120
+ align-items: center;
121
+ gap: 0.5rem;
122
+ border-radius: 0.25rem;
123
+ padding: 0.5rem;
124
+ outline: none !important;
125
+ }
126
+
127
+ .bn-ak-menu-item[aria-disabled="true"] {
128
+ opacity: 0.25;
129
+ }
130
+
131
+ .bn-ak-menu-item[data-active-item] {
132
+ background-color: hsl(204 100% 40%);
133
+ color: hsl(204 20% 100%);
134
+ }
135
+
136
+ .bn-ak-menu-item:active,
137
+ .bn-ak-menu-item[data-active] {
138
+ background-color: hsl(204 100% 32%);
139
+ padding-top: 9px;
140
+ padding-bottom: 7px;
141
+ }
142
+
143
+ .bn-ak-menu:not(:focus) .bn-ak-menu-item:not(:focus)[aria-expanded="true"] {
144
+ background-color: hsl(204 4% 0% / 7.5%);
145
+ color: currentColor;
146
+ }
147
+
148
+ .bn-ak-menu:not(:focus)
149
+ .bn-ak-menu-item:not(:focus)[aria-expanded="true"]:where(.dark, .dark *) {
150
+ background-color: hsl(204 20% 100% / 0.1);
151
+ }
152
+
153
+ .bn-ak-menu-item .label {
154
+ flex: 1 1 0%;
155
+ }
156
+
157
+ /* https://ariakit.org/examples/form-select */
158
+ .bn-ak-button {
159
+ --border: rgb(0 0 0/13%);
160
+ --highlight: rgb(255 255 255/20%);
161
+ --shadow: rgb(0 0 0/10%);
162
+ display: flex;
163
+ height: 2.5rem;
164
+ user-select: none;
165
+ align-items: center;
166
+ gap: 0.25rem;
167
+ white-space: nowrap;
168
+ border-style: none;
169
+ background-color: hsl(204 20% 100%);
170
+ padding-left: 1rem;
171
+ padding-right: 1rem;
172
+ font-size: 1rem;
173
+ line-height: 1.5rem;
174
+ color: hsl(204 4% 0%);
175
+ text-decoration-line: none;
176
+ outline-width: 2px;
177
+ outline-offset: 2px;
178
+ outline-color: hsl(204 100% 40%);
179
+ box-shadow:
180
+ inset 0 0 0 1px var(--border),
181
+ inset 0 2px 0 var(--highlight),
182
+ inset 0 -1px 0 var(--shadow),
183
+ 0 1px 1px var(--shadow);
184
+ justify-content: space-between;
185
+ width: 100%;
186
+ border-radius: 0.375rem;
187
+ }
188
+
189
+ .bn-ak-button:where(.dark, .dark *) {
190
+ --border: rgb(255 255 255/10%);
191
+ --highlight: rgb(255 255 255/5%);
192
+ --shadow: rgb(0 0 0/25%);
193
+ background-color: hsl(204 20% 100% / 0.05);
194
+ color: hsl(204 20% 100%);
195
+ box-shadow:
196
+ inset 0 0 0 1px var(--border),
197
+ inset 0 -1px 0 1px var(--shadow),
198
+ inset 0 1px 0 var(--highlight);
199
+ }
200
+
201
+ .bn-ak-button:not(:active):hover {
202
+ --border: rgb(0 0 0/33%);
203
+ }
204
+
205
+ .bn-ak-button:where(.dark, .dark *):not(:active):hover {
206
+ --border: rgb(255 255 255/25%);
207
+ }
208
+
209
+ .bn-ak-primary {
210
+ --border: rgba(0, 0, 0, 0.15);
211
+ --highlight: rgba(255, 255, 255, 0.25);
212
+ --shadow: rgba(0, 0, 0, 0.15);
213
+ background-color: hsl(204 100% 40%);
214
+ color: hsl(204 20% 100%);
215
+ justify-content: center;
216
+ }
217
+
218
+ .bn-ak-primary:hover {
219
+ --border: rgba(0, 0, 0, 0.35);
220
+ background-color: hsl(204 100% 35%);
221
+ }
222
+
223
+ .bn-ak-primary:where(.dark, .dark *) {
224
+ --border: rgba(255, 255, 255, 0.25);
225
+ --highlight: rgba(255, 255, 255, 0.1);
226
+ --shadow: rgba(0, 0, 0, 0.25);
227
+ background-color: hsl(204 100% 35%);
228
+ }
229
+
230
+ .bn-ak-primary:hover:where(.dark, .dark *) {
231
+ --border: rgba(255, 255, 255, 0.45);
232
+ background-color: hsl(204 100% 40%);
233
+ }
234
+
235
+ .bn-ak-button[aria-disabled="true"] {
236
+ opacity: 0.5;
237
+ }
238
+
239
+ .bn-ak-button[data-focus-visible] {
240
+ outline-style: solid;
241
+ }
242
+
243
+ .bn-ak-button:active,
244
+ .bn-ak-button[data-active] {
245
+ padding-top: 0.125rem;
246
+ box-shadow:
247
+ inset 0 0 0 1px var(--border),
248
+ inset 0 2px 0 var(--border);
249
+ }
250
+
251
+ @media (min-width: 640px) {
252
+ .bn-ak-button {
253
+ gap: 0.5rem;
254
+ }
255
+ }
256
+
257
+ .bn-ak-button:active:where(.dark, .dark *),
258
+ .bn-ak-button[data-active]:where(.dark, .dark *) {
259
+ box-shadow:
260
+ inset 0 0 0 1px var(--border),
261
+ inset 0 1px 1px 1px var(--shadow);
262
+ }
263
+
264
+ .bn-ak-wrapper {
265
+ display: flex;
266
+ width: 320px;
267
+ max-width: 100%;
268
+ flex-direction: column;
269
+ gap: 1.5rem;
270
+ border-radius: 0.5rem;
271
+ background-color: hsl(204 20% 100%);
272
+ padding: 1rem;
273
+ box-shadow:
274
+ 0 1px 3px 0 rgb(0 0 0 / 0.1),
275
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
276
+ }
277
+
278
+ .bn-ak-label {
279
+ padding-left: 1rem;
280
+ }
281
+
282
+ .bn-ak-popover {
283
+ z-index: 50;
284
+ display: flex;
285
+ max-height: min(var(--popover-available-height, 300px), 300px);
286
+ flex-direction: column;
287
+ overflow: auto;
288
+ overscroll-behavior: contain;
289
+ border-radius: 0.5rem;
290
+ border-width: 1px;
291
+ border-style: solid;
292
+ border-color: hsl(204 20% 88%);
293
+ background-color: hsl(204 20% 100%);
294
+ padding: 0.5rem;
295
+ color: hsl(204 4% 0%);
296
+ box-shadow:
297
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
298
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
299
+ }
300
+
301
+ .bn-ak-popover:where(.dark, .dark *) {
302
+ border-color: hsl(204 4% 24%);
303
+ background-color: hsl(204 4% 16%);
304
+ color: hsl(204 20% 100%);
305
+ box-shadow:
306
+ 0 10px 15px -3px rgb(0 0 0 / 0.25),
307
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
308
+ }
309
+
310
+ .bn-ak-select-item {
311
+ display: flex;
312
+ cursor: default;
313
+ scroll-margin: 0.5rem;
314
+ align-items: center;
315
+ gap: 0.5rem;
316
+ border-radius: 0.25rem;
317
+ padding: 0.5rem;
318
+ outline: none !important;
319
+ }
320
+
321
+ .bn-ak-select-item[aria-disabled="true"] {
322
+ opacity: 0.5;
323
+ }
324
+
325
+ .bn-ak-select-item[data-active-item] {
326
+ background-color: hsl(204 100% 40%);
327
+ color: hsl(204 20% 100%);
328
+ }
329
+
330
+ .bn-ak-wrapper:where(.dark, .dark *) {
331
+ background-color: hsl(204 4% 16%);
332
+ box-shadow:
333
+ 0 1px 3px 0 rgb(0 0 0 / 0.25),
334
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
335
+ }
336
+
337
+ .bn-ak-field {
338
+ display: flex;
339
+ flex-direction: column;
340
+ gap: 0.5rem;
341
+ }
342
+
343
+ .bn-ak-input {
344
+ height: 2.5rem;
345
+ width: 100%;
346
+ border-radius: 0.375rem;
347
+ border-style: none;
348
+ background-color: hsl(204 20% 94% / 0.4);
349
+ padding-left: 1rem;
350
+ padding-right: 1rem;
351
+ font-size: 1rem;
352
+ line-height: 1.5rem;
353
+ color: hsl(204 4% 0%);
354
+ box-shadow:
355
+ inset 0 0 0 1px rgba(0 0 0 / 0.1),
356
+ inset 0 2px 5px 0 rgba(0 0 0 / 0.05);
357
+ }
358
+
359
+ .bn-ak-input::placeholder {
360
+ color: hsl(204 4% 0% / 0.6);
361
+ }
362
+
363
+ .bn-ak-input:hover {
364
+ background-color: hsl(204 20% 94%);
365
+ }
366
+
367
+ .bn-ak-popover:focus-visible,
368
+ .bn-ak-popover[data-focus-visible],
369
+ .bn-ak-input:focus-visible,
370
+ .bn-ak-input[data-focus-visible] {
371
+ outline: 2px solid hsl(204 100% 40%);
372
+ outline-offset: -1px;
373
+ }
374
+
375
+ .bn-ak-input:where(.dark, .dark *) {
376
+ background-color: hsl(204 4% 10%);
377
+ color: hsl(204 20% 100%);
378
+ box-shadow:
379
+ inset 0 0 0 1px rgba(255 255 255 / 0.12),
380
+ inset 0 -1px 0 0 rgba(255 255 255 / 0.05),
381
+ inset 0 2px 5px 0 rgba(0 0 0 / 0.15);
382
+ }
383
+
384
+ .bn-ak-input:where(.dark, .dark *)::placeholder {
385
+ color: hsl(204 20% 100% / 46%);
386
+ }
387
+
388
+ .bn-ak-input:hover:where(.dark, .dark *) {
389
+ background-color: hsl(204 4% 8%);
390
+ }
391
+
392
+ .bn-ak-error {
393
+ width: fit-content;
394
+ border-radius: 0.375rem;
395
+ border-width: 1px;
396
+ border-color: hsl(357 56% 80%);
397
+ background-color: hsl(357 56% 80% / 0.4);
398
+ padding-top: 0.5rem;
399
+ padding-bottom: 0.5rem;
400
+ padding-left: 1rem;
401
+ padding-right: 1rem;
402
+ color: hsl(357 100% 30%);
403
+ }
404
+
405
+ .bn-ak-error:empty {
406
+ display: none;
407
+ }
408
+
409
+ .bn-ak-error:where(.dark, .dark *) {
410
+ border-color: hsl(357 56% 50% / 0.4);
411
+ background-color: hsl(357 56% 42% / 0.25);
412
+ color: hsl(357 100% 90%);
413
+ }
414
+
415
+ .bn-ak-buttons {
416
+ display: flex;
417
+ gap: 1rem;
418
+ padding-top: 1rem;
419
+ }
420
+
421
+ /* https://ariakit.org/components/menu */
422
+ .bn-ak-button {
423
+ --border: rgb(0 0 0/13%);
424
+ --highlight: rgb(255 255 255/20%);
425
+ --shadow: rgb(0 0 0/10%);
426
+ display: flex;
427
+ height: 2.5rem;
428
+ user-select: none;
429
+ align-items: center;
430
+ justify-content: center;
431
+ gap: 0.25rem;
432
+ white-space: nowrap;
433
+ border-radius: 0.5rem;
434
+ border-style: none;
435
+ background-color: hsl(204 20% 100%);
436
+ padding-left: 1rem;
437
+ padding-right: 1rem;
438
+ font-size: 1rem;
439
+ line-height: 1.5rem;
440
+ color: hsl(204 4% 0%);
441
+ text-decoration-line: none;
442
+ outline-width: 2px;
443
+ outline-offset: 2px;
444
+ outline-color: hsl(204 100% 40%);
445
+ box-shadow:
446
+ inset 0 0 0 1px var(--border),
447
+ inset 0 2px 0 var(--highlight),
448
+ inset 0 -1px 0 var(--shadow),
449
+ 0 1px 1px var(--shadow);
450
+ font-weight: 500;
451
+ }
452
+
453
+ .bn-ak-button:where(.dark, .dark *) {
454
+ --border: rgb(255 255 255/10%);
455
+ --highlight: rgb(255 255 255/5%);
456
+ --shadow: rgb(0 0 0/25%);
457
+ background-color: hsl(204 20% 100% / 0.05);
458
+ color: hsl(204 20% 100%);
459
+ box-shadow:
460
+ inset 0 0 0 1px var(--border),
461
+ inset 0 -1px 0 1px var(--shadow),
462
+ inset 0 1px 0 var(--highlight);
463
+ }
464
+
465
+ .bn-ak-button:not(:active):hover {
466
+ --border: rgb(0 0 0/33%);
467
+ }
468
+
469
+ .bn-ak-button:where(.dark, .dark *):not(:active):hover {
470
+ --border: rgb(255 255 255/25%);
471
+ }
472
+
473
+ .bn-ak-button[aria-disabled="true"] {
474
+ opacity: 0.5;
475
+ }
476
+
477
+ .bn-ak-button[data-focus-visible] {
478
+ outline-style: solid;
479
+ }
480
+
481
+ .bn-ak-button:active,
482
+ .bn-ak-button[data-active] {
483
+ padding-top: 0.125rem;
484
+ box-shadow:
485
+ inset 0 0 0 1px var(--border),
486
+ inset 0 2px 0 var(--border);
487
+ }
488
+
489
+ @media (min-width: 640px) {
490
+ .bn-ak-button {
491
+ gap: 0.5rem;
492
+ }
493
+ }
494
+
495
+ .bn-ak-button:active:where(.dark, .dark *),
496
+ .bn-ak-button[data-active]:where(.dark, .dark *) {
497
+ box-shadow:
498
+ inset 0 0 0 1px var(--border),
499
+ inset 0 1px 1px 1px var(--shadow);
500
+ }
501
+
502
+ .bn-ak-separator {
503
+ margin-top: 0.5rem;
504
+ margin-bottom: 0.5rem;
505
+ height: 0px;
506
+ width: 100%;
507
+ border-top-width: 1px;
508
+ border-color: hsl(204 20% 88%);
509
+ }
510
+
511
+ .bn-ak-separator:where(.dark, .dark *) {
512
+ border-color: hsl(204 4% 28%);
513
+ }
514
+
515
+ .bn-ak-menu {
516
+ position: relative;
517
+ z-index: 50;
518
+ display: flex;
519
+ /*max-height: var(--popover-available-height);*/
520
+ min-width: 180px;
521
+ flex-direction: column;
522
+ /*overflow: auto;*/
523
+ overscroll-behavior: contain;
524
+ border-radius: 0.5rem;
525
+ border-width: 1px;
526
+ border-style: solid;
527
+ border-color: hsl(204 20% 88%);
528
+ background-color: hsl(204 20% 100%);
529
+ padding: 0.5rem;
530
+ color: hsl(204 4% 0%);
531
+ box-shadow:
532
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
533
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
534
+ outline: none !important;
535
+ }
536
+
537
+ .bn-ak-menu:where(.dark, .dark *) {
538
+ border-color: hsl(204 4% 24%);
539
+ background-color: hsl(204 4% 16%);
540
+ color: hsl(204 20% 100%);
541
+ box-shadow:
542
+ 0 10px 15px -3px rgb(0 0 0 / 0.25),
543
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
544
+ }
545
+
546
+ .bn-ak-menu-item {
547
+ display: flex;
548
+ cursor: default;
549
+ scroll-margin: 0.5rem;
550
+ align-items: center;
551
+ gap: 0.5rem;
552
+ border-radius: 0.25rem;
553
+ padding: 0.5rem;
554
+ outline: none !important;
555
+ }
556
+
557
+ .bn-ak-menu-item[aria-disabled="true"] {
558
+ opacity: 0.25;
559
+ }
560
+
561
+ .bn-ak-menu-item[data-active-item] {
562
+ background-color: hsl(204 100% 40%);
563
+ color: hsl(204 20% 100%);
564
+ }
565
+
566
+ .bn-ak-menu-item:active,
567
+ .bn-ak-menu-item[data-active] {
568
+ background-color: hsl(204 100% 32%);
569
+ padding-top: 9px;
570
+ padding-bottom: 7px;
571
+ }
572
+
573
+ /* https://ariakit.org/examples/select-group */
574
+ .bn-ak-button {
575
+ --border: rgb(0 0 0/13%);
576
+ --highlight: rgb(255 255 255/20%);
577
+ --shadow: rgb(0 0 0/10%);
578
+ display: flex;
579
+ height: 2.5rem;
580
+ user-select: none;
581
+ align-items: center;
582
+ gap: 0.25rem;
583
+ white-space: nowrap;
584
+ border-radius: 0.5rem;
585
+ border-style: none;
586
+ background-color: hsl(204 20% 100%);
587
+ padding-left: 1rem;
588
+ padding-right: 1rem;
589
+ font-size: 1rem;
590
+ line-height: 1.5rem;
591
+ color: hsl(204 4% 0%);
592
+ text-decoration-line: none;
593
+ outline-width: 2px;
594
+ outline-offset: 2px;
595
+ outline-color: hsl(204 100% 40%);
596
+ box-shadow:
597
+ inset 0 0 0 1px var(--border),
598
+ inset 0 2px 0 var(--highlight),
599
+ inset 0 -1px 0 var(--shadow),
600
+ 0 1px 1px var(--shadow);
601
+ width: 200px;
602
+ justify-content: space-between;
603
+ }
604
+
605
+ .bn-ak-button:where(.dark, .dark *) {
606
+ --border: rgb(255 255 255/10%);
607
+ --highlight: rgb(255 255 255/5%);
608
+ --shadow: rgb(0 0 0/25%);
609
+ background-color: hsl(204 20% 100% / 0.05);
610
+ color: hsl(204 20% 100%);
611
+ box-shadow:
612
+ inset 0 0 0 1px var(--border),
613
+ inset 0 -1px 0 1px var(--shadow),
614
+ inset 0 1px 0 var(--highlight);
615
+ }
616
+
617
+ .bn-ak-button:not(:active):hover {
618
+ --border: rgb(0 0 0/33%);
619
+ }
620
+
621
+ .bn-ak-button:where(.dark, .dark *):not(:active):hover {
622
+ --border: rgb(255 255 255/25%);
623
+ }
624
+
625
+ .bn-ak-button[aria-disabled="true"] {
626
+ opacity: 0.5;
627
+ }
628
+
629
+ .bn-ak-button[data-focus-visible] {
630
+ outline-style: solid;
631
+ }
632
+
633
+ .bn-ak-button:active,
634
+ .bn-ak-button[data-active] {
635
+ padding-top: 0.125rem;
636
+ box-shadow:
637
+ inset 0 0 0 1px var(--border),
638
+ inset 0 2px 0 var(--border);
639
+ }
640
+
641
+ @media (min-width: 640px) {
642
+ .bn-ak-button {
643
+ gap: 0.5rem;
644
+ }
645
+ }
646
+
647
+ .bn-ak-button:active:where(.dark, .dark *),
648
+ .bn-ak-button[data-active]:where(.dark, .dark *) {
649
+ box-shadow:
650
+ inset 0 0 0 1px var(--border),
651
+ inset 0 1px 1px 1px var(--shadow);
652
+ }
653
+
654
+ .bn-ak-wrapper {
655
+ display: flex;
656
+ flex-direction: column;
657
+ gap: 0.5rem;
658
+ padding: 1rem;
659
+ }
660
+
661
+ .bn-ak-popover {
662
+ z-index: 50;
663
+ display: flex;
664
+ max-height: min(var(--popover-available-height, 300px), 300px);
665
+ flex-direction: column;
666
+ overflow: auto;
667
+ overscroll-behavior: contain;
668
+ border-radius: 0.5rem;
669
+ border-width: 1px;
670
+ border-style: solid;
671
+ border-color: hsl(204 20% 88%);
672
+ background-color: hsl(204 20% 100%);
673
+ padding: 0.5rem;
674
+ color: hsl(204 4% 0%);
675
+ box-shadow:
676
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
677
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
678
+ }
679
+
680
+ .bn-ak-popover:focus-visible,
681
+ .bn-ak-popover[data-focus-visible] {
682
+ outline: 2px solid hsl(204 100% 40%);
683
+ outline-offset: -1px;
684
+ }
685
+
686
+ .bn-ak-popover:where(.dark, .dark *) {
687
+ border-color: hsl(204 4% 24%);
688
+ background-color: hsl(204 4% 16%);
689
+ color: hsl(204 20% 100%);
690
+ box-shadow:
691
+ 0 10px 15px -3px rgb(0 0 0 / 0.25),
692
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
693
+ }
694
+
695
+ .bn-ak-select-item {
696
+ display: flex;
697
+ cursor: default;
698
+ scroll-margin: 0.5rem;
699
+ align-items: center;
700
+ gap: 0.5rem;
701
+ border-radius: 0.25rem;
702
+ padding: 0.5rem;
703
+ outline: none !important;
704
+ }
705
+
706
+ .bn-ak-select-item[aria-disabled="true"] {
707
+ opacity: 0.5;
708
+ }
709
+
710
+ .bn-ak-select-item[data-active-item] {
711
+ background-color: hsl(204 100% 40%);
712
+ color: hsl(204 20% 100%);
713
+ }
714
+
715
+ .bn-ak-separator {
716
+ margin-top: 0.5rem;
717
+ margin-bottom: 0.5rem;
718
+ height: 0px;
719
+ width: 100%;
720
+ border-top-width: 1px;
721
+ border-color: hsl(204 20% 88%);
722
+ }
723
+
724
+ .bn-ak-separator:where(.dark, .dark *) {
725
+ border-color: hsl(204 4% 28%);
726
+ }
727
+
728
+ .bn-ak-group-label {
729
+ cursor: default;
730
+ padding: 0.5rem;
731
+ font-size: 0.875rem;
732
+ line-height: 1.25rem;
733
+ font-weight: 500;
734
+ opacity: 0.6;
735
+ }
736
+
737
+ .bn-ak-group-label + * {
738
+ scroll-margin-top: 2.5rem;
739
+ }
740
+
741
+ /* https://ariakit.org/components/tab */
742
+ .bn-ak-wrapper {
743
+ display: flex;
744
+ flex-direction: column;
745
+ gap: 0.5rem;
746
+ border-radius: 0.5rem;
747
+ background-color: hsl(204 20% 100%);
748
+ padding: 0.5rem;
749
+ box-shadow:
750
+ 0 1px 3px 0 rgb(0 0 0 / 0.1),
751
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
752
+ }
753
+
754
+ .bn-ak-wrapper:where(.dark, .dark *) {
755
+ background-color: hsl(204 4% 16%);
756
+ box-shadow:
757
+ 0 1px 3px 0 rgb(0 0 0 / 0.25),
758
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
759
+ }
760
+
761
+ .bn-ak-tab-list {
762
+ display: flex;
763
+ gap: 0.5rem;
764
+ }
765
+
766
+ .bn-ak-tab {
767
+ display: flex;
768
+ height: 2.5rem;
769
+ user-select: none;
770
+ align-items: center;
771
+ justify-content: center;
772
+ gap: 0.5rem;
773
+ white-space: nowrap;
774
+ border-radius: 0.25rem;
775
+ border-style: none;
776
+ padding-left: 1rem;
777
+ padding-right: 1rem;
778
+ font-size: 1rem;
779
+ line-height: 1.5rem;
780
+ text-decoration-line: none;
781
+ outline-width: 2px;
782
+ outline-offset: 2px;
783
+ outline-color: hsl(204 100% 40%);
784
+ }
785
+
786
+ .bn-ak-tab:hover {
787
+ background-color: hsl(204 4% 0% / 7.5%);
788
+ }
789
+
790
+ .bn-ak-tab[aria-disabled="true"] {
791
+ opacity: 0.5;
792
+ }
793
+
794
+ .bn-ak-tab[aria-selected="true"] {
795
+ background-color: hsl(204 100% 40%);
796
+ color: hsl(204 20% 100%);
797
+ }
798
+
799
+ .bn-ak-tab:hover[aria-selected="true"] {
800
+ background-color: hsl(204 100% 32%);
801
+ }
802
+
803
+ .bn-ak-tab[data-focus-visible] {
804
+ outline-style: solid;
805
+ }
806
+
807
+ .bn-ak-tab:active,
808
+ .bn-ak-tab[data-active] {
809
+ padding-top: 0.125rem;
810
+ }
811
+
812
+ .bn-ak-tab:hover:where(.dark, .dark *) {
813
+ background-color: hsl(204 20% 100% / 0.1);
814
+ }
815
+
816
+ .bn-ak-tab[aria-selected="true"]:where(.dark, .dark *) {
817
+ background-color: hsl(204 100% 40%);
818
+ color: hsl(204 20% 100%);
819
+ }
820
+
821
+ .bn-ak-tab:hover[aria-selected="true"]:where(.dark, .dark *) {
822
+ background-color: hsl(204 100% 32%);
823
+ }
824
+
825
+ .bn-ak-panels {
826
+ padding: 0.5rem;
827
+ }
828
+
829
+ /* https://ariakit.org/components/toolbar */
830
+ .bn-ak-button {
831
+ --border: rgb(0 0 0/13%);
832
+ --highlight: rgb(255 255 255/20%);
833
+ --shadow: rgb(0 0 0/10%);
834
+ display: flex;
835
+ height: 2.5rem;
836
+ user-select: none;
837
+ align-items: center;
838
+ justify-content: center;
839
+ white-space: nowrap;
840
+ border-style: none;
841
+ background-color: hsl(204 20% 100%);
842
+ padding-left: 1rem;
843
+ padding-right: 1rem;
844
+ font-size: 1rem;
845
+ line-height: 1.5rem;
846
+ color: hsl(204 4% 0%);
847
+ text-decoration-line: none;
848
+ outline-width: 2px;
849
+ outline-offset: 2px;
850
+ outline-color: hsl(204 100% 40%);
851
+ box-shadow:
852
+ inset 0 0 0 1px var(--border),
853
+ inset 0 2px 0 var(--highlight),
854
+ inset 0 -1px 0 var(--shadow),
855
+ 0 1px 1px var(--shadow);
856
+ scroll-margin-left: 0.25rem;
857
+ scroll-margin-right: 0.25rem;
858
+ gap: 0.5rem;
859
+ border-radius: 0.25rem;
860
+ }
861
+
862
+ .bn-ak-button:where(.dark, .dark *) {
863
+ --border: rgb(255 255 255/10%);
864
+ --highlight: rgb(255 255 255/5%);
865
+ --shadow: rgb(0 0 0/25%);
866
+ background-color: hsl(204 20% 100% / 0.05);
867
+ color: hsl(204 20% 100%);
868
+ box-shadow:
869
+ inset 0 0 0 1px var(--border),
870
+ inset 0 -1px 0 1px var(--shadow),
871
+ inset 0 1px 0 var(--highlight);
872
+ }
873
+
874
+ .bn-ak-button:not(:active):hover {
875
+ --border: rgb(0 0 0/33%);
876
+ }
877
+
878
+ .bn-ak-button:where(.dark, .dark *):not(:active):hover {
879
+ --border: rgb(255 255 255/25%);
880
+ }
881
+
882
+ .bn-ak-button[aria-disabled="true"] {
883
+ opacity: 0.5;
884
+ }
885
+
886
+ .bn-ak-button[data-focus-visible] {
887
+ outline-style: solid;
888
+ }
889
+
890
+ .bn-ak-button:active,
891
+ .bn-ak-button[data-active] {
892
+ padding-top: 0.125rem;
893
+ box-shadow:
894
+ inset 0 0 0 1px var(--border),
895
+ inset 0 2px 0 var(--border);
896
+ }
897
+
898
+ @media (min-width: 640px) {
899
+ .bn-ak-button {
900
+ gap: 0.5rem;
901
+ }
902
+ }
903
+
904
+ .bn-ak-button:active:where(.dark, .dark *),
905
+ .bn-ak-button[data-active]:where(.dark, .dark *) {
906
+ box-shadow:
907
+ inset 0 0 0 1px var(--border),
908
+ inset 0 1px 1px 1px var(--shadow);
909
+ }
910
+
911
+ .bn-ak-secondary {
912
+ background-color: transparent;
913
+ color: currentColor;
914
+ box-shadow: none;
915
+ }
916
+
917
+ .bn-ak-secondary:hover {
918
+ background-color: hsl(204 4% 0% / 0.05);
919
+ }
920
+
921
+ .bn-ak-secondary:where(.dark, .dark *) {
922
+ background-color: transparent;
923
+ box-shadow: none;
924
+ }
925
+
926
+ .bn-ak-secondary:hover:where(.dark, .dark *) {
927
+ background-color: hsl(204 20% 100% / 0.05);
928
+ }
929
+
930
+ .bn-ak-secondary:active:where(.dark, .dark *),
931
+ .bn-ak-secondary[data-active]:where(.dark, .dark *) {
932
+ box-shadow: none;
933
+ }
934
+
935
+ .bn-ak-toolbar {
936
+ display: flex;
937
+ max-width: 100%;
938
+ align-items: center;
939
+ gap: 0.25rem;
940
+ overflow-x: auto;
941
+ border-radius: 0.5rem;
942
+ background-color: hsl(204 20% 100%);
943
+ padding: 0.25rem;
944
+ box-shadow:
945
+ 0 1px 3px 0 rgb(0 0 0 / 0.1),
946
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
947
+ }
948
+
949
+ .bn-ak-toolbar:where(.dark, .dark *) {
950
+ background-color: hsl(204 4% 16%);
951
+ box-shadow:
952
+ 0 1px 3px 0 rgb(0 0 0 / 0.25),
953
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
954
+ }
955
+
956
+ .bn-ak-separator {
957
+ height: 2rem;
958
+ border-right-width: 1px;
959
+ border-color: hsl(204 20% 88%);
960
+ }
961
+
962
+ .bn-ak-separator:where(.dark, .dark *) {
963
+ border-color: hsl(204 4% 28%);
964
+ }
965
+
966
+ /* https://ariakit.org/components/tooltip */
967
+ .bn-ak-tooltip {
968
+ z-index: 50;
969
+ cursor: default;
970
+ border-radius: 0.375rem;
971
+ border-width: 1px;
972
+ border-color: hsl(204 20% 82%);
973
+ background-color: hsl(204 20% 94%);
974
+ padding-top: 0.25rem;
975
+ padding-bottom: 0.25rem;
976
+ padding-left: 0.5rem;
977
+ padding-right: 0.5rem;
978
+ font-size: 0.875rem;
979
+ line-height: 1.25rem;
980
+ color: black;
981
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
982
+ }
983
+
984
+ .bn-ak-tooltip:where(.dark, .dark *) {
985
+ border-color: hsl(204 4% 24%);
986
+ background-color: hsl(204 4% 16%);
987
+ color: white;
988
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.15);
989
+ }
990
+
991
+ .bn-ak-link {
992
+ font-weight: 500;
993
+ color: hsl(204 100% 35%);
994
+ text-decoration-line: underline;
995
+ text-decoration-thickness: 1px;
996
+ text-underline-offset: 0.25em;
997
+ }
998
+
999
+ .bn-ak-link:hover {
1000
+ text-decoration-thickness: 3px;
1001
+ }
1002
+
1003
+ .bn-ak-link:where(.dark, .dark *) {
1004
+ color: hsl(204 100% 64%);
1005
+ }