@js-empire/emperor-ui 1.3.8 → 1.3.10
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 +3967 -3889
- package/dist/src/animations/blink.d.ts +7 -0
- package/dist/src/animations/floating.d.ts +2 -0
- package/dist/src/animations/index.d.ts +2 -0
- package/dist/src/components/atoms/brand/brand.d.ts +14 -0
- package/dist/src/components/atoms/brand/index.d.ts +1 -0
- package/dist/src/components/atoms/brand/styles/classes.d.ts +3 -0
- package/dist/src/components/atoms/brand/styles/index.d.ts +2 -0
- package/dist/src/components/atoms/brand/styles/styles.d.ts +1 -0
- package/dist/src/components/atoms/color-picker/color-picker.d.ts +2 -0
- package/dist/src/components/atoms/color-picker/free-color-picker.d.ts +2 -0
- package/dist/src/components/atoms/color-picker/index.d.ts +3 -0
- package/dist/src/components/atoms/color-picker/preset-color-picker.d.ts +2 -0
- package/dist/src/components/atoms/column/column.d.ts +2 -0
- package/dist/src/components/atoms/column/index.d.ts +1 -0
- package/dist/src/components/atoms/container/container.d.ts +2 -0
- package/dist/src/components/atoms/container/index.d.ts +1 -0
- package/dist/src/components/atoms/copy-button/copy-button.d.ts +3 -0
- package/dist/src/components/atoms/copy-button/index.d.ts +1 -0
- package/dist/src/components/atoms/field/field.d.ts +3 -0
- package/dist/src/components/atoms/field/index.d.ts +3 -0
- package/dist/src/components/atoms/field/styles/classes.d.ts +3 -0
- package/dist/src/components/atoms/field/styles/index.d.ts +1 -0
- package/dist/src/components/atoms/field/units/autocomplete-field.d.ts +3 -0
- package/dist/src/components/atoms/field/units/checkbox-field.d.ts +3 -0
- package/dist/src/components/atoms/field/units/index.d.ts +7 -0
- package/dist/src/components/atoms/field/units/input-field.d.ts +3 -0
- package/dist/src/components/atoms/field/units/radio-field.d.ts +3 -0
- package/dist/src/components/atoms/field/units/select-field.d.ts +3 -0
- package/dist/src/components/atoms/field/units/switch-field.d.ts +3 -0
- package/dist/src/components/atoms/field/units/textarea-field.d.ts +3 -0
- package/dist/src/components/atoms/filter/filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/index.d.ts +3 -0
- package/dist/src/components/atoms/filter/styles/classes.d.ts +3 -0
- package/dist/src/components/atoms/filter/styles/index.d.ts +1 -0
- package/dist/src/components/atoms/filter/units/autocomplete-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/checkbox-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/checkbox-group-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/date-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/index.d.ts +9 -0
- package/dist/src/components/atoms/filter/units/numeric-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/range-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/search-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/select-filter.d.ts +2 -0
- package/dist/src/components/atoms/filter/units/switch-filter.d.ts +2 -0
- package/dist/src/components/atoms/index.d.ts +11 -0
- package/dist/src/components/atoms/portal/index.d.ts +1 -0
- package/dist/src/components/atoms/portal/portal.d.ts +2 -0
- package/dist/src/components/atoms/row/index.d.ts +1 -0
- package/dist/src/components/atoms/row/row.d.ts +2 -0
- package/dist/src/components/atoms/theme-switch/index.d.ts +1 -0
- package/dist/src/components/atoms/theme-switch/styles/classes.d.ts +3 -0
- package/dist/src/components/atoms/theme-switch/styles/index.d.ts +1 -0
- package/dist/src/components/atoms/theme-switch/theme-switch.d.ts +2 -0
- package/dist/src/components/atoms/uploader/components/avatar-label.d.ts +1 -0
- package/dist/src/components/atoms/uploader/components/index.d.ts +8 -0
- package/dist/src/components/atoms/uploader/components/upload-file-error-box.d.ts +1 -0
- package/dist/src/components/atoms/uploader/components/upload-file-input.d.ts +1 -0
- package/dist/src/components/atoms/uploader/components/upload-file-label.d.ts +1 -0
- package/dist/src/components/atoms/uploader/components/upload-file-listing.d.ts +1 -0
- package/dist/src/components/atoms/uploader/components/uploader-title.d.ts +2 -0
- package/dist/src/components/atoms/uploader/components/uploader.d.ts +19 -0
- package/dist/src/components/atoms/uploader/components/view-image-modal.d.ts +1 -0
- package/dist/src/components/atoms/uploader/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +4 -0
- package/dist/src/components/molecules/index.d.ts +4 -0
- package/dist/src/components/molecules/item-card/components/actions/index.d.ts +3 -0
- package/dist/src/components/molecules/item-card/components/actions/item-actions-buttons.d.ts +6 -0
- package/dist/src/components/molecules/item-card/components/actions/item-actions-dropdown.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/actions/item-actions-overlay.d.ts +4 -0
- package/dist/src/components/molecules/item-card/components/additions/index.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/additions/item-banner.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/additions/loading-item.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/card/index.d.ts +4 -0
- package/dist/src/components/molecules/item-card/components/card/item-card-body.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/card/item-card-footer.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/card/item-card-header.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/card/item-card.d.ts +2 -0
- package/dist/src/components/molecules/item-card/components/index.d.ts +3 -0
- package/dist/src/components/molecules/item-card/index.d.ts +2 -0
- package/dist/src/components/molecules/item-card/styles/classes.d.ts +33 -0
- package/dist/src/components/molecules/item-card/styles/index.d.ts +1 -0
- package/dist/src/components/molecules/nav-bar/index.d.ts +3 -0
- package/dist/src/components/molecules/nav-bar/nav-bar-item.d.ts +6 -0
- package/dist/src/components/molecules/nav-bar/nav-bar.d.ts +13 -0
- package/dist/src/components/molecules/nav-bar/styles/classes.d.ts +11 -0
- package/dist/src/components/molecules/nav-bar/styles/index.d.ts +2 -0
- package/dist/src/components/molecules/nav-bar/styles/styles.d.ts +5 -0
- package/dist/src/components/molecules/nav-bar/sub-items-box.d.ts +2 -0
- package/dist/src/components/molecules/scaffold/index.d.ts +2 -0
- package/dist/src/components/molecules/scaffold/scaffold.d.ts +3 -0
- package/dist/src/components/molecules/scaffold/styles/index.d.ts +1 -0
- package/dist/src/components/molecules/scaffold/styles/scaffold-classes.d.ts +1 -0
- package/dist/src/components/molecules/side-bar/compact-side-bar.d.ts +2 -0
- package/dist/src/components/molecules/side-bar/index.d.ts +1 -0
- package/dist/src/components/molecules/side-bar/side-bar-drawer.d.ts +2 -0
- package/dist/src/components/molecules/side-bar/side-bar.d.ts +15 -0
- package/dist/src/components/molecules/side-bar/styles/classes.d.ts +6 -0
- package/dist/src/components/molecules/side-bar/styles/index.d.ts +2 -0
- package/dist/src/components/molecules/side-bar/styles/styles.d.ts +3 -0
- package/dist/src/components/organisms/deletion-confirmor/deletion-confirmor.d.ts +2 -0
- package/dist/src/components/organisms/deletion-confirmor/index.d.ts +3 -0
- package/dist/src/components/organisms/deletion-confirmor/stories/components.d.ts +2 -0
- package/dist/src/components/organisms/deletion-confirmor/styles/classes.d.ts +4 -0
- package/dist/src/components/organisms/deletion-confirmor/styles/index.d.ts +2 -0
- package/dist/src/components/organisms/deletion-confirmor/styles/styles.d.ts +2 -0
- package/dist/src/components/organisms/footer/copy-rights-box.d.ts +2 -0
- package/dist/src/components/organisms/footer/footer.d.ts +11 -0
- package/dist/src/components/organisms/footer/index.d.ts +5 -0
- package/dist/src/components/organisms/footer/policies-box.d.ts +2 -0
- package/dist/src/components/organisms/footer/quick-links-box.d.ts +2 -0
- package/dist/src/components/organisms/footer/social-links-box.d.ts +2 -0
- package/dist/src/components/organisms/footer/styles/classes.d.ts +9 -0
- package/dist/src/components/organisms/footer/styles/index.d.ts +2 -0
- package/dist/src/components/organisms/footer/styles/styles.d.ts +2 -0
- package/dist/src/components/organisms/form-builder/form-builder.d.ts +3 -0
- package/dist/src/components/organisms/form-builder/index.d.ts +1 -0
- package/dist/src/components/organisms/header/header.d.ts +8 -0
- package/dist/src/components/organisms/header/index.d.ts +1 -0
- package/dist/src/components/organisms/header/segmented-header-content.d.ts +2 -0
- package/dist/src/components/organisms/header/styles/classes.d.ts +3 -0
- package/dist/src/components/organisms/header/styles/index.d.ts +2 -0
- package/dist/src/components/organisms/header/styles/styles.d.ts +6 -0
- package/dist/src/components/organisms/index.d.ts +6 -0
- package/dist/src/components/organisms/item-details/index.d.ts +1 -0
- package/dist/src/components/organisms/item-details/item-details.d.ts +2 -0
- package/dist/src/components/organisms/listings/empty-listings.d.ts +9 -0
- package/dist/src/components/organisms/listings/index.d.ts +3 -0
- package/dist/src/components/organisms/listings/listings.d.ts +2 -0
- package/dist/src/components/organisms/listings/styles/classes.d.ts +10 -0
- package/dist/src/components/organisms/listings/styles/index.d.ts +2 -0
- package/dist/src/components/organisms/listings/styles/styles.d.ts +2 -0
- package/dist/src/components/templates/index.d.ts +1 -0
- package/dist/src/components/templates/landing-page/index.d.ts +1 -0
- package/dist/src/components/templates/landing-page/landing-page.d.ts +10 -0
- package/dist/src/components/templates/landing-page/styles/classes.d.ts +3 -0
- package/dist/src/components/templates/landing-page/styles/index.d.ts +1 -0
- package/dist/src/constants/animations.d.ts +5 -0
- package/dist/src/constants/card.d.ts +3 -0
- package/dist/src/constants/defaults.d.ts +2 -0
- package/dist/src/constants/fake.d.ts +2 -0
- package/dist/src/constants/footer.d.ts +6 -0
- package/dist/src/constants/index.d.ts +6 -0
- package/dist/src/constants/uploader.d.ts +8 -0
- package/dist/src/context/emperor-ui-context.d.ts +2 -0
- package/dist/src/context/form-builder-context.d.ts +3 -0
- package/dist/src/context/index.d.ts +4 -0
- package/dist/src/context/navigation-context.d.ts +2 -0
- package/dist/src/context/uploader-context.d.ts +2 -0
- package/dist/src/enums/index.d.ts +2 -0
- package/dist/src/enums/placeholders.d.ts +5 -0
- package/dist/src/enums/preserved-keys.d.ts +3 -0
- package/dist/src/examples/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +8 -0
- package/dist/src/hooks/use-emperor-ui.d.ts +1 -0
- package/dist/src/hooks/use-filters.d.ts +4 -0
- package/dist/src/hooks/use-form-builder-context.d.ts +3 -0
- package/dist/src/hooks/use-navigation.d.ts +1 -0
- package/dist/src/hooks/use-search-params-handler.d.ts +17 -0
- package/dist/src/hooks/use-uploader-context.d.ts +1 -0
- package/dist/src/hooks/use-uploader.d.ts +2 -0
- package/dist/src/hooks/use-window-size.d.ts +7 -0
- package/dist/src/i18n/configs/i18n.d.ts +6 -0
- package/dist/src/i18n/configs/index.d.ts +1 -0
- package/dist/src/i18n/constants/index.d.ts +1 -0
- package/dist/src/i18n/constants/locales.d.ts +4 -0
- package/dist/src/i18n/index.d.ts +5 -0
- package/dist/src/i18n/locales/ar.d.ts +32 -0
- package/dist/src/i18n/locales/atoms/ar.d.ts +16 -0
- package/dist/src/i18n/locales/atoms/en.d.ts +16 -0
- package/dist/src/i18n/locales/atoms/index.d.ts +2 -0
- package/dist/src/i18n/locales/common/ar.d.ts +1 -0
- package/dist/src/i18n/locales/common/en.d.ts +1 -0
- package/dist/src/i18n/locales/common/index.d.ts +2 -0
- package/dist/src/i18n/locales/en.d.ts +32 -0
- package/dist/src/i18n/locales/index.d.ts +4 -0
- package/dist/src/i18n/locales/molecules/ar.d.ts +1 -0
- package/dist/src/i18n/locales/molecules/en.d.ts +1 -0
- package/dist/src/i18n/locales/molecules/index.d.ts +2 -0
- package/dist/src/i18n/locales/organisms/ar.d.ts +10 -0
- package/dist/src/i18n/locales/organisms/en.d.ts +10 -0
- package/dist/src/i18n/locales/organisms/index.d.ts +2 -0
- package/dist/src/i18n/locales/templates/ar.d.ts +1 -0
- package/dist/src/i18n/locales/templates/en.d.ts +1 -0
- package/dist/src/i18n/locales/templates/index.d.ts +2 -0
- package/dist/src/i18n/locales/toasts/ar.d.ts +1 -0
- package/dist/src/i18n/locales/toasts/en.d.ts +1 -0
- package/dist/src/i18n/locales/toasts/index.d.ts +2 -0
- package/dist/src/i18n/types/index.d.ts +2 -0
- package/dist/src/i18n/types/locale.d.ts +3 -0
- package/dist/src/i18n/types/toasts.d.ts +2 -0
- package/dist/src/i18n/utils/get-locales.d.ts +2 -0
- package/dist/src/i18n/utils/index.d.ts +2 -0
- package/dist/src/i18n/utils/localize.d.ts +6 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/mocks/constants.d.ts +10 -0
- package/dist/src/mocks/deletion-confirmor.d.ts +7 -0
- package/dist/src/mocks/header.d.ts +5 -0
- package/dist/src/mocks/index.d.ts +6 -0
- package/dist/src/mocks/listings.d.ts +14 -0
- package/dist/src/mocks/locales/index.d.ts +1 -0
- package/dist/src/mocks/locales/uploader.d.ts +2 -0
- package/dist/src/mocks/types.d.ts +28 -0
- package/dist/src/providers/config-provider.d.ts +2 -0
- package/dist/src/providers/emperor-ui-provider.d.ts +4 -0
- package/dist/src/providers/form-builder-provider-context.d.ts +7 -0
- package/dist/src/providers/index.d.ts +6 -0
- package/dist/src/providers/navigation-provider.d.ts +2 -0
- package/dist/src/providers/theme-provider.d.ts +5 -0
- package/dist/src/providers/uploader-provider.d.ts +2 -0
- package/dist/src/styles/hero.d.ts +2 -0
- package/dist/src/types/components/atoms/brand.d.ts +12 -0
- package/dist/src/types/components/atoms/color-picker/color-picker.d.ts +10 -0
- package/dist/src/types/components/atoms/color-picker/index.d.ts +1 -0
- package/dist/src/types/components/atoms/column.d.ts +2 -0
- package/dist/src/types/components/atoms/container.d.ts +2 -0
- package/dist/src/types/components/atoms/field/field.d.ts +36 -0
- package/dist/src/types/components/atoms/field/index.d.ts +1 -0
- package/dist/src/types/components/atoms/filter/filter.d.ts +35 -0
- package/dist/src/types/components/atoms/filter/index.d.ts +2 -0
- package/dist/src/types/components/atoms/filter/select-filter.d.ts +7 -0
- package/dist/src/types/components/atoms/index.d.ts +9 -0
- package/dist/src/types/components/atoms/portal.d.ts +5 -0
- package/dist/src/types/components/atoms/row.d.ts +2 -0
- package/dist/src/types/components/atoms/uploader.d.ts +84 -0
- package/dist/src/types/components/index.d.ts +4 -0
- package/dist/src/types/components/molecules/footer/footer.d.ts +60 -0
- package/dist/src/types/components/molecules/footer/index.d.ts +1 -0
- package/dist/src/types/components/molecules/header/header.d.ts +38 -0
- package/dist/src/types/components/molecules/header/index.d.ts +1 -0
- package/dist/src/types/components/molecules/index.d.ts +9 -0
- package/dist/src/types/components/molecules/item-card/index.d.ts +1 -0
- package/dist/src/types/components/molecules/item-card/item-card.d.ts +57 -0
- package/dist/src/types/components/molecules/item-details/index.d.ts +1 -0
- package/dist/src/types/components/molecules/item-details/item-details.d.ts +7 -0
- package/dist/src/types/components/molecules/listings/index.d.ts +1 -0
- package/dist/src/types/components/molecules/listings/listings.d.ts +22 -0
- package/dist/src/types/components/molecules/nav-bar/index.d.ts +1 -0
- package/dist/src/types/components/molecules/nav-bar/nav-bar.d.ts +45 -0
- package/dist/src/types/components/molecules/scaffold/index.d.ts +1 -0
- package/dist/src/types/components/molecules/scaffold/scaffold.d.ts +7 -0
- package/dist/src/types/components/molecules/side-bar/index.d.ts +1 -0
- package/dist/src/types/components/molecules/side-bar/side-bar.d.ts +36 -0
- package/dist/src/types/components/molecules/theme-switch/index.d.ts +1 -0
- package/dist/src/types/components/molecules/theme-switch/theme-switch.d.ts +7 -0
- package/dist/src/types/components/organisms/deletion-confirmor/deletion-confirmor.d.ts +20 -0
- package/dist/src/types/components/organisms/deletion-confirmor/index.d.ts +1 -0
- package/dist/src/types/components/organisms/filters/filters.d.ts +9 -0
- package/dist/src/types/components/organisms/filters/index.d.ts +1 -0
- package/dist/src/types/components/organisms/form-builder/context.d.ts +5 -0
- package/dist/src/types/components/organisms/form-builder/form-builder.d.ts +26 -0
- package/dist/src/types/components/organisms/form-builder/index.d.ts +2 -0
- package/dist/src/types/components/organisms/index.d.ts +3 -0
- package/dist/src/types/components/templates/index.d.ts +1 -0
- package/dist/src/types/components/templates/landing-page.d.ts +8 -0
- package/dist/src/types/context/config.d.ts +19 -0
- package/dist/src/types/context/index.d.ts +4 -0
- package/dist/src/types/context/localization.d.ts +17 -0
- package/dist/src/types/context/navigation.d.ts +15 -0
- package/dist/src/types/context/theme.d.ts +32 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/shared/components.d.ts +10 -0
- package/dist/src/types/shared/index.d.ts +1 -0
- package/dist/src/utils/cn.d.ts +2 -0
- package/dist/src/utils/compress-images.d.ts +2 -0
- package/dist/src/utils/index.d.ts +5 -0
- package/dist/src/utils/locales.d.ts +10 -0
- package/dist/src/utils/storybook.d.ts +4 -0
- package/dist/src/utils/uploader.d.ts +40 -0
- package/package.json +3 -3
- package/dist/index.d.ts +0 -1357
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export * from './context';
|
|
4
|
+
export * from './examples';
|
|
5
|
+
export * from './hooks';
|
|
6
|
+
export * from './providers';
|
|
7
|
+
export type * from './types';
|
|
8
|
+
export * from './utils';
|
|
9
|
+
export * from './mocks';
|
|
10
|
+
export * from './enums';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MockItemCategory, MockItemBrand, MockColor } from './types';
|
|
2
|
+
export declare const MOCK_ITEM_CATEGORIES: MockItemCategory[];
|
|
3
|
+
export declare const MOCK_ITEM_BRANDS: MockItemBrand[];
|
|
4
|
+
export declare const MOCK_COLORS: MockColor[];
|
|
5
|
+
export declare const MOCK_BASE_DATE: Date;
|
|
6
|
+
export declare const MOCK_REVIEW_COMMENTS: readonly string[];
|
|
7
|
+
export declare const MOCK_REVIEW_AUTHORS: string[];
|
|
8
|
+
export declare const MOCK_LISTING_TITLES: string[];
|
|
9
|
+
export declare const MOCK_LISTING_DESCRIPTIONS: string[];
|
|
10
|
+
export declare const MOCK_LISTING_IMAGES: string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Default delay in ms for mock awaiting delete (e.g. in Storybook). */
|
|
2
|
+
export declare const MOCK_AWAITING_DELETE_MS = 2000;
|
|
3
|
+
/**
|
|
4
|
+
* Mocks an async delete: returns a function that resolves after a delay then calls onClose.
|
|
5
|
+
* Used for Storybook to simulate confirm-button loading state.
|
|
6
|
+
*/
|
|
7
|
+
export declare const mockAwaitingDelete: (onClose: () => void, delayMs?: number) => () => Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SideBarAction, NavigationItem } from '../types';
|
|
2
|
+
export declare const MOCK_HEADER_SUB_ITEMS: NavigationItem[];
|
|
3
|
+
export declare const MOCK_HEADER_ITEMS: NavigationItem[];
|
|
4
|
+
export declare const MOCK_HEADER_ITEMS_WITH_SUB_ITEMS: NavigationItem[];
|
|
5
|
+
export declare const MOCK_HEADER_ACTIONS: SideBarAction[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MockReview, MockItemType } from './types';
|
|
2
|
+
export declare const MOCK_ITEM_REVIEWS_1: MockReview[];
|
|
3
|
+
export declare const MOCK_ITEM_REVIEWS_2: MockReview[];
|
|
4
|
+
export declare const MOCK_ITEM_REVIEWS_3: MockReview[];
|
|
5
|
+
export declare const MOCK_LISTINGS: MockItemType[];
|
|
6
|
+
export declare const getListings: ({ page, pageSize, }: {
|
|
7
|
+
page?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
items: MockItemType[];
|
|
11
|
+
}>;
|
|
12
|
+
export declare const getListing: () => Promise<{
|
|
13
|
+
item?: MockItemType | null | undefined;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './uploader';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ItemChipProps } from '../types';
|
|
2
|
+
export type MockItemCategory = "laptops" | "desktops" | "monitors" | "keyboards" | "mice" | "headsets" | "printers" | "storage" | "components" | "networking";
|
|
3
|
+
export type MockColor = "red" | "blue" | "green" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white";
|
|
4
|
+
export type MockItemBrand = "Apple" | "Dell" | "HP" | "Lenovo" | "Asus" | "Acer" | "MSI" | "Razer" | "Samsung" | "Microsoft";
|
|
5
|
+
export type MockReview = {
|
|
6
|
+
id: number;
|
|
7
|
+
rating: number;
|
|
8
|
+
comment: string;
|
|
9
|
+
author: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
};
|
|
13
|
+
export type MockItemType = {
|
|
14
|
+
id: number;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
image: string;
|
|
18
|
+
price: number;
|
|
19
|
+
categories: ItemChipProps[];
|
|
20
|
+
isAvailable: boolean;
|
|
21
|
+
isBestSeller: boolean;
|
|
22
|
+
averageRating: number;
|
|
23
|
+
reviews: MockReview[];
|
|
24
|
+
brand: MockItemBrand;
|
|
25
|
+
color: MockColor;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { FormBuilderValue } from '../types';
|
|
4
|
+
export declare function FormBuilderProvider<TSchema extends FieldValues>({ children, value, }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
value: FormBuilderValue<TSchema>;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputProps } from '@heroui/input';
|
|
2
|
+
import { SelectProps } from '@heroui/select';
|
|
3
|
+
export type ColorPickerInputType = "free" | "preset";
|
|
4
|
+
export type ColorPickerProps = Omit<InputProps & SelectProps, "onChange" | "onValueChange" | "onSelectionChange" | "children" | "selectedKeys" | "defaultSelectedKeys" | "value"> & {
|
|
5
|
+
inputType: ColorPickerInputType;
|
|
6
|
+
presets?: string[];
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './color-picker';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SharedComponentProps } from '../../..';
|
|
2
|
+
import { AutocompleteItemProps, AutocompleteProps } from '@heroui/autocomplete';
|
|
3
|
+
import { CheckboxProps } from '@heroui/checkbox';
|
|
4
|
+
import { InputProps, TextAreaProps } from '@heroui/input';
|
|
5
|
+
import { RadioGroupProps } from '@heroui/radio';
|
|
6
|
+
import { SelectItemProps, SelectProps } from '@heroui/select';
|
|
7
|
+
import { SwitchProps } from '@heroui/switch';
|
|
8
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
9
|
+
export type FieldClassnames = {
|
|
10
|
+
base?: string;
|
|
11
|
+
field?: string;
|
|
12
|
+
};
|
|
13
|
+
export type FieldType = "input" | "textarea" | "checkbox" | "select" | "autocomplete" | "switch" | "radio";
|
|
14
|
+
export type FieldOption = {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
type FieldTypesProps = {
|
|
19
|
+
inputProps?: InputProps;
|
|
20
|
+
textareaProps?: TextAreaProps;
|
|
21
|
+
checkboxProps?: CheckboxProps;
|
|
22
|
+
selectProps?: Omit<SelectProps, "children" | "selectedKeys" | "onSelectionChange">;
|
|
23
|
+
selectItemProps?: SelectItemProps;
|
|
24
|
+
autocompleteProps?: Omit<AutocompleteProps, "children" | "selectedKey" | "onSelectionChange">;
|
|
25
|
+
autocompleteItemProps?: AutocompleteItemProps;
|
|
26
|
+
switchProps?: SwitchProps;
|
|
27
|
+
radioGroupProps?: Omit<RadioGroupProps, "children" | "value" | "onValueChange">;
|
|
28
|
+
};
|
|
29
|
+
type SharedFieldProps<TFieldValues extends FieldValues> = {
|
|
30
|
+
classNames?: FieldClassnames;
|
|
31
|
+
type: FieldType;
|
|
32
|
+
name: Path<TFieldValues>;
|
|
33
|
+
options?: FieldOption[];
|
|
34
|
+
};
|
|
35
|
+
export type FieldProps<TFieldValues extends FieldValues = FieldValues> = SharedComponentProps & FieldTypesProps & SharedFieldProps<TFieldValues>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './field';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SelectFilterProps, SharedComponentProps } from '../../..';
|
|
2
|
+
import { AutocompleteItemProps, AutocompleteProps } from '@heroui/autocomplete';
|
|
3
|
+
import { CheckboxGroupProps, CheckboxProps } from '@heroui/checkbox';
|
|
4
|
+
import { DatePickerProps } from '@heroui/date-picker';
|
|
5
|
+
import { InputProps } from '@heroui/input';
|
|
6
|
+
import { RadioProps } from '@heroui/radio';
|
|
7
|
+
import { SelectItemProps, SelectProps } from '@heroui/select';
|
|
8
|
+
import { SliderProps } from '@heroui/slider';
|
|
9
|
+
import { SwitchProps } from '@heroui/switch';
|
|
10
|
+
export type FilterClassnames = {
|
|
11
|
+
base?: string;
|
|
12
|
+
field?: string;
|
|
13
|
+
};
|
|
14
|
+
export type FilterType = "search" | "select" | "autocomplete" | "date" | "numeric" | "checkbox" | "checkboxGroup" | "switch" | "range";
|
|
15
|
+
type FilterTypesProps = {
|
|
16
|
+
searchProps?: InputProps;
|
|
17
|
+
selectProps?: Omit<SelectProps, "children">;
|
|
18
|
+
selectItemProps?: SelectItemProps;
|
|
19
|
+
autocompleteProps?: Omit<AutocompleteProps, "children">;
|
|
20
|
+
autocompleteItemProps?: AutocompleteItemProps;
|
|
21
|
+
dateProps?: DatePickerProps;
|
|
22
|
+
numericProps?: InputProps;
|
|
23
|
+
checkboxProps?: CheckboxProps;
|
|
24
|
+
checkboxGroupProps?: Omit<CheckboxGroupProps, "children">;
|
|
25
|
+
radioProps?: RadioProps;
|
|
26
|
+
switchProps?: SwitchProps;
|
|
27
|
+
rangeProps?: SliderProps;
|
|
28
|
+
};
|
|
29
|
+
type SharedFilterProps = {
|
|
30
|
+
classNames?: FilterClassnames;
|
|
31
|
+
type: FilterType;
|
|
32
|
+
paramKey: string;
|
|
33
|
+
};
|
|
34
|
+
export type FilterProps = SharedComponentProps & SelectFilterProps & FilterTypesProps & SharedFilterProps;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { SharedComponentProps } from '../..';
|
|
2
|
+
import { ModalProps } from '@heroui/modal';
|
|
3
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
4
|
+
import { Locale } from '../../../i18n';
|
|
5
|
+
export type UploaderProps = SharedComponentProps & UploaderContextState & {
|
|
6
|
+
className?: string;
|
|
7
|
+
hideListing?: boolean;
|
|
8
|
+
isAvatar?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type FileType = "image" | "doc" | "pdf" | "video" | "sheet";
|
|
11
|
+
export type FileObject = {
|
|
12
|
+
view?: string;
|
|
13
|
+
type?: FileType;
|
|
14
|
+
file?: File;
|
|
15
|
+
url?: string;
|
|
16
|
+
};
|
|
17
|
+
export type SharedFilesType = FileObject[];
|
|
18
|
+
export type SharedLabelIdType = string;
|
|
19
|
+
export type SharedOnInputChangeType = (event: React.ChangeEvent<HTMLInputElement> & React.DragEvent<HTMLLabelElement>) => Promise<void | string | null>;
|
|
20
|
+
export type UseUploadFileProps = {
|
|
21
|
+
labelId: string;
|
|
22
|
+
fileTypes: FileType[];
|
|
23
|
+
labelContent?: ReactNode;
|
|
24
|
+
isRequired?: boolean;
|
|
25
|
+
isMulti?: boolean;
|
|
26
|
+
isDraggable?: boolean;
|
|
27
|
+
maxCount?: number;
|
|
28
|
+
maxFileSize?: number;
|
|
29
|
+
compressFiles?: boolean;
|
|
30
|
+
preventDuplicates?: boolean;
|
|
31
|
+
onChange?: () => void;
|
|
32
|
+
locales?: Partial<Locale["atoms"]["uploader"]>;
|
|
33
|
+
};
|
|
34
|
+
export type UseUploadFileReturn = {
|
|
35
|
+
files: FileObject[];
|
|
36
|
+
fileTypes: FileType[];
|
|
37
|
+
labelId: string;
|
|
38
|
+
isRequired: boolean;
|
|
39
|
+
labelContent: ReactNode;
|
|
40
|
+
isDraggable: boolean;
|
|
41
|
+
isMulti: boolean;
|
|
42
|
+
isLoading: boolean;
|
|
43
|
+
setFiles: Dispatch<SetStateAction<FileObject[]>>;
|
|
44
|
+
handleClearFile: (fileName?: string) => void;
|
|
45
|
+
onInputChange: SharedOnInputChangeType;
|
|
46
|
+
locales?: Partial<Locale["atoms"]["uploader"]>;
|
|
47
|
+
};
|
|
48
|
+
export type UploaderContextState = {
|
|
49
|
+
selectedFile?: FileObject | null;
|
|
50
|
+
setSelectedFile?: (file: FileObject | null) => void;
|
|
51
|
+
labelId: SharedLabelIdType;
|
|
52
|
+
labelContent?: ReactNode;
|
|
53
|
+
avatarLabelContent?: ReactNode;
|
|
54
|
+
title?: ReactNode;
|
|
55
|
+
errorMessage?: ReactNode;
|
|
56
|
+
isFileViewable?: boolean;
|
|
57
|
+
isRequired?: boolean;
|
|
58
|
+
isDraggable?: boolean;
|
|
59
|
+
isLoading: boolean;
|
|
60
|
+
hideErrorMessage?: boolean;
|
|
61
|
+
isMulti: boolean;
|
|
62
|
+
placeholderImage?: string;
|
|
63
|
+
files: SharedFilesType;
|
|
64
|
+
fileTypes: FileType[];
|
|
65
|
+
onInputChange: SharedOnInputChangeType;
|
|
66
|
+
handleClearFile: (fileName?: string) => void;
|
|
67
|
+
setFiles?: Dispatch<SetStateAction<FileObject[]>>;
|
|
68
|
+
modal?: Omit<ModalProps, "children"> & {
|
|
69
|
+
onOpen?: () => void;
|
|
70
|
+
};
|
|
71
|
+
classNames?: {
|
|
72
|
+
label?: string;
|
|
73
|
+
avatar?: string;
|
|
74
|
+
listing?: string;
|
|
75
|
+
listingItem?: string;
|
|
76
|
+
error?: string;
|
|
77
|
+
input?: string;
|
|
78
|
+
title?: string;
|
|
79
|
+
};
|
|
80
|
+
locales?: Partial<Locale["atoms"]["uploader"]>;
|
|
81
|
+
};
|
|
82
|
+
export type UploaderProviderProps = UploaderContextState & {
|
|
83
|
+
children: ReactNode;
|
|
84
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { SharedComponentProps } from '../../..';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type FooterClassnames = {
|
|
4
|
+
base?: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
policiesWrapper?: string;
|
|
7
|
+
policy?: string;
|
|
8
|
+
quickLinksWrapper?: string;
|
|
9
|
+
quickLinksTitle?: string;
|
|
10
|
+
quickLinksList?: string;
|
|
11
|
+
quickLinksItem?: string;
|
|
12
|
+
quickLinksLink?: string;
|
|
13
|
+
socialLinksWrapper?: string;
|
|
14
|
+
socialLink?: string;
|
|
15
|
+
copyRightsWrapper?: string;
|
|
16
|
+
copyRightsText?: string;
|
|
17
|
+
contactsWrapper?: string;
|
|
18
|
+
contact?: string;
|
|
19
|
+
};
|
|
20
|
+
export type QuickLink = {
|
|
21
|
+
label: string;
|
|
22
|
+
href: string;
|
|
23
|
+
isExternal?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type QuickLinkCollection = {
|
|
26
|
+
title?: string;
|
|
27
|
+
links: QuickLink[];
|
|
28
|
+
};
|
|
29
|
+
export type SocialLink = {
|
|
30
|
+
label?: string;
|
|
31
|
+
href: string;
|
|
32
|
+
icon?: ReactNode;
|
|
33
|
+
isExternal?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type Address = {
|
|
36
|
+
country?: string;
|
|
37
|
+
street?: string;
|
|
38
|
+
city?: string;
|
|
39
|
+
state?: string;
|
|
40
|
+
zip?: string;
|
|
41
|
+
};
|
|
42
|
+
export type CopyRights = {
|
|
43
|
+
year: number;
|
|
44
|
+
text: string;
|
|
45
|
+
};
|
|
46
|
+
export type Contacts = {
|
|
47
|
+
mobile?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
addresses?: Address[];
|
|
50
|
+
website?: string;
|
|
51
|
+
workingHours?: string;
|
|
52
|
+
};
|
|
53
|
+
export type FooterProps = SharedComponentProps & {
|
|
54
|
+
classNames?: FooterClassnames;
|
|
55
|
+
policies?: QuickLink[];
|
|
56
|
+
quickLinks?: QuickLinkCollection[];
|
|
57
|
+
socialLinks?: SocialLink[];
|
|
58
|
+
copyRights?: CopyRights;
|
|
59
|
+
contacts?: Contacts;
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './footer';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SharedComponentProps } from '../../..';
|
|
2
|
+
export type HeaderClassnames = {
|
|
3
|
+
base?: string;
|
|
4
|
+
logo?: string;
|
|
5
|
+
navbar?: string;
|
|
6
|
+
userDropdown?: string;
|
|
7
|
+
sideMenu?: string;
|
|
8
|
+
};
|
|
9
|
+
export type HeaderActivations = {
|
|
10
|
+
hideLog?: boolean;
|
|
11
|
+
hideNavbar?: boolean;
|
|
12
|
+
hideUserDropdown?: boolean;
|
|
13
|
+
hideSideMenu?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type HeaderVariant = "default" | "floating" | "light" | "segmented-floating";
|
|
16
|
+
export type HeaderGlassEffect = {
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
blur?: number;
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
foregroundColor?: string;
|
|
21
|
+
opacity?: number;
|
|
22
|
+
};
|
|
23
|
+
export type HeaderProps = SharedComponentProps & {
|
|
24
|
+
variant?: HeaderVariant;
|
|
25
|
+
classNames?: HeaderClassnames;
|
|
26
|
+
glassEffect?: HeaderGlassEffect;
|
|
27
|
+
};
|
|
28
|
+
export type HeaderDropdownProps = SharedComponentProps & {};
|
|
29
|
+
export type UserDropdownProps = SharedComponentProps & {};
|
|
30
|
+
export type HeaderStylesProps = {
|
|
31
|
+
primaryColor?: string;
|
|
32
|
+
foregroundColor?: string;
|
|
33
|
+
variant?: HeaderVariant;
|
|
34
|
+
glassEffect?: HeaderGlassEffect;
|
|
35
|
+
};
|
|
36
|
+
export type SegmentedHeaderContentProps = SharedComponentProps & {
|
|
37
|
+
glassEffect?: HeaderGlassEffect;
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './header';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type * from './header';
|
|
2
|
+
export type * from './listings';
|
|
3
|
+
export type * from './nav-bar';
|
|
4
|
+
export type * from './side-bar';
|
|
5
|
+
export type * from './scaffold';
|
|
6
|
+
export type * from './footer';
|
|
7
|
+
export type * from './item-card';
|
|
8
|
+
export type * from './item-details';
|
|
9
|
+
export type * from './theme-switch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './item-card';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { SharedComponentProps } from '../../..';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Variants } from 'framer-motion';
|
|
4
|
+
import { ChipProps } from '@heroui/chip';
|
|
5
|
+
import { DropdownItemProps } from '@heroui/dropdown';
|
|
6
|
+
import { ButtonProps } from '@heroui/button';
|
|
7
|
+
export type ItemCardClassnames = {
|
|
8
|
+
base?: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
header?: string;
|
|
11
|
+
footer?: string;
|
|
12
|
+
imageWrapper?: string;
|
|
13
|
+
mainWrapper?: string;
|
|
14
|
+
banner?: string;
|
|
15
|
+
dropdown?: string;
|
|
16
|
+
body?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
price?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
chips?: string;
|
|
21
|
+
chip?: string;
|
|
22
|
+
actions?: string;
|
|
23
|
+
action?: string;
|
|
24
|
+
};
|
|
25
|
+
export type ItemCardAction = DropdownItemProps & ButtonProps & {
|
|
26
|
+
key: string;
|
|
27
|
+
label: string;
|
|
28
|
+
};
|
|
29
|
+
export type ItemCardHoverEffect = "none" | "zoom" | "rotate";
|
|
30
|
+
export type ItemCardOrientation = "horizontal" | "vertical";
|
|
31
|
+
export type ItemCardActionsViewVariant = "dropdown" | "buttons" | "hover-overlay";
|
|
32
|
+
export type ItemChipProps = ChipProps & {
|
|
33
|
+
label: string;
|
|
34
|
+
};
|
|
35
|
+
export type ItemProps = {
|
|
36
|
+
key: string;
|
|
37
|
+
title?: ReactNode;
|
|
38
|
+
description?: ReactNode;
|
|
39
|
+
image?: {
|
|
40
|
+
src: string;
|
|
41
|
+
alt: string;
|
|
42
|
+
};
|
|
43
|
+
chips?: ItemChipProps[];
|
|
44
|
+
banner?: ReactNode;
|
|
45
|
+
price?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
export type ItemCardProps = SharedComponentProps & {
|
|
48
|
+
variants?: Variants;
|
|
49
|
+
isLoading?: boolean;
|
|
50
|
+
hoverEffect?: ItemCardHoverEffect;
|
|
51
|
+
classNames?: ItemCardClassnames;
|
|
52
|
+
item: ItemProps;
|
|
53
|
+
actions?: ItemCardAction[];
|
|
54
|
+
onActionClick?: (key: string) => void;
|
|
55
|
+
orientation?: ItemCardOrientation;
|
|
56
|
+
actionsViewVariant?: ItemCardActionsViewVariant;
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './item-details';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './listings';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ItemCardAction, ItemCardProps, SharedComponentProps } from '../../..';
|
|
2
|
+
export type ListingsClassnames = {
|
|
3
|
+
base?: string;
|
|
4
|
+
item?: string;
|
|
5
|
+
pagination?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ListingsLayout = "grid" | "list" | "carousel";
|
|
8
|
+
export type ListingsProps = SharedComponentProps & {
|
|
9
|
+
classNames?: ListingsClassnames;
|
|
10
|
+
layout?: ListingsLayout;
|
|
11
|
+
items: ItemCardProps[];
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
actions?: ItemCardAction[];
|
|
14
|
+
onActionClick?: (key: string) => void;
|
|
15
|
+
pagination?: {
|
|
16
|
+
page: number;
|
|
17
|
+
setPage: (page: number) => void;
|
|
18
|
+
pageSize: number;
|
|
19
|
+
totalItemsCount: number;
|
|
20
|
+
pagesCount: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './nav-bar';
|