@brightspace-ui/core 2.1.3 → 2.3.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.
- package/README.md +1 -0
- package/components/alert/alert-toast.js +2 -2
- package/components/alert/alert.js +2 -2
- package/components/backdrop/backdrop.js +1 -1
- package/components/breadcrumbs/breadcrumb-current-page.js +1 -1
- package/components/breadcrumbs/breadcrumb.js +2 -2
- package/components/breadcrumbs/breadcrumbs.js +1 -1
- package/components/button/button-icon.js +2 -2
- package/components/button/button-styles.js +1 -1
- package/components/button/button-subtle.js +42 -18
- package/components/button/button.js +2 -2
- package/components/button/demo/button-subtle.html +16 -5
- package/components/button/floating-buttons.js +2 -2
- package/components/calendar/calendar.js +3 -3
- package/components/card/card-content-meta.js +1 -1
- package/components/card/card-content-title.js +1 -1
- package/components/card/card-footer-link.js +2 -2
- package/components/card/card-loading-shimmer.js +1 -1
- package/components/card/card.js +4 -4
- package/components/colors/demo/color-swatch.js +1 -1
- package/components/count-badge/count-badge-icon.js +2 -2
- package/components/count-badge/count-badge-mixin.js +2 -2
- package/components/count-badge/count-badge.js +2 -2
- package/components/demo/code-dark-plus-styles.js +1 -1
- package/components/demo/code-tomorrow-styles.js +1 -1
- package/components/demo/code-view-styles.js +1 -1
- package/components/demo/code-view.js +2 -2
- package/components/demo/demo-page.js +1 -1
- package/components/demo/demo-snippet.js +1 -1
- package/components/dialog/demo/dialog-async-content.js +1 -1
- package/components/dialog/demo/dialog-container.js +1 -1
- package/components/dialog/dialog-confirm.js +1 -1
- package/components/dialog/dialog-fullscreen.js +3 -3
- package/components/dialog/dialog-mixin.js +4 -4
- package/components/dialog/dialog-styles.js +1 -1
- package/components/dialog/dialog.js +4 -4
- package/components/dropdown/dropdown-button-subtle.js +2 -2
- package/components/dropdown/dropdown-button.js +1 -1
- package/components/dropdown/dropdown-content-mixin.js +3 -3
- package/components/dropdown/dropdown-content-styles.js +1 -1
- package/components/dropdown/dropdown-content.js +1 -1
- package/components/dropdown/dropdown-context-menu.js +1 -1
- package/components/dropdown/dropdown-menu.js +1 -1
- package/components/dropdown/dropdown-more.js +1 -1
- package/components/dropdown/dropdown-opener-styles.js +1 -1
- package/components/dropdown/dropdown-tabs.js +1 -1
- package/components/dropdown/dropdown.js +1 -1
- package/components/expand-collapse/expand-collapse-content.js +2 -2
- package/components/filter/README.md +19 -0
- package/components/filter/demo/filter-search-demo.js +1 -1
- package/components/filter/filter-dimension-set-value.js +1 -1
- package/components/filter/filter-dimension-set.js +1 -1
- package/components/filter/filter.js +3 -3
- package/components/focus-trap/focus-trap.js +2 -2
- package/components/form/demo/form-demo.js +1 -1
- package/components/form/demo/form-dialog-demo.js +1 -1
- package/components/form/demo/form-native-demo.js +1 -1
- package/components/form/demo/form-panel-demo.js +1 -1
- package/components/form/form-errory-summary.js +1 -1
- package/components/form/form-native.js +1 -1
- package/components/form/form.js +1 -1
- package/components/hierarchical-view/README.md +1 -1
- package/components/hierarchical-view/hierarchical-view-mixin.js +1 -1
- package/components/hierarchical-view/hierarchical-view.js +1 -1
- package/components/html-block/README.md +2 -2
- package/components/html-block/demo/html-block.html +4 -4
- package/components/html-block/html-block.js +1 -1
- package/components/icons/demo/icon-color-override.js +1 -1
- package/components/icons/demo/icon-size-override.js +1 -1
- package/components/icons/icon-custom.js +1 -1
- package/components/icons/icon-styles.js +1 -1
- package/components/icons/icon.js +2 -2
- package/components/inputs/demo/input-radio-label-simple-test.js +1 -1
- package/components/inputs/demo/input-radio-label-test.js +1 -1
- package/components/inputs/demo/input-radio-solo-test.js +1 -1
- package/components/inputs/demo/input-radio-spacer-test.js +1 -1
- package/components/inputs/demo/input-select-test.js +1 -1
- package/components/inputs/docs/input-checkbox.md +1 -1
- package/components/inputs/docs/input-radio.md +3 -3
- package/components/inputs/docs/input-select-styles.md +2 -2
- package/components/inputs/docs/input-text.md +2 -2
- package/components/inputs/input-checkbox-spacer.js +1 -1
- package/components/inputs/input-checkbox.js +3 -3
- package/components/inputs/input-date-range.js +2 -2
- package/components/inputs/input-date-time-range-to.js +2 -2
- package/components/inputs/input-date-time-range.js +2 -2
- package/components/inputs/input-date-time.js +3 -3
- package/components/inputs/input-date.js +3 -3
- package/components/inputs/input-fieldset.js +2 -2
- package/components/inputs/input-label-styles.js +1 -1
- package/components/inputs/input-number.js +2 -2
- package/components/inputs/input-percent.js +2 -2
- package/components/inputs/input-radio-spacer.js +1 -1
- package/components/inputs/input-radio-styles.js +1 -1
- package/components/inputs/input-search.js +2 -2
- package/components/inputs/input-select-styles.js +1 -1
- package/components/inputs/input-styles.js +1 -1
- package/components/inputs/input-text.js +4 -4
- package/components/inputs/input-textarea.js +3 -3
- package/components/inputs/input-time-range.js +2 -2
- package/components/inputs/input-time.js +2 -2
- package/components/link/README.md +1 -1
- package/components/link/link.js +3 -3
- package/components/list/README.md +1 -1
- package/components/list/demo/list-drag-and-drop-position.js +3 -3
- package/components/list/demo/list-drag-and-drop.js +3 -3
- package/components/list/demo/list-item-custom.js +1 -1
- package/components/list/list-header.js +2 -2
- package/components/list/list-item-button-mixin.js +1 -1
- package/components/list/list-item-button.js +1 -1
- package/components/list/list-item-checkbox-mixin.js +2 -3
- package/components/list/list-item-content.js +1 -1
- package/components/list/list-item-drag-drop-mixin.js +3 -4
- package/components/list/list-item-drag-handle.js +1 -1
- package/components/list/list-item-drag-image.js +1 -1
- package/components/list/list-item-generic-layout.js +1 -1
- package/components/list/list-item-link-mixin.js +1 -1
- package/components/list/list-item-mixin.js +3 -4
- package/components/list/list-item-placement-marker.js +1 -1
- package/components/list/list-item.js +1 -1
- package/components/list/list.js +1 -1
- package/components/loading-spinner/demo/loading-spinner-override.js +1 -1
- package/components/loading-spinner/loading-spinner.js +1 -1
- package/components/menu/demo/custom-menu-item.js +1 -1
- package/components/menu/demo/custom-view.js +1 -1
- package/components/menu/menu-item-checkbox.js +1 -1
- package/components/menu/menu-item-link.js +2 -2
- package/components/menu/menu-item-radio.js +1 -1
- package/components/menu/menu-item-return.js +1 -1
- package/components/menu/menu-item-selectable-styles.js +1 -1
- package/components/menu/menu-item-separator.js +1 -1
- package/components/menu/menu-item-styles.js +1 -1
- package/components/menu/menu-item.js +1 -1
- package/components/menu/menu.js +1 -1
- package/components/meter/meter-circle.js +2 -2
- package/components/meter/meter-linear.js +2 -2
- package/components/meter/meter-radial.js +2 -2
- package/components/more-less/more-less.js +4 -4
- package/components/offscreen/demo/offscreen-demo.js +1 -1
- package/components/offscreen/offscreen.js +1 -1
- package/components/overflow-group/overflow-group.js +2 -2
- package/components/scroll-wrapper/demo/scroll-wrapper-test.js +2 -2
- package/components/scroll-wrapper/scroll-wrapper.js +2 -2
- package/components/selection/README.md +1 -1
- package/components/selection/demo/demo-selection.js +1 -1
- package/components/selection/selection-action-dropdown.js +2 -2
- package/components/selection/selection-action-menu-item.js +1 -1
- package/components/selection/selection-action.js +2 -2
- package/components/selection/selection-input.js +3 -3
- package/components/selection/selection-select-all-pages.js +1 -1
- package/components/selection/selection-select-all.js +2 -2
- package/components/selection/selection-summary.js +1 -1
- package/components/skeleton/demo/skeleton-test-box.js +1 -1
- package/components/skeleton/demo/skeleton-test-container.js +1 -1
- package/components/skeleton/demo/skeleton-test-heading.js +1 -1
- package/components/skeleton/demo/skeleton-test-link.js +2 -2
- package/components/skeleton/demo/skeleton-test-paragraph.js +2 -2
- package/components/skeleton/demo/skeleton-test-stack.js +1 -1
- package/components/skeleton/demo/skeleton-test-width.js +1 -1
- package/components/skeleton/skeleton-mixin.js +1 -1
- package/components/status-indicator/status-indicator.js +1 -1
- package/components/switch/switch-mixin.js +2 -2
- package/components/switch/switch-visibility.js +1 -1
- package/components/switch/switch.js +1 -1
- package/components/table/README.md +3 -3
- package/components/table/demo/table-test.js +1 -1
- package/components/table/table-col-sort-button.js +1 -1
- package/components/table/table-wrapper.js +1 -1
- package/components/tabs/tab-internal.js +1 -1
- package/components/tabs/tab-panel-mixin.js +1 -1
- package/components/tabs/tab-panel.js +1 -1
- package/components/tabs/tabs.js +4 -4
- package/components/tag-list/README.md +52 -0
- package/components/tag-list/demo/tag-list.html +32 -0
- package/components/tag-list/tag-list-item-mixin.js +78 -0
- package/components/tag-list/tag-list-item.js +21 -0
- package/components/tag-list/tag-list.js +89 -0
- package/components/tooltip/tooltip.js +2 -2
- package/components/typography/styles.js +1 -1
- package/components/validation/validation-custom.js +1 -1
- package/custom-elements.json +78 -0
- package/directives/animate/animate.js +3 -3
- package/directives/animate/demo/animate-test.js +1 -1
- package/directives/run-async/run-async.js +4 -4
- package/helpers/demo/announce-test.js +1 -1
- package/helpers/demo/dismissible-test.js +1 -1
- package/mixins/arrow-keys-mixin.js +1 -1
- package/mixins/async-container/demo/async-container.js +1 -1
- package/mixins/async-container/demo/async-item.js +1 -1
- package/mixins/demo/arrow-keys-test.js +1 -1
- package/mixins/demo/labelled-mixin.html +2 -2
- package/mixins/demo/localize-test.js +1 -1
- package/mixins/visible-on-ancestor-mixin.js +1 -1
- package/package.json +2 -3
- package/templates/primary-secondary/primary-secondary.js +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../button/button-icon.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { VisibleOnAncestorMixin, visibleOnAncestorStyles } from '../../mixins/visible-on-ancestor-mixin.js';
|
|
4
4
|
import { DropdownOpenerMixin } from './dropdown-opener-mixin.js';
|
|
5
5
|
import { dropdownOpenerStyles } from './dropdown-opener-styles.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, LitElement } from 'lit
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
2
|
import { DropdownContentMixin } from './dropdown-content-mixin.js';
|
|
3
3
|
import { dropdownContentStyles } from './dropdown-content-styles.js';
|
|
4
4
|
import { ThemeMixin } from '../../mixins/theme-mixin.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../button/button-icon.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { VisibleOnAncestorMixin, visibleOnAncestorStyles } from '../../mixins/visible-on-ancestor-mixin.js';
|
|
4
4
|
import { DropdownOpenerMixin } from './dropdown-opener-mixin.js';
|
|
5
5
|
import { dropdownOpenerStyles } from './dropdown-opener-styles.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
-
import { styleMap } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
3
3
|
|
|
4
4
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
5
5
|
|
|
@@ -131,6 +131,25 @@ Filter with a single dimension:
|
|
|
131
131
|
</div>
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
+
### Iterating Over Dimensions and Values
|
|
135
|
+
|
|
136
|
+
Lit tries to reuse DOM nodes when it can to help with performance, but in this case we don't want unique dimensions and values to be reused - otherwise we can't detect additions/removals properly.
|
|
137
|
+
|
|
138
|
+
If you are going to be constructing your dimensions and/or dimension values by iterating over an array or object (using `forEach,` , `map`, etc.), you'll want to use the [Lit `repeat` directive with a `KeyFn` set](https://lit.dev/docs/templates/directives/#repeat) instead to tell Lit not to reuse a DOM node if the `key` has changed:
|
|
139
|
+
```js
|
|
140
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
141
|
+
...
|
|
142
|
+
return html`<d2l-filter>
|
|
143
|
+
${repeat(this._dimensions, (dim) => dim.key, dim => html`
|
|
144
|
+
<d2l-filter-dimension-set key="${dim.key}" text=${dim.text}>
|
|
145
|
+
${repeat(dim._values, (value) => value.key, value => html`
|
|
146
|
+
<d2l-filter-dimension-set-value key="${value.kay}" text="${value.text}" ?selected="${value.selected}"></d2l-filter-dimension-set-value>
|
|
147
|
+
`)}
|
|
148
|
+
</d2l-filter-dimension-set>
|
|
149
|
+
`)}
|
|
150
|
+
</d2l-filter>`;
|
|
151
|
+
```
|
|
152
|
+
|
|
134
153
|
### Accessibility
|
|
135
154
|
The filter will announce changes to filter selections, search results, and when filters are being cleared. It is up to the consumer to then announce when these changes have propagated and resulted in new/loaded/updated data on the page. This is very important for screenreader users who are not able to visually see the page changing behind the filter control as selections are made.
|
|
136
155
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../filter.js';
|
|
2
2
|
import '../filter-dimension-set.js';
|
|
3
3
|
import '../filter-dimension-set-value.js';
|
|
4
|
-
import { html, LitElement } from 'lit
|
|
4
|
+
import { html, LitElement } from 'lit';
|
|
5
5
|
|
|
6
6
|
const initialData = [
|
|
7
7
|
{ key: 'admin', text: 'Admin', selected: false },
|
|
@@ -16,11 +16,11 @@ import '../selection/selection-select-all.js';
|
|
|
16
16
|
import '../selection/selection-summary.js';
|
|
17
17
|
|
|
18
18
|
import { bodyCompactStyles, bodySmallStyles, bodyStandardStyles } from '../typography/styles.js';
|
|
19
|
-
import { css, html, LitElement } from 'lit
|
|
19
|
+
import { css, html, LitElement } from 'lit';
|
|
20
20
|
import { announce } from '../../helpers/announce.js';
|
|
21
|
-
import { classMap } from 'lit
|
|
21
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
22
22
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
23
|
-
import { ifDefined } from 'lit
|
|
23
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
24
24
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
25
25
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
26
26
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { forceFocusVisible, getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
|
|
3
3
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
4
|
-
import { ifDefined } from 'lit
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { isComposedAncestor } from '../../helpers/dom.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -7,7 +7,7 @@ import '../../inputs/input-textarea.js';
|
|
|
7
7
|
import '../../validation/validation-custom.js';
|
|
8
8
|
import '../form.js';
|
|
9
9
|
import './form-panel-demo.js';
|
|
10
|
-
import { css, html, LitElement } from 'lit
|
|
10
|
+
import { css, html, LitElement } from 'lit';
|
|
11
11
|
import { inputStyles } from '../../inputs/input-styles.js';
|
|
12
12
|
import { selectStyles } from '../../inputs/input-select-styles.js';
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@ import '../../inputs/input-text.js';
|
|
|
6
6
|
import '../../validation/validation-custom.js';
|
|
7
7
|
import '../form.js';
|
|
8
8
|
import './form-panel-demo.js';
|
|
9
|
-
import { css, html, LitElement } from 'lit
|
|
9
|
+
import { css, html, LitElement } from 'lit';
|
|
10
10
|
import { inputStyles } from '../../inputs/input-styles.js';
|
|
11
11
|
import { selectStyles } from '../../inputs/input-select-styles.js';
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ import '../../inputs/input-date-time-range.js';
|
|
|
5
5
|
import '../../inputs/input-text.js';
|
|
6
6
|
import '../../validation/validation-custom.js';
|
|
7
7
|
import '../form-native.js';
|
|
8
|
-
import { css, html, LitElement } from 'lit
|
|
8
|
+
import { css, html, LitElement } from 'lit';
|
|
9
9
|
import { inputStyles } from '../../inputs/input-styles.js';
|
|
10
10
|
import { selectStyles } from '../../inputs/input-select-styles.js';
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ import '../../expand-collapse/expand-collapse-content.js';
|
|
|
5
5
|
import '../../inputs/input-number.js';
|
|
6
6
|
import '../../inputs/input-text.js';
|
|
7
7
|
import '../form.js';
|
|
8
|
-
import { css, html, LitElement } from 'lit
|
|
8
|
+
import { css, html, LitElement } from 'lit';
|
|
9
9
|
import { heading3Styles } from '../../typography/styles.js';
|
|
10
10
|
import { inputStyles } from '../../inputs/input-styles.js';
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../alert/alert.js';
|
|
2
2
|
import '../expand-collapse/expand-collapse-content.js';
|
|
3
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { linkStyles } from '../link/link.js';
|
|
5
5
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
6
6
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { findFormElements, getFormElementData, isCustomFormElement, isNativeFormElement } from './form-helper.js';
|
|
3
3
|
import { FormMixin } from './form-mixin.js';
|
|
4
4
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
package/components/form/form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { findFormElements, flattenMap, getFormElementData, isCustomFormElement, isNativeFormElement } from './form-helper.js';
|
|
3
3
|
import { FormMixin } from './form-mixin.js';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ The `d2l-hierarchical-view` component uses the `d2l-hierarchical-view-mixin` for
|
|
|
9
9
|
<!-- docs: demo code autoSize:false display:block size:medium -->
|
|
10
10
|
```html
|
|
11
11
|
<script type="module">
|
|
12
|
-
import { css, html,LitElement } from 'lit
|
|
12
|
+
import { css, html,LitElement } from 'lit';
|
|
13
13
|
import '@brightspace-ui/core/components/button/button.js';
|
|
14
14
|
import '@brightspace-ui/core/components/hierarchical-view/hierarchical-view.js';
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findComposedAncestor, getComposedParent, isComposedAncestor } from '../../helpers/dom.js';
|
|
2
2
|
import { getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
|
|
3
|
-
import { css } from 'lit
|
|
3
|
+
import { css } from 'lit';
|
|
4
4
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
5
5
|
|
|
6
6
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { HierarchicalViewMixin } from '../hierarchical-view/hierarchical-view-mixin.js';
|
|
3
3
|
|
|
4
4
|
class HierarchicalView extends HierarchicalViewMixin(LitElement) {
|
|
@@ -48,8 +48,8 @@ To use `d2l-html-block` within another Lit component, use the [unsafeHTML](https
|
|
|
48
48
|
|
|
49
49
|
```html
|
|
50
50
|
<script type="module">
|
|
51
|
-
import { html, LitElement } from 'lit
|
|
52
|
-
import { unsafeHTML } from 'lit
|
|
51
|
+
import { html, LitElement } from 'lit';
|
|
52
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
53
53
|
import '@brightspace-ui/core/components/icons/icon.js';
|
|
54
54
|
|
|
55
55
|
class SomeComponent extends LitElement {
|
|
@@ -465,8 +465,8 @@
|
|
|
465
465
|
</d2l-demo-snippet>
|
|
466
466
|
|
|
467
467
|
<d2l-code-view language="javascript">
|
|
468
|
-
import { unsafeHTML } from 'lit
|
|
469
|
-
import { html, LitElement } from 'lit
|
|
468
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
469
|
+
import { html, LitElement } from 'lit';
|
|
470
470
|
|
|
471
471
|
class SomeComponent extends LitElement {
|
|
472
472
|
|
|
@@ -486,8 +486,8 @@
|
|
|
486
486
|
</d2l-demo-page>
|
|
487
487
|
|
|
488
488
|
<script type="module">
|
|
489
|
-
import { html, LitElement } from 'lit
|
|
490
|
-
import { unsafeHTML } from 'lit
|
|
489
|
+
import { html, LitElement } from 'lit';
|
|
490
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
491
491
|
|
|
492
492
|
class SomeComponent extends LitElement {
|
|
493
493
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
|
-
import { css, LitElement } from 'lit
|
|
2
|
+
import { css, LitElement } from 'lit';
|
|
3
3
|
import { HtmlAttributeObserverController } from '../../controllers/attributeObserver/htmlAttributeObserverController.js';
|
|
4
4
|
import { HtmlBlockMathRenderer } from '../../helpers/mathjax.js';
|
|
5
5
|
import { requestInstance } from '../../mixins/provider-mixin.js';
|
package/components/icons/icon.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { fixSvg } from './fix-svg.js';
|
|
4
4
|
import { iconStyles } from './icon-styles.js';
|
|
5
5
|
import { loadSvg } from '../../generated/icons/presetIconLoader.js';
|
|
6
6
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
7
7
|
import { runAsync } from '../../directives/run-async/run-async.js';
|
|
8
|
-
import { unsafeSVG } from 'lit
|
|
8
|
+
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
9
9
|
|
|
10
10
|
class Icon extends RtlMixin(LitElement) {
|
|
11
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { RtlMixin } from '../../../mixins/rtl-mixin.js';
|
|
3
3
|
import { selectStyles } from '../input-select-styles.js';
|
|
4
4
|
import { SkeletonMixin } from '../../../components/skeleton/skeleton-mixin.js';
|
|
@@ -121,7 +121,7 @@ As an alternative to using the `<d2l-input-checkbox>` custom element, you can st
|
|
|
121
121
|
<!-- docs: demo code display:block -->
|
|
122
122
|
```html
|
|
123
123
|
<script type="module">
|
|
124
|
-
import { html, LitElement } from 'lit
|
|
124
|
+
import { html, LitElement } from 'lit';
|
|
125
125
|
import { checkboxStyles } from '@brightspace-ui/core/components/inputs/input-checkbox.js';
|
|
126
126
|
|
|
127
127
|
class MyCheckboxElem extends LitElement {
|
|
@@ -42,7 +42,7 @@ For disabled items, add the `d2l-input-radio-label-disabled` class on the label
|
|
|
42
42
|
<!-- docs: demo code display:block -->
|
|
43
43
|
```html
|
|
44
44
|
<script type="module">
|
|
45
|
-
import { html, LitElement } from 'lit
|
|
45
|
+
import { html, LitElement } from 'lit';
|
|
46
46
|
import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
|
|
47
47
|
import { radioStyles } from '@brightspace-ui/core/components/inputs/input-radio-styles.js';
|
|
48
48
|
|
|
@@ -82,7 +82,7 @@ If you'd like to manually link the radio input with a label, or use an ARIA labe
|
|
|
82
82
|
<!-- docs: demo live name:d2l-test-input-radio-solo display:block -->
|
|
83
83
|
```html
|
|
84
84
|
<script type="module">
|
|
85
|
-
import { html, LitElement } from 'lit
|
|
85
|
+
import { html, LitElement } from 'lit';
|
|
86
86
|
import { radioStyles } from '@brightspace-ui/core/components/inputs/input-radio-styles.js';
|
|
87
87
|
|
|
88
88
|
class MyRadioElem extends LitElement {
|
|
@@ -126,7 +126,7 @@ To align related content below radio buttons, the `d2l-input-radio-spacer` eleme
|
|
|
126
126
|
```html
|
|
127
127
|
<script type="module">
|
|
128
128
|
import '@brightspace-ui/core/components/inputs/input-radio-spacer.js';
|
|
129
|
-
import { html, LitElement } from 'lit
|
|
129
|
+
import { html, LitElement } from 'lit';
|
|
130
130
|
import { radioStyles } from '@brightspace-ui/core/components/inputs/input-radio-styles.js';
|
|
131
131
|
|
|
132
132
|
class MyRadioElem extends LitElement {
|
|
@@ -5,7 +5,7 @@ A Select List allows the user to select a single option out of a relatively larg
|
|
|
5
5
|
<!-- docs: demo -->
|
|
6
6
|
```html
|
|
7
7
|
<script type="module">
|
|
8
|
-
import { html, LitElement } from 'lit
|
|
8
|
+
import { html, LitElement } from 'lit';
|
|
9
9
|
import { selectStyles } from '@brightspace-ui/core/components/inputs/input-select-styles.js';
|
|
10
10
|
|
|
11
11
|
class MySelectElem extends LitElement {
|
|
@@ -59,7 +59,7 @@ Note: in order for RTL to function correctly, make sure your component uses the
|
|
|
59
59
|
<!-- docs: demo live name:d2l-test-input-select -->
|
|
60
60
|
```html
|
|
61
61
|
<script type="module">
|
|
62
|
-
import { css, html, LitElement } from 'lit
|
|
62
|
+
import { css, html, LitElement } from 'lit';
|
|
63
63
|
import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
|
|
64
64
|
import { selectStyles } from '@brightspace-ui/core/components/inputs/input-select-styles.js';
|
|
65
65
|
import { SkeletonMixin } from '@brightspace-ui/core/components/skeleton/skeleton-mixin.js';
|
|
@@ -149,7 +149,7 @@ As an alternative to using the `<d2l-input-text>` custom element, you can style
|
|
|
149
149
|
<!-- docs: demo code -->
|
|
150
150
|
```html
|
|
151
151
|
<script type="module">
|
|
152
|
-
import { html, LitElement } from 'lit
|
|
152
|
+
import { html, LitElement } from 'lit';
|
|
153
153
|
import { inputStyles } from '@brightspace-ui/core/components/inputs/input-styles.js';
|
|
154
154
|
|
|
155
155
|
class MyTextInputElem extends LitElement {
|
|
@@ -265,7 +265,7 @@ Native `<textarea>` elements can be styled by importing `input-styles.js` into y
|
|
|
265
265
|
<!-- docs: demo code -->
|
|
266
266
|
```html
|
|
267
267
|
<script type="module">
|
|
268
|
-
import { html, LitElement } from 'lit
|
|
268
|
+
import { html, LitElement } from 'lit';
|
|
269
269
|
import { inputStyles } from '@brightspace-ui/core/components/inputs/input-styles.js';
|
|
270
270
|
|
|
271
271
|
class MyTextareaInputElem extends LitElement {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
-
import { classMap } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
5
5
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
6
|
-
import { ifDefined } from 'lit
|
|
6
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
7
7
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
8
8
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
9
9
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
@@ -2,12 +2,12 @@ import './input-date.js';
|
|
|
2
2
|
import './input-date-time-range-to.js';
|
|
3
3
|
import './input-fieldset.js';
|
|
4
4
|
import '../tooltip/tooltip.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
6
|
import { formatDateTimeInISO, getDateFromISODate, parseISODateTime } from '../../helpers/dateTime.js';
|
|
7
7
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
8
8
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
9
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
10
|
-
import { ifDefined } from 'lit
|
|
10
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
11
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
12
12
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
13
13
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './input-text.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { bodySmallStyles } from '../typography/styles.js';
|
|
4
|
-
import { classMap } from 'lit
|
|
4
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
6
6
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
7
7
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
@@ -3,12 +3,12 @@ import './input-date-time-range-to.js';
|
|
|
3
3
|
import './input-fieldset.js';
|
|
4
4
|
import '../tooltip/tooltip.js';
|
|
5
5
|
import { convertLocalToUTCDateTime, convertUTCToLocalDateTime } from '@brightspace-ui/intl/lib/dateTime.js';
|
|
6
|
-
import { css, html, LitElement } from 'lit
|
|
6
|
+
import { css, html, LitElement } from 'lit';
|
|
7
7
|
import { formatDateTimeInISO, getAdjustedTime, getDateFromISODateTime, getDateNoConversion, parseISODateTime } from '../../helpers/dateTime.js';
|
|
8
8
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
9
9
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
10
10
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
11
|
-
import { ifDefined } from 'lit
|
|
11
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
12
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
13
13
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
14
14
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
@@ -2,7 +2,7 @@ import './input-date.js';
|
|
|
2
2
|
import './input-fieldset.js';
|
|
3
3
|
import '../tooltip/tooltip.js';
|
|
4
4
|
import { convertUTCToLocalDateTime, formatDateTime } from '@brightspace-ui/intl/lib/dateTime.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
6
|
import { formatDateInISO,
|
|
7
7
|
formatDateInISOTime,
|
|
8
8
|
formatDateTimeInISO,
|
|
@@ -18,12 +18,12 @@ import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
|
18
18
|
import { getDefaultTime } from './input-time.js';
|
|
19
19
|
import { getDocumentLocaleSettings } from '@brightspace-ui/intl/lib/common.js';
|
|
20
20
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
21
|
-
import { ifDefined } from 'lit
|
|
21
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
22
22
|
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
23
23
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
24
24
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
25
25
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
26
|
-
import { styleMap } from 'lit
|
|
26
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
27
27
|
|
|
28
28
|
export function _formatLocalDateTimeInISO(date, time) {
|
|
29
29
|
const dateObj = parseISODate(date);
|
|
@@ -5,18 +5,18 @@ import '../dropdown/dropdown-content.js';
|
|
|
5
5
|
import '../icons/icon.js';
|
|
6
6
|
import '../tooltip/tooltip.js';
|
|
7
7
|
import './input-text.js';
|
|
8
|
-
import { css, html, LitElement } from 'lit
|
|
8
|
+
import { css, html, LitElement } from 'lit';
|
|
9
9
|
import { formatDate, parseDate } from '@brightspace-ui/intl/lib/dateTime.js';
|
|
10
10
|
import { formatDateInISO, getDateFromISODate, getDateTimeDescriptorShared, getToday } from '../../helpers/dateTime.js';
|
|
11
11
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
12
12
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
13
13
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
14
|
-
import { ifDefined } from 'lit
|
|
14
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
15
15
|
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
16
16
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
17
17
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
18
18
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
19
|
-
import { styleMap } from 'lit
|
|
19
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
20
20
|
|
|
21
21
|
const mediaQueryList = window.matchMedia('(max-width: 615px)');
|
|
22
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
-
import { classMap } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { inputLabelStyles } from './input-label-styles.js';
|
|
4
4
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
5
5
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './input-text.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { formatNumber, getNumberDescriptor, parseNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
4
4
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
5
5
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
6
6
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
7
|
-
import { ifDefined } from 'lit
|
|
7
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
8
|
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
9
9
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
10
10
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './input-number.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
4
4
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
5
|
-
import { ifDefined } from 'lit
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
7
7
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
8
8
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|