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