@entur/layout 3.4.1-next.0 → 3.4.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.
@@ -1,39 +1,15 @@
1
1
  import { default as React } from 'react';
2
- import { PolymorphicComponentProps } from '@entur/utils';
3
- type SidebarOwnProps = {
2
+ export type SidebarProps = React.HTMLAttributes<HTMLElement> & {
4
3
  /** Toggle contrast styling for the sidebar */
5
4
  contrast?: boolean;
6
- className?: string;
7
- style?: React.CSSProperties;
8
- children?: React.ReactNode;
9
5
  };
10
- type SidebarSectionOwnProps = {
11
- className?: string;
12
- style?: React.CSSProperties;
13
- children?: React.ReactNode;
14
- };
15
- declare const defaultSidebarElement = "aside";
16
- declare const defaultSectionElement = "div";
17
- export type SidebarProps<T extends React.ElementType = typeof defaultSidebarElement> = PolymorphicComponentProps<T, SidebarOwnProps>;
18
- export type SidebarSectionProps<T extends React.ElementType = typeof defaultSectionElement> = PolymorphicComponentProps<T, SidebarSectionOwnProps>;
19
- declare const SidebarLogo: React.ForwardRefExoticComponent<Omit<SidebarSectionOwnProps & {
20
- as?: React.ElementType<any> | undefined;
21
- } & Omit<Omit<any, "ref">, "as" | keyof SidebarSectionOwnProps>, "ref"> & React.RefAttributes<Element>>;
22
- declare const SidebarUser: React.ForwardRefExoticComponent<Omit<SidebarSectionOwnProps & {
23
- as?: React.ElementType<any> | undefined;
24
- } & Omit<Omit<any, "ref">, "as" | keyof SidebarSectionOwnProps>, "ref"> & React.RefAttributes<Element>>;
25
- declare const SidebarData: React.ForwardRefExoticComponent<Omit<SidebarSectionOwnProps & {
26
- as?: React.ElementType<any> | undefined;
27
- } & Omit<Omit<any, "ref">, "as" | keyof SidebarSectionOwnProps>, "ref"> & React.RefAttributes<Element>>;
28
- declare const SidebarNavigation: React.ForwardRefExoticComponent<Omit<SidebarSectionOwnProps & {
29
- as?: React.ElementType<any> | undefined;
30
- } & Omit<Omit<any, "ref">, "as" | keyof SidebarSectionOwnProps>, "ref"> & React.RefAttributes<Element>>;
31
- declare const SidebarFooter: React.ForwardRefExoticComponent<Omit<SidebarSectionOwnProps & {
32
- as?: React.ElementType<any> | undefined;
33
- } & Omit<Omit<any, "ref">, "as" | keyof SidebarSectionOwnProps>, "ref"> & React.RefAttributes<Element>>;
34
- declare const SidebarRoot: React.ForwardRefExoticComponent<Omit<SidebarOwnProps & {
35
- as?: React.ElementType<any> | undefined;
36
- } & Omit<Omit<any, "ref">, "as" | keyof SidebarOwnProps>, "ref"> & React.RefAttributes<Element>>;
6
+ export type SidebarSectionProps = React.HTMLAttributes<HTMLElement>;
7
+ declare const SidebarLogo: React.FC<SidebarSectionProps>;
8
+ declare const SidebarUser: React.FC<SidebarSectionProps>;
9
+ declare const SidebarData: React.FC<SidebarSectionProps>;
10
+ declare const SidebarNavigation: React.FC<SidebarSectionProps>;
11
+ declare const SidebarFooter: React.FC<SidebarSectionProps>;
12
+ declare const SidebarRoot: React.FC<SidebarProps>;
37
13
  export type SidebarComponent = typeof SidebarRoot & {
38
14
  Logo: typeof SidebarLogo;
39
15
  User: typeof SidebarUser;
@@ -1,26 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { PolymorphicComponentProps } from '@entur/utils';
3
- import { Grid } from '../../Grid';
4
2
  import { SidebarComponent } from '../Sidebar';
5
- type PortalOwnProps = {
6
- className?: string;
7
- style?: React.CSSProperties;
8
- children?: React.ReactNode;
9
- };
10
- type PortalMainOwnProps = {
11
- className?: string;
12
- style?: React.CSSProperties;
13
- children?: React.ReactNode;
14
- };
15
- declare const defaultPortalMainElement = "main";
16
- export type PortalProps<T extends React.ElementType = typeof Grid> = PolymorphicComponentProps<T, PortalOwnProps>;
17
- export type PortalMainProps<T extends React.ElementType = typeof defaultPortalMainElement> = PolymorphicComponentProps<T, PortalMainOwnProps>;
18
- declare const PortalRoot: React.ForwardRefExoticComponent<Omit<PortalOwnProps & {
19
- as?: React.ElementType<any> | undefined;
20
- } & Omit<Omit<any, "ref">, "as" | keyof PortalOwnProps>, "ref"> & React.RefAttributes<Element>>;
21
- declare const PortalMain: React.ForwardRefExoticComponent<Omit<PortalMainOwnProps & {
22
- as?: React.ElementType<any> | undefined;
23
- } & Omit<Omit<any, "ref">, "as" | keyof PortalMainOwnProps>, "ref"> & React.RefAttributes<Element>>;
3
+ export type PortalProps = React.HTMLAttributes<HTMLDivElement>;
4
+ export type PortalMainProps = React.HTMLAttributes<HTMLElement>;
5
+ declare const PortalRoot: React.FC<PortalProps>;
6
+ declare const PortalMain: React.FC<PortalMainProps>;
24
7
  export type PortalComponent = typeof PortalRoot & {
25
8
  Sidebar: SidebarComponent;
26
9
  Main: typeof PortalMain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/layout",
3
- "version": "3.4.1-next.0",
3
+ "version": "3.4.1",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/layout.cjs.js",
6
6
  "module": "dist/layout.esm.js",
@@ -51,9 +51,9 @@
51
51
  "react-dom": ">=16.8.0"
52
52
  },
53
53
  "dependencies": {
54
- "@entur/icons": "^8.4.2",
55
- "@entur/tokens": "^3.22.1",
56
- "@entur/typography": "^2.1.3",
54
+ "@entur/icons": "^8.4.3",
55
+ "@entur/tokens": "^3.22.2",
56
+ "@entur/typography": "^2.1.4",
57
57
  "@entur/utils": "^0.13.1",
58
58
  "classnames": "^2.5.1"
59
59
  },
@@ -70,5 +70,5 @@
70
70
  "vite": "^7.1.3",
71
71
  "vite-plugin-dts": "^4.5.4"
72
72
  },
73
- "gitHead": "f49a3d442e0be4be813dc3305c1d1c3d51b7ab71"
73
+ "gitHead": "20bfbc9666763680b8871a62f9503b0dfd481531"
74
74
  }