@cck-ui/core 0.18.4 → 0.19.0
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/cjs/components/action-icon/action-icon.cjs +1 -1
- package/cjs/components/action-icon/action-icon.cjs.map +1 -1
- package/cjs/components/group/group.cjs +6 -4
- package/cjs/components/group/group.cjs.map +1 -1
- package/cjs/components/image/image.cjs +429 -0
- package/cjs/components/image/image.cjs.map +1 -0
- package/cjs/components/image/image.module.cjs +7 -0
- package/cjs/components/image/image.module.cjs.map +1 -0
- package/cjs/components/image/image.utils.cjs +11 -0
- package/cjs/components/image/image.utils.cjs.map +1 -0
- package/cjs/components/image/index.cjs +14 -0
- package/cjs/components/image/index.cjs.map +1 -0
- package/cjs/index.cjs +29 -26
- package/cjs/index.cjs.map +1 -1
- package/esm/components/action-icon/action-icon.mjs +1 -1
- package/esm/components/action-icon/action-icon.mjs.map +1 -1
- package/esm/components/group/group.mjs +7 -5
- package/esm/components/group/group.mjs.map +1 -1
- package/esm/components/image/image.mjs +429 -0
- package/esm/components/image/image.mjs.map +1 -0
- package/esm/components/image/image.module.mjs +7 -0
- package/esm/components/image/image.module.mjs.map +1 -0
- package/esm/components/image/image.utils.mjs +12 -0
- package/esm/components/image/image.utils.mjs.map +1 -0
- package/esm/components/image/index.mjs +11 -0
- package/esm/components/image/index.mjs.map +1 -0
- package/esm/index.mjs +3 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/image/image.types.d.ts +33 -0
- package/lib/components/image/image.utils.d.ts +7 -0
- package/lib/components/image/index.d.ts +6 -0
- package/lib/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/styles/image.css +6 -0
- package/styles/image.layer.css +7 -0
- package/styles.css +7 -0
- package/styles.layer.css +7 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Properties } from 'csstype';
|
|
2
|
+
import { BoxProps, CRadius, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
3
|
+
export type ImageStylesNames = 'root';
|
|
4
|
+
export type ImageCssVariables = {
|
|
5
|
+
root: '--image-radius' | '--image-object-fit';
|
|
6
|
+
};
|
|
7
|
+
export interface ImageProps extends BoxProps, StylesApiProps<ImageFactory> {
|
|
8
|
+
/**
|
|
9
|
+
* @description Key of `theme.radius` or any valid CSS value to set `border-radius`
|
|
10
|
+
* @default 0
|
|
11
|
+
*/
|
|
12
|
+
radius?: CRadius;
|
|
13
|
+
/**
|
|
14
|
+
* @description Controls `object-fit` style
|
|
15
|
+
* @default 'cover'
|
|
16
|
+
*/
|
|
17
|
+
fit?: Properties['objectFit'];
|
|
18
|
+
/**
|
|
19
|
+
* @description Image url used as a fallback if the image cannot be loaded
|
|
20
|
+
*/
|
|
21
|
+
fallbackSrc?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @description Image url
|
|
24
|
+
*/
|
|
25
|
+
src?: any;
|
|
26
|
+
}
|
|
27
|
+
export type ImageFactory = PolymorphicFactory<{
|
|
28
|
+
props: ImageProps;
|
|
29
|
+
defaultRef: HTMLImageElement;
|
|
30
|
+
defaultComponent: 'img';
|
|
31
|
+
stylesNames: ImageStylesNames;
|
|
32
|
+
vars: ImageCssVariables;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const varsResolver: import("../..").VarsResolver<{
|
|
2
|
+
props: import("./image.types").ImageProps;
|
|
3
|
+
defaultRef: HTMLImageElement;
|
|
4
|
+
defaultComponent: "img";
|
|
5
|
+
stylesNames: import("./image.types").ImageStylesNames;
|
|
6
|
+
vars: import("./image.types").ImageCssVariables;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SFCWithInstallAndClasses } from '../../core';
|
|
2
|
+
import Image from './image.vue';
|
|
3
|
+
import classes from './image.module.css';
|
|
4
|
+
export declare const CImage: SFCWithInstallAndClasses<typeof Image, typeof classes>;
|
|
5
|
+
export default CImage;
|
|
6
|
+
export * from './image.types';
|
package/package.json
CHANGED
package/styles/image.css
ADDED
package/styles.css
CHANGED
|
@@ -1450,6 +1450,13 @@ fieldset:disabled .c-active:active {
|
|
|
1450
1450
|
max-width: var(--group-child-width);
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
|
+
.m_273f9a14 {
|
|
1454
|
+
display: block;
|
|
1455
|
+
object-fit: var(--image-object-fit, cover);
|
|
1456
|
+
width: 100%;
|
|
1457
|
+
border-radius: var(--image-radius, 0);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1453
1460
|
.m_a244865c {
|
|
1454
1461
|
--loader-size-xs: calc(1.125rem * var(--c-scale));
|
|
1455
1462
|
--loader-size-sm: calc(1.375rem * var(--c-scale));
|
package/styles.layer.css
CHANGED
|
@@ -1450,6 +1450,13 @@ fieldset:disabled .c-active:active {
|
|
|
1450
1450
|
max-width: var(--group-child-width);
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
|
+
.m_273f9a14 {
|
|
1454
|
+
display: block;
|
|
1455
|
+
object-fit: var(--image-object-fit, cover);
|
|
1456
|
+
width: 100%;
|
|
1457
|
+
border-radius: var(--image-radius, 0);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1453
1460
|
.m_a244865c {
|
|
1454
1461
|
--loader-size-xs: calc(1.125rem * var(--c-scale));
|
|
1455
1462
|
--loader-size-sm: calc(1.375rem * var(--c-scale));
|