@heroui/image 2.2.16 → 2.2.18

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.
@@ -3,9 +3,9 @@
3
3
  // src/use-image.ts
4
4
  import { useCallback } from "react";
5
5
  import { mapPropsVariants, useProviderContext } from "@heroui/system";
6
- import { image } from "@heroui/theme";
6
+ import { image, cn } from "@heroui/theme";
7
7
  import { useDOMRef } from "@heroui/react-utils";
8
- import { clsx, dataAttr, objectToDeps } from "@heroui/shared-utils";
8
+ import { dataAttr, objectToDeps } from "@heroui/shared-utils";
9
9
  import { useImage as useImageBase } from "@heroui/use-image";
10
10
  import { useMemo } from "react";
11
11
  function useImage(originalProps) {
@@ -64,9 +64,9 @@ function useImage(originalProps) {
64
64
  }),
65
65
  [objectToDeps(variantProps), disableAnimation, showSkeleton]
66
66
  );
67
- const baseStyles = clsx(className, classNames == null ? void 0 : classNames.img);
67
+ const baseStyles = cn(className, classNames == null ? void 0 : classNames.img);
68
68
  const getImgProps = (props2 = {}) => {
69
- const imgStyles = clsx(baseStyles, props2 == null ? void 0 : props2.className);
69
+ const imgStyles = cn(baseStyles, props2 == null ? void 0 : props2.className);
70
70
  return {
71
71
  src,
72
72
  ref: domRef,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useImage
4
- } from "./chunk-VKNWGH3N.mjs";
4
+ } from "./chunk-7JOKSRIS.mjs";
5
5
 
6
6
  // src/image.tsx
7
7
  import { cloneElement } from "react";
package/dist/image.js CHANGED
@@ -91,9 +91,9 @@ function useImage(originalProps) {
91
91
  }),
92
92
  [(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, showSkeleton]
93
93
  );
94
- const baseStyles = (0, import_shared_utils.clsx)(className, classNames == null ? void 0 : classNames.img);
94
+ const baseStyles = (0, import_theme.cn)(className, classNames == null ? void 0 : classNames.img);
95
95
  const getImgProps = (props2 = {}) => {
96
- const imgStyles = (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className);
96
+ const imgStyles = (0, import_theme.cn)(baseStyles, props2 == null ? void 0 : props2.className);
97
97
  return {
98
98
  src,
99
99
  ref: domRef,
package/dist/image.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  image_default
4
- } from "./chunk-BHGNW4BO.mjs";
5
- import "./chunk-VKNWGH3N.mjs";
4
+ } from "./chunk-PGYMO5KK.mjs";
5
+ import "./chunk-7JOKSRIS.mjs";
6
6
  export {
7
7
  image_default as default
8
8
  };
package/dist/index.js CHANGED
@@ -94,9 +94,9 @@ function useImage(originalProps) {
94
94
  }),
95
95
  [(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, showSkeleton]
96
96
  );
97
- const baseStyles = (0, import_shared_utils.clsx)(className, classNames == null ? void 0 : classNames.img);
97
+ const baseStyles = (0, import_theme.cn)(className, classNames == null ? void 0 : classNames.img);
98
98
  const getImgProps = (props2 = {}) => {
99
- const imgStyles = (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className);
99
+ const imgStyles = (0, import_theme.cn)(baseStyles, props2 == null ? void 0 : props2.className);
100
100
  return {
101
101
  src,
102
102
  ref: domRef,
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  image_default
4
- } from "./chunk-BHGNW4BO.mjs";
4
+ } from "./chunk-PGYMO5KK.mjs";
5
5
  import {
6
6
  useImage
7
- } from "./chunk-VKNWGH3N.mjs";
7
+ } from "./chunk-7JOKSRIS.mjs";
8
8
  export {
9
9
  image_default as Image,
10
10
  useImage
package/dist/use-image.js CHANGED
@@ -87,9 +87,9 @@ function useImage(originalProps) {
87
87
  }),
88
88
  [(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, showSkeleton]
89
89
  );
90
- const baseStyles = (0, import_shared_utils.clsx)(className, classNames == null ? void 0 : classNames.img);
90
+ const baseStyles = (0, import_theme.cn)(className, classNames == null ? void 0 : classNames.img);
91
91
  const getImgProps = (props2 = {}) => {
92
- const imgStyles = (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className);
92
+ const imgStyles = (0, import_theme.cn)(baseStyles, props2 == null ? void 0 : props2.className);
93
93
  return {
94
94
  src,
95
95
  ref: domRef,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useImage
4
- } from "./chunk-VKNWGH3N.mjs";
4
+ } from "./chunk-7JOKSRIS.mjs";
5
5
  export {
6
6
  useImage
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heroui/image",
3
- "version": "2.2.16",
3
+ "version": "2.2.18",
4
4
  "description": "A simple image component",
5
5
  "keywords": [
6
6
  "image"
@@ -27,13 +27,13 @@
27
27
  "peerDependencies": {
28
28
  "react": ">=18 || >=19.0.0-rc.0",
29
29
  "react-dom": ">=18 || >=19.0.0-rc.0",
30
- "@heroui/theme": ">=2.4.17",
30
+ "@heroui/theme": ">=2.4.23",
31
31
  "@heroui/system": ">=2.4.18"
32
32
  },
33
33
  "dependencies": {
34
- "@heroui/shared-utils": "2.1.11",
35
- "@heroui/react-utils": "2.1.13",
36
- "@heroui/use-image": "2.1.12"
34
+ "@heroui/shared-utils": "2.1.12",
35
+ "@heroui/react-utils": "2.1.14",
36
+ "@heroui/use-image": "2.1.13"
37
37
  },
38
38
  "clean-package": "../../../clean-package.config.json",
39
39
  "module": "dist/index.mjs",