@aquera/nile-elements 1.3.8-beta-1.2 → 1.3.9-beta-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/demo/index.css +3 -0
- package/demo/index.html +184 -25
- package/demo/nxtgen.css +2 -0
- package/demo/variables.css +2 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +151 -124
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +8 -2
- package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +10 -6
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +8 -2
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +2 -2
- package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.esm.js +25 -30
- package/dist/nile-side-bar/nile-side-bar.esm.js +7 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +3 -5
- package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +8 -8
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +4 -4
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +11 -6
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +3 -3
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +4 -7
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +58 -56
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +2 -4
- package/dist/nile-side-bar-panel/index.cjs.js +2 -0
- package/dist/nile-side-bar-panel/index.cjs.js.map +1 -0
- package/dist/nile-side-bar-panel/index.esm.js +1 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js +2 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js.map +1 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.css.cjs.js +2 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.css.cjs.js.map +1 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.css.esm.js +8 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.esm.js +3 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +9 -8
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +8 -2
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +10 -3
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +6 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +4 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.css.js +23 -28
- package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.js +7 -1
- package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +3 -5
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +1 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.d.ts +2 -0
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +12 -4
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +2 -2
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +9 -4
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +1 -0
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +8 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +2 -5
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +48 -46
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +2 -4
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
- package/dist/src/nile-side-bar-panel/index.d.ts +1 -0
- package/dist/src/nile-side-bar-panel/index.js +2 -0
- package/dist/src/nile-side-bar-panel/index.js.map +1 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.d.ts +12 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.js +20 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.js.map +1 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.d.ts +32 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.js +43 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.js.map +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +6 -5
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/index.ts +2 -0
- package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +8 -2
- package/src/nile-inline-sidebar/nile-inline-sidebar.ts +16 -5
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +6 -0
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +1 -0
- package/src/nile-side-bar/nile-side-bar.css.ts +23 -28
- package/src/nile-side-bar/nile-side-bar.ts +8 -1
- package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +3 -5
- package/src/nile-side-bar-expand/nile-side-bar-expand.ts +6 -4
- package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +2 -2
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +9 -4
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +9 -1
- package/src/nile-side-bar-group/nile-side-bar-group.css.ts +2 -5
- package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +49 -47
- package/src/nile-side-bar-header/nile-side-bar-header.css.ts +2 -4
- package/src/nile-side-bar-panel/index.ts +1 -0
- package/src/nile-side-bar-panel/nile-side-bar-panel.css.ts +22 -0
- package/src/nile-side-bar-panel/nile-side-bar-panel.ts +54 -0
- package/src/nile-slide-toggle/nile-slide-toggle.ts +6 -5
- package/vscode-html-custom-data.json +25 -3
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "nile-elements",
|
|
6
|
-
"version": "1.3.
|
|
6
|
+
"version": "1.3.9-beta-1.0",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"module": "dist/src/index.js",
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
"./nile-inline-sidebar-group": "./dist/src/nile-inline-sidebar-group/index.js",
|
|
116
116
|
"./nile-inline-sidebar": "./dist/src/nile-inline-sidebar/index.js",
|
|
117
117
|
"./nile-inline-sidebar-item": "./dist/src/nile-inline-sidebar-item/index.js",
|
|
118
|
-
"./nile-lite-tooltip": "./dist/src/nile-lite-tooltip/index.js"
|
|
118
|
+
"./nile-lite-tooltip": "./dist/src/nile-lite-tooltip/index.js",
|
|
119
|
+
"./nile-side-bar-panel": "./dist/src/nile-side-bar-panel/index.js"
|
|
119
120
|
},
|
|
120
121
|
"scripts": {
|
|
121
122
|
"analyze": "cem analyze --litelement",
|
|
@@ -220,4 +221,4 @@
|
|
|
220
221
|
"prettier --write"
|
|
221
222
|
]
|
|
222
223
|
}
|
|
223
|
-
}
|
|
224
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -109,3 +109,5 @@ export { NileInlineSidebarGroup } from './nile-inline-sidebar-group';
|
|
|
109
109
|
export { NileInlineSidebar } from './nile-inline-sidebar';
|
|
110
110
|
export { NileInlineSidebarItem } from './nile-inline-sidebar-item';
|
|
111
111
|
export { NileliteTooltip } from './nile-lite-tooltip';
|
|
112
|
+
|
|
113
|
+
export { NileSideBarPanel } from './nile-side-bar-panel';
|
|
@@ -50,8 +50,8 @@ export const styles = css`
|
|
|
50
50
|
flex-direction: column;
|
|
51
51
|
gap: var(--nile-spacing-xs);
|
|
52
52
|
padding-right: var(--nile-spacing-xl);
|
|
53
|
-
padding-top: var(--nile-spacing-
|
|
54
|
-
padding-bottom: var(--nile-spacing-
|
|
53
|
+
padding-top: var(--nile-spacing-3xl);
|
|
54
|
+
padding-bottom: var(--nile-spacing-3xl);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
nile-side-bar-action-menu {
|
|
@@ -72,6 +72,12 @@ export const styles = css`
|
|
|
72
72
|
margin-left: 0;
|
|
73
73
|
margin-right: 0;
|
|
74
74
|
border-radius: 0;
|
|
75
|
+
color: black;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
nile-side-bar-action-menu-item[active]::part(base):hover {
|
|
79
|
+
background: var(--nile-colors-primary-100);
|
|
80
|
+
color: black;
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
nile-side-bar-action-menu-item::part(label) {
|
|
@@ -146,8 +146,13 @@ export class NileInlineSidebar extends NileElement {
|
|
|
146
146
|
|
|
147
147
|
private get menuItemsTemplate() {
|
|
148
148
|
if (!this.sidebarItems?.length) return null;
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
return this.sidebarItems.map((item, index) => {
|
|
151
|
+
const shouldShowTooltip = (item as any).tooltip;
|
|
152
|
+
const isTruncated =
|
|
153
|
+
item.scrollWidth > item.clientWidth ||
|
|
154
|
+
item.scrollHeight > item.clientHeight;
|
|
155
|
+
|
|
151
156
|
const content = html`
|
|
152
157
|
<nile-side-bar-action-menu-item
|
|
153
158
|
?disabled=${item.hasAttribute('disabled')}
|
|
@@ -157,16 +162,22 @@ export class NileInlineSidebar extends NileElement {
|
|
|
157
162
|
${item.textContent}
|
|
158
163
|
</nile-side-bar-action-menu-item>
|
|
159
164
|
`;
|
|
160
|
-
|
|
161
|
-
return this.showTooltip
|
|
165
|
+
return shouldShowTooltip || isTruncated
|
|
162
166
|
? html`
|
|
163
|
-
<nile-tooltip
|
|
167
|
+
<nile-inline-tooltip
|
|
168
|
+
content=${item.textContent?.trim() || ''}
|
|
169
|
+
hoist
|
|
170
|
+
placement="right"
|
|
171
|
+
>
|
|
164
172
|
${content}
|
|
165
|
-
</nile-tooltip>
|
|
173
|
+
</nile-inline-tooltip>
|
|
166
174
|
`
|
|
167
175
|
: content;
|
|
168
176
|
});
|
|
169
177
|
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
170
181
|
|
|
171
182
|
public render(): TemplateResult {
|
|
172
183
|
return html`
|
|
@@ -37,6 +37,10 @@ export const styles = css`
|
|
|
37
37
|
font-weight: 500;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
:host([active]) .item:hover {
|
|
41
|
+
background: var(--nile-colors-primary-100);
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
|
|
41
45
|
:host([disabled]) {
|
|
42
46
|
color: var(--nile-colors-neutral-500);
|
|
@@ -62,4 +66,6 @@ a {
|
|
|
62
66
|
text-decoration: none;
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
|
|
70
|
+
|
|
65
71
|
`;
|
|
@@ -29,6 +29,7 @@ export class NileInlineSidebarItem extends NileElement {
|
|
|
29
29
|
@property({ type: Boolean, reflect: true }) active = false;
|
|
30
30
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
31
31
|
@property({ type: String }) href?: string;
|
|
32
|
+
@property({ type: Boolean, reflect: true }) tooltip = false;
|
|
32
33
|
|
|
33
34
|
public static get styles(): CSSResultArray {
|
|
34
35
|
return [styles];
|
|
@@ -18,8 +18,9 @@ export const styles = css`
|
|
|
18
18
|
width: var(--sidebar-width);
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
background-color: var(--nile-colors-neutral-100);
|
|
22
|
-
|
|
21
|
+
background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary));
|
|
22
|
+
height: 100%;
|
|
23
|
+
overflow: hidden;
|
|
23
24
|
transition: width 0.25s ease, transform 0.25s ease;
|
|
24
25
|
z-index: 1000;
|
|
25
26
|
}
|
|
@@ -45,15 +46,6 @@ export const styles = css`
|
|
|
45
46
|
transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
::slotted(*) {
|
|
51
|
-
display: block;
|
|
52
|
-
min-width: 0;
|
|
53
|
-
/* padding: var(--nile-spacing-xl) */
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
49
|
:host {
|
|
58
50
|
scrollbar-width: thin;
|
|
59
51
|
scrollbar-color: #64748b transparent;
|
|
@@ -69,29 +61,32 @@ export const styles = css`
|
|
|
69
61
|
background-color: #64748b;
|
|
70
62
|
border-radius: 10px;
|
|
71
63
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
.scroll-container {
|
|
67
|
+
flex: 1;
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
overflow-x: hidden;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
76
72
|
}
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
|
|
75
|
+
::slotted(nile-side-bar-header) {
|
|
76
|
+
flex-shrink: 0;
|
|
81
77
|
}
|
|
78
|
+
|
|
82
79
|
::slotted(nile-side-bar-footer) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
:
|
|
87
|
-
justify-content: center;
|
|
88
|
-
padding: 0;
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
position: sticky;
|
|
82
|
+
bottom: 0;
|
|
83
|
+
margin-top: auto;
|
|
89
84
|
}
|
|
90
85
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
95
90
|
|
|
96
91
|
|
|
97
92
|
|
|
@@ -54,8 +54,15 @@ export class NileSideBar extends NileElement {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
public render(): TemplateResult {
|
|
57
|
-
return html
|
|
57
|
+
return html`
|
|
58
|
+
<slot name="header"></slot>
|
|
59
|
+
<div class="scroll-container">
|
|
60
|
+
<slot></slot>
|
|
61
|
+
</div>
|
|
62
|
+
<slot name="footer"></slot>
|
|
63
|
+
`;
|
|
58
64
|
}
|
|
65
|
+
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
export default NileSideBar;
|
|
@@ -19,8 +19,8 @@ export const styles = css`
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
justify-content: center;
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
22
|
+
width: 38px;
|
|
23
|
+
height: 38px;
|
|
24
24
|
border: none;
|
|
25
25
|
background: transparent;
|
|
26
26
|
color: inherit;
|
|
@@ -29,9 +29,7 @@ export const styles = css`
|
|
|
29
29
|
transition: background-color 0.2s ease;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
34
|
-
}
|
|
32
|
+
|
|
35
33
|
|
|
36
34
|
nile-tooltip::part(body) {
|
|
37
35
|
width: max-content;
|
|
@@ -13,6 +13,8 @@ import NileElement from '../internal/nile-element';
|
|
|
13
13
|
export class NileSideBarExpand extends NileElement {
|
|
14
14
|
@property({ type: Boolean, reflect: true })
|
|
15
15
|
collapsed: boolean = false;
|
|
16
|
+
@property({type: String, reflect:true, attribute:true}) expandTooltipText: string = 'Expand Sidebar';
|
|
17
|
+
@property({type: String, reflect:true, attribute:true}) collapseTooltipText: string = 'Collapse Sidebar';
|
|
16
18
|
|
|
17
19
|
public static get styles(): CSSResultArray {
|
|
18
20
|
return [styles];
|
|
@@ -46,14 +48,14 @@ export class NileSideBarExpand extends NileElement {
|
|
|
46
48
|
<button class="expand-btn" @click=${this.toggleSidebar}>
|
|
47
49
|
${this.collapsed
|
|
48
50
|
? html`
|
|
49
|
-
<nile-tooltip placement="right" hoist content
|
|
51
|
+
<nile-lite-tooltip placement="right" hoist content=${this.expandTooltipText}>
|
|
50
52
|
<span part="icon"><nile-icon name="moveright"></nile-icon></span>
|
|
51
|
-
</nile-tooltip>
|
|
53
|
+
</nile-lite-tooltip>
|
|
52
54
|
`
|
|
53
55
|
: html`
|
|
54
|
-
<nile-tooltip placement="right" hoist content
|
|
56
|
+
<nile-lite-tooltip placement="right" hoist content=${this.collapseTooltipText}>
|
|
55
57
|
<span part="icon"><nile-icon name="moveleft"></nile-icon></span>
|
|
56
|
-
</nile-tooltip>
|
|
58
|
+
</nile-lite-tooltip>
|
|
57
59
|
`}
|
|
58
60
|
</button>
|
|
59
61
|
`;
|
|
@@ -6,13 +6,13 @@ import { css } from 'lit';
|
|
|
6
6
|
export const styles = css`
|
|
7
7
|
:host {
|
|
8
8
|
display: block;
|
|
9
|
-
position: sticky;
|
|
10
9
|
bottom: var(--nile-spacing-md);
|
|
11
10
|
padding-bottom: var(--nile-spacing-xl);
|
|
12
11
|
padding-left: var(--nile-spacing-xl);
|
|
13
12
|
padding-right: var(--nile-spacing-xl);
|
|
13
|
+
padding-top: var(--nile-spacing-xs);
|
|
14
14
|
gap: var(--nile-spacing-md);
|
|
15
|
-
|
|
15
|
+
bottom: 0;
|
|
16
16
|
background: var(--nile-colors-neutral-100);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -10,8 +10,11 @@ export const styles = css`
|
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
justify-content: flex-start;
|
|
13
|
-
padding:
|
|
14
|
-
|
|
13
|
+
padding-top: var(--nile-spacing-md);
|
|
14
|
+
padding-bottom: var(--nile-spacing-md);
|
|
15
|
+
padding-left: var(--nile-spacing-lg);
|
|
16
|
+
padding-right: var(--nile-spacing-lg);
|
|
17
|
+
font-size: var(--nile-type-scale-3);
|
|
15
18
|
color: var(--nile-side-bar-footer-color, #374151);
|
|
16
19
|
cursor: pointer;
|
|
17
20
|
border-radius: var(--nile-side-bar-footer-radius, 0.375rem);
|
|
@@ -53,8 +56,11 @@ export const styles = css`
|
|
|
53
56
|
|
|
54
57
|
:host([type='support']) .footer-item {
|
|
55
58
|
background: var(--nile-colors-neutral-400);
|
|
56
|
-
|
|
59
|
+
height: 38px;
|
|
57
60
|
}
|
|
61
|
+
:host([type='support'][active]) .footer-item {
|
|
62
|
+
background: var(--nile-colors-neutral-500);
|
|
63
|
+
}
|
|
58
64
|
|
|
59
65
|
:host([collapsed][type='avatar']) .footer-item {
|
|
60
66
|
padding: 3px;
|
|
@@ -70,7 +76,6 @@ export const styles = css`
|
|
|
70
76
|
height: 38px;
|
|
71
77
|
width: 38px;
|
|
72
78
|
}
|
|
73
|
-
|
|
74
79
|
`;
|
|
75
80
|
|
|
76
81
|
export default [styles];
|
|
@@ -25,9 +25,17 @@ export class NileSideBarFooterItem extends NileElement {
|
|
|
25
25
|
return [styles];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
private handleClick(): void {
|
|
29
|
+
this.dispatchEvent(new CustomEvent('nile-click', {
|
|
30
|
+
detail: { type: this.type },
|
|
31
|
+
bubbles: true,
|
|
32
|
+
composed: true
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
public render(): TemplateResult {
|
|
29
37
|
return html`
|
|
30
|
-
<div part="base" class="footer-item">
|
|
38
|
+
<div part="base" class="footer-item" @click=${this.handleClick}>
|
|
31
39
|
<slot name="icon" part="icon"></slot>
|
|
32
40
|
<slot name="text" part="text"></slot>
|
|
33
41
|
<slot name="action" part="action"></slot>
|
|
@@ -8,9 +8,8 @@ export const styles = css`
|
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
padding-bottom: var(--nile-spacing-xs);
|
|
11
|
-
padding-left: var(--nile-spacing-
|
|
12
|
-
padding-right: var(--nile-spacing-
|
|
13
|
-
gap: var(--nile-spacing-lg);
|
|
11
|
+
padding-left: var(--nile-spacing-xl);
|
|
12
|
+
padding-right: var(--nile-spacing-xl);
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
|
|
@@ -30,10 +29,8 @@ export const styles = css`
|
|
|
30
29
|
display: block;
|
|
31
30
|
height: 1px;
|
|
32
31
|
background: var(--nile-colors-neutral-400);
|
|
33
|
-
margin-top: var(--nile-spacing-xs);
|
|
34
32
|
margin-left: var(--nile-spacing-md);
|
|
35
33
|
margin-right: var(--nile-spacing-md);
|
|
36
|
-
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
.side-bar-group {
|
|
@@ -11,60 +11,62 @@ import {css} from 'lit';
|
|
|
11
11
|
* SideBarGroupItem CSS
|
|
12
12
|
*/
|
|
13
13
|
export const styles = css`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
.group-item {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
.group-item {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
height: 38px;
|
|
22
|
+
width: 208px;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
|
-
.item-link {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
padding
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
.item-link {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 100%;
|
|
32
|
+
padding: var(--nile-spacing-lg) var(--nile-spacing-md);
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
color: var(--nile-colors-dark-900);
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
font-size: var(--nile-type-scale-3);
|
|
37
|
+
line-height: 1.4;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
}
|
|
36
40
|
|
|
37
|
-
.item-link:hover {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
+
.item-link:hover {
|
|
42
|
+
background: var(--nile-colors-neutral-400);
|
|
43
|
+
border-radius: var(--nile-radius-sm);
|
|
44
|
+
}
|
|
41
45
|
|
|
46
|
+
::slotted(nile-side-bar-group-item-icon) {
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
}
|
|
42
49
|
|
|
50
|
+
::slotted(nile-side-bar-group-item-text) {
|
|
51
|
+
flex-grow: 1;
|
|
52
|
+
}
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
flex-grow: 1;
|
|
50
|
-
}
|
|
51
|
-
:host([active]) [part="link"] {
|
|
52
|
-
background: var(--nile-colors-primary-100);
|
|
53
|
-
border-radius: var(--nile-radius-sm);
|
|
54
|
-
font-weight: var(--nile-font-weight-semibold);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host([collapsed]) .group-item {
|
|
58
|
-
height: 38px;
|
|
59
|
-
width: 38px;
|
|
60
|
-
}
|
|
61
|
-
:host([disabled]) .item-link {
|
|
62
|
-
opacity: 0.5;
|
|
63
|
-
pointer-events: none;
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
}
|
|
54
|
+
:host([active]) [part="link"] {
|
|
55
|
+
background: var(--nile-colors-primary-100);
|
|
56
|
+
border-radius: var(--nile-radius-sm);
|
|
57
|
+
font-weight: var(--nile-font-weight-semibold);
|
|
58
|
+
}
|
|
66
59
|
|
|
60
|
+
:host([collapsed]) .group-item {
|
|
61
|
+
height: 38px;
|
|
62
|
+
width: 38px;
|
|
63
|
+
}
|
|
67
64
|
|
|
65
|
+
:host([disabled]) .item-link {
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
68
70
|
`;
|
|
69
71
|
|
|
70
|
-
export default [styles];
|
|
72
|
+
export default [styles];
|
|
@@ -19,10 +19,8 @@ export const styles = css`
|
|
|
19
19
|
padding-bottom: var(--nile-spacing-lg);
|
|
20
20
|
padding-left: var(--nile-spacing-xl);
|
|
21
21
|
padding-right: var(--nile-spacing-xl);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
z-index: 10;
|
|
25
|
-
background: var(--nile-colors-neutral-100);
|
|
22
|
+
top: 0;
|
|
23
|
+
background: var(--nile-colors-neutral-100);
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
.header-content {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileSideBarPanel } from './nile-side-bar-panel';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {css} from 'lit';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* SideBarPanel CSS
|
|
12
|
+
*/
|
|
13
|
+
export const styles = css`
|
|
14
|
+
:host {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export default [styles];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {LitElement, html, CSSResultArray, TemplateResult} from 'lit';
|
|
9
|
+
import { customElement, property} from 'lit/decorators.js';
|
|
10
|
+
import {styles} from './nile-side-bar-panel.css';
|
|
11
|
+
import NileElement from '../internal/nile-element';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Nile side-bar-panel component.
|
|
16
|
+
*
|
|
17
|
+
* @tag nile-side-bar-panel
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
@customElement('nile-side-bar-panel')
|
|
21
|
+
export class NileSideBarPanel extends NileElement {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The styles for nile-side-bar-panel
|
|
25
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
26
|
+
*/
|
|
27
|
+
public static get styles(): CSSResultArray {
|
|
28
|
+
return [styles];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* #endregion */
|
|
32
|
+
|
|
33
|
+
/* #region Methods */
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Render method
|
|
37
|
+
* @slot This is a slot test
|
|
38
|
+
*/
|
|
39
|
+
public render(): TemplateResult {
|
|
40
|
+
return html`
|
|
41
|
+
<slot> </slot>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* #endregion */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default NileSideBarPanel;
|
|
49
|
+
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
'nile-side-bar-panel': NileSideBarPanel;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -53,6 +53,7 @@ export class NileSlideToggle extends NileElement {
|
|
|
53
53
|
'nile-slide--disabled': this.disabled,
|
|
54
54
|
'nile-slide-toggle--reverse':this.textPosition=='left'
|
|
55
55
|
})}
|
|
56
|
+
part="base"
|
|
56
57
|
>
|
|
57
58
|
<label
|
|
58
59
|
class="${classMap({
|
|
@@ -60,17 +61,17 @@ export class NileSlideToggle extends NileElement {
|
|
|
60
61
|
'nile-slide-toggle__switch--left':this.textPosition=='right',
|
|
61
62
|
'nile-slide-toggle__switch--right':this.textPosition=='left',
|
|
62
63
|
})}"
|
|
63
|
-
class="nile-slide-toggle__switch">
|
|
64
|
+
class="nile-slide-toggle__switch" part="slide-toggle-switch">
|
|
64
65
|
<input
|
|
65
66
|
type="checkbox"
|
|
66
67
|
.checked=${this.isChecked}
|
|
67
68
|
@change=${this.toggleValue}
|
|
68
69
|
/>
|
|
69
|
-
<span class="nile-slide-toggle__slider"></span>
|
|
70
|
+
<span class="nile-slide-toggle__slider" part="slide-toggle-slider"></span>
|
|
70
71
|
</label>
|
|
71
|
-
<span class="nile-slide-toggle__label">
|
|
72
|
-
<span>${this.label}</span>
|
|
73
|
-
<span class="nile-slide-toggle__sublabel">${this.sublabel}</span>
|
|
72
|
+
<span class="nile-slide-toggle__label" part="slide-toggle-label-container">
|
|
73
|
+
<span part="slide-toggle-label">${this.label}</span>
|
|
74
|
+
<span class="nile-slide-toggle__sublabel" part="slide-toggle-sublabel">${this.sublabel}</span>
|
|
74
75
|
</span>
|
|
75
76
|
</div>
|
|
76
77
|
${hasHelpText
|