@entur/layout 3.4.0 → 3.4.1-next.0
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/beta/cjs/Flex/Flex.cjs +105 -101
- package/dist/beta/cjs/Flex/Flex.cjs.map +1 -1
- package/dist/beta/cjs/Grid/Grid.cjs +74 -70
- package/dist/beta/cjs/Grid/Grid.cjs.map +1 -1
- package/dist/beta/cjs/Grid/GridItem.cjs +35 -31
- package/dist/beta/cjs/Grid/GridItem.cjs.map +1 -1
- package/dist/beta/cjs/templates/Sidebar.cjs +85 -67
- package/dist/beta/cjs/templates/Sidebar.cjs.map +1 -1
- package/dist/beta/cjs/templates/portal/Portal.cjs +35 -36
- package/dist/beta/cjs/templates/portal/Portal.cjs.map +1 -1
- package/dist/beta/esm/Flex/Flex.mjs +105 -101
- package/dist/beta/esm/Flex/Flex.mjs.map +1 -1
- package/dist/beta/esm/Grid/Grid.mjs +74 -70
- package/dist/beta/esm/Grid/Grid.mjs.map +1 -1
- package/dist/beta/esm/Grid/GridItem.mjs +35 -31
- package/dist/beta/esm/Grid/GridItem.mjs.map +1 -1
- package/dist/beta/esm/templates/Sidebar.mjs +85 -67
- package/dist/beta/esm/templates/Sidebar.mjs.map +1 -1
- package/dist/beta/esm/templates/portal/Portal.mjs +35 -36
- package/dist/beta/esm/templates/portal/Portal.mjs.map +1 -1
- package/dist/beta/types/Flex/Flex.d.ts +3 -1
- package/dist/beta/types/Grid/Grid.d.ts +3 -1
- package/dist/beta/types/Grid/GridItem.d.ts +3 -1
- package/dist/beta/types/templates/Sidebar.d.ts +32 -8
- package/dist/beta/types/templates/portal/Portal.d.ts +21 -4
- package/package.json +2 -2
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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.0",
|
|
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": "
|
|
73
|
+
"gitHead": "f49a3d442e0be4be813dc3305c1d1c3d51b7ab71"
|
|
74
74
|
}
|