@uxland/primary-shell 1.0.5 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
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",
@@ -8,7 +8,8 @@
8
8
  "main": "src/index.ts",
9
9
  "types": "dist/index.d.ts",
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "src"
12
13
  ],
13
14
  "publishConfig": {
14
15
  "access": "public",
@@ -0,0 +1,6 @@
1
+ import { PrimaryShell } from "./primary-shell";
2
+
3
+ export const initializeShell = (element: HTMLElement) => {
4
+ const shell = new PrimaryShell();
5
+ element.appendChild(shell as any);
6
+ }
@@ -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
+ 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
@@ -0,0 +1,7 @@
1
+ export const regions = {
2
+ header: 'header-region',
3
+ actionsToolbar: 'actions-toolbar-region',
4
+ main: 'main-region',
5
+ sidebar: 'asidebar-region',
6
+ footer: 'footer-region'
7
+ };