@dust-tt/sparkle 0.5.8-rc-1 → 0.5.9-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.
Files changed (43) hide show
  1. package/dist/cjs/index.js +7 -7
  2. package/dist/cjs/index.js.map +4 -4
  3. package/dist/esm/components/AttachmentChip.d.ts +10 -2
  4. package/dist/esm/components/AttachmentChip.d.ts.map +1 -1
  5. package/dist/esm/components/AttachmentChip.js +13 -9
  6. package/dist/esm/components/AttachmentChip.js.map +1 -1
  7. package/dist/esm/components/Chip.d.ts +1 -1
  8. package/dist/esm/components/Chip.d.ts.map +1 -1
  9. package/dist/esm/components/Dialog.js +2 -2
  10. package/dist/esm/components/Dialog.js.map +1 -1
  11. package/dist/esm/components/NavigationList.d.ts.map +1 -1
  12. package/dist/esm/components/NavigationList.js +2 -2
  13. package/dist/esm/components/NavigationList.js.map +1 -1
  14. package/dist/esm/logo/platforms/Productboard.d.ts +5 -0
  15. package/dist/esm/logo/platforms/Productboard.d.ts.map +1 -0
  16. package/dist/esm/logo/platforms/Productboard.js +7 -0
  17. package/dist/esm/logo/platforms/Productboard.js.map +1 -0
  18. package/dist/esm/logo/platforms/index.d.ts +1 -0
  19. package/dist/esm/logo/platforms/index.d.ts.map +1 -1
  20. package/dist/esm/logo/platforms/index.js +1 -0
  21. package/dist/esm/logo/platforms/index.js.map +1 -1
  22. package/dist/esm/logo/src/platforms/Productboard.svg +10 -0
  23. package/dist/esm/lottie/collapseBar.d.ts +30 -30
  24. package/dist/esm/lottie/dragArea.d.ts +23 -23
  25. package/dist/esm/lottie/spinnerColorXS.d.ts +11 -11
  26. package/dist/esm/lottie/spinnerDark.d.ts +73 -73
  27. package/dist/esm/lottie/spinnerLight.d.ts +74 -74
  28. package/dist/esm/lottie/spinnerLightLG.d.ts +142 -142
  29. package/dist/esm/stories/AttachmentChip.stories.d.ts +3 -0
  30. package/dist/esm/stories/AttachmentChip.stories.d.ts.map +1 -1
  31. package/dist/esm/stories/AttachmentChip.stories.js +39 -6
  32. package/dist/esm/stories/AttachmentChip.stories.js.map +1 -1
  33. package/dist/esm/stories/Chip.stories.d.ts +1 -30
  34. package/dist/esm/stories/Chip.stories.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/src/components/AttachmentChip.tsx +62 -23
  37. package/src/components/Chip.tsx +1 -1
  38. package/src/components/Dialog.tsx +2 -2
  39. package/src/components/NavigationList.tsx +3 -2
  40. package/src/logo/platforms/Productboard.tsx +20 -0
  41. package/src/logo/platforms/index.ts +1 -0
  42. package/src/logo/src/platforms/Productboard.svg +10 -0
  43. package/src/stories/AttachmentChip.stories.tsx +51 -6
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentChip.stories.js","sourceRoot":"","sources":["../../../src/stories/AttachmentChip.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACmB,CAAC;AAExC,eAAe,IAAI,CAAC;AAGpB,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAiC,EAAE,EAAE,CAAC,CACxE,6BAAK,SAAS,EAAC,gDAAgD;IAC7D,2BAAG,SAAS,EAAC,6CAA6C;QACxD,8BAAM,SAAS,EAAC,kCAAkC,aAAc;;QACjD,QAAQ;oBACrB,CACA,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,UAAU;KACjB;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,oBAAC,gBAAgB;YACf,oBAAC,KAAK,OAAG,CACQ,CACpB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,UAAU;KACjB;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,oBAAC,gBAAgB;YACf,oBAAC,KAAK,OAAG,CACQ,CACpB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,gBAAgB;KACvB;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,oBAAC,gBAAgB;YACf,oBAAC,KAAK,OAAG,CACQ,CACpB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,KAAK,EAAE,oDAAoD;QAC3D,IAAI,EAAE,YAAY;KACnB;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,oBAAC,gBAAgB;YACf,oBAAC,KAAK,OAAG,CACQ,CACpB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"AttachmentChip.stories.js","sourceRoot":"","sources":["../../../src/stories/AttachmentChip.stories.tsx"],"names":[],"mappings":"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"}
@@ -2,36 +2,7 @@ import type { StoryObj } from "@storybook/react";
2
2
  import React from "react";
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.ForwardRefExoticComponent<(({
6
- size?: "mini" | "sm" | "xs" | undefined;
7
- color?: "blue" | "golden" | "green" | "highlight" | "info" | "primary" | "rose" | "success" | "warning" | undefined;
8
- label?: string | undefined;
9
- children?: React.ReactNode;
10
- className?: string | undefined;
11
- isBusy?: boolean | undefined;
12
- icon?: React.ComponentType | undefined;
13
- onRemove?: (() => void) | undefined;
14
- } & {
15
- onClick?: (() => void) | undefined;
16
- } & {
17
- href?: undefined;
18
- rel?: undefined;
19
- replace?: undefined;
20
- shallow?: undefined;
21
- target?: undefined;
22
- prefetch?: undefined;
23
- }) | ({
24
- size?: "mini" | "sm" | "xs" | undefined;
25
- color?: "blue" | "golden" | "green" | "highlight" | "info" | "primary" | "rose" | "success" | "warning" | undefined;
26
- label?: string | undefined;
27
- children?: React.ReactNode;
28
- className?: string | undefined;
29
- isBusy?: boolean | undefined;
30
- icon?: React.ComponentType | undefined;
31
- onRemove?: (() => void) | undefined;
32
- } & Omit<import("../components").LinkWrapperProps, "children"> & {
33
- onClick?: undefined;
34
- })) & React.RefAttributes<HTMLDivElement>>;
5
+ component: React.ForwardRefExoticComponent<import("../components/Chip").ChipProps & React.RefAttributes<HTMLDivElement>>;
35
6
  tags: string[];
36
7
  parameters: {
37
8
  layout: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAsFvB,CAAC"}
1
+ {"version":3,"file":"Chip.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAsFvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dust-tt/sparkle",
3
- "version": "0.5.8-rc-1",
3
+ "version": "0.5.9-rc-1",
4
4
  "scripts": {
5
5
  "build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
6
6
  "tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
@@ -1,25 +1,34 @@
1
- import { cva } from "class-variance-authority";
2
1
  import React from "react";
3
2
 
4
3
  import { cn } from "@sparkle/lib/utils";
5
4
 
6
- import { Icon } from "./Icon";
7
- import { LinkWrapper, LinkWrapperProps } from "./LinkWrapper";
8
-
9
- const attachmentChipVariants = cva(
10
- cn(
11
- "s-box-border s-inline-flex s-items-center s-gap-1.5 s-rounded-lg s-px-2 s-py-1 s-heading-sm",
12
- "s-border-border s-bg-background",
13
- "dark:s-border-border-night dark:s-bg-background-night",
14
- "s-text-foreground dark:s-text-foreground-night",
15
- "s-max-w-44"
16
- )
5
+ import { Chip, CHIP_COLORS, CHIP_SIZES } from "./Chip";
6
+ import { DoubleIcon, DoubleIconProps, Icon, IconProps } from "./Icon";
7
+ import { LinkWrapperProps } from "./LinkWrapper";
8
+
9
+ const attachmentChipOverrides = cn(
10
+ "s-rounded-lg s-px-2 s-py-1 s-heading-sm s-gap-1.5",
11
+ "s-bg-background s-text-foreground s-max-w-44",
12
+ "dark:s-bg-background-night dark:s-text-foreground-night"
17
13
  );
18
14
 
15
+ type AttachmentChipIconProps = IconProps | DoubleIconProps;
16
+
17
+ function isDoubleIconProps(
18
+ props: AttachmentChipIconProps
19
+ ): props is DoubleIconProps {
20
+ return "mainIcon" in props;
21
+ }
22
+
19
23
  interface AttachmentChipBaseProps {
20
24
  label: string;
21
- icon?: React.ComponentType;
25
+ icon?: AttachmentChipIconProps;
26
+ size?: (typeof CHIP_SIZES)[number];
27
+ color?: (typeof CHIP_COLORS)[number];
22
28
  className?: string;
29
+ isBusy?: boolean;
30
+ onRemove?: () => void;
31
+ onClick?: () => void;
23
32
  }
24
33
 
25
34
  type AttachmentChipButtonProps = AttachmentChipBaseProps & {
@@ -34,21 +43,51 @@ type AttachmentChipLinkProps = AttachmentChipBaseProps &
34
43
  type AttachmentChipProps = AttachmentChipButtonProps | AttachmentChipLinkProps;
35
44
 
36
45
  export function AttachmentChip({
37
- label,
38
46
  icon,
39
47
  className,
40
- ...props
48
+ label,
49
+ size,
50
+ color,
51
+ isBusy,
52
+ onRemove,
53
+ onClick,
54
+ ...linkProps
41
55
  }: AttachmentChipProps) {
42
- const chipContent = (
43
- <div className={cn(attachmentChipVariants({}), className)}>
44
- <Icon visual={icon} size="xs" className="s-shrink-0" />
45
- <span className="s-pointer s-grow s-truncate">{label}</span>
56
+ const iconElement = icon && (
57
+ <div className="s-shrink-0">
58
+ {isDoubleIconProps(icon) ? <DoubleIcon {...icon} /> : <Icon {...icon} />}
46
59
  </div>
47
60
  );
48
61
 
49
- return "href" in props && props.href ? (
50
- <LinkWrapper {...props}>{chipContent}</LinkWrapper>
51
- ) : (
52
- chipContent
62
+ const chipClassName = cn(attachmentChipOverrides, className);
63
+
64
+ if ("href" in linkProps && linkProps.href) {
65
+ return (
66
+ <Chip
67
+ className={chipClassName}
68
+ label={label}
69
+ size={size}
70
+ color={color}
71
+ isBusy={isBusy}
72
+ onRemove={onRemove}
73
+ {...linkProps}
74
+ >
75
+ {iconElement}
76
+ </Chip>
77
+ );
78
+ }
79
+
80
+ return (
81
+ <Chip
82
+ className={chipClassName}
83
+ label={label}
84
+ size={size}
85
+ color={color}
86
+ isBusy={isBusy}
87
+ onRemove={onRemove}
88
+ onClick={onClick}
89
+ >
90
+ {iconElement}
91
+ </Chip>
53
92
  );
54
93
  }
@@ -160,7 +160,7 @@ type ChipLinkProps = ChipBaseProps &
160
160
  onClick?: never;
161
161
  };
162
162
 
163
- type ChipProps = ChipLinkProps | ChipButtonProps;
163
+ export type ChipProps = ChipLinkProps | ChipButtonProps;
164
164
 
165
165
  // TODO(yuka: 1606): we should update this component so that you cannot have both
166
166
  // onClick and onRemove at the same time. We should use div when there is no onClick,
@@ -182,7 +182,7 @@ const DialogContainer = ({
182
182
  );
183
183
 
184
184
  const scrollableContent = (
185
- <ScrollArea className="s-min-h-0 s-w-full s-flex-grow">
185
+ <ScrollArea className="s-w-full s-flex-grow">
186
186
  <div
187
187
  className={cn(
188
188
  contentStyles,
@@ -197,7 +197,7 @@ const DialogContainer = ({
197
197
 
198
198
  if (fixedContent) {
199
199
  return (
200
- <div className="s-flex s-min-h-0 s-flex-grow s-flex-col s-overflow-hidden">
200
+ <div className="s-flex s-flex-grow s-flex-col s-overflow-hidden">
201
201
  <div className={cn(contentStyles, "s-flex-none")}>{fixedContent}</div>
202
202
  <Separator />
203
203
  {scrollableContent}
@@ -48,6 +48,7 @@ const NavigationListItemStyles = cva(
48
48
  interface NavigationListProps {
49
49
  viewportRef?: React.RefObject<HTMLDivElement>;
50
50
  }
51
+
51
52
  const NavigationList = React.forwardRef<
52
53
  React.ElementRef<typeof ScrollAreaPrimitive.Root>,
53
54
  React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> &
@@ -220,7 +221,7 @@ const variantStyles = cva("", {
220
221
  });
221
222
 
222
223
  const labelStyles = cva(
223
- "s-flex s-items-center s-justify-between s-gap-2 s-pt-4 s-pb-2 s-heading-xs s-whitespace-nowrap s-overflow-hidden s-text-ellipsis"
224
+ "s-flex s-items-center s-justify-between s-gap-2 s-pt-4 s-pb-2 s-pr-2 s-heading-xs s-whitespace-nowrap s-overflow-hidden s-text-ellipsis"
224
225
  );
225
226
 
226
227
  interface NavigationListLabelButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -291,7 +292,7 @@ const NavigationListLabel = React.forwardRef<
291
292
  className={cn(
292
293
  labelStyles(),
293
294
  variantStyles({ variant, isSticky }),
294
- isCollapsible ? "s-pl-1.5" : "s-pl-3",
295
+ isCollapsible ? "s-pl-1" : "s-pl-3",
295
296
  className
296
297
  )}
297
298
  {...props}
@@ -0,0 +1,20 @@
1
+ import type { SVGProps } from "react";
2
+ import * as React from "react";
3
+ const SvgProductboard = (props: SVGProps<SVGSVGElement>) => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ fill="none"
7
+ viewBox="0 -44 256 256"
8
+ width="1em"
9
+ height="1em"
10
+ {...props}
11
+ >
12
+ <path fill="#FF2638" d="m85.327 83.997 85.327 83.996H0z" />
13
+ <path fill="#FFC600" d="m0 0 85.327 83.997L170.654 0z" />
14
+ <path
15
+ fill="#0079F2"
16
+ d="m85.34 83.997 85.328 83.996 85.327-83.996L170.668 0z"
17
+ />
18
+ </svg>
19
+ );
20
+ export default SvgProductboard;
@@ -51,6 +51,7 @@ export { default as NotionLogo } from "./Notion";
51
51
  export { default as OfficeLogo } from "./Office";
52
52
  export { default as OpenaiLogo } from "./Openai";
53
53
  export { default as OutlookLogo } from "./Outlook";
54
+ export { default as ProductboardLogo } from "./Productboard";
54
55
  export { default as ReplicateLogo } from "./Replicate";
55
56
  export { default as SalesforceLogo } from "./Salesforce";
56
57
  export { default as SlackLogo } from "./Slack";
@@ -0,0 +1,10 @@
1
+ <svg viewBox="0 -44 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g>
3
+ <polygon fill="#FF2638" points="85.326959 83.9967251 170.653918 167.99345 0 167.99345"/>
4
+ <polygon fill="#FFC600" points="0 0 85.326959 83.9967251 170.653918 0"/>
5
+ <polygon fill="#0079F2" points="85.3406727 83.9967251 170.667632 167.99345 255.994591 83.9967251 170.667632 0"/>
6
+ </g>
7
+ </svg>
8
+
9
+
10
+
@@ -2,8 +2,8 @@ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import React from "react";
3
3
 
4
4
  import { AttachmentChip } from "@sparkle/components";
5
- import { DocumentIcon, DocumentTextIcon } from "@sparkle/icons/app";
6
- import { NotionLogo } from "@sparkle/logo";
5
+ import { DocumentIcon, DocumentTextIcon, FolderIcon } from "@sparkle/icons/app";
6
+ import { DriveLogo, NotionLogo } from "@sparkle/logo";
7
7
 
8
8
  const meta = {
9
9
  title: "Components/AttachmentChip",
@@ -29,7 +29,7 @@ const ParagraphWrapper = ({ children }: { children: React.ReactNode }) => (
29
29
  export const Document: Story = {
30
30
  args: {
31
31
  label: "document.pdf",
32
- icon: NotionLogo,
32
+ icon: { visual: NotionLogo },
33
33
  },
34
34
  decorators: [
35
35
  (Story) => (
@@ -43,7 +43,7 @@ export const Document: Story = {
43
43
  export const Image: Story = {
44
44
  args: {
45
45
  label: "image.jpg",
46
- icon: NotionLogo,
46
+ icon: { visual: NotionLogo },
47
47
  },
48
48
  decorators: [
49
49
  (Story) => (
@@ -57,7 +57,7 @@ export const Image: Story = {
57
57
  export const Text: Story = {
58
58
  args: {
59
59
  label: "text.txt",
60
- icon: DocumentTextIcon,
60
+ icon: { visual: DocumentTextIcon },
61
61
  },
62
62
  decorators: [
63
63
  (Story) => (
@@ -71,7 +71,52 @@ export const Text: Story = {
71
71
  export const LongLabel: Story = {
72
72
  args: {
73
73
  label: "very_long_document_name_that_will_be_truncated.pdf",
74
- icon: DocumentIcon,
74
+ icon: { visual: DocumentIcon },
75
+ },
76
+ decorators: [
77
+ (Story) => (
78
+ <ParagraphWrapper>
79
+ <Story />
80
+ </ParagraphWrapper>
81
+ ),
82
+ ],
83
+ };
84
+
85
+ export const WithDoubleIcon: Story = {
86
+ args: {
87
+ label: "My Drive Folder",
88
+ icon: { mainIcon: FolderIcon, secondaryIcon: DriveLogo, size: "sm" },
89
+ },
90
+ decorators: [
91
+ (Story) => (
92
+ <ParagraphWrapper>
93
+ <Story />
94
+ </ParagraphWrapper>
95
+ ),
96
+ ],
97
+ };
98
+
99
+ export const WithDoubleIconAndLink: Story = {
100
+ args: {
101
+ label: "Notion Document",
102
+ icon: { mainIcon: DocumentIcon, secondaryIcon: NotionLogo, size: "sm" },
103
+ href: "https://notion.so",
104
+ target: "_blank",
105
+ },
106
+ decorators: [
107
+ (Story) => (
108
+ <ParagraphWrapper>
109
+ <Story />
110
+ </ParagraphWrapper>
111
+ ),
112
+ ],
113
+ };
114
+
115
+ export const WithChipColor: Story = {
116
+ args: {
117
+ label: "Success chip",
118
+ icon: { visual: DocumentIcon },
119
+ color: "success",
75
120
  },
76
121
  decorators: [
77
122
  (Story) => (