@fluix-ui/vanilla 0.0.5 → 0.0.7
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/README.md +106 -2
- package/dist/index.cjs +701 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -3
- package/dist/index.d.ts +69 -3
- package/dist/index.global.js +1473 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +701 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FluixToasterConfig } from '@fluix-ui/core';
|
|
2
|
-
export { FluixPosition, FluixToastOptions, FluixToastPromiseOptions, FluixToastState, FluixToasterConfig, fluix } from '@fluix-ui/core';
|
|
1
|
+
import { FluixToasterConfig, NotchTrigger, NotchPosition, SpringConfig, NotchTheme, MenuOrientation, MenuVariant, MenuTheme } from '@fluix-ui/core';
|
|
2
|
+
export { FluixPosition, FluixToastOptions, FluixToastPromiseOptions, FluixToastState, FluixToasterConfig, MenuOrientation, MenuTheme, MenuVariant, NotchConfig, NotchPosition, NotchTheme, NotchTrigger, fluix } from '@fluix-ui/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Vanilla JS Toaster — imperative DOM adapter for the Fluix toast system.
|
|
@@ -13,4 +13,70 @@ declare function createToaster(config?: FluixToasterConfig): {
|
|
|
13
13
|
update(config: FluixToasterConfig): void;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Vanilla JS Notch — imperative DOM adapter for the Fluix Notch component.
|
|
18
|
+
*
|
|
19
|
+
* Creates all DOM elements (measurer, root, SVG canvas with gooey filter +
|
|
20
|
+
* highlight rect, pill div, content div), subscribes to the core notch machine,
|
|
21
|
+
* and drives WAAPI spring animations.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
interface NotchOptions {
|
|
25
|
+
trigger?: NotchTrigger;
|
|
26
|
+
position?: NotchPosition;
|
|
27
|
+
spring?: SpringConfig;
|
|
28
|
+
/** Collapsed dot size in px. Default: 36 */
|
|
29
|
+
dotSize?: number;
|
|
30
|
+
roundness?: number;
|
|
31
|
+
/** Visual theme. Default: "dark" */
|
|
32
|
+
theme?: NotchTheme;
|
|
33
|
+
fill?: string;
|
|
34
|
+
open?: boolean;
|
|
35
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
|
+
/** Icon/content shown in the collapsed dot */
|
|
37
|
+
pill: HTMLElement | string;
|
|
38
|
+
/** Content shown when expanded */
|
|
39
|
+
content: HTMLElement | string;
|
|
40
|
+
}
|
|
41
|
+
interface NotchInstance {
|
|
42
|
+
open(): void;
|
|
43
|
+
close(): void;
|
|
44
|
+
toggle(): void;
|
|
45
|
+
destroy(): void;
|
|
46
|
+
update(opts: Partial<NotchOptions>): void;
|
|
47
|
+
}
|
|
48
|
+
declare function createNotch(container: HTMLElement, options: NotchOptions): NotchInstance;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Vanilla JS Menu — imperative DOM adapter for the Fluix Menu component.
|
|
52
|
+
*
|
|
53
|
+
* Creates all DOM elements (nav, item buttons, SVG canvas with indicator),
|
|
54
|
+
* subscribes to the core menu machine, and drives the indicator animation
|
|
55
|
+
* via connectMenu.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
interface MenuItemConfig {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface MenuOptions {
|
|
64
|
+
orientation?: MenuOrientation;
|
|
65
|
+
variant?: MenuVariant;
|
|
66
|
+
theme?: MenuTheme;
|
|
67
|
+
activeId?: string | null;
|
|
68
|
+
onActiveChange?: (id: string) => void;
|
|
69
|
+
spring?: SpringConfig;
|
|
70
|
+
roundness?: number;
|
|
71
|
+
blur?: number;
|
|
72
|
+
fill?: string;
|
|
73
|
+
items: MenuItemConfig[];
|
|
74
|
+
}
|
|
75
|
+
interface MenuInstance {
|
|
76
|
+
setActive(id: string | null): void;
|
|
77
|
+
update(opts: Partial<MenuOptions>): void;
|
|
78
|
+
destroy(): void;
|
|
79
|
+
}
|
|
80
|
+
declare function createMenu(container: HTMLElement, options: MenuOptions): MenuInstance;
|
|
81
|
+
|
|
82
|
+
export { type MenuInstance, type MenuItemConfig, type MenuOptions, type NotchOptions, createMenu, createNotch, createToaster };
|