@postenbring/hedwig-react 2.1.1 → 2.1.3

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.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/accordion/accordion.tsx","../src/accordion/accordion-item.tsx","../src/accordion/context.ts","../src/accordion/accordion-header.tsx","../src/accordion/accordion-content.tsx","../src/badge/badge.tsx","../src/blockquote/blockquote.tsx","../src/box/box.tsx","../src/breadcrumbs/breadcrumbs.tsx","../src/button/button.tsx","../src/button-list/button-list.tsx","../src/card/card.tsx","../src/description-list/description-list.tsx","../src/figure/figure.tsx","../src/form/checkbox/checkbox.tsx","../src/form/error-message/error-message.tsx","../src/form/fieldset/fieldset.tsx","../src/form/date-picker/date-picker.tsx","../src/form/input-group/input-group.tsx","../src/utils/utils.ts","../src/form/error-summary/error-summary.tsx","../src/message/message.tsx","../src/list/list.tsx","../src/list/link-list.tsx","../src/link/link.tsx","../src/utils/auto-animate-height.tsx","../src/form/error-summary/focus.ts","../src/form/input/input.tsx","../src/form/radio-button/radio-button.tsx","../src/form/radio-button/radio-group.tsx","../src/form/select/select.tsx","../src/form/textarea/textarea.tsx","../src/footer/footer.tsx","../src/help-text/help-text.tsx","../src/layout/container/container.tsx","../src/layout/grid/grid.tsx","../src/layout/responsive.ts","../src/layout/spacing.ts","../src/layout/stack/stack.tsx","../src/modal/modal.tsx","../src/navbar/navbar.tsx","../src/navbar/navbar-expandable-menu.tsx","../src/navbar/icons.tsx","../src/show-more/show-more.tsx","../src/skeleton/skeleton.tsx","../src/spinner/spinner.tsx","../src/step-indicator/step-indicator.tsx","../src/styled-html/styled-html.tsx","../src/table/table.tsx","../src/tabs/tabs.tsx","../src/tabs/context.ts","../src/tabs/tabs-content.tsx","../src/tabs/tabs-list.tsx","../src/text/text.tsx","../src/warning-banner/warning-banner.tsx"],"sourcesContent":["export * from \"./accordion\";\nexport * from \"./badge\";\nexport * from \"./blockquote\";\nexport * from \"./box\";\nexport * from \"./breadcrumbs\";\nexport * from \"./button\";\nexport * from \"./button-list\";\nexport * from \"./card\";\nexport * from \"./description-list\";\nexport * from \"./figure\";\nexport * from \"./form\";\nexport * from \"./footer\";\nexport * from \"./help-text\";\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 \"./spinner\";\nexport * from \"./step-indicator\";\nexport * from \"./styled-html\";\nexport * from \"./table\";\nexport * from \"./tabs\";\nexport * from \"./text\";\nexport * from \"./utils\";\nexport * from \"./warning-banner\";\n","import type { ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { AccordionItem, type AccordionItemProps } from \"./accordion-item\";\nimport { AccordionHeader } from \"./accordion-header\";\nimport { AccordionContent } from \"./accordion-content\";\n\nexport interface AccordionProps extends React.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\n/**\n * Displays collapsible content sections\n *\n * @example\n * ```tsx\n * <Accordion>\n * <Accordion.Item defaultOpen>\n * <Accordion.Header>Item one</Accordion.Header>\n * <Accordion.Content>\n * Some content\n * </Accordion.Content>\n * </Accordion.Item>\n * <Accordion.Item>\n * <Accordion.Header>Item two</Accordion.Header>\n * <Accordion.Content>\n * Some more content\n * </Accordion.Content>\n * </Accordion.Item>\n * </Accordion>\n * ```\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(\n ({ children, className, indent = true, ...rest }, ref) => {\n return (\n <div\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 </div>\n );\n },\n) as AccordionType;\nAccordion.displayName = \"Accordion\";\n\nAccordion.Item = AccordionItem;\nAccordion.Header = AccordionHeader;\nAccordion.Content = AccordionContent;\n\ntype AccordionType = ReturnType<typeof forwardRef<HTMLDivElement, AccordionProps>> & {\n Item: typeof AccordionItem;\n Header: typeof AccordionHeader;\n Content: typeof AccordionContent;\n};\n","import type { ReactElement } from \"react\";\nimport { forwardRef, useId, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\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 React.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 = forwardRef<HTMLDivElement, AccordionItemProps>(\n ({ children, defaultOpen, open: outerOpen, onOpenChange, className, ...rest }, ref) => {\n const contentId = useId();\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 <div\n {...rest}\n data-state={open ? \"open\" : \"closed\"}\n className={clsx(\"hds-accordion-item\", className as undefined)}\n ref={ref}\n >\n <AccordionItemContext.Provider value={{ contentId, open, setOpen: handleOpen }}>\n {children}\n </AccordionItemContext.Provider>\n </div>\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 contentId: string;\n}\n\nexport const AccordionItemContext = createContext<AccordionItemContextProps | null>(null);\n","import type { MouseEvent, ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionHeaderProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n children: ReactNode;\n}\n\nexport const AccordionHeader = forwardRef<HTMLButtonElement, AccordionHeaderProps>(\n ({ children, className, onClick, ...rest }, ref) => {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n return null;\n }\n const expandOrCollapse = (e: MouseEvent<HTMLButtonElement>) => {\n context.setOpen(!context.open);\n onClick?.(e);\n };\n return (\n <button\n {...rest}\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={context.open ? \"open\" : \"closed\"}\n className={clsx(\"hds-accordion-item-header\", className as undefined)}\n onClick={expandOrCollapse}\n ref={ref}\n type=\"button\"\n >\n <span>{children}</span>\n </button>\n );\n },\n);\n\nAccordionHeader.displayName = \"Accordion.Header\";\n","import type { ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const AccordionContent = forwardRef<HTMLDivElement, AccordionContentProps>(\n ({ children, className, ...rest }, ref) => {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n return null;\n }\n return (\n <div\n id={context.contentId}\n data-state={context.open ? \"open\" : \"closed\"}\n {...{ inert: context.open ? undefined : \"true\" }}\n className={clsx(\"hds-accordion-item-content\", className as undefined)}\n ref={ref}\n {...rest}\n >\n <div className={clsx(\"hds-accordion-item-content-inner\")}>{children}</div>\n </div>\n );\n },\n);\n\nAccordionContent.displayName = \"Accordion.Content\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n\n /**\n * Color of the badge\n *\n * @default \"lighter\"\n */\n variant?: \"lighter\" | \"darker\" | \"white\" | \"warning\";\n\n /**\n * Font size of the badge\n *\n * @default \"small\"\n */\n size?: \"small\" | \"smaller\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Badges are used to label, categorize or organize items using keywords to describe them.\n *\n * @example\n *\n * ```tsx\n * <Badge variant=\"darker\">Darker</Badge>\n * ```\n *\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n ({ children, asChild, variant = \"lighter\", size = \"small\", className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n ref={ref}\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 </Component>\n );\n },\n);\nBadge.displayName = \"Badge\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * The quote style\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"norwegian\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Blockquote>\n * <p>... but they&rsquo;ll never take our freedom!</p>\n * <footer>William Wallace</footer>\n * </Blockquote>\n * ```\n *\n */\nexport const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(\n ({ children, asChild, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"blockquote\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-blockquote\",\n variant === \"norwegian\" && `hds-blockquote--norwegian`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBlockquote.displayName = \"Blockquote\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\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\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Color variant of the box\n *\n * @default \"light-grey\"\n */\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n 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 <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n","import { forwardRef, type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {\n children: ReactNode | 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 * @example\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 const Breadcrumbs = forwardRef<HTMLDivElement, BreadcrumbsProps>(\n ({ olProps, children, ...rest }, ref) => {\n return (\n <nav ref={ref} {...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 { Slot } from \"@radix-ui/react-slot\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n *\n * @default \"large\"\n */\n size?: \"small\" | \"large\";\n\n /**\n * The background and fill of the button\n *\n * @default \"primary\"\n */\n variant?: \"primary\" | \"secondary\" | \"tertiary\" | \"inverted\";\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 * Specify that there is an icon in the button.\n * `icon`: There is only an icon in the button.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n * @default false\n */\n icon?: boolean | \"leading\" | \"trailing\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Button component\n *\n * @example\n * <Button variant=\"primary\">Primary</Button>\n * <Button variant=\"secondary\" size=\"large\">Secondary</Button>\n * <Button variant=\"inverted\">Inverted</Button>\n * <Button variant=\"tertiary\" fullWidth=\"mobile\">Tertiary</Button>\n * <Button icon=\"leading\"><LeadingIcon />Leading icon</Button>\n *\n * @example\n * // If used for navigation use the `asChild` prop with a anchor element as a child.\n * <Button asChild><a href=\"/home\">Home</a></Button>\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild,\n children,\n variant = \"primary\",\n size = \"large\",\n fullWidth = false,\n icon = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"button\";\n\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n `hds-button--${variant}`,\n {\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--only-icon\": icon === true,\n \"hds-button--leading-icon\": icon === \"leading\",\n \"hds-button--trailing-icon\": icon === \"trailing\",\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nButton.displayName = \"Button\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ButtonListProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The list type\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"stretched\";\n}\n\n/**\n * Button list component\n *\n * @example\n * <ButtonList variant=\"default\">\n * <Button variant=\"primary\">Primary</Button>\n * <Button variant=\"secondary\">Secondary</Button>\n * </ButtonList>\n */\nexport const ButtonList = forwardRef<HTMLDivElement, ButtonListProps>(\n ({ variant = \"default\", className, children, ...rest }, ref) => {\n const Component = \"div\";\n\n return (\n <Component\n className={clsx(\"hds-button-list\", `hds-button-list--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nButtonList.displayName = \"ButtonList\";\n","import type { ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport const CardMedia = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 React.ImgHTMLAttributes<HTMLImageElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n /**\n * Define image scaling behavior when the image are varies in both width and height across different page breaks and sizes of the card.\n * \"crop\": Image always fills the available space.\n * If the aspect ratio doesn't match, then the top/bottom or left/right edges are cropped away.\n * \"scale\": No cropping, image scales to the maximum size available and centers.\n * If the aspect ratio doesn't match, then the background will show on the top/bottom or left/right sides of the image.\n *\n * @default \"crop\"\n */\n variant?: \"crop\" | \"scale\";\n}\nexport const CardMediaImg = forwardRef<HTMLImageElement, CardImageMediaProps>(\n ({ asChild, variant, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"img\";\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-card__media__img\",\n { \"hds-card__img__scale\": variant === \"scale\" },\n className as undefined,\n )}\n ref={ref}\n />\n );\n },\n);\nCardMediaImg.displayName = \"Card.MediaImg\";\n\nexport const CardBody = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component {...rest} className={clsx(\"hds-card__body\", className as undefined)} ref={ref}>\n <div className={clsx(\"hds-card__centerbody\", className as undefined)}>{children}</div>\n </Component>\n );\n },\n);\nCardBody.displayName = \"Card.Body\";\n\nexport const CardBodyHeader = forwardRef<\n HTMLHeadingElement,\n CardBaseProps &\n (\n | {\n /**\n * Heading level of the card heading\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n asChild?: never;\n }\n | {\n asChild: true;\n as?: never;\n }\n )\n>(({ as: Tag, asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : Tag;\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.BodyHeader\";\n\nexport const CardBodyHeaderOverline = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\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 },\n);\nCardBodyHeaderOverline.displayName = \"Card.BodyHeaderOverline\";\n\nexport const CardBodyHeaderTitle = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 },\n);\nCardBodyHeaderTitle.displayName = \"Card.BodyHeaderTitle\";\n\nexport const CardBodyDescription = forwardRef<HTMLParagraphElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"p\";\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.BodyDescription\";\n\nexport const CardBodyAction = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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.BodyAction\";\n\nexport const CardBodyActionRow = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-action-row\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nCardBodyActionRow.displayName = \"Card.BodyActionRow\";\n\ninterface CardBodyActionArrowProps extends React.HTMLAttributes<HTMLSpanElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Set direction of the arrow\n *\n * @default \"right\"\n */\n direction?: \"right\" | \"up-right\";\n}\nexport const CardBodyActionArrow = forwardRef<HTMLSpanElement, CardBodyActionArrowProps>(\n ({ asChild, className, direction, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-card__body-action-arrow\",\n { \"hds-card__body-action-arrow-up-right\": direction === \"up-right\" },\n className as undefined,\n )}\n ref={ref}\n />\n );\n },\n);\nCardBodyActionArrow.displayName = \"Card.BodyActionArrow\";\n\nexport interface CardBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport interface CardSlimAndMiniatureProps extends CardBaseProps {\n /**\n * Change the default rendered element for Card.\n */\n as?: \"section\" | \"div\" | \"article\" | \"aside\";\n /**\n * Allows for a horizontal variant for sizes above small.\n *\n * @default \"slim\"\n */\n variant?: \"slim\" | \"miniature\";\n /**\n * The color of the card.\n *\n * @default \"lighter-brand\"\n * */\n color?: \"white\" | \"lighter-brand\" | \"light-grey-fill\";\n\n /* Only fullwidth or focus cards can have images to the left or right of the text: */\n imagePosition?: never;\n}\n\nexport interface CardFocusProps extends CardBaseProps {\n as?: \"section\" | \"div\" | \"article\" | \"aside\";\n variant: \"focus\";\n color?: \"darker\";\n /**\n * fullwidth or focus cards can have images to the left or right of the text.\n *\n * @default \"left\"\n * */\n imagePosition?: \"left\" | \"right\";\n}\n\nexport interface CardFullwidthProps extends CardBaseProps {\n as?: \"section\" | \"div\" | \"article\" | \"aside\";\n variant: \"full-width\";\n color: \"white\" | \"lighter-brand\" | \"light-grey-fill\";\n /**\n * fullwidth or focus cards can have images to the left or right of the text.\n *\n * @default \"left\"\n * */\n imagePosition?: \"left\" | \"right\";\n}\n\nexport type CardProps = CardSlimAndMiniatureProps | CardFocusProps | CardFullwidthProps;\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n (\n { as: Tag = \"section\", asChild, className, children, variant, color, imagePosition, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag;\n const effectiveColor = variant === \"focus\" && !color ? \"darker\" : color;\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-card\",\n { \"hds-card--full-width\": variant === \"full-width\" },\n { \"hds-card--miniature\": variant === \"miniature\" },\n { \"hds-card--focus\": variant === \"focus\" },\n { \"hds-card--color-white\": effectiveColor === \"white\" },\n { \"hds-card--color-light-grey-fill\": effectiveColor === \"light-grey-fill\" },\n { \"hds-card--color-darker\": effectiveColor === \"darker\" },\n { \"hds-card--image-position-right\": imagePosition === \"right\" },\n className as undefined,\n )}\n ref={ref}\n >\n {variant === \"full-width\" ? (\n <div className={clsx(\"hds-card__layoutwrapper\", className as undefined)}>{children}</div>\n ) : (\n children\n )}\n </Component>\n );\n },\n) as CardType;\nCard.displayName = \"Card\";\n\nCard.Media = CardMedia;\nCard.MediaImg = CardMediaImg;\nCard.Body = CardBody;\nCard.BodyHeader = CardBodyHeader;\nCard.BodyHeaderOverline = CardBodyHeaderOverline;\nCard.BodyHeaderTitle = CardBodyHeaderTitle;\nCard.BodyDescription = CardBodyDescription;\nCard.BodyAction = CardBodyAction;\nCard.BodyActionRow = CardBodyActionRow;\nCard.BodyActionArrow = CardBodyActionArrow;\n\ntype CardType = ReturnType<typeof forwardRef<HTMLDivElement, CardProps>> & {\n Media: typeof CardMedia;\n MediaImg: typeof CardMediaImg;\n Body: typeof CardBody;\n BodyHeader: typeof CardBodyHeader;\n BodyHeaderOverline: typeof CardBodyHeaderOverline;\n BodyHeaderTitle: typeof CardBodyHeaderTitle;\n BodyDescription: typeof CardBodyDescription;\n BodyAction: typeof CardBodyAction;\n BodyActionRow: typeof CardBodyActionRow;\n BodyActionArrow: typeof CardBodyActionArrow;\n};\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `dt`, `dl`, or `div` 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 const DescriptionList = forwardRef<HTMLDListElement, DescriptionListProps>(\n ({ variant = \"vertical\", className, ...rest }, ref) => {\n return (\n <dl\n ref={ref}\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 },\n);\nDescriptionList.displayName = \"DescriptionList\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface FigureProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Figure>\n * <img src=\"https://placedog.net/500/280\" alt=\"A very good dog\" />\n * <figcaption>Dogs are the best</figcaption>\n * </Figure>\n * ```\n */\nexport const Figure = forwardRef<HTMLQuoteElement, FigureProps>(\n ({ children, asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"figure\";\n return (\n <Component ref={ref} className={clsx(\"hds-figure\", className as undefined)} {...rest}>\n {children}\n </Component>\n );\n },\n);\nFigure.displayName = \"Figure\";\n","import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } from \"../error-message\";\nimport { useFieldsetContext } from \"../fieldset\";\n\nexport type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> & {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n title?: string;\n errorMessageProps?: Partial<ErrorMessageProps>;\n} & (\n | {\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Checkboxes in the Fieldset component.\n * When providing an errorMessage to Fieldset, all contained Checkboxes will get correct hasError state.\n *\n * You can use this when your checkbox is part of a non-HDS fieldset which shows an error message.\n */\n hasError?: boolean;\n errorMessage?: never;\n }\n | {\n hasError?: never;\n /**\n * Set an error message to add error styling, and display the error message.\n * The component will take care of aria to connect the error message to the checkbox.\n *\n * Use this when your checkbox is standalone (not part of a fieldset).\n */\n errorMessage?: ReactNode;\n }\n );\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n variant = \"plain\",\n hasError: hasErrorProp,\n errorMessage,\n errorMessageProps,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const errorMessageId = useId();\n const { hasError: hasFieldsetError } = useFieldsetContext();\n const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;\n\n return (\n <div className={clsx(\"hds-checkbox-wrapper\")}>\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\n {...rest}\n aria-invalid={hasError ? true : undefined}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n ref={ref}\n type=\"checkbox\"\n />\n <span aria-hidden className=\"hds-checkbox__checkmark\" />\n {title ? <p className=\"hds-checkbox__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n <ErrorMessage id={errorMessageId} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </div>\n );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, type ReactNode } from \"react\";\n\nexport interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(\n ({ children, id, className, ...rest }, ref) => {\n return (\n <div\n aria-live=\"polite\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\nErrorMessage.displayName = \"ErrorMessage\";\n","import { useId, forwardRef, createContext, useContext } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n /**\n * Providing an errorMessage will also give contained Checkboxes or Radio buttons\n * error styling and aria to indicate invalid state.\n *\n * For Radio buttons you are even better off using RadioGroup.\n */\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n errorMessageProps?: Partial<ErrorMessageProps>;\n}\n\nconst FieldsetContext = createContext<{ hasError: boolean }>({ hasError: false });\n\nexport const useFieldsetContext = () => useContext(FieldsetContext);\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n errorMessageProps,\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 <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage) }}>\n {children}\n </FieldsetContext.Provider>\n <ErrorMessage id={errorMessageId} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </fieldset>\n );\n});\n","import { forwardRef, useRef, type InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup, type InputGroupProps } from \"../input-group\";\nimport { useMergeRefs } from \"../../utils/utils\";\n\nexport type DatePickerProps = Omit<\n InputGroupProps & InputHTMLAttributes<HTMLInputElement>,\n \"children\" | \"type\"\n> & {\n /**\n * Accessible title for the calendar button\n *\n * This button currently only shows in Chrome.\n *\n * @defaultValue \"Åpne kalender\"\n */\n calendarButtonTitle?: string;\n};\n\n/**\n * A basic implementation of a date picker\n *\n * This date picker is an implementation of native date picker, as you get\n * with `<input type=\"date\" />`, where the input field is dressed in Hedwig styling.\n *\n * Due to accessibility concerns you will only see the appropriate Hedwig calendar\n * icon in Chrome. Firefox will show built in icon and Safari will show no icon.\n * Not tested in Edge.\n */\nexport const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function DatePicker(\n {\n className,\n variant,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n calendarButtonTitle = \"Åpne kalender\",\n ...rest\n },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n const mergedRef = useMergeRefs([inputRef, ref]);\n\n return (\n <InputGroup\n className={clsx(\"hds-date-picker\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n variant={variant}\n >\n {(inputProps) => (\n <>\n <input\n {...rest}\n {...inputProps}\n disabled={disabled}\n readOnly={readOnly}\n ref={mergedRef}\n type=\"date\"\n />\n <button\n className={clsx(\"hds-date-picker__calendar-button\")}\n type=\"button\"\n title={calendarButtonTitle}\n onClick={() => {\n inputRef.current?.showPicker();\n }}\n />\n </>\n )}\n </InputGroup>\n );\n});\n\nDatePicker.displayName = \"DatePicker\";\n","import { useId, forwardRef, Children, isValidElement, cloneElement } from \"react\";\nimport type { LabelHTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } 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 errorMessageProps?: Partial<ErrorMessageProps>;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * `children` must be either a single input element or a render function.\n *\n * If you use a render function, make sure you spread the input props to the appropriate element.\n */\n children: Exclude<ReactNode, Iterable<ReactNode>> | ((inputProps: InputProps) => ReactNode);\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n variant = \"default\",\n errorMessage,\n errorMessageProps,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n const inputId = useId();\n\n const renderInput = () => {\n const inputProps: InputProps = {\n \"aria-describedby\": errorMessage ? errorMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n className: clsx(\"hds-input-group__input\"),\n };\n\n if (typeof children === \"function\") {\n return children(inputProps);\n }\n\n const input: ReactNode = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n className: `${inputProps.className} ${input.props.className ?? \"\"}`,\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${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} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </div>\n );\n});\n","import * as React from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/useMergeRefs\n */\nexport function useMergeRefs<Instance>(\n refs: (React.Ref<Instance> | undefined)[],\n): React.RefCallback<Instance> | null {\n return React.useMemo(() => {\n if (refs.every((ref) => ref === null)) {\n return null;\n }\n\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null) {\n (ref as React.MutableRefObject<Instance | null>).current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, refs);\n}\n\nexport function useResize<Instance extends HTMLElement>(\n ref: React.RefObject<Instance> | undefined | null,\n): { width: number; height: number } {\n const [width, setWidth] = useState<number>(0);\n const [height, setHeight] = useState<number>(0);\n const handleResize = useCallback(() => {\n if (ref?.current !== null) {\n setWidth(ref?.current?.offsetWidth ?? 0);\n setHeight(ref?.current?.offsetHeight ?? 0);\n }\n }, [ref]);\n useEffect(() => {\n window.addEventListener(\"load\", handleResize);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"load\", handleResize);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [ref, handleResize]);\n useEffect(() => {\n handleResize();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, []);\n return { width, height };\n}\n\nfunction subscribe() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- It's ok\n return () => {};\n}\n\nexport function useHydrated() {\n return React.useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n\n/**\n * Trap focus inside an element using the `inert` attribute.\n *\n * Adds `inert` to all siblings of the given element, and all their ancestors up to the body.\n * Returns a cleanup function which removes the `inert` property from the elements, effectively giving focus back to rest of the document.\n *\n * NOTE: Does not support portals, i.e. elements outside the DOM hierarchy of the given element.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n * @see https://web.dev/articles/inert\n */\nexport function focusTrap(element: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- NOP on focus trapping the body element\n if (element === document.body) return () => {};\n\n let inertElements: HTMLElement[] = [];\n for (let el: HTMLElement | null = element; el; el = el.parentElement) {\n if (el === document.body) break;\n\n for (const sibling of el.parentElement?.children ?? []) {\n if (sibling === el) continue;\n if (!(sibling instanceof HTMLElement)) continue;\n if (sibling.hasAttribute(\"inert\")) continue;\n\n sibling.setAttribute(\"inert\", \"true\");\n inertElements.push(sibling);\n }\n }\n\n return () => {\n releaseFocusTrap(inertElements);\n inertElements = [];\n };\n}\n\n/**\n * Unset the `inert` attribute on all elements given\n */\nfunction releaseFocusTrap(inertElements: Iterable<HTMLElement>) {\n for (const el of inertElements) {\n el.removeAttribute(\"inert\");\n }\n}\n","import { forwardRef, useEffect, useRef } from \"react\";\nimport { Message, type MessageProps, type MessageTitleProps } from \"../../message\";\nimport { UnorderedList, type ListProps } from \"../../list\";\nimport { Link } from \"../../link\";\nimport { useMergeRefs } from \"../../utils\";\nimport { focusWithLegendOrLabelInViewport } from \"./focus\";\n\ninterface ErrorSummaryHeadingPropsAutoFocus {\n /**\n * The heading will be focused when the component mounts\n *\n * On following errornous form submissions you should manually focus the heading\n * e.g. by passing a ref and calling `ref.current.focus()`\n *\n * @default true\n */\n autoFocus?: boolean;\n}\n\ninterface ErrorSummaryHeadingPropsAs {\n /**\n * A heading level must be selected, or optionally opting out for a different element\n *\n * Use {@link ErrorSummaryHeadingPropsAsChild.asChild} if you need more control of the rendered element.\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n}\n\ninterface ErrorSummaryHeadingPropsAsChild {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild: true;\n as?: never;\n}\n\nexport type ErrorSummaryHeadingProps = MessageTitleProps &\n ErrorSummaryHeadingPropsAutoFocus &\n (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild);\n\nexport const ErrorSummaryHeading = forwardRef<\n HTMLParagraphElement,\n ErrorSummaryHeadingProps & (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild)\n>(({ children, as: Tag, autoFocus = true, ...rest }, ref) => {\n const focusRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs([focusRef, ref]);\n\n useEffect(() => {\n /**\n * Hack: Safari 18 on mac at the time of writing\n * does not correctly focus it with VoiceOver without the timeout\n */\n setTimeout(() => {\n if (focusRef.current && autoFocus) {\n focusRef.current.focus();\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Only on initial render\n }, []);\n\n return (\n <Message.Title ref={mergedRef} tabIndex={-1} asChild {...rest}>\n {Tag ? <Tag>{children}</Tag> : children}\n </Message.Title>\n );\n});\nErrorSummaryHeading.displayName = \"ErrorSummary.Heading\";\n\nexport interface ErrorSummaryListProps extends ListProps {\n /**\n * Sets the size of the items (font)\n *\n * @default \"small\"\n */\n size?: ListProps[\"size\"];\n}\nexport const ErrorSummaryList = forwardRef<HTMLUListElement, ErrorSummaryListProps>(\n ({ children, style: _style, size = \"small\", ...rest }, ref) => {\n const style = {\n // Match the link `solid` style, which black underline\n \"--_hds-list-marker-color\": \"var(--hds-ui-colors-black)\",\n ..._style,\n };\n return (\n <Message.Description asChild>\n <UnorderedList size={size} ref={ref} style={style} {...rest}>\n {children}\n </UnorderedList>\n </Message.Description>\n );\n },\n);\nErrorSummaryList.displayName = \"ErrorSummary.List\";\n\nexport interface ErrorSummaryItemProps extends React.HTMLAttributes<HTMLLIElement> {\n /**\n * A hash link to the element that the error message refers to\n *\n * Must start with \"#\" as it's passed to the `href` attribute of an anchor element\n *\n * @example \"#email\"\n */\n href: `#${string}`;\n\n /**\n * Extra props to pass to the link element\n */\n linkProps?: React.AnchorHTMLAttributes<HTMLAnchorElement>;\n}\nexport const ErrorSummaryItem = forwardRef<HTMLLIElement, ErrorSummaryItemProps>(\n ({ children, href, linkProps, ...rest }, ref) => {\n function onClick(e: React.MouseEvent<HTMLAnchorElement>) {\n linkProps?.onClick?.(e);\n if (focusWithLegendOrLabelInViewport(href.replace(\"#\", \"\"))) {\n e.preventDefault();\n }\n }\n\n return (\n <li ref={ref} {...rest}>\n <Link size=\"small\" href={href} variant=\"solid\" {...linkProps} onClick={onClick}>\n {children}\n </Link>\n </li>\n );\n },\n);\nErrorSummaryItem.displayName = \"ErrorSummary.Item\";\n\nexport type ErrorSummaryProps = Omit<MessageProps, \"variant\" | \"icon\" | \"iconClassName\">;\n\nexport const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(\n ({ children, ...rest }, ref) => {\n return (\n <Message variant=\"warning\" ref={ref} {...rest}>\n {children}\n </Message>\n );\n },\n) as ErrorSummaryType;\nErrorSummary.displayName = \"ErrorSummary\";\n\ntype ErrorSummaryType = ReturnType<typeof forwardRef<HTMLDivElement, ErrorSummaryProps>> & {\n Heading: typeof ErrorSummaryHeading;\n List: typeof ErrorSummaryList;\n Item: typeof ErrorSummaryItem;\n};\nErrorSummary.Heading = ErrorSummaryHeading;\nErrorSummary.List = ErrorSummaryList;\nErrorSummary.Item = ErrorSummaryItem;\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageTitle = forwardRef<HTMLParagraphElement, MessageTitleProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 interface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageDescription = forwardRef<HTMLParagraphElement, MessageDescriptionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\" | \"info\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\" | \"asChild\">;\n\nexport const Message = forwardRef<HTMLDivElement, MessageProps>(\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) as MessageType;\nMessage.displayName = \"Message\";\n\ntype MessageType = ReturnType<typeof forwardRef<HTMLDivElement, MessageProps>> & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\nMessage.Title = MessageTitle;\nMessage.Description = MessageDescription;\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ListProps extends HTMLAttributes<HTMLOListElement | HTMLUListElement> {\n /**\n * Sets the size of the items (font)\n *\n * @default \"medium\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\n/**\n * An unordered list of simple items, often text. You can nest other lists inside this component.\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <UnorderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </UnorderedList>\n * ```\n */\nexport const UnorderedList = forwardRef<HTMLUListElement, ListProps>(\n ({ size = \"medium\", className, ...rest }, ref) => {\n return (\n <ul\n ref={ref}\n className={clsx(\"hds-list\", `hds-list--${size}`, className as undefined)}\n {...rest}\n />\n );\n },\n);\nUnorderedList.displayName = \"UnorderedList\";\n\n/**\n * An ordered list of simple items\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <OrderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </OrderedList>\n * ```\n */\nexport const OrderedList = forwardRef<HTMLOListElement, ListProps>(\n ({ size = \"medium\", className, ...rest }, ref) => {\n return (\n <ol\n ref={ref}\n className={clsx(\"hds-list\", `hds-list--${size}`, className as undefined)}\n {...rest}\n />\n );\n },\n);\nOrderedList.displayName = \"OrderedList\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\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 const LinkList = forwardRef<HTMLUListElement, LinkListProps>(\n ({ className, ...rest }, ref) => {\n return (\n <UnorderedList\n ref={ref}\n className={clsx(\"hds-list--link-list\", className as undefined)}\n {...rest}\n />\n );\n },\n);\nLinkList.displayName = \"LinkList\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The visual style of the link\n */\n variant?: \"underline\" | \"solid\" | \"inverted\" | \"no-underline\" | \"inverted-no-underline\";\n\n /**\n * Font size of the link\n * @default \"default\"\n */\n size?: \"default\" | \"small\" | \"large\" | \"technical\";\n\n /**\n * Specify that there is an icon in the link.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n */\n icon?: \"leading\" | \"trailing\";\n\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n { asChild, children, variant = \"underline\", size = \"default\", icon, className, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"a\";\n\n return (\n <Component\n className={clsx(\n \"hds-link\",\n variant !== \"underline\" && `hds-link--${variant}`,\n size !== \"default\" && `hds-link--${size}`,\n { \"hds-link--trailing-icon\": icon === \"trailing\" },\n { \"hds-link--leading-icon\": icon === \"leading\" },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nLink.displayName = \"Link\";\n","import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { useMergeRefs } from \"./utils\";\n\nexport interface AutoAnimateHeightProps extends React.HTMLAttributes<HTMLDivElement> {\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 * Callback fired when animiation transition ends\n * Use this to do effects after resizing is done, e.g. scrolling to the element\n * using `element.scrollIntoView()`\n */\n onTransitionEnd?: () => void;\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 = forwardRef<HTMLDivElement, AutoAnimateHeightProps>(\n (\n {\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n onTransitionEnd,\n ...rest\n },\n ref,\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([rootRef, ref]);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<{ height: number; shouldAnimate: boolean } | undefined>(\n undefined,\n );\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n\n useEffect(() => {\n if (!rootRef.current) return;\n if (!measurementRef.current) return;\n if (document.body.scrollHeight === 0) return;\n const currentMeasurement = measurementRef.current;\n const { height: newHeight } = currentMeasurement.getBoundingClientRect();\n\n // Listen for resize events on the measurement element\n // Keep the children in sync with the height\n // But don't animate it.\n let previouslyObservedHeight = newHeight;\n const resizeObserver = new ResizeObserver(() => {\n const { height: resizedHeight } = currentMeasurement.getBoundingClientRect();\n if (resizedHeight === previouslyObservedHeight) return;\n previouslyObservedHeight = resizedHeight;\n setHeight({ height: resizedHeight, shouldAnimate: false });\n });\n resizeObserver.observe(currentMeasurement); // This is cleaned up down below in the return functions\n\n // Set the new height when children changes\n setHeight({ height: newHeight, shouldAnimate: true });\n\n // Update children\n const nextClonedChildren = cloneElement(<>{children}</>, {});\n\n // When increasing in height update immediately so the new content is shown during the animation\n if (newHeight >= (height?.height ?? 0)) {\n setClonedChildren(nextClonedChildren);\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n // When decreasing in height, wait until the animation is done so that we don't get a sudden flash of empty content\n const currentRoot = rootRef.current;\n function onTransitionEndHandler(e: TransitionEvent) {\n if (e.propertyName !== \"height\") return;\n setClonedChildren(nextClonedChildren);\n }\n currentRoot.addEventListener(\"transitionend\", onTransitionEndHandler);\n return () => {\n resizeObserver.disconnect();\n currentRoot.removeEventListener(\"transitionend\", onTransitionEndHandler);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <div\n ref={mergedRef}\n onTransitionEnd={onTransitionEnd}\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n height: height?.height ?? measurementRef.current?.getBoundingClientRect().height,\n transitionProperty: height?.shouldAnimate ? \"height\" : \"none\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n willChange: \"height\",\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </div>\n );\n },\n);\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n","/**\n * Focus a form field while showing the associated legend or label in the viewport.\n *\n * Gives the user a better context of what field they are focusing on.\n *\n * Copied from https://github.com/alphagov/govuk-frontend/blob/cbf4ef1e329711be5b78a92bda6ba84a7db9ca40/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs#L60-L108\n */\nexport function focusWithLegendOrLabelInViewport(id: string) {\n const input = document.getElementById(id);\n if (!input) {\n return false;\n }\n\n const legendOrLabel = maybeLegendForInput(input) ?? labelForInput(input);\n if (!legendOrLabel) {\n return false;\n }\n\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n\n return true;\n}\n\nfunction maybeLegendForInput(input: HTMLElement) {\n const fieldset = input.closest(\"fieldset\");\n if (!fieldset) {\n return null;\n }\n\n const legend = fieldset.querySelector(\"legend\");\n if (!legend) {\n return null;\n }\n\n // If the input type is radio or checkbox, always use the legend if\n // there is one.\n if (input instanceof HTMLInputElement && (input.type === \"checkbox\" || input.type === \"radio\")) {\n return legend;\n }\n\n // For other input types, only scroll to the fieldset’s legend (instead\n // of the label associated with the input) if the input would end up in\n // the top half of the screen.\n //\n // This should avoid situations where the input either ends up off the\n // screen, or obscured by a software keyboard.\n const legendTop = legend.getBoundingClientRect().top;\n const inputRect = input.getBoundingClientRect();\n\n // If the browser doesn't support Element.getBoundingClientRect().height\n // or window.innerHeight (like IE8), bail and just link to the label.\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return legend;\n }\n }\n}\n\nfunction labelForInput(input: HTMLElement) {\n return (\n document.querySelector(`label[for='${input.getAttribute(\"id\")}']`) ?? input.closest(\"label\")\n );\n}\n","import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\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 { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useFieldsetContext } from \"../fieldset\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radio-group\";\n\nexport interface RadioButtonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Radio buttons in the RadioGroup component.\n * When providing an errorMessage to RadioGroup, all contained Radio buttons will get correct hasError state.\n *\n * You can use this when your Radio button is part of a non-HDS fieldset which shows an error message.\n */\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 {\n value: selectedValue,\n hasError: hasRadioGroupError,\n ...context\n } = useRadioGroupContext();\n const { hasError: hasFieldsetError } = useFieldsetContext();\n const hasError = hasFieldsetError || hasRadioGroupError || hasErrorProp;\n\n return (\n <div\n className={clsx(\n \"hds-radio-button\",\n {\n [`hds-radio-button--${variant}`]: variant === \"bounding-box\",\n \"hds-radio-button--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-radio-button__checkmark\" />\n {title ? <p className=\"hds-radio-button__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadioButton.displayName = \"RadioButton\";\n","import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadioButtonProps } from \"./radio-button\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n children: ReactNode;\n /** Will be passed to all Radio buttons within the radio group */\n name?: 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, and will also give contained Radio buttons\n * error styling and aria to indicate invalid state.\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radio buttons 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 name: undefined,\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 { forwardRef, type ReactNode , type SelectHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\nexport type SelectProps = Omit<\n InputGroupProps & SelectHTMLAttributes<HTMLSelectElement>,\n \"readOnly\" | \"children\"\n> & { children: ReactNode };\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 { forwardRef, type HTMLAttributes, type ReactElement } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Accordion } from \"../accordion\";\nimport { LinkList } from \"../list/link-list\";\nimport { Button } from \"../button\";\n\ninterface FooterLogoProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\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 FooterLogo = forwardRef<HTMLDivElement, FooterLogoProps>(\n ({ children, className, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(`hds-footer__logo`, className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n },\n);\nFooterLogo.displayName = \"Footer.Logo\";\n\nexport interface FooterButtonLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const FooterButtonLink = forwardRef<HTMLAnchorElement, FooterButtonLinkProps>(\n ({ children, className, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"a\";\n return (\n <Button asChild variant=\"inverted\" className={clsx(className as undefined)}>\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n </Button>\n );\n },\n);\nFooterButtonLink.displayName = \"FooterButton\";\n\ninterface FooterLinkSectionsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<FooterLinkSectionProps> | ReactElement<FooterLinkSectionProps>[];\n}\n\n/**\n * Responsive sections of links. Will become an accordion on mobile.\n *\n * Use with {@link FooterLinkSection} for each section.\n */\nexport const FooterLinkSections = forwardRef<HTMLDivElement, FooterLinkSectionsProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <>\n {/* Mobile and Desktop. The accordion styling gets removed on desktop */}\n <Accordion\n className={clsx(\"hds-footer__link-sections\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {/* @ts-expect-error -- It's ok */}\n {children}\n </Accordion>\n </>\n );\n },\n);\nFooterLinkSections.displayName = \"Footer.LinkSections\";\n\ninterface FooterLinkSectionProps extends HTMLAttributes<HTMLDivElement> {\n heading: React.ReactNode;\n children: React.ReactNode;\n}\n\nexport const FooterLinkSection = forwardRef<HTMLDivElement, FooterLinkSectionProps>(\n ({ heading, children, className, ...rest }, ref) => {\n // @ts-expect-error -- It's ok\n const linkListChildren = <LinkList>{children}</LinkList>;\n return (\n <>\n {/* Mobile */}\n <Accordion.Item\n className={clsx(`hds-footer__link-section`, className as undefined)}\n ref={ref}\n {...rest}\n >\n <Accordion.Header>{heading}</Accordion.Header>\n <Accordion.Content>{linkListChildren}</Accordion.Content>\n </Accordion.Item>\n\n {/* Desktop */}\n <div className={clsx(`hds-footer__link-section`, className as undefined)}>\n <h2>{heading}</h2>\n {linkListChildren}\n </div>\n </>\n );\n },\n);\nFooterLinkSection.displayName = \"Footer.LinkSection\";\n\nexport interface FooterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Footer variant\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"slim\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Footer = forwardRef<HTMLDivElement, FooterProps>(\n ({ children, className, variant, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"footer\";\n return (\n <Component\n className={clsx(\n `hds-footer`,\n variant === \"slim\" && \"hds-footer--slim\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n) as FooterType;\nFooter.displayName = \"Footer\";\n\ntype FooterType = ReturnType<typeof forwardRef<HTMLDivElement, FooterProps>> & {\n Logo: typeof FooterLogo;\n ButtonLink: typeof FooterButtonLink;\n LinkSections: typeof FooterLinkSections;\n LinkSection: typeof FooterLinkSection;\n};\n\nFooter.Logo = FooterLogo;\nFooter.ButtonLink = FooterButtonLink;\nFooter.LinkSections = FooterLinkSections;\nFooter.LinkSection = FooterLinkSection;\n","import * as Popover from \"@radix-ui/react-popover\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Box } from \"../box\";\n\ninterface HelpTextProps extends React.HTMLAttributes<HTMLButtonElement> {\n className?: string;\n\n /**\n * The content of the help text, often a word or phrase that could use some explanation\n */\n children: React.ReactNode;\n\n /**\n * The help text that will be shown when the user clicks the trigger\n */\n helpText: React.ReactNode;\n\n /**\n * The title of the help text. Used by screen readers and if the user hover over the help text\n */\n title?: string;\n\n /**\n * Props for the `Box` that contains the help text\n */\n boxProps?: React.ComponentProps<typeof Box>;\n\n /**\n * The side of the trigger the popover should be attached to\n *\n * @default \"top\"\n */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n\n /**\n * The alignment of the popover content\n *\n * @default \"start\"\n */\n align?: \"center\" | \"end\" | \"start\";\n}\n\n/**\n * Show a help text for a word or phrase when clicked\n *\n * Useful for providing explanations for domain-specific terms, acronyms or phrases that could do with further elaboration\n *\n * @example\n * ```tsx\n * <p>\n * En annen avgjørende faktor for avgifter er om nettbutikken er registrert i{\" \"}\n * <HelpText helpText={`VOEC er en forkortelse for \"VAT on E-commerce\" (mva. på e-handel).`}>\n * VOEC\n * </HelpText>\n * </p>\n * ```\n */\nexport const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(\n (\n { children, className, helpText, title, side = \"top\", align = \"start\", boxProps, ...rest },\n ref,\n ) => {\n return (\n // NOTE: Using radix's [Popover component](https://www.radix-ui.com/primitives/docs/components/popover)\n // In the future we can use the native popover api, but as of writing, though all browsers support it\n // it's not far enough back to be used in production\n // https://caniuse.com/mdn-html_elements_input_popovertarget\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n ref={ref}\n className={clsx(\"hds-help-text-button\", className as undefined)}\n title={title}\n type=\"button\"\n {...rest}\n >\n {children}\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content asChild side={side} align={align}>\n <Box\n {...boxProps}\n className={clsx(\"hds-help-text-box\", boxProps?.className as undefined)}\n >\n <Popover.Close asChild>\n <Box.CloseButton />\n </Popover.Close>\n {helpText}\n </Box>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n },\n);\nHelpText.displayName = \"HelpText\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"slim\";\n children: ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link ContainerProps.asChild} if you need more control of the rendered element.\n */\n as?: \"div\" | \"section\" | \"aside\" | \"main\" | \"article\" | \"header\" | \"footer\";\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 = forwardRef<HTMLDivElement, ContainerProps>(\n ({ as: Tag = \"div\", asChild, className, children, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : Tag;\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 { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\nimport { type SpacingSizes, type ResponsiveSpacingSizes, getSpacingVariable } from \"../spacing\";\n\nexport interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Column span for the grid item\n *\n * `default` is `12`\n */\n span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;\n\n /**\n * Center the grid item horizontally\n *\n * Offsets the start position of the grid item relative to it's span so that it appears centered.\n *\n * assumes a span of 2, 4, 6, 8, or 10\n *\n * a span of `12` is 100% width and centering has no effect\n *\n * `default` is `false`\n */\n center?: ResponsiveProp<boolean>;\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/**\n * 🚧 Grid.Item\n *\n * Use as the direct child of a `Grid` to override `span` and `center` for individual items.\n */\nexport const GridItem = forwardRef<HTMLDivElement, GridItemProps>(\n ({ children, asChild, className, span, center, style: _style, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n const style: React.CSSProperties = {\n ..._style,\n ...getResponsiveProps(\"--hds-grid-item-span\", span),\n ...getResponsiveProps(\"--hds-grid-item-center\", center, (value) => (value ? \"1\" : \"0\")),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-grid__item\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nGridItem.displayName = \"Grid.Item\";\n\nexport interface GridProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Space between grid items. Both horizontal and vertical.\n *\n * Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.\n *\n * Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.\n *\n * Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.\n */\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between grid items horizontally\n */\n gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between grid items vertically\n */\n gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Column span for the grid items\n *\n * `default` is `12`\n */\n span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;\n\n /**\n * Center grid items horizontally\n *\n * Offsets the start position of the grid items relative to their span so that it appears centered.\n *\n * assumes a span of 2, 4, 6, 8, or 10\n *\n * a span of `12` is 100% width and centering has no effect\n *\n * `default` is `false`\n */\n center?: ResponsiveProp<boolean>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * A simple opionated abstraction over CSS Grid.\n *\n * The grid is always a 12 column grid.\n *\n * @example\n * ```tsx\n * <Grid gap=\"12-16\" span={{ small: 6 }}>\n * <div>6/12</div>\n * <div>6/12</div>\n * <Grid.Item span={{ small: 12 }}>12/12</Grid.Item>\n * <div>6/12</div>\n * <div>6/12</div>\n * </Grid>\n * ```\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n (\n { children, asChild, className, span, center, style: _style, gap, gapX, gapY, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: React.CSSProperties = {\n ..._style,\n ...getResponsiveProps(\"--hds-grid-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-gap-x\", gapX, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-gap-y\", gapY, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-span\", span),\n ...getResponsiveProps(\"--hds-grid-center\", center, (value) => (value ? \"1\" : \"0\")),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-grid\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n) as GridType;\nGrid.displayName = \"Grid\";\n\ntype GridType = ReturnType<typeof forwardRef<HTMLDivElement, GridProps>> & {\n Item: typeof GridItem;\n};\n\nGrid.Item = GridItem;\n","type Breakpoints = \"initial\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-initial`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Space between items. Both horizontal and vertical.\n *\n * Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.\n *\n * Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.\n *\n * Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.\n */\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between items horizontally\n */\n gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between items vertically\n */\n gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n asChild,\n className,\n style: _style,\n gap,\n gapX,\n gapY,\n direction,\n wrap,\n align,\n justify,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-gap-x\", gapX, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-gap-y\", gapY, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","import { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box } from \"../box/box\";\nimport { useMergeRefs } from \"../utils/utils\";\n\ninterface ModalHeaderProps extends React.HTMLAttributes<HTMLHeadingElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalHeader = forwardRef<HTMLHeadingElement, ModalHeaderProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"h1\";\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\ninterface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalContent = forwardRef<HTMLDivElement, ModalContentProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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\ninterface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"footer\";\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 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 * ```tsx\n * const modalRef = useRef<HTMLDialogElement>(null);\n * const onClose = () => modalRef.current?.close();\n *\n * return (\n * <>\n * <Button onClick={() => modalRef.current?.showModal()}>Open Modal</Button>\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>\n * <HStack gap=\"16\" wrap>\n * <Button onClick={onMainAction}>Main action</Button>\n * <Button variant=\"secondary\" onClick={onClose}>\n * Cancel\n * </Button>\n * </HStack>\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 asChild\n className={clsx(\"hds-modal\", className as undefined)}\n closeable\n onClick={onDialogClick}\n onClose={onCloseButtonClick}\n variant=\"white\"\n >\n <dialog ref={mergedRef} {...rest}>\n {children}\n </dialog>\n </Box>\n );\n },\n) as ModalType;\nModal.displayName = \"Modal\";\n\ntype ModalType = ReturnType<typeof forwardRef<HTMLDialogElement, ModalProps>> & {\n Header: typeof ModalHeader;\n Content: typeof ModalContent;\n Footer: typeof ModalFooter;\n};\n\nModal.Header = ModalHeader;\nModal.Content = ModalContent;\nModal.Footer = ModalFooter;\n\nfunction 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 { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n NavbarExpandableMenu,\n NavbarExpandableMenuContent,\n NavbarExpandableMenuTrigger,\n} from \"./navbar-expandable-menu\";\n\ninterface NavbarLogoProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\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 = forwardRef<HTMLDivElement, NavbarLogoProps>(\n ({ children, className, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(`hds-navbar__logo`, className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\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 *\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 * @default false\n */\n asChild?: boolean;\n}\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\ninterface NavbarItemIconProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n/**\n * Icon to be used inside a `Navbar.Item`, `Navbar.ButtonItem`, or `Navbar.LinkItem`\n */\nexport const NavbarItemIcon = forwardRef<HTMLDivElement, NavbarItemIconProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <Slot className={clsx(\"hds-navbar__item-icon\", className as undefined)} ref={ref} {...rest}>\n {children}\n </Slot>\n );\n },\n);\nNavbarItemIcon.displayName = \"Navbar.ItemIcon\";\n\ninterface NavbarItemProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Generic Navbar item\n *\n * Use `Navbar.ButtonItem` or `Navbar.LinkItem` for links and buttons\n */\nexport const NavbarItem = forwardRef<HTMLDivElement, NavbarItemProps>(\n ({ asChild, children, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(\"hds-navbar__item\", className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n },\n);\nNavbarItem.displayName = \"Navbar.Item\";\n\ninterface NavbarButtonItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const NavbarButtonItem = forwardRef<HTMLButtonElement, NavbarButtonItemProps>(\n ({ asChild, children, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"button\";\n return (\n <Component\n className={clsx(\"hds-navbar__item\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nNavbarButtonItem.displayName = \"Navbar.ButtonItem\";\n\ninterface NavbarLinkItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const NavbarLinkItem = forwardRef<HTMLAnchorElement, NavbarLinkItemProps>(\n ({ asChild, children, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"a\";\n return (\n <Component className={clsx(\"hds-navbar__item\", className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n },\n);\nNavbarLinkItem.displayName = \"Navbar.LinkItem\";\n\ninterface NavbarNavigationProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const NavbarNavigation = forwardRef<HTMLDivElement, NavbarNavigationProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-navbar__navigation\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nNavbarNavigation.displayName = \"Navbar.Navigation\";\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 * @default \"default\"\n */\n variant?: \"default\" | \"service\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Navbar = forwardRef<HTMLDivElement, NavbarProps>(\n ({ asChild, children, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"header\";\n return (\n <Component\n className={clsx(\"hds-navbar\", variant && `hds-navbar--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n) as NavbarType;\nNavbar.displayName = \"Navbar\";\n\ntype NavbarType = ReturnType<typeof forwardRef<HTMLDivElement, NavbarProps>> & {\n Logo: typeof NavbarLogo;\n LogoAndServiceText: typeof NavbarLogoAndServiceText;\n ExpandableMenu: typeof NavbarExpandableMenu;\n ExpandableMenuTrigger: typeof NavbarExpandableMenuTrigger;\n ExpandableMenuContent: typeof NavbarExpandableMenuContent;\n Item: typeof NavbarItem;\n ButtonItem: typeof NavbarButtonItem;\n LinkItem: typeof NavbarLinkItem;\n ItemIcon: typeof NavbarItemIcon;\n Navigation: typeof NavbarNavigation;\n};\n\nNavbar.Logo = NavbarLogo;\nNavbar.LogoAndServiceText = NavbarLogoAndServiceText;\nNavbar.ExpandableMenu = NavbarExpandableMenu;\nNavbar.ExpandableMenuTrigger = NavbarExpandableMenuTrigger;\nNavbar.ExpandableMenuContent = NavbarExpandableMenuContent;\nNavbar.Item = NavbarItem;\nNavbar.ButtonItem = NavbarButtonItem;\nNavbar.LinkItem = NavbarLinkItem;\nNavbar.ItemIcon = NavbarItemIcon;\nNavbar.Navigation = NavbarNavigation;\n","import { createContext, useContext, forwardRef, useState, useEffect, useId } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { focusTrap } from \"../utils/utils\";\nimport { CloseIcon, MenuIcon } from \"./icons\";\n\ninterface ExpandableMenuContextProps {\n open: boolean;\n setOpen: (open: boolean) => void;\n contentId: string;\n}\nconst ExpandableMenuContext = createContext<ExpandableMenuContextProps | null>(null);\nexport const useNavbarExpendableMenuContext = () => {\n const value = useContext(ExpandableMenuContext);\n if (value === null) {\n throw new Error(\"useNavbarExpendableMenuContext must be used within a Navbar.ExpandableMenu\");\n }\n return value;\n};\n\nexport interface NavbarExpandableMenuProps {\n children: React.ReactNode;\n}\n\n/**\n * Expandable Menu Provider\n * Handles scroll and focus locking,\n * as well as scrolling the user to the top of the page.\n *\n * If we want a sticky header in the future the scrolling should be configurable\n */\nexport function NavbarExpandableMenu({ children }: NavbarExpandableMenuProps) {\n const contentId = useId();\n const [open, setOpen] = useState(false);\n\n useEffect(() => {\n if (open) {\n window.scrollTo(0, 0);\n document.body.classList.add(clsx(\"hds-navbar-scroll-lock\"));\n const releaseFocusTrap = focusTrap(\n document.getElementsByClassName(clsx(\"hds-navbar\"))[0] as HTMLElement,\n );\n\n return () => {\n document.body.classList.remove(clsx(\"hds-navbar-scroll-lock\"));\n releaseFocusTrap();\n };\n }\n }, [open]);\n\n return (\n <ExpandableMenuContext.Provider value={{ contentId, open, setOpen }}>\n {children}\n </ExpandableMenuContext.Provider>\n );\n}\nNavbarExpandableMenu.displayName = \"NavbarExpandableMenu\";\n\n/**\n * Trigger\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 style,\n className,\n ...rest\n },\n ref,\n ) => {\n const { contentId, open, setOpen } = useNavbarExpendableMenuContext();\n\n // Measure the width of the text when open and closed and choose the widest one\n // This is to ensure that the button doesn't change size when the text changes\n const [textWidth, setTextWidth] = useState<number | undefined>(undefined);\n const measurementId = useId();\n useEffect(() => {\n const widthWhenOpen =\n document.getElementById(`${measurementId}-when-open`)?.getBoundingClientRect().width ?? 0;\n const widthWhenClosed =\n document.getElementById(`${measurementId}-when-closed`)?.getBoundingClientRect().width ?? 0;\n\n setTextWidth(widthWhenOpen < widthWhenClosed ? widthWhenClosed : widthWhenOpen);\n }, [measurementId]);\n\n const text = open ? whenOpenText : whenClosedText;\n const title = open ? whenOpenHelperTitle : whenClosedHelperTitle;\n const icon = open ? <CloseIcon /> : <MenuIcon />;\n\n function toggleOpen() {\n setOpen(!open);\n }\n\n return (\n <button\n aria-expanded={open}\n aria-controls={contentId}\n className={clsx(\"hds-navbar__item\", className as undefined)}\n onClick={toggleOpen}\n ref={ref}\n title={title}\n type=\"button\"\n style={{ position: \"relative\", ...style }}\n {...rest}\n >\n {/* Measurement elements, not shown to the user */}\n <span\n id={`${measurementId}-when-closed`}\n aria-hidden\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n whiteSpace: \"nowrap\",\n }}\n >\n {whenOpenText}\n </span>\n <span\n id={`${measurementId}-when-open`}\n aria-hidden\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n whiteSpace: \"nowrap\",\n }}\n >\n {whenClosedText}\n </span>\n\n {/* Actual content */}\n <span\n style={{ width: textWidth, whiteSpace: \"nowrap\" }}\n className={clsx(\"hds-navbar__item-responsive-text\")}\n >\n {text}\n </span>\n <span style={{ width: 32, height: 32 }}>{icon}</span>\n </button>\n );\n },\n);\nNavbarExpandableMenuTrigger.displayName = \"Navbar.ExpandableMenuTrigger\";\n\n/**\n * Content\n */\nexport interface NavbarExpandableMenuContentProps {\n children: React.ReactNode;\n className?: string;\n}\nexport const NavbarExpandableMenuContent = forwardRef<\n HTMLDivElement,\n NavbarExpandableMenuContentProps\n>(({ children, className, ...rest }, ref) => {\n const { contentId, open } = useNavbarExpendableMenuContext();\n return (\n <section\n {...rest}\n id={contentId}\n className={clsx(\"hds-navbar__expandable-menu-content\", className as undefined)}\n data-state={open ? \"open\" : \"closed\"}\n {...{ inert: open ? undefined : \"true\" }}\n ref={ref}\n >\n <div className={clsx(\"hds-navbar__expandable-menu-content-inner\")}>{children}</div>\n </section>\n );\n});\nNavbarExpandableMenuContent.displayName = \"Navbar.ExpandableMenuContent\";\n","export function CloseIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32} viewBox=\"0 0 32 32\">\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport function MenuIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32}>\n <path\n fill=\"currentColor\"\n d=\"M25.938 10.146a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.562-.563-.562H6.063a.57.57 0 0 0-.562.562v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Z\"\n />\n </svg>\n );\n}\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 * ```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","/* eslint-disable @typescript-eslint/no-unsafe-assignment -- Typings for the differnt html elements */\n/* eslint-disable @typescript-eslint/no-explicit-any -- Typings for the differnt html elements */\n\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\ninterface DimensionsFromWidthAndHeight {\n height?: number | string;\n width?: number | string;\n}\n\ninterface SkeletonPropsInner extends React.HTMLAttributes<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 /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link SkeletonProps.asChild} if you need more control of the rendered element.\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\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 = forwardRef<HTMLDivElement, SkeletonProps>(\n (\n {\n as: Tag = \"div\",\n asChild,\n children,\n animation = true,\n variant = \"text\",\n width,\n height,\n className,\n style,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag;\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 aria-hidden\n {...{ inert: \"true\" }}\n ref={ref as any}\n {...(rest as any)}\n >\n {children}\n </Component>\n );\n },\n);\nSkeleton.displayName = \"Skeleton\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\ninterface SpinnerPropsInner extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The size of the Spinner\n *\n * @default \"medium\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n /**\n * The tooltip title\n *\n * @default \"\"\n */\n title?: string;\n\n /**\n * Delay before the spinner fades in\n *\n * If set to `true`, a default delay of `800ms` will be applied.\n *\n * @example\n * 0.8s\n *\n * @default false\n */\n delay?: `${string}ms` | `${string}s` | boolean;\n}\n\nexport type SpinnerProps = SpinnerPropsInner;\n\n/**\n * Use spinner loading states as placeholder for your content while waiting for data to load.\n */\nexport const Spinner = forwardRef<HTMLDivElement, SpinnerProps>(\n ({ size = \"medium\", title = \"\", delay = false, className, style: _style, ...rest }, ref) => {\n const style: React.CSSProperties & { \"--hds-spinner-delay\"?: string } = {\n ..._style,\n ...(typeof delay === \"string\" && { \"--hds-spinner-delay\": delay }),\n };\n return (\n <div\n title={title}\n style={style}\n className={clsx(\n \"hds-spinner\",\n `hds-spinner--${size}`,\n delay && \"hds-spinner--delay\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nSpinner.displayName = \"Spinner\";\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 { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface StyledHtmlProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Size of content inside. Setting this to `small` makes the font size be `body-small`.\n *\n * @default \"default\"\n */\n size?: \"default\" | \"small\";\n\n /**\n * 🚧 Work in progress darkmode support\n */\n unstable_darkmode?: boolean;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\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 * @example\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 = forwardRef<HTMLDivElement, StyledHtmlProps>(\n ({ asChild, children, size, unstable_darkmode: darkmode = false, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, useId } from \"react\";\n\ninterface TableProps extends React.HTMLAttributes<HTMLTableElement> {\n className?: string;\n\n /**\n * Size of the table\n *\n * Use `compressed` for a more compact table, or `mobile-compressed` for a compact table on mobile screens only.\n */\n size?: \"default\" | \"compressed\" | \"mobile-compressed\";\n\n /**\n * The table caption\n *\n * You can also set this by passing `<caption>` as a first child of the table\n */\n caption?: React.ReactNode;\n\n /**\n * Optional description of the table displayed underneath the table\n *\n * Ensures the `aria-describedby` attribute is set on the table, making it accessible for screen readers.\n */\n description?: React.ReactNode;\n}\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n ({ children, className, size, caption, description, ...rest }, ref) => {\n const descriptionId = useId();\n return (\n <>\n <table\n aria-describedby={description ? descriptionId : undefined}\n ref={ref}\n className={clsx(\n \"hds-table\",\n {\n \"hds-table--compressed\": size === \"compressed\",\n \"hds-table--mobile-compressed\": size === \"mobile-compressed\",\n },\n className as undefined,\n )}\n {...rest}\n >\n {caption ? <caption>{caption}</caption> : null}\n {children}\n </table>\n {description ? (\n <p className={clsx(\"hds-table-description\")} id={descriptionId}>\n {description}\n </p>\n ) : null}\n </>\n );\n },\n);\nTable.displayName = \"Table\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { TabsContext } from \"./context\";\nimport { TabsContent, TabsContents, type TabsContentsProps } from \"./tabs-content\";\nimport { TabsList, TabsTab, type TabsListProps } from \"./tabs-list\";\n\nexport interface TabsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsListProps | TabsContentsProps>[] | 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 /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Tabs = forwardRef<HTMLDivElement, TabsProps>(\n ({ asChild, defaultTab, children, ...rest }, ref) => {\n const [activeTabId, setActiveTabId] = useState<string>(defaultTab);\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(\"hds-tabs\")} ref={ref} {...rest}>\n <TabsContext.Provider value={{ activeTabId, toggleActiveTabId: setActiveTabId }}>\n {children}\n </TabsContext.Provider>\n </Component>\n );\n },\n) as TabsType;\nTabs.displayName = \"Tabs\";\n\ntype TabsType = ReturnType<typeof forwardRef<HTMLDivElement, TabsProps>> & {\n List: typeof TabsList;\n Tab: typeof TabsTab;\n Contents: typeof TabsContents;\n Content: typeof TabsContent;\n};\n\nTabs.List = TabsList;\nTabs.Tab = TabsTab;\nTabs.Contents = TabsContents;\nTabs.Content = TabsContent;\n","import { createContext, useContext } from \"react\";\n\nexport interface TabsContextProps {\n activeTabId: string;\n toggleActiveTabId: (tabId: string) => void;\n}\n\nexport const TabsContext = createContext<TabsContextProps | null>(null);\n\nexport function useTabsContext() {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error(\n \"Tabs context required. Did you use `<Tabs.List />`, `<Tabs.Tab />`, or `<Tabs.Content />` outside of <Tabs/>?\",\n );\n }\n return context;\n}\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useTabsContext } from \"./context\";\n\nexport interface TabsContentsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsContentProps> | ReactElement<TabsContentProps>[];\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const TabsContents = forwardRef<HTMLDivElement, TabsContentsProps>(\n ({ asChild, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component ref={ref} className={clsx(\"hds-tabs__contents\")} {...rest}>\n {children}\n </Component>\n );\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 /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const TabsContent = forwardRef<HTMLDivElement, TabsContentProps>(\n ({ asChild, forTabId, children, ...rest }, ref) => {\n const context = useTabsContext();\n const Component = asChild ? Slot : \"div\";\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 type { HTMLAttributes, ReactElement, MouseEvent } from \"react\";\nimport { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useResize, useHydrated, useMergeRefs } from \"../utils/utils\";\nimport { useTabsContext } from \"./context\";\n\nexport interface TabsListProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsTabProps> | ReactElement<TabsTabProps>[];\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 * @default \"horizontal\"\n */\n direction?: \"vertical\" | \"horizontal\";\n}\n\nexport const TabsList = forwardRef<HTMLDivElement, TabsListProps>(\n ({ children, direction = \"horizontal\", className, ...rest }, ref) => {\n const { activeTabId } = useTabsContext();\n const tabsListRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([tabsListRef, ref]);\n const { width: tabsWidth } = useResize(tabsListRef);\n\n const isClientSide = useHydrated();\n const { innerWidth } = isClientSide ? window : { innerWidth: 1000 };\n const wideEnough = innerWidth >= tabsWidth;\n\n const previousTabId = useRef(activeTabId);\n\n // Marker animation\n useEffect(() => {\n const tabList = tabsListRef.current;\n const activeTab = tabList?.querySelector(`[data-tabid=\"${activeTabId}\"]`);\n if (!activeTab || !tabList) return;\n\n const { offsetHeight: containerHeight, offsetWidth: containerWidth } = tabList;\n const { offsetHeight, offsetWidth, offsetTop, offsetLeft } = activeTab as HTMLElement;\n\n // Calculate the height and width of the marker relative to the container\n const height = offsetHeight / containerHeight;\n const width = offsetWidth / containerWidth;\n\n // NOTE: Doing a DOM manipulation here to set the CSS variables for the marker\n // Not really the react idomatic way, but as long as it works we are able to skip some intermidiate `useState`\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-height\", String(height));\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-width\", String(width));\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-top\", `${offsetTop}px`);\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-left\", `${offsetLeft}px`);\n\n // Start with border fallback, then switch to the animated marker when the user changes tabs\n // This way the marker is placed immediately to the default tab, then animates smoothly to the next when selected\n if (previousTabId.current !== activeTabId) {\n tabsListRef.current.style.setProperty(\n \"--_hds-tabs-marker-animated-color\",\n \"var(--_hds-tabs-marker-color)\",\n );\n tabsListRef.current.style.setProperty(\n \"--_hds-tabs-marker-border-fallback-color\",\n \"transparent\",\n );\n }\n previousTabId.current = activeTabId;\n }, [activeTabId, innerWidth]);\n\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={mergedRef}\n role=\"tablist\"\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\nTabsList.displayName = \"Tabs.List\";\n\nexport interface TabsTabProps extends HTMLAttributes<HTMLButtonElement> {\n children: ReactElement<HTMLElement> | string;\n\n /**\n * Identifier for the tab\n */\n tabId: string;\n}\n\nexport const TabsTab = forwardRef<HTMLButtonElement, TabsTabProps>(\n ({ children, tabId, className, onClick, ...rest }, ref) => {\n const context = useTabsContext();\n\n const toggleTab = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n context.toggleActiveTabId(tabId);\n onClick?.(e);\n };\n return (\n <button\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 type=\"button\"\n role=\"tab\"\n {...rest}\n >\n {children}\n </button>\n );\n },\n);\nTabsTab.displayName = \"Tabs.Tab\";\n","/* eslint-disable @typescript-eslint/no-unsafe-assignment -- Typings for the differnt html elements */\n/* eslint-disable @typescript-eslint/no-explicit-any -- Typings for the differnt html elements */\n\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\ntype HeadingProps =\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n asChild: true;\n as?: never;\n }\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n as: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n };\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 = {\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 * @default \"fluid\"\n */\n size?: \"min\" | \"max\" | \"fluid\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link TextProps.asChild} if you need more control of the rendered element.\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n\n /**\n * 🚧 Experimental spacing\n */\n _unstableSpacing?: boolean;\n} & (HeadingProps | ParagraphProps) &\n React.HTMLAttributes<HTMLParagraphElement | HTMLHeadingElement>;\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` or `asChild` prop is required.\n *\n * This is 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 = forwardRef<HTMLParagraphElement | HTMLHeadingElement, TextProps>(\n (\n {\n as: Tag,\n asChild,\n variant = \"body\",\n size = \"fluid\",\n _unstableSpacing: spacing,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag ?? 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 as any}\n {...(rest as any)}\n >\n {children}\n </Component>\n );\n },\n);\nText.displayName = \"Text\";\n","import type { ReactNode } from \"react\";\nimport React, { forwardRef, useId, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface WarningBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n title: ReactNode;\n description?: ReactNode;\n}\n\nexport const WarningBanner = forwardRef<HTMLDivElement, WarningBannerProps>(\n ({ title, description, className, ...rest }, ref) => {\n const descriptionId = useId();\n const expandable = !!description;\n return (\n <div {...rest} className={clsx(\"hds-warning-banner\", className as undefined)} ref={ref}>\n <WarningBannerTitle\n variant={expandable ? \"expandable\" : \"default\"}\n descriptionId={descriptionId}\n >\n {title}\n </WarningBannerTitle>\n {expandable ? (\n <WarningBannerDescription id={descriptionId}>{description}</WarningBannerDescription>\n ) : null}\n </div>\n );\n },\n);\nWarningBanner.displayName = \"WarningBanner\";\n\ntype WarningBannerTitleProps =\n | ({\n variant: \"expandable\";\n descriptionId: string;\n } & React.ButtonHTMLAttributes<HTMLButtonElement>)\n | ({ variant: \"default\"; descriptionId?: string } & React.HTMLAttributes<HTMLParagraphElement>);\n\nconst WarningBannerTitle = forwardRef<\n HTMLButtonElement | HTMLParagraphElement,\n WarningBannerTitleProps\n>(({ variant, descriptionId, children, className, ...rest }, ref) => {\n const [open, setOpen] = useState<boolean>(false);\n if (variant === \"expandable\") {\n return (\n <button\n {...(rest as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n aria-expanded={open}\n aria-controls={descriptionId}\n data-state={open ? \"open\" : \"closed\"}\n className={clsx(\n \"hds-warning-banner__title\",\n \"hds-warning-banner__title-trigger\",\n className as undefined,\n )}\n onClick={() => {\n setOpen((prev) => !prev);\n }}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n >\n <div>{children}</div>\n </button>\n );\n }\n return (\n <p\n {...(rest as React.HTMLAttributes<HTMLParagraphElement>)}\n className={clsx(\"hds-warning-banner__title\", className as undefined)}\n ref={ref as React.Ref<HTMLParagraphElement>}\n >\n {children}\n </p>\n );\n});\nWarningBannerTitle.displayName = \"WarningBannerTitle\";\n\ntype WarningBannerDescriptionProps = { id: string } & React.HTMLAttributes<HTMLParagraphElement>;\nconst WarningBannerDescription = forwardRef<HTMLParagraphElement, WarningBannerDescriptionProps>(\n ({ className, id, ...rest }, ref) => {\n return (\n <p\n id={id}\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;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,IAAAA,gBAA2B;AAC3B,IAAAC,0BAAqB;;;ACDrB,IAAAC,gBAA4C;AAC5C,6BAAqB;;;ACFrB,mBAA8B;AAQvB,IAAM,2BAAuB,4BAAgD,IAAI;;;AD8ChF;AArBD,IAAM,oBAAgB;AAAA,EAC3B,CAAC,IAA8E,QAAQ;AAAtF,iBAAE,YAAU,aAAa,MAAM,WAAW,cAAc,UAlC3D,IAkCG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AyB,cAAc;","names":["import_react","import_typed_classname","import_react","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_react","import_typed_classname","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","Fieldset","import_jsx_runtime","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","InputGroup","_a","import_react","import_jsx_runtime","DatePicker","_a","import_react","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_react_slot","import_jsx_runtime","import_react","import_jsx_runtime","_a","_b","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","Input","import_react","import_typed_classname","import_react","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","Select","import_react","import_typed_classname","import_jsx_runtime","Textarea","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","_a","import_react","import_typed_classname","import_react_slot","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","releaseFocusTrap","_a","_b","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_react","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/accordion/accordion.tsx","../src/accordion/accordion-item.tsx","../src/accordion/context.ts","../src/accordion/accordion-header.tsx","../src/accordion/accordion-content.tsx","../src/badge/badge.tsx","../src/blockquote/blockquote.tsx","../src/box/box.tsx","../src/breadcrumbs/breadcrumbs.tsx","../src/button/button.tsx","../src/button-list/button-list.tsx","../src/card/card.tsx","../src/description-list/description-list.tsx","../src/figure/figure.tsx","../src/form/checkbox/checkbox.tsx","../src/form/error-message/error-message.tsx","../src/form/fieldset/fieldset.tsx","../src/form/date-picker/date-picker.tsx","../src/form/input-group/input-group.tsx","../src/utils/utils.ts","../src/form/error-summary/error-summary.tsx","../src/message/message.tsx","../src/list/list.tsx","../src/list/link-list.tsx","../src/link/link.tsx","../src/utils/auto-animate-height.tsx","../src/form/error-summary/focus.ts","../src/form/input/input.tsx","../src/form/radio-button/radio-button.tsx","../src/form/radio-button/radio-group.tsx","../src/form/select/select.tsx","../src/form/textarea/textarea.tsx","../src/footer/footer.tsx","../src/help-text/help-text.tsx","../src/layout/container/container.tsx","../src/layout/grid/grid.tsx","../src/layout/responsive.ts","../src/layout/spacing.ts","../src/layout/stack/stack.tsx","../src/modal/modal.tsx","../src/navbar/navbar.tsx","../src/navbar/navbar-expandable-menu.tsx","../src/navbar/icons.tsx","../src/show-more/show-more.tsx","../src/skeleton/skeleton.tsx","../src/spinner/spinner.tsx","../src/step-indicator/step-indicator.tsx","../src/styled-html/styled-html.tsx","../src/table/table.tsx","../src/tabs/tabs.tsx","../src/tabs/context.ts","../src/tabs/tabs-content.tsx","../src/tabs/tabs-list.tsx","../src/text/text.tsx","../src/warning-banner/warning-banner.tsx"],"sourcesContent":["export * from \"./accordion\";\nexport * from \"./badge\";\nexport * from \"./blockquote\";\nexport * from \"./box\";\nexport * from \"./breadcrumbs\";\nexport * from \"./button\";\nexport * from \"./button-list\";\nexport * from \"./card\";\nexport * from \"./description-list\";\nexport * from \"./figure\";\nexport * from \"./form\";\nexport * from \"./footer\";\nexport * from \"./help-text\";\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 \"./spinner\";\nexport * from \"./step-indicator\";\nexport * from \"./styled-html\";\nexport * from \"./table\";\nexport * from \"./tabs\";\nexport * from \"./text\";\nexport * from \"./utils\";\nexport * from \"./warning-banner\";\n","import type { ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { AccordionItem, type AccordionItemProps } from \"./accordion-item\";\nimport { AccordionHeader } from \"./accordion-header\";\nimport { AccordionContent } from \"./accordion-content\";\n\nexport interface AccordionProps extends React.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\n/**\n * Displays collapsible content sections\n *\n * @example\n * ```tsx\n * <Accordion>\n * <Accordion.Item defaultOpen>\n * <Accordion.Header>Item one</Accordion.Header>\n * <Accordion.Content>\n * Some content\n * </Accordion.Content>\n * </Accordion.Item>\n * <Accordion.Item>\n * <Accordion.Header>Item two</Accordion.Header>\n * <Accordion.Content>\n * Some more content\n * </Accordion.Content>\n * </Accordion.Item>\n * </Accordion>\n * ```\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(\n ({ children, className, indent = true, ...rest }, ref) => {\n return (\n <div\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 </div>\n );\n },\n) as AccordionType;\nAccordion.displayName = \"Accordion\";\n\nAccordion.Item = AccordionItem;\nAccordion.Header = AccordionHeader;\nAccordion.Content = AccordionContent;\n\ntype AccordionType = ReturnType<typeof forwardRef<HTMLDivElement, AccordionProps>> & {\n Item: typeof AccordionItem;\n Header: typeof AccordionHeader;\n Content: typeof AccordionContent;\n};\n","import type { ReactElement } from \"react\";\nimport { forwardRef, useId, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\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 React.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 = forwardRef<HTMLDivElement, AccordionItemProps>(\n ({ children, defaultOpen, open: outerOpen, onOpenChange, className, ...rest }, ref) => {\n const contentId = useId();\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 <div\n {...rest}\n data-state={open ? \"open\" : \"closed\"}\n className={clsx(\"hds-accordion-item\", className as undefined)}\n ref={ref}\n >\n <AccordionItemContext.Provider value={{ contentId, open, setOpen: handleOpen }}>\n {children}\n </AccordionItemContext.Provider>\n </div>\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 contentId: string;\n}\n\nexport const AccordionItemContext = createContext<AccordionItemContextProps | null>(null);\n","import type { MouseEvent, ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionHeaderProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n children: ReactNode;\n}\n\nexport const AccordionHeader = forwardRef<HTMLButtonElement, AccordionHeaderProps>(\n ({ children, className, onClick, ...rest }, ref) => {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n return null;\n }\n const expandOrCollapse = (e: MouseEvent<HTMLButtonElement>) => {\n context.setOpen(!context.open);\n onClick?.(e);\n };\n return (\n <button\n {...rest}\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={context.open ? \"open\" : \"closed\"}\n className={clsx(\"hds-accordion-item-header\", className as undefined)}\n onClick={expandOrCollapse}\n ref={ref}\n type=\"button\"\n >\n <span>{children}</span>\n </button>\n );\n },\n);\n\nAccordionHeader.displayName = \"Accordion.Header\";\n","import type { ReactNode } from \"react\";\nimport { forwardRef, useContext } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { AccordionItemContext } from \"./context\";\n\nexport interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport const AccordionContent = forwardRef<HTMLDivElement, AccordionContentProps>(\n ({ children, className, ...rest }, ref) => {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n return null;\n }\n return (\n <div\n id={context.contentId}\n data-state={context.open ? \"open\" : \"closed\"}\n {...{ inert: context.open ? undefined : \"true\" }}\n className={clsx(\"hds-accordion-item-content\", className as undefined)}\n ref={ref}\n {...rest}\n >\n <div className={clsx(\"hds-accordion-item-content-inner\")}>{children}</div>\n </div>\n );\n },\n);\n\nAccordionContent.displayName = \"Accordion.Content\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n\n /**\n * Color of the badge\n *\n * @default \"lighter\"\n */\n variant?: \"lighter\" | \"darker\" | \"white\" | \"warning\";\n\n /**\n * Font size of the badge\n *\n * @default \"small\"\n */\n size?: \"small\" | \"smaller\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Badges are used to label, categorize or organize items using keywords to describe them.\n *\n * @example\n *\n * ```tsx\n * <Badge variant=\"darker\">Darker</Badge>\n * ```\n *\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n ({ children, asChild, variant = \"lighter\", size = \"small\", className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n ref={ref}\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 </Component>\n );\n },\n);\nBadge.displayName = \"Badge\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * The quote style\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"norwegian\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Blockquote>\n * <p>... but they&rsquo;ll never take our freedom!</p>\n * <footer>William Wallace</footer>\n * </Blockquote>\n * ```\n *\n */\nexport const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(\n ({ children, asChild, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"blockquote\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-blockquote\",\n variant === \"norwegian\" && `hds-blockquote--norwegian`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBlockquote.displayName = \"Blockquote\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\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\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Color variant of the box\n *\n * @default \"light-grey\"\n */\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n 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 <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n","import { forwardRef, type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {\n children: ReactNode | 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 * @example\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 const Breadcrumbs = forwardRef<HTMLDivElement, BreadcrumbsProps>(\n ({ olProps, children, ...rest }, ref) => {\n return (\n <nav ref={ref} {...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 { Slot } from \"@radix-ui/react-slot\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n *\n * @default \"large\"\n */\n size?: \"small\" | \"large\";\n\n /**\n * The background and fill of the button\n *\n * @default \"primary\"\n */\n variant?: \"primary\" | \"secondary\" | \"tertiary\" | \"inverted\";\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 * Specify that there is an icon in the button.\n * `icon`: There is only an icon in the button.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n * @default false\n */\n icon?: boolean | \"leading\" | \"trailing\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Button component\n *\n * @example\n * <Button variant=\"primary\">Primary</Button>\n * <Button variant=\"secondary\" size=\"large\">Secondary</Button>\n * <Button variant=\"inverted\">Inverted</Button>\n * <Button variant=\"tertiary\" fullWidth=\"mobile\">Tertiary</Button>\n * <Button icon=\"leading\"><LeadingIcon />Leading icon</Button>\n *\n * @example\n * // If used for navigation use the `asChild` prop with a anchor element as a child.\n * <Button asChild><a href=\"/home\">Home</a></Button>\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild,\n children,\n variant = \"primary\",\n size = \"large\",\n fullWidth = false,\n icon = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"button\";\n\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n `hds-button--${variant}`,\n {\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--only-icon\": icon === true,\n \"hds-button--leading-icon\": icon === \"leading\",\n \"hds-button--trailing-icon\": icon === \"trailing\",\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nButton.displayName = \"Button\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ButtonListProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The list type\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"stretched\";\n}\n\n/**\n * Button list component\n *\n * @example\n * <ButtonList variant=\"default\">\n * <Button variant=\"primary\">Primary</Button>\n * <Button variant=\"secondary\">Secondary</Button>\n * </ButtonList>\n */\nexport const ButtonList = forwardRef<HTMLDivElement, ButtonListProps>(\n ({ variant = \"default\", className, children, ...rest }, ref) => {\n const Component = \"div\";\n\n return (\n <Component\n className={clsx(\"hds-button-list\", `hds-button-list--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nButtonList.displayName = \"ButtonList\";\n","import type { ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport const CardMedia = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 React.ImgHTMLAttributes<HTMLImageElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n /**\n * Define image scaling behavior when the image are varies in both width and height across different page breaks and sizes of the card.\n * \"crop\": Image always fills the available space.\n * If the aspect ratio doesn't match, then the top/bottom or left/right edges are cropped away.\n * \"scale\": No cropping, image scales to the maximum size available and centers.\n * If the aspect ratio doesn't match, then the background will show on the top/bottom or left/right sides of the image.\n *\n * @default \"crop\"\n */\n variant?: \"crop\" | \"scale\";\n}\nexport const CardMediaImg = forwardRef<HTMLImageElement, CardImageMediaProps>(\n ({ asChild, variant, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"img\";\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-card__media__img\",\n { \"hds-card__img__scale\": variant === \"scale\" },\n className as undefined,\n )}\n ref={ref}\n />\n );\n },\n);\nCardMediaImg.displayName = \"Card.MediaImg\";\n\nexport const CardBody = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component {...rest} className={clsx(\"hds-card__body\", className as undefined)} ref={ref}>\n <div className={clsx(\"hds-card__centerbody\", className as undefined)}>{children}</div>\n </Component>\n );\n },\n);\nCardBody.displayName = \"Card.Body\";\n\nexport const CardBodyHeader = forwardRef<\n HTMLHeadingElement,\n CardBaseProps &\n (\n | {\n /**\n * Heading level of the card heading\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n asChild?: never;\n }\n | {\n asChild: true;\n as?: never;\n }\n )\n>(({ as: Tag, asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : Tag;\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.BodyHeader\";\n\nexport const CardBodyHeaderOverline = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\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 },\n);\nCardBodyHeaderOverline.displayName = \"Card.BodyHeaderOverline\";\n\nexport const CardBodyHeaderTitle = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 },\n);\nCardBodyHeaderTitle.displayName = \"Card.BodyHeaderTitle\";\n\nexport const CardBodyDescription = forwardRef<HTMLParagraphElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"p\";\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.BodyDescription\";\n\nexport const CardBodyAction = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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.BodyAction\";\n\nexport const CardBodyActionRow = forwardRef<HTMLDivElement, CardBaseProps>(\n ({ asChild, className, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n {...rest}\n className={clsx(\"hds-card__body-action-row\", className as undefined)}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nCardBodyActionRow.displayName = \"Card.BodyActionRow\";\n\ninterface CardBodyActionArrowProps extends React.HTMLAttributes<HTMLSpanElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Set direction of the arrow\n *\n * @default \"right\"\n */\n direction?: \"right\" | \"up-right\";\n}\nexport const CardBodyActionArrow = forwardRef<HTMLSpanElement, CardBodyActionArrowProps>(\n ({ asChild, className, direction, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-card__body-action-arrow\",\n { \"hds-card__body-action-arrow-up-right\": direction === \"up-right\" },\n className as undefined,\n )}\n ref={ref}\n />\n );\n },\n);\nCardBodyActionArrow.displayName = \"Card.BodyActionArrow\";\n\nexport interface CardBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport interface CardSlimAndMiniatureProps extends CardBaseProps {\n /**\n * Change the default rendered element for Card.\n */\n as?: \"section\" | \"div\" | \"article\" | \"aside\";\n /**\n * Allows for a horizontal variant for sizes above small.\n *\n * @default \"slim\"\n */\n variant?: \"slim\" | \"miniature\";\n /**\n * The color of the card.\n *\n * @default \"lighter-brand\"\n * */\n color?: \"white\" | \"lighter-brand\" | \"light-grey-fill\";\n\n /* Only fullwidth or focus cards can have images to the left or right of the text: */\n imagePosition?: never;\n}\n\nexport interface CardFocusProps extends CardBaseProps {\n as?: \"section\" | \"div\" | \"article\" | \"aside\";\n variant: \"focus\";\n color?: \"darker\";\n /**\n * fullwidth or focus cards can have images to the left or right of the text.\n *\n * @default \"left\"\n * */\n imagePosition?: \"left\" | \"right\";\n}\n\nexport interface CardFullwidthProps extends CardBaseProps {\n as?: \"section\" | \"div\" | \"article\" | \"aside\";\n variant: \"full-width\";\n color: \"white\" | \"lighter-brand\" | \"light-grey-fill\";\n /**\n * fullwidth or focus cards can have images to the left or right of the text.\n *\n * @default \"left\"\n * */\n imagePosition?: \"left\" | \"right\";\n}\n\nexport type CardProps = CardSlimAndMiniatureProps | CardFocusProps | CardFullwidthProps;\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n (\n {\n as: Tag = \"section\",\n asChild,\n className,\n children,\n variant = \"slim\",\n color,\n imagePosition,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag;\n const effectiveColor = variant === \"focus\" && !color ? \"darker\" : color;\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-card\",\n { \"hds-card--full-width\": variant === \"full-width\" },\n { \"hds-card--miniature\": variant === \"miniature\" },\n { \"hds-card--focus\": variant === \"focus\" },\n { \"hds-card--slim\": variant === \"slim\" },\n { \"hds-card--color-white\": effectiveColor === \"white\" },\n { \"hds-card--color-light-grey-fill\": effectiveColor === \"light-grey-fill\" },\n { \"hds-card--color-darker\": effectiveColor === \"darker\" },\n { \"hds-card--image-position-right\": imagePosition === \"right\" },\n className as undefined,\n )}\n ref={ref}\n >\n {variant === \"full-width\" ? (\n <div className={clsx(\"hds-card__layoutwrapper\", className as undefined)}>{children}</div>\n ) : (\n children\n )}\n </Component>\n );\n },\n) as CardType;\nCard.displayName = \"Card\";\n\nCard.Media = CardMedia;\nCard.MediaImg = CardMediaImg;\nCard.Body = CardBody;\nCard.BodyHeader = CardBodyHeader;\nCard.BodyHeaderOverline = CardBodyHeaderOverline;\nCard.BodyHeaderTitle = CardBodyHeaderTitle;\nCard.BodyDescription = CardBodyDescription;\nCard.BodyAction = CardBodyAction;\nCard.BodyActionRow = CardBodyActionRow;\nCard.BodyActionArrow = CardBodyActionArrow;\n\ntype CardType = ReturnType<typeof forwardRef<HTMLDivElement, CardProps>> & {\n Media: typeof CardMedia;\n MediaImg: typeof CardMediaImg;\n Body: typeof CardBody;\n BodyHeader: typeof CardBodyHeader;\n BodyHeaderOverline: typeof CardBodyHeaderOverline;\n BodyHeaderTitle: typeof CardBodyHeaderTitle;\n BodyDescription: typeof CardBodyDescription;\n BodyAction: typeof CardBodyAction;\n BodyActionRow: typeof CardBodyActionRow;\n BodyActionArrow: typeof CardBodyActionArrow;\n};\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n /**\n * Either `dt`, `dl`, or `div` 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 const DescriptionList = forwardRef<HTMLDListElement, DescriptionListProps>(\n ({ variant = \"vertical\", className, ...rest }, ref) => {\n return (\n <dl\n ref={ref}\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 },\n);\nDescriptionList.displayName = \"DescriptionList\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface FigureProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Figure>\n * <img src=\"https://placedog.net/500/280\" alt=\"A very good dog\" />\n * <figcaption>Dogs are the best</figcaption>\n * </Figure>\n * ```\n */\nexport const Figure = forwardRef<HTMLQuoteElement, FigureProps>(\n ({ children, asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"figure\";\n return (\n <Component ref={ref} className={clsx(\"hds-figure\", className as undefined)} {...rest}>\n {children}\n </Component>\n );\n },\n);\nFigure.displayName = \"Figure\";\n","import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } from \"../error-message\";\nimport { useFieldsetContext } from \"../fieldset\";\n\nexport type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> & {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n title?: string;\n errorMessageProps?: Partial<ErrorMessageProps>;\n} & (\n | {\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Checkboxes in the Fieldset component.\n * When providing an errorMessage to Fieldset, all contained Checkboxes will get correct hasError state.\n *\n * You can use this when your checkbox is part of a non-HDS fieldset which shows an error message.\n */\n hasError?: boolean;\n errorMessage?: never;\n }\n | {\n hasError?: never;\n /**\n * Set an error message to add error styling, and display the error message.\n * The component will take care of aria to connect the error message to the checkbox.\n *\n * Use this when your checkbox is standalone (not part of a fieldset).\n */\n errorMessage?: ReactNode;\n }\n );\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n variant = \"plain\",\n hasError: hasErrorProp,\n errorMessage,\n errorMessageProps,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const errorMessageId = useId();\n const { hasError: hasFieldsetError } = useFieldsetContext();\n const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;\n\n return (\n <div className={clsx(\"hds-checkbox-wrapper\")}>\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\n {...rest}\n aria-invalid={hasError ? true : undefined}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n ref={ref}\n type=\"checkbox\"\n />\n <span aria-hidden className=\"hds-checkbox__checkmark\" />\n {title ? <p className=\"hds-checkbox__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n <ErrorMessage id={errorMessageId} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </div>\n );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, type ReactNode } from \"react\";\n\nexport interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n id: string;\n className?: string;\n}\n\nexport const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(\n ({ children, id, className, ...rest }, ref) => {\n return (\n <div\n aria-live=\"polite\"\n className={clsx(\"hds-error-message\", className as undefined)}\n id={id}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\nErrorMessage.displayName = \"ErrorMessage\";\n","import { useId, forwardRef, createContext, useContext } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n /**\n * Providing an errorMessage will also give contained Checkboxes or Radio buttons\n * error styling and aria to indicate invalid state.\n *\n * For Radio buttons you are even better off using RadioGroup.\n */\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n errorMessageProps?: Partial<ErrorMessageProps>;\n}\n\nconst FieldsetContext = createContext<{ hasError: boolean }>({ hasError: false });\n\nexport const useFieldsetContext = () => useContext(FieldsetContext);\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n errorMessageProps,\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 <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage) }}>\n {children}\n </FieldsetContext.Provider>\n <ErrorMessage id={errorMessageId} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </fieldset>\n );\n});\n","import { forwardRef, useRef, type InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup, type InputGroupProps } from \"../input-group\";\nimport { useMergeRefs } from \"../../utils/utils\";\n\nexport type DatePickerProps = Omit<\n InputGroupProps & InputHTMLAttributes<HTMLInputElement>,\n \"children\" | \"type\"\n> & {\n /**\n * Accessible title for the calendar button\n *\n * This button currently only shows in Chrome.\n *\n * @defaultValue \"Åpne kalender\"\n */\n calendarButtonTitle?: string;\n};\n\n/**\n * A basic implementation of a date picker\n *\n * This date picker is an implementation of native date picker, as you get\n * with `<input type=\"date\" />`, where the input field is dressed in Hedwig styling.\n *\n * Due to accessibility concerns you will only see the appropriate Hedwig calendar\n * icon in Chrome. Firefox will show built in icon and Safari will show no icon.\n * Not tested in Edge.\n */\nexport const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function DatePicker(\n {\n className,\n variant,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n disabled,\n readOnly,\n calendarButtonTitle = \"Åpne kalender\",\n ...rest\n },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n const mergedRef = useMergeRefs([inputRef, ref]);\n\n return (\n <InputGroup\n className={clsx(\"hds-date-picker\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n variant={variant}\n >\n {(inputProps) => (\n <>\n <input\n {...rest}\n {...inputProps}\n disabled={disabled}\n readOnly={readOnly}\n ref={mergedRef}\n type=\"date\"\n />\n <button\n className={clsx(\"hds-date-picker__calendar-button\")}\n type=\"button\"\n title={calendarButtonTitle}\n onClick={() => {\n inputRef.current?.showPicker();\n }}\n />\n </>\n )}\n </InputGroup>\n );\n});\n\nDatePicker.displayName = \"DatePicker\";\n","import { useId, forwardRef, Children, isValidElement, cloneElement } from \"react\";\nimport type { LabelHTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } 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 errorMessageProps?: Partial<ErrorMessageProps>;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * `children` must be either a single input element or a render function.\n *\n * If you use a render function, make sure you spread the input props to the appropriate element.\n */\n children: Exclude<ReactNode, Iterable<ReactNode>> | ((inputProps: InputProps) => ReactNode);\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n variant = \"default\",\n errorMessage,\n errorMessageProps,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n const inputId = useId();\n\n const renderInput = () => {\n const inputProps: InputProps = {\n \"aria-describedby\": errorMessage ? errorMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n className: clsx(\"hds-input-group__input\"),\n };\n\n if (typeof children === \"function\") {\n return children(inputProps);\n }\n\n const input: ReactNode = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n className: `${inputProps.className} ${input.props.className ?? \"\"}`,\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${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} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </div>\n );\n});\n","import * as React from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/useMergeRefs\n */\nexport function useMergeRefs<Instance>(\n refs: (React.Ref<Instance> | undefined)[],\n): React.RefCallback<Instance> | null {\n return React.useMemo(() => {\n if (refs.every((ref) => ref === null)) {\n return null;\n }\n\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null) {\n (ref as React.MutableRefObject<Instance | null>).current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, refs);\n}\n\nexport function useResize<Instance extends HTMLElement>(\n ref: React.RefObject<Instance> | undefined | null,\n): { width: number; height: number } {\n const [width, setWidth] = useState<number>(0);\n const [height, setHeight] = useState<number>(0);\n const handleResize = useCallback(() => {\n if (ref?.current !== null) {\n setWidth(ref?.current?.offsetWidth ?? 0);\n setHeight(ref?.current?.offsetHeight ?? 0);\n }\n }, [ref]);\n useEffect(() => {\n window.addEventListener(\"load\", handleResize);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"load\", handleResize);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [ref, handleResize]);\n useEffect(() => {\n handleResize();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, []);\n return { width, height };\n}\n\nfunction subscribe() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- It's ok\n return () => {};\n}\n\nexport function useHydrated() {\n return React.useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n\n/**\n * Trap focus inside an element using the `inert` attribute.\n *\n * Adds `inert` to all siblings of the given element, and all their ancestors up to the body.\n * Returns a cleanup function which removes the `inert` property from the elements, effectively giving focus back to rest of the document.\n *\n * NOTE: Does not support portals, i.e. elements outside the DOM hierarchy of the given element.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n * @see https://web.dev/articles/inert\n */\nexport function focusTrap(element: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- NOP on focus trapping the body element\n if (element === document.body) return () => {};\n\n let inertElements: HTMLElement[] = [];\n for (let el: HTMLElement | null = element; el; el = el.parentElement) {\n if (el === document.body) break;\n\n for (const sibling of el.parentElement?.children ?? []) {\n if (sibling === el) continue;\n if (!(sibling instanceof HTMLElement)) continue;\n if (sibling.hasAttribute(\"inert\")) continue;\n\n sibling.setAttribute(\"inert\", \"true\");\n inertElements.push(sibling);\n }\n }\n\n return () => {\n releaseFocusTrap(inertElements);\n inertElements = [];\n };\n}\n\n/**\n * Unset the `inert` attribute on all elements given\n */\nfunction releaseFocusTrap(inertElements: Iterable<HTMLElement>) {\n for (const el of inertElements) {\n el.removeAttribute(\"inert\");\n }\n}\n","import { forwardRef, useEffect, useRef } from \"react\";\nimport { Message, type MessageProps, type MessageTitleProps } from \"../../message\";\nimport { UnorderedList, type ListProps } from \"../../list\";\nimport { Link } from \"../../link\";\nimport { useMergeRefs } from \"../../utils\";\nimport { focusWithLegendOrLabelInViewport } from \"./focus\";\n\ninterface ErrorSummaryHeadingPropsAutoFocus {\n /**\n * The heading will be focused when the component mounts\n *\n * On following errornous form submissions you should manually focus the heading\n * e.g. by passing a ref and calling `ref.current.focus()`\n *\n * @default true\n */\n autoFocus?: boolean;\n}\n\ninterface ErrorSummaryHeadingPropsAs {\n /**\n * A heading level must be selected, or optionally opting out for a different element\n *\n * Use {@link ErrorSummaryHeadingPropsAsChild.asChild} if you need more control of the rendered element.\n */\n as: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n}\n\ninterface ErrorSummaryHeadingPropsAsChild {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild: true;\n as?: never;\n}\n\nexport type ErrorSummaryHeadingProps = MessageTitleProps &\n ErrorSummaryHeadingPropsAutoFocus &\n (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild);\n\nexport const ErrorSummaryHeading = forwardRef<\n HTMLParagraphElement,\n ErrorSummaryHeadingProps & (ErrorSummaryHeadingPropsAs | ErrorSummaryHeadingPropsAsChild)\n>(({ children, as: Tag, autoFocus = true, ...rest }, ref) => {\n const focusRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs([focusRef, ref]);\n\n useEffect(() => {\n /**\n * Hack: Safari 18 on mac at the time of writing\n * does not correctly focus it with VoiceOver without the timeout\n */\n setTimeout(() => {\n if (focusRef.current && autoFocus) {\n focusRef.current.focus();\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Only on initial render\n }, []);\n\n return (\n <Message.Title ref={mergedRef} tabIndex={-1} asChild {...rest}>\n {Tag ? <Tag>{children}</Tag> : children}\n </Message.Title>\n );\n});\nErrorSummaryHeading.displayName = \"ErrorSummary.Heading\";\n\nexport interface ErrorSummaryListProps extends ListProps {\n /**\n * Sets the size of the items (font)\n *\n * @default \"small\"\n */\n size?: ListProps[\"size\"];\n}\nexport const ErrorSummaryList = forwardRef<HTMLUListElement, ErrorSummaryListProps>(\n ({ children, style: _style, size = \"small\", ...rest }, ref) => {\n const style = {\n // Match the link `solid` style, which black underline\n \"--_hds-list-marker-color\": \"var(--hds-ui-colors-black)\",\n ..._style,\n };\n return (\n <Message.Description asChild>\n <UnorderedList size={size} ref={ref} style={style} {...rest}>\n {children}\n </UnorderedList>\n </Message.Description>\n );\n },\n);\nErrorSummaryList.displayName = \"ErrorSummary.List\";\n\nexport interface ErrorSummaryItemProps extends React.HTMLAttributes<HTMLLIElement> {\n /**\n * A hash link to the element that the error message refers to\n *\n * Must start with \"#\" as it's passed to the `href` attribute of an anchor element\n *\n * @example \"#email\"\n */\n href: `#${string}`;\n\n /**\n * Extra props to pass to the link element\n */\n linkProps?: React.AnchorHTMLAttributes<HTMLAnchorElement>;\n}\nexport const ErrorSummaryItem = forwardRef<HTMLLIElement, ErrorSummaryItemProps>(\n ({ children, href, linkProps, ...rest }, ref) => {\n function onClick(e: React.MouseEvent<HTMLAnchorElement>) {\n linkProps?.onClick?.(e);\n if (focusWithLegendOrLabelInViewport(href.replace(\"#\", \"\"))) {\n e.preventDefault();\n }\n }\n\n return (\n <li ref={ref} {...rest}>\n <Link size=\"small\" href={href} variant=\"solid\" {...linkProps} onClick={onClick}>\n {children}\n </Link>\n </li>\n );\n },\n);\nErrorSummaryItem.displayName = \"ErrorSummary.Item\";\n\nexport type ErrorSummaryProps = Omit<MessageProps, \"variant\" | \"icon\" | \"iconClassName\">;\n\nexport const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(\n ({ children, ...rest }, ref) => {\n return (\n <Message variant=\"warning\" ref={ref} {...rest}>\n {children}\n </Message>\n );\n },\n) as ErrorSummaryType;\nErrorSummary.displayName = \"ErrorSummary\";\n\ntype ErrorSummaryType = ReturnType<typeof forwardRef<HTMLDivElement, ErrorSummaryProps>> & {\n Heading: typeof ErrorSummaryHeading;\n List: typeof ErrorSummaryList;\n Item: typeof ErrorSummaryItem;\n};\nErrorSummary.Heading = ErrorSummaryHeading;\nErrorSummary.List = ErrorSummaryList;\nErrorSummary.Item = ErrorSummaryItem;\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageTitle = forwardRef<HTMLParagraphElement, MessageTitleProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 interface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageDescription = forwardRef<HTMLParagraphElement, MessageDescriptionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\" | \"info\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\" | \"asChild\">;\n\nexport const Message = forwardRef<HTMLDivElement, MessageProps>(\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) as MessageType;\nMessage.displayName = \"Message\";\n\ntype MessageType = ReturnType<typeof forwardRef<HTMLDivElement, MessageProps>> & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\nMessage.Title = MessageTitle;\nMessage.Description = MessageDescription;\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface ListProps extends HTMLAttributes<HTMLOListElement | HTMLUListElement> {\n /**\n * Sets the size of the items (font)\n *\n * @default \"medium\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\n/**\n * An unordered list of simple items, often text. You can nest other lists inside this component.\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <UnorderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </UnorderedList>\n * ```\n */\nexport const UnorderedList = forwardRef<HTMLUListElement, ListProps>(\n ({ size = \"medium\", className, ...rest }, ref) => {\n return (\n <ul\n ref={ref}\n className={clsx(\"hds-list\", `hds-list--${size}`, className as undefined)}\n {...rest}\n />\n );\n },\n);\nUnorderedList.displayName = \"UnorderedList\";\n\n/**\n * An ordered list of simple items\n *\n * If you have other list needs, you can build your own using the semantic `ul` and `ol` tags.\n *\n * @example\n * ```tsx\n * <OrderedList>\n * <li>Item 1</li>\n * <li>Item 2</li>\n * <li>Item 3</li>\n * </OrderedList>\n * ```\n */\nexport const OrderedList = forwardRef<HTMLOListElement, ListProps>(\n ({ size = \"medium\", className, ...rest }, ref) => {\n return (\n <ol\n ref={ref}\n className={clsx(\"hds-list\", `hds-list--${size}`, className as undefined)}\n {...rest}\n />\n );\n },\n);\nOrderedList.displayName = \"OrderedList\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\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 const LinkList = forwardRef<HTMLUListElement, LinkListProps>(\n ({ className, ...rest }, ref) => {\n return (\n <UnorderedList\n ref={ref}\n className={clsx(\"hds-list--link-list\", className as undefined)}\n {...rest}\n />\n );\n },\n);\nLinkList.displayName = \"LinkList\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The visual style of the link\n */\n variant?: \"underline\" | \"solid\" | \"inverted\" | \"no-underline\" | \"inverted-no-underline\";\n\n /**\n * Font size of the link\n * @default \"default\"\n */\n size?: \"default\" | \"small\" | \"large\" | \"technical\";\n\n /**\n * Specify that there is an icon in the link.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n */\n icon?: \"leading\" | \"trailing\";\n\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n { asChild, children, variant = \"underline\", size = \"default\", icon, className, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"a\";\n\n return (\n <Component\n className={clsx(\n \"hds-link\",\n variant !== \"underline\" && `hds-link--${variant}`,\n size !== \"default\" && `hds-link--${size}`,\n { \"hds-link--trailing-icon\": icon === \"trailing\" },\n { \"hds-link--leading-icon\": icon === \"leading\" },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nLink.displayName = \"Link\";\n","import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { useMergeRefs } from \"./utils\";\n\nexport interface AutoAnimateHeightProps extends React.HTMLAttributes<HTMLDivElement> {\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 * Callback fired when animiation transition ends\n * Use this to do effects after resizing is done, e.g. scrolling to the element\n * using `element.scrollIntoView()`\n */\n onTransitionEnd?: () => void;\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 = forwardRef<HTMLDivElement, AutoAnimateHeightProps>(\n (\n {\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n onTransitionEnd,\n ...rest\n },\n ref,\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([rootRef, ref]);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<{ height: number; shouldAnimate: boolean } | undefined>(\n undefined,\n );\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n\n useEffect(() => {\n if (!rootRef.current) return;\n if (!measurementRef.current) return;\n if (document.body.scrollHeight === 0) return;\n const currentMeasurement = measurementRef.current;\n const { height: newHeight } = currentMeasurement.getBoundingClientRect();\n\n // Listen for resize events on the measurement element\n // Keep the children in sync with the height\n // But don't animate it.\n let previouslyObservedHeight = newHeight;\n const resizeObserver = new ResizeObserver(() => {\n const { height: resizedHeight } = currentMeasurement.getBoundingClientRect();\n if (resizedHeight === previouslyObservedHeight) return;\n previouslyObservedHeight = resizedHeight;\n setHeight({ height: resizedHeight, shouldAnimate: false });\n });\n resizeObserver.observe(currentMeasurement); // This is cleaned up down below in the return functions\n\n // Set the new height when children changes\n setHeight({ height: newHeight, shouldAnimate: true });\n\n // Update children\n const nextClonedChildren = cloneElement(<>{children}</>, {});\n\n // When increasing in height update immediately so the new content is shown during the animation\n if (newHeight >= (height?.height ?? 0)) {\n setClonedChildren(nextClonedChildren);\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n // When decreasing in height, wait until the animation is done so that we don't get a sudden flash of empty content\n const currentRoot = rootRef.current;\n function onTransitionEndHandler(e: TransitionEvent) {\n if (e.propertyName !== \"height\") return;\n setClonedChildren(nextClonedChildren);\n }\n currentRoot.addEventListener(\"transitionend\", onTransitionEndHandler);\n return () => {\n resizeObserver.disconnect();\n currentRoot.removeEventListener(\"transitionend\", onTransitionEndHandler);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <div\n ref={mergedRef}\n onTransitionEnd={onTransitionEnd}\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n height: height?.height ?? measurementRef.current?.getBoundingClientRect().height,\n transitionProperty: height?.shouldAnimate ? \"height\" : \"none\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n willChange: \"height\",\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </div>\n );\n },\n);\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n","/**\n * Focus a form field while showing the associated legend or label in the viewport.\n *\n * Gives the user a better context of what field they are focusing on.\n *\n * Copied from https://github.com/alphagov/govuk-frontend/blob/cbf4ef1e329711be5b78a92bda6ba84a7db9ca40/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs#L60-L108\n */\nexport function focusWithLegendOrLabelInViewport(id: string) {\n const input = document.getElementById(id);\n if (!input) {\n return false;\n }\n\n const legendOrLabel = maybeLegendForInput(input) ?? labelForInput(input);\n if (!legendOrLabel) {\n return false;\n }\n\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n\n return true;\n}\n\nfunction maybeLegendForInput(input: HTMLElement) {\n const fieldset = input.closest(\"fieldset\");\n if (!fieldset) {\n return null;\n }\n\n const legend = fieldset.querySelector(\"legend\");\n if (!legend) {\n return null;\n }\n\n // If the input type is radio or checkbox, always use the legend if\n // there is one.\n if (input instanceof HTMLInputElement && (input.type === \"checkbox\" || input.type === \"radio\")) {\n return legend;\n }\n\n // For other input types, only scroll to the fieldset’s legend (instead\n // of the label associated with the input) if the input would end up in\n // the top half of the screen.\n //\n // This should avoid situations where the input either ends up off the\n // screen, or obscured by a software keyboard.\n const legendTop = legend.getBoundingClientRect().top;\n const inputRect = input.getBoundingClientRect();\n\n // If the browser doesn't support Element.getBoundingClientRect().height\n // or window.innerHeight (like IE8), bail and just link to the label.\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return legend;\n }\n }\n}\n\nfunction labelForInput(input: HTMLElement) {\n return (\n document.querySelector(`label[for='${input.getAttribute(\"id\")}']`) ?? input.closest(\"label\")\n );\n}\n","import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\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 { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useFieldsetContext } from \"../fieldset\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radio-group\";\n\nexport interface RadioButtonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Radio buttons in the RadioGroup component.\n * When providing an errorMessage to RadioGroup, all contained Radio buttons will get correct hasError state.\n *\n * You can use this when your Radio button is part of a non-HDS fieldset which shows an error message.\n */\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 {\n value: selectedValue,\n hasError: hasRadioGroupError,\n ...context\n } = useRadioGroupContext();\n const { hasError: hasFieldsetError } = useFieldsetContext();\n const hasError = hasFieldsetError || hasRadioGroupError || hasErrorProp;\n\n return (\n <div\n className={clsx(\n \"hds-radio-button\",\n {\n [`hds-radio-button--${variant}`]: variant === \"bounding-box\",\n \"hds-radio-button--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-radio-button__checkmark\" />\n {title ? <p className=\"hds-radio-button__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadioButton.displayName = \"RadioButton\";\n","import {\n type ChangeEventHandler,\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n} from \"react\";\nimport { Fieldset, type FieldsetProps } from \"../fieldset\";\nimport type { RadioButtonProps } from \"./radio-button\";\n\nexport interface RadioGroupProps extends Omit<FieldsetProps, \"onChange\"> {\n children: ReactNode;\n /** Will be passed to all Radio buttons within the radio group */\n name?: 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, and will also give contained Radio buttons\n * error styling and aria to indicate invalid state.\n */\n errorMessage?: ReactNode;\n /** Will be passed to all Radio buttons 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 name: undefined,\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 { forwardRef, type ReactNode , type SelectHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\nexport type SelectProps = Omit<\n InputGroupProps & SelectHTMLAttributes<HTMLSelectElement>,\n \"readOnly\" | \"children\"\n> & { children: ReactNode };\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 { forwardRef, type HTMLAttributes, type ReactElement } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Accordion } from \"../accordion\";\nimport { LinkList } from \"../list/link-list\";\nimport { Button } from \"../button\";\n\ninterface FooterLogoProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\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 FooterLogo = forwardRef<HTMLDivElement, FooterLogoProps>(\n ({ children, className, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(`hds-footer__logo`, className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n },\n);\nFooterLogo.displayName = \"Footer.Logo\";\n\nexport interface FooterButtonLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const FooterButtonLink = forwardRef<HTMLAnchorElement, FooterButtonLinkProps>(\n ({ children, className, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"a\";\n return (\n <Button asChild variant=\"inverted\" className={clsx(className as undefined)}>\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n </Button>\n );\n },\n);\nFooterButtonLink.displayName = \"FooterButton\";\n\ninterface FooterLinkSectionsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<FooterLinkSectionProps> | ReactElement<FooterLinkSectionProps>[];\n}\n\n/**\n * Responsive sections of links. Will become an accordion on mobile.\n *\n * Use with {@link FooterLinkSection} for each section.\n */\nexport const FooterLinkSections = forwardRef<HTMLDivElement, FooterLinkSectionsProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <>\n {/* Mobile and Desktop. The accordion styling gets removed on desktop */}\n <Accordion\n className={clsx(\"hds-footer__link-sections\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {/* @ts-expect-error -- It's ok */}\n {children}\n </Accordion>\n </>\n );\n },\n);\nFooterLinkSections.displayName = \"Footer.LinkSections\";\n\ninterface FooterLinkSectionProps extends HTMLAttributes<HTMLDivElement> {\n heading: React.ReactNode;\n children: React.ReactNode;\n}\n\nexport const FooterLinkSection = forwardRef<HTMLDivElement, FooterLinkSectionProps>(\n ({ heading, children, className, ...rest }, ref) => {\n // @ts-expect-error -- It's ok\n const linkListChildren = <LinkList>{children}</LinkList>;\n return (\n <>\n {/* Mobile */}\n <Accordion.Item\n className={clsx(`hds-footer__link-section`, className as undefined)}\n ref={ref}\n {...rest}\n >\n <Accordion.Header>{heading}</Accordion.Header>\n <Accordion.Content>{linkListChildren}</Accordion.Content>\n </Accordion.Item>\n\n {/* Desktop */}\n <div className={clsx(`hds-footer__link-section`, className as undefined)}>\n <h2>{heading}</h2>\n {linkListChildren}\n </div>\n </>\n );\n },\n);\nFooterLinkSection.displayName = \"Footer.LinkSection\";\n\nexport interface FooterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Footer variant\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"slim\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Footer = forwardRef<HTMLDivElement, FooterProps>(\n ({ children, className, variant, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"footer\";\n return (\n <Component\n className={clsx(\n `hds-footer`,\n variant === \"slim\" && \"hds-footer--slim\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n) as FooterType;\nFooter.displayName = \"Footer\";\n\ntype FooterType = ReturnType<typeof forwardRef<HTMLDivElement, FooterProps>> & {\n Logo: typeof FooterLogo;\n ButtonLink: typeof FooterButtonLink;\n LinkSections: typeof FooterLinkSections;\n LinkSection: typeof FooterLinkSection;\n};\n\nFooter.Logo = FooterLogo;\nFooter.ButtonLink = FooterButtonLink;\nFooter.LinkSections = FooterLinkSections;\nFooter.LinkSection = FooterLinkSection;\n","import * as Popover from \"@radix-ui/react-popover\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Box } from \"../box\";\n\ninterface HelpTextProps extends React.HTMLAttributes<HTMLButtonElement> {\n className?: string;\n\n /**\n * The content of the help text, often a word or phrase that could use some explanation\n */\n children: React.ReactNode;\n\n /**\n * The help text that will be shown when the user clicks the trigger\n */\n helpText: React.ReactNode;\n\n /**\n * The title of the help text. Used by screen readers and if the user hover over the help text\n */\n title?: string;\n\n /**\n * Props for the `Box` that contains the help text\n */\n boxProps?: React.ComponentProps<typeof Box>;\n\n /**\n * The side of the trigger the popover should be attached to\n *\n * @default \"top\"\n */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n\n /**\n * The alignment of the popover content\n *\n * @default \"start\"\n */\n align?: \"center\" | \"end\" | \"start\";\n}\n\n/**\n * Show a help text for a word or phrase when clicked\n *\n * Useful for providing explanations for domain-specific terms, acronyms or phrases that could do with further elaboration\n *\n * @example\n * ```tsx\n * <p>\n * En annen avgjørende faktor for avgifter er om nettbutikken er registrert i{\" \"}\n * <HelpText helpText={`VOEC er en forkortelse for \"VAT on E-commerce\" (mva. på e-handel).`}>\n * VOEC\n * </HelpText>\n * </p>\n * ```\n */\nexport const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(\n (\n { children, className, helpText, title, side = \"top\", align = \"start\", boxProps, ...rest },\n ref,\n ) => {\n return (\n // NOTE: Using radix's [Popover component](https://www.radix-ui.com/primitives/docs/components/popover)\n // In the future we can use the native popover api, but as of writing, though all browsers support it\n // it's not far enough back to be used in production\n // https://caniuse.com/mdn-html_elements_input_popovertarget\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n ref={ref}\n className={clsx(\"hds-help-text-button\", className as undefined)}\n title={title}\n type=\"button\"\n {...rest}\n >\n {children}\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content asChild side={side} align={align}>\n <Box\n {...boxProps}\n className={clsx(\"hds-help-text-box\", boxProps?.className as undefined)}\n >\n <Popover.Close asChild>\n <Box.CloseButton />\n </Popover.Close>\n {helpText}\n </Box>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n },\n);\nHelpText.displayName = \"HelpText\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"slim\";\n children: ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link ContainerProps.asChild} if you need more control of the rendered element.\n */\n as?: \"div\" | \"section\" | \"aside\" | \"main\" | \"article\" | \"header\" | \"footer\";\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 = forwardRef<HTMLDivElement, ContainerProps>(\n ({ as: Tag = \"div\", asChild, className, children, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : Tag;\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 { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\nimport { type SpacingSizes, type ResponsiveSpacingSizes, getSpacingVariable } from \"../spacing\";\n\nexport interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Column span for the grid item\n *\n * `default` is `12`\n */\n span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;\n\n /**\n * Center the grid item horizontally\n *\n * Offsets the start position of the grid item relative to it's span so that it appears centered.\n *\n * assumes a span of 2, 4, 6, 8, or 10\n *\n * a span of `12` is 100% width and centering has no effect\n *\n * `default` is `false`\n */\n center?: ResponsiveProp<boolean>;\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/**\n * 🚧 Grid.Item\n *\n * Use as the direct child of a `Grid` to override `span` and `center` for individual items.\n */\nexport const GridItem = forwardRef<HTMLDivElement, GridItemProps>(\n ({ children, asChild, className, span, center, style: _style, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n const style: React.CSSProperties = {\n ..._style,\n ...getResponsiveProps(\"--hds-grid-item-span\", span),\n ...getResponsiveProps(\"--hds-grid-item-center\", center, (value) => (value ? \"1\" : \"0\")),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-grid__item\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nGridItem.displayName = \"Grid.Item\";\n\nexport interface GridProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Space between grid items. Both horizontal and vertical.\n *\n * Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.\n *\n * Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.\n *\n * Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.\n */\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between grid items horizontally\n */\n gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between grid items vertically\n */\n gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Column span for the grid items\n *\n * `default` is `12`\n */\n span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;\n\n /**\n * Center grid items horizontally\n *\n * Offsets the start position of the grid items relative to their span so that it appears centered.\n *\n * assumes a span of 2, 4, 6, 8, or 10\n *\n * a span of `12` is 100% width and centering has no effect\n *\n * `default` is `false`\n */\n center?: ResponsiveProp<boolean>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * A simple opionated abstraction over CSS Grid.\n *\n * The grid is always a 12 column grid.\n *\n * @example\n * ```tsx\n * <Grid gap=\"12-16\" span={{ small: 6 }}>\n * <div>6/12</div>\n * <div>6/12</div>\n * <Grid.Item span={{ small: 12 }}>12/12</Grid.Item>\n * <div>6/12</div>\n * <div>6/12</div>\n * </Grid>\n * ```\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n (\n { children, asChild, className, span, center, style: _style, gap, gapX, gapY, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: React.CSSProperties = {\n ..._style,\n ...getResponsiveProps(\"--hds-grid-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-gap-x\", gapX, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-gap-y\", gapY, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-span\", span),\n ...getResponsiveProps(\"--hds-grid-center\", center, (value) => (value ? \"1\" : \"0\")),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-grid\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n) as GridType;\nGrid.displayName = \"Grid\";\n\ntype GridType = ReturnType<typeof forwardRef<HTMLDivElement, GridProps>> & {\n Item: typeof GridItem;\n};\n\nGrid.Item = GridItem;\n","type Breakpoints = \"initial\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-initial`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Space between items. Both horizontal and vertical.\n *\n * Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.\n *\n * Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.\n *\n * Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.\n */\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between items horizontally\n */\n gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between items vertically\n */\n gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n asChild,\n className,\n style: _style,\n gap,\n gapX,\n gapY,\n direction,\n wrap,\n align,\n justify,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-gap-x\", gapX, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-gap-y\", gapY, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","import { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box } from \"../box/box\";\nimport { useMergeRefs } from \"../utils/utils\";\n\ninterface ModalHeaderProps extends React.HTMLAttributes<HTMLHeadingElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalHeader = forwardRef<HTMLHeadingElement, ModalHeaderProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"h1\";\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\ninterface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalContent = forwardRef<HTMLDivElement, ModalContentProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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\ninterface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"footer\";\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 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 * ```tsx\n * const modalRef = useRef<HTMLDialogElement>(null);\n * const onClose = () => modalRef.current?.close();\n *\n * return (\n * <>\n * <Button onClick={() => modalRef.current?.showModal()}>Open Modal</Button>\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>\n * <HStack gap=\"16\" wrap>\n * <Button onClick={onMainAction}>Main action</Button>\n * <Button variant=\"secondary\" onClick={onClose}>\n * Cancel\n * </Button>\n * </HStack>\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 asChild\n className={clsx(\"hds-modal\", className as undefined)}\n closeable\n onClick={onDialogClick}\n onClose={onCloseButtonClick}\n variant=\"white\"\n >\n <dialog ref={mergedRef} {...rest}>\n {children}\n </dialog>\n </Box>\n );\n },\n) as ModalType;\nModal.displayName = \"Modal\";\n\ntype ModalType = ReturnType<typeof forwardRef<HTMLDialogElement, ModalProps>> & {\n Header: typeof ModalHeader;\n Content: typeof ModalContent;\n Footer: typeof ModalFooter;\n};\n\nModal.Header = ModalHeader;\nModal.Content = ModalContent;\nModal.Footer = ModalFooter;\n\nfunction 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 { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n NavbarExpandableMenu,\n NavbarExpandableMenuContent,\n NavbarExpandableMenuTrigger,\n} from \"./navbar-expandable-menu\";\n\ninterface NavbarLogoProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\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 = forwardRef<HTMLDivElement, NavbarLogoProps>(\n ({ children, className, asChild, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(`hds-navbar__logo`, className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\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 *\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 * @default false\n */\n asChild?: boolean;\n}\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\ninterface NavbarItemIconProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n/**\n * Icon to be used inside a `Navbar.Item`, `Navbar.ButtonItem`, or `Navbar.LinkItem`\n */\nexport const NavbarItemIcon = forwardRef<HTMLDivElement, NavbarItemIconProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <Slot className={clsx(\"hds-navbar__item-icon\", className as undefined)} ref={ref} {...rest}>\n {children}\n </Slot>\n );\n },\n);\nNavbarItemIcon.displayName = \"Navbar.ItemIcon\";\n\ninterface NavbarItemProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Generic Navbar item\n *\n * Use `Navbar.ButtonItem` or `Navbar.LinkItem` for links and buttons\n */\nexport const NavbarItem = forwardRef<HTMLDivElement, NavbarItemProps>(\n ({ asChild, children, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(\"hds-navbar__item\", className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n },\n);\nNavbarItem.displayName = \"Navbar.Item\";\n\ninterface NavbarButtonItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const NavbarButtonItem = forwardRef<HTMLButtonElement, NavbarButtonItemProps>(\n ({ asChild, children, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"button\";\n return (\n <Component\n className={clsx(\"hds-navbar__item\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nNavbarButtonItem.displayName = \"Navbar.ButtonItem\";\n\ninterface NavbarLinkItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const NavbarLinkItem = forwardRef<HTMLAnchorElement, NavbarLinkItemProps>(\n ({ asChild, children, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"a\";\n return (\n <Component className={clsx(\"hds-navbar__item\", className as undefined)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n },\n);\nNavbarLinkItem.displayName = \"Navbar.LinkItem\";\n\ninterface NavbarNavigationProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const NavbarNavigation = forwardRef<HTMLDivElement, NavbarNavigationProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-navbar__navigation\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nNavbarNavigation.displayName = \"Navbar.Navigation\";\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 * @default \"default\"\n */\n variant?: \"default\" | \"service\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Navbar = forwardRef<HTMLDivElement, NavbarProps>(\n ({ asChild, children, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"header\";\n return (\n <Component\n className={clsx(\"hds-navbar\", variant && `hds-navbar--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n) as NavbarType;\nNavbar.displayName = \"Navbar\";\n\ntype NavbarType = ReturnType<typeof forwardRef<HTMLDivElement, NavbarProps>> & {\n Logo: typeof NavbarLogo;\n LogoAndServiceText: typeof NavbarLogoAndServiceText;\n ExpandableMenu: typeof NavbarExpandableMenu;\n ExpandableMenuTrigger: typeof NavbarExpandableMenuTrigger;\n ExpandableMenuContent: typeof NavbarExpandableMenuContent;\n Item: typeof NavbarItem;\n ButtonItem: typeof NavbarButtonItem;\n LinkItem: typeof NavbarLinkItem;\n ItemIcon: typeof NavbarItemIcon;\n Navigation: typeof NavbarNavigation;\n};\n\nNavbar.Logo = NavbarLogo;\nNavbar.LogoAndServiceText = NavbarLogoAndServiceText;\nNavbar.ExpandableMenu = NavbarExpandableMenu;\nNavbar.ExpandableMenuTrigger = NavbarExpandableMenuTrigger;\nNavbar.ExpandableMenuContent = NavbarExpandableMenuContent;\nNavbar.Item = NavbarItem;\nNavbar.ButtonItem = NavbarButtonItem;\nNavbar.LinkItem = NavbarLinkItem;\nNavbar.ItemIcon = NavbarItemIcon;\nNavbar.Navigation = NavbarNavigation;\n","import { createContext, useContext, forwardRef, useState, useEffect, useId } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { focusTrap } from \"../utils/utils\";\nimport { CloseIcon, MenuIcon } from \"./icons\";\n\ninterface ExpandableMenuContextProps {\n open: boolean;\n setOpen: (open: boolean) => void;\n contentId: string;\n}\n\nconst ExpandableMenuContext = createContext<ExpandableMenuContextProps | null>(null);\nexport const useNavbarExpendableMenuContext = () => {\n const value = useContext(ExpandableMenuContext);\n if (value === null) {\n throw new Error(\"useNavbarExpendableMenuContext must be used within a Navbar.ExpandableMenu\");\n }\n return value;\n};\n\nexport interface NavbarExpandableMenuProps {\n children: React.ReactNode;\n}\n\n/**\n * Expandable Menu Provider\n * Handles scroll and focus locking,\n * as well as scrolling the user to the top of the page.\n *\n * If we want a sticky header in the future the scrolling should be configurable\n */\nexport function NavbarExpandableMenu({ children }: NavbarExpandableMenuProps) {\n const contentId = useId();\n const [open, setOpen] = useState(false);\n\n useEffect(() => {\n if (open) {\n window.scrollTo(0, 0);\n document.body.classList.add(clsx(\"hds-navbar-scroll-lock\"));\n const releaseFocusTrap = focusTrap(\n document.getElementsByClassName(clsx(\"hds-navbar\"))[0] as HTMLElement,\n );\n\n return () => {\n document.body.classList.remove(clsx(\"hds-navbar-scroll-lock\"));\n releaseFocusTrap();\n };\n }\n }, [open]);\n\n return (\n <ExpandableMenuContext.Provider value={{ contentId, open, setOpen }}>\n {children}\n </ExpandableMenuContext.Provider>\n );\n}\n\nNavbarExpandableMenu.displayName = \"NavbarExpandableMenu\";\n\n/**\n * Trigger\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}\n\nexport const NavbarExpandableMenuTrigger = forwardRef<\n HTMLButtonElement,\n NavbarExpandableMenuTriggerProps\n>(\n (\n {\n whenClosedText,\n whenClosedHelperTitle,\n\n whenOpenText,\n whenOpenHelperTitle,\n\n style,\n className,\n ...rest\n },\n ref,\n ) => {\n const { contentId, open, setOpen } = useNavbarExpendableMenuContext();\n\n function toggleOpen() {\n setOpen(!open);\n }\n\n return (\n <button\n aria-expanded={open}\n aria-controls={contentId}\n className={clsx(\n \"hds-navbar__item\",\n className as undefined,\n open ? \"hds-navbar__item--open\" : \"hds-navbar__item--closed\",\n )}\n onClick={toggleOpen}\n ref={ref}\n title={open ? whenOpenHelperTitle : whenClosedHelperTitle}\n type=\"button\"\n style={{ position: \"relative\", ...style }}\n {...rest}\n >\n <span className=\"hds-navbar__item-responsive-text\">\n <span aria-hidden={!open} className={clsx(\"hds-navbar__item-whenopentext\")}>\n {whenOpenText}\n </span>\n <span aria-hidden={open} className={clsx(\"hds-navbar__item-whenclosedtext\")}>\n {whenClosedText}\n </span>\n </span>\n <span style={{ width: 32, height: 32 }}>{open ? <CloseIcon /> : <MenuIcon />}</span>\n </button>\n );\n },\n);\nNavbarExpandableMenuTrigger.displayName = \"Navbar.ExpandableMenuTrigger\";\n\n/**\n * Content\n */\nexport interface NavbarExpandableMenuContentProps {\n children: React.ReactNode;\n className?: string;\n}\n\nexport const NavbarExpandableMenuContent = forwardRef<\n HTMLDivElement,\n NavbarExpandableMenuContentProps\n>(({ children, className, ...rest }, ref) => {\n const { contentId, open } = useNavbarExpendableMenuContext();\n return (\n <section\n {...rest}\n id={contentId}\n className={clsx(\"hds-navbar__expandable-menu-content\", className as undefined)}\n data-state={open ? \"open\" : \"closed\"}\n {...{ inert: open ? undefined : \"true\" }}\n ref={ref}\n >\n <div className={clsx(\"hds-navbar__expandable-menu-content-inner\")}>{children}</div>\n </section>\n );\n});\nNavbarExpandableMenuContent.displayName = \"Navbar.ExpandableMenuContent\";\n","export function CloseIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32} viewBox=\"0 0 32 32\">\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport function MenuIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32}>\n <path\n fill=\"currentColor\"\n d=\"M25.938 10.146a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.562-.563-.562H6.063a.57.57 0 0 0-.562.562v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Z\"\n />\n </svg>\n );\n}\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 * ```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","/* eslint-disable @typescript-eslint/no-unsafe-assignment -- Typings for the differnt html elements */\n/* eslint-disable @typescript-eslint/no-explicit-any -- Typings for the differnt html elements */\n\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\ninterface DimensionsFromWidthAndHeight {\n height?: number | string;\n width?: number | string;\n}\n\ninterface SkeletonPropsInner extends React.HTMLAttributes<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 /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link SkeletonProps.asChild} if you need more control of the rendered element.\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\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 = forwardRef<HTMLDivElement, SkeletonProps>(\n (\n {\n as: Tag = \"div\",\n asChild,\n children,\n animation = true,\n variant = \"text\",\n width,\n height,\n className,\n style,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag;\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 aria-hidden\n {...{ inert: \"true\" }}\n ref={ref as any}\n {...(rest as any)}\n >\n {children}\n </Component>\n );\n },\n);\nSkeleton.displayName = \"Skeleton\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\ninterface SpinnerPropsInner extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The size of the Spinner\n *\n * @default \"medium\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n\n /**\n * The tooltip title\n *\n * @default \"\"\n */\n title?: string;\n\n /**\n * Delay before the spinner fades in\n *\n * If set to `true`, a default delay of `800ms` will be applied.\n *\n * @example\n * 0.8s\n *\n * @default false\n */\n delay?: `${string}ms` | `${string}s` | boolean;\n}\n\nexport type SpinnerProps = SpinnerPropsInner;\n\n/**\n * Use spinner loading states as placeholder for your content while waiting for data to load.\n */\nexport const Spinner = forwardRef<HTMLDivElement, SpinnerProps>(\n ({ size = \"medium\", title = \"\", delay = false, className, style: _style, ...rest }, ref) => {\n const style: React.CSSProperties & { \"--hds-spinner-delay\"?: string } = {\n ..._style,\n ...(typeof delay === \"string\" && { \"--hds-spinner-delay\": delay }),\n };\n return (\n <div\n title={title}\n style={style}\n className={clsx(\n \"hds-spinner\",\n `hds-spinner--${size}`,\n delay && \"hds-spinner--delay\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nSpinner.displayName = \"Spinner\";\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 { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface StyledHtmlProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Size of content inside. Setting this to `small` makes the font size be `body-small`.\n *\n * @default \"default\"\n */\n size?: \"default\" | \"small\";\n\n /**\n * 🚧 Work in progress darkmode support\n */\n unstable_darkmode?: boolean;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\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 * @example\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 = forwardRef<HTMLDivElement, StyledHtmlProps>(\n ({ asChild, children, size, unstable_darkmode: darkmode = false, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\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 { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef, useId } from \"react\";\n\ninterface TableProps extends React.HTMLAttributes<HTMLTableElement> {\n className?: string;\n\n /**\n * Size of the table\n *\n * Use `compressed` for a more compact table, or `mobile-compressed` for a compact table on mobile screens only.\n */\n size?: \"default\" | \"compressed\" | \"mobile-compressed\";\n\n /**\n * The table caption\n *\n * You can also set this by passing `<caption>` as a first child of the table\n */\n caption?: React.ReactNode;\n\n /**\n * Optional description of the table displayed underneath the table\n *\n * Ensures the `aria-describedby` attribute is set on the table, making it accessible for screen readers.\n */\n description?: React.ReactNode;\n}\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n ({ children, className, size, caption, description, ...rest }, ref) => {\n const descriptionId = useId();\n return (\n <>\n <table\n aria-describedby={description ? descriptionId : undefined}\n ref={ref}\n className={clsx(\n \"hds-table\",\n {\n \"hds-table--compressed\": size === \"compressed\",\n \"hds-table--mobile-compressed\": size === \"mobile-compressed\",\n },\n className as undefined,\n )}\n {...rest}\n >\n {caption ? <caption>{caption}</caption> : null}\n {children}\n </table>\n {description ? (\n <p className={clsx(\"hds-table-description\")} id={descriptionId}>\n {description}\n </p>\n ) : null}\n </>\n );\n },\n);\nTable.displayName = \"Table\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { TabsContext } from \"./context\";\nimport { TabsContent, TabsContents, type TabsContentsProps } from \"./tabs-content\";\nimport { TabsList, TabsTab, type TabsListProps } from \"./tabs-list\";\n\nexport interface TabsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsListProps | TabsContentsProps>[] | 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 /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Tabs = forwardRef<HTMLDivElement, TabsProps>(\n ({ asChild, defaultTab, children, ...rest }, ref) => {\n const [activeTabId, setActiveTabId] = useState<string>(defaultTab);\n const Component = asChild ? Slot : \"div\";\n return (\n <Component className={clsx(\"hds-tabs\")} ref={ref} {...rest}>\n <TabsContext.Provider value={{ activeTabId, toggleActiveTabId: setActiveTabId }}>\n {children}\n </TabsContext.Provider>\n </Component>\n );\n },\n) as TabsType;\nTabs.displayName = \"Tabs\";\n\ntype TabsType = ReturnType<typeof forwardRef<HTMLDivElement, TabsProps>> & {\n List: typeof TabsList;\n Tab: typeof TabsTab;\n Contents: typeof TabsContents;\n Content: typeof TabsContent;\n};\n\nTabs.List = TabsList;\nTabs.Tab = TabsTab;\nTabs.Contents = TabsContents;\nTabs.Content = TabsContent;\n","import { createContext, useContext } from \"react\";\n\nexport interface TabsContextProps {\n activeTabId: string;\n toggleActiveTabId: (tabId: string) => void;\n}\n\nexport const TabsContext = createContext<TabsContextProps | null>(null);\n\nexport function useTabsContext() {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error(\n \"Tabs context required. Did you use `<Tabs.List />`, `<Tabs.Tab />`, or `<Tabs.Content />` outside of <Tabs/>?\",\n );\n }\n return context;\n}\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useTabsContext } from \"./context\";\n\nexport interface TabsContentsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsContentProps> | ReactElement<TabsContentProps>[];\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const TabsContents = forwardRef<HTMLDivElement, TabsContentsProps>(\n ({ asChild, children, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component ref={ref} className={clsx(\"hds-tabs__contents\")} {...rest}>\n {children}\n </Component>\n );\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 /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const TabsContent = forwardRef<HTMLDivElement, TabsContentProps>(\n ({ asChild, forTabId, children, ...rest }, ref) => {\n const context = useTabsContext();\n const Component = asChild ? Slot : \"div\";\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 type { HTMLAttributes, ReactElement, MouseEvent } from \"react\";\nimport { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useResize, useHydrated, useMergeRefs } from \"../utils/utils\";\nimport { useTabsContext } from \"./context\";\n\nexport interface TabsListProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement<TabsTabProps> | ReactElement<TabsTabProps>[];\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 * @default \"horizontal\"\n */\n direction?: \"vertical\" | \"horizontal\";\n}\n\nexport const TabsList = forwardRef<HTMLDivElement, TabsListProps>(\n ({ children, direction = \"horizontal\", className, ...rest }, ref) => {\n const { activeTabId } = useTabsContext();\n const tabsListRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([tabsListRef, ref]);\n const { width: tabsWidth } = useResize(tabsListRef);\n\n const isClientSide = useHydrated();\n const { innerWidth } = isClientSide ? window : { innerWidth: 1000 };\n const wideEnough = innerWidth >= tabsWidth;\n\n const previousTabId = useRef(activeTabId);\n\n // Marker animation\n useEffect(() => {\n const tabList = tabsListRef.current;\n const activeTab = tabList?.querySelector(`[data-tabid=\"${activeTabId}\"]`);\n if (!activeTab || !tabList) return;\n\n const { offsetHeight: containerHeight, offsetWidth: containerWidth } = tabList;\n const { offsetHeight, offsetWidth, offsetTop, offsetLeft } = activeTab as HTMLElement;\n\n // Calculate the height and width of the marker relative to the container\n const height = offsetHeight / containerHeight;\n const width = offsetWidth / containerWidth;\n\n // NOTE: Doing a DOM manipulation here to set the CSS variables for the marker\n // Not really the react idomatic way, but as long as it works we are able to skip some intermidiate `useState`\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-height\", String(height));\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-width\", String(width));\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-top\", `${offsetTop}px`);\n tabsListRef.current.style.setProperty(\"--_hds-tabs-marker-left\", `${offsetLeft}px`);\n\n // Start with border fallback, then switch to the animated marker when the user changes tabs\n // This way the marker is placed immediately to the default tab, then animates smoothly to the next when selected\n if (previousTabId.current !== activeTabId) {\n tabsListRef.current.style.setProperty(\n \"--_hds-tabs-marker-animated-color\",\n \"var(--_hds-tabs-marker-color)\",\n );\n tabsListRef.current.style.setProperty(\n \"--_hds-tabs-marker-border-fallback-color\",\n \"transparent\",\n );\n }\n previousTabId.current = activeTabId;\n }, [activeTabId, innerWidth]);\n\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={mergedRef}\n role=\"tablist\"\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\nTabsList.displayName = \"Tabs.List\";\n\nexport interface TabsTabProps extends HTMLAttributes<HTMLButtonElement> {\n children: ReactElement<HTMLElement> | string;\n\n /**\n * Identifier for the tab\n */\n tabId: string;\n}\n\nexport const TabsTab = forwardRef<HTMLButtonElement, TabsTabProps>(\n ({ children, tabId, className, onClick, ...rest }, ref) => {\n const context = useTabsContext();\n\n const toggleTab = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n context.toggleActiveTabId(tabId);\n onClick?.(e);\n };\n return (\n <button\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 type=\"button\"\n role=\"tab\"\n {...rest}\n >\n {children}\n </button>\n );\n },\n);\nTabsTab.displayName = \"Tabs.Tab\";\n","/* eslint-disable @typescript-eslint/no-unsafe-assignment -- Typings for the differnt html elements */\n/* eslint-disable @typescript-eslint/no-explicit-any -- Typings for the differnt html elements */\n\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\ntype HeadingProps =\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n asChild: true;\n as?: never;\n }\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n as: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n };\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 = {\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 * @default \"fluid\"\n */\n size?: \"min\" | \"max\" | \"fluid\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link TextProps.asChild} if you need more control of the rendered element.\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n\n /**\n * 🚧 Experimental spacing\n */\n _unstableSpacing?: boolean;\n} & (HeadingProps | ParagraphProps) &\n React.HTMLAttributes<HTMLParagraphElement | HTMLHeadingElement>;\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` or `asChild` prop is required.\n *\n * This is 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 = forwardRef<HTMLParagraphElement | HTMLHeadingElement, TextProps>(\n (\n {\n as: Tag,\n asChild,\n variant = \"body\",\n size = \"fluid\",\n _unstableSpacing: spacing,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag ?? 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 as any}\n {...(rest as any)}\n >\n {children}\n </Component>\n );\n },\n);\nText.displayName = \"Text\";\n","import type { ReactNode } from \"react\";\nimport React, { forwardRef, useId, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface WarningBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n title: ReactNode;\n description?: ReactNode;\n}\n\nexport const WarningBanner = forwardRef<HTMLDivElement, WarningBannerProps>(\n ({ title, description, className, ...rest }, ref) => {\n const descriptionId = useId();\n const expandable = !!description;\n return (\n <div {...rest} className={clsx(\"hds-warning-banner\", className as undefined)} ref={ref}>\n <WarningBannerTitle\n variant={expandable ? \"expandable\" : \"default\"}\n descriptionId={descriptionId}\n >\n {title}\n </WarningBannerTitle>\n {expandable ? (\n <WarningBannerDescription id={descriptionId}>{description}</WarningBannerDescription>\n ) : null}\n </div>\n );\n },\n);\nWarningBanner.displayName = \"WarningBanner\";\n\ntype WarningBannerTitleProps =\n | ({\n variant: \"expandable\";\n descriptionId: string;\n } & React.ButtonHTMLAttributes<HTMLButtonElement>)\n | ({ variant: \"default\"; descriptionId?: string } & React.HTMLAttributes<HTMLParagraphElement>);\n\nconst WarningBannerTitle = forwardRef<\n HTMLButtonElement | HTMLParagraphElement,\n WarningBannerTitleProps\n>(({ variant, descriptionId, children, className, ...rest }, ref) => {\n const [open, setOpen] = useState<boolean>(false);\n if (variant === \"expandable\") {\n return (\n <button\n {...(rest as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n aria-expanded={open}\n aria-controls={descriptionId}\n data-state={open ? \"open\" : \"closed\"}\n className={clsx(\n \"hds-warning-banner__title\",\n \"hds-warning-banner__title-trigger\",\n className as undefined,\n )}\n onClick={() => {\n setOpen((prev) => !prev);\n }}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n >\n <div>{children}</div>\n </button>\n );\n }\n return (\n <p\n {...(rest as React.HTMLAttributes<HTMLParagraphElement>)}\n className={clsx(\"hds-warning-banner__title\", className as undefined)}\n ref={ref as React.Ref<HTMLParagraphElement>}\n >\n {children}\n </p>\n );\n});\nWarningBannerTitle.displayName = \"WarningBannerTitle\";\n\ntype WarningBannerDescriptionProps = { id: string } & React.HTMLAttributes<HTMLParagraphElement>;\nconst WarningBannerDescription = forwardRef<HTMLParagraphElement, WarningBannerDescriptionProps>(\n ({ className, id, ...rest }, ref) => {\n return (\n <p\n id={id}\n className={clsx(\"hds-warning-banner__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nWarningBannerDescription.displayName = \"WarningBannerDescription\";\n"],"mappings":";;;;;;;;;;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9EhB,IA8EG,IAAoB,iBAApB,IAAoB,CAAlB,aAAW;AACZ,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,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_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_react","import_typed_classname","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","Fieldset","import_jsx_runtime","import_react","import_typed_classname","import_react","import_typed_classname","import_jsx_runtime","InputGroup","_a","import_react","import_jsx_runtime","DatePicker","_a","import_react","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_react_slot","import_jsx_runtime","import_react","import_jsx_runtime","_a","_b","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","Input","import_react","import_typed_classname","import_react","import_jsx_runtime","RadioGroup","import_jsx_runtime","_a","import_react","import_typed_classname","import_jsx_runtime","Select","import_react","import_typed_classname","import_jsx_runtime","Textarea","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","React","import_typed_classname","import_react","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","_a","import_react","import_typed_classname","import_react_slot","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","releaseFocusTrap","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_typed_classname","import_react_slot","import_react","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_typed_classname","import_react","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_react","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime","import_jsx_runtime","import_react","import_typed_classname","import_react_slot","import_jsx_runtime","import_react","import_typed_classname","import_jsx_runtime"]}