@js-empire/emperor-ui 1.2.3 → 1.2.5
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/.cursor/rules/code-conventions.mdc +50 -0
- package/README.md +222 -31
- package/dist/emperor-ui.js +119 -71
- package/dist/emperor-ui.umd.cjs +27 -13
- package/dist/globals.css +1 -1
- package/dist/index-BXtdEByK.js +5 -0
- package/dist/index-CDB93OLO.js +55965 -0
- package/dist/index-CYORMghp.js +290 -0
- package/dist/index.d.ts +334 -33
- package/dist/src-UW24ZMRV-C1Pn8-w8.js +5 -0
- package/package.json +32 -2
- package/src/animations/blink.ts +26 -0
- package/src/animations/floating.ts +12 -0
- package/src/animations/index.ts +2 -0
- package/src/components/atoms/brand/brand.tsx +1 -1
- package/src/components/atoms/color-picker/color-picker.tsx +13 -0
- package/src/components/atoms/color-picker/free-color-picker.tsx +60 -0
- package/src/components/atoms/color-picker/index.ts +3 -0
- package/src/components/atoms/color-picker/preset-color-picker.tsx +64 -0
- package/src/components/atoms/color-picker/stories/color-picker.stories.tsx +49 -0
- package/src/components/atoms/color-picker/styles/color-picker.css +23 -0
- package/src/components/atoms/copy-button/copy-button.tsx +73 -0
- package/src/components/atoms/copy-button/index.ts +1 -0
- package/src/components/atoms/copy-button/stories/copy-button.stories.tsx +21 -0
- package/src/components/atoms/field/field.stories.tsx +27 -0
- package/src/components/atoms/field/field.tsx +11 -0
- package/src/components/atoms/field/index.ts +1 -0
- package/src/components/atoms/field/styles/classes.ts +9 -0
- package/src/components/atoms/field/styles/index.ts +1 -0
- package/src/components/atoms/filter/filter.tsx +92 -0
- package/src/components/atoms/filter/index.ts +3 -0
- package/src/components/atoms/filter/stories/filter.stories.tsx +97 -0
- package/src/components/atoms/filter/styles/classes.ts +20 -0
- package/src/components/atoms/filter/styles/index.ts +1 -0
- package/src/components/atoms/filter/units/autocomplete-filter.tsx +39 -0
- package/src/components/atoms/filter/units/checkbox-filter.tsx +32 -0
- package/src/components/atoms/filter/units/checkbox-group-filter.tsx +37 -0
- package/src/components/atoms/filter/units/date-filter.tsx +50 -0
- package/src/components/atoms/filter/units/index.ts +9 -0
- package/src/components/atoms/filter/units/numeric-filter.tsx +36 -0
- package/src/components/atoms/filter/units/range-filter.tsx +36 -0
- package/src/components/atoms/filter/units/search-filter.tsx +52 -0
- package/src/components/atoms/filter/units/select-filter.tsx +49 -0
- package/src/components/atoms/filter/units/switch-filter.tsx +33 -0
- package/src/components/atoms/index.ts +5 -0
- package/src/components/atoms/theme-switch/index.ts +1 -0
- package/src/components/atoms/theme-switch/styles/classes.ts +16 -0
- package/src/components/atoms/theme-switch/styles/index.ts +1 -0
- package/src/components/atoms/theme-switch/theme-switch.stories.tsx +26 -0
- package/src/components/atoms/theme-switch/theme-switch.tsx +54 -0
- package/src/components/atoms/uploader/avatar-label.tsx +3 -1
- package/src/components/atoms/uploader/stories/uploader.stories.tsx +1 -1
- package/src/components/atoms/uploader/upload-file-error-box.tsx +1 -1
- package/src/components/atoms/uploader/upload-file-input.tsx +1 -1
- package/src/components/atoms/uploader/upload-file-label.tsx +2 -1
- package/src/components/atoms/uploader/upload-file-listing.tsx +2 -1
- package/src/components/atoms/uploader/view-image-modal.tsx +2 -1
- package/src/components/molecules/index.ts +0 -1
- package/src/components/molecules/item-card/index.ts +6 -0
- package/src/components/molecules/item-card/item-actions-dropdown.tsx +57 -0
- package/src/components/molecules/item-card/item-banner.tsx +22 -0
- package/src/components/molecules/item-card/item-card-body.tsx +68 -0
- package/src/components/molecules/item-card/item-card-footer.tsx +55 -0
- package/src/components/molecules/item-card/item-card-header.tsx +61 -0
- package/src/components/molecules/item-card/item-card.tsx +83 -3
- package/src/components/molecules/item-card/loading-item.tsx +88 -0
- package/src/components/molecules/item-card/stories/item-card.stories.tsx +182 -0
- package/src/components/molecules/item-card/styles/classes.ts +138 -0
- package/src/components/molecules/item-card/styles/index.ts +1 -0
- package/src/components/molecules/nav-bar/sub-items-box.tsx +2 -1
- package/src/components/molecules/scaffold/index.ts +1 -0
- package/src/components/molecules/scaffold/scaffold.tsx +4 -17
- package/src/components/molecules/scaffold/styles/index.ts +1 -0
- package/src/components/molecules/scaffold/styles/scaffold-classes.ts +10 -0
- package/src/components/molecules/side-bar/compact-side-bar.tsx +3 -1
- package/src/components/molecules/side-bar/side-bar-drawer.tsx +6 -17
- package/src/components/molecules/side-bar/side-bar.stories.tsx +1 -1
- package/src/components/organisms/filters/filters.stories.tsx +32 -0
- package/src/components/organisms/filters/filters.tsx +36 -0
- package/src/components/organisms/filters/index.ts +1 -0
- package/src/components/organisms/filters/styles/classes.ts +9 -0
- package/src/components/organisms/filters/styles/index.ts +1 -0
- package/src/components/organisms/footer/copy-rights-box.tsx +1 -1
- package/src/components/organisms/footer/footer.tsx +1 -1
- package/src/components/organisms/footer/policies-box.tsx +2 -1
- package/src/components/organisms/footer/quick-links-box.tsx +2 -1
- package/src/components/organisms/footer/social-links-box.tsx +2 -1
- package/src/components/organisms/footer/stories/footer.stories.tsx +1 -1
- package/src/components/organisms/header/header.tsx +1 -8
- package/src/components/organisms/index.ts +1 -0
- package/src/components/organisms/listings/empty-listings.tsx +80 -0
- package/src/components/organisms/listings/index.ts +2 -0
- package/src/components/organisms/listings/listings.tsx +90 -9
- package/src/components/organisms/listings/stories/grid-listings.stories.tsx +153 -0
- package/src/components/organisms/listings/stories/list-listings.stories.tsx +171 -0
- package/src/components/organisms/listings/styles/classes.ts +41 -3
- package/src/constants/animations.ts +14 -0
- package/src/constants/card.tsx +26 -0
- package/src/constants/defaults.ts +1 -16
- package/src/constants/index.ts +2 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/use-filters.ts +20 -0
- package/src/hooks/use-search-params-handler.tsx +186 -0
- package/src/hooks/use-uploader.tsx +1 -1
- package/src/hooks/use-window-size.tsx +53 -0
- package/src/i18n/locales/atoms/ar.ts +3 -0
- package/src/i18n/locales/atoms/en.ts +3 -0
- package/src/i18n/locales/organisms/ar.ts +7 -1
- package/src/i18n/locales/organisms/en.ts +7 -1
- package/src/mocks/constants.ts +103 -0
- package/src/mocks/index.ts +2 -0
- package/src/mocks/listings.tsx +154 -0
- package/src/mocks/types.ts +64 -0
- package/src/providers/config-provider.tsx +0 -8
- package/src/providers/emperor-ui-provider.tsx +16 -5
- package/src/providers/index.ts +1 -0
- package/src/providers/theme-provider.tsx +16 -0
- package/src/providers/uploader-provider.tsx +1 -1
- package/src/styles/hero.ts +1 -1
- package/src/styles/index.css +23 -0
- package/src/types/components/atoms/color-picker/color-picker.ts +12 -0
- package/src/types/components/atoms/color-picker/index.ts +1 -0
- package/src/types/components/atoms/field/field.ts +9 -0
- package/src/types/components/atoms/field/index.ts +1 -0
- package/src/types/components/atoms/filter/filter.ts +43 -0
- package/src/types/components/atoms/filter/index.ts +2 -0
- package/src/types/components/atoms/filter/select-filter.ts +8 -0
- package/src/types/components/atoms/index.ts +3 -0
- package/src/types/components/atoms/uploader.ts +1 -1
- package/src/types/components/index.ts +1 -0
- package/src/types/components/molecules/index.ts +1 -1
- package/src/types/components/molecules/item-card/item-card.ts +50 -0
- package/src/types/components/molecules/listings/listings.ts +21 -5
- package/src/types/components/molecules/side-bar/side-bar.ts +1 -1
- package/src/types/components/molecules/theme-switch/index.ts +1 -0
- package/src/types/components/molecules/theme-switch/theme-switch.ts +9 -0
- package/src/types/components/organisms/filters/filters.ts +11 -0
- package/src/types/components/organisms/filters/index.ts +1 -0
- package/src/types/components/organisms/index.ts +1 -0
- package/src/types/context/config.ts +3 -4
- package/src/types/context/index.ts +0 -1
- package/src/types/context/localization.ts +1 -0
- package/src/types/shared/components.ts +3 -0
- package/src/utils/uploader.ts +1 -1
- package/dist/features-animation-w9dWMd15.js +0 -1938
- package/dist/index-BY47HgaP.js +0 -26533
- package/dist/index-CN4cJ1N7.js +0 -1630
- package/dist/index-Cr1mc-d4.js +0 -5
- package/dist/src-UW24ZMRV-nsR4cpiy.js +0 -5
- package/src/components/molecules/filter/filter.tsx +0 -6
- package/src/components/molecules/filter/index.ts +0 -1
- package/src/components/organisms/listings/stories/listings.stories.tsx +0 -30
- package/src/main.tsx +0 -3
- package/src/mocks/listings.ts +0 -200
- package/src/types/components/molecules/filter/filter.ts +0 -9
- package/src/types/components/molecules/filter/index.ts +0 -1
- package/src/types/context/theme.ts +0 -17
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-conventions
|
|
3
|
+
description: This rule is for Cursor to follow code conventions we have.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Overview
|
|
7
|
+
|
|
8
|
+
Whenever you write a code, follow these rules:
|
|
9
|
+
|
|
10
|
+
## Conventions
|
|
11
|
+
|
|
12
|
+
Follow all the codebase conventions like how functions and variables are written, where to place everything, ...etc. Follow the SOLID coding principles in all code.
|
|
13
|
+
|
|
14
|
+
## Imports & Exports
|
|
15
|
+
|
|
16
|
+
Every module (or directory) should have an "index.ts" file that exports all the files and sub modules inside it using ('export \* from "./file-or-dir-name";'), where every file should export all its functions and variables to be exported. Never use relative imports but rather use the absolute ones for better readability and easier importation.
|
|
17
|
+
|
|
18
|
+
## Utilities
|
|
19
|
+
|
|
20
|
+
All types, constants, enums, hooks, utility functions, and configs should be defined in their relative packages or modules. Utility functions should always have a short description (function annotation or documentation) that summarizes what is does and what it needs.
|
|
21
|
+
|
|
22
|
+
## Complexity
|
|
23
|
+
|
|
24
|
+
Try to always find the easiest, simplest, and most efficient solution with the least amount of code rather than the most complex one.
|
|
25
|
+
|
|
26
|
+
## File Size
|
|
27
|
+
|
|
28
|
+
Every file should never be more than 300 lines of code. Whenever a code exceeds 250 to 300 lines, try to optimize it or split it into multiple files following the codebase conventions.
|
|
29
|
+
|
|
30
|
+
## Single Responsibility
|
|
31
|
+
|
|
32
|
+
Each function should only have one purpose and each component file should only exports one component.
|
|
33
|
+
|
|
34
|
+
## Naming
|
|
35
|
+
|
|
36
|
+
The exported component must have the same name as its file's name. Follow these rules for naming:
|
|
37
|
+
|
|
38
|
+
- Files: kebab-case
|
|
39
|
+
- Directories: kebab-case
|
|
40
|
+
- Types & Interfaces: PascalCase
|
|
41
|
+
- Constants: PascalCase
|
|
42
|
+
- Hooks: useCamelCase
|
|
43
|
+
- Pages and Layouts' Components: PascalCase
|
|
44
|
+
- Enums:
|
|
45
|
+
- Enum name: PascalCase
|
|
46
|
+
- Enum key: UPPER_SNAKE_CASE
|
|
47
|
+
|
|
48
|
+
## Parameters
|
|
49
|
+
|
|
50
|
+
All parameters across the project should be implemented as one object that has the parameters in it so we can modify them easily in the future, like this: `({ param1, param2 = false }:{ param1: string, param2?: boolean })`. Never define them as multiple parameters like this: `(param1: string, param2?: boolean)`. That applies to functions, arrow functions, components, hooks, and anything takes parameters.
|
package/README.md
CHANGED
|
@@ -1,47 +1,238 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./public/images/emperor-ui-logo.png" alt="Emperor UI Logo" width="120" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Emperor UI</h1>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>They provide the atoms, we provide the empire.</strong>
|
|
9
|
+
</p>
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@js-empire/emperor-ui">
|
|
13
|
+
<img src="https://img.shields.io/npm/v/@js-empire/emperor-ui.svg" alt="npm version" />
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/MustafaHasanat/emperor-ui/blob/main/package.json">
|
|
16
|
+
<img src="https://img.shields.io/npm/l/@js-empire/emperor-ui" alt="license" />
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Introduction
|
|
23
|
+
|
|
24
|
+
**Emperor UI** is a modular React component library built for modern web applications. It sits on top of [HeroUI](https://www.heroui.com/) to deliver ready-made organisms and page-level building blocks—so you can ship features faster without rebuilding common patterns from scratch.
|
|
25
|
+
|
|
26
|
+
Every component is designed with full control in mind: optional features can be enabled or disabled via props, and styling is customizable through `className` and `classNames` for fine-grained overrides.
|
|
27
|
+
|
|
28
|
+
Ideal for **React** and **Next.js** projects that use **Tailwind CSS** and HeroUI.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
Install the package from npm:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @js-empire/emperor-ui
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or with yarn:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yarn add @js-empire/emperor-ui
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or with pnpm:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pnpm add @js-empire/emperor-ui
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Peer dependencies
|
|
53
|
+
|
|
54
|
+
Emperor UI depends on **React**, **HeroUI**, **Tailwind CSS**, and related tooling. Ensure your project has compatible versions. For theme switching, **next-themes** is used.
|
|
55
|
+
|
|
56
|
+
### Styles
|
|
57
|
+
|
|
58
|
+
Import the library’s global styles in your app root (e.g. `layout.tsx` or `_app.tsx`):
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import "@js-empire/emperor-ui/globals.css";
|
|
62
|
+
```
|
|
10
63
|
|
|
11
64
|
---
|
|
12
65
|
|
|
13
66
|
## Components
|
|
14
67
|
|
|
15
|
-
|
|
68
|
+
Components are grouped by complexity: **Atoms** (small building blocks), **Molecules** (combinations of atoms), **Organisms** (sections and features), and **Templates** (full page layouts).
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### Atoms
|
|
73
|
+
|
|
74
|
+
| Component | Description |
|
|
75
|
+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| **Brand** | Logo and brand mark for headers and sidebars. |
|
|
77
|
+
| **ColorPicker** | Color selection with preset or free (input) modes. Use `inputType="preset"` for predefined colors. |
|
|
78
|
+
| **Container** | Centered layout wrapper with consistent padding. |
|
|
79
|
+
| **Column** | Flex column layout primitive. |
|
|
80
|
+
| **Row** | Flex row layout primitive. |
|
|
81
|
+
| **CopyButton** | Button that copies a given string to the clipboard and shows copy/success state. Pass `value` to copy. |
|
|
82
|
+
| **Field** | Form field / sorter wrapper. |
|
|
83
|
+
| **Filter** | Single filter unit. Types: `search`, `select`, `autocomplete`, `date`, `numeric`, `checkbox`, `checkboxGroup`, `switch`, `range`. Use with `paramKey` and type-specific props. |
|
|
84
|
+
| **Portal** | Renders children into a DOM node (e.g. modals, tooltips). |
|
|
85
|
+
| **ThemeSwitch** | Toggle between light and dark theme (works with `next-themes`). |
|
|
86
|
+
| **Uploader** | File upload with label, listing, and optional avatar mode. Use with `useUpload` and pass the returned props. |
|
|
87
|
+
|
|
88
|
+
**Example — Theme switch**
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { ThemeSwitch } from "@js-empire/emperor-ui";
|
|
92
|
+
|
|
93
|
+
<ThemeSwitch />;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Example — Copy button**
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
import { CopyButton } from "@js-empire/emperor-ui";
|
|
100
|
+
|
|
101
|
+
<CopyButton value="Text to copy" />;
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Example — Filter**
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
import { Filter } from "@js-empire/emperor-ui";
|
|
108
|
+
|
|
109
|
+
<Filter
|
|
110
|
+
type="search"
|
|
111
|
+
paramKey="q"
|
|
112
|
+
searchProps={{ placeholder: "Search..." }}
|
|
113
|
+
/>;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Example — Uploader**
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
import { Uploader, useUpload } from "@js-empire/emperor-ui";
|
|
16
120
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
121
|
+
const uploadProps = useUpload({
|
|
122
|
+
labelId: "uploaded-file",
|
|
123
|
+
fileTypes: ["image", "pdf"],
|
|
124
|
+
isRequired: true,
|
|
125
|
+
isMulti: true,
|
|
126
|
+
});
|
|
22
127
|
|
|
23
|
-
|
|
128
|
+
<Uploader {...uploadProps} />;
|
|
129
|
+
```
|
|
24
130
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Molecules
|
|
134
|
+
|
|
135
|
+
| Component | Description |
|
|
136
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
137
|
+
| **ItemCard** | Card for list/grid items: header, body, footer, optional actions and hover effects. Supports vertical/horizontal orientation. |
|
|
138
|
+
| **NavBar** | Horizontal navigation with items and optional hover effects. |
|
|
139
|
+
| **Scaffold** | Main content wrapper; respects Emperor UI config (e.g. `dir` for RTL). |
|
|
140
|
+
| **SideBar** | Collapsible sidebar with drawer on mobile; use with header, items, and trigger. |
|
|
141
|
+
|
|
142
|
+
**Example — Item card**
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
import { ItemCard } from "@js-empire/emperor-ui";
|
|
146
|
+
|
|
147
|
+
<ItemCard
|
|
148
|
+
item={{ key: "1", title: "Item", subtitle: "Description" }}
|
|
149
|
+
orientation="vertical"
|
|
150
|
+
actions={[{ key: "edit", label: "Edit" }]}
|
|
151
|
+
onActionClick={(key) => console.log(key)}
|
|
152
|
+
/>;
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Example — Scaffold**
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
import { Scaffold } from "@js-empire/emperor-ui";
|
|
159
|
+
|
|
160
|
+
<Scaffold>
|
|
161
|
+
<YourPageContent />
|
|
162
|
+
</Scaffold>;
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### Organisms
|
|
168
|
+
|
|
169
|
+
| Component | Description |
|
|
170
|
+
| --------------- | ----------------------------------------------------------------------------------------------- |
|
|
171
|
+
| **Filters** | Container for multiple `Filter` components. Children must be `Filter` only. |
|
|
172
|
+
| **Footer** | Site footer with quick links, social links, policies, and copyright. |
|
|
173
|
+
| **Header** | App header with sidebar (drawer on mobile), nav bar, and optional glass effect. |
|
|
174
|
+
| **ItemDetails** | Details view block (e.g. breadcrumbs, media, title, price). |
|
|
175
|
+
| **Listings** | Grid or list of items with `ItemCard`, loading skeletons, empty state, and optional pagination. |
|
|
176
|
+
|
|
177
|
+
**Example — Filters**
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
import { Filters, Filter } from "@js-empire/emperor-ui";
|
|
181
|
+
|
|
182
|
+
<Filters>
|
|
183
|
+
<Filter type="search" paramKey="q" />
|
|
184
|
+
<Filter type="select" paramKey="category" options={[...]} />
|
|
185
|
+
</Filters>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Example — Listings**
|
|
29
189
|
|
|
30
|
-
|
|
190
|
+
```tsx
|
|
191
|
+
import { Listings } from "@js-empire/emperor-ui";
|
|
31
192
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
193
|
+
<Listings
|
|
194
|
+
items={items}
|
|
195
|
+
layout="grid"
|
|
196
|
+
isLoading={isLoading}
|
|
197
|
+
pagination={{ page: 1, total: 10, pageSize: 12 }}
|
|
198
|
+
/>;
|
|
199
|
+
```
|
|
38
200
|
|
|
39
|
-
|
|
201
|
+
**Example — Header**
|
|
202
|
+
|
|
203
|
+
```tsx
|
|
204
|
+
import { Header } from "@js-empire/emperor-ui";
|
|
205
|
+
|
|
206
|
+
<Header variant="default" glassEffect />;
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### Templates
|
|
212
|
+
|
|
213
|
+
| Component | Description |
|
|
214
|
+
| --------------- | --------------------------------------------------------------- |
|
|
215
|
+
| **LandingPage** | Full landing page layout composing header, content, and footer. |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Documentation & development
|
|
220
|
+
|
|
221
|
+
- **Storybook** — Run `npm run storybook` to browse and test components locally.
|
|
222
|
+
- **Issues** — [GitHub Issues](https://github.com/MustafaHasanat/emperor-ui/issues)
|
|
223
|
+
- **Repository** — [GitHub](https://github.com/MustafaHasanat/emperor-ui)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Author
|
|
228
|
+
|
|
229
|
+
**JS Empire — Mustafa Alhasanat**
|
|
230
|
+
|
|
231
|
+
- [GitHub](https://github.com/MustafaHasanat)
|
|
232
|
+
- [npm](https://www.npmjs.com/~js-empire)
|
|
233
|
+
|
|
234
|
+
---
|
|
40
235
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- checkbox
|
|
45
|
-
- Multiple checkboxes under an accordion
|
|
46
|
-
- autocomplete or select box
|
|
47
|
-
- Action buttons: apply filters, reset filters
|
|
236
|
+
<p align="center">
|
|
237
|
+
<sub>Built with React, HeroUI, and Tailwind.</sub>
|
|
238
|
+
</p>
|
package/dist/emperor-ui.js
CHANGED
|
@@ -1,75 +1,123 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dB as s, dC as i, dD as o, dE as r, dF as t, dG as l, dH as d, dI as E, dJ as C, dK as I, dL as _, dM as n, dN as S, dO as f, dP as M, dQ as p, dR as T, dS as c, dT as g, dU as O, dV as m, dW as F, dX as L, dY as A, dZ as P, d_ as R, d$ as K, e0 as U, e1 as B, e2 as D, e3 as N, e4 as u, e5 as x, e6 as k, e7 as v, e8 as h, e9 as y, ea as G, eb as H, ec as W, ed as b, ee as w, ef as V, eg as Y, eh as q, ei as z, ej as Q, ek as j, el as J, em as X, en as Z, eo as $, ep as ee, eq as ae, er as se, es as ie, et as oe, eu as re, ev as te, ew as le, ex as de, ey as Ee, ez as Ce, eA as Ie, eB as _e, eC as ne, eD as Se, eE as fe, eF as Me, eG as pe, eH as Te, eI as ce, eJ as ge, eK as Oe, eL as me, eM as Fe, eN as Le, eO as Ae, eP as Pe, eQ as Re, eR as Ke, eS as Ue, eT as Be, eU as De, eV as Ne, eW as ue, eX as xe, eY as ke, eZ as ve, e_ as he, e$ as ye, f0 as Ge, f1 as He, f2 as We, f3 as be, f4 as we, f5 as Ve, f6 as Ye, f7 as qe, f8 as ze, f9 as Qe, fa as je, fb as Je, fc as Xe, fd as Ze, fe as $e, ff as ea, fg as aa, fh as sa, fi as ia, fj as oa, fk as ra, fl as ta, fm as la, fn as da, fo as Ea, fp as Ca, fq as Ia, fr as _a, fs as na } from "./index-CDB93OLO.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
s as ALLOWED_DOC_TYPES,
|
|
4
|
+
i as ALLOWED_IMAGES_TYPES,
|
|
5
5
|
o as ALLOWED_PDF_TYPES,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
l as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
r as AutocompleteFilter,
|
|
7
|
+
t as AvatarLabel,
|
|
8
|
+
l as Brand,
|
|
9
|
+
d as CheckboxFilter,
|
|
10
|
+
E as CheckboxGroupFilter,
|
|
11
|
+
C as ColorPicker,
|
|
12
|
+
I as Column,
|
|
13
|
+
_ as ConfigProvider,
|
|
14
|
+
n as Container,
|
|
15
|
+
S as CopyButton,
|
|
16
|
+
f as CopyRightsBox,
|
|
17
|
+
M as DateFilter,
|
|
12
18
|
p as EmperorUIContext,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
v as
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
19
|
+
T as EmperorUIProvider,
|
|
20
|
+
c as EmptyListings,
|
|
21
|
+
g as FAKE_PARAGRAPH,
|
|
22
|
+
O as FAKE_SENTENCE,
|
|
23
|
+
m as Field,
|
|
24
|
+
F as Filter,
|
|
25
|
+
L as Filters,
|
|
26
|
+
A as Footer,
|
|
27
|
+
P as FreeColorPicker,
|
|
28
|
+
R as Header,
|
|
29
|
+
K as ITEM_CARD_ACTIONS,
|
|
30
|
+
U as ItemActionsDropdown,
|
|
31
|
+
B as ItemBanner,
|
|
32
|
+
D as ItemCard,
|
|
33
|
+
N as ItemCardBody,
|
|
34
|
+
u as ItemCardFooter,
|
|
35
|
+
x as ItemCardHeader,
|
|
36
|
+
k as ItemDetails,
|
|
37
|
+
v as LandingPage,
|
|
38
|
+
h as Listings,
|
|
39
|
+
y as LoadingItem,
|
|
40
|
+
G as MOCK_BASE_DATE,
|
|
41
|
+
H as MOCK_COLORS,
|
|
42
|
+
W as MOCK_HEADER_ACTIONS,
|
|
43
|
+
b as MOCK_HEADER_ITEMS,
|
|
44
|
+
w as MOCK_HEADER_ITEMS_WITH_SUB_ITEMS,
|
|
45
|
+
V as MOCK_HEADER_SUB_ITEMS,
|
|
46
|
+
Y as MOCK_ITEM_BRANDS,
|
|
47
|
+
q as MOCK_ITEM_CATEGORIES,
|
|
48
|
+
z as MOCK_ITEM_REVIEWS_1,
|
|
49
|
+
Q as MOCK_ITEM_REVIEWS_2,
|
|
50
|
+
j as MOCK_ITEM_REVIEWS_3,
|
|
51
|
+
J as MOCK_LISTINGS,
|
|
52
|
+
X as MOCK_LISTING_DESCRIPTIONS,
|
|
53
|
+
Z as MOCK_LISTING_IMAGES,
|
|
54
|
+
$ as MOCK_LISTING_TITLES,
|
|
55
|
+
ee as MOCK_REVIEW_AUTHORS,
|
|
56
|
+
ae as MOCK_REVIEW_COMMENTS,
|
|
57
|
+
se as NavBar,
|
|
58
|
+
ie as NavBarItem,
|
|
59
|
+
oe as NavigationContext,
|
|
60
|
+
re as NavigationProvider,
|
|
61
|
+
te as NumericFilter,
|
|
62
|
+
le as ONE_MEGABYTE,
|
|
63
|
+
de as Placeholders,
|
|
64
|
+
Ee as PoliciesBox,
|
|
65
|
+
Ce as Portal,
|
|
66
|
+
Ie as PreservedKeys,
|
|
67
|
+
_e as PresetColorPicker,
|
|
68
|
+
ne as QuickLinksBox,
|
|
69
|
+
Se as RangeFilter,
|
|
70
|
+
fe as Row,
|
|
71
|
+
Me as Scaffold,
|
|
72
|
+
pe as SearchFilter,
|
|
73
|
+
Te as SelectFilter,
|
|
74
|
+
ce as SideBar,
|
|
75
|
+
ge as SocialLinksBox,
|
|
76
|
+
Oe as SubItemsBox,
|
|
77
|
+
me as SwitchFilter,
|
|
78
|
+
Fe as ThemeProvider,
|
|
79
|
+
Le as ThemeSwitch,
|
|
80
|
+
Ae as UploadFileErrorBox,
|
|
81
|
+
Pe as UploadFileInput,
|
|
82
|
+
Re as UploadFileLabel,
|
|
83
|
+
Ke as UploadFileListing,
|
|
84
|
+
Ue as Uploader,
|
|
85
|
+
Be as UploaderContext,
|
|
86
|
+
De as UploaderProvider,
|
|
87
|
+
Ne as UploaderTitle,
|
|
88
|
+
ue as ViewImageModal,
|
|
89
|
+
xe as cn,
|
|
90
|
+
ke as compressImage,
|
|
91
|
+
ve as contacts,
|
|
92
|
+
he as copyRights,
|
|
93
|
+
ye as defaultEmperorUIConfig,
|
|
94
|
+
Ge as emptyListingsClasses,
|
|
95
|
+
He as fileTypesMapping,
|
|
96
|
+
We as filterClasses,
|
|
97
|
+
be as getAllowedTypes,
|
|
98
|
+
we as getCardMotion,
|
|
99
|
+
Ve as getListing,
|
|
100
|
+
Ye as getListings,
|
|
101
|
+
qe as getStorybookDecorators,
|
|
102
|
+
ze as isFileDuplicated,
|
|
103
|
+
Qe as isMaxFileSizeExceeded,
|
|
104
|
+
je as listingsClasses,
|
|
105
|
+
Je as listingsItemClasses,
|
|
106
|
+
Xe as listingsPaginationClasses,
|
|
107
|
+
Ze as listingsStyles,
|
|
108
|
+
$e as mapFileType,
|
|
109
|
+
ea as mergeLocales,
|
|
110
|
+
aa as policies,
|
|
111
|
+
sa as quickLinks,
|
|
112
|
+
ia as refineUploadedFiles,
|
|
113
|
+
oa as scaffoldClasses,
|
|
114
|
+
ra as socialLinks,
|
|
115
|
+
ta as useEmperorUI,
|
|
116
|
+
la as useFilters,
|
|
117
|
+
da as useNavigation,
|
|
118
|
+
Ea as useSearchParamsHandler,
|
|
119
|
+
Ca as useUploader,
|
|
120
|
+
Ia as useUploaderContext,
|
|
121
|
+
_a as useWindowSize,
|
|
122
|
+
na as validateUploadedFiles
|
|
75
123
|
};
|