@once-ui-system/fx 3.0.0-beta.1 → 3.0.0-beta.3
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/CelebrationFx.d.ts +24 -4
- package/dist/CelebrationFx.js +444 -272
- package/dist/GlitchFx.module.css +1 -0
- package/dist/HoloFx.module.css +1 -0
- package/dist/MatrixFx.js +7 -2
- package/dist/RevealFx.module.css +1 -0
- package/dist/ShineFx.module.css +1 -0
- package/dist/TiltFx.module.css +1 -0
- package/dist/WeatherFx.d.ts +25 -4
- package/dist/WeatherFx.js +471 -818
- package/dist/internal/FadingLetters.module.css +1 -0
- package/dist/internal/canvasStage.d.ts +61 -0
- package/dist/internal/canvasStage.js +163 -0
- package/dist/internal/cssColor.js +10 -1
- package/dist/internal/useControllableState.d.ts +14 -0
- package/dist/internal/useControllableState.js +35 -0
- package/package.json +1 -1
package/dist/CelebrationFx.d.ts
CHANGED
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
import { Flex, type Speed } from "@once-ui-system/core";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
type CelebrationType = "confetti" | "fireworks";
|
|
4
|
-
interface CelebrationFxProps extends React.ComponentProps<typeof Flex> {
|
|
4
|
+
interface CelebrationFxProps extends Omit<React.ComponentProps<typeof Flex>, "onChange" | "defaultValue"> {
|
|
5
5
|
type?: CelebrationType;
|
|
6
6
|
/** A multiplier on the designed pace (`1`), or `"slow"`/`"medium"`/`"fast"` (0.5, 1, 2). */
|
|
7
7
|
speed?: Speed;
|
|
8
|
+
/**
|
|
9
|
+
* Colours to draw with: tokens (`brand-solid-medium`, `accent-weak`), custom
|
|
10
|
+
* properties (`--my-color`) or CSS colours. Read again when the theme changes.
|
|
11
|
+
*/
|
|
8
12
|
colors?: string[];
|
|
13
|
+
/** How much to draw: pieces per cannon for confetti, sparks per shell for fireworks. 0 to 200. */
|
|
9
14
|
intensity?: number;
|
|
10
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Milliseconds the celebration runs once it starts; then `active` turns off
|
|
17
|
+
* and what is in the air settles. `0` or `Infinity` runs until `active` is
|
|
18
|
+
* set to false.
|
|
19
|
+
*/
|
|
11
20
|
duration?: number;
|
|
12
|
-
|
|
21
|
+
/**
|
|
22
|
+
* What starts the celebration by itself: `mount` (on load), `hover` (while
|
|
23
|
+
* the pointer is over it; a tap on touch screens) or `click` (a burst where
|
|
24
|
+
* clicked). Setting `active` starts and stops it from outside, whatever the
|
|
25
|
+
* trigger.
|
|
26
|
+
*/
|
|
27
|
+
trigger?: "mount" | "hover" | "click";
|
|
28
|
+
/** Whether it is celebrating. Controlled; pair with `onActiveChange`. */
|
|
13
29
|
active?: boolean;
|
|
30
|
+
/** The first value of `active` when uncontrolled. Defaults to `trigger === "mount"`. */
|
|
31
|
+
defaultActive?: boolean;
|
|
32
|
+
/** Called when the celebration starts (hover) or ends (`duration`, pointer leaving). */
|
|
33
|
+
onActiveChange?: (active: boolean) => void;
|
|
14
34
|
reducedMotion?: boolean | "auto";
|
|
15
35
|
children?: React.ReactNode;
|
|
16
36
|
}
|
|
17
37
|
declare const CelebrationFx: {
|
|
18
|
-
({ ref: forwardedRef, type, speed: speedProp, colors, intensity, duration, trigger, active, reducedMotion, children,
|
|
38
|
+
({ ref: forwardedRef, type, speed: speedProp, colors: colorsProp, intensity, duration, trigger, active: activeProp, defaultActive, onActiveChange, reducedMotion, children, onClick, onMouseEnter, onMouseLeave, ...rest }: CelebrationFxProps): React.JSX.Element;
|
|
19
39
|
displayName: string;
|
|
20
40
|
};
|
|
21
41
|
export { CelebrationFx };
|