@postenbring/hedwig-react 4.2.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/chunk-5J5LYE6Z.mjs +1 -0
  2. package/dist/chunk-6D5VE3DW.mjs +44 -0
  3. package/dist/chunk-6D5VE3DW.mjs.map +1 -0
  4. package/dist/{chunk-WMSOBRKN.mjs → chunk-DOW6EHBI.mjs} +2 -2
  5. package/dist/chunk-FTVKPZCX.mjs +37 -0
  6. package/dist/chunk-FTVKPZCX.mjs.map +1 -0
  7. package/dist/chunk-HA3LRSDK.mjs +21 -0
  8. package/dist/chunk-HA3LRSDK.mjs.map +1 -0
  9. package/dist/{chunk-JKKH77UC.mjs → chunk-JGYPZ7ET.mjs} +2 -2
  10. package/dist/{chunk-SQNGMF3D.mjs → chunk-QER35NXN.mjs} +5 -5
  11. package/dist/{chunk-DNCWDWK2.mjs → chunk-QOIBRXYT.mjs} +4 -4
  12. package/dist/chunk-XSID7YR7.mjs +1 -0
  13. package/dist/chunk-XSID7YR7.mjs.map +1 -0
  14. package/dist/form/checkbox/checkbox.mjs +3 -3
  15. package/dist/form/checkbox/index.mjs +3 -3
  16. package/dist/form/fieldset/fieldset.mjs +2 -2
  17. package/dist/form/fieldset/index.mjs +4 -4
  18. package/dist/form/index.d.ts +1 -0
  19. package/dist/form/index.d.ts.map +1 -1
  20. package/dist/form/index.js +82 -5
  21. package/dist/form/index.js.map +1 -1
  22. package/dist/form/index.mjs +35 -20
  23. package/dist/form/radio-button/index.mjs +4 -4
  24. package/dist/form/radio-button/radio-button.mjs +4 -4
  25. package/dist/form/radio-button/radio-group.mjs +3 -3
  26. package/dist/form/suggestions/index.d.ts +7 -0
  27. package/dist/form/suggestions/index.d.ts.map +1 -0
  28. package/dist/form/suggestions/index.js +131 -0
  29. package/dist/form/suggestions/index.js.map +1 -0
  30. package/dist/form/suggestions/index.mjs +19 -0
  31. package/dist/form/suggestions/index.mjs.map +1 -0
  32. package/dist/form/suggestions/suggestions-item.d.ts +45 -0
  33. package/dist/form/suggestions/suggestions-item.d.ts.map +1 -0
  34. package/dist/form/suggestions/suggestions-item.js +83 -0
  35. package/dist/form/suggestions/suggestions-item.js.map +1 -0
  36. package/dist/form/suggestions/suggestions-item.mjs +10 -0
  37. package/dist/form/suggestions/suggestions-item.mjs.map +1 -0
  38. package/dist/form/suggestions/suggestions-wrapper.d.ts +41 -0
  39. package/dist/form/suggestions/suggestions-wrapper.d.ts.map +1 -0
  40. package/dist/form/suggestions/suggestions-wrapper.js +66 -0
  41. package/dist/form/suggestions/suggestions-wrapper.js.map +1 -0
  42. package/dist/form/suggestions/suggestions-wrapper.mjs +8 -0
  43. package/dist/form/suggestions/suggestions-wrapper.mjs.map +1 -0
  44. package/dist/form/suggestions/suggestions.d.ts +57 -0
  45. package/dist/form/suggestions/suggestions.d.ts.map +1 -0
  46. package/dist/form/suggestions/suggestions.js +123 -0
  47. package/dist/form/suggestions/suggestions.js.map +1 -0
  48. package/dist/form/suggestions/suggestions.mjs +10 -0
  49. package/dist/form/suggestions/suggestions.mjs.map +1 -0
  50. package/dist/index.js +356 -279
  51. package/dist/index.js.map +1 -1
  52. package/dist/index.mjs +43 -28
  53. package/package.json +5 -5
  54. package/src/form/index.tsx +1 -0
  55. package/src/form/suggestions/index.tsx +6 -0
  56. package/src/form/suggestions/suggestions-item.tsx +70 -0
  57. package/src/form/suggestions/suggestions-wrapper.tsx +50 -0
  58. package/src/form/suggestions/suggestions.tsx +89 -0
  59. package/dist/chunk-CVE23PMJ.mjs +0 -1
  60. /package/dist/{chunk-CVE23PMJ.mjs.map → chunk-5J5LYE6Z.mjs.map} +0 -0
  61. /package/dist/{chunk-WMSOBRKN.mjs.map → chunk-DOW6EHBI.mjs.map} +0 -0
  62. /package/dist/{chunk-JKKH77UC.mjs.map → chunk-JGYPZ7ET.mjs.map} +0 -0
  63. /package/dist/{chunk-SQNGMF3D.mjs.map → chunk-QER35NXN.mjs.map} +0 -0
  64. /package/dist/{chunk-DNCWDWK2.mjs.map → chunk-QOIBRXYT.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/index.tsx","../../src/form/checkbox/checkbox.tsx","../../src/form/validation-message/validation-message.tsx","../../src/form/error-message/error-message.tsx","../../src/form/fieldset/fieldset.tsx","../../src/utils/utils.ts","../../src/form/fieldset/fieldset-description.tsx","../../src/form/fieldset/fieldset-legend.tsx","../../src/form/date-picker/date-picker.tsx","../../src/form/input-group/input-group.tsx","../../src/form/error-summary/error-summary.tsx","../../src/box/box.tsx","../../src/list/list.tsx","../../src/link/link.tsx","../../src/form/error-summary/focus.ts","../../src/form/input/input.tsx","../../src/form/radio-button/radio-button.tsx","../../src/form/radio-button/radio-group.tsx","../../src/form/search-wrapper/search-wrapper.tsx","../../src/form/select/select.tsx","../../src/form/textarea/textarea.tsx"],"sourcesContent":["export * from \"./checkbox\";\nexport * from \"./date-picker\";\nexport * from \"./error-message\";\nexport * from \"./error-summary\";\nexport * from \"./fieldset\";\nexport * from \"./input\";\nexport * from \"./radio-button\";\nexport * from \"./search-wrapper\";\nexport * from \"./select\";\nexport * from \"./textarea\";\nexport * from \"./validation-message\";\n","import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ValidationMessage, type ValidationMessageProps } from \"../validation-message\";\nimport { type ErrorMessageProps } from \"../error-message\";\nimport { useFieldsetContext } from \"../fieldset\";\nimport { getValidationMessageValue } from \"../../utils\";\n\nexport type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\" | \"size\"> & {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n title?: string;\n validationMessage?: ReactNode | { value: ReactNode };\n validationMessageProps?: Partial<ValidationMessageProps>;\n /** @deprecated Use `validationMessageProps` instead */\n errorMessageProps?: Partial<ErrorMessageProps>;\n size?: \"small\" | \"\";\n} & (\n | {\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Checkboxes in the Fieldset component.\n * When providing an errorMessage to Fieldset, all contained Checkboxes will get correct hasError state.\n *\n * You can use this when your checkbox is part of a non-HDS fieldset which shows an error message.\n */\n hasError?: boolean;\n //validationMessage?: never;\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: never;\n }\n | {\n hasError?: never;\n /**\n * Set an error message to add error styling, and display the error message.\n * The component will take care of aria to connect the error message to the checkbox.\n *\n * Use this when your checkbox is standalone (not part of a fieldset).\n */\n //validationMessage?: ReactNode;\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: ReactNode;\n }\n );\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n variant = \"plain\",\n hasError: hasErrorProp,\n validationMessage,\n validationMessageProps,\n errorMessage,\n errorMessageProps,\n title,\n children,\n className,\n size = \"\",\n ...rest\n },\n ref,\n ) => {\n const validationMessageId = useId();\n const { hasError: hasFieldsetError, size: fieldsetSize } = useFieldsetContext();\n const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;\n const effectiveSize = size || fieldsetSize;\n const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);\n\n return (\n <div\n className={clsx(\"hds-checkbox-wrapper\", {\n \"hds-checkbox-wrapper--small\": effectiveSize === \"small\",\n })}\n >\n <div\n className={clsx(\n \"hds-checkbox\",\n {\n [`hds-checkbox--${variant}`]: variant === \"bounding-box\",\n },\n className as undefined,\n )}\n >\n <label>\n <input\n aria-invalid={hasError ? true : undefined}\n aria-describedby={validationMessageValue ? validationMessageId : undefined}\n ref={ref}\n type=\"checkbox\"\n {...rest}\n />\n <span aria-hidden className=\"hds-checkbox__checkmark\" />\n {title ? <p className=\"hds-checkbox__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n <ValidationMessage\n id={validationMessageId}\n {...(validationMessageProps ?? errorMessageProps)}\n >\n {validationMessageValue}\n </ValidationMessage>\n </div>\n );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\n\nexport interface ValidationMessageProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n}\n\nexport const ValidationMessage = forwardRef<HTMLDivElement, ValidationMessageProps>(\n ({ className, ...rest }, ref) => (\n <div\n aria-live=\"polite\"\n className={clsx(\"hds-validation-message\", className as undefined)}\n ref={ref}\n {...rest}\n />\n ),\n);\nValidationMessage.displayName = \"ValidationMessage\";\n","import { forwardRef, type ReactNode } from \"react\";\nimport { ValidationMessage } from \"../validation-message\";\n\n/** @deprecated Use ValidationMessageProps instead */\nexport interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\n/** @deprecated Use ValidationMessage with data-color=\"error\" instead */\nexport const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(\n ({ children, id, className, ...rest }, ref) => (\n <ValidationMessage id={id} data-color=\"error\" className={className} {...rest} ref={ref}>\n {children}\n </ValidationMessage>\n ),\n);\nErrorMessage.displayName = \"ErrorMessage\";\n","import {\n Children,\n cloneElement,\n isValidElement,\n useId,\n forwardRef,\n createContext,\n useContext,\n} from \"react\";\nimport type {\n FieldsetHTMLAttributes,\n ReactElement,\n ReactNode,\n CSSProperties,\n ComponentProps,\n} from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ValidationMessage, type ValidationMessageProps } from \"../validation-message\";\nimport { type ErrorMessageProps } from \"../error-message\";\nimport { getValidationMessageValue } from \"../../utils\";\nimport { FieldsetDescription } from \"./fieldset-description\";\nimport { FieldsetLegend } from \"./fieldset-legend\";\n\ntype FieldsetLegendProps = ComponentProps<typeof FieldsetLegend>;\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n \"data-color\"?: \"info\" | \"success\" | \"warning\" | \"error\";\n validationMessage?: ReactNode | { value: ReactNode };\n validationMessageProps?: Partial<ValidationMessageProps>;\n /**\n * Providing an errorMessage will also give contained Checkboxes or Radio buttons\n * error styling and aria to indicate invalid state.\n *\n * For Radio buttons you are even better off using RadioGroup.\n */\n\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: ReactNode;\n /**\n * @deprecated Pass props directly to <Fieldset.Legend> instead.\n */\n legendProps?: FieldsetLegendProps;\n /**\n * @deprecated Use <Fieldset.Legend>...</Fieldset.Legend> instead.\n */\n legend?: ReactNode;\n size?: \"small\" | \"\";\n children: ReactNode;\n /** @deprecated Use `validationMessageProps` instead */\n errorMessageProps?: Partial<ErrorMessageProps>;\n}\n\n/** @deprecated Will no longer be needed */\nconst FieldsetContext = createContext<{ hasError: boolean; size: \"small\" | \"\" }>({\n hasError: false,\n size: \"\",\n});\n\n/** @deprecated Will no longer be needed */\nexport const useFieldsetContext = () => useContext(FieldsetContext);\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n \"data-color\": dataColor = undefined,\n validationMessage,\n validationMessageProps,\n errorMessage,\n errorMessageProps,\n legendProps,\n legend,\n size = \"\",\n children,\n ...rest\n },\n ref,\n) {\n const validationMessageId = useId();\n const validationColor = errorMessage ? \"error\" : dataColor;\n const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);\n const childArray = Children.toArray(children);\n const legendChild = childArray.find(\n (child): child is ReactElement<FieldsetLegendProps> =>\n isValidElement<FieldsetLegendProps>(child) && child.type === FieldsetLegend,\n );\n const contentChildren = legendChild\n ? childArray.filter((child) => child !== legendChild)\n : childArray;\n let renderedLegend = null;\n\n if (legendChild) {\n renderedLegend = cloneElement(legendChild, {\n ...legendProps,\n ...legendChild.props,\n className: clsx(\n legendProps?.className as undefined,\n legendChild.props.className as undefined,\n ),\n });\n } else if (legend !== undefined) {\n renderedLegend = <FieldsetLegend {...legendProps}>{legend}</FieldsetLegend>;\n }\n\n return (\n <fieldset\n aria-describedby={validationMessageValue ? validationMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", { [`hds-fieldset--${size}`]: size }, className as undefined)}\n data-color={validationColor}\n ref={ref}\n style={style}\n {...rest}\n >\n {renderedLegend}\n <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage), size }}>\n {contentChildren}\n </FieldsetContext.Provider>\n <ValidationMessage\n id={validationMessageId}\n {...(validationMessageProps ?? errorMessageProps)}\n >\n {validationMessageValue}\n </ValidationMessage>\n </fieldset>\n );\n}) as FieldsetType;\n\ntype FieldsetType = ReturnType<typeof forwardRef<HTMLFieldSetElement, FieldsetProps>> & {\n Description: typeof FieldsetDescription;\n Legend: typeof FieldsetLegend;\n};\n\nFieldset.Description = FieldsetDescription;\nFieldset.Legend = FieldsetLegend;\n","import * as React from \"react\";\nimport { useCallback, useEffect, useState, version } from \"react\";\nimport type { ReactNode } from \"react\";\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/useMergeRefs\n */\nexport function useMergeRefs<Instance>(\n refs: (React.Ref<Instance> | undefined)[],\n): React.RefCallback<Instance> | null {\n return React.useMemo(() => {\n if (refs.every((ref) => ref === null)) {\n return null;\n }\n\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null) {\n (ref as React.MutableRefObject<Instance | null>).current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, refs);\n}\n\nexport function useResize<Instance extends HTMLElement>(\n ref: React.RefObject<Instance> | undefined | null,\n): { width: number; height: number } {\n const [width, setWidth] = useState<number>(0);\n const [height, setHeight] = useState<number>(0);\n const handleResize = useCallback(() => {\n if (ref?.current !== null) {\n setWidth(ref?.current?.offsetWidth ?? 0);\n setHeight(ref?.current?.offsetHeight ?? 0);\n }\n }, [ref]);\n useEffect(() => {\n window.addEventListener(\"load\", handleResize);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"load\", handleResize);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [ref, handleResize]);\n useEffect(() => {\n handleResize();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, []);\n return { width, height };\n}\n\nfunction subscribe() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- It's ok\n return () => {};\n}\n\nexport function useHydrated() {\n return React.useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n\nexport function getValidationMessageValue(\n validationMessage?: ReactNode | { value: ReactNode },\n errorMessage?: ReactNode,\n): ReactNode {\n if (validationMessage) {\n if (typeof validationMessage === \"object\" && \"value\" in validationMessage) {\n return validationMessage.value;\n }\n\n return validationMessage;\n }\n\n return errorMessage;\n}\n\n/**\n * Trap focus inside an element using the `inert` attribute.\n *\n * Adds `inert` to all siblings of the given element, and all their ancestors up to the body.\n * Returns a cleanup function which removes the `inert` property from the elements, effectively giving focus back to rest of the document.\n *\n * NOTE: Does not support portals, i.e. elements outside the DOM hierarchy of the given element.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n * @see https://web.dev/articles/inert\n */\nexport function focusTrap(element: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- NOP on focus trapping the body element\n if (element === document.body) return () => {};\n\n let inertElements: HTMLElement[] = [];\n for (let el: HTMLElement | null = element; el; el = el.parentElement) {\n if (el === document.body) break;\n\n for (const sibling of el.parentElement?.children ?? []) {\n if (sibling === el) continue;\n if (!(sibling instanceof HTMLElement)) continue;\n if (sibling.hasAttribute(\"inert\")) continue;\n\n sibling.setAttribute(\"inert\", \"true\");\n inertElements.push(sibling);\n }\n }\n\n return () => {\n releaseFocusTrap(inertElements);\n inertElements = [];\n };\n}\n\n/**\n * Unset the `inert` attribute on all elements given\n */\nfunction releaseFocusTrap(inertElements: Iterable<HTMLElement>) {\n for (const el of inertElements) {\n el.removeAttribute(\"inert\");\n }\n}\n\n/**\n * React 19 supports inert prop\n * React 18 needs inert to be a string\n */\nconst inertBooleanSupported: boolean = Number(version.split(\".\")[0]) >= 19;\n\n/**\n * Returns the inert prop value based on the React version.\n */\nexport const inertPropValue: (x: boolean) => boolean | \"\" | undefined = inertBooleanSupported\n ? (x: boolean): boolean => x\n : (x: boolean): \"\" | undefined => (x ? \"\" : undefined);\n","import { forwardRef, type HTMLAttributes } from \"react\";\n\nexport type FieldsetDescriptionProps = HTMLAttributes<HTMLParagraphElement>;\n\n/**\n * FieldsetDescription component, used to display a description for a fieldset.\n *\n * @example\n * <FieldsetDescription>\n * Gi en kort beskrivelse i begge feltene\n * </FieldsetDescription>\n */\nexport const FieldsetDescription = forwardRef<HTMLParagraphElement, FieldsetDescriptionProps>(\n function FieldsetDescription(rest, ref) {\n return <p className=\"hds-fieldset__description\" ref={ref} {...rest} />;\n },\n);\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\n/**\n * FieldsetLegend component, used to display a legend for a fieldset.\n *\n * @example\n * <FieldsetLegend>Skriv inn dine svar</FieldsetLegend>\n */\nexport const FieldsetLegend = forwardRef<HTMLLegendElement, HTMLAttributes<HTMLLegendElement>>(\n function FieldsetLegend({ className, ...rest }, ref) {\n return (\n <legend\n className={clsx(\"hds-fieldset__legend\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\n\nFieldsetLegend.displayName = \"Fieldset.Legend\";\n","import { forwardRef, useRef, type InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup, type InputGroupProps } from \"../input-group\";\nimport { useMergeRefs } from \"../../utils/utils\";\n\nexport type DatePickerProps = Omit<\n InputGroupProps & Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n \"children\" | \"type\"\n> & {\n /**\n * Accessible title for the calendar button\n *\n * This button currently only shows in Chrome.\n *\n * @defaultValue \"Åpne kalender\"\n */\n calendarButtonTitle?: string;\n};\n\n/**\n * A basic implementation of a date picker\n *\n * This date picker is an implementation of native date picker, as you get\n * with `<input type=\"date\" />`, where the input field is dressed in Hedwig styling.\n *\n * Due to accessibility concerns you will only see the appropriate Hedwig calendar\n * icon in Chrome. Firefox will show built in icon and Safari will show no icon.\n * Not tested in Edge.\n */\nexport const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function DatePicker(\n {\n className,\n size,\n validationMessage,\n validationMessageProps,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n \"data-color\": dataColor,\n calendarButtonTitle = \"Åpne kalender\",\n ...rest\n },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n const mergedRef = useMergeRefs([inputRef, ref]);\n\n return (\n <InputGroup\n className={clsx(\"hds-date-picker\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n validationMessageProps={validationMessageProps}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n data-color={dataColor}\n >\n {(inputProps) => (\n <>\n <input\n {...inputProps}\n disabled={disabled}\n readOnly={readOnly}\n ref={mergedRef}\n type=\"date\"\n {...rest}\n />\n <button\n className={clsx(\"hds-date-picker__calendar-button\")}\n type=\"button\"\n title={calendarButtonTitle}\n onClick={() => {\n inputRef.current?.showPicker();\n }}\n />\n </>\n )}\n </InputGroup>\n );\n});\n\nDatePicker.displayName = \"DatePicker\";\n","import { useId, forwardRef, Children, isValidElement, cloneElement } from \"react\";\nimport type { LabelHTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ValidationMessage, type ValidationMessageProps } from \"../validation-message\";\nimport { type ErrorMessageProps } from \"../error-message\";\nimport { getValidationMessageValue } from \"../../utils\";\n\ninterface InputProps {\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: boolean;\n id?: string;\n className?: string;\n}\n\nexport interface InputGroupProps {\n id?: string;\n className?: string;\n style?: CSSProperties;\n \"data-color\"?: \"info\" | \"success\" | \"warning\" | \"error\";\n size?: \"large\" | \"small\";\n validationMessage?: ReactNode | { value: ReactNode };\n validationMessageProps?: Partial<ValidationMessageProps>;\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: ReactNode;\n /** @deprecated Use `validationMessageProps` instead */\n errorMessageProps?: Partial<ErrorMessageProps>;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label?: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * `children` must be either a single input element or a render function.\n *\n * If you use a render function, make sure you spread the input props to the appropriate element.\n */\n children: Exclude<ReactNode, Iterable<ReactNode>> | ((inputProps: InputProps) => ReactNode);\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n \"data-color\": dataColor = undefined,\n size = \"large\",\n validationMessage,\n validationMessageProps,\n errorMessage,\n errorMessageProps,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const validationMessageId = useId();\n const inputId = useId();\n const validationColor = errorMessage ? \"error\" : dataColor;\n const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);\n\n const renderInput = () => {\n const inputProps: InputProps = {\n \"aria-describedby\": validationMessage ? validationMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n className: clsx(\"hds-input-group__input\"),\n };\n\n if (typeof children === \"function\") {\n return children(inputProps);\n }\n\n const input: ReactNode = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n className: `${inputProps.className} ${input.props.className ?? \"\"}`,\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${size}`]: size,\n },\n className as undefined,\n )}\n ref={ref}\n style={style}\n data-color={validationColor}\n {...rest}\n >\n {label !== null && label !== undefined && label !== false && (\n <label\n className={clsx(\"hds-input-group__label\", labelClassName as undefined)}\n {...labelProps}\n htmlFor={id ?? inputId}\n >\n {label}\n </label>\n )}\n <div\n className={clsx(\"hds-input-group__input-wrapper\")}\n data-disabled={disabled}\n data-readonly={readOnly}\n >\n {renderInput()}\n </div>\n <ValidationMessage\n id={validationMessageId}\n {...(validationMessageProps ?? errorMessageProps)}\n >\n {validationMessageValue}\n </ValidationMessage>\n </div>\n );\n});\n","import { forwardRef, useEffect, useRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../../box\";\nimport { UnorderedList, type ListProps } from \"../../list\";\nimport { Link } from \"../../link\";\nimport { useMergeRefs } from \"../../utils\";\nimport { focusWithLegendOrLabelInViewport } from \"./focus\";\n\ninterface ErrorSummaryHeadingPropsAutoFocus {\n /**\n * The heading will be focused when the component mounts\n *\n * On following errornous form submissions you should manually focus the heading\n * e.g. by passing a ref and calling `ref.current.focus()`\n *\n * @default true\n */\n autoFocus?: boolean;\n}\n\ninterface ErrorSummaryHeadingPropsAs {\n /**\n * A heading level must be selected, or optionally opting out for a different element\n *\n * Use {@link ErrorSummaryHeadingPropsAsChild.asChild} if you need more control of the rendered element.\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n}\n\ninterface ErrorSummaryHeadingPropsAsChild {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild: true;\n as?: never;\n}\n\nexport type ErrorSummaryHeadingProps = HTMLAttributes<HTMLElement> &\n ErrorSummaryHeadingPropsAutoFocus &\n (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild);\n\nexport const ErrorSummaryHeading = forwardRef<\n HTMLParagraphElement,\n ErrorSummaryHeadingProps & (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild)\n>(({ asChild, children, as: Tag, autoFocus = true, ...rest }, ref) => {\n const focusRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs([focusRef, ref]);\n const Component = asChild ? Slot : Tag;\n\n useEffect(() => {\n /**\n * Hack: Safari 18 on mac at the time of writing\n * does not correctly focus it with VoiceOver without the timeout\n */\n setTimeout(() => {\n if (focusRef.current && autoFocus) {\n focusRef.current.focus();\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Only on initial render\n }, []);\n\n return (\n <Component className={clsx(`hds-error-summary__title`)} ref={mergedRef} tabIndex={-1} {...rest}>\n {children}\n </Component>\n );\n});\nErrorSummaryHeading.displayName = \"ErrorSummary.Heading\";\n\nexport interface ErrorSummaryListProps extends ListProps {\n /**\n * Sets the size of the items (font)\n *\n * @default \"small\"\n */\n size?: ListProps[\"size\"];\n}\nexport const ErrorSummaryList = forwardRef<HTMLUListElement, ErrorSummaryListProps>(\n ({ children, size = \"small\", ...rest }, ref) => (\n <UnorderedList size={size} ref={ref} {...rest}>\n {children}\n </UnorderedList>\n ),\n);\nErrorSummaryList.displayName = \"ErrorSummary.List\";\n\nexport interface ErrorSummaryItemProps extends React.HTMLAttributes<HTMLLIElement> {\n /**\n * A hash link to the element that the error message refers to\n *\n * Must start with \"#\" as it's passed to the `href` attribute of an anchor element\n *\n * @example \"#email\"\n */\n href: `#${string}`;\n\n /**\n * Extra props to pass to the link element\n */\n linkProps?: React.AnchorHTMLAttributes<HTMLAnchorElement>;\n}\nexport const ErrorSummaryItem = forwardRef<HTMLLIElement, ErrorSummaryItemProps>(\n ({ children, href, linkProps, ...rest }, ref) => {\n function onClick(e: React.MouseEvent<HTMLAnchorElement>) {\n linkProps?.onClick?.(e);\n if (focusWithLegendOrLabelInViewport(href.replace(\"#\", \"\"))) {\n e.preventDefault();\n }\n }\n\n return (\n <li className={clsx(`hds-error-summary__list-item`)} ref={ref} {...rest}>\n <Link size=\"small\" href={href} variant=\"solid\" {...linkProps} onClick={onClick}>\n {children}\n </Link>\n </li>\n );\n },\n);\nErrorSummaryItem.displayName = \"ErrorSummary.Item\";\n\nexport type ErrorSummaryProps = Omit<\n BoxProps,\n \"variant\" | \"closeable\" | \"onClose\" | \"closed\" | \"closeButtonProps\"\n>;\n\nexport const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(\n ({ children, className, ...rest }, ref) => (\n <Box\n data-color=\"error\"\n ref={ref}\n {...rest}\n className={clsx(`hds-error-summary`, className as undefined)}\n >\n {children}\n </Box>\n ),\n) as ErrorSummaryType;\nErrorSummary.displayName = \"ErrorSummary\";\n\ntype ErrorSummaryType = ReturnType<typeof forwardRef<HTMLDivElement, ErrorSummaryProps>> & {\n Heading: typeof ErrorSummaryHeading;\n List: typeof ErrorSummaryList;\n Item: typeof ErrorSummaryItem;\n};\nErrorSummary.Heading = ErrorSummaryHeading;\nErrorSummary.List = ErrorSummaryList;\nErrorSummary.Item = ErrorSummaryItem;\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nfunction CloseIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32} viewBox=\"0 0 32 32\">\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ListProps extends HTMLAttributes<HTMLOListElement | HTMLUListElement> {\n /**\n * Sets the size of the items (font)\n *\n * @default \"medium\"\n */\n size?: \"default\" | \"small\" | \"technical\" | \"medium\" | \"large\";\n}\n\n/**\n * An unordered list of simple items, often text. You can nest other lists inside this component.\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <UnorderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </UnorderedList>\n * ```\n */\nexport const UnorderedList = forwardRef<HTMLUListElement, ListProps>(\n ({ size = \"default\", className, ...rest }, ref) => {\n return (\n <ul\n ref={ref}\n className={clsx(\n \"hds-list\",\n size !== \"default\" && `hds-list--${size}`,\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nUnorderedList.displayName = \"UnorderedList\";\n\n/**\n * An ordered list of simple items\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <OrderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </OrderedList>\n * ```\n */\nexport const OrderedList = forwardRef<HTMLOListElement, ListProps>(\n ({ size = \"medium\", className, ...rest }, ref) => {\n return (\n <ol\n ref={ref}\n className={clsx(\n \"hds-list\",\n size !== \"default\" && `hds-list--${size}`,\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nOrderedList.displayName = \"OrderedList\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The visual style of the link\n */\n variant?: \"underline\" | \"solid\" | \"no-underline\";\n\n /**\n * Font size of the link\n * @default \"default\"\n */\n size?: \"default\" | \"small\" | \"large\" | \"technical\";\n\n /**\n * Specify that there is an icon in the link.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n */\n icon?: \"leading\" | \"trailing\";\n\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n { asChild, children, variant = \"underline\", size = \"default\", icon, className, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"a\";\n\n return (\n <Component\n className={clsx(\n \"hds-link\",\n variant !== \"underline\" && `hds-link--${variant}`,\n size !== \"default\" && `hds-link--${size}`,\n { \"hds-link--trailing-icon\": icon === \"trailing\" },\n { \"hds-link--leading-icon\": icon === \"leading\" },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nLink.displayName = \"Link\";\n","/**\n * Focus a form field while showing the associated legend or label in the viewport.\n *\n * Gives the user a better context of what field they are focusing on.\n *\n * Copied from https://github.com/alphagov/govuk-frontend/blob/cbf4ef1e329711be5b78a92bda6ba84a7db9ca40/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs#L60-L108\n */\nexport function focusWithLegendOrLabelInViewport(id: string) {\n const input = document.getElementById(id);\n if (!input) {\n return false;\n }\n\n const legendOrLabel = maybeLegendForInput(input) ?? labelForInput(input);\n if (!legendOrLabel) {\n return false;\n }\n\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n\n return true;\n}\n\nfunction maybeLegendForInput(input: HTMLElement) {\n const fieldset = input.closest(\"fieldset\");\n if (!fieldset) {\n return null;\n }\n\n const legend = fieldset.querySelector(\"legend\");\n if (!legend) {\n return null;\n }\n\n // If the input type is radio or checkbox, always use the legend if\n // there is one.\n if (input instanceof HTMLInputElement && (input.type === \"checkbox\" || input.type === \"radio\")) {\n return legend;\n }\n\n // For other input types, only scroll to the fieldset’s legend (instead\n // of the label associated with the input) if the input would end up in\n // the top half of the screen.\n //\n // This should avoid situations where the input either ends up off the\n // screen, or obscured by a software keyboard.\n const legendTop = legend.getBoundingClientRect().top;\n const inputRect = input.getBoundingClientRect();\n\n // If the browser doesn't support Element.getBoundingClientRect().height\n // or window.innerHeight (like IE8), bail and just link to the label.\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return legend;\n }\n }\n}\n\nfunction labelForInput(input: HTMLElement) {\n return (\n document.querySelector(`label[for='${input.getAttribute(\"id\")}']`) ?? input.closest(\"label\")\n );\n}\n","import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\n/**\n * Omitting:\n * - `size` from InputHTMLAttributes\n * - `children` from InputGroupProps\n * The original `size` prop that input elements have is not in use in HDS.\n * It is overridden by styling.\n */\nexport type InputProps = Omit<\n InputGroupProps & Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n \"children\"\n>;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n size,\n validationMessage,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n \"data-color\": dataColor,\n ...rest\n },\n ref,\n ) => (\n <InputGroup\n className={clsx(\"hds-input\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n data-color={dataColor}\n >\n <input disabled={disabled} readOnly={readOnly} ref={ref} {...rest} />\n </InputGroup>\n ),\n);\n\nInput.displayName = \"Input\";\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useRadioGroupContext } from \"./radio-group\";\n\nexport interface RadioButtonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\" | \"size\"> {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n title?: string;\n size?: \"small\" | \"\";\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadioButtonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioButtonProps[\"value\"];\n}) => {\n if (typeof checked !== \"undefined\") return checked;\n if (typeof selectedValue !== \"undefined\") return value === selectedValue;\n return undefined;\n};\n\nexport const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(\n ({ checked, value, variant = \"plain\", title, children, className, size = \"\", ...rest }, ref) => {\n const { value: selectedValue, size: groupSize, ...context } = useRadioGroupContext();\n const effectiveSize = size || groupSize;\n\n return (\n <div\n className={clsx(\n \"hds-radio-button\",\n {\n [`hds-radio-button--${variant}`]: variant === \"bounding-box\",\n [`hds-radio-button--${effectiveSize}`]: effectiveSize === \"small\",\n },\n className as undefined,\n )}\n >\n <label>\n <input\n {...context}\n {...rest}\n checked={isChecked({ checked, selectedValue, value })}\n value={value}\n ref={ref}\n type=\"radio\"\n />\n <span aria-hidden className=\"hds-radio-button__checkmark\" />\n {title ? <p className=\"hds-radio-button__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadioButton.displayName = \"RadioButton\";\n","import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type InputHTMLAttributes,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { FieldsetDescription } from \"../fieldset/fieldset-description\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport { FieldsetLegend } from \"../fieldset/fieldset-legend\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n children: ReactNode;\n /** Will be passed to all Radio buttons within the radio group */\n name?: InputHTMLAttributes<HTMLInputElement>[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** Will be passed to all Radio buttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\" | \"size\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n name: undefined,\n onChange: () => undefined,\n size: undefined,\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, onChange, children, size, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, onChange, size }}>\n <Fieldset size={size} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n}) as RadioGroupType;\n\ntype RadioGroupType = ReturnType<typeof forwardRef<HTMLFieldSetElement, RadioGroupProps>> & {\n Description: typeof FieldsetDescription;\n Legend: typeof FieldsetLegend;\n};\n\nRadioGroup.Description = FieldsetDescription;\nRadioGroup.Legend = FieldsetLegend;\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface SearchWrapperProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n}\n\nexport const SearchWrapper = forwardRef<HTMLDivElement, SearchWrapperProps>(\n ({ className, ...rest }, ref) => (\n <div className={clsx(\"hds-search-wrapper\", className as undefined)} ref={ref} {...rest} />\n ),\n);\n\nSearchWrapper.displayName = \"SearchWrapper\";\n","import { forwardRef, type ReactNode, type SelectHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\nexport type SelectProps = Omit<\n InputGroupProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, \"size\">,\n \"readOnly\" | \"children\"\n> & { children: ReactNode };\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n className,\n size,\n validationMessage,\n validationMessageProps,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n \"data-color\": dataColor,\n children,\n ...rest\n },\n ref,\n ) => (\n <InputGroup\n className={clsx(\"hds-select\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n validationMessageProps={validationMessageProps}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n style={style}\n size={size}\n data-color={dataColor}\n >\n <select disabled={disabled} ref={ref} {...rest}>\n {children}\n </select>\n </InputGroup>\n ),\n);\n\nSelect.displayName = \"Select\";\n","import { forwardRef } from \"react\";\nimport type { TextareaHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\nexport type TextareaProps = Omit<\n InputGroupProps & TextareaHTMLAttributes<HTMLTextAreaElement>,\n \"children\"\n>;\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n {\n className,\n size,\n validationMessage,\n validationMessageProps,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n \"data-color\": dataColor,\n ...rest\n },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-textarea\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n validationMessageProps={validationMessageProps}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n data-color={dataColor}\n >\n <textarea disabled={disabled} readOnly={readOnly} ref={ref} {...rest} />\n </InputGroup>\n );\n});\n\nTextarea.displayName = \"Textarea\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA4E;AAC5E,IAAAC,0BAAqB;;;ACDrB,6BAAqB;AACrB,mBAAgD;AAQ5C;AAFG,IAAM,wBAAoB;AAAA,EAC/B,CAAC,IAAwB,QAAK;AAA7B,iBAAE,YARL,IAQG,IAAgB,iBAAhB,IAAgB,CAAd;AACD;AAAA,MAAC;AAAA;AAAA,QACC,aAAU;AAAA,QACV,eAAW,6BAAK,0BAA0B,SAAsB;AAAA,QAChE;AAAA,SACI;AAAA,IACN;AAAA;AAE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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,+BAAK,gBAAgB,SAAsB;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MAEZ,wDAAC,6BAAS,UAAoB,UAAoB,OAAc,KAAM;AAAA;AAAA,EACxE;AAEJ,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react","import_react","import_jsx_runtime","FieldsetDescription","import_react","import_typed_classname","import_jsx_runtime","FieldsetLegend","import_jsx_runtime","Fieldset","import_jsx_runtime","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","InputGroup","_a","import_jsx_runtime","DatePicker","_a","import_react","import_typed_classname","import_react_slot","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","React","import_typed_classname","import_react","import_react_slot","import_jsx_runtime","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","Textarea"]}
1
+ {"version":3,"sources":["../../src/form/index.tsx","../../src/form/checkbox/checkbox.tsx","../../src/form/validation-message/validation-message.tsx","../../src/form/error-message/error-message.tsx","../../src/form/fieldset/fieldset.tsx","../../src/utils/utils.ts","../../src/form/fieldset/fieldset-description.tsx","../../src/form/fieldset/fieldset-legend.tsx","../../src/form/date-picker/date-picker.tsx","../../src/form/input-group/input-group.tsx","../../src/form/error-summary/error-summary.tsx","../../src/box/box.tsx","../../src/list/list.tsx","../../src/link/link.tsx","../../src/form/error-summary/focus.ts","../../src/form/input/input.tsx","../../src/form/radio-button/radio-button.tsx","../../src/form/radio-button/radio-group.tsx","../../src/form/search-wrapper/search-wrapper.tsx","../../src/form/select/select.tsx","../../src/form/suggestions/suggestions.tsx","../../src/form/suggestions/suggestions-wrapper.tsx","../../src/form/suggestions/suggestions-item.tsx","../../src/form/textarea/textarea.tsx"],"sourcesContent":["export * from \"./checkbox\";\nexport * from \"./date-picker\";\nexport * from \"./error-message\";\nexport * from \"./error-summary\";\nexport * from \"./fieldset\";\nexport * from \"./input\";\nexport * from \"./radio-button\";\nexport * from \"./search-wrapper\";\nexport * from \"./select\";\nexport * from \"./suggestions\";\nexport * from \"./textarea\";\nexport * from \"./validation-message\";\n","import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ValidationMessage, type ValidationMessageProps } from \"../validation-message\";\nimport { type ErrorMessageProps } from \"../error-message\";\nimport { useFieldsetContext } from \"../fieldset\";\nimport { getValidationMessageValue } from \"../../utils\";\n\nexport type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\" | \"size\"> & {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n title?: string;\n validationMessage?: ReactNode | { value: ReactNode };\n validationMessageProps?: Partial<ValidationMessageProps>;\n /** @deprecated Use `validationMessageProps` instead */\n errorMessageProps?: Partial<ErrorMessageProps>;\n size?: \"small\" | \"\";\n} & (\n | {\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Checkboxes in the Fieldset component.\n * When providing an errorMessage to Fieldset, all contained Checkboxes will get correct hasError state.\n *\n * You can use this when your checkbox is part of a non-HDS fieldset which shows an error message.\n */\n hasError?: boolean;\n //validationMessage?: never;\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: never;\n }\n | {\n hasError?: never;\n /**\n * Set an error message to add error styling, and display the error message.\n * The component will take care of aria to connect the error message to the checkbox.\n *\n * Use this when your checkbox is standalone (not part of a fieldset).\n */\n //validationMessage?: ReactNode;\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: ReactNode;\n }\n );\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n variant = \"plain\",\n hasError: hasErrorProp,\n validationMessage,\n validationMessageProps,\n errorMessage,\n errorMessageProps,\n title,\n children,\n className,\n size = \"\",\n ...rest\n },\n ref,\n ) => {\n const validationMessageId = useId();\n const { hasError: hasFieldsetError, size: fieldsetSize } = useFieldsetContext();\n const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;\n const effectiveSize = size || fieldsetSize;\n const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);\n\n return (\n <div\n className={clsx(\"hds-checkbox-wrapper\", {\n \"hds-checkbox-wrapper--small\": effectiveSize === \"small\",\n })}\n >\n <div\n className={clsx(\n \"hds-checkbox\",\n {\n [`hds-checkbox--${variant}`]: variant === \"bounding-box\",\n },\n className as undefined,\n )}\n >\n <label>\n <input\n aria-invalid={hasError ? true : undefined}\n aria-describedby={validationMessageValue ? validationMessageId : undefined}\n ref={ref}\n type=\"checkbox\"\n {...rest}\n />\n <span aria-hidden className=\"hds-checkbox__checkmark\" />\n {title ? <p className=\"hds-checkbox__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n <ValidationMessage\n id={validationMessageId}\n {...(validationMessageProps ?? errorMessageProps)}\n >\n {validationMessageValue}\n </ValidationMessage>\n </div>\n );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\n\nexport interface ValidationMessageProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n}\n\nexport const ValidationMessage = forwardRef<HTMLDivElement, ValidationMessageProps>(\n ({ className, ...rest }, ref) => (\n <div\n aria-live=\"polite\"\n className={clsx(\"hds-validation-message\", className as undefined)}\n ref={ref}\n {...rest}\n />\n ),\n);\nValidationMessage.displayName = \"ValidationMessage\";\n","import { forwardRef, type ReactNode } from \"react\";\nimport { ValidationMessage } from \"../validation-message\";\n\n/** @deprecated Use ValidationMessageProps instead */\nexport interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\n/** @deprecated Use ValidationMessage with data-color=\"error\" instead */\nexport const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(\n ({ children, id, className, ...rest }, ref) => (\n <ValidationMessage id={id} data-color=\"error\" className={className} {...rest} ref={ref}>\n {children}\n </ValidationMessage>\n ),\n);\nErrorMessage.displayName = \"ErrorMessage\";\n","import {\n Children,\n cloneElement,\n isValidElement,\n useId,\n forwardRef,\n createContext,\n useContext,\n} from \"react\";\nimport type {\n FieldsetHTMLAttributes,\n ReactElement,\n ReactNode,\n CSSProperties,\n ComponentProps,\n} from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ValidationMessage, type ValidationMessageProps } from \"../validation-message\";\nimport { type ErrorMessageProps } from \"../error-message\";\nimport { getValidationMessageValue } from \"../../utils\";\nimport { FieldsetDescription } from \"./fieldset-description\";\nimport { FieldsetLegend } from \"./fieldset-legend\";\n\ntype FieldsetLegendProps = ComponentProps<typeof FieldsetLegend>;\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n \"data-color\"?: \"info\" | \"success\" | \"warning\" | \"error\";\n validationMessage?: ReactNode | { value: ReactNode };\n validationMessageProps?: Partial<ValidationMessageProps>;\n /**\n * Providing an errorMessage will also give contained Checkboxes or Radio buttons\n * error styling and aria to indicate invalid state.\n *\n * For Radio buttons you are even better off using RadioGroup.\n */\n\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: ReactNode;\n /**\n * @deprecated Pass props directly to <Fieldset.Legend> instead.\n */\n legendProps?: FieldsetLegendProps;\n /**\n * @deprecated Use <Fieldset.Legend>...</Fieldset.Legend> instead.\n */\n legend?: ReactNode;\n size?: \"small\" | \"\";\n children: ReactNode;\n /** @deprecated Use `validationMessageProps` instead */\n errorMessageProps?: Partial<ErrorMessageProps>;\n}\n\n/** @deprecated Will no longer be needed */\nconst FieldsetContext = createContext<{ hasError: boolean; size: \"small\" | \"\" }>({\n hasError: false,\n size: \"\",\n});\n\n/** @deprecated Will no longer be needed */\nexport const useFieldsetContext = () => useContext(FieldsetContext);\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n \"data-color\": dataColor = undefined,\n validationMessage,\n validationMessageProps,\n errorMessage,\n errorMessageProps,\n legendProps,\n legend,\n size = \"\",\n children,\n ...rest\n },\n ref,\n) {\n const validationMessageId = useId();\n const validationColor = errorMessage ? \"error\" : dataColor;\n const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);\n const childArray = Children.toArray(children);\n const legendChild = childArray.find(\n (child): child is ReactElement<FieldsetLegendProps> =>\n isValidElement<FieldsetLegendProps>(child) && child.type === FieldsetLegend,\n );\n const contentChildren = legendChild\n ? childArray.filter((child) => child !== legendChild)\n : childArray;\n let renderedLegend = null;\n\n if (legendChild) {\n renderedLegend = cloneElement(legendChild, {\n ...legendProps,\n ...legendChild.props,\n className: clsx(\n legendProps?.className as undefined,\n legendChild.props.className as undefined,\n ),\n });\n } else if (legend !== undefined) {\n renderedLegend = <FieldsetLegend {...legendProps}>{legend}</FieldsetLegend>;\n }\n\n return (\n <fieldset\n aria-describedby={validationMessageValue ? validationMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", { [`hds-fieldset--${size}`]: size }, className as undefined)}\n data-color={validationColor}\n ref={ref}\n style={style}\n {...rest}\n >\n {renderedLegend}\n <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage), size }}>\n {contentChildren}\n </FieldsetContext.Provider>\n <ValidationMessage\n id={validationMessageId}\n {...(validationMessageProps ?? errorMessageProps)}\n >\n {validationMessageValue}\n </ValidationMessage>\n </fieldset>\n );\n}) as FieldsetType;\n\ntype FieldsetType = ReturnType<typeof forwardRef<HTMLFieldSetElement, FieldsetProps>> & {\n Description: typeof FieldsetDescription;\n Legend: typeof FieldsetLegend;\n};\n\nFieldset.Description = FieldsetDescription;\nFieldset.Legend = FieldsetLegend;\n","import * as React from \"react\";\nimport { useCallback, useEffect, useState, version } from \"react\";\nimport type { ReactNode } from \"react\";\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/useMergeRefs\n */\nexport function useMergeRefs<Instance>(\n refs: (React.Ref<Instance> | undefined)[],\n): React.RefCallback<Instance> | null {\n return React.useMemo(() => {\n if (refs.every((ref) => ref === null)) {\n return null;\n }\n\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null) {\n (ref as React.MutableRefObject<Instance | null>).current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, refs);\n}\n\nexport function useResize<Instance extends HTMLElement>(\n ref: React.RefObject<Instance> | undefined | null,\n): { width: number; height: number } {\n const [width, setWidth] = useState<number>(0);\n const [height, setHeight] = useState<number>(0);\n const handleResize = useCallback(() => {\n if (ref?.current !== null) {\n setWidth(ref?.current?.offsetWidth ?? 0);\n setHeight(ref?.current?.offsetHeight ?? 0);\n }\n }, [ref]);\n useEffect(() => {\n window.addEventListener(\"load\", handleResize);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"load\", handleResize);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [ref, handleResize]);\n useEffect(() => {\n handleResize();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, []);\n return { width, height };\n}\n\nfunction subscribe() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- It's ok\n return () => {};\n}\n\nexport function useHydrated() {\n return React.useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n\nexport function getValidationMessageValue(\n validationMessage?: ReactNode | { value: ReactNode },\n errorMessage?: ReactNode,\n): ReactNode {\n if (validationMessage) {\n if (typeof validationMessage === \"object\" && \"value\" in validationMessage) {\n return validationMessage.value;\n }\n\n return validationMessage;\n }\n\n return errorMessage;\n}\n\n/**\n * Trap focus inside an element using the `inert` attribute.\n *\n * Adds `inert` to all siblings of the given element, and all their ancestors up to the body.\n * Returns a cleanup function which removes the `inert` property from the elements, effectively giving focus back to rest of the document.\n *\n * NOTE: Does not support portals, i.e. elements outside the DOM hierarchy of the given element.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n * @see https://web.dev/articles/inert\n */\nexport function focusTrap(element: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- NOP on focus trapping the body element\n if (element === document.body) return () => {};\n\n let inertElements: HTMLElement[] = [];\n for (let el: HTMLElement | null = element; el; el = el.parentElement) {\n if (el === document.body) break;\n\n for (const sibling of el.parentElement?.children ?? []) {\n if (sibling === el) continue;\n if (!(sibling instanceof HTMLElement)) continue;\n if (sibling.hasAttribute(\"inert\")) continue;\n\n sibling.setAttribute(\"inert\", \"true\");\n inertElements.push(sibling);\n }\n }\n\n return () => {\n releaseFocusTrap(inertElements);\n inertElements = [];\n };\n}\n\n/**\n * Unset the `inert` attribute on all elements given\n */\nfunction releaseFocusTrap(inertElements: Iterable<HTMLElement>) {\n for (const el of inertElements) {\n el.removeAttribute(\"inert\");\n }\n}\n\n/**\n * React 19 supports inert prop\n * React 18 needs inert to be a string\n */\nconst inertBooleanSupported: boolean = Number(version.split(\".\")[0]) >= 19;\n\n/**\n * Returns the inert prop value based on the React version.\n */\nexport const inertPropValue: (x: boolean) => boolean | \"\" | undefined = inertBooleanSupported\n ? (x: boolean): boolean => x\n : (x: boolean): \"\" | undefined => (x ? \"\" : undefined);\n","import { forwardRef, type HTMLAttributes } from \"react\";\n\nexport type FieldsetDescriptionProps = HTMLAttributes<HTMLParagraphElement>;\n\n/**\n * FieldsetDescription component, used to display a description for a fieldset.\n *\n * @example\n * <FieldsetDescription>\n * Gi en kort beskrivelse i begge feltene\n * </FieldsetDescription>\n */\nexport const FieldsetDescription = forwardRef<HTMLParagraphElement, FieldsetDescriptionProps>(\n function FieldsetDescription(rest, ref) {\n return <p className=\"hds-fieldset__description\" ref={ref} {...rest} />;\n },\n);\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\n/**\n * FieldsetLegend component, used to display a legend for a fieldset.\n *\n * @example\n * <FieldsetLegend>Skriv inn dine svar</FieldsetLegend>\n */\nexport const FieldsetLegend = forwardRef<HTMLLegendElement, HTMLAttributes<HTMLLegendElement>>(\n function FieldsetLegend({ className, ...rest }, ref) {\n return (\n <legend\n className={clsx(\"hds-fieldset__legend\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\n\nFieldsetLegend.displayName = \"Fieldset.Legend\";\n","import { forwardRef, useRef, type InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup, type InputGroupProps } from \"../input-group\";\nimport { useMergeRefs } from \"../../utils/utils\";\n\nexport type DatePickerProps = Omit<\n InputGroupProps & Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n \"children\" | \"type\"\n> & {\n /**\n * Accessible title for the calendar button\n *\n * This button currently only shows in Chrome.\n *\n * @defaultValue \"Åpne kalender\"\n */\n calendarButtonTitle?: string;\n};\n\n/**\n * A basic implementation of a date picker\n *\n * This date picker is an implementation of native date picker, as you get\n * with `<input type=\"date\" />`, where the input field is dressed in Hedwig styling.\n *\n * Due to accessibility concerns you will only see the appropriate Hedwig calendar\n * icon in Chrome. Firefox will show built in icon and Safari will show no icon.\n * Not tested in Edge.\n */\nexport const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function DatePicker(\n {\n className,\n size,\n validationMessage,\n validationMessageProps,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n \"data-color\": dataColor,\n calendarButtonTitle = \"Åpne kalender\",\n ...rest\n },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n const mergedRef = useMergeRefs([inputRef, ref]);\n\n return (\n <InputGroup\n className={clsx(\"hds-date-picker\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n validationMessageProps={validationMessageProps}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n data-color={dataColor}\n >\n {(inputProps) => (\n <>\n <input\n {...inputProps}\n disabled={disabled}\n readOnly={readOnly}\n ref={mergedRef}\n type=\"date\"\n {...rest}\n />\n <button\n className={clsx(\"hds-date-picker__calendar-button\")}\n type=\"button\"\n title={calendarButtonTitle}\n onClick={() => {\n inputRef.current?.showPicker();\n }}\n />\n </>\n )}\n </InputGroup>\n );\n});\n\nDatePicker.displayName = \"DatePicker\";\n","import { useId, forwardRef, Children, isValidElement, cloneElement } from \"react\";\nimport type { LabelHTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ValidationMessage, type ValidationMessageProps } from \"../validation-message\";\nimport { type ErrorMessageProps } from \"../error-message\";\nimport { getValidationMessageValue } from \"../../utils\";\n\ninterface InputProps {\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: boolean;\n id?: string;\n className?: string;\n}\n\nexport interface InputGroupProps {\n id?: string;\n className?: string;\n style?: CSSProperties;\n \"data-color\"?: \"info\" | \"success\" | \"warning\" | \"error\";\n size?: \"large\" | \"small\";\n validationMessage?: ReactNode | { value: ReactNode };\n validationMessageProps?: Partial<ValidationMessageProps>;\n /** @deprecated Use `validationMessage` instead */\n errorMessage?: ReactNode;\n /** @deprecated Use `validationMessageProps` instead */\n errorMessageProps?: Partial<ErrorMessageProps>;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label?: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * `children` must be either a single input element or a render function.\n *\n * If you use a render function, make sure you spread the input props to the appropriate element.\n */\n children: Exclude<ReactNode, Iterable<ReactNode>> | ((inputProps: InputProps) => ReactNode);\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n \"data-color\": dataColor = undefined,\n size = \"large\",\n validationMessage,\n validationMessageProps,\n errorMessage,\n errorMessageProps,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const validationMessageId = useId();\n const inputId = useId();\n const validationColor = errorMessage ? \"error\" : dataColor;\n const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);\n\n const renderInput = () => {\n const inputProps: InputProps = {\n \"aria-describedby\": validationMessage ? validationMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n className: clsx(\"hds-input-group__input\"),\n };\n\n if (typeof children === \"function\") {\n return children(inputProps);\n }\n\n const input: ReactNode = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n className: `${inputProps.className} ${input.props.className ?? \"\"}`,\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${size}`]: size,\n },\n className as undefined,\n )}\n ref={ref}\n style={style}\n data-color={validationColor}\n {...rest}\n >\n {label !== null && label !== undefined && label !== false && (\n <label\n className={clsx(\"hds-input-group__label\", labelClassName as undefined)}\n {...labelProps}\n htmlFor={id ?? inputId}\n >\n {label}\n </label>\n )}\n <div\n className={clsx(\"hds-input-group__input-wrapper\")}\n data-disabled={disabled}\n data-readonly={readOnly}\n >\n {renderInput()}\n </div>\n <ValidationMessage\n id={validationMessageId}\n {...(validationMessageProps ?? errorMessageProps)}\n >\n {validationMessageValue}\n </ValidationMessage>\n </div>\n );\n});\n","import { forwardRef, useEffect, useRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../../box\";\nimport { UnorderedList, type ListProps } from \"../../list\";\nimport { Link } from \"../../link\";\nimport { useMergeRefs } from \"../../utils\";\nimport { focusWithLegendOrLabelInViewport } from \"./focus\";\n\ninterface ErrorSummaryHeadingPropsAutoFocus {\n /**\n * The heading will be focused when the component mounts\n *\n * On following errornous form submissions you should manually focus the heading\n * e.g. by passing a ref and calling `ref.current.focus()`\n *\n * @default true\n */\n autoFocus?: boolean;\n}\n\ninterface ErrorSummaryHeadingPropsAs {\n /**\n * A heading level must be selected, or optionally opting out for a different element\n *\n * Use {@link ErrorSummaryHeadingPropsAsChild.asChild} if you need more control of the rendered element.\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n}\n\ninterface ErrorSummaryHeadingPropsAsChild {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild: true;\n as?: never;\n}\n\nexport type ErrorSummaryHeadingProps = HTMLAttributes<HTMLElement> &\n ErrorSummaryHeadingPropsAutoFocus &\n (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild);\n\nexport const ErrorSummaryHeading = forwardRef<\n HTMLParagraphElement,\n ErrorSummaryHeadingProps & (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild)\n>(({ asChild, children, as: Tag, autoFocus = true, ...rest }, ref) => {\n const focusRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs([focusRef, ref]);\n const Component = asChild ? Slot : Tag;\n\n useEffect(() => {\n /**\n * Hack: Safari 18 on mac at the time of writing\n * does not correctly focus it with VoiceOver without the timeout\n */\n setTimeout(() => {\n if (focusRef.current && autoFocus) {\n focusRef.current.focus();\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Only on initial render\n }, []);\n\n return (\n <Component className={clsx(`hds-error-summary__title`)} ref={mergedRef} tabIndex={-1} {...rest}>\n {children}\n </Component>\n );\n});\nErrorSummaryHeading.displayName = \"ErrorSummary.Heading\";\n\nexport interface ErrorSummaryListProps extends ListProps {\n /**\n * Sets the size of the items (font)\n *\n * @default \"small\"\n */\n size?: ListProps[\"size\"];\n}\nexport const ErrorSummaryList = forwardRef<HTMLUListElement, ErrorSummaryListProps>(\n ({ children, size = \"small\", ...rest }, ref) => (\n <UnorderedList size={size} ref={ref} {...rest}>\n {children}\n </UnorderedList>\n ),\n);\nErrorSummaryList.displayName = \"ErrorSummary.List\";\n\nexport interface ErrorSummaryItemProps extends React.HTMLAttributes<HTMLLIElement> {\n /**\n * A hash link to the element that the error message refers to\n *\n * Must start with \"#\" as it's passed to the `href` attribute of an anchor element\n *\n * @example \"#email\"\n */\n href: `#${string}`;\n\n /**\n * Extra props to pass to the link element\n */\n linkProps?: React.AnchorHTMLAttributes<HTMLAnchorElement>;\n}\nexport const ErrorSummaryItem = forwardRef<HTMLLIElement, ErrorSummaryItemProps>(\n ({ children, href, linkProps, ...rest }, ref) => {\n function onClick(e: React.MouseEvent<HTMLAnchorElement>) {\n linkProps?.onClick?.(e);\n if (focusWithLegendOrLabelInViewport(href.replace(\"#\", \"\"))) {\n e.preventDefault();\n }\n }\n\n return (\n <li className={clsx(`hds-error-summary__list-item`)} ref={ref} {...rest}>\n <Link size=\"small\" href={href} variant=\"solid\" {...linkProps} onClick={onClick}>\n {children}\n </Link>\n </li>\n );\n },\n);\nErrorSummaryItem.displayName = \"ErrorSummary.Item\";\n\nexport type ErrorSummaryProps = Omit<\n BoxProps,\n \"variant\" | \"closeable\" | \"onClose\" | \"closed\" | \"closeButtonProps\"\n>;\n\nexport const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(\n ({ children, className, ...rest }, ref) => (\n <Box\n data-color=\"error\"\n ref={ref}\n {...rest}\n className={clsx(`hds-error-summary`, className as undefined)}\n >\n {children}\n </Box>\n ),\n) as ErrorSummaryType;\nErrorSummary.displayName = \"ErrorSummary\";\n\ntype ErrorSummaryType = ReturnType<typeof forwardRef<HTMLDivElement, ErrorSummaryProps>> & {\n Heading: typeof ErrorSummaryHeading;\n List: typeof ErrorSummaryList;\n Item: typeof ErrorSummaryItem;\n};\nErrorSummary.Heading = ErrorSummaryHeading;\nErrorSummary.List = ErrorSummaryList;\nErrorSummary.Item = ErrorSummaryItem;\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nfunction CloseIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32} viewBox=\"0 0 32 32\">\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ListProps extends HTMLAttributes<HTMLOListElement | HTMLUListElement> {\n /**\n * Sets the size of the items (font)\n *\n * @default \"medium\"\n */\n size?: \"default\" | \"small\" | \"technical\" | \"medium\" | \"large\";\n}\n\n/**\n * An unordered list of simple items, often text. You can nest other lists inside this component.\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <UnorderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </UnorderedList>\n * ```\n */\nexport const UnorderedList = forwardRef<HTMLUListElement, ListProps>(\n ({ size = \"default\", className, ...rest }, ref) => {\n return (\n <ul\n ref={ref}\n className={clsx(\n \"hds-list\",\n size !== \"default\" && `hds-list--${size}`,\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nUnorderedList.displayName = \"UnorderedList\";\n\n/**\n * An ordered list of simple items\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <OrderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </OrderedList>\n * ```\n */\nexport const OrderedList = forwardRef<HTMLOListElement, ListProps>(\n ({ size = \"medium\", className, ...rest }, ref) => {\n return (\n <ol\n ref={ref}\n className={clsx(\n \"hds-list\",\n size !== \"default\" && `hds-list--${size}`,\n className as undefined,\n )}\n {...rest}\n />\n );\n },\n);\nOrderedList.displayName = \"OrderedList\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The visual style of the link\n */\n variant?: \"underline\" | \"solid\" | \"no-underline\";\n\n /**\n * Font size of the link\n * @default \"default\"\n */\n size?: \"default\" | \"small\" | \"large\" | \"technical\";\n\n /**\n * Specify that there is an icon in the link.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n */\n icon?: \"leading\" | \"trailing\";\n\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n { asChild, children, variant = \"underline\", size = \"default\", icon, className, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"a\";\n\n return (\n <Component\n className={clsx(\n \"hds-link\",\n variant !== \"underline\" && `hds-link--${variant}`,\n size !== \"default\" && `hds-link--${size}`,\n { \"hds-link--trailing-icon\": icon === \"trailing\" },\n { \"hds-link--leading-icon\": icon === \"leading\" },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nLink.displayName = \"Link\";\n","/**\n * Focus a form field while showing the associated legend or label in the viewport.\n *\n * Gives the user a better context of what field they are focusing on.\n *\n * Copied from https://github.com/alphagov/govuk-frontend/blob/cbf4ef1e329711be5b78a92bda6ba84a7db9ca40/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs#L60-L108\n */\nexport function focusWithLegendOrLabelInViewport(id: string) {\n const input = document.getElementById(id);\n if (!input) {\n return false;\n }\n\n const legendOrLabel = maybeLegendForInput(input) ?? labelForInput(input);\n if (!legendOrLabel) {\n return false;\n }\n\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n\n return true;\n}\n\nfunction maybeLegendForInput(input: HTMLElement) {\n const fieldset = input.closest(\"fieldset\");\n if (!fieldset) {\n return null;\n }\n\n const legend = fieldset.querySelector(\"legend\");\n if (!legend) {\n return null;\n }\n\n // If the input type is radio or checkbox, always use the legend if\n // there is one.\n if (input instanceof HTMLInputElement && (input.type === \"checkbox\" || input.type === \"radio\")) {\n return legend;\n }\n\n // For other input types, only scroll to the fieldset’s legend (instead\n // of the label associated with the input) if the input would end up in\n // the top half of the screen.\n //\n // This should avoid situations where the input either ends up off the\n // screen, or obscured by a software keyboard.\n const legendTop = legend.getBoundingClientRect().top;\n const inputRect = input.getBoundingClientRect();\n\n // If the browser doesn't support Element.getBoundingClientRect().height\n // or window.innerHeight (like IE8), bail and just link to the label.\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return legend;\n }\n }\n}\n\nfunction labelForInput(input: HTMLElement) {\n return (\n document.querySelector(`label[for='${input.getAttribute(\"id\")}']`) ?? input.closest(\"label\")\n );\n}\n","import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\n/**\n * Omitting:\n * - `size` from InputHTMLAttributes\n * - `children` from InputGroupProps\n * The original `size` prop that input elements have is not in use in HDS.\n * It is overridden by styling.\n */\nexport type InputProps = Omit<\n InputGroupProps & Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n \"children\"\n>;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n size,\n validationMessage,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n \"data-color\": dataColor,\n ...rest\n },\n ref,\n ) => (\n <InputGroup\n className={clsx(\"hds-input\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n data-color={dataColor}\n >\n <input disabled={disabled} readOnly={readOnly} ref={ref} {...rest} />\n </InputGroup>\n ),\n);\n\nInput.displayName = \"Input\";\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useRadioGroupContext } from \"./radio-group\";\n\nexport interface RadioButtonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\" | \"size\"> {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n title?: string;\n size?: \"small\" | \"\";\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadioButtonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioButtonProps[\"value\"];\n}) => {\n if (typeof checked !== \"undefined\") return checked;\n if (typeof selectedValue !== \"undefined\") return value === selectedValue;\n return undefined;\n};\n\nexport const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(\n ({ checked, value, variant = \"plain\", title, children, className, size = \"\", ...rest }, ref) => {\n const { value: selectedValue, size: groupSize, ...context } = useRadioGroupContext();\n const effectiveSize = size || groupSize;\n\n return (\n <div\n className={clsx(\n \"hds-radio-button\",\n {\n [`hds-radio-button--${variant}`]: variant === \"bounding-box\",\n [`hds-radio-button--${effectiveSize}`]: effectiveSize === \"small\",\n },\n className as undefined,\n )}\n >\n <label>\n <input\n {...context}\n {...rest}\n checked={isChecked({ checked, selectedValue, value })}\n value={value}\n ref={ref}\n type=\"radio\"\n />\n <span aria-hidden className=\"hds-radio-button__checkmark\" />\n {title ? <p className=\"hds-radio-button__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadioButton.displayName = \"RadioButton\";\n","import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type InputHTMLAttributes,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { FieldsetDescription } from \"../fieldset/fieldset-description\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport { FieldsetLegend } from \"../fieldset/fieldset-legend\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n children: ReactNode;\n /** Will be passed to all Radio buttons within the radio group */\n name?: InputHTMLAttributes<HTMLInputElement>[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** Will be passed to all Radio buttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\" | \"size\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n name: undefined,\n onChange: () => undefined,\n size: undefined,\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, onChange, children, size, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, onChange, size }}>\n <Fieldset size={size} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n}) as RadioGroupType;\n\ntype RadioGroupType = ReturnType<typeof forwardRef<HTMLFieldSetElement, RadioGroupProps>> & {\n Description: typeof FieldsetDescription;\n Legend: typeof FieldsetLegend;\n};\n\nRadioGroup.Description = FieldsetDescription;\nRadioGroup.Legend = FieldsetLegend;\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface SearchWrapperProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n}\n\nexport const SearchWrapper = forwardRef<HTMLDivElement, SearchWrapperProps>(\n ({ className, ...rest }, ref) => (\n <div className={clsx(\"hds-search-wrapper\", className as undefined)} ref={ref} {...rest} />\n ),\n);\n\nSearchWrapper.displayName = \"SearchWrapper\";\n","import { forwardRef, type ReactNode, type SelectHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\nexport type SelectProps = Omit<\n InputGroupProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, \"size\">,\n \"readOnly\" | \"children\"\n> & { children: ReactNode };\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n className,\n size,\n validationMessage,\n validationMessageProps,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n \"data-color\": dataColor,\n children,\n ...rest\n },\n ref,\n ) => (\n <InputGroup\n className={clsx(\"hds-select\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n validationMessageProps={validationMessageProps}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n style={style}\n size={size}\n data-color={dataColor}\n >\n <select disabled={disabled} ref={ref} {...rest}>\n {children}\n </select>\n </InputGroup>\n ),\n);\n\nSelect.displayName = \"Select\";\n","import { forwardRef } from \"react\";\nimport type { HTMLAttributes, Ref } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { SuggestionsWrapper } from \"./suggestions-wrapper\";\nimport { SuggestionsItem, SuggestionsItemAction } from \"./suggestions-item\";\n\nexport type { SuggestionsItemActionProps, SuggestionsItemProps } from \"./suggestions-item\";\n\nexport interface SuggestionsProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {\n /**\n * Change the rendered list element.\n *\n * @default \"ul\"\n */\n as?: \"ul\" | \"ol\";\n /**\n * Sets the size of the items\n *\n * @default \"default\"\n */\n size?: \"default\" | \"small\";\n}\n\nexport type SuggestionProps = SuggestionsProps;\n\n/**\n * A list of suggestions for the user while searching\n *\n * @example\n * ```tsx\n * <Suggestions>\n * <Suggestions.Item>\n * <Suggestions.ItemAction href=\"/\">\n * Albania\n * </Suggestions.ItemAction>\n * </Suggestions.Item>\n * <Suggestions.Item>\n * <Suggestions.ItemAction asChild>\n * <button type=\"button\">Select Albania</button>\n * </Suggestions.ItemAction>\n * </Suggestions.Item>\n * </Suggestions>\n * ```\n *\n * Use `as=\"ol\"` for ordered suggestions:\n * ```tsx\n * <Suggestions as=\"ol\">\n * <Suggestions.Item>\n* <Suggestions.ItemAction href=\"/\">\n* First result\n* </Suggestions.ItemAction>\n * </Suggestions.Item>\n * </Suggestions>\n * ```\n */\nexport const Suggestions = forwardRef<HTMLUListElement | HTMLOListElement, SuggestionProps>(\n ({ as = \"ul\", size = \"default\", className, ...rest }, ref) => {\n const classes = clsx(\n \"hds-suggestions\",\n size !== \"default\" && `hds-suggestions--${size}`,\n className as undefined,\n );\n\n return as === \"ol\" ? (\n <ol\n className={classes}\n ref={ref as Ref<HTMLOListElement>}\n {...(rest as HTMLAttributes<HTMLOListElement>)}\n />\n ) : (\n <ul className={classes} ref={ref as Ref<HTMLUListElement>} {...rest} />\n );\n },\n) as SuggestionsType;\n\ntype SuggestionsType = ReturnType<\n typeof forwardRef<HTMLUListElement | HTMLOListElement, SuggestionProps>\n> & {\n Item: typeof SuggestionsItem;\n ItemAction: typeof SuggestionsItemAction;\n Wrapper: typeof SuggestionsWrapper;\n};\n\nSuggestions.displayName = \"Suggestions\";\nSuggestionsItem.displayName = \"Suggestions.Item\";\nSuggestionsItemAction.displayName = \"Suggestions.ItemAction\";\nSuggestions.Item = SuggestionsItem;\nSuggestions.ItemAction = SuggestionsItemAction;\nSuggestions.Wrapper = SuggestionsWrapper;\n","import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface SuggestionsWrapperProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Change the rendered element for the suggestions wrapper.\n *\n * @default \"div\"\n */\n as?: \"section\" | \"div\";\n}\n\n/**\n * A wrapper for search suggestions.\n * Intended to contain a SearchWrapper and Suggestions.\n *\n * @example\n * ```tsx\n * <Suggestions.Wrapper>\n * <SearchWrapper>\n * <Input type=\"search\" aria-label=\"Search content\" />\n * <Button>Search</Button>\n * <Button icon aria-label=\"Clear search\">\n * <XmarkIcon />\n * </Button>\n * </SearchWrapper>\n * <Suggestions>\n * <Suggestions.Item>\n * <Suggestions.ItemAction href=\"/\">Albania</Suggestions.ItemAction>\n * </Suggestions.Item>\n * </Suggestions>\n * </Suggestions.Wrapper>\n * ```\n *\n * Use `as` when the wrapper needs a different semantic element:\n * ```tsx\n * <Suggestions.Wrapper as=\"section\">\n * <SearchWrapper>...</SearchWrapper>\n * <Suggestions>...</Suggestions>\n * </Suggestions.Wrapper>\n * ```\n */\nexport const SuggestionsWrapper = forwardRef<HTMLDivElement, SuggestionsWrapperProps>(\n ({ as: Tag = \"div\", className, ...rest }, ref) => (\n <Tag className={clsx(\"hds-suggestions-wrapper\", className as undefined)} ref={ref} {...rest} />\n ),\n);\n\nSuggestionsWrapper.displayName = \"Suggestions.Wrapper\";\n","import { forwardRef } from \"react\";\nimport type { AnchorHTMLAttributes, HTMLAttributes, Ref } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport type SuggestionsItemProps = HTMLAttributes<HTMLLIElement>;\n\nexport interface SuggestionsItemActionProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * Use the element passed as a child, merging its props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * A single structural item in a suggestions list.\n *\n * Use `Suggestions.ItemAction` as the interactive child of each item.\n *\n * @example\n * ```tsx\n * <Suggestions.Item>\n * <Suggestions.ItemAction href=\"/results\">\n * View results\n * </Suggestions.ItemAction>\n * </Suggestions.Item>\n * ```\n */\nexport const SuggestionsItem = forwardRef<HTMLLIElement, SuggestionsItemProps>(\n ({ className, ...rest }, ref) => (\n <li className={clsx(\"hds-suggestions-item\", className as undefined)} ref={ref} {...rest} />\n ),\n);\n\nSuggestionsItem.displayName = \"Suggestions.Item\";\n\n/**\n * The interactive action within a suggestions item.\n *\n * Renders an anchor by default and applies the `hds-suggestions-item__action`\n * class. Use `asChild` to render another interactive element, such as a button\n * or router link, while preserving the action styling.\n *\n * @example\n * ```tsx\n * <Suggestions.ItemAction href=\"/results\">\n * View results\n * </Suggestions.ItemAction>\n *\n * <Suggestions.ItemAction asChild>\n * <button type=\"button\">Select result</button>\n * </Suggestions.ItemAction>\n * ```\n */\nexport const SuggestionsItemAction = forwardRef<HTMLAnchorElement, SuggestionsItemActionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"a\";\n return (\n <Component\n className={clsx(\"hds-suggestions-item__action\", className as undefined)}\n ref={ref as Ref<HTMLAnchorElement>}\n {...rest}\n />\n );\n },\n);\n\nSuggestionsItemAction.displayName = \"Suggestions.ItemAction\";\n","import { forwardRef } from \"react\";\nimport type { TextareaHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\nexport type TextareaProps = Omit<\n InputGroupProps & TextareaHTMLAttributes<HTMLTextAreaElement>,\n \"children\"\n>;\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n {\n className,\n size,\n validationMessage,\n validationMessageProps,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n \"data-color\": dataColor,\n ...rest\n },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-textarea\", className as undefined)}\n disabled={disabled}\n validationMessage={validationMessage}\n validationMessageProps={validationMessageProps}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n data-color={dataColor}\n >\n <textarea disabled={disabled} readOnly={readOnly} ref={ref} {...rest} />\n </InputGroup>\n );\n});\n\nTextarea.displayName = \"Textarea\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA4E;AAC5E,IAAAC,0BAAqB;;;ACDrB,6BAAqB;AACrB,mBAAgD;AAQ5C;AAFG,IAAM,wBAAoB;AAAA,EAC/B,CAAC,IAAwB,QAAK;AAA7B,iBAAE,YARL,IAQG,IAAgB,iBAAhB,IAAgB,CAAd;AACD;AAAA,MAAC;AAAA;AAAA,QACC,aAAU;AAAA,QACV,eAAW,6BAAK,0BAA0B,SAAsB;AAAA,QAChE;AAAA,SACI;AAAA,IACN;AAAA;AAEJ;AACA,kBAAkB,cAAc;;;ACjBhC,IAAAC,gBAA2C;AAavC,IAAAC,sBAAA;AAFG,IAAM,mBAAe;AAAA,EAC1B,CAAC,IAAsC,QAAK;AAA3C,iBAAE,YAAU,IAAI,UAZnB,IAYG,IAA8B,iBAA9B,IAA8B,CAA5B,YAAU,MAAI;AACf,wDAAC,kDAAkB,IAAQ,cAAW,SAAQ,aAA0B,OAAvE,EAA6E,KAC3E,WACH;AAAA;AAEJ;AACA,aAAa,cAAc;;;AClB3B,IAAAC,gBAQO;AAQP,IAAAC,0BAAqB;;;AChBrB,YAAuB;AACvB,IAAAC,gBAA0D;AAO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ACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,+BAAK,gBAAgB,SAAsB;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MAEZ,wDAAC,6BAAS,UAAoB,UAAoB,OAAc,KAAM;AAAA;AAAA,EACxE;AAEJ,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react","import_react","import_jsx_runtime","FieldsetDescription","import_react","import_typed_classname","import_jsx_runtime","FieldsetLegend","import_jsx_runtime","Fieldset","import_jsx_runtime","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","InputGroup","_a","import_jsx_runtime","DatePicker","_a","import_react","import_typed_classname","import_react_slot","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","React","import_typed_classname","import_react","import_react_slot","import_jsx_runtime","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","Textarea"]}
@@ -1,16 +1,23 @@
1
- import "../chunk-CVE23PMJ.mjs";
1
+ import "../chunk-5J5LYE6Z.mjs";
2
+ import "../chunk-XSID7YR7.mjs";
3
+ import {
4
+ Suggestions
5
+ } from "../chunk-6D5VE3DW.mjs";
6
+ import {
7
+ SuggestionsItem,
8
+ SuggestionsItemAction
9
+ } from "../chunk-FTVKPZCX.mjs";
10
+ import {
11
+ SuggestionsWrapper
12
+ } from "../chunk-HA3LRSDK.mjs";
2
13
  import "../chunk-AGZHQDCQ.mjs";
3
14
  import {
4
15
  Textarea
5
16
  } from "../chunk-OQD4GKOS.mjs";
6
- import "../chunk-XAFNJELJ.mjs";
7
- import {
8
- RadioButton
9
- } from "../chunk-WMSOBRKN.mjs";
17
+ import "../chunk-7LPYJC6S.mjs";
10
18
  import {
11
- RadioGroup,
12
- useRadioGroupContext
13
- } from "../chunk-SQNGMF3D.mjs";
19
+ Input
20
+ } from "../chunk-62VLFCXX.mjs";
14
21
  import "../chunk-CAIGPMDS.mjs";
15
22
  import {
16
23
  SearchWrapper
@@ -19,27 +26,30 @@ import "../chunk-BYEJZSG5.mjs";
19
26
  import {
20
27
  Select
21
28
  } from "../chunk-JGQTAIEP.mjs";
22
- import "../chunk-7LPYJC6S.mjs";
29
+ import "../chunk-KPPLVGZ3.mjs";
30
+ import "../chunk-XAFNJELJ.mjs";
23
31
  import {
24
- Input
25
- } from "../chunk-62VLFCXX.mjs";
32
+ RadioButton
33
+ } from "../chunk-DOW6EHBI.mjs";
34
+ import {
35
+ RadioGroup,
36
+ useRadioGroupContext
37
+ } from "../chunk-QER35NXN.mjs";
26
38
  import "../chunk-YJOOSTJC.mjs";
27
39
  import {
28
40
  Checkbox
29
- } from "../chunk-JKKH77UC.mjs";
41
+ } from "../chunk-JGYPZ7ET.mjs";
30
42
  import "../chunk-CSIXGT7P.mjs";
31
43
  import {
32
44
  Fieldset,
33
45
  useFieldsetContext
34
- } from "../chunk-DNCWDWK2.mjs";
46
+ } from "../chunk-QOIBRXYT.mjs";
47
+ import {
48
+ FieldsetDescription
49
+ } from "../chunk-D2XZT2RA.mjs";
35
50
  import {
36
51
  FieldsetLegend
37
52
  } from "../chunk-CD4LCDK3.mjs";
38
- import "../chunk-KPPLVGZ3.mjs";
39
- import {
40
- ErrorSummary
41
- } from "../chunk-NAXSP4VU.mjs";
42
- import "../chunk-CKAL5ZJZ.mjs";
43
53
  import "../chunk-TDLSHJ4Z.mjs";
44
54
  import {
45
55
  DatePicker
@@ -55,8 +65,9 @@ import {
55
65
  ValidationMessage
56
66
  } from "../chunk-F23MNQCK.mjs";
57
67
  import {
58
- FieldsetDescription
59
- } from "../chunk-D2XZT2RA.mjs";
68
+ ErrorSummary
69
+ } from "../chunk-NAXSP4VU.mjs";
70
+ import "../chunk-CKAL5ZJZ.mjs";
60
71
  import "../chunk-XLLYMQLW.mjs";
61
72
  import "../chunk-QE2ZES72.mjs";
62
73
  import "../chunk-6QV3OV66.mjs";
@@ -81,6 +92,10 @@ export {
81
92
  RadioGroup,
82
93
  SearchWrapper,
83
94
  Select,
95
+ Suggestions,
96
+ SuggestionsItem,
97
+ SuggestionsItemAction,
98
+ SuggestionsWrapper,
84
99
  Textarea,
85
100
  ValidationMessage,
86
101
  useFieldsetContext,
@@ -1,19 +1,19 @@
1
1
  import "../../chunk-XAFNJELJ.mjs";
2
2
  import {
3
3
  RadioButton
4
- } from "../../chunk-WMSOBRKN.mjs";
4
+ } from "../../chunk-DOW6EHBI.mjs";
5
5
  import {
6
6
  RadioGroup,
7
7
  useRadioGroupContext
8
- } from "../../chunk-SQNGMF3D.mjs";
8
+ } from "../../chunk-QER35NXN.mjs";
9
9
  import "../../chunk-CSIXGT7P.mjs";
10
- import "../../chunk-DNCWDWK2.mjs";
10
+ import "../../chunk-QOIBRXYT.mjs";
11
+ import "../../chunk-D2XZT2RA.mjs";
11
12
  import "../../chunk-CD4LCDK3.mjs";
12
13
  import "../../chunk-NSLSA7F7.mjs";
13
14
  import "../../chunk-VNH7CZJ4.mjs";
14
15
  import "../../chunk-5M6MEYM7.mjs";
15
16
  import "../../chunk-F23MNQCK.mjs";
16
- import "../../chunk-D2XZT2RA.mjs";
17
17
  import "../../chunk-CYDWEPFL.mjs";
18
18
  import "../../chunk-KPNAC2WN.mjs";
19
19
  import "../../chunk-3V4GFS46.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  RadioButton
3
- } from "../../chunk-WMSOBRKN.mjs";
4
- import "../../chunk-SQNGMF3D.mjs";
3
+ } from "../../chunk-DOW6EHBI.mjs";
4
+ import "../../chunk-QER35NXN.mjs";
5
5
  import "../../chunk-CSIXGT7P.mjs";
6
- import "../../chunk-DNCWDWK2.mjs";
6
+ import "../../chunk-QOIBRXYT.mjs";
7
+ import "../../chunk-D2XZT2RA.mjs";
7
8
  import "../../chunk-CD4LCDK3.mjs";
8
9
  import "../../chunk-NSLSA7F7.mjs";
9
10
  import "../../chunk-VNH7CZJ4.mjs";
10
11
  import "../../chunk-5M6MEYM7.mjs";
11
12
  import "../../chunk-F23MNQCK.mjs";
12
- import "../../chunk-D2XZT2RA.mjs";
13
13
  import "../../chunk-CYDWEPFL.mjs";
14
14
  import "../../chunk-KPNAC2WN.mjs";
15
15
  import "../../chunk-3V4GFS46.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  RadioGroup,
3
3
  useRadioGroupContext
4
- } from "../../chunk-SQNGMF3D.mjs";
4
+ } from "../../chunk-QER35NXN.mjs";
5
5
  import "../../chunk-CSIXGT7P.mjs";
6
- import "../../chunk-DNCWDWK2.mjs";
6
+ import "../../chunk-QOIBRXYT.mjs";
7
+ import "../../chunk-D2XZT2RA.mjs";
7
8
  import "../../chunk-CD4LCDK3.mjs";
8
9
  import "../../chunk-NSLSA7F7.mjs";
9
10
  import "../../chunk-VNH7CZJ4.mjs";
10
11
  import "../../chunk-5M6MEYM7.mjs";
11
12
  import "../../chunk-F23MNQCK.mjs";
12
- import "../../chunk-D2XZT2RA.mjs";
13
13
  import "../../chunk-CYDWEPFL.mjs";
14
14
  import "../../chunk-KPNAC2WN.mjs";
15
15
  import "../../chunk-3V4GFS46.mjs";
@@ -0,0 +1,7 @@
1
+ export { Suggestions } from "./suggestions";
2
+ export type * from "./suggestions";
3
+ export { SuggestionsItem, SuggestionsItemAction } from "./suggestions-item";
4
+ export type * from "./suggestions-item";
5
+ export { SuggestionsWrapper } from "./suggestions-wrapper";
6
+ export type * from "./suggestions-wrapper";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/suggestions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,mBAAmB,eAAe,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,mBAAmB,oBAAoB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,mBAAmB,uBAAuB,CAAC"}