@blockquote-web-components/blockquote-tabs 1.3.0 → 1.3.2
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/package.json +14 -64
- package/src/BlockquoteTabs.js +29 -23
- package/src/tab/BlockquoteTab.js +3 -1
- package/src/tabpanel/BlockquoteTabPanel.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-tabs",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Webcomponent blockquote-tabs following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"build": "echo \"This is not a TypeScript project, so no need to build.\"",
|
|
62
62
|
"dev:vite": "vite build",
|
|
63
63
|
"format": "npm run format:eslint && npm run format:prettier && npm run format:stylelint",
|
|
64
|
-
"format:eslint": "eslint
|
|
65
|
-
"format:prettier": "prettier \"**/*.{js,ts,json,html}\" --write --ignore-path .
|
|
66
|
-
"format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .
|
|
64
|
+
"format:eslint": "eslint . --fix",
|
|
65
|
+
"format:prettier": "prettier \"**/*.{js,ts,json,html}\" --write --ignore-path .prettierignore",
|
|
66
|
+
"format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .prettierignore",
|
|
67
67
|
"postinstall": "npm run sort:package",
|
|
68
68
|
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
|
69
|
-
"lint:eslint": "eslint
|
|
70
|
-
"lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .
|
|
71
|
-
"lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .
|
|
69
|
+
"lint:eslint": "eslint .",
|
|
70
|
+
"lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .prettierignore",
|
|
71
|
+
"lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .prettierignore",
|
|
72
72
|
"preview:vite": "vite preview",
|
|
73
73
|
"sass:watch": "sass-style-template",
|
|
74
74
|
"sort:package": "npx sort-package-json",
|
|
@@ -90,6 +90,8 @@
|
|
|
90
90
|
},
|
|
91
91
|
"prettier": {
|
|
92
92
|
"arrowParens": "avoid",
|
|
93
|
+
"bracketSameLine": true,
|
|
94
|
+
"htmlWhitespaceSensitivity": "ignore",
|
|
93
95
|
"printWidth": 100,
|
|
94
96
|
"singleQuote": true,
|
|
95
97
|
"trailingComma": "all",
|
|
@@ -103,58 +105,6 @@
|
|
|
103
105
|
}
|
|
104
106
|
]
|
|
105
107
|
},
|
|
106
|
-
"eslintConfig": {
|
|
107
|
-
"parserOptions": {
|
|
108
|
-
"ecmaVersion": "latest"
|
|
109
|
-
},
|
|
110
|
-
"extends": [
|
|
111
|
-
"@open-wc",
|
|
112
|
-
"prettier"
|
|
113
|
-
],
|
|
114
|
-
"rules": {
|
|
115
|
-
"class-methods-use-this": "off",
|
|
116
|
-
"indent": [
|
|
117
|
-
"error",
|
|
118
|
-
2,
|
|
119
|
-
{
|
|
120
|
-
"SwitchCase": 1,
|
|
121
|
-
"ignoredNodes": [
|
|
122
|
-
"PropertyDefinition",
|
|
123
|
-
"TemplateLiteral > *"
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
"no-unused-expressions": [
|
|
128
|
-
"error",
|
|
129
|
-
{
|
|
130
|
-
"allowShortCircuit": true,
|
|
131
|
-
"allowTernary": true
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
"object-curly-newline": "off",
|
|
135
|
-
"import/extensions": [
|
|
136
|
-
"error",
|
|
137
|
-
"always",
|
|
138
|
-
{
|
|
139
|
-
"ignorePackages": true
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"import/no-extraneous-dependencies": [
|
|
143
|
-
"error",
|
|
144
|
-
{
|
|
145
|
-
"devDependencies": [
|
|
146
|
-
"**/test/**/*.{js,ts}",
|
|
147
|
-
"**/*.config.{js,ts,mjs,cjs}",
|
|
148
|
-
"**/*.conf.{js,ts,mjs,cjs}"
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
"import/no-unresolved": "off",
|
|
153
|
-
"import/prefer-default-export": "off",
|
|
154
|
-
"lit/no-classfield-shadowing": "off",
|
|
155
|
-
"lit/no-native-attributes": "off"
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
108
|
"stylelint": {
|
|
159
109
|
"extends": "stylelint-config-standard-scss",
|
|
160
110
|
"rules": {
|
|
@@ -165,19 +115,19 @@
|
|
|
165
115
|
}
|
|
166
116
|
},
|
|
167
117
|
"dependencies": {
|
|
168
|
-
"@blockquote-web-components/blockquote-mixin-slot-content": "^1.5.
|
|
118
|
+
"@blockquote-web-components/blockquote-mixin-slot-content": "^1.5.2",
|
|
169
119
|
"@juggle/resize-observer": "^3.4.0",
|
|
170
120
|
"@lit-labs/observers": "^2.0.0",
|
|
171
121
|
"lit": "^3.1.1"
|
|
172
122
|
},
|
|
173
123
|
"devDependencies": {
|
|
174
|
-
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.
|
|
175
|
-
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.10.
|
|
176
|
-
"@blockquote-web-components/blockquote-foundations-sass": "^1.1.
|
|
124
|
+
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.9.1",
|
|
125
|
+
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.10.2",
|
|
126
|
+
"@blockquote-web-components/blockquote-foundations-sass": "^1.1.3"
|
|
177
127
|
},
|
|
178
128
|
"publishConfig": {
|
|
179
129
|
"access": "public"
|
|
180
130
|
},
|
|
181
131
|
"customElements": "custom-elements.json",
|
|
182
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "7edc86cd16ada68f0d940336b43bfc9ba9389b0a"
|
|
183
133
|
}
|
package/src/BlockquoteTabs.js
CHANGED
|
@@ -209,50 +209,56 @@ export class BlockquoteTabs extends BlockquoteMixinSlotContent(LitElement) {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
get _scrollContentTpl() {
|
|
212
|
-
return html`
|
|
213
|
-
class="scroll-content"
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
${this._tablistTpl}
|
|
218
|
-
</div>`;
|
|
212
|
+
return html`
|
|
213
|
+
<div class="scroll-content" ${ref(this._scrollContentRef)} @scroll="${this._scrollEdge}">
|
|
214
|
+
${this._tablistTpl}
|
|
215
|
+
</div>
|
|
216
|
+
`;
|
|
219
217
|
}
|
|
220
218
|
|
|
221
219
|
get _tablistTpl() {
|
|
222
|
-
return html`
|
|
223
|
-
<
|
|
224
|
-
|
|
220
|
+
return html`
|
|
221
|
+
<div role="tablist" aria-label="${this.label || nothing}">
|
|
222
|
+
<slot @click="${this._onTabClick}" @keydown="${this._onTabKeyDown}" name="tab"></slot>
|
|
223
|
+
</div>
|
|
224
|
+
`;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
get _separatorTpl() {
|
|
228
|
-
return html
|
|
228
|
+
return html`
|
|
229
|
+
<span aria-hidden="true" class="separator"></span>
|
|
230
|
+
`;
|
|
229
231
|
}
|
|
230
232
|
|
|
231
233
|
get _indicatorsTpl() {
|
|
232
|
-
return html`
|
|
234
|
+
return html`
|
|
235
|
+
<span
|
|
233
236
|
aria-hidden="true"
|
|
234
|
-
class="indicator ${this._hasScrollLeftIndicator ? 'show-indicator' : ''}"
|
|
235
|
-
></span>
|
|
237
|
+
class="indicator ${this._hasScrollLeftIndicator ? 'show-indicator' : ''}"></span>
|
|
236
238
|
<span
|
|
237
239
|
aria-hidden="true"
|
|
238
|
-
class="indicator ${this._hasScrollRightIndicator ? 'show-indicator' : ''}"
|
|
239
|
-
|
|
240
|
+
class="indicator ${this._hasScrollRightIndicator ? 'show-indicator' : ''}"></span>
|
|
241
|
+
`;
|
|
240
242
|
}
|
|
241
243
|
|
|
242
244
|
get _holdTpl() {
|
|
243
|
-
return html
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
return html`
|
|
246
|
+
<div class="hold">${this._scrollContentTpl} ${this._separatorTpl} ${this._indicatorsTpl}</div>
|
|
247
|
+
`;
|
|
246
248
|
}
|
|
247
249
|
|
|
248
250
|
get _tabpanelTpl() {
|
|
249
|
-
return html`
|
|
250
|
-
<
|
|
251
|
-
|
|
251
|
+
return html`
|
|
252
|
+
<div>
|
|
253
|
+
<slot name="tabpanel"></slot>
|
|
254
|
+
</div>
|
|
255
|
+
`;
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
render() {
|
|
255
|
-
return html`
|
|
259
|
+
return html`
|
|
260
|
+
${this._holdTpl} ${this._tabpanelTpl}
|
|
261
|
+
`;
|
|
256
262
|
}
|
|
257
263
|
|
|
258
264
|
_scrollEdge({ target = this._scrollContentRef.value } = {}) {
|
package/src/tab/BlockquoteTab.js
CHANGED