@heroui/card 2.2.25 → 2.2.26
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/card-body.js +2 -2
- package/dist/card-body.mjs +1 -1
- package/dist/card-footer.js +2 -2
- package/dist/card-footer.mjs +1 -1
- package/dist/card-header.js +2 -2
- package/dist/card-header.mjs +1 -1
- package/dist/card.js +1 -1
- package/dist/card.mjs +2 -2
- package/dist/{chunk-D5XJWRAV.mjs → chunk-C6WKGNND.mjs} +2 -2
- package/dist/{chunk-TE6SZS6W.mjs → chunk-NDVZOYT4.mjs} +2 -2
- package/dist/{chunk-O24IAYCG.mjs → chunk-QNLCCAKT.mjs} +1 -1
- package/dist/{chunk-LGSBTEIA.mjs → chunk-SAEUDNWW.mjs} +2 -2
- package/dist/{chunk-DHMIPUUY.mjs → chunk-XDYPEWNC.mjs} +3 -3
- package/dist/index.js +7 -7
- package/dist/index.mjs +5 -5
- package/dist/use-card.js +1 -1
- package/dist/use-card.mjs +1 -1
- package/package.json +3 -3
package/dist/card-body.js
CHANGED
|
@@ -26,7 +26,7 @@ __export(card_body_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(card_body_exports);
|
|
27
27
|
var import_system = require("@heroui/system");
|
|
28
28
|
var import_react_utils2 = require("@heroui/react-utils");
|
|
29
|
-
var
|
|
29
|
+
var import_theme = require("@heroui/theme");
|
|
30
30
|
|
|
31
31
|
// src/card-context.ts
|
|
32
32
|
var import_react_utils = require("@heroui/react-utils");
|
|
@@ -44,7 +44,7 @@ var CardBody = (0, import_system.forwardRef)((props, ref) => {
|
|
|
44
44
|
const Component = as || "div";
|
|
45
45
|
const domRef = (0, import_react_utils2.useDOMRef)(ref);
|
|
46
46
|
const { slots, classNames } = useCardContext();
|
|
47
|
-
const bodyStyles = (0,
|
|
47
|
+
const bodyStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.body, className);
|
|
48
48
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref: domRef, className: (_a = slots.body) == null ? void 0 : _a.call(slots, { class: bodyStyles }), ...otherProps, children });
|
|
49
49
|
});
|
|
50
50
|
CardBody.displayName = "HeroUI.CardBody";
|
package/dist/card-body.mjs
CHANGED
package/dist/card-footer.js
CHANGED
|
@@ -26,7 +26,7 @@ __export(card_footer_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(card_footer_exports);
|
|
27
27
|
var import_system = require("@heroui/system");
|
|
28
28
|
var import_react_utils2 = require("@heroui/react-utils");
|
|
29
|
-
var
|
|
29
|
+
var import_theme = require("@heroui/theme");
|
|
30
30
|
|
|
31
31
|
// src/card-context.ts
|
|
32
32
|
var import_react_utils = require("@heroui/react-utils");
|
|
@@ -44,7 +44,7 @@ var CardFooter = (0, import_system.forwardRef)((props, ref) => {
|
|
|
44
44
|
const Component = as || "div";
|
|
45
45
|
const domRef = (0, import_react_utils2.useDOMRef)(ref);
|
|
46
46
|
const { slots, classNames } = useCardContext();
|
|
47
|
-
const footerStyles = (0,
|
|
47
|
+
const footerStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.footer, className);
|
|
48
48
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref: domRef, className: (_a = slots.footer) == null ? void 0 : _a.call(slots, { class: footerStyles }), ...otherProps, children });
|
|
49
49
|
});
|
|
50
50
|
CardFooter.displayName = "HeroUI.CardFooter";
|
package/dist/card-footer.mjs
CHANGED
package/dist/card-header.js
CHANGED
|
@@ -26,7 +26,7 @@ __export(card_header_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(card_header_exports);
|
|
27
27
|
var import_system = require("@heroui/system");
|
|
28
28
|
var import_react_utils2 = require("@heroui/react-utils");
|
|
29
|
-
var
|
|
29
|
+
var import_theme = require("@heroui/theme");
|
|
30
30
|
|
|
31
31
|
// src/card-context.ts
|
|
32
32
|
var import_react_utils = require("@heroui/react-utils");
|
|
@@ -44,7 +44,7 @@ var CardHeader = (0, import_system.forwardRef)((props, ref) => {
|
|
|
44
44
|
const Component = as || "div";
|
|
45
45
|
const domRef = (0, import_react_utils2.useDOMRef)(ref);
|
|
46
46
|
const { slots, classNames } = useCardContext();
|
|
47
|
-
const headerStyles = (0,
|
|
47
|
+
const headerStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.header, className);
|
|
48
48
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref: domRef, className: (_a = slots.header) == null ? void 0 : _a.call(slots, { class: headerStyles }), ...otherProps, children });
|
|
49
49
|
});
|
|
50
50
|
CardHeader.displayName = "HeroUI.CardHeader";
|
package/dist/card-header.mjs
CHANGED
package/dist/card.js
CHANGED
|
@@ -67,7 +67,7 @@ function useCard(originalProps) {
|
|
|
67
67
|
const shouldFilterDOMProps = typeof Component === "string";
|
|
68
68
|
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
|
|
69
69
|
const disableRipple = (_d = (_c = originalProps.disableRipple) != null ? _c : globalContext == null ? void 0 : globalContext.disableRipple) != null ? _d : false;
|
|
70
|
-
const baseStyles = (0,
|
|
70
|
+
const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
71
71
|
const { onClear: onClearRipple, onPress: onRipplePressHandler, ripples } = (0, import_ripple.useRipple)();
|
|
72
72
|
const handlePress = (0, import_react.useCallback)(
|
|
73
73
|
(e) => {
|
package/dist/card.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
// src/card-header.tsx
|
|
7
7
|
import { forwardRef } from "@heroui/system";
|
|
8
8
|
import { useDOMRef } from "@heroui/react-utils";
|
|
9
|
-
import {
|
|
9
|
+
import { cn } from "@heroui/theme";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
var CardHeader = forwardRef((props, ref) => {
|
|
12
12
|
var _a;
|
|
@@ -14,7 +14,7 @@ var CardHeader = forwardRef((props, ref) => {
|
|
|
14
14
|
const Component = as || "div";
|
|
15
15
|
const domRef = useDOMRef(ref);
|
|
16
16
|
const { slots, classNames } = useCardContext();
|
|
17
|
-
const headerStyles =
|
|
17
|
+
const headerStyles = cn(classNames == null ? void 0 : classNames.header, className);
|
|
18
18
|
return /* @__PURE__ */ jsx(Component, { ref: domRef, className: (_a = slots.header) == null ? void 0 : _a.call(slots, { class: headerStyles }), ...otherProps, children });
|
|
19
19
|
});
|
|
20
20
|
CardHeader.displayName = "HeroUI.CardHeader";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
// src/card-footer.tsx
|
|
7
7
|
import { forwardRef } from "@heroui/system";
|
|
8
8
|
import { useDOMRef } from "@heroui/react-utils";
|
|
9
|
-
import {
|
|
9
|
+
import { cn } from "@heroui/theme";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
var CardFooter = forwardRef((props, ref) => {
|
|
12
12
|
var _a;
|
|
@@ -14,7 +14,7 @@ var CardFooter = forwardRef((props, ref) => {
|
|
|
14
14
|
const Component = as || "div";
|
|
15
15
|
const domRef = useDOMRef(ref);
|
|
16
16
|
const { slots, classNames } = useCardContext();
|
|
17
|
-
const footerStyles =
|
|
17
|
+
const footerStyles = cn(classNames == null ? void 0 : classNames.footer, className);
|
|
18
18
|
return /* @__PURE__ */ jsx(Component, { ref: domRef, className: (_a = slots.footer) == null ? void 0 : _a.call(slots, { class: footerStyles }), ...otherProps, children });
|
|
19
19
|
});
|
|
20
20
|
CardFooter.displayName = "HeroUI.CardFooter";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
// src/card-body.tsx
|
|
7
7
|
import { forwardRef } from "@heroui/system";
|
|
8
8
|
import { useDOMRef } from "@heroui/react-utils";
|
|
9
|
-
import {
|
|
9
|
+
import { cn } from "@heroui/theme";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
var CardBody = forwardRef((props, ref) => {
|
|
12
12
|
var _a;
|
|
@@ -14,7 +14,7 @@ var CardBody = forwardRef((props, ref) => {
|
|
|
14
14
|
const Component = as || "div";
|
|
15
15
|
const domRef = useDOMRef(ref);
|
|
16
16
|
const { slots, classNames } = useCardContext();
|
|
17
|
-
const bodyStyles =
|
|
17
|
+
const bodyStyles = cn(classNames == null ? void 0 : classNames.body, className);
|
|
18
18
|
return /* @__PURE__ */ jsx(Component, { ref: domRef, className: (_a = slots.body) == null ? void 0 : _a.call(slots, { class: bodyStyles }), ...otherProps, children });
|
|
19
19
|
});
|
|
20
20
|
CardBody.displayName = "HeroUI.CardBody";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/use-card.ts
|
|
4
|
-
import { card } from "@heroui/theme";
|
|
4
|
+
import { card, cn } from "@heroui/theme";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
6
|
import { useFocusRing } from "@react-aria/focus";
|
|
7
7
|
import { useHover } from "@react-aria/interactions";
|
|
8
8
|
import { useAriaButton } from "@heroui/use-aria-button";
|
|
9
9
|
import { mapPropsVariants, useProviderContext } from "@heroui/system";
|
|
10
|
-
import {
|
|
10
|
+
import { dataAttr, objectToDeps, chain, mergeProps } from "@heroui/shared-utils";
|
|
11
11
|
import { filterDOMProps } from "@heroui/react-utils";
|
|
12
12
|
import { useDOMRef } from "@heroui/react-utils";
|
|
13
13
|
import { useRipple } from "@heroui/ripple";
|
|
@@ -32,7 +32,7 @@ function useCard(originalProps) {
|
|
|
32
32
|
const shouldFilterDOMProps = typeof Component === "string";
|
|
33
33
|
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
|
|
34
34
|
const disableRipple = (_d = (_c = originalProps.disableRipple) != null ? _c : globalContext == null ? void 0 : globalContext.disableRipple) != null ? _d : false;
|
|
35
|
-
const baseStyles =
|
|
35
|
+
const baseStyles = cn(classNames == null ? void 0 : classNames.base, className);
|
|
36
36
|
const { onClear: onClearRipple, onPress: onRipplePressHandler, ripples } = useRipple();
|
|
37
37
|
const handlePress = useCallback(
|
|
38
38
|
(e) => {
|
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ function useCard(originalProps) {
|
|
|
63
63
|
const shouldFilterDOMProps = typeof Component === "string";
|
|
64
64
|
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
|
|
65
65
|
const disableRipple = (_d = (_c = originalProps.disableRipple) != null ? _c : globalContext == null ? void 0 : globalContext.disableRipple) != null ? _d : false;
|
|
66
|
-
const baseStyles = (0,
|
|
66
|
+
const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
67
67
|
const { onClear: onClearRipple, onPress: onRipplePressHandler, ripples } = (0, import_ripple.useRipple)();
|
|
68
68
|
const handlePress = (0, import_react.useCallback)(
|
|
69
69
|
(e) => {
|
|
@@ -210,7 +210,7 @@ var card_default = Card;
|
|
|
210
210
|
// src/card-header.tsx
|
|
211
211
|
var import_system3 = require("@heroui/system");
|
|
212
212
|
var import_react_utils4 = require("@heroui/react-utils");
|
|
213
|
-
var
|
|
213
|
+
var import_theme2 = require("@heroui/theme");
|
|
214
214
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
215
215
|
var CardHeader = (0, import_system3.forwardRef)((props, ref) => {
|
|
216
216
|
var _a;
|
|
@@ -218,7 +218,7 @@ var CardHeader = (0, import_system3.forwardRef)((props, ref) => {
|
|
|
218
218
|
const Component = as || "div";
|
|
219
219
|
const domRef = (0, import_react_utils4.useDOMRef)(ref);
|
|
220
220
|
const { slots, classNames } = useCardContext();
|
|
221
|
-
const headerStyles = (0,
|
|
221
|
+
const headerStyles = (0, import_theme2.cn)(classNames == null ? void 0 : classNames.header, className);
|
|
222
222
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ref: domRef, className: (_a = slots.header) == null ? void 0 : _a.call(slots, { class: headerStyles }), ...otherProps, children });
|
|
223
223
|
});
|
|
224
224
|
CardHeader.displayName = "HeroUI.CardHeader";
|
|
@@ -227,7 +227,7 @@ var card_header_default = CardHeader;
|
|
|
227
227
|
// src/card-body.tsx
|
|
228
228
|
var import_system4 = require("@heroui/system");
|
|
229
229
|
var import_react_utils5 = require("@heroui/react-utils");
|
|
230
|
-
var
|
|
230
|
+
var import_theme3 = require("@heroui/theme");
|
|
231
231
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
232
232
|
var CardBody = (0, import_system4.forwardRef)((props, ref) => {
|
|
233
233
|
var _a;
|
|
@@ -235,7 +235,7 @@ var CardBody = (0, import_system4.forwardRef)((props, ref) => {
|
|
|
235
235
|
const Component = as || "div";
|
|
236
236
|
const domRef = (0, import_react_utils5.useDOMRef)(ref);
|
|
237
237
|
const { slots, classNames } = useCardContext();
|
|
238
|
-
const bodyStyles = (0,
|
|
238
|
+
const bodyStyles = (0, import_theme3.cn)(classNames == null ? void 0 : classNames.body, className);
|
|
239
239
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Component, { ref: domRef, className: (_a = slots.body) == null ? void 0 : _a.call(slots, { class: bodyStyles }), ...otherProps, children });
|
|
240
240
|
});
|
|
241
241
|
CardBody.displayName = "HeroUI.CardBody";
|
|
@@ -244,7 +244,7 @@ var card_body_default = CardBody;
|
|
|
244
244
|
// src/card-footer.tsx
|
|
245
245
|
var import_system5 = require("@heroui/system");
|
|
246
246
|
var import_react_utils6 = require("@heroui/react-utils");
|
|
247
|
-
var
|
|
247
|
+
var import_theme4 = require("@heroui/theme");
|
|
248
248
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
249
249
|
var CardFooter = (0, import_system5.forwardRef)((props, ref) => {
|
|
250
250
|
var _a;
|
|
@@ -252,7 +252,7 @@ var CardFooter = (0, import_system5.forwardRef)((props, ref) => {
|
|
|
252
252
|
const Component = as || "div";
|
|
253
253
|
const domRef = (0, import_react_utils6.useDOMRef)(ref);
|
|
254
254
|
const { slots, classNames } = useCardContext();
|
|
255
|
-
const footerStyles = (0,
|
|
255
|
+
const footerStyles = (0, import_theme4.cn)(classNames == null ? void 0 : classNames.footer, className);
|
|
256
256
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Component, { ref: domRef, className: (_a = slots.footer) == null ? void 0 : _a.call(slots, { class: footerStyles }), ...otherProps, children });
|
|
257
257
|
});
|
|
258
258
|
CardFooter.displayName = "HeroUI.CardFooter";
|
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
card_body_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SAEUDNWW.mjs";
|
|
5
5
|
import {
|
|
6
6
|
card_footer_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NDVZOYT4.mjs";
|
|
8
8
|
import {
|
|
9
9
|
card_header_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C6WKGNND.mjs";
|
|
11
11
|
import {
|
|
12
12
|
card_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QNLCCAKT.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CardProvider,
|
|
16
16
|
useCardContext
|
|
17
17
|
} from "./chunk-XHGGCEVJ.mjs";
|
|
18
18
|
import {
|
|
19
19
|
useCard
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XDYPEWNC.mjs";
|
|
21
21
|
export {
|
|
22
22
|
card_default as Card,
|
|
23
23
|
card_body_default as CardBody,
|
package/dist/use-card.js
CHANGED
|
@@ -55,7 +55,7 @@ function useCard(originalProps) {
|
|
|
55
55
|
const shouldFilterDOMProps = typeof Component === "string";
|
|
56
56
|
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
|
|
57
57
|
const disableRipple = (_d = (_c = originalProps.disableRipple) != null ? _c : globalContext == null ? void 0 : globalContext.disableRipple) != null ? _d : false;
|
|
58
|
-
const baseStyles = (0,
|
|
58
|
+
const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
59
59
|
const { onClear: onClearRipple, onPress: onRipplePressHandler, ripples } = (0, import_ripple.useRipple)();
|
|
60
60
|
const handlePress = (0, import_react.useCallback)(
|
|
61
61
|
(e) => {
|
package/dist/use-card.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroui/card",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.26",
|
|
4
4
|
"description": "Card is a container for text, photos, and actions in the context of a single subject.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"card"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react": ">=18 || >=19.0.0-rc.0",
|
|
29
29
|
"react-dom": ">=18 || >=19.0.0-rc.0",
|
|
30
30
|
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
|
|
31
|
-
"@heroui/theme": ">=2.4.
|
|
31
|
+
"@heroui/theme": ">=2.4.23",
|
|
32
32
|
"@heroui/system": ">=2.4.18"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@heroui/shared-utils": "2.1.12",
|
|
39
39
|
"@heroui/react-utils": "2.1.14",
|
|
40
40
|
"@heroui/use-aria-button": "2.2.20",
|
|
41
|
-
"@heroui/ripple": "2.2.
|
|
41
|
+
"@heroui/ripple": "2.2.21"
|
|
42
42
|
},
|
|
43
43
|
"clean-package": "../../../clean-package.config.json",
|
|
44
44
|
"module": "dist/index.mjs",
|