{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-N6HNK25A.cjs","../src/components/ui/required-mark.tsx","../src/components/ui/field-wrapper.tsx","../src/components/ui/input.tsx","../src/components/ui/checkbox.tsx"],"names":["jsx","forwardRef","jsxs"],"mappings":"AAAA,uWAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACHI,+CAAA;AAFG,SAAS,YAAA,CAAA,EAAe;AAC7B,EAAA,uBACE,6BAAA,MAAC,EAAA,EAAK,aAAA,EAAW,IAAA,EAAC,SAAA,EAAU,iBAAA,EAAkB,QAAA,EAAA,IAAA,CAE9C,CAAA;AAEJ;ADIA;AACA;AEfA,8BAA2C;AAqEjC;AAtBV,IAAM,oBAAA,EAAsB;AAAA,EAC1B,KAAA,EAAO,gBAAA;AAAA,EACP,OAAA,EAAS,kBAAA;AAAA,EACT,OAAA,EAAS,kBAAA;AAAA,EACT,KAAA,EAAO;AACT,CAAA;AAEA,IAAM,aAAA,EAAe,+BAAA;AAAA,EACnB,CACE,EAAE,KAAA,EAAO,OAAA,EAAS,KAAA,EAAO,aAAA,EAAe,OAAA,EAAS,aAAA,EAAe,SAAA,EAAW,SAAA,EAAW,KAAA,EAAO,SAAA,EAAW,SAAS,CAAA,EACjH,GAAA,EAAA,GACG;AACH,IAAA,MAAM,UAAA,EAAY,MAAA,GAAS,KAAA,GAAQ,MAAA,GAAS,IAAA;AAE5C,IAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,kCAAA,UAAG,EAAY,gCAAA,EAAkC,UAAA,EAAY,SAAS,CAAA,EAC7F,QAAA,EAAA;AAAA,MAAA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMC,8BAAA,uBAAC,EAAA,EAAM,SAAA,EAAU,MAAA,EAAO,OAAA,EAAkB,OAAA,EAAS,YAAA,EAChD,QA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YAAA,EAAgC,iBAAA,CAAA,IAAA,CAAK,WAAA;AJqK9C;AACA;AACE;AACA;AACA;AACA;AACF,6HAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-N6HNK25A.cjs","sourcesContent":[null,"/**\n * The design system's required-field mark: an accent asterisk after the label.\n * `aria-hidden` on purpose — the CONTROL carries `required`/`aria-required` for\n * assistive tech; the star is only the visual. ONE owner, used by `Field`,\n * `FieldWrapper` and every form that marks its own labels.\n */\nexport function RequiredMark() {\n  return (\n    <span aria-hidden className=\"text-ods-accent\">\n      *\n    </span>\n  );\n}\n","'use client';\n\nimport { type ReactNode, forwardRef } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Label } from './label';\nimport { RequiredMark } from './required-mark';\n\nexport interface FieldWrapperProps {\n  /** Label text displayed above the field */\n  label?: string;\n  /**\n   * `id` of the control the label names. Without it the label is decoration:\n   * clicking it focuses nothing and assistive tech reads the field unnamed,\n   * which is why every caller that cared was rendering its own <Label> instead\n   * of using `label` here.\n   */\n  htmlFor?: string;\n  /**\n   * Status message displayed below the field, on ONE line, ellipsized on\n   * overflow (full text via the native `title`).\n   *\n   * It is positioned OUT OF FLOW (absolute, hanging below the wrapper), so it\n   * never changes the field's height when it appears — the same treatment\n   * `CheckboxBlock` uses. The trade is that it overlaps whatever sits directly\n   * below: a form stacking fields needs at least ~20px of vertical gap (e.g.\n   * `gap-[var(--spacing-system-lf)]`) for the message to land in clear space.\n   */\n  error?: string;\n  /** Color variant for the message: \"error\" (red), \"warning\" (yellow), \"success\" (green) or \"muted\" (grey) */\n  errorVariant?: 'error' | 'warning' | 'success' | 'muted';\n  /**\n   * Label scale. Default is the standard form-label scale (text-h6).\n   * 'large' (text-h4) is for screens whose design specifies body-scale field\n   * titles (e.g. the devices New Device page) — opt in per call site, the\n   * default stays the converged small scale.\n   */\n  labelVariant?: 'default' | 'large';\n  /**\n   * Marks the label with the `RequiredMark` `ContactForm` draws on its required\n   * fields, so a form mixing both never shows two conventions. Visual only — the\n   * CONTROL carries `required`/`aria-required` for assistive tech; the star is\n   * `aria-hidden`.\n   */\n  required?: boolean;\n  /** Additional className for the outer wrapper */\n  className?: string;\n  children: ReactNode;\n}\n\nconst errorVariantClasses = {\n  error: 'text-ods-error',\n  warning: 'text-ods-warning',\n  success: 'text-ods-success',\n  muted: 'text-ods-text-secondary',\n} as const;\n\nconst FieldWrapper = forwardRef<HTMLDivElement, FieldWrapperProps>(\n  (\n    { label, htmlFor, error, errorVariant = 'error', labelVariant = 'default', required = false, className, children },\n    ref,\n  ) => {\n    const hasChrome = label != null || error != null;\n\n    return (\n      <div ref={ref} className={cn(hasChrome ? 'relative flex w-full flex-col' : 'contents', className)}>\n        {label && (\n          // Default is text-h6, NOT text-h4: `Field` (ui/field.tsx) renders its label via\n          // `Label variant=\"small\"` = text-h6, and every form that mixes\n          // Field-wrapped controls with `label=`-prop controls showed two label\n          // sizes side by side — the exact inconsistency the admin editors kept\n          // reporting. One label scale, owned here and in Field together.\n          <Label className=\"mb-1\" htmlFor={htmlFor} variant={labelVariant}>\n            {label}\n            {required && <RequiredMark />}\n          </Label>\n        )}\n        {children}\n        {error && (\n          <p\n            className={cn(\n              'absolute bottom-0 left-0 right-0 translate-y-full truncate text-h6',\n              errorVariantClasses[errorVariant],\n            )}\n            title={error}\n          >\n            {error}\n          </p>\n        )}\n      </div>\n    );\n  },\n);\nFieldWrapper.displayName = 'FieldWrapper';\n\nexport { FieldWrapper };\n","'use client';\n\nimport { Loader2 } from 'lucide-react';\nimport { type InputHTMLAttributes, type ReactNode, forwardRef } from 'react';\nimport { cn } from '../../utils/cn';\nimport { FieldWrapper } from './field-wrapper';\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n  /** When true, renders error border & ring */\n  invalid?: boolean;\n  /** Element displayed at the start (left) of the input */\n  startAdornment?: ReactNode;\n  /** Element displayed at the end (right) of the input */\n  endAdornment?: ReactNode;\n  /** Label text displayed above the input */\n  label?: string;\n  /** Label scale forwarded to FieldWrapper ('large' = text-h4 for designs with body-scale field titles) */\n  labelVariant?: 'default' | 'large';\n  /** Status message displayed below the input */\n  error?: string;\n  /** Color variant for the message: \"error\" (red), \"warning\" (yellow), \"success\" (green) or \"muted\" (grey).\n      Only \"error\" and \"warning\" mark the field invalid (colored border). */\n  errorVariant?: 'error' | 'warning' | 'success' | 'muted';\n  /** When true, shows a loading spinner as end adornment */\n  loading?: boolean;\n}\n\nconst invalidBorderClasses = {\n  error: 'border-ods-error hover:border-ods-error has-[:focus]:border-ods-error',\n  warning: '!border-ods-warning hover:!border-ods-warning has-[:focus]:!border-ods-warning',\n} as const;\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n  (\n    {\n      className,\n      type,\n      invalid = false,\n      startAdornment,\n      endAdornment,\n      label,\n      labelVariant,\n      error,\n      errorVariant = 'error',\n      loading = false,\n      ...props\n    },\n    ref,\n  ) => {\n    // success/muted are informational — they never paint the invalid border\n    const variantIsInvalid = errorVariant === 'error' || errorVariant === 'warning';\n    const isInvalid = invalid || (!!error && variantIsInvalid);\n\n    // Range inputs get a clean slider rendering — no label wrapper, borders, or adornments\n    if (type === 'range') {\n      const rangeInput = (\n        <input\n          type=\"range\"\n          className={cn(\n            'h-1 w-full cursor-pointer appearance-none rounded-full bg-white/30',\n            // Webkit (Chrome/Safari) thumb\n            '[&::-webkit-slider-thumb]:appearance-none',\n            '[&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:w-3',\n            '[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white',\n            '[&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:shadow-sm',\n            // Firefox thumb\n            '[&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:w-3',\n            '[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-white',\n            '[&::-moz-range-thumb]:cursor-pointer [&::-moz-range-thumb]:border-0',\n            // Firefox track\n            '[&::-moz-range-track]:bg-transparent',\n            // Disabled\n            'disabled:cursor-not-allowed disabled:opacity-50',\n            className,\n          )}\n          ref={ref}\n          {...props}\n        />\n      );\n      return label ? (\n        <FieldWrapper label={label} labelVariant={labelVariant} error={error} errorVariant={errorVariant}>\n          {rangeInput}\n        </FieldWrapper>\n      ) : (\n        rangeInput\n      );\n    }\n\n    const content = (\n      <label\n        data-invalid={isInvalid || undefined}\n        className={cn(\n          // Layout & spacing\n          'flex h-11 w-full cursor-text items-center gap-2 rounded-[6px] border px-3 md:h-12',\n          // Focus-within states\n          'has-[:focus-visible]:outline-none',\n          'group',\n          // Animations & touch UX\n          'transition-colors duration-200',\n          // Theme palette\n          'border-ods-border bg-ods-card has-[:focus]:border-ods-accent',\n          // Hover & active (not disabled)\n          !props.disabled &&\n            'hover:border-ods-border-hover hover:bg-ods-bg-hover active:border-ods-border-active active:bg-ods-bg-active',\n          // Disabled. The adornments (and any icon inside them) carry their own\n          // `text-ods-text-secondary`, so grey them from here — a disabled field\n          // must read as one flat colour, not grey text next to a live icon.\n          // Scoped to the DIRECT span children (the two adornment wrappers): a\n          // descendant rule would also repaint whatever the caller renders INSIDE\n          // an adornment, which is passed verbatim precisely so it can own its\n          // colour (a `Tag` there went invisible against its own fill).\n          props.disabled && '!cursor-not-allowed bg-ods-bg',\n          'has-[:disabled]:[&>span]:text-ods-text-disabled has-[:disabled]:[&_svg]:text-ods-text-disabled',\n          // Invalid\n          isInvalid && invalidBorderClasses[variantIsInvalid ? errorVariant : 'error'],\n          className,\n        )}\n      >\n        {startAdornment && (\n          <span className=\"flex-shrink-0 text-ods-text-secondary transition-colors duration-200 text-h6 group-has-[:focus]:text-ods-accent group-data-[invalid]:text-ods-error [&_svg]:size-4 md:[&_svg]:size-6\">\n            {startAdornment}\n          </span>\n        )}\n        <input\n          type={type}\n          className={cn(\n            // Layout\n            'min-w-0 flex-1 border-none bg-transparent outline-none',\n            // Typography\n            'text-h4',\n            // Colors\n            'text-ods-text-primary placeholder:text-ods-text-secondary',\n            // File input adjustments\n            'file:border-0 file:bg-transparent',\n            // Disabled\n            'disabled:cursor-not-allowed disabled:text-ods-text-disabled disabled:placeholder:text-ods-border',\n            // Touch\n            'touch-manipulation',\n            // Autofill override\n            '[&:-webkit-autofill]:[-webkit-box-shadow:0_0_0_9999px_transparent_inset] [&:-webkit-autofill]:[-webkit-text-fill-color:var(--color-text-primary)] [&:-webkit-autofill]:[caret-color:var(--color-text-primary)] [&:-webkit-autofill]:[transition:background-color_9999s_ease-in-out_0s]',\n          )}\n          ref={ref}\n          {...props}\n        />\n        {loading && <Loader2 className=\"size-4 flex-shrink-0 animate-spin text-ods-text-secondary md:size-6\" />}\n        {!loading && endAdornment && (\n          <span className=\"flex-shrink-0 text-ods-text-secondary transition-colors duration-200 text-h6 group-has-[:focus]:text-ods-accent group-data-[invalid]:text-ods-error [&_svg]:size-4 md:[&_svg]:size-6\">\n            {endAdornment}\n          </span>\n        )}\n      </label>\n    );\n\n    return (\n      <FieldWrapper label={label} labelVariant={labelVariant} error={error} errorVariant={errorVariant}>\n        {content}\n      </FieldWrapper>\n    );\n  },\n);\nInput.displayName = 'Input';\n\nexport { Input };\n","'use client';\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react';\n\nimport { cn } from '../../utils/cn';\nimport { CheckboxCheckmarkIcon } from '../icons-v2-generated/signs-and-symbols/checkbox-checkmark-icon';\n\nconst Checkbox = forwardRef<\n  ElementRef<typeof CheckboxPrimitive.Root>,\n  ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n  <CheckboxPrimitive.Root\n    ref={ref}\n    className={cn(\n      'peer h-4 w-4 shrink-0 rounded-sm border border-ods-border bg-ods-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-ods-accent data-[state=checked]:bg-ods-accent',\n      className,\n    )}\n    {...props}\n  >\n    <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-ods-text-on-accent')}>\n      <CheckboxCheckmarkIcon size={10} />\n    </CheckboxPrimitive.Indicator>\n  </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"]}