@brightspace-ui/core 3.344.0 → 3.344.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.
@@ -35,7 +35,7 @@ class BackdropStaleOverlay extends LocalizeCoreElement(LitElement) {
35
35
 
36
36
  render() {
37
37
  const message = this.text || this.localize('components.backdrop-stale-overlay.message');
38
- const buttonText = this.buttonText || this.localize('intl-common:actions:reload');;
38
+ const buttonText = this.buttonText || this.localizeCommon('actions:reload');;
39
39
 
40
40
  return html`
41
41
  <p class="d2l-body-compact">${message}</p>
@@ -34,7 +34,7 @@ class ButtonCopy extends FocusMixin(ButtonCopyMixin(LitElement)) {
34
34
  <d2l-button-icon
35
35
  ?disabled="${this.disabled}"
36
36
  icon="${this._recentCopySuccessful ? 'tier1:check' : 'tier1:copy'}"
37
- text="${this.text ?? this.localize('intl-common:actions:copy')}"
37
+ text="${this.text ?? this.localizeCommon('actions:copy')}"
38
38
  @click="${this._handleClick}">
39
39
  </d2l-button-icon>
40
40
  ${this._renderToast()}
@@ -14,6 +14,7 @@ export const styles = css`
14
14
  display: none;
15
15
  }
16
16
  :host .d2l-code-view-code {
17
+ direction: ltr;
17
18
  font-size: 14px;
18
19
  }
19
20
  :host .d2l-code-view-code::before {
@@ -21,10 +22,10 @@ export const styles = css`
21
22
  color: var(--d2l-color-tungsten);
22
23
  content: attr(data-language);
23
24
  font-size: 0.7rem;
25
+ inset-inline-end: 0;
24
26
  margin: 0 0.4rem;
25
27
  padding: 0;
26
28
  position: absolute;
27
- right: 0;
28
29
  top: 0;
29
30
  }
30
31
  :host([hide-language]) .d2l-code-view-code::before {
@@ -83,9 +83,9 @@ class DemoSnippet extends LitElement {
83
83
  d2l-dropdown.settings-dropdown {
84
84
  background-color: var(--d2l-theme-background-color-base);
85
85
  border-radius: 6px;
86
+ inset-inline-end: 1rem;
86
87
  outline: 1px solid var(--d2l-color-celestine-minus-1);
87
88
  position: fixed;
88
- right: 1rem;
89
89
  top: -0.25rem;
90
90
  translate: 0 -1.5rem;
91
91
  z-index: 9999; /* stack on top of sticky headers */
@@ -26,11 +26,7 @@
26
26
  list-style-type: none;
27
27
  }
28
28
  d2l-selection-input {
29
- margin-right: 10px;
30
- }
31
- [dir="rtl"] d2l-selection-input {
32
- margin-left: 10px;
33
- margin-right: 0;
29
+ margin-inline-end: 10px;
34
30
  }
35
31
  .d2l-selection-collections {
36
32
  display: flex;
@@ -2594,7 +2594,7 @@
2594
2594
  },
2595
2595
  {
2596
2596
  "name": "styles",
2597
- "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\tbackground-color: var(--d2l-theme-background-color-base);\\n\\t\\t\\tborder: 1px solid var(--d2l-theme-border-color-standard);\\n\\t\\t\\tborder-radius: 6px;\\n\\t\\t\\tbox-shadow: var(--d2l-theme-shadow-floating);\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tmax-width: 900px;\\n\\t\\t}\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t:host([full-width]) {\\n\\t\\t\\tmax-width: unset;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-wrapper {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-wrapper.fullscreen {\\n\\t\\t\\tbackground-color: var(--d2l-theme-background-color-base);\\n\\t\\t\\theight: 100vh;\\n\\t\\t\\tinset: 0;\\n\\t\\t\\toverflow: auto;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tz-index: 2;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo {\\n\\t\\t\\tflex: 1 1 auto;\\n\\t\\t\\tmin-width: 0;\\n\\t\\t\\tposition: relative;\\n\\t\\t}\\n\\t\\t:host([full-width]) .d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-demo {\\n\\t\\t\\twidth: 100vw;\\n\\t\\t}\\n\\t\\t:host([overflow-hidden]) .d2l-demo-snippet-demo {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-padding {\\n\\t\\t\\tpadding: 18px;\\n\\t\\t}\\n\\t\\t:host([no-padding]) .d2l-demo-snippet-demo-padding,\\n\\t\\t.d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-demo-padding {\\n\\t\\t\\tpadding: 0;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-settings {\\n\\t\\t\\tborder-inline-start: 1px solid var(--d2l-theme-border-color-standard);\\n\\t\\t\\tflex: 0 0 auto;\\n\\t\\t\\tpadding: 6px;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-settings {\\n\\t\\t\\tposition: sticky;\\n\\t\\t\\ttop: 0;\\n\\t\\t}\\n\\t\\td2l-dropdown.settings-dropdown {\\n\\t\\t\\tbackground-color: var(--d2l-theme-background-color-base);\\n\\t\\t\\tborder-radius: 6px;\\n\\t\\t\\toutline: 1px solid var(--d2l-color-celestine-minus-1);\\n\\t\\t\\tposition: fixed;\\n\\t\\t\\tright: 1rem;\\n\\t\\t\\ttop: -0.25rem;\\n\\t\\t\\ttranslate: 0 -1.5rem;\\n\\t\\t\\tz-index: 9999; /* stack on top of sticky headers */\\n\\t\\t}\\n\\t\\t@media (prefers-reduced-motion: no-preference) {\\n\\t\\t\\td2l-dropdown.settings-dropdown {\\n\\t\\t\\t\\ttransition: translate 0.15s, box-shadow 0.15s;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\td2l-dropdown.settings-dropdown.peek,\\n\\t\\td2l-dropdown.settings-dropdown:hover,\\n\\t\\td2l-dropdown.settings-dropdown:focus-within {\\n\\t\\t\\tbox-shadow: 0 -1px 0 1px white;\\n\\t\\t\\ttranslate: 0;\\n\\t\\t}\\n\\t\\td2l-code-view {\\n\\t\\t\\tborder: none;\\n\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t\\tmargin: 0;\\n\\t\\t\\tmax-width: 100%;\\n\\t\\t}\\n\\t\\t:host([code-view-hidden]) d2l-code-view {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t`\""
2597
+ "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\tbackground-color: var(--d2l-theme-background-color-base);\\n\\t\\t\\tborder: 1px solid var(--d2l-theme-border-color-standard);\\n\\t\\t\\tborder-radius: 6px;\\n\\t\\t\\tbox-shadow: var(--d2l-theme-shadow-floating);\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tmax-width: 900px;\\n\\t\\t}\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t:host([full-width]) {\\n\\t\\t\\tmax-width: unset;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-wrapper {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-wrapper.fullscreen {\\n\\t\\t\\tbackground-color: var(--d2l-theme-background-color-base);\\n\\t\\t\\theight: 100vh;\\n\\t\\t\\tinset: 0;\\n\\t\\t\\toverflow: auto;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tz-index: 2;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo {\\n\\t\\t\\tflex: 1 1 auto;\\n\\t\\t\\tmin-width: 0;\\n\\t\\t\\tposition: relative;\\n\\t\\t}\\n\\t\\t:host([full-width]) .d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-demo {\\n\\t\\t\\twidth: 100vw;\\n\\t\\t}\\n\\t\\t:host([overflow-hidden]) .d2l-demo-snippet-demo {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-padding {\\n\\t\\t\\tpadding: 18px;\\n\\t\\t}\\n\\t\\t:host([no-padding]) .d2l-demo-snippet-demo-padding,\\n\\t\\t.d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-demo-padding {\\n\\t\\t\\tpadding: 0;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-settings {\\n\\t\\t\\tborder-inline-start: 1px solid var(--d2l-theme-border-color-standard);\\n\\t\\t\\tflex: 0 0 auto;\\n\\t\\t\\tpadding: 6px;\\n\\t\\t}\\n\\t\\t.d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-settings {\\n\\t\\t\\tposition: sticky;\\n\\t\\t\\ttop: 0;\\n\\t\\t}\\n\\t\\td2l-dropdown.settings-dropdown {\\n\\t\\t\\tbackground-color: var(--d2l-theme-background-color-base);\\n\\t\\t\\tborder-radius: 6px;\\n\\t\\t\\tinset-inline-end: 1rem;\\n\\t\\t\\toutline: 1px solid var(--d2l-color-celestine-minus-1);\\n\\t\\t\\tposition: fixed;\\n\\t\\t\\ttop: -0.25rem;\\n\\t\\t\\ttranslate: 0 -1.5rem;\\n\\t\\t\\tz-index: 9999; /* stack on top of sticky headers */\\n\\t\\t}\\n\\t\\t@media (prefers-reduced-motion: no-preference) {\\n\\t\\t\\td2l-dropdown.settings-dropdown {\\n\\t\\t\\t\\ttransition: translate 0.15s, box-shadow 0.15s;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\td2l-dropdown.settings-dropdown.peek,\\n\\t\\td2l-dropdown.settings-dropdown:hover,\\n\\t\\td2l-dropdown.settings-dropdown:focus-within {\\n\\t\\t\\tbox-shadow: 0 -1px 0 1px white;\\n\\t\\t\\ttranslate: 0;\\n\\t\\t}\\n\\t\\td2l-code-view {\\n\\t\\t\\tborder: none;\\n\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t\\tmargin: 0;\\n\\t\\t\\tmax-width: 100%;\\n\\t\\t}\\n\\t\\t:host([code-view-hidden]) d2l-code-view {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t`\""
2598
2598
  },
2599
2599
  {
2600
2600
  "name": "fullWidth",
@@ -154,7 +154,7 @@ this.localizeHTML('octopus', {
154
154
 
155
155
  ### Common Resources
156
156
 
157
- Some resources are common and shared across D2L applications. To use these, set the `loadCommon` option:
157
+ Some localization resources are common and shared across D2L applications. To use these resources, set the `loadCommon` option:
158
158
 
159
159
  ```javascript
160
160
  static get localizeConfig() {
@@ -164,11 +164,21 @@ static get localizeConfig() {
164
164
  }
165
165
  ```
166
166
 
167
+ #### localizeCommon
168
+
169
+ The localized value of [these common terms](https://github.com/BrightspaceUI/intl/blob/main/lang/en.js) can be accessed using `localizeCommon(name)`, where `intl-common:` is omitted from the term name.
170
+
171
+ Example:
172
+
173
+ ```javascript
174
+ const value = localizer.localizeCommon('actions:copy'); // -> Copy in en-US
175
+ ```
176
+
167
177
  #### localizeCharacter
168
178
 
169
179
  The localized value of the following characters can be accessed using `localizeCharacter(char)`:
170
- * `'` (apostrophe)
171
180
  * `&` (ampersand)
181
+ * `'` (apostrophe)
172
182
  * `*` (asterisk)
173
183
  * `\` (backslash)
174
184
  * `:` (colon)
@@ -182,7 +192,7 @@ The localized value of the following characters can be accessed using `localizeC
182
192
  * `"` (quotation mark)
183
193
 
184
194
  ```javascript
185
- this.localizeCharacter('&'); // -> 'ampersand' in en-US
195
+ const value = this.localizeCharacter('&'); // -> 'ampersand' in en-US
186
196
  ```
187
197
 
188
198
  ## Off-Stack Language Overrides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.344.0",
3
+ "version": "3.344.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",