UNPKG

@yamada-ui/react

Version:

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

1 lines 3.63 kB
{"version":3,"file":"saturation-slider.style.cjs","names":["defineComponentSlotStyle","sliderStyle","hueSliderStyle"],"sources":["../../../../src/components/saturation-slider/saturation-slider.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\nimport { hueSliderStyle } from \"../hue-slider\"\nimport { sliderStyle } from \"../slider\"\n\nexport const saturationSliderStyle = defineComponentSlotStyle({\n base: {\n root: {\n aspectRatio: \"16 / 9\",\n boxShadow: \"inner\",\n isolation: \"isolate\",\n maxW: \"full\",\n p: \"calc({thumb-size} / 2)\",\n rounded: \"{root-rounded}\",\n touchAction: \"none\",\n w: \"full\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n thumb: {\n ...sliderStyle.base?.thumb,\n ...hueSliderStyle.base?.thumb,\n boxSize: \"{thumb-size}\",\n left: \"{--x, 0%}\",\n position: \"absolute\",\n rounded: \"{thumb-rounded}\",\n top: \"{--y, 0%}\",\n transform: \"translate(-50%, -50%)\",\n },\n track: {\n boxSize: \"full\",\n cursor: {\n base: \"pointer\",\n _readOnly: \"default\",\n _disabled: \"not-allowed\",\n },\n position: \"relative\",\n },\n },\n\n props: {\n /**\n * The shape of the thumb.\n *\n * @default 'circle'\n */\n shape: {\n circle: {\n root: {\n ...sliderStyle.props?.shape.circle.root,\n \"--root-rounded\": \"radii.l2\",\n },\n },\n rounded: {\n root: {\n ...sliderStyle.props?.shape.rounded.root,\n \"--root-rounded\": \"radii.l2\",\n },\n },\n square: {\n root: {\n ...sliderStyle.props?.shape.square.root,\n \"--root-rounded\": \"0\",\n },\n },\n },\n },\n\n sizes: {\n xs: {\n root: { \"--thumb-size\": hueSliderStyle.sizes?.xs.root[\"--thumb-size\"] },\n },\n sm: {\n root: { \"--thumb-size\": hueSliderStyle.sizes?.sm.root[\"--thumb-size\"] },\n },\n md: {\n root: { \"--thumb-size\": hueSliderStyle.sizes?.md.root[\"--thumb-size\"] },\n },\n lg: {\n root: { \"--thumb-size\": hueSliderStyle.sizes?.lg.root[\"--thumb-size\"] },\n },\n xl: {\n root: { \"--thumb-size\": hueSliderStyle.sizes?.xl.root[\"--thumb-size\"] },\n },\n },\n\n defaultProps: {\n size: \"md\",\n shape: \"circle\",\n },\n})\n\nexport type SaturationSliderStyle = typeof saturationSliderStyle\n"],"mappings":";;;;;AAIA,MAAa,wBAAwBA,wCAAyB;CAC5D,MAAM;EACJ,MAAM;GACJ,aAAa;GACb,WAAW;GACX,WAAW;GACX,MAAM;GACN,GAAG;GACH,SAAS;GACT,aAAa;GACb,GAAG;GACH,WAAW,EAAE,YAAY,YAAY;GACrC,WAAW,EAAE,YAAY,YAAY;GACtC;EACD,OAAO;GACL,GAAGC,iCAAY,MAAM;GACrB,GAAGC,wCAAe,MAAM;GACxB,SAAS;GACT,MAAM;GACN,UAAU;GACV,SAAS;GACT,KAAK;GACL,WAAW;GACZ;EACD,OAAO;GACL,SAAS;GACT,QAAQ;IACN,MAAM;IACN,WAAW;IACX,WAAW;IACZ;GACD,UAAU;GACX;EACF;CAED,OAAO,EAML,OAAO;EACL,QAAQ,EACN,MAAM;GACJ,GAAGD,iCAAY,OAAO,MAAM,OAAO;GACnC,kBAAkB;GACnB,EACF;EACD,SAAS,EACP,MAAM;GACJ,GAAGA,iCAAY,OAAO,MAAM,QAAQ;GACpC,kBAAkB;GACnB,EACF;EACD,QAAQ,EACN,MAAM;GACJ,GAAGA,iCAAY,OAAO,MAAM,OAAO;GACnC,kBAAkB;GACnB,EACF;EACF,EACF;CAED,OAAO;EACL,IAAI,EACF,MAAM,EAAE,gBAAgBC,wCAAe,OAAO,GAAG,KAAK,iBAAiB,EACxE;EACD,IAAI,EACF,MAAM,EAAE,gBAAgBA,wCAAe,OAAO,GAAG,KAAK,iBAAiB,EACxE;EACD,IAAI,EACF,MAAM,EAAE,gBAAgBA,wCAAe,OAAO,GAAG,KAAK,iBAAiB,EACxE;EACD,IAAI,EACF,MAAM,EAAE,gBAAgBA,wCAAe,OAAO,GAAG,KAAK,iBAAiB,EACxE;EACD,IAAI,EACF,MAAM,EAAE,gBAAgBA,wCAAe,OAAO,GAAG,KAAK,iBAAiB,EACxE;EACF;CAED,cAAc;EACZ,MAAM;EACN,OAAO;EACR;CACF,CAAC"}