@dust-tt/sparkle 0.7.7 → 0.7.8-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 +13 -13
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/components/AssistantCard.d.ts +4 -3
- package/dist/esm/components/AssistantCard.d.ts.map +1 -1
- package/dist/esm/components/AssistantCard.js +3 -3
- package/dist/esm/components/AssistantCard.js.map +1 -1
- package/dist/esm/components/Button.d.ts +17 -9
- package/dist/esm/components/Button.d.ts.map +1 -1
- package/dist/esm/components/Button.js +29 -7
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/ButtonGroup.d.ts +3 -3
- package/dist/esm/components/ButtonGroup.d.ts.map +1 -1
- package/dist/esm/components/ButtonGroup.js +23 -14
- package/dist/esm/components/ButtonGroup.js.map +1 -1
- package/dist/esm/components/Card.d.ts +1 -1
- package/dist/esm/components/Card.d.ts.map +1 -1
- package/dist/esm/components/Card.js +2 -2
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/components/InteractiveImageGrid.d.ts +3 -3
- package/dist/esm/components/InteractiveImageGrid.js +4 -4
- package/dist/esm/components/InteractiveImageGrid.js.map +1 -1
- package/dist/esm/components/NavigationList.js +3 -3
- package/dist/esm/components/index.d.ts +1 -3
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/logo/platforms/index.d.ts +0 -2
- package/dist/esm/logo/platforms/index.d.ts.map +1 -1
- package/dist/esm/logo/platforms/index.js +0 -2
- package/dist/esm/logo/platforms/index.js.map +1 -1
- package/dist/esm/lottie/spinnerLight.d.ts +30 -30
- package/dist/esm/stories/Button.stories.d.ts +2 -10
- package/dist/esm/stories/Button.stories.d.ts.map +1 -1
- package/dist/esm/stories/Button.stories.js +18 -10
- package/dist/esm/stories/Button.stories.js.map +1 -1
- package/dist/esm/stories/ButtonGroup.stories.d.ts +2 -1
- package/dist/esm/stories/ButtonGroup.stories.d.ts.map +1 -1
- package/dist/esm/stories/ButtonGroup.stories.js +12 -2
- package/dist/esm/stories/ButtonGroup.stories.js.map +1 -1
- package/dist/esm/stories/Card.stories.js +2 -2
- package/dist/esm/stories/Card.stories.js.map +1 -1
- package/dist/esm/stories/InteractiveImageGrid.stories.d.ts.map +1 -1
- package/dist/esm/stories/InteractiveImageGrid.stories.js.map +1 -1
- package/dist/esm/styles/allotment.css +14 -36
- package/package.json +1 -1
- package/src/components/AssistantCard.tsx +6 -9
- package/src/components/Button.tsx +48 -15
- package/src/components/ButtonGroup.tsx +69 -19
- package/src/components/Card.tsx +25 -13
- package/src/components/InteractiveImageGrid.tsx +4 -4
- package/src/components/NavigationList.tsx +3 -3
- package/src/components/index.ts +1 -7
- package/src/logo/platforms/index.ts +0 -2
- package/src/styles/allotment.css +14 -36
- package/dist/esm/components/VoicePicker.d.ts +0 -17
- package/dist/esm/components/VoicePicker.d.ts.map +0 -1
- package/dist/esm/components/VoicePicker.js +0 -137
- package/dist/esm/components/VoicePicker.js.map +0 -1
- package/dist/esm/logo/platforms/Statuspage.d.ts +0 -5
- package/dist/esm/logo/platforms/Statuspage.d.ts.map +0 -1
- package/dist/esm/logo/platforms/Statuspage.js +0 -10
- package/dist/esm/logo/platforms/Statuspage.js.map +0 -1
- package/dist/esm/logo/platforms/Ukg.d.ts +0 -5
- package/dist/esm/logo/platforms/Ukg.d.ts.map +0 -1
- package/dist/esm/logo/platforms/Ukg.js +0 -6
- package/dist/esm/logo/platforms/Ukg.js.map +0 -1
- package/dist/esm/logo/src/platforms/Statuspage.svg +0 -10
- package/dist/esm/logo/src/platforms/UKG.svg +0 -5
- package/dist/esm/stories/VoicePicker.stories.d.ts +0 -49
- package/dist/esm/stories/VoicePicker.stories.d.ts.map +0 -1
- package/dist/esm/stories/VoicePicker.stories.js +0 -111
- package/dist/esm/stories/VoicePicker.stories.js.map +0 -1
- package/src/components/VoicePicker.tsx +0 -267
- package/src/logo/platforms/Statuspage.tsx +0 -35
- package/src/logo/platforms/Ukg.tsx +0 -22
- package/src/logo/src/platforms/Statuspage.svg +0 -10
- package/src/logo/src/platforms/UKG.svg +0 -5
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Avatar,
|
|
5
|
-
Card,
|
|
6
|
-
CardActionButton,
|
|
7
|
-
MiniButtonProps,
|
|
8
|
-
} from "@sparkle/components/";
|
|
3
|
+
import { Avatar, Card, CardActionButton } from "@sparkle/components/";
|
|
9
4
|
import { CardVariantType } from "@sparkle/components/Card";
|
|
10
5
|
import { MoreIcon } from "@sparkle/icons/app/";
|
|
11
6
|
import { cn } from "@sparkle/lib/utils";
|
|
12
7
|
|
|
8
|
+
import { IconOnlyButtonProps, IconOnlySize } from "./Button";
|
|
9
|
+
|
|
13
10
|
interface BaseAssistantCardProps {
|
|
14
11
|
description: string;
|
|
15
12
|
title: string;
|
|
@@ -21,13 +18,13 @@ interface BaseAssistantCardProps {
|
|
|
21
18
|
variant?: CardVariantType;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
type AssistantCardMore = Omit<
|
|
21
|
+
type AssistantCardMore = Omit<IconOnlyButtonProps, "icon" | "size"> & { size?: IconOnlySize };
|
|
25
22
|
|
|
26
23
|
export const AssistantCardMore = React.forwardRef<
|
|
27
24
|
HTMLButtonElement,
|
|
28
25
|
AssistantCardMore
|
|
29
|
-
>(({ ...props }, ref) => {
|
|
30
|
-
return <CardActionButton
|
|
26
|
+
>(({ size = "icon", ...props }, ref) => {
|
|
27
|
+
return <CardActionButton ref={ref} icon={MoreIcon} size={size} {...props} />;
|
|
31
28
|
});
|
|
32
29
|
AssistantCardMore.displayName = "AssistantCardMore";
|
|
33
30
|
|
|
@@ -34,8 +34,28 @@ export const BUTTON_VARIANTS = [
|
|
|
34
34
|
|
|
35
35
|
export type ButtonVariantType = (typeof BUTTON_VARIANTS)[number];
|
|
36
36
|
|
|
37
|
-
export const
|
|
38
|
-
|
|
37
|
+
export const REGULAR_BUTTON_SIZES = [
|
|
38
|
+
"xmini",
|
|
39
|
+
"mini",
|
|
40
|
+
"xs",
|
|
41
|
+
"sm",
|
|
42
|
+
"md",
|
|
43
|
+
] as const;
|
|
44
|
+
export const ICON_ONLY_SIZES = ["icon-xs", "icon"] as const;
|
|
45
|
+
export const SMALL_BUTTON_SIZES = ["icon-xs", "icon", "xmini", "mini"] as const;
|
|
46
|
+
|
|
47
|
+
export type RegularButtonSize = (typeof REGULAR_BUTTON_SIZES)[number];
|
|
48
|
+
export type IconOnlySize = (typeof ICON_ONLY_SIZES)[number];
|
|
49
|
+
export type ButtonSize = RegularButtonSize | IconOnlySize;
|
|
50
|
+
|
|
51
|
+
function isSmallButtonSize(
|
|
52
|
+
size: ButtonSize | undefined
|
|
53
|
+
): size is (typeof SMALL_BUTTON_SIZES)[number] {
|
|
54
|
+
return (
|
|
55
|
+
size !== undefined &&
|
|
56
|
+
SMALL_BUTTON_SIZES.includes(size as (typeof SMALL_BUTTON_SIZES)[number])
|
|
57
|
+
);
|
|
58
|
+
}
|
|
39
59
|
|
|
40
60
|
// Define button styling with cva
|
|
41
61
|
const buttonVariants = cva(
|
|
@@ -141,13 +161,17 @@ const buttonVariants = cva(
|
|
|
141
161
|
),
|
|
142
162
|
},
|
|
143
163
|
size: {
|
|
144
|
-
|
|
145
|
-
|
|
164
|
+
"icon-xs": "s-h-6 s-w-6 s-label-xs s-gap-1 s-shrink-0",
|
|
165
|
+
icon: "s-h-7 s-w-7 s-label-xs s-gap-1.5 s-shrink-0",
|
|
166
|
+
xmini: "s-h-6 s-px-1.5 s-label-xs s-gap-1 s-shrink-0",
|
|
167
|
+
mini: "s-h-7 s-px-2 s-label-xs s-gap-1.5 s-shrink-0",
|
|
146
168
|
xs: "s-h-7 s-px-2.5 s-label-xs s-gap-1.5 s-shrink-0",
|
|
147
169
|
sm: "s-h-9 s-px-3 s-label-sm s-gap-2 s-shrink-0",
|
|
148
170
|
md: "s-h-12 s-px-4 s-py-2 s-label-base s-gap-2.5 s-shrink-0",
|
|
149
171
|
},
|
|
150
172
|
rounded: {
|
|
173
|
+
"icon-xs": "s-rounded-lg",
|
|
174
|
+
icon: "s-rounded-lg",
|
|
151
175
|
xmini: "s-rounded-lg",
|
|
152
176
|
mini: "s-rounded-lg",
|
|
153
177
|
xs: "s-rounded-lg",
|
|
@@ -167,8 +191,10 @@ const buttonVariants = cva(
|
|
|
167
191
|
const labelVariants = cva("", {
|
|
168
192
|
variants: {
|
|
169
193
|
size: {
|
|
170
|
-
|
|
171
|
-
|
|
194
|
+
"icon-xs": "s-label-xs s-hidden",
|
|
195
|
+
icon: "s-label-xs s-hidden",
|
|
196
|
+
xmini: "s-label-xs",
|
|
197
|
+
mini: "s-label-xs",
|
|
172
198
|
xs: "s-label-xs",
|
|
173
199
|
sm: "s-label-sm",
|
|
174
200
|
md: "s-label-base",
|
|
@@ -245,7 +271,9 @@ MetaButton.displayName = "MetaButton";
|
|
|
245
271
|
type IconSizeType = "xs" | "sm" | "md";
|
|
246
272
|
type CounterSizeType = "xs" | "sm" | "md";
|
|
247
273
|
|
|
248
|
-
export const ICON_SIZE_MAP: Record<
|
|
274
|
+
export const ICON_SIZE_MAP: Record<ButtonSize, IconSizeType> = {
|
|
275
|
+
"icon-xs": "xs",
|
|
276
|
+
icon: "sm",
|
|
249
277
|
xmini: "xs",
|
|
250
278
|
mini: "sm",
|
|
251
279
|
xs: "xs",
|
|
@@ -253,7 +281,9 @@ export const ICON_SIZE_MAP: Record<ButtonSizeType, IconSizeType> = {
|
|
|
253
281
|
md: "md",
|
|
254
282
|
};
|
|
255
283
|
|
|
256
|
-
const COUNTER_SIZE_MAP: Record<
|
|
284
|
+
const COUNTER_SIZE_MAP: Record<ButtonSize, CounterSizeType> = {
|
|
285
|
+
"icon-xs": "xs",
|
|
286
|
+
icon: "xs",
|
|
257
287
|
xmini: "xs",
|
|
258
288
|
mini: "xs",
|
|
259
289
|
xs: "xs",
|
|
@@ -273,19 +303,23 @@ type CommonButtonProps = Omit<MetaButtonProps, "children"> &
|
|
|
273
303
|
isRounded?: boolean;
|
|
274
304
|
};
|
|
275
305
|
|
|
276
|
-
|
|
277
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Icon-only button sizes (fixed width).
|
|
308
|
+
* When using these sizes, an icon is required and labels are not allowed.
|
|
309
|
+
*/
|
|
310
|
+
export type IconOnlyButtonProps = CommonButtonProps & {
|
|
311
|
+
size: IconOnlySize;
|
|
278
312
|
icon: React.ComponentType;
|
|
279
313
|
label?: never;
|
|
280
314
|
};
|
|
281
315
|
|
|
282
316
|
export type RegularButtonProps = CommonButtonProps & {
|
|
283
|
-
size?:
|
|
317
|
+
size?: RegularButtonSize;
|
|
284
318
|
icon?: React.ComponentType;
|
|
285
319
|
label?: string;
|
|
286
320
|
};
|
|
287
321
|
|
|
288
|
-
export type ButtonProps =
|
|
322
|
+
export type ButtonProps = IconOnlyButtonProps | RegularButtonProps;
|
|
289
323
|
|
|
290
324
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
291
325
|
(
|
|
@@ -352,12 +386,11 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
352
386
|
<div
|
|
353
387
|
className={cn(
|
|
354
388
|
"-s-mx-0.5",
|
|
355
|
-
size
|
|
356
|
-
size === "xmini" && "s-w-5 s-px-0.5"
|
|
389
|
+
isSmallButtonSize(size) && "s-w-5 s-px-0.5"
|
|
357
390
|
)}
|
|
358
391
|
>
|
|
359
392
|
<Spinner
|
|
360
|
-
size={size
|
|
393
|
+
size={isSmallButtonSize(size) ? "xs" : iconSize}
|
|
361
394
|
variant={(variant && spinnerVariantsMap[variant]) || "gray400"}
|
|
362
395
|
/>
|
|
363
396
|
</div>
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@sparkle/lib/utils";
|
|
5
5
|
|
|
6
|
-
import type { ButtonProps,
|
|
6
|
+
import type { ButtonProps, ButtonSize, ButtonVariantType } from "./Button";
|
|
7
7
|
import { Button } from "./Button";
|
|
8
8
|
import type { DropdownMenuItemProps } from "./Dropdown";
|
|
9
9
|
import {
|
|
@@ -92,9 +92,9 @@ export interface ButtonGroupProps
|
|
|
92
92
|
*/
|
|
93
93
|
variant?: ButtonGroupVariantType;
|
|
94
94
|
/**
|
|
95
|
-
* Size to apply to all buttons in the group.
|
|
95
|
+
* Size to apply to all buttons in the group.
|
|
96
96
|
*/
|
|
97
|
-
size?:
|
|
97
|
+
size?: ButtonSize;
|
|
98
98
|
/**
|
|
99
99
|
* Whether every button should be disabled.
|
|
100
100
|
*/
|
|
@@ -166,19 +166,39 @@ const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
166
166
|
})();
|
|
167
167
|
|
|
168
168
|
if (item.type === "button") {
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
const buttonVariant = sanitizeVariant(variant ?? item.props.variant);
|
|
170
|
+
const buttonSize = size ?? item.props.size;
|
|
171
|
+
|
|
172
|
+
if (buttonSize === "icon" || buttonSize === "icon-xs") {
|
|
173
|
+
if (!item.props.icon) {
|
|
174
|
+
throw new Error("Icon is required for icon-only buttons");
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<Button
|
|
179
|
+
key={index}
|
|
180
|
+
{...item.props}
|
|
181
|
+
icon={item.props.icon}
|
|
182
|
+
label={undefined}
|
|
183
|
+
variant={buttonVariant}
|
|
184
|
+
size={buttonSize}
|
|
185
|
+
disabled={disabled ?? item.props.disabled}
|
|
186
|
+
isRounded={false}
|
|
187
|
+
className={cn(
|
|
188
|
+
item.props.className,
|
|
189
|
+
borderRadiusClasses,
|
|
190
|
+
borderClasses
|
|
191
|
+
)}
|
|
192
|
+
/>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
175
195
|
|
|
176
196
|
return (
|
|
177
197
|
<Button
|
|
178
198
|
key={index}
|
|
179
199
|
{...item.props}
|
|
180
|
-
variant={
|
|
181
|
-
size={
|
|
200
|
+
variant={buttonVariant}
|
|
201
|
+
size={buttonSize}
|
|
182
202
|
disabled={disabled ?? item.props.disabled}
|
|
183
203
|
isRounded={false}
|
|
184
204
|
className={cn(
|
|
@@ -190,20 +210,50 @@ const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
|
190
210
|
);
|
|
191
211
|
}
|
|
192
212
|
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
213
|
+
const buttonVariant = sanitizeVariant(
|
|
214
|
+
variant ?? item.triggerProps.variant
|
|
215
|
+
);
|
|
216
|
+
const buttonSize = size ?? item.triggerProps.size;
|
|
217
|
+
|
|
218
|
+
if (buttonSize === "icon" || buttonSize === "icon-xs") {
|
|
219
|
+
if (!item.triggerProps.icon) {
|
|
220
|
+
throw new Error("Icon is required for icon-only buttons");
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return (
|
|
224
|
+
<DropdownMenu key={index}>
|
|
225
|
+
<DropdownMenuTrigger asChild>
|
|
226
|
+
<Button
|
|
227
|
+
{...item.triggerProps}
|
|
228
|
+
label={undefined}
|
|
229
|
+
icon={item.triggerProps.icon}
|
|
230
|
+
variant={buttonVariant}
|
|
231
|
+
size={buttonSize}
|
|
232
|
+
disabled={disabled ?? item.triggerProps.disabled}
|
|
233
|
+
isRounded={false}
|
|
234
|
+
className={cn(
|
|
235
|
+
item.triggerProps.className,
|
|
236
|
+
borderRadiusClasses,
|
|
237
|
+
borderClasses
|
|
238
|
+
)}
|
|
239
|
+
/>
|
|
240
|
+
</DropdownMenuTrigger>
|
|
241
|
+
<DropdownMenuContent align={item.dropdownProps.align ?? "center"}>
|
|
242
|
+
{item.dropdownProps.items.map((dropdownItem, dropdownIndex) => (
|
|
243
|
+
<DropdownMenuItem key={dropdownIndex} {...dropdownItem} />
|
|
244
|
+
))}
|
|
245
|
+
</DropdownMenuContent>
|
|
246
|
+
</DropdownMenu>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
199
249
|
|
|
200
250
|
return (
|
|
201
251
|
<DropdownMenu key={index}>
|
|
202
252
|
<DropdownMenuTrigger asChild>
|
|
203
253
|
<Button
|
|
204
254
|
{...item.triggerProps}
|
|
205
|
-
variant={
|
|
206
|
-
size={
|
|
255
|
+
variant={buttonVariant}
|
|
256
|
+
size={buttonSize}
|
|
207
257
|
disabled={disabled ?? item.triggerProps.disabled}
|
|
208
258
|
isRounded={false}
|
|
209
259
|
className={cn(
|
package/src/components/Card.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
|
-
import { Button,
|
|
4
|
+
import { Button, IconOnlyButtonProps } from "@sparkle/components/Button";
|
|
5
5
|
import { LinkWrapperProps } from "@sparkle/components/LinkWrapper";
|
|
6
6
|
import {
|
|
7
7
|
noHrefLink,
|
|
@@ -227,18 +227,30 @@ CardActions.displayName = "CardActions";
|
|
|
227
227
|
|
|
228
228
|
export const CardActionButton = React.forwardRef<
|
|
229
229
|
HTMLButtonElement,
|
|
230
|
-
|
|
231
|
-
>(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
variant=
|
|
236
|
-
icon=
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
230
|
+
IconOnlyButtonProps
|
|
231
|
+
>(
|
|
232
|
+
(
|
|
233
|
+
{
|
|
234
|
+
className,
|
|
235
|
+
variant = "outline",
|
|
236
|
+
icon = XMarkIcon,
|
|
237
|
+
size = "icon",
|
|
238
|
+
...props
|
|
239
|
+
},
|
|
240
|
+
ref
|
|
241
|
+
) => {
|
|
242
|
+
return (
|
|
243
|
+
<Button
|
|
244
|
+
ref={ref}
|
|
245
|
+
variant={variant}
|
|
246
|
+
icon={icon}
|
|
247
|
+
size={size}
|
|
248
|
+
className={className}
|
|
249
|
+
{...props}
|
|
250
|
+
/>
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
);
|
|
242
254
|
|
|
243
255
|
CardActionButton.displayName = "CardActionButton";
|
|
244
256
|
|
|
@@ -5,9 +5,9 @@ import { ImageZoomDialog } from "@sparkle/components/ImageZoomDialog";
|
|
|
5
5
|
import { cn } from "@sparkle/lib/utils";
|
|
6
6
|
|
|
7
7
|
const SIZE_CLASSES = {
|
|
8
|
-
sm: "s-
|
|
9
|
-
md: "s-
|
|
10
|
-
lg: "s-
|
|
8
|
+
sm: "s-h-24 s-w-24",
|
|
9
|
+
md: "s-h-48 s-w-48",
|
|
10
|
+
lg: "s-h-80 s-w-80",
|
|
11
11
|
} as const;
|
|
12
12
|
|
|
13
13
|
type InteractiveImageGridSize = keyof typeof SIZE_CLASSES;
|
|
@@ -101,7 +101,7 @@ function InteractiveImageGrid({
|
|
|
101
101
|
downloadUrl={image.downloadUrl}
|
|
102
102
|
isLoading={image.isLoading}
|
|
103
103
|
onClick={() => setCurrentImageIndex(idx)}
|
|
104
|
-
variant="
|
|
104
|
+
variant="embedded"
|
|
105
105
|
titlePosition="center"
|
|
106
106
|
manageZoomDialog={false}
|
|
107
107
|
/>
|
|
@@ -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-hover/menu-item:s-pr-8 group-focus-within/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-hover/menu-item:s-hidden group-focus-within/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-hover/menu-item:s-hidden group-focus-within/menu-item:s-hidden",
|
|
192
192
|
getStatusDotColor()
|
|
193
193
|
)}
|
|
194
194
|
/>
|
package/src/components/index.ts
CHANGED
|
@@ -11,11 +11,7 @@ export { Avatar } from "./Avatar";
|
|
|
11
11
|
export { Bar, BarFooter, BarHeader } from "./Bar";
|
|
12
12
|
export type { BreadcrumbItem } from "./Breadcrumbs";
|
|
13
13
|
export { Breadcrumbs } from "./Breadcrumbs";
|
|
14
|
-
export type {
|
|
15
|
-
ButtonProps,
|
|
16
|
-
MiniButtonProps,
|
|
17
|
-
RegularButtonProps,
|
|
18
|
-
} from "./Button";
|
|
14
|
+
export type { ButtonProps, RegularButtonProps } from "./Button";
|
|
19
15
|
export { Button } from "./Button";
|
|
20
16
|
export type { ButtonGroupItem, ButtonGroupProps } from "./ButtonGroup";
|
|
21
17
|
export { ButtonGroup } from "./ButtonGroup";
|
|
@@ -221,5 +217,3 @@ export {
|
|
|
221
217
|
export { Tree } from "./Tree";
|
|
222
218
|
export { TypingAnimation } from "./TypingAnimation";
|
|
223
219
|
export { ValueCard } from "./ValueCard";
|
|
224
|
-
export type { VoicePickerProps, VoicePickerStatus } from "./VoicePicker";
|
|
225
|
-
export { VoicePicker } from "./VoicePicker";
|
|
@@ -56,11 +56,9 @@ export { default as ReplicateLogo } from "./Replicate";
|
|
|
56
56
|
export { default as SalesforceLogo } from "./Salesforce";
|
|
57
57
|
export { default as SlackLogo } from "./Slack";
|
|
58
58
|
export { default as SnowflakeLogo } from "./Snowflake";
|
|
59
|
-
export { default as StatuspageLogo } from "./Statuspage";
|
|
60
59
|
export { default as StripeLogo } from "./Stripe";
|
|
61
60
|
export { default as SupabaseLogo } from "./Supabase";
|
|
62
61
|
export { default as TogetheraiLogo } from "./Togetherai";
|
|
63
|
-
export { default as UkgLogo } from "./Ukg";
|
|
64
62
|
export { default as ValTownLogo } from "./ValTown";
|
|
65
63
|
export { default as VantaLogo } from "./Vanta";
|
|
66
64
|
export { default as ZapierLogo } from "./Zapier";
|
package/src/styles/allotment.css
CHANGED
|
@@ -17,37 +17,28 @@
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.allotment-module_splitView__L-yRc
|
|
21
|
-
> .allotment-module_sashContainer__fzwJF
|
|
22
|
-
> .allotment-module_sash__QA-2t {
|
|
20
|
+
.allotment-module_splitView__L-yRc > .allotment-module_sashContainer__fzwJF > .allotment-module_sash__QA-2t {
|
|
23
21
|
pointer-events: auto;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
.allotment-module_splitView__L-yRc
|
|
27
|
-
> .allotment-module_splitViewContainer__rQnVa {
|
|
24
|
+
.allotment-module_splitView__L-yRc > .allotment-module_splitViewContainer__rQnVa {
|
|
28
25
|
height: 100%;
|
|
29
26
|
position: relative;
|
|
30
27
|
white-space: nowrap;
|
|
31
28
|
width: 100%;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
|
-
.allotment-module_splitView__L-yRc
|
|
35
|
-
> .allotment-module_splitViewContainer__rQnVa
|
|
36
|
-
> .allotment-module_splitViewView__MGZ6O {
|
|
31
|
+
.allotment-module_splitView__L-yRc > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
|
|
37
32
|
overflow: hidden;
|
|
38
33
|
position: absolute;
|
|
39
34
|
white-space: initial;
|
|
40
35
|
}
|
|
41
36
|
|
|
42
|
-
.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa
|
|
43
|
-
> .allotment-module_splitViewContainer__rQnVa
|
|
44
|
-
> .allotment-module_splitViewView__MGZ6O {
|
|
37
|
+
.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
|
|
45
38
|
width: 100%;
|
|
46
39
|
}
|
|
47
40
|
|
|
48
|
-
.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8
|
|
49
|
-
> .allotment-module_splitViewContainer__rQnVa
|
|
50
|
-
> .allotment-module_splitViewView__MGZ6O {
|
|
41
|
+
.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8 > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
|
|
51
42
|
height: 100%;
|
|
52
43
|
}
|
|
53
44
|
|
|
@@ -138,8 +129,7 @@
|
|
|
138
129
|
height: var(--sash-size);
|
|
139
130
|
}
|
|
140
131
|
|
|
141
|
-
.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx)
|
|
142
|
-
> .sash-module_orthogonal-drag-handle__Yii2- {
|
|
132
|
+
.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2- {
|
|
143
133
|
content: " ";
|
|
144
134
|
height: calc(var(--sash-size) * 2);
|
|
145
135
|
width: calc(var(--sash-size) * 2);
|
|
@@ -149,48 +139,36 @@
|
|
|
149
139
|
position: absolute;
|
|
150
140
|
}
|
|
151
141
|
|
|
152
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
153
|
-
.sash-module_disabled__Hm-wx
|
|
154
|
-
)
|
|
142
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)
|
|
155
143
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk,
|
|
156
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
157
|
-
.sash-module_disabled__Hm-wx
|
|
158
|
-
)
|
|
144
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)
|
|
159
145
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
160
146
|
cursor: nwse-resize;
|
|
161
147
|
}
|
|
162
148
|
|
|
163
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
164
|
-
.sash-module_disabled__Hm-wx
|
|
165
|
-
)
|
|
149
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)
|
|
166
150
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R,
|
|
167
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
168
|
-
.sash-module_disabled__Hm-wx
|
|
169
|
-
)
|
|
151
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)
|
|
170
152
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
171
153
|
cursor: nesw-resize;
|
|
172
154
|
}
|
|
173
155
|
|
|
174
|
-
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
175
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
156
|
+
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
176
157
|
left: calc(var(--sash-size) * -0.5);
|
|
177
158
|
top: calc(var(--sash-size) * -1);
|
|
178
159
|
}
|
|
179
160
|
|
|
180
|
-
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
181
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
161
|
+
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
182
162
|
left: calc(var(--sash-size) * -0.5);
|
|
183
163
|
bottom: calc(var(--sash-size) * -1);
|
|
184
164
|
}
|
|
185
165
|
|
|
186
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
187
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
166
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
188
167
|
top: calc(var(--sash-size) * -0.5);
|
|
189
168
|
left: calc(var(--sash-size) * -1);
|
|
190
169
|
}
|
|
191
170
|
|
|
192
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
193
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
171
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
194
172
|
top: calc(var(--sash-size) * -0.5);
|
|
195
173
|
right: calc(var(--sash-size) * -1);
|
|
196
174
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ButtonProps, ButtonSizeType } from "../components/Button";
|
|
3
|
-
export type VoicePickerStatus = "idle" | "authorizing_microphone" | "recording" | "transcribing";
|
|
4
|
-
export interface VoicePickerProps {
|
|
5
|
-
status: VoicePickerStatus;
|
|
6
|
-
level: number;
|
|
7
|
-
elapsedSeconds: number;
|
|
8
|
-
onRecordStart: () => void | Promise<void>;
|
|
9
|
-
onRecordStop: () => void | Promise<void>;
|
|
10
|
-
size?: Exclude<ButtonSizeType, "xmini" | "mini">;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
showStopLabel?: boolean;
|
|
13
|
-
pressDelayMs?: number;
|
|
14
|
-
buttonProps?: Omit<ButtonProps, "icon" | "label" | "variant" | "isLoading" | "disabled" | "size">;
|
|
15
|
-
}
|
|
16
|
-
export declare function VoicePicker({ status, level, elapsedSeconds, onRecordStart, onRecordStop, size, disabled, showStopLabel, pressDelayMs, buttonProps }: VoicePickerProps): React.ReactElement;
|
|
17
|
-
//# sourceMappingURL=VoicePicker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VoicePicker.d.ts","sourceRoot":"","sources":["../../../src/components/VoicePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAU9E,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,wBAAwB,GACxB,WAAW,GACX,cAAc,CAAC;AAInB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,YAAY,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,IAAI,CAChB,WAAW,EACX,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CACjE,CAAC;CACH;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,IAAW,EACX,QAAgB,EAChB,aAAqB,EACrB,YAAqC,EACrC,WAAW,EACZ,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CA6JvC"}
|