@postenbring/hedwig-react 0.0.63 → 0.0.64

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 (49) hide show
  1. package/dist/_tsup-dts-rollup.d.mts +57 -0
  2. package/dist/_tsup-dts-rollup.d.ts +57 -0
  3. package/dist/{chunk-JMDXW2ML.mjs → chunk-625SVQEP.mjs} +33 -3
  4. package/dist/chunk-625SVQEP.mjs.map +1 -0
  5. package/dist/{chunk-Q6REETZD.mjs → chunk-AKYK3XFN.mjs} +2 -1
  6. package/dist/{chunk-Q6REETZD.mjs.map → chunk-AKYK3XFN.mjs.map} +1 -1
  7. package/dist/{chunk-OYJQ5MAS.mjs → chunk-BYDSISQZ.mjs} +26 -3
  8. package/dist/chunk-BYDSISQZ.mjs.map +1 -0
  9. package/dist/{chunk-VKRPPQ6F.mjs → chunk-H3VGHTDC.mjs} +4 -2
  10. package/dist/chunk-H3VGHTDC.mjs.map +1 -0
  11. package/dist/index-no-css.d.mts +1 -0
  12. package/dist/index-no-css.d.ts +1 -0
  13. package/dist/index-no-css.js +58 -4
  14. package/dist/index-no-css.js.map +1 -1
  15. package/dist/index-no-css.mjs +4 -4
  16. package/dist/index.d.mts +1 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +58 -4
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +4 -4
  21. package/dist/navbar/index.d.mts +1 -0
  22. package/dist/navbar/index.d.ts +1 -0
  23. package/dist/navbar/index.js +32 -2
  24. package/dist/navbar/index.js.map +1 -1
  25. package/dist/navbar/index.mjs +2 -2
  26. package/dist/navbar/navbar.d.mts +1 -0
  27. package/dist/navbar/navbar.d.ts +1 -0
  28. package/dist/navbar/navbar.js +33 -2
  29. package/dist/navbar/navbar.js.map +1 -1
  30. package/dist/navbar/navbar.mjs +3 -1
  31. package/dist/show-more/index.js +1 -0
  32. package/dist/show-more/index.js.map +1 -1
  33. package/dist/show-more/index.mjs +1 -1
  34. package/dist/skeleton/index.js +25 -2
  35. package/dist/skeleton/index.js.map +1 -1
  36. package/dist/skeleton/index.mjs +1 -1
  37. package/dist/skeleton/skeleton.js +25 -2
  38. package/dist/skeleton/skeleton.js.map +1 -1
  39. package/dist/skeleton/skeleton.mjs +1 -1
  40. package/dist/utilities/auto-animate-height.js +1 -0
  41. package/dist/utilities/auto-animate-height.js.map +1 -1
  42. package/dist/utilities/auto-animate-height.mjs +1 -1
  43. package/dist/utilities/index.js +1 -0
  44. package/dist/utilities/index.js.map +1 -1
  45. package/dist/utilities/index.mjs +1 -1
  46. package/package.json +5 -4
  47. package/dist/chunk-JMDXW2ML.mjs.map +0 -1
  48. package/dist/chunk-OYJQ5MAS.mjs.map +0 -1
  49. package/dist/chunk-VKRPPQ6F.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index-no-css.tsx","../src/accordion/accordion.tsx","../src/accordion/accordion-item.tsx","../src/accordion/context.ts","../src/accordion/accordion-header.tsx","../src/accordion/accordion-content.tsx","../src/accordion/index.tsx","../src/badge/badge.tsx","../src/box/box.tsx","../src/box/index.tsx","../src/breadcrumb/breadcrumb.tsx","../src/button/button.tsx","../src/card/card.tsx","../src/card/index.tsx","../src/description-list/description-list.tsx","../src/form/fieldset/fieldset.tsx","../src/form/error-message/error-message.tsx","../src/form/input/input.tsx","../src/form/input-group/input-group.tsx","../src/form/select/select.tsx","../src/form/textarea/textarea.tsx","../src/form/checkbox/checkbox.tsx","../src/form/radiobutton/radiobutton.tsx","../src/form/radiobutton/radiogroup.tsx","../src/layout/container/container.tsx","../src/link/link.tsx","../src/list/list.tsx","../src/list/link-list.tsx","../src/message/message.tsx","../src/message/index.tsx","../src/modal/modal.tsx","../src/utils.ts","../src/modal/index.tsx","../src/navbar/navbar.tsx","../src/navbar/navbar-expandable-menu.tsx","../src/navbar/icons.tsx","../src/navbar/index.tsx","../src/utilities/auto-animate-height.tsx","../src/show-more/show-more.tsx","../src/skeleton/skeleton.tsx","../src/step-indicator/step-indicator.tsx","../src/styled-html/styled-html.tsx","../src/tabs/tabs.tsx","../src/tabs/context.ts","../src/tabs/tabs-list.tsx","../src/tabs/tabs-content.tsx","../src/tabs/index.tsx","../src/text/text.tsx","../src/text/index.tsx","../src/warning-banner/warning-banner.tsx"],"sourcesContent":["export * from \"./accordion\";\nexport * from \"./badge\";\nexport * from \"./box\";\nexport * from \"./breadcrumb\";\nexport * from \"./button\";\nexport * from \"./card\";\nexport * from \"./description-list\";\nexport * from \"./form\";\nexport * from \"./layout\";\nexport * from \"./link\";\nexport * from \"./list\";\nexport * from \"./message\";\nexport * from \"./modal\";\nexport * from \"./navbar\";\nexport * from \"./show-more\";\nexport * from \"./skeleton\";\nexport * from \"./step-indicator\";\nexport * from \"./styled-html\";\nexport * from \"./tabs\";\nexport * from \"./text\";\nexport * from \"./utilities\";\nexport * from \"./warning-banner\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport type { AccordionItemProps } from \"./accordion-item\";\n\nexport interface AccordionProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Accepts type of <AccordionItem/>\n */\n children: ReactElement<AccordionItemProps> | ReactElement<AccordionItemProps>[];\n\n /**\n * Adds padding to the left of the accordion\n */\n indent?: boolean;\n\n className?: string;\n}\n\nexport const Accordion: OverridableComponent<AccordionProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", children, className, indent = true, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-accordion\",\n !indent && \"hds-accordion--no-indent\",\n className as undefined,\n )}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\n\nAccordion.displayName = \"Accordion\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { AccordionItemContext } from \"./context\";\nimport type { AccordionHeaderProps } from \"./accordion-header\";\nimport type { AccordionContentProps } from \"./accordion-content\";\n\nexport type AccordionItemChildrenType =\n | ReactElement<AccordionHeaderProps>\n | ReactElement<AccordionContentProps>;\n\nexport interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Control the open state of the accordion manually\n */\n open?: boolean;\n\n /**\n * Use with open to control the open state of the accordion manually\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * If the accordion should be open by default\n */\n defaultOpen?: boolean;\n\n /**\n * Accepts type of Accordion.Content and Accordion.Header\n */\n children: AccordionItemChildrenType[];\n}\n\nexport const AccordionItem: OverridableComponent<AccordionItemProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n defaultOpen,\n open: outerOpen,\n onOpenChange,\n className,\n ...rest\n },\n ref,\n ) => {\n const [innerOpen, setInnerOpen] = useState(defaultOpen ?? false);\n const open = outerOpen ?? innerOpen;\n\n const handleOpen = () => {\n if (outerOpen !== undefined) {\n onOpenChange && onOpenChange(!open);\n } else {\n setInnerOpen(!open);\n }\n };\n\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-accordion-item\",\n {\n \"hds-accordion-item__expanded\": open,\n },\n className as undefined,\n )}\n ref={ref}\n >\n <AccordionItemContext.Provider value={{ open, setOpen: handleOpen }}>\n {children}\n </AccordionItemContext.Provider>\n </Component>\n );\n },\n);\n\nAccordionItem.displayName = \"Accordion.Item\";\n","import { createContext } from \"react\";\n\nexport interface AccordionItemContextProps {\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const AccordionItemContext = createContext<AccordionItemContextProps | null>(null);\n","import type { ButtonHTMLAttributes, MouseEvent, ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionHeaderProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n children: ReactNode;\n}\n\nexport const AccordionHeader: OverridableComponent<AccordionHeaderProps, HTMLButtonElement> =\n forwardRef(({ as: Component = \"button\", children, className, onClick, ...rest }, ref) => {\n const itemContext = useContext(AccordionItemContext);\n if (itemContext === null) {\n return null;\n }\n const expandOrCollapse = (e: MouseEvent<HTMLButtonElement>) => {\n itemContext.setOpen(!itemContext.open);\n onClick && onClick(e);\n };\n return (\n <Component\n {...rest}\n aria-expanded={itemContext.open}\n className={clsx(\n \"hds-accordion-item-header\",\n { \"hds-accordion-item-header--open\": itemContext.open },\n className as undefined,\n )}\n onClick={expandOrCollapse}\n ref={ref}\n type=\"button\"\n >\n <span>{children}</span>\n </Component>\n );\n });\n\nAccordionHeader.displayName = \"Accordion.Header\";\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const AccordionContent: OverridableComponent<AccordionContentProps, HTMLDivElement> =\n forwardRef(({ as: Component = \"div\", children, className, ...rest }, ref) => {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n return null;\n }\n return (\n <Component\n aria-hidden={!context.open}\n {...rest}\n className={clsx(\n \"hds-accordion-item-content\",\n {\n \"hds-accordion-item-content--closed\": !context.open,\n },\n className as undefined,\n )}\n ref={ref}\n >\n <div className={clsx(\"hds-accordion-item-content-inner\")}>{children}</div>\n </Component>\n );\n });\n\nAccordionContent.displayName = \"Accordion.Content\";\n","import { Accordion } from \"./accordion\";\nimport { AccordionItem } from \"./accordion-item\";\nimport { AccordionHeader } from \"./accordion-header\";\nimport { AccordionContent } from \"./accordion-content\";\n\nconst AccordionComponent = Accordion as typeof Accordion & {\n Item: typeof AccordionItem;\n Header: typeof AccordionHeader;\n Content: typeof AccordionContent;\n};\n\nAccordionComponent.Item = AccordionItem;\nAccordionComponent.Header = AccordionHeader;\nAccordionComponent.Content = AccordionContent;\n\nexport { AccordionComponent as Accordion };\n\nexport type * from \"./accordion\";\nexport type * from \"./accordion-item\";\nexport type * from \"./accordion-header\";\nexport type * from \"./accordion-content\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BadgeProps extends React.AnchorHTMLAttributes<HTMLSpanElement> {\n /**\n * Font size of the badge\n */\n size?: \"small\" | \"smaller\";\n\n children: React.ReactNode;\n}\n\nfunction BaseBadge({\n children,\n variant,\n size = \"small\",\n className,\n ...rest\n}: BadgeProps & { variant: \"lighter\" | \"dark\" | \"white\" | \"warning\" }) {\n return (\n <span\n className={clsx(\n \"hds-badge\",\n `hds-badge--${size}`,\n `hds-badge--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </span>\n );\n}\n\nBaseBadge.displayName = \"BaseBadge\";\n\nexport function Badge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"lighter\" />;\n}\n\nBadge.displayName = \"Badge\";\n\nexport function DarkBadge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"dark\" />;\n}\n\nDarkBadge.displayName = \"DarkBadge\";\n\nexport function WhiteBadge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"white\" />;\n}\n\nWhiteBadge.displayName = \"WhiteBadge\";\n\nexport function WarningBadge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"warning\" />;\n}\n\nWarningBadge.displayName = \"WarningBadge\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n children?: React.ReactNode;\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 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\nexport const Box: OverridableComponent<BoxProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\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\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n {children}\n </Component>\n );\n },\n);\nBox.displayName = \"Box\";\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 );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n","import { Box, BoxCloseButton } from \"./box\";\n\nconst BoxComponent = Box as typeof Box & {\n CloseButton: typeof BoxCloseButton;\n};\nBoxComponent.CloseButton = BoxCloseButton;\n\nexport { BoxComponent as Box };\n\nexport type * from \"./box\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {\n children: ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];\n\n /**\n * Props passed to the `ol` html element\n */\n olProps?: HTMLAttributes<HTMLElement>;\n}\n\n/**\n * A breadcrumbs navigation menu\n *\n * **Usage**\n *\n * ```tsx\n * <Breadcrumbs data-testid=\"breadcrumbs\">\n * <li><Link href=\"../\">Previous page</Link></li>\n * <li aria-current=\"page\">Current page</li>\n * </Breadcrumbs>\n * ```\n *\n * Outputs this html structure\n *\n * ```html\n * <nav data-testid=\"breadcrumbs\">\n * <ol>\n * <li><a href=\"../\">Previous page</a></li>\n * <li aria-current=\"page\">Current page</li>\n * </ol>\n * </nav>\n * ```\n */\nexport function Breadcrumbs({ olProps, children, ...rest }: BreadcrumbsProps) {\n return (\n <nav {...rest}>\n <ol {...olProps} className={clsx(\"hds-breadcrumbs\", olProps?.className as undefined)}>\n {children}\n </ol>\n </nav>\n );\n}\n\nBreadcrumbs.displayName = \"Breadcrumbs\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface ButtonPropsInternal extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n /**\n * Make the button use 100% width available.\n * Using the \"mobile\" it only stretch to full width on smaller screens\n */\n fullWidth?: boolean | \"mobile\";\n\n /**\n * Use an icon inside the button\n */\n icon?: React.ReactNode;\n\n children?: React.ReactNode;\n}\n\nexport type ButtonProps = ButtonPropsInternal &\n (\n | {\n /**\n * The background fill of the button\n */\n fill?: \"contained\" | \"outline\";\n }\n | {\n /**\n * @deprecated use `fill='outline'` instead\n */\n fill?: \"outlined\";\n }\n );\n\nexport const BaseButton: OverridableComponent<\n ButtonProps & { variant: \"primary\" | \"secondary\" },\n HTMLButtonElement\n> = forwardRef(\n (\n {\n as: Component = \"button\",\n children,\n variant,\n size = \"medium\",\n fullWidth = false,\n fill = \"contained\",\n icon,\n className,\n ...rest\n },\n ref,\n ) => {\n // TODO: Remove deprecated fill value name at some point\n // Deprecated at 10. march 2024\n if (fill === \"outlined\") {\n // eslint-disable-next-line no-console -- Deprecation warning\n console.warn(\"The `fill` value `outlined` is deprecated, use `fill='outline'` instead\");\n }\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n {\n [`hds-button--${variant}`]: fill === \"contained\",\n [`hds-button--outline-${variant}`]: fill === \"outline\" || fill === \"outlined\",\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--icon-only\": icon && !children,\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {icon && !children ? icon : null}\n {children}\n </Component>\n );\n },\n);\nBaseButton.displayName = \"BaseButton\";\n\n/**\n * ## TODO\n *\n * - [x] Handle links that looks like buttons\n * - [ ] Revisit how to handle outline\n * - [ ] Figure out outline-white\n */\n\nexport const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement> = forwardRef(\n (props, ref) => {\n return <BaseButton {...props} ref={ref} variant=\"primary\" />;\n },\n);\n\nPrimaryButton.displayName = \"PrimaryButton\";\n\nexport const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement> = forwardRef(\n (props, ref) => {\n return <BaseButton {...props} ref={ref} variant=\"secondary\" />;\n },\n);\n\nSecondaryButton.displayName = \"SecondaryButton\";\n","import type { HTMLAttributes, ReactNode, ElementType } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface CardBaseProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const Card: OverridableComponent<\n CardBaseProps & {\n /**\n * A Card should in most cases appear as a big link,\n * but the actual link should just be the header title.\n * To make life better for those with screen readers we should not make\n * the entire card a link, as that would cause the entire card to be read\n * as a link to the user. That would be perceived as information overload.\n */\n as?: Exclude<ElementType, \"a\">;\n },\n HTMLDivElement\n> = forwardRef(({ as: Component = \"section\", className, children, ...rest }, ref) => {\n return (\n <Component {...rest} className={clsx(\"hds-card\", className as undefined)} ref={ref}>\n {children}\n </Component>\n );\n});\nCard.displayName = \"Card\";\n\nexport const CardMedia: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, ...rest }, ref) => {\n return (\n <Component {...rest} className={clsx(\"hds-card__media\", className as undefined)} ref={ref}>\n {children}\n </Component>\n );\n },\n);\nCardMedia.displayName = \"Card.Media\";\n\nexport interface CardImageMediaProps extends HTMLAttributes<HTMLDivElement> {\n aspectRatio?: string;\n}\nexport const CardMediaImg: OverridableComponent<CardImageMediaProps, HTMLImageElement> = forwardRef(\n ({ as: Component = \"img\", className, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__media__img\", className as undefined)}\n ref={ref}\n />\n );\n },\n);\nCardMediaImg.displayName = \"Card.Media.Img\";\n\nexport const CardBody: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, ...rest }, ref) => {\n return (\n <Component {...rest} className={clsx(\"hds-card__body\", className as undefined)} ref={ref}>\n {children}\n </Component>\n );\n },\n);\nCardBody.displayName = \"Card.Body\";\n\nexport const CardBodyHeader = forwardRef<\n HTMLHeadingElement,\n CardBaseProps & {\n /**\n * Heading level of the card heading\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n }\n>(({ as: Component, className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-header\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n});\nCardBodyHeader.displayName = \"Card.Body.Header\";\n\nexport const CardBodyHeaderOverline: OverridableComponent<CardBaseProps, HTMLDivElement> =\n forwardRef(({ as: Component = \"span\", className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-header-overline\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n });\nCardBodyHeaderOverline.displayName = \"Card.Body.Header.Overline\";\n\nexport const CardBodyHeaderTitle: OverridableComponent<\n CardBaseProps & {\n /**\n * A Card should in most cases appear as a big link,\n * but the actual link should just be this header title.\n * To make life better for those with screen readers we should not make\n * the entire card a link, as that would cause the entire card to be read\n * as a link to the user. That would be perceived as information overload.\n */\n as: ElementType;\n },\n HTMLDivElement\n> = forwardRef(({ as: Component, className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-header-title\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n});\nCardBodyHeaderTitle.displayName = \"Card.Body.Header.Title\";\n\nexport const CardBodyDescription: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"p\", className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-description\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nCardBodyDescription.displayName = \"Card.Body.Description\";\n\nexport const CardBodyAction: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-action\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nCardBodyAction.displayName = \"Card.Body.Action\";\n\nexport const CardBodyActionArrow: OverridableComponent<\n HTMLAttributes<HTMLSpanElement>,\n HTMLSpanElement\n> = forwardRef(({ as: Component = \"span\", className, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-action-arrow\", className as undefined)}\n ref={ref}\n />\n );\n});\nCardBodyActionArrow.displayName = \"Card.Body.Action.Arrow\";\n","import {\n Card,\n CardMedia,\n CardMediaImg,\n CardBody,\n CardBodyHeader,\n CardBodyHeaderOverline,\n CardBodyHeaderTitle,\n CardBodyDescription,\n CardBodyAction,\n CardBodyActionArrow,\n} from \"./card\";\n\nconst CardMediaComponent = CardMedia as typeof CardMedia & {\n Img: typeof CardMediaImg;\n};\nCardMediaComponent.Img = CardMediaImg;\n\nconst CardBodyHeaderComponent = CardBodyHeader as typeof CardBodyHeader & {\n Overline: typeof CardBodyHeaderOverline;\n Title: typeof CardBodyHeaderTitle;\n};\nCardBodyHeaderComponent.Overline = CardBodyHeaderOverline;\nCardBodyHeaderComponent.Title = CardBodyHeaderTitle;\n\nconst CardBodyActionComponent = CardBodyAction as typeof CardBodyAction & {\n Arrow: typeof CardBodyActionArrow;\n};\nCardBodyActionComponent.Arrow = CardBodyActionArrow;\n\nconst CardBodyComponent = CardBody as typeof CardBody & {\n Header: typeof CardBodyHeaderComponent;\n Overline: typeof CardBodyHeaderOverline;\n Title: typeof CardBodyHeaderTitle;\n Description: typeof CardBodyDescription;\n Action: typeof CardBodyActionComponent;\n};\n\nCardBodyComponent.Header = CardBodyHeaderComponent;\nCardBodyComponent.Description = CardBodyDescription;\nCardBodyComponent.Action = CardBodyActionComponent;\n\nconst CardComponent = Card as typeof Card & {\n Media: typeof CardMediaComponent;\n Body: typeof CardBodyComponent;\n};\nCardComponent.Media = CardMediaComponent;\nCardComponent.Body = CardBodyComponent;\n\nexport { CardComponent as Card };\n\nexport type * from \"./card\";\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport function DescriptionList({\n variant = \"vertical\",\n className,\n ...rest\n}: DescriptionListProps) {\n return (\n <dl\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n}\nDescriptionList.displayName = \"DescriptionList\";\n","import { useId, forwardRef } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n}\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n legendProps: { size: legendSize = \"default\", className: legendClassName, ...legendProps } = {},\n legend,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n\n return (\n <fieldset\n aria-describedby={errorMessage ? errorMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", className as undefined)}\n ref={ref}\n style={style}\n {...rest}\n >\n <legend\n className={clsx(\n \"hds-fieldset__legend\",\n { [`hds-fieldset__legend--${legendSize}`]: legendSize },\n legendClassName as undefined,\n )}\n {...legendProps}\n >\n {legend}\n </legend>\n <div className={clsx(\"hds-fieldset__input-wrapper\")}>{children}</div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </fieldset>\n );\n});\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorMessageProps {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport function ErrorMessage({ children, id, className }: ErrorMessageProps) {\n return (\n <div\n aria-live=\"assertive\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n >\n {children}\n </div>\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\nexport type InputProps = Omit<InputGroupProps & InputHTMLAttributes<HTMLInputElement>, \"children\">;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { className, variant, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-input\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n variant={variant}\n >\n <input {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />\n </InputGroup>\n );\n});\n\nInput.displayName = \"Input\";\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 { ErrorMessage } from \"../error-message\";\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 variant?: \"default\" | \"white\";\n errorMessage?: ReactNode;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n children: ReactNode;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n variant = \"default\",\n errorMessage,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n const inputId = useId();\n\n const renderInput = () => {\n const input = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n \"aria-describedby\": errorMessage ? errorMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n ...input.props,\n className: clsx(\"hds-input-group__input\", input.props.className as undefined),\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${variant}`]: variant,\n \"hds-input-group--error\": errorMessage,\n },\n className as undefined,\n )}\n ref={ref}\n style={style}\n {...rest}\n >\n <label\n className={clsx(\"hds-input-group__label\", labelClassName as undefined)}\n {...labelProps}\n htmlFor={id ?? inputId}\n >\n {label}\n </label>\n <div\n className={clsx(\"hds-input-group__input-wrapper\")}\n data-disabled={disabled}\n data-readonly={readOnly}\n >\n {renderInput()}\n </div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </div>\n );\n});\n","import { forwardRef } from \"react\";\nimport 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 & SelectHTMLAttributes<HTMLSelectElement>,\n \"readOnly\"\n>;\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(\n { className, variant, errorMessage, labelProps, label, id, style, disabled, children, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-select\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n style={style}\n variant={variant}\n >\n <select {...rest} disabled={disabled} ref={ref}>\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 { className, variant, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-textarea\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n variant={variant}\n >\n <textarea {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />\n </InputGroup>\n );\n});\n\nTextarea.displayName = \"Textarea\";\n","import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n ({ variant = \"plain\", hasError, title, children, className, ...rest }, ref) => {\n return (\n <div\n className={clsx(\n \"hds-checkbox\",\n {\n [`hds-checkbox--${variant}`]: variant === \"bounding-box\",\n \"hds-checkbox--error\": hasError,\n },\n className as undefined,\n )}\n >\n <label>\n <input {...rest} aria-invalid={hasError ? true : undefined} ref={ref} type=\"checkbox\" />\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 );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n","import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radiogroup\";\n\nexport interface RadiobuttonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadiobuttonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioGroupProps[\"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 (\n {\n checked,\n value,\n variant = \"plain\",\n hasError: hasErrorProp,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const { value: selectedValue, hasError: hasErrorContext, ...context } = useRadioGroupContext();\n const hasError = hasErrorContext || hasErrorProp;\n return (\n <div\n className={clsx(\n \"hds-radiobutton\",\n {\n [`hds-radiobutton--${variant}`]: variant === \"bounding-box\",\n \"hds-radiobutton--error\": hasError,\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-radiobutton__checkmark\" />\n {title ? <p className=\"hds-radiobutton__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 ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadiobuttonProps } from \"./radiobutton\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n /** Will be passed to all Radiobuttons within the radio group */\n name?: RadiobuttonProps[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: RadiobuttonProps[\"value\"];\n /**\n * Error message is passed to the internal Fieldset,\n * and also marks all radiobuttons as invalid\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radiobuttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = {\n hasError: boolean;\n} & Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n hasError: false,\n onChange: () => {\n return undefined;\n },\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, errorMessage, onChange, children, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, hasError: Boolean(errorMessage), onChange }}>\n <Fieldset errorMessage={errorMessage} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n});\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../../utils\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"slim\";\n children: ReactNode;\n}\n\n/**\n * Container is a layout component that is used to wrap content.\n * It ensures a max-width and minimum spacing on the sides.\n */\nexport const Container: OverridableComponent<ContainerProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, variant, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-container\",\n { \"hds-container--slim\": variant === \"slim\" },\n className as undefined,\n )}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nContainer.displayName = \"Container\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The visual style of the link\n */\n variant?: \"underline\" | \"solid\" | \"inverted\" | \"no-underline\";\n\n /**\n * Font size of the link\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n children: React.ReactNode;\n}\n\nexport const Link: OverridableComponent<LinkProps, HTMLAnchorElement> = forwardRef(\n (\n { as: Component = \"a\", children, variant = \"underline\", size = \"medium\", className, ...rest },\n ref,\n ) => {\n return (\n <Component\n className={clsx(\n \"hds-link\",\n variant !== \"underline\" && `hds-link--${variant}`,\n size !== \"medium\" && `hds-link--${size}`,\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nLink.displayName = \"Link\";\n","import type { HTMLAttributes } from \"react\";\nimport * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ListProps extends HTMLAttributes<HTMLOListElement | HTMLUListElement> {\n children?: React.ReactElement<HTMLLIElement> | React.ReactElement<HTMLLIElement>[];\n /**\n * Sets the size of the items (font)\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nfunction BaseList({\n as: ListTag = \"ul\",\n children,\n size = \"medium\",\n className,\n ...rest\n}: ListProps & { as?: \"ul\" | \"ol\" }) {\n return (\n <ListTag className={clsx(\"hds-list\", `hds-list--${size}`, className as undefined)} {...rest}>\n {children}\n </ListTag>\n );\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 build your own using the semantic `ul` and `ol` tags.\n */\nexport function UnorderedList(props: ListProps) {\n return (\n <BaseList as=\"ul\" {...props}>\n {props.children}\n </BaseList>\n );\n}\n\n/**\n * An ordered list of simple items\n *\n * If you have other list needs build your own using the semantic `ul` and `ol` tags.\n */\nexport function OrderedList(props: ListProps) {\n return (\n <BaseList as=\"ol\" {...props}>\n {props.children}\n </BaseList>\n );\n}\n\nBaseList.displayName = \"BaseList\";\nOrderedList.displayName = \"OrderedList\";\nUnorderedList.displayName = \"UnorderedList\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ListProps } from \"./list\";\nimport { UnorderedList } from \"./list\";\n\nexport interface LinkListProps extends Omit<ListProps, \"listStyle\"> {\n children?: React.ReactElement<HTMLLIElement> | React.ReactElement<HTMLLIElement>[];\n}\n\n/**\n * Show a list of links\n *\n * For other list types use `UnorderedList` and `OrderedList`, or use your own list component using the semantic `ul` and `ol` tags.\n */\nexport function LinkList({ className, ...rest }: LinkListProps) {\n return (\n <UnorderedList className={clsx(\"hds-list--link-list\", className as undefined)} {...rest} />\n );\n}\n\nLinkList.displayName = \"LinkList\";\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\">;\n\nexport const Message: OverridableComponent<MessageProps, HTMLDivElement> = forwardRef(\n ({ children, className, variant = \"success\", icon, iconClassName, ...rest }, ref) => {\n return (\n <Box\n className={clsx(`hds-message`, `hds-message--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {variant === \"neutral\" && (\n <div className={clsx(\"hds-message--neutral__icon\", iconClassName as undefined)}>\n {icon}\n </div>\n )}\n {children}\n </Box>\n );\n },\n);\nMessage.displayName = \"Message\";\n\nexport const MessageTitle: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-message__title\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageTitle.displayName = \"Message.Title\";\n\nexport const MessageDescription: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-message__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageDescription.displayName = \"Message.Description\";\n","import { Message, MessageTitle, MessageDescription } from \"./message\";\n\nconst MessageComponent = Message as typeof Message & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\n\nMessageComponent.Title = MessageTitle;\nMessageComponent.Description = MessageDescription;\n\nexport { MessageComponent as Message };\n","import { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Box } from \"../box/box\";\nimport type { OverridableComponent } from \"../utils\";\nimport { useMergeRefs } from \"../utils\";\n\nexport interface ModalProps extends React.HTMLAttributes<HTMLDialogElement> {\n children: React.ReactNode;\n\n /**\n * Controls the open state of the modal\n */\n open?: boolean;\n\n /**\n * Whether to close when clicking on the backdrop.\n */\n closeOnBackdropClick?: boolean;\n}\n\n/**\n * A modal dialog is a window that forces the user to interact with it before they can return to other parts of the application.\n *\n * Uses the native [`dialog`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element.\n *\n * Example\n * ```\n const modalRef = useRef<HTMLDialogElement>(null);\n const onClose = () => modalRef.current?.close();\n\n return (\n <>\n <PrimaryButton onClick={() => modalRef.current?.showModal()}>Open Modal</PrimaryButton>\n <Modal ref={modalRef}>\n <Modal.Header>Dialog header</Modal.Header>\n <Modal.Content>\n <p>\n Dialog header Dialog description - a description of what is about to happen and maybe\n something about the consequences.\n </p>\n </Modal.Content>\n <Modal.Footer style={{ display: \"flex\", gap: 16 }}>\n <PrimaryButton fill=\"outline\" onClick={onClose}>\n Close\n </PrimaryButton>\n </Modal.Footer>\n </Modal>\n </>\n );\n * ```\n */\nexport const Modal = forwardRef<HTMLDialogElement, ModalProps>(\n ({ children, className, open, closeOnBackdropClick, onClick, ...rest }, ref) => {\n const modalRef = useRef<HTMLDialogElement>(null);\n const mergedRef = useMergeRefs([modalRef, ref]);\n\n // The X close button that comes from the `Box` component\n function onCloseButtonClick() {\n modalRef.current?.close();\n return false;\n }\n\n // No scroll when modal is open\n useScrollLock(modalRef, \"hds-modal-scroll-lock\");\n\n // `open` prop\n useEffect(() => {\n if (modalRef.current && open !== undefined) {\n if (open && !modalRef.current.open) {\n modalRef.current.showModal();\n } else if (!open && modalRef.current.open) {\n modalRef.current.close();\n }\n }\n }, [modalRef, open]);\n\n function onDialogClick(e: React.MouseEvent<HTMLElement>) {\n if (closeOnBackdropClick && e.target === modalRef.current) {\n modalRef.current.close();\n }\n onClick?.(e as React.MouseEvent<HTMLDialogElement>);\n }\n\n return (\n <Box\n as=\"dialog\"\n className={clsx(\"hds-modal\", className as undefined)}\n closeable\n onClick={onDialogClick}\n onClose={onCloseButtonClick}\n ref={mergedRef}\n variant=\"white\"\n {\n ...(rest as object) /* TODO remove type casting */\n }\n >\n {children}\n </Box>\n );\n },\n);\nModal.displayName = \"Modal\";\n\nexport const ModalHeader: OverridableComponent<object, HTMLHeadingElement> = forwardRef(\n ({ as: Component = \"h1\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-modal__header\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalHeader.displayName = \"Modal.Header\";\n\nexport const ModalContent: OverridableComponent<object, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-modal__content\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalContent.displayName = \"Modal.Content\";\n\nexport const ModalFooter: OverridableComponent<object, HTMLDivElement> = forwardRef(\n ({ as: Component = \"footer\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-modal__footer\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalFooter.displayName = \"Modal.Footer\";\n\nexport function useScrollLock(modalRef: React.RefObject<HTMLDialogElement>, bodyClass: string) {\n useEffect(() => {\n if (!modalRef.current) return;\n if (modalRef.current.open) document.body.classList.add(bodyClass);\n\n const observer = new MutationObserver(() => {\n if (modalRef.current?.open) document.body.classList.add(bodyClass);\n else document.body.classList.remove(bodyClass);\n });\n observer.observe(modalRef.current, {\n attributes: true,\n attributeFilter: [\"open\"],\n });\n return () => {\n observer.disconnect();\n document.body.classList.remove(bodyClass);\n };\n }, [bodyClass, modalRef]);\n}\n","import type { ComponentPropsWithRef, ElementType, FC, RefAttributes } from \"react\";\nimport * as React from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * OverridableComponent makes the `as` prop available,\n * to be used to override the html element being used for a component\n *\n * Taken from digdir design system: https://github.com/digdir/designsystem/blob/main/packages/react/src/types/OverridableComponent.ts\n */\nexport type OverridableComponent<ComponentProps, Element extends HTMLElement> = {\n (props: ComponentProps & RefAttributes<Element>): ReturnType<FC>;\n\n <As extends ElementType>(\n props: {\n /** Override html element */\n as?: As;\n } & ComponentProps &\n Omit<ComponentPropsWithRef<As>, keyof ComponentProps>,\n ): ReturnType<FC>;\n} & Pick<FC, \"displayName\">;\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","import { Modal, ModalHeader, ModalContent, ModalFooter } from \"./modal\";\n\nconst ModalComponent = Modal as typeof Modal & {\n Header: typeof ModalHeader;\n Content: typeof ModalContent;\n Footer: typeof ModalFooter;\n};\nModalComponent.Header = ModalHeader;\nModalComponent.Content = ModalContent;\nModalComponent.Footer = ModalFooter;\n\nexport { ModalComponent as Modal };\nexport type * from \"./modal\";\n","import React, { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface NavbarProps extends HTMLAttributes<HTMLElement> {\n children: React.ReactNode;\n}\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Navbar = forwardRef<HTMLElement, NavbarProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <header className={clsx(\"hds-navbar\", className as undefined)} ref={ref} {...rest}>\n {children}\n </header>\n );\n },\n);\nNavbar.displayName = \"Navbar\";\n\n// Navbar logo\ninterface NavbarLogoProps {\n children?: never;\n}\nexport const NavbarLogo: OverridableComponent<NavbarLogoProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component className={clsx(\"hds-navbar__logo\", className as undefined)} ref={ref} {...rest} />\n );\n },\n);\nNavbarLogo.displayName = \"Navbar.Logo\";\n\n// Navbar button\ninterface NavbarButtonProps {\n icon?: React.ReactNode;\n children: React.ReactNode;\n}\nexport const NavbarButton: OverridableComponent<NavbarButtonProps, HTMLElement> = forwardRef(\n ({ as: Component = \"button\", children, icon, className, ...rest }, ref) => {\n return (\n <Component className={clsx(\"hds-navbar__button\", className as undefined)} ref={ref} {...rest}>\n {children} {icon}\n </Component>\n );\n },\n);\nNavbarButton.displayName = \"Navbar.Button\";\n\ninterface NavbarNavigationProps {\n children: React.ReactNode;\n}\nexport const NavbarNavigation: OverridableComponent<NavbarNavigationProps, HTMLElement> =\n forwardRef(({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-navbar__navigation\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n });\nNavbarNavigation.displayName = \"Navbar.Navigation\";\n","import React, { createContext, useContext, forwardRef, useState, useRef, useEffect } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport type { ClassValue } from \"@postenbring/hedwig-css/typed-classname/index.mjs\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport FocusTrap from \"focus-trap-react\";\nimport type { OverridableComponent } from \"../utils\";\nimport { CloseIcon, MenuIcon } from \"./icons\";\n\nconst navbarContext = createContext([\n false as boolean,\n () => {\n // Empty\n },\n] as const);\n\n/**\n * Root\n */\nexport interface NavbarExpandableMenuProps {\n children: React.ReactNode;\n}\nexport function NavbarExpandableMenu({ children }: NavbarExpandableMenuProps) {\n const [open, setOpen] = useState(false);\n const toggleOpen = () => {\n const nextOpenState = !open;\n setOpen(nextOpenState);\n if (nextOpenState) {\n window.scrollTo(0, 0);\n document.body.classList.add(clsx(\"hds-navbar-scroll-lock\"));\n } else {\n document.body.classList.remove(clsx(\"hds-navbar-scroll-lock\"));\n }\n };\n const navbarElement = document.getElementsByClassName(clsx(\"hds-navbar\"))[0];\n return (\n <navbarContext.Provider value={[open, toggleOpen]}>\n {open ? <FocusTrap containerElements={[navbarElement as HTMLElement]} /> : null}\n {children}\n </navbarContext.Provider>\n );\n}\nNavbarExpandableMenu.displayName = \"NavbarExpandableMenu\";\n\ninterface ButtonInterface {\n className?: ClassValue;\n open?: boolean;\n innerRef?: React.RefObject<HTMLButtonElement>;\n ref?: React.ForwardedRef<HTMLButtonElement>;\n text: React.ReactNode;\n title?: string;\n toggleOpen?: () => void;\n width?: number;\n}\n\nfunction RenderButton({\n className,\n innerRef,\n open = false,\n ref,\n text,\n title,\n toggleOpen,\n width,\n ...rest\n}: ButtonInterface) {\n const icon = open ? <CloseIcon /> : <MenuIcon />;\n const style = width ? { width } : {};\n return (\n <button\n className={clsx(\"hds-navbar__button\", className)}\n onClick={toggleOpen}\n ref={ref ?? innerRef}\n style={style}\n title={title}\n type=\"button\"\n {...rest}\n >\n {text} {icon}\n </button>\n );\n}\n\n/**\n * Trigger\n *\n * ## TODO\n * - [ ] Hide text when on mobile\n * - [X] Open / Close icon\n * - [X] Make button have consistant width\n */\n\nexport interface NavbarExpandableMenuTriggerProps\n extends Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\"> {\n whenClosedText: React.ReactNode;\n whenClosedHelperTitle?: string;\n\n whenOpenText: React.ReactNode;\n whenOpenHelperTitle?: string;\n}\nexport const NavbarExpandableMenuTrigger = forwardRef<\n HTMLButtonElement,\n NavbarExpandableMenuTriggerProps\n>(\n (\n {\n whenClosedText,\n whenClosedHelperTitle,\n\n whenOpenText,\n whenOpenHelperTitle,\n\n className,\n ...rest\n },\n ref,\n ) => {\n const [open, toggleOpen] = useContext(navbarContext);\n const [width, setWidth] = useState(0);\n const measureButtonRef = useRef<HTMLButtonElement>(null);\n\n const text: React.ReactNode = open ? whenOpenText : whenClosedText;\n const title = open ? whenOpenHelperTitle : whenClosedHelperTitle;\n\n /**\n *\n * @param element - Button to measure\n * @param callback - report the width back\n */\n const measureButton = (element: React.ReactNode, callback: (width: number) => void) => {\n // Create an empty div to render the Button in\n const container = document.createElement(\"div\");\n container.style.cssText = \"display: inline-block; position: absolute; visibility: hidden\";\n\n // Attach the empty div inside the navigation section\n const c = document.getElementsByClassName(\"hds-navbar__navigation\")[0];\n c.appendChild(container);\n\n // Render the Button here\n const root = createRoot(container as HTMLElement);\n root.render(element);\n\n /**\n * Get the offsetWidth now that it is rendered\n * Also clean up after us\n */\n const getWidth = () => {\n callback(measureButtonRef.current?.offsetWidth ?? 0);\n root.unmount();\n c.removeChild(container);\n };\n // This is instead of the callback that used to be on ReactDOM.render()\n setTimeout(getWidth, 0);\n };\n\n useEffect(() => {\n measureButton(\n <RenderButton\n className={(className ? className : \"\") as ClassValue}\n innerRef={measureButtonRef}\n text={whenClosedText}\n title={title}\n {...rest}\n />,\n (closedWidth: number) => {\n measureButton(\n <RenderButton\n className={(className ? className : \"\") as ClassValue}\n innerRef={measureButtonRef}\n open\n text={whenOpenText}\n title={title}\n {...rest}\n />,\n (openWidth: number) => {\n setWidth(Math.max(openWidth, closedWidth));\n },\n );\n },\n );\n }, [className, rest, title, whenClosedText, whenOpenText]);\n\n return (\n <RenderButton\n className={(className ? className : \"\") as ClassValue}\n open={open}\n ref={ref}\n text={text as string}\n title={title}\n toggleOpen={toggleOpen}\n width={width}\n {...rest}\n />\n );\n },\n);\nNavbarExpandableMenuTrigger.displayName = \"Navbar.ExpandableMenu.Trigger\";\n\n/**\n * Content\n */\nexport interface NavbarExpandableMenuContentProps {\n children: React.ReactNode;\n className?: string;\n}\nexport const NavbarExpandableMenuContent: OverridableComponent<\n NavbarExpandableMenuContentProps,\n HTMLDivElement\n> = forwardRef(({ as: Component = \"section\", children, className, ...rest }, ref) => {\n const [open] = useContext(navbarContext);\n return (\n <Component\n {...rest}\n className={clsx(\"hds-navbar__expandable-menu-content\", className as undefined)}\n data-state={open ? \"open\" : \"closed\"}\n ref={ref}\n >\n <div className={clsx(\"hds-navbar__expandable-menu-content-inner\")}>{children}</div>\n </Component>\n );\n});\nNavbarExpandableMenuContent.displayName = \"Navbar.ExpandableMenu.Content\";\n","function CloseIcon() {\n return (\n <svg aria-hidden viewBox=\"0 0 384 512\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nfunction MenuIcon() {\n return (\n <svg role=\"img\" viewBox=\"0 0 448 512\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M0 88C0 74.7 10.7 64 24 64H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H24C10.7 112 0 101.3 0 88zM0 248c0-13.3 10.7-24 24-24H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24zM448 408c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H424c13.3 0 24 10.7 24 24z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport { CloseIcon, MenuIcon };\n","import { Navbar, NavbarLogo, NavbarButton, NavbarNavigation } from \"./navbar\";\nimport {\n NavbarExpandableMenu,\n NavbarExpandableMenuTrigger,\n NavbarExpandableMenuContent,\n} from \"./navbar-expandable-menu\";\n\nconst NavbarExpandableMenuComponent = NavbarExpandableMenu as typeof NavbarExpandableMenu & {\n Trigger: typeof NavbarExpandableMenuTrigger;\n Content: typeof NavbarExpandableMenuContent;\n};\nNavbarExpandableMenuComponent.Trigger = NavbarExpandableMenuTrigger;\nNavbarExpandableMenuComponent.Content = NavbarExpandableMenuContent;\n\nconst NavbarComponent = Navbar as typeof Navbar & {\n Logo: typeof NavbarLogo;\n ExpandableMenu: typeof NavbarExpandableMenuComponent;\n Button: typeof NavbarButton;\n Navigation: typeof NavbarNavigation;\n};\nNavbarComponent.Logo = NavbarLogo;\nNavbarComponent.ExpandableMenu = NavbarExpandableMenuComponent;\nNavbarComponent.Button = NavbarButton;\nNavbarComponent.Navigation = NavbarNavigation;\n\nexport { NavbarComponent as Navbar };\nexport type * from \"./navbar\";\n","import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport type { OverridableComponent } from \"../utils\";\n\nconst animationDurationToValue = {\n quick: 100,\n normal: 300,\n slow: 700,\n};\n\nexport interface AutoAnimateHeightProps {\n /**\n * Time of the animation, using the hedwig animation tokens\n * quick: 0.1s\n * normal: 0.3s\n * slow: 0.7s\n *\n * default is \"quick\"\n */\n animationDuration?: \"quick\" | \"normal\" | \"slow\";\n\n /**\n * Which hedwig easing function to use, default is \"normal\"\n */\n animationEasing?: \"in\" | \"out\" | \"normal\";\n children: React.ReactNode;\n style?: React.CSSProperties;\n}\n\n/**\n * Helper component to animate the height of the children when they change\n * It's done by rendering two versions of the passed children,\n * one hidden to measure the height and one visible to only changes after the height is measured.\n *\n * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.\n */\nexport const AutoAnimateHeight: OverridableComponent<AutoAnimateHeightProps, HTMLDivElement> =\n forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n ...rest\n },\n ref,\n ) => {\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<number | undefined>(undefined);\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n useEffect(() => {\n if (measurementRef.current) {\n const { height: newHeight } = measurementRef.current.getBoundingClientRect();\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n if (newHeight < (height ?? 0)) {\n // If the children are shrinking, hold off on replacing until the animation is done\n // This way we don't get a sudden flash of empty content\n setTimeout(() => {\n flushSync(() => {\n setHeight(newHeight);\n });\n timeoutRef.current = setTimeout(() => {\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }, animationDurationToValue[animationDuration]);\n });\n } else {\n setHeight(newHeight);\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <Component\n ref={ref}\n style={{\n overflow: \"hidden\",\n height,\n transitionProperty: \"height\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </Component>\n );\n },\n );\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\n\ntype Variant =\n | {\n variant?: \"show-more\";\n expanded?: never;\n }\n | {\n variant: \"show-more-show-less\";\n expanded: boolean;\n };\n\nexport type ShowMoreProps = React.HTMLAttributes<HTMLButtonElement> & {\n text: React.ReactNode;\n} & Variant;\n\n/**\n * Simple button for triggering more content.\n *\n * You have to add the logic for what happens when the button is clicked yourself.\n *\n * **Example**\n *\n * ```tsx\n * function Content() {\n * const [items, fetchMoreItems, moreItemsAvailable] = useYourData();\n * function onShowMoreItems() {\n * fetchMoreItems();\n * }\n * return (\n * <>\n * <ul>\n * {items.map((item) => (\n * <li key={item.id}>{item.text}</li>\n * ))}\n * </ul>\n * {moreItemsAvailable ?\n * <ShowMoreButton className=\"mt-8\" onClick={onShowMoreItems} lang=\"en\" /> :\n * null\n * }\n * </>\n * )\n * }\n * ```\n */\nexport const ShowMoreButton = forwardRef<HTMLButtonElement, ShowMoreProps>(\n ({ text, variant, expanded, className, ...rest }, ref) => {\n return (\n <button\n ref={ref}\n className={clsx(\n \"hds-show-more\",\n variant === \"show-more-show-less\" && \"hds-show-more--show-less\",\n className as undefined,\n )}\n data-state={expanded ? \"expanded\" : undefined}\n type=\"button\"\n {...rest}\n >\n {text}\n <span className={clsx(\"hds-show-more__icon\")} />\n </button>\n );\n },\n);\nShowMoreButton.displayName = \"ShowMoreButton\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface DimensionsFromWidthAndHeight {\n height?: number | string;\n width?: number | string;\n}\n\ninterface SkeletonPropsInner extends React.AnchorHTMLAttributes<HTMLDivElement> {\n /**\n * The visual style of the Skeleton\n */\n variant?: \"text\" | \"circle\" | \"rectangle\" | \"rounded\";\n\n children?: React.ReactNode;\n}\n\nexport type SkeletonProps = SkeletonPropsInner & DimensionsFromWidthAndHeight;\n\n/**\n * Make skeleton loading states as placeholders for your content while waiting for data to load.\n *\n * **Note**\n *\n * Consider if this is really needed. The best experience is to avoid loading states altogether.\n * If your loading takes under 1 second, it better to not show anything at all.\n *\n * - Make your backend faster\n * - Preload/prefetch data\n * - Avoid data loading waterfalls\n * - Use optimistic ui when doing mutations\n *\n * **Usage**\n *\n * ```tsx\n * <Skeleton variant=\"circle\" width=\"2rem\" height=\"2rem\" />\n * <Skeleton variant=\"text\" />\n * <Skeleton variant=\"text\" width=\"80%\" />\n * <Skeleton variant=\"text\">Uses content to determine width</Skeleton>\n * <Skeleton variant=\"rectangle\" width=\"300px\" height=\"400px\" />\n * ```\n *\n * Remember to set `aria-hidden` on top level components you use that are not the `Skeleton` component.\n *\n * The `Skeleton` component does this for it self, but if you are using other components higher up in the tree, it might cause problems with screen readers\n *\n * **References**\n * - https://aksel.nav.no/komponenter/core/skeleton\n * - https://chakra-ui.com/docs/components/skeleton\n * - https://mui.com/material-ui/react-skeleton/\n */\nexport const Skeleton: OverridableComponent<SkeletonProps, HTMLDivElement> = forwardRef(\n (\n { as: Component = \"div\", children, variant = \"text\", width, height, className, style, ...rest },\n ref,\n ) => {\n return (\n <Component\n className={clsx(\"hds-skeleton\", `hds-skeleton--${variant}`, className as undefined)}\n style={{ ...style, width, height }}\n ref={ref}\n aria-hidden\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nSkeleton.displayName = \"Skeleton\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\n\ntype TitleProps =\n | {\n /**\n * Optional title of the active step to be shown underneath the step indicator\n *\n * Use `titleAs` to set the correct heading level\n */\n title: React.ReactNode;\n titleAs: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n }\n | {\n title?: undefined;\n titleAs?: undefined;\n };\n\ninterface StepIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {\n /*\n * 1-indexed number of the active step\n */\n activeStep: number;\n\n /**\n * 1-indexed number of steps\n */\n totalSteps: number;\n\n /**\n * Label on the left side above the steps\n */\n label: React.ReactNode;\n\n /**\n * Language for the \"step x of y\" label, default is \"en\"\n */\n lang?: \"no\" | \"en\" | \"da\" | \"sv\";\n}\n\n/**\n * Indicate a step in a process.\n *\n * It does not handle step content or navigation, only the visual indication of the active step.\n */\nexport const StepIndicator = forwardRef<HTMLDivElement, StepIndicatorProps & TitleProps>(\n (\n {\n activeStep,\n totalSteps,\n className,\n label,\n lang = \"en\",\n title,\n titleAs: TitleComponent,\n ...rest\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={clsx(\"hds-step-indicator\", className as undefined)}\n lang={lang}\n {...rest}\n >\n <div className={clsx(\"hds-step-indicator__header\")}>\n <span className={clsx(\"hds-step-indicator__left-label\")}>{label}</span>\n <span>{stepLabelTranslations[lang](activeStep, totalSteps)}</span>\n </div>\n\n <div className={clsx(\"hds-step-indicator__steps\")}>\n {Array.from({ length: totalSteps }, (_, i) => (\n <div\n className={clsx(\"hds-step-indicator__step\")}\n data-state={getStepState(i + 1, activeStep)}\n key={i}\n />\n ))}\n </div>\n\n {title ? (\n <TitleComponent className={clsx(\"hds-step-indicator__title\")}>{title}</TitleComponent>\n ) : null}\n </div>\n );\n },\n);\nStepIndicator.displayName = \"StepIndicator\";\n\n/**\n * Translated texts for the `step x of y` label.\n */\nconst stepLabelTranslations: Record<\n \"no\" | \"en\" | \"da\" | \"sv\",\n (activeStep: number, totalSteps: number) => string\n> = {\n no: (activeStep: number, totalSteps: number) => `steg ${activeStep} av ${totalSteps}`,\n en: (activeStep: number, totalSteps: number) => `step ${activeStep} of ${totalSteps}`,\n da: (activeStep: number, totalSteps: number) => `trin ${activeStep} af ${totalSteps}`,\n sv: (activeStep: number, totalSteps: number) => `steg ${activeStep} av ${totalSteps}`,\n};\n\n/**\n * Determine the state of a step.\n * 1-indexed\n */\nfunction getStepState(renderedStep: number, activeStep: number) {\n if (renderedStep < activeStep) {\n return \"previous\";\n }\n if (renderedStep === activeStep) {\n return \"active\";\n }\n return \"next\";\n}\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface StyledHtmlProps {\n children?: React.ReactNode;\n size?: \"default\" | \"small\";\n darkmode?: boolean;\n}\n\n/**\n * A component for displaying dynamic content that you want to apply hedwig styling to.\n * the styling depends on the semantic html elements you use inside the component.\n *\n * Useful when you have dynamic content that you want styled with hedwig, like content from a CMS.\n *\n * Previously known as `hw-wysiwyg` in hedwig legacy. In tailwind this kind of component it is known as `prose`.\n *\n * ```tsx\n * <StyledHtml>\n * <h1>Heading 1</h1>\n * <h2>Heading 2</h2>\n * <a href=\"https://www.postenbring.no\">Postenbring</a>\n * <ul>\n * <li>Hei</li>\n * <li>Hallo</li>\n * <li>Hello</li>\n * </ul>\n * </StyledHtml>\n * ```\n */\nexport const StyledHtml: OverridableComponent<StyledHtmlProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", children, size, darkmode = false, className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\n `hds-styled-html`,\n size === \"small\" && \"hds-styled-html--small\",\n darkmode && \"hds-styled-html--darkmode\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStyledHtml.displayName = \"StyledHtml\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { TabsContext } from \"./context\";\nimport type { TabContentsProps } from \"./tabs-content\";\nimport type { TabListProps } from \"./tabs-list\";\n\nexport interface TabsProps extends HTMLAttributes<HTMLElement> {\n children: ReactElement<TabListProps | TabContentsProps>[] | ReactElement;\n\n /**\n * Define which tab to use as default. Must be one of the <Tab/>s identifier.\n */\n defaultTab: string;\n}\n\nexport const Tabs: OverridableComponent<TabsProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", defaultTab, children, ...rest }, ref) => {\n const [activeTabId, setActiveTabId] = useState<string>(defaultTab);\n return (\n <Component className={clsx(\"hds-tabs\")} ref={ref} {...rest}>\n <TabsContext.Provider\n value={{ activeTabId, toggleActiveTabId: setActiveTabId, mounted: true }}\n >\n {children}\n </TabsContext.Provider>\n </Component>\n );\n },\n);\n\nTabs.displayName = \"Tabs\";\n","import { createContext } from \"react\";\n\nexport interface TabsContextProps {\n mounted: boolean;\n activeTabId?: string;\n toggleActiveTabId: (tabId: string) => void;\n}\n\nexport const TabsContext = createContext<TabsContextProps>({\n mounted: false,\n activeTabId: undefined,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Added default section, without handling\n toggleActiveTabId: (tabId: string) => {\n // default\n },\n});\n","import type { HTMLAttributes, ReactElement, MouseEvent } from \"react\";\nimport { forwardRef, useContext, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { type OverridableComponent, useResize } from \"../utils\";\nimport { TabsContext } from \"./context\";\n\nexport interface TabListProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabProps> | ReactElement<TabProps>[];\n\n /**\n * Direction of the tabs. Can either be vertical or horizontal.\n * Horizontal breaks on window width with fallback back to vertical\n */\n direction?: \"vertical\" | \"horizontal\";\n}\n\nexport function TabsList({ children, direction = \"horizontal\", className, ...rest }: TabListProps) {\n const tabsListRef = useRef<HTMLDivElement>(null);\n const { width: tabsWidth } = useResize(tabsListRef);\n const { innerWidth } = window;\n const wideEnough = innerWidth >= tabsWidth;\n return (\n <div\n className={clsx(\n \"hds-tabs--list\",\n direction === \"horizontal\"\n ? {\n [`hds-tabs--list-horizontal`]: wideEnough,\n \"hds-tabs--list-vertical\": !wideEnough,\n }\n : {\n \"hds-tabs--list-vertical\": true,\n },\n className as undefined,\n )}\n ref={tabsListRef}\n role=\"tablist\"\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nTabsList.displayName = \"Tabs.List\";\n\nexport interface TabProps extends HTMLAttributes<HTMLButtonElement> {\n children: ReactElement<HTMLElement> | string;\n\n /**\n * Identifier for the tab\n */\n tabId: string;\n}\n\nexport const Tab: OverridableComponent<TabProps, HTMLButtonElement> = forwardRef(\n ({ as: Component = \"button\", children, tabId, className, onClick, ...rest }, ref) => {\n const context = useContext(TabsContext);\n if (!context.mounted) {\n throw new Error(\"Context required. Did you use <TabContent/> outside of <Tabs/>?\");\n }\n const toggleTab = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n context.toggleActiveTabId(tabId);\n onClick && onClick(e);\n };\n return (\n <Component\n className={clsx(\n \"hds-tabs--tab\",\n { \"hds-tabs--tab-active\": context.activeTabId === tabId },\n className as undefined,\n )}\n data-tabid={tabId}\n onClick={toggleTab}\n ref={ref}\n role=\"tab\"\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\n\nTab.displayName = \"Tabs.Tab\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { TabsContext } from \"./context\";\n\nexport interface TabContentsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsContentProps> | ReactElement<TabsContentProps>[];\n}\n\nexport function TabsContents({ children, ...rest }: TabContentsProps) {\n return (\n <div className={clsx(\"hds-tabs--contents\")} {...rest}>\n {children}\n </div>\n );\n}\nTabsContents.displayName = \"Tabs.Contents\";\n\nexport interface TabsContentProps extends HTMLAttributes<HTMLElement> {\n children: ReactElement<HTMLElement> | ReactElement<HTMLElement>[] | string;\n\n /**\n * Content for the referenced tabId\n */\n forTabId: string;\n}\n\nexport const TabsContent: OverridableComponent<TabsContentProps, HTMLElement> = forwardRef(\n ({ as: Component = \"div\", forTabId, children, ...rest }, ref) => {\n const context = useContext(TabsContext);\n if (!context.mounted) {\n throw new Error(\"Context required. Did you use <Tabs.Content /> outside of <Tabs/>?\");\n }\n if (context.activeTabId === forTabId) {\n return (\n <Component {...rest} ref={ref}>\n {children}\n </Component>\n );\n }\n return null;\n },\n);\n\nTabsContent.displayName = \"Tabs.Content\";\n","import { Tabs } from \"./tabs\";\nimport { TabsList, Tab } from \"./tabs-list\";\nimport { TabsContents, TabsContent } from \"./tabs-content\";\n\nconst TabsComponent = Tabs as typeof Tabs & {\n List: typeof TabsList;\n Tab: typeof Tab;\n Contents: typeof TabsContents;\n Content: typeof TabsContent;\n};\nTabsComponent.List = TabsList;\nTabsComponent.Tab = Tab;\nTabsComponent.Contents = TabsContents;\nTabsComponent.Content = TabsContent;\n\nexport { TabsComponent as Tabs };\n\nexport type * from \"./tabs\";\nexport type * from \"./tabs-list\";\nexport type * from \"./tabs-content\";\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface HeadingProps {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n as: React.ElementType;\n}\ninterface ParagraphProps {\n variant?:\n | \"body\"\n | \"body-title\"\n | \"body-small\"\n | \"body-small-title\"\n | \"technical\"\n | \"technical-title\"\n | \"caption\"\n | \"caption-title\";\n}\n\nexport type TextProps = (HeadingProps | ParagraphProps) & {\n children: React.ReactNode;\n\n /**\n * The font-size of the component. By default it's `fluid` which means it's smaller on mobile and larger on desktop.\n *\n * But you can lock it to either the min or the max size.\n */\n size?: \"min\" | \"max\" | \"fluid\";\n\n /**\n * 🚧 Experimental spacing\n */\n _unstableSpacing?: boolean;\n};\n\nconst defaultHTMLTag: Record<NonNullable<TextProps[\"variant\"]>, `h${1 | 2 | 3}` | \"p\"> = {\n \"h1-display\": \"h1\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n \"h3-title\": \"h3\",\n body: \"p\",\n \"body-title\": \"p\",\n \"body-small\": \"p\",\n \"body-small-title\": \"p\",\n technical: \"p\",\n \"technical-title\": \"p\",\n caption: \"p\",\n \"caption-title\": \"p\",\n};\n\n/**\n * Text component\n *\n * If the variant is `h1-display`, `h1`, `h2`, `h3`, or `h3-title` the `as` prop is required.\n *\n * This to force the consumer to consider which semantic html element to use. E.g. `<h1>` or `<h2>`\n *\n * @example\n * ```tsx\n * <Text variant=\"h1-display\" as=\"h1\">Hello world</Text>\n * <Text variant=\"body\">\n * This is a body text\n * </Text>\n * ```\n */\nexport const Text: OverridableComponent<TextProps, HTMLDivElement> = forwardRef(\n (\n {\n as,\n variant = \"body\",\n size = \"fluid\",\n _unstableSpacing: spacing,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = as ?? defaultHTMLTag[variant];\n const sizeModifier =\n size !== \"fluid\" && variant !== \"caption\" && variant !== \"caption-title\" && size;\n return (\n <Component\n className={clsx(\n `hds-text-${variant}`,\n sizeModifier && `hds-text--${sizeModifier}`,\n spacing && \"hds-text--spacing\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nText.displayName = \"Text\";\n","import type { TextProps } from \"./text\";\nimport { Text } from \"./text\";\n\nexport { Text };\nexport type * from \"./text\";\n\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH1Display = textVariant(\"h1-display\", \"TextH1Display\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH1 = textVariant(\"h1\", \"TextH1\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH2 = textVariant(\"h2\", \"TextH2\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH3 = textVariant(\"h3\", \"TextH3\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH3Title = textVariant(\"h3-title\", \"TextH3Title\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBody = textVariant(\"body\", \"TextBody\"); // Less weird\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBodyTitle = textVariant(\"body-title\", \"TextBodyTitle\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBodySmall = textVariant(\"body-small\", \"TextBodySmall\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBodySmallTitle = textVariant(\"body-small-title\", \"TextBodySmallTitle\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextTechnical = textVariant(\"technical\", \"TextTechnical\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextTechnicalTitle = textVariant(\"technical-title\", \"TextTechnicalTitle\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextCaption = textVariant(\"caption\", \"TextCaption\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextCaptionTitle = textVariant(\"caption-title\", \"TextCaptionTitle\");\n\nconst variantToHtmlTag = {\n \"h1-display\": \"h1\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n \"h3-title\": \"h3\",\n body: \"p\",\n \"body-title\": \"p\",\n \"body-small\": \"p\",\n \"body-small-title\": \"p\",\n technical: \"p\",\n \"technical-title\": \"p\",\n caption: \"p\",\n \"caption-title\": \"p\",\n} as const;\n\nfunction textVariant(\n variant: TextProps[\"variant\"],\n displayName: string,\n): React.FunctionComponent<Omit<TextProps, \"variant\">> {\n function WrappedText(props: Omit<TextProps, \"variant\">) {\n return <Text variant={variant} as={variantToHtmlTag[variant ?? \"body\"]} {...props} />;\n }\n WrappedText.displayName = displayName;\n\n return WrappedText;\n}\n","import type { ReactNode } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { Box } from \"../box\";\n\nexport interface WarningBannerProps {\n title: ReactNode;\n description?: ReactNode;\n}\n\nexport const WarningBanner: OverridableComponent<WarningBannerProps, HTMLDivElement> = forwardRef(\n ({ title, description, className, ...rest }, ref) => {\n const expandable = !!description;\n return (\n <Box {...rest} className={clsx(\"hds-warning-banner\", className as undefined)} ref={ref}>\n <WarningBannerTitle variant={expandable ? \"expandable\" : \"default\"}>\n {title}\n </WarningBannerTitle>\n {expandable ? <WarningBannerDescription>{description}</WarningBannerDescription> : null}\n </Box>\n );\n },\n);\nWarningBanner.displayName = \"WarningBanner\";\n\ninterface WarningBannerTitleProps {\n variant: \"expandable\" | \"default\";\n children: ReactNode;\n}\n\nconst WarningBannerTitle: OverridableComponent<WarningBannerTitleProps, HTMLDivElement> =\n forwardRef(\n (\n {\n variant,\n as: Component = variant === \"expandable\" ? \"button\" : \"p\",\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [open, setOpen] = useState<boolean>(false);\n if (variant === \"expandable\") {\n return (\n <Component\n className={clsx(\n \"hds-warning-banner__title\",\n \"hds-warning-banner__title-trigger\",\n { \"hds-warning-banner--closed\": !open },\n className as undefined,\n )}\n onClick={() => {\n setOpen(!open);\n }}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <span>{children}</span>\n </Component>\n );\n }\n return (\n <Component\n className={clsx(\"hds-warning-banner__title\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n );\nWarningBannerTitle.displayName = \"WarningBannerTitle\";\n\nconst WarningBannerDescription: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-warning-banner__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nWarningBannerDescription.displayName = \"WarningBannerDescription\";\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,mBAA2B;AAC3B,6BAAqB;AAqBf;AAHC,IAAM,gBAAkE;AAAA,EAC7E,CAAC,IAAwE,QAAQ;AAAhF,iBAAE,MAAI,YAAY,OAAO,UAAU,WAAW,SAAS,KArB1D,IAqBG,IAAgE,iBAAhE,IAAgE,CAA9D,MAAuB,YAAU,aA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;AAAA,UACA;AAAA,UACA,MAAK;AAAA,WACD,OAZL;AAAA,UAcC,wDAAC,UAAM,UAAS;AAAA;AAAA,MAClB;AAAA,IAEJ;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,+BAAK,6BAA6B,SAAsB;AAAA,QACnE;AAAA,SACI,OAHL;AAAA,QAKE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACF,mBAAmB,cAAc;AAEjC,IAAM,+BAA+E;AAAA,EACnF,CAAC,IAA6C,QAAQ;AAArD,iBAAE,MAAI,YAAY,KAAK,UA9E1B,IA8EG,IAAqC,iBAArC,IAAqC,CAAnC,MAAqB;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,+BAAK,mCAAmC,SAAsB;AAAA,QACzE;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,yBAAyB,cAAc;","names":["import_react","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_typed_classname","import_jsx_runtime","import_jsx_runtime","Fieldset","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","InputGroup","import_jsx_runtime","Input","import_react","import_typed_classname","import_jsx_runtime","Select","import_react","import_typed_classname","import_jsx_runtime","Textarea","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_jsx_runtime","React","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","React","import_react","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","FocusTrap","_a","_b","import_react","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/index-no-css.tsx","../src/accordion/accordion.tsx","../src/accordion/accordion-item.tsx","../src/accordion/context.ts","../src/accordion/accordion-header.tsx","../src/accordion/accordion-content.tsx","../src/accordion/index.tsx","../src/badge/badge.tsx","../src/box/box.tsx","../src/box/index.tsx","../src/breadcrumb/breadcrumb.tsx","../src/button/button.tsx","../src/card/card.tsx","../src/card/index.tsx","../src/description-list/description-list.tsx","../src/form/fieldset/fieldset.tsx","../src/form/error-message/error-message.tsx","../src/form/input/input.tsx","../src/form/input-group/input-group.tsx","../src/form/select/select.tsx","../src/form/textarea/textarea.tsx","../src/form/checkbox/checkbox.tsx","../src/form/radiobutton/radiobutton.tsx","../src/form/radiobutton/radiogroup.tsx","../src/layout/container/container.tsx","../src/link/link.tsx","../src/list/list.tsx","../src/list/link-list.tsx","../src/message/message.tsx","../src/message/index.tsx","../src/modal/modal.tsx","../src/utils.ts","../src/modal/index.tsx","../src/navbar/navbar.tsx","../src/navbar/navbar-expandable-menu.tsx","../src/navbar/icons.tsx","../src/navbar/index.tsx","../src/utilities/auto-animate-height.tsx","../src/show-more/show-more.tsx","../src/skeleton/skeleton.tsx","../src/step-indicator/step-indicator.tsx","../src/styled-html/styled-html.tsx","../src/tabs/tabs.tsx","../src/tabs/context.ts","../src/tabs/tabs-list.tsx","../src/tabs/tabs-content.tsx","../src/tabs/index.tsx","../src/text/text.tsx","../src/text/index.tsx","../src/warning-banner/warning-banner.tsx"],"sourcesContent":["export * from \"./accordion\";\nexport * from \"./badge\";\nexport * from \"./box\";\nexport * from \"./breadcrumb\";\nexport * from \"./button\";\nexport * from \"./card\";\nexport * from \"./description-list\";\nexport * from \"./form\";\nexport * from \"./layout\";\nexport * from \"./link\";\nexport * from \"./list\";\nexport * from \"./message\";\nexport * from \"./modal\";\nexport * from \"./navbar\";\nexport * from \"./show-more\";\nexport * from \"./skeleton\";\nexport * from \"./step-indicator\";\nexport * from \"./styled-html\";\nexport * from \"./tabs\";\nexport * from \"./text\";\nexport * from \"./utilities\";\nexport * from \"./warning-banner\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport type { AccordionItemProps } from \"./accordion-item\";\n\nexport interface AccordionProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Accepts type of <AccordionItem/>\n */\n children: ReactElement<AccordionItemProps> | ReactElement<AccordionItemProps>[];\n\n /**\n * Adds padding to the left of the accordion\n */\n indent?: boolean;\n\n className?: string;\n}\n\nexport const Accordion: OverridableComponent<AccordionProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", children, className, indent = true, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-accordion\",\n !indent && \"hds-accordion--no-indent\",\n className as undefined,\n )}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\n\nAccordion.displayName = \"Accordion\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { AccordionItemContext } from \"./context\";\nimport type { AccordionHeaderProps } from \"./accordion-header\";\nimport type { AccordionContentProps } from \"./accordion-content\";\n\nexport type AccordionItemChildrenType =\n | ReactElement<AccordionHeaderProps>\n | ReactElement<AccordionContentProps>;\n\nexport interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Control the open state of the accordion manually\n */\n open?: boolean;\n\n /**\n * Use with open to control the open state of the accordion manually\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * If the accordion should be open by default\n */\n defaultOpen?: boolean;\n\n /**\n * Accepts type of Accordion.Content and Accordion.Header\n */\n children: AccordionItemChildrenType[];\n}\n\nexport const AccordionItem: OverridableComponent<AccordionItemProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n defaultOpen,\n open: outerOpen,\n onOpenChange,\n className,\n ...rest\n },\n ref,\n ) => {\n const [innerOpen, setInnerOpen] = useState(defaultOpen ?? false);\n const open = outerOpen ?? innerOpen;\n\n const handleOpen = () => {\n if (outerOpen !== undefined) {\n onOpenChange && onOpenChange(!open);\n } else {\n setInnerOpen(!open);\n }\n };\n\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-accordion-item\",\n {\n \"hds-accordion-item__expanded\": open,\n },\n className as undefined,\n )}\n ref={ref}\n >\n <AccordionItemContext.Provider value={{ open, setOpen: handleOpen }}>\n {children}\n </AccordionItemContext.Provider>\n </Component>\n );\n },\n);\n\nAccordionItem.displayName = \"Accordion.Item\";\n","import { createContext } from \"react\";\n\nexport interface AccordionItemContextProps {\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const AccordionItemContext = createContext<AccordionItemContextProps | null>(null);\n","import type { ButtonHTMLAttributes, MouseEvent, ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionHeaderProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n children: ReactNode;\n}\n\nexport const AccordionHeader: OverridableComponent<AccordionHeaderProps, HTMLButtonElement> =\n forwardRef(({ as: Component = \"button\", children, className, onClick, ...rest }, ref) => {\n const itemContext = useContext(AccordionItemContext);\n if (itemContext === null) {\n return null;\n }\n const expandOrCollapse = (e: MouseEvent<HTMLButtonElement>) => {\n itemContext.setOpen(!itemContext.open);\n onClick && onClick(e);\n };\n return (\n <Component\n {...rest}\n aria-expanded={itemContext.open}\n className={clsx(\n \"hds-accordion-item-header\",\n { \"hds-accordion-item-header--open\": itemContext.open },\n className as undefined,\n )}\n onClick={expandOrCollapse}\n ref={ref}\n type=\"button\"\n >\n <span>{children}</span>\n </Component>\n );\n });\n\nAccordionHeader.displayName = \"Accordion.Header\";\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const AccordionContent: OverridableComponent<AccordionContentProps, HTMLDivElement> =\n forwardRef(({ as: Component = \"div\", children, className, ...rest }, ref) => {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n return null;\n }\n return (\n <Component\n aria-hidden={!context.open}\n {...rest}\n className={clsx(\n \"hds-accordion-item-content\",\n {\n \"hds-accordion-item-content--closed\": !context.open,\n },\n className as undefined,\n )}\n ref={ref}\n >\n <div className={clsx(\"hds-accordion-item-content-inner\")}>{children}</div>\n </Component>\n );\n });\n\nAccordionContent.displayName = \"Accordion.Content\";\n","import { Accordion } from \"./accordion\";\nimport { AccordionItem } from \"./accordion-item\";\nimport { AccordionHeader } from \"./accordion-header\";\nimport { AccordionContent } from \"./accordion-content\";\n\nconst AccordionComponent = Accordion as typeof Accordion & {\n Item: typeof AccordionItem;\n Header: typeof AccordionHeader;\n Content: typeof AccordionContent;\n};\n\nAccordionComponent.Item = AccordionItem;\nAccordionComponent.Header = AccordionHeader;\nAccordionComponent.Content = AccordionContent;\n\nexport { AccordionComponent as Accordion };\n\nexport type * from \"./accordion\";\nexport type * from \"./accordion-item\";\nexport type * from \"./accordion-header\";\nexport type * from \"./accordion-content\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BadgeProps extends React.AnchorHTMLAttributes<HTMLSpanElement> {\n /**\n * Font size of the badge\n */\n size?: \"small\" | \"smaller\";\n\n children: React.ReactNode;\n}\n\nfunction BaseBadge({\n children,\n variant,\n size = \"small\",\n className,\n ...rest\n}: BadgeProps & { variant: \"lighter\" | \"dark\" | \"white\" | \"warning\" }) {\n return (\n <span\n className={clsx(\n \"hds-badge\",\n `hds-badge--${size}`,\n `hds-badge--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </span>\n );\n}\n\nBaseBadge.displayName = \"BaseBadge\";\n\nexport function Badge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"lighter\" />;\n}\n\nBadge.displayName = \"Badge\";\n\nexport function DarkBadge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"dark\" />;\n}\n\nDarkBadge.displayName = \"DarkBadge\";\n\nexport function WhiteBadge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"white\" />;\n}\n\nWhiteBadge.displayName = \"WhiteBadge\";\n\nexport function WarningBadge(props: BadgeProps) {\n return <BaseBadge {...props} variant=\"warning\" />;\n}\n\nWarningBadge.displayName = \"WarningBadge\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n children?: React.ReactNode;\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 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\nexport const Box: OverridableComponent<BoxProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\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\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n {children}\n </Component>\n );\n },\n);\nBox.displayName = \"Box\";\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 );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n","import { Box, BoxCloseButton } from \"./box\";\n\nconst BoxComponent = Box as typeof Box & {\n CloseButton: typeof BoxCloseButton;\n};\nBoxComponent.CloseButton = BoxCloseButton;\n\nexport { BoxComponent as Box };\n\nexport type * from \"./box\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {\n children: ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];\n\n /**\n * Props passed to the `ol` html element\n */\n olProps?: HTMLAttributes<HTMLElement>;\n}\n\n/**\n * A breadcrumbs navigation menu\n *\n * **Usage**\n *\n * ```tsx\n * <Breadcrumbs data-testid=\"breadcrumbs\">\n * <li><Link href=\"../\">Previous page</Link></li>\n * <li aria-current=\"page\">Current page</li>\n * </Breadcrumbs>\n * ```\n *\n * Outputs this html structure\n *\n * ```html\n * <nav data-testid=\"breadcrumbs\">\n * <ol>\n * <li><a href=\"../\">Previous page</a></li>\n * <li aria-current=\"page\">Current page</li>\n * </ol>\n * </nav>\n * ```\n */\nexport function Breadcrumbs({ olProps, children, ...rest }: BreadcrumbsProps) {\n return (\n <nav {...rest}>\n <ol {...olProps} className={clsx(\"hds-breadcrumbs\", olProps?.className as undefined)}>\n {children}\n </ol>\n </nav>\n );\n}\n\nBreadcrumbs.displayName = \"Breadcrumbs\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface ButtonPropsInternal extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n /**\n * Make the button use 100% width available.\n * Using the \"mobile\" it only stretch to full width on smaller screens\n */\n fullWidth?: boolean | \"mobile\";\n\n /**\n * Use an icon inside the button\n */\n icon?: React.ReactNode;\n\n children?: React.ReactNode;\n}\n\nexport type ButtonProps = ButtonPropsInternal &\n (\n | {\n /**\n * The background fill of the button\n */\n fill?: \"contained\" | \"outline\";\n }\n | {\n /**\n * @deprecated use `fill='outline'` instead\n */\n fill?: \"outlined\";\n }\n );\n\nexport const BaseButton: OverridableComponent<\n ButtonProps & { variant: \"primary\" | \"secondary\" },\n HTMLButtonElement\n> = forwardRef(\n (\n {\n as: Component = \"button\",\n children,\n variant,\n size = \"medium\",\n fullWidth = false,\n fill = \"contained\",\n icon,\n className,\n ...rest\n },\n ref,\n ) => {\n // TODO: Remove deprecated fill value name at some point\n // Deprecated at 10. march 2024\n if (fill === \"outlined\") {\n // eslint-disable-next-line no-console -- Deprecation warning\n console.warn(\"The `fill` value `outlined` is deprecated, use `fill='outline'` instead\");\n }\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n {\n [`hds-button--${variant}`]: fill === \"contained\",\n [`hds-button--outline-${variant}`]: fill === \"outline\" || fill === \"outlined\",\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--icon-only\": icon && !children,\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {icon && !children ? icon : null}\n {children}\n </Component>\n );\n },\n);\nBaseButton.displayName = \"BaseButton\";\n\n/**\n * ## TODO\n *\n * - [x] Handle links that looks like buttons\n * - [ ] Revisit how to handle outline\n * - [ ] Figure out outline-white\n */\n\nexport const PrimaryButton: OverridableComponent<ButtonProps, HTMLButtonElement> = forwardRef(\n (props, ref) => {\n return <BaseButton {...props} ref={ref} variant=\"primary\" />;\n },\n);\n\nPrimaryButton.displayName = \"PrimaryButton\";\n\nexport const SecondaryButton: OverridableComponent<ButtonProps, HTMLButtonElement> = forwardRef(\n (props, ref) => {\n return <BaseButton {...props} ref={ref} variant=\"secondary\" />;\n },\n);\n\nSecondaryButton.displayName = \"SecondaryButton\";\n","import type { HTMLAttributes, ReactNode, ElementType } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface CardBaseProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const Card: OverridableComponent<\n CardBaseProps & {\n /**\n * A Card should in most cases appear as a big link,\n * but the actual link should just be the header title.\n * To make life better for those with screen readers we should not make\n * the entire card a link, as that would cause the entire card to be read\n * as a link to the user. That would be perceived as information overload.\n */\n as?: Exclude<ElementType, \"a\">;\n },\n HTMLDivElement\n> = forwardRef(({ as: Component = \"section\", className, children, ...rest }, ref) => {\n return (\n <Component {...rest} className={clsx(\"hds-card\", className as undefined)} ref={ref}>\n {children}\n </Component>\n );\n});\nCard.displayName = \"Card\";\n\nexport const CardMedia: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, ...rest }, ref) => {\n return (\n <Component {...rest} className={clsx(\"hds-card__media\", className as undefined)} ref={ref}>\n {children}\n </Component>\n );\n },\n);\nCardMedia.displayName = \"Card.Media\";\n\nexport interface CardImageMediaProps extends HTMLAttributes<HTMLDivElement> {\n aspectRatio?: string;\n}\nexport const CardMediaImg: OverridableComponent<CardImageMediaProps, HTMLImageElement> = forwardRef(\n ({ as: Component = \"img\", className, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__media__img\", className as undefined)}\n ref={ref}\n />\n );\n },\n);\nCardMediaImg.displayName = \"Card.Media.Img\";\n\nexport const CardBody: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, ...rest }, ref) => {\n return (\n <Component {...rest} className={clsx(\"hds-card__body\", className as undefined)} ref={ref}>\n {children}\n </Component>\n );\n },\n);\nCardBody.displayName = \"Card.Body\";\n\nexport const CardBodyHeader = forwardRef<\n HTMLHeadingElement,\n CardBaseProps & {\n /**\n * Heading level of the card heading\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n }\n>(({ as: Component, className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-header\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n});\nCardBodyHeader.displayName = \"Card.Body.Header\";\n\nexport const CardBodyHeaderOverline: OverridableComponent<CardBaseProps, HTMLDivElement> =\n forwardRef(({ as: Component = \"span\", className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-header-overline\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n });\nCardBodyHeaderOverline.displayName = \"Card.Body.Header.Overline\";\n\nexport const CardBodyHeaderTitle: OverridableComponent<\n CardBaseProps & {\n /**\n * A Card should in most cases appear as a big link,\n * but the actual link should just be this header title.\n * To make life better for those with screen readers we should not make\n * the entire card a link, as that would cause the entire card to be read\n * as a link to the user. That would be perceived as information overload.\n */\n as: ElementType;\n },\n HTMLDivElement\n> = forwardRef(({ as: Component, className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-header-title\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n});\nCardBodyHeaderTitle.displayName = \"Card.Body.Header.Title\";\n\nexport const CardBodyDescription: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"p\", className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-description\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nCardBodyDescription.displayName = \"Card.Body.Description\";\n\nexport const CardBodyAction: OverridableComponent<CardBaseProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-action\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nCardBodyAction.displayName = \"Card.Body.Action\";\n\nexport const CardBodyActionArrow: OverridableComponent<\n HTMLAttributes<HTMLSpanElement>,\n HTMLSpanElement\n> = forwardRef(({ as: Component = \"span\", className, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-action-arrow\", className as undefined)}\n ref={ref}\n />\n );\n});\nCardBodyActionArrow.displayName = \"Card.Body.Action.Arrow\";\n","import {\n Card,\n CardMedia,\n CardMediaImg,\n CardBody,\n CardBodyHeader,\n CardBodyHeaderOverline,\n CardBodyHeaderTitle,\n CardBodyDescription,\n CardBodyAction,\n CardBodyActionArrow,\n} from \"./card\";\n\nconst CardMediaComponent = CardMedia as typeof CardMedia & {\n Img: typeof CardMediaImg;\n};\nCardMediaComponent.Img = CardMediaImg;\n\nconst CardBodyHeaderComponent = CardBodyHeader as typeof CardBodyHeader & {\n Overline: typeof CardBodyHeaderOverline;\n Title: typeof CardBodyHeaderTitle;\n};\nCardBodyHeaderComponent.Overline = CardBodyHeaderOverline;\nCardBodyHeaderComponent.Title = CardBodyHeaderTitle;\n\nconst CardBodyActionComponent = CardBodyAction as typeof CardBodyAction & {\n Arrow: typeof CardBodyActionArrow;\n};\nCardBodyActionComponent.Arrow = CardBodyActionArrow;\n\nconst CardBodyComponent = CardBody as typeof CardBody & {\n Header: typeof CardBodyHeaderComponent;\n Overline: typeof CardBodyHeaderOverline;\n Title: typeof CardBodyHeaderTitle;\n Description: typeof CardBodyDescription;\n Action: typeof CardBodyActionComponent;\n};\n\nCardBodyComponent.Header = CardBodyHeaderComponent;\nCardBodyComponent.Description = CardBodyDescription;\nCardBodyComponent.Action = CardBodyActionComponent;\n\nconst CardComponent = Card as typeof Card & {\n Media: typeof CardMediaComponent;\n Body: typeof CardBodyComponent;\n};\nCardComponent.Media = CardMediaComponent;\nCardComponent.Body = CardBodyComponent;\n\nexport { CardComponent as Card };\n\nexport type * from \"./card\";\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `DescriptionDetails` or `DescriptionTerm` elements\n */\n children?: ReactNode;\n /**\n * Direction of the description list\n */\n variant?: \"vertical\" | \"horizontal\";\n}\n\n/**\n * Uses the HTML5 `<dl>` element\n *\n * Pass in corresponding `<dt>` and `<dd>` elements as children\n *\n * ```tsx\n * <DescriptionList>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </DescriptionList>\n * ```\n *\n * Optionally wrap them in `<div>` elements as allowed by the HTML5 spec\n *\n * ```tsx\n * <DescriptionList>\n * <div>\n * <dt>Vekt</dt>\n * <dd>12 kg</dd>\n * </div>\n * <div>\n * <dt>Antall kolli</dt>\n * <dd>2</dd>\n * </div>\n * </DescriptionList>\n * ```\n */\nexport function DescriptionList({\n variant = \"vertical\",\n className,\n ...rest\n}: DescriptionListProps) {\n return (\n <dl\n className={clsx(\n \"hds-description-list\",\n {\n \"hds-description-list--horizontal\": variant === \"horizontal\",\n },\n className as undefined,\n )}\n {...rest}\n />\n );\n}\nDescriptionList.displayName = \"DescriptionList\";\n","import { useId, forwardRef } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n}\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n legendProps: { size: legendSize = \"default\", className: legendClassName, ...legendProps } = {},\n legend,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n\n return (\n <fieldset\n aria-describedby={errorMessage ? errorMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", className as undefined)}\n ref={ref}\n style={style}\n {...rest}\n >\n <legend\n className={clsx(\n \"hds-fieldset__legend\",\n { [`hds-fieldset__legend--${legendSize}`]: legendSize },\n legendClassName as undefined,\n )}\n {...legendProps}\n >\n {legend}\n </legend>\n <div className={clsx(\"hds-fieldset__input-wrapper\")}>{children}</div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </fieldset>\n );\n});\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorMessageProps {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport function ErrorMessage({ children, id, className }: ErrorMessageProps) {\n return (\n <div\n aria-live=\"assertive\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n >\n {children}\n </div>\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\nexport type InputProps = Omit<InputGroupProps & InputHTMLAttributes<HTMLInputElement>, \"children\">;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { className, variant, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-input\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n variant={variant}\n >\n <input {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />\n </InputGroup>\n );\n});\n\nInput.displayName = \"Input\";\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 { ErrorMessage } from \"../error-message\";\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 variant?: \"default\" | \"white\";\n errorMessage?: ReactNode;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n children: ReactNode;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n variant = \"default\",\n errorMessage,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n const inputId = useId();\n\n const renderInput = () => {\n const input = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n \"aria-describedby\": errorMessage ? errorMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n ...input.props,\n className: clsx(\"hds-input-group__input\", input.props.className as undefined),\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${variant}`]: variant,\n \"hds-input-group--error\": errorMessage,\n },\n className as undefined,\n )}\n ref={ref}\n style={style}\n {...rest}\n >\n <label\n className={clsx(\"hds-input-group__label\", labelClassName as undefined)}\n {...labelProps}\n htmlFor={id ?? inputId}\n >\n {label}\n </label>\n <div\n className={clsx(\"hds-input-group__input-wrapper\")}\n data-disabled={disabled}\n data-readonly={readOnly}\n >\n {renderInput()}\n </div>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </div>\n );\n});\n","import { forwardRef } from \"react\";\nimport 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 & SelectHTMLAttributes<HTMLSelectElement>,\n \"readOnly\"\n>;\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(\n { className, variant, errorMessage, labelProps, label, id, style, disabled, children, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-select\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n style={style}\n variant={variant}\n >\n <select {...rest} disabled={disabled} ref={ref}>\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 { className, variant, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-textarea\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n variant={variant}\n >\n <textarea {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />\n </InputGroup>\n );\n});\n\nTextarea.displayName = \"Textarea\";\n","import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n ({ variant = \"plain\", hasError, title, children, className, ...rest }, ref) => {\n return (\n <div\n className={clsx(\n \"hds-checkbox\",\n {\n [`hds-checkbox--${variant}`]: variant === \"bounding-box\",\n \"hds-checkbox--error\": hasError,\n },\n className as undefined,\n )}\n >\n <label>\n <input {...rest} aria-invalid={hasError ? true : undefined} ref={ref} type=\"checkbox\" />\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 );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n","import type { InputHTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radiogroup\";\n\nexport interface RadiobuttonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n variant?: \"plain\" | \"bounding-box\";\n hasError?: boolean;\n title?: string;\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadiobuttonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioGroupProps[\"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 (\n {\n checked,\n value,\n variant = \"plain\",\n hasError: hasErrorProp,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const { value: selectedValue, hasError: hasErrorContext, ...context } = useRadioGroupContext();\n const hasError = hasErrorContext || hasErrorProp;\n return (\n <div\n className={clsx(\n \"hds-radiobutton\",\n {\n [`hds-radiobutton--${variant}`]: variant === \"bounding-box\",\n \"hds-radiobutton--error\": hasError,\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-radiobutton__checkmark\" />\n {title ? <p className=\"hds-radiobutton__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 ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadiobuttonProps } from \"./radiobutton\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n /** Will be passed to all Radiobuttons within the radio group */\n name?: RadiobuttonProps[\"name\"];\n /** If you want the group to be controlled, you can pass the selected value here */\n value?: RadiobuttonProps[\"value\"];\n /**\n * Error message is passed to the internal Fieldset,\n * and also marks all radiobuttons as invalid\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radiobuttons within the radio group */\n onChange?: ChangeEventHandler<HTMLInputElement> | undefined;\n}\n\ntype RadioGroupContextProps = {\n hasError: boolean;\n} & Pick<RadioGroupProps, \"name\" | \"value\" | \"onChange\">;\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({\n hasError: false,\n onChange: () => {\n return undefined;\n },\n});\n\nexport const useRadioGroupContext = () => useContext(RadioGroupContext);\n\nexport const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(\n { name, value, errorMessage, onChange, children, ...rest },\n ref,\n) {\n return (\n <RadioGroupContext.Provider value={{ name, value, hasError: Boolean(errorMessage), onChange }}>\n <Fieldset errorMessage={errorMessage} {...rest} ref={ref}>\n {children}\n </Fieldset>\n </RadioGroupContext.Provider>\n );\n});\n\nRadioGroup.displayName = \"RadioGroup\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../../utils\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"slim\";\n children: ReactNode;\n}\n\n/**\n * Container is a layout component that is used to wrap content.\n * It ensures a max-width and minimum spacing on the sides.\n */\nexport const Container: OverridableComponent<ContainerProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, variant, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-container\",\n { \"hds-container--slim\": variant === \"slim\" },\n className as undefined,\n )}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nContainer.displayName = \"Container\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The visual style of the link\n */\n variant?: \"underline\" | \"solid\" | \"inverted\" | \"no-underline\";\n\n /**\n * Font size of the link\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n children: React.ReactNode;\n}\n\nexport const Link: OverridableComponent<LinkProps, HTMLAnchorElement> = forwardRef(\n (\n { as: Component = \"a\", children, variant = \"underline\", size = \"medium\", className, ...rest },\n ref,\n ) => {\n return (\n <Component\n className={clsx(\n \"hds-link\",\n variant !== \"underline\" && `hds-link--${variant}`,\n size !== \"medium\" && `hds-link--${size}`,\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nLink.displayName = \"Link\";\n","import type { HTMLAttributes } from \"react\";\nimport * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ListProps extends HTMLAttributes<HTMLOListElement | HTMLUListElement> {\n children?: React.ReactElement<HTMLLIElement> | React.ReactElement<HTMLLIElement>[];\n /**\n * Sets the size of the items (font)\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nfunction BaseList({\n as: ListTag = \"ul\",\n children,\n size = \"medium\",\n className,\n ...rest\n}: ListProps & { as?: \"ul\" | \"ol\" }) {\n return (\n <ListTag className={clsx(\"hds-list\", `hds-list--${size}`, className as undefined)} {...rest}>\n {children}\n </ListTag>\n );\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 build your own using the semantic `ul` and `ol` tags.\n */\nexport function UnorderedList(props: ListProps) {\n return (\n <BaseList as=\"ul\" {...props}>\n {props.children}\n </BaseList>\n );\n}\n\n/**\n * An ordered list of simple items\n *\n * If you have other list needs build your own using the semantic `ul` and `ol` tags.\n */\nexport function OrderedList(props: ListProps) {\n return (\n <BaseList as=\"ol\" {...props}>\n {props.children}\n </BaseList>\n );\n}\n\nBaseList.displayName = \"BaseList\";\nOrderedList.displayName = \"OrderedList\";\nUnorderedList.displayName = \"UnorderedList\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { ListProps } from \"./list\";\nimport { UnorderedList } from \"./list\";\n\nexport interface LinkListProps extends Omit<ListProps, \"listStyle\"> {\n children?: React.ReactElement<HTMLLIElement> | React.ReactElement<HTMLLIElement>[];\n}\n\n/**\n * Show a list of links\n *\n * For other list types use `UnorderedList` and `OrderedList`, or use your own list component using the semantic `ul` and `ol` tags.\n */\nexport function LinkList({ className, ...rest }: LinkListProps) {\n return (\n <UnorderedList className={clsx(\"hds-list--link-list\", className as undefined)} {...rest} />\n );\n}\n\nLinkList.displayName = \"LinkList\";\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\">;\n\nexport const Message: OverridableComponent<MessageProps, HTMLDivElement> = forwardRef(\n ({ children, className, variant = \"success\", icon, iconClassName, ...rest }, ref) => {\n return (\n <Box\n className={clsx(`hds-message`, `hds-message--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {variant === \"neutral\" && (\n <div className={clsx(\"hds-message--neutral__icon\", iconClassName as undefined)}>\n {icon}\n </div>\n )}\n {children}\n </Box>\n );\n },\n);\nMessage.displayName = \"Message\";\n\nexport const MessageTitle: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-message__title\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageTitle.displayName = \"Message.Title\";\n\nexport const MessageDescription: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-message__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageDescription.displayName = \"Message.Description\";\n","import { Message, MessageTitle, MessageDescription } from \"./message\";\n\nconst MessageComponent = Message as typeof Message & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\n\nMessageComponent.Title = MessageTitle;\nMessageComponent.Description = MessageDescription;\n\nexport { MessageComponent as Message };\n","import { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Box } from \"../box/box\";\nimport type { OverridableComponent } from \"../utils\";\nimport { useMergeRefs } from \"../utils\";\n\nexport interface ModalProps extends React.HTMLAttributes<HTMLDialogElement> {\n children: React.ReactNode;\n\n /**\n * Controls the open state of the modal\n */\n open?: boolean;\n\n /**\n * Whether to close when clicking on the backdrop.\n */\n closeOnBackdropClick?: boolean;\n}\n\n/**\n * A modal dialog is a window that forces the user to interact with it before they can return to other parts of the application.\n *\n * Uses the native [`dialog`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element.\n *\n * Example\n * ```\n const modalRef = useRef<HTMLDialogElement>(null);\n const onClose = () => modalRef.current?.close();\n\n return (\n <>\n <PrimaryButton onClick={() => modalRef.current?.showModal()}>Open Modal</PrimaryButton>\n <Modal ref={modalRef}>\n <Modal.Header>Dialog header</Modal.Header>\n <Modal.Content>\n <p>\n Dialog header Dialog description - a description of what is about to happen and maybe\n something about the consequences.\n </p>\n </Modal.Content>\n <Modal.Footer style={{ display: \"flex\", gap: 16 }}>\n <PrimaryButton fill=\"outline\" onClick={onClose}>\n Close\n </PrimaryButton>\n </Modal.Footer>\n </Modal>\n </>\n );\n * ```\n */\nexport const Modal = forwardRef<HTMLDialogElement, ModalProps>(\n ({ children, className, open, closeOnBackdropClick, onClick, ...rest }, ref) => {\n const modalRef = useRef<HTMLDialogElement>(null);\n const mergedRef = useMergeRefs([modalRef, ref]);\n\n // The X close button that comes from the `Box` component\n function onCloseButtonClick() {\n modalRef.current?.close();\n return false;\n }\n\n // No scroll when modal is open\n useScrollLock(modalRef, \"hds-modal-scroll-lock\");\n\n // `open` prop\n useEffect(() => {\n if (modalRef.current && open !== undefined) {\n if (open && !modalRef.current.open) {\n modalRef.current.showModal();\n } else if (!open && modalRef.current.open) {\n modalRef.current.close();\n }\n }\n }, [modalRef, open]);\n\n function onDialogClick(e: React.MouseEvent<HTMLElement>) {\n if (closeOnBackdropClick && e.target === modalRef.current) {\n modalRef.current.close();\n }\n onClick?.(e as React.MouseEvent<HTMLDialogElement>);\n }\n\n return (\n <Box\n as=\"dialog\"\n className={clsx(\"hds-modal\", className as undefined)}\n closeable\n onClick={onDialogClick}\n onClose={onCloseButtonClick}\n ref={mergedRef}\n variant=\"white\"\n {\n ...(rest as object) /* TODO remove type casting */\n }\n >\n {children}\n </Box>\n );\n },\n);\nModal.displayName = \"Modal\";\n\nexport const ModalHeader: OverridableComponent<object, HTMLHeadingElement> = forwardRef(\n ({ as: Component = \"h1\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-modal__header\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalHeader.displayName = \"Modal.Header\";\n\nexport const ModalContent: OverridableComponent<object, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-modal__content\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalContent.displayName = \"Modal.Content\";\n\nexport const ModalFooter: OverridableComponent<object, HTMLDivElement> = forwardRef(\n ({ as: Component = \"footer\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-modal__footer\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalFooter.displayName = \"Modal.Footer\";\n\nexport function useScrollLock(modalRef: React.RefObject<HTMLDialogElement>, bodyClass: string) {\n useEffect(() => {\n if (!modalRef.current) return;\n if (modalRef.current.open) document.body.classList.add(bodyClass);\n\n const observer = new MutationObserver(() => {\n if (modalRef.current?.open) document.body.classList.add(bodyClass);\n else document.body.classList.remove(bodyClass);\n });\n observer.observe(modalRef.current, {\n attributes: true,\n attributeFilter: [\"open\"],\n });\n return () => {\n observer.disconnect();\n document.body.classList.remove(bodyClass);\n };\n }, [bodyClass, modalRef]);\n}\n","import type { ComponentPropsWithRef, ElementType, FC, RefAttributes } from \"react\";\nimport * as React from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * OverridableComponent makes the `as` prop available,\n * to be used to override the html element being used for a component\n *\n * Taken from digdir design system: https://github.com/digdir/designsystem/blob/main/packages/react/src/types/OverridableComponent.ts\n */\nexport type OverridableComponent<ComponentProps, Element extends HTMLElement> = {\n (props: ComponentProps & RefAttributes<Element>): ReturnType<FC>;\n\n <As extends ElementType>(\n props: {\n /** Override html element */\n as?: As;\n } & ComponentProps &\n Omit<ComponentPropsWithRef<As>, keyof ComponentProps>,\n ): ReturnType<FC>;\n} & Pick<FC, \"displayName\">;\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","import { Modal, ModalHeader, ModalContent, ModalFooter } from \"./modal\";\n\nconst ModalComponent = Modal as typeof Modal & {\n Header: typeof ModalHeader;\n Content: typeof ModalContent;\n Footer: typeof ModalFooter;\n};\nModalComponent.Header = ModalHeader;\nModalComponent.Content = ModalContent;\nModalComponent.Footer = ModalFooter;\n\nexport { ModalComponent as Modal };\nexport type * from \"./modal\";\n","import React, { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface NavbarProps extends HTMLAttributes<HTMLElement> {\n /**\n * Navbar variant\n *\n * By default the `posten.no` variant is used which has a fixed logo and a fixed height of 112px\n *\n * For internal services or flagship services use the `service` should be used\n */\n variant?: \"default\" | \"service\";\n children: React.ReactNode;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Navbar = forwardRef<HTMLElement, NavbarProps>(\n ({ children, className, variant, ...rest }, ref) => {\n return (\n <header\n className={clsx(\"hds-navbar\", variant && `hds-navbar--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </header>\n );\n },\n);\nNavbar.displayName = \"Navbar\";\n\ninterface NavbarLogoProps {\n children?: never;\n}\n\n/**\n * A fixed Posten or Bring logo.\n *\n * The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo\n */\nexport const NavbarLogo: OverridableComponent<NavbarLogoProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component className={clsx(\"hds-navbar__logo\", className as undefined)} ref={ref} {...rest} />\n );\n },\n);\nNavbarLogo.displayName = \"Navbar.Logo\";\n\ninterface NavbarLogoAndServiceText extends HTMLAttributes<HTMLDivElement> {\n /**\n * The text display next to the logo\n */\n children: React.ReactNode;\n\n /**\n * The text variant\n *\n * Use `service` for internal applications\n * Use `flagship` for public facing applications\n */\n variant: \"service\" | \"flagship\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n/**\n * Internal service or flagship text next to either the Posten or Bring logo\n *\n * The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo\n */\nexport const NavbarLogoAndServiceText = forwardRef<HTMLDivElement, NavbarLogoAndServiceText>(\n ({ children, asChild, variant, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-navbar__logo-and-service-text\",\n `hds-navbar__logo-and-service-text--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nNavbarLogoAndServiceText.displayName = \"Navbar.NavbarLogoAndText\";\n\n// Navbar button\ninterface NavbarButtonProps {\n icon?: React.ReactNode;\n children: React.ReactNode;\n}\nexport const NavbarButton: OverridableComponent<NavbarButtonProps, HTMLElement> = forwardRef(\n ({ as: Component = \"button\", children, icon, className, ...rest }, ref) => {\n return (\n <Component className={clsx(\"hds-navbar__button\", className as undefined)} ref={ref} {...rest}>\n {children} {icon}\n </Component>\n );\n },\n);\nNavbarButton.displayName = \"Navbar.Button\";\n\ninterface NavbarNavigationProps {\n children: React.ReactNode;\n}\nexport const NavbarNavigation: OverridableComponent<NavbarNavigationProps, HTMLElement> =\n forwardRef(({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-navbar__navigation\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n });\nNavbarNavigation.displayName = \"Navbar.Navigation\";\n","import React, { createContext, useContext, forwardRef, useState, useRef, useEffect } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport type { ClassValue } from \"@postenbring/hedwig-css/typed-classname/index.mjs\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport FocusTrap from \"focus-trap-react\";\nimport type { OverridableComponent } from \"../utils\";\nimport { CloseIcon, MenuIcon } from \"./icons\";\n\nconst navbarContext = createContext([\n false as boolean,\n () => {\n // Empty\n },\n] as const);\n\n/**\n * Root\n */\nexport interface NavbarExpandableMenuProps {\n children: React.ReactNode;\n}\nexport function NavbarExpandableMenu({ children }: NavbarExpandableMenuProps) {\n const [open, setOpen] = useState(false);\n const toggleOpen = () => {\n const nextOpenState = !open;\n setOpen(nextOpenState);\n if (nextOpenState) {\n window.scrollTo(0, 0);\n document.body.classList.add(clsx(\"hds-navbar-scroll-lock\"));\n } else {\n document.body.classList.remove(clsx(\"hds-navbar-scroll-lock\"));\n }\n };\n const navbarElement = document.getElementsByClassName(clsx(\"hds-navbar\"))[0];\n return (\n <navbarContext.Provider value={[open, toggleOpen]}>\n {open ? <FocusTrap containerElements={[navbarElement as HTMLElement]} /> : null}\n {children}\n </navbarContext.Provider>\n );\n}\nNavbarExpandableMenu.displayName = \"NavbarExpandableMenu\";\n\ninterface ButtonInterface {\n className?: ClassValue;\n open?: boolean;\n innerRef?: React.RefObject<HTMLButtonElement>;\n ref?: React.ForwardedRef<HTMLButtonElement>;\n text: React.ReactNode;\n title?: string;\n toggleOpen?: () => void;\n width?: number;\n}\n\nfunction RenderButton({\n className,\n innerRef,\n open = false,\n ref,\n text,\n title,\n toggleOpen,\n width,\n ...rest\n}: ButtonInterface) {\n const icon = open ? <CloseIcon /> : <MenuIcon />;\n const style = width ? { width } : {};\n return (\n <button\n className={clsx(\"hds-navbar__button\", className)}\n onClick={toggleOpen}\n ref={ref ?? innerRef}\n style={style}\n title={title}\n type=\"button\"\n {...rest}\n >\n {text} {icon}\n </button>\n );\n}\n\n/**\n * Trigger\n *\n * ## TODO\n * - [ ] Hide text when on mobile\n * - [X] Open / Close icon\n * - [X] Make button have consistant width\n */\n\nexport interface NavbarExpandableMenuTriggerProps\n extends Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\"> {\n whenClosedText: React.ReactNode;\n whenClosedHelperTitle?: string;\n\n whenOpenText: React.ReactNode;\n whenOpenHelperTitle?: string;\n}\nexport const NavbarExpandableMenuTrigger = forwardRef<\n HTMLButtonElement,\n NavbarExpandableMenuTriggerProps\n>(\n (\n {\n whenClosedText,\n whenClosedHelperTitle,\n\n whenOpenText,\n whenOpenHelperTitle,\n\n className,\n ...rest\n },\n ref,\n ) => {\n const [open, toggleOpen] = useContext(navbarContext);\n const [width, setWidth] = useState(0);\n const measureButtonRef = useRef<HTMLButtonElement>(null);\n\n const text: React.ReactNode = open ? whenOpenText : whenClosedText;\n const title = open ? whenOpenHelperTitle : whenClosedHelperTitle;\n\n /**\n *\n * @param element - Button to measure\n * @param callback - report the width back\n */\n const measureButton = (element: React.ReactNode, callback: (width: number) => void) => {\n // Create an empty div to render the Button in\n const container = document.createElement(\"div\");\n container.style.cssText = \"display: inline-block; position: absolute; visibility: hidden\";\n\n // Attach the empty div inside the navigation section\n const c = document.getElementsByClassName(\"hds-navbar__navigation\")[0];\n c.appendChild(container);\n\n // Render the Button here\n const root = createRoot(container as HTMLElement);\n root.render(element);\n\n /**\n * Get the offsetWidth now that it is rendered\n * Also clean up after us\n */\n const getWidth = () => {\n callback(measureButtonRef.current?.offsetWidth ?? 0);\n root.unmount();\n c.removeChild(container);\n };\n // This is instead of the callback that used to be on ReactDOM.render()\n setTimeout(getWidth, 0);\n };\n\n useEffect(() => {\n measureButton(\n <RenderButton\n className={(className ? className : \"\") as ClassValue}\n innerRef={measureButtonRef}\n text={whenClosedText}\n title={title}\n {...rest}\n />,\n (closedWidth: number) => {\n measureButton(\n <RenderButton\n className={(className ? className : \"\") as ClassValue}\n innerRef={measureButtonRef}\n open\n text={whenOpenText}\n title={title}\n {...rest}\n />,\n (openWidth: number) => {\n setWidth(Math.max(openWidth, closedWidth));\n },\n );\n },\n );\n }, [className, rest, title, whenClosedText, whenOpenText]);\n\n return (\n <RenderButton\n className={(className ? className : \"\") as ClassValue}\n open={open}\n ref={ref}\n text={text as string}\n title={title}\n toggleOpen={toggleOpen}\n width={width}\n {...rest}\n />\n );\n },\n);\nNavbarExpandableMenuTrigger.displayName = \"Navbar.ExpandableMenu.Trigger\";\n\n/**\n * Content\n */\nexport interface NavbarExpandableMenuContentProps {\n children: React.ReactNode;\n className?: string;\n}\nexport const NavbarExpandableMenuContent: OverridableComponent<\n NavbarExpandableMenuContentProps,\n HTMLDivElement\n> = forwardRef(({ as: Component = \"section\", children, className, ...rest }, ref) => {\n const [open] = useContext(navbarContext);\n return (\n <Component\n {...rest}\n className={clsx(\"hds-navbar__expandable-menu-content\", className as undefined)}\n data-state={open ? \"open\" : \"closed\"}\n ref={ref}\n >\n <div className={clsx(\"hds-navbar__expandable-menu-content-inner\")}>{children}</div>\n </Component>\n );\n});\nNavbarExpandableMenuContent.displayName = \"Navbar.ExpandableMenu.Content\";\n","function CloseIcon() {\n return (\n <svg aria-hidden viewBox=\"0 0 384 512\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nfunction MenuIcon() {\n return (\n <svg role=\"img\" viewBox=\"0 0 448 512\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M0 88C0 74.7 10.7 64 24 64H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H24C10.7 112 0 101.3 0 88zM0 248c0-13.3 10.7-24 24-24H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24zM448 408c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H424c13.3 0 24 10.7 24 24z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport { CloseIcon, MenuIcon };\n","import {\n Navbar,\n NavbarLogo,\n NavbarButton,\n NavbarNavigation,\n NavbarLogoAndServiceText,\n} from \"./navbar\";\nimport {\n NavbarExpandableMenu,\n NavbarExpandableMenuTrigger,\n NavbarExpandableMenuContent,\n} from \"./navbar-expandable-menu\";\n\nconst NavbarExpandableMenuComponent = NavbarExpandableMenu as typeof NavbarExpandableMenu & {\n Trigger: typeof NavbarExpandableMenuTrigger;\n Content: typeof NavbarExpandableMenuContent;\n};\nNavbarExpandableMenuComponent.Trigger = NavbarExpandableMenuTrigger;\nNavbarExpandableMenuComponent.Content = NavbarExpandableMenuContent;\n\nconst NavbarComponent = Navbar as typeof Navbar & {\n Logo: typeof NavbarLogo;\n LogoAndServiceText: typeof NavbarLogoAndServiceText;\n ExpandableMenu: typeof NavbarExpandableMenuComponent;\n Button: typeof NavbarButton;\n Navigation: typeof NavbarNavigation;\n};\nNavbarComponent.Logo = NavbarLogo;\nNavbarComponent.LogoAndServiceText = NavbarLogoAndServiceText;\nNavbarComponent.ExpandableMenu = NavbarExpandableMenuComponent;\nNavbarComponent.Button = NavbarButton;\nNavbarComponent.Navigation = NavbarNavigation;\n\nexport { NavbarComponent as Navbar };\nexport type * from \"./navbar\";\n","import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport type { OverridableComponent } from \"../utils\";\n\nconst animationDurationToValue = {\n quick: 100,\n normal: 300,\n slow: 700,\n};\n\nexport interface AutoAnimateHeightProps {\n /**\n * Time of the animation, using the hedwig animation tokens\n * quick: 0.1s\n * normal: 0.3s\n * slow: 0.7s\n *\n * default is \"quick\"\n */\n animationDuration?: \"quick\" | \"normal\" | \"slow\";\n\n /**\n * Which hedwig easing function to use, default is \"normal\"\n */\n animationEasing?: \"in\" | \"out\" | \"normal\";\n children: React.ReactNode;\n style?: React.CSSProperties;\n}\n\n/**\n * Helper component to animate the height of the children when they change\n * It's done by rendering two versions of the passed children,\n * one hidden to measure the height and one visible to only changes after the height is measured.\n *\n * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.\n */\nexport const AutoAnimateHeight: OverridableComponent<AutoAnimateHeightProps, HTMLDivElement> =\n forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n ...rest\n },\n ref,\n ) => {\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<number | undefined>(undefined);\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n useEffect(() => {\n if (measurementRef.current) {\n const { height: newHeight } = measurementRef.current.getBoundingClientRect();\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n if (newHeight < (height ?? 0)) {\n // If the children are shrinking, hold off on replacing until the animation is done\n // This way we don't get a sudden flash of empty content\n setTimeout(() => {\n flushSync(() => {\n setHeight(newHeight);\n });\n timeoutRef.current = setTimeout(() => {\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }, animationDurationToValue[animationDuration]);\n });\n } else {\n setHeight(newHeight);\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <Component\n ref={ref}\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n height,\n transitionProperty: \"height\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </Component>\n );\n },\n );\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\n\ntype Variant =\n | {\n variant?: \"show-more\";\n expanded?: never;\n }\n | {\n variant: \"show-more-show-less\";\n expanded: boolean;\n };\n\nexport type ShowMoreProps = React.HTMLAttributes<HTMLButtonElement> & {\n text: React.ReactNode;\n} & Variant;\n\n/**\n * Simple button for triggering more content.\n *\n * You have to add the logic for what happens when the button is clicked yourself.\n *\n * **Example**\n *\n * ```tsx\n * function Content() {\n * const [items, fetchMoreItems, moreItemsAvailable] = useYourData();\n * function onShowMoreItems() {\n * fetchMoreItems();\n * }\n * return (\n * <>\n * <ul>\n * {items.map((item) => (\n * <li key={item.id}>{item.text}</li>\n * ))}\n * </ul>\n * {moreItemsAvailable ?\n * <ShowMoreButton className=\"mt-8\" onClick={onShowMoreItems} lang=\"en\" /> :\n * null\n * }\n * </>\n * )\n * }\n * ```\n */\nexport const ShowMoreButton = forwardRef<HTMLButtonElement, ShowMoreProps>(\n ({ text, variant, expanded, className, ...rest }, ref) => {\n return (\n <button\n ref={ref}\n className={clsx(\n \"hds-show-more\",\n variant === \"show-more-show-less\" && \"hds-show-more--show-less\",\n className as undefined,\n )}\n data-state={expanded ? \"expanded\" : undefined}\n type=\"button\"\n {...rest}\n >\n {text}\n <span className={clsx(\"hds-show-more__icon\")} />\n </button>\n );\n },\n);\nShowMoreButton.displayName = \"ShowMoreButton\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface DimensionsFromWidthAndHeight {\n height?: number | string;\n width?: number | string;\n}\n\ninterface SkeletonPropsInner extends React.AnchorHTMLAttributes<HTMLDivElement> {\n /**\n * The visual style of the Skeleton\n */\n variant?: \"text\" | \"circle\" | \"rectangle\" | \"rounded\";\n\n /**\n * Whether to show animation or not\n * In the future the animation effect might become configurable\n *\n * default true\n */\n animation?: boolean;\n\n children?: React.ReactNode;\n}\n\nexport type SkeletonProps = SkeletonPropsInner & DimensionsFromWidthAndHeight;\n\n/**\n * Make skeleton loading states as placeholders for your content while waiting for data to load.\n *\n * **Note**\n *\n * Consider if this is really needed. The best experience is to avoid loading states altogether.\n * If your loading takes under 1 second, it better to not show anything at all.\n *\n * - Make your backend faster\n * - Preload/prefetch data\n * - Avoid data loading waterfalls\n * - Use optimistic ui when doing mutations\n *\n * **Usage**\n *\n * ```tsx\n * <Skeleton variant=\"circle\" width=\"2rem\" height=\"2rem\" />\n * <Skeleton variant=\"text\" />\n * <Skeleton variant=\"text\" width=\"80%\" />\n * <Skeleton variant=\"text\">Uses content to determine width</Skeleton>\n * <Skeleton variant=\"rectangle\" width=\"300px\" height=\"400px\" />\n * ```\n *\n * Remember to set `aria-hidden` on top level components you use that are not the `Skeleton` component.\n *\n * The `Skeleton` component does this for it self, but if you are using other components higher up in the tree, it might cause problems with screen readers\n *\n * **References**\n * - https://aksel.nav.no/komponenter/core/skeleton\n * - https://chakra-ui.com/docs/components/skeleton\n * - https://mui.com/material-ui/react-skeleton/\n */\nexport const Skeleton: OverridableComponent<SkeletonProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n animation,\n variant = \"text\",\n width,\n height,\n className,\n style,\n ...rest\n },\n ref,\n ) => {\n return (\n <Component\n className={clsx(\n \"hds-skeleton\",\n `hds-skeleton--${variant}`,\n !animation && `hds-skeleton--no-animation`,\n className as undefined,\n )}\n style={{ ...style, width, height }}\n ref={ref}\n aria-hidden\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nSkeleton.displayName = \"Skeleton\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\n\ntype TitleProps =\n | {\n /**\n * Optional title of the active step to be shown underneath the step indicator\n *\n * Use `titleAs` to set the correct heading level\n */\n title: React.ReactNode;\n titleAs: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n }\n | {\n title?: undefined;\n titleAs?: undefined;\n };\n\ninterface StepIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {\n /*\n * 1-indexed number of the active step\n */\n activeStep: number;\n\n /**\n * 1-indexed number of steps\n */\n totalSteps: number;\n\n /**\n * Label on the left side above the steps\n */\n label: React.ReactNode;\n\n /**\n * Language for the \"step x of y\" label, default is \"en\"\n */\n lang?: \"no\" | \"en\" | \"da\" | \"sv\";\n}\n\n/**\n * Indicate a step in a process.\n *\n * It does not handle step content or navigation, only the visual indication of the active step.\n */\nexport const StepIndicator = forwardRef<HTMLDivElement, StepIndicatorProps & TitleProps>(\n (\n {\n activeStep,\n totalSteps,\n className,\n label,\n lang = \"en\",\n title,\n titleAs: TitleComponent,\n ...rest\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={clsx(\"hds-step-indicator\", className as undefined)}\n lang={lang}\n {...rest}\n >\n <div className={clsx(\"hds-step-indicator__header\")}>\n <span className={clsx(\"hds-step-indicator__left-label\")}>{label}</span>\n <span>{stepLabelTranslations[lang](activeStep, totalSteps)}</span>\n </div>\n\n <div className={clsx(\"hds-step-indicator__steps\")}>\n {Array.from({ length: totalSteps }, (_, i) => (\n <div\n className={clsx(\"hds-step-indicator__step\")}\n data-state={getStepState(i + 1, activeStep)}\n key={i}\n />\n ))}\n </div>\n\n {title ? (\n <TitleComponent className={clsx(\"hds-step-indicator__title\")}>{title}</TitleComponent>\n ) : null}\n </div>\n );\n },\n);\nStepIndicator.displayName = \"StepIndicator\";\n\n/**\n * Translated texts for the `step x of y` label.\n */\nconst stepLabelTranslations: Record<\n \"no\" | \"en\" | \"da\" | \"sv\",\n (activeStep: number, totalSteps: number) => string\n> = {\n no: (activeStep: number, totalSteps: number) => `steg ${activeStep} av ${totalSteps}`,\n en: (activeStep: number, totalSteps: number) => `step ${activeStep} of ${totalSteps}`,\n da: (activeStep: number, totalSteps: number) => `trin ${activeStep} af ${totalSteps}`,\n sv: (activeStep: number, totalSteps: number) => `steg ${activeStep} av ${totalSteps}`,\n};\n\n/**\n * Determine the state of a step.\n * 1-indexed\n */\nfunction getStepState(renderedStep: number, activeStep: number) {\n if (renderedStep < activeStep) {\n return \"previous\";\n }\n if (renderedStep === activeStep) {\n return \"active\";\n }\n return \"next\";\n}\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface StyledHtmlProps {\n children?: React.ReactNode;\n size?: \"default\" | \"small\";\n darkmode?: boolean;\n}\n\n/**\n * A component for displaying dynamic content that you want to apply hedwig styling to.\n * the styling depends on the semantic html elements you use inside the component.\n *\n * Useful when you have dynamic content that you want styled with hedwig, like content from a CMS.\n *\n * Previously known as `hw-wysiwyg` in hedwig legacy. In tailwind this kind of component it is known as `prose`.\n *\n * ```tsx\n * <StyledHtml>\n * <h1>Heading 1</h1>\n * <h2>Heading 2</h2>\n * <a href=\"https://www.postenbring.no\">Postenbring</a>\n * <ul>\n * <li>Hei</li>\n * <li>Hallo</li>\n * <li>Hello</li>\n * </ul>\n * </StyledHtml>\n * ```\n */\nexport const StyledHtml: OverridableComponent<StyledHtmlProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", children, size, darkmode = false, className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\n `hds-styled-html`,\n size === \"small\" && \"hds-styled-html--small\",\n darkmode && \"hds-styled-html--darkmode\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStyledHtml.displayName = \"StyledHtml\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { TabsContext } from \"./context\";\nimport type { TabContentsProps } from \"./tabs-content\";\nimport type { TabListProps } from \"./tabs-list\";\n\nexport interface TabsProps extends HTMLAttributes<HTMLElement> {\n children: ReactElement<TabListProps | TabContentsProps>[] | ReactElement;\n\n /**\n * Define which tab to use as default. Must be one of the <Tab/>s identifier.\n */\n defaultTab: string;\n}\n\nexport const Tabs: OverridableComponent<TabsProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", defaultTab, children, ...rest }, ref) => {\n const [activeTabId, setActiveTabId] = useState<string>(defaultTab);\n return (\n <Component className={clsx(\"hds-tabs\")} ref={ref} {...rest}>\n <TabsContext.Provider\n value={{ activeTabId, toggleActiveTabId: setActiveTabId, mounted: true }}\n >\n {children}\n </TabsContext.Provider>\n </Component>\n );\n },\n);\n\nTabs.displayName = \"Tabs\";\n","import { createContext } from \"react\";\n\nexport interface TabsContextProps {\n mounted: boolean;\n activeTabId?: string;\n toggleActiveTabId: (tabId: string) => void;\n}\n\nexport const TabsContext = createContext<TabsContextProps>({\n mounted: false,\n activeTabId: undefined,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Added default section, without handling\n toggleActiveTabId: (tabId: string) => {\n // default\n },\n});\n","import type { HTMLAttributes, ReactElement, MouseEvent } from \"react\";\nimport { forwardRef, useContext, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { type OverridableComponent, useResize } from \"../utils\";\nimport { TabsContext } from \"./context\";\n\nexport interface TabListProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabProps> | ReactElement<TabProps>[];\n\n /**\n * Direction of the tabs. Can either be vertical or horizontal.\n * Horizontal breaks on window width with fallback back to vertical\n */\n direction?: \"vertical\" | \"horizontal\";\n}\n\nexport function TabsList({ children, direction = \"horizontal\", className, ...rest }: TabListProps) {\n const tabsListRef = useRef<HTMLDivElement>(null);\n const { width: tabsWidth } = useResize(tabsListRef);\n const { innerWidth } = window;\n const wideEnough = innerWidth >= tabsWidth;\n return (\n <div\n className={clsx(\n \"hds-tabs--list\",\n direction === \"horizontal\"\n ? {\n [`hds-tabs--list-horizontal`]: wideEnough,\n \"hds-tabs--list-vertical\": !wideEnough,\n }\n : {\n \"hds-tabs--list-vertical\": true,\n },\n className as undefined,\n )}\n ref={tabsListRef}\n role=\"tablist\"\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nTabsList.displayName = \"Tabs.List\";\n\nexport interface TabProps extends HTMLAttributes<HTMLButtonElement> {\n children: ReactElement<HTMLElement> | string;\n\n /**\n * Identifier for the tab\n */\n tabId: string;\n}\n\nexport const Tab: OverridableComponent<TabProps, HTMLButtonElement> = forwardRef(\n ({ as: Component = \"button\", children, tabId, className, onClick, ...rest }, ref) => {\n const context = useContext(TabsContext);\n if (!context.mounted) {\n throw new Error(\"Context required. Did you use <TabContent/> outside of <Tabs/>?\");\n }\n const toggleTab = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n context.toggleActiveTabId(tabId);\n onClick && onClick(e);\n };\n return (\n <Component\n className={clsx(\n \"hds-tabs--tab\",\n { \"hds-tabs--tab-active\": context.activeTabId === tabId },\n className as undefined,\n )}\n data-tabid={tabId}\n onClick={toggleTab}\n ref={ref}\n role=\"tab\"\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\n\nTab.displayName = \"Tabs.Tab\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { TabsContext } from \"./context\";\n\nexport interface TabContentsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsContentProps> | ReactElement<TabsContentProps>[];\n}\n\nexport function TabsContents({ children, ...rest }: TabContentsProps) {\n return (\n <div className={clsx(\"hds-tabs--contents\")} {...rest}>\n {children}\n </div>\n );\n}\nTabsContents.displayName = \"Tabs.Contents\";\n\nexport interface TabsContentProps extends HTMLAttributes<HTMLElement> {\n children: ReactElement<HTMLElement> | ReactElement<HTMLElement>[] | string;\n\n /**\n * Content for the referenced tabId\n */\n forTabId: string;\n}\n\nexport const TabsContent: OverridableComponent<TabsContentProps, HTMLElement> = forwardRef(\n ({ as: Component = \"div\", forTabId, children, ...rest }, ref) => {\n const context = useContext(TabsContext);\n if (!context.mounted) {\n throw new Error(\"Context required. Did you use <Tabs.Content /> outside of <Tabs/>?\");\n }\n if (context.activeTabId === forTabId) {\n return (\n <Component {...rest} ref={ref}>\n {children}\n </Component>\n );\n }\n return null;\n },\n);\n\nTabsContent.displayName = \"Tabs.Content\";\n","import { Tabs } from \"./tabs\";\nimport { TabsList, Tab } from \"./tabs-list\";\nimport { TabsContents, TabsContent } from \"./tabs-content\";\n\nconst TabsComponent = Tabs as typeof Tabs & {\n List: typeof TabsList;\n Tab: typeof Tab;\n Contents: typeof TabsContents;\n Content: typeof TabsContent;\n};\nTabsComponent.List = TabsList;\nTabsComponent.Tab = Tab;\nTabsComponent.Contents = TabsContents;\nTabsComponent.Content = TabsContent;\n\nexport { TabsComponent as Tabs };\n\nexport type * from \"./tabs\";\nexport type * from \"./tabs-list\";\nexport type * from \"./tabs-content\";\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface HeadingProps {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n as: React.ElementType;\n}\ninterface ParagraphProps {\n variant?:\n | \"body\"\n | \"body-title\"\n | \"body-small\"\n | \"body-small-title\"\n | \"technical\"\n | \"technical-title\"\n | \"caption\"\n | \"caption-title\";\n}\n\nexport type TextProps = (HeadingProps | ParagraphProps) & {\n children: React.ReactNode;\n\n /**\n * The font-size of the component. By default it's `fluid` which means it's smaller on mobile and larger on desktop.\n *\n * But you can lock it to either the min or the max size.\n */\n size?: \"min\" | \"max\" | \"fluid\";\n\n /**\n * 🚧 Experimental spacing\n */\n _unstableSpacing?: boolean;\n};\n\nconst defaultHTMLTag: Record<NonNullable<TextProps[\"variant\"]>, `h${1 | 2 | 3}` | \"p\"> = {\n \"h1-display\": \"h1\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n \"h3-title\": \"h3\",\n body: \"p\",\n \"body-title\": \"p\",\n \"body-small\": \"p\",\n \"body-small-title\": \"p\",\n technical: \"p\",\n \"technical-title\": \"p\",\n caption: \"p\",\n \"caption-title\": \"p\",\n};\n\n/**\n * Text component\n *\n * If the variant is `h1-display`, `h1`, `h2`, `h3`, or `h3-title` the `as` prop is required.\n *\n * This to force the consumer to consider which semantic html element to use. E.g. `<h1>` or `<h2>`\n *\n * @example\n * ```tsx\n * <Text variant=\"h1-display\" as=\"h1\">Hello world</Text>\n * <Text variant=\"body\">\n * This is a body text\n * </Text>\n * ```\n */\nexport const Text: OverridableComponent<TextProps, HTMLDivElement> = forwardRef(\n (\n {\n as,\n variant = \"body\",\n size = \"fluid\",\n _unstableSpacing: spacing,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = as ?? defaultHTMLTag[variant];\n const sizeModifier =\n size !== \"fluid\" && variant !== \"caption\" && variant !== \"caption-title\" && size;\n return (\n <Component\n className={clsx(\n `hds-text-${variant}`,\n sizeModifier && `hds-text--${sizeModifier}`,\n spacing && \"hds-text--spacing\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nText.displayName = \"Text\";\n","import type { TextProps } from \"./text\";\nimport { Text } from \"./text\";\n\nexport { Text };\nexport type * from \"./text\";\n\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH1Display = textVariant(\"h1-display\", \"TextH1Display\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH1 = textVariant(\"h1\", \"TextH1\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH2 = textVariant(\"h2\", \"TextH2\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH3 = textVariant(\"h3\", \"TextH3\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextH3Title = textVariant(\"h3-title\", \"TextH3Title\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBody = textVariant(\"body\", \"TextBody\"); // Less weird\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBodyTitle = textVariant(\"body-title\", \"TextBodyTitle\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBodySmall = textVariant(\"body-small\", \"TextBodySmall\");\n/**\n * # 🚨 Unstable alternative\n *\n * named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextBodySmallTitle = textVariant(\"body-small-title\", \"TextBodySmallTitle\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextTechnical = textVariant(\"technical\", \"TextTechnical\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextTechnicalTitle = textVariant(\"technical-title\", \"TextTechnicalTitle\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextCaption = textVariant(\"caption\", \"TextCaption\");\n/**\n * 🚨 Unstable alterentative: Named as the different typography levels with Text prefix\n *\n * ## Alias to @see Text\n */\nexport const TextCaptionTitle = textVariant(\"caption-title\", \"TextCaptionTitle\");\n\nconst variantToHtmlTag = {\n \"h1-display\": \"h1\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n \"h3-title\": \"h3\",\n body: \"p\",\n \"body-title\": \"p\",\n \"body-small\": \"p\",\n \"body-small-title\": \"p\",\n technical: \"p\",\n \"technical-title\": \"p\",\n caption: \"p\",\n \"caption-title\": \"p\",\n} as const;\n\nfunction textVariant(\n variant: TextProps[\"variant\"],\n displayName: string,\n): React.FunctionComponent<Omit<TextProps, \"variant\">> {\n function WrappedText(props: Omit<TextProps, \"variant\">) {\n return <Text variant={variant} as={variantToHtmlTag[variant ?? \"body\"]} {...props} />;\n }\n WrappedText.displayName = displayName;\n\n return WrappedText;\n}\n","import type { ReactNode } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { Box } from \"../box\";\n\nexport interface WarningBannerProps {\n title: ReactNode;\n description?: ReactNode;\n}\n\nexport const WarningBanner: OverridableComponent<WarningBannerProps, HTMLDivElement> = forwardRef(\n ({ title, description, className, ...rest }, ref) => {\n const expandable = !!description;\n return (\n <Box {...rest} className={clsx(\"hds-warning-banner\", className as undefined)} ref={ref}>\n <WarningBannerTitle variant={expandable ? \"expandable\" : \"default\"}>\n {title}\n </WarningBannerTitle>\n {expandable ? <WarningBannerDescription>{description}</WarningBannerDescription> : null}\n </Box>\n );\n },\n);\nWarningBanner.displayName = \"WarningBanner\";\n\ninterface WarningBannerTitleProps {\n variant: \"expandable\" | \"default\";\n children: ReactNode;\n}\n\nconst WarningBannerTitle: OverridableComponent<WarningBannerTitleProps, HTMLDivElement> =\n forwardRef(\n (\n {\n variant,\n as: Component = variant === \"expandable\" ? \"button\" : \"p\",\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [open, setOpen] = useState<boolean>(false);\n if (variant === \"expandable\") {\n return (\n <Component\n className={clsx(\n \"hds-warning-banner__title\",\n \"hds-warning-banner__title-trigger\",\n { \"hds-warning-banner--closed\": !open },\n className as undefined,\n )}\n onClick={() => {\n setOpen(!open);\n }}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <span>{children}</span>\n </Component>\n );\n }\n return (\n <Component\n className={clsx(\"hds-warning-banner__title\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n );\nWarningBannerTitle.displayName = \"WarningBannerTitle\";\n\nconst WarningBannerDescription: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-warning-banner__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nWarningBannerDescription.displayName = \"WarningBannerDescription\";\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,mBAA2B;AAC3B,6BAAqB;AAqBf;AAHC,IAAM,gBAAkE;AAAA,EAC7E,CAAC,IAAwE,QAAQ;AAAhF,iBAAE,MAAI,YAAY,OAAO,UAAU,WAAW,SAAS,KArB1D,IAqBG,IAAgE,iBAAhE,IAAgE,CAA9D,MAAuB,YAAU,aAAW;AAC7C,WACE;AAAA,MAAC;AAAA,uCACK,OADL;AAAA,QAEC,eAAW;AAAA,UACT;AAAA,UACA,CAAC,UAAU;AAAA,UACX;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,UAAU,cAAc;;;ACrCxB,IAAAA,gBAAqC;AACrC,IAAAC,0BAAqB;;;ACFrB,IAAAC,gBAA8B;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,WAAW;AAAA,MACtD;AAAA,MACA;AAAA,IAtCR,IAkCM,IAKK,iBALL,IAKK;AAAA,MAJH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,CAAC,MAAM,OAAO,QAAI,yBAAkB,KAAK;AAC/C,QAAI,YAAY,cAAc;AAC5B,aACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA,EAAE,8BAA8B,CAAC,KAAK;AAAA,YACtC;AAAA,UACF;AAAA,UACA,SAAS,MAAM;AACb,oBAAQ,CAAC,IAAI;AAAA,UACf;AAAA,UACA;AAAA,UACA,MAAK;AAAA,WACD,OAZL;AAAA,UAcC,wDAAC,UAAM,UAAS;AAAA;AAAA,MAClB;AAAA,IAEJ;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,+BAAK,6BAA6B,SAAsB;AAAA,QACnE;AAAA,SACI,OAHL;AAAA,QAKE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACF,mBAAmB,cAAc;AAEjC,IAAM,+BAA+E;AAAA,EACnF,CAAC,IAA6C,QAAQ;AAArD,iBAAE,MAAI,YAAY,KAAK,UA9E1B,IA8EG,IAAqC,iBAArC,IAAqC,CAAnC,MAAqB;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,+BAAK,mCAAmC,SAAsB;AAAA,QACzE;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,yBAAyB,cAAc;","names":["import_react","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_typed_classname","import_jsx_runtime","import_jsx_runtime","Fieldset","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","InputGroup","import_jsx_runtime","Input","import_react","import_typed_classname","import_jsx_runtime","Select","import_react","import_typed_classname","import_jsx_runtime","Textarea","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_jsx_runtime","React","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","React","import_react","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","FocusTrap","_a","_b","import_react","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime"]}