@brightspace-ui/core 1.235.3 → 1.236.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/README.md +1 -0
- package/components/button/button-mixin.js +4 -6
- package/components/card/card.js +4 -7
- package/components/filter/filter.js +4 -6
- package/components/focus-trap/focus-trap.js +4 -6
- package/components/inputs/input-checkbox.js +4 -6
- package/components/inputs/input-date-range.js +4 -6
- package/components/inputs/input-date-time-range.js +4 -6
- package/components/inputs/input-date-time.js +4 -6
- package/components/inputs/input-date.js +4 -5
- package/components/inputs/input-number.js +4 -11
- package/components/inputs/input-percent.js +4 -6
- package/components/inputs/input-search.js +4 -6
- package/components/inputs/input-text.js +4 -11
- package/components/inputs/input-textarea.js +4 -11
- package/components/inputs/input-time-range.js +4 -6
- package/components/inputs/input-time.js +4 -6
- package/components/link/link.js +4 -5
- package/components/overflow-group/demo/overflow-group.html +9 -11
- package/components/overflow-group/overflow-group.js +28 -28
- package/components/selection/selection-action-dropdown.js +4 -6
- package/components/selection/selection-action.js +4 -6
- package/components/selection/selection-select-all-pages.js +4 -6
- package/components/selection/selection-select-all.js +4 -6
- package/components/switch/switch-mixin.js +4 -6
- package/components/table/table-col-sort-button.js +4 -6
- package/custom-elements.json +130 -0
- package/lang/hi.js +19 -19
- package/mixins/focus-mixin.js +41 -0
- package/mixins/focus-mixin.md +24 -0
- package/package.json +1 -1
package/lang/hi.js
CHANGED
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
"components.input-date-time-range.endDate": "समाप्ति तारीख़",
|
|
41
41
|
"components.input-date-time-range.errorBadInput": "{startLabel} {endLabel} से पहले का होना चाहिए",
|
|
42
42
|
"components.input-date-time-range.startDate": "प्रारंभ तारीख़",
|
|
43
|
-
"components.input-date-time.date": "
|
|
43
|
+
"components.input-date-time.date": "तारीख़",
|
|
44
44
|
"components.input-date-time.errorMaxDateOnly": "तारीख़ {maxDate} से पहले की होनी चाहिए",
|
|
45
45
|
"components.input-date-time.errorMinDateOnly": "तारीख़ {minDate} के बाद की होनी चाहिए",
|
|
46
46
|
"components.input-date-time.errorOutsideRange": "तारीख़ {minDate} और {maxDate} के बीच होनी चाहिए",
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
"components.input-date.errorMinDateOnly": "तारीख़ {minDate} के बाद की होनी चाहिए",
|
|
51
51
|
"components.input-date.errorOutsideRange": "तारीख़ {minDate} और {maxDate} के बीच होनी चाहिए",
|
|
52
52
|
"components.input-date.openInstructions": "तारीख़ फ़ॉर्मेट {format} का उपयोग करें। लघु-कैलेंडर तक पहुँचने के लिए तीर नीचे या एंटर दबाएँ।",
|
|
53
|
-
"components.input-date.now": "
|
|
53
|
+
"components.input-date.now": "अभी",
|
|
54
54
|
"components.input-date.today": "आज",
|
|
55
55
|
"components.input-number.hintInteger": "यह फ़ील्ड केवल पूर्णांक मानों (कोई दशमलव नहीं) को स्वीकार करती है",
|
|
56
56
|
"components.input-number.hintDecimalDuplicate": "इस संख्या में पहले से ही कोई दशमलव है",
|
|
@@ -64,22 +64,22 @@ export default {
|
|
|
64
64
|
"components.input-time-range.startTime": "प्रारंभ समय",
|
|
65
65
|
"components.list-item-drag-handle.default": "{name} के लिए आइटम कार्रवाई का क्रम बदलें",
|
|
66
66
|
"components.list-item-drag-handle.keyboard": "आइटम का क्रम बदलें, {size} में से वर्तमान स्थिति {currentPosition} इस आइटम को ले जाने के लिए, ऊपर या नीचे तीर दबाएँ।",
|
|
67
|
-
"components.list-item-tooltip.title": "
|
|
68
|
-
"components.list-item-tooltip.enter-key": "
|
|
69
|
-
"components.list-item-tooltip.enter-desc": "
|
|
70
|
-
"components.list-item-tooltip.up-down-key": "
|
|
71
|
-
"components.list-item-tooltip.up-down-desc": "
|
|
72
|
-
"components.list-item-tooltip.left-right-key": "
|
|
73
|
-
"components.list-item-tooltip.left-right-desc": "
|
|
74
|
-
"components.list-item-tooltip.page-up-down-key": "
|
|
75
|
-
"components.list-item-tooltip.page-up-down-desc": "
|
|
76
|
-
"components.list-item-drag-handle-tooltip.title": "
|
|
77
|
-
"components.list-item-drag-handle-tooltip.enter-key": "
|
|
78
|
-
"components.list-item-drag-handle-tooltip.enter-desc": "
|
|
79
|
-
"components.list-item-drag-handle-tooltip.up-down-key": "
|
|
80
|
-
"components.list-item-drag-handle-tooltip.up-down-desc": "
|
|
81
|
-
"components.list-item-drag-handle-tooltip.left-right-key": "
|
|
82
|
-
"components.list-item-drag-handle-tooltip.left-right-desc": "
|
|
67
|
+
"components.list-item-tooltip.title": "सूचियों के लिए कीबोर्ड नेविगेशन:",
|
|
68
|
+
"components.list-item-tooltip.enter-key": "डालें",
|
|
69
|
+
"components.list-item-tooltip.enter-desc": "फ़ोकस किए गए विकल्प को सक्रिय करें।",
|
|
70
|
+
"components.list-item-tooltip.up-down-key": "ऊपर/नीचे",
|
|
71
|
+
"components.list-item-tooltip.up-down-desc": "सूची के आइटम के बीच फोकस ले जाएँ।",
|
|
72
|
+
"components.list-item-tooltip.left-right-key": "बायाँ/दायाँ",
|
|
73
|
+
"components.list-item-tooltip.left-right-desc": "मौजूदा आइटम में फ़ोकस को इधर से उधर ले जाएँ।",
|
|
74
|
+
"components.list-item-tooltip.page-up-down-key": "पेज ऊपर/नीचे",
|
|
75
|
+
"components.list-item-tooltip.page-up-down-desc": "एक बार में पाँच आइटम पर फ़ोकस ले जाएँ।",
|
|
76
|
+
"components.list-item-drag-handle-tooltip.title": "क्रम बदलने के लिए कीबोर्ड नियंत्रण:",
|
|
77
|
+
"components.list-item-drag-handle-tooltip.enter-key": "डालें",
|
|
78
|
+
"components.list-item-drag-handle-tooltip.enter-desc": "कीबोर्ड का क्रम बदलना मोड को टॉगल करें।",
|
|
79
|
+
"components.list-item-drag-handle-tooltip.up-down-key": "ऊपर/नीचे",
|
|
80
|
+
"components.list-item-drag-handle-tooltip.up-down-desc": "आइटम को सूची में ऊपर या नीचे ले जाएँ।",
|
|
81
|
+
"components.list-item-drag-handle-tooltip.left-right-key": "बायाँ/दायाँ",
|
|
82
|
+
"components.list-item-drag-handle-tooltip.left-right-desc": "नेस्ट करने का स्तर बदलें।",
|
|
83
83
|
"components.menu-item-return.return": "पिछले मेनू पर वापस जाएँ।",
|
|
84
84
|
"components.menu-item-return.returnCurrentlyShowing": "पिछले मेनू पर वापस जाएँ। आप {menuTitle} देख रहे हैं।",
|
|
85
85
|
"components.meter-mixin.commaSeperatedAria": "{term1}, {term2}",
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
"components.overflow-group.moreActions": "अधिक क्रियाएँ",
|
|
91
91
|
"components.selection.action-hint": "यह कार्रवाई निष्पादित करने के लिए कोई आइटम का चयन करें।",
|
|
92
92
|
"components.selection.select-all": "सभी का चयन करें",
|
|
93
|
-
"components.selection.select-all-items": "
|
|
93
|
+
"components.selection.select-all-items": "सभी {count} आइटम चुनें।",
|
|
94
94
|
"components.selection.selected": "{count} चयनित",
|
|
95
95
|
"components.switch.visibility": "दृश्यता",
|
|
96
96
|
"components.tabs.next": "आगे स्क्रॉल करें",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { dedupeMixin } from '@open-wc/dedupe-mixin';
|
|
2
|
+
|
|
3
|
+
export const FocusMixin = dedupeMixin(superclass => class extends superclass {
|
|
4
|
+
|
|
5
|
+
static focusElementSelector = null;
|
|
6
|
+
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this._focusOnFirstRender = false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
firstUpdated(changedProperties) {
|
|
13
|
+
super.firstUpdated(changedProperties);
|
|
14
|
+
if (this._focusOnFirstRender) {
|
|
15
|
+
this._focusOnFirstRender = false;
|
|
16
|
+
this.focus();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
focus() {
|
|
21
|
+
|
|
22
|
+
const selector = this.constructor.focusElementSelector;
|
|
23
|
+
if (!selector) {
|
|
24
|
+
throw new Error(`FocusMixin: no static focusElementSelector provided for "${this.tagName}"`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (!this.hasUpdated) {
|
|
28
|
+
this._focusOnFirstRender = true;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const elem = this.shadowRoot.querySelector(selector);
|
|
33
|
+
if (!elem) {
|
|
34
|
+
throw new Error(`FocusMixin: selector "${selector}" yielded no element for "${this.tagName}"`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
elem.focus();
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# FocusMixin
|
|
2
|
+
|
|
3
|
+
The `FocusMixin` can be used to delegate focus to an element within a component's shadow root when its `focus()` method is called.
|
|
4
|
+
|
|
5
|
+
If the component has yet to render, focus will automatically be applied after `firstUpdated`.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Apply the mixin and set the static `focusElementSelector` to a CSS query selector which will match the element to which focus should be delegated.
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { FocusMixin } from '@brightspace-ui/core/mixins/focus-mixin.js';
|
|
13
|
+
|
|
14
|
+
class MyComponent extends FocusMixin(LitElement) {
|
|
15
|
+
|
|
16
|
+
// delegate focus to the underlying input
|
|
17
|
+
static focusElementSelector = 'input';
|
|
18
|
+
|
|
19
|
+
render() {
|
|
20
|
+
return html`<input type="text">`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.236.2",
|
|
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",
|