cos-design 3.7.6 → 3.7.8
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/CHANGELOG.md +37 -0
- package/README.md +12 -11
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +1547 -1324
- package/dist/src/components/flipCard/index.d.ts +27 -0
- package/dist/src/components/index.d.ts +4 -0
- package/dist/src/components/nineGrid/index.d.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FlipCardHandle {
|
|
3
|
+
flip: () => void;
|
|
4
|
+
reset: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface FlipCardProps {
|
|
7
|
+
/** Front face title (e.g. Day 3) */
|
|
8
|
+
frontTitle?: string;
|
|
9
|
+
/** Front face subtitle */
|
|
10
|
+
frontSubtitle?: string;
|
|
11
|
+
/** Back face reward title */
|
|
12
|
+
backTitle?: string;
|
|
13
|
+
/** Back face detail */
|
|
14
|
+
backSubtitle?: string;
|
|
15
|
+
/** Controlled flip; omit for uncontrolled */
|
|
16
|
+
flipped?: boolean;
|
|
17
|
+
/** Initial flip when uncontrolled */
|
|
18
|
+
defaultFlipped?: boolean;
|
|
19
|
+
/** Called after flip toggles to true (reveal) */
|
|
20
|
+
onReveal?: () => void;
|
|
21
|
+
/** Called on any flip change */
|
|
22
|
+
onFlipChange?: (flipped: boolean) => void;
|
|
23
|
+
/** Disable clicking the card */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const FlipCard: React.ForwardRefExoticComponent<FlipCardProps & React.RefAttributes<FlipCardHandle>>;
|
|
27
|
+
export default FlipCard;
|
|
@@ -37,6 +37,8 @@ export { default as DoublePendulum } from './doublePendulum';
|
|
|
37
37
|
export type { DoublePendulumProps } from './doublePendulum';
|
|
38
38
|
export { default as Fireworks } from './fireworks';
|
|
39
39
|
export type { FireworksHandle, FireworksProps } from './fireworks';
|
|
40
|
+
export { default as FlipCard } from './flipCard';
|
|
41
|
+
export type { FlipCardHandle, FlipCardProps } from './flipCard';
|
|
40
42
|
export { default as FlipCounter } from './flipCounter';
|
|
41
43
|
export type { CountUpProps } from './countUp';
|
|
42
44
|
export { default as FuzzyText } from './fuzzyText';
|
|
@@ -72,6 +74,8 @@ export { default as NetworkGraph } from './networkGraph';
|
|
|
72
74
|
export type { NetworkGraphEdge, NetworkGraphNode, NetworkGraphProps } from './networkGraph';
|
|
73
75
|
export { default as NeonText } from './neonText';
|
|
74
76
|
export { default as NewtonCradle } from './newtonCradle';
|
|
77
|
+
export { default as NineGrid } from './nineGrid';
|
|
78
|
+
export type { NineGridHandle, NineGridItem, NineGridProps } from './nineGrid';
|
|
75
79
|
export type { NewtonCradleProps } from './newtonCradle';
|
|
76
80
|
export type { NeonTextProps } from './neonText';
|
|
77
81
|
export { default as OrbitalChart } from './orbitalChart';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NineGridItem {
|
|
3
|
+
label: string;
|
|
4
|
+
/** Optional emoji / short mark shown above the label */
|
|
5
|
+
icon?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface NineGridHandle {
|
|
8
|
+
/** Start a draw. Optional override for server-drawn index. */
|
|
9
|
+
draw: (targetIndex?: number) => void;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface NineGridProps {
|
|
13
|
+
/** Exactly 9 prize cells (or will be padded/truncated to 9) */
|
|
14
|
+
items?: NineGridItem[];
|
|
15
|
+
/** Next winning index 0–8 (server draw). Omit for random. */
|
|
16
|
+
targetIndex?: number;
|
|
17
|
+
/** Draw button label */
|
|
18
|
+
buttonText?: string;
|
|
19
|
+
/** Called when the highlight settles on a cell */
|
|
20
|
+
onDrawEnd?: (item: NineGridItem, index: number) => void;
|
|
21
|
+
/** Disable interaction while drawing */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const NineGrid: React.ForwardRefExoticComponent<NineGridProps & React.RefAttributes<NineGridHandle>>;
|
|
25
|
+
export default NineGrid;
|
package/package.json
CHANGED