@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.
Files changed (37) hide show
  1. package/cjs/components/action-icon/action-icon.cjs +1 -1
  2. package/cjs/components/action-icon/action-icon.cjs.map +1 -1
  3. package/cjs/components/group/group.cjs +6 -4
  4. package/cjs/components/group/group.cjs.map +1 -1
  5. package/cjs/components/image/image.cjs +429 -0
  6. package/cjs/components/image/image.cjs.map +1 -0
  7. package/cjs/components/image/image.module.cjs +7 -0
  8. package/cjs/components/image/image.module.cjs.map +1 -0
  9. package/cjs/components/image/image.utils.cjs +11 -0
  10. package/cjs/components/image/image.utils.cjs.map +1 -0
  11. package/cjs/components/image/index.cjs +14 -0
  12. package/cjs/components/image/index.cjs.map +1 -0
  13. package/cjs/index.cjs +29 -26
  14. package/cjs/index.cjs.map +1 -1
  15. package/esm/components/action-icon/action-icon.mjs +1 -1
  16. package/esm/components/action-icon/action-icon.mjs.map +1 -1
  17. package/esm/components/group/group.mjs +7 -5
  18. package/esm/components/group/group.mjs.map +1 -1
  19. package/esm/components/image/image.mjs +429 -0
  20. package/esm/components/image/image.mjs.map +1 -0
  21. package/esm/components/image/image.module.mjs +7 -0
  22. package/esm/components/image/image.module.mjs.map +1 -0
  23. package/esm/components/image/image.utils.mjs +12 -0
  24. package/esm/components/image/image.utils.mjs.map +1 -0
  25. package/esm/components/image/index.mjs +11 -0
  26. package/esm/components/image/index.mjs.map +1 -0
  27. package/esm/index.mjs +3 -1
  28. package/esm/index.mjs.map +1 -1
  29. package/lib/components/image/image.types.d.ts +33 -0
  30. package/lib/components/image/image.utils.d.ts +7 -0
  31. package/lib/components/image/index.d.ts +6 -0
  32. package/lib/components/index.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/styles/image.css +6 -0
  35. package/styles/image.layer.css +7 -0
  36. package/styles.css +7 -0
  37. 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';
@@ -9,6 +9,7 @@ export * from './empty-state';
9
9
  export * from './flex';
10
10
  export * from './grid';
11
11
  export * from './group';
12
+ export * from './image';
12
13
  export * from './loader';
13
14
  export * from './paper';
14
15
  export * from './semi-circle-progress';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.18.4",
3
+ "version": "0.19.0",
4
4
  "description": "Vue component library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://cck-ui.jackatlas.xyz",
6
6
  "license": "ISC",
@@ -0,0 +1,6 @@
1
+ .m_273f9a14 {
2
+ display: block;
3
+ object-fit: var(--image-object-fit, cover);
4
+ width: 100%;
5
+ border-radius: var(--image-radius, 0);
6
+ }
@@ -0,0 +1,7 @@
1
+ @layer cck {.m_273f9a14 {
2
+ display: block;
3
+ object-fit: var(--image-object-fit, cover);
4
+ width: 100%;
5
+ border-radius: var(--image-radius, 0);
6
+ }
7
+ }
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));