{"version":3,"file":"index.ChdrZXfL.js","sources":["../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/checkbox/themes/styles/partnershipsUniversalMusic.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/checkbox/themes/styles/veci.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/checkbox/themes/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/checkbox/styled.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/checkbox/index.mjs"],"sourcesContent":["import { FontMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport { BorderRadius } from '@babylon/ui-kit-styles/common/mixins/logical.styled';\nimport { css } from 'styled-components';\n\nconst partnershipsUniversalMusicCheckBoxStyles = {\n CheckBoxLabel: ()=>/*#__PURE__*/ 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};\n\nexport { partnershipsUniversalMusicCheckBoxStyles as default };\n","import { css } from 'styled-components';\n\nconst veciCheckBoxStyles = {\n CheckBoxLabel: ()=>/*#__PURE__*/ css([\n `color:`,\n `;`\n ], ({ theme })=>theme.colors.white.base)\n};\n\nexport { veciCheckBoxStyles as default };\n","import { createThemes } from '@babylon/ui-kit-styles/common/themes';\nimport { ThemeId } from '@babylon/ui-kit-styles/types/theme';\nimport partnershipsUniversalMusicCheckBoxStyles from './styles/partnershipsUniversalMusic.mjs';\nimport veciCheckBoxStyles from './styles/veci.mjs';\n\nconst checkBoxStyles = createThemes({\n [ThemeId.partnershipsUniversalMusic]: partnershipsUniversalMusicCheckBoxStyles,\n [ThemeId.veci]: veciCheckBoxStyles\n});\n\nexport { checkBoxStyles as default };\n","import { FlexMixin, FontMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport styled, { css } from 'styled-components';\nimport checkBoxStyles from './themes/index.mjs';\n\nconst CheckboxWrapper = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"CheckboxWrapper\",\n componentId: \"sc-7ef23bfa-0\"\n})([\n ``,\n ` position:relative;user-select:none;opacity:1;transition:all 0.2s linear;width:100%;`\n], FlexMixin({\n align: 'center'\n}));\nconst CheckboxInput = /*#__PURE__*/ styled.input.withConfig({\n displayName: \"CheckboxInput\",\n componentId: \"sc-7ef23bfa-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);\nconst CheckboxLabel = /*#__PURE__*/ styled.label.withConfig({\n displayName: \"CheckboxLabel\",\n componentId: \"sc-7ef23bfa-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 ? /*#__PURE__*/ 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'));\nconst CheckboxLabelCount = /*#__PURE__*/ styled.span.withConfig({\n displayName: \"CheckboxLabelCount\",\n componentId: \"sc-7ef23bfa-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\nexport { CheckboxInput, CheckboxLabel, CheckboxLabelCount, CheckboxWrapper };\n","import { jsxs, Fragment, jsx } from 'react/jsx-runtime';\nimport ErrorTooltip from '../../others/error-tooltip/index.mjs';\nimport { useInput } from '../../../hooks/useInput/index.mjs';\nimport { forwardRef, useRef, useId, useState, useEffect, useCallback } from 'react';\nimport { CheckboxWrapper, CheckboxInput, CheckboxLabel, CheckboxLabelCount } from './styled.mjs';\n\nconst 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(CheckboxWrapper, {\n ref: wrapperRef,\n className: className,\n children: [\n /*#__PURE__*/ jsx(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(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(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';\nconst 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};\n\nexport { FormCheckbox, Checkbox as default };\n"],"names":["partnershipsUniversalMusicCheckBoxStyles","css","theme","BorderRadius","FontMixin","veciCheckBoxStyles","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","jsx","ErrorTooltip","FormCheckbox","_isHiddenRequired","restField","useInput"],"mappings":"2GAIA,MAAMA,EAA2C,CAC7C,cAAe,IAAkBC,EAAI,CAC7B,GACA,cACA,kBACA,IACA,cACA,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,MAA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