@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.
Files changed (54) hide show
  1. package/dist/index.d.ts +200 -0
  2. package/package.json +4 -1
  3. package/vite.config.ts +1 -1
  4. package/dist/src/components/filter/filter.d.ts +0 -3
  5. package/dist/src/components/filter/index.d.ts +0 -1
  6. package/dist/src/components/footer/footer.d.ts +0 -3
  7. package/dist/src/components/footer/index.d.ts +0 -1
  8. package/dist/src/components/header/header.d.ts +0 -9
  9. package/dist/src/components/header/index.d.ts +0 -1
  10. package/dist/src/components/index.d.ts +0 -8
  11. package/dist/src/components/item-card/index.d.ts +0 -1
  12. package/dist/src/components/item-card/item-card.d.ts +0 -3
  13. package/dist/src/components/item-details/index.d.ts +0 -1
  14. package/dist/src/components/item-details/item-details.d.ts +0 -3
  15. package/dist/src/components/listings/index.d.ts +0 -1
  16. package/dist/src/components/listings/listings.d.ts +0 -3
  17. package/dist/src/components/nav-bar/index.d.ts +0 -1
  18. package/dist/src/components/nav-bar/nav-bar.d.ts +0 -3
  19. package/dist/src/components/scaffold/index.d.ts +0 -1
  20. package/dist/src/components/scaffold/scaffold.d.ts +0 -3
  21. package/dist/src/constants/defaults.d.ts +0 -4
  22. package/dist/src/constants/index.d.ts +0 -1
  23. package/dist/src/context/emperor-ui-context.d.ts +0 -3
  24. package/dist/src/context/index.d.ts +0 -1
  25. package/dist/src/examples/index.d.ts +0 -1
  26. package/dist/src/hooks/index.d.ts +0 -1
  27. package/dist/src/hooks/use-emperor-ui.d.ts +0 -1
  28. package/dist/src/index.d.ts +0 -8
  29. package/dist/src/providers/emperor-ui-provider.d.ts +0 -3
  30. package/dist/src/providers/index.d.ts +0 -1
  31. package/dist/src/types/components/filter/filter.d.ts +0 -8
  32. package/dist/src/types/components/filter/index.d.ts +0 -1
  33. package/dist/src/types/components/footer/footer.d.ts +0 -8
  34. package/dist/src/types/components/footer/index.d.ts +0 -1
  35. package/dist/src/types/components/header/header.d.ts +0 -19
  36. package/dist/src/types/components/header/index.d.ts +0 -1
  37. package/dist/src/types/components/index.d.ts +0 -8
  38. package/dist/src/types/components/item-card/index.d.ts +0 -1
  39. package/dist/src/types/components/item-card/item-card.d.ts +0 -8
  40. package/dist/src/types/components/item-details/index.d.ts +0 -1
  41. package/dist/src/types/components/item-details/item-details.d.ts +0 -8
  42. package/dist/src/types/components/listings/index.d.ts +0 -1
  43. package/dist/src/types/components/listings/listings.d.ts +0 -8
  44. package/dist/src/types/components/nav-bar/index.d.ts +0 -1
  45. package/dist/src/types/components/nav-bar/nav-bar.d.ts +0 -8
  46. package/dist/src/types/components/scaffold/index.d.ts +0 -1
  47. package/dist/src/types/components/scaffold/scaffold.d.ts +0 -8
  48. package/dist/src/types/context/emperor-ui.d.ts +0 -31
  49. package/dist/src/types/context/index.d.ts +0 -1
  50. package/dist/src/types/index.d.ts +0 -3
  51. package/dist/src/types/shared/components.d.ts +0 -6
  52. package/dist/src/types/shared/index.d.ts +0 -1
  53. package/dist/src/utils/cn.d.ts +0 -3
  54. package/dist/src/utils/index.d.ts +0 -1
@@ -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.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
@@ -14,7 +14,7 @@ export default defineConfig({
14
14
  dts({
15
15
  include: ["src/**/*.ts", "src/**/*.tsx"],
16
16
  exclude: ["src/**/*.test.ts", "src/**/*.test.tsx"],
17
- rollupTypes: false,
17
+ rollupTypes: true,
18
18
  tsconfigPath: "./tsconfig.app.json",
19
19
  }),
20
20
  ],
@@ -1,3 +0,0 @@
1
- import { FilterProps } from '../../types';
2
-
3
- export declare function Filter({ className }: FilterProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './filter';
@@ -1,3 +0,0 @@
1
- import { ItemCardProps } from 'src';
2
-
3
- export declare function ItemCard({ className }: ItemCardProps): import("react/jsx-runtime").JSX.Element;
@@ -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,8 +0,0 @@
1
- export * from './filter';
2
- export * from './footer';
3
- export * from './header';
4
- export * from './item-card';
5
- export * from './item-details';
6
- export * from './listings';
7
- export * from './nav-bar';
8
- export * from './scaffold';
@@ -1 +0,0 @@
1
- export * from './item-card';
@@ -1,3 +0,0 @@
1
- import { FooterProps } from '../../types';
2
-
3
- export declare function Footer({ className }: FooterProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './item-details';
@@ -1,3 +0,0 @@
1
- import { ItemDetailsProps } from 'src';
2
-
3
- export declare function ItemDetails({ className }: ItemDetailsProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './listings';
@@ -1,3 +0,0 @@
1
- import { ListingsProps } from 'src';
2
-
3
- export declare function Listings({ className }: ListingsProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './nav-bar';
@@ -1,3 +0,0 @@
1
- import { NavBarProps } from 'src';
2
-
3
- export declare function NavBar({ className }: NavBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './scaffold';
@@ -1,3 +0,0 @@
1
- import { ScaffoldProps } from '../../types';
2
-
3
- export declare function Scaffold({ className, children }: ScaffoldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { ColorsPalette, EmperorUIConfig } from '../types';
2
-
3
- export declare const defaultColorsPalette: ColorsPalette;
4
- export declare const defaultEmperorUIConfig: EmperorUIConfig;
@@ -1 +0,0 @@
1
- export * from './defaults';
@@ -1,3 +0,0 @@
1
- import { EmperorUIContextState } from '../types';
2
-
3
- export declare const EmperorUIContext: import('react').Context<EmperorUIContextState | undefined>;
@@ -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;
@@ -1,8 +0,0 @@
1
- export * from './components';
2
- export type * from './types';
3
- export * from './utils';
4
- export * from './providers';
5
- export * from './context';
6
- export * from './hooks';
7
- export * from './constants';
8
- export * from './examples';
@@ -1,3 +0,0 @@
1
- import { EmperorUIProviderProps } from '../types';
2
-
3
- export declare function EmperorUIProvider({ children, config, }: EmperorUIProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './emperor-ui-provider';
@@ -1,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type FilterClassnames = {
4
- base?: string;
5
- };
6
- export type FilterProps = SharedComponentProps & {
7
- classNames?: FilterClassnames;
8
- };
@@ -1 +0,0 @@
1
- export type * from './filter';
@@ -1,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type FooterClassnames = {
4
- base?: string;
5
- };
6
- export type FooterProps = SharedComponentProps & {
7
- classNames?: FooterClassnames;
8
- };
@@ -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,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type ItemCardClassnames = {
4
- base?: string;
5
- };
6
- export type ItemCardProps = SharedComponentProps & {
7
- classNames?: ItemCardClassnames;
8
- };
@@ -1 +0,0 @@
1
- export type * from './item-details';
@@ -1,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type ItemDetailsClassnames = {
4
- base?: string;
5
- };
6
- export type ItemDetailsProps = SharedComponentProps & {
7
- classNames?: ItemDetailsClassnames;
8
- };
@@ -1 +0,0 @@
1
- export type * from './listings';
@@ -1,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type ListingsClassnames = {
4
- base?: string;
5
- };
6
- export type ListingsProps = SharedComponentProps & {
7
- classNames?: ListingsClassnames;
8
- };
@@ -1 +0,0 @@
1
- export type * from './nav-bar';
@@ -1,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type NavBarClassnames = {
4
- base?: string;
5
- };
6
- export type NavBarProps = SharedComponentProps & {
7
- classNames?: NavBarClassnames;
8
- };
@@ -1 +0,0 @@
1
- export type * from './scaffold';
@@ -1,8 +0,0 @@
1
- import { SharedComponentProps } from '../..';
2
-
3
- export type ScaffoldClassnames = {
4
- base?: string;
5
- };
6
- export type ScaffoldProps = SharedComponentProps & {
7
- classNames?: ScaffoldClassnames;
8
- };
@@ -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,3 +0,0 @@
1
- export type * from './components';
2
- export type * from './shared';
3
- export type * from './context';
@@ -1,6 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export type SharedComponentProps = {
4
- className?: string;
5
- children?: ReactNode;
6
- };
@@ -1 +0,0 @@
1
- export type * from './components';
@@ -1,3 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
-
3
- export declare function cn(...classes: ClassValue[]): string;
@@ -1 +0,0 @@
1
- export * from './cn';