@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 2.18 kB
Source Map (JSON)
{"version":3,"file":"flex.cjs","names":["createComponent","flexStyle"],"sources":["../../../../src/components/flex/flex.tsx"],"sourcesContent":["\"use client\"\n\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { FlexStyle } from \"./flex.style\"\nimport { createComponent } from \"../../core\"\nimport { flexStyle } from \"./flex.style\"\n\nexport interface FlexProps\n extends Omit<HTMLStyledProps, \"direction\">,\n ThemeProps<FlexStyle> {\n /**\n * The CSS `align-items` property.\n */\n align?: CSSProps[\"alignItems\"]\n /**\n * The CSS `flex-basis` property.\n */\n basis?: CSSProps[\"flexBasis\"]\n /**\n * The CSS `flex-direction` property.\n */\n direction?: CSSProps[\"flexDirection\"]\n /**\n * The CSS `flex-grow` property.\n */\n grow?: CSSProps[\"flexGrow\"]\n /**\n * The CSS `justify-content` property.\n */\n justify?: CSSProps[\"justifyContent\"]\n /**\n * The CSS `flex-shrink` property.\n */\n shrink?: CSSProps[\"flexShrink\"]\n /**\n * The CSS `flex-wrap` property.\n */\n wrap?: CSSProps[\"flexWrap\"]\n}\n\nconst {\n PropsContext: FlexPropsContext,\n usePropsContext: useFlexPropsContext,\n withContext,\n} = createComponent<FlexProps, FlexStyle>(\"flex\", flexStyle)\n\nexport { FlexPropsContext, useFlexPropsContext }\n\n/**\n * `Flex` is a component that sets `flex` to `Box`. Also, convenient style shorthand is available.\n *\n * @see https://yamada-ui.com/docs/components/flex\n */\nexport const Flex = withContext(\"div\")(\n undefined,\n ({\n align: alignItems,\n basis: flexBasis,\n direction: flexDirection,\n grow: flexGrow,\n justify: justifyContent,\n shrink: flexShrink,\n wrap: flexWrap,\n ...rest\n }) => ({\n alignItems,\n flexBasis,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n ...rest,\n }),\n)\n"],"mappings":";;;;;;;AAwCA,MAAM,EACJ,cAAc,kBACd,iBAAiB,qBACjB,gBACEA,yCAAsC,QAAQC,6BAAU;;;;;;AAS5D,MAAa,OAAO,YAAY,MAAM,CACpC,SACC,EACC,OAAO,YACP,OAAO,WACP,WAAW,eACX,MAAM,UACN,SAAS,gBACT,QAAQ,YACR,MAAM,SACN,GAAG,YACE;CACL;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;CACJ,EACF"}