@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 6.42 kB
Source Map (JSON)
{"version":3,"file":"tabs.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/tabs/tabs.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const tabsStyle = defineComponentSlotStyle({\n base: {\n list: {\n display: \"flex\",\n },\n panel: {\n flex: \"1\",\n },\n root: {\n display: \"flex\",\n w: \"full\",\n },\n tab: {\n alignItems: \"center\",\n cursor: \"pointer\",\n display: \"flex\",\n fontWeight: \"medium\",\n gap: \"2\",\n justifyContent: \"center\",\n transitionDuration: \"moderate\",\n transitionProperty: \"common\",\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n },\n\n props: {\n /**\n * The alignment of the tabs.\n *\n * @default 'start'\n */\n align: {\n center: {\n list: {\n justifyContent: \"center\",\n },\n },\n end: {\n list: {\n justifyContent: \"flex-end\",\n },\n },\n start: {\n list: {\n justifyContent: \"flex-start\",\n },\n },\n },\n /**\n * If `true`, tabs will stretch to width of the tablist.\n *\n * @default false\n */\n fitted: {\n true: {\n tab: {\n flex: 1,\n },\n },\n },\n /**\n * The orientation of the tab list.\n *\n * @default 'horizontal'\n */\n orientation: {\n horizontal: {\n list: { alignItems: \"center\", flexDirection: \"row\" },\n root: {\n flexDirection: \"column\",\n },\n },\n vertical: {\n list: { alignItems: \"stretch\", flexDirection: \"column\" },\n root: {\n flexDirection: \"row\",\n },\n },\n },\n },\n\n variants: {\n line: {\n list: {\n _horizontal: {\n borderBottomWidth: \"1px\",\n },\n _vertical: {\n borderRightWidth: \"1px\",\n },\n },\n tab: {\n color: \"fg.muted\",\n focusVisibleRing: \"inside\",\n position: \"relative\",\n _selected: {\n color: \"fg\",\n _after: {\n borderColor: \"colorScheme.solid\",\n position: \"absolute\",\n },\n _horizontal: {\n _after: {\n borderBottomWidth: \"1px\",\n bottom: \"-1px\",\n w: \"full\",\n },\n },\n _vertical: {\n _after: {\n borderRightWidth: \"1px\",\n h: \"full\",\n right: \"-1px\",\n },\n },\n },\n },\n },\n outline: {\n list: {\n _horizontal: {\n borderBottomWidth: \"1px\",\n },\n _vertical: {\n borderRightWidth: \"1px\",\n },\n },\n tab: {\n border: \"1px solid transparent\",\n color: \"fg.muted\",\n focusVisibleRing: \"inside\",\n position: \"relative\",\n _horizontal: {\n mb: \"-1px\",\n roundedStart: \"l2\",\n },\n _vertical: {\n me: \"-1px\",\n roundedLeft: \"l2\",\n },\n _selected: {\n bg: \"bg\",\n borderColor: \"border\",\n color: \"fg\",\n _horizontal: {\n borderBottomColor: \"transparent\",\n },\n _vertical: {\n borderRightColor: \"transparent\",\n },\n },\n },\n },\n plain: {\n tab: {\n color: \"fg.muted\",\n rounded: \"l2\",\n _selected: {\n color: \"fg\",\n },\n },\n },\n subtle: {\n tab: {\n border: \"1px solid transparent\",\n color: \"fg.muted\",\n rounded: \"l2\",\n _selected: {\n layerStyle: \"subtle\",\n },\n },\n },\n },\n\n sizes: {\n sm: {\n root: {\n gap: \"sm\",\n },\n tab: {\n fontSize: \"sm\",\n px: \"3\",\n py: \"1\",\n },\n },\n md: {\n root: {\n gap: \"md\",\n },\n tab: {\n fontSize: \"md\",\n px: \"4\",\n py: \"2\",\n },\n },\n lg: {\n root: {\n gap: \"lg\",\n },\n tab: {\n fontSize: \"lg\",\n px: \"5\",\n py: \"3\",\n },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"line\",\n align: \"start\",\n orientation: \"horizontal\",\n },\n})\n\nexport type TabsStyle = typeof tabsStyle\n"],"mappings":";;;AAEA,MAAa,YAAYA,wCAAyB;CAChD,MAAM;EACJ,MAAM,EACJ,SAAS,QACV;EACD,OAAO,EACL,MAAM,KACP;EACD,MAAM;GACJ,SAAS;GACT,GAAG;GACJ;EACD,KAAK;GACH,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,YAAY;GACZ,KAAK;GACL,gBAAgB;GAChB,oBAAoB;GACpB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T,OAAO,MACR;GACF,EACF;EACD,QAAQ,EACN,KAAK;GACH,QAAQ;GACR,OAAO;GACP,SAAS;GACT,WAAW,EACT,YAAY,UACb;GACF,EACF;EACF;CAED,OAAO;EACL,IAAI;GACF,MAAM,EACJ,KAAK,MACN;GACD,KAAK;IACH,UAAU;IACV,IAAI;IACJ,IAAI;IACL;GACF;EACD,IAAI;GACF,MAAM,EACJ,KAAK,MACN;GACD,KAAK;IACH,UAAU;IACV,IAAI;IACJ,IAAI;IACL;GACF;EACD,IAAI;GACF,MAAM,EACJ,KAAK,MACN;GACD,KAAK;IACH,UAAU;IACV,IAAI;IACJ,IAAI;IACL;GACF;EACF;CAED,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;EACP,aAAa;EACd;CACF,CAAC"}