{"version":3,"sources":["jsdelivr-header.js","/npm/@radix-ui/react-label@2.1.17/src/index.ts","/npm/@radix-ui/react-label@2.1.17/src/label.tsx"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,kzBCNA,cAAA,GAAA,SAAA,cAAA,CAAA,MAAA,IAAA,MAAA,KAAA,IAAA,QAAA,OAAA,QAAA,aAAA,eCAA,IAAA,MAAuB,QAAA,QAAA,UACvB,uBAA0B,QAAA,6BAapB,mBAAA,QAAA,qBAHA,MAA8B,MAAA,WAClC,OAAA,SAAe,EAAO,GACpB,OACE,EAAA,mBAAA,KAAC,uBAAA,UAAU,MAAV,IACK,EACJ,IAAK,EACL,YAAc,IAEG,EAAM,OACV,QAAQ,qCAEnB,EAAM,cAAc,IAEf,EAAM,kBAAoB,EAAM,OAAS,GAAG,EAAM,oBAI/D,EAhBA","file":"/npm/@radix-ui/react-label@2.1.17/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@radix-ui/react-label@2.1.17/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use client';\nexport {\n  Label,\n  //\n  Root,\n} from './label';\nexport type { LabelProps } from './label';\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\ntype LabelElement = React.ComponentRef<typeof Primitive.label>;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = /* @__PURE__ */ React.forwardRef<LabelElement, LabelProps>(\n  function Label(props, forwardedRef) {\n    return (\n      <Primitive.label\n        {...props}\n        ref={forwardedRef}\n        onMouseDown={(event) => {\n          // only prevent text selection if clicking inside the label itself\n          const target = event.target as HTMLElement;\n          if (target.closest('button, input, select, textarea')) return;\n\n          props.onMouseDown?.(event);\n          // prevent text selection when double clicking label\n          if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n        }}\n      />\n    );\n  },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport {\n  Label,\n  //\n  Label as Root,\n};\nexport type { LabelProps };\n"]}