cronixui 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cronixui",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CronixUI - A dark-themed UI toolkit with crimson accents and Outfit typography",
5
5
  "keywords": [
6
6
  "ui",
@@ -19,6 +19,22 @@
19
19
  "main": "packages/web/dist/cronixui.js",
20
20
  "style": "packages/web/dist/cronixui.css",
21
21
  "types": "packages/web/src/cronixui.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./packages/web/dist/cronixui.js",
25
+ "require": "./packages/web/dist/cronixui.js",
26
+ "style": "./packages/web/dist/cronixui.css",
27
+ "types": "./packages/web/src/cronixui.d.ts"
28
+ },
29
+ "./react": {
30
+ "import": "./packages/react/src/index.js",
31
+ "types": "./packages/react/src/index.d.ts"
32
+ },
33
+ "./css": "./packages/web/dist/cronixui.css",
34
+ "./css/min": "./packages/web/dist/cronixui.min.css",
35
+ "./js": "./packages/web/dist/cronixui.js",
36
+ "./js/min": "./packages/web/dist/cronixui.min.js"
37
+ },
22
38
  "files": [
23
39
  "packages/web/dist/",
24
40
  "packages/web/src/",
@@ -0,0 +1,103 @@
1
+ declare namespace CronixUI {
2
+ interface ToastOptions {
3
+ title?: string;
4
+ message: string;
5
+ type?: 'success' | 'error' | 'warning' | 'info';
6
+ duration?: number;
7
+ }
8
+
9
+ interface PaginationOptions {
10
+ total: number;
11
+ current: number;
12
+ onChange?: (page: number) => void;
13
+ }
14
+
15
+ interface SearchItem {
16
+ title: string;
17
+ subtitle?: string;
18
+ action: () => void;
19
+ }
20
+
21
+ interface CommandPaletteItem {
22
+ title: string;
23
+ kbd?: string;
24
+ action: () => void;
25
+ }
26
+
27
+ interface ModalInstance {
28
+ open(): void;
29
+ close(): void;
30
+ }
31
+
32
+ interface DropdownInstance {
33
+ open(): void;
34
+ close(): void;
35
+ toggle(): void;
36
+ }
37
+
38
+ interface ToggleInstance {
39
+ toggle(): void;
40
+ isOn(): boolean;
41
+ setOn(value: boolean): void;
42
+ }
43
+
44
+ interface TabsInstance {
45
+ setActive(index: number): void;
46
+ }
47
+
48
+ interface AccordionInstance {
49
+ toggle(item: HTMLElement): void;
50
+ openAll(): void;
51
+ closeAll(): void;
52
+ }
53
+
54
+ interface PaginationInstance {
55
+ goTo(page: number): void;
56
+ render(): void;
57
+ }
58
+
59
+ interface CommandPaletteInstance {
60
+ open(): void;
61
+ close(): void;
62
+ setItems(items: CommandPaletteItem[]): void;
63
+ }
64
+
65
+ interface SearchInstance {
66
+ setItems(items: SearchItem[]): void;
67
+ filter(query: string): SearchItem[];
68
+ open(): void;
69
+ close(): void;
70
+ }
71
+
72
+ interface ToastStatic {
73
+ show(options: ToastOptions): void;
74
+ success(message: string): void;
75
+ error(message: string): void;
76
+ warning(message: string): void;
77
+ info(message: string): void;
78
+ }
79
+
80
+ interface NavStatic {
81
+ init(): void;
82
+ }
83
+
84
+ interface CronixUIStatic {
85
+ init(): void;
86
+ $(selector: string): HTMLElement | null;
87
+ $$(selector: string): NodeListOf<HTMLElement>;
88
+ createEl(tag: string, className?: string, attrs?: Record<string, string>): HTMLElement;
89
+ Toast: ToastStatic;
90
+ Nav: NavStatic;
91
+ Toggle: new (element: HTMLElement) => ToggleInstance;
92
+ Modal: new (element: HTMLElement) => ModalInstance;
93
+ Dropdown: new (element: HTMLElement) => DropdownInstance;
94
+ Tabs: new (element: HTMLElement) => TabsInstance;
95
+ Accordion: new (element: HTMLElement) => AccordionInstance;
96
+ Pagination: new (element: HTMLElement, options: PaginationOptions) => PaginationInstance;
97
+ CommandPalette: new (element: HTMLElement) => CommandPaletteInstance;
98
+ Search: new (element: HTMLElement) => SearchInstance;
99
+ }
100
+ }
101
+
102
+ declare const CronixUI: CronixUI.CronixUIStatic;
103
+ export default CronixUI;