@tremolo-ui/react 0.5.0 → 0.6.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 (76) hide show
  1. package/dist/compose-refs.cjs +72 -0
  2. package/dist/compose-refs.cjs.map +1 -0
  3. package/dist/compose-refs.d.cts +43 -0
  4. package/dist/compose-refs.d.cts.map +1 -0
  5. package/dist/compose-refs.d.ts +43 -0
  6. package/dist/compose-refs.d.ts.map +1 -0
  7. package/dist/compose-refs.js +70 -0
  8. package/dist/compose-refs.js.map +1 -0
  9. package/dist/index.cjs +1468 -534
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +1103 -435
  12. package/dist/index.d.cts.map +1 -1
  13. package/dist/index.d.ts +1103 -435
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +1457 -534
  16. package/dist/index.js.map +1 -1
  17. package/package.json +28 -26
  18. package/src/components/AnimationCanvas/index.tsx +115 -76
  19. package/src/components/Knob/ActiveLine.tsx +7 -6
  20. package/src/components/Knob/InactiveLine.tsx +9 -10
  21. package/src/components/Knob/SVGRoot.tsx +5 -3
  22. package/src/components/Knob/Thumb.tsx +33 -11
  23. package/src/components/Knob/context.tsx +17 -1
  24. package/src/components/Knob/index.tsx +148 -55
  25. package/src/components/NumberInput/DecrementStepper.tsx +8 -4
  26. package/src/components/NumberInput/IncrementStepper.tsx +9 -4
  27. package/src/components/NumberInput/InputField.tsx +188 -105
  28. package/src/components/NumberInput/Stepper.tsx +123 -72
  29. package/src/components/NumberInput/{stepperButton.tsx → StepperButton.tsx} +27 -22
  30. package/src/components/NumberInput/context.tsx +35 -8
  31. package/src/components/NumberInput/index.tsx +272 -75
  32. package/src/components/Piano/index.tsx +354 -188
  33. package/src/components/PointsEditor/Background.tsx +11 -2
  34. package/src/components/PointsEditor/Container.tsx +87 -27
  35. package/src/components/PointsEditor/Point.tsx +239 -79
  36. package/src/components/PointsEditor/SelectionBox.tsx +54 -0
  37. package/src/components/PointsEditor/context.tsx +78 -10
  38. package/src/components/PointsEditor/index.tsx +440 -39
  39. package/src/components/Slider/Marks.tsx +48 -16
  40. package/src/components/Slider/MarksOption.tsx +57 -43
  41. package/src/components/Slider/Thumb.tsx +108 -50
  42. package/src/components/Slider/Track.tsx +69 -58
  43. package/src/components/Slider/context.tsx +4 -2
  44. package/src/components/Slider/index.tsx +131 -65
  45. package/src/components/Slider/type.ts +26 -8
  46. package/src/components/XYPad/Area.tsx +45 -35
  47. package/src/components/XYPad/Thumb.tsx +135 -62
  48. package/src/components/XYPad/context.tsx +4 -1
  49. package/src/components/XYPad/index.tsx +180 -48
  50. package/src/components/_util/Placement.tsx +68 -0
  51. package/src/components/_util/VisuallyHiddenRangeInput.tsx +24 -0
  52. package/src/components/_util/css-length.ts +13 -0
  53. package/src/{components/_util/composeRefs.tsx → compose-refs/index.tsx} +33 -5
  54. package/src/hooks/_internal/useCallbackRef.ts +3 -1
  55. package/src/hooks/_internal/useCheckSteps.ts +170 -0
  56. package/src/hooks/useAnimationFrame.ts +17 -7
  57. package/src/hooks/useDrag.ts +38 -8
  58. package/src/hooks/useDragValue.ts +54 -9
  59. package/src/hooks/useEventListener.ts +10 -6
  60. package/src/hooks/useLongPress.ts +42 -8
  61. package/src/hooks/useMIDIAccess.ts +82 -11
  62. package/src/hooks/useMIDIInput.ts +45 -13
  63. package/src/hooks/useMIDIMessage.ts +23 -5
  64. package/src/index.ts +38 -21
  65. package/src/input-event.ts +32 -0
  66. package/dist/index.css +0 -501
  67. package/src/Globals.d.ts +0 -3
  68. package/src/components/Knob/index.css +0 -81
  69. package/src/components/NumberInput/index.css +0 -121
  70. package/src/components/Piano/index.css +0 -90
  71. package/src/components/PointsEditor/index.css +0 -35
  72. package/src/components/Slider/index.css +0 -125
  73. package/src/components/XYPad/index.css +0 -60
  74. package/src/components/_util/index.ts +0 -28
  75. package/src/styles/global.css +0 -19
  76. /package/src/components/Piano/{keyboardShortcuts.ts → keyboard-shortcuts.ts} +0 -0
package/dist/index.css DELETED
@@ -1,501 +0,0 @@
1
- .tremolo-user-select-none {
2
- user-select: none;
3
- }
4
-
5
- .tremolo-cursor-pointer {
6
- cursor: pointer;
7
- }
8
-
9
- .tremolo-cursor-move {
10
- cursor: move;
11
- }
12
-
13
- .tremolo-cursor-grabbing {
14
- cursor: grabbing;
15
- }
16
-
17
- .tremolo-cursor-none {
18
- cursor: none;
19
- }
20
- .tremolo-knob {
21
- --knob-size: 50px;
22
- width: var(--knob-size);
23
- height: var(--knob-size);
24
- cursor: grab;
25
- outline: 0;
26
- display: inline-block;
27
-
28
- &[aria-readonly="true"] {
29
- cursor: not-allowed;
30
- }
31
-
32
- &[data-dragging="true"] {
33
- cursor: inherit;
34
- }
35
- }
36
-
37
- .tremolo-knob-active-line {
38
- color: oklch(69.2% .17548 266.373);
39
-
40
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
41
- color: oklch(59.5% .17548 266.373);
42
- }
43
-
44
- :where(.tremolo-knob[aria-disabled="true"]) & {
45
- color: oklch(50.5% .03307 270.021);
46
- }
47
- }
48
-
49
- .tremolo-knob-inactive-line {
50
- color: oklch(95% 0 0);
51
-
52
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
53
- color: oklch(90% 0 0);
54
- }
55
- }
56
-
57
- .tremolo-knob-thumb {
58
- color: oklch(85.7% 0 0);
59
-
60
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
61
- color: oklch(84.5% 0 0);
62
- }
63
- }
64
-
65
- .tremolo-knob-thumb-line {
66
- color: oklch(94.2% 0 0);
67
- }
68
-
69
- :where(.dark, [data-theme="dark"]) {
70
- & .tremolo-knob-active-line {
71
- color: oklch(59.5% .17548 266.373);
72
-
73
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
74
- color: oklch(65.2% .17548 266.373);
75
- }
76
- }
77
-
78
- & .tremolo-knob-inactive-line {
79
- color: oklch(41.7% 0 0);
80
-
81
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
82
- color: oklch(44.59% 0 0);
83
- }
84
- }
85
-
86
- & .tremolo-knob-thumb {
87
- color: oklch(48.6% 0 0);
88
-
89
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
90
- color: oklch(51.7% 0 0);
91
- }
92
- }
93
-
94
- & .tremolo-knob-thumb-line {
95
- color: oklch(84.2% 0 0);
96
- }
97
- }
98
- .tremolo-number-input {
99
- --border-radius: 4px;
100
- --stepper-width: 20px;
101
- --stepper-icon-size: 12px;
102
- --active-color: oklch(59.5% .17548 266.373);
103
- --border-color: oklch(81% 0 0);
104
- border: 1px solid var(--border-color);
105
- border-radius: var(--border-radius);
106
- outline: none;
107
- flex-direction: row;
108
- width: 140px;
109
- height: min-content;
110
- transition: all .1s;
111
- display: inline-flex;
112
- position: relative;
113
-
114
- &:hover {
115
- --border-color: oklch(65.335% 0 0);
116
- }
117
-
118
- &:focus-within {
119
- --border-color: var(--active-color);
120
- box-shadow: 0px 0px 0px 2px
121
- color-mix(in srgb, var(--active-color) 10%, transparent);
122
- }
123
-
124
- &:not(:focus-within):has(.tremolo-number-input-field[data-out-of-range="true"]) {
125
- border-color: oklch(64.245% .21266 25.499);
126
- }
127
-
128
- &:not(:has(.tremolo-number-input-stepper)) {
129
- --stepper-width: 0px;
130
- }
131
- }
132
-
133
- .tremolo-number-input-field {
134
- color: inherit;
135
- width: calc(100% - 20px - var(--stepper-width));
136
- background-color: inherit;
137
- font: inherit;
138
- appearance: none;
139
- border: none;
140
- outline: none;
141
- margin: 0;
142
- padding: 6px 10px;
143
- display: block;
144
-
145
- &[aria-readonly="true"] {
146
- cursor: not-allowed;
147
- }
148
- }
149
-
150
- .tremolo-number-input-stepper {
151
- height: 100%;
152
- width: var(--stepper-width);
153
- opacity: 0;
154
- flex-direction: column;
155
- transition: all .1s linear;
156
- display: flex;
157
- position: absolute;
158
- top: 0;
159
- right: 0;
160
- transform: translateX(40%);
161
- }
162
-
163
- :is(.tremolo-number-input:hover, .tremolo-number-input:focus-within) .tremolo-number-input-stepper {
164
- opacity: 1;
165
- transform: translateX(0);
166
- }
167
-
168
- .tremolo-number-input-stepper-icon {
169
- width: var(--stepper-icon-size);
170
- height: var(--stepper-icon-size);
171
- }
172
-
173
- :is(.tremolo-number-input-increment-stepper, .tremolo-number-input-decrement-stepper) {
174
- user-select: none;
175
- cursor: pointer;
176
- border-inline-start: 1px solid oklch(84.522% 0 0);
177
- flex: 1;
178
- justify-content: center;
179
- align-items: center;
180
- max-height: 50%;
181
- font-size: .75rem;
182
- display: flex;
183
-
184
- &[aria-disabled="false"]:active {
185
- background-color: oklch(37.798% .03812 254.612 / .055);
186
- }
187
-
188
- &[aria-disabled="true"], &[aria-readonly="true"] {
189
- cursor: not-allowed;
190
- }
191
- }
192
-
193
- .tremolo-number-input-increment-stepper {
194
- border-top-right-radius: var(--border-radius);
195
- }
196
-
197
- .tremolo-number-input-decrement-stepper {
198
- border-bottom-right-radius: var(--border-radius);
199
- border-top: 1px solid oklch(84.522% 0 0);
200
- }
201
-
202
- :where(.dark, [data-theme="dark"]) {
203
- & .tremolo-number-input {
204
- --border-color: oklch(52% 0 0);
205
- }
206
- }
207
- .tremolo-piano {
208
- box-sizing: border-box;
209
- user-select: none;
210
- touch-action: none;
211
- display: inline-block;
212
- position: relative;
213
- }
214
-
215
- .tremolo-piano-white-key {
216
- --bg: oklch(100% 0 0);
217
- --color: oklch(0% 0 0);
218
- --active-bg: oklch(92% 0 0);
219
- --active-color: oklch(0% 0 0);
220
- box-sizing: border-box;
221
- background-color: var(--bg);
222
- -webkit-tap-highlight-color: transparent;
223
- color: var(--color);
224
- cursor: pointer;
225
- z-index: 1;
226
- border: 1px solid #555;
227
- border-radius: 0 0 8px 8px;
228
- position: absolute;
229
-
230
- &[data-active="true"] {
231
- background-color: var(--active-bg);
232
- color: var(--active-color);
233
- }
234
-
235
- &[aria-disabled="true"] {
236
- cursor: not-allowed;
237
- }
238
- }
239
-
240
- .tremolo-piano-black-key {
241
- --color: oklch(100% 0 0);
242
- --bg: oklch(32% 0 0);
243
- --active-color: oklch(100% 0 0);
244
- --active-bg: oklch(44% 0 0);
245
- box-sizing: border-box;
246
- background-color: var(--bg);
247
- -webkit-tap-highlight-color: transparent;
248
- color: var(--color);
249
- cursor: pointer;
250
- z-index: 2;
251
- border: 1px solid #555;
252
- border-radius: 0 0 8px 8px;
253
- position: absolute;
254
-
255
- &[data-active="true"] {
256
- background-color: var(--active-bg);
257
- color: var(--active-color);
258
- }
259
-
260
- &[aria-disabled="true"] {
261
- cursor: not-allowed;
262
- }
263
- }
264
-
265
- .tremolo-piano-key-label-wrapper {
266
- justify-content: center;
267
- align-items: end;
268
- height: 100%;
269
- display: flex;
270
- }
271
-
272
- .tremolo-piano-key-label {
273
- box-sizing: content-box;
274
- aspect-ratio: 1;
275
- border: 1px solid #888;
276
- border-radius: 4px;
277
- justify-content: center;
278
- align-items: center;
279
- max-width: calc(100% - 16px);
280
- height: 10px;
281
- margin-bottom: 10px;
282
- padding: 4px;
283
- font-size: .6rem;
284
- display: flex;
285
- }
286
-
287
- :where(.dark, [data-theme="dark"]) {
288
- & .tremolo-piano-white-key {
289
- --bg: oklch(80% 0 0);
290
- --color: oklch(0% 0 0);
291
- --active-bg: oklch(72% 0 0);
292
- --active-color: oklch(0% 0 0);
293
- }
294
- }
295
- .tremolo-points-editor {
296
- position: relative;
297
- }
298
-
299
- .tremolo-points-editor-background {
300
- z-index: 0;
301
- position: absolute;
302
- inset: 0;
303
- }
304
-
305
- .tremolo-points-editor-container {
306
- z-index: 10;
307
- position: absolute;
308
- inset: 0;
309
- }
310
-
311
- .tremolo-points-editor-point {
312
- --color: oklch(59.5% .17548 266.373);
313
- cursor: grab;
314
- background-color: var(--color);
315
- border-radius: 50%;
316
- outline: none;
317
- position: absolute;
318
- translate: -50% -50%;
319
-
320
- &[data-dragging="true"] {
321
- cursor: inherit;
322
- }
323
-
324
- &[aria-readonly="true"] {
325
- cursor: default;
326
- }
327
- }
328
- .tremolo-slider {
329
- --thumb-size: 22px;
330
- margin: calc(var(--thumb-size) / 2);
331
- cursor: pointer;
332
- -webkit-tap-highlight-color: transparent;
333
- outline: 0;
334
- flex-direction: column;
335
- display: inline-flex;
336
-
337
- &[data-vertical="true"] {
338
- flex-direction: row;
339
- }
340
-
341
- &[aria-readonly="true"] {
342
- cursor: not-allowed;
343
- }
344
- }
345
-
346
- .tremolo-slider-thumb-wrapper {
347
- z-index: 100;
348
- position: absolute;
349
- translate: -50% -50%;
350
- }
351
-
352
- .tremolo-slider-thumb {
353
- --color: oklch(59.5% .17548 266.373);
354
- width: var(--thumb-size);
355
- height: var(--thumb-size);
356
- background: var(--color);
357
- border-radius: 50%;
358
- outline: none;
359
-
360
- &[aria-disabled="true"] {
361
- background: oklch(50.462% .03307 270.021);
362
- }
363
-
364
- &[aria-readonly="false"]:focus {
365
- box-shadow: 0px 0px 0px 3px
366
- color-mix(in srgb, var(--color) 20%, transparent);
367
- }
368
- }
369
-
370
- .tremolo-slider-track {
371
- --active: oklch(69.212% .12903 267.633);
372
- --inactive: oklch(95% 0 0);
373
- position: relative;
374
-
375
- &[data-vertical="false"] {
376
- min-width: 50px;
377
- }
378
-
379
- &[data-vertical="true"] {
380
- min-height: 50px;
381
- }
382
-
383
- &:hover {
384
- --active: oklch(64.276% .15244 266.932);
385
- --inactive: #e0e0e0;
386
- }
387
-
388
- &[aria-disabled="true"] {
389
- --active: oklch(75.327% .01237 264.547);
390
- --inactive: oklch(89.755% .0001 271.152);
391
- }
392
- }
393
-
394
- .tremolo-slider-marks {
395
- display: block;
396
- position: relative;
397
- }
398
-
399
- .tremolo-slider-marks-option {
400
- color: oklch(25.197% .00003 271.152);
401
- z-index: 10;
402
- flex-direction: column;
403
- justify-content: center;
404
- align-items: center;
405
- display: flex;
406
- position: absolute;
407
- translate: -50%;
408
-
409
- &[data-vertical="true"] {
410
- flex-direction: row;
411
- translate: 0 -50%;
412
- }
413
- }
414
-
415
- .tremolo-slider-marks-option-mark {
416
- background-color: currentColor;
417
- }
418
-
419
- .tremolo-slider-marks-option-label {
420
- text-align: right;
421
- }
422
-
423
- :where(.dark, [data-theme="dark"]) {
424
- & .tremolo-slider-thumb {
425
- --color: oklch(64.5% .17548 266.373);
426
-
427
- &:hover {
428
- --color: oklch(67.5% .17548 266.373);
429
- }
430
- }
431
-
432
- & .tremolo-slider-track {
433
- --active: oklch(59.5% .17548 266.373);
434
- --inactive: oklch(41.7% 0 0);
435
-
436
- &:hover {
437
- --active: oklch(62.5% .17548 266.373);
438
- --inactive: oklch(44.7% 0 0);
439
- }
440
-
441
- &[aria-disabled="true"] {
442
- --active: oklch(75.327% .01237 264.547);
443
- --inactive: oklch(89.755% .0001 271.152);
444
- }
445
- }
446
- }
447
- .tremolo-xy-pad {
448
- --thumb-size: 22px;
449
- margin: calc(var(--thumb-size) / 2);
450
- cursor: pointer;
451
- -webkit-tap-highlight-color: transparent;
452
- display: inline-block;
453
-
454
- &[aria-readonly="true"] {
455
- cursor: not-allowed;
456
- }
457
- }
458
-
459
- .tremolo-xy-pad-area {
460
- --color: oklch(95% 0 0);
461
- background-color: var(--color);
462
- position: relative;
463
- }
464
-
465
- .tremolo-xy-pad-thumb-wrapper {
466
- z-index: 100;
467
- position: absolute;
468
- translate: -50% -50%;
469
- }
470
-
471
- .tremolo-xy-pad-thumb {
472
- --color: oklch(59.5% .17548 266.373);
473
- width: var(--thumb-size);
474
- height: var(--thumb-size);
475
- background-color: var(--color);
476
- border-radius: 50%;
477
- outline: none;
478
-
479
- &[aria-disabled="true"] {
480
- background-color: oklch(50.462% .03307 270.021);
481
- }
482
-
483
- &[aria-readonly="false"]:focus {
484
- box-shadow: 0px 0px 0px 3px
485
- color-mix(in srgb, var(--color) 20%, transparent);
486
- }
487
- }
488
-
489
- :where(.dark, [data-theme="dark"]) {
490
- & .tremolo-xy-pad-area {
491
- --color: oklch(41.7% 0 0);
492
- }
493
-
494
- & .tremolo-xy-pad-thumb {
495
- --color: oklch(64.5% .17548 266.373);
496
-
497
- &:hover {
498
- --color: oklch(67.5% .17548 266.373);
499
- }
500
- }
501
- }
package/src/Globals.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare module '*.css'
2
- declare module '*.module.css'
3
- declare module '*.module.scss'
@@ -1,81 +0,0 @@
1
- .tremolo-knob {
2
- /* The knob has no intrinsic size: the SVG inside scales to its box.
3
- Override with the `size` prop, or by setting this variable. */
4
- --knob-size: 50px;
5
-
6
- display: inline-block;
7
- width: var(--knob-size);
8
- height: var(--knob-size);
9
- cursor: grab;
10
- outline: 0;
11
-
12
- &[aria-readonly='true'] {
13
- cursor: not-allowed;
14
- }
15
-
16
- &[data-dragging='true'] {
17
- cursor: inherit;
18
- }
19
- }
20
-
21
- .tremolo-knob-active-line {
22
- color: oklch(69.2% 0.17548 266.373);
23
-
24
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
25
- color: oklch(59.5% 0.17548 266.373);
26
- }
27
-
28
- :where(.tremolo-knob[aria-disabled='true']) & {
29
- color: oklch(50.5% 0.03307 270.021);
30
- }
31
- }
32
-
33
- .tremolo-knob-inactive-line {
34
- color: oklch(95% 0 0);
35
-
36
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
37
- color: oklch(90% 0 0);
38
- }
39
- }
40
-
41
- .tremolo-knob-thumb {
42
- color: oklch(85.7% 0 0);
43
-
44
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
45
- color: oklch(84.5% 0 0);
46
- }
47
- }
48
-
49
- .tremolo-knob-thumb-line {
50
- color: oklch(94.2% 0 0);
51
- }
52
-
53
- :where(.dark, [data-theme='dark']) {
54
- .tremolo-knob-active-line {
55
- color: oklch(59.5% 0.17548 266.373);
56
-
57
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
58
- color: oklch(65.2% 0.17548 266.373);
59
- }
60
- }
61
-
62
- .tremolo-knob-inactive-line {
63
- color: oklch(41.7% 0 0);
64
-
65
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
66
- color: oklch(44.59% 0 0);
67
- }
68
- }
69
-
70
- .tremolo-knob-thumb {
71
- color: oklch(48.6% 0 0);
72
-
73
- :where(.tremolo-knob:focus, .tremolo-knob:hover) & {
74
- color: oklch(51.7% 0 0);
75
- }
76
- }
77
-
78
- .tremolo-knob-thumb-line {
79
- color: oklch(84.2% 0 0);
80
- }
81
- }
@@ -1,121 +0,0 @@
1
- .tremolo-number-input {
2
- --border-radius: 4px;
3
- --stepper-width: 20px;
4
- --stepper-icon-size: 12px;
5
- --active-color: oklch(59.5% 0.17548 266.373);
6
- --border-color: oklch(81% 0 0);
7
-
8
- display: inline-flex;
9
- flex-direction: row;
10
- position: relative;
11
- width: 140px;
12
- height: min-content;
13
- border: 1px solid var(--border-color);
14
- border-radius: var(--border-radius);
15
- outline: none;
16
- transition: all 0.1s;
17
-
18
- &:hover {
19
- --border-color: oklch(65.335% 0 0);
20
- }
21
-
22
- &:focus-within {
23
- --border-color: var(--active-color);
24
- box-shadow: 0px 0px 0px 2px
25
- color-mix(in srgb, var(--active-color) 10%, transparent);
26
- }
27
-
28
- &:not(:focus-within):has(
29
- .tremolo-number-input-field[data-out-of-range='true']
30
- ) {
31
- border-color: oklch(64.245% 0.21266 25.499);
32
- }
33
-
34
- /* Only leave room for the stepper when one was composed in. */
35
- &:not(:has(.tremolo-number-input-stepper)) {
36
- --stepper-width: 0px;
37
- }
38
- }
39
-
40
- .tremolo-number-input-field {
41
- display: block;
42
- color: inherit;
43
- width: calc(100% - 20px - var(--stepper-width));
44
- background-color: inherit;
45
- font: inherit;
46
- padding: 6px 10px;
47
-
48
- margin: 0;
49
- border: none;
50
- outline: none;
51
- appearance: none;
52
-
53
- &[aria-readonly='true'] {
54
- cursor: not-allowed;
55
- }
56
- }
57
-
58
- .tremolo-number-input-stepper {
59
- display: flex;
60
- flex-direction: column;
61
- height: 100%;
62
- position: absolute;
63
- top: 0;
64
- right: 0;
65
- width: var(--stepper-width);
66
- transition: all 0.1s linear;
67
-
68
- /* Kept out of the way until the input is being used. */
69
- opacity: 0;
70
- transform: translateX(40%);
71
- }
72
-
73
- :is(.tremolo-number-input:hover, .tremolo-number-input:focus-within)
74
- .tremolo-number-input-stepper {
75
- opacity: 1;
76
- transform: translateX(0);
77
- }
78
-
79
- .tremolo-number-input-stepper-icon {
80
- width: var(--stepper-icon-size);
81
- height: var(--stepper-icon-size);
82
- }
83
-
84
- :is(
85
- .tremolo-number-input-increment-stepper,
86
- .tremolo-number-input-decrement-stepper
87
- ) {
88
- border-inline-start: 1px solid oklch(84.522% 0 0);
89
- font-size: 0.75rem;
90
- display: flex;
91
- justify-content: center;
92
- align-items: center;
93
- flex: 1 1 0%;
94
- max-height: 50%;
95
- user-select: none;
96
- cursor: pointer;
97
-
98
- &[aria-disabled='false']:active {
99
- background-color: oklch(37.798% 0.03812 254.612 / 0.055);
100
- }
101
-
102
- &[aria-disabled='true'],
103
- &[aria-readonly='true'] {
104
- cursor: not-allowed;
105
- }
106
- }
107
-
108
- .tremolo-number-input-increment-stepper {
109
- border-top-right-radius: var(--border-radius);
110
- }
111
-
112
- .tremolo-number-input-decrement-stepper {
113
- border-top: 1px solid oklch(84.522% 0 0);
114
- border-bottom-right-radius: var(--border-radius);
115
- }
116
-
117
- :where(.dark, [data-theme='dark']) {
118
- .tremolo-number-input {
119
- --border-color: oklch(52% 0 0);
120
- }
121
- }