@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
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ItemCardProps } from "@/types";
|
|
4
|
-
import { cn } from "@/utils";
|
|
5
|
-
import {
|
|
6
|
-
itemBodyClasses,
|
|
7
|
-
itemDescriptionClasses,
|
|
8
|
-
itemPriceClasses,
|
|
9
|
-
itemTitleClasses,
|
|
10
|
-
ItemActionsDropdown,
|
|
11
|
-
} from "@/components";
|
|
12
|
-
import { CardBody } from "@heroui/card";
|
|
13
|
-
|
|
14
|
-
export function ItemCardBody({
|
|
15
|
-
item,
|
|
16
|
-
orientation,
|
|
17
|
-
classNames,
|
|
18
|
-
actions,
|
|
19
|
-
onActionClick,
|
|
20
|
-
actionsViewVariant = "dropdown",
|
|
21
|
-
}: Pick<
|
|
22
|
-
ItemCardProps,
|
|
23
|
-
| "item"
|
|
24
|
-
| "orientation"
|
|
25
|
-
| "classNames"
|
|
26
|
-
| "actions"
|
|
27
|
-
| "onActionClick"
|
|
28
|
-
| "actionsViewVariant"
|
|
29
|
-
>) {
|
|
30
|
-
return (
|
|
31
|
-
<CardBody
|
|
32
|
-
data-slot="emperor-ui-item-card-body"
|
|
33
|
-
className={cn(itemBodyClasses({ orientation }), classNames?.body)}
|
|
34
|
-
>
|
|
35
|
-
{item?.title && (
|
|
36
|
-
<h3
|
|
37
|
-
data-slot="emperor-ui-item-card-title"
|
|
38
|
-
className={cn(itemTitleClasses({ orientation }), classNames?.title)}
|
|
39
|
-
>
|
|
40
|
-
{item?.title}
|
|
41
|
-
</h3>
|
|
42
|
-
)}
|
|
43
|
-
|
|
44
|
-
{item?.description && (
|
|
45
|
-
<p
|
|
46
|
-
data-slot="emperor-ui-item-card-description"
|
|
47
|
-
className={cn(
|
|
48
|
-
itemDescriptionClasses({ orientation }),
|
|
49
|
-
classNames?.description,
|
|
50
|
-
)}
|
|
51
|
-
>
|
|
52
|
-
{item?.description}
|
|
53
|
-
</p>
|
|
54
|
-
)}
|
|
55
|
-
|
|
56
|
-
{item?.price && (
|
|
57
|
-
<p
|
|
58
|
-
data-slot="emperor-ui-item-card-price"
|
|
59
|
-
className={cn(itemPriceClasses({ orientation }), classNames?.price)}
|
|
60
|
-
>
|
|
61
|
-
{item?.price}
|
|
62
|
-
</p>
|
|
63
|
-
)}
|
|
64
|
-
|
|
65
|
-
{orientation === "horizontal" && actionsViewVariant === "dropdown" && (
|
|
66
|
-
<ItemActionsDropdown
|
|
67
|
-
actions={actions}
|
|
68
|
-
classNames={classNames}
|
|
69
|
-
onActionClick={onActionClick}
|
|
70
|
-
/>
|
|
71
|
-
)}
|
|
72
|
-
</CardBody>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ItemCardProps } from "@/types";
|
|
4
|
-
import { cn } from "@/utils";
|
|
5
|
-
import {
|
|
6
|
-
ItemActionsButtons,
|
|
7
|
-
itemFooterClasses,
|
|
8
|
-
itemChipsClasses,
|
|
9
|
-
} from "@/components";
|
|
10
|
-
import { CardFooter } from "@heroui/card";
|
|
11
|
-
import { Chip } from "@heroui/chip";
|
|
12
|
-
|
|
13
|
-
export function ItemCardFooter({
|
|
14
|
-
item,
|
|
15
|
-
orientation,
|
|
16
|
-
classNames,
|
|
17
|
-
actions,
|
|
18
|
-
onActionClick,
|
|
19
|
-
actionsViewVariant = "dropdown",
|
|
20
|
-
}: Pick<
|
|
21
|
-
ItemCardProps,
|
|
22
|
-
| "item"
|
|
23
|
-
| "orientation"
|
|
24
|
-
| "classNames"
|
|
25
|
-
| "actions"
|
|
26
|
-
| "onActionClick"
|
|
27
|
-
| "actionsViewVariant"
|
|
28
|
-
>) {
|
|
29
|
-
return (
|
|
30
|
-
<CardFooter
|
|
31
|
-
data-slot="emperor-ui-item-card-footer"
|
|
32
|
-
className={cn(itemFooterClasses({ orientation }), classNames?.footer)}
|
|
33
|
-
>
|
|
34
|
-
{item?.chips && item?.chips?.length > 0 && (
|
|
35
|
-
<menu
|
|
36
|
-
data-slot="emperor-ui-item-card-chips"
|
|
37
|
-
className={cn(itemChipsClasses({ orientation }), classNames?.chips)}
|
|
38
|
-
>
|
|
39
|
-
{item?.chips?.map(
|
|
40
|
-
(
|
|
41
|
-
{
|
|
42
|
-
label,
|
|
43
|
-
className: chipClassName,
|
|
44
|
-
classNames: chipClassNames,
|
|
45
|
-
...props
|
|
46
|
-
},
|
|
47
|
-
index,
|
|
48
|
-
) => (
|
|
49
|
-
<Chip
|
|
50
|
-
key={index}
|
|
51
|
-
data-slot="emperor-ui-item-card-chip"
|
|
52
|
-
className={cn(chipClassName, classNames?.chip)}
|
|
53
|
-
classNames={{
|
|
54
|
-
content: "text-xs mx-1",
|
|
55
|
-
...chipClassNames,
|
|
56
|
-
}}
|
|
57
|
-
size="sm"
|
|
58
|
-
variant="flat"
|
|
59
|
-
color="primary"
|
|
60
|
-
{...props}
|
|
61
|
-
>
|
|
62
|
-
{label}
|
|
63
|
-
</Chip>
|
|
64
|
-
),
|
|
65
|
-
)}
|
|
66
|
-
</menu>
|
|
67
|
-
)}
|
|
68
|
-
|
|
69
|
-
{actionsViewVariant === "buttons" && actions && actions?.length > 0 && (
|
|
70
|
-
<ItemActionsButtons
|
|
71
|
-
actions={actions}
|
|
72
|
-
classNames={classNames}
|
|
73
|
-
onActionClick={onActionClick}
|
|
74
|
-
className="ml-auto"
|
|
75
|
-
/>
|
|
76
|
-
)}
|
|
77
|
-
</CardFooter>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { CardHeader } from "@heroui/card";
|
|
4
|
-
import { cn } from "@/utils";
|
|
5
|
-
import {
|
|
6
|
-
itemHeaderClasses,
|
|
7
|
-
ItemActionsDropdown,
|
|
8
|
-
itemImageWrapperClasses,
|
|
9
|
-
ItemBanner,
|
|
10
|
-
} from "@/components";
|
|
11
|
-
import { Image } from "@heroui/image";
|
|
12
|
-
import type { ItemCardProps } from "@/types";
|
|
13
|
-
|
|
14
|
-
export function ItemCardHeader({
|
|
15
|
-
item,
|
|
16
|
-
orientation,
|
|
17
|
-
classNames,
|
|
18
|
-
actions,
|
|
19
|
-
onActionClick,
|
|
20
|
-
actionsViewVariant = "dropdown",
|
|
21
|
-
}: Pick<
|
|
22
|
-
ItemCardProps,
|
|
23
|
-
| "item"
|
|
24
|
-
| "orientation"
|
|
25
|
-
| "classNames"
|
|
26
|
-
| "actions"
|
|
27
|
-
| "onActionClick"
|
|
28
|
-
| "actionsViewVariant"
|
|
29
|
-
>) {
|
|
30
|
-
return (
|
|
31
|
-
<CardHeader
|
|
32
|
-
data-slot="emperor-ui-item-card-header"
|
|
33
|
-
className={cn(itemHeaderClasses({ orientation }), classNames?.header)}
|
|
34
|
-
>
|
|
35
|
-
{item?.image && (
|
|
36
|
-
<div
|
|
37
|
-
data-slot="emperor-ui-item-card-image-wrapper"
|
|
38
|
-
className={cn(
|
|
39
|
-
itemImageWrapperClasses({ orientation }),
|
|
40
|
-
classNames?.imageWrapper,
|
|
41
|
-
)}
|
|
42
|
-
>
|
|
43
|
-
<Image
|
|
44
|
-
data-slot="emperor-ui-item-card-image"
|
|
45
|
-
src={item?.image?.src}
|
|
46
|
-
alt={item?.image?.alt}
|
|
47
|
-
className={cn("size-full object-cover", classNames?.image)}
|
|
48
|
-
radius="none"
|
|
49
|
-
removeWrapper
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
)}
|
|
53
|
-
|
|
54
|
-
<ItemBanner
|
|
55
|
-
item={item}
|
|
56
|
-
orientation={orientation}
|
|
57
|
-
classNames={classNames}
|
|
58
|
-
/>
|
|
59
|
-
|
|
60
|
-
{orientation === "vertical" && actionsViewVariant === "dropdown" && (
|
|
61
|
-
<ItemActionsDropdown
|
|
62
|
-
actions={actions}
|
|
63
|
-
classNames={classNames}
|
|
64
|
-
onActionClick={onActionClick}
|
|
65
|
-
/>
|
|
66
|
-
)}
|
|
67
|
-
</CardHeader>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
ItemCardActionsViewVariant,
|
|
5
|
-
ItemCardOrientation,
|
|
6
|
-
ItemCardProps,
|
|
7
|
-
} from "@/types";
|
|
8
|
-
import { cn } from "@/utils";
|
|
9
|
-
import { Card } from "@heroui/card";
|
|
10
|
-
import { motion } from "framer-motion";
|
|
11
|
-
import {
|
|
12
|
-
itemMainWrapperClasses,
|
|
13
|
-
itemCardMotionClasses,
|
|
14
|
-
ItemActionsOverlay,
|
|
15
|
-
} from "@/components";
|
|
16
|
-
import { getCardMotion } from "@/constants";
|
|
17
|
-
import {
|
|
18
|
-
LoadingItem,
|
|
19
|
-
ItemCardHeader,
|
|
20
|
-
ItemCardBody,
|
|
21
|
-
ItemCardFooter,
|
|
22
|
-
} from "@/components";
|
|
23
|
-
import { useWindowSize } from "@/hooks";
|
|
24
|
-
|
|
25
|
-
export function ItemCard({
|
|
26
|
-
variants,
|
|
27
|
-
isLoading = false,
|
|
28
|
-
className,
|
|
29
|
-
classNames,
|
|
30
|
-
item,
|
|
31
|
-
actions = [],
|
|
32
|
-
hoverEffect = "none",
|
|
33
|
-
onActionClick,
|
|
34
|
-
orientation: defaultOrientation = "vertical",
|
|
35
|
-
actionsViewVariant = "dropdown",
|
|
36
|
-
}: ItemCardProps) {
|
|
37
|
-
const { isExtraSmallDevice } = useWindowSize();
|
|
38
|
-
|
|
39
|
-
const orientation: ItemCardOrientation = isExtraSmallDevice
|
|
40
|
-
? "vertical"
|
|
41
|
-
: defaultOrientation;
|
|
42
|
-
|
|
43
|
-
if (isLoading)
|
|
44
|
-
return (
|
|
45
|
-
<LoadingItem
|
|
46
|
-
className={className}
|
|
47
|
-
classNames={classNames}
|
|
48
|
-
orientation={orientation}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
const hasActions = actions && actions.length > 0;
|
|
53
|
-
|
|
54
|
-
const isDropdownVariant: boolean =
|
|
55
|
-
(actionsViewVariant as ItemCardActionsViewVariant) === "dropdown";
|
|
56
|
-
|
|
57
|
-
const isHoverOverlayVariant: boolean =
|
|
58
|
-
(actionsViewVariant as ItemCardActionsViewVariant) === "hover-overlay";
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<motion.div
|
|
62
|
-
data-slot="emperor-ui-item-card"
|
|
63
|
-
className={cn(
|
|
64
|
-
itemCardMotionClasses({ orientation }),
|
|
65
|
-
"group",
|
|
66
|
-
classNames?.base,
|
|
67
|
-
className,
|
|
68
|
-
)}
|
|
69
|
-
variants={variants}
|
|
70
|
-
{...getCardMotion({ hoverEffect })}
|
|
71
|
-
>
|
|
72
|
-
<Card
|
|
73
|
-
shadow="sm"
|
|
74
|
-
data-slot="emperor-ui-item-card-main-wrapper"
|
|
75
|
-
className={cn(
|
|
76
|
-
itemMainWrapperClasses({ orientation }),
|
|
77
|
-
"relative overflow-hidden",
|
|
78
|
-
classNames?.mainWrapper,
|
|
79
|
-
)}
|
|
80
|
-
>
|
|
81
|
-
<ItemCardHeader
|
|
82
|
-
item={item}
|
|
83
|
-
orientation={orientation}
|
|
84
|
-
classNames={classNames}
|
|
85
|
-
actions={actions}
|
|
86
|
-
onActionClick={onActionClick}
|
|
87
|
-
actionsViewVariant={
|
|
88
|
-
isDropdownVariant ? "dropdown" : actionsViewVariant
|
|
89
|
-
}
|
|
90
|
-
/>
|
|
91
|
-
|
|
92
|
-
<ItemCardBody
|
|
93
|
-
item={item}
|
|
94
|
-
orientation={orientation}
|
|
95
|
-
classNames={classNames}
|
|
96
|
-
actions={actions}
|
|
97
|
-
onActionClick={onActionClick}
|
|
98
|
-
actionsViewVariant={
|
|
99
|
-
isDropdownVariant ? "dropdown" : actionsViewVariant
|
|
100
|
-
}
|
|
101
|
-
/>
|
|
102
|
-
|
|
103
|
-
<ItemCardFooter
|
|
104
|
-
item={item}
|
|
105
|
-
orientation={orientation}
|
|
106
|
-
classNames={classNames}
|
|
107
|
-
actions={actions}
|
|
108
|
-
onActionClick={onActionClick}
|
|
109
|
-
actionsViewVariant={actionsViewVariant}
|
|
110
|
-
/>
|
|
111
|
-
|
|
112
|
-
{isHoverOverlayVariant && hasActions && (
|
|
113
|
-
<ItemActionsOverlay
|
|
114
|
-
actions={actions}
|
|
115
|
-
classNames={classNames}
|
|
116
|
-
onActionClick={onActionClick}
|
|
117
|
-
orientation={orientation}
|
|
118
|
-
/>
|
|
119
|
-
)}
|
|
120
|
-
</Card>
|
|
121
|
-
</motion.div>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
import type { MockItemType } from "@/mocks";
|
|
3
|
-
import { ItemCard } from "@/components";
|
|
4
|
-
import { getStorybookDecorators } from "@/utils";
|
|
5
|
-
import { getListing, MOCK_LISTINGS } from "@/mocks";
|
|
6
|
-
import { useEffect, useState } from "storybook/internal/preview-api";
|
|
7
|
-
import { ItemCardProps } from "@/types";
|
|
8
|
-
import { ITEM_CARD_ACTIONS } from "@/constants";
|
|
9
|
-
|
|
10
|
-
const meta: Meta<typeof ItemCard> = {
|
|
11
|
-
title: "Molecules/Item Card",
|
|
12
|
-
component: ItemCard,
|
|
13
|
-
parameters: {
|
|
14
|
-
layout: "centered",
|
|
15
|
-
},
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
decorators: getStorybookDecorators({
|
|
18
|
-
config: {
|
|
19
|
-
layout: {
|
|
20
|
-
withScaffold: false,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default meta;
|
|
27
|
-
|
|
28
|
-
type Story = StoryObj<typeof meta>;
|
|
29
|
-
|
|
30
|
-
export const Default: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
item: {
|
|
33
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
34
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
35
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
36
|
-
image: {
|
|
37
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
38
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const WithLoading: Story = {
|
|
45
|
-
args: {},
|
|
46
|
-
render: () => {
|
|
47
|
-
const [item, setItem] = useState<MockItemType | null | undefined>(null);
|
|
48
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
49
|
-
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
(async () => {
|
|
52
|
-
const { item } = await getListing();
|
|
53
|
-
|
|
54
|
-
setItem(item);
|
|
55
|
-
setIsLoading(false);
|
|
56
|
-
})();
|
|
57
|
-
}, []);
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<ItemCard
|
|
61
|
-
isLoading={isLoading}
|
|
62
|
-
item={{
|
|
63
|
-
key: String(item?.id),
|
|
64
|
-
title: item?.title,
|
|
65
|
-
description: item?.description,
|
|
66
|
-
image: { src: item?.image || "", alt: item?.title || "" },
|
|
67
|
-
}}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const WithHorizontalLoading: Story = {
|
|
74
|
-
args: {
|
|
75
|
-
orientation: "horizontal",
|
|
76
|
-
},
|
|
77
|
-
render: (args: ItemCardProps) => {
|
|
78
|
-
const [item, setItem] = useState<MockItemType | null | undefined>(null);
|
|
79
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
80
|
-
|
|
81
|
-
useEffect(() => {
|
|
82
|
-
(async () => {
|
|
83
|
-
const { item } = await getListing();
|
|
84
|
-
|
|
85
|
-
setItem(item);
|
|
86
|
-
setIsLoading(false);
|
|
87
|
-
})();
|
|
88
|
-
}, []);
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<ItemCard
|
|
92
|
-
{...args}
|
|
93
|
-
isLoading={isLoading}
|
|
94
|
-
item={{
|
|
95
|
-
key: String(item?.id),
|
|
96
|
-
title: item?.title,
|
|
97
|
-
description: item?.description,
|
|
98
|
-
image: { src: item?.image || "", alt: item?.title || "" },
|
|
99
|
-
}}
|
|
100
|
-
/>
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const WithDropdownActions: Story = {
|
|
106
|
-
args: {
|
|
107
|
-
item: {
|
|
108
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
109
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
110
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
111
|
-
image: {
|
|
112
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
113
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
actions: ITEM_CARD_ACTIONS,
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export const WithButtonsActions: Story = {
|
|
121
|
-
args: {
|
|
122
|
-
item: {
|
|
123
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
124
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
125
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
126
|
-
image: {
|
|
127
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
128
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
actions: ITEM_CARD_ACTIONS,
|
|
132
|
-
actionsViewVariant: "buttons",
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export const WithHoverOverlayActions: Story = {
|
|
137
|
-
args: {
|
|
138
|
-
item: {
|
|
139
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
140
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
141
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
142
|
-
image: {
|
|
143
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
144
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
actions: ITEM_CARD_ACTIONS?.map((action) => ({
|
|
148
|
-
...action,
|
|
149
|
-
variant: "solid",
|
|
150
|
-
size: "lg",
|
|
151
|
-
})),
|
|
152
|
-
actionsViewVariant: "hover-overlay",
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export const WithChips: Story = {
|
|
157
|
-
args: {
|
|
158
|
-
item: {
|
|
159
|
-
key: String(MOCK_LISTINGS[2]?.id),
|
|
160
|
-
title: MOCK_LISTINGS[2]?.title,
|
|
161
|
-
description: MOCK_LISTINGS[2]?.description,
|
|
162
|
-
image: {
|
|
163
|
-
src: MOCK_LISTINGS[2]?.image || "",
|
|
164
|
-
alt: MOCK_LISTINGS[2]?.title || "",
|
|
165
|
-
},
|
|
166
|
-
chips: MOCK_LISTINGS[2]?.categories,
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export const WithBanner: Story = {
|
|
172
|
-
args: {
|
|
173
|
-
item: {
|
|
174
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
175
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
176
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
177
|
-
image: {
|
|
178
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
179
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
180
|
-
},
|
|
181
|
-
banner: MOCK_LISTINGS[0]?.isBestSeller ? "Best Seller" : undefined,
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
export const WithPrice: Story = {
|
|
187
|
-
args: {
|
|
188
|
-
item: {
|
|
189
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
190
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
191
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
192
|
-
price: `$ ${MOCK_LISTINGS[0]?.price}`,
|
|
193
|
-
image: {
|
|
194
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
195
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
export const Horizontal: Story = {
|
|
202
|
-
args: {
|
|
203
|
-
orientation: "horizontal",
|
|
204
|
-
actions: ITEM_CARD_ACTIONS,
|
|
205
|
-
item: {
|
|
206
|
-
key: String(MOCK_LISTINGS[0]?.id),
|
|
207
|
-
title: MOCK_LISTINGS[0]?.title,
|
|
208
|
-
description: MOCK_LISTINGS[0]?.description,
|
|
209
|
-
image: {
|
|
210
|
-
src: MOCK_LISTINGS[0]?.image || "",
|
|
211
|
-
alt: MOCK_LISTINGS[0]?.title || "",
|
|
212
|
-
},
|
|
213
|
-
banner: MOCK_LISTINGS[0]?.isBestSeller ? "Best Seller" : undefined,
|
|
214
|
-
chips: MOCK_LISTINGS[0]?.categories,
|
|
215
|
-
price: `$ ${MOCK_LISTINGS[0]?.price}`,
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
export const itemCardMotionClasses = cva(["w-full relative"], {
|
|
4
|
-
variants: {
|
|
5
|
-
orientation: {
|
|
6
|
-
vertical: "max-w-80",
|
|
7
|
-
horizontal: "min-w-full max-w-full",
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
defaultVariants: {},
|
|
11
|
-
compoundVariants: [],
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export const itemMainWrapperClasses = cva(["size-full"], {
|
|
15
|
-
variants: {
|
|
16
|
-
orientation: {
|
|
17
|
-
vertical: "flex flex-col",
|
|
18
|
-
horizontal: "grid grid-cols-[200px_auto]",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {},
|
|
22
|
-
compoundVariants: [],
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const itemImageWrapperClasses = cva(
|
|
26
|
-
["relative aspect-4/3 overflow-hidden"],
|
|
27
|
-
{
|
|
28
|
-
variants: {
|
|
29
|
-
orientation: {
|
|
30
|
-
vertical: "w-full",
|
|
31
|
-
horizontal: "w-fit h-full",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {},
|
|
35
|
-
compoundVariants: [],
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
export const itemHeaderClasses = cva(["relative p-0"], {
|
|
40
|
-
variants: {
|
|
41
|
-
orientation: {
|
|
42
|
-
vertical: "",
|
|
43
|
-
horizontal: "row-span-2",
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {},
|
|
47
|
-
compoundVariants: [],
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export const itemBodyClasses = cva(["relative flex flex-col gap-2 p-4"], {
|
|
51
|
-
variants: {
|
|
52
|
-
orientation: {
|
|
53
|
-
vertical: "",
|
|
54
|
-
horizontal: "",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
defaultVariants: {},
|
|
58
|
-
compoundVariants: [],
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export const itemFooterClasses = cva(
|
|
62
|
-
["flex flex-wrap flex-col p-4 gap-4 items-start"],
|
|
63
|
-
{
|
|
64
|
-
variants: {
|
|
65
|
-
orientation: {
|
|
66
|
-
vertical: "",
|
|
67
|
-
horizontal: "justify-end",
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
defaultVariants: {},
|
|
71
|
-
compoundVariants: [],
|
|
72
|
-
},
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
export const itemTitleClasses = cva(
|
|
76
|
-
["line-clamp-1 font-semibold text-foreground"],
|
|
77
|
-
{
|
|
78
|
-
variants: {
|
|
79
|
-
orientation: {
|
|
80
|
-
vertical: "",
|
|
81
|
-
horizontal: "w-[calc(100%-30px)]",
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
defaultVariants: {},
|
|
85
|
-
compoundVariants: [],
|
|
86
|
-
},
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
export const itemPriceClasses = cva(["text-2xl font-bold text-foreground"], {
|
|
90
|
-
variants: {
|
|
91
|
-
orientation: {
|
|
92
|
-
vertical: "",
|
|
93
|
-
horizontal: "",
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
defaultVariants: {},
|
|
97
|
-
compoundVariants: [],
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
export const itemDescriptionClasses = cva(
|
|
101
|
-
["line-clamp-2 text-sm text-default-600"],
|
|
102
|
-
{
|
|
103
|
-
variants: {
|
|
104
|
-
orientation: {
|
|
105
|
-
vertical: "",
|
|
106
|
-
horizontal: "",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
defaultVariants: {},
|
|
110
|
-
compoundVariants: [],
|
|
111
|
-
},
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
export const itemChipsClasses = cva(["flex flex-wrap items-center gap-2 p-1"], {
|
|
115
|
-
variants: {
|
|
116
|
-
orientation: {
|
|
117
|
-
vertical: "",
|
|
118
|
-
horizontal: "",
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
defaultVariants: {},
|
|
122
|
-
compoundVariants: [],
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
export const itemBannerClasses = cva(
|
|
126
|
-
[
|
|
127
|
-
"absolute left-0 top-0 z-10 px-2 py-1 text-xs font-semibold",
|
|
128
|
-
"bg-primary-500/50 backdrop-blur-sm text-center flex justify-center items-center",
|
|
129
|
-
"-rotate-45 w-full text-white",
|
|
130
|
-
],
|
|
131
|
-
{
|
|
132
|
-
variants: {
|
|
133
|
-
orientation: {
|
|
134
|
-
vertical: "-translate-x-28 translate-y-7",
|
|
135
|
-
horizontal: "-translate-x-14 translate-y-7",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
defaultVariants: {},
|
|
139
|
-
compoundVariants: [],
|
|
140
|
-
},
|
|
141
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./classes";
|