@dust-tt/sparkle 0.2.94 → 0.2.97

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.
@@ -6,4 +6,3 @@ declare const meta: {
6
6
  };
7
7
  export default meta;
8
8
  export declare const BasicBanner: () => React.JSX.Element;
9
- export declare const IncidentBanner: () => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ElementModal } from "../index_with_tw_base";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ElementModal;
6
+ };
7
+ export default meta;
8
+ export declare const ElementModalExample: () => React.JSX.Element;
@@ -1,4 +1,3 @@
1
- import type { StoryObj } from "@storybook/react";
2
1
  import React from "react";
3
2
  import { Tab } from "../index_with_tw_base";
4
3
  declare const meta: {
@@ -6,6 +5,4 @@ declare const meta: {
6
5
  component: typeof Tab;
7
6
  };
8
7
  export default meta;
9
- type Story = StoryObj<typeof meta>;
10
- export declare const ButtonExamples: () => React.JSX.Element;
11
- export declare const TabNavigation: Story;
8
+ export declare const TabExample: () => React.JSX.Element;
@@ -56,6 +56,8 @@ import Spinner from "./components/Spinner";
56
56
  export { Spinner };
57
57
  import { Modal } from "./components/Modal";
58
58
  export { Modal };
59
+ import { ElementModal } from "./components/ElementModal";
60
+ export { ElementModal };
59
61
  import { Dialog } from "./components/Dialog";
60
62
  export { Dialog };
61
63
  import { Input } from "./components/Input";
@@ -1,21 +1,11 @@
1
1
  import React from "react";
2
2
  interface BannerProps {
3
- allowDismiss: boolean;
4
- classNames: string;
5
- ctaLabel?: string;
6
- label: string;
7
- hidden: boolean;
8
- onClick?: () => void;
3
+ variant?: "info" | "incident" | "error";
4
+ allowDismiss?: boolean;
5
+ className?: string;
6
+ hidden?: boolean;
9
7
  onDismiss?: () => void;
10
- title: string | React.ReactNode;
11
8
  children?: React.ReactNode;
12
9
  }
13
- export declare function Banner(props: BannerProps): React.JSX.Element;
14
- export declare namespace Banner {
15
- var defaultProps: {
16
- allowDismiss: boolean;
17
- classNames: string;
18
- hidden: boolean;
19
- };
20
- }
10
+ export declare function Banner({ variant, allowDismiss, className, hidden, onDismiss, children, }: BannerProps): React.JSX.Element;
21
11
  export {};
@@ -3,9 +3,10 @@ export interface ContentMessageProps {
3
3
  title: string;
4
4
  children: React.ReactNode;
5
5
  className?: string;
6
- variant: "amber" | "pink";
6
+ size?: "sm" | "md";
7
+ variant?: "emerald" | "amber" | "slate" | "purple" | "warning" | "sky" | "pink" | "action" | "red";
7
8
  }
8
- export declare function ContentMessage({ title, variant, children, className, }: ContentMessageProps): React.JSX.Element;
9
+ export declare function ContentMessage({ title, variant, children, size, className, }: ContentMessageProps): React.JSX.Element;
9
10
  export declare namespace ContentMessage {
10
11
  var defaultProps: {
11
12
  variant: "amber";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ModalProps } from "./Modal";
3
+ type ElementModalProps<T> = Omit<ModalProps, "isOpen" | "onSave"> & {
4
+ openOnElement: T | null;
5
+ onSave?: (closeModalFn: () => void) => void;
6
+ };
7
+ export declare function ElementModal<T>({ openOnElement, onClose, onSave, ...props }: ElementModalProps<T>): React.JSX.Element;
8
+ export {};
@@ -5,7 +5,7 @@ export declare enum ModalType {
5
5
  FullScreen = "full-screen",
6
6
  Side = "side"
7
7
  }
8
- type ModalProps = {
8
+ export type ModalProps = {
9
9
  isOpen: boolean;
10
10
  onClose: () => void;
11
11
  action?: ButtonProps;
@@ -19,4 +19,3 @@ type ModalProps = {
19
19
  variant?: "full-screen" | "side-sm" | "side-md" | "dialogue";
20
20
  };
21
21
  export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, saveLabel, isSaving, savingLabel, title, variant, }: ModalProps): React.JSX.Element;
22
- export {};
@@ -1,5 +1,6 @@
1
1
  import React, { ComponentType, MouseEvent } from "react";
2
2
  type TabProps = {
3
+ variant?: "default" | "stepper";
3
4
  tabs: Array<{
4
5
  label: string;
5
6
  hideLabel?: boolean;
@@ -14,5 +15,5 @@ type TabProps = {
14
15
  onTabClick?: (tabName: string, event: MouseEvent<HTMLAnchorElement>) => void;
15
16
  className?: string;
16
17
  };
17
- export declare function Tab({ tabs, onTabClick, className }: TabProps): React.JSX.Element;
18
+ export declare function Tab({ variant, tabs, onTabClick, className, }: TabProps): React.JSX.Element;
18
19
  export {};