@ni/nimble-components 33.10.0 → 33.11.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 +37 -3
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +27 -6
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/tabs-toolbar/index.d.ts +2 -0
- package/dist/esm/tabs-toolbar/index.js +12 -1
- package/dist/esm/tabs-toolbar/index.js.map +1 -1
- package/dist/esm/tabs-toolbar/styles.js +13 -0
- package/dist/esm/tabs-toolbar/styles.js.map +1 -1
- package/dist/esm/tabs-toolbar/template.d.ts +5 -1
- package/dist/esm/tabs-toolbar/template.js +17 -4
- package/dist/esm/tabs-toolbar/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,5 +8,7 @@ declare global {
|
|
|
8
8
|
* A nimble-styled container for toolbar content next to tabs.
|
|
9
9
|
*/
|
|
10
10
|
export declare class TabsToolbar extends FoundationElement {
|
|
11
|
+
/** @internal */
|
|
12
|
+
defaultSlottedElements: Element[];
|
|
11
13
|
}
|
|
12
14
|
export declare const tabsToolbarTag = "nimble-tabs-toolbar";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from '@ni/fast-element';
|
|
3
|
+
import { applyMixins, DesignSystem, FoundationElement, StartEnd } from '@ni/fast-foundation';
|
|
2
4
|
import { styles } from './styles';
|
|
3
5
|
import { template } from './template';
|
|
4
6
|
/**
|
|
5
7
|
* A nimble-styled container for toolbar content next to tabs.
|
|
6
8
|
*/
|
|
7
9
|
export class TabsToolbar extends FoundationElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/** @internal */
|
|
13
|
+
this.defaultSlottedElements = [];
|
|
14
|
+
}
|
|
8
15
|
}
|
|
16
|
+
__decorate([
|
|
17
|
+
observable
|
|
18
|
+
], TabsToolbar.prototype, "defaultSlottedElements", void 0);
|
|
9
19
|
const nimbleTabsToolbar = TabsToolbar.compose({
|
|
10
20
|
baseName: 'tabs-toolbar',
|
|
11
21
|
template,
|
|
@@ -13,4 +23,5 @@ const nimbleTabsToolbar = TabsToolbar.compose({
|
|
|
13
23
|
});
|
|
14
24
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
|
|
15
25
|
export const tabsToolbarTag = 'nimble-tabs-toolbar';
|
|
26
|
+
applyMixins(TabsToolbar, StartEnd);
|
|
16
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tabs-toolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tabs-toolbar/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACH,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAAlD;;QACI,gBAAgB;QAET,2BAAsB,GAAc,EAAE,CAAC;IAClD,CAAC;CAAA;AADU;IADN,UAAU;2DACmC;AAGlD,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC;IAC1C,QAAQ,EAAE,cAAc;IACxB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAEpD,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { observable } from '@ni/fast-element';\nimport {\n applyMixins,\n DesignSystem,\n FoundationElement,\n StartEnd\n} from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-tabs-toolbar': TabsToolbar;\n }\n}\n\n/**\n * A nimble-styled container for toolbar content next to tabs.\n */\nexport class TabsToolbar extends FoundationElement {\n /** @internal */\n @observable\n public defaultSlottedElements: Element[] = [];\n}\n\nconst nimbleTabsToolbar = TabsToolbar.compose({\n baseName: 'tabs-toolbar',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());\nexport const tabsToolbarTag = 'nimble-tabs-toolbar';\n\napplyMixins(TabsToolbar, StartEnd);\n"]}
|
|
@@ -18,5 +18,18 @@ export const styles = css `
|
|
|
18
18
|
rgba(${borderRgbPartialColor}, 0.3);
|
|
19
19
|
margin: ${smallPadding} ${mediumPadding};
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
[part='start'] {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[part='end'] {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[part='end'].end {
|
|
31
|
+
margin-left: auto;
|
|
32
|
+
display: flex;
|
|
33
|
+
}
|
|
21
34
|
`;
|
|
22
35
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/tabs-toolbar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACf,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;;kBAIH,aAAa;gBACf,QAAQ;iBACP,aAAa;;;;;;4BAMF,WAAW;mBACpB,qBAAqB;kBACtB,YAAY,IAAI,aAAa
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/tabs-toolbar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACf,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;;kBAIH,aAAa;gBACf,QAAQ;iBACP,aAAa;;;;;;4BAMF,WAAW;mBACpB,qBAAqB;kBACtB,YAAY,IAAI,aAAa;;;;;;;;;;;;;;;CAe9C,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\nimport { display } from '../utilities/style/display';\nimport {\n bodyFont,\n bodyFontColor,\n borderRgbPartialColor,\n borderWidth,\n controlHeight,\n mediumPadding,\n smallPadding\n} from '../theme-provider/design-tokens';\n\nexport const styles = css`\n ${display('flex')}\n\n :host {\n align-items: center;\n height: ${controlHeight};\n font: ${bodyFont};\n color: ${bodyFontColor};\n }\n\n .separator {\n display: inline-block;\n height: 24px;\n border-left: calc(${borderWidth} * 2) solid\n rgba(${borderRgbPartialColor}, 0.3);\n margin: ${smallPadding} ${mediumPadding};\n }\n\n [part='start'] {\n display: none;\n }\n\n [part='end'] {\n display: none;\n }\n\n [part='end'].end {\n margin-left: auto;\n display: flex;\n }\n`;\n"]}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import { ViewTemplate } from '@ni/fast-element';
|
|
2
|
+
import { type FoundationElementDefinition, type FoundationElementTemplate, type StartEndOptions } from '@ni/fast-foundation';
|
|
1
3
|
import type { TabsToolbar } from '.';
|
|
2
|
-
|
|
4
|
+
type TabsToolbarOptions = FoundationElementDefinition & StartEndOptions;
|
|
5
|
+
export declare const template: FoundationElementTemplate<ViewTemplate<TabsToolbar>, TabsToolbarOptions>;
|
|
6
|
+
export {};
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { html } from '@ni/fast-element';
|
|
2
|
-
|
|
1
|
+
import { html, slotted, ViewTemplate, when } from '@ni/fast-element';
|
|
2
|
+
import { endSlotTemplate, startSlotTemplate } from '@ni/fast-foundation';
|
|
3
|
+
/* eslint-disable @typescript-eslint/indent */
|
|
4
|
+
// prettier-ignore
|
|
5
|
+
export const template = (context, definition) => html `
|
|
3
6
|
<template slot="end">
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
${when(x => x.defaultSlottedElements.length > 0, html `
|
|
8
|
+
<div class="separator"></div>
|
|
9
|
+
`)}
|
|
10
|
+
${startSlotTemplate(context, definition)}
|
|
11
|
+
<slot
|
|
12
|
+
${slotted({
|
|
13
|
+
filter: (n) => n instanceof HTMLElement,
|
|
14
|
+
property: 'defaultSlottedElements',
|
|
15
|
+
})}
|
|
16
|
+
>
|
|
17
|
+
</slot>
|
|
18
|
+
${endSlotTemplate(context, definition)}
|
|
6
19
|
</template>
|
|
7
20
|
`;
|
|
8
21
|
//# sourceMappingURL=template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/tabs-toolbar/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/tabs-toolbar/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACH,eAAe,EACf,iBAAiB,EAIpB,MAAM,qBAAqB,CAAC;AAK7B,8CAA8C;AAC9C,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAGjB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,IAAI,CAAa;;UAEpC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAA;;SAEpD,CAAC;UACA,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC;;cAElC,OAAO,CAAC;IACN,MAAM,EAAE,CAAC,CAAO,EAAE,EAAE,CAAC,CAAC,YAAY,WAAW;IAC7C,QAAQ,EAAE,wBAAwB;CACrC,CAAC;;;UAGJ,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC;;CAE7C,CAAC","sourcesContent":["import { html, slotted, ViewTemplate, when } from '@ni/fast-element';\nimport {\n endSlotTemplate,\n startSlotTemplate,\n type FoundationElementDefinition,\n type FoundationElementTemplate,\n type StartEndOptions\n} from '@ni/fast-foundation';\nimport type { TabsToolbar } from '.';\n\ntype TabsToolbarOptions = FoundationElementDefinition & StartEndOptions;\n\n/* eslint-disable @typescript-eslint/indent */\n// prettier-ignore\nexport const template: FoundationElementTemplate<\nViewTemplate<TabsToolbar>,\nTabsToolbarOptions\n> = (context, definition) => html<TabsToolbar>`\n <template slot=\"end\">\n ${when(x => x.defaultSlottedElements.length > 0, html`\n <div class=\"separator\"></div>\n `)}\n ${startSlotTemplate(context, definition)}\n <slot\n ${slotted({\n filter: (n: Node) => n instanceof HTMLElement,\n property: 'defaultSlottedElements',\n })}\n >\n </slot>\n ${endSlotTemplate(context, definition)}\n </template>\n`;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.11.1",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss",
|