@entur/layout 3.4.1 → 3.4.2
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/index.cjs.map +1 -1
- package/dist/beta/cjs/templates/portal/Portal.cjs +56 -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/index.mjs.map +1 -1
- package/dist/beta/esm/templates/portal/Portal.mjs +56 -36
- package/dist/beta/esm/templates/portal/Portal.mjs.map +1 -1
- package/dist/beta/styles/index.css +28 -5
- 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/index.d.ts +1 -1
- package/dist/beta/types/templates/Sidebar.d.ts +32 -8
- package/dist/beta/types/templates/index.d.ts +2 -2
- package/dist/beta/types/templates/portal/Portal.d.ts +32 -4
- package/dist/beta/types/templates/portal/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -63,7 +63,19 @@
|
|
|
63
63
|
--9xl:var(--size-29);
|
|
64
64
|
--10xl:var(--size-30);
|
|
65
65
|
--11xl:var(--size-31);
|
|
66
|
-
}
|
|
66
|
+
}.eds-layout-grid{
|
|
67
|
+
--grid-template-columns:initial;
|
|
68
|
+
--grid-template-rows:initial;
|
|
69
|
+
--grid-auto-flow:initial;
|
|
70
|
+
--grid-align-items:initial;
|
|
71
|
+
--grid-justify-content:initial;
|
|
72
|
+
--grid-align-content:initial;
|
|
73
|
+
--grid-gap:initial;
|
|
74
|
+
--grid-row-gap:initial;
|
|
75
|
+
--grid-column-gap:initial;
|
|
76
|
+
--grid-height:initial;
|
|
77
|
+
}
|
|
78
|
+
:where(.eds-layout-grid){
|
|
67
79
|
display:grid;
|
|
68
80
|
grid-template-columns:repeat(12, 1fr);
|
|
69
81
|
grid-template-columns:var(--grid-template-columns, repeat(12, 1fr));
|
|
@@ -89,11 +101,9 @@
|
|
|
89
101
|
-moz-column-gap:var(--grid-column-gap, var(--grid-gap));
|
|
90
102
|
column-gap:var(--grid-column-gap, var(--grid-gap));
|
|
91
103
|
height:var(--grid-height);
|
|
92
|
-
}
|
|
93
|
-
:where(.eds-layout-grid .eds-layout-grid){
|
|
94
|
-
grid-template-columns:subgrid;
|
|
95
|
-
grid-template-rows:subgrid;
|
|
96
104
|
}.eds-layout-grid-item{
|
|
105
|
+
--grid-item-column:initial;
|
|
106
|
+
--grid-item-row:initial;
|
|
97
107
|
grid-column:var(--grid-item-column);
|
|
98
108
|
grid-row:var(--grid-item-row);
|
|
99
109
|
}:where(.eds-layout-flex){
|
|
@@ -190,6 +200,19 @@
|
|
|
190
200
|
min-height:100vh;
|
|
191
201
|
width:100%;
|
|
192
202
|
}
|
|
203
|
+
.eds-layout-template-portal:has(> .eds-layout-template-portal__status-bar){
|
|
204
|
+
--grid-template-rows:auto 1fr;
|
|
205
|
+
}
|
|
206
|
+
.eds-layout-template-portal:has(> .eds-layout-template-portal__status-bar) > .eds-layout-template-portal__status-bar{
|
|
207
|
+
--grid-item-column:1 / -1;
|
|
208
|
+
--grid-item-row:1;
|
|
209
|
+
}
|
|
210
|
+
.eds-layout-template-portal:has(> .eds-layout-template-portal__status-bar) > .eds-layout-grid-item:has(.eds-layout-template-sidebar){
|
|
211
|
+
--grid-item-row:2;
|
|
212
|
+
}
|
|
213
|
+
.eds-layout-template-portal:has(> .eds-layout-template-portal__status-bar) > .eds-layout-template-portal__main{
|
|
214
|
+
--grid-item-row:2;
|
|
215
|
+
}
|
|
193
216
|
|
|
194
217
|
.eds-layout-template-portal__main{
|
|
195
218
|
padding:1rem;
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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 {};
|
|
@@ -4,4 +4,4 @@ export { Flex, FlexSpacer } from './Flex';
|
|
|
4
4
|
export { Template } from './templates';
|
|
5
5
|
export type { GridProps, GridOwnProps, GridItemProps, GridItemOwnProps, GridSpacingValue, ResponsiveValue, } from './Grid';
|
|
6
6
|
export type { FlexProps, FlexOwnProps, FlexSpacingValue, FlexSpacerProps, FlexSpacerOwnProps, } from './Flex';
|
|
7
|
-
export type { PortalComponent, PortalMainProps, PortalProps, SidebarComponent, SidebarProps, SidebarSectionProps, TemplateComponent, } from './templates';
|
|
7
|
+
export type { PortalComponent, PortalMainProps, PortalProps, PortalStatusBarProps, SidebarComponent, SidebarProps, SidebarSectionProps, TemplateComponent, } from './templates';
|
|
@@ -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,7 +1,7 @@
|
|
|
1
|
-
import { PortalComponent, PortalMainProps, PortalProps } from './portal';
|
|
1
|
+
import { PortalComponent, PortalMainProps, PortalProps, PortalStatusBarProps } from './portal';
|
|
2
2
|
import { SidebarComponent, SidebarProps, SidebarSectionProps } from './Sidebar';
|
|
3
3
|
export type TemplateComponent = {
|
|
4
4
|
Portal: PortalComponent;
|
|
5
5
|
};
|
|
6
6
|
export declare const Template: TemplateComponent;
|
|
7
|
-
export type { PortalComponent, PortalMainProps, PortalProps, SidebarComponent, SidebarProps, SidebarSectionProps, };
|
|
7
|
+
export type { PortalComponent, PortalMainProps, PortalProps, PortalStatusBarProps, SidebarComponent, SidebarProps, SidebarSectionProps, };
|
|
@@ -1,10 +1,38 @@
|
|
|
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 PortalStatusBarOwnProps = {
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
type PortalMainOwnProps = {
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
declare const defaultStatusBarElement = "div";
|
|
21
|
+
declare const defaultPortalMainElement = "main";
|
|
22
|
+
export type PortalProps<T extends React.ElementType = typeof Grid> = PolymorphicComponentProps<T, PortalOwnProps>;
|
|
23
|
+
export type PortalStatusBarProps<T extends React.ElementType = typeof defaultStatusBarElement> = PolymorphicComponentProps<T, PortalStatusBarOwnProps>;
|
|
24
|
+
export type PortalMainProps<T extends React.ElementType = typeof defaultPortalMainElement> = PolymorphicComponentProps<T, PortalMainOwnProps>;
|
|
25
|
+
declare const PortalRoot: React.ForwardRefExoticComponent<Omit<PortalOwnProps & {
|
|
26
|
+
as?: React.ElementType<any> | undefined;
|
|
27
|
+
} & Omit<Omit<any, "ref">, "as" | keyof PortalOwnProps>, "ref"> & React.RefAttributes<Element>>;
|
|
28
|
+
declare const PortalStatusBar: React.ForwardRefExoticComponent<Omit<PortalStatusBarOwnProps & {
|
|
29
|
+
as?: React.ElementType<any> | undefined;
|
|
30
|
+
} & Omit<Omit<any, "ref">, "as" | keyof PortalStatusBarOwnProps>, "ref"> & React.RefAttributes<Element>>;
|
|
31
|
+
declare const PortalMain: React.ForwardRefExoticComponent<Omit<PortalMainOwnProps & {
|
|
32
|
+
as?: React.ElementType<any> | undefined;
|
|
33
|
+
} & Omit<Omit<any, "ref">, "as" | keyof PortalMainOwnProps>, "ref"> & React.RefAttributes<Element>>;
|
|
7
34
|
export type PortalComponent = typeof PortalRoot & {
|
|
35
|
+
StatusBar: typeof PortalStatusBar;
|
|
8
36
|
Sidebar: SidebarComponent;
|
|
9
37
|
Main: typeof PortalMain;
|
|
10
38
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Portal } from './Portal';
|
|
2
|
-
export type { PortalComponent, PortalMainProps, PortalProps } from './Portal';
|
|
2
|
+
export type { PortalComponent, PortalMainProps, PortalProps, PortalStatusBarProps, } from './Portal';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/layout",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
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": "ee1f35746ed0ce1e2ab24377ec9d1bb78f6fabac"
|
|
74
74
|
}
|