@entur/menu 4.1.24 → 4.1.26

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.
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './BreadcrumbNavigation.scss';
3
3
  import { PolymorphicComponentProps } from '@entur/utils';
4
- export declare type BreadcrumbItemOwnProps = {
4
+ export type BreadcrumbItemOwnProps = {
5
5
  /** Komponenten som rendres
6
6
  * @default "a"
7
7
  */
@@ -13,7 +13,7 @@ export declare type BreadcrumbItemOwnProps = {
13
13
  /** True om sist i listen. Settes automatisk av BreadcrumbNavigation-komponenten */
14
14
  isCurrent?: boolean;
15
15
  };
16
- export declare type BreadcrumbItemProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, BreadcrumbItemOwnProps>;
16
+ export type BreadcrumbItemProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, BreadcrumbItemOwnProps>;
17
17
  declare const defaultElement = "a";
18
18
  export declare const BreadcrumbItem: <E extends React.ElementType<any> = "a">({ className, isCurrent, as, ...rest }: BreadcrumbItemProps<E>) => JSX.Element;
19
19
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './BreadcrumbNavigation.scss';
3
- export declare type BreadcrumbNavigationProps = {
3
+ export type BreadcrumbNavigationProps = {
4
4
  /** Label for brødsmulestien.
5
5
  * @default 'Brødsmulesti'
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SideNavigationProps } from './SideNavigation';
3
- declare type CollapsibleSideNavigationProps = SideNavigationProps & {
3
+ type CollapsibleSideNavigationProps = SideNavigationProps & {
4
4
  /**Tilstand til menyen
5
5
  * @default false
6
6
  */
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { MenuButtonProps, MenuItemProps, MenuLinkProps } from '@reach/menu-button';
3
3
  import type * as Polymorphic from '@reach/polymorphic';
4
4
  import './OverflowMenu.scss';
5
- export declare type OverflowMenuProps = {
5
+ export type OverflowMenuProps = {
6
6
  /** Menypunkter (OverflowMenuItem eller OverflowMenuLink) */
7
7
  children: React.ReactNode;
8
8
  /** Knapp som skal åpne OverflowMenu
@@ -17,7 +17,7 @@ export declare type OverflowMenuProps = {
17
17
  position?: 'right' | 'left';
18
18
  } & MenuButtonProps;
19
19
  export declare const OverflowMenu: React.FC<OverflowMenuProps>;
20
- export declare type OverflowMenuItemProps = {
20
+ export type OverflowMenuItemProps = {
21
21
  /** Innholdet til OverflowMenuItem */
22
22
  children: React.ReactNode;
23
23
  /** HTML-elementet eller React-komponenten som lager elementet
@@ -30,7 +30,7 @@ export declare type OverflowMenuItemProps = {
30
30
  onSelect: () => void;
31
31
  } & MenuItemProps;
32
32
  export declare const OverflowMenuItem: Polymorphic.ForwardRefComponent<"div", OverflowMenuItemProps>;
33
- export declare type OverflowMenuLinkProps = {
33
+ export type OverflowMenuLinkProps = {
34
34
  /** Innholdet til OverflowMenuLink */
35
35
  children: React.ReactNode;
36
36
  /** HTML-elementet eller React-komponenten som lager elementet
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './Pagination.scss';
3
- export declare type PaginationProps = {
3
+ export type PaginationProps = {
4
4
  /** Ekstra klassenavn */
5
5
  className?: string;
6
6
  /** Sidenummeret som er aktivt nå (1-indeksert) */
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type PaginationInputProps = {
2
+ export type PaginationInputProps = {
3
3
  currentPage: number;
4
4
  label?: string;
5
5
  onPageChange: (pageNumber: number) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type PaginationPageProps = {
2
+ export type PaginationPageProps = {
3
3
  /** Sidenummeret som er aktivt nå */
4
4
  children: React.ReactNode;
5
5
  /** Ekstra klassenavn */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './SideNavigation.scss';
3
- export declare type SideNavigationProps = {
3
+ export type SideNavigationProps = {
4
4
  /** Ekstra klassenavn */
5
5
  className?: string;
6
6
  /** Størrelse på menyen
@@ -9,7 +9,7 @@ export declare type SideNavigationProps = {
9
9
  size?: 'small' | 'medium';
10
10
  [key: string]: any;
11
11
  };
12
- declare type InternalMarker = {
12
+ type InternalMarker = {
13
13
  __IS_ENTUR_MENU__: boolean;
14
14
  };
15
15
  export declare const SideNavigation: React.FC<SideNavigationProps> & InternalMarker;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type SideNavigationGroupProps = {
2
+ export type SideNavigationGroupProps = {
3
3
  /** Skal menygruppen være ekspandert by default? Kun relevant om komponenten ikke er kontrollert
4
4
  * @default false
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentProps } from '@entur/utils';
3
- declare type BaseSideNavigationItemOwnProps = {
3
+ type BaseSideNavigationItemOwnProps = {
4
4
  active?: boolean;
5
5
  as?: 'a' | 'button' | React.ElementType;
6
6
  className?: string;
@@ -9,9 +9,9 @@ declare type BaseSideNavigationItemOwnProps = {
9
9
  subMenu?: React.ReactNode;
10
10
  [key: string]: any;
11
11
  };
12
- export declare type BaseSideNavigationItemProps<T extends React.ElementType = typeof defaultElementBaseItem> = PolymorphicComponentProps<T, BaseSideNavigationItemOwnProps>;
12
+ export type BaseSideNavigationItemProps<T extends React.ElementType = typeof defaultElementBaseItem> = PolymorphicComponentProps<T, BaseSideNavigationItemOwnProps>;
13
13
  declare const defaultElementBaseItem = "a";
14
- export declare type SideNavigationItemOwnProps = {
14
+ export type SideNavigationItemOwnProps = {
15
15
  /** Om meny-elementet er det som er aktivt */
16
16
  active?: boolean;
17
17
  /** HTML-elementet eller React-komponenten som rendres */
@@ -27,7 +27,7 @@ export declare type SideNavigationItemOwnProps = {
27
27
  icon?: React.ReactNode;
28
28
  [key: string]: any;
29
29
  };
30
- export declare type SideNavigationItemProps<T extends React.ElementType = typeof defaultElementItem> = PolymorphicComponentProps<T, SideNavigationItemOwnProps>;
30
+ export type SideNavigationItemProps<T extends React.ElementType = typeof defaultElementItem> = PolymorphicComponentProps<T, SideNavigationItemOwnProps>;
31
31
  declare const defaultElementItem = "a";
32
32
  export declare const SideNavigationItem: <E extends React.ElementType = typeof defaultElementItem>(props: SideNavigationItemProps<E>) => React.ReactElement | null;
33
33
  export {};
package/dist/Stepper.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './Stepper.scss';
3
- export declare type StepperProps = {
3
+ export type StepperProps = {
4
4
  /** Det nåværende steget. */
5
5
  activeIndex: number;
6
6
  /** Oppdater state ved klikk. */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './TopNavigationItem.scss';
3
3
  import { PolymorphicComponentProps } from '@entur/utils';
4
- export declare type TopNavigationItemOwnProps = {
4
+ export type TopNavigationItemOwnProps = {
5
5
  /** Om komponenten vises som valgt eller ikke
6
6
  * @default false
7
7
  */
@@ -15,7 +15,7 @@ export declare type TopNavigationItemOwnProps = {
15
15
  /** Ekstra klassenavn */
16
16
  className?: string;
17
17
  };
18
- export declare type TopNavigationItemProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, TopNavigationItemOwnProps>;
18
+ export type TopNavigationItemProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, TopNavigationItemOwnProps>;
19
19
  declare const defaultElement = "a";
20
20
  export declare const TopNavigationItem: <E extends React.ElementType<any> = "a">({ active, className, as, ...rest }: TopNavigationItemProps<E>) => JSX.Element;
21
21
  export {};