import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-SfMJGCsn.js";import{t as r}from"./jsx-runtime-BBQGix-2.js";import{a as i,i as a}from"./utils-CReRlw17.js";import{f as o,t as s}from"./lucide-react-CK2oyDtF.js";import{n as c,t as l}from"./ui.module-DS2qtZts.js";import{n as u,r as d}from"./uiClasses-CZ_HVS3Y.js";import{n as f,t as p}from"./CheckBox.module-Hr3mvdAC.js";function m({label:e,description:t,placeholder:n,disabled:r,size:a,className:s,onChange:l,value:d,noWrap:f,id:m,tone:_=`neutral`,...v}){let y=(0,h.useId)(),b=m??y,x=t?`${b}-description`:void 0,S=e??n,C=d??!1;return(0,g.jsxs)(`div`,{className:i(c.uiElement,a&&c.uiSizable,a&&c[a],r&&c.disabled,s),"aria-disabled":r||void 0,children:[(0,g.jsxs)(`div`,{className:p.row,children:[(0,g.jsxs)(`div`,{className:i(p.wrapper,u(_)),children:[(0,g.jsx)(`input`,{...v,id:b,type:`checkbox`,checked:C,disabled:r,"aria-checked":C,"aria-describedby":x,className:i(c.uiSelectionControl,p.input),onChange:()=>l?.(!C)}),(0,g.jsx)(`div`,{className:i(c.uiSelectionIcon,p.icon),"aria-hidden":`true`,children:(0,g.jsx)(o,{})})]}),S&&(0,g.jsx)(`label`,{htmlFor:b,className:i(c.uiLabelBase,f&&`textNoWrap`),children:S})]}),t&&(0,g.jsx)(`p`,{id:x,className:c.uiDescription,children:t})]})}var h,g,_=t((()=>{h=e(n(),1),a(),s(),l(),d(),f(),g=r(),m.__docgenInfo={description:`Компонент флажка для выбора булевого значения в формах и списках.
Поддерживает tone + appearance и использует общие selection utility-классы из ui.module.scss.`,methods:[],displayName:`CheckBox`,props:{label:{required:!1,tsType:{name:`ReactNode`},description:``},description:{required:!1,tsType:{name:`string`},description:``},placeholder:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},size:{required:!1,tsType:{name:`union`,raw:`"xs" | "sm" | "md" | "lg" | "xl"`,elements:[{name:`literal`,value:`"xs"`},{name:`literal`,value:`"sm"`},{name:`literal`,value:`"md"`},{name:`literal`,value:`"lg"`},{name:`literal`,value:`"xl"`}]},description:``},value:{required:!0,tsType:{name:`V`},description:"Если начальное состояние может быть `null | undefined`\nзначит `onChange` тоже должен ументь сбрасывать.\nПоэтому такой контрол явно должен передавать `UiBaseProps<AnyType | undefined>`"},onChange:{required:!0,tsType:{name:`signature`,type:`function`,raw:`(value: T) => void`,signature:{arguments:[{type:{name:`C`},name:`value`}],return:{name:`void`}}},description:``},tone:{required:!1,tsType:{name:`union`,raw:`"neutral" | "error" | "warning" | "success" | "info"`,elements:[{name:`literal`,value:`"neutral"`},{name:`literal`,value:`"error"`},{name:`literal`,value:`"warning"`},{name:`literal`,value:`"success"`},{name:`literal`,value:`"info"`}]},description:``,defaultValue:{value:`"neutral"`,computed:!1}},noWrap:{required:!1,tsType:{name:`boolean`},description:``}},composes:[`Omit`]}}));export{_ as n,m as t};