@brightspace-ui/core 3.145.0 → 3.145.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.
@@ -8,6 +8,7 @@ Object property lists are simple dot-separated lists of text, displayed sequenti
8
8
  import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
9
9
  import '@brightspace-ui/core/components/object-property-list/object-property-list-item.js';
10
10
  import '@brightspace-ui/core/components/object-property-list/object-property-list-item-link.js';
11
+ import '@brightspace-ui/core/components/object-property-list/object-property-list-item-tooltip-help.js';
11
12
  import '@brightspace-ui/core/components/status-indicator/status-indicator.js';
12
13
  </script>
13
14
 
@@ -17,6 +18,9 @@ Object property lists are simple dot-separated lists of text, displayed sequenti
17
18
  <d2l-object-property-list-item text="Example item with icon" icon="tier1:grade"></d2l-object-property-list-item>
18
19
  <d2l-object-property-list-item-link text="Example link" href="https://www.d2l.com/"></d2l-object-property-list-item-link>
19
20
  <d2l-object-property-list-item-link text="Example link with icon" href="https://www.d2l.com/" icon="tier1:alert"></d2l-object-property-list-item-link>
21
+ <d2l-object-property-list-item-tooltip-help text="Example tooltip help with icon" icon="tier1:grade">
22
+ These are extra details
23
+ </d2l-object-property-list-item-tooltip-help>
20
24
  </d2l-object-property-list>
21
25
  ```
22
26
 
@@ -42,11 +46,15 @@ An object property list can be defined using `d2l-object-property-list` and a co
42
46
  import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
43
47
  import '@brightspace-ui/core/components/object-property-list/object-property-list-item.js';
44
48
  import '@brightspace-ui/core/components/object-property-list/object-property-list-item-link.js';
49
+ import '@brightspace-ui/core/components/object-property-list/object-property-list-item-tooltip-help.js';
45
50
  </script>
46
51
 
47
52
  <d2l-object-property-list>
48
53
  <d2l-object-property-list-item text="Example item"></d2l-object-property-list-item>
49
54
  <d2l-object-property-list-item-link text="Example link" href="https://www.d2l.com/"></d2l-object-property-list-item-link>
55
+ <d2l-object-property-list-item-tooltip-help text="Example link">
56
+ These are extra details
57
+ </d2l-object-property-list-item-tooltip-help>
50
58
  </d2l-object-property-list>
51
59
  ```
52
60
 
@@ -130,6 +138,52 @@ The `d2l-object-property-list-item-link` component is a link item for the object
130
138
  | `target` | String | Where to display the linked URL |
131
139
  <!-- docs: end hidden content -->
132
140
 
141
+ ## Help Tooltip Item [d2l-object-property-list-item-tooltip-help]
142
+
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
+
145
+ <!-- docs: demo code properties name:d2l-object-property-list-item-tooltip-help sandboxTitle:'Object Property List Help Tooltip Item' -->
146
+ ```html
147
+ <script type="module">
148
+ import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
149
+ import '@brightspace-ui/core/components/object-property-list/object-property-list-item-tooltip-help.js';
150
+ </script>
151
+
152
+ <d2l-object-property-list>
153
+ <d2l-object-property-list-item-tooltip-help text="Example item">
154
+ These are extra details
155
+ </d2l-object-property-list-item-tooltip-help>
156
+ <d2l-object-property-list-item-tooltip-help text="Example item with icon" icon="tier1:grade">
157
+ These are extra details
158
+ </d2l-object-property-list-item-tooltip-help>
159
+ <d2l-object-property-list-item-tooltip-help text="Example item with custom icon">
160
+ These are extra details
161
+ <d2l-icon-custom slot="icon">
162
+ <svg xmlns="http://www.w3.org/2000/svg" mirror-in-rtl="true">
163
+ <path fill="#494c4e" d="M18 12v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-5a1 1 0 0 1 2 0v4h14v-4a1 1 0 0 1 2 0z"/>
164
+ <path fill="#494c4e" d="M13.85 3.15l-2.99-3A.507.507 0 0 0 10.5 0H5.4A1.417 1.417 0 0 0 4 1.43v11.14A1.417 1.417 0 0 0 5.4 14h7.2a1.417 1.417 0 0 0 1.4-1.43V3.5a.47.47 0 0 0-.15-.35zM7 2h1a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm4 10H7a1 1 0 0 1 0-2h4a1 1 0 0 1 0 2zm0-4H7a1 1 0 0 1 0-2h4a1 1 0 0 1 0 2z"/>
165
+ </svg>
166
+ </d2l-icon-custom>
167
+ </d2l-object-property-list-item-tooltip-help>
168
+ </d2l-object-property-list>
169
+ ```
170
+
171
+ <!-- docs: start hidden content -->
172
+ ### Slots
173
+
174
+ | Slot | Type | Description |
175
+ |--|--|--|
176
+ | `default` | required | Default content placed inside of the tooltip |
177
+ | `icon` | optional | Optional slot for a custom icon |
178
+
179
+ ### Properties
180
+
181
+ | Property | Type | Description |
182
+ |--|--|--|
183
+ | `text` | String, required | Text displayed by the item |
184
+ | `icon` | String | [Preset icon key](../icons#preset-icons) (e.g. `tier1:gear`) |
185
+ <!-- docs: end hidden content -->
186
+
133
187
  ## Status Slot
134
188
 
135
189
  Object property lists can optionally contain a single `d2l-status-indicator` inserted into the `status` slot.
@@ -8,6 +8,7 @@ import { ObjectPropertyListItem } from './object-property-list-item.js';
8
8
  * A single object property, to be used within an object-property-list,
9
9
  * rendered as a help tooltip and with an optional icon.
10
10
  * @slot - Default content placed inside of the tooltip
11
+ * @slot icon - Optional slot for a custom icon
11
12
  */
12
13
  class ObjectPropertyListItemTooltipHelp extends FocusMixin(ObjectPropertyListItem) {
13
14
  static get properties() {
@@ -117,6 +117,7 @@ The `d2l-tooltip` component is used to display additional information when users
117
117
  | `disable-focus-lock` | Boolean, default: `false` | Disables focus lock so that the tooltip will automatically close when no longer hovered even if it still has focus |
118
118
  | `force-show` | Boolean, default: `false` | Force the tooltip to stay open as long as it remains `true` |
119
119
  | `for-type` | String, default: `descriptor` | Accessibility type for the tooltip to specify whether it is the primary label for the target or a secondary descriptor. Valid values are: `label` and `descriptor`. |
120
+ | `icon` | String | [Preset icon key](../../components/icons#preset-icons) (e.g. `tier1:gear`) |
120
121
  | `show-truncated-only` | Boolean, default: `false` | Only show the tooltip if we detect the target element is truncated |
121
122
  | `position` | String | Optionally force the tooltip to open in a certain direction. Valid values are: `top`, `bottom`, `left` and `right`. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left. |
122
123
 
@@ -215,6 +216,13 @@ The `d2l-tooltip-help` component is used to display additional information when
215
216
  ```
216
217
 
217
218
  <!-- docs: start hidden content -->
219
+ ### Slots
220
+
221
+ | Slot | Type | Description |
222
+ |--|--|--|
223
+ | `default` | required | Default content placed inside of the tooltip |
224
+ | `icon` | optional | Optional slot for a custom icon |
225
+
218
226
  ### Properties
219
227
 
220
228
  | Property | Type | Description |
@@ -12,6 +12,7 @@ import { SlottedIconMixin } from '../icons/slotted-icon-mixin.js';
12
12
  /**
13
13
  * A component used to display additional information when users focus or hover over some text.
14
14
  * @slot - Default content placed inside of the tooltip
15
+ * @slot icon - Optional slot for a custom icon
15
16
  */
16
17
  class TooltipHelp extends SlottedIconMixin(SkeletonMixin(FocusMixin(LitElement))) {
17
18
 
@@ -11295,6 +11295,10 @@
11295
11295
  {
11296
11296
  "name": "",
11297
11297
  "description": "Default content placed inside of the tooltip"
11298
+ },
11299
+ {
11300
+ "name": "icon",
11301
+ "description": "Optional slot for a custom icon"
11298
11302
  }
11299
11303
  ]
11300
11304
  },
@@ -14273,6 +14277,10 @@
14273
14277
  {
14274
14278
  "name": "",
14275
14279
  "description": "Default content placed inside of the tooltip"
14280
+ },
14281
+ {
14282
+ "name": "icon",
14283
+ "description": "Optional slot for a custom icon"
14276
14284
  }
14277
14285
  ]
14278
14286
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.145.0",
3
+ "version": "3.145.1",
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",