@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 4.09 kB
Source Map (JSON)
{"version":3,"file":"button.style.cjs","names":["defineComponentStyle"],"sources":["../../../../src/components/button/button.style.ts"],"sourcesContent":["import { defineComponentStyle } from \"../../core\"\n\nexport const buttonStyle = defineComponentStyle({\n base: {\n alignItems: \"center\",\n appearance: \"none\",\n cursor: \"pointer\",\n display: \"inline-flex\",\n fontWeight: \"medium\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n position: \"relative\",\n rounded: \"l2\",\n transitionDuration: \"moderate\",\n transitionProperty: \"common\",\n userSelect: \"none\",\n verticalAlign: \"middle\",\n whiteSpace: \"nowrap\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n\n props: {\n /**\n * If `true`, the button is full rounded. Else, it'll be slightly round.\n *\n * @default false\n */\n fullRounded: {\n true: { rounded: \"full\" },\n },\n },\n\n variants: {\n ghost: {\n layerStyle: \"ghost\",\n _hover: { layerStyle: \"ghost.hover\" },\n },\n outline: {\n layerStyle: \"outline\",\n _hover: { layerStyle: \"outline.hover\" },\n },\n solid: {\n layerStyle: \"solid\",\n _hover: { layerStyle: \"solid.hover\" },\n },\n subtle: {\n layerStyle: \"subtle\",\n _hover: { layerStyle: \"subtle.hover\" },\n },\n surface: {\n layerStyle: \"surface\",\n _hover: { layerStyle: \"surface.hover\" },\n },\n },\n\n sizes: {\n xs: {\n fontSize: \"xs\",\n gap: \"1\",\n h: \"8\",\n lineHeight: \"{sizes.8}\",\n minW: \"8\",\n px: \"2\",\n _icon: { fontSize: \"md\" },\n },\n sm: {\n fontSize: \"sm\",\n gap: \"2\",\n h: \"9\",\n lineHeight: \"{sizes.9}\",\n minW: \"9\",\n px: \"3\",\n _icon: { fontSize: \"md\" },\n },\n md: {\n fontSize: \"md\",\n gap: \"2\",\n h: \"10\",\n lineHeight: \"{sizes.10}\",\n minW: \"10\",\n px: \"3\",\n _icon: { fontSize: \"lg\" },\n },\n lg: {\n fontSize: \"lg\",\n gap: \"2.5\",\n h: \"11\",\n lineHeight: \"{sizes.11}\",\n minW: \"11\",\n px: \"4\",\n _icon: { fontSize: \"2xl\" },\n },\n xl: {\n fontSize: \"xl\",\n gap: \"3\",\n h: \"12\",\n lineHeight: \"{sizes.12}\",\n minW: \"12\",\n px: \"5\",\n _icon: { fontSize: \"2xl\" },\n },\n \"2xl\": {\n fontSize: \"xl\",\n gap: \"3\",\n h: \"14\",\n lineHeight: \"{sizes.14}\",\n minW: \"14\",\n px: \"5\",\n _icon: { fontSize: \"2xl\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n },\n})\n\nexport type ButtonStyle = typeof buttonStyle\n"],"mappings":";;;AAEA,MAAa,cAAcA,oCAAqB;CAC9C,MAAM;EACJ,YAAY;EACZ,YAAY;EACZ,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,gBAAgB;EAChB,UAAU;EACV,UAAU;EACV,SAAS;EACT,oBAAoB;EACpB,oBAAoB;EACpB,YAAY;EACZ,eAAe;EACf,YAAY;EACZ,WAAW,EAAE,YAAY,YAAY;EACrC,WAAW,EAAE,YAAY,YAAY;EACtC;CAED,OAAO,EAML,aAAa,EACX,MAAM,EAAE,SAAS,QAAQ,EAC1B,EACF;CAED,UAAU;EACR,OAAO;GACL,YAAY;GACZ,QAAQ,EAAE,YAAY,eAAe;GACtC;EACD,SAAS;GACP,YAAY;GACZ,QAAQ,EAAE,YAAY,iBAAiB;GACxC;EACD,OAAO;GACL,YAAY;GACZ,QAAQ,EAAE,YAAY,eAAe;GACtC;EACD,QAAQ;GACN,YAAY;GACZ,QAAQ,EAAE,YAAY,gBAAgB;GACvC;EACD,SAAS;GACP,YAAY;GACZ,QAAQ,EAAE,YAAY,iBAAiB;GACxC;EACF;CAED,OAAO;EACL,IAAI;GACF,UAAU;GACV,KAAK;GACL,GAAG;GACH,YAAY;GACZ,MAAM;GACN,IAAI;GACJ,OA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