@brightspace-ui/core 3.262.1 → 3.262.3

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.
@@ -80,8 +80,12 @@ class ButtonMove extends ThemeMixin(FocusMixin(LitElement)) {
80
80
  * ACCESSIBILITY: REQUIRED: Accessible text for the button
81
81
  * @type {string}
82
82
  */
83
- text: { type: String, reflect: true }
84
-
83
+ text: { type: String, reflect: true },
84
+ /**
85
+ * Renders the buttons in a side by side orientation
86
+ * @type {boolean}
87
+ */
88
+ sideToSide: { type: Boolean, attribute: 'side-to-side', reflect: true }
85
89
  };
86
90
  }
87
91
 
@@ -135,19 +139,20 @@ class ButtonMove extends ThemeMixin(FocusMixin(LitElement)) {
135
139
  border-bottom-left-radius: 0.3rem;
136
140
  border-bottom-right-radius: 0.3rem;
137
141
  }
138
-
139
- .up-layer,
140
- .down-layer {
141
- height: 1.2rem;
142
+ .layer {
143
+ display: flex;
144
+ flex-direction: column;
145
+ height: calc(1.2rem * 2);
142
146
  inset-inline-start: -0.2rem;
143
147
  position: absolute;
144
- width: 1.3rem;
145
- }
146
- .up-layer {
147
148
  top: -0.35rem;
149
+ width: 1.3rem;
148
150
  }
151
+ .up-layer,
149
152
  .down-layer {
150
- bottom: -0.35rem;
153
+ height: 1.2rem;
154
+ position: relative;
155
+ width: 1.3rem;
151
156
  }
152
157
 
153
158
  /* Firefox includes a hidden border which messes up button dimensions */
@@ -165,6 +170,27 @@ class ButtonMove extends ThemeMixin(FocusMixin(LitElement)) {
165
170
  :host([disabled-down]) .down-layer {
166
171
  cursor: default;
167
172
  }
173
+
174
+ :host([side-to-side]) button {
175
+ align-items: center;
176
+ flex-direction: row;
177
+ height: 1.2rem;
178
+ justify-content: center;
179
+ width: calc(1.3rem * 2);
180
+ }
181
+
182
+ :host([side-to-side]) .layer {
183
+ flex-direction: row;
184
+ height: 1.2rem;
185
+ inset-inline-start: 0;
186
+ top: 0;
187
+ width: calc(1.3rem * 2);
188
+ }
189
+
190
+ :host([side-to-side]) d2l-icon {
191
+ /* Arrows need to be rotated in opposite direction for RTL */
192
+ transform: rotate(calc(-90deg * var(--d2l-length-factor)));
193
+ }
168
194
  `
169
195
  ];
170
196
  }
@@ -197,8 +223,10 @@ class ButtonMove extends ThemeMixin(FocusMixin(LitElement)) {
197
223
  type="button">
198
224
  <d2l-icon icon="tier1:arrow-toggle-up" class="up-icon"></d2l-icon>
199
225
  <d2l-icon icon="tier1:arrow-toggle-down" class="down-icon"></d2l-icon>
200
- <div class="up-layer" @click="${this._handleUpClick}"></div>
201
- <div class="down-layer" @click="${this._handleDownClick}"></div>
226
+ <div class="layer">
227
+ <div class="up-layer" @click="${this._handleUpClick}"></div>
228
+ <div class="down-layer" @click="${this._handleDownClick}"></div>
229
+ </div>
202
230
  </button>
203
231
  ${this.description ? html`<span id="${this._describedById}" hidden>${this.description}</span>` : null}
204
232
  </div>`;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object property lists are simple dot-separated lists of text, displayed sequentially on a single line. They are used to convey additional information or metadata about an object.
4
4
 
5
- <!-- docs: demo -->
5
+ <!-- docs: demo align:start autoSize:false size:small -->
6
6
  ```html
7
7
  <script type="module">
8
8
  import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
@@ -40,7 +40,7 @@ Object property lists are simple dot-separated lists of text, displayed sequenti
40
40
 
41
41
  An object property list can be defined using `d2l-object-property-list` and a combination of items (e.g., `d2l-object-property-list-item`, `d2l-object-property-list-item-link`).
42
42
 
43
- <!-- docs: demo code properties name:d2l-object-property-list sandboxTitle:'Object Property List' -->
43
+ <!-- docs: demo code properties name:d2l-object-property-list sandboxTitle:'Object Property List' align:start autoSize:false size:small -->
44
44
  ```html
45
45
  <script type="module">
46
46
  import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
@@ -142,7 +142,7 @@ The `d2l-object-property-list-item-link` component is a link item for the object
142
142
 
143
143
  The `d2l-object-property-list-item-tooltip-help` component is an item for the object property list which is used to also display additional information for users. It displays text as a help tooltip, with an optional leading icon.
144
144
 
145
- <!-- docs: demo code properties name:d2l-object-property-list-item-tooltip-help sandboxTitle:'Object Property List Help Tooltip Item' -->
145
+ <!-- docs: demo code properties name:d2l-object-property-list-item-tooltip-help sandboxTitle:'Object Property List Help Tooltip Item' align:start autoSize:false size:small -->
146
146
  ```html
147
147
  <script type="module">
148
148
  import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
@@ -1,6 +1,6 @@
1
1
  import { css } from 'lit';
2
- import { getFlag } from '../../helpers/flags.js';
3
2
  import { getUniqueId } from '../../helpers/uniqueId.js';
3
+ import { getUseNewTabsStructureFlag } from './tabs.js';
4
4
 
5
5
  export const TabPanelMixin = superclass => class extends superclass {
6
6
 
@@ -101,6 +101,6 @@ export const TabPanelMixin = superclass => class extends superclass {
101
101
  });
102
102
  }
103
103
 
104
- #useTabsNewStructure = getFlag('GAUD-8299-core-tabs-use-new-structure', false);
104
+ #useTabsNewStructure = getUseNewTabsStructureFlag();
105
105
 
106
106
  };
@@ -15,6 +15,10 @@ import { repeat } from 'lit/directives/repeat.js';
15
15
  import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
16
16
  import { styleMap } from 'lit/directives/style-map.js';
17
17
 
18
+ export function getUseNewTabsStructureFlag() {
19
+ return getFlag('GAUD-8299-core-tabs-use-new-structure', false);
20
+ }
21
+
18
22
  const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
19
23
 
20
24
  const scrollButtonWidth = 56;
@@ -427,7 +431,7 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
427
431
 
428
432
  #GAUD_9963_FLAG = getFlag('GAUD-9963-dropdown-tabs-not-resizing', false);
429
433
  #checkTabPanelMatchRequested;
430
- #newTabsPanelStructure = getFlag('GAUD-8299-core-tabs-use-new-structure', false);
434
+ #newTabsPanelStructure = getUseNewTabsStructureFlag();
431
435
  #panels;
432
436
  #updateAriaControlsRequested;
433
437
 
@@ -691,6 +691,11 @@
691
691
  "name": "text",
692
692
  "description": "ACCESSIBILITY: REQUIRED: Accessible text for the button",
693
693
  "type": "string"
694
+ },
695
+ {
696
+ "name": "side-to-side",
697
+ "description": "Renders the buttons in a side by side orientation",
698
+ "type": "boolean"
694
699
  }
695
700
  ],
696
701
  "properties": [
@@ -741,6 +746,12 @@
741
746
  "attribute": "text",
742
747
  "description": "ACCESSIBILITY: REQUIRED: Accessible text for the button",
743
748
  "type": "string"
749
+ },
750
+ {
751
+ "name": "sideToSide",
752
+ "attribute": "side-to-side",
753
+ "description": "Renders the buttons in a side by side orientation",
754
+ "type": "boolean"
744
755
  }
745
756
  ],
746
757
  "events": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.262.1",
3
+ "version": "3.262.3",
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",