@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 4.39 kB
Source Map (JSON)
{"version":3,"file":"radio.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/radio/radio.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const radioStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _before: { display: \"block\" },\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'circle'\n */\n shape: {\n circle: { indicator: { rounded: \"full\", _before: { rounded: \"full\" } } },\n rounded: {\n indicator: {\n rounded: \"l1\",\n _before: { rounded: \"calc({radii.l1} / 2)\" },\n },\n },\n square: {\n indicator: { rounded: \"0\", _before: { rounded: \"0\" } },\n },\n },\n },\n\n variants: {\n base: {\n indicator: { _checked: { _before: { bg: \"colorScheme.solid\" } } },\n },\n outline: {\n indicator: { _checked: { _before: { bg: \"colorScheme.outline\" } } },\n root: { _checked: { \"--indicator-border-color\": \"colorScheme.outline\" } },\n },\n solid: {},\n subtle: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { _before: { boxSize: \"1.5\" } },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { _before: { boxSize: \"2\" } },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { _before: { boxSize: \"3\" } },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"circle\",\n },\n})\n\nexport type RadioStyle = typeof radioStyle\n"],"mappings":";;;;AAEA,MAAa,aAAaA,wCAAyB;CACjD,MAAM;EACJ,OAAO,EAAE;EACT,WAAW;GACT,YAAY;GACZ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2BC,kCAAe;GAC1C,gBAAgB;GAChB,SAAS,EAAE,SAAS,SAAS;GAC7B,UAAU;IACR,aAAa;IACb,gBAAgB;IACjB;GACF;EACD,OAAO,EAAE;EACT,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,YAAY;GACZ,WAAW,EAAE,YAAY,YAAY;GACrC,WAAW,EAAE,YAAY,YAAY;GACtC;EACF;CAED,OAAO,EAML,OAAO;EACL,QAAQ,EAAE,WAAW;GAAE,SAAS;GAAQ,SAAS,EAAE,SAAS,QAAQ;GAAE,EAAE;EACxE,SAAS,EACP,WAAW;GACT,SAAS;GACT,SAAS,EAAE,SAAS,wBAAwB;GAC7C,EACF;EACD,QAAQ,EACN,WAAW;GAAE,SAAS;GAAK,SAAS,EAAE,SAAS,KAAK;GAAE,EACvD;EACF,EACF;CAED,UAAU;EACR,MAAM,EACJ,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,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