@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 4.17 kB
Source Map (JSON)
{"version":3,"file":"indicator.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/indicator/indicator.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const indicatorStyle = defineComponentSlotStyle({\n base: {\n float: {\n zIndex: \"yamcha\",\n },\n label: {\n alignItems: \"center\",\n display: \"inline-flex\",\n rounded: \"full\",\n verticalAlign: \"middle\",\n whiteSpace: \"nowrap\",\n _numeric: {\n fontWeight: \"medium\",\n },\n },\n root: {\n position: \"relative\",\n },\n },\n\n props: {\n /**\n * If `true`, set the indicator as an inline element.\n *\n * @default false\n * */\n inline: {\n false: {\n root: {\n display: \"block\",\n },\n },\n true: {\n root: {\n display: \"inline-block\",\n },\n },\n },\n /**\n * If `true`, make an element scale and fade like a radar ping or ripple of water.\n *\n * @default false\n */\n ping: {\n true: {\n label: {\n _before: {\n animationDuration: \"{duration, 1.4s}\",\n animationFillMode: \"forwards\",\n animationIterationCount: \"{iteration-count, infinite}\",\n animationName: \"ping\",\n animationTimingFunction:\n \"{timing-function, cubic-bezier(0, 0, 0.2, 1)}\",\n bg: \"{ping-color}\",\n boxSize: \"100%\",\n inset: \"0\",\n opacity: 0.7,\n position: \"absolute\",\n rounded: \"full\",\n zIndex: -1,\n },\n },\n root: {\n \"--animation-scale\": \"1.8\",\n },\n },\n },\n /**\n * If `true`, display the border of the indicator.\n *\n * @default false\n */\n withBorder: {\n true: {\n label: {\n borderColor: [\"white\", \"black\"],\n borderWidth: \"0.2em\",\n },\n },\n },\n },\n\n variants: {\n solid: {\n label: {\n layerStyle: \"solid\",\n \"--ping-color\": \"colorScheme.outline\",\n },\n },\n subtle: {\n label: {\n layerStyle: \"subtle\",\n \"--ping-color\": \"colorScheme.outline\",\n },\n },\n surface: {\n label: {\n layerStyle: \"surface\",\n \"--ping-color\": \"colorScheme.outline\",\n },\n },\n },\n\n sizes: {\n sm: {\n label: {\n fontSize: \"xs\",\n minBoxSize: \"3\",\n _notEmpty: { px: \"1.5\" },\n },\n },\n md: {\n label: {\n fontSize: \"sm\",\n minBoxSize: \"4\",\n _notEmpty: { px: \"2\" },\n },\n },\n lg: {\n label: {\n fontSize: \"md\",\n minBoxSize: \"5\",\n _notEmpty: { px: \"2.5\" },\n },\n },\n },\n\n defaultProps: {\n size: \"sm\",\n variant: \"solid\",\n ping: false,\n },\n})\n\nexport type IndicatorStyle = typeof indicatorStyle\n"],"mappings":";;;AAEA,MAAa,iBAAiBA,wCAAyB;CACrD,MAAM;EACJ,OAAO,EACL,QAAQ,UACT;EACD,OAAO;GACL,YAAY;GACZ,SAAS;GACT,SAAS;GACT,eAAe;GACf,YAAY;GACZ,UAAU,EACR,YAAY,UACb;GACF;EACD,MAAM,EACJ,UAAU,YACX;EACF;CAED,OAAO;EAML,QAAQ;GACN,OAAO,EACL,MAAM,EACJ,SAAS,SACV,EACF;GACD,MAAM,EACJ,MAAM,EACJ,SAAS,gBACV,EACF;GACF;EAMD,MAAM,EACJ,MAAM;GACJ,OAAO,EACL,SAAS;IACP,mBAAmB;IACnB,mBAAmB;IACnB,yBAAyB;IACzB,eAAe;IACf,yBACE;IACF,IAAI;IACJ,SAAS;IACT,OAAO;IACP,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;IACT,EACF;GACD,MAAM,EACJ,qBAAqB,OACtB;GACF,EACF;EAMD,YAAY,EACV,MAAM,EACJ,OAAO;GACL,aAAa,CAAC,SAAS,QAAQ;GAC/B,aAAa;GACd,EACF,EACF;EACF;CAED,UAAU;EACR,OAAO,EACL,OAAO;GACL,YAAY;GACZ,gBAAgB;GACjB,EACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,gBAAgB;GACjB,EACF;EACD,SAAS,EACP,OAAO;GACL,YAAY;GACZ,gBAAgB;GACjB,EACF;EACF;CAED,OAAO;EACL,IAAI,EACF,OAAO;GACL,UAAU;GACV,YAAY;GACZ,WAAW,EAAE,IAAI,OAAO;GACzB,EACF;EACD,IAAI,EACF,OAAO;GACL,UAAU;GACV,YAAY;GACZ,WAAW,EAAE,IAAI,KAAK;GACvB,EACF;EACD,IAAI,EACF,OAAO;GACL,UAAU;GACV,YAAY;GACZ,WAAW,EAAE,IAAI,OAAO;GACzB,EACF;EACF;CAED,cAAc;EACZ,MAAM;EACN,SAAS;EACT,MAAM;EACP;CACF,CAAC"}