UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines 4.75 kB
{"version":3,"file":"avatar.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/avatar/avatar.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const avatarStyle = defineComponentSlotStyle({\n base: {\n fallback: {\n alignItems: \"center\",\n boxSize: \"100%\",\n display: \"inline-flex\",\n fontWeight: \"medium\",\n justifyContent: \"center\",\n textTransform: \"uppercase\",\n },\n group: {\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"row-reverse\",\n justifyContent: \"flex-end\",\n _notFirstChild: {\n me: \"-2\",\n },\n },\n image: {\n boxSize: \"100%\",\n objectFit: \"cover\",\n },\n root: {\n flexShrink: \"0\",\n overflow: \"hidden\",\n position: \"relative\",\n userSelect: \"none\",\n verticalAlign: \"top\",\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'circle'\n */\n shape: {\n circle: {\n root: { rounded: \"full\" },\n },\n rounded: {\n root: { rounded: \"l2\" },\n },\n square: {\n root: { rounded: \"0\" },\n },\n },\n },\n\n variants: {\n outline: {\n group: {\n _child: {\n _loaded: {\n borderColor: \"bg !important\",\n borderWidth: \"1px\",\n },\n },\n },\n root: {\n layerStyle: \"outline\",\n _loaded: {\n bg: \"transparent\",\n borderColor: \"transparent\",\n },\n },\n },\n solid: {\n group: {\n _child: {\n borderColor: \"bg\",\n borderWidth: \"1px\",\n },\n },\n root: {\n layerStyle: \"solid\",\n _loaded: {\n bg: \"transparent\",\n },\n },\n },\n subtle: {\n group: {\n _child: {\n borderColor: \"bg\",\n borderWidth: \"1px\",\n },\n },\n root: {\n layerStyle: \"subtle\",\n _loaded: {\n bg: \"transparent\",\n },\n },\n },\n surface: {\n root: {\n layerStyle: \"surface\",\n _loaded: {\n bg: \"transparent\",\n borderColor: \"transparent\",\n },\n },\n },\n },\n\n sizes: {\n xs: {\n fallback: {\n fontSize: \"xs\",\n lineHeight: \"{sizes.8}\",\n },\n root: {\n boxSize: \"8\",\n },\n },\n sm: {\n fallback: {\n fontSize: \"sm\",\n lineHeight: \"{sizes.9}\",\n },\n root: {\n boxSize: \"9\",\n },\n },\n md: {\n fallback: {\n fontSize: \"md\",\n lineHeight: \"{sizes.10}\",\n },\n root: {\n boxSize: \"10\",\n },\n },\n lg: {\n fallback: {\n fontSize: \"md\",\n lineHeight: \"{sizes.11}\",\n },\n root: {\n boxSize: \"11\",\n },\n },\n xl: {\n fallback: {\n fontSize: \"lg\",\n lineHeight: \"{sizes.12}\",\n },\n root: {\n boxSize: \"12\",\n },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"circle\",\n },\n})\n\nexport type AvatarStyle = typeof avatarStyle\n"],"mappings":";;;AAEA,MAAa,cAAcA,wCAAyB;CAClD,MAAM;EACJ,UAAU;GACR,YAAY;GACZ,SAAS;GACT,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,eAAe;GAChB;EACD,OAAO;GACL,YAAY;GACZ,SAAS;GACT,eAAe;GACf,gBAAgB;GAChB,gBAAgB,EACd,IAAI,MACL;GACF;EACD,OAAO;GACL,SAAS;GACT,WAAW;GACZ;EACD,MAAM;GACJ,YAAY;GACZ,UAAU;GACV,UAAU;GACV,YAAY;GACZ,eAAe;GAChB;EACF;CAED,OAAO,EAML,OAAO;EACL,QAAQ,EACN,MAAM,EAAE,SAAS,QAAQ,EAC1B;EACD,SAAS,EACP,MAAM,EAAE,SAAS,MAAM,EACxB;EACD,QAAQ,EACN,MAAM,EAAE,SAAS,KAAK,EACvB;EACF,EACF;CAED,UAAU;EACR,SAAS;GACP,OAAO,EACL,QAAQ,EACN,SAAS;IACP,aAAa;IACb,aAAa;IACd,EACF,EACF;GACD,MAAM;IACJ,YAAY;IACZ,SAAS;KACP,IAAI;KACJ,aAAa;KACd;IACF;GACF;EACD,OAAO;GACL,OAAO,EACL,QAAQ;IACN,aAAa;IACb,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