@spark-ui/components 17.2.4 → 17.2.5
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/src/toast/Toast.styles.d.ts +0 -4
- package/dist/toast/index.js +1 -1
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +0 -15
- package/dist/toast/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/snackbar/index.js +0 -2
- package/dist/snackbar/index.js.map +0 -1
- package/dist/snackbar/index.mjs +0 -409
- package/dist/snackbar/index.mjs.map +0 -1
- package/dist/src/snackbar/Snackbar.d.ts +0 -29
- package/dist/src/snackbar/SnackbarItem.d.ts +0 -49
- package/dist/src/snackbar/SnackbarItem.styles.d.ts +0 -10
- package/dist/src/snackbar/SnackbarItemAction.d.ts +0 -10
- package/dist/src/snackbar/SnackbarItemClose.d.ts +0 -9
- package/dist/src/snackbar/SnackbarItemContext.d.ts +0 -8
- package/dist/src/snackbar/SnackbarItemIcon.d.ts +0 -7
- package/dist/src/snackbar/SnackbarRegion.d.ts +0 -30
- package/dist/src/snackbar/SnackbarRegion.styles.d.ts +0 -5
- package/dist/src/snackbar/index.d.mts +0 -13
- package/dist/src/snackbar/index.d.ts +0 -13
- package/dist/src/snackbar/snackbarVariants.d.ts +0 -74
- package/dist/src/snackbar/useSnackbarGlobalStore.d.ts +0 -18
- package/dist/src/snackbar/useSwipe.d.ts +0 -15
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AriaToastRegionProps } from '@react-aria/toast';
|
|
2
|
-
import { ComponentPropsWithRef, ReactElement } from 'react';
|
|
3
|
-
import { SnackbarItem, SnackbarItemProps } from './SnackbarItem';
|
|
4
|
-
import { SnackbarItemState } from './SnackbarItemContext';
|
|
5
|
-
import { SnackbarRegionVariantProps } from './SnackbarRegion.styles';
|
|
6
|
-
export interface SnackbarRegionProps extends ComponentPropsWithRef<'div'>, AriaToastRegionProps, SnackbarRegionVariantProps, Pick<SnackbarItemState, 'state'> {
|
|
7
|
-
/**
|
|
8
|
-
* An accessibility label for the snackbar region.
|
|
9
|
-
* @default 'Notifications'
|
|
10
|
-
*/
|
|
11
|
-
'aria-label'?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Identifies the element (or elements) that labels the current element.
|
|
14
|
-
*/
|
|
15
|
-
'aria-labelledby'?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Identifies the element (or elements) that describes the object.
|
|
18
|
-
*/
|
|
19
|
-
'aria-describedby'?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Identifies the element (or elements) that provide a detailed, extended description for the object.
|
|
22
|
-
*/
|
|
23
|
-
'aria-details'?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The component/template used to display each snackbar from the queue
|
|
26
|
-
* @default 'Snackbar.Item'
|
|
27
|
-
*/
|
|
28
|
-
children?: ReactElement<SnackbarItemProps, typeof SnackbarItem>;
|
|
29
|
-
}
|
|
30
|
-
export declare const SnackbarRegion: ({ children, state, position, className, ref: forwardedRef, ...rest }: SnackbarRegionProps) => ReactElement;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
export declare const snackbarRegionVariant: (props?: ({
|
|
3
|
-
position?: "bottom" | "top" | "top-right" | "top-left" | "bottom-right" | "bottom-left" | null | undefined;
|
|
4
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
-
export type SnackbarRegionVariantProps = VariantProps<typeof snackbarRegionVariant>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { addSnackbar, AddSnackbarArgs, clearSnackbarQueue, Snackbar as Root, SnackbarProps } from './Snackbar';
|
|
2
|
-
import { SnackbarItem as Item, SnackbarItemProps } from './SnackbarItem';
|
|
3
|
-
import { SnackbarItemAction as ItemAction, SnackbarItemActionProps } from './SnackbarItemAction';
|
|
4
|
-
import { SnackbarItemClose as ItemClose, SnackbarItemCloseProps } from './SnackbarItemClose';
|
|
5
|
-
import { SnackbarItemIcon as ItemIcon, SnackbarItemIconProps } from './SnackbarItemIcon';
|
|
6
|
-
export declare const Snackbar: typeof Root & {
|
|
7
|
-
Item: typeof Item;
|
|
8
|
-
ItemAction: typeof ItemAction;
|
|
9
|
-
ItemClose: typeof ItemClose;
|
|
10
|
-
ItemIcon: typeof ItemIcon;
|
|
11
|
-
};
|
|
12
|
-
export type { SnackbarProps, SnackbarItemProps, SnackbarItemActionProps, SnackbarItemCloseProps, SnackbarItemIconProps, AddSnackbarArgs, };
|
|
13
|
-
export { addSnackbar, clearSnackbarQueue };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { addSnackbar, AddSnackbarArgs, clearSnackbarQueue, Snackbar as Root, SnackbarProps } from './Snackbar';
|
|
2
|
-
import { SnackbarItem as Item, SnackbarItemProps } from './SnackbarItem';
|
|
3
|
-
import { SnackbarItemAction as ItemAction, SnackbarItemActionProps } from './SnackbarItemAction';
|
|
4
|
-
import { SnackbarItemClose as ItemClose, SnackbarItemCloseProps } from './SnackbarItemClose';
|
|
5
|
-
import { SnackbarItemIcon as ItemIcon, SnackbarItemIconProps } from './SnackbarItemIcon';
|
|
6
|
-
export declare const Snackbar: typeof Root & {
|
|
7
|
-
Item: typeof Item;
|
|
8
|
-
ItemAction: typeof ItemAction;
|
|
9
|
-
ItemClose: typeof ItemClose;
|
|
10
|
-
ItemIcon: typeof ItemIcon;
|
|
11
|
-
};
|
|
12
|
-
export type { SnackbarProps, SnackbarItemProps, SnackbarItemActionProps, SnackbarItemCloseProps, SnackbarItemIconProps, AddSnackbarArgs, };
|
|
13
|
-
export { addSnackbar, clearSnackbarQueue };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export declare const filledVariants: readonly [{
|
|
2
|
-
readonly design: "filled";
|
|
3
|
-
readonly intent: "success";
|
|
4
|
-
readonly class: readonly ["bg-success text-on-success"];
|
|
5
|
-
}, {
|
|
6
|
-
readonly design: "filled";
|
|
7
|
-
readonly intent: "alert";
|
|
8
|
-
readonly class: readonly ["bg-alert text-on-alert"];
|
|
9
|
-
}, {
|
|
10
|
-
readonly design: "filled";
|
|
11
|
-
readonly intent: "error";
|
|
12
|
-
readonly class: readonly ["bg-error text-on-error"];
|
|
13
|
-
}, {
|
|
14
|
-
readonly design: "filled";
|
|
15
|
-
readonly intent: "info";
|
|
16
|
-
readonly class: readonly ["bg-info text-on-info"];
|
|
17
|
-
}, {
|
|
18
|
-
readonly design: "filled";
|
|
19
|
-
readonly intent: "neutral";
|
|
20
|
-
readonly class: readonly ["bg-neutral text-on-neutral"];
|
|
21
|
-
}, {
|
|
22
|
-
readonly design: "filled";
|
|
23
|
-
readonly intent: "main";
|
|
24
|
-
readonly class: readonly ["bg-main text-on-main"];
|
|
25
|
-
}, {
|
|
26
|
-
readonly design: "filled";
|
|
27
|
-
readonly intent: "support";
|
|
28
|
-
readonly class: readonly ["bg-support text-on-support"];
|
|
29
|
-
}, {
|
|
30
|
-
readonly design: "filled";
|
|
31
|
-
readonly intent: "accent";
|
|
32
|
-
readonly class: readonly ["bg-accent text-on-accent"];
|
|
33
|
-
}, {
|
|
34
|
-
readonly design: "filled";
|
|
35
|
-
readonly intent: "inverse";
|
|
36
|
-
readonly class: readonly ["bg-surface-inverse text-on-surface-inverse"];
|
|
37
|
-
}];
|
|
38
|
-
export declare const tintedVariants: readonly [{
|
|
39
|
-
readonly design: "tinted";
|
|
40
|
-
readonly intent: "success";
|
|
41
|
-
readonly class: readonly ["bg-success-container text-on-success-container"];
|
|
42
|
-
}, {
|
|
43
|
-
readonly design: "tinted";
|
|
44
|
-
readonly intent: "alert";
|
|
45
|
-
readonly class: readonly ["bg-alert-container text-on-alert-container"];
|
|
46
|
-
}, {
|
|
47
|
-
readonly design: "tinted";
|
|
48
|
-
readonly intent: "error";
|
|
49
|
-
readonly class: readonly ["bg-error-container text-on-error-container"];
|
|
50
|
-
}, {
|
|
51
|
-
readonly design: "tinted";
|
|
52
|
-
readonly intent: "info";
|
|
53
|
-
readonly class: readonly ["bg-info-container text-on-info-container"];
|
|
54
|
-
}, {
|
|
55
|
-
readonly design: "tinted";
|
|
56
|
-
readonly intent: "neutral";
|
|
57
|
-
readonly class: readonly ["bg-neutral-container text-on-neutral-container"];
|
|
58
|
-
}, {
|
|
59
|
-
readonly design: "tinted";
|
|
60
|
-
readonly intent: "main";
|
|
61
|
-
readonly class: readonly ["bg-main-container text-on-main-container"];
|
|
62
|
-
}, {
|
|
63
|
-
readonly design: "tinted";
|
|
64
|
-
readonly intent: "support";
|
|
65
|
-
readonly class: readonly ["bg-support-container text-on-support-container"];
|
|
66
|
-
}, {
|
|
67
|
-
readonly design: "tinted";
|
|
68
|
-
readonly intent: "accent";
|
|
69
|
-
readonly class: readonly ["bg-accent-container text-on-accent-container"];
|
|
70
|
-
}, {
|
|
71
|
-
readonly design: "tinted";
|
|
72
|
-
readonly intent: "inverse";
|
|
73
|
-
readonly class: readonly ["bg-surface-inverse text-on-surface-inverse"];
|
|
74
|
-
}];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
interface UseSnackbarGlobalStoreArgs<T> {
|
|
3
|
-
providers: Set<T>;
|
|
4
|
-
subscriptions: Set<() => void>;
|
|
5
|
-
}
|
|
6
|
-
interface UseSnackbarGlobalStoreReturn<T> {
|
|
7
|
-
provider: T;
|
|
8
|
-
addProvider: (ref: T) => void;
|
|
9
|
-
deleteProvider: (ref: T) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This hook is a basic abstraction of useSyncExternalStore hook which allows us
|
|
13
|
-
* to consume data from an external data store.
|
|
14
|
-
*
|
|
15
|
-
* Cf. https://react.dev/reference/react/useSyncExternalStore#subscribing-to-an-external-store
|
|
16
|
-
*/
|
|
17
|
-
export declare const useSnackbarGlobalStore: <T = RefObject<HTMLDivElement | null>>({ providers, subscriptions, }: UseSnackbarGlobalStoreArgs<T>) => UseSnackbarGlobalStoreReturn<T>;
|
|
18
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
interface SwipeArgs<T> {
|
|
3
|
-
swipeRef: RefObject<T | null>;
|
|
4
|
-
onSwipeStart?: ({ state, direction }: SwipeReturn) => void;
|
|
5
|
-
onSwipeMove?: ({ state, direction }: SwipeReturn) => void;
|
|
6
|
-
onSwipeCancel?: ({ state, direction }: SwipeReturn) => void;
|
|
7
|
-
onSwipeEnd?: ({ state, direction }: SwipeReturn) => void;
|
|
8
|
-
threshold?: number;
|
|
9
|
-
}
|
|
10
|
-
interface SwipeReturn {
|
|
11
|
-
state?: 'start' | 'move' | 'cancel' | 'end';
|
|
12
|
-
direction?: 'up' | 'down' | 'right' | 'left' | null;
|
|
13
|
-
}
|
|
14
|
-
export declare const useSwipe: <T extends HTMLElement>({ swipeRef, onSwipeStart, onSwipeMove, onSwipeCancel, onSwipeEnd, threshold, }: SwipeArgs<T>) => SwipeReturn;
|
|
15
|
-
export {};
|