@norges-domstoler/dds-components 22.7.2 → 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)(
@@ -15577,6 +15580,7 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
15577
15580
  SunIcon,
15578
15581
  SupportIcon,
15579
15582
  SyncIcon,
15583
+ TG_HEADING_TYPES,
15580
15584
  Tab,
15581
15585
  TabList,
15582
15586
  TabPanel,