@digital-realty/ix-tabs 0.0.2 → 0.0.4
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 +2 -41
- package/dist/IxPrimaryTab.d.ts +2 -1
- package/dist/IxPrimaryTab.js +10 -1
- package/dist/IxPrimaryTab.js.map +1 -1
- package/dist/IxSecondaryTab.d.ts +2 -1
- package/dist/IxSecondaryTab.js +10 -1
- package/dist/IxSecondaryTab.js.map +1 -1
- package/dist/IxTabs.d.ts +3 -2
- package/dist/IxTabs.js +5 -2
- package/dist/IxTabs.js.map +1 -1
- package/dist/mdtabs/internal/tab.d.ts +1 -1
- package/dist/mdtabs/internal/tabs.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,45 +42,6 @@ or
|
|
|
42
42
|
</script>
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## Demo and Documentation
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npm run lint
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
To automatically fix linting and formatting errors, run
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
npm run format
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Testing with Web Test Runner
|
|
60
|
-
|
|
61
|
-
To execute a single test run:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npm run test
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
To run the tests in interactive watch mode run:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npm run test:watch
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Tooling configs
|
|
75
|
-
|
|
76
|
-
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
77
|
-
|
|
78
|
-
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
79
|
-
|
|
80
|
-
## Local Demo with `web-dev-server`
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm start
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
To run a local development server that serves the basic demo located in `demo/index.html`
|
|
47
|
+
Full documentation and demo are available at [DLR Component Gallery](https://inxn-p1-uicomponentgallery.azurewebsites.net/?path=/story/inxn-ix-tabs--default).
|
package/dist/IxPrimaryTab.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import './mdtabs/primary-tab.js';
|
|
3
3
|
export declare class IxPrimaryTab extends LitElement {
|
|
4
4
|
static styles: import("lit").CSSResult;
|
|
5
|
-
|
|
5
|
+
active: boolean;
|
|
6
|
+
render(): import("lit").TemplateResult<1>;
|
|
6
7
|
}
|
package/dist/IxPrimaryTab.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
1
2
|
import { html, css, LitElement } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
2
4
|
import './mdtabs/primary-tab.js';
|
|
3
5
|
export class IxPrimaryTab extends LitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.active = false;
|
|
9
|
+
}
|
|
4
10
|
render() {
|
|
5
|
-
return html `<md-primary-tab><slot></slot></md-primary-tab> `;
|
|
11
|
+
return html `<md-primary-tab ?active=${this.active}><slot></slot></md-primary-tab> `;
|
|
6
12
|
}
|
|
7
13
|
}
|
|
8
14
|
IxPrimaryTab.styles = css `
|
|
@@ -16,4 +22,7 @@ IxPrimaryTab.styles = css `
|
|
|
16
22
|
flex: 1 1 0%;
|
|
17
23
|
}
|
|
18
24
|
`;
|
|
25
|
+
__decorate([
|
|
26
|
+
property({ type: Boolean, reflect: true })
|
|
27
|
+
], IxPrimaryTab.prototype, "active", void 0);
|
|
19
28
|
//# sourceMappingURL=IxPrimaryTab.js.map
|
package/dist/IxPrimaryTab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxPrimaryTab.js","sourceRoot":"","sources":["../src/IxPrimaryTab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,yBAAyB,CAAC;AAEjC,MAAM,OAAO,YAAa,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"IxPrimaryTab.js","sourceRoot":"","sources":["../src/IxPrimaryTab.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,yBAAyB,CAAC;AAEjC,MAAM,OAAO,YAAa,SAAQ,UAAU;IAA5C;;QAa8C,WAAM,GAAG,KAAK,CAAC;IAK7D,CAAC;IAHC,MAAM;QACJ,OAAO,IAAI,CAAA,2BAA2B,IAAI,CAAC,MAAM,kCAAkC,CAAC;IACtF,CAAC;;AAhBM,mBAAM,GAAG,GAAG,CAAA;;;;;;;;;;GAUlB,CAAC;AAE0C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAgB","sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport './mdtabs/primary-tab.js';\n\nexport class IxPrimaryTab extends LitElement {\n static styles = css`\n :host {\n display: flex;\n }\n ::slotted(*) {\n flex: 1 1 0%;\n }\n md-primary-tab {\n flex: 1 1 0%;\n }\n `;\n\n @property({ type: Boolean, reflect: true }) active = false;\n\n render() {\n return html`<md-primary-tab ?active=${this.active}><slot></slot></md-primary-tab> `;\n }\n}\n"]}
|
package/dist/IxSecondaryTab.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import './mdtabs/secondary-tab.js';
|
|
3
3
|
export declare class IxSecondaryTab extends LitElement {
|
|
4
4
|
static styles: import("lit").CSSResult;
|
|
5
|
-
|
|
5
|
+
active: boolean;
|
|
6
|
+
render(): import("lit").TemplateResult<1>;
|
|
6
7
|
}
|
package/dist/IxSecondaryTab.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
1
2
|
import { html, css, LitElement } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
2
4
|
import './mdtabs/secondary-tab.js';
|
|
3
5
|
export class IxSecondaryTab extends LitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.active = false;
|
|
9
|
+
}
|
|
4
10
|
render() {
|
|
5
|
-
return html `<md-secondary-tab><slot></slot></md-secondary-tab
|
|
11
|
+
return html `<md-secondary-tab ?active=${this.active}><slot></slot></md-secondary-tab>`;
|
|
6
12
|
}
|
|
7
13
|
}
|
|
8
14
|
IxSecondaryTab.styles = css `
|
|
@@ -16,4 +22,7 @@ IxSecondaryTab.styles = css `
|
|
|
16
22
|
flex: 1 1 0%;
|
|
17
23
|
}
|
|
18
24
|
`;
|
|
25
|
+
__decorate([
|
|
26
|
+
property({ type: Boolean, reflect: true })
|
|
27
|
+
], IxSecondaryTab.prototype, "active", void 0);
|
|
19
28
|
//# sourceMappingURL=IxSecondaryTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxSecondaryTab.js","sourceRoot":"","sources":["../src/IxSecondaryTab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,2BAA2B,CAAC;AAEnC,MAAM,OAAO,cAAe,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"IxSecondaryTab.js","sourceRoot":"","sources":["../src/IxSecondaryTab.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,2BAA2B,CAAC;AAEnC,MAAM,OAAO,cAAe,SAAQ,UAAU;IAA9C;;QAa8C,WAAM,GAAG,KAAK,CAAC;IAK7D,CAAC;IAHC,MAAM;QACJ,OAAO,IAAI,CAAA,6BAA6B,IAAI,CAAC,MAAM,mCAAmC,CAAC;IACzF,CAAC;;AAhBM,qBAAM,GAAG,GAAG,CAAA;;;;;;;;;;GAUlB,CAAC;AAE0C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAgB","sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport './mdtabs/secondary-tab.js';\n\nexport class IxSecondaryTab extends LitElement {\n static styles = css`\n :host {\n display: flex;\n }\n ::slotted(*) {\n flex: 1 1 0%;\n }\n md-secondary-tab {\n flex: 1 1 0%;\n }\n `;\n\n @property({ type: Boolean, reflect: true }) active = false;\n\n render() {\n return html`<md-secondary-tab ?active=${this.active}><slot></slot></md-secondary-tab>`;\n }\n}\n"]}
|
package/dist/IxTabs.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import './mdtabs/tabs.js';
|
|
3
3
|
import type { MdTabs } from './mdtabs/tabs.js';
|
|
4
4
|
export declare class IxTabs extends LitElement {
|
|
5
|
-
|
|
5
|
+
mdTabs: MdTabs;
|
|
6
6
|
get activeTabIndex(): number;
|
|
7
|
-
|
|
7
|
+
set activeTabIndex(index: number);
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
8
9
|
}
|
package/dist/IxTabs.js
CHANGED
|
@@ -4,7 +4,10 @@ import { query } from 'lit/decorators.js';
|
|
|
4
4
|
import './mdtabs/tabs.js';
|
|
5
5
|
export class IxTabs extends LitElement {
|
|
6
6
|
get activeTabIndex() {
|
|
7
|
-
return this.
|
|
7
|
+
return this.mdTabs.activeTabIndex;
|
|
8
|
+
}
|
|
9
|
+
set activeTabIndex(index) {
|
|
10
|
+
this.mdTabs.activeTabIndex = index;
|
|
8
11
|
}
|
|
9
12
|
render() {
|
|
10
13
|
return html `
|
|
@@ -16,5 +19,5 @@ export class IxTabs extends LitElement {
|
|
|
16
19
|
}
|
|
17
20
|
__decorate([
|
|
18
21
|
query('md-tabs')
|
|
19
|
-
], IxTabs.prototype, "
|
|
22
|
+
], IxTabs.prototype, "mdTabs", void 0);
|
|
20
23
|
//# sourceMappingURL=IxTabs.js.map
|
package/dist/IxTabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxTabs.js","sourceRoot":"","sources":["../src/IxTabs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAG1B,MAAM,OAAO,MAAO,SAAQ,UAAU;IAGpC,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"IxTabs.js","sourceRoot":"","sources":["../src/IxTabs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAG1B,MAAM,OAAO,MAAO,SAAQ,UAAU;IAGpC,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;IACpC,CAAC;IAED,IAAI,cAAc,CAAC,KAAa;QAC9B,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,KAAK,CAAC;IACrC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;CACF;AAjBmB;IAAjB,KAAK,CAAC,SAAS,CAAC;sCAAiB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { query } from 'lit/decorators.js';\nimport './mdtabs/tabs.js';\nimport type { MdTabs } from './mdtabs/tabs.js';\n\nexport class IxTabs extends LitElement {\n @query('md-tabs') mdTabs!: MdTabs;\n\n get activeTabIndex() {\n return this.mdTabs.activeTabIndex;\n }\n\n set activeTabIndex(index: number) {\n this.mdTabs.activeTabIndex = index;\n }\n\n render() {\n return html`\n <md-tabs>\n <slot></slot>\n </md-tabs>\n `;\n }\n}\n"]}
|
|
@@ -51,7 +51,7 @@ export declare class Tab extends LitElement {
|
|
|
51
51
|
private readonly assignedIcons;
|
|
52
52
|
private readonly internals;
|
|
53
53
|
constructor();
|
|
54
|
-
protected render(): import("lit
|
|
54
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
55
55
|
protected getContentClasses(): {
|
|
56
56
|
'has-icon': boolean;
|
|
57
57
|
'has-label': boolean;
|
|
@@ -62,7 +62,7 @@ export declare class Tabs extends LitElement {
|
|
|
62
62
|
* @return A Promise that resolves after the tab has been scrolled to.
|
|
63
63
|
*/
|
|
64
64
|
scrollToTab(tabToScrollTo?: Tab | null): Promise<void>;
|
|
65
|
-
protected render(): import("lit
|
|
65
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
66
66
|
private handleTabClick;
|
|
67
67
|
private activateTab;
|
|
68
68
|
private updateFocusableTab;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-tabs following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.4",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"README.md",
|
|
100
100
|
"LICENSE"
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "3f03e0e887e1a3fdbeeba66e270abbb74ae7a95b"
|
|
103
103
|
}
|