@js-empire/emperor-ui 1.3.5 → 1.3.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/dist/emperor-ui.js +60624 -157
- package/dist/emperor-ui.umd.cjs +17 -17
- package/dist/index.d.ts +3 -0
- package/package.json +7 -3
- package/.cursor/rules/code-conventions.mdc +0 -50
- package/.husky/pre-commit +0 -4
- package/.prettierrc +0 -10
- package/.storybook/main.ts +0 -24
- package/.storybook/preview.ts +0 -19
- package/.storybook/vitest.setup.ts +0 -7
- package/.vscode/extensions.json +0 -1
- package/dist/index-31cOfB5-.js +0 -290
- package/dist/index-BwRbIPvN.js +0 -60566
- package/dist/index-DOyt37_Z.js +0 -5
- package/dist/src-UW24ZMRV-DMRqgyf4.js +0 -5
- package/eslint.config.js +0 -34
- package/index.html +0 -13
- package/public/icons/emperor-ui-logo.ico +0 -0
- package/public/images/avatar-female.jpg +0 -0
- package/public/images/avatar-male.jpg +0 -0
- package/public/images/emperor-ui-logo.png +0 -0
- package/src/animations/blink.ts +0 -26
- package/src/animations/floating.ts +0 -12
- package/src/animations/index.ts +0 -2
- package/src/components/atoms/brand/brand.stories.tsx +0 -27
- package/src/components/atoms/brand/brand.tsx +0 -56
- package/src/components/atoms/brand/index.ts +0 -1
- package/src/components/atoms/brand/styles/classes.ts +0 -9
- package/src/components/atoms/brand/styles/index.ts +0 -2
- package/src/components/atoms/brand/styles/styles.ts +0 -0
- package/src/components/atoms/color-picker/color-picker.tsx +0 -12
- package/src/components/atoms/color-picker/free-color-picker.tsx +0 -58
- package/src/components/atoms/color-picker/index.ts +0 -3
- package/src/components/atoms/color-picker/preset-color-picker.tsx +0 -66
- package/src/components/atoms/color-picker/stories/color-picker.stories.tsx +0 -63
- package/src/components/atoms/column/column.stories.tsx +0 -37
- package/src/components/atoms/column/column.tsx +0 -21
- package/src/components/atoms/column/index.ts +0 -1
- package/src/components/atoms/container/column.stories.tsx +0 -37
- package/src/components/atoms/container/container.tsx +0 -28
- package/src/components/atoms/container/index.ts +0 -1
- package/src/components/atoms/copy-button/copy-button.tsx +0 -73
- package/src/components/atoms/copy-button/index.ts +0 -1
- package/src/components/atoms/copy-button/stories/copy-button.stories.tsx +0 -21
- package/src/components/atoms/field/field.tsx +0 -81
- package/src/components/atoms/field/index.ts +0 -3
- package/src/components/atoms/field/styles/classes.ts +0 -9
- package/src/components/atoms/field/styles/index.ts +0 -1
- package/src/components/atoms/field/units/autocomplete-field.tsx +0 -49
- package/src/components/atoms/field/units/checkbox-field.tsx +0 -35
- package/src/components/atoms/field/units/index.ts +0 -7
- package/src/components/atoms/field/units/input-field.tsx +0 -35
- package/src/components/atoms/field/units/radio-field.tsx +0 -43
- package/src/components/atoms/field/units/select-field.tsx +0 -50
- package/src/components/atoms/field/units/switch-field.tsx +0 -35
- package/src/components/atoms/field/units/textarea-field.tsx +0 -37
- package/src/components/atoms/filter/filter.tsx +0 -93
- package/src/components/atoms/filter/index.ts +0 -3
- package/src/components/atoms/filter/stories/filter.stories.tsx +0 -238
- package/src/components/atoms/filter/styles/classes.ts +0 -20
- package/src/components/atoms/filter/styles/index.ts +0 -1
- package/src/components/atoms/filter/units/autocomplete-filter.tsx +0 -66
- package/src/components/atoms/filter/units/checkbox-filter.tsx +0 -42
- package/src/components/atoms/filter/units/checkbox-group-filter.tsx +0 -68
- package/src/components/atoms/filter/units/date-filter.tsx +0 -46
- package/src/components/atoms/filter/units/index.ts +0 -9
- package/src/components/atoms/filter/units/numeric-filter.tsx +0 -41
- package/src/components/atoms/filter/units/range-filter.tsx +0 -65
- package/src/components/atoms/filter/units/search-filter.tsx +0 -53
- package/src/components/atoms/filter/units/select-filter.tsx +0 -57
- package/src/components/atoms/filter/units/switch-filter.tsx +0 -35
- package/src/components/atoms/index.ts +0 -11
- package/src/components/atoms/portal/index.ts +0 -1
- package/src/components/atoms/portal/portal.stories.tsx +0 -43
- package/src/components/atoms/portal/portal.tsx +0 -25
- package/src/components/atoms/row/index.ts +0 -1
- package/src/components/atoms/row/row.stories.tsx +0 -37
- package/src/components/atoms/row/row.tsx +0 -26
- package/src/components/atoms/theme-switch/index.ts +0 -1
- package/src/components/atoms/theme-switch/styles/classes.ts +0 -16
- package/src/components/atoms/theme-switch/styles/index.ts +0 -1
- package/src/components/atoms/theme-switch/theme-switch.stories.tsx +0 -26
- package/src/components/atoms/theme-switch/theme-switch.tsx +0 -54
- package/src/components/atoms/uploader/components/avatar-label.tsx +0 -102
- package/src/components/atoms/uploader/components/index.ts +0 -8
- package/src/components/atoms/uploader/components/upload-file-error-box.tsx +0 -40
- package/src/components/atoms/uploader/components/upload-file-input.tsx +0 -36
- package/src/components/atoms/uploader/components/upload-file-label.tsx +0 -92
- package/src/components/atoms/uploader/components/upload-file-listing.tsx +0 -64
- package/src/components/atoms/uploader/components/uploader-title.tsx +0 -21
- package/src/components/atoms/uploader/components/uploader.tsx +0 -58
- package/src/components/atoms/uploader/components/view-image-modal.tsx +0 -41
- package/src/components/atoms/uploader/index.ts +0 -1
- package/src/components/atoms/uploader/stories/uploader.stories.tsx +0 -201
- package/src/components/index.ts +0 -4
- package/src/components/molecules/index.ts +0 -4
- package/src/components/molecules/item-card/components/actions/index.ts +0 -3
- package/src/components/molecules/item-card/components/actions/item-actions-buttons.tsx +0 -43
- package/src/components/molecules/item-card/components/actions/item-actions-dropdown.tsx +0 -57
- package/src/components/molecules/item-card/components/actions/item-actions-overlay.tsx +0 -50
- package/src/components/molecules/item-card/components/additions/index.ts +0 -2
- package/src/components/molecules/item-card/components/additions/item-banner.tsx +0 -22
- package/src/components/molecules/item-card/components/additions/loading-item.tsx +0 -88
- package/src/components/molecules/item-card/components/card/index.ts +0 -4
- package/src/components/molecules/item-card/components/card/item-card-body.tsx +0 -74
- package/src/components/molecules/item-card/components/card/item-card-footer.tsx +0 -79
- package/src/components/molecules/item-card/components/card/item-card-header.tsx +0 -69
- package/src/components/molecules/item-card/components/card/item-card.tsx +0 -123
- package/src/components/molecules/item-card/components/index.ts +0 -3
- package/src/components/molecules/item-card/index.ts +0 -2
- package/src/components/molecules/item-card/stories/item-card.stories.tsx +0 -218
- package/src/components/molecules/item-card/styles/classes.ts +0 -141
- package/src/components/molecules/item-card/styles/index.ts +0 -1
- package/src/components/molecules/nav-bar/index.ts +0 -3
- package/src/components/molecules/nav-bar/nav-bar-item.tsx +0 -64
- package/src/components/molecules/nav-bar/nav-bar.tsx +0 -57
- package/src/components/molecules/nav-bar/stories/hover-effect/nav-bar-hover-effect.stories.tsx +0 -52
- package/src/components/molecules/nav-bar/stories/nav-bar.stories.tsx +0 -50
- package/src/components/molecules/nav-bar/styles/classes.ts +0 -68
- package/src/components/molecules/nav-bar/styles/index.ts +0 -2
- package/src/components/molecules/nav-bar/styles/styles.ts +0 -85
- package/src/components/molecules/nav-bar/sub-items-box.tsx +0 -58
- package/src/components/molecules/scaffold/index.ts +0 -2
- package/src/components/molecules/scaffold/scaffold.stories.tsx +0 -21
- package/src/components/molecules/scaffold/scaffold.tsx +0 -23
- package/src/components/molecules/scaffold/styles/index.ts +0 -1
- package/src/components/molecules/scaffold/styles/scaffold-classes.ts +0 -10
- package/src/components/molecules/side-bar/compact-side-bar.tsx +0 -77
- package/src/components/molecules/side-bar/index.ts +0 -1
- package/src/components/molecules/side-bar/side-bar-drawer.tsx +0 -113
- package/src/components/molecules/side-bar/side-bar.stories.tsx +0 -111
- package/src/components/molecules/side-bar/side-bar.tsx +0 -31
- package/src/components/molecules/side-bar/styles/classes.ts +0 -28
- package/src/components/molecules/side-bar/styles/index.ts +0 -2
- package/src/components/molecules/side-bar/styles/styles.ts +0 -13
- package/src/components/organisms/deletion-confirmor/deletion-confirmor.tsx +0 -110
- package/src/components/organisms/deletion-confirmor/index.ts +0 -3
- package/src/components/organisms/deletion-confirmor/stories/components.tsx +0 -25
- package/src/components/organisms/deletion-confirmor/stories/deletion-confirmor.stories.tsx +0 -78
- package/src/components/organisms/deletion-confirmor/styles/classes.ts +0 -28
- package/src/components/organisms/deletion-confirmor/styles/index.ts +0 -2
- package/src/components/organisms/deletion-confirmor/styles/styles.ts +0 -4
- package/src/components/organisms/footer/copy-rights-box.tsx +0 -27
- package/src/components/organisms/footer/footer.tsx +0 -75
- package/src/components/organisms/footer/index.ts +0 -5
- package/src/components/organisms/footer/policies-box.tsx +0 -27
- package/src/components/organisms/footer/quick-links-box.tsx +0 -46
- package/src/components/organisms/footer/social-links-box.tsx +0 -33
- package/src/components/organisms/footer/stories/footer.stories.tsx +0 -61
- package/src/components/organisms/footer/styles/classes.ts +0 -71
- package/src/components/organisms/footer/styles/index.ts +0 -2
- package/src/components/organisms/footer/styles/styles.ts +0 -6
- package/src/components/organisms/form-builder/form-builder.stories.tsx +0 -144
- package/src/components/organisms/form-builder/form-builder.tsx +0 -75
- package/src/components/organisms/form-builder/index.ts +0 -1
- package/src/components/organisms/header/header.tsx +0 -87
- package/src/components/organisms/header/index.ts +0 -1
- package/src/components/organisms/header/segmented-header-content.tsx +0 -29
- package/src/components/organisms/header/stories/header.stories.tsx +0 -144
- package/src/components/organisms/header/styles/classes.ts +0 -22
- package/src/components/organisms/header/styles/index.ts +0 -2
- package/src/components/organisms/header/styles/styles.ts +0 -39
- package/src/components/organisms/index.ts +0 -6
- package/src/components/organisms/item-details/index.ts +0 -1
- package/src/components/organisms/item-details/item-details.tsx +0 -6
- package/src/components/organisms/listings/empty-listings.tsx +0 -80
- package/src/components/organisms/listings/index.ts +0 -3
- package/src/components/organisms/listings/listings.tsx +0 -96
- package/src/components/organisms/listings/stories/grid-listings.stories.tsx +0 -153
- package/src/components/organisms/listings/stories/list-listings.stories.tsx +0 -171
- package/src/components/organisms/listings/styles/classes.ts +0 -49
- package/src/components/organisms/listings/styles/index.ts +0 -2
- package/src/components/organisms/listings/styles/styles.ts +0 -6
- package/src/components/templates/index.ts +0 -1
- package/src/components/templates/landing-page/index.ts +0 -1
- package/src/components/templates/landing-page/landing-page.stories.tsx +0 -21
- package/src/components/templates/landing-page/landing-page.tsx +0 -57
- package/src/components/templates/landing-page/styles/classes.ts +0 -11
- package/src/components/templates/landing-page/styles/index.ts +0 -1
- package/src/constants/animations.ts +0 -14
- package/src/constants/card.tsx +0 -42
- package/src/constants/defaults.ts +0 -59
- package/src/constants/fake.ts +0 -5
- package/src/constants/footer.tsx +0 -157
- package/src/constants/index.ts +0 -6
- package/src/constants/uploader.ts +0 -27
- package/src/context/emperor-ui-context.ts +0 -6
- package/src/context/form-builder-context.tsx +0 -8
- package/src/context/index.ts +0 -4
- package/src/context/navigation-context.ts +0 -6
- package/src/context/uploader-context.ts +0 -6
- package/src/enums/index.ts +0 -2
- package/src/enums/placeholders.ts +0 -4
- package/src/enums/preserved-keys.ts +0 -3
- package/src/examples/index.ts +0 -1
- package/src/hooks/index.ts +0 -8
- package/src/hooks/use-emperor-ui.ts +0 -12
- package/src/hooks/use-filters.ts +0 -20
- package/src/hooks/use-form-builder-context.ts +0 -16
- package/src/hooks/use-navigation.ts +0 -12
- package/src/hooks/use-search-params-handler.tsx +0 -186
- package/src/hooks/use-uploader-context.ts +0 -14
- package/src/hooks/use-uploader.tsx +0 -164
- package/src/hooks/use-window-size.tsx +0 -53
- package/src/i18n/configs/i18n.ts +0 -7
- package/src/i18n/configs/index.ts +0 -1
- package/src/i18n/constants/index.ts +0 -1
- package/src/i18n/constants/locales.ts +0 -4
- package/src/i18n/index.ts +0 -5
- package/src/i18n/locales/ar.ts +0 -15
- package/src/i18n/locales/atoms/ar.ts +0 -18
- package/src/i18n/locales/atoms/en.ts +0 -18
- package/src/i18n/locales/atoms/index.ts +0 -2
- package/src/i18n/locales/common/ar.ts +0 -1
- package/src/i18n/locales/common/en.ts +0 -1
- package/src/i18n/locales/common/index.ts +0 -2
- package/src/i18n/locales/en.ts +0 -15
- package/src/i18n/locales/index.ts +0 -4
- package/src/i18n/locales/molecules/ar.ts +0 -1
- package/src/i18n/locales/molecules/en.ts +0 -1
- package/src/i18n/locales/molecules/index.ts +0 -2
- package/src/i18n/locales/organisms/ar.ts +0 -11
- package/src/i18n/locales/organisms/en.ts +0 -11
- package/src/i18n/locales/organisms/index.ts +0 -2
- package/src/i18n/locales/templates/ar.ts +0 -1
- package/src/i18n/locales/templates/en.ts +0 -1
- package/src/i18n/locales/templates/index.ts +0 -2
- package/src/i18n/locales/toasts/ar.ts +0 -1
- package/src/i18n/locales/toasts/en.ts +0 -1
- package/src/i18n/locales/toasts/index.ts +0 -2
- package/src/i18n/types/index.ts +0 -2
- package/src/i18n/types/locale.ts +0 -5
- package/src/i18n/types/toasts.ts +0 -3
- package/src/i18n/utils/get-locales.ts +0 -4
- package/src/i18n/utils/index.ts +0 -2
- package/src/i18n/utils/localize.ts +0 -15
- package/src/index.ts +0 -12
- package/src/mocks/constants.ts +0 -103
- package/src/mocks/deletion-confirmor.ts +0 -16
- package/src/mocks/header.tsx +0 -118
- package/src/mocks/index.ts +0 -6
- package/src/mocks/listings.tsx +0 -154
- package/src/mocks/locales/index.ts +0 -1
- package/src/mocks/locales/uploader.ts +0 -33
- package/src/mocks/types.ts +0 -64
- package/src/providers/config-provider.tsx +0 -72
- package/src/providers/emperor-ui-provider.tsx +0 -35
- package/src/providers/form-builder-provider-context.tsx +0 -18
- package/src/providers/index.ts +0 -6
- package/src/providers/navigation-provider.tsx +0 -42
- package/src/providers/theme-provider.tsx +0 -16
- package/src/providers/uploader-provider.tsx +0 -53
- package/src/styles/globals.css +0 -38
- package/src/styles/hero.ts +0 -3
- package/src/styles/index.css +0 -18
- package/src/types/components/atoms/brand.ts +0 -13
- package/src/types/components/atoms/color-picker/color-picker.ts +0 -21
- package/src/types/components/atoms/color-picker/index.ts +0 -1
- package/src/types/components/atoms/column.ts +0 -3
- package/src/types/components/atoms/container.ts +0 -3
- package/src/types/components/atoms/field/field.ts +0 -61
- package/src/types/components/atoms/field/index.ts +0 -1
- package/src/types/components/atoms/filter/filter.ts +0 -52
- package/src/types/components/atoms/filter/index.ts +0 -2
- package/src/types/components/atoms/filter/select-filter.ts +0 -8
- package/src/types/components/atoms/index.ts +0 -9
- package/src/types/components/atoms/portal.ts +0 -6
- package/src/types/components/atoms/row.ts +0 -3
- package/src/types/components/atoms/uploader.ts +0 -102
- package/src/types/components/index.ts +0 -4
- package/src/types/components/molecules/footer/footer.ts +0 -68
- package/src/types/components/molecules/footer/index.ts +0 -1
- package/src/types/components/molecules/header/header.ts +0 -51
- package/src/types/components/molecules/header/index.ts +0 -1
- package/src/types/components/molecules/index.ts +0 -9
- package/src/types/components/molecules/item-card/index.ts +0 -1
- package/src/types/components/molecules/item-card/item-card.ts +0 -69
- package/src/types/components/molecules/item-details/index.ts +0 -1
- package/src/types/components/molecules/item-details/item-details.ts +0 -9
- package/src/types/components/molecules/listings/index.ts +0 -1
- package/src/types/components/molecules/listings/listings.ts +0 -29
- package/src/types/components/molecules/nav-bar/index.ts +0 -1
- package/src/types/components/molecules/nav-bar/nav-bar.ts +0 -66
- package/src/types/components/molecules/scaffold/index.ts +0 -1
- package/src/types/components/molecules/scaffold/scaffold.ts +0 -9
- package/src/types/components/molecules/side-bar/index.ts +0 -1
- package/src/types/components/molecules/side-bar/side-bar.ts +0 -40
- package/src/types/components/molecules/theme-switch/index.ts +0 -1
- package/src/types/components/molecules/theme-switch/theme-switch.ts +0 -9
- package/src/types/components/organisms/deletion-confirmor/deletion-confirmor.ts +0 -22
- package/src/types/components/organisms/deletion-confirmor/index.ts +0 -1
- package/src/types/components/organisms/filters/filters.ts +0 -11
- package/src/types/components/organisms/filters/index.ts +0 -1
- package/src/types/components/organisms/form-builder/context.ts +0 -6
- package/src/types/components/organisms/form-builder/form-builder.ts +0 -39
- package/src/types/components/organisms/form-builder/index.ts +0 -2
- package/src/types/components/organisms/index.ts +0 -3
- package/src/types/components/templates/index.ts +0 -1
- package/src/types/components/templates/landing-page.ts +0 -10
- package/src/types/context/config.ts +0 -24
- package/src/types/context/index.ts +0 -4
- package/src/types/context/localization.ts +0 -24
- package/src/types/context/navigation.ts +0 -17
- package/src/types/context/theme.ts +0 -33
- package/src/types/index.ts +0 -3
- package/src/types/shared/components.ts +0 -13
- package/src/types/shared/index.ts +0 -1
- package/src/utils/cn.ts +0 -6
- package/src/utils/compress-images.ts +0 -36
- package/src/utils/index.ts +0 -5
- package/src/utils/locales.ts +0 -54
- package/src/utils/storybook.tsx +0 -15
- package/src/utils/uploader.ts +0 -167
- package/tsconfig.app.json +0 -37
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -25
- package/vite.config.ts +0 -44
- package/vitest.shims.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ export declare const ALLOWED_IMAGES_TYPES: string[];
|
|
|
60
60
|
|
|
61
61
|
export declare const ALLOWED_PDF_TYPES: string[];
|
|
62
62
|
|
|
63
|
+
export declare const ALLOWED_SHEET_TYPES: string[];
|
|
64
|
+
|
|
63
65
|
export declare type AppDirection = "ltr" | "rtl";
|
|
64
66
|
|
|
65
67
|
declare const ar: {
|
|
@@ -1224,6 +1226,7 @@ export declare type UploaderContextState = {
|
|
|
1224
1226
|
fileTypes: FileType[];
|
|
1225
1227
|
onInputChange: SharedOnInputChangeType;
|
|
1226
1228
|
handleClearFile: (fileName?: string) => void;
|
|
1229
|
+
setFiles?: Dispatch<SetStateAction<FileObject[]>>;
|
|
1227
1230
|
modal?: Omit<ModalProps, "children"> & {
|
|
1228
1231
|
onOpen?: () => void;
|
|
1229
1232
|
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@js-empire/emperor-ui",
|
|
3
3
|
"description": "They provide the atoms, we provide the empire.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.7",
|
|
5
5
|
"author": "JS Empire - Mustafa Alhasanat",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"main": "dist/emperor-ui
|
|
8
|
+
"main": "dist/emperor-ui.umd.cjs",
|
|
9
9
|
"module": "dist/emperor-ui.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
11
15
|
"keywords": [],
|
|
12
16
|
"exports": {
|
|
13
17
|
".": {
|
|
14
18
|
"types": "./dist/index.d.ts",
|
|
15
19
|
"import": "./dist/emperor-ui.js",
|
|
16
|
-
"require": "./dist/emperor-ui
|
|
20
|
+
"require": "./dist/emperor-ui.umd.cjs"
|
|
17
21
|
},
|
|
18
22
|
"./globals.css": "./dist/globals.css"
|
|
19
23
|
},
|
|
@@ -1,50 +0,0 @@
|
|
|
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/.husky/pre-commit
DELETED
package/.prettierrc
DELETED
package/.storybook/main.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from "@storybook/react-vite";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import tsconfigPaths from "vite-tsconfig-paths";
|
|
4
|
-
|
|
5
|
-
const config: StorybookConfig = {
|
|
6
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
7
|
-
addons: [],
|
|
8
|
-
framework: {
|
|
9
|
-
name: "@storybook/react-vite",
|
|
10
|
-
options: {},
|
|
11
|
-
},
|
|
12
|
-
viteFinal: async (config) => {
|
|
13
|
-
config.plugins?.push(
|
|
14
|
-
/** @see https://github.com/aleclarson/vite-tsconfig-paths */
|
|
15
|
-
tsconfigPaths({
|
|
16
|
-
projects: [path.resolve("..", "tsconfig.json")],
|
|
17
|
-
}),
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
return config;
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default config;
|
package/.storybook/preview.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Preview } from "@storybook/react-vite";
|
|
2
|
-
import "../src/styles/globals.css";
|
|
3
|
-
|
|
4
|
-
const preview: Preview = {
|
|
5
|
-
parameters: {
|
|
6
|
-
controls: {
|
|
7
|
-
matchers: {
|
|
8
|
-
color: /(background|color)$/i,
|
|
9
|
-
date: /Date$/i,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
a11y: {
|
|
14
|
-
test: "todo",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default preview;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
|
|
2
|
-
import { setProjectAnnotations } from "@storybook/react-vite";
|
|
3
|
-
import * as projectAnnotations from "./preview";
|
|
4
|
-
|
|
5
|
-
// This is an important step to apply the right configuration when testing your stories.
|
|
6
|
-
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
|
7
|
-
setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]);
|
package/.vscode/extensions.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/dist/index-31cOfB5-.js
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { l as a, a as s, d as e } from "./index-BwRbIPvN.js";
|
|
2
|
-
import { A as n, b as c, D as l, c as d, e as m, F as u, f as b, H as p, g, J as x, K as V, L as f, h as T, M as y, i as D, j as A, k as S, m as v, N as P, n as E, o as M, P as h, p as C, q as B, S as O, r as I, s as G, V as L, t as N, u as R, v as F, w as k, x as j, y as w, z, B as q, C as K, E as H, G as W, I as U, O as Z, Q as J, R as Q, T as X, U as Y, W as _, X as $, Y as aa, Z as sa, _ as ea, $ as ia, a0 as ta, a1 as oa, a2 as ra, a3 as na, a4 as ca, a5 as la, a6 as da, a7 as ma, a8 as ua, a9 as ba, aa as pa, ab as ga, ac as xa, ad as Va, ae as fa, af as Ta, ag as ya, ah as Da, ai as Aa, aj as Sa, ak as va, al as Pa, am as Ea, an as Ma, ao as ha, ap as Ca, aq as Ba, ar as Oa, as as Ia, at as Ga, au as La, av as Na, aw as Ra, ax as Fa, ay as ka, az as ja, aA as wa, aB as za, aC as qa, aD as Ka, aE as Ha, aF as Wa, aG as Ua, aH as Za, aI as Ja, aJ as Qa, aK as Xa, aL as Ya, aM as _a, aN as $a, aO as as, aP as ss, aQ as es, aR as is, aS as ts, aT as os, aU as rs, aV as ns, aW as cs, aX as ls, aY as ds, aZ as ms, a_ as us, a$ as bs, b0 as ps, b1 as gs, b2 as xs, b3 as Vs, b4 as fs, b5 as Ts, b6 as ys, b7 as Ds, b8 as As, b9 as Ss, ba as vs, bb as Ps, bc as Es, bd as Ms, be as hs, bf as Cs, bg as Bs, bh as Os, bi as Is, bj as Gs, bk as Ls, bl as Ns, bm as Rs, bn as Fs, bo as ks, bp as js, bq as ws, br as zs, bs as qs, bt as Ks, bu as Hs, bv as Ws, bw as Us, bx as Zs, by as Js, bz as Qs, bA as Xs, bB as Ys, bC as _s, bD as $s, bE as ae, bF as se, bG as ee, bH as ie, bI as te, bJ as oe, bK as re, bL as ne, bM as ce, bN as le, bO as de, bP as me, bQ as ue, bR as be, bS as pe, bT as ge, bU as xe, bV as Ve, bW as fe, bX as Te, bY as ye, bZ as De, b_ as Ae, b$ as Se, c0 as ve, c1 as Pe, c2 as Ee, c3 as Me, c4 as he, c5 as Ce, c6 as Be, c7 as Oe, c8 as Ie, c9 as Ge, ca as Le, cb as Ne, cc as Re, cd as Fe, ce as ke, cf as je, cg as we, ch as ze, ci as qe, cj as Ke, ck as He, cl as We, cm as Ue, cn as Ze, co as Je, cp as Qe, cq as Xe, cr as Ye, cs as _e, ct as $e, cu as ai, cv as si, cw as ei, cx as ii, cy as ti, cz as oi, cA as ri, cB as ni, cC as ci, cD as li, cE as di, cF as mi, cG as ui, cH as bi, cI as pi, cJ as gi, cK as xi, cL as Vi, cM as fi, cN as Ti, cO as yi, cP as Di, cQ as Ai, cR as Si, cS as vi, cT as Pi, cU as Ei, cV as Mi, cW as hi, cX as Ci, cY as Bi, cZ as Oi, c_ as Ii, c$ as Gi, d0 as Li, d1 as Ni, d2 as Ri, d3 as Fi, d4 as ki, d5 as ji, d6 as wi, d7 as zi, d8 as qi, d9 as Ki, da as Hi, db as Wi, dc as Ui, dd as Zi, de as Ji, df as Qi, dg as Xi, dh as Yi, di as _i, dj as $i, dk as at, dl as st, dm as et, dn as it, dp as tt, dq as ot, dr as rt, ds as nt, dt as ct, du as lt, dv as dt, dw as mt, dx as ut, dy as bt, dz as pt, dA as gt } from "./index-BwRbIPvN.js";
|
|
3
|
-
const t = {
|
|
4
|
-
...e,
|
|
5
|
-
...s,
|
|
6
|
-
...a
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
n as AnimatePresence,
|
|
10
|
-
c as AsyncMotionValueAnimation,
|
|
11
|
-
l as DOMKeyframesResolver,
|
|
12
|
-
d as DOMVisualElement,
|
|
13
|
-
m as DocumentProjectionNode,
|
|
14
|
-
u as Feature,
|
|
15
|
-
b as FlatTree,
|
|
16
|
-
p as HTMLProjectionNode,
|
|
17
|
-
g as HTMLVisualElement,
|
|
18
|
-
x as JSAnimation,
|
|
19
|
-
V as KeyframeResolver,
|
|
20
|
-
f as LayoutGroupContext,
|
|
21
|
-
T as LazyMotion,
|
|
22
|
-
y as MotionConfig,
|
|
23
|
-
D as MotionConfigContext,
|
|
24
|
-
A as MotionContext,
|
|
25
|
-
S as MotionGlobalConfig,
|
|
26
|
-
v as MotionValue,
|
|
27
|
-
P as NativeAnimation,
|
|
28
|
-
E as NativeAnimationExtended,
|
|
29
|
-
M as NodeStack,
|
|
30
|
-
h as PopChild,
|
|
31
|
-
C as PresenceChild,
|
|
32
|
-
B as PresenceContext,
|
|
33
|
-
O as SVGVisualElement,
|
|
34
|
-
I as SubscriptionManager,
|
|
35
|
-
G as SwitchLayoutGroupContext,
|
|
36
|
-
L as VisualElement,
|
|
37
|
-
N as acceleratedValues,
|
|
38
|
-
R as addDomEvent,
|
|
39
|
-
F as addPointerEvent,
|
|
40
|
-
k as addPointerInfo,
|
|
41
|
-
j as addUniqueItem,
|
|
42
|
-
w as addValueToWillChange,
|
|
43
|
-
z as alpha,
|
|
44
|
-
q as analyseComplexValue,
|
|
45
|
-
K as animateMotionValue,
|
|
46
|
-
H as animateSingleValue,
|
|
47
|
-
W as animateTarget,
|
|
48
|
-
U as animateVariant,
|
|
49
|
-
Z as animateVisualElement,
|
|
50
|
-
J as animations,
|
|
51
|
-
Q as anticipate,
|
|
52
|
-
X as applyAxisDelta,
|
|
53
|
-
Y as applyBoxDelta,
|
|
54
|
-
_ as applyGeneratorOptions,
|
|
55
|
-
$ as applyPointDelta,
|
|
56
|
-
aa as applyTreeDeltas,
|
|
57
|
-
sa as aspectRatio,
|
|
58
|
-
ea as axisDeltaEquals,
|
|
59
|
-
ia as axisEquals,
|
|
60
|
-
ta as axisEqualsRounded,
|
|
61
|
-
oa as backIn,
|
|
62
|
-
ra as backInOut,
|
|
63
|
-
na as backOut,
|
|
64
|
-
ca as boxEquals,
|
|
65
|
-
la as boxEqualsRounded,
|
|
66
|
-
da as buildHTMLStyles,
|
|
67
|
-
ma as buildProjectionTransform,
|
|
68
|
-
ua as buildSVGAttrs,
|
|
69
|
-
ba as buildSVGPath,
|
|
70
|
-
pa as buildTransform,
|
|
71
|
-
ga as calcAxisDelta,
|
|
72
|
-
xa as calcBoxDelta,
|
|
73
|
-
Va as calcChildStagger,
|
|
74
|
-
fa as calcGeneratorDuration,
|
|
75
|
-
Ta as calcLength,
|
|
76
|
-
ya as calcRelativeAxis,
|
|
77
|
-
Da as calcRelativeAxisPosition,
|
|
78
|
-
Aa as calcRelativeBox,
|
|
79
|
-
Sa as calcRelativePosition,
|
|
80
|
-
va as camelCaseAttributes,
|
|
81
|
-
Pa as camelToDash,
|
|
82
|
-
Ea as cancelFrame,
|
|
83
|
-
Ma as checkVariantsDidChange,
|
|
84
|
-
ha as circIn,
|
|
85
|
-
Ca as circInOut,
|
|
86
|
-
Ba as circOut,
|
|
87
|
-
Oa as clamp,
|
|
88
|
-
Ia as cleanDirtyNodes,
|
|
89
|
-
Ga as color,
|
|
90
|
-
La as compareByDepth,
|
|
91
|
-
Na as complex,
|
|
92
|
-
Ra as containsCSSVariable,
|
|
93
|
-
Fa as convertBoundingBoxToBox,
|
|
94
|
-
ka as convertBoxToBoundingBox,
|
|
95
|
-
ja as convertOffsetToTimes,
|
|
96
|
-
wa as copyAxisDeltaInto,
|
|
97
|
-
za as copyAxisInto,
|
|
98
|
-
qa as copyBoxInto,
|
|
99
|
-
Ka as correctBorderRadius,
|
|
100
|
-
Ha as correctBoxShadow,
|
|
101
|
-
Wa as createAnimationState,
|
|
102
|
-
Ua as createAxis,
|
|
103
|
-
Za as createAxisDelta,
|
|
104
|
-
Ja as createBox,
|
|
105
|
-
Qa as createDelta,
|
|
106
|
-
Xa as createGeneratorEasing,
|
|
107
|
-
Ya as createProjectionNode,
|
|
108
|
-
_a as createRenderBatcher,
|
|
109
|
-
$a as cubicBezier,
|
|
110
|
-
as as cubicBezierAsString,
|
|
111
|
-
ss as defaultEasing,
|
|
112
|
-
es as defaultOffset,
|
|
113
|
-
is as defaultTransformValue,
|
|
114
|
-
ts as defaultValueTypes,
|
|
115
|
-
os as degrees,
|
|
116
|
-
rs as delay,
|
|
117
|
-
ns as dimensionValueTypes,
|
|
118
|
-
cs as distance,
|
|
119
|
-
ls as distance2D,
|
|
120
|
-
e as domAnimation,
|
|
121
|
-
t as domMax,
|
|
122
|
-
ds as eachAxis,
|
|
123
|
-
ms as easeIn,
|
|
124
|
-
us as easeInOut,
|
|
125
|
-
bs as easeOut,
|
|
126
|
-
ps as easingDefinitionToFunction,
|
|
127
|
-
gs as fillOffset,
|
|
128
|
-
xs as fillWildcards,
|
|
129
|
-
Vs as filterProps,
|
|
130
|
-
fs as findDimensionValueType,
|
|
131
|
-
Ts as findValueType,
|
|
132
|
-
ys as flushKeyframeResolvers,
|
|
133
|
-
Ds as frame,
|
|
134
|
-
As as frameData,
|
|
135
|
-
Ss as frameSteps,
|
|
136
|
-
vs as generateLinearEasing,
|
|
137
|
-
Ps as getAnimatableNone,
|
|
138
|
-
Es as getDefaultTransition,
|
|
139
|
-
Ms as getDefaultValueType,
|
|
140
|
-
hs as getFeatureDefinitions,
|
|
141
|
-
Cs as getFinalKeyframe,
|
|
142
|
-
Bs as getMixer,
|
|
143
|
-
Os as getOptimisedAppearId,
|
|
144
|
-
Is as getValueAsType,
|
|
145
|
-
Gs as getValueTransition,
|
|
146
|
-
Ls as getVariableValue,
|
|
147
|
-
Ns as getVariantContext,
|
|
148
|
-
Rs as globalProjectionState,
|
|
149
|
-
Fs as has2DTranslate,
|
|
150
|
-
ks as hasReducedMotionListener,
|
|
151
|
-
js as hasScale,
|
|
152
|
-
ws as hasTransform,
|
|
153
|
-
zs as hex,
|
|
154
|
-
qs as hover,
|
|
155
|
-
Ks as hsla,
|
|
156
|
-
Hs as hslaToRgba,
|
|
157
|
-
Ws as inertia,
|
|
158
|
-
Us as initPrefersReducedMotion,
|
|
159
|
-
Zs as interpolate,
|
|
160
|
-
Js as invariant,
|
|
161
|
-
Qs as invisibleValues,
|
|
162
|
-
Xs as isAnimationControls,
|
|
163
|
-
Ys as isBezierDefinition,
|
|
164
|
-
_s as isBrowser,
|
|
165
|
-
$s as isCSSVariableName,
|
|
166
|
-
ae as isCSSVariableToken,
|
|
167
|
-
se as isControllingVariants,
|
|
168
|
-
ee as isDeltaZero,
|
|
169
|
-
ie as isDragActive,
|
|
170
|
-
te as isDragging,
|
|
171
|
-
oe as isEasingArray,
|
|
172
|
-
re as isElementKeyboardAccessible,
|
|
173
|
-
ne as isElementTextInput,
|
|
174
|
-
ce as isForcedMotionValue,
|
|
175
|
-
le as isGenerator,
|
|
176
|
-
de as isHTMLElement,
|
|
177
|
-
me as isKeyframesTarget,
|
|
178
|
-
ue as isMotionValue,
|
|
179
|
-
be as isNear,
|
|
180
|
-
pe as isNodeOrChild,
|
|
181
|
-
ge as isNumericalString,
|
|
182
|
-
xe as isObject,
|
|
183
|
-
Ve as isPrimaryPointer,
|
|
184
|
-
fe as isSVGElement,
|
|
185
|
-
Te as isSVGSVGElement,
|
|
186
|
-
ye as isSVGTag,
|
|
187
|
-
De as isTransitionDefined,
|
|
188
|
-
Ae as isValidMotionProp,
|
|
189
|
-
Se as isVariantLabel,
|
|
190
|
-
ve as isVariantNode,
|
|
191
|
-
Pe as isWillChangeMotionValue,
|
|
192
|
-
Ee as isZeroValueString,
|
|
193
|
-
Me as keyframes,
|
|
194
|
-
he as m,
|
|
195
|
-
Ce as makeAnimationInstant,
|
|
196
|
-
Be as makeUseVisualState,
|
|
197
|
-
Oe as mapEasingToNativeEasing,
|
|
198
|
-
Ie as maxGeneratorDuration,
|
|
199
|
-
Ge as measurePageBox,
|
|
200
|
-
Le as measureViewportBox,
|
|
201
|
-
Ne as memo,
|
|
202
|
-
Re as microtask,
|
|
203
|
-
Fe as millisecondsToSeconds,
|
|
204
|
-
ke as mirrorEasing,
|
|
205
|
-
je as mix,
|
|
206
|
-
we as mixArray,
|
|
207
|
-
ze as mixColor,
|
|
208
|
-
qe as mixComplex,
|
|
209
|
-
Ke as mixImmediate,
|
|
210
|
-
He as mixLinearColor,
|
|
211
|
-
We as mixNumber,
|
|
212
|
-
Ue as mixObject,
|
|
213
|
-
Ze as mixValues,
|
|
214
|
-
Je as mixVisibility,
|
|
215
|
-
Qe as motion,
|
|
216
|
-
Xe as motionValue,
|
|
217
|
-
Ye as noop,
|
|
218
|
-
_e as number,
|
|
219
|
-
$e as numberValueTypes,
|
|
220
|
-
ai as optimizedAppearDataAttribute,
|
|
221
|
-
si as optimizedAppearDataId,
|
|
222
|
-
ei as parseCSSVariable,
|
|
223
|
-
ii as parseValueFromTransform,
|
|
224
|
-
ti as percent,
|
|
225
|
-
oi as pipe,
|
|
226
|
-
ri as pixelsToPercent,
|
|
227
|
-
ni as positionalKeys,
|
|
228
|
-
ci as prefersReducedMotion,
|
|
229
|
-
li as press,
|
|
230
|
-
di as progress,
|
|
231
|
-
mi as progressPercentage,
|
|
232
|
-
ui as propagateDirtyNodes,
|
|
233
|
-
bi as px,
|
|
234
|
-
pi as readTransformValue,
|
|
235
|
-
gi as removeAxisDelta,
|
|
236
|
-
xi as removeAxisTransforms,
|
|
237
|
-
Vi as removeBoxTransforms,
|
|
238
|
-
fi as removeItem,
|
|
239
|
-
Ti as removePointDelta,
|
|
240
|
-
yi as renderHTML,
|
|
241
|
-
Di as renderSVG,
|
|
242
|
-
Ai as resize,
|
|
243
|
-
Si as resolveElements,
|
|
244
|
-
vi as resolveMotionValue,
|
|
245
|
-
Pi as resolveTransition,
|
|
246
|
-
Ei as resolveVariant,
|
|
247
|
-
Mi as resolveVariantFromProps,
|
|
248
|
-
hi as reverseEasing,
|
|
249
|
-
Ci as rgbUnit,
|
|
250
|
-
Bi as rgba,
|
|
251
|
-
Oi as rootProjectionNode,
|
|
252
|
-
Ii as scale,
|
|
253
|
-
Gi as scaleCorrectors,
|
|
254
|
-
Li as scalePoint,
|
|
255
|
-
Ni as scrapeHTMLMotionValuesFromProps,
|
|
256
|
-
Ri as scrapeSVGMotionValuesFromProps,
|
|
257
|
-
Fi as secondsToMilliseconds,
|
|
258
|
-
ki as setDragLock,
|
|
259
|
-
ji as setFeatureDefinitions,
|
|
260
|
-
wi as setStyle,
|
|
261
|
-
zi as setTarget,
|
|
262
|
-
qi as spring,
|
|
263
|
-
Ki as startWaapiAnimation,
|
|
264
|
-
Hi as supportedWaapiEasing,
|
|
265
|
-
Wi as supportsBrowserAnimation,
|
|
266
|
-
Ui as supportsFlags,
|
|
267
|
-
Zi as supportsLinearEasing,
|
|
268
|
-
Ji as supportsScrollTimeline,
|
|
269
|
-
Qi as testValueType,
|
|
270
|
-
Xi as time,
|
|
271
|
-
Yi as transformAxis,
|
|
272
|
-
_i as transformBox,
|
|
273
|
-
$i as transformBoxPoints,
|
|
274
|
-
at as transformPropOrder,
|
|
275
|
-
st as transformProps,
|
|
276
|
-
et as transformValueTypes,
|
|
277
|
-
it as translateAxis,
|
|
278
|
-
tt as updateMotionValuesFromProps,
|
|
279
|
-
ot as useComposedRefs,
|
|
280
|
-
rt as useIsomorphicLayoutEffect,
|
|
281
|
-
nt as usePresence,
|
|
282
|
-
ct as variantPriorityOrder,
|
|
283
|
-
lt as variantProps,
|
|
284
|
-
dt as velocityPerSecond,
|
|
285
|
-
mt as vh,
|
|
286
|
-
ut as visualElementStore,
|
|
287
|
-
bt as vw,
|
|
288
|
-
pt as warnOnce,
|
|
289
|
-
gt as warning
|
|
290
|
-
};
|