@aquera/nile-elements 1.6.7 → 1.6.9
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/README.md +12 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1735 -495
- package/dist/internal/enum.cjs.js +1 -1
- package/dist/internal/enum.cjs.js.map +1 -1
- package/dist/internal/enum.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +0 -3
- package/dist/nile-calendar/nile-calendar.esm.js +2 -2
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
- package/dist/nile-inline-sidebar/index.cjs.js +1 -1
- package/dist/nile-inline-sidebar/index.esm.js +1 -1
- 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 +76 -19
- package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +42 -23
- package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.css.esm.js +8 -9
- package/dist/nile-inline-sidebar-item/index.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/index.esm.js +1 -1
- 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 +16 -18
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +22 -4
- package/dist/nile-inline-sidebar-item-body/index.cjs.js +2 -0
- package/dist/nile-inline-sidebar-item-body/index.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-item-body/index.esm.js +1 -0
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.cjs.js +2 -0
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js +2 -0
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.esm.js +53 -0
- package/dist/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.esm.js +13 -0
- package/dist/nile-inline-sidebar-item-header/index.cjs.js +2 -0
- package/dist/nile-inline-sidebar-item-header/index.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-item-header/index.esm.js +1 -0
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.cjs.js +2 -0
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js +2 -0
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.esm.js +27 -0
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.esm.js +16 -0
- package/dist/nile-inline-sidebar-panel/index.cjs.js +2 -0
- package/dist/nile-inline-sidebar-panel/index.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-panel/index.esm.js +1 -0
- package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.cjs.js +2 -0
- package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.cjs.js +2 -0
- package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.esm.js +19 -0
- package/dist/nile-inline-sidebar-panel/nile-inline-sidebar-panel.esm.js +5 -0
- package/dist/nile-inline-sidebar-panel-group/index.cjs.js +2 -0
- package/dist/nile-inline-sidebar-panel-group/index.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-panel-group/index.esm.js +1 -0
- package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.cjs.js +2 -0
- package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.cjs.js +2 -0
- package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.cjs.js.map +1 -0
- package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.esm.js +30 -0
- package/dist/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.esm.js +12 -0
- package/dist/nile-nav-tab/index.cjs.js +2 -0
- package/dist/nile-nav-tab/index.cjs.js.map +1 -0
- package/dist/nile-nav-tab/index.esm.js +1 -0
- package/dist/nile-nav-tab/nile-nav-tab.cjs.js +2 -0
- package/dist/nile-nav-tab/nile-nav-tab.cjs.js.map +1 -0
- package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js +2 -0
- package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js.map +1 -0
- package/dist/nile-nav-tab/nile-nav-tab.css.esm.js +190 -0
- package/dist/nile-nav-tab/nile-nav-tab.esm.js +36 -0
- package/dist/nile-nav-tab-group/index.cjs.js +2 -0
- package/dist/nile-nav-tab-group/index.cjs.js.map +1 -0
- package/dist/nile-nav-tab-group/index.esm.js +1 -0
- package/dist/nile-nav-tab-group/nile-nav-tab-group.cjs.js +4 -0
- package/dist/nile-nav-tab-group/nile-nav-tab-group.cjs.js.map +1 -0
- package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js +2 -0
- package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js.map +1 -0
- package/dist/nile-nav-tab-group/nile-nav-tab-group.css.esm.js +668 -0
- package/dist/nile-nav-tab-group/nile-nav-tab-group.esm.js +61 -0
- package/dist/nile-nav-tab-panel/index.cjs.js +2 -0
- package/dist/nile-nav-tab-panel/index.cjs.js.map +1 -0
- package/dist/nile-nav-tab-panel/index.esm.js +1 -0
- package/dist/nile-nav-tab-panel/nile-nav-tab-panel.cjs.js +2 -0
- package/dist/nile-nav-tab-panel/nile-nav-tab-panel.cjs.js.map +1 -0
- package/dist/nile-nav-tab-panel/nile-nav-tab-panel.css.cjs.js +2 -0
- package/dist/nile-nav-tab-panel/nile-nav-tab-panel.css.cjs.js.map +1 -0
- package/dist/nile-nav-tab-panel/nile-nav-tab-panel.css.esm.js +22 -0
- package/dist/nile-nav-tab-panel/nile-nav-tab-panel.esm.js +8 -0
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.esm.js +13 -13
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +1 -1
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/enum.d.ts +6 -0
- package/dist/src/internal/enum.js +7 -0
- package/dist/src/internal/enum.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +0 -3
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.js +2 -2
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-dropdown/nile-dropdown.d.ts +2 -0
- package/dist/src/nile-dropdown/nile-dropdown.js +21 -5
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.d.ts +1 -0
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +75 -17
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.d.ts +17 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +147 -18
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.js +7 -7
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.d.ts +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +15 -17
- 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 +7 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +63 -4
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item-body/index.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-item-body/index.js +2 -0
- package/dist/src/nile-inline-sidebar-item-body/index.js.map +1 -0
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.d.ts +9 -0
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js +62 -0
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.js.map +1 -0
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.d.ts +45 -0
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.js +110 -0
- package/dist/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.js.map +1 -0
- package/dist/src/nile-inline-sidebar-item-header/index.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-item-header/index.js +2 -0
- package/dist/src/nile-inline-sidebar-item-header/index.js.map +1 -0
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.d.ts +9 -0
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js +36 -0
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js.map +1 -0
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.d.ts +34 -0
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.js +68 -0
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.js.map +1 -0
- package/dist/src/nile-inline-sidebar-panel/index.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-panel/index.js +2 -0
- package/dist/src/nile-inline-sidebar-panel/index.js.map +1 -0
- package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.d.ts +9 -0
- package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.js +28 -0
- package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.js.map +1 -0
- package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.d.ts +35 -0
- package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.js +55 -0
- package/dist/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.js.map +1 -0
- package/dist/src/nile-inline-sidebar-panel-group/index.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-panel-group/index.js +2 -0
- package/dist/src/nile-inline-sidebar-panel-group/index.js.map +1 -0
- package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.d.ts +9 -0
- package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.js +39 -0
- package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.js.map +1 -0
- package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.d.ts +43 -0
- package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.js +93 -0
- package/dist/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.js.map +1 -0
- package/dist/src/nile-nav-tab/index.d.ts +1 -0
- package/dist/src/nile-nav-tab/index.js +2 -0
- package/dist/src/nile-nav-tab/index.js.map +1 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.css.d.ts +9 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.css.js +199 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.css.js.map +1 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.d.ts +50 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.js +190 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.js.map +1 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.test.d.ts +1 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.test.js +656 -0
- package/dist/src/nile-nav-tab/nile-nav-tab.test.js.map +1 -0
- package/dist/src/nile-nav-tab-group/index.d.ts +1 -0
- package/dist/src/nile-nav-tab-group/index.js +2 -0
- package/dist/src/nile-nav-tab-group/index.js.map +1 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.d.ts +12 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js +680 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js.map +1 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.d.ts +119 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.js +765 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.js.map +1 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.d.ts +3 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js +838 -0
- package/dist/src/nile-nav-tab-group/nile-nav-tab-group.test.js.map +1 -0
- package/dist/src/nile-nav-tab-panel/index.d.ts +1 -0
- package/dist/src/nile-nav-tab-panel/index.js +2 -0
- package/dist/src/nile-nav-tab-panel/index.js.map +1 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.css.d.ts +15 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.css.js +37 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.css.js.map +1 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.d.ts +37 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.js +75 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.js.map +1 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.test.d.ts +1 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.test.js +534 -0
- package/dist/src/nile-nav-tab-panel/nile-nav-tab-panel.test.js.map +1 -0
- package/dist/src/nile-stepper-item/nile-stepper-item.js +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.js.map +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.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 +7 -2
- package/src/index.ts +7 -0
- package/src/internal/enum.ts +8 -1
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +0 -3
- package/src/nile-calendar/nile-calendar.ts +2 -2
- package/src/nile-dropdown/nile-dropdown.ts +23 -5
- package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +75 -17
- package/src/nile-inline-sidebar/nile-inline-sidebar.ts +148 -18
- package/src/nile-inline-sidebar-group/nile-inline-sidebar-group.css.ts +7 -7
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +15 -17
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +74 -9
- package/src/nile-inline-sidebar-item-body/index.ts +1 -0
- package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.ts +64 -0
- package/src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.ts +110 -0
- package/src/nile-inline-sidebar-item-header/index.ts +1 -0
- package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts +38 -0
- package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.ts +69 -0
- package/src/nile-inline-sidebar-panel/index.ts +1 -0
- package/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.css.ts +30 -0
- package/src/nile-inline-sidebar-panel/nile-inline-sidebar-panel.ts +53 -0
- package/src/nile-inline-sidebar-panel-group/index.ts +1 -0
- package/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.css.ts +41 -0
- package/src/nile-inline-sidebar-panel-group/nile-inline-sidebar-panel-group.ts +101 -0
- package/src/nile-nav-tab/index.ts +1 -0
- package/src/nile-nav-tab/nile-nav-tab.css.ts +201 -0
- package/src/nile-nav-tab/nile-nav-tab.test.ts +768 -0
- package/src/nile-nav-tab/nile-nav-tab.ts +198 -0
- package/src/nile-nav-tab-group/index.ts +1 -0
- package/src/nile-nav-tab-group/nile-nav-tab-group.css.ts +682 -0
- package/src/nile-nav-tab-group/nile-nav-tab-group.test.ts +1009 -0
- package/src/nile-nav-tab-group/nile-nav-tab-group.ts +845 -0
- package/src/nile-nav-tab-panel/index.ts +1 -0
- package/src/nile-nav-tab-panel/nile-nav-tab-panel.css.ts +39 -0
- package/src/nile-nav-tab-panel/nile-nav-tab-panel.test.ts +797 -0
- package/src/nile-nav-tab-panel/nile-nav-tab-panel.ts +78 -0
- package/src/nile-stepper-item/nile-stepper-item.ts +1 -1
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +1 -1
- package/vscode-html-custom-data.json +273 -3
|
@@ -6,42 +6,43 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
/**
|
|
9
|
-
* InlinesidebarItem CSS
|
|
9
|
+
* InlinesidebarItem CSS — Enterprise (`--nile-*`) primary, NxtGen (`--ng-*`) fallback.
|
|
10
10
|
*/
|
|
11
11
|
export const styles = css `
|
|
12
12
|
:host {
|
|
13
13
|
display: block;
|
|
14
|
-
font-family: var(--nile-font-family-sans-serif);
|
|
15
|
-
font-size: var(--nile-type-scale-3);
|
|
16
|
-
color: var(--nile-colors-dark-900);
|
|
14
|
+
font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
|
|
15
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
16
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
user-select: none;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.item {
|
|
22
|
-
padding: var(--nile-spacing-lg) var(--nile-spacing-md);
|
|
23
|
-
border-radius: var(--nile-radius-sm);
|
|
22
|
+
padding: var(--nile-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-md, var(--ng-spacing-md));
|
|
23
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-xs));
|
|
24
24
|
transition: background 0.2s, color 0.2s;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
:host(:not([disabled])) .item:hover {
|
|
29
|
-
background: var(--nile-colors-neutral-400);
|
|
28
|
+
background: var(--nile-colors-neutral-400, var(--ng-colors-bg-tertiary));
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
|
|
33
31
|
:host([active]) .item {
|
|
34
|
-
background: var(--nile-colors-primary-100);
|
|
35
|
-
font-weight:
|
|
32
|
+
background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));
|
|
33
|
+
font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
|
|
34
|
+
color: var(--nile-colors-primary-700, var(--ng-colors-text-brand-secondary-700));
|
|
35
|
+
}
|
|
36
|
+
:host([active]) .item--rich {
|
|
37
|
+
border-right: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
:host([active]) .item:hover {
|
|
39
|
-
background: var(--nile-colors-primary-100);
|
|
41
|
+
background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
|
|
43
44
|
:host([disabled]) {
|
|
44
|
-
color:
|
|
45
|
+
color: var(--nile-colors-neutral-500, var(--ng-colors-text-disabled));
|
|
45
46
|
cursor: not-allowed;
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -63,8 +64,5 @@ a {
|
|
|
63
64
|
color: inherit;
|
|
64
65
|
text-decoration: none;
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
67
|
`;
|
|
70
68
|
//# sourceMappingURL=nile-inline-sidebar-item.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-inline-sidebar-item.css.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"nile-inline-sidebar-item.css.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDxB,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2025\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport { css } from 'lit';\n\n/**\n * InlinesidebarItem CSS — Enterprise (`--nile-*`) primary, NxtGen (`--ng-*`) fallback.\n */\nexport const styles = css`\n:host {\n display: block;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n cursor: pointer;\n user-select: none;\n}\n\n.item {\n padding: var(--nile-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-md, var(--ng-spacing-md));\n border-radius: var(--nile-radius-sm, var(--ng-radius-xs));\n transition: background 0.2s, color 0.2s;\n}\n\n:host(:not([disabled])) .item:hover {\n background: var(--nile-colors-neutral-400, var(--ng-colors-bg-tertiary));\n}\n\n:host([active]) .item {\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n color: var(--nile-colors-primary-700, var(--ng-colors-text-brand-secondary-700));\n}\n:host([active]) .item--rich {\n border-right: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n}\n\n:host([active]) .item:hover {\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n}\n\n:host([disabled]) {\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-disabled));\n cursor: not-allowed;\n}\n\n:host([disabled]) .item {\n pointer-events: none;\n}\na {\n color: inherit;\n text-decoration: none;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n a:visited,\n a:hover,\n a:active,\n a:focus {\n color: inherit;\n text-decoration: none;\n }\n`;\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import { CSSResultArray, TemplateResult } from 'lit';
|
|
7
|
+
import { CSSResultArray, TemplateResult, PropertyValues } from 'lit';
|
|
8
8
|
import NileElement from '../internal/nile-element';
|
|
9
9
|
/**
|
|
10
10
|
* Nile inline sidebar item.
|
|
@@ -25,7 +25,13 @@ export declare class NileInlineSidebarItem extends NileElement {
|
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
href?: string;
|
|
27
27
|
tooltip: boolean;
|
|
28
|
+
variant?: 'minimal' | 'rich';
|
|
29
|
+
/** Links this item to a `nile-inline-sidebar-panel` by matching its `name` property. */
|
|
30
|
+
panel?: string;
|
|
28
31
|
static get styles(): CSSResultArray;
|
|
32
|
+
firstUpdated(changedProperties: PropertyValues): void;
|
|
33
|
+
updated(changedProperties: PropertyValues): void;
|
|
34
|
+
private syncBodyAndHeaderStates;
|
|
29
35
|
connectedCallback(): void;
|
|
30
36
|
disconnectedCallback(): void;
|
|
31
37
|
private _handleHostKeyDown;
|
|
@@ -9,6 +9,7 @@ import { html } from 'lit';
|
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
|
10
10
|
import { styles } from './nile-inline-sidebar-item.css';
|
|
11
11
|
import NileElement from '../internal/nile-element';
|
|
12
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
12
13
|
/**
|
|
13
14
|
* Nile inline sidebar item.
|
|
14
15
|
*
|
|
@@ -29,6 +30,7 @@ let NileInlineSidebarItem = class NileInlineSidebarItem extends NileElement {
|
|
|
29
30
|
this.active = false;
|
|
30
31
|
this.disabled = false;
|
|
31
32
|
this.tooltip = false;
|
|
33
|
+
this.variant = 'minimal';
|
|
32
34
|
this._handleHostKeyDown = (e) => {
|
|
33
35
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
34
36
|
e.preventDefault();
|
|
@@ -39,6 +41,35 @@ let NileInlineSidebarItem = class NileInlineSidebarItem extends NileElement {
|
|
|
39
41
|
static get styles() {
|
|
40
42
|
return [styles];
|
|
41
43
|
}
|
|
44
|
+
firstUpdated(changedProperties) {
|
|
45
|
+
super.firstUpdated(changedProperties);
|
|
46
|
+
this.syncBodyAndHeaderStates();
|
|
47
|
+
}
|
|
48
|
+
updated(changedProperties) {
|
|
49
|
+
super.updated(changedProperties);
|
|
50
|
+
if (changedProperties.has('disabled') || changedProperties.has('active')) {
|
|
51
|
+
this.syncBodyAndHeaderStates();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
syncBodyAndHeaderStates() {
|
|
55
|
+
const elements = [
|
|
56
|
+
this.querySelector('[slot="body"]'),
|
|
57
|
+
this.querySelector('[slot="header"]')
|
|
58
|
+
];
|
|
59
|
+
const props = {
|
|
60
|
+
disabled: this.disabled,
|
|
61
|
+
active: this.active
|
|
62
|
+
};
|
|
63
|
+
elements.forEach(el => {
|
|
64
|
+
if (!el)
|
|
65
|
+
return;
|
|
66
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
67
|
+
if (key in el) {
|
|
68
|
+
el[key] = value;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
42
73
|
connectedCallback() {
|
|
43
74
|
super.connectedCallback();
|
|
44
75
|
if (!this.hasAttribute('tabindex')) {
|
|
@@ -80,14 +111,36 @@ let NileInlineSidebarItem = class NileInlineSidebarItem extends NileElement {
|
|
|
80
111
|
render() {
|
|
81
112
|
return html `
|
|
82
113
|
<div
|
|
83
|
-
class
|
|
114
|
+
class=${classMap({ 'item': true, 'item--rich': this.variant === 'rich' })}
|
|
84
115
|
@click=${this.handleClick}
|
|
85
116
|
role="menuitem"
|
|
117
|
+
style=${this.variant === 'rich' ? 'border-radius: 0px;' : ''}
|
|
86
118
|
aria-disabled=${this.disabled}
|
|
87
119
|
>
|
|
88
|
-
${this.
|
|
89
|
-
?
|
|
90
|
-
|
|
120
|
+
${this.variant === 'minimal'
|
|
121
|
+
? this.href
|
|
122
|
+
? html `<a href=${this.href} @click=${(e) => e.preventDefault()}><slot></slot></a>`
|
|
123
|
+
: html `<slot></slot>`
|
|
124
|
+
: this.href
|
|
125
|
+
? html `<a
|
|
126
|
+
href=${this.href}
|
|
127
|
+
@click=${(e) => e.preventDefault()}
|
|
128
|
+
>
|
|
129
|
+
<div class="header-content" part="header-content">
|
|
130
|
+
<slot name="header"></slot>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="body-content" part="body-content">
|
|
133
|
+
<slot name="body"></slot>
|
|
134
|
+
</div>
|
|
135
|
+
</a>`
|
|
136
|
+
: html `
|
|
137
|
+
<div class="header-content" part="header-content">
|
|
138
|
+
<slot name="header"></slot>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="body-content" part="body-content">
|
|
141
|
+
<slot name="body"></slot>
|
|
142
|
+
</div>
|
|
143
|
+
`}
|
|
91
144
|
</div>
|
|
92
145
|
`;
|
|
93
146
|
}
|
|
@@ -104,6 +157,12 @@ __decorate([
|
|
|
104
157
|
__decorate([
|
|
105
158
|
property({ type: Boolean, reflect: true })
|
|
106
159
|
], NileInlineSidebarItem.prototype, "tooltip", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
property({ type: String, reflect: true, attribute: true })
|
|
162
|
+
], NileInlineSidebarItem.prototype, "variant", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
property({ type: String, reflect: true })
|
|
165
|
+
], NileInlineSidebarItem.prototype, "panel", void 0);
|
|
107
166
|
NileInlineSidebarItem = __decorate([
|
|
108
167
|
customElement('nile-inline-sidebar-item')
|
|
109
168
|
], NileInlineSidebarItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-inline-sidebar-item.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"nile-inline-sidebar-item.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkD,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,WAAW;IAA/C;;QACuC,WAAM,GAAG,KAAK,CAAC;QACf,aAAQ,GAAG,KAAK,CAAC;QAEjB,YAAO,GAAG,KAAK,CAAC;QACA,YAAO,GAAwB,SAAS,CAAC;QA4D7F,uBAAkB,GAAG,CAAC,CAAgB,EAAE,EAAE;YAChD,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;gBACvC,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,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,MAAM,EAAE,CAAC;mDAAe;AACE;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAAiB;AACA;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;sDAA0C;AAG1D;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAAgB;AAR/C,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CA+IjC;;AAED,eAAe,qBAAqB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-inline-sidebar-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n/**\n * Nile inline sidebar item.\n *\n * @tag nile-inlinesidebar-item\n *\n * @attr active - Marks the item as active (selected).\n * @attr disabled - Marks the item as disabled (non-interactive).\n * @attr href - Optional URL to navigate to when the item is clicked.\n *\n * @slot - Default slot for the item text or content.\n *\n * @fires nile-select - Emitted when the item is clicked (not disabled).\n * detail: { item: this, href?: string }\n */\n@customElement('nile-inline-sidebar-item')\nexport class NileInlineSidebarItem extends NileElement {\n @property({ type: Boolean, reflect: true }) active = false;\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property({ type: String }) href?: string;\n @property({ type: Boolean, reflect: true }) tooltip = false;\n @property({ type: String, reflect: true, attribute: true }) variant?: 'minimal' | 'rich' = 'minimal';\n\n /** Links this item to a `nile-inline-sidebar-panel` by matching its `name` property. */\n @property({ type: String, reflect: true }) panel?: string;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n\n firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n this.syncBodyAndHeaderStates();\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (changedProperties.has('disabled') || changedProperties.has('active')) {\n this.syncBodyAndHeaderStates();\n }\n }\n\n private syncBodyAndHeaderStates() {\n const elements = [\n this.querySelector('[slot=\"body\"]'),\n this.querySelector('[slot=\"header\"]')\n ] as (HTMLElement | null)[];\n\n const props = {\n disabled: this.disabled,\n active: this.active\n };\n\n elements.forEach(el => {\n if (!el) return;\n\n Object.entries(props).forEach(([key, value]) => {\n if (key in el) {\n (el as any)[key] = value;\n }\n });\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', this.disabled ? '-1' : '0');\n }\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'menuitem');\n }\n this.addEventListener('keydown', this._handleHostKeyDown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._handleHostKeyDown);\n }\n\n private _handleHostKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._select(e);\n }\n };\n\n private _select(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n const parent = this.closest('nile-inline-sidebar');\n if (parent) {\n const allItems = parent.querySelectorAll('nile-inline-sidebar-item');\n allItems.forEach((item) => (item as NileInlineSidebarItem).active = item === this);\n }\n\n const text = this.textContent?.trim() || '';\n\n this.dispatchEvent(\n new CustomEvent('nile-click', {\n detail: { item: this, href: this.href, text },\n bubbles: true,\n composed: true,\n }),\n );\n\n if (this.href) {\n window.location.href = this.href;\n }\n }\n\n private handleClick(e: Event) {\n this._select(e);\n }\n\n public render(): TemplateResult {\n return html`\n <div\n class=${classMap({ 'item': true, 'item--rich': this.variant === 'rich' })}\n @click=${this.handleClick}\n role=\"menuitem\"\n style=${this.variant === 'rich' ? 'border-radius: 0px;' : ''}\n aria-disabled=${this.disabled}\n >\n ${this.variant === 'minimal'\n ? this.href\n ? html`<a href=${this.href} @click=${(e: Event) => e.preventDefault()}><slot></slot></a>`\n : html`<slot></slot>`\n : this.href\n ? html`<a\n href=${this.href}\n @click=${(e: Event) => e.preventDefault()}\n >\n <div class=\"header-content\" part=\"header-content\">\n <slot name=\"header\"></slot>\n </div>\n <div class=\"body-content\" part=\"body-content\">\n <slot name=\"body\"></slot>\n </div>\n </a>`\n : html`\n <div class=\"header-content\" part=\"header-content\">\n <slot name=\"header\"></slot>\n </div>\n <div class=\"body-content\" part=\"body-content\">\n <slot name=\"body\"></slot>\n </div>\n `}\n </div>\n `;\n }\n\n\n \n}\n\nexport default NileInlineSidebarItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-inline-sidebar-item': NileInlineSidebarItem;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item-body/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
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
|
+
export declare const styles: import("lit").CSSResult;
|
|
8
|
+
declare const _default: import("lit").CSSResult[];
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
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
|
+
import { css } from 'lit';
|
|
8
|
+
export const styles = css `
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
|
|
13
|
+
}
|
|
14
|
+
.item-body {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: flex-start;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
padding-top: var(--nile-spacing-xxsmall, var(--ng-spacing-xxs));
|
|
19
|
+
}
|
|
20
|
+
.body-content {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
flex: 1 1 0%;
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
color: var(--nile-colors-dark-500, var(--ng-componentcolors-alpha-black-50));
|
|
26
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
27
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
28
|
+
line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-xs));
|
|
29
|
+
}
|
|
30
|
+
.body-content nile-lite-tooltip {
|
|
31
|
+
display: block;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
}
|
|
35
|
+
.body-text {
|
|
36
|
+
display: -webkit-box;
|
|
37
|
+
-webkit-box-orient: vertical;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
word-break: break-word;
|
|
41
|
+
overflow-wrap: anywhere;
|
|
42
|
+
-webkit-line-clamp: var(--line-clamp);
|
|
43
|
+
line-clamp: var(--line-clamp);
|
|
44
|
+
}
|
|
45
|
+
/* Slotted block/paragraph nodes need the same clamp (slot composition) */
|
|
46
|
+
.body-text ::slotted(*) {
|
|
47
|
+
display: -webkit-box;
|
|
48
|
+
-webkit-box-orient: vertical;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
word-break: break-word;
|
|
52
|
+
overflow-wrap: anywhere;
|
|
53
|
+
-webkit-line-clamp: var(--line-clamp);
|
|
54
|
+
line-clamp: var(--line-clamp);
|
|
55
|
+
margin-block: 0;
|
|
56
|
+
}
|
|
57
|
+
:host([disabled]) .body-content {
|
|
58
|
+
color: var(--nile-colors-neutral-300, var(--ng-colors-text-disabled));
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
export default [styles];
|
|
62
|
+
//# sourceMappingURL=nile-inline-sidebar-item-body.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-inline-sidebar-item-body.css.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2026\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\tdisplay: block;\n\t\tmin-width: 0;\n\t\tfont-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n\t}\n\t.item-body {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tmin-width: 0;\n\t\tpadding-top: var(--nile-spacing-xxsmall, var(--ng-spacing-xxs));\n\t}\n\t.body-content {\n\t\tbox-sizing: border-box;\n\t\tmin-width: 0;\n\t\tflex: 1 1 0%;\n\t\tmax-width: 100%;\n\t\tcolor: var(--nile-colors-dark-500, var(--ng-componentcolors-alpha-black-50));\n\t\tfont-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n\t\tfont-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n\t\tline-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-xs));\n\t}\n\t.body-content nile-lite-tooltip {\n\t\tdisplay: block;\n\t\tmin-width: 0;\n\t\tmax-width: 100%;\n\t}\n\t.body-text {\n\t\tdisplay: -webkit-box;\n\t\t-webkit-box-orient: vertical;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tword-break: break-word;\n\t\toverflow-wrap: anywhere;\n\t\t-webkit-line-clamp: var(--line-clamp);\n\t\tline-clamp: var(--line-clamp);\n\t}\n\t/* Slotted block/paragraph nodes need the same clamp (slot composition) */\n\t.body-text ::slotted(*) {\n\t\tdisplay: -webkit-box;\n\t\t-webkit-box-orient: vertical;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tword-break: break-word;\n\t\toverflow-wrap: anywhere;\n\t\t-webkit-line-clamp: var(--line-clamp);\n\t\tline-clamp: var(--line-clamp);\n\t\tmargin-block: 0;\n\t}\n\t:host([disabled]) .body-content {\n\t\tcolor: var(--nile-colors-neutral-300, var(--ng-colors-text-disabled));\n\t}\n`;\n\nexport default [styles];\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { CSSResultArray, TemplateResult } from 'lit';
|
|
8
|
+
import NileElement from '../internal/nile-element';
|
|
9
|
+
/**
|
|
10
|
+
* Nile inline-sidebar-item-body component.
|
|
11
|
+
*
|
|
12
|
+
* @tag nile-inline-sidebar-item-body
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class NileInlineSidebarItemBody extends NileElement {
|
|
16
|
+
/** Maximum number of visible lines before text is truncated with an ellipsis. */
|
|
17
|
+
lines: number;
|
|
18
|
+
content: string;
|
|
19
|
+
showTooltip: boolean;
|
|
20
|
+
private isTruncated;
|
|
21
|
+
private bodyContentEl;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
active: boolean;
|
|
24
|
+
private resizeObserver?;
|
|
25
|
+
/**
|
|
26
|
+
* The styles for nile-inline-sidebar-item-body
|
|
27
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
28
|
+
*/
|
|
29
|
+
static get styles(): CSSResultArray;
|
|
30
|
+
firstUpdated(): void;
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
private checkTruncation;
|
|
33
|
+
private get contentTemplate();
|
|
34
|
+
/**
|
|
35
|
+
* Render method
|
|
36
|
+
* @slot This is a slot test
|
|
37
|
+
*/
|
|
38
|
+
render(): TemplateResult;
|
|
39
|
+
}
|
|
40
|
+
export default NileInlineSidebarItemBody;
|
|
41
|
+
declare global {
|
|
42
|
+
interface HTMLElementTagNameMap {
|
|
43
|
+
'nile-inline-sidebar-item-body': NileInlineSidebarItemBody;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
import { __decorate } from "tslib";
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { customElement, property, state, query } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './nile-inline-sidebar-item-body.css';
|
|
11
|
+
import NileElement from '../internal/nile-element';
|
|
12
|
+
/**
|
|
13
|
+
* Nile inline-sidebar-item-body component.
|
|
14
|
+
*
|
|
15
|
+
* @tag nile-inline-sidebar-item-body
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
let NileInlineSidebarItemBody = class NileInlineSidebarItemBody extends NileElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/** Maximum number of visible lines before text is truncated with an ellipsis. */
|
|
22
|
+
this.lines = 2;
|
|
23
|
+
this.content = '';
|
|
24
|
+
this.showTooltip = false;
|
|
25
|
+
this.isTruncated = false;
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
this.active = false;
|
|
28
|
+
/* #endregion */
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The styles for nile-inline-sidebar-item-body
|
|
32
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
33
|
+
*/
|
|
34
|
+
static get styles() {
|
|
35
|
+
return [styles];
|
|
36
|
+
}
|
|
37
|
+
/* #endregion */
|
|
38
|
+
/* #region Methods */
|
|
39
|
+
firstUpdated() {
|
|
40
|
+
this.checkTruncation();
|
|
41
|
+
if (this.bodyContentEl) {
|
|
42
|
+
this.resizeObserver = new ResizeObserver(() => this.checkTruncation());
|
|
43
|
+
this.resizeObserver.observe(this.bodyContentEl);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
disconnectedCallback() {
|
|
47
|
+
super.disconnectedCallback();
|
|
48
|
+
this.resizeObserver?.disconnect();
|
|
49
|
+
}
|
|
50
|
+
checkTruncation() {
|
|
51
|
+
if (this.bodyContentEl) {
|
|
52
|
+
const truncated = this.bodyContentEl.scrollHeight > this.bodyContentEl.clientHeight;
|
|
53
|
+
if (truncated !== this.isTruncated) {
|
|
54
|
+
this.isTruncated = truncated;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
get contentTemplate() {
|
|
59
|
+
const body = html `<div class="body-text" part="body-text">${this.content}</div>`;
|
|
60
|
+
return this.isTruncated && this.showTooltip
|
|
61
|
+
? html `<nile-lite-tooltip content=${this.content} hoist>${body}</nile-lite-tooltip>`
|
|
62
|
+
: body;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Render method
|
|
66
|
+
* @slot This is a slot test
|
|
67
|
+
*/
|
|
68
|
+
render() {
|
|
69
|
+
return html `
|
|
70
|
+
<div class="item-body" part="item-body">
|
|
71
|
+
<div class="prefix-content" part="prefix-content">
|
|
72
|
+
<slot name="prefix"></slot>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="body-content" part="body-content" style="--line-clamp: ${this.lines ? this.lines : 2}">
|
|
75
|
+
${this.content ? this.contentTemplate : html `<div class="body-text" part="body-text"><slot></slot></div>`}
|
|
76
|
+
</div>
|
|
77
|
+
<div class="suffix-content" part="suffix-content">
|
|
78
|
+
<slot name="suffix"></slot>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
__decorate([
|
|
85
|
+
property({ type: Number, reflect: true })
|
|
86
|
+
], NileInlineSidebarItemBody.prototype, "lines", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
property({ type: String, reflect: true })
|
|
89
|
+
], NileInlineSidebarItemBody.prototype, "content", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
property({ type: Boolean, reflect: true })
|
|
92
|
+
], NileInlineSidebarItemBody.prototype, "showTooltip", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
state()
|
|
95
|
+
], NileInlineSidebarItemBody.prototype, "isTruncated", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
query('.body-content')
|
|
98
|
+
], NileInlineSidebarItemBody.prototype, "bodyContentEl", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: Boolean, reflect: true, attribute: true })
|
|
101
|
+
], NileInlineSidebarItemBody.prototype, "disabled", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: Boolean, reflect: true, attribute: true })
|
|
104
|
+
], NileInlineSidebarItemBody.prototype, "active", void 0);
|
|
105
|
+
NileInlineSidebarItemBody = __decorate([
|
|
106
|
+
customElement('nile-inline-sidebar-item-body')
|
|
107
|
+
], NileInlineSidebarItemBody);
|
|
108
|
+
export { NileInlineSidebarItemBody };
|
|
109
|
+
export default NileInlineSidebarItemBody;
|
|
110
|
+
//# sourceMappingURL=nile-inline-sidebar-item-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-inline-sidebar-item-body.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item-body/nile-inline-sidebar-item-body.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAiC,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAC,MAAM,EAAC,MAAM,qCAAqC,CAAC;AAC3D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,WAAW;IAAnD;;QAEN,iFAAiF;QACtC,UAAK,GAAW,CAAC,CAAC;QAElB,YAAO,GAAW,EAAE,CAAC;QAEpB,gBAAW,GAAY,KAAK,CAAC;QAExD,gBAAW,GAAG,KAAK,CAAC;QAIwB,aAAQ,GAAY,KAAK,CAAC;QAC1B,WAAM,GAAY,KAAK,CAAC;QAkErF,gBAAgB;IACjB,CAAC;IA/DA;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB,YAAY;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,I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AAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8DAA8B;AAExD;IAAhB,KAAK,EAAE;8DAA6B;AAEL;IAA/B,KAAK,CAAC,eAAe,CAAC;gEAAqC;AAEC;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;2DAA2B;AAC1B;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;yDAAyB;AAdzE,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAiFrC;;AAED,eAAe,yBAAyB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property, state, query} from 'lit/decorators.js';\nimport {styles} from './nile-inline-sidebar-item-body.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile inline-sidebar-item-body component.\n *\n * @tag nile-inline-sidebar-item-body\n *\n */\n@customElement('nile-inline-sidebar-item-body')\nexport class NileInlineSidebarItemBody extends NileElement {\n\n\t/** Maximum number of visible lines before text is truncated with an ellipsis. */\n\t@property({ type: Number, reflect: true }) lines: number = 2;\n\n\t@property({ type: String, reflect: true }) content: string = '';\n\n\t@property({ type: Boolean, reflect: true }) showTooltip: boolean = false;\n\n\t@state() private isTruncated = false;\n\n\t@query('.body-content') private bodyContentEl!: HTMLElement;\n\n\t@property({ type: Boolean, reflect: true, attribute: true }) disabled: boolean = false;\n\t@property({ type: Boolean, reflect: true, attribute: true }) active: boolean = false;\n\n\tprivate resizeObserver?: ResizeObserver;\n\n\t/**\n\t * The styles for nile-inline-sidebar-item-body\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\tfirstUpdated() {\n\t\tthis.checkTruncation();\n\t\tif (this.bodyContentEl) {\n\t\t\tthis.resizeObserver = new ResizeObserver(() => this.checkTruncation());\n\t\t\tthis.resizeObserver.observe(this.bodyContentEl);\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback();\n\t\tthis.resizeObserver?.disconnect();\n\t}\n\n\tprivate checkTruncation() {\n\t\tif (this.bodyContentEl) {\n\t\t\tconst truncated = this.bodyContentEl.scrollHeight > this.bodyContentEl.clientHeight;\n\t\t\tif (truncated !== this.isTruncated) {\n\t\t\t\tthis.isTruncated = truncated;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate get contentTemplate(): TemplateResult {\n\t\tconst body = html`<div class=\"body-text\" part=\"body-text\">${this.content}</div>`;\n\n\t\treturn this.isTruncated && this.showTooltip\n\t\t\t? html`<nile-lite-tooltip content=${this.content} hoist>${body}</nile-lite-tooltip>`\n\t\t\t: body;\n\t}\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t<div class=\"item-body\" part=\"item-body\">\n\t\t<div class=\"prefix-content\" part=\"prefix-content\">\n\t\t\t<slot name=\"prefix\"></slot>\n\t\t</div>\n\t\t<div class=\"body-content\" part=\"body-content\" style=\"--line-clamp: ${this.lines? this.lines : 2}\">\n\t\t\t${this.content ? this.contentTemplate : html`<div class=\"body-text\" part=\"body-text\"><slot></slot></div>`}\n\t\t</div>\n\t\t<div class=\"suffix-content\" part=\"suffix-content\">\n\t\t\t<slot name=\"suffix\"></slot>\n\t\t</div>\n\t\t</div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileInlineSidebarItemBody;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-inline-sidebar-item-body': NileInlineSidebarItemBody;\n }\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC","sourcesContent":["export { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
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
|
+
export declare const styles: import("lit").CSSResult;
|
|
8
|
+
declare const _default: import("lit").CSSResult[];
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
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
|
+
import { css } from 'lit';
|
|
8
|
+
export const styles = css `
|
|
9
|
+
:host {
|
|
10
|
+
font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
|
|
11
|
+
}
|
|
12
|
+
.item-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
19
|
+
.item-header .body-content .header-text {
|
|
20
|
+
display: block;
|
|
21
|
+
font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));
|
|
22
|
+
font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));
|
|
23
|
+
line-height: var(--nile-line-height-medium, var(--ng-line-height-text-sm));
|
|
24
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
25
|
+
}
|
|
26
|
+
:host([active]) .item-header .body-content .header-text {
|
|
27
|
+
font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
|
|
28
|
+
color: var(--nile-colors-primary-700, var(--ng-colors-text-brand-secondary-700));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([disabled]) .item-header .body-content .header-text {
|
|
32
|
+
color: var(--nile-colors-neutral-500, var(--ng-colors-text-disabled));
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
export default [styles];
|
|
36
|
+
//# sourceMappingURL=nile-inline-sidebar-item-header.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-inline-sidebar-item-header.css.js","sourceRoot":"","sources":["../../../src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2026\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\tfont-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n\t}\n\t.item-header {\n\t\tdisplay: flex;\n\t\tgap: var(--nile-spacing-xs, var(--ng-spacing-xs));\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t}\n\t.item-header .body-content .header-text {\n\t\tdisplay: block;\n\t\tfont-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n\t\tfont-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n\t\tline-height: var(--nile-line-height-medium, var(--ng-line-height-text-sm));\n\t\tcolor: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n\t}\n\t:host([active]) .item-header .body-content .header-text {\n\t\tfont-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n\t\tcolor: var(--nile-colors-primary-700, var(--ng-colors-text-brand-secondary-700));\n\t}\n\n\t:host([disabled]) .item-header .body-content .header-text {\n\t\tcolor: var(--nile-colors-neutral-500, var(--ng-colors-text-disabled));\n\t}\n`;\n\nexport default [styles];\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import { CSSResultArray, TemplateResult } from 'lit';
|
|
8
|
+
import NileElement from '../internal/nile-element';
|
|
9
|
+
/**
|
|
10
|
+
* Nile inline-sidebar-item-header component.
|
|
11
|
+
*
|
|
12
|
+
* @tag nile-inline-sidebar-item-header
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class NileInlineSidebarItemHeader extends NileElement {
|
|
16
|
+
active: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The styles for nile-inline-sidebar-item-header
|
|
20
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
21
|
+
*/
|
|
22
|
+
static get styles(): CSSResultArray;
|
|
23
|
+
/**
|
|
24
|
+
* Render method
|
|
25
|
+
* @slot This is a slot test
|
|
26
|
+
*/
|
|
27
|
+
render(): TemplateResult;
|
|
28
|
+
}
|
|
29
|
+
export default NileInlineSidebarItemHeader;
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'nile-inline-sidebar-item-header': NileInlineSidebarItemHeader;
|
|
33
|
+
}
|
|
34
|
+
}
|