@ni/ok-components 1.8.0 → 1.8.1
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/all-components-bundle.js +548 -424
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +5893 -5850
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +77 -0
- package/dist/custom-elements.md +10 -0
- package/dist/esm/fv/all-fv.d.ts +1 -0
- package/dist/esm/fv/all-fv.js +1 -0
- package/dist/esm/fv/all-fv.js.map +1 -1
- package/dist/esm/fv/sticky-header/index.d.ts +38 -0
- package/dist/esm/fv/sticky-header/index.js +90 -0
- package/dist/esm/fv/sticky-header/index.js.map +1 -0
- package/dist/esm/fv/sticky-header/styles.d.ts +1 -0
- package/dist/esm/fv/sticky-header/styles.js +22 -0
- package/dist/esm/fv/sticky-header/styles.js.map +1 -0
- package/dist/esm/fv/sticky-header/template.d.ts +2 -0
- package/dist/esm/fv/sticky-header/template.js +22 -0
- package/dist/esm/fv/sticky-header/template.js.map +1 -0
- package/package.json +1 -1
|
@@ -1723,6 +1723,83 @@
|
|
|
1723
1723
|
}
|
|
1724
1724
|
]
|
|
1725
1725
|
},
|
|
1726
|
+
{
|
|
1727
|
+
"kind": "javascript-module",
|
|
1728
|
+
"path": "src/fv/sticky-header/index.ts",
|
|
1729
|
+
"declarations": [
|
|
1730
|
+
{
|
|
1731
|
+
"kind": "class",
|
|
1732
|
+
"description": "Displays an alternate header in a sticky overlay after the primary header leaves the viewport.",
|
|
1733
|
+
"name": "FvStickyHeader",
|
|
1734
|
+
"members": [
|
|
1735
|
+
{
|
|
1736
|
+
"kind": "field",
|
|
1737
|
+
"name": "headerVisibility",
|
|
1738
|
+
"privacy": "private",
|
|
1739
|
+
"readonly": true,
|
|
1740
|
+
"default": "new Map<Element, boolean>()"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"kind": "field",
|
|
1744
|
+
"name": "headerIntersectionObserver",
|
|
1745
|
+
"privacy": "private",
|
|
1746
|
+
"readonly": true,
|
|
1747
|
+
"default": "new IntersectionObserver(entries => { this.handleHeaderIntersection(entries); })"
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
"kind": "method",
|
|
1751
|
+
"name": "observeHeader",
|
|
1752
|
+
"privacy": "private",
|
|
1753
|
+
"return": {
|
|
1754
|
+
"type": {
|
|
1755
|
+
"text": "void"
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
"kind": "method",
|
|
1761
|
+
"name": "updateStickyHeaderContent",
|
|
1762
|
+
"privacy": "private",
|
|
1763
|
+
"return": {
|
|
1764
|
+
"type": {
|
|
1765
|
+
"text": "void"
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
],
|
|
1770
|
+
"superclass": {
|
|
1771
|
+
"name": "FoundationElement",
|
|
1772
|
+
"package": "@ni/fast-foundation"
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
"kind": "variable",
|
|
1777
|
+
"name": "fvStickyHeaderTag",
|
|
1778
|
+
"type": {
|
|
1779
|
+
"text": "string"
|
|
1780
|
+
},
|
|
1781
|
+
"default": "'ok-fv-sticky-header'"
|
|
1782
|
+
}
|
|
1783
|
+
],
|
|
1784
|
+
"exports": [
|
|
1785
|
+
{
|
|
1786
|
+
"kind": "js",
|
|
1787
|
+
"name": "FvStickyHeader",
|
|
1788
|
+
"declaration": {
|
|
1789
|
+
"name": "FvStickyHeader",
|
|
1790
|
+
"module": "src/fv/sticky-header/index.ts"
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"kind": "js",
|
|
1795
|
+
"name": "fvStickyHeaderTag",
|
|
1796
|
+
"declaration": {
|
|
1797
|
+
"name": "fvStickyHeaderTag",
|
|
1798
|
+
"module": "src/fv/sticky-header/index.ts"
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
]
|
|
1802
|
+
},
|
|
1726
1803
|
{
|
|
1727
1804
|
"kind": "javascript-module",
|
|
1728
1805
|
"path": "src/fv/summary-panel/index.ts",
|
package/dist/custom-elements.md
CHANGED
|
@@ -308,6 +308,16 @@
|
|
|
308
308
|
|
|
309
309
|
<hr/>
|
|
310
310
|
|
|
311
|
+
## class: `FvStickyHeader`
|
|
312
|
+
|
|
313
|
+
### Superclass
|
|
314
|
+
|
|
315
|
+
| Name | Module | Package |
|
|
316
|
+
| ------------------- | ------ | ------------------- |
|
|
317
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
318
|
+
|
|
319
|
+
<hr/>
|
|
320
|
+
|
|
311
321
|
## class: `FvSummaryPanel`
|
|
312
322
|
|
|
313
323
|
### Superclass
|
package/dist/esm/fv/all-fv.d.ts
CHANGED
package/dist/esm/fv/all-fv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-fv.js","sourceRoot":"","sources":["../../../src/fv/all-fv.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,QAAQ,CAAC;AAChB,OAAO,iBAAiB,CAAC;AACzB,OAAO,gBAAgB,CAAC;AACxB,OAAO,2BAA2B,CAAC;AACnC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,CAAC;AACxB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iBAAiB,CAAC;AACzB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,CAAC","sourcesContent":["import './accordion-item';\nimport './card';\nimport './chip-selector';\nimport './context-help';\nimport './master-detail-list-item';\nimport './master-detail-list';\nimport './split-button';\nimport './split-button-anchor';\nimport './summary-panel';\nimport './summary-panel-tile';\nimport './search-input';\n"]}
|
|
1
|
+
{"version":3,"file":"all-fv.js","sourceRoot":"","sources":["../../../src/fv/all-fv.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,QAAQ,CAAC;AAChB,OAAO,iBAAiB,CAAC;AACzB,OAAO,gBAAgB,CAAC;AACxB,OAAO,2BAA2B,CAAC;AACnC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,CAAC;AACxB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,CAAC","sourcesContent":["import './accordion-item';\nimport './card';\nimport './chip-selector';\nimport './context-help';\nimport './master-detail-list-item';\nimport './master-detail-list';\nimport './split-button';\nimport './split-button-anchor';\nimport './sticky-header';\nimport './summary-panel';\nimport './summary-panel-tile';\nimport './search-input';\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FoundationElement } from '@ni/fast-foundation';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'ok-fv-sticky-header': FvStickyHeader;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Displays an alternate header in a sticky overlay after the primary header leaves the viewport.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FvStickyHeader extends FoundationElement {
|
|
11
|
+
/** @internal */
|
|
12
|
+
hasHeader: boolean;
|
|
13
|
+
/** @internal */
|
|
14
|
+
hasStickyHeader: boolean;
|
|
15
|
+
/** @internal */
|
|
16
|
+
headerIsVisible: boolean;
|
|
17
|
+
/** @internal */
|
|
18
|
+
showStickyHeader: boolean;
|
|
19
|
+
/** @internal */
|
|
20
|
+
readonly headerSlot: HTMLSlotElement;
|
|
21
|
+
/** @internal */
|
|
22
|
+
readonly stickyHeaderSlot: HTMLSlotElement;
|
|
23
|
+
private readonly headerVisibility;
|
|
24
|
+
private readonly headerIntersectionObserver;
|
|
25
|
+
/** @internal */
|
|
26
|
+
connectedCallback(): void;
|
|
27
|
+
/** @internal */
|
|
28
|
+
disconnectedCallback(): void;
|
|
29
|
+
/** @internal */
|
|
30
|
+
handleHeaderSlotChange(): void;
|
|
31
|
+
/** @internal */
|
|
32
|
+
handleStickyHeaderSlotChange(event: Event): void;
|
|
33
|
+
/** @internal */
|
|
34
|
+
handleHeaderIntersection(entries: IntersectionObserverEntry[]): void;
|
|
35
|
+
private observeHeader;
|
|
36
|
+
private updateStickyHeaderContent;
|
|
37
|
+
}
|
|
38
|
+
export declare const fvStickyHeaderTag = "ok-fv-sticky-header";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from '@ni/fast-element';
|
|
3
|
+
import { DesignSystem, FoundationElement } from '@ni/fast-foundation';
|
|
4
|
+
import { styles } from './styles';
|
|
5
|
+
import { template } from './template';
|
|
6
|
+
/**
|
|
7
|
+
* Displays an alternate header in a sticky overlay after the primary header leaves the viewport.
|
|
8
|
+
*/
|
|
9
|
+
export class FvStickyHeader extends FoundationElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/** @internal */
|
|
13
|
+
this.hasHeader = false;
|
|
14
|
+
/** @internal */
|
|
15
|
+
this.hasStickyHeader = false;
|
|
16
|
+
/** @internal */
|
|
17
|
+
this.headerIsVisible = true;
|
|
18
|
+
/** @internal */
|
|
19
|
+
this.showStickyHeader = false;
|
|
20
|
+
this.headerVisibility = new Map();
|
|
21
|
+
this.headerIntersectionObserver = new IntersectionObserver(entries => {
|
|
22
|
+
this.handleHeaderIntersection(entries);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** @internal */
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
super.connectedCallback();
|
|
28
|
+
this.updateStickyHeaderContent();
|
|
29
|
+
this.observeHeader();
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
disconnectedCallback() {
|
|
33
|
+
super.disconnectedCallback();
|
|
34
|
+
this.headerIntersectionObserver.disconnect();
|
|
35
|
+
}
|
|
36
|
+
/** @internal */
|
|
37
|
+
handleHeaderSlotChange() {
|
|
38
|
+
this.observeHeader();
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
handleStickyHeaderSlotChange(event) {
|
|
42
|
+
this.hasStickyHeader = event.target.assignedElements({ flatten: true }).length > 0;
|
|
43
|
+
this.updateStickyHeaderContent();
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
handleHeaderIntersection(entries) {
|
|
47
|
+
entries.forEach(entry => {
|
|
48
|
+
const hasLeftViewport = !entry.isIntersecting && entry.boundingClientRect.top < 0;
|
|
49
|
+
this.headerVisibility.set(entry.target, !hasLeftViewport);
|
|
50
|
+
});
|
|
51
|
+
this.headerIsVisible = Array.from(this.headerVisibility.values()).some(Boolean);
|
|
52
|
+
this.updateStickyHeaderContent();
|
|
53
|
+
}
|
|
54
|
+
observeHeader() {
|
|
55
|
+
this.headerIntersectionObserver.disconnect();
|
|
56
|
+
const headerElements = this.headerSlot.assignedElements({ flatten: true });
|
|
57
|
+
this.hasHeader = headerElements.length > 0;
|
|
58
|
+
this.headerIsVisible = true;
|
|
59
|
+
this.headerVisibility.clear();
|
|
60
|
+
headerElements.forEach(element => {
|
|
61
|
+
this.headerVisibility.set(element, true);
|
|
62
|
+
this.headerIntersectionObserver.observe(element);
|
|
63
|
+
});
|
|
64
|
+
this.updateStickyHeaderContent();
|
|
65
|
+
}
|
|
66
|
+
updateStickyHeaderContent() {
|
|
67
|
+
this.hasStickyHeader = this.stickyHeaderSlot.assignedElements({ flatten: true }).length > 0;
|
|
68
|
+
this.showStickyHeader = this.hasHeader && this.hasStickyHeader && !this.headerIsVisible;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
__decorate([
|
|
72
|
+
observable
|
|
73
|
+
], FvStickyHeader.prototype, "hasHeader", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
observable
|
|
76
|
+
], FvStickyHeader.prototype, "hasStickyHeader", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
observable
|
|
79
|
+
], FvStickyHeader.prototype, "headerIsVisible", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
observable
|
|
82
|
+
], FvStickyHeader.prototype, "showStickyHeader", void 0);
|
|
83
|
+
const okFvStickyHeader = FvStickyHeader.compose({
|
|
84
|
+
baseName: 'fv-sticky-header',
|
|
85
|
+
template,
|
|
86
|
+
styles
|
|
87
|
+
});
|
|
88
|
+
DesignSystem.getOrCreate().withPrefix('ok').register(okFvStickyHeader());
|
|
89
|
+
export const fvStickyHeaderTag = 'ok-fv-sticky-header';
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/fv/sticky-header/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IAArD;;QACI,gBAAgB;QAET,cAAS,GAAG,KAAK,CAAC;QAEzB,gBAAgB;QAET,oBAAe,GAAG,KAAK,CAAC;QAE/B,gBAAgB;QAET,oBAAe,GAAG,IAAI,CAAC;QAE9B,gBAAgB;QAET,qBAAgB,GAAG,KAAK,CAAC;QAQf,qBAAgB,GAAG,IAAI,GAAG,EAAoB,CAAC;QAC/C,+BAA0B,GAAG,IAAI,oBAAoB,CAAC,OAAO,CAAC,EAAE;YAC7E,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IAqDP,CAAC;IAnDG,gBAAgB;IACA,iBAAiB;QAC7B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,gBAAgB;IACA,oBAAoB;QAChC,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,0BAA0B,CAAC,UAAU,EAAE,CAAC;IACjD,CAAC;IAED,gBAAgB;IACT,sBAAsB;QACzB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,gBAAgB;IACT,4BAA4B,CAAC,KAAY;QAC5C,IAAI,CAAC,eAAe,GAAI,KAAK,CAAC,MAA0B,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACxG,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACrC,CAAC;IAED,gBAAgB;IACT,wBAAwB,CAAC,OAAoC;QAChE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACpB,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,CAAC;YAClF,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,eAAe,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChF,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACrC,CAAC;IAEO,aAAa;QACjB,IAAI,CAAC,0BAA0B,CAAC,UAAU,EAAE,CAAC;QAC7C,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9B,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAC7B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzC,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACrC,CAAC;IAEO,yBAAyB;QAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5F,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;IAC5F,CAAC;CACJ;AA5EU;IADN,UAAU;iDACc;AAIlB;IADN,UAAU;uDACoB;AAIxB;IADN,UAAU;uDACmB;AAIvB;IADN,UAAU;wDACqB;AAkEpC,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC;IAC5C,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC","sourcesContent":["import { observable } from '@ni/fast-element';\nimport { DesignSystem, FoundationElement } from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ok-fv-sticky-header': FvStickyHeader;\n }\n}\n\n/**\n * Displays an alternate header in a sticky overlay after the primary header leaves the viewport.\n */\nexport class FvStickyHeader extends FoundationElement {\n /** @internal */\n @observable\n public hasHeader = false;\n\n /** @internal */\n @observable\n public hasStickyHeader = false;\n\n /** @internal */\n @observable\n public headerIsVisible = true;\n\n /** @internal */\n @observable\n public showStickyHeader = false;\n\n /** @internal */\n public readonly headerSlot!: HTMLSlotElement;\n\n /** @internal */\n public readonly stickyHeaderSlot!: HTMLSlotElement;\n\n private readonly headerVisibility = new Map<Element, boolean>();\n private readonly headerIntersectionObserver = new IntersectionObserver(entries => {\n this.handleHeaderIntersection(entries);\n });\n\n /** @internal */\n public override connectedCallback(): void {\n super.connectedCallback();\n this.updateStickyHeaderContent();\n this.observeHeader();\n }\n\n /** @internal */\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.headerIntersectionObserver.disconnect();\n }\n\n /** @internal */\n public handleHeaderSlotChange(): void {\n this.observeHeader();\n }\n\n /** @internal */\n public handleStickyHeaderSlotChange(event: Event): void {\n this.hasStickyHeader = (event.target as HTMLSlotElement).assignedElements({ flatten: true }).length > 0;\n this.updateStickyHeaderContent();\n }\n\n /** @internal */\n public handleHeaderIntersection(entries: IntersectionObserverEntry[]): void {\n entries.forEach(entry => {\n const hasLeftViewport = !entry.isIntersecting && entry.boundingClientRect.top < 0;\n this.headerVisibility.set(entry.target, !hasLeftViewport);\n });\n this.headerIsVisible = Array.from(this.headerVisibility.values()).some(Boolean);\n this.updateStickyHeaderContent();\n }\n\n private observeHeader(): void {\n this.headerIntersectionObserver.disconnect();\n const headerElements = this.headerSlot.assignedElements({ flatten: true });\n this.hasHeader = headerElements.length > 0;\n this.headerIsVisible = true;\n this.headerVisibility.clear();\n headerElements.forEach(element => {\n this.headerVisibility.set(element, true);\n this.headerIntersectionObserver.observe(element);\n });\n this.updateStickyHeaderContent();\n }\n\n private updateStickyHeaderContent(): void {\n this.hasStickyHeader = this.stickyHeaderSlot.assignedElements({ flatten: true }).length > 0;\n this.showStickyHeader = this.hasHeader && this.hasStickyHeader && !this.headerIsVisible;\n }\n}\n\nconst okFvStickyHeader = FvStickyHeader.compose({\n baseName: 'fv-sticky-header',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('ok').register(okFvStickyHeader());\nexport const fvStickyHeaderTag = 'ok-fv-sticky-header';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@ni/fast-element").ElementStyles;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { css } from '@ni/fast-element';
|
|
2
|
+
import { elevation2BoxShadow, headerBackgroundColor } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';
|
|
3
|
+
import { display } from '../../utilities/style/display';
|
|
4
|
+
export const styles = css `
|
|
5
|
+
${display('block')}
|
|
6
|
+
|
|
7
|
+
.sticky-header {
|
|
8
|
+
position: fixed;
|
|
9
|
+
inset-block-start: 0;
|
|
10
|
+
inset-inline: 0;
|
|
11
|
+
z-index: 1;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
width: 100%;
|
|
14
|
+
background-color: var(${headerBackgroundColor.cssCustomProperty});
|
|
15
|
+
box-shadow: var(${elevation2BoxShadow.cssCustomProperty});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.sticky-header[hidden] {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/fv/sticky-header/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACzH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,OAAO,CAAC;;;;;;;;;gCASU,qBAAqB,CAAC,iBAAiB;0BAC7C,mBAAmB,CAAC,iBAAiB;;;;;;CAM9D,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\nimport { elevation2BoxShadow, headerBackgroundColor } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';\nimport { display } from '../../utilities/style/display';\n\nexport const styles = css`\n ${display('block')}\n\n .sticky-header {\n position: fixed;\n inset-block-start: 0;\n inset-inline: 0;\n z-index: 1;\n box-sizing: border-box;\n width: 100%;\n background-color: var(${headerBackgroundColor.cssCustomProperty});\n box-shadow: var(${elevation2BoxShadow.cssCustomProperty});\n }\n\n .sticky-header[hidden] {\n display: none;\n }\n`;\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { html, ref } from '@ni/fast-element';
|
|
2
|
+
export const template = html `
|
|
3
|
+
<div class="header" part="header">
|
|
4
|
+
<slot
|
|
5
|
+
name="header"
|
|
6
|
+
${ref('headerSlot')}
|
|
7
|
+
@slotchange="${x => x.handleHeaderSlotChange()}"
|
|
8
|
+
></slot>
|
|
9
|
+
</div>
|
|
10
|
+
<div
|
|
11
|
+
class="sticky-header"
|
|
12
|
+
part="sticky-header"
|
|
13
|
+
?hidden="${x => !x.showStickyHeader}"
|
|
14
|
+
>
|
|
15
|
+
<slot
|
|
16
|
+
name="sticky-header"
|
|
17
|
+
${ref('stickyHeaderSlot')}
|
|
18
|
+
@slotchange="${(x, c) => x.handleStickyHeaderSlotChange(c.event)}"
|
|
19
|
+
></slot>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/fv/sticky-header/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAG7C,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAgB;;;;cAI9B,GAAG,CAAC,YAAY,CAAC;2BACJ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,sBAAsB,EAAE;;;;;;mBAMvC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB;;;;cAI7B,GAAG,CAAC,kBAAkB,CAAC;2BACV,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,KAAK,CAAC;;;CAG3E,CAAC","sourcesContent":["import { html, ref } from '@ni/fast-element';\nimport type { FvStickyHeader } from '.';\n\nexport const template = html<FvStickyHeader>`\n <div class=\"header\" part=\"header\">\n <slot\n name=\"header\"\n ${ref('headerSlot')}\n @slotchange=\"${x => x.handleHeaderSlotChange()}\"\n ></slot>\n </div>\n <div\n class=\"sticky-header\"\n part=\"sticky-header\"\n ?hidden=\"${x => !x.showStickyHeader}\"\n >\n <slot\n name=\"sticky-header\"\n ${ref('stickyHeaderSlot')}\n @slotchange=\"${(x, c) => x.handleStickyHeaderSlotChange(c.event)}\"\n ></slot>\n </div>\n`;\n"]}
|