@norges-domstoler/dds-components 22.7.1 → 22.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -462,6 +462,10 @@ type DropdownItemT = 'span' | 'a' | typeof StylelessButton | typeof Toggle;
462
462
  type DropdownItemButtonProps = {
463
463
  /**Asynkron `onClick` event; håndterer loading status, slik at menyen ikke lukker seg under loading. */
464
464
  onClickAsync?: MouseEventHandler<HTMLButtonElement>;
465
+ /**Egen styring av når menyen skal lukkes ved klikk på knapp i menyen. Bruker intern logikk som default. Støtter i tillegg egen funksjon og ingen lukking (`false`).
466
+ * @default true
467
+ */
468
+ closeMenuOnClickAsync?: boolean | ((close: () => void) => void);
465
469
  } & Pick<ButtonProps, 'loading' | 'loadingTooltip'>;
466
470
  interface DropdownItemCustomProps<T extends DropdownItemT = 'span'> {
467
471
  as?: T;
@@ -1051,16 +1055,6 @@ declare const focusVisibleInset: {
1051
1055
  declare const scrollbarStyling: {
1052
1056
  scrollbarColor: string;
1053
1057
  scrollbarWidth: "thin";
1054
- '&::-webkit-scrollbar': {
1055
- width: string;
1056
- height: string;
1057
- };
1058
- '&::-webkit-scrollbar-track': {
1059
- background: string;
1060
- };
1061
- '&::-webkit-scrollbar-thumb': {
1062
- background: string;
1063
- };
1064
1058
  };
1065
1059
  /**
1066
1060
  * Generelle utils
@@ -3466,7 +3460,8 @@ declare function TextOverflowEllipsisInner({ className, ...rest }: ComponentProp
3466
3460
  type TypographyBodyShortType = 'bodyShortXsmall' | 'bodyShortSmall' | 'bodyShortMedium' | 'bodyShortLarge';
3467
3461
  type TypographyBodyLongType = 'bodyLongXsmall' | 'bodyLongSmall' | 'bodyLongMedium' | 'bodyLongLarge';
3468
3462
  type TypographyBodyType = TypographyBodyLongType | TypographyBodyShortType;
3469
- type TypographyHeadingType = 'headingXxsmall' | 'headingXsmall' | 'headingSmall' | 'headingMedium' | 'headingLarge' | 'headingXlarge' | 'headingXxlarge';
3463
+ declare const TG_HEADING_TYPES: readonly ["headingXxsmall", "headingXsmall", "headingSmall", "headingMedium", "headingLarge", "headingXlarge", "headingXxlarge"];
3464
+ type TypographyHeadingType = (typeof TG_HEADING_TYPES)[number];
3470
3465
  type TypographyLeadType = 'leadMedium';
3471
3466
  type TypographyAnchorType = 'a';
3472
3467
  type TypographyLabelType = 'labelMedium';
@@ -4619,7 +4614,7 @@ type OverflowMenuProps = Omit<BaseComponentPropsWithChildren<HTMLDivElement, {
4619
4614
  }>, 'id'>;
4620
4615
 
4621
4616
  declare const OverflowMenuButton: {
4622
- ({ onClick, onClickAsync, purpose, loading, ref, ...rest }: OverflowMenuButtonProps): react_jsx_runtime.JSX.Element;
4617
+ ({ onClick, onClickAsync, closeMenuOnClickAsync, purpose, loading, ref, ...rest }: OverflowMenuButtonProps): react_jsx_runtime.JSX.Element;
4623
4618
  displayName: string;
4624
4619
  };
4625
4620
 
@@ -5514,4 +5509,4 @@ declare const VisuallyHidden: {
5514
5509
  displayName: string;
5515
5510
  };
5516
5511
 
5517
- export { Accordion, AccordionBody, type AccordionBodyProps, type AccordionConfig, AccordionContextProvider, AccordionHeader, type AccordionHeaderProps, type AccordionProps, type AccordionState, AddTabButton, type AddTabButtonProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDownIcon, type AnimatedChevronUpDownIconStates, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, AttachmentIcon, BORDER_COLORS, BORDER_RADII, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, type BorderColor, type BorderRadius, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, BriefcaseIcon, BuildIcon, BuildingIcon, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, CardSelectable, CardSelectableGroup, type CardSelectableGroupProps, type CardSelectableProps, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CircleFilledIcon, CircleIcon, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, Contrast, type ContrastProps, CookieBanner, CookieBannerCheckbox, type CookieBannerCheckboxProps, type CookieBannerProps, CopyIcon, CourtIcon, DETAIL_LIST_SIZES, DatePicker, type DatePickerProps, DateRangeIcon, DdsProvider, type DdsProviderProps, type DdsTheme, DeathsIcon, DescriptionList, type DescriptionListAppearance, DescriptionListDesc, type DescriptionListDescProps, DescriptionListGroup, type DescriptionListGroupProps, type DescriptionListProps, DescriptionListTerm, type DescriptionListTermProps, DetailList, DetailListDesc, type DetailListDescProps, type DetailListProps, DetailListRow, type DetailListRowProps, type DetailListSize, DetailListTerm, type DetailListTermProps, type Direction$1 as Direction, Divider, type DividerColor, type DividerProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, type DrawerGroupProps, type DrawerPlacement, type DrawerProps, type DrawerSize, DropdownHeader, DropdownItem, type DropdownItemButtonProps, type DropdownItemCustomProps, type DropdownItemProps, ELEVATIONS, EditAltIcon, EditIcon, ElementAs, type Elevation, EmptyContent, type EmptyContentProps, ErrorIcon, ErrorSummary, ErrorSummaryItem, type ErrorSummaryItemProps, type ErrorSummaryProps, ExclaimIcon, ExpandIcon, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, FieldsetGroup, type FieldsetGroupProps, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, type FileStatusMap, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FindInPageIcon, FlagFilledIcon, FlagIcon, FlickrIcon, type FloatingStyles, FloppyDiskIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, Footer, FooterLeft, type FooterLeftProps, FooterList, FooterListGroup, type FooterListGroupProps, FooterListHeader, type FooterListHeaderProps, type FooterListProps, FooterLogo, type FooterLogoProps, type FooterProps, FooterSocialsGroup, type FooterSocialsGroupProps, FooterSocialsList, type FooterSocialsListProps, FormSummary, FormSummaryEditButton, FormSummaryEmptyValue, FormSummaryError, FormSummaryField, FormSummaryFields, FormSummaryHeader, FormSummaryHeading, FormSummaryLabel, type FormSummaryProps, FormSummaryValue, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GroupIcon, GuardianIcon, HStack, type HStackProps, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassEmptyIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditSelect, type InlineEditSelectProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, InputMessage, type InputMessageProps, type InputMessageType, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, L_MESSAGE_PURPOSES, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LineChartIcon, Link, LinkIcon, LinkOffIcon, type LinkProps, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, type ListItemProps, type ListProps, type ListType, type ListTypographyType, LocalMessage, type LocalMessageLayout, type LocalMessageProps, type LocalMessagePurpose, LocationIcon, LocationOffIcon, LockFilledIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MapIcon, MenuIcon, MinusCircledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, type NativeSelectProps, NotarialIcon, NotebookPenIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, OverflowMenuToggle, type OverflowMenuToggleProps, Pagination, type PaginationOption, type PaginationProps, PanelLeftIcon, Paper, type PaperBackground, type PaperBorder, type PaperBorderRadius, type PaperElevation, PaperPlaneIcon, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, type PolymorphicBaseComponentProps, type PolymorphicProps, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PublishIcon, type Purpose, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RadioValue, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, type RemoteFile, ReplayIcon, type ResponsiveProps, type ResponsiveStackProps, RowsIcon, ScaleIcon, ScreenSize, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, SectionIcon, Select, type SelectForwardRefType, type SelectOption, type SelectProps, SettingsIcon, ShowHide, type ShowHideProps, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, type SpacingScale, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, StarFilledIcon, StarHalfFilledIcon, StarIcon, type StaticTypographyType, StickyNoteIcon, StylelessButton, type StylelessButtonProps, StylelessList, type StylelessListProps, StylelessOList, type StylelessOListProps, SunIcon, SupportIcon, type SvgIcon, type SvgProps, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, type TabSize, Table, Body as TableBody, type TableBodyProps, Cell as TableCell, type TableCellLayout, type TableCellProps, type TableCellType, Foot as TableFoot, type TableFootProps, Head as TableHead, type TableHeadProps, type TableProps, Row as TableRow, type TableRowProps, type TableRowType, type TableSize, SortCell as TableSortCell, type TableSortCellProps, TableWrapper, Tabs, type TabsProps, Tag, type TagAppearance, type TagProps, type TagPurpose, type TextAffixProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, ThumbDownFilledIcon, ThumbDownIcon, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, Toggle, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, type ToggleProps, ToggleRadio, type ToggleRadioProps, type ToggleSize, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyLongType, type TypographyBodyShortType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, type UploadInfo, type UploadStatus, type UseAccordionBodyProps, type UseAccordionHeaderProps, type UseControllableGroupStateProps, type UseControllableStateProps, type UseFloatPositionOptions, VStack, type VStackProps, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createPurposes, createSelectOptions, createSizes, dateValueToNativeDate, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getColorCn, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, isAnchorTypographyProps, isBorderColor, isBorderRadius, isCaption, isElevation, isHeading, isInlineElement, isKeyboardEvent, isLegend, isPaperBackground, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderInputMessage, scrollbarStyling, typographyTypes, useAccordion, useAccordionContext, useCallbackRef, useCombinedRef, useControllableGroupState, useControllableState, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, useWindowResize };
5512
+ export { Accordion, AccordionBody, type AccordionBodyProps, type AccordionConfig, AccordionContextProvider, AccordionHeader, type AccordionHeaderProps, type AccordionProps, type AccordionState, AddTabButton, type AddTabButtonProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDownIcon, type AnimatedChevronUpDownIconStates, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, AttachmentIcon, BORDER_COLORS, BORDER_RADII, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, type BorderColor, type BorderRadius, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, BriefcaseIcon, BuildIcon, BuildingIcon, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, CardSelectable, CardSelectableGroup, type CardSelectableGroupProps, type CardSelectableProps, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CircleFilledIcon, CircleIcon, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, Contrast, type ContrastProps, CookieBanner, CookieBannerCheckbox, type CookieBannerCheckboxProps, type CookieBannerProps, CopyIcon, CourtIcon, DETAIL_LIST_SIZES, DatePicker, type DatePickerProps, DateRangeIcon, DdsProvider, type DdsProviderProps, type DdsTheme, DeathsIcon, DescriptionList, type DescriptionListAppearance, DescriptionListDesc, type DescriptionListDescProps, DescriptionListGroup, type DescriptionListGroupProps, type DescriptionListProps, DescriptionListTerm, type DescriptionListTermProps, DetailList, DetailListDesc, type DetailListDescProps, type DetailListProps, DetailListRow, type DetailListRowProps, type DetailListSize, DetailListTerm, type DetailListTermProps, type Direction$1 as Direction, Divider, type DividerColor, type DividerProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, type DrawerGroupProps, type DrawerPlacement, type DrawerProps, type DrawerSize, DropdownHeader, DropdownItem, type DropdownItemButtonProps, type DropdownItemCustomProps, type DropdownItemProps, ELEVATIONS, EditAltIcon, EditIcon, ElementAs, type Elevation, EmptyContent, type EmptyContentProps, ErrorIcon, ErrorSummary, ErrorSummaryItem, type ErrorSummaryItemProps, type ErrorSummaryProps, ExclaimIcon, ExpandIcon, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, FieldsetGroup, type FieldsetGroupProps, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, type FileStatusMap, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FindInPageIcon, FlagFilledIcon, FlagIcon, FlickrIcon, type FloatingStyles, FloppyDiskIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, Footer, FooterLeft, type FooterLeftProps, FooterList, FooterListGroup, type FooterListGroupProps, FooterListHeader, type FooterListHeaderProps, type FooterListProps, FooterLogo, type FooterLogoProps, type FooterProps, FooterSocialsGroup, type FooterSocialsGroupProps, FooterSocialsList, type FooterSocialsListProps, FormSummary, FormSummaryEditButton, FormSummaryEmptyValue, FormSummaryError, FormSummaryField, FormSummaryFields, FormSummaryHeader, FormSummaryHeading, FormSummaryLabel, type FormSummaryProps, FormSummaryValue, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GroupIcon, GuardianIcon, HStack, type HStackProps, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassEmptyIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditSelect, type InlineEditSelectProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, InputMessage, type InputMessageProps, type InputMessageType, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, L_MESSAGE_PURPOSES, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LineChartIcon, Link, LinkIcon, LinkOffIcon, type LinkProps, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, type ListItemProps, type ListProps, type ListType, type ListTypographyType, LocalMessage, type LocalMessageLayout, type LocalMessageProps, type LocalMessagePurpose, LocationIcon, LocationOffIcon, LockFilledIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MapIcon, MenuIcon, MinusCircledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, type NativeSelectProps, NotarialIcon, NotebookPenIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, OverflowMenuToggle, type OverflowMenuToggleProps, Pagination, type PaginationOption, type PaginationProps, PanelLeftIcon, Paper, type PaperBackground, type PaperBorder, type PaperBorderRadius, type PaperElevation, PaperPlaneIcon, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, type PolymorphicBaseComponentProps, type PolymorphicProps, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PublishIcon, type Purpose, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RadioValue, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, type RemoteFile, ReplayIcon, type ResponsiveProps, type ResponsiveStackProps, RowsIcon, ScaleIcon, ScreenSize, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, SectionIcon, Select, type SelectForwardRefType, type SelectOption, type SelectProps, SettingsIcon, ShowHide, type ShowHideProps, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, type SpacingScale, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, StarFilledIcon, StarHalfFilledIcon, StarIcon, type StaticTypographyType, StickyNoteIcon, StylelessButton, type StylelessButtonProps, StylelessList, type StylelessListProps, StylelessOList, type StylelessOListProps, SunIcon, SupportIcon, type SvgIcon, type SvgProps, SyncIcon, TG_HEADING_TYPES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, type TabSize, Table, Body as TableBody, type TableBodyProps, Cell as TableCell, type TableCellLayout, type TableCellProps, type TableCellType, Foot as TableFoot, type TableFootProps, Head as TableHead, type TableHeadProps, type TableProps, Row as TableRow, type TableRowProps, type TableRowType, type TableSize, SortCell as TableSortCell, type TableSortCellProps, TableWrapper, Tabs, type TabsProps, Tag, type TagAppearance, type TagProps, type TagPurpose, type TextAffixProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, ThumbDownFilledIcon, ThumbDownIcon, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, Toggle, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, type ToggleProps, ToggleRadio, type ToggleRadioProps, type ToggleSize, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyLongType, type TypographyBodyShortType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, type UploadInfo, type UploadStatus, type UseAccordionBodyProps, type UseAccordionHeaderProps, type UseControllableGroupStateProps, type UseControllableStateProps, type UseFloatPositionOptions, VStack, type VStackProps, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createPurposes, createSelectOptions, createSizes, dateValueToNativeDate, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getColorCn, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, isAnchorTypographyProps, isBorderColor, isBorderRadius, isCaption, isElevation, isHeading, isInlineElement, isKeyboardEvent, isLegend, isPaperBackground, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderInputMessage, scrollbarStyling, typographyTypes, useAccordion, useAccordionContext, useCallbackRef, useCombinedRef, useControllableGroupState, useControllableState, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, useWindowResize };
package/dist/index.d.ts CHANGED
@@ -462,6 +462,10 @@ type DropdownItemT = 'span' | 'a' | typeof StylelessButton | typeof Toggle;
462
462
  type DropdownItemButtonProps = {
463
463
  /**Asynkron `onClick` event; håndterer loading status, slik at menyen ikke lukker seg under loading. */
464
464
  onClickAsync?: MouseEventHandler<HTMLButtonElement>;
465
+ /**Egen styring av når menyen skal lukkes ved klikk på knapp i menyen. Bruker intern logikk som default. Støtter i tillegg egen funksjon og ingen lukking (`false`).
466
+ * @default true
467
+ */
468
+ closeMenuOnClickAsync?: boolean | ((close: () => void) => void);
465
469
  } & Pick<ButtonProps, 'loading' | 'loadingTooltip'>;
466
470
  interface DropdownItemCustomProps<T extends DropdownItemT = 'span'> {
467
471
  as?: T;
@@ -1051,16 +1055,6 @@ declare const focusVisibleInset: {
1051
1055
  declare const scrollbarStyling: {
1052
1056
  scrollbarColor: string;
1053
1057
  scrollbarWidth: "thin";
1054
- '&::-webkit-scrollbar': {
1055
- width: string;
1056
- height: string;
1057
- };
1058
- '&::-webkit-scrollbar-track': {
1059
- background: string;
1060
- };
1061
- '&::-webkit-scrollbar-thumb': {
1062
- background: string;
1063
- };
1064
1058
  };
1065
1059
  /**
1066
1060
  * Generelle utils
@@ -3466,7 +3460,8 @@ declare function TextOverflowEllipsisInner({ className, ...rest }: ComponentProp
3466
3460
  type TypographyBodyShortType = 'bodyShortXsmall' | 'bodyShortSmall' | 'bodyShortMedium' | 'bodyShortLarge';
3467
3461
  type TypographyBodyLongType = 'bodyLongXsmall' | 'bodyLongSmall' | 'bodyLongMedium' | 'bodyLongLarge';
3468
3462
  type TypographyBodyType = TypographyBodyLongType | TypographyBodyShortType;
3469
- type TypographyHeadingType = 'headingXxsmall' | 'headingXsmall' | 'headingSmall' | 'headingMedium' | 'headingLarge' | 'headingXlarge' | 'headingXxlarge';
3463
+ declare const TG_HEADING_TYPES: readonly ["headingXxsmall", "headingXsmall", "headingSmall", "headingMedium", "headingLarge", "headingXlarge", "headingXxlarge"];
3464
+ type TypographyHeadingType = (typeof TG_HEADING_TYPES)[number];
3470
3465
  type TypographyLeadType = 'leadMedium';
3471
3466
  type TypographyAnchorType = 'a';
3472
3467
  type TypographyLabelType = 'labelMedium';
@@ -4619,7 +4614,7 @@ type OverflowMenuProps = Omit<BaseComponentPropsWithChildren<HTMLDivElement, {
4619
4614
  }>, 'id'>;
4620
4615
 
4621
4616
  declare const OverflowMenuButton: {
4622
- ({ onClick, onClickAsync, purpose, loading, ref, ...rest }: OverflowMenuButtonProps): react_jsx_runtime.JSX.Element;
4617
+ ({ onClick, onClickAsync, closeMenuOnClickAsync, purpose, loading, ref, ...rest }: OverflowMenuButtonProps): react_jsx_runtime.JSX.Element;
4623
4618
  displayName: string;
4624
4619
  };
4625
4620
 
@@ -5514,4 +5509,4 @@ declare const VisuallyHidden: {
5514
5509
  displayName: string;
5515
5510
  };
5516
5511
 
5517
- export { Accordion, AccordionBody, type AccordionBodyProps, type AccordionConfig, AccordionContextProvider, AccordionHeader, type AccordionHeaderProps, type AccordionProps, type AccordionState, AddTabButton, type AddTabButtonProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDownIcon, type AnimatedChevronUpDownIconStates, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, AttachmentIcon, BORDER_COLORS, BORDER_RADII, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, type BorderColor, type BorderRadius, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, BriefcaseIcon, BuildIcon, BuildingIcon, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, CardSelectable, CardSelectableGroup, type CardSelectableGroupProps, type CardSelectableProps, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CircleFilledIcon, CircleIcon, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, Contrast, type ContrastProps, CookieBanner, CookieBannerCheckbox, type CookieBannerCheckboxProps, type CookieBannerProps, CopyIcon, CourtIcon, DETAIL_LIST_SIZES, DatePicker, type DatePickerProps, DateRangeIcon, DdsProvider, type DdsProviderProps, type DdsTheme, DeathsIcon, DescriptionList, type DescriptionListAppearance, DescriptionListDesc, type DescriptionListDescProps, DescriptionListGroup, type DescriptionListGroupProps, type DescriptionListProps, DescriptionListTerm, type DescriptionListTermProps, DetailList, DetailListDesc, type DetailListDescProps, type DetailListProps, DetailListRow, type DetailListRowProps, type DetailListSize, DetailListTerm, type DetailListTermProps, type Direction$1 as Direction, Divider, type DividerColor, type DividerProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, type DrawerGroupProps, type DrawerPlacement, type DrawerProps, type DrawerSize, DropdownHeader, DropdownItem, type DropdownItemButtonProps, type DropdownItemCustomProps, type DropdownItemProps, ELEVATIONS, EditAltIcon, EditIcon, ElementAs, type Elevation, EmptyContent, type EmptyContentProps, ErrorIcon, ErrorSummary, ErrorSummaryItem, type ErrorSummaryItemProps, type ErrorSummaryProps, ExclaimIcon, ExpandIcon, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, FieldsetGroup, type FieldsetGroupProps, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, type FileStatusMap, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FindInPageIcon, FlagFilledIcon, FlagIcon, FlickrIcon, type FloatingStyles, FloppyDiskIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, Footer, FooterLeft, type FooterLeftProps, FooterList, FooterListGroup, type FooterListGroupProps, FooterListHeader, type FooterListHeaderProps, type FooterListProps, FooterLogo, type FooterLogoProps, type FooterProps, FooterSocialsGroup, type FooterSocialsGroupProps, FooterSocialsList, type FooterSocialsListProps, FormSummary, FormSummaryEditButton, FormSummaryEmptyValue, FormSummaryError, FormSummaryField, FormSummaryFields, FormSummaryHeader, FormSummaryHeading, FormSummaryLabel, type FormSummaryProps, FormSummaryValue, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GroupIcon, GuardianIcon, HStack, type HStackProps, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassEmptyIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditSelect, type InlineEditSelectProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, InputMessage, type InputMessageProps, type InputMessageType, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, L_MESSAGE_PURPOSES, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LineChartIcon, Link, LinkIcon, LinkOffIcon, type LinkProps, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, type ListItemProps, type ListProps, type ListType, type ListTypographyType, LocalMessage, type LocalMessageLayout, type LocalMessageProps, type LocalMessagePurpose, LocationIcon, LocationOffIcon, LockFilledIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MapIcon, MenuIcon, MinusCircledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, type NativeSelectProps, NotarialIcon, NotebookPenIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, OverflowMenuToggle, type OverflowMenuToggleProps, Pagination, type PaginationOption, type PaginationProps, PanelLeftIcon, Paper, type PaperBackground, type PaperBorder, type PaperBorderRadius, type PaperElevation, PaperPlaneIcon, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, type PolymorphicBaseComponentProps, type PolymorphicProps, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PublishIcon, type Purpose, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RadioValue, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, type RemoteFile, ReplayIcon, type ResponsiveProps, type ResponsiveStackProps, RowsIcon, ScaleIcon, ScreenSize, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, SectionIcon, Select, type SelectForwardRefType, type SelectOption, type SelectProps, SettingsIcon, ShowHide, type ShowHideProps, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, type SpacingScale, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, StarFilledIcon, StarHalfFilledIcon, StarIcon, type StaticTypographyType, StickyNoteIcon, StylelessButton, type StylelessButtonProps, StylelessList, type StylelessListProps, StylelessOList, type StylelessOListProps, SunIcon, SupportIcon, type SvgIcon, type SvgProps, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, type TabSize, Table, Body as TableBody, type TableBodyProps, Cell as TableCell, type TableCellLayout, type TableCellProps, type TableCellType, Foot as TableFoot, type TableFootProps, Head as TableHead, type TableHeadProps, type TableProps, Row as TableRow, type TableRowProps, type TableRowType, type TableSize, SortCell as TableSortCell, type TableSortCellProps, TableWrapper, Tabs, type TabsProps, Tag, type TagAppearance, type TagProps, type TagPurpose, type TextAffixProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, ThumbDownFilledIcon, ThumbDownIcon, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, Toggle, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, type ToggleProps, ToggleRadio, type ToggleRadioProps, type ToggleSize, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyLongType, type TypographyBodyShortType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, type UploadInfo, type UploadStatus, type UseAccordionBodyProps, type UseAccordionHeaderProps, type UseControllableGroupStateProps, type UseControllableStateProps, type UseFloatPositionOptions, VStack, type VStackProps, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createPurposes, createSelectOptions, createSizes, dateValueToNativeDate, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getColorCn, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, isAnchorTypographyProps, isBorderColor, isBorderRadius, isCaption, isElevation, isHeading, isInlineElement, isKeyboardEvent, isLegend, isPaperBackground, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderInputMessage, scrollbarStyling, typographyTypes, useAccordion, useAccordionContext, useCallbackRef, useCombinedRef, useControllableGroupState, useControllableState, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, useWindowResize };
5512
+ export { Accordion, AccordionBody, type AccordionBodyProps, type AccordionConfig, AccordionContextProvider, AccordionHeader, type AccordionHeaderProps, type AccordionProps, type AccordionState, AddTabButton, type AddTabButtonProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDownIcon, type AnimatedChevronUpDownIconStates, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, AttachmentIcon, BORDER_COLORS, BORDER_RADII, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, type BorderColor, type BorderRadius, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, BriefcaseIcon, BuildIcon, BuildingIcon, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, CardSelectable, CardSelectableGroup, type CardSelectableGroupProps, type CardSelectableProps, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CircleFilledIcon, CircleIcon, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, Contrast, type ContrastProps, CookieBanner, CookieBannerCheckbox, type CookieBannerCheckboxProps, type CookieBannerProps, CopyIcon, CourtIcon, DETAIL_LIST_SIZES, DatePicker, type DatePickerProps, DateRangeIcon, DdsProvider, type DdsProviderProps, type DdsTheme, DeathsIcon, DescriptionList, type DescriptionListAppearance, DescriptionListDesc, type DescriptionListDescProps, DescriptionListGroup, type DescriptionListGroupProps, type DescriptionListProps, DescriptionListTerm, type DescriptionListTermProps, DetailList, DetailListDesc, type DetailListDescProps, type DetailListProps, DetailListRow, type DetailListRowProps, type DetailListSize, DetailListTerm, type DetailListTermProps, type Direction$1 as Direction, Divider, type DividerColor, type DividerProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, type DrawerGroupProps, type DrawerPlacement, type DrawerProps, type DrawerSize, DropdownHeader, DropdownItem, type DropdownItemButtonProps, type DropdownItemCustomProps, type DropdownItemProps, ELEVATIONS, EditAltIcon, EditIcon, ElementAs, type Elevation, EmptyContent, type EmptyContentProps, ErrorIcon, ErrorSummary, ErrorSummaryItem, type ErrorSummaryItemProps, type ErrorSummaryProps, ExclaimIcon, ExpandIcon, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, FieldsetGroup, type FieldsetGroupProps, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, type FileStatusMap, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FindInPageIcon, FlagFilledIcon, FlagIcon, FlickrIcon, type FloatingStyles, FloppyDiskIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, Footer, FooterLeft, type FooterLeftProps, FooterList, FooterListGroup, type FooterListGroupProps, FooterListHeader, type FooterListHeaderProps, type FooterListProps, FooterLogo, type FooterLogoProps, type FooterProps, FooterSocialsGroup, type FooterSocialsGroupProps, FooterSocialsList, type FooterSocialsListProps, FormSummary, FormSummaryEditButton, FormSummaryEmptyValue, FormSummaryError, FormSummaryField, FormSummaryFields, FormSummaryHeader, FormSummaryHeading, FormSummaryLabel, type FormSummaryProps, FormSummaryValue, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GroupIcon, GuardianIcon, HStack, type HStackProps, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassEmptyIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditSelect, type InlineEditSelectProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, InputMessage, type InputMessageProps, type InputMessageType, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, L_MESSAGE_PURPOSES, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LineChartIcon, Link, LinkIcon, LinkOffIcon, type LinkProps, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, type ListItemProps, type ListProps, type ListType, type ListTypographyType, LocalMessage, type LocalMessageLayout, type LocalMessageProps, type LocalMessagePurpose, LocationIcon, LocationOffIcon, LockFilledIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MapIcon, MenuIcon, MinusCircledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, type NativeSelectProps, NotarialIcon, NotebookPenIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, OverflowMenuToggle, type OverflowMenuToggleProps, Pagination, type PaginationOption, type PaginationProps, PanelLeftIcon, Paper, type PaperBackground, type PaperBorder, type PaperBorderRadius, type PaperElevation, PaperPlaneIcon, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, type PolymorphicBaseComponentProps, type PolymorphicProps, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PublishIcon, type Purpose, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RadioValue, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, type RemoteFile, ReplayIcon, type ResponsiveProps, type ResponsiveStackProps, RowsIcon, ScaleIcon, ScreenSize, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, SectionIcon, Select, type SelectForwardRefType, type SelectOption, type SelectProps, SettingsIcon, ShowHide, type ShowHideProps, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, type SpacingScale, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, StarFilledIcon, StarHalfFilledIcon, StarIcon, type StaticTypographyType, StickyNoteIcon, StylelessButton, type StylelessButtonProps, StylelessList, type StylelessListProps, StylelessOList, type StylelessOListProps, SunIcon, SupportIcon, type SvgIcon, type SvgProps, SyncIcon, TG_HEADING_TYPES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, type TabSize, Table, Body as TableBody, type TableBodyProps, Cell as TableCell, type TableCellLayout, type TableCellProps, type TableCellType, Foot as TableFoot, type TableFootProps, Head as TableHead, type TableHeadProps, type TableProps, Row as TableRow, type TableRowProps, type TableRowType, type TableSize, SortCell as TableSortCell, type TableSortCellProps, TableWrapper, Tabs, type TabsProps, Tag, type TagAppearance, type TagProps, type TagPurpose, type TextAffixProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, ThumbDownFilledIcon, ThumbDownIcon, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, Toggle, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, type ToggleProps, ToggleRadio, type ToggleRadioProps, type ToggleSize, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyLongType, type TypographyBodyShortType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, type UploadInfo, type UploadStatus, type UseAccordionBodyProps, type UseAccordionHeaderProps, type UseControllableGroupStateProps, type UseControllableStateProps, type UseFloatPositionOptions, VStack, type VStackProps, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createPurposes, createSelectOptions, createSizes, dateValueToNativeDate, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getColorCn, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, isAnchorTypographyProps, isBorderColor, isBorderRadius, isCaption, isElevation, isHeading, isInlineElement, isKeyboardEvent, isLegend, isPaperBackground, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderInputMessage, scrollbarStyling, typographyTypes, useAccordion, useAccordionContext, useCallbackRef, useCombinedRef, useControllableGroupState, useControllableState, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, useWindowResize };
package/dist/index.js CHANGED
@@ -313,6 +313,7 @@ __export(index_exports, {
313
313
  SunIcon: () => SunIcon,
314
314
  SupportIcon: () => SupportIcon,
315
315
  SyncIcon: () => SyncIcon,
316
+ TG_HEADING_TYPES: () => TG_HEADING_TYPES,
316
317
  Tab: () => Tab,
317
318
  TabList: () => TabList,
318
319
  TabPanel: () => TabPanel,
@@ -2233,21 +2234,7 @@ var focusVisibleInset = {
2233
2234
  var scrollbarWidth = "thin";
2234
2235
  var scrollbarStyling = {
2235
2236
  scrollbarColor: "var(--dds-color-surface-scrollbar) transparent",
2236
- scrollbarWidth,
2237
- /* Safari styling. TODO: fjernes når scrollbar styling blir standardisert */
2238
- /* width */
2239
- "&::-webkit-scrollbar": {
2240
- width: "var(--dds-spacing-x0-5)",
2241
- height: "var(--dds-spacing-x0-5)"
2242
- },
2243
- /* Track */
2244
- "&::-webkit-scrollbar-track": {
2245
- background: "transparent"
2246
- },
2247
- /* Handle */
2248
- "&::-webkit-scrollbar-thumb": {
2249
- background: "var(--dds-color-surface-scrollbar)"
2250
- }
2237
+ scrollbarWidth
2251
2238
  };
2252
2239
  var hideInput = {
2253
2240
  clip: "rect(0 0 0 0)",
@@ -4099,6 +4086,17 @@ var Typography_default = {
4099
4086
  container: "Typography_container"
4100
4087
  };
4101
4088
 
4089
+ // src/components/Typography/Typography/Typography.types.ts
4090
+ var TG_HEADING_TYPES = [
4091
+ "headingXxsmall",
4092
+ "headingXsmall",
4093
+ "headingSmall",
4094
+ "headingMedium",
4095
+ "headingLarge",
4096
+ "headingXlarge",
4097
+ "headingXxlarge"
4098
+ ];
4099
+
4102
4100
  // src/components/Typography/Typography/Typography.utils.ts
4103
4101
  var getElementType = (element) => {
4104
4102
  switch (element) {
@@ -4133,7 +4131,7 @@ var getElementType = (element) => {
4133
4131
  }
4134
4132
  };
4135
4133
  var isHeading = (type) => {
4136
- return true;
4134
+ return TG_HEADING_TYPES.includes(type);
4137
4135
  };
4138
4136
  var isLegend = (as) => {
4139
4137
  return as === "legend";
@@ -4918,6 +4916,7 @@ var import_jsx_runtime211 = require("react/jsx-runtime");
4918
4916
  var OverflowMenuButton = ({
4919
4917
  onClick,
4920
4918
  onClickAsync,
4919
+ closeMenuOnClickAsync = true,
4921
4920
  purpose = "default",
4922
4921
  loading,
4923
4922
  ref,
@@ -4934,17 +4933,21 @@ var OverflowMenuButton = ({
4934
4933
  }, []);
4935
4934
  const handleClick = async (e) => {
4936
4935
  if (isLoading) return;
4936
+ const close = () => onClose == null ? void 0 : onClose();
4937
4937
  if (onClickAsync) {
4938
4938
  setInternalLoading(true);
4939
+ const shouldAutoClose = closeMenuOnClickAsync === true;
4939
4940
  try {
4940
4941
  await onClickAsync(e);
4942
+ if (typeof closeMenuOnClickAsync === "function") {
4943
+ closeMenuOnClickAsync(close);
4944
+ } else if (shouldAutoClose) close();
4941
4945
  } finally {
4942
4946
  setInternalLoading(false);
4943
- onClose == null ? void 0 : onClose();
4944
4947
  }
4945
4948
  } else {
4946
4949
  onClick == null ? void 0 : onClick(e);
4947
- onClose == null ? void 0 : onClose();
4950
+ close();
4948
4951
  }
4949
4952
  };
4950
4953
  return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
@@ -7970,10 +7973,8 @@ var useDetailListContext = () => (0, import_react51.useContext)(DetailListContex
7970
7973
  // src/components/DetailList/DetailList.module.css
7971
7974
  var DetailList_default = {
7972
7975
  list: "DetailList_list",
7973
- "list--with-dividers": "DetailList_list--with-dividers",
7974
- row: "DetailList_row",
7975
- "list--striped": "DetailList_list--striped",
7976
7976
  "list--striped-with-bp": "DetailList_list--striped-with-bp",
7977
+ row: "DetailList_row",
7977
7978
  "list--small": "DetailList_list--small",
7978
7979
  "list--medium": "DetailList_list--medium",
7979
7980
  "list--large": "DetailList_list--large",
@@ -7982,6 +7983,32 @@ var DetailList_default = {
7982
7983
  term: "DetailList_term"
7983
7984
  };
7984
7985
 
7986
+ // src/components/Table/normal/Table.module.css
7987
+ var Table_default = {
7988
+ wrapper: "Table_wrapper",
7989
+ "wrapper--scrollable": "Table_wrapper--scrollable",
7990
+ table: "Table_table",
7991
+ "table--with-dividers": "Table_table--with-dividers",
7992
+ "row--body": "Table_row--body",
7993
+ "row--colapsible-header--open": "Table_row--colapsible-header--open",
7994
+ "table--sticky-header": "Table_table--sticky-header",
7995
+ "table--with-stripes": "Table_table--with-stripes",
7996
+ "table--small": "Table_table--small",
7997
+ "table--medium": "Table_table--medium",
7998
+ "table--large": "Table_table--large",
7999
+ row: "Table_row",
8000
+ "row--sum": "Table_row--sum",
8001
+ "row--selected": "Table_row--selected",
8002
+ "row--hoverable": "Table_row--hoverable",
8003
+ "cell--head": "Table_cell--head",
8004
+ "cell--left": "Table_cell--left",
8005
+ "cell--right": "Table_cell--right",
8006
+ "cell--center": "Table_cell--center",
8007
+ cell__inner: "Table_cell__inner",
8008
+ "sort-button": "Table_sort-button",
8009
+ "collapse-button": "Table_collapse-button"
8010
+ };
8011
+
7985
8012
  // src/components/DetailList/DetailList.tsx
7986
8013
  var import_jsx_runtime258 = require("react/jsx-runtime");
7987
8014
  var DETAIL_LIST_SIZES = createSizes("small", "medium", "large");
@@ -8003,10 +8030,11 @@ var DetailList = ({
8003
8030
  cn(
8004
8031
  className,
8005
8032
  typographyStyles_default[`body-short-${size2}`],
8033
+ Table_default.table,
8006
8034
  DetailList_default.list,
8007
8035
  DetailList_default[`list--${size2}`],
8008
- withDividers && DetailList_default["list--with-dividers"],
8009
- striped && !smallScreenBreakpoint && DetailList_default["list--striped"],
8036
+ withDividers && Table_default["table--with-dividers"],
8037
+ striped && !smallScreenBreakpoint && Table_default["table--with-stripes"],
8010
8038
  striped && smallScreenBreakpoint && DetailList_default["list--striped-with-bp"]
8011
8039
  ),
8012
8040
  style,
@@ -8033,7 +8061,7 @@ var DetailListRow = ({ className, ...rest }) => {
8033
8061
  {
8034
8062
  display: "table-row",
8035
8063
  hideBelow: hasBp ? bp : void 0,
8036
- className: cn(className, DetailList_default.row),
8064
+ className: cn(className, DetailList_default.row, Table_default["row--body"]),
8037
8065
  ...rest
8038
8066
  }
8039
8067
  ),
@@ -8043,7 +8071,12 @@ var DetailListRow = ({ className, ...rest }) => {
8043
8071
  display: "flex",
8044
8072
  flexDirection: "column",
8045
8073
  showBelow: bp,
8046
- className: cn(className, DetailList_default.row, DetailList_default.column),
8074
+ className: cn(
8075
+ className,
8076
+ DetailList_default.row,
8077
+ DetailList_default.column,
8078
+ Table_default["row--body"]
8079
+ ),
8047
8080
  ...rest
8048
8081
  }
8049
8082
  )
@@ -12712,7 +12745,7 @@ var PhoneInput = ({
12712
12745
  children: countryOptions.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("option", { value: item.countryCode, children: item.label }, index))
12713
12746
  }
12714
12747
  ),
12715
- /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(Box, { width: "100%", className: Input_default["input-group"], children: [
12748
+ /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(Box, { width: "100%", display: "flex", className: Input_default["input-group"], children: [
12716
12749
  /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
12717
12750
  "span",
12718
12751
  {
@@ -13949,32 +13982,6 @@ function useIsInTableHead() {
13949
13982
  return isInTableHead;
13950
13983
  }
13951
13984
 
13952
- // src/components/Table/normal/Table.module.css
13953
- var Table_default = {
13954
- wrapper: "Table_wrapper",
13955
- "wrapper--scrollable": "Table_wrapper--scrollable",
13956
- table: "Table_table",
13957
- "table--with-dividers": "Table_table--with-dividers",
13958
- "row--body": "Table_row--body",
13959
- "row--colapsible-header--open": "Table_row--colapsible-header--open",
13960
- "table--sticky-header": "Table_table--sticky-header",
13961
- "table--with-stripes": "Table_table--with-stripes",
13962
- "table--small": "Table_table--small",
13963
- "table--medium": "Table_table--medium",
13964
- "table--large": "Table_table--large",
13965
- row: "Table_row",
13966
- "row--sum": "Table_row--sum",
13967
- "row--selected": "Table_row--selected",
13968
- "row--hoverable": "Table_row--hoverable",
13969
- "cell--head": "Table_cell--head",
13970
- "cell--left": "Table_cell--left",
13971
- "cell--right": "Table_cell--right",
13972
- "cell--center": "Table_cell--center",
13973
- cell__inner: "Table_cell__inner",
13974
- "sort-button": "Table_sort-button",
13975
- "collapse-button": "Table_collapse-button"
13976
- };
13977
-
13978
13985
  // src/components/Table/normal/Cell.tsx
13979
13986
  var import_jsx_runtime324 = require("react/jsx-runtime");
13980
13987
  var Cell = ({
@@ -15573,6 +15580,7 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
15573
15580
  SunIcon,
15574
15581
  SupportIcon,
15575
15582
  SyncIcon,
15583
+ TG_HEADING_TYPES,
15576
15584
  Tab,
15577
15585
  TabList,
15578
15586
  TabPanel,