@brightspace-ui/core 3.192.1 → 3.194.0

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.
@@ -55,11 +55,12 @@ input.addEventListener('change', (e) => {
55
55
  * `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
56
56
  <!-- docs: end hidden content -->
57
57
 
58
- ### Accessibility Properties
58
+ ## Accessibility
59
59
 
60
- To make your usage of `d2l-input-color` accessible, use the following properties when applicable:
60
+ At its core, the color input is a button, so it relies on standard button semantics and adheres to [W3C's Button Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button) to ensure a smooth experience for all assistive technologies, but there are a few interesting details to note:
61
61
 
62
- | Attribute | Description |
63
- |---|---|
64
- | `label` | **REQUIRED** when type is `custom`. [Acts as a primary label for the button](https://www.w3.org/WAI/tutorials/forms/labels/). Visible unless `label-hidden` is also used. |
65
- | `label-hidden` | Use if label should be visually hidden. |
62
+ * `label` is required if `type` is `custom`, since it acts as a primary label for the button
63
+ * However, if `type` is set to `background` or `foreground` a simple default will be used if `label` is left empty
64
+ * `label-hidden` can be used to hide the label when there is sufficient visual context for sighted users; the label will remain available to screen reader users who may lack the visual context
65
+ * `associated-value` allows you to set a hex color against which the input's color contrast will be measured, which ensures end users will get appropriate warnings if they choose inaccessible color combinations
66
+ * The color input remains focusable even when `disabled` or in `read-only` mode, so that users can access the tooltip giving the current value
@@ -91,7 +91,7 @@ class InputColor extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(F
91
91
  static get properties() {
92
92
  return {
93
93
  /**
94
- * Value of an associated color as a HEX which will be used for color contrast analysis
94
+ * ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis
95
95
  * @type {string}
96
96
  */
97
97
  associatedValue: { attribute: 'associated-value', type: String },
@@ -106,7 +106,7 @@ class InputColor extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(F
106
106
  */
107
107
  disallowNone: { attribute: 'disallow-none', type: Boolean },
108
108
  /**
109
- * REQUIRED: Label for the input, comes with a default value for background & foreground types.
109
+ * ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.
110
110
  * @type {string}
111
111
  */
112
112
  label: {
@@ -98,7 +98,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
98
98
  */
99
99
  noPrimaryAction: { type: Boolean, attribute: 'no-primary-action' },
100
100
  /**
101
- * How much padding to render list items with
101
+ * How much padding to render in standard/normal list items
102
102
  * @type {'normal'|'none'}
103
103
  */
104
104
  paddingType: { type: String, attribute: 'padding-type' },
@@ -107,6 +107,12 @@ export const ListItemMixin = superclass => class extends composeMixins(
107
107
  * @type {boolean}
108
108
  */
109
109
  tileHeader: { type: Boolean, reflect: true, attribute: 'tile-header' },
110
+ /**
111
+ * How much padding to render in tile list items
112
+ * @type {'normal'|'none'}
113
+ * @default "normal"
114
+ */
115
+ tilePaddingType: { type: String, attribute: 'tile-padding-type' },
110
116
  _addButtonText: { state: true },
111
117
  _displayKeyboardTooltip: { type: Boolean },
112
118
  _hasColorSlot: { type: Boolean, reflect: true, attribute: '_has-color-slot' },
@@ -451,6 +457,9 @@ export const ListItemMixin = superclass => class extends composeMixins(
451
457
  height: 100%;
452
458
  padding: 0.6rem;
453
459
  }
460
+ :host([layout="tile"][tile-padding-type="none"]) .d2l-list-item-content {
461
+ padding: 0;
462
+ }
454
463
 
455
464
  :host([layout="tile"]) [slot="content"] ::slotted([slot="illustration"]),
456
465
  :host([layout="tile"]) .d2l-list-item-illustration > * {
@@ -464,11 +473,21 @@ export const ListItemMixin = superclass => class extends composeMixins(
464
473
  max-height: unset;
465
474
  max-width: calc(100% + 1.1rem);
466
475
  }
476
+ :host([layout="tile"][tile-padding-type="none"]) [slot="content"] ::slotted([slot="illustration"]),
477
+ :host([layout="tile"][tile-padding-type="none"]) .d2l-list-item-illustration > * {
478
+ margin-block: 0;
479
+ margin-inline: 0;
480
+ }
481
+
467
482
  :host([layout="tile"][tile-header]) [slot="content"] ::slotted([slot="illustration"]),
468
483
  :host([layout="tile"][tile-header]) .d2l-list-item-illustration > * {
469
484
  border-radius: 0;
470
485
  margin-block: -0.6rem 0.6rem;
471
486
  }
487
+ :host([layout="tile"][tile-header][tile-padding-type="none"]) [slot="content"] ::slotted([slot="illustration"]),
488
+ :host([layout="tile"][tile-header][tile-padding-type="none"]) .d2l-list-item-illustration > * {
489
+ margin-block: 0;
490
+ }
472
491
 
473
492
  :host([layout="tile"]) [slot="content"] ::slotted(d2l-icon[slot="illustration"]),
474
493
  :host([layout="tile"]) .d2l-list-item-illustration > d2l-icon[slot="illustration"] {
@@ -482,6 +501,12 @@ export const ListItemMixin = superclass => class extends composeMixins(
482
501
  border-bottom: 1px solid var(--d2l-color-mica);
483
502
  width: calc(100% + 1.1rem);
484
503
  }
504
+ :host([layout="tile"][tile-padding-type="none"]) [slot="content"] ::slotted(div[slot="illustration"]),
505
+ :host([layout="tile"][tile-padding-type="none"]) .d2l-list-item-illustration > div[slot="illustration"],
506
+ :host([layout="tile"][tile-padding-type="none"]) [slot="content"] ::slotted(d2l-icon[slot="illustration"]),
507
+ :host([layout="tile"][tile-padding-type="none"]) .d2l-list-item-illustration > d2l-icon[slot="illustration"] {
508
+ width: 100%;
509
+ }
485
510
 
486
511
  :host([layout="tile"]:not([selection-disabled]):not([skeleton])[padding-type="none"]) [slot="outside-control-container"],
487
512
  :host([layout="tile"]) [slot="outside-control-container"] {
@@ -601,6 +626,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
601
626
  this.noPrimaryAction = false;
602
627
  this.paddingType = 'normal';
603
628
  this.tileHeader = false;
629
+ this.tilePaddingType = 'normal';
604
630
  this._addButtonTopId = getUniqueId();
605
631
  this._contentId = getUniqueId();
606
632
  this._displayKeyboardTooltip = false;
@@ -5476,12 +5476,12 @@
5476
5476
  "attributes": [
5477
5477
  {
5478
5478
  "name": "label",
5479
- "description": "REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5479
+ "description": "ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5480
5480
  "type": "string"
5481
5481
  },
5482
5482
  {
5483
5483
  "name": "associated-value",
5484
- "description": "Value of an associated color as a HEX which will be used for color contrast analysis",
5484
+ "description": "ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis",
5485
5485
  "type": "string"
5486
5486
  },
5487
5487
  {
@@ -5534,13 +5534,13 @@
5534
5534
  {
5535
5535
  "name": "label",
5536
5536
  "attribute": "label",
5537
- "description": "REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5537
+ "description": "ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5538
5538
  "type": "string"
5539
5539
  },
5540
5540
  {
5541
5541
  "name": "associatedValue",
5542
5542
  "attribute": "associated-value",
5543
- "description": "Value of an associated color as a HEX which will be used for color contrast analysis",
5543
+ "description": "ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis",
5544
5544
  "type": "string"
5545
5545
  },
5546
5546
  {
@@ -8937,7 +8937,7 @@
8937
8937
  },
8938
8938
  {
8939
8939
  "name": "padding-type",
8940
- "description": "How much padding to render list items with",
8940
+ "description": "How much padding to render in standard/normal list items",
8941
8941
  "type": "'normal'|'none'",
8942
8942
  "default": "\"normal\""
8943
8943
  },
@@ -8947,6 +8947,12 @@
8947
8947
  "type": "boolean",
8948
8948
  "default": "false"
8949
8949
  },
8950
+ {
8951
+ "name": "tile-padding-type",
8952
+ "description": "How much padding to render in tile list items",
8953
+ "type": "'normal'|'none'",
8954
+ "default": "\"\\\"normal\\\"\""
8955
+ },
8950
8956
  {
8951
8957
  "name": "selection-disabled-tooltip",
8952
8958
  "description": "**Selection:** Tooltip text when selection is disabled",
@@ -9067,7 +9073,7 @@
9067
9073
  {
9068
9074
  "name": "paddingType",
9069
9075
  "attribute": "padding-type",
9070
- "description": "How much padding to render list items with",
9076
+ "description": "How much padding to render in standard/normal list items",
9071
9077
  "type": "'normal'|'none'",
9072
9078
  "default": "\"normal\""
9073
9079
  },
@@ -9078,6 +9084,13 @@
9078
9084
  "type": "boolean",
9079
9085
  "default": "false"
9080
9086
  },
9087
+ {
9088
+ "name": "tilePaddingType",
9089
+ "attribute": "tile-padding-type",
9090
+ "description": "How much padding to render in tile list items",
9091
+ "type": "'normal'|'none'",
9092
+ "default": "\"\\\"normal\\\"\""
9093
+ },
9081
9094
  {
9082
9095
  "name": "selectionDisabledTooltip",
9083
9096
  "attribute": "selection-disabled-tooltip",
@@ -9327,7 +9340,7 @@
9327
9340
  },
9328
9341
  {
9329
9342
  "name": "padding-type",
9330
- "description": "How much padding to render list items with",
9343
+ "description": "How much padding to render in standard/normal list items",
9331
9344
  "type": "'normal'|'none'",
9332
9345
  "default": "\"normal\""
9333
9346
  },
@@ -9337,6 +9350,12 @@
9337
9350
  "type": "boolean",
9338
9351
  "default": "false"
9339
9352
  },
9353
+ {
9354
+ "name": "tile-padding-type",
9355
+ "description": "How much padding to render in tile list items",
9356
+ "type": "'normal'|'none'",
9357
+ "default": "\"\\\"normal\\\"\""
9358
+ },
9340
9359
  {
9341
9360
  "name": "selection-disabled-tooltip",
9342
9361
  "description": "**Selection:** Tooltip text when selection is disabled",
@@ -9464,7 +9483,7 @@
9464
9483
  {
9465
9484
  "name": "paddingType",
9466
9485
  "attribute": "padding-type",
9467
- "description": "How much padding to render list items with",
9486
+ "description": "How much padding to render in standard/normal list items",
9468
9487
  "type": "'normal'|'none'",
9469
9488
  "default": "\"normal\""
9470
9489
  },
@@ -9475,6 +9494,13 @@
9475
9494
  "type": "boolean",
9476
9495
  "default": "false"
9477
9496
  },
9497
+ {
9498
+ "name": "tilePaddingType",
9499
+ "attribute": "tile-padding-type",
9500
+ "description": "How much padding to render in tile list items",
9501
+ "type": "'normal'|'none'",
9502
+ "default": "\"\\\"normal\\\"\""
9503
+ },
9478
9504
  {
9479
9505
  "name": "selectionDisabledTooltip",
9480
9506
  "attribute": "selection-disabled-tooltip",
@@ -9854,7 +9880,7 @@
9854
9880
  },
9855
9881
  {
9856
9882
  "name": "padding-type",
9857
- "description": "How much padding to render list items with",
9883
+ "description": "How much padding to render in standard/normal list items",
9858
9884
  "type": "'normal'|'none'",
9859
9885
  "default": "\"normal\""
9860
9886
  },
@@ -9864,6 +9890,12 @@
9864
9890
  "type": "boolean",
9865
9891
  "default": "false"
9866
9892
  },
9893
+ {
9894
+ "name": "tile-padding-type",
9895
+ "description": "How much padding to render in tile list items",
9896
+ "type": "'normal'|'none'",
9897
+ "default": "\"\\\"normal\\\"\""
9898
+ },
9867
9899
  {
9868
9900
  "name": "selection-disabled-tooltip",
9869
9901
  "description": "**Selection:** Tooltip text when selection is disabled",
@@ -10003,7 +10035,7 @@
10003
10035
  {
10004
10036
  "name": "paddingType",
10005
10037
  "attribute": "padding-type",
10006
- "description": "How much padding to render list items with",
10038
+ "description": "How much padding to render in standard/normal list items",
10007
10039
  "type": "'normal'|'none'",
10008
10040
  "default": "\"normal\""
10009
10041
  },
@@ -10014,6 +10046,13 @@
10014
10046
  "type": "boolean",
10015
10047
  "default": "false"
10016
10048
  },
10049
+ {
10050
+ "name": "tilePaddingType",
10051
+ "attribute": "tile-padding-type",
10052
+ "description": "How much padding to render in tile list items",
10053
+ "type": "'normal'|'none'",
10054
+ "default": "\"\\\"normal\\\"\""
10055
+ },
10017
10056
  {
10018
10057
  "name": "selectionDisabledTooltip",
10019
10058
  "attribute": "selection-disabled-tooltip",
@@ -10197,7 +10236,7 @@
10197
10236
  },
10198
10237
  {
10199
10238
  "name": "padding-type",
10200
- "description": "How much padding to render list items with",
10239
+ "description": "How much padding to render in standard/normal list items",
10201
10240
  "type": "'normal'|'none'",
10202
10241
  "default": "\"normal\""
10203
10242
  },
@@ -10207,6 +10246,12 @@
10207
10246
  "type": "boolean",
10208
10247
  "default": "false"
10209
10248
  },
10249
+ {
10250
+ "name": "tile-padding-type",
10251
+ "description": "How much padding to render in tile list items",
10252
+ "type": "'normal'|'none'",
10253
+ "default": "\"\\\"normal\\\"\""
10254
+ },
10210
10255
  {
10211
10256
  "name": "selection-disabled-tooltip",
10212
10257
  "description": "**Selection:** Tooltip text when selection is disabled",
@@ -10339,7 +10384,7 @@
10339
10384
  {
10340
10385
  "name": "paddingType",
10341
10386
  "attribute": "padding-type",
10342
- "description": "How much padding to render list items with",
10387
+ "description": "How much padding to render in standard/normal list items",
10343
10388
  "type": "'normal'|'none'",
10344
10389
  "default": "\"normal\""
10345
10390
  },
@@ -10350,6 +10395,13 @@
10350
10395
  "type": "boolean",
10351
10396
  "default": "false"
10352
10397
  },
10398
+ {
10399
+ "name": "tilePaddingType",
10400
+ "attribute": "tile-padding-type",
10401
+ "description": "How much padding to render in tile list items",
10402
+ "type": "'normal'|'none'",
10403
+ "default": "\"\\\"normal\\\"\""
10404
+ },
10353
10405
  {
10354
10406
  "name": "selectionDisabledTooltip",
10355
10407
  "attribute": "selection-disabled-tooltip",
@@ -1,5 +1,3 @@
1
- import { getFlag } from './flags.js';
2
-
3
1
  /* When updating MathJax, update mathjaxBaseUrl to use the new version
4
2
  * and verify that the font mappings included in mathjaxFontMappings
5
3
  * match what's present in the MathJax-src repo.
@@ -40,16 +38,10 @@ class HtmlBlockMathRenderer {
40
38
 
41
39
  async render(elem, options) {
42
40
  if (!options.contextValues) return elem;
43
- let context = options.contextValues.get(mathjaxContextKey);
44
-
45
- if (getFlag('shield-12649-mathjax-default-context', true)) {
46
- context = context || {
47
- renderLatex: false,
48
- outputScale: 1
49
- };
50
- } else {
51
- if (context === undefined) return elem;
52
- }
41
+ const context = options.contextValues.get(mathjaxContextKey) || {
42
+ renderLatex: false,
43
+ outputScale: 1
44
+ };
53
45
 
54
46
  if (!elem.querySelector('math') && !(context.renderLatex && /\$\$|\\\(|\\\[|\\begin{|\\ref{|\\eqref{/.test(elem.innerHTML))) return elem;
55
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.192.1",
3
+ "version": "3.194.0",
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",