@uxland/primary-shell 1.0.2 → 1.1.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/index.js +154 -89
- package/dist/index.mjs +2852 -2434
- package/index.ts +3 -1
- package/package.json +6 -3
- package/src/initializer.ts +5 -0
- package/src/primary-shell.ts +78 -0
- package/src/regions.ts +7 -0
- package/src/action-toolbar-item/action-toolbar-item.ts +0 -34
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxland/primary-shell",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Framework Integració modular",
|
|
5
5
|
"author": "UXLand <dev@uxland.es>",
|
|
6
6
|
"homepage": "https://github.com/uxland/fim-sandbox/tree/app#readme",
|
|
@@ -25,9 +25,12 @@
|
|
|
25
25
|
"url": "https://github.com/uxland/fim-sandbox-region-test/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
28
|
+
"@uxland/fim-core": "^1.0.0",
|
|
29
|
+
"@uxland/primary-ui-components": "^1.0.0",
|
|
29
30
|
"@uxland/regions": "^1.0.0",
|
|
30
|
-
"
|
|
31
|
+
"tslib": "^2.3.0",
|
|
32
|
+
"lit": "^3.1.0",
|
|
33
|
+
"vite": "^5.2.8"
|
|
31
34
|
},
|
|
32
35
|
"devDependencies": {},
|
|
33
36
|
"scripts": {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {ShellLitRegionHost} from '@uxland/fim-core';
|
|
2
|
+
import {IRegion, region} from '@uxland/regions';
|
|
3
|
+
import {LitElement, css, html} from 'lit';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { regions} from './regions';
|
|
6
|
+
import '@uxland/primary-ui-components';
|
|
7
|
+
|
|
8
|
+
//@ts-ignore
|
|
9
|
+
@customElement('primary-shell')
|
|
10
|
+
//@ts-ignore
|
|
11
|
+
export class PrimaryShell extends ShellLitRegionHost(LitElement) {
|
|
12
|
+
override render() {
|
|
13
|
+
return html` <div class="container">
|
|
14
|
+
<div class="header">
|
|
15
|
+
<div id="header-region-container"></div>
|
|
16
|
+
<div id="actions-toolbar-region-container"></div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="main-container">
|
|
20
|
+
<div id="sidebar-region-region-container"></div>
|
|
21
|
+
<div id="main-region-region-container"></div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static styles = css`
|
|
27
|
+
:host {
|
|
28
|
+
width: 100%;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
.container {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
background: aliceblue;
|
|
37
|
+
}
|
|
38
|
+
.header {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: row;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
background-color: blue;
|
|
43
|
+
height: 60px;
|
|
44
|
+
background-color: white;
|
|
45
|
+
color: black;
|
|
46
|
+
box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
|
|
49
|
+
#actions-toolbar-region-container{
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction:row;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.main-container {
|
|
55
|
+
min-height: 1px;
|
|
56
|
+
height: 100%;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: row;
|
|
59
|
+
#sidebar-region-region-container {
|
|
60
|
+
background: white;
|
|
61
|
+
width: 15vw;
|
|
62
|
+
box-shadow: rgba(0, 0, 0, 0.12) 4px -1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
@region({targetId: 'header-region-container', name: regions.header})
|
|
68
|
+
headerRegion: IRegion | undefined;
|
|
69
|
+
|
|
70
|
+
@region({targetId: 'actions-toolbar-region-container', name: regions.actionsToolbar})
|
|
71
|
+
actionsToolbarRegion: IRegion | undefined;
|
|
72
|
+
|
|
73
|
+
@region({targetId: 'sidebar-region-region-container', name: regions.sidebar})
|
|
74
|
+
sidebarRegion: IRegion | undefined;
|
|
75
|
+
|
|
76
|
+
@region({targetId: 'main-region-region-container', name: regions.main})
|
|
77
|
+
mainRegion: IRegion | undefined;
|
|
78
|
+
}
|
package/src/regions.ts
ADDED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import '@material/web/icon/icon';
|
|
3
|
-
import '@material/web/iconbutton/icon-button';
|
|
4
|
-
import { regionView } from '@uxland/regions';
|
|
5
|
-
import { LitElement, css, html } from 'lit';
|
|
6
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
7
|
-
//@ts-ignore
|
|
8
|
-
@customElement('action-toolbar-item')
|
|
9
|
-
//@ts-ignore
|
|
10
|
-
export class ActionToolbarItem extends regionView(LitElement) {
|
|
11
|
-
|
|
12
|
-
override render() {
|
|
13
|
-
return html`
|
|
14
|
-
<div class="container">
|
|
15
|
-
<md-icon-button aria-label="${this.description}">
|
|
16
|
-
<md-icon>${this.icon}</md-icon>
|
|
17
|
-
</md-icon-button>
|
|
18
|
-
</div>
|
|
19
|
-
`;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static styles = css`
|
|
23
|
-
:host {
|
|
24
|
-
color: red;
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
@property()
|
|
29
|
-
icon: string;
|
|
30
|
-
|
|
31
|
-
@property()
|
|
32
|
-
description: string;
|
|
33
|
-
|
|
34
|
-
}
|