@brightspace-ui/core 2.11.1 → 2.11.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.
@@ -33,6 +33,13 @@
33
33
  </template>
34
34
  </d2l-demo-snippet>
35
35
 
36
+ <h2>Custom Interval (Issue #1751)</h2>
37
+ <d2l-demo-snippet>
38
+ <template>
39
+ <d2l-input-time-range label="Time Range" start-value="15:15" time-interval="ten" enforce-time-intervals></d2l-input-time-range>
40
+ </template>
41
+ </d2l-demo-snippet>
42
+
36
43
  <h2>Hidden Label</h2>
37
44
  <d2l-demo-snippet>
38
45
  <template>
@@ -1,5 +1,5 @@
1
1
  # Tag List
2
- *This component is in progress. The API is generally stable but the ability to clear tags is currently a WIP.*
2
+ *This component is in progress. The API is generally stable but there could be some appearance or minor behavior churn in the short-term.*
3
3
 
4
4
  Tag lists are used to present a list of compact, discrete pieces of information.
5
5
 
@@ -31,8 +31,12 @@ The `d2l-tag-list` element can take a combination of any type of `d2l-tag-list-i
31
31
  <script type="module">
32
32
  import '@brightspace-ui/core/components/tag-list/tag-list.js';
33
33
  import '@brightspace-ui/core/components/tag-list/tag-list-item.js';
34
- </script>
35
34
 
35
+ document.addEventListener('d2l-tag-list-item-clear', (e) => {
36
+ e.target.parentNode.removeChild(e.target);
37
+ console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}, handleFocus: ${e.detail.handleFocus}`);
38
+ });
39
+ </script>
36
40
  <d2l-tag-list description="Example Tags">
37
41
  <d2l-tag-list-item text="Lorem ipsum dolor"></d2l-tag-list-item>
38
42
  <d2l-tag-list-item text="Reprehenderit in voluptate velit esse"></d2l-tag-list-item>
@@ -49,6 +53,11 @@ The `d2l-tag-list-item` provides the appropriate `listitem` semantics and stylin
49
53
  <script type="module">
50
54
  import '@brightspace-ui/core/components/tag-list/tag-list.js';
51
55
  import '@brightspace-ui/core/components/tag-list/tag-list-item.js';
56
+
57
+ document.addEventListener('d2l-tag-list-item-clear', (e) => {
58
+ e.target.parentNode.removeChild(e.target);
59
+ console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}, handleFocus: ${e.detail.handleFocus}`);
60
+ });
52
61
  </script>
53
62
 
54
63
  <d2l-tag-list description="Example Tags">
@@ -64,9 +64,9 @@
64
64
  <d2l-tag-list-item text="Example Tag 7"></d2l-tag-list-item>
65
65
  </d2l-tag-list>
66
66
  <script>
67
- document.addEventListener('d2l-tag-list-item-cleared', (e) => {
67
+ document.addEventListener('d2l-tag-list-item-clear', (e) => {
68
68
  e.target.parentNode.removeChild(e.target);
69
- console.log(`d2l-tag-list-item-cleared event dispatched. Value: ${e.detail.value}, handleFocus: ${e.detail.handleFocus}`);
69
+ console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}, handleFocus: ${e.detail.handleFocus}`);
70
70
  });
71
71
  </script>
72
72
  </d2l-demo-snippet>
@@ -15,7 +15,7 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
15
15
  static get properties() {
16
16
  return {
17
17
  /**
18
- * Enables the option to clear a tag list item. The `d2l-tag-list-item-cleared` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.
18
+ * Enables the option to clear a tag list item. The `d2l-tag-list-item-clear` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.
19
19
  */
20
20
  clearable: { type: Boolean },
21
21
  /**
@@ -136,7 +136,7 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
136
136
 
137
137
  /** Dispatched when a user selects to delete a tag list item. The consumer must handle the actual element deletion and focus behaviour if there are no remaining list items. */
138
138
  this.dispatchEvent(new CustomEvent(
139
- 'd2l-tag-list-item-cleared',
139
+ 'd2l-tag-list-item-clear',
140
140
  { bubbles: true, composed: true, detail: { value: this.text, handleFocus } }
141
141
  ));
142
142
  }
@@ -32,7 +32,7 @@ class TagList extends LocalizeCoreElement(ArrowKeysMixin(LitElement)) {
32
32
  static get properties() {
33
33
  return {
34
34
  /**
35
- * Enables the option to clear all inner tag list items. The `d2l-tag-list-item-cleared` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.
35
+ * Enables the option to clear all inner tag list items. The `d2l-tag-list-item-clear` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.
36
36
  */
37
37
  clearable: { type: Boolean },
38
38
  /**
@@ -158,7 +158,7 @@ class TagList extends LocalizeCoreElement(ArrowKeysMixin(LitElement)) {
158
158
  };
159
159
 
160
160
  const list = html`
161
- <div role="list" class="tag-list-container" aria-describedby="d2l-tag-list-description" @d2l-tag-list-item-cleared="${this._handleItemDeleted}">
161
+ <div role="list" class="tag-list-container" aria-describedby="d2l-tag-list-description" @d2l-tag-list-item-clear="${this._handleItemDeleted}">
162
162
  <slot @slotchange="${this._handleSlotChange}"></slot>
163
163
  ${overflowButton}
164
164
  <d2l-button-subtle
@@ -9771,7 +9771,7 @@
9771
9771
  },
9772
9772
  {
9773
9773
  "name": "clearable",
9774
- "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-cleared` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9774
+ "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-clear` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9775
9775
  "type": "boolean",
9776
9776
  "default": "false"
9777
9777
  }
@@ -9786,14 +9786,14 @@
9786
9786
  {
9787
9787
  "name": "clearable",
9788
9788
  "attribute": "clearable",
9789
- "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-cleared` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9789
+ "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-clear` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9790
9790
  "type": "boolean",
9791
9791
  "default": "false"
9792
9792
  }
9793
9793
  ],
9794
9794
  "events": [
9795
9795
  {
9796
- "name": "d2l-tag-list-item-cleared",
9796
+ "name": "d2l-tag-list-item-clear",
9797
9797
  "description": "Dispatched when a user selects to delete a tag list item. The consumer must handle the actual element deletion and focus behaviour if there are no remaining list items."
9798
9798
  }
9799
9799
  ]
@@ -9809,7 +9809,7 @@
9809
9809
  },
9810
9810
  {
9811
9811
  "name": "clearable",
9812
- "description": "Enables the option to clear all inner tag list items. The `d2l-tag-list-item-cleared` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.",
9812
+ "description": "Enables the option to clear all inner tag list items. The `d2l-tag-list-item-clear` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.",
9813
9813
  "type": "boolean",
9814
9814
  "default": "false"
9815
9815
  }
@@ -9824,7 +9824,7 @@
9824
9824
  {
9825
9825
  "name": "clearable",
9826
9826
  "attribute": "clearable",
9827
- "description": "Enables the option to clear all inner tag list items. The `d2l-tag-list-item-cleared` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.",
9827
+ "description": "Enables the option to clear all inner tag list items. The `d2l-tag-list-item-clear` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.",
9828
9828
  "type": "boolean",
9829
9829
  "default": "false"
9830
9830
  },
@@ -9850,7 +9850,7 @@
9850
9850
  },
9851
9851
  {
9852
9852
  "name": "clearable",
9853
- "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-cleared` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9853
+ "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-clear` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9854
9854
  "type": "boolean",
9855
9855
  "default": "false"
9856
9856
  }
@@ -9864,14 +9864,14 @@
9864
9864
  {
9865
9865
  "name": "clearable",
9866
9866
  "attribute": "clearable",
9867
- "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-cleared` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9867
+ "description": "Enables the option to clear a tag list item. The `d2l-tag-list-item-clear` event will be dispatched when the user selects to delete the item. The consumer must handle the actual item deletion.",
9868
9868
  "type": "boolean",
9869
9869
  "default": "false"
9870
9870
  }
9871
9871
  ],
9872
9872
  "events": [
9873
9873
  {
9874
- "name": "d2l-tag-list-item-cleared",
9874
+ "name": "d2l-tag-list-item-clear",
9875
9875
  "description": "Dispatched when a user selects to delete a tag list item. The consumer must handle the actual element deletion and focus behaviour if there are no remaining list items."
9876
9876
  }
9877
9877
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.11.1",
3
+ "version": "2.11.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",