@tanstack/hotkeys-devtools 1.0.0 → 1.1.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.
Files changed (43) hide show
  1. package/dist/HotkeysContextProvider.js +1 -2
  2. package/dist/_registrations.js +1 -2
  3. package/dist/components/ActionButtons.js +2 -3
  4. package/dist/components/DetailsPanel.js +16 -3
  5. package/dist/components/HeldKeysTopbar.js +5 -3
  6. package/dist/components/HotkeyList.js +13 -3
  7. package/dist/components/Shell.js +5 -4
  8. package/dist/components/index.js +1 -2
  9. package/dist/core.d.ts +3 -6
  10. package/dist/core.js +1 -2
  11. package/dist/index.d.ts +2 -4
  12. package/dist/index.js +1 -2
  13. package/dist/sequence-progress.js +1 -2
  14. package/dist/styles/tokens.js +1 -2
  15. package/dist/styles/use-styles.js +5 -4
  16. package/package.json +11 -11
  17. package/dist/HotkeysContextProvider.js.map +0 -1
  18. package/dist/_registrations.js.map +0 -1
  19. package/dist/components/ActionButtons.js.map +0 -1
  20. package/dist/components/DetailsPanel.js.map +0 -1
  21. package/dist/components/HeldKeysTopbar.js.map +0 -1
  22. package/dist/components/HotkeyList.js.map +0 -1
  23. package/dist/components/Shell.js.map +0 -1
  24. package/dist/components/index.js.map +0 -1
  25. package/dist/core.js.map +0 -1
  26. package/dist/index.js.map +0 -1
  27. package/dist/sequence-progress.js.map +0 -1
  28. package/dist/styles/tokens.js.map +0 -1
  29. package/dist/styles/use-styles.js.map +0 -1
  30. package/src/HotkeysContextProvider.tsx +0 -130
  31. package/src/_registrations.ts +0 -59
  32. package/src/components/ActionButtons.tsx +0 -38
  33. package/src/components/DetailsPanel.tsx +0 -685
  34. package/src/components/HeldKeysTopbar.tsx +0 -46
  35. package/src/components/HotkeyList.tsx +0 -473
  36. package/src/components/Shell.tsx +0 -171
  37. package/src/components/index.tsx +0 -19
  38. package/src/core.tsx +0 -11
  39. package/src/index.ts +0 -11
  40. package/src/production.ts +0 -5
  41. package/src/sequence-progress.ts +0 -29
  42. package/src/styles/tokens.ts +0 -305
  43. package/src/styles/use-styles.ts +0 -687
@@ -1,687 +0,0 @@
1
- import * as goober from 'goober'
2
- import { createEffect, createSignal } from 'solid-js'
3
- import { useTheme } from '@tanstack/devtools-ui'
4
- import { tokens } from './tokens'
5
-
6
- const stylesFactory = (theme: 'light' | 'dark') => {
7
- const { colors, font, size, alpha, border } = tokens
8
- const { fontFamily, size: fontSize } = font
9
- const css = goober.css
10
- const t = (light: string, dark: string) => (theme === 'light' ? light : dark)
11
-
12
- return {
13
- /** Full-height flex child so MainPanel gets a bounded height from the portal */
14
- shellRoot: css`
15
- display: flex;
16
- flex-direction: column;
17
- min-height: 0;
18
- height: 100%;
19
- flex: 1;
20
- overflow: hidden;
21
- `,
22
- /** Overrides devtools-ui MainPanel (overflow-y: auto) so inner columns scroll independently */
23
- mainPanelShell: css`
24
- display: flex;
25
- flex-direction: column;
26
- flex: 1 1 0%;
27
- min-height: 0;
28
- height: auto;
29
- overflow: hidden !important;
30
- `,
31
- mainContainer: css`
32
- display: flex;
33
- flex-direction: column;
34
- flex: 1 1 0%;
35
- min-height: 0;
36
- overflow: hidden;
37
- padding: ${size[2]};
38
- padding-top: 0;
39
- margin-top: -8px;
40
- `,
41
- heldKeysBar: css`
42
- background: ${t(colors.gray[100], colors.darkGray[800])};
43
- border-radius: ${border.radius.lg};
44
- border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
45
- display: flex;
46
- align-items: center;
47
- gap: ${size[3]};
48
- padding: ${size[3]} ${size[3]};
49
- flex-shrink: 0;
50
- min-height: 72px;
51
- margin-bottom: ${size[2]};
52
- `,
53
- heldKeysBarHeader: css`
54
- font-size: ${fontSize.sm};
55
- font-weight: ${font.weight.bold};
56
- color: ${t(colors.gray[600], colors.gray[400])};
57
- text-transform: uppercase;
58
- letter-spacing: 0.05em;
59
- flex-shrink: 0;
60
- `,
61
- heldKeysBarList: css`
62
- display: flex;
63
- align-items: center;
64
- gap: ${size[1.5]};
65
- flex-wrap: wrap;
66
- flex: 1;
67
- min-width: 0;
68
- `,
69
- panelsContainer: css`
70
- display: flex;
71
- flex: 1 1 0%;
72
- min-height: 0;
73
- overflow: hidden;
74
- align-items: stretch;
75
- `,
76
- dragHandle: css`
77
- width: 8px;
78
- background: ${t(colors.gray[300], colors.darkGray[600])};
79
- cursor: col-resize;
80
- position: relative;
81
- transition: all 0.2s ease;
82
- user-select: none;
83
- pointer-events: all;
84
- margin: 0 ${size[1]};
85
- border-radius: 2px;
86
-
87
- &:hover {
88
- background: ${t(colors.blue[600], colors.blue[500])};
89
- margin: 0 ${size[1]};
90
- }
91
-
92
- &.dragging {
93
- background: ${t(colors.blue[700], colors.blue[600])};
94
- margin: 0 ${size[1]};
95
- }
96
-
97
- &::after {
98
- content: '';
99
- position: absolute;
100
- top: 50%;
101
- left: 50%;
102
- transform: translate(-50%, -50%);
103
- width: 2px;
104
- height: 20px;
105
- background: ${t(colors.gray[400], colors.darkGray[400])};
106
- border-radius: 1px;
107
- pointer-events: none;
108
- }
109
-
110
- &:hover::after,
111
- &.dragging::after {
112
- background: ${t(colors.blue[500], colors.blue[300])};
113
- }
114
- `,
115
- keyCap: css`
116
- display: inline-flex;
117
- flex-direction: column;
118
- align-items: center;
119
- justify-content: center;
120
- min-width: 36px;
121
- padding: ${size[1]} ${size[2]};
122
- font-family: ${fontFamily.mono};
123
- font-size: ${fontSize.sm};
124
- font-weight: ${font.weight.bold};
125
- color: ${t(colors.gray[800], colors.gray[100])};
126
- background: ${t(colors.white, colors.darkGray[600])};
127
- border: 1px solid ${t(colors.gray[300], colors.darkGray[400])};
128
- border-bottom-width: 2px;
129
- border-radius: ${border.radius.sm};
130
- box-shadow: ${tokens.shadow.xs()};
131
- text-transform: capitalize;
132
- white-space: nowrap;
133
- line-height: 1.2;
134
- `,
135
- keyCapCode: css`
136
- font-size: ${fontSize['2xs']};
137
- font-weight: ${font.weight.normal};
138
- color: ${t(colors.gray[500], colors.gray[400])};
139
- text-transform: none;
140
- line-height: 1;
141
- margin-top: 2px;
142
- `,
143
- noKeysHeld: css`
144
- font-size: ${fontSize.sm};
145
- color: ${t(colors.gray[400], colors.gray[600])};
146
- font-style: italic;
147
- text-align: center;
148
- padding: ${size[1]};
149
- `,
150
- leftPanel: css`
151
- background: ${t(colors.gray[100], colors.darkGray[800])};
152
- border-radius: ${border.radius.lg};
153
- border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
154
- display: flex;
155
- flex-direction: column;
156
- flex-shrink: 0;
157
- min-height: 0;
158
- min-width: 0;
159
- `,
160
- leftPanelScroll: css`
161
- flex: 1;
162
- min-height: 0;
163
- overflow-y: auto;
164
- `,
165
- rightPanel: css`
166
- background: ${t(colors.gray[100], colors.darkGray[800])};
167
- border-radius: ${border.radius.lg};
168
- border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
169
- display: flex;
170
- flex-direction: column;
171
- flex: 1;
172
- min-height: 0;
173
- min-width: 0;
174
- overflow: hidden;
175
- `,
176
- searchContainer: css`
177
- position: relative;
178
- padding: ${size[2]};
179
- padding-bottom: 0;
180
- flex-shrink: 0;
181
- `,
182
- searchInput: css`
183
- width: 100%;
184
- padding: ${size[1.5]} ${size[2]};
185
- padding-right: ${size[7]};
186
- font-size: ${fontSize.xs};
187
- font-family: ${fontFamily.sans};
188
- color: ${t(colors.gray[900], colors.gray[100])};
189
- background: ${t(colors.gray[200], colors.darkGray[700])};
190
- border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
191
- border-radius: ${border.radius.md};
192
- outline: none;
193
- box-sizing: border-box;
194
-
195
- &::placeholder {
196
- color: ${t(colors.gray[500], colors.gray[500])};
197
- }
198
-
199
- &:focus {
200
- border-color: ${t(colors.blue[500], colors.blue[400])};
201
- box-shadow: 0 0 0 1px
202
- ${t(colors.blue[500] + alpha[30], colors.blue[400] + alpha[30])};
203
- }
204
- `,
205
- searchClear: css`
206
- position: absolute;
207
- right: ${size[3]};
208
- top: 50%;
209
- transform: translateY(-50%);
210
- background: none;
211
- border: none;
212
- color: ${t(colors.gray[500], colors.gray[400])};
213
- font-size: ${fontSize.md};
214
- cursor: pointer;
215
- padding: ${size[1]};
216
- line-height: 1;
217
- display: flex;
218
- align-items: center;
219
- justify-content: center;
220
-
221
- &:hover {
222
- color: ${t(colors.gray[700], colors.gray[200])};
223
- }
224
- `,
225
- panelHeader: css`
226
- font-size: ${fontSize.md};
227
- font-weight: ${font.weight.bold};
228
- color: ${t(colors.blue[700], colors.blue[400])};
229
- padding: ${size[2]};
230
- border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
231
- background: ${t(colors.gray[100], colors.darkGray[800])};
232
- flex-shrink: 0;
233
- `,
234
- hotkeyList: css`
235
- padding: ${size[1]};
236
- `,
237
- hotkeyRow: css`
238
- display: flex;
239
- justify-content: space-between;
240
- align-items: center;
241
- padding: ${size[2]};
242
- margin-bottom: ${size[1]};
243
- background: ${t(colors.gray[200], colors.darkGray[700])};
244
- border-radius: ${border.radius.md};
245
- cursor: pointer;
246
- transition: all 0.2s ease;
247
- border: 1px solid transparent;
248
-
249
- &:hover {
250
- background: ${t(colors.gray[300], colors.darkGray[600])};
251
- border-color: ${t(colors.gray[400], colors.darkGray[500])};
252
- }
253
- `,
254
- hotkeyRowSelected: css`
255
- background: ${t(colors.blue[100], colors.blue[900] + alpha[20])};
256
- border-color: ${t(colors.blue[600], colors.blue[500])};
257
- box-shadow: 0 0 0 1px
258
- ${t(colors.blue[600] + alpha[30], colors.blue[500] + alpha[30])};
259
- `,
260
- hotkeyRowTriggered: css`
261
- animation: hotkey-pulse 0.6s ease-out;
262
-
263
- @keyframes hotkey-pulse {
264
- 0% {
265
- border-color: ${t(colors.blue[500], colors.blue[400])};
266
- box-shadow: 0 0 0 2px
267
- ${t(colors.blue[500] + alpha[40], colors.blue[400] + alpha[40])};
268
- }
269
- 100% {
270
- border-color: transparent;
271
- box-shadow: 0 0 0 0px
272
- ${t(colors.blue[500] + '00', colors.blue[400] + '00')};
273
- }
274
- }
275
- `,
276
- hotkeyLabel: css`
277
- font-size: ${fontSize.xs};
278
- color: ${t(colors.gray[900], colors.gray[100])};
279
- flex: 1;
280
- overflow: hidden;
281
- text-overflow: ellipsis;
282
- white-space: nowrap;
283
- display: flex;
284
- align-items: center;
285
- gap: ${size[1.5]};
286
- min-width: 0;
287
- `,
288
- hotkeyLabelKeys: css`
289
- font-family: ${fontFamily.mono};
290
- flex-shrink: 0;
291
- `,
292
- hotkeyLabelName: css`
293
- font-family: ${fontFamily.sans};
294
- color: ${t(colors.gray[500], colors.gray[400])};
295
- overflow: hidden;
296
- text-overflow: ellipsis;
297
- white-space: nowrap;
298
- min-width: 0;
299
- `,
300
- sequenceStepMatched: css`
301
- font-weight: ${font.weight.bold};
302
- color: ${t(colors.blue[700], colors.blue[300])};
303
- `,
304
- hotkeyBadges: css`
305
- display: flex;
306
- gap: ${size[1]};
307
- margin-left: ${size[1]};
308
- flex-shrink: 0;
309
- overflow: visible;
310
- `,
311
- badge: css`
312
- font-size: ${fontSize['2xs']};
313
- padding: ${size[0.5]} ${size[1]};
314
- border-radius: ${border.radius.sm};
315
- text-transform: uppercase;
316
- letter-spacing: 0.05em;
317
- white-space: nowrap;
318
- `,
319
- badgeEnabled: css`
320
- color: ${t(colors.green[700], colors.green[400])};
321
- background: ${t(colors.green[100], colors.green[900] + alpha[30])};
322
- `,
323
- badgeDisabled: css`
324
- color: ${t(colors.red[700], colors.red[400])};
325
- background: ${t(colors.red[100], colors.red[900] + alpha[30])};
326
- `,
327
- badgeKeydown: css`
328
- color: ${t(colors.purple[700], colors.purple[400])};
329
- background: ${t(colors.purple[100], colors.purple[900] + alpha[30])};
330
- `,
331
- badgeKeyup: css`
332
- color: ${t(colors.teal[700], colors.teal[400])};
333
- background: ${t(colors.teal[100], colors.teal[900] + alpha[30])};
334
- `,
335
- badgeTarget: css`
336
- color: ${t(colors.gray[700], colors.gray[300])};
337
- background: ${t(colors.gray[200], colors.darkGray[600])};
338
- `,
339
- badgeConflict: css`
340
- color: ${t(colors.yellow[700], colors.yellow[400])};
341
- background: ${t(colors.yellow[100], colors.yellow[900] + alpha[30])};
342
- `,
343
- badgeError: css`
344
- color: ${t(colors.red[700], colors.red[400])};
345
- background: ${t(colors.red[100], colors.red[900] + alpha[30])};
346
- `,
347
- badgeAllow: css`
348
- color: ${t(colors.gray[600], colors.gray[400])};
349
- background: ${t(colors.gray[200], colors.darkGray[600])};
350
- `,
351
- badgeInfo: css`
352
- color: ${t(colors.blue[700], colors.blue[400])};
353
- background: ${t(colors.blue[100], colors.blue[900] + alpha[30])};
354
- `,
355
- stateDetails: css`
356
- display: flex;
357
- flex-direction: column;
358
- flex: 1;
359
- min-height: 0;
360
- overflow-y: auto;
361
- padding: ${size[2]};
362
- `,
363
- stateHeader: css`
364
- margin-bottom: ${size[2]};
365
- padding-bottom: ${size[2]};
366
- border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
367
- `,
368
- stateTitle: css`
369
- font-size: ${fontSize.md};
370
- font-weight: ${font.weight.bold};
371
- color: ${t(colors.blue[700], colors.blue[400])};
372
- margin-bottom: ${size[1]};
373
- `,
374
- detailsGrid: css`
375
- display: grid;
376
- grid-template-columns: 1fr;
377
- gap: ${size[2]};
378
- align-items: start;
379
- `,
380
- detailSection: css`
381
- background: ${t(colors.white, colors.darkGray[700])};
382
- border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
383
- border-radius: ${border.radius.md};
384
- padding: ${size[2]};
385
- `,
386
- detailSectionHeader: css`
387
- font-size: ${fontSize.sm};
388
- font-weight: ${font.weight.bold};
389
- color: ${t(colors.gray[800], colors.gray[200])};
390
- margin-bottom: ${size[1]};
391
- text-transform: uppercase;
392
- letter-spacing: 0.04em;
393
- `,
394
- infoGrid: css`
395
- display: grid;
396
- grid-template-columns: auto 1fr;
397
- gap: ${size[1]};
398
- row-gap: ${size[1]};
399
- align-items: center;
400
- `,
401
- infoLabel: css`
402
- color: ${t(colors.gray[600], colors.gray[400])};
403
- font-size: ${fontSize.xs};
404
- text-transform: uppercase;
405
- letter-spacing: 0.05em;
406
- `,
407
- infoValueMono: css`
408
- font-family: ${fontFamily.mono};
409
- font-size: ${fontSize.xs};
410
- color: ${t(colors.gray[900], colors.gray[100])};
411
- word-break: break-all;
412
- `,
413
- actionsRow: css`
414
- display: flex;
415
- flex-wrap: wrap;
416
- gap: ${size[2]};
417
- `,
418
- actionButton: css`
419
- display: inline-flex;
420
- align-items: center;
421
- gap: ${size[1]};
422
- padding: ${size[1]} ${size[2]};
423
- border-radius: ${border.radius.md};
424
- border: 1px solid ${t(colors.gray[300], colors.darkGray[500])};
425
- background: ${t(colors.gray[200], colors.darkGray[600])};
426
- color: ${t(colors.gray[900], colors.gray[100])};
427
- font-size: ${fontSize.xs};
428
- cursor: pointer;
429
- user-select: none;
430
- transition:
431
- background 0.15s,
432
- border-color 0.15s;
433
- &:hover {
434
- background: ${t(colors.gray[300], colors.darkGray[500])};
435
- border-color: ${t(colors.gray[400], colors.darkGray[400])};
436
- }
437
- &:disabled {
438
- opacity: 0.5;
439
- cursor: not-allowed;
440
- &:hover {
441
- background: ${t(colors.gray[200], colors.darkGray[600])};
442
- border-color: ${t(colors.gray[300], colors.darkGray[500])};
443
- }
444
- }
445
- `,
446
- actionDotGreen: css`
447
- width: 6px;
448
- height: 6px;
449
- border-radius: 9999px;
450
- background: ${colors.green[400]};
451
- `,
452
- noSelection: css`
453
- flex: 1;
454
- display: flex;
455
- align-items: center;
456
- justify-content: center;
457
- color: ${t(colors.gray[500], colors.gray[500])};
458
- font-style: italic;
459
- text-align: center;
460
- padding: ${size[4]};
461
- `,
462
- keyBreakdown: css`
463
- display: flex;
464
- flex-wrap: wrap;
465
- gap: ${size[1]};
466
- align-items: center;
467
- `,
468
- keyBreakdownPlus: css`
469
- color: ${t(colors.gray[500], colors.gray[400])};
470
- font-size: ${fontSize.sm};
471
- `,
472
- keyBreakdownSubHeader: css`
473
- font-size: ${fontSize.xs};
474
- font-weight: ${font.weight.semibold};
475
- color: ${t(colors.gray[500], colors.gray[400])};
476
- margin-top: ${size[3]};
477
- margin-bottom: ${size[1]};
478
- `,
479
- keyBreakdownSplitRow: css`
480
- display: flex;
481
- flex-direction: row;
482
- flex-wrap: wrap;
483
- align-items: center;
484
- gap: ${size[3]};
485
- `,
486
- keyBreakdownSplitLeft: css`
487
- flex: 0 0 auto;
488
- display: flex;
489
- flex-wrap: wrap;
490
- align-items: center;
491
- gap: ${size[1]};
492
- `,
493
- keyBreakdownSplitArrow: css`
494
- flex-shrink: 0;
495
- color: ${t(colors.gray[500], colors.gray[400])};
496
- font-size: ${fontSize.sm};
497
- font-family: ${fontFamily.mono};
498
- user-select: none;
499
- `,
500
- keyBreakdownSplitRight: css`
501
- flex: 1 1 200px;
502
- min-width: min(220px, 100%);
503
- `,
504
- platformBreakdown: css`
505
- display: flex;
506
- flex-direction: column;
507
- gap: ${size[1]};
508
- `,
509
- platformBreakdownRow: css`
510
- display: grid;
511
- grid-template-columns: 72px 1fr;
512
- gap: ${size[2]};
513
- align-items: center;
514
- font-size: ${fontSize.xs};
515
- `,
516
- platformBreakdownLabel: css`
517
- color: ${t(colors.gray[500], colors.gray[400])};
518
- flex-shrink: 0;
519
- `,
520
- platformBreakdownPretty: css`
521
- color: ${t(colors.gray[900], colors.gray[100])};
522
- word-break: break-word;
523
- min-width: 0;
524
- `,
525
- sequenceChordDetail: css`
526
- margin-top: ${size[3]};
527
- padding-top: ${size[2]};
528
- border-top: 1px solid ${t(colors.gray[200], colors.darkGray[600])};
529
- `,
530
- keyCapLarge: css`
531
- display: inline-flex;
532
- align-items: center;
533
- justify-content: center;
534
- min-width: 36px;
535
- padding: ${size[1]} ${size[2]};
536
- font-family: ${fontFamily.mono};
537
- font-size: ${fontSize.sm};
538
- font-weight: ${font.weight.bold};
539
- color: ${t(colors.gray[800], colors.gray[100])};
540
- background: ${t(colors.white, colors.darkGray[600])};
541
- border: 1px solid ${t(colors.gray[300], colors.darkGray[400])};
542
- border-bottom-width: 3px;
543
- border-radius: ${border.radius.md};
544
- box-shadow: ${tokens.shadow.sm()};
545
- text-transform: capitalize;
546
- white-space: nowrap;
547
- `,
548
- keyCapLargeInProgress: css`
549
- border-color: ${t(colors.blue[500], colors.blue[400])};
550
- color: ${t(colors.blue[900], colors.blue[200])};
551
- background: ${t(colors.blue[50], colors.darkGray[500])};
552
- `,
553
- conflictList: css`
554
- display: flex;
555
- flex-direction: column;
556
- gap: ${size[1]};
557
- `,
558
- conflictItem: css`
559
- font-family: ${fontFamily.mono};
560
- font-size: ${fontSize.xs};
561
- color: ${t(colors.yellow[700], colors.yellow[400])};
562
- padding: ${size[1]} ${size[2]};
563
- background: ${t(colors.yellow[50], colors.yellow[900] + alpha[20])};
564
- border-radius: ${border.radius.sm};
565
- border: 1px solid ${t(colors.yellow[200], colors.yellow[800] + alpha[30])};
566
- `,
567
- conflictItemAllow: css`
568
- font-family: ${fontFamily.mono};
569
- font-size: ${fontSize.xs};
570
- color: ${t(colors.gray[600], colors.gray[400])};
571
- padding: ${size[1]} ${size[2]};
572
- background: ${t(colors.gray[100], colors.darkGray[700])};
573
- border-radius: ${border.radius.sm};
574
- border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
575
- `,
576
- conflictItemError: css`
577
- font-family: ${fontFamily.mono};
578
- font-size: ${fontSize.xs};
579
- color: ${t(colors.red[700], colors.red[400])};
580
- padding: ${size[1]} ${size[2]};
581
- background: ${t(colors.red[50], colors.red[900] + alpha[20])};
582
- border-radius: ${border.radius.sm};
583
- border: 1px solid ${t(colors.red[200], colors.red[900] + alpha[30])};
584
- `,
585
- conflictItemScope: css`
586
- font-family: ${fontFamily.mono};
587
- font-size: ${fontSize.xs};
588
- color: ${t(colors.blue[700], colors.blue[400])};
589
- padding: ${size[1]} ${size[2]};
590
- background: ${t(colors.blue[50], colors.blue[900] + alpha[20])};
591
- border-radius: ${border.radius.sm};
592
- border: 1px solid ${t(colors.blue[200], colors.blue[800] + alpha[30])};
593
- `,
594
- optionRow: css`
595
- display: flex;
596
- justify-content: space-between;
597
- align-items: center;
598
- padding: ${size[1]} 0;
599
- font-size: ${fontSize.xs};
600
- border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[600])};
601
- &:last-child {
602
- border-bottom: none;
603
- }
604
- `,
605
- optionLabel: css`
606
- color: ${t(colors.gray[600], colors.gray[400])};
607
- `,
608
- optionValue: css`
609
- font-family: ${fontFamily.mono};
610
- color: ${t(colors.gray[900], colors.gray[100])};
611
- `,
612
- optionValueTrue: css`
613
- font-family: ${fontFamily.mono};
614
- color: ${t(colors.green[600], colors.green[400])};
615
- `,
616
- optionValueFalse: css`
617
- font-family: ${fontFamily.mono};
618
- color: ${t(colors.red[600], colors.red[400])};
619
- `,
620
- tooltip: css`
621
- position: relative;
622
- &:hover > [data-tooltip] {
623
- opacity: 1;
624
- visibility: visible;
625
- }
626
- `,
627
- tooltipText: css`
628
- position: absolute;
629
- top: 100%;
630
- left: 50%;
631
- transform: translateX(-50%);
632
- padding: ${size[1]} ${size[1.5]};
633
- background: ${t(colors.gray[800], colors.darkGray[500])};
634
- color: ${t(colors.white, colors.gray[100])};
635
- font-size: ${fontSize['2xs']};
636
- border-radius: ${border.radius.sm};
637
- white-space: nowrap;
638
- pointer-events: none;
639
- opacity: 0;
640
- visibility: hidden;
641
- transition:
642
- opacity 0.15s,
643
- visibility 0.15s;
644
- z-index: ${tokens.zIndices.tooltip};
645
- margin-top: ${size[1]};
646
- `,
647
- rowTooltipText: css`
648
- position: absolute;
649
- bottom: 100%;
650
- left: ${size[2]};
651
- padding: ${size[1]} ${size[1.5]};
652
- background: ${t(colors.gray[800], colors.darkGray[500])};
653
- color: ${t(colors.white, colors.gray[100])};
654
- font-size: ${fontSize['2xs']};
655
- font-family: ${fontFamily.sans};
656
- border-radius: ${border.radius.sm};
657
- white-space: nowrap;
658
- pointer-events: none;
659
- opacity: 0;
660
- visibility: hidden;
661
- transition:
662
- opacity 0.15s,
663
- visibility 0.15s;
664
- z-index: ${tokens.zIndices.tooltip};
665
- margin-bottom: ${size[1]};
666
- max-width: 300px;
667
- overflow: hidden;
668
- text-overflow: ellipsis;
669
- `,
670
- triggerCount: css`
671
- font-family: ${fontFamily.mono};
672
- font-size: ${fontSize['2xs']};
673
- color: ${t(colors.gray[500], colors.gray[400])};
674
- margin-left: ${size[1]};
675
- flex-shrink: 0;
676
- `,
677
- }
678
- }
679
-
680
- export function useStyles() {
681
- const { theme } = useTheme()
682
- const [styles, setStyles] = createSignal(stylesFactory(theme()))
683
- createEffect(() => {
684
- setStyles(stylesFactory(theme()))
685
- })
686
- return styles
687
- }