@norges-domstoler/dds-components 0.0.0-dev-20240311113250 → 0.0.0-dev-20240312083707
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 +6 -33
- package/dist/index.d.ts +6 -33
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -456,7 +456,7 @@ declare const Link: react.ForwardRefExoticComponent<Pick<Omit<AnchorHTMLAttribut
|
|
|
456
456
|
/**Spesifiserer om lenken fører til et eksternt nettsted eller åpnes i nytt vindu. Påvirker styling og setter `target` prop. */
|
|
457
457
|
external?: boolean | undefined;
|
|
458
458
|
/**Spesifiserer typografistil basert på utvalget for brødtekst. */
|
|
459
|
-
typographyType?:
|
|
459
|
+
typographyType?: TypographyBodyType | undefined;
|
|
460
460
|
} & {
|
|
461
461
|
withMargins?: boolean | undefined;
|
|
462
462
|
} & {
|
|
@@ -471,7 +471,7 @@ type ParagraphProps = BaseComponentPropsWithChildren<HTMLParagraphElement, {
|
|
|
471
471
|
} & BaseTypographyProps>;
|
|
472
472
|
declare const Paragraph: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLParagraphElement>, "className" | "id"> & {
|
|
473
473
|
/**Spesifiserer typografistil basert på utvalget for brødtekst og ingress. */
|
|
474
|
-
typographyType?:
|
|
474
|
+
typographyType?: TypographyBodyType | TypographyLeadType | undefined;
|
|
475
475
|
} & {
|
|
476
476
|
withMargins?: boolean | undefined;
|
|
477
477
|
} & {
|
|
@@ -1757,7 +1757,7 @@ declare const TimePicker: react.ForwardRefExoticComponent<Omit<AriaTimeFieldProp
|
|
|
1757
1757
|
* Egendefinert bredde på komponenten.
|
|
1758
1758
|
*/
|
|
1759
1759
|
width?: CSS.Properties['width'];
|
|
1760
|
-
} & Pick<InputProps, "style" | "tip" | "
|
|
1760
|
+
} & Pick<InputProps, "style" | "tip" | "componentSize" | "errorMessage"> & react.RefAttributes<HTMLDivElement>>;
|
|
1761
1761
|
|
|
1762
1762
|
declare function nativeDateToDateValue(date: Date, timeZone?: string | undefined): DateValue$1;
|
|
1763
1763
|
declare function dateValueToNativeDate(date: DateValue$1, timeZone?: string | undefined): Date;
|
|
@@ -2633,7 +2633,7 @@ type ForwardRefType<Option, IsMulti extends boolean> = React.ForwardedRef<Select
|
|
|
2633
2633
|
declare function SelectInner<Option = unknown, IsMulti extends boolean = false>(props: SelectProps<Option, IsMulti>, ref: ForwardRefType<Option, IsMulti>): react_jsx_runtime.JSX.Element;
|
|
2634
2634
|
declare const Select: typeof SelectInner;
|
|
2635
2635
|
|
|
2636
|
-
declare const createSelectOptions: <TValue extends string | number>(...args: TValue
|
|
2636
|
+
declare const createSelectOptions: <TValue extends string | number>(...args: Array<TValue>) => Array<SelectOption<TValue>>;
|
|
2637
2637
|
|
|
2638
2638
|
type CheckboxPickedHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'name' | 'checked' | 'defaultChecked' | 'value' | 'defaultValue' | 'onChange' | 'onBlur'>;
|
|
2639
2639
|
type CheckboxProps = BaseComponentProps<HTMLInputElement, {
|
|
@@ -2734,35 +2734,8 @@ type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithCh
|
|
|
2734
2734
|
/**custom id for for gruppen, knytter `label` til gruppen via `aria-label`. */
|
|
2735
2735
|
groupId?: string;
|
|
2736
2736
|
}, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
2737
|
-
declare const RadioButtonGroup: <T extends string | number = string>(props:
|
|
2738
|
-
|
|
2739
|
-
name?: string | undefined;
|
|
2740
|
-
/**Ledetekst for hele gruppen. */
|
|
2741
|
-
label?: string | undefined;
|
|
2742
|
-
/**Funksjonen for onChange-event for barna. */
|
|
2743
|
-
onChange?: ((event: ChangeEvent<HTMLInputElement>, value: T | undefined) => void) | undefined;
|
|
2744
|
-
/**Legger en markør (*) bak label som indikerer at input er påkrevd. Gjør alle barna påkrevd ved å gi dem `required` prop. */
|
|
2745
|
-
required?: boolean | undefined;
|
|
2746
|
-
/**Meldingen som vises ved valideringsfeil. Gir alle barna error prop. */
|
|
2747
|
-
errorMessage?: string | undefined;
|
|
2748
|
-
/**Hjelpetekst for gruppen. */
|
|
2749
|
-
tip?: string | undefined;
|
|
2750
|
-
/**Gir alle barna `disabled` prop. */
|
|
2751
|
-
disabled?: boolean | undefined;
|
|
2752
|
-
/**Gir alle barna `readOnly` prop */
|
|
2753
|
-
readOnly?: boolean | undefined;
|
|
2754
|
-
/**Retningen radioknappene skal gjengis i. */
|
|
2755
|
-
direction?: Direction$1 | undefined;
|
|
2756
|
-
/**Default verdi - en `<RadioButton />` blir forhåndsvalgt. **OBS!** brukes kun når brukeren ikke skal fylle ut selv. */
|
|
2757
|
-
value?: T | undefined;
|
|
2758
|
-
/**custom id for for gruppen, knytter `label` til gruppen via `aria-label`. */
|
|
2759
|
-
groupId?: string | undefined;
|
|
2760
|
-
} & {
|
|
2761
|
-
children?: react.ReactNode;
|
|
2762
|
-
} & {
|
|
2763
|
-
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, "onChange"> | undefined;
|
|
2764
|
-
} & {
|
|
2765
|
-
ref?: Ref<HTMLDivElement> | undefined;
|
|
2737
|
+
declare const RadioButtonGroup: <T extends string | number = string>(props: RadioButtonGroupProps<T> & {
|
|
2738
|
+
ref?: Ref<HTMLDivElement>;
|
|
2766
2739
|
}) => ReactElement;
|
|
2767
2740
|
|
|
2768
2741
|
type SkipToContentProps = BaseComponentProps<HTMLAnchorElement, {
|
package/dist/index.d.ts
CHANGED
|
@@ -456,7 +456,7 @@ declare const Link: react.ForwardRefExoticComponent<Pick<Omit<AnchorHTMLAttribut
|
|
|
456
456
|
/**Spesifiserer om lenken fører til et eksternt nettsted eller åpnes i nytt vindu. Påvirker styling og setter `target` prop. */
|
|
457
457
|
external?: boolean | undefined;
|
|
458
458
|
/**Spesifiserer typografistil basert på utvalget for brødtekst. */
|
|
459
|
-
typographyType?:
|
|
459
|
+
typographyType?: TypographyBodyType | undefined;
|
|
460
460
|
} & {
|
|
461
461
|
withMargins?: boolean | undefined;
|
|
462
462
|
} & {
|
|
@@ -471,7 +471,7 @@ type ParagraphProps = BaseComponentPropsWithChildren<HTMLParagraphElement, {
|
|
|
471
471
|
} & BaseTypographyProps>;
|
|
472
472
|
declare const Paragraph: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLParagraphElement>, "className" | "id"> & {
|
|
473
473
|
/**Spesifiserer typografistil basert på utvalget for brødtekst og ingress. */
|
|
474
|
-
typographyType?:
|
|
474
|
+
typographyType?: TypographyBodyType | TypographyLeadType | undefined;
|
|
475
475
|
} & {
|
|
476
476
|
withMargins?: boolean | undefined;
|
|
477
477
|
} & {
|
|
@@ -1757,7 +1757,7 @@ declare const TimePicker: react.ForwardRefExoticComponent<Omit<AriaTimeFieldProp
|
|
|
1757
1757
|
* Egendefinert bredde på komponenten.
|
|
1758
1758
|
*/
|
|
1759
1759
|
width?: CSS.Properties['width'];
|
|
1760
|
-
} & Pick<InputProps, "style" | "tip" | "
|
|
1760
|
+
} & Pick<InputProps, "style" | "tip" | "componentSize" | "errorMessage"> & react.RefAttributes<HTMLDivElement>>;
|
|
1761
1761
|
|
|
1762
1762
|
declare function nativeDateToDateValue(date: Date, timeZone?: string | undefined): DateValue$1;
|
|
1763
1763
|
declare function dateValueToNativeDate(date: DateValue$1, timeZone?: string | undefined): Date;
|
|
@@ -2633,7 +2633,7 @@ type ForwardRefType<Option, IsMulti extends boolean> = React.ForwardedRef<Select
|
|
|
2633
2633
|
declare function SelectInner<Option = unknown, IsMulti extends boolean = false>(props: SelectProps<Option, IsMulti>, ref: ForwardRefType<Option, IsMulti>): react_jsx_runtime.JSX.Element;
|
|
2634
2634
|
declare const Select: typeof SelectInner;
|
|
2635
2635
|
|
|
2636
|
-
declare const createSelectOptions: <TValue extends string | number>(...args: TValue
|
|
2636
|
+
declare const createSelectOptions: <TValue extends string | number>(...args: Array<TValue>) => Array<SelectOption<TValue>>;
|
|
2637
2637
|
|
|
2638
2638
|
type CheckboxPickedHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'name' | 'checked' | 'defaultChecked' | 'value' | 'defaultValue' | 'onChange' | 'onBlur'>;
|
|
2639
2639
|
type CheckboxProps = BaseComponentProps<HTMLInputElement, {
|
|
@@ -2734,35 +2734,8 @@ type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithCh
|
|
|
2734
2734
|
/**custom id for for gruppen, knytter `label` til gruppen via `aria-label`. */
|
|
2735
2735
|
groupId?: string;
|
|
2736
2736
|
}, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
2737
|
-
declare const RadioButtonGroup: <T extends string | number = string>(props:
|
|
2738
|
-
|
|
2739
|
-
name?: string | undefined;
|
|
2740
|
-
/**Ledetekst for hele gruppen. */
|
|
2741
|
-
label?: string | undefined;
|
|
2742
|
-
/**Funksjonen for onChange-event for barna. */
|
|
2743
|
-
onChange?: ((event: ChangeEvent<HTMLInputElement>, value: T | undefined) => void) | undefined;
|
|
2744
|
-
/**Legger en markør (*) bak label som indikerer at input er påkrevd. Gjør alle barna påkrevd ved å gi dem `required` prop. */
|
|
2745
|
-
required?: boolean | undefined;
|
|
2746
|
-
/**Meldingen som vises ved valideringsfeil. Gir alle barna error prop. */
|
|
2747
|
-
errorMessage?: string | undefined;
|
|
2748
|
-
/**Hjelpetekst for gruppen. */
|
|
2749
|
-
tip?: string | undefined;
|
|
2750
|
-
/**Gir alle barna `disabled` prop. */
|
|
2751
|
-
disabled?: boolean | undefined;
|
|
2752
|
-
/**Gir alle barna `readOnly` prop */
|
|
2753
|
-
readOnly?: boolean | undefined;
|
|
2754
|
-
/**Retningen radioknappene skal gjengis i. */
|
|
2755
|
-
direction?: Direction$1 | undefined;
|
|
2756
|
-
/**Default verdi - en `<RadioButton />` blir forhåndsvalgt. **OBS!** brukes kun når brukeren ikke skal fylle ut selv. */
|
|
2757
|
-
value?: T | undefined;
|
|
2758
|
-
/**custom id for for gruppen, knytter `label` til gruppen via `aria-label`. */
|
|
2759
|
-
groupId?: string | undefined;
|
|
2760
|
-
} & {
|
|
2761
|
-
children?: react.ReactNode;
|
|
2762
|
-
} & {
|
|
2763
|
-
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, "onChange"> | undefined;
|
|
2764
|
-
} & {
|
|
2765
|
-
ref?: Ref<HTMLDivElement> | undefined;
|
|
2737
|
+
declare const RadioButtonGroup: <T extends string | number = string>(props: RadioButtonGroupProps<T> & {
|
|
2738
|
+
ref?: Ref<HTMLDivElement>;
|
|
2766
2739
|
}) => ReactElement;
|
|
2767
2740
|
|
|
2768
2741
|
type SkipToContentProps = BaseComponentProps<HTMLAnchorElement, {
|
package/dist/index.js
CHANGED
|
@@ -9423,7 +9423,12 @@ var bar = {
|
|
|
9423
9423
|
minHeight: "57px",
|
|
9424
9424
|
borderBottom: `${border10.BordersDdsBorderStyleLightStroke} solid ${border10.BordersDdsBorderStyleLightStrokeWeight}`,
|
|
9425
9425
|
paddingLeft: spacing24.SizesDdsSpacingX15,
|
|
9426
|
-
paddingRight: spacing24.SizesDdsSpacingX15
|
|
9426
|
+
paddingRight: spacing24.SizesDdsSpacingX15,
|
|
9427
|
+
smallScreen: {
|
|
9428
|
+
itemGap: spacing24.SizesDdsSpacingX1,
|
|
9429
|
+
paddingLeft: spacing24.SizesDdsSpacingX1,
|
|
9430
|
+
paddingRight: spacing24.SizesDdsSpacingX05
|
|
9431
|
+
}
|
|
9427
9432
|
};
|
|
9428
9433
|
var separator = {
|
|
9429
9434
|
color: border10.BordersDdsBorderStyleLightStroke,
|
|
@@ -9448,6 +9453,11 @@ var Bar2 = import_styled_components64.default.div`
|
|
|
9448
9453
|
border-bottom: ${bar2.borderBottom};
|
|
9449
9454
|
padding-left: ${bar2.paddingLeft};
|
|
9450
9455
|
padding-right: ${bar2.paddingRight};
|
|
9456
|
+
${({ $smallScreen }) => $smallScreen && import_styled_components64.css`
|
|
9457
|
+
gap: ${bar2.smallScreen.itemGap};
|
|
9458
|
+
padding-left: ${bar2.smallScreen.paddingLeft};
|
|
9459
|
+
padding-right: ${bar2.smallScreen.paddingRight};
|
|
9460
|
+
`}
|
|
9451
9461
|
|
|
9452
9462
|
${({ $hasNavigation }) => $hasNavigation ? import_styled_components64.css`
|
|
9453
9463
|
${ContextMenuGroup} {
|
|
@@ -9630,6 +9640,7 @@ var InternalHeader = (props) => {
|
|
|
9630
9640
|
{
|
|
9631
9641
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
9632
9642
|
$hasNavigation: !!navigation2,
|
|
9643
|
+
$smallScreen: smallScreen,
|
|
9633
9644
|
children: [
|
|
9634
9645
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Typography, { typographyType: "bodySans02", bold: true, as: "span", children: applicationHref ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(AppNameLink, { href: applicationHref, rel: "noopener noreferrer", children: applicationName }) : applicationName }),
|
|
9635
9646
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Typography, { typographyType: "bodySans02", as: "span", children: applicationDesc }),
|