@brightspace-ui/core 3.143.1 → 3.144.1

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.
@@ -143,12 +143,19 @@ export const ListItemMixin = superclass => class extends composeMixins(
143
143
  }
144
144
 
145
145
  :host(:first-of-type) [slot="control-container"]::before,
146
- [slot="control-container"]::after {
146
+ [slot="control-container"]::after,
147
+ :host([_list-item-new-styles][expandable][expanded]:not(:last-of-type))::after,
148
+ :host([_list-item-new-styles][_has-nested-list]:not([expandable]):not(:last-of-type))::after {
147
149
  border-top: 1px solid var(--d2l-color-mica);
148
150
  content: "";
149
151
  position: absolute;
150
152
  width: 100%;
151
153
  }
154
+ :host([_list-item-new-styles][draggable][expandable][expanded]:not(:last-of-type))::after,
155
+ :host([_list-item-new-styles][draggable][_has-nested-list]:not([expandable]):not(:last-of-type))::after {
156
+ inset-inline-start: 1.5rem; /* left and right margins of 0.3rem + drag handle width of 0.9rem */
157
+ width: calc(100% - 1.5rem);
158
+ }
152
159
  :host(:not([_white-background-add-button])[_has-nested-list-add-button]) [slot="before-content"] {
153
160
  border-bottom: 1px solid var(--d2l-color-mica);
154
161
  margin-bottom: -1px;
@@ -5,6 +5,11 @@
5
5
  <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
6
6
  <meta charset="UTF-8">
7
7
  <link rel="stylesheet" href="../../demo/styles.css" type="text/css">
8
+ <script type="module">
9
+ import { mockFlag } from '../../../helpers/flags.js';
10
+ const urlParams = new URLSearchParams(window.location.search);
11
+ mockFlag('GAUD-7355-tooltip-popover', urlParams.get('popover') === 'true');
12
+ </script>
8
13
  <script type="module">
9
14
  import '../../button/button.js';
10
15
  import '../../colors/colors.js';
@@ -97,6 +102,40 @@
97
102
  </template>
98
103
  </d2l-demo-snippet>
99
104
 
105
+ <h2>Tooltip (position)</h2>
106
+ <d2l-demo-snippet>
107
+ <template>
108
+ <div>
109
+ <select id="position">
110
+ <option value="bottom" selected>bottom</option>
111
+ <option value="left">left</option>
112
+ <option value="right">right</option>
113
+ <option value="top">top</option>
114
+ </select>
115
+ <select id="align">
116
+ <option value="center" selected>center</option>
117
+ <option value="start">start</option>
118
+ <option value="end">end</option>
119
+ </select>
120
+ </div>
121
+ <div style="text-align: center;">
122
+ <d2l-button id="tooltip-position">Tooltip Position</d2l-button>
123
+ <d2l-tooltip for="tooltip-position">
124
+ This tooltip will be positioned according to the above selections for location and alignment.
125
+ </d2l-tooltip>
126
+ </div>
127
+ <script data-demo-hide>
128
+ const demo = document.currentScript.parentNode;
129
+ demo.querySelector('#position').addEventListener('change', e => {
130
+ demo.querySelector('d2l-tooltip').position = e.target.value;
131
+ });
132
+ demo.querySelector('#align').addEventListener('change', e => {
133
+ demo.querySelector('d2l-tooltip').align = (e.target.value !== 'center' ? e.target.value : undefined);
134
+ });
135
+ </script>
136
+ </template>
137
+ </d2l-demo-snippet>
138
+
100
139
  <h2>Tooltip (boundary)</h2>
101
140
  <d2l-demo-snippet>
102
141
  <template>
@@ -146,7 +185,7 @@
146
185
  <div class="bounded">
147
186
  <d2l-button id="tooltip-bounded">Bounded Tooltip</d2l-button>
148
187
  <d2l-tooltip for="tooltip-bounded">
149
- A bounded tooltip message that will wrap to more than one line.
188
+ A tooltip message inside of a container that hides overflow.
150
189
  </d2l-tooltip>
151
190
  </div>
152
191
  </template>