@entur/layout 3.4.0 → 3.4.1-next.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.
@@ -61,5 +61,7 @@ export type FlexOwnProps = {
61
61
  };
62
62
  export type FlexProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, FlexOwnProps>;
63
63
  declare const defaultElement = "div";
64
- export declare const Flex: <E extends React.ElementType = "div">({ direction, wrap, align, justify, alignContent, gap, rowGap, columnGap, flex, grow, shrink, basis, width, height, minWidth, minHeight, maxWidth, maxHeight, as, className, children, style, ...rest }: FlexProps<E>) => JSX.Element;
64
+ export declare const Flex: React.ForwardRefExoticComponent<Omit<FlexOwnProps & {
65
+ as?: React.ElementType<any> | undefined;
66
+ } & Omit<Omit<any, "ref">, keyof FlexOwnProps>, "ref"> & React.RefAttributes<Element>>;
65
67
  export {};
@@ -42,5 +42,7 @@ export type GridOwnProps = {
42
42
  };
43
43
  export type GridProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, GridOwnProps>;
44
44
  declare const defaultElement = "div";
45
- export declare const Grid: <E extends React.ElementType = "div">({ templateColumns, templateRows, gap, rowGap, columnGap, autoFlow, align, justify, alignContent, height, as, className, children, style, ...rest }: GridProps<E>) => JSX.Element;
45
+ export declare const Grid: React.ForwardRefExoticComponent<Omit<GridOwnProps & {
46
+ as?: React.ElementType<any> | undefined;
47
+ } & Omit<Omit<any, "ref">, keyof GridOwnProps>, "ref"> & React.RefAttributes<Element>>;
46
48
  export {};
@@ -24,5 +24,7 @@ export type GridItemOwnProps = {
24
24
  };
25
25
  export type GridItemProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, GridItemOwnProps>;
26
26
  declare const defaultElement = "div";
27
- export declare const GridItem: <E extends React.ElementType = "div">({ colSpan, rowSpan, as, className, children, style, ...rest }: GridItemProps<E>) => JSX.Element;
27
+ export declare const GridItem: React.ForwardRefExoticComponent<Omit<GridItemOwnProps & {
28
+ as?: React.ElementType<any> | undefined;
29
+ } & Omit<Omit<any, "ref">, keyof GridItemOwnProps>, "ref"> & React.RefAttributes<Element>>;
28
30
  export {};
@@ -1,15 +1,39 @@
1
1
  import { default as React } from 'react';
2
- export type SidebarProps = React.HTMLAttributes<HTMLElement> & {
2
+ import { PolymorphicComponentProps } from '@entur/utils';
3
+ type SidebarOwnProps = {
3
4
  /** Toggle contrast styling for the sidebar */
4
5
  contrast?: boolean;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ children?: React.ReactNode;
5
9
  };
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>;
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>>;
13
37
  export type SidebarComponent = typeof SidebarRoot & {
14
38
  Logo: typeof SidebarLogo;
15
39
  User: typeof SidebarUser;
@@ -1,9 +1,26 @@
1
1
  import { default as React } from 'react';
2
+ import { PolymorphicComponentProps } from '@entur/utils';
3
+ import { Grid } from '../../Grid';
2
4
  import { SidebarComponent } from '../Sidebar';
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>;
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>>;
7
24
  export type PortalComponent = typeof PortalRoot & {
8
25
  Sidebar: SidebarComponent;
9
26
  Main: typeof PortalMain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/layout",
3
- "version": "3.4.0",
3
+ "version": "3.4.1-next.1",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/layout.cjs.js",
6
6
  "module": "dist/layout.esm.js",
@@ -70,5 +70,5 @@
70
70
  "vite": "^7.1.3",
71
71
  "vite-plugin-dts": "^4.5.4"
72
72
  },
73
- "gitHead": "6ccfa209ff0606983e817dc86e9081c1a0b1a6f0"
73
+ "gitHead": "9a27d33d8c6c529e6a9bf94101cb3ef76470dc45"
74
74
  }