@brightspace-ui/core 3.165.0 → 3.165.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.
@@ -19,7 +19,6 @@ import { styleMap } from 'lit/directives/style-map.js';
19
19
 
20
20
  const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
21
21
  const overflowClipEnabled = getFlag('GAUD-7887-core-components-overflow-clipping', true);
22
- const newTabStructure = getFlag('GAUD-7146-tabs-new-structure', true);
23
22
 
24
23
  const scrollButtonWidth = 56;
25
24
 
@@ -1198,8 +1197,6 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
1198
1197
  }
1199
1198
 
1200
1199
  #handleTabDeselected(e) {
1201
- if (!newTabStructure) return;
1202
-
1203
1200
  const panel = this._getPanel(e.target.id);
1204
1201
  if (panel) panel.selected = false;
1205
1202
  }
@@ -4,7 +4,7 @@ The `LocalizeMixin` allows text in components to be displayed in the user's pref
4
4
 
5
5
  ## Language Resources
6
6
 
7
- Resources are stored as key-value JSON objects.
7
+ Resources are stored as JavaScript objects.
8
8
 
9
9
  ### Keys
10
10
 
@@ -14,28 +14,28 @@ For large projects, terms may be grouped using the `:` character. For example: `
14
14
 
15
15
  ### Values
16
16
 
17
- Term values must conform to the [ICU Message Syntax](https://formatjs.io/docs/core-concepts/icu-syntax/) format. It supports features such as: [simple arguments](https://formatjs.io/docs/core-concepts/icu-syntax/#simple-argument), the [`{select}` format](https://formatjs.io/docs/core-concepts/icu-syntax/#select-format) and [pluralization](https://formatjs.io/docs/core-concepts/icu-syntax/#plural-format).
17
+ Term values must contain a "message" that conforms to [ICU Message Syntax](https://formatjs.github.io/docs/core-concepts/icu-syntax/). The syntax supports features such as [simple arguments](https://formatjs.github.io/docs/core-concepts/icu-syntax/#simple-argument), [selection](https://formatjs.github.io/docs/core-concepts/icu-syntax/#select-format), and [pluralization](https://formatjs.github.io/docs/core-concepts/icu-syntax/#plural-format).
18
18
 
19
- > **Note:** Avoid using the ICU Message Syntax number, date and time formatting functionality. Brightspace allows customization of how these are localized, so use [@brightspace-ui/intl](https://github.com/BrightspaceUI/intl)'s `formatNumber`, `formatDate` and `formatTime` instead.
19
+ > **Note:** Avoid using ICU Message Syntax number and date/time formatting functionality. Brightspace allows customization of how these are localized, which is supported by [@brightspace-ui/intl](https://github.com/BrightspaceUI/intl)'s `formatNumber`, `formatDate` and `formatTime` functions.
20
20
 
21
21
  ### Files
22
22
 
23
- Store localization resources in their own directory with nothing else in it. There should be one JavaScript file for each supported locale.
23
+ Store resource files in their own directory (i.e. with nothing else in it). There should be one JavaScript file for each supported locale.
24
24
 
25
25
  ```javascript
26
- // en.js
26
+ // lang/en.js
27
27
  export default {
28
28
  "hello": "Hello {firstName}!"
29
29
  };
30
30
  ```
31
31
  ```javascript
32
- // fr.js
32
+ // lang/fr.js
33
33
  export default {
34
34
  "hello": "Bonjour {firstName}!"
35
35
  };
36
36
  ```
37
37
 
38
- Always provide language resources for base languages (e.g. `en`, `fr`, `pt`). That way, if the user prefers a regional language (e.g. `pt-br`) that isn't recognized, it can fall back to the base language (`pt`).
38
+ For every supported language, there should be a base file (e.g. `en.js`, `fr.js`, `pt.js`). That way, if the user prefers a regional language (e.g. `en-au`) that isn't recognized, it can fall back to the base file (`en.js`). You do _not_ need to duplicate a locale. For instance, if you support en-US and en-GB, your English language files would likely be `en.js` and `en-gb.js`.
39
39
 
40
40
  ## Using `LocalizeMixin`
41
41
 
@@ -71,7 +71,7 @@ Two common patterns for using `localize()` are within `render()` to modify the c
71
71
 
72
72
  The `localize()` method is used to localize a piece of text.
73
73
 
74
- If the localized string contains arguments, pass them as a key-value object as the 2nd parameter:
74
+ If the message contains arguments, supply a replacements object as the second parameter:
75
75
 
76
76
  ```javascript
77
77
  render() {
@@ -82,7 +82,7 @@ render() {
82
82
 
83
83
  ### `localizeHTML()`
84
84
 
85
- Rich formatting can be included in localization resources and safely converted to HTML with the `localizeHTML()` method.
85
+ Rich formatting can be included in messages and safely converted to HTML with the `localizeHTML()` method.
86
86
 
87
87
  #### Basic Formatting
88
88
 
@@ -113,7 +113,7 @@ this.localizeHTML('myTerm');
113
113
 
114
114
  #### Links
115
115
 
116
- To wrap text in [a link](../../components/link/), define a unique tag in the localization resource:
116
+ To wrap text in [a link](../../components/link/), surround it with a unique tag in the message:
117
117
 
118
118
  ```json
119
119
  {
@@ -133,7 +133,7 @@ this.localizeHTML('myTerm', {
133
133
 
134
134
  #### Help Tooltips
135
135
 
136
- To use a [help tooltip](../../components/tooltip/), define a unique tag in the localization resource in addition to the tooltip's text:
136
+ To use a [help tooltip](../../components/tooltip/), surround the tooltip's target text with a unique tag in the message:
137
137
 
138
138
  ```json
139
139
  {
@@ -154,7 +154,7 @@ this.localizeHTML('octopus', {
154
154
 
155
155
  ### Common Resources
156
156
 
157
- Some localization resources are common and shared across D2L applications. To use these resources, set the `loadCommon` option:
157
+ Some resources are common and shared across D2L applications. To use these, set the `loadCommon` option:
158
158
 
159
159
  ```javascript
160
160
  static get localizeConfig() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.165.0",
3
+ "version": "3.165.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",