@brightspace-ui/core 3.349.0 → 3.350.0
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/components/tabs/README.md +1 -0
- package/components/tabs/tabs.js +12 -0
- package/custom-elements.json +13 -0
- package/package.json +1 -1
|
@@ -79,6 +79,7 @@ The `d2l-tabs` element is a web component for tabbed content, providing layout a
|
|
|
79
79
|
|
|
80
80
|
| Property | Type | Description |
|
|
81
81
|
|--|--|--|
|
|
82
|
+
| `sticky` | Boolean | ADVANCED: Whether the header is sticky |
|
|
82
83
|
| `text` | String, required | ACCESSIBILITY: Accessible text for the tablist |
|
|
83
84
|
| `max-to-show` | Number | Used to limit the max-width/number of tabs to initially display |
|
|
84
85
|
|
package/components/tabs/tabs.js
CHANGED
|
@@ -35,6 +35,11 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
|
|
|
35
35
|
* @type {number}
|
|
36
36
|
*/
|
|
37
37
|
maxToShow: { type: Number, attribute: 'max-to-show' },
|
|
38
|
+
/**
|
|
39
|
+
* ADVANCED: Whether the header is sticky
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
sticky: { reflect: true, type: Boolean },
|
|
38
43
|
/**
|
|
39
44
|
* REQUIRED: ACCESSIBILITY: Accessible text for the tablist
|
|
40
45
|
* @type {string}
|
|
@@ -65,6 +70,12 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
|
|
|
65
70
|
transition: max-height 200ms ease-out, transform 200ms ease-out, opacity 200ms ease-out;
|
|
66
71
|
width: 100%;
|
|
67
72
|
}
|
|
73
|
+
:host([sticky]) .d2l-tabs-layout {
|
|
74
|
+
background-color: var(--d2l-tabs-background-color);
|
|
75
|
+
position: sticky;
|
|
76
|
+
top: 0;
|
|
77
|
+
z-index: 12; /* must be greater greater than collapsible panel */
|
|
78
|
+
}
|
|
68
79
|
.d2l-tabs-layout-anim {
|
|
69
80
|
display: flex;
|
|
70
81
|
}
|
|
@@ -215,6 +226,7 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
|
|
|
215
226
|
constructor() {
|
|
216
227
|
super();
|
|
217
228
|
this.maxToShow = -1;
|
|
229
|
+
this.sticky = false;
|
|
218
230
|
this._allowScrollNext = false;
|
|
219
231
|
this._allowScrollPrevious = false;
|
|
220
232
|
this.#loadingCompleteResolve = undefined;
|
package/custom-elements.json
CHANGED
|
@@ -17182,6 +17182,12 @@
|
|
|
17182
17182
|
"type": "number",
|
|
17183
17183
|
"default": "-1"
|
|
17184
17184
|
},
|
|
17185
|
+
{
|
|
17186
|
+
"name": "sticky",
|
|
17187
|
+
"description": "ADVANCED: Whether the header is sticky",
|
|
17188
|
+
"type": "boolean",
|
|
17189
|
+
"default": "false"
|
|
17190
|
+
},
|
|
17185
17191
|
{
|
|
17186
17192
|
"name": "skeleton",
|
|
17187
17193
|
"description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
|
|
@@ -17207,6 +17213,13 @@
|
|
|
17207
17213
|
"type": "number",
|
|
17208
17214
|
"default": "-1"
|
|
17209
17215
|
},
|
|
17216
|
+
{
|
|
17217
|
+
"name": "sticky",
|
|
17218
|
+
"attribute": "sticky",
|
|
17219
|
+
"description": "ADVANCED: Whether the header is sticky",
|
|
17220
|
+
"type": "boolean",
|
|
17221
|
+
"default": "false"
|
|
17222
|
+
},
|
|
17210
17223
|
{
|
|
17211
17224
|
"name": "arrowKeysDirection",
|
|
17212
17225
|
"type": "string",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.350.0",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|