@once-ui-system/core 1.7.0 → 1.7.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/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +95 -81
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Input.module.scss +31 -12
- package/dist/components/ScrollLock.d.ts.map +1 -1
- package/dist/components/ScrollLock.js +91 -4
- package/dist/components/ScrollLock.js.map +1 -1
- package/dist/components/TagInput.d.ts +1 -2
- package/dist/components/TagInput.d.ts.map +1 -1
- package/dist/components/TagInput.js.map +1 -1
- package/dist/components/Textarea.js +6 -6
- package/dist/components/Textarea.js.map +1 -1
- package/dist/data/emoji-data.json +18 -0
- package/dist/package.json +1 -1
- package/dist/src/__tests__/Dialog.test.d.ts +1 -0
- package/dist/src/components/Accordion.d.ts +21 -0
- package/dist/src/components/AccordionGroup.d.ts +15 -0
- package/dist/src/components/Animation.d.ts +33 -0
- package/dist/src/components/Arrow.d.ts +10 -0
- package/dist/src/components/ArrowNavigationContext.d.ts +32 -0
- package/dist/src/components/AutoScroll.d.ts +13 -0
- package/dist/src/components/Avatar.d.ts +20 -0
- package/dist/src/components/AvatarGroup.d.ts +13 -0
- package/dist/src/components/Background.d.ts +48 -0
- package/dist/src/components/Badge.d.ts +16 -0
- package/dist/src/components/Banner.d.ts +5 -0
- package/dist/src/components/BlobFx.d.ts +7 -0
- package/dist/src/components/BlockQuote.d.ts +20 -0
- package/dist/src/components/Button.d.ts +26 -0
- package/dist/src/components/Card.d.ts +12 -0
- package/dist/src/components/Carousel.d.ts +31 -0
- package/dist/src/components/CelebrationFx.d.ts +16 -0
- package/dist/src/components/Checkbox.d.ts +10 -0
- package/dist/src/components/Chip.d.ts +16 -0
- package/dist/src/components/ClientFlex.d.ts +12 -0
- package/dist/src/components/ClientGrid.d.ts +12 -0
- package/dist/src/components/ColorInput.d.ts +10 -0
- package/dist/src/components/Column.d.ts +6 -0
- package/dist/src/components/CompareImage.d.ts +15 -0
- package/dist/src/components/ContextMenu.d.ts +21 -0
- package/dist/src/components/CountFx.d.ts +14 -0
- package/dist/src/components/CountdownFx.d.ts +10 -0
- package/dist/src/components/Cursor.d.ts +7 -0
- package/dist/src/components/CursorCard.d.ts +12 -0
- package/dist/src/components/DateInput.d.ts +17 -0
- package/dist/src/components/DatePicker.d.ts +32 -0
- package/dist/src/components/DateRangeInput.d.ts +14 -0
- package/dist/src/components/DateRangePicker.d.ts +16 -0
- package/dist/src/components/Dialog.d.ts +19 -0
- package/dist/src/components/Dropdown.d.ts +12 -0
- package/dist/src/components/DropdownWrapper.d.ts +28 -0
- package/dist/src/components/ElementType.d.ts +13 -0
- package/dist/src/components/EmojiPicker.d.ts +15 -0
- package/dist/src/components/EmojiPickerDropdown.d.ts +10 -0
- package/dist/src/components/Fade.d.ts +18 -0
- package/dist/src/components/Feedback.d.ts +15 -0
- package/dist/src/components/Flex.d.ts +10 -0
- package/dist/src/components/FlipFx.d.ts +16 -0
- package/dist/src/components/GlitchFx.d.ts +11 -0
- package/dist/src/components/Grid.d.ts +10 -0
- package/dist/src/components/HoloFx.d.ts +31 -0
- package/dist/src/components/Hover.d.ts +13 -0
- package/dist/src/components/HoverCard.d.ts +4 -0
- package/dist/src/components/Icon.d.ts +17 -0
- package/dist/src/components/IconButton.d.ts +22 -0
- package/dist/src/components/InfiniteScroll.d.ts +15 -0
- package/dist/src/components/InlineCode.d.ts +9 -0
- package/dist/src/components/Input.d.ts +23 -0
- package/dist/src/components/InteractiveDetails.d.ts +14 -0
- package/dist/src/components/Kbd.d.ts +11 -0
- package/dist/src/components/Line.d.ts +8 -0
- package/dist/src/components/List.d.ts +10 -0
- package/dist/src/components/ListItem.d.ts +9 -0
- package/dist/src/components/Logo.d.ts +17 -0
- package/dist/src/components/LogoCloud.d.ts +13 -0
- package/dist/src/components/Mask.d.ts +14 -0
- package/dist/src/components/MasonryGrid.d.ts +21 -0
- package/dist/src/components/MatrixFx.d.ts +26 -0
- package/dist/src/components/Media.d.ts +25 -0
- package/dist/src/components/Modal.d.ts +10 -0
- package/dist/src/components/NavIcon.d.ts +10 -0
- package/dist/src/components/NumberInput.d.ts +12 -0
- package/dist/src/components/OTPInput.d.ts +12 -0
- package/dist/src/components/OgCard.d.ts +33 -0
- package/dist/src/components/Option.d.ts +20 -0
- package/dist/src/components/Particle.d.ts +20 -0
- package/dist/src/components/PasswordInput.d.ts +3 -0
- package/dist/src/components/ProgressBar.d.ts +14 -0
- package/dist/src/components/Pulse.d.ts +12 -0
- package/dist/src/components/RadioButton.d.ts +14 -0
- package/dist/src/components/RevealFx.d.ts +15 -0
- package/dist/src/components/Row.d.ts +6 -0
- package/dist/src/components/ScrollContainer.d.ts +8 -0
- package/dist/src/components/ScrollLock.integration.test.d.ts +1 -0
- package/dist/src/components/ScrollToTop.d.ts +6 -0
- package/dist/src/components/Scroller.d.ts +13 -0
- package/dist/src/components/SegmentedControl.d.ts +17 -0
- package/dist/src/components/Select.d.ts +18 -0
- package/dist/src/components/ShineFx.d.ts +12 -0
- package/dist/src/components/Skeleton.d.ts +12 -0
- package/dist/src/components/Slider.d.ts +16 -0
- package/dist/src/components/SmartLink.d.ts +17 -0
- package/dist/src/components/Spinner.d.ts +10 -0
- package/dist/src/components/SplitView.d.ts +15 -0
- package/dist/src/components/SplitView.js +79 -0
- package/dist/src/components/StatusIndicator.d.ts +11 -0
- package/dist/src/components/StyleOverlay.d.ts +9 -0
- package/dist/src/components/StylePanel.d.ts +7 -0
- package/dist/src/components/Swiper.d.ts +16 -0
- package/dist/src/components/Switch.d.ts +16 -0
- package/dist/src/components/Table.d.ts +15 -0
- package/dist/src/components/Tag.d.ts +15 -0
- package/dist/src/components/TagInput.d.ts +8 -0
- package/dist/src/components/Textarea.d.ts +22 -0
- package/dist/src/components/ThemeSwitcher.d.ts +3 -0
- package/dist/src/components/TiltFx.d.ts +9 -0
- package/dist/src/components/Timeline.d.ts +17 -0
- package/dist/src/components/Toast.d.ts +11 -0
- package/dist/src/components/Toaster.d.ts +12 -0
- package/dist/src/components/ToggleButton.d.ts +23 -0
- package/dist/src/components/Tooltip.d.ts +12 -0
- package/dist/src/components/TypeFx.d.ts +14 -0
- package/dist/src/components/User.d.ts +15 -0
- package/dist/src/components/UserMenu.d.ts +12 -0
- package/dist/src/components/WeatherFx.d.ts +17 -0
- package/dist/src/components/index.d.ts +120 -0
- package/dist/src/contexts/DataThemeProvider.d.ts +25 -0
- package/dist/src/contexts/ThemeProvider.d.ts +48 -0
- package/dist/src/contexts/ToastProvider.d.ts +17 -0
- package/dist/src/contexts/index.d.ts +5 -0
- package/dist/src/data/emoji-data.json +16062 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/modules/code/CodeBlock.d.ts +5 -0
- package/dist/src/modules/code/CodeBlock.impl.d.ts +33 -0
- package/dist/src/modules/data/BarChart.d.ts +5 -0
- package/dist/src/modules/data/BarChart.impl.d.ts +11 -0
- package/dist/src/modules/data/ChartHeader.d.ts +13 -0
- package/dist/src/modules/data/ChartStatus.d.ts +9 -0
- package/dist/src/modules/data/DataTooltip.d.ts +15 -0
- package/dist/src/modules/data/Gradient.d.ts +31 -0
- package/dist/src/modules/data/Legend.d.ts +14 -0
- package/dist/src/modules/data/LineBarChart.d.ts +5 -0
- package/dist/src/modules/data/LineBarChart.impl.d.ts +11 -0
- package/dist/src/modules/data/LineChart.d.ts +5 -0
- package/dist/src/modules/data/LineChart.impl.d.ts +16 -0
- package/dist/src/modules/data/LinearGauge.d.ts +17 -0
- package/dist/src/modules/data/PieChart.d.ts +5 -0
- package/dist/src/modules/data/PieChart.impl.d.ts +17 -0
- package/dist/src/modules/data/RadialGauge.d.ts +24 -0
- package/dist/src/modules/data/Swatch.d.ts +8 -0
- package/dist/src/modules/data/index.d.ts +13 -0
- package/dist/src/modules/data/interfaces.d.ts +52 -0
- package/dist/src/modules/data/utils/formatDate.d.ts +11 -0
- package/dist/src/modules/index.d.ts +7 -0
- package/dist/src/modules/media/MediaUpload.d.ts +5 -0
- package/dist/src/modules/media/MediaUpload.impl.d.ts +23 -0
- package/dist/src/modules/navigation/HeadingLink.d.ts +10 -0
- package/dist/src/modules/navigation/HeadingNav.d.ts +7 -0
- package/dist/src/modules/navigation/Kbar.d.ts +33 -0
- package/dist/src/modules/navigation/MegaMenu.d.ts +27 -0
- package/dist/src/modules/navigation/MobileMegaMenu.d.ts +27 -0
- package/dist/src/modules/navigation/index.d.ts +5 -0
- package/dist/src/utils/MissingDependency.d.ts +6 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/test/dialogTestUtils.d.ts.map +1 -1
- package/dist/test/dialogTestUtils.js +8 -5
- package/dist/test/dialogTestUtils.js.map +1 -1
- package/package.json +3 -3
- package/dist/internal/dialogState.d.ts +0 -17
- package/dist/internal/dialogState.d.ts.map +0 -1
- package/dist/internal/dialogState.js +0 -101
- package/dist/internal/dialogState.js.map +0 -1
- package/dist/internal/scrollLockState.d.ts +0 -15
- package/dist/internal/scrollLockState.d.ts.map +0 -1
- package/dist/internal/scrollLockState.js +0 -172
- package/dist/internal/scrollLockState.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { Row } from ".";
|
|
3
|
+
import { IconName } from "../icons";
|
|
4
|
+
interface TooltipProps extends React.ComponentProps<typeof Row> {
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
prefixIcon?: IconName;
|
|
7
|
+
suffixIcon?: IconName;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const Tooltip: React.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { Tooltip };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from ".";
|
|
3
|
+
export interface TypeFxProps extends Omit<React.ComponentProps<typeof Text>, 'children'> {
|
|
4
|
+
words: string | string[];
|
|
5
|
+
speed?: number;
|
|
6
|
+
delay?: number;
|
|
7
|
+
hold?: number;
|
|
8
|
+
trigger?: "instant" | "custom";
|
|
9
|
+
onTrigger?: (triggerFn: () => void) => void;
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const TypeFx: React.FC<TypeFxProps>;
|
|
14
|
+
export { TypeFx };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TagProps, AvatarProps } from ".";
|
|
3
|
+
interface UserProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
subline?: React.ReactNode;
|
|
7
|
+
tag?: string;
|
|
8
|
+
tagProps?: TagProps;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
avatarProps?: AvatarProps;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const User: React.ForwardRefExoticComponent<UserProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { User };
|
|
15
|
+
export type { UserProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UserProps, DropdownWrapperProps } from ".";
|
|
3
|
+
import { Placement } from "@floating-ui/react-dom";
|
|
4
|
+
interface UserMenuProps extends UserProps, Pick<DropdownWrapperProps, "minHeight" | "minWidth" | "maxWidth"> {
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
dropdown?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const UserMenu: React.FC<UserMenuProps>;
|
|
12
|
+
export { UserMenu };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex } from ".";
|
|
3
|
+
type WeatherType = "rain" | "snow" | "leaves" | "lightning";
|
|
4
|
+
interface WeatherFxProps extends React.ComponentProps<typeof Flex> {
|
|
5
|
+
type?: WeatherType;
|
|
6
|
+
speed?: number;
|
|
7
|
+
colors?: string[];
|
|
8
|
+
intensity?: number;
|
|
9
|
+
angle?: number;
|
|
10
|
+
duration?: number;
|
|
11
|
+
trigger?: "mount" | "hover" | "click" | "manual";
|
|
12
|
+
active?: boolean;
|
|
13
|
+
reducedMotion?: boolean | "auto";
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const WeatherFx: React.ForwardRefExoticComponent<Omit<WeatherFxProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { WeatherFx };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export * from "./Accordion";
|
|
2
|
+
export * from "./AccordionGroup";
|
|
3
|
+
export * from "./Animation";
|
|
4
|
+
export * from "./Arrow";
|
|
5
|
+
export * from "./ArrowNavigationContext";
|
|
6
|
+
export * from "./AutoScroll";
|
|
7
|
+
export * from "./Avatar";
|
|
8
|
+
export * from "./AvatarGroup";
|
|
9
|
+
export * from "./Badge";
|
|
10
|
+
export * from "./BlobFx";
|
|
11
|
+
export * from "./Banner";
|
|
12
|
+
export * from "./Background";
|
|
13
|
+
export * from "./BlockQuote";
|
|
14
|
+
export * from "./Button";
|
|
15
|
+
export * from "./MatrixFx";
|
|
16
|
+
export * from "./WeatherFx";
|
|
17
|
+
export * from "./Carousel";
|
|
18
|
+
export * from "./Swiper";
|
|
19
|
+
export * from "./Card";
|
|
20
|
+
export * from "./CursorCard";
|
|
21
|
+
export * from "./Cursor";
|
|
22
|
+
export * from "./CountFx";
|
|
23
|
+
export * from "./CountdownFx";
|
|
24
|
+
export * from "./Column";
|
|
25
|
+
export * from "./Checkbox";
|
|
26
|
+
export * from "./Chip";
|
|
27
|
+
export * from "./ColorInput";
|
|
28
|
+
export * from "./CompareImage";
|
|
29
|
+
export * from "./ContextMenu";
|
|
30
|
+
export * from "./DateInput";
|
|
31
|
+
export * from "./DatePicker";
|
|
32
|
+
export * from "./DateRangeInput";
|
|
33
|
+
export * from "./DateRangePicker";
|
|
34
|
+
export * from "./Dialog";
|
|
35
|
+
export * from "./Dropdown";
|
|
36
|
+
export * from "./DropdownWrapper";
|
|
37
|
+
export * from "./ElementType";
|
|
38
|
+
export * from "./EmojiPicker";
|
|
39
|
+
export * from "./EmojiPickerDropdown";
|
|
40
|
+
export * from "./Fade";
|
|
41
|
+
export * from "./Feedback";
|
|
42
|
+
export * from "./ServerFlex";
|
|
43
|
+
export * from "./ClientFlex";
|
|
44
|
+
export * from "./Flex";
|
|
45
|
+
export * from "./FlipFx";
|
|
46
|
+
export * from "./FocusTrap";
|
|
47
|
+
export * from "./GlitchFx";
|
|
48
|
+
export * from "./ServerGrid";
|
|
49
|
+
export * from "./ClientGrid";
|
|
50
|
+
export * from "./Grid";
|
|
51
|
+
export * from "./Heading";
|
|
52
|
+
export * from "./HoloFx";
|
|
53
|
+
export * from "./Hover";
|
|
54
|
+
export * from "./HoverCard";
|
|
55
|
+
export * from "./Icon";
|
|
56
|
+
export * from "./IconButton";
|
|
57
|
+
export * from "./InfiniteScroll";
|
|
58
|
+
export * from "./InlineCode";
|
|
59
|
+
export * from "./Input";
|
|
60
|
+
export * from "./InteractiveDetails";
|
|
61
|
+
export * from "./Kbd";
|
|
62
|
+
export * from "./LetterFx";
|
|
63
|
+
export * from "./Line";
|
|
64
|
+
export * from "./List";
|
|
65
|
+
export * from "./ListItem";
|
|
66
|
+
export * from "./Logo";
|
|
67
|
+
export * from "./LogoCloud";
|
|
68
|
+
export * from "./Mask";
|
|
69
|
+
export * from "./MasonryGrid";
|
|
70
|
+
export * from "./Media";
|
|
71
|
+
export * from "./Modal";
|
|
72
|
+
export * from "./NavIcon";
|
|
73
|
+
export * from "./NumberInput";
|
|
74
|
+
export * from "./OgCard";
|
|
75
|
+
export * from "./Option";
|
|
76
|
+
export * from "./OTPInput";
|
|
77
|
+
export * from "./Particle";
|
|
78
|
+
export * from "./PasswordInput";
|
|
79
|
+
export * from "./ProgressBar";
|
|
80
|
+
export * from "./Pulse";
|
|
81
|
+
export * from "./RadioButton";
|
|
82
|
+
export * from "./RevealFx";
|
|
83
|
+
export * from "./Row";
|
|
84
|
+
export * from "./Scroller";
|
|
85
|
+
export * from "./ScrollContainer";
|
|
86
|
+
export * from "./ScrollLock";
|
|
87
|
+
export * from "./ScrollToTop";
|
|
88
|
+
export * from "./SegmentedControl";
|
|
89
|
+
export * from "./Select";
|
|
90
|
+
export * from "./ServerFlex";
|
|
91
|
+
export * from "./ServerGrid";
|
|
92
|
+
export * from "./ShineFx";
|
|
93
|
+
export * from "./Skeleton";
|
|
94
|
+
export * from "./Slider";
|
|
95
|
+
export * from "./SmartLink";
|
|
96
|
+
export * from "./Spinner";
|
|
97
|
+
export * from "./SplitView";
|
|
98
|
+
export * from "./StatusIndicator";
|
|
99
|
+
export * from "./StylePanel";
|
|
100
|
+
export * from "./StyleOverlay";
|
|
101
|
+
export * from "./Switch";
|
|
102
|
+
export * from "./Table";
|
|
103
|
+
export * from "./Tag";
|
|
104
|
+
export * from "./TagInput";
|
|
105
|
+
export * from "./Text";
|
|
106
|
+
export * from "./Textarea";
|
|
107
|
+
export * from "./TiltFx";
|
|
108
|
+
export * from "./Timeline";
|
|
109
|
+
export * from "./Toast";
|
|
110
|
+
export * from "./Toaster";
|
|
111
|
+
export * from "./ToggleButton";
|
|
112
|
+
export * from "./Tooltip";
|
|
113
|
+
export * from "./TypeFx";
|
|
114
|
+
export * from "./ThemeInit";
|
|
115
|
+
export * from "./ThemeSwitcher";
|
|
116
|
+
export * from "./User";
|
|
117
|
+
export * from "./UserMenu";
|
|
118
|
+
export * from "./Pulse";
|
|
119
|
+
export * from "./CelebrationFx";
|
|
120
|
+
export * from "./FadingLettersFx";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { ChartMode, ChartVariant } from "../modules/data";
|
|
3
|
+
interface ChartOptions {
|
|
4
|
+
variant: ChartVariant;
|
|
5
|
+
mode: ChartMode;
|
|
6
|
+
height: number;
|
|
7
|
+
axis: {
|
|
8
|
+
stroke: string;
|
|
9
|
+
};
|
|
10
|
+
tick: {
|
|
11
|
+
fill: string;
|
|
12
|
+
fontSize: number;
|
|
13
|
+
line: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface DataThemeState extends ChartOptions {
|
|
17
|
+
setChartOptions: (options: Partial<ChartOptions>) => void;
|
|
18
|
+
}
|
|
19
|
+
interface DataThemeProviderProps extends Partial<ChartOptions> {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare const defaultChartOptions: ChartOptions;
|
|
23
|
+
export declare function DataThemeProvider({ children, variant, mode, height, axis, tick, ...rest }: DataThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const useDataTheme: () => DataThemeState;
|
|
25
|
+
export { defaultChartOptions };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Schemes } from "../types";
|
|
2
|
+
export type Theme = "dark" | "light" | "system";
|
|
3
|
+
export type NeutralColor = "sand" | "gray" | "slate";
|
|
4
|
+
export type SolidType = "color" | "contrast" | "inverse";
|
|
5
|
+
export type SolidStyle = "flat" | "plastic";
|
|
6
|
+
export type BorderStyle = "rounded" | "playful" | "conservative";
|
|
7
|
+
export type SurfaceStyle = "filled" | "translucent";
|
|
8
|
+
export type TransitionStyle = "all" | "micro" | "macro" | "none";
|
|
9
|
+
export type ScalingSize = "90" | "95" | "100" | "105" | "110";
|
|
10
|
+
export type DataStyle = "categorical" | "divergent" | "sequential";
|
|
11
|
+
interface StyleOptions {
|
|
12
|
+
theme: Theme;
|
|
13
|
+
neutral: NeutralColor | "custom";
|
|
14
|
+
brand: Schemes | "custom";
|
|
15
|
+
accent: Schemes | "custom";
|
|
16
|
+
solid: SolidType;
|
|
17
|
+
solidStyle: SolidStyle;
|
|
18
|
+
border: BorderStyle;
|
|
19
|
+
surface: SurfaceStyle;
|
|
20
|
+
transition: TransitionStyle;
|
|
21
|
+
scaling: ScalingSize;
|
|
22
|
+
}
|
|
23
|
+
type ThemeProviderState = {
|
|
24
|
+
theme: Theme;
|
|
25
|
+
resolvedTheme: "light" | "dark";
|
|
26
|
+
setTheme: (theme: Theme) => void;
|
|
27
|
+
};
|
|
28
|
+
type StyleProviderState = StyleOptions & {
|
|
29
|
+
setStyle: (style: Partial<StyleOptions>) => void;
|
|
30
|
+
};
|
|
31
|
+
type ThemeProviderProps = {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
theme?: Theme;
|
|
34
|
+
neutral?: NeutralColor | "custom";
|
|
35
|
+
brand?: Schemes | "custom";
|
|
36
|
+
accent?: Schemes | "custom";
|
|
37
|
+
solid?: SolidType;
|
|
38
|
+
solidStyle?: SolidStyle;
|
|
39
|
+
border?: BorderStyle;
|
|
40
|
+
surface?: SurfaceStyle;
|
|
41
|
+
transition?: TransitionStyle;
|
|
42
|
+
scaling?: ScalingSize;
|
|
43
|
+
};
|
|
44
|
+
declare const defaultStyleOptions: StyleOptions;
|
|
45
|
+
export declare function ThemeProvider({ children, theme: propTheme, neutral, brand, accent, solid, solidStyle, border, surface, transition, scaling, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare const useTheme: () => ThemeProviderState;
|
|
47
|
+
export declare const useStyle: () => StyleProviderState;
|
|
48
|
+
export { defaultStyleOptions };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface Toast {
|
|
3
|
+
id: string;
|
|
4
|
+
variant: "success" | "danger";
|
|
5
|
+
message: ReactNode;
|
|
6
|
+
action?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface ToastContextProps {
|
|
9
|
+
toasts: Toast[];
|
|
10
|
+
addToast: (toast: Omit<Toast, "id">) => void;
|
|
11
|
+
removeToast: (id: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useToast: () => ToastContextProps;
|
|
14
|
+
declare const ToastProvider: React.FC<{
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}>;
|
|
17
|
+
export { ToastProvider };
|