UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines 4.47 kB
{"version":3,"file":"checkbox.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/checkbox/checkbox.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const checkboxStyle = 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 _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 'rounded'\n */\n shape: {\n rounded: {\n indicator: { rounded: \"l1\" },\n },\n square: {\n indicator: { rounded: \"0\" },\n },\n },\n },\n\n variants: {\n outline: {\n indicator: { color: \"colorScheme.outline\" },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.outline\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.outline\" },\n },\n },\n solid: {\n indicator: {\n color: \"colorScheme.contrast\",\n _checked: { bg: \"colorScheme.solid\" },\n _indeterminate: { bg: \"colorScheme.solid\" },\n },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.solid\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.solid\" },\n },\n },\n subtle: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { fontSize: \"xs\" },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { fontSize: \"sm\" },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { fontSize: \"md\" },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"rounded\",\n },\n})\n\nexport type CheckboxStyle = typeof checkboxStyle\n"],"mappings":";;;;AAEA,MAAa,gBAAgBA,wCAAyB;CACpD,MAAM;EACJ,OAAO,EAAE;EACT,WAAW;GACT,YAAY;GACZ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2BC,kCAAe;GAC1C,gBAAgB;GAChB,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,SAAS,EACP,WAAW,EAAE,SAAS,MAAM,EAC7B;EACD,QAAQ,EACN,WAAW,EAAE,SAAS,KAAK,EAC5B;EACF,EACF;CAED,UAAU;EACR,SAAS;GACP,WAAW,EAAE,OAAO,uBAAuB;GAC3C,MAAM;IACJ,UAAU,EAAE,4BAA4B,uBAAuB;IAC/D,gBAAgB,EAAE,4BAA4B,uBAAuB;IACtE;GACF;EACD,OAAO;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