@js-empire/emperor-ui 1.0.0 → 1.0.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/index.d.ts +200 -0
- package/package.json +4 -1
- package/vite.config.ts +1 -1
- package/dist/src/components/filter/filter.d.ts +0 -3
- package/dist/src/components/filter/index.d.ts +0 -1
- package/dist/src/components/footer/footer.d.ts +0 -3
- package/dist/src/components/footer/index.d.ts +0 -1
- package/dist/src/components/header/header.d.ts +0 -9
- package/dist/src/components/header/index.d.ts +0 -1
- package/dist/src/components/index.d.ts +0 -8
- package/dist/src/components/item-card/index.d.ts +0 -1
- package/dist/src/components/item-card/item-card.d.ts +0 -3
- package/dist/src/components/item-details/index.d.ts +0 -1
- package/dist/src/components/item-details/item-details.d.ts +0 -3
- package/dist/src/components/listings/index.d.ts +0 -1
- package/dist/src/components/listings/listings.d.ts +0 -3
- package/dist/src/components/nav-bar/index.d.ts +0 -1
- package/dist/src/components/nav-bar/nav-bar.d.ts +0 -3
- package/dist/src/components/scaffold/index.d.ts +0 -1
- package/dist/src/components/scaffold/scaffold.d.ts +0 -3
- package/dist/src/constants/defaults.d.ts +0 -4
- package/dist/src/constants/index.d.ts +0 -1
- package/dist/src/context/emperor-ui-context.d.ts +0 -3
- package/dist/src/context/index.d.ts +0 -1
- package/dist/src/examples/index.d.ts +0 -1
- package/dist/src/hooks/index.d.ts +0 -1
- package/dist/src/hooks/use-emperor-ui.d.ts +0 -1
- package/dist/src/index.d.ts +0 -8
- package/dist/src/providers/emperor-ui-provider.d.ts +0 -3
- package/dist/src/providers/index.d.ts +0 -1
- package/dist/src/types/components/filter/filter.d.ts +0 -8
- package/dist/src/types/components/filter/index.d.ts +0 -1
- package/dist/src/types/components/footer/footer.d.ts +0 -8
- package/dist/src/types/components/footer/index.d.ts +0 -1
- package/dist/src/types/components/header/header.d.ts +0 -19
- package/dist/src/types/components/header/index.d.ts +0 -1
- package/dist/src/types/components/index.d.ts +0 -8
- package/dist/src/types/components/item-card/index.d.ts +0 -1
- package/dist/src/types/components/item-card/item-card.d.ts +0 -8
- package/dist/src/types/components/item-details/index.d.ts +0 -1
- package/dist/src/types/components/item-details/item-details.d.ts +0 -8
- package/dist/src/types/components/listings/index.d.ts +0 -1
- package/dist/src/types/components/listings/listings.d.ts +0 -8
- package/dist/src/types/components/nav-bar/index.d.ts +0 -1
- package/dist/src/types/components/nav-bar/nav-bar.d.ts +0 -8
- package/dist/src/types/components/scaffold/index.d.ts +0 -1
- package/dist/src/types/components/scaffold/scaffold.d.ts +0 -8
- package/dist/src/types/context/emperor-ui.d.ts +0 -31
- package/dist/src/types/context/index.d.ts +0 -1
- package/dist/src/types/index.d.ts +0 -3
- package/dist/src/types/shared/components.d.ts +0 -6
- package/dist/src/types/shared/index.d.ts +0 -1
- package/dist/src/utils/cn.d.ts +0 -3
- package/dist/src/utils/index.d.ts +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { ClassAttributes } from 'react';
|
|
2
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
+
import { ClassValue } from 'clsx';
|
|
4
|
+
import { Context } from 'react';
|
|
5
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
6
|
+
import { HTMLAttributes } from 'react';
|
|
7
|
+
import { JSX } from 'react/jsx-runtime';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import { RefAttributes } from 'react';
|
|
10
|
+
import { VariantProps } from 'class-variance-authority';
|
|
11
|
+
|
|
12
|
+
export declare function cn(...classes: ClassValue[]): string;
|
|
13
|
+
|
|
14
|
+
export declare type ColorMode = "light" | "dark";
|
|
15
|
+
|
|
16
|
+
export declare type ColorsPalette = {
|
|
17
|
+
primary: string;
|
|
18
|
+
secondary: string;
|
|
19
|
+
success: string;
|
|
20
|
+
danger: string;
|
|
21
|
+
warning: string;
|
|
22
|
+
info: string;
|
|
23
|
+
background: string;
|
|
24
|
+
text: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export declare const defaultColorsPalette: ColorsPalette;
|
|
28
|
+
|
|
29
|
+
export declare const defaultEmperorUIConfig: EmperorUIConfig;
|
|
30
|
+
|
|
31
|
+
export declare type EmperorUIConfig = {
|
|
32
|
+
theme?: Partial<EmperorUITheme>;
|
|
33
|
+
layout?: Partial<EmperorUILayout>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export declare const EmperorUIContext: Context<EmperorUIContextState | undefined>;
|
|
37
|
+
|
|
38
|
+
export declare type EmperorUIContextState = {
|
|
39
|
+
config: EmperorUIConfig;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export declare type EmperorUILayout = {
|
|
43
|
+
withScaffold: boolean;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export declare function EmperorUIProvider({ children, config, }: EmperorUIProviderProps): JSX.Element;
|
|
47
|
+
|
|
48
|
+
export declare type EmperorUIProviderProps = {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
config: EmperorUIConfig;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export declare type EmperorUITheme = {
|
|
54
|
+
mode: ColorMode;
|
|
55
|
+
colors: Partial<ColorsPalette>;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export declare function Filter({ className }: FilterProps): JSX.Element;
|
|
59
|
+
|
|
60
|
+
export declare type FilterClassnames = {
|
|
61
|
+
base?: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export declare type FilterProps = SharedComponentProps & {
|
|
65
|
+
classNames?: FilterClassnames;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare function Footer({ className }: FooterProps): JSX.Element;
|
|
69
|
+
|
|
70
|
+
export declare type FooterClassnames = {
|
|
71
|
+
base?: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export declare type FooterProps = SharedComponentProps & {
|
|
75
|
+
classNames?: FooterClassnames;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export declare const Header: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
79
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
80
|
+
padding?: "sm" | "md" | "lg" | null | undefined;
|
|
81
|
+
} & ClassProp) | undefined) => string> & SharedComponentProps & {
|
|
82
|
+
variant?: "default" | "compact";
|
|
83
|
+
classNames?: HeaderClassnames;
|
|
84
|
+
}, "ref"> & RefAttributes<HTMLElement>>;
|
|
85
|
+
|
|
86
|
+
export declare type HeaderActivations = {
|
|
87
|
+
hideLog?: boolean;
|
|
88
|
+
hideNavbar?: boolean;
|
|
89
|
+
hideUserDropdown?: boolean;
|
|
90
|
+
hideSideMenu?: boolean;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export declare type HeaderClassnames = {
|
|
94
|
+
base?: string;
|
|
95
|
+
logo?: string;
|
|
96
|
+
navbar?: string;
|
|
97
|
+
userDropdown?: string;
|
|
98
|
+
sideMenu?: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export declare type HeaderProps = SharedComponentProps & {
|
|
102
|
+
variant?: "default" | "compact";
|
|
103
|
+
classNames?: HeaderClassnames;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export declare function ItemCard({ className }: ItemCardProps_2): JSX.Element;
|
|
107
|
+
|
|
108
|
+
export declare type ItemCardClassnames = {
|
|
109
|
+
base?: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
declare type ItemCardClassnames_2 = {
|
|
113
|
+
base?: string;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export declare type ItemCardProps = SharedComponentProps & {
|
|
117
|
+
classNames?: ItemCardClassnames;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
declare type ItemCardProps_2 = SharedComponentProps_2 & {
|
|
121
|
+
classNames?: ItemCardClassnames_2;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export declare function ItemDetails({ className }: ItemDetailsProps_2): JSX.Element;
|
|
125
|
+
|
|
126
|
+
export declare type ItemDetailsClassnames = {
|
|
127
|
+
base?: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
declare type ItemDetailsClassnames_2 = {
|
|
131
|
+
base?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export declare type ItemDetailsProps = SharedComponentProps & {
|
|
135
|
+
classNames?: ItemDetailsClassnames;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
declare type ItemDetailsProps_2 = SharedComponentProps_2 & {
|
|
139
|
+
classNames?: ItemDetailsClassnames_2;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export declare function Listings({ className }: ListingsProps_2): JSX.Element;
|
|
143
|
+
|
|
144
|
+
export declare type ListingsClassnames = {
|
|
145
|
+
base?: string;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
declare type ListingsClassnames_2 = {
|
|
149
|
+
base?: string;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export declare type ListingsProps = SharedComponentProps & {
|
|
153
|
+
classNames?: ListingsClassnames;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
declare type ListingsProps_2 = SharedComponentProps_2 & {
|
|
157
|
+
classNames?: ListingsClassnames_2;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export declare function NavBar({ className }: NavBarProps_2): JSX.Element;
|
|
161
|
+
|
|
162
|
+
export declare type NavBarClassnames = {
|
|
163
|
+
base?: string;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare type NavBarClassnames_2 = {
|
|
167
|
+
base?: string;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export declare type NavBarProps = SharedComponentProps & {
|
|
171
|
+
classNames?: NavBarClassnames;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
declare type NavBarProps_2 = SharedComponentProps_2 & {
|
|
175
|
+
classNames?: NavBarClassnames_2;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export declare function Scaffold({ className, children }: ScaffoldProps): JSX.Element;
|
|
179
|
+
|
|
180
|
+
export declare type ScaffoldClassnames = {
|
|
181
|
+
base?: string;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export declare type ScaffoldProps = SharedComponentProps & {
|
|
185
|
+
classNames?: ScaffoldClassnames;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export declare type SharedComponentProps = {
|
|
189
|
+
className?: string;
|
|
190
|
+
children?: ReactNode;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
declare type SharedComponentProps_2 = {
|
|
194
|
+
className?: string;
|
|
195
|
+
children?: ReactNode;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export declare function useEmperorUI(): EmperorUIContextState;
|
|
199
|
+
|
|
200
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@js-empire/emperor-ui",
|
|
3
3
|
"description": "They provide the atoms, we provide the empire.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"author": "JS Empire - Mustafa Alhasanat",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/emperor-ui-umd.cjs",
|
|
9
9
|
"module": "dist/emperor-ui.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
10
11
|
"keywords": [],
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
13
15
|
"import": "./dist/emperor-ui.js",
|
|
14
16
|
"require": "./dist/emperor-ui-umd.cjs"
|
|
15
17
|
}
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"typescript": "~5.9.3",
|
|
75
77
|
"typescript-eslint": "^8.46.4",
|
|
76
78
|
"vite": "^7.2.4",
|
|
79
|
+
"vite-plugin-dts": "^4.5.4",
|
|
77
80
|
"vitest": "^4.0.15"
|
|
78
81
|
},
|
|
79
82
|
"resolutions": {
|
package/vite.config.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './filter';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './footer';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
|
|
3
|
-
export declare const Header: import('react').ForwardRefExoticComponent<Omit<import('react').ClassAttributes<HTMLElement> & import('react').HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
4
|
-
variant?: "primary" | "secondary" | null | undefined;
|
|
5
|
-
padding?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('../../types').SharedComponentProps & {
|
|
7
|
-
variant?: "default" | "compact";
|
|
8
|
-
classNames?: import('../../types').HeaderClassnames;
|
|
9
|
-
}, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './header';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './item-card';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './item-details';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './listings';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './nav-bar';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './scaffold';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './defaults';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './emperor-ui-context';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './use-emperor-ui';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useEmperorUI(): import('..').EmperorUIContextState;
|
package/dist/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './emperor-ui-provider';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './filter';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './footer';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SharedComponentProps } from '../..';
|
|
2
|
-
|
|
3
|
-
export type HeaderClassnames = {
|
|
4
|
-
base?: string;
|
|
5
|
-
logo?: string;
|
|
6
|
-
navbar?: string;
|
|
7
|
-
userDropdown?: string;
|
|
8
|
-
sideMenu?: string;
|
|
9
|
-
};
|
|
10
|
-
export type HeaderActivations = {
|
|
11
|
-
hideLog?: boolean;
|
|
12
|
-
hideNavbar?: boolean;
|
|
13
|
-
hideUserDropdown?: boolean;
|
|
14
|
-
hideSideMenu?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type HeaderProps = SharedComponentProps & {
|
|
17
|
-
variant?: "default" | "compact";
|
|
18
|
-
classNames?: HeaderClassnames;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './header';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type * from './header';
|
|
2
|
-
export type * from './listings';
|
|
3
|
-
export type * from './nav-bar';
|
|
4
|
-
export type * from './scaffold';
|
|
5
|
-
export type * from './filter';
|
|
6
|
-
export type * from './footer';
|
|
7
|
-
export type * from './item-card';
|
|
8
|
-
export type * from './item-details';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './item-card';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './item-details';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './listings';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './nav-bar';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './scaffold';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export type EmperorUIContextState = {
|
|
4
|
-
config: EmperorUIConfig;
|
|
5
|
-
};
|
|
6
|
-
export type EmperorUIProviderProps = {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
config: EmperorUIConfig;
|
|
9
|
-
};
|
|
10
|
-
export type ColorMode = "light" | "dark";
|
|
11
|
-
export type ColorsPalette = {
|
|
12
|
-
primary: string;
|
|
13
|
-
secondary: string;
|
|
14
|
-
success: string;
|
|
15
|
-
danger: string;
|
|
16
|
-
warning: string;
|
|
17
|
-
info: string;
|
|
18
|
-
background: string;
|
|
19
|
-
text: string;
|
|
20
|
-
};
|
|
21
|
-
export type EmperorUITheme = {
|
|
22
|
-
mode: ColorMode;
|
|
23
|
-
colors: Partial<ColorsPalette>;
|
|
24
|
-
};
|
|
25
|
-
export type EmperorUILayout = {
|
|
26
|
-
withScaffold: boolean;
|
|
27
|
-
};
|
|
28
|
-
export type EmperorUIConfig = {
|
|
29
|
-
theme?: Partial<EmperorUITheme>;
|
|
30
|
-
layout?: Partial<EmperorUILayout>;
|
|
31
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './emperor-ui';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './components';
|
package/dist/src/utils/cn.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cn';
|