{"version":3,"file":"index.00a9a888.js","sources":["../../../../../../../node_modules/@babylon/ui-kit/dist/components/forms/inputs/checkbox/themes/styles/partnershipsUniversalMusic.js","../../../../../../../node_modules/@babylon/ui-kit/dist/components/forms/inputs/checkbox/themes/index.js","../../../../../../../node_modules/@babylon/ui-kit/dist/components/forms/inputs/checkbox/styled.js","../../../../../../../node_modules/@babylon/ui-kit/dist/components/forms/inputs/checkbox/index.js"],"sourcesContent":["import { css } from \"styled-components\";\nimport { FontMixin } from \"../../../../../../styles/common/mixins/helpers.styled.js\";\nimport { BorderRadius } from \"../../../../../../styles/common/mixins/logical.styled.js\";\nconst partnershipsUniversalMusicCheckBoxStyles = {\n CheckBoxLabel: ()=>css([\n \"\",\n \"{::before{\",\n \";border:unset;}\",\n \"}\",\n \"{::before{\",\n \";border:1px solid \",\n \";}span{\",\n \" color:\",\n \";}}\"\n ], ({ theme })=>theme.media.up('lg'), BorderRadius({\n all: 'unset'\n }), FontMixin({\n height: 'base'\n }), ({ theme })=>theme.media.down('sm'), BorderRadius({\n all: 'unset'\n }), ({ theme })=>theme.colors.grays.light, FontMixin({\n size: 'medium',\n height: 'base'\n }), ({ theme })=>theme.colors.grays.darker)\n};\nexport default partnershipsUniversalMusicCheckBoxStyles;\n\n//# sourceMappingURL=partnershipsUniversalMusic.js.map","import { createThemes } from \"../../../../../styles/common/themes.js\";\nimport { ThemeId } from \"../../../../../styles/types/theme.js\";\nimport partnershipsUniversalMusicCheckBoxStyles from \"./styles/partnershipsUniversalMusic.js\";\nconst checkBoxStyles = createThemes({\n [ThemeId.partnershipsUniversalMusic]: partnershipsUniversalMusicCheckBoxStyles\n});\nexport default checkBoxStyles;\n\n//# sourceMappingURL=index.js.map","import styled, { css } from \"styled-components\";\nimport { FlexMixin, FontMixin } from \"../../../../styles/common/mixins/helpers.styled.js\";\nimport checkBoxStyles from \"./themes/index.js\";\nexport const CheckboxWrapper = styled.div.withConfig({\n displayName: \"styled__CheckboxWrapper\",\n componentId: \"sc-f512b2b-0\"\n})([\n \"\",\n \" position:relative;user-select:none;opacity:1;transition:all 0.2s linear;width:100%;\"\n], FlexMixin({\n align: 'center'\n}));\nexport const CheckboxInput = styled.input.withConfig({\n displayName: \"styled__CheckboxInput\",\n componentId: \"sc-f512b2b-1\"\n})([\n \"\",\n \" &{background-color:\",\n \";border:none;border-radius:4px;cursor:pointer;height:20px;margin-right:8px;width:20px;visibility:hidden;}\"\n], CheckboxWrapper, (props)=>props.theme.colors.white.base);\nexport const CheckboxLabel = styled.label.withConfig({\n displayName: \"styled__CheckboxLabel\",\n componentId: \"sc-f512b2b-2\"\n})([\n \"width:100%;\",\n \" cursor:pointer;color:\",\n \";\",\n \" &::before{border:1px solid \",\n \";background-color:\",\n \";border-radius:4px;content:'';height:20px;left:0;position:absolute;top:50%;transform:translateY(-50%);width:20px;}\",\n \" \",\n \" \",\n \"\"\n], FlexMixin({\n align: 'center',\n justify: 'space-between'\n}), (props)=>props.theme.colors.grays.darker, FontMixin({\n size: 'medium',\n height: 'medium',\n weight: 'light'\n}), (props)=>props.theme.colors.grays.base, (props)=>props.theme.colors.white.base, ({ checked })=>checked ? css([\n \"\",\n \":checked+&::after{border-left:transparent;border-left-style:solid;border-top:0;border-left-width:2px;border-bottom:2px solid \",\n \";border-right:2px solid \",\n \";border-top-width:2px;content:'';height:12px;left:7px;position:absolute;top:calc(50% - 6px);transform:rotate(40deg) translateX(-1px);width:6px;}\"\n ], CheckboxInput, (props)=>props.theme.colors.primary.light, (props)=>props.theme.colors.primary.light) : '', ({ theme, $hasError })=>$hasError ? `\n\t\tcolor: ${theme.colors.status.error};\n\t` : '', checkBoxStyles('CheckBoxLabel'));\nexport const CheckboxLabelCount = styled.span.withConfig({\n displayName: \"styled__CheckboxLabelCount\",\n componentId: \"sc-f512b2b-3\"\n})([\n \"border-radius:8px;padding:2px 6px;background-color:\",\n \";color:\",\n \";\",\n \" margin-left:8px;float:right;min-width:26px;text-align:center;\"\n], (props)=>props.theme.colors.grays.lighter, (props)=>props.theme.colors.grays.dark, FontMixin({\n size: 'small',\n height: 'base',\n weight: 'light'\n}));\n\n//# sourceMappingURL=styled.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { forwardRef, useCallback, useEffect, useId, useRef, useState } from \"react\";\nimport ErrorTooltip from \"../../others/error-tooltip/index.js\";\nimport useInput from \"../../../../hooks/forms/useInput/index.js\";\nimport * as S from \"./styled.js\";\nexport const Checkbox = /*#__PURE__*/ forwardRef(({ label, id = null, value, checked: initialChecked = false, disabled = false, count, className, error, hasError, onChange, onBlur, ...rest }, ref)=>{\n const wrapperRef = useRef(null);\n const uniqueId = useId();\n const [checked, setChecked] = useState(initialChecked);\n useEffect(()=>{\n setChecked(initialChecked);\n }, [\n initialChecked\n ]);\n const handleChange = useCallback((e)=>{\n setChecked(e.target.checked);\n if (onChange) onChange(e.target.checked);\n }, [\n onChange\n ]);\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsxs(S.CheckboxWrapper, {\n ref: wrapperRef,\n className: className,\n children: [\n /*#__PURE__*/ _jsx(S.CheckboxInput, {\n ref: ref,\n type: \"checkbox\",\n id: id ?? uniqueId,\n value: value,\n checked: checked,\n disabled: disabled,\n \"data-testid\": \"Checkbox\",\n onChange: handleChange,\n onBlur: onBlur,\n ...rest\n }),\n /*#__PURE__*/ _jsxs(S.CheckboxLabel, {\n checked: checked,\n $hasError: hasError,\n htmlFor: id ?? uniqueId,\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n children: label\n }),\n count && /*#__PURE__*/ _jsx(S.CheckboxLabelCount, {\n children: count\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(ErrorTooltip, {\n referenceElement: wrapperRef.current,\n error: error,\n isVisible: !!hasError\n })\n ]\n });\n});\nCheckbox.displayName = 'Checkbox';\nexport const FormCheckbox = (props)=>{\n const { isHiddenRequired: _isHiddenRequired, ...rest } = props;\n const { field: { value: checked, ...restField }, error, hasError, label } = useInput({\n type: 'checkbox',\n ...props\n });\n return /*#__PURE__*/ _jsx(Checkbox, {\n ...rest,\n ...restField,\n checked: checked,\n error: error,\n hasError: hasError,\n label: label\n });\n};\nexport default Checkbox;\n\n//# sourceMappingURL=index.js.map"],"names":["partnershipsUniversalMusicCheckBoxStyles","css","theme","BorderRadius","FontMixin","checkBoxStyles","createThemes","ThemeId","CheckboxWrapper","styled","FlexMixin","CheckboxInput","props","CheckboxLabel","checked","$hasError","CheckboxLabelCount","Checkbox","forwardRef","label","id","value","initialChecked","disabled","count","className","error","hasError","onChange","onBlur","rest","ref","wrapperRef","useRef","uniqueId","useId","setChecked","useState","useEffect","handleChange","useCallback","e","_jsxs","_Fragment","S.CheckboxWrapper","_jsx","S.CheckboxInput","S.CheckboxLabel","S.CheckboxLabelCount","ErrorTooltip","FormCheckbox","_isHiddenRequired","restField","useInput"],"mappings":"gHAGA,MAAMA,EAA2C,CAC7C,cAAe,IAAIC,EAAI,CACf,GACA,aACA,kBACA,IACA,aACA,qBACA,UACA,UACA,KACZ,EAAW,CAAC,CAAE,MAAAC,CAAK,IAAKA,EAAM,MAAM,GAAG,IAAI,EAAGC,EAAa,CAC/C,IAAK,OACR,CAAA,EAAGC,EAAU,CACV,OAAQ,MACpB,CAAS,EAAG,CAAC,CAAE,MAAAF,KAAUA,EAAM,MAAM,KAAK,IAAI,EAAGC,EAAa,CAClD,IAAK,OACjB,CAAS,EAAG,CAAC,CAAE,MAAAD,KAAUA,EAAM,OAAO,MAAM,MAAOE,EAAU,CACjD,KAAM,SACN,OAAQ,MACpB,CAAS,EAAG,CAAC,CAAE,MAAAF,CAAO,IAAGA,EAAM,OAAO,MAAM,MAAM,CAClD,ECrBMG,EAAiBC,EAAa,CAChC,CAACC,EAAQ,0BAA0B,EAAGP,CAC1C,CAAC,ECFYQ,EAAkBC,EAAO,IAAI,WAAW,CACjD,YAAa,0BACb,YAAa,cACjB,CAAC,EAAE,CACC,GACA,sFACJ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