@norges-domstoler/dds-components 18.0.0 → 18.1.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
@@ -1569,19 +1569,19 @@ type DrawerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
1569
1569
  * @default "right"
1570
1570
  */
1571
1571
  placement?: DrawerPlacement;
1572
- /**Header for `<Drawer />`. Har default styling hvis verdien er en string. */
1572
+ /**Header for `<Drawer>`. Har default styling hvis verdien er en string. */
1573
1573
  header?: string | ReactNode;
1574
- /**Spesifiserer om `<Drawer />` skal legges vises. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1574
+ /**Spesifiserer om `<Drawer>` vises. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1575
1575
  isOpen?: boolean;
1576
- /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1576
+ /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1577
1577
  onClose?: () => void;
1578
- /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
1579
- * @default document.body
1578
+ /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
1579
+ * @default themeProviderRef
1580
1580
  */
1581
1581
  parentElement?: HTMLElement;
1582
1582
  /**Custom props for breddehåndtering ved behov. */
1583
1583
  widthProps?: WidthProps;
1584
- /**Ref til elementet som åpner `<Drawer />`. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1584
+ /**Ref til elementet som åpner `<Drawer>`. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1585
1585
  triggerRef?: RefObject<HTMLElement>;
1586
1586
  /**
1587
1587
  * Om `<Drawer>` skal vises med backdrop som gråer ut bakgrunnen.
@@ -1597,19 +1597,19 @@ declare const Drawer: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<
1597
1597
  * @default "right"
1598
1598
  */
1599
1599
  placement?: DrawerPlacement;
1600
- /**Header for `<Drawer />`. Har default styling hvis verdien er en string. */
1600
+ /**Header for `<Drawer>`. Har default styling hvis verdien er en string. */
1601
1601
  header?: string | ReactNode;
1602
- /**Spesifiserer om `<Drawer />` skal legges vises. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1602
+ /**Spesifiserer om `<Drawer>` vises. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1603
1603
  isOpen?: boolean;
1604
- /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1604
+ /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1605
1605
  onClose?: () => void;
1606
- /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
1607
- * @default document.body
1606
+ /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
1607
+ * @default themeProviderRef
1608
1608
  */
1609
1609
  parentElement?: HTMLElement;
1610
1610
  /**Custom props for breddehåndtering ved behov. */
1611
1611
  widthProps?: WidthProps;
1612
- /**Ref til elementet som åpner `<Drawer />`. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1612
+ /**Ref til elementet som åpner `<Drawer>`. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1613
1613
  triggerRef?: RefObject<HTMLElement>;
1614
1614
  /**
1615
1615
  * Om `<Drawer>` skal vises med backdrop som gråer ut bakgrunnen.
@@ -2096,8 +2096,8 @@ type ModalProps = BaseComponentPropsWithChildren<HTMLDivElement, {
2096
2096
  isOpen?: boolean;
2097
2097
  /**Funksjon kjørt ved lukking; Settes hvis modal skal være lukkbar. Legger en lukkeknapp i hjørnet og kjøres ved Esc-trykk, lukkeknappklikk og museklikk utenfor. */
2098
2098
  onClose?: () => void;
2099
- /**Spesifiserer hvilken DOM node `<Modal />` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
2100
- * @default document.body
2099
+ /**Spesifiserer hvilken DOM node `<Modal>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
2100
+ * @default themeProviderRef
2101
2101
  */
2102
2102
  parentElement?: HTMLElement;
2103
2103
  /**Tittel/header i modal. Setter også `aria-labelledby`. */
@@ -2114,8 +2114,8 @@ declare const Modal: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<H
2114
2114
  isOpen?: boolean;
2115
2115
  /**Funksjon kjørt ved lukking; Settes hvis modal skal være lukkbar. Legger en lukkeknapp i hjørnet og kjøres ved Esc-trykk, lukkeknappklikk og museklikk utenfor. */
2116
2116
  onClose?: () => void;
2117
- /**Spesifiserer hvilken DOM node `<Modal />` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
2118
- * @default document.body
2117
+ /**Spesifiserer hvilken DOM node `<Modal>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
2118
+ * @default themeProviderRef
2119
2119
  */
2120
2120
  parentElement?: HTMLElement;
2121
2121
  /**Tittel/header i modal. Setter også `aria-labelledby`. */
@@ -2744,6 +2744,7 @@ declare const RadioButton: react.ForwardRefExoticComponent<Pick<Omit<react.Input
2744
2744
 
2745
2745
  type PickedInputHTMLAttributes$1 = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'readOnly' | 'checked' | 'value' | 'required' | 'onChange' | 'aria-describedby'>;
2746
2746
  type RadioButtonProps = BaseComponentPropsWithChildren<HTMLInputElement, SelectionControlCommonProps & PickedInputHTMLAttributes$1, Omit<InputHTMLAttributes<HTMLInputElement>, keyof PickedInputHTMLAttributes$1>>;
2747
+ type RadioValue = PickedInputHTMLAttributes$1['value'];
2747
2748
 
2748
2749
  type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithChildren<HTMLDivElement, SelectionControlGroupCommonProps & {
2749
2750
  /** Gir alle barna `name` prop.*/
@@ -2752,8 +2753,10 @@ type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithCh
2752
2753
  onChange?: (event: ChangeEvent<HTMLInputElement>, value: T | undefined) => void;
2753
2754
  /** Gjør alle barna påkrevd ved å gi dem `required` prop. Legger en markør (*) bak ledeteksten. */
2754
2755
  required?: boolean;
2755
- /**Default verdi - en `<RadioButton />` blir forhåndsvalgt. **OBS!** brukes kun når brukeren ikke skal fylle ut selv. */
2756
+ /**Verdi - en `<RadioButton>` med denne verdien blir valgt med controlled state. */
2756
2757
  value?: T | undefined;
2758
+ /**Default verdi - en `<RadioButton>` med denne verdien blir forhåndsvalgt med uncontrolled state. */
2759
+ defaultValue?: T | undefined;
2757
2760
  }, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
2758
2761
  declare const RadioButtonGroup: <T extends string | number = string>(props: RadioButtonGroupProps<T> & {
2759
2762
  ref?: Ref<HTMLDivElement>;
@@ -3916,4 +3919,4 @@ declare const VisuallyHidden: {
3916
3919
  displayName: string;
3917
3920
  };
3918
3921
 
3919
- export { Accordion, AccordionBody, type AccordionBodyProps, AccordionHeader, type AccordionHeaderProps, type AccordionProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDown, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, 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, type CardAppearance, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, type CardType, CaringIcon, CharCounter, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, type CommonInputProps, Contrast, type ContrastProps, CopyIcon, CourtIcon, DatePicker, type DatePickerProps, DateRangeIcon, 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, EditIcon, ElementAs, type ElementAsProps, EmptyContent, type EmptyContentProps, ErrorIcon, ExclaimIcon, ExpandIcon, type ExpandableCardProps, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FilterListOffIcon, FilterOffIcon, FindInPageIcon, FlickrIcon, 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, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GuardianIcon, HStack, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassBottomIcon, HourglassDisabledIcon, HourglassEmptyIcon, HourglassFullIcon, HourglassTopIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, type InfoCardProps, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, Input, InputMessage, type InputMessageProps, type InputMessageType, type InputProps, type InputSize, type InputTypographyTypes, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LibraryAddIcon, 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, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MenuIcon, MinusCirledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, NativeSelectPlaceholder, type NativeSelectPlaceholderProps, type NativeSelectProps, type NavigationCardProps, NotarialIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuListItemBaseProps, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, Pagination, type PaginationOption, type PaginationProps, Paper, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PropertyIcon, type PropsOf, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, ScreenSize, type ScreenSizeLiteral, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, Select, type SelectOption, type SelectProps, SettingsIcon, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, type StackProps, type StackSpacing, type StackStyleProps, StarFilledIcon, StarHalfFilled, StarIcon, StatefulInput, type StatefulInputProps, type StaticTypographyType, type SvgIcon, type SvgProps, SvgWrapper, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, 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, ThemeContext, ThemeProvider, type ThemeProviderProps, ThumbDownFilledIcon, ThumbDownIcon, type ThumbIconProps, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, ToggleRadio, type ToggleRadioProps, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WidthProps, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createSelectOptions, dateValueToNativeDate, defaultTypographyType, defaultTypographyTypeClassName, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getDefaultText, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, inputTypographyTypes, isCaption, isGridColumn, isHeading, isInlineElement, isKeyboardEvent, isLegend, isRelativeGridColumn, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderCharCounter, renderInputMessage, scrollbarStyling, spacingPropToCn, typographyTypes, useCombinedRef, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, visibilityTransition };
3922
+ export { Accordion, AccordionBody, type AccordionBodyProps, AccordionHeader, type AccordionHeaderProps, type AccordionProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDown, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, 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, type CardAppearance, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, type CardType, CaringIcon, CharCounter, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, type CommonInputProps, Contrast, type ContrastProps, CopyIcon, CourtIcon, DatePicker, type DatePickerProps, DateRangeIcon, 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, EditIcon, ElementAs, type ElementAsProps, EmptyContent, type EmptyContentProps, ErrorIcon, ExclaimIcon, ExpandIcon, type ExpandableCardProps, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FilterListOffIcon, FilterOffIcon, FindInPageIcon, FlickrIcon, 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, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GuardianIcon, HStack, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassBottomIcon, HourglassDisabledIcon, HourglassEmptyIcon, HourglassFullIcon, HourglassTopIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, type InfoCardProps, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, Input, InputMessage, type InputMessageProps, type InputMessageType, type InputProps, type InputSize, type InputTypographyTypes, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LibraryAddIcon, 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, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MenuIcon, MinusCirledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, NativeSelectPlaceholder, type NativeSelectPlaceholderProps, type NativeSelectProps, type NavigationCardProps, NotarialIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuListItemBaseProps, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, Pagination, type PaginationOption, type PaginationProps, Paper, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PropertyIcon, type PropsOf, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RadioValue, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, ScreenSize, type ScreenSizeLiteral, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, Select, type SelectOption, type SelectProps, SettingsIcon, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, type StackProps, type StackSpacing, type StackStyleProps, StarFilledIcon, StarHalfFilled, StarIcon, StatefulInput, type StatefulInputProps, type StaticTypographyType, type SvgIcon, type SvgProps, SvgWrapper, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, 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, ThemeContext, ThemeProvider, type ThemeProviderProps, ThumbDownFilledIcon, ThumbDownIcon, type ThumbIconProps, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, ToggleRadio, type ToggleRadioProps, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WidthProps, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createSelectOptions, dateValueToNativeDate, defaultTypographyType, defaultTypographyTypeClassName, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getDefaultText, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, inputTypographyTypes, isCaption, isGridColumn, isHeading, isInlineElement, isKeyboardEvent, isLegend, isRelativeGridColumn, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderCharCounter, renderInputMessage, scrollbarStyling, spacingPropToCn, typographyTypes, useCombinedRef, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, visibilityTransition };
package/dist/index.d.ts CHANGED
@@ -1569,19 +1569,19 @@ type DrawerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
1569
1569
  * @default "right"
1570
1570
  */
1571
1571
  placement?: DrawerPlacement;
1572
- /**Header for `<Drawer />`. Har default styling hvis verdien er en string. */
1572
+ /**Header for `<Drawer>`. Har default styling hvis verdien er en string. */
1573
1573
  header?: string | ReactNode;
1574
- /**Spesifiserer om `<Drawer />` skal legges vises. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1574
+ /**Spesifiserer om `<Drawer>` vises. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1575
1575
  isOpen?: boolean;
1576
- /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1576
+ /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1577
1577
  onClose?: () => void;
1578
- /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
1579
- * @default document.body
1578
+ /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
1579
+ * @default themeProviderRef
1580
1580
  */
1581
1581
  parentElement?: HTMLElement;
1582
1582
  /**Custom props for breddehåndtering ved behov. */
1583
1583
  widthProps?: WidthProps;
1584
- /**Ref til elementet som åpner `<Drawer />`. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1584
+ /**Ref til elementet som åpner `<Drawer>`. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1585
1585
  triggerRef?: RefObject<HTMLElement>;
1586
1586
  /**
1587
1587
  * Om `<Drawer>` skal vises med backdrop som gråer ut bakgrunnen.
@@ -1597,19 +1597,19 @@ declare const Drawer: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<
1597
1597
  * @default "right"
1598
1598
  */
1599
1599
  placement?: DrawerPlacement;
1600
- /**Header for `<Drawer />`. Har default styling hvis verdien er en string. */
1600
+ /**Header for `<Drawer>`. Har default styling hvis verdien er en string. */
1601
1601
  header?: string | ReactNode;
1602
- /**Spesifiserer om `<Drawer />` skal legges vises. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1602
+ /**Spesifiserer om `<Drawer>` vises. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1603
1603
  isOpen?: boolean;
1604
- /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1604
+ /**Funksjon kjørt ved lukking. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1605
1605
  onClose?: () => void;
1606
- /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
1607
- * @default document.body
1606
+ /**Spesifiserer hvilken DOM node `<Drawer>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
1607
+ * @default themeProviderRef
1608
1608
  */
1609
1609
  parentElement?: HTMLElement;
1610
1610
  /**Custom props for breddehåndtering ved behov. */
1611
1611
  widthProps?: WidthProps;
1612
- /**Ref til elementet som åpner `<Drawer />`. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
1612
+ /**Ref til elementet som åpner `<Drawer>`. **OBS!** nødvendig kun hvis `<DrawerGroup>` ikke er i bruk. */
1613
1613
  triggerRef?: RefObject<HTMLElement>;
1614
1614
  /**
1615
1615
  * Om `<Drawer>` skal vises med backdrop som gråer ut bakgrunnen.
@@ -2096,8 +2096,8 @@ type ModalProps = BaseComponentPropsWithChildren<HTMLDivElement, {
2096
2096
  isOpen?: boolean;
2097
2097
  /**Funksjon kjørt ved lukking; Settes hvis modal skal være lukkbar. Legger en lukkeknapp i hjørnet og kjøres ved Esc-trykk, lukkeknappklikk og museklikk utenfor. */
2098
2098
  onClose?: () => void;
2099
- /**Spesifiserer hvilken DOM node `<Modal />` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
2100
- * @default document.body
2099
+ /**Spesifiserer hvilken DOM node `<Modal>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
2100
+ * @default themeProviderRef
2101
2101
  */
2102
2102
  parentElement?: HTMLElement;
2103
2103
  /**Tittel/header i modal. Setter også `aria-labelledby`. */
@@ -2114,8 +2114,8 @@ declare const Modal: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<H
2114
2114
  isOpen?: boolean;
2115
2115
  /**Funksjon kjørt ved lukking; Settes hvis modal skal være lukkbar. Legger en lukkeknapp i hjørnet og kjøres ved Esc-trykk, lukkeknappklikk og museklikk utenfor. */
2116
2116
  onClose?: () => void;
2117
- /**Spesifiserer hvilken DOM node `<Modal />` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` (skaper ikke ny DOM node).
2118
- * @default document.body
2117
+ /**Spesifiserer hvilken DOM node `<Modal>` skal ha som forelder via React portal. Brukes med f.eks `document.getElementById("id")` eller ref (skaper ikke ny DOM node).
2118
+ * @default themeProviderRef
2119
2119
  */
2120
2120
  parentElement?: HTMLElement;
2121
2121
  /**Tittel/header i modal. Setter også `aria-labelledby`. */
@@ -2744,6 +2744,7 @@ declare const RadioButton: react.ForwardRefExoticComponent<Pick<Omit<react.Input
2744
2744
 
2745
2745
  type PickedInputHTMLAttributes$1 = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'readOnly' | 'checked' | 'value' | 'required' | 'onChange' | 'aria-describedby'>;
2746
2746
  type RadioButtonProps = BaseComponentPropsWithChildren<HTMLInputElement, SelectionControlCommonProps & PickedInputHTMLAttributes$1, Omit<InputHTMLAttributes<HTMLInputElement>, keyof PickedInputHTMLAttributes$1>>;
2747
+ type RadioValue = PickedInputHTMLAttributes$1['value'];
2747
2748
 
2748
2749
  type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithChildren<HTMLDivElement, SelectionControlGroupCommonProps & {
2749
2750
  /** Gir alle barna `name` prop.*/
@@ -2752,8 +2753,10 @@ type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithCh
2752
2753
  onChange?: (event: ChangeEvent<HTMLInputElement>, value: T | undefined) => void;
2753
2754
  /** Gjør alle barna påkrevd ved å gi dem `required` prop. Legger en markør (*) bak ledeteksten. */
2754
2755
  required?: boolean;
2755
- /**Default verdi - en `<RadioButton />` blir forhåndsvalgt. **OBS!** brukes kun når brukeren ikke skal fylle ut selv. */
2756
+ /**Verdi - en `<RadioButton>` med denne verdien blir valgt med controlled state. */
2756
2757
  value?: T | undefined;
2758
+ /**Default verdi - en `<RadioButton>` med denne verdien blir forhåndsvalgt med uncontrolled state. */
2759
+ defaultValue?: T | undefined;
2757
2760
  }, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
2758
2761
  declare const RadioButtonGroup: <T extends string | number = string>(props: RadioButtonGroupProps<T> & {
2759
2762
  ref?: Ref<HTMLDivElement>;
@@ -3916,4 +3919,4 @@ declare const VisuallyHidden: {
3916
3919
  displayName: string;
3917
3920
  };
3918
3921
 
3919
- export { Accordion, AccordionBody, type AccordionBodyProps, AccordionHeader, type AccordionHeaderProps, type AccordionProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDown, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, 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, type CardAppearance, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, type CardType, CaringIcon, CharCounter, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, type CommonInputProps, Contrast, type ContrastProps, CopyIcon, CourtIcon, DatePicker, type DatePickerProps, DateRangeIcon, 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, EditIcon, ElementAs, type ElementAsProps, EmptyContent, type EmptyContentProps, ErrorIcon, ExclaimIcon, ExpandIcon, type ExpandableCardProps, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FilterListOffIcon, FilterOffIcon, FindInPageIcon, FlickrIcon, 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, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GuardianIcon, HStack, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassBottomIcon, HourglassDisabledIcon, HourglassEmptyIcon, HourglassFullIcon, HourglassTopIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, type InfoCardProps, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, Input, InputMessage, type InputMessageProps, type InputMessageType, type InputProps, type InputSize, type InputTypographyTypes, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LibraryAddIcon, 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, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MenuIcon, MinusCirledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, NativeSelectPlaceholder, type NativeSelectPlaceholderProps, type NativeSelectProps, type NavigationCardProps, NotarialIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuListItemBaseProps, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, Pagination, type PaginationOption, type PaginationProps, Paper, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PropertyIcon, type PropsOf, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, ScreenSize, type ScreenSizeLiteral, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, Select, type SelectOption, type SelectProps, SettingsIcon, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, type StackProps, type StackSpacing, type StackStyleProps, StarFilledIcon, StarHalfFilled, StarIcon, StatefulInput, type StatefulInputProps, type StaticTypographyType, type SvgIcon, type SvgProps, SvgWrapper, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, 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, ThemeContext, ThemeProvider, type ThemeProviderProps, ThumbDownFilledIcon, ThumbDownIcon, type ThumbIconProps, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, ToggleRadio, type ToggleRadioProps, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WidthProps, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createSelectOptions, dateValueToNativeDate, defaultTypographyType, defaultTypographyTypeClassName, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getDefaultText, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, inputTypographyTypes, isCaption, isGridColumn, isHeading, isInlineElement, isKeyboardEvent, isLegend, isRelativeGridColumn, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderCharCounter, renderInputMessage, scrollbarStyling, spacingPropToCn, typographyTypes, useCombinedRef, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, visibilityTransition };
3922
+ export { Accordion, AccordionBody, type AccordionBodyProps, AccordionHeader, type AccordionHeaderProps, type AccordionProps, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDown, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, Backdrop, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseItemProps, type BaseLabelProps, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, 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, type CardAppearance, CardExpandable, CardExpandableBody, type CardExpandableBodyProps, CardExpandableHeader, type CardExpandableHeaderProps, type CardExpandableProps, type CardProps, type CardType, CaringIcon, CharCounter, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CollapsibleTable, type CollapsibleTableProps, CollapsibleRow as CollapsibleTableRow, type ColumnsOccupied, CommentIcon, type CommonInputProps, Contrast, type ContrastProps, CopyIcon, CourtIcon, DatePicker, type DatePickerProps, DateRangeIcon, 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, EditIcon, ElementAs, type ElementAsProps, EmptyContent, type EmptyContentProps, ErrorIcon, ExclaimIcon, ExpandIcon, type ExpandableCardProps, type ExtractStrict, FacebookIcon, FamilyIcon, FavStar, type FavStarProps, Feedback, FeedbackIcon, type FeedbackProps, Fieldset, type FieldsetProps, FileAddIcon, FileIcon, type FileList, FileShieldedIcon, FileTextIcon, FileUploader, type FileUploaderAccept, type FileUploaderProps, FilterIcon, FilterListIcon, FilterListOffIcon, FilterOffIcon, FindInPageIcon, FlickrIcon, 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, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, GuardianIcon, HStack, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassBottomIcon, HourglassDisabledIcon, HourglassEmptyIcon, HourglassFullIcon, HourglassTopIcon, type HyphenTypographyType, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, type InfoCardProps, InfoIcon, InlineButton, type InlineButtonProps, InlineEditInput, type InlineEditInputProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, Input, InputMessage, type InputMessageProps, type InputMessageType, type InputProps, type InputSize, type InputTypographyTypes, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, JordskiftesakIcon, KeyIcon, Label, type LabelProps, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LibraryAddIcon, 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, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MenuIcon, MinusCirledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, NativeSelectPlaceholder, type NativeSelectPlaceholderProps, type NativeSelectProps, type NavigationCardProps, NotarialIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OverflowMenu, OverflowMenuButton, type OverflowMenuButtonProps, OverflowMenuDivider, OverflowMenuGroup, type OverflowMenuGroupProps, OverflowMenuLink, type OverflowMenuLinkProps, OverflowMenuList, OverflowMenuListHeader, type OverflowMenuListItemBaseProps, type OverflowMenuProps, OverflowMenuSpan, type OverflowMenuSpanProps, Pagination, type PaginationOption, type PaginationProps, Paper, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, type PhoneInputProps, type PhoneInputValue, PinIcon, type Placement, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PowerOfAttorneyIcon, PrintIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressTracker, ProgressTrackerItem, type ProgressTrackerItemProps, type ProgressTrackerProps, PropertyIcon, type PropsOf, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RadioValue, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, ScreenSize, type ScreenSizeLiteral, Search, SearchAutocompleteWrapper, type SearchAutocompleteWrapperProps, type SearchButtonProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, SearchSuggestions, type SearchSuggestionsProps, Select, type SelectOption, type SelectProps, SettingsIcon, type Size, Skeleton, type SkeletonAppearance, type SkeletonProps, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, Spinner, type SpinnerProps, SplitButton, type SplitButtonPrimaryActionProps, type SplitButtonProps, type SplitButtonPurpose, type SplitButtonSecondaryActionsProps, type StackProps, type StackSpacing, type StackStyleProps, StarFilledIcon, StarHalfFilled, StarIcon, StatefulInput, type StatefulInputProps, type StaticTypographyType, type SvgIcon, type SvgProps, SvgWrapper, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, 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, ThemeContext, ThemeProvider, type ThemeProviderProps, ThumbDownFilledIcon, ThumbDownIcon, type ThumbIconProps, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, ToggleRadio, type ToggleRadioProps, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, type TypographyAnchorType, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyLabelType, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, WebexIcon, type WeightedSearchData, type WidthProps, type WithRequiredIf, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, countryOptions, createSelectOptions, dateValueToNativeDate, defaultTypographyType, defaultTypographyTypeClassName, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getDefaultText, getElementType, getLiteralScreenSize, getTypographyCn, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, index as icons, inheritLinkStyling, inlineElements, inputTypographyTypes, isCaption, isGridColumn, isHeading, isInlineElement, isKeyboardEvent, isLegend, isRelativeGridColumn, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderCharCounter, renderInputMessage, scrollbarStyling, spacingPropToCn, typographyTypes, useCombinedRef, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, visibilityTransition };
package/dist/index.js CHANGED
@@ -10913,12 +10913,17 @@ var useRadioButtonGroup = () => {
10913
10913
 
10914
10914
  // src/components/SelectionControl/RadioButton/RadioButton.tsx
10915
10915
  var import_jsx_runtime283 = require("react/jsx-runtime");
10916
- var isValueEqualToGroupValueOrFalsy = (value, group) => {
10916
+ var getIsChecked = ({
10917
+ value,
10918
+ group,
10919
+ checked
10920
+ }) => {
10921
+ if (checked !== void 0) return checked;
10917
10922
  if (typeof value !== "undefined" && value !== null && group) {
10918
10923
  if (typeof value === "number") {
10919
- return value === Number(group == null ? void 0 : group.value);
10924
+ return value === Number(group.value);
10920
10925
  }
10921
- return value === (group == null ? void 0 : group.value);
10926
+ return value === group.value;
10922
10927
  }
10923
10928
  return !!value;
10924
10929
  };
@@ -10952,7 +10957,7 @@ var RadioButton = (0, import_react127.forwardRef)(
10952
10957
  const radioButtonGroup = useRadioButtonGroup();
10953
10958
  const handleChange = (event) => {
10954
10959
  onChange && onChange(event);
10955
- radioButtonGroup == null ? void 0 : radioButtonGroup.onChange(event);
10960
+ radioButtonGroup == null ? void 0 : radioButtonGroup.onChange(event, event.target.value);
10956
10961
  };
10957
10962
  const describedByIds = [];
10958
10963
  if (radioButtonGroup == null ? void 0 : radioButtonGroup.errorMessageId)
@@ -10961,6 +10966,7 @@ var RadioButton = (0, import_react127.forwardRef)(
10961
10966
  const isReadOnly = readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly);
10962
10967
  const isDisabled = disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled);
10963
10968
  const hasError = error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error);
10969
+ const isChecked = getIsChecked({ value, group: radioButtonGroup, checked });
10964
10970
  return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
10965
10971
  Label2,
10966
10972
  {
@@ -10981,7 +10987,7 @@ var RadioButton = (0, import_react127.forwardRef)(
10981
10987
  name: name != null ? name : radioButtonGroup == null ? void 0 : radioButtonGroup.name,
10982
10988
  disabled: isDisabled,
10983
10989
  required: required || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.required),
10984
- checked: typeof checked !== "undefined" ? checked : isValueEqualToGroupValueOrFalsy(value, radioButtonGroup),
10990
+ checked: isChecked,
10985
10991
  onChange: readOnlyChangeHandler(isReadOnly, handleChange),
10986
10992
  value,
10987
10993
  "aria-describedby": describedByIds.length > 0 ? describedByIds.join(" ") : void 0,
@@ -11028,6 +11034,7 @@ var RadioButtonGroupInner = (props, ref) => {
11028
11034
  readOnly = false,
11029
11035
  direction = "row",
11030
11036
  value,
11037
+ defaultValue,
11031
11038
  children,
11032
11039
  required = false,
11033
11040
  onChange,
@@ -11037,13 +11044,22 @@ var RadioButtonGroupInner = (props, ref) => {
11037
11044
  ...rest
11038
11045
  } = props;
11039
11046
  const { "aria-required": ariaRequired = false } = htmlProps;
11040
- const [groupValue, setGroupValue] = (0, import_react128.useState)(value);
11047
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react128.useState)(
11048
+ defaultValue
11049
+ );
11041
11050
  const generatedId = (0, import_react128.useId)();
11042
11051
  const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
11043
- const handleChange = combineHandlers(
11044
- (e) => setGroupValue(e.target.value),
11045
- (e) => onChange && onChange(e, e.target.value)
11046
- );
11052
+ const isControlled = value !== void 0;
11053
+ const groupValue = isControlled ? value : uncontrolledValue;
11054
+ const handleChange = (e) => {
11055
+ const newValue = e.target.value;
11056
+ if (!isControlled) {
11057
+ setUncontrolledValue(newValue);
11058
+ }
11059
+ if (onChange) {
11060
+ onChange(e, newValue);
11061
+ }
11062
+ };
11047
11063
  const hasErrorMessage = !!errorMessage;
11048
11064
  const showRequiredMarker = required || ariaRequired;
11049
11065
  const tipId = tip && `${uniqueGroupId}-tip`;
@@ -11051,6 +11067,7 @@ var RadioButtonGroupInner = (props, ref) => {
11051
11067
  const contextProps = {
11052
11068
  name,
11053
11069
  disabled,
11070
+ defaultValue,
11054
11071
  error: hasErrorMessage,
11055
11072
  errorMessageId,
11056
11073
  required,