@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 5.77 kB
Source Map (JSON)
{"version":3,"file":"menu.style.cjs","names":["defineComponentSlotStyle","popoverStyle"],"sources":["../../../../src/components/menu/menu.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\nimport { popoverStyle } from \"../popover\"\n\nexport const menuStyle = defineComponentSlotStyle({\n base: {\n command: {\n textStyle: \"mono\",\n color: \"fg.muted\",\n ms: \"auto\",\n },\n content: {\n \"&:has([data-footer])\": {\n scrollPaddingBottom: \"calc({space} + {footer-height} + {border-width})\",\n },\n \"&:has([data-header])\": {\n scrollPaddingTop: \"calc({space} + {header-height} + {border-width})\",\n },\n \"--border-width\": \"1px\",\n \"--footer-height\": \"{item-height}\",\n \"--header-height\": \"{item-height}\",\n gap: \"0\",\n overflow: \"auto\",\n p: \"{space}\",\n scrollPaddingBottom: \"{space}\",\n scrollPaddingTop: \"{space}\",\n },\n footer: {\n alignItems: \"center\",\n bg: popoverStyle.base?.content?.bg,\n borderTopWidth: \"{border-width}\",\n bottom: \"calc({space} * -1)\",\n display: \"flex\",\n left: \"0\",\n mb: \"calc({space} * -1)\",\n minH: \"{footer-height}\",\n mt: \"{space}\",\n mx: \"calc({space} * -1)\",\n position: \"sticky\",\n right: \"0\",\n },\n group: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n header: {\n alignItems: \"center\",\n bg: popoverStyle.base?.content?.bg,\n borderBottomWidth: \"{border-width}\",\n display: \"flex\",\n left: \"0\",\n mb: \"{space}\",\n minH: \"{header-height}\",\n mt: \"calc({space} * -1)\",\n mx: \"calc({space} * -1)\",\n position: \"sticky\",\n right: \"0\",\n top: \"calc({space} * -1)\",\n },\n indicator: {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n item: {\n alignItems: \"center\",\n display: \"flex\",\n focusVisibleRing: \"none\",\n minH: \"{item-height}\",\n userSelect: \"none\",\n _activedescendant: { bg: [\"bg.subtle/70\", \"bg.muted/70\"] },\n _disabled: { layerStyle: \"disabled\" },\n },\n label: {\n alignItems: \"center\",\n display: \"flex\",\n fontWeight: \"medium\",\n minH: \"{item-height}\",\n },\n separator: {\n \"& + hr\": { display: \"none\" },\n \"&:last-child, &:first-child\": { display: \"none\" },\n borderBottomWidth: \"{border-width}\",\n mx: \"calc({space} * -1)\",\n my: \"{space}\",\n },\n },\n\n sizes: {\n sm: {\n command: { fontSize: \"2xs\" },\n content: {\n \"--item-height\": \"spaces.7\",\n \"--space\": \"spaces.1\",\n fontSize: \"xs\",\n minW: \"3xs\",\n },\n footer: { px: \"1.5\" },\n header: { px: \"1.5\" },\n indicator: { fontSize: \"sm\" },\n item: { gap: \"1.5\", px: \"1.5\", rounded: \"l1\" },\n label: { px: \"1.5\" },\n },\n md: {\n command: { fontSize: \"xs\" },\n content: {\n \"--item-height\": \"spaces.8\",\n \"--space\": \"spaces.1\",\n fontSize: \"sm\",\n minW: \"2xs\",\n },\n footer: { px: \"2\" },\n header: { px: \"2\" },\n indicator: { fontSize: \"md\" },\n item: { gap: \"2\", px: \"2\", rounded: \"l1\" },\n label: { px: \"2\" },\n },\n lg: {\n command: { fontSize: \"sm\" },\n content: {\n \"--item-height\": \"spaces.9\",\n \"--space\": \"spaces.1\",\n fontSize: \"md\",\n minW: \"2xs\",\n },\n footer: { px: \"2\" },\n header: { px: \"2\" },\n indicator: { fontSize: \"lg\" },\n item: { gap: \"2\", px: \"2\", rounded: \"l1\" },\n label: { px: \"2\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n },\n})\n\nexport type MenuStyle = typeof menuStyle\n"],"mappings":";;;;AAGA,MAAa,YAAYA,wCAAyB;CAChD,MAAM;EACJ,SAAS;GACP,WAAW;GACX,OAAO;GACP,IAAI;GACL;EACD,SAAS;GACP,wBAAwB,EACtB,qBAAqB,oDACtB;GACD,wBAAwB,EACtB,kBAAkB,oDACnB;GACD,kBAAkB;GAClB,mBAAmB;GACnB,mBAAmB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