@kushagradhawan/kookie-ui 0.1.128 → 0.1.129
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/components.css +17 -2
- package/dist/cjs/components/avatar.props.d.ts +12 -0
- package/dist/cjs/components/avatar.props.d.ts.map +1 -1
- package/dist/cjs/components/avatar.props.js +1 -1
- package/dist/cjs/components/avatar.props.js.map +3 -3
- package/dist/esm/components/avatar.props.d.ts +12 -0
- package/dist/esm/components/avatar.props.d.ts.map +1 -1
- package/dist/esm/components/avatar.props.js +1 -1
- package/dist/esm/components/avatar.props.js.map +3 -3
- package/package.json +1 -1
- package/schemas/base-button.json +1 -1
- package/schemas/button.json +1 -1
- package/schemas/icon-button.json +1 -1
- package/schemas/index.json +6 -6
- package/schemas/toggle-button.json +1 -1
- package/schemas/toggle-icon-button.json +1 -1
- package/src/components/avatar.css +18 -1
- package/src/components/avatar.props.tsx +8 -0
- package/styles.css +17 -2
package/components.css
CHANGED
|
@@ -2190,10 +2190,25 @@
|
|
|
2190
2190
|
.rt-AvatarImage {
|
|
2191
2191
|
width: 100%;
|
|
2192
2192
|
height: 100%;
|
|
2193
|
-
-o-object-fit: cover;
|
|
2194
|
-
object-fit: cover;
|
|
2193
|
+
-o-object-fit: var(--avatar-object-fit, cover);
|
|
2194
|
+
object-fit: var(--avatar-object-fit, cover);
|
|
2195
2195
|
border-radius: inherit;
|
|
2196
2196
|
}
|
|
2197
|
+
.rt-AvatarRoot:where(.rt-r-fit-cover) {
|
|
2198
|
+
--avatar-object-fit: cover;
|
|
2199
|
+
}
|
|
2200
|
+
.rt-AvatarRoot:where(.rt-r-fit-contain) {
|
|
2201
|
+
--avatar-object-fit: contain;
|
|
2202
|
+
}
|
|
2203
|
+
.rt-AvatarRoot:where(.rt-r-fit-fill) {
|
|
2204
|
+
--avatar-object-fit: fill;
|
|
2205
|
+
}
|
|
2206
|
+
.rt-AvatarRoot:where(.rt-r-fit-scale-down) {
|
|
2207
|
+
--avatar-object-fit: scale-down;
|
|
2208
|
+
}
|
|
2209
|
+
.rt-AvatarRoot:where(.rt-r-fit-none) {
|
|
2210
|
+
--avatar-object-fit: none;
|
|
2211
|
+
}
|
|
2197
2212
|
.rt-AvatarFallback {
|
|
2198
2213
|
font-family: var(--default-font-family);
|
|
2199
2214
|
font-weight: var(--font-weight-medium);
|
|
@@ -34,6 +34,18 @@ declare const avatarPropDefs: {
|
|
|
34
34
|
type: "ReactNode";
|
|
35
35
|
default: undefined;
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Controls how the avatar image should be resized to fit its container.
|
|
39
|
+
* Defaults to 'cover' which crops the image to fill the avatar.
|
|
40
|
+
* Use 'contain' to show the full image without cropping.
|
|
41
|
+
*/
|
|
42
|
+
fit: {
|
|
43
|
+
type: "enum";
|
|
44
|
+
className: string;
|
|
45
|
+
values: readonly ["cover", "contain", "fill", "scale-down", "none"];
|
|
46
|
+
default: "cover";
|
|
47
|
+
responsive: true;
|
|
48
|
+
};
|
|
37
49
|
radius: {
|
|
38
50
|
type: "enum";
|
|
39
51
|
values: readonly ["none", "small", "medium", "large", "full"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.props.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.props.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.props.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.props.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAY1E,QAAA,MAAM,cAAc;;;;;;;;;;IASlB;;OAEG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;kBAvBK,mBACN;;;;;;;;;;;;;;;;;;CAiCH,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var o in e)r(t,o,{get:e[o],enumerable:!0})},v=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of c(e))!d.call(t,a)&&a!==o&&r(t,a,{get:()=>e[a],enumerable:!(n=l(e,a))||n.enumerable});return t};var y=t=>v(r({},"__esModule",{value:!0}),t);var k={};m(k,{avatarPropDefs:()=>p});module.exports=y(k);var f=require("../props/as-child.prop.js"),s=require("../props/color.prop.js"),u=require("../props/high-contrast.prop.js"),i=require("../props/radius.prop.js");const D=["1","2","3","4","5","6","7","8","9","10","11","12"],P=["classic","solid","soft","surface","outline"],b=["solid","translucent"],g=["solid","translucent"],N=["cover","contain","fill","scale-down","none"],p={...f.asChildPropDef,size:{type:"enum",className:"rt-r-size",values:D,default:"3",responsive:!0},variant:{type:"enum",className:"rt-variant",values:P,default:"soft"},...s.accentColorPropDef,...u.highContrastPropDef,...i.radiusPropDef,fallback:{type:"ReactNode",required:!0},material:{type:"enum",values:g,default:void 0},panelBackground:{type:"enum",values:b,default:void 0},status:{type:"enum",values:s.accentColors,default:void 0},badge:{type:"ReactNode",default:void 0},fit:{type:"enum",className:"rt-r-fit",values:N,default:"cover",responsive:!0}};
|
|
2
2
|
//# sourceMappingURL=avatar.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/avatar.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef, accentColors } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst avatarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '3', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'soft' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n fallback: { type: 'ReactNode', required: true },\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Status indicator color. Renders a small colored dot at the bottom-right corner.\n * Cannot be used together with `badge`.\n */\n status: { type: 'enum', values: accentColors, default: undefined },\n /**\n * Custom badge content. Renders at the bottom-right corner.\n * Cannot be used together with `status`.\n */\n badge: { type: 'ReactNode', default: undefined },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n fallback: PropDef<React.ReactNode>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n status: PropDef<(typeof accentColors)[number] | undefined>;\n badge: PropDef<React.ReactNode>;\n};\n\nexport { avatarPropDefs };\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+B,qCAC/BC,EAAiD,kCACjDC,EAAoC,0CACpCC,EAA8B,mCAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EACtEC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,
|
|
6
|
-
"names": ["avatar_props_exports", "__export", "avatarPropDefs", "__toCommonJS", "import_as_child_prop", "import_color_prop", "import_high_contrast_prop", "import_radius_prop", "sizes", "variants", "panelBackgrounds", "materials"]
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef, accentColors } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;\n\nconst avatarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '3', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'soft' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n fallback: { type: 'ReactNode', required: true },\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Status indicator color. Renders a small colored dot at the bottom-right corner.\n * Cannot be used together with `badge`.\n */\n status: { type: 'enum', values: accentColors, default: undefined },\n /**\n * Custom badge content. Renders at the bottom-right corner.\n * Cannot be used together with `status`.\n */\n badge: { type: 'ReactNode', default: undefined },\n /**\n * Controls how the avatar image should be resized to fit its container.\n * Defaults to 'cover' which crops the image to fill the avatar.\n * Use 'contain' to show the full image without cropping.\n */\n fit: { type: 'enum', className: 'rt-r-fit', values: objectFitValues, default: 'cover', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n fallback: PropDef<React.ReactNode>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n status: PropDef<(typeof accentColors)[number] | undefined>;\n badge: PropDef<React.ReactNode>;\n fit: PropDef<(typeof objectFitValues)[number]>;\n};\n\nexport { avatarPropDefs };\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+B,qCAC/BC,EAAiD,kCACjDC,EAAoC,0CACpCC,EAA8B,mCAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EACtEC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EACnCC,EAAkB,CAAC,QAAS,UAAW,OAAQ,aAAc,MAAM,EAEnEV,EAAiB,CACrB,GAAG,iBACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQM,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,MAAO,EACpF,GAAG,qBACH,GAAG,sBACH,GAAG,gBACH,SAAU,CAAE,KAAM,YAAa,SAAU,EAAK,EAC9C,SAAU,CAAE,KAAM,OAAQ,OAAQE,EAAW,QAAS,MAAU,EAIhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,OAAQ,CAAE,KAAM,OAAQ,OAAQ,eAAc,QAAS,MAAU,EAKjE,MAAO,CAAE,KAAM,YAAa,QAAS,MAAU,EAM/C,IAAK,CAAE,KAAM,OAAQ,UAAW,WAAY,OAAQE,EAAiB,QAAS,QAAS,WAAY,EAAK,CAC1G",
|
|
6
|
+
"names": ["avatar_props_exports", "__export", "avatarPropDefs", "__toCommonJS", "import_as_child_prop", "import_color_prop", "import_high_contrast_prop", "import_radius_prop", "sizes", "variants", "panelBackgrounds", "materials", "objectFitValues"]
|
|
7
7
|
}
|
|
@@ -34,6 +34,18 @@ declare const avatarPropDefs: {
|
|
|
34
34
|
type: "ReactNode";
|
|
35
35
|
default: undefined;
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Controls how the avatar image should be resized to fit its container.
|
|
39
|
+
* Defaults to 'cover' which crops the image to fill the avatar.
|
|
40
|
+
* Use 'contain' to show the full image without cropping.
|
|
41
|
+
*/
|
|
42
|
+
fit: {
|
|
43
|
+
type: "enum";
|
|
44
|
+
className: string;
|
|
45
|
+
values: readonly ["cover", "contain", "fill", "scale-down", "none"];
|
|
46
|
+
default: "cover";
|
|
47
|
+
responsive: true;
|
|
48
|
+
};
|
|
37
49
|
radius: {
|
|
38
50
|
type: "enum";
|
|
39
51
|
values: readonly ["none", "small", "medium", "large", "full"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.props.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.props.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.props.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.props.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAY1E,QAAA,MAAM,cAAc;;;;;;;;;;IASlB;;OAEG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;kBAvBK,mBACN;;;;;;;;;;;;;;;;;;CAiCH,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asChildPropDef as e}from"../props/as-child.prop.js";import{accentColorPropDef as
|
|
1
|
+
import{asChildPropDef as e}from"../props/as-child.prop.js";import{accentColorPropDef as t,accentColors as a}from"../props/color.prop.js";import{highContrastPropDef as o}from"../props/high-contrast.prop.js";import{radiusPropDef as s}from"../props/radius.prop.js";const r=["1","2","3","4","5","6","7","8","9","10","11","12"],n=["classic","solid","soft","surface","outline"],f=["solid","translucent"],u=["solid","translucent"],i=["cover","contain","fill","scale-down","none"],p={...e,size:{type:"enum",className:"rt-r-size",values:r,default:"3",responsive:!0},variant:{type:"enum",className:"rt-variant",values:n,default:"soft"},...t,...o,...s,fallback:{type:"ReactNode",required:!0},material:{type:"enum",values:u,default:void 0},panelBackground:{type:"enum",values:f,default:void 0},status:{type:"enum",values:a,default:void 0},badge:{type:"ReactNode",default:void 0},fit:{type:"enum",className:"rt-r-fit",values:i,default:"cover",responsive:!0}};export{p as avatarPropDefs};
|
|
2
2
|
//# sourceMappingURL=avatar.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/avatar.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef, accentColors } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst avatarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '3', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'soft' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n fallback: { type: 'ReactNode', required: true },\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Status indicator color. Renders a small colored dot at the bottom-right corner.\n * Cannot be used together with `badge`.\n */\n status: { type: 'enum', values: accentColors, default: undefined },\n /**\n * Custom badge content. Renders at the bottom-right corner.\n * Cannot be used together with `status`.\n */\n badge: { type: 'ReactNode', default: undefined },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n fallback: PropDef<React.ReactNode>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n status: PropDef<(typeof accentColors)[number] | undefined>;\n badge: PropDef<React.ReactNode>;\n};\n\nexport { avatarPropDefs };\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,sBAAAC,EAAoB,gBAAAC,MAAoB,yBACjD,OAAS,uBAAAC,MAA2B,iCACpC,OAAS,iBAAAC,MAAqB,0BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EACtEC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,
|
|
6
|
-
"names": ["asChildPropDef", "accentColorPropDef", "accentColors", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "avatarPropDefs"]
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef, accentColors } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;\n\nconst avatarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '3', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'soft' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n fallback: { type: 'ReactNode', required: true },\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Status indicator color. Renders a small colored dot at the bottom-right corner.\n * Cannot be used together with `badge`.\n */\n status: { type: 'enum', values: accentColors, default: undefined },\n /**\n * Custom badge content. Renders at the bottom-right corner.\n * Cannot be used together with `status`.\n */\n badge: { type: 'ReactNode', default: undefined },\n /**\n * Controls how the avatar image should be resized to fit its container.\n * Defaults to 'cover' which crops the image to fill the avatar.\n * Use 'contain' to show the full image without cropping.\n */\n fit: { type: 'enum', className: 'rt-r-fit', values: objectFitValues, default: 'cover', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n fallback: PropDef<React.ReactNode>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n status: PropDef<(typeof accentColors)[number] | undefined>;\n badge: PropDef<React.ReactNode>;\n fit: PropDef<(typeof objectFitValues)[number]>;\n};\n\nexport { avatarPropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,sBAAAC,EAAoB,gBAAAC,MAAoB,yBACjD,OAAS,uBAAAC,MAA2B,iCACpC,OAAS,iBAAAC,MAAqB,0BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EACtEC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EACnCC,EAAkB,CAAC,QAAS,UAAW,OAAQ,aAAc,MAAM,EAEnEC,EAAiB,CACrB,GAAGV,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQK,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,MAAO,EACpF,GAAGL,EACH,GAAGE,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,YAAa,SAAU,EAAK,EAC9C,SAAU,CAAE,KAAM,OAAQ,OAAQI,EAAW,QAAS,MAAU,EAIhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,OAAQ,CAAE,KAAM,OAAQ,OAAQL,EAAc,QAAS,MAAU,EAKjE,MAAO,CAAE,KAAM,YAAa,QAAS,MAAU,EAM/C,IAAK,CAAE,KAAM,OAAQ,UAAW,WAAY,OAAQO,EAAiB,QAAS,QAAS,WAAY,EAAK,CAC1G",
|
|
6
|
+
"names": ["asChildPropDef", "accentColorPropDef", "accentColors", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "objectFitValues", "avatarPropDefs"]
|
|
7
7
|
}
|
package/package.json
CHANGED
package/schemas/base-button.json
CHANGED
|
@@ -279,6 +279,6 @@
|
|
|
279
279
|
"title": "Base-button Component Props",
|
|
280
280
|
"description": "Props schema for the base-button component in Kookie UI",
|
|
281
281
|
"version": "1.0.0",
|
|
282
|
-
"generatedAt": "2026-01-
|
|
282
|
+
"generatedAt": "2026-01-13T07:07:55.568Z",
|
|
283
283
|
"source": "Zod schema"
|
|
284
284
|
}
|
package/schemas/button.json
CHANGED
|
@@ -530,6 +530,6 @@
|
|
|
530
530
|
"title": "Button Component Props",
|
|
531
531
|
"description": "Props schema for the button component in Kookie UI",
|
|
532
532
|
"version": "1.0.0",
|
|
533
|
-
"generatedAt": "2026-01-
|
|
533
|
+
"generatedAt": "2026-01-13T07:07:55.575Z",
|
|
534
534
|
"source": "Zod schema"
|
|
535
535
|
}
|
package/schemas/icon-button.json
CHANGED
|
@@ -313,6 +313,6 @@
|
|
|
313
313
|
"title": "Icon-button Component Props",
|
|
314
314
|
"description": "Props schema for the icon-button component in Kookie UI",
|
|
315
315
|
"version": "1.0.0",
|
|
316
|
-
"generatedAt": "2026-01-
|
|
316
|
+
"generatedAt": "2026-01-13T07:07:55.575Z",
|
|
317
317
|
"source": "Zod schema"
|
|
318
318
|
}
|
package/schemas/index.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "Kookie UI Button Components",
|
|
4
4
|
"description": "Complete JSON Schema collection for all button components in Kookie UI",
|
|
5
5
|
"version": "1.0.0",
|
|
6
|
-
"generatedAt": "2026-01-
|
|
6
|
+
"generatedAt": "2026-01-13T07:07:55.578Z",
|
|
7
7
|
"source": "Zod schemas",
|
|
8
8
|
"components": {
|
|
9
9
|
"base-button": {
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"title": "Base-button Component Props",
|
|
288
288
|
"description": "Props schema for the base-button component in Kookie UI",
|
|
289
289
|
"version": "1.0.0",
|
|
290
|
-
"generatedAt": "2026-01-
|
|
290
|
+
"generatedAt": "2026-01-13T07:07:55.568Z",
|
|
291
291
|
"source": "Zod schema"
|
|
292
292
|
},
|
|
293
293
|
"button": {
|
|
@@ -822,7 +822,7 @@
|
|
|
822
822
|
"title": "Button Component Props",
|
|
823
823
|
"description": "Props schema for the button component in Kookie UI",
|
|
824
824
|
"version": "1.0.0",
|
|
825
|
-
"generatedAt": "2026-01-
|
|
825
|
+
"generatedAt": "2026-01-13T07:07:55.575Z",
|
|
826
826
|
"source": "Zod schema"
|
|
827
827
|
},
|
|
828
828
|
"icon-button": {
|
|
@@ -1140,7 +1140,7 @@
|
|
|
1140
1140
|
"title": "Icon-button Component Props",
|
|
1141
1141
|
"description": "Props schema for the icon-button component in Kookie UI",
|
|
1142
1142
|
"version": "1.0.0",
|
|
1143
|
-
"generatedAt": "2026-01-
|
|
1143
|
+
"generatedAt": "2026-01-13T07:07:55.575Z",
|
|
1144
1144
|
"source": "Zod schema"
|
|
1145
1145
|
},
|
|
1146
1146
|
"toggle-button": {
|
|
@@ -1683,7 +1683,7 @@
|
|
|
1683
1683
|
"title": "Toggle-button Component Props",
|
|
1684
1684
|
"description": "Props schema for the toggle-button component in Kookie UI",
|
|
1685
1685
|
"version": "1.0.0",
|
|
1686
|
-
"generatedAt": "2026-01-
|
|
1686
|
+
"generatedAt": "2026-01-13T07:07:55.577Z",
|
|
1687
1687
|
"source": "Zod schema"
|
|
1688
1688
|
},
|
|
1689
1689
|
"toggle-icon-button": {
|
|
@@ -2009,7 +2009,7 @@
|
|
|
2009
2009
|
"title": "Toggle-icon-button Component Props",
|
|
2010
2010
|
"description": "Props schema for the toggle-icon-button component in Kookie UI",
|
|
2011
2011
|
"version": "1.0.0",
|
|
2012
|
-
"generatedAt": "2026-01-
|
|
2012
|
+
"generatedAt": "2026-01-13T07:07:55.578Z",
|
|
2013
2013
|
"source": "Zod schema"
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
@@ -538,6 +538,6 @@
|
|
|
538
538
|
"title": "Toggle-button Component Props",
|
|
539
539
|
"description": "Props schema for the toggle-button component in Kookie UI",
|
|
540
540
|
"version": "1.0.0",
|
|
541
|
-
"generatedAt": "2026-01-
|
|
541
|
+
"generatedAt": "2026-01-13T07:07:55.577Z",
|
|
542
542
|
"source": "Zod schema"
|
|
543
543
|
}
|
|
@@ -321,6 +321,6 @@
|
|
|
321
321
|
"title": "Toggle-icon-button Component Props",
|
|
322
322
|
"description": "Props schema for the toggle-icon-button component in Kookie UI",
|
|
323
323
|
"version": "1.0.0",
|
|
324
|
-
"generatedAt": "2026-01-
|
|
324
|
+
"generatedAt": "2026-01-13T07:07:55.578Z",
|
|
325
325
|
"source": "Zod schema"
|
|
326
326
|
}
|
|
@@ -392,10 +392,27 @@
|
|
|
392
392
|
.rt-AvatarImage {
|
|
393
393
|
width: 100%;
|
|
394
394
|
height: 100%;
|
|
395
|
-
object-fit: cover;
|
|
395
|
+
object-fit: var(--avatar-object-fit, cover);
|
|
396
396
|
border-radius: inherit;
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
+
/* Object-fit variants */
|
|
400
|
+
.rt-AvatarRoot:where(.rt-r-fit-cover) {
|
|
401
|
+
--avatar-object-fit: cover;
|
|
402
|
+
}
|
|
403
|
+
.rt-AvatarRoot:where(.rt-r-fit-contain) {
|
|
404
|
+
--avatar-object-fit: contain;
|
|
405
|
+
}
|
|
406
|
+
.rt-AvatarRoot:where(.rt-r-fit-fill) {
|
|
407
|
+
--avatar-object-fit: fill;
|
|
408
|
+
}
|
|
409
|
+
.rt-AvatarRoot:where(.rt-r-fit-scale-down) {
|
|
410
|
+
--avatar-object-fit: scale-down;
|
|
411
|
+
}
|
|
412
|
+
.rt-AvatarRoot:where(.rt-r-fit-none) {
|
|
413
|
+
--avatar-object-fit: none;
|
|
414
|
+
}
|
|
415
|
+
|
|
399
416
|
.rt-AvatarFallback {
|
|
400
417
|
font-family: var(--default-font-family);
|
|
401
418
|
font-weight: var(--font-weight-medium);
|
|
@@ -9,6 +9,7 @@ const sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as
|
|
|
9
9
|
const variants = ['classic', 'solid', 'soft', 'surface', 'outline'] as const;
|
|
10
10
|
const panelBackgrounds = ['solid', 'translucent'] as const;
|
|
11
11
|
const materials = ['solid', 'translucent'] as const;
|
|
12
|
+
const objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;
|
|
12
13
|
|
|
13
14
|
const avatarPropDefs = {
|
|
14
15
|
...asChildPropDef,
|
|
@@ -33,6 +34,12 @@ const avatarPropDefs = {
|
|
|
33
34
|
* Cannot be used together with `status`.
|
|
34
35
|
*/
|
|
35
36
|
badge: { type: 'ReactNode', default: undefined },
|
|
37
|
+
/**
|
|
38
|
+
* Controls how the avatar image should be resized to fit its container.
|
|
39
|
+
* Defaults to 'cover' which crops the image to fill the avatar.
|
|
40
|
+
* Use 'contain' to show the full image without cropping.
|
|
41
|
+
*/
|
|
42
|
+
fit: { type: 'enum', className: 'rt-r-fit', values: objectFitValues, default: 'cover', responsive: true },
|
|
36
43
|
} satisfies {
|
|
37
44
|
size: PropDef<(typeof sizes)[number]>;
|
|
38
45
|
variant: PropDef<(typeof variants)[number]>;
|
|
@@ -41,6 +48,7 @@ const avatarPropDefs = {
|
|
|
41
48
|
panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;
|
|
42
49
|
status: PropDef<(typeof accentColors)[number] | undefined>;
|
|
43
50
|
badge: PropDef<React.ReactNode>;
|
|
51
|
+
fit: PropDef<(typeof objectFitValues)[number]>;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
export { avatarPropDefs };
|
package/styles.css
CHANGED
|
@@ -7244,10 +7244,25 @@
|
|
|
7244
7244
|
.rt-AvatarImage{
|
|
7245
7245
|
width: 100%;
|
|
7246
7246
|
height: 100%;
|
|
7247
|
-
-o-object-fit: cover;
|
|
7248
|
-
object-fit: cover;
|
|
7247
|
+
-o-object-fit: var(--avatar-object-fit, cover);
|
|
7248
|
+
object-fit: var(--avatar-object-fit, cover);
|
|
7249
7249
|
border-radius: inherit;
|
|
7250
7250
|
}
|
|
7251
|
+
.rt-AvatarRoot:where(.rt-r-fit-cover){
|
|
7252
|
+
--avatar-object-fit: cover;
|
|
7253
|
+
}
|
|
7254
|
+
.rt-AvatarRoot:where(.rt-r-fit-contain){
|
|
7255
|
+
--avatar-object-fit: contain;
|
|
7256
|
+
}
|
|
7257
|
+
.rt-AvatarRoot:where(.rt-r-fit-fill){
|
|
7258
|
+
--avatar-object-fit: fill;
|
|
7259
|
+
}
|
|
7260
|
+
.rt-AvatarRoot:where(.rt-r-fit-scale-down){
|
|
7261
|
+
--avatar-object-fit: scale-down;
|
|
7262
|
+
}
|
|
7263
|
+
.rt-AvatarRoot:where(.rt-r-fit-none){
|
|
7264
|
+
--avatar-object-fit: none;
|
|
7265
|
+
}
|
|
7251
7266
|
.rt-AvatarFallback{
|
|
7252
7267
|
font-family: var(--default-font-family);
|
|
7253
7268
|
font-weight: var(--font-weight-medium);
|