@xplortech/apollo-core 1.0.0-beta.7 → 1.0.0-beta.8
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/build/style.css +4 -55
- package/dist/apollo-core/apollo-core.css +5 -5
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-10f00380.entry.js +1 -0
- package/dist/apollo-core/p-26ec64fe.entry.js +1 -0
- package/dist/apollo-core/p-2f90296c.js +2 -2
- package/dist/apollo-core/p-31acfdb4.entry.js +1 -0
- package/dist/apollo-core/p-4184ac44.entry.js +1 -0
- package/dist/apollo-core/{p-dad11011.entry.js → p-4fa14839.entry.js} +1 -1
- package/dist/apollo-core/p-55b87345.js +2 -0
- package/dist/apollo-core/p-63a6c98a.entry.js +1 -0
- package/dist/apollo-core/p-68c33b77.entry.js +1 -0
- package/dist/apollo-core/{p-a7cc4114.entry.js → p-78d07caf.entry.js} +1 -1
- package/dist/apollo-core/p-796957d3.entry.js +1 -0
- package/dist/apollo-core/p-88160d68.entry.js +1 -0
- package/dist/apollo-core/p-9ec318bb.entry.js +1 -0
- package/dist/apollo-core/p-a2a34e44.entry.js +1 -0
- package/dist/apollo-core/p-beea2502.entry.js +1 -0
- package/dist/apollo-core/p-d499e43f.entry.js +1 -0
- package/dist/apollo-core/{p-c8af4ed6.entry.js → p-d8a3d94c.entry.js} +1 -1
- package/dist/apollo-core/p-e047b446.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +6 -2
- package/dist/cjs/{index-acf3dd7a.js → index-2ab4832e.js} +592 -215
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -13
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +72 -38
- package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -5
- package/dist/cjs/xpl-button-row.cjs.entry.js +4 -1
- package/dist/cjs/xpl-choicelist.cjs.entry.js +8 -1
- package/dist/cjs/xpl-divider.cjs.entry.js +2 -1
- package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +7 -1
- package/dist/cjs/xpl-dropdown_2.cjs.entry.js +8 -9
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input.cjs.entry.js +615 -501
- package/dist/cjs/xpl-list.cjs.entry.js +1 -23
- package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -4
- package/dist/cjs/xpl-pagination.cjs.entry.js +5 -2
- package/dist/cjs/xpl-select.cjs.entry.js +7 -22
- package/dist/cjs/xpl-toggle.cjs.entry.js +7 -4
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +118 -132
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +150 -144
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +26 -28
- package/dist/collection/components/xpl-badge/xpl-badge.js +43 -39
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +2 -5
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +2 -5
- package/dist/collection/components/xpl-button/xpl-button.js +204 -205
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +105 -104
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +181 -171
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +133 -126
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +27 -31
- package/dist/collection/components/xpl-divider/xpl-divider.js +26 -23
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +46 -42
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +26 -22
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +60 -54
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +170 -167
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +75 -74
- package/dist/collection/components/xpl-input/xpl-input.js +404 -417
- package/dist/collection/components/xpl-list/xpl-list.js +42 -75
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +47 -54
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +47 -49
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +116 -128
- package/dist/collection/components/xpl-radio/xpl-radio.js +157 -148
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +2 -4
- package/dist/collection/components/xpl-select/xpl-select.js +212 -238
- package/dist/collection/components/xpl-table/xpl-table.js +168 -151
- package/dist/collection/components/xpl-tag/xpl-tag.js +24 -25
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +137 -135
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +73 -70
- package/dist/custom-elements/index.js +756 -641
- package/dist/esm/apollo-core.js +3 -2
- package/dist/esm/{index-e3c4bb97.js → index-392b5b96.js} +592 -216
- package/dist/esm/loader.js +3 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/xpl-application-shell.entry.js +2 -13
- package/dist/esm/xpl-avatar_12.entry.js +72 -38
- package/dist/esm/xpl-backdrop.entry.js +1 -5
- package/dist/esm/xpl-button-row.entry.js +4 -1
- package/dist/esm/xpl-choicelist.entry.js +8 -1
- package/dist/esm/xpl-divider.entry.js +2 -1
- package/dist/esm/xpl-dropdown-group_3.entry.js +7 -1
- package/dist/esm/xpl-dropdown_2.entry.js +8 -9
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-input.entry.js +615 -501
- package/dist/esm/xpl-list.entry.js +1 -23
- package/dist/esm/xpl-main-nav.entry.js +1 -4
- package/dist/esm/xpl-pagination.entry.js +5 -2
- package/dist/esm/xpl-select.entry.js +7 -22
- package/dist/esm/xpl-toggle.entry.js +7 -4
- package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +1 -1
- package/dist/types/components/xpl-table/xpl-table.d.ts +2 -0
- package/dist/types/components.d.ts +47 -11
- package/dist/types/stencil-public-runtime.d.ts +85 -11
- package/loader/index.d.ts +9 -1
- package/loader/package.json +1 -0
- package/package.json +1 -1
- package/dist/apollo-core/p-25f84d39.entry.js +0 -1
- package/dist/apollo-core/p-2ce2fe5c.entry.js +0 -1
- package/dist/apollo-core/p-3ff1ff38.entry.js +0 -1
- package/dist/apollo-core/p-63dd9a65.entry.js +0 -1
- package/dist/apollo-core/p-6c3c1e3d.entry.js +0 -1
- package/dist/apollo-core/p-81a6ce4c.entry.js +0 -1
- package/dist/apollo-core/p-918b0731.entry.js +0 -1
- package/dist/apollo-core/p-a43e2d1f.entry.js +0 -1
- package/dist/apollo-core/p-b6d1b135.entry.js +0 -1
- package/dist/apollo-core/p-bc0ebed2.entry.js +0 -1
- package/dist/apollo-core/p-d4aa2fa9.js +0 -1
- package/dist/apollo-core/p-d4e5d3aa.entry.js +0 -1
- package/dist/apollo-core/p-db74c99c.entry.js +0 -1
- package/dist/apollo-core/p-ee16942f.entry.js +0 -1
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/application-shell.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/button.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/dropdown.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/input.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/list.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/select.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/table.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
3
|
export class XplToggle {
|
|
4
4
|
constructor() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
this.checked = undefined;
|
|
6
|
+
this.description = undefined;
|
|
7
|
+
this.disabled = undefined;
|
|
8
|
+
this.heading = undefined;
|
|
9
|
+
this.label = undefined;
|
|
10
|
+
this.name = undefined;
|
|
8
11
|
this.variant = 'default';
|
|
9
12
|
this.id = uuid();
|
|
10
13
|
}
|
|
@@ -15,143 +18,142 @@ export class XplToggle {
|
|
|
15
18
|
let className = 'xpl-toggle';
|
|
16
19
|
if (this.variant === 'small')
|
|
17
20
|
className += ' xpl-toggle--small';
|
|
18
|
-
return (h(Host, { class: containerClassName },
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
'xpl-description': true,
|
|
26
|
-
'xpl-description--disabled': this.disabled,
|
|
27
|
-
} }, this.description)))),
|
|
28
|
-
h("input", { class: className, type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name }),
|
|
29
|
-
this.label && h("label", { htmlFor: this.id }, this.label)));
|
|
21
|
+
return (h(Host, { class: containerClassName }, (this.heading || this.description) && (h("label", { class: {
|
|
22
|
+
'xpl-label': true,
|
|
23
|
+
'xpl-label--disabled': this.disabled,
|
|
24
|
+
}, htmlFor: this.id }, this.heading, this.description && (h("small", { class: {
|
|
25
|
+
'xpl-description': true,
|
|
26
|
+
'xpl-description--disabled': this.disabled,
|
|
27
|
+
} }, this.description)))), h("input", { class: className, type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name }), this.label && h("label", { htmlFor: this.id }, this.label)));
|
|
30
28
|
}
|
|
31
29
|
static get is() { return "xpl-toggle"; }
|
|
32
|
-
static get properties() {
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"checked": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"mutable": false,
|
|
35
|
+
"complexType": {
|
|
36
|
+
"original": "boolean",
|
|
37
|
+
"resolved": "boolean",
|
|
38
|
+
"references": {}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": true,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": ""
|
|
45
|
+
},
|
|
46
|
+
"attribute": "checked",
|
|
47
|
+
"reflect": false
|
|
40
48
|
},
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
49
|
+
"description": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "string",
|
|
54
|
+
"resolved": "string",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": true,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": "The toggle's description appears *above* the toggle."
|
|
62
|
+
},
|
|
63
|
+
"attribute": "description",
|
|
64
|
+
"reflect": false
|
|
46
65
|
},
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
66
|
+
"disabled": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"mutable": false,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "boolean",
|
|
71
|
+
"resolved": "boolean",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": true,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"attribute": "disabled",
|
|
81
|
+
"reflect": false
|
|
57
82
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
83
|
+
"heading": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": true,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "The toggle's heading appears *above* the toggle."
|
|
96
|
+
},
|
|
97
|
+
"attribute": "heading",
|
|
98
|
+
"reflect": false
|
|
63
99
|
},
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
100
|
+
"label": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "string",
|
|
105
|
+
"resolved": "string",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "The toggle's label appears *to the right of* the toggle."
|
|
113
|
+
},
|
|
114
|
+
"attribute": "label",
|
|
115
|
+
"reflect": false
|
|
74
116
|
},
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
117
|
+
"name": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": true,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": ""
|
|
130
|
+
},
|
|
131
|
+
"attribute": "name",
|
|
132
|
+
"reflect": false
|
|
80
133
|
},
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"resolved": "string",
|
|
107
|
-
"references": {}
|
|
108
|
-
},
|
|
109
|
-
"required": false,
|
|
110
|
-
"optional": true,
|
|
111
|
-
"docs": {
|
|
112
|
-
"tags": [],
|
|
113
|
-
"text": "The toggle's label appears *to the right of* the toggle."
|
|
114
|
-
},
|
|
115
|
-
"attribute": "label",
|
|
116
|
-
"reflect": false
|
|
117
|
-
},
|
|
118
|
-
"name": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"mutable": false,
|
|
121
|
-
"complexType": {
|
|
122
|
-
"original": "string",
|
|
123
|
-
"resolved": "string",
|
|
124
|
-
"references": {}
|
|
125
|
-
},
|
|
126
|
-
"required": false,
|
|
127
|
-
"optional": true,
|
|
128
|
-
"docs": {
|
|
129
|
-
"tags": [],
|
|
130
|
-
"text": ""
|
|
131
|
-
},
|
|
132
|
-
"attribute": "name",
|
|
133
|
-
"reflect": false
|
|
134
|
-
},
|
|
135
|
-
"variant": {
|
|
136
|
-
"type": "string",
|
|
137
|
-
"mutable": false,
|
|
138
|
-
"complexType": {
|
|
139
|
-
"original": "'default' | 'small'",
|
|
140
|
-
"resolved": "\"default\" | \"small\"",
|
|
141
|
-
"references": {}
|
|
142
|
-
},
|
|
143
|
-
"required": false,
|
|
144
|
-
"optional": true,
|
|
145
|
-
"docs": {
|
|
146
|
-
"tags": [],
|
|
147
|
-
"text": "The size of the toggle -- `default` or `small`"
|
|
148
|
-
},
|
|
149
|
-
"attribute": "variant",
|
|
150
|
-
"reflect": false,
|
|
151
|
-
"defaultValue": "'default'"
|
|
152
|
-
}
|
|
153
|
-
}; }
|
|
154
|
-
static get states() { return {
|
|
155
|
-
"id": {}
|
|
156
|
-
}; }
|
|
134
|
+
"variant": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"mutable": false,
|
|
137
|
+
"complexType": {
|
|
138
|
+
"original": "'default' | 'small'",
|
|
139
|
+
"resolved": "\"default\" | \"small\"",
|
|
140
|
+
"references": {}
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"optional": true,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "The size of the toggle -- `default` or `small`"
|
|
147
|
+
},
|
|
148
|
+
"attribute": "variant",
|
|
149
|
+
"reflect": false,
|
|
150
|
+
"defaultValue": "'default'"
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
static get states() {
|
|
155
|
+
return {
|
|
156
|
+
"id": {}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
157
159
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Host, } from '@stencil/core';
|
|
2
2
|
export class XplUtilityBar {
|
|
3
3
|
constructor() {
|
|
4
|
-
this.open = true;
|
|
5
4
|
this.bars = `
|
|
6
5
|
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="bars" class="svg-inline--fa fa-bars fa-w-14 xpl-utility-nav__bars" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>
|
|
7
6
|
`;
|
|
7
|
+
this.navControl = undefined;
|
|
8
|
+
this.isNavOpenAtStartup = undefined;
|
|
9
|
+
this.open = true;
|
|
8
10
|
}
|
|
9
11
|
onNavToggle() {
|
|
10
12
|
this.open = !this.open;
|
|
@@ -17,76 +19,77 @@ export class XplUtilityBar {
|
|
|
17
19
|
: this.open;
|
|
18
20
|
}
|
|
19
21
|
render() {
|
|
20
|
-
return (h(Host, null,
|
|
21
|
-
h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" },
|
|
22
|
-
this.navControl ? (h("div", null,
|
|
23
|
-
h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }),
|
|
24
|
-
h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })),
|
|
25
|
-
h("slot", { name: "main" }))));
|
|
22
|
+
return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { name: "main" }))));
|
|
26
23
|
}
|
|
27
24
|
static get is() { return "xpl-utility-bar"; }
|
|
28
|
-
static get properties() {
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"isNavOpenAtStartup": {
|
|
50
|
-
"type": "boolean",
|
|
51
|
-
"mutable": false,
|
|
52
|
-
"complexType": {
|
|
53
|
-
"original": "boolean",
|
|
54
|
-
"resolved": "boolean",
|
|
55
|
-
"references": {}
|
|
56
|
-
},
|
|
57
|
-
"required": false,
|
|
58
|
-
"optional": true,
|
|
59
|
-
"docs": {
|
|
60
|
-
"tags": [{
|
|
61
|
-
"text": "{boolean} - Optional property that defines whether or not the main nav is open at startup.",
|
|
62
|
-
"name": "property"
|
|
63
|
-
}],
|
|
64
|
-
"text": ""
|
|
25
|
+
static get properties() {
|
|
26
|
+
return {
|
|
27
|
+
"navControl": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "boolean",
|
|
32
|
+
"resolved": "boolean",
|
|
33
|
+
"references": {}
|
|
34
|
+
},
|
|
35
|
+
"required": false,
|
|
36
|
+
"optional": true,
|
|
37
|
+
"docs": {
|
|
38
|
+
"tags": [{
|
|
39
|
+
"name": "property",
|
|
40
|
+
"text": "{boolean} - whether or not to show the bars to control the state of the navigation bar (open/close)"
|
|
41
|
+
}],
|
|
42
|
+
"text": ""
|
|
43
|
+
},
|
|
44
|
+
"attribute": "nav-control",
|
|
45
|
+
"reflect": false
|
|
65
46
|
},
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
},
|
|
86
|
-
"complexType": {
|
|
87
|
-
"original": "boolean",
|
|
88
|
-
"resolved": "boolean",
|
|
89
|
-
"references": {}
|
|
47
|
+
"isNavOpenAtStartup": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "boolean",
|
|
52
|
+
"resolved": "boolean",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": true,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [{
|
|
59
|
+
"name": "property",
|
|
60
|
+
"text": "{boolean} - Optional property that defines whether or not the main nav is open at startup."
|
|
61
|
+
}],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"attribute": "is-nav-open-at-startup",
|
|
65
|
+
"reflect": false
|
|
90
66
|
}
|
|
91
|
-
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get states() {
|
|
70
|
+
return {
|
|
71
|
+
"open": {}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
static get events() {
|
|
75
|
+
return [{
|
|
76
|
+
"method": "navOpen",
|
|
77
|
+
"name": "navOpen",
|
|
78
|
+
"bubbles": true,
|
|
79
|
+
"cancelable": true,
|
|
80
|
+
"composed": true,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [{
|
|
83
|
+
"name": "event",
|
|
84
|
+
"text": "{boolean} - Emits the desired state of the navigation bar (open: true/false)"
|
|
85
|
+
}],
|
|
86
|
+
"text": ""
|
|
87
|
+
},
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "boolean",
|
|
90
|
+
"resolved": "boolean",
|
|
91
|
+
"references": {}
|
|
92
|
+
}
|
|
93
|
+
}];
|
|
94
|
+
}
|
|
92
95
|
}
|