@norges-domstoler/dds-components 24.1.0 → 24.1.1

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
@@ -202,6 +202,7 @@ type CommonComponentProps<THTMLProps extends object, TRef extends Ref<unknown>>
202
202
  /**Ref til komponenten. */
203
203
  ref?: TRef;
204
204
  };
205
+ type HTMLAttributesFor<T extends Element> = T extends HTMLButtonElement ? React.ButtonHTMLAttributes<T> : T extends HTMLAnchorElement ? React.AnchorHTMLAttributes<T> : React.HTMLAttributes<T>;
205
206
  /**
206
207
  * Basetype for props som eksponeres til konsumenter av designsystemet.
207
208
  * - Rot: `id`, `className`, `style`, `TOtherProps`
@@ -211,9 +212,11 @@ type CommonComponentProps<THTMLProps extends object, TRef extends Ref<unknown>>
211
212
  *
212
213
  * @template TElement Element-type som genereres av komponenten.
213
214
  * @template TOtherProps Andre props komponenten skal eksponere til konsumenter.
214
- * @template THTMLAttributesProps Standard `HTMLAttributes<T>` men kan overstyres for f.eks knapper hvis man trenger en annen basetype for `htmlProps`.
215
+ * @template THTMLAttributesProps Standard `HTMLAttributes<T>`;
216
+ * settes til `ButtonHTMLAttributes<T>` hvis TElement er `HTMLButtonElement` og til `AnchorHTMLAttributes<T>` hvis TElement er `HTMLAnchorElement`.
217
+ * Kan overstyres hvis man trenger en annen basetype for `htmlProps`.
215
218
  */
216
- type BaseComponentProps<TElement extends Element, TOtherProps extends object = object, THTMLAttributesProps extends HTMLAttributes<TElement> = HTMLAttributes<TElement>> = TOtherProps & CommonComponentProps<Omit<THTMLAttributesProps, keyof HTMLRootProps | keyof TOtherProps>, Ref<TElement>>;
219
+ type BaseComponentProps<TElement extends Element, TOtherProps extends object = object, THTMLAttributesProps extends HTMLAttributesFor<TElement> = HTMLAttributesFor<TElement>> = TOtherProps & CommonComponentProps<Omit<THTMLAttributesProps, keyof HTMLRootProps | keyof TOtherProps>, Ref<TElement>>;
217
220
  /**
218
221
  * Basetype for polymorfe props som eksponeres til konsumenter av designsystemet.
219
222
  * - Rot: `id`, `className`, `style`, `TOtherProps`
@@ -232,7 +235,7 @@ type PolymorphicBaseComponentProps<E extends ElementType, TOtherProps extends ob
232
235
  /**
233
236
  * Utvidelse av {@link BaseComponentProps} med prop for `children`.
234
237
  */
235
- type BaseComponentPropsWithChildren<T extends Element, TProps extends object = object, THTMLProps extends HTMLAttributes<T> = HTMLAttributes<T>> = BaseComponentProps<T, TProps & {
238
+ type BaseComponentPropsWithChildren<T extends Element, TProps extends object = object, THTMLProps extends HTMLAttributesFor<T> = HTMLAttributesFor<T>> = BaseComponentProps<T, TProps & {
236
239
  /**Barn. */
237
240
  children?: ReactNode;
238
241
  }, THTMLProps>;
@@ -331,7 +334,7 @@ declare const BUTTON_PURPOSES: ["primary", "secondary", "tertiary", "danger"];
331
334
  type ButtonSize = (typeof BUTTON_SIZES)[number];
332
335
  type ButtonPurpose = (typeof BUTTON_PURPOSES)[number];
333
336
  type IconPosition = 'left' | 'right';
334
- type PickedHTMLAttributes$4 = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur' | 'type' | 'aria-label'>;
337
+ type PickedHTMLAttributes$3 = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur' | 'type' | 'aria-label'>;
335
338
  type ButtonProps<I extends SvgIcon = SvgIcon, T extends ElementType = 'button'> = PolymorphicBaseComponentProps<T, {
336
339
  /** Størrelsen på knappen.
337
340
  * @default "medium"
@@ -361,7 +364,7 @@ type ButtonProps<I extends SvgIcon = SvgIcon, T extends ElementType = 'button'>
361
364
  iconState?: IconStatesOf<I>;
362
365
  /**Knapp med full bredde. */
363
366
  fullWidth?: boolean;
364
- } & PickedHTMLAttributes$4>;
367
+ } & PickedHTMLAttributes$3>;
365
368
  //#endregion
366
369
  //#region ../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts
367
370
  interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
@@ -14962,7 +14965,7 @@ type AnchorTypographyProps = BaseComponentPropsWithChildren<HTMLAnchorElement, {
14962
14965
  href?: string | undefined;
14963
14966
  /**nativ `target`-prop ved `typographyType='a'`. */
14964
14967
  target?: string;
14965
- }, AnchorHTMLAttributes<HTMLAnchorElement>>;
14968
+ }>;
14966
14969
  type LabelTypographyProps = BaseComponentPropsWithChildren<HTMLLabelElement, HTMLAttributes<HTMLLabelElement>>;
14967
14970
  type OtherTypographyProps = BaseComponentPropsWithChildren<HTMLElement, HTMLAttributes<HTMLElement>>;
14968
14971
  type TypographyProps = ({
@@ -15017,7 +15020,7 @@ declare const Heading: {
15017
15020
  };
15018
15021
  //#endregion
15019
15022
  //#region src/components/Typography/Label/Label.d.ts
15020
- type PickedHTMLAttributes$3 = Pick<LabelHTMLAttributes<HTMLLabelElement>, 'htmlFor'>;
15023
+ type PickedHTMLAttributes$2 = Pick<LabelHTMLAttributes<HTMLLabelElement>, 'htmlFor'>;
15021
15024
  interface BaseLabelProps {
15022
15025
  /** Om input knyttet til ledeteksten er påkrevd; påvirker styling. */
15023
15026
  showRequiredStyling?: boolean;
@@ -15026,7 +15029,7 @@ interface BaseLabelProps {
15026
15029
  /**Innhold som står etter ledeteksten (knapp med ekstra info e.l.). */
15027
15030
  afterLabelContent?: ReactNode;
15028
15031
  }
15029
- type LabelProps = BaseComponentPropsWithChildren<HTMLLabelElement, BaseLabelProps & CommonInlineTypographyProps & PickedHTMLAttributes$3>;
15032
+ type LabelProps = BaseComponentPropsWithChildren<HTMLLabelElement, BaseLabelProps & CommonInlineTypographyProps & PickedHTMLAttributes$2>;
15030
15033
  declare const Label: {
15031
15034
  ({ showRequiredStyling, readOnly, id, className, style, htmlProps, children, afterLabelContent, ...rest }: LabelProps): import("react").JSX.Element;
15032
15035
  displayName: string;
@@ -15045,7 +15048,7 @@ declare const Legend: {
15045
15048
  };
15046
15049
  //#endregion
15047
15050
  //#region src/components/Typography/Link/Link.d.ts
15048
- type PickedHTMLAttributes$2 = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'href' | 'target'>;
15051
+ type PickedHTMLAttributes$1 = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'href' | 'target'>;
15049
15052
  type LinkProps<T extends ElementType = 'a'> = PolymorphicBaseComponentProps<T, {
15050
15053
  /**Om lenken kan få `:visited`-styling. */
15051
15054
  withVisited?: boolean;
@@ -15060,7 +15063,7 @@ type LinkProps<T extends ElementType = 'a'> = PolymorphicBaseComponentProps<T, {
15060
15063
  * Ikon kan legges inn som barn ved siden av teksten med `<Icon>`-komponent.
15061
15064
  * */
15062
15065
  withIconStyling?: boolean;
15063
- } & CommonInlineTypographyProps & PickedHTMLAttributes$2>;
15066
+ } & CommonInlineTypographyProps & PickedHTMLAttributes$1>;
15064
15067
  declare const Link: {
15065
15068
  <T extends ElementType = "a">({ id, className, htmlProps, children, typographyType, withMargins, withVisited, style, color, as: propAs, isAnchor: propIsAnchor, withIconStyling, ...rest }: LinkProps<T>): import("react").JSX.Element;
15066
15069
  displayName: string;
@@ -15088,7 +15091,7 @@ type AccordionHeaderProps = Omit<BaseComponentPropsWithChildren<HTMLButtonElemen
15088
15091
  typographyType?: StaticTypographyType;
15089
15092
  /**Angir om teksten skal være i "bold"-format. */
15090
15093
  bold?: boolean;
15091
- }, ButtonHTMLAttributes<HTMLButtonElement>>, 'id'>;
15094
+ }>, 'id'>;
15092
15095
  declare const AccordionHeader: {
15093
15096
  ({ children, className, style, htmlProps, typographyType, bold, ...rest }: AccordionHeaderProps): import("react").JSX.Element;
15094
15097
  displayName: string;
@@ -15141,7 +15144,7 @@ declare const Breadcrumbs: {
15141
15144
  };
15142
15145
  //#endregion
15143
15146
  //#region src/components/ButtonGroup/ButtonGroup.d.ts
15144
- type PickedHTMLAttributes$1 = Pick<HTMLAttributes<HTMLDivElement>, 'role' | 'aria-label' | 'aria-labelledby'>;
15147
+ type PickedHTMLAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'role' | 'aria-label' | 'aria-labelledby'>;
15145
15148
  type ButtonGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
15146
15149
  /**Retning for gruppen.
15147
15150
  * @default "row"
@@ -15159,7 +15162,7 @@ type ButtonGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
15159
15162
  * @default "group"
15160
15163
  */
15161
15164
  role?: AriaRole;
15162
- } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof PickedHTMLAttributes$1>>;
15165
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof PickedHTMLAttributes>>;
15163
15166
  declare const ButtonGroup: {
15164
15167
  ({ children, id, className, style, htmlProps, direction, buttonSize, role, ...rest }: ButtonGroupProps): import("react").JSX.Element;
15165
15168
  displayName: string;
@@ -15281,7 +15284,7 @@ type CardExpandableHeaderProps = Omit<BaseComponentPropsWithChildren<HTMLButtonE
15281
15284
  typographyType?: StaticTypographyType;
15282
15285
  /**Angir om teksten skal være i "bold"-format. */
15283
15286
  bold?: boolean;
15284
- }, ButtonHTMLAttributes<HTMLButtonElement>>, 'id'>;
15287
+ }>, 'id'>;
15285
15288
  declare const CardExpandableHeader: {
15286
15289
  ({ children, className, style, htmlProps, padding, typographyType, bold, ...rest }: CardExpandableHeaderProps): import("react").JSX.Element;
15287
15290
  displayName: string;
@@ -15319,7 +15322,7 @@ type CardSelectableGroupProps<T extends string | number> = BaseComponentPropsWit
15319
15322
  value?: T | undefined;
15320
15323
  /**Default verdi - en `<CardSelectable>` med denne verdien blir forhåndsvalgt med uncontrolled state. */
15321
15324
  defaultValue?: T | undefined;
15322
- }, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
15325
+ }>;
15323
15326
  declare const CardSelectableGroup: {
15324
15327
  <T extends string | number = string>({ name, cardType, errorMessage, disabled, readOnly, value, defaultValue, children, required, onChange, id, tipId, className, style, htmlProps, ...rest }: CardSelectableGroupProps<T>): import("react").JSX.Element;
15325
15328
  displayName: string;
@@ -15565,7 +15568,7 @@ type DividerProps = BaseComponentProps<HTMLHRElement, {
15565
15568
  * @default "default"
15566
15569
  */
15567
15570
  color?: DividerColor;
15568
- }, Omit<HTMLAttributes<HTMLHRElement>, 'color'>>;
15571
+ }>;
15569
15572
  declare const Divider: ({ color, id, className, style, htmlProps, ...rest }: DividerProps) => import("react").JSX.Element;
15570
15573
  //#endregion
15571
15574
  //#region src/components/Drawer/Drawer.d.ts
@@ -15681,7 +15684,7 @@ type FavStarProps = BaseComponentPropsWithChildren<HTMLElement, {
15681
15684
  * @default "medium"
15682
15685
  */
15683
15686
  size?: ComponentSize;
15684
- }, Omit<HTMLAttributes<HTMLElement>, 'onChange'>>;
15687
+ }>;
15685
15688
  declare const FavStar: {
15686
15689
  ({ id, className, style, onChange, checked: checkedProp, defaultChecked, size, htmlProps, ...rest }: FavStarProps): import("react").JSX.Element;
15687
15690
  displayName: string;
@@ -15845,7 +15848,7 @@ declare const FileUploader: {
15845
15848
  //#endregion
15846
15849
  //#region src/components/Footer/Footer.d.ts
15847
15850
  type FooterProps = ComponentPropsWithRef<'footer'>;
15848
- declare const Footer: ({ className, ...rest }: FooterProps) => import("react").JSX.Element;
15851
+ declare const Footer: (props: FooterProps) => import("react").JSX.Element;
15849
15852
  //#endregion
15850
15853
  //#region src/components/Footer/FooterListHeader.d.ts
15851
15854
  type FooterListHeaderProps = Omit<HeadingProps, 'level' | 'withMargins'>;
@@ -15868,23 +15871,23 @@ declare const FooterLogo: ({ children, hideBreakpoint, ...rest }: FooterLogoProp
15868
15871
  //#endregion
15869
15872
  //#region src/components/Footer/FooterList.d.ts
15870
15873
  type FooterListProps = ComponentPropsWithRef<'ul'>;
15871
- declare const FooterList: ({ className, ...rest }: FooterListProps) => import("react").JSX.Element;
15874
+ declare const FooterList: (props: FooterListProps) => import("react").JSX.Element;
15872
15875
  //#endregion
15873
15876
  //#region src/components/Footer/FooterSocialsList.d.ts
15874
15877
  type FooterSocialsListProps = ComponentPropsWithRef<'ul'>;
15875
- declare const FooterSocialsList: ({ className, ...rest }: FooterSocialsListProps) => import("react").JSX.Element;
15878
+ declare const FooterSocialsList: (props: FooterSocialsListProps) => import("react").JSX.Element;
15876
15879
  //#endregion
15877
15880
  //#region src/components/Footer/FooterSocialsGroup.d.ts
15878
15881
  type FooterSocialsGroupProps = ComponentPropsWithRef<'div'>;
15879
- declare const FooterSocialsGroup: ({ className, ...rest }: FooterSocialsGroupProps) => import("react").JSX.Element;
15882
+ declare const FooterSocialsGroup: (props: FooterSocialsGroupProps) => import("react").JSX.Element;
15880
15883
  //#endregion
15881
15884
  //#region src/components/Footer/FooterListGroup.d.ts
15882
15885
  type FooterListGroupProps = ComponentPropsWithRef<'div'>;
15883
- declare const FooterListGroup: ({ className, ...rest }: FooterListGroupProps) => import("react").JSX.Element;
15886
+ declare const FooterListGroup: (props: FooterListGroupProps) => import("react").JSX.Element;
15884
15887
  //#endregion
15885
15888
  //#region src/components/Footer/FooterLeft.d.ts
15886
15889
  type FooterLeftProps = ComponentPropsWithRef<'div'>;
15887
- declare const FooterLeft: ({ className, ...rest }: FooterLeftProps) => import("react").JSX.Element;
15890
+ declare const FooterLeft: (props: FooterLeftProps) => import("react").JSX.Element;
15888
15891
  //#endregion
15889
15892
  //#region src/components/FormSummary/FormSummary.d.ts
15890
15893
  type FormSummaryProps = Pick<PaperProps, 'children' | 'htmlProps' | 'ref' | 'id' | 'style' | 'className' | 'padding' | 'paddingBlock' | 'paddingInline' | 'margin' | 'marginBlock' | 'marginInline' | 'width' | 'minWidth' | 'maxWidth'>;
@@ -16349,7 +16352,7 @@ type PaginationProps = BaseComponentProps<HTMLElement, {
16349
16352
  onSelectOptionChange?: (option: PaginationOption | null) => void;
16350
16353
  /**Brekkpunkt for små skjermer; den viser færre sideknapper og stacker delkomponentene. */
16351
16354
  smallScreenBreakpoint?: Breakpoint;
16352
- }, Omit<HTMLAttributes<HTMLElement>, 'onChange'>>;
16355
+ }>;
16353
16356
  declare const Pagination: {
16354
16357
  ({ itemsAmount, defaultItemsPerPage, defaultActivePage, activePage: activePageProp, withPagination, withCounter, withSelect, selectOptions, smallScreenBreakpoint, onChange, onSelectOptionChange, id, className, style, htmlProps, ref, ...rest }: PaginationProps): import("react").JSX.Element | null;
16355
16358
  displayName: string;
@@ -16552,14 +16555,14 @@ type SearchButtonProps = {
16552
16555
  } & Pick<ButtonProps, 'loading' | 'loadingTooltip'> & ComponentPropsWithRef<'button'>;
16553
16556
  //#endregion
16554
16557
  //#region src/components/Search/Search.d.ts
16555
- type SearchProps = Pick<InputProps, 'tip' | 'label'> & {
16558
+ type SearchProps = Pick<InputProps, 'tip' | 'label' | 'width'> & {
16556
16559
  /**Størrelsen på komponenten. */
16557
16560
  componentSize?: SearchSize;
16558
16561
  /**Props for søkeknappen. */
16559
16562
  buttonProps?: SearchButtonProps;
16560
16563
  /**Om søkeikonet skal vises. */
16561
16564
  showIcon?: boolean;
16562
- } & Pick<InputProps, 'width'> & Omit<ComponentPropsWithRef<'input'>, 'width' | 'height'>;
16565
+ } & Omit<ComponentPropsWithRef<'input'>, 'width' | 'height'>;
16563
16566
  declare const Search$1: {
16564
16567
  ({ componentSize, buttonProps, showIcon, name, label, tip, id, value, width, onChange, className, style, "aria-describedby": ariaDescribedby, ref, ...rest }: SearchProps): import("react").JSX.Element;
16565
16568
  displayName: string;
@@ -16688,7 +16691,7 @@ type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithCh
16688
16691
  value?: T | undefined;
16689
16692
  /**Default verdi - en `<RadioButton>` med denne verdien blir forhåndsvalgt med uncontrolled state. */
16690
16693
  defaultValue?: T | undefined;
16691
- }, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
16694
+ }>;
16692
16695
  declare const RadioButtonGroup: {
16693
16696
  <T extends string | number = string>({ name, label, groupId, errorMessage, tip, disabled, readOnly, direction, value, defaultValue, children, required, onChange, id, className, style, htmlProps, ...rest }: RadioButtonGroupProps<T>): import("react").JSX.Element;
16694
16697
  displayName: string;
@@ -16738,7 +16741,7 @@ type SpinnerProps = BaseComponentProps<SVGElement, {
16738
16741
  * @default "Innlasting pågår"
16739
16742
  */
16740
16743
  tooltip?: string;
16741
- }, Omit<HTMLAttributes<SVGSVGElement>, 'color'>>;
16744
+ }>;
16742
16745
  declare function Spinner(props: SpinnerProps): import("react").JSX.Element;
16743
16746
  declare namespace Spinner {
16744
16747
  var displayName: string;
@@ -16917,7 +16920,7 @@ type TabsProps = BaseComponentPropsWithChildren<HTMLDivElement, {
16917
16920
  tabContentDirection?: Direction;
16918
16921
  /** Props for "Legg til fane"-knapp. Støtter native HTML attributter og `width`. */
16919
16922
  addTabButtonProps?: Omit<AddTabButtonProps, 'index'>;
16920
- } & Pick<ResponsiveProps, 'width'>, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
16923
+ } & Pick<ResponsiveProps, 'width'>>;
16921
16924
  declare const Tabs: {
16922
16925
  ({ id, activeTab, onChange, tabContentDirection, size, addTabButtonProps, width, children, className, style, htmlProps, ...rest }: TabsProps): import("react").JSX.Element;
16923
16926
  displayName: string;
@@ -16942,7 +16945,7 @@ type TabProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
16942
16945
  * @default "1fr"
16943
16946
  */
16944
16947
  width?: Properties['width'];
16945
- } & PickedAttributes, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof PickedAttributes>>;
16948
+ } & PickedAttributes>;
16946
16949
  declare const Tab: {
16947
16950
  ({ active, icon, children, focus, setFocus, index, onClick, onKeyDown, id, className, htmlProps, style, width, ref, ...rest }: TabProps): import("react").JSX.Element;
16948
16951
  displayName: string;
@@ -17127,7 +17130,6 @@ declare const ToggleButtonGroup: {
17127
17130
  type AnchorElement = ReactElement<HTMLAttributes<HTMLElement> & {
17128
17131
  ref: Ref<HTMLElement>;
17129
17132
  }>;
17130
- type PickedHTMLAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'style' | 'onMouseLeave' | 'onMouseOver'>;
17131
17133
  type TooltipProps = BaseComponentProps<HTMLDivElement, {
17132
17134
  /**Innhold i tooltip. */
17133
17135
  text: string;
@@ -17145,7 +17147,7 @@ type TooltipProps = BaseComponentProps<HTMLDivElement, {
17145
17147
  tooltipId?: string;
17146
17148
  /**Om tooltip skal alltid være i DOM, eller bli rendret først når den skal vises. */
17147
17149
  keepMounted?: boolean;
17148
- } & PickedHTMLAttributes, Omit<HTMLAttributes<HTMLDivElement>, 'children' | keyof PickedHTMLAttributes>>;
17150
+ } & Pick<HTMLAttributes<HTMLDivElement>, 'onMouseLeave' | 'onMouseOver'>>;
17149
17151
  declare const Tooltip: {
17150
17152
  ({ text, placement, children, tooltipId, delay, style, onMouseLeave, onMouseOver, keepMounted, id, ref, className, htmlProps, ...rest }: TooltipProps): import("react").JSX.Element;
17151
17153
  displayName: string;
package/dist/index.mjs CHANGED
@@ -4521,10 +4521,7 @@ const useOverflowMenuContext = () => {
4521
4521
  };
4522
4522
  //#endregion
4523
4523
  //#region src/components/OverflowMenu/OverflowMenu.module.css
4524
- var OverflowMenu_module_default = {
4525
- "container": "dds-OverflowMenu-module__container",
4526
- "list": "dds-OverflowMenu-module__list"
4527
- };
4524
+ var OverflowMenu_module_default = { "container": "dds-OverflowMenu-module__container" };
4528
4525
  //#endregion
4529
4526
  //#region src/components/OverflowMenu/OverflowMenu.tsx
4530
4527
  const OverflowMenu = ({ placement = "bottom-end", offset = 2, parentElement, portal = true, className, htmlProps = {}, ref, style, ...rest }) => {
@@ -5686,13 +5683,9 @@ var DateInput_module_default = {
5686
5683
  "icon-wrapper--readonly": "dds-DateInput-module__icon-wrapper--readonly",
5687
5684
  "popover-button--readonly": "dds-DateInput-module__popover-button--readonly",
5688
5685
  "popover": "dds-DateInput-module__popover",
5689
- "modal-close-button-wrapper": "dds-DateInput-module__modal-close-button-wrapper",
5690
- "calendar": "dds-DateInput-module__calendar",
5691
5686
  "calendar__header__month": "dds-DateInput-module__calendar__header__month",
5692
5687
  "calendar__month-button": "dds-DateInput-module__calendar__month-button",
5693
- "calendar__grid-element": "dds-DateInput-module__calendar__grid-element",
5694
5688
  "calendar__th": "dds-DateInput-module__calendar__th",
5695
- "calendar__week-number": "dds-DateInput-module__calendar__week-number",
5696
5689
  "calendar__cell-button": "dds-DateInput-module__calendar__cell-button",
5697
5690
  "calendar__cell-button--today": "dds-DateInput-module__calendar__cell-button--today",
5698
5691
  "calendar__cell-button--default": "dds-DateInput-module__calendar__cell-button--default",
@@ -5701,6 +5694,16 @@ var DateInput_module_default = {
5701
5694
  "calendar__cell-button--unavailable--today": "dds-DateInput-module__calendar__cell-button--unavailable--today"
5702
5695
  };
5703
5696
  //#endregion
5697
+ //#region src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
5698
+ function CalendarCell({ ...props }) {
5699
+ return /* @__PURE__ */ jsx(Box, {
5700
+ textAlign: "center",
5701
+ className: cn(typographyStyles_module_default["text-color--subtle"], DateInput_module_default.calendar__th),
5702
+ ...props
5703
+ });
5704
+ }
5705
+ CalendarCell.displayName = "CalendarCell";
5706
+ //#endregion
5704
5707
  //#region src/components/date-inputs/DatePicker/constants.ts
5705
5708
  const LOCALE = {
5706
5709
  nb: "nb-NO",
@@ -5710,8 +5713,8 @@ const LOCALE = {
5710
5713
  se: "se-NO"
5711
5714
  };
5712
5715
  //#endregion
5713
- //#region src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
5714
- function CalendarCell({ date, state, onClose }) {
5716
+ //#region src/components/date-inputs/DatePicker/Calendar/CalendarDate.tsx
5717
+ function CalendarDate$1({ date, state, onClose }) {
5715
5718
  const ref = useRef(null);
5716
5719
  const { buttonProps, cellProps, isOutsideVisibleRange, formattedDate, isSelected, isDisabled, isUnavailable } = useCalendarCell({ date }, state, ref);
5717
5720
  if (isOutsideVisibleRange) return /* @__PURE__ */ jsx("td", { ...cellProps });
@@ -5722,17 +5725,23 @@ function CalendarCell({ date, state, onClose }) {
5722
5725
  const isUnavailableToday = isEffectivelyUnavailable && isToday(date, "Europe/Oslo");
5723
5726
  return /* @__PURE__ */ jsx("td", {
5724
5727
  ...cellProps,
5725
- children: /* @__PURE__ */ jsx("button", {
5728
+ children: /* @__PURE__ */ jsx(Box, {
5726
5729
  ...buttonProps,
5730
+ as: "button",
5727
5731
  type: "button",
5728
5732
  ref,
5729
5733
  onKeyDown: closeOnKeyboardBlurForward,
5730
- className: cn(DateInput_module_default["calendar__grid-element"], DateInput_module_default["calendar__cell-button"], isToday(date, "Europe/Oslo") && DateInput_module_default["calendar__cell-button--today"], DateInput_module_default[`calendar__cell-button--default`], isSelected && DateInput_module_default[`calendar__cell-button--selected`], isEffectivelyUnavailable && DateInput_module_default[`calendar__cell-button--unavailable`], isUnavailableToday && DateInput_module_default["calendar__cell-button--unavailable--today"], typographyStyles_module_default["body-short-small"], _key1),
5734
+ height: "100%",
5735
+ width: "100%",
5736
+ display: "flex",
5737
+ alignItems: "center",
5738
+ justifyContent: "center",
5739
+ className: cn(DateInput_module_default["calendar__cell-button"], isToday(date, "Europe/Oslo") && DateInput_module_default["calendar__cell-button--today"], DateInput_module_default[`calendar__cell-button--default`], isSelected && DateInput_module_default[`calendar__cell-button--selected`], isEffectivelyUnavailable && DateInput_module_default[`calendar__cell-button--unavailable`], isUnavailableToday && DateInput_module_default["calendar__cell-button--unavailable--today"], typographyStyles_module_default["body-short-small"], _key1),
5731
5740
  children: formattedDate
5732
5741
  })
5733
5742
  });
5734
5743
  }
5735
- CalendarCell.displayName = "CalendarCell";
5744
+ CalendarDate$1.displayName = "CalendarDate";
5736
5745
  //#endregion
5737
5746
  //#region src/components/date-inputs/utils/getWeekNumber.ts
5738
5747
  /**
@@ -5852,8 +5861,9 @@ const CalendarPopoverContent = ({ children, className, smallScreenBreakpoint })
5852
5861
  ref: modalRef,
5853
5862
  className: cn(DateInput_module_default.popover, className),
5854
5863
  ...paperStyleProps,
5855
- children: [/* @__PURE__ */ jsx("div", {
5856
- className: DateInput_module_default["modal-close-button-wrapper"],
5864
+ children: [/* @__PURE__ */ jsx(Box, {
5865
+ display: "flex",
5866
+ justifyContent: "flex-end",
5857
5867
  children: /* @__PURE__ */ jsx(Button, {
5858
5868
  ref: closeButtonRef,
5859
5869
  icon: CloseIcon,
@@ -5913,7 +5923,6 @@ function CalendarGrid({ state, ...props }) {
5913
5923
  }
5914
5924
  ];
5915
5925
  const { showWeekNumbers, onClose } = useContext(CalendarPopoverContext);
5916
- const thCn = cn(DateInput_module_default["calendar__grid-element"], typographyStyles_module_default["text-color--subtle"], DateInput_module_default.calendar__th);
5917
5926
  return /* @__PURE__ */ jsxs("table", {
5918
5927
  ...gridProps,
5919
5928
  onKeyDown: (e) => {
@@ -5924,14 +5933,14 @@ function CalendarGrid({ state, ...props }) {
5924
5933
  className: typographyStyles_module_default["body-short-xsmall"],
5925
5934
  children: [/* @__PURE__ */ jsx("thead", {
5926
5935
  ...headerProps,
5927
- children: /* @__PURE__ */ jsxs("tr", { children: [showWeekNumbers && /* @__PURE__ */ jsxs("th", {
5928
- className: cn(thCn),
5936
+ children: /* @__PURE__ */ jsxs("tr", { children: [showWeekNumbers && /* @__PURE__ */ jsxs(CalendarCell, {
5937
+ as: "th",
5929
5938
  children: [/* @__PURE__ */ jsx("span", {
5930
5939
  "aria-hidden": true,
5931
5940
  children: "#"
5932
5941
  }), /* @__PURE__ */ jsx(VisuallyHidden, { children: t(texts$24.weekNumber) })]
5933
- }), weekDays.map((day, index) => /* @__PURE__ */ jsxs("th", {
5934
- className: thCn,
5942
+ }), weekDays.map((day, index) => /* @__PURE__ */ jsxs(CalendarCell, {
5943
+ as: "th",
5935
5944
  children: [/* @__PURE__ */ jsx("span", {
5936
5945
  "aria-hidden": true,
5937
5946
  children: day.short
@@ -5941,10 +5950,10 @@ function CalendarGrid({ state, ...props }) {
5941
5950
  const datesInWeek = state.getDatesInWeek(weekIndex);
5942
5951
  const firstExistingDay = datesInWeek.find(Boolean);
5943
5952
  const weekNumber = firstExistingDay ? getWeekNumber(firstExistingDay) : "";
5944
- return /* @__PURE__ */ jsxs("tr", { children: [showWeekNumbers && /* @__PURE__ */ jsx("td", {
5945
- className: cn(thCn, DateInput_module_default["calendar__week-number"]),
5953
+ return /* @__PURE__ */ jsxs("tr", { children: [showWeekNumbers && /* @__PURE__ */ jsx(CalendarCell, {
5954
+ as: "td",
5946
5955
  children: weekNumber
5947
- }), datesInWeek.map((date, i) => date ? /* @__PURE__ */ jsx(CalendarCell, {
5956
+ }), datesInWeek.map((date, i) => date ? /* @__PURE__ */ jsx(CalendarDate$1, {
5948
5957
  state,
5949
5958
  date,
5950
5959
  onClose
@@ -6376,7 +6385,7 @@ function DateInput({ errorMessage, tip, componentSize = "medium", style, classNa
6376
6385
  className: cn(Input_module_default["input-group"], typographyStyles_module_default[`body-short-${componentSize}`], DateInput_module_default["input-group"]),
6377
6386
  children: [
6378
6387
  button,
6379
- /* @__PURE__ */ jsx("div", {
6388
+ /* @__PURE__ */ jsx(HStack, {
6380
6389
  ...fieldProps,
6381
6390
  ref: internalRef,
6382
6391
  className: cn(Input_module_default.input, Input_module_default[`input--${componentSize}`], Input_module_default["input--stateful"], Input_module_default["input--hover"], hasErrorMessage && Input_module_default["input--stateful-danger"], clearable && Input_module_default[`input-with-btn-right--${componentSize}`], DateInput_module_default["date-segment-container"], Input_module_default[`input-with-icon--${componentSize}`], isOpen && focus_module_default.focused, disabled && "disabled", disabled && Input_module_default.disabled, active && "active", readOnly && "read-only", readOnly && Input_module_default["read-only"], focus_module_default["focusable-within"]),
@@ -6674,8 +6683,13 @@ const DescriptionListTerm = (props) => {
6674
6683
  DescriptionListTerm.displayName = "DescriptionListTerm";
6675
6684
  //#endregion
6676
6685
  //#region src/components/DescriptionList/DescriptionListDesc.tsx
6677
- const DescriptionListDesc = ({ children, icon, id, className, style, htmlProps, ...rest }) => /* @__PURE__ */ jsxs("dd", {
6686
+ const DescriptionListDesc = ({ children, icon, id, className, style, htmlProps, ...rest }) => /* @__PURE__ */ jsxs(Box, {
6678
6687
  ...getBaseHTMLProps(id, cn(className, DescriptionList_module_default.desc), style, htmlProps, rest),
6688
+ as: "dd",
6689
+ display: "flex",
6690
+ alignItems: "center",
6691
+ gap: "x0.25",
6692
+ marginInline: "x0",
6679
6693
  children: [
6680
6694
  icon && /* @__PURE__ */ jsx(Icon, { icon }),
6681
6695
  " ",
@@ -8110,21 +8124,17 @@ const texts$12 = createTexts({
8110
8124
  }
8111
8125
  });
8112
8126
  //#endregion
8113
- //#region src/components/Footer/Footer.module.css
8114
- var Footer_module_default = {
8115
- "container": "dds-Footer-module__container",
8116
- "left": "dds-Footer-module__left",
8117
- "list": "dds-Footer-module__list",
8118
- "list-group": "dds-Footer-module__list-group",
8119
- "socials-group": "dds-Footer-module__socials-group",
8120
- "socials-list": "dds-Footer-module__socials-list"
8121
- };
8122
- //#endregion
8123
8127
  //#region src/components/Footer/Footer.tsx
8124
- const Footer = ({ className, ...rest }) => /* @__PURE__ */ jsx(Contrast, {
8128
+ const Footer = (props) => /* @__PURE__ */ jsx(Contrast, {
8125
8129
  as: "footer",
8126
- className: cn(className, Footer_module_default.container),
8127
- ...rest
8130
+ paddingBlock: {
8131
+ xs: "x3 x6",
8132
+ sm: "x3 x6",
8133
+ md: "x4",
8134
+ lg: "x4",
8135
+ xl: "x4"
8136
+ },
8137
+ ...props
8128
8138
  });
8129
8139
  //#endregion
8130
8140
  //#region src/components/Footer/FooterListHeader.tsx
@@ -8153,33 +8163,35 @@ const FooterLogo = ({ children, hideBreakpoint, ...rest }) => {
8153
8163
  };
8154
8164
  //#endregion
8155
8165
  //#region src/components/Footer/FooterList.tsx
8156
- const FooterList = ({ className, ...rest }) => /* @__PURE__ */ jsx(StylelessList, {
8157
- className: cn(className, Footer_module_default.list),
8158
- ...rest
8166
+ const FooterList = (props) => /* @__PURE__ */ jsx(VStack, {
8167
+ as: StylelessList,
8168
+ gap: "x1.5",
8169
+ ...props
8159
8170
  });
8160
8171
  //#endregion
8161
8172
  //#region src/components/Footer/FooterSocialsList.tsx
8162
- const FooterSocialsList = ({ className, ...rest }) => /* @__PURE__ */ jsx(StylelessList, {
8163
- className: cn(className, Footer_module_default["socials-list"]),
8164
- ...rest
8173
+ const FooterSocialsList = (props) => /* @__PURE__ */ jsx(HStack, {
8174
+ as: StylelessList,
8175
+ gap: "x1.5",
8176
+ ...props
8165
8177
  });
8166
8178
  //#endregion
8167
8179
  //#region src/components/Footer/FooterSocialsGroup.tsx
8168
- const FooterSocialsGroup = ({ className, ...rest }) => /* @__PURE__ */ jsx("div", {
8169
- className: cn(className, Footer_module_default["socials-group"]),
8170
- ...rest
8180
+ const FooterSocialsGroup = (props) => /* @__PURE__ */ jsx(VStack, {
8181
+ gap: "x1",
8182
+ ...props
8171
8183
  });
8172
8184
  //#endregion
8173
8185
  //#region src/components/Footer/FooterListGroup.tsx
8174
- const FooterListGroup = ({ className, ...rest }) => /* @__PURE__ */ jsx("div", {
8175
- className: cn(className, Footer_module_default["list-group"]),
8176
- ...rest
8186
+ const FooterListGroup = (props) => /* @__PURE__ */ jsx(VStack, {
8187
+ gap: "x1.5",
8188
+ ...props
8177
8189
  });
8178
8190
  //#endregion
8179
8191
  //#region src/components/Footer/FooterLeft.tsx
8180
- const FooterLeft = ({ className, ...rest }) => /* @__PURE__ */ jsx("div", {
8181
- className: cn(className, Footer_module_default["left"]),
8182
- ...rest
8192
+ const FooterLeft = (props) => /* @__PURE__ */ jsx(VStack, {
8193
+ gap: "x4",
8194
+ ...props
8183
8195
  });
8184
8196
  //#endregion
8185
8197
  //#region src/components/FormSummary/FormSummary.tsx
@@ -8282,9 +8294,7 @@ var GlobalMessage_module_default = {
8282
8294
  "container--info": "dds-GlobalMessage-module__container--info",
8283
8295
  "icon": "dds-GlobalMessage-module__icon",
8284
8296
  "container--danger": "dds-GlobalMessage-module__container--danger",
8285
- "container--warning": "dds-GlobalMessage-module__container--warning",
8286
- "content": "dds-GlobalMessage-module__content",
8287
- "content--closable": "dds-GlobalMessage-module__content--closable"
8297
+ "container--warning": "dds-GlobalMessage-module__container--warning"
8288
8298
  };
8289
8299
  const icons$2 = {
8290
8300
  info: InfoIcon,
@@ -8294,10 +8304,16 @@ const icons$2 = {
8294
8304
  const GlobalMessage = ({ purpose = "info", closable, onClose, children, id, className, style, htmlProps, ...rest }) => {
8295
8305
  const { t } = useTranslation();
8296
8306
  const [isClosed, setClosed] = useState(false);
8297
- return !isClosed ? /* @__PURE__ */ jsxs("div", {
8307
+ return !isClosed ? /* @__PURE__ */ jsxs(HStack, {
8298
8308
  ...getBaseHTMLProps(id, cn(className, GlobalMessage_module_default.container, GlobalMessage_module_default[`container--${purpose}`], typographyStyles_module_default["body-short-medium"]), style, htmlProps, rest),
8299
- children: [/* @__PURE__ */ jsxs("div", {
8300
- className: cn(GlobalMessage_module_default.content, closable && GlobalMessage_module_default["content--closable"]),
8309
+ alignItems: "center",
8310
+ justifyContent: "space-between",
8311
+ width: "100%",
8312
+ padding: "0 x1",
8313
+ children: [/* @__PURE__ */ jsxs(HStack, {
8314
+ alignItems: "center",
8315
+ paddingBlock: "x0.75",
8316
+ paddingInline: closable ? "x0 x0.75" : " x0 x1.5",
8301
8317
  children: [/* @__PURE__ */ jsx(Icon, {
8302
8318
  icon: icons$2[purpose],
8303
8319
  iconSize: "component",
@@ -9301,7 +9317,7 @@ const getCustomStyles = (size, hasError, isReadOnly) => ({
9301
9317
  zIndex: 100,
9302
9318
  transition: "var(--dds-motion-surface)",
9303
9319
  border: "1px solid var(--dds-color-border-default)",
9304
- backgroundColor: "var(--dds-color-surface-default)",
9320
+ backgroundColor: "var(--dds-color-surface-paper-default)",
9305
9321
  borderRadius: "var(--dds-border-radius-surface)",
9306
9322
  marginBlock: "var(--dds-spacing-x0-25)"
9307
9323
  }),
@@ -9331,11 +9347,15 @@ const getCustomStyles = (size, hasError, isReadOnly) => ({
9331
9347
  gap: "var(--dds-spacing-x0-25)",
9332
9348
  padding: "var(--dds-spacing-x0-75)",
9333
9349
  borderRadius: "var(--dds-border-radius-surface)",
9334
- backgroundColor: "var(--dds-color-surface-default)",
9350
+ backgroundColor: "inherit",
9335
9351
  ...typography.option[size],
9336
9352
  color: "var(--dds-color-text-default)",
9337
9353
  "@media (prefers-reduced-motion: no-preference)": { transition: "color var(--dds-motion-micro-state), background-color var(--dds-motion-micro-state)" },
9338
- ...state.isSelected && { backgroundColor: "var(--dds-color-surface-selected-default)" },
9354
+ "&:active": { backgroundColor: "inherit" },
9355
+ ...state.isSelected && {
9356
+ backgroundColor: "var(--dds-color-surface-selected-default)",
9357
+ "&:active": { backgroundColor: "var(--dds-color-surface-selected-default)" }
9358
+ },
9339
9359
  ...state.isFocused && {
9340
9360
  outline: "var(--dds-color-border-action-hover) 2px solid",
9341
9361
  outlineOffset: "calc(var(--dds-spacing-x0-125) * -1)"
@@ -11350,25 +11370,20 @@ const texts$7 = createTexts({
11350
11370
  }
11351
11371
  });
11352
11372
  //#endregion
11353
- //#region src/components/Popover/Popover.module.css
11354
- var Popover_module_default = {
11355
- "container": "dds-Popover-module__container",
11356
- "content--closable--no-header": "dds-Popover-module__content--closable--no-header",
11357
- "header": "dds-Popover-module__header",
11358
- "close-button": "dds-Popover-module__close-button"
11359
- };
11360
- //#endregion
11361
11373
  //#region src/components/Popover/Popover.context.tsx
11362
11374
  const PopoverContext = createContext({});
11363
11375
  const usePopoverContext = () => useContext(PopoverContext);
11364
11376
  //#endregion
11377
+ //#region src/components/Popover/Popover.module.css
11378
+ var Popover_module_default = { "container": "dds-Popover-module__container" };
11379
+ //#endregion
11365
11380
  //#region src/components/Popover/Popover.tsx
11366
11381
  const Popover = ({ id, header, withCloseButton = true, onBlur, children, placement = "bottom", parentElement, portal = false, offset = 8, sizeProps = {}, returnFocusOnBlur = true, className, htmlProps = {}, anchorRef, isOpen: propIsOpen, onClose: propOnClose, style, ref, ...rest }) => {
11367
11382
  const { refs, styles: positionStyles, isPositioned: localIsPositioned } = useFloatPosition(null, {
11368
11383
  offset,
11369
11384
  placement
11370
11385
  });
11371
- const { maxHeight, maxWidth, minHeight, minWidth, height, width } = sizeProps;
11386
+ const { maxHeight, maxWidth, minHeight, minWidth, height, width = "fit-content" } = sizeProps;
11372
11387
  const context = usePopoverContext();
11373
11388
  const themeContext = useContext(ThemeContext);
11374
11389
  const portalTarget = parentElement ?? themeContext?.el;
@@ -11428,29 +11443,34 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
11428
11443
  width,
11429
11444
  maxWidth,
11430
11445
  minWidth,
11446
+ position: "absolute",
11447
+ padding: "x0.75 x1 x1.5 x1",
11431
11448
  role: "dialog",
11432
11449
  elevation: "large",
11433
11450
  border: "border-subtle",
11434
11451
  children: [
11435
- header && /* @__PURE__ */ jsx("div", {
11436
- className: Popover_module_default.header,
11452
+ header && /* @__PURE__ */ jsx(Box, {
11453
+ marginInline: "0 x2",
11437
11454
  children: typeof header === "string" ? /* @__PURE__ */ jsx(Heading, {
11438
11455
  level: 2,
11439
11456
  typographyType: "heading-medium",
11440
11457
  children: header
11441
11458
  }) : header
11442
11459
  }),
11443
- /* @__PURE__ */ jsx("div", {
11444
- className: !hasTitle && withCloseButton ? Popover_module_default["content--closable--no-header"] : "",
11460
+ /* @__PURE__ */ jsx(Box, {
11461
+ marginBlock: !hasTitle && withCloseButton ? "x2 0" : "0",
11445
11462
  children
11446
11463
  }),
11447
- withCloseButton && /* @__PURE__ */ jsx(Button, {
11464
+ withCloseButton && /* @__PURE__ */ jsx(Box, {
11465
+ as: Button,
11448
11466
  icon: CloseIcon,
11449
11467
  purpose: "tertiary",
11450
11468
  size: "small",
11451
11469
  onClick: onClose,
11452
11470
  "aria-label": t(commonTexts.close),
11453
- className: Popover_module_default["close-button"]
11471
+ position: "absolute",
11472
+ top: "x0.25",
11473
+ right: "x0.25"
11454
11474
  })
11455
11475
  ]
11456
11476
  });