@dust-tt/sparkle 0.7.4 → 0.7.5-rc-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/cjs/index.js +14 -14
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/components/Input.d.ts +1 -0
- package/dist/esm/components/Input.d.ts.map +1 -1
- package/dist/esm/components/Input.js +2 -2
- package/dist/esm/components/Input.js.map +1 -1
- package/dist/esm/components/NavigationList.js +3 -3
- package/dist/esm/components/VoicePicker.d.ts +17 -0
- package/dist/esm/components/VoicePicker.d.ts.map +1 -0
- package/dist/esm/components/VoicePicker.js +137 -0
- package/dist/esm/components/VoicePicker.js.map +1 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/lottie/collapseBar.d.ts +21 -21
- package/dist/esm/lottie/dragArea.d.ts +30 -30
- package/dist/esm/lottie/spinnerColor.d.ts +73 -73
- package/dist/esm/lottie/spinnerColorLG.d.ts +125 -125
- package/dist/esm/lottie/spinnerColorXS.d.ts +11 -11
- package/dist/esm/lottie/spinnerDark.d.ts +73 -73
- package/dist/esm/lottie/spinnerDarkLG.d.ts +142 -142
- package/dist/esm/lottie/spinnerDarkXS.d.ts +38 -38
- package/dist/esm/lottie/spinnerLight.d.ts +66 -66
- package/dist/esm/lottie/spinnerLightLG.d.ts +142 -142
- package/dist/esm/lottie/spinnerLightXS.d.ts +38 -38
- package/dist/esm/stories/InteractiveImageGrid.stories.d.ts.map +1 -1
- package/dist/esm/stories/InteractiveImageGrid.stories.js.map +1 -1
- package/dist/esm/stories/VoicePicker.stories.d.ts +49 -0
- package/dist/esm/stories/VoicePicker.stories.d.ts.map +1 -0
- package/dist/esm/stories/VoicePicker.stories.js +111 -0
- package/dist/esm/stories/VoicePicker.stories.js.map +1 -0
- package/dist/esm/styles/allotment.css +36 -14
- package/package.json +1 -1
- package/src/components/Input.tsx +3 -1
- package/src/components/NavigationList.tsx +3 -3
- package/src/components/VoicePicker.tsx +267 -0
- package/src/components/index.ts +2 -0
- package/src/styles/allotment.css +36 -14
|
@@ -41,12 +41,12 @@ declare const animation: {
|
|
|
41
41
|
to: number[];
|
|
42
42
|
ti: number[];
|
|
43
43
|
} | {
|
|
44
|
+
t: number;
|
|
45
|
+
s: number[];
|
|
44
46
|
i?: undefined;
|
|
45
47
|
o?: undefined;
|
|
46
48
|
to?: undefined;
|
|
47
49
|
ti?: undefined;
|
|
48
|
-
t: number;
|
|
49
|
-
s: number[];
|
|
50
50
|
})[];
|
|
51
51
|
ix: number;
|
|
52
52
|
l: number;
|
|
@@ -68,19 +68,6 @@ declare const animation: {
|
|
|
68
68
|
shapes: {
|
|
69
69
|
ty: string;
|
|
70
70
|
it: ({
|
|
71
|
-
o?: undefined;
|
|
72
|
-
c?: undefined;
|
|
73
|
-
bm?: undefined;
|
|
74
|
-
p?: undefined;
|
|
75
|
-
a?: undefined;
|
|
76
|
-
s?: undefined;
|
|
77
|
-
sk?: undefined;
|
|
78
|
-
sa?: undefined;
|
|
79
|
-
r?: undefined;
|
|
80
|
-
w?: undefined;
|
|
81
|
-
lc?: undefined;
|
|
82
|
-
lj?: undefined;
|
|
83
|
-
ml?: undefined;
|
|
84
71
|
ind: number;
|
|
85
72
|
ty: string;
|
|
86
73
|
ix: number;
|
|
@@ -103,8 +90,6 @@ declare const animation: {
|
|
|
103
90
|
c: boolean;
|
|
104
91
|
}[];
|
|
105
92
|
} | {
|
|
106
|
-
i?: undefined;
|
|
107
|
-
o?: undefined;
|
|
108
93
|
t: number;
|
|
109
94
|
s: {
|
|
110
95
|
i: number[][];
|
|
@@ -112,22 +97,28 @@ declare const animation: {
|
|
|
112
97
|
v: number[][];
|
|
113
98
|
c: boolean;
|
|
114
99
|
}[];
|
|
100
|
+
i?: undefined;
|
|
101
|
+
o?: undefined;
|
|
115
102
|
})[];
|
|
116
103
|
ix: number;
|
|
117
104
|
};
|
|
118
105
|
nm: string;
|
|
119
106
|
mn: string;
|
|
120
107
|
hd: boolean;
|
|
121
|
-
|
|
108
|
+
o?: undefined;
|
|
109
|
+
c?: undefined;
|
|
110
|
+
bm?: undefined;
|
|
122
111
|
p?: undefined;
|
|
123
112
|
a?: undefined;
|
|
124
113
|
s?: undefined;
|
|
114
|
+
r?: undefined;
|
|
125
115
|
sk?: undefined;
|
|
126
116
|
sa?: undefined;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
117
|
+
w?: undefined;
|
|
118
|
+
lc?: undefined;
|
|
119
|
+
lj?: undefined;
|
|
120
|
+
ml?: undefined;
|
|
121
|
+
} | {
|
|
131
122
|
ty: string;
|
|
132
123
|
c: {
|
|
133
124
|
a: number;
|
|
@@ -151,19 +142,16 @@ declare const animation: {
|
|
|
151
142
|
nm: string;
|
|
152
143
|
mn: string;
|
|
153
144
|
hd: boolean;
|
|
154
|
-
|
|
145
|
+
ind?: undefined;
|
|
146
|
+
ix?: undefined;
|
|
147
|
+
ks?: undefined;
|
|
155
148
|
p?: undefined;
|
|
156
149
|
a?: undefined;
|
|
157
150
|
s?: undefined;
|
|
151
|
+
r?: undefined;
|
|
158
152
|
sk?: undefined;
|
|
159
153
|
sa?: undefined;
|
|
160
|
-
|
|
161
|
-
ind?: undefined;
|
|
162
|
-
ks?: undefined;
|
|
163
|
-
w?: undefined;
|
|
164
|
-
lc?: undefined;
|
|
165
|
-
lj?: undefined;
|
|
166
|
-
ml?: undefined;
|
|
154
|
+
} | {
|
|
167
155
|
ty: string;
|
|
168
156
|
c: {
|
|
169
157
|
a: number;
|
|
@@ -184,10 +172,10 @@ declare const animation: {
|
|
|
184
172
|
t: number;
|
|
185
173
|
s: number[];
|
|
186
174
|
} | {
|
|
187
|
-
i?: undefined;
|
|
188
|
-
o?: undefined;
|
|
189
175
|
t: number;
|
|
190
176
|
s: number[];
|
|
177
|
+
i?: undefined;
|
|
178
|
+
o?: undefined;
|
|
191
179
|
})[];
|
|
192
180
|
ix: number;
|
|
193
181
|
};
|
|
@@ -196,18 +184,19 @@ declare const animation: {
|
|
|
196
184
|
nm: string;
|
|
197
185
|
mn: string;
|
|
198
186
|
hd: boolean;
|
|
199
|
-
} | {
|
|
200
|
-
c?: undefined;
|
|
201
|
-
bm?: undefined;
|
|
202
|
-
mn?: undefined;
|
|
203
|
-
hd?: undefined;
|
|
204
|
-
ix?: undefined;
|
|
205
187
|
ind?: undefined;
|
|
188
|
+
ix?: undefined;
|
|
206
189
|
ks?: undefined;
|
|
190
|
+
p?: undefined;
|
|
191
|
+
a?: undefined;
|
|
192
|
+
s?: undefined;
|
|
193
|
+
sk?: undefined;
|
|
194
|
+
sa?: undefined;
|
|
207
195
|
w?: undefined;
|
|
208
196
|
lc?: undefined;
|
|
209
197
|
lj?: undefined;
|
|
210
198
|
ml?: undefined;
|
|
199
|
+
} | {
|
|
211
200
|
ty: string;
|
|
212
201
|
p: {
|
|
213
202
|
a: number;
|
|
@@ -245,6 +234,17 @@ declare const animation: {
|
|
|
245
234
|
ix: number;
|
|
246
235
|
};
|
|
247
236
|
nm: string;
|
|
237
|
+
ind?: undefined;
|
|
238
|
+
ix?: undefined;
|
|
239
|
+
ks?: undefined;
|
|
240
|
+
c?: undefined;
|
|
241
|
+
bm?: undefined;
|
|
242
|
+
mn?: undefined;
|
|
243
|
+
hd?: undefined;
|
|
244
|
+
w?: undefined;
|
|
245
|
+
lc?: undefined;
|
|
246
|
+
lj?: undefined;
|
|
247
|
+
ml?: undefined;
|
|
248
248
|
})[];
|
|
249
249
|
nm: string;
|
|
250
250
|
np: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveImageGrid.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/InteractiveImageGrid.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,IAAI;;;;;;;CAGuB,CAAC;AAElC,eAAe,IAAI,CAAC;AA8CpB,eAAO,MAAM,uBAAuB,yBAmBnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"InteractiveImageGrid.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/InteractiveImageGrid.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,IAAI;;;;;;;CAGuB,CAAC;AAElC,eAAe,IAAI,CAAC;AA8CpB,eAAO,MAAM,uBAAuB,yBAmBnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,yBAkCtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveImageGrid.stories.js","sourceRoot":"","sources":["../../../src/stories/InteractiveImageGrid.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,QAAQ;CACY,CAAC;AAElC,eAAe,IAAI,CAAC;AAEpB,MAAM,MAAM,GAAG;IACb;QACE,GAAG,EAAE,wCAAwC;QAC7C,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,wCAAwC;KAChD;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,WAAW,EAAE,qDAAqD;QAClE,QAAQ,EAAE,qDAAqD;QAC/D,KAAK,EAAE,iCAAiC;KACzC;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,WAAW,EAAE,qDAAqD;QAClE,QAAQ,EAAE,qDAAqD;QAC/D,KAAK,EAAE,iCAAiC;KACzC;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,WAAW,EAAE,qDAAqD;QAClE,QAAQ,EAAE,qDAAqD;QAC/D,KAAK,EAAE,iC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,OAAO,CAAC,CAAC,CAAC,CACT,6BAAK,SAAS,EAAC,uGAAuG;;gBAEpH,gCACE,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,YAGzB,CACL,CACP,CAAC,CAAC,CAAC,CACF,oBAAC,oBAAoB,IACnB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAC/B,CACH,CACG;QACN;YACE,4BAAI,SAAS,EAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"InteractiveImageGrid.stories.js","sourceRoot":"","sources":["../../../src/stories/InteractiveImageGrid.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,QAAQ;CACY,CAAC;AAElC,eAAe,IAAI,CAAC;AAEpB,MAAM,MAAM,GAAG;IACb;QACE,GAAG,EAAE,wCAAwC;QAC7C,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,wCAAwC;KAChD;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,WAAW,EAAE,qDAAqD;QAClE,QAAQ,EAAE,qDAAqD;QAC/D,KAAK,EAAE,iCAAiC;KACzC;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,WAAW,EAAE,qDAAqD;QAClE,QAAQ,EAAE,qDAAqD;QAC/D,KAAK,EAAE,iCAAiC;KACzC;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,WAAW,EAAE,qDAAqD;QAClE,QAAQ,EAAE,qDAAqD;QAC/D,KAAK,EAAE,iCAAiC;KACzC;IACD;QACE,GAAG,E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,6BAAK,SAAS,EAAC,uGAAuG;;gBAEpH,gCACE,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,YAGzB,CACL,CACP,CAAC,CAAC,CAAC,CACF,oBAAC,oBAAoB,IACnB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAC/B,CACH,CACG;QACN;YACE,4BAAI,SAAS,EAAC,QAAQ,kEAEjB;YACL,oBAAC,oBAAoB,IAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAI,CAChD,CACF,CACP,CAAC;AAAA,CACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { VoicePicker } from "../index_with_tw_base";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof VoicePicker;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
status: {
|
|
12
|
+
control: false;
|
|
13
|
+
};
|
|
14
|
+
level: {
|
|
15
|
+
control: false;
|
|
16
|
+
};
|
|
17
|
+
elapsedSeconds: {
|
|
18
|
+
control: false;
|
|
19
|
+
};
|
|
20
|
+
onRecordStart: {
|
|
21
|
+
control: false;
|
|
22
|
+
};
|
|
23
|
+
onRecordStop: {
|
|
24
|
+
control: false;
|
|
25
|
+
};
|
|
26
|
+
buttonProps: {
|
|
27
|
+
control: false;
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
control: {
|
|
31
|
+
type: "select";
|
|
32
|
+
};
|
|
33
|
+
options: string[];
|
|
34
|
+
};
|
|
35
|
+
disabled: {
|
|
36
|
+
control: "boolean";
|
|
37
|
+
};
|
|
38
|
+
showStopLabel: {
|
|
39
|
+
control: "boolean";
|
|
40
|
+
};
|
|
41
|
+
pressDelayMs: {
|
|
42
|
+
control: "number";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export default meta;
|
|
47
|
+
type Story = StoryObj<typeof meta>;
|
|
48
|
+
export declare const Interactive: Story;
|
|
49
|
+
//# sourceMappingURL=VoicePicker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoicePicker.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/VoicePicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAOnC,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VoicePicker } from "../index_with_tw_base";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Primitives/VoicePicker",
|
|
5
|
+
component: VoicePicker,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "padded",
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
status: { control: false },
|
|
12
|
+
level: { control: false },
|
|
13
|
+
elapsedSeconds: { control: false },
|
|
14
|
+
onRecordStart: { control: false },
|
|
15
|
+
onRecordStop: { control: false },
|
|
16
|
+
buttonProps: { control: false },
|
|
17
|
+
size: {
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
options: ["xs", "sm", "md"],
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
control: "boolean",
|
|
23
|
+
},
|
|
24
|
+
showStopLabel: {
|
|
25
|
+
control: "boolean",
|
|
26
|
+
},
|
|
27
|
+
pressDelayMs: {
|
|
28
|
+
control: "number",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
export const Interactive = {
|
|
34
|
+
args: {
|
|
35
|
+
status: "idle",
|
|
36
|
+
level: 0,
|
|
37
|
+
elapsedSeconds: 0,
|
|
38
|
+
onRecordStart: async () => { },
|
|
39
|
+
onRecordStop: async () => { },
|
|
40
|
+
size: "xs",
|
|
41
|
+
disabled: false,
|
|
42
|
+
showStopLabel: true,
|
|
43
|
+
pressDelayMs: 150,
|
|
44
|
+
},
|
|
45
|
+
render: function Render(args) {
|
|
46
|
+
return (React.createElement(VoicePickerDemo, { size: args.size, disabled: args.disabled, showStopLabel: args.showStopLabel, pressDelayMs: args.pressDelayMs }));
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
function VoicePickerDemo({ size, disabled, showStopLabel, pressDelayMs, }) {
|
|
50
|
+
const [status, setStatus] = React.useState("idle");
|
|
51
|
+
const [level, setLevel] = React.useState(0);
|
|
52
|
+
const [elapsedSeconds, setElapsedSeconds] = React.useState(0);
|
|
53
|
+
const elapsedIntervalRef = React.useRef(null);
|
|
54
|
+
const levelIntervalRef = React.useRef(null);
|
|
55
|
+
const transcribeTimeoutRef = React.useRef(null);
|
|
56
|
+
React.useEffect(() => {
|
|
57
|
+
return () => {
|
|
58
|
+
clearIntervalRef(elapsedIntervalRef);
|
|
59
|
+
clearIntervalRef(levelIntervalRef);
|
|
60
|
+
clearTimeoutRef(transcribeTimeoutRef);
|
|
61
|
+
};
|
|
62
|
+
}, []);
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (status !== "recording") {
|
|
65
|
+
clearIntervalRef(elapsedIntervalRef);
|
|
66
|
+
clearIntervalRef(levelIntervalRef);
|
|
67
|
+
setElapsedSeconds(0);
|
|
68
|
+
setLevel(0);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
elapsedIntervalRef.current = window.setInterval(() => {
|
|
72
|
+
setElapsedSeconds((previous) => previous + 1);
|
|
73
|
+
}, 1000);
|
|
74
|
+
levelIntervalRef.current = window.setInterval(() => {
|
|
75
|
+
setLevel(Math.random());
|
|
76
|
+
}, 200);
|
|
77
|
+
return () => {
|
|
78
|
+
clearIntervalRef(elapsedIntervalRef);
|
|
79
|
+
clearIntervalRef(levelIntervalRef);
|
|
80
|
+
};
|
|
81
|
+
}, [status]);
|
|
82
|
+
async function handleRecordStart() {
|
|
83
|
+
clearTimeoutRef(transcribeTimeoutRef);
|
|
84
|
+
setStatus("recording");
|
|
85
|
+
}
|
|
86
|
+
async function handleRecordStop() {
|
|
87
|
+
if (status !== "recording") {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
setStatus("transcribing");
|
|
91
|
+
clearTimeoutRef(transcribeTimeoutRef);
|
|
92
|
+
transcribeTimeoutRef.current = window.setTimeout(() => {
|
|
93
|
+
setStatus("idle");
|
|
94
|
+
}, 1200);
|
|
95
|
+
}
|
|
96
|
+
return (React.createElement("div", { className: "s-flex s-items-center s-gap-2" },
|
|
97
|
+
React.createElement(VoicePicker, { status: status, level: level, elapsedSeconds: elapsedSeconds, onRecordStart: handleRecordStart, onRecordStop: handleRecordStop, size: size, disabled: disabled, showStopLabel: showStopLabel, pressDelayMs: pressDelayMs })));
|
|
98
|
+
}
|
|
99
|
+
function clearIntervalRef(ref) {
|
|
100
|
+
if (ref.current !== null) {
|
|
101
|
+
window.clearInterval(ref.current);
|
|
102
|
+
ref.current = null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function clearTimeoutRef(ref) {
|
|
106
|
+
if (ref.current !== null) {
|
|
107
|
+
window.clearTimeout(ref.current);
|
|
108
|
+
ref.current = null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=VoicePicker.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoicePicker.stories.js","sourceRoot":"","sources":["../../../src/stories/VoicePicker.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,wBAAwB;IAC/B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,QAAQ;KACjB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QACzB,cAAc,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QAClC,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QACjC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QAChC,WAAW,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QAC/B,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;SAC5B;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;SACnB;QACD,aAAa,EAAE;YACb,OAAO,EAAE,SAAS;SACnB;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,QAAQ;SAClB;KACF;CACiC,CAAC;AAErC,eAAe,IAAI,CAAC;AAQpB,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,CAAC;QACR,cAAc,EAAE,CAAC;QACjB,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,EAAC,CAAC;QAC7B,YAAY,E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IAAI,CAAC,CAAC;IAAA,CACV;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,+BAA+B;QAC5C,oBAAC,WAAW,IACV,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,gBAAgB,EAC9B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,GAC1B,CACE,CACP,CAAC;AAAA,CACH;AAED,SAAS,gBAAgB,CAAC,GAA0C,EAAQ;IAC1E,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACzB,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACrB,CAAC;AAAA,CACF;AAED,SAAS,eAAe,CAAC,GAA0C,EAAQ;IACzE,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACzB,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACrB,CAAC;AAAA,CACF"}
|
|
@@ -17,28 +17,37 @@
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.allotment-module_splitView__L-yRc
|
|
20
|
+
.allotment-module_splitView__L-yRc
|
|
21
|
+
> .allotment-module_sashContainer__fzwJF
|
|
22
|
+
> .allotment-module_sash__QA-2t {
|
|
21
23
|
pointer-events: auto;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
.allotment-module_splitView__L-yRc
|
|
26
|
+
.allotment-module_splitView__L-yRc
|
|
27
|
+
> .allotment-module_splitViewContainer__rQnVa {
|
|
25
28
|
height: 100%;
|
|
26
29
|
position: relative;
|
|
27
30
|
white-space: nowrap;
|
|
28
31
|
width: 100%;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
|
-
.allotment-module_splitView__L-yRc
|
|
34
|
+
.allotment-module_splitView__L-yRc
|
|
35
|
+
> .allotment-module_splitViewContainer__rQnVa
|
|
36
|
+
> .allotment-module_splitViewView__MGZ6O {
|
|
32
37
|
overflow: hidden;
|
|
33
38
|
position: absolute;
|
|
34
39
|
white-space: initial;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
|
-
.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa
|
|
42
|
+
.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa
|
|
43
|
+
> .allotment-module_splitViewContainer__rQnVa
|
|
44
|
+
> .allotment-module_splitViewView__MGZ6O {
|
|
38
45
|
width: 100%;
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8
|
|
48
|
+
.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8
|
|
49
|
+
> .allotment-module_splitViewContainer__rQnVa
|
|
50
|
+
> .allotment-module_splitViewView__MGZ6O {
|
|
42
51
|
height: 100%;
|
|
43
52
|
}
|
|
44
53
|
|
|
@@ -129,7 +138,8 @@
|
|
|
129
138
|
height: var(--sash-size);
|
|
130
139
|
}
|
|
131
140
|
|
|
132
|
-
.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx)
|
|
141
|
+
.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx)
|
|
142
|
+
> .sash-module_orthogonal-drag-handle__Yii2- {
|
|
133
143
|
content: " ";
|
|
134
144
|
height: calc(var(--sash-size) * 2);
|
|
135
145
|
width: calc(var(--sash-size) * 2);
|
|
@@ -139,36 +149,48 @@
|
|
|
139
149
|
position: absolute;
|
|
140
150
|
}
|
|
141
151
|
|
|
142
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
152
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
153
|
+
.sash-module_disabled__Hm-wx
|
|
154
|
+
)
|
|
143
155
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk,
|
|
144
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
156
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
157
|
+
.sash-module_disabled__Hm-wx
|
|
158
|
+
)
|
|
145
159
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
146
160
|
cursor: nwse-resize;
|
|
147
161
|
}
|
|
148
162
|
|
|
149
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
163
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
164
|
+
.sash-module_disabled__Hm-wx
|
|
165
|
+
)
|
|
150
166
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R,
|
|
151
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
167
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
168
|
+
.sash-module_disabled__Hm-wx
|
|
169
|
+
)
|
|
152
170
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
153
171
|
cursor: nesw-resize;
|
|
154
172
|
}
|
|
155
173
|
|
|
156
|
-
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
174
|
+
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
175
|
+
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
157
176
|
left: calc(var(--sash-size) * -0.5);
|
|
158
177
|
top: calc(var(--sash-size) * -1);
|
|
159
178
|
}
|
|
160
179
|
|
|
161
|
-
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
180
|
+
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
181
|
+
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
162
182
|
left: calc(var(--sash-size) * -0.5);
|
|
163
183
|
bottom: calc(var(--sash-size) * -1);
|
|
164
184
|
}
|
|
165
185
|
|
|
166
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
186
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
187
|
+
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
167
188
|
top: calc(var(--sash-size) * -0.5);
|
|
168
189
|
left: calc(var(--sash-size) * -1);
|
|
169
190
|
}
|
|
170
191
|
|
|
171
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
192
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
193
|
+
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
172
194
|
top: calc(var(--sash-size) * -0.5);
|
|
173
195
|
right: calc(var(--sash-size) * -1);
|
|
174
196
|
}
|
package/package.json
CHANGED
package/src/components/Input.tsx
CHANGED
|
@@ -20,6 +20,7 @@ export interface InputProps extends Omit<
|
|
|
20
20
|
value?: string | null;
|
|
21
21
|
isError?: boolean;
|
|
22
22
|
className?: string;
|
|
23
|
+
containerClassName?: string;
|
|
23
24
|
label?: string;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -87,6 +88,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
|
87
88
|
(
|
|
88
89
|
{
|
|
89
90
|
className,
|
|
91
|
+
containerClassName,
|
|
90
92
|
message,
|
|
91
93
|
messageStatus,
|
|
92
94
|
value,
|
|
@@ -104,7 +106,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
|
104
106
|
? "disabled"
|
|
105
107
|
: "default";
|
|
106
108
|
return (
|
|
107
|
-
<div className="s-flex s-flex-col s-gap-1">
|
|
109
|
+
<div className={cn("s-flex s-flex-col s-gap-1", containerClassName)}>
|
|
108
110
|
{label && (
|
|
109
111
|
<Label htmlFor={props.name} className="s-mb-1">
|
|
110
112
|
{label}
|
|
@@ -167,7 +167,7 @@ const NavigationListItem = React.forwardRef<
|
|
|
167
167
|
{icon && <Icon visual={icon} size="xs" className="s-m-0.5" />}
|
|
168
168
|
{avatar}
|
|
169
169
|
{label && (
|
|
170
|
-
<span className="s-grow s-overflow-hidden s-text-ellipsis s-whitespace-nowrap group-
|
|
170
|
+
<span className="s-grow s-overflow-hidden s-text-ellipsis s-whitespace-nowrap group-focus-within/menu-item:s-pr-8 group-hover/menu-item:s-pr-8 group-data-[selected=true]/menu-item:s-pr-8">
|
|
171
171
|
{label}
|
|
172
172
|
</span>
|
|
173
173
|
)}
|
|
@@ -179,7 +179,7 @@ const NavigationListItem = React.forwardRef<
|
|
|
179
179
|
className={cn(
|
|
180
180
|
"s-flex-shrink-0 s-translate-x-0.5",
|
|
181
181
|
moreMenu &&
|
|
182
|
-
"group-
|
|
182
|
+
"group-focus-within/menu-item:s-hidden group-hover/menu-item:s-hidden"
|
|
183
183
|
)}
|
|
184
184
|
/>
|
|
185
185
|
)}
|
|
@@ -188,7 +188,7 @@ const NavigationListItem = React.forwardRef<
|
|
|
188
188
|
className={cn(
|
|
189
189
|
"s-heading-xs s-flex s-flex-shrink-0 s-items-center s-justify-center s-rounded-full",
|
|
190
190
|
moreMenu &&
|
|
191
|
-
"group-
|
|
191
|
+
"group-focus-within/menu-item:s-hidden group-hover/menu-item:s-hidden",
|
|
192
192
|
getStatusDotColor()
|
|
193
193
|
)}
|
|
194
194
|
/>
|