@brightspace-ui/core 2.103.0 → 2.104.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.
- package/README.md +7 -7
- package/components/alert/alert.js +1 -1
- package/components/breadcrumbs/breadcrumb.js +2 -2
- package/components/breadcrumbs/breadcrumbs.js +1 -1
- package/components/button/button-icon.js +3 -3
- package/components/button/button-mixin.js +1 -1
- package/components/button/button-move.js +2 -2
- package/components/button/button-subtle.js +1 -1
- package/components/button/floating-buttons.js +1 -1
- package/components/calendar/calendar.js +1 -1
- package/components/card/card-footer-link.js +2 -2
- package/components/card/card.js +2 -2
- package/components/collapsible-panel/collapsible-panel.js +2 -2
- package/components/count-badge/count-badge-icon.js +1 -1
- package/components/count-badge/count-badge-mixin.js +1 -1
- package/components/count-badge/count-badge.js +1 -1
- package/components/dialog/dialog-mixin.js +1 -1
- package/components/dropdown/dropdown-button.js +1 -1
- package/components/dropdown/dropdown-content-mixin.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/empty-state/empty-state-simple.js +1 -1
- package/components/filter/filter-overflow-group.js +1 -1
- package/components/filter/filter.js +2 -2
- package/components/focus-trap/focus-trap.js +1 -1
- package/components/form/form-errory-summary.js +1 -1
- package/components/html-block/demo/html-block.html +1 -1
- package/components/html-block/html-block.js +1 -1
- package/components/icons/icon-custom.js +1 -1
- package/components/icons/icon.js +1 -1
- package/components/inputs/README.md +1 -1
- 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-select-test.js +1 -1
- package/components/inputs/docs/input-radio.md +1 -1
- package/components/inputs/docs/input-select-styles.md +1 -1
- package/components/inputs/input-checkbox-spacer.js +1 -1
- package/components/inputs/input-checkbox.js +2 -2
- package/components/inputs/input-color.js +1 -1
- package/components/inputs/input-date-range.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 +2 -2
- package/components/inputs/input-fieldset.js +1 -1
- package/components/inputs/input-number.js +2 -2
- package/components/inputs/input-percent.js +3 -3
- package/components/inputs/input-radio-spacer.js +1 -1
- package/components/inputs/input-search.js +2 -2
- package/components/inputs/input-text.js +3 -3
- 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/link.js +1 -1
- package/components/list/list-item-drag-handle.js +2 -2
- package/components/list/list-item-drag-image.js +1 -1
- package/components/list/list-item-generic-layout.js +2 -3
- package/components/list/list-item-mixin.js +2 -2
- package/components/list/list-item-placement-marker.js +1 -1
- package/components/menu/menu-item-checkbox.js +1 -1
- package/components/menu/menu-item-radio.js +1 -1
- package/components/menu/menu-item-return.js +1 -1
- package/components/menu/menu.js +1 -1
- package/components/meter/meter-circle.js +1 -1
- package/components/meter/meter-linear.js +1 -1
- package/components/meter/meter-radial.js +1 -1
- package/components/object-property-list/object-property-list-item-link.js +1 -1
- package/components/offscreen/offscreen.js +1 -1
- package/components/overflow-group/overflow-group.js +1 -1
- package/components/paging/pager-load-more.js +1 -1
- package/components/scroll-wrapper/demo/scroll-wrapper-test.js +1 -1
- package/components/scroll-wrapper/scroll-wrapper.js +1 -1
- package/components/selection/selection-action-dropdown.js +1 -1
- package/components/selection/selection-action.js +1 -1
- package/components/selection/selection-controls.js +1 -1
- package/components/selection/selection-input.js +1 -1
- package/components/selection/selection-mixin.js +1 -1
- package/components/selection/selection-select-all-pages.js +1 -1
- package/components/selection/selection-select-all.js +1 -1
- package/components/skeleton/skeleton-mixin.js +1 -1
- package/components/switch/switch-mixin.js +2 -2
- 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/tabs.js +2 -2
- package/components/tag-list/tag-list-item-mixin.js +1 -1
- package/components/tag-list/tag-list.js +2 -2
- package/components/tooltip/tooltip-help.js +1 -1
- package/components/tooltip/tooltip.js +1 -1
- package/helpers/demo/prism.html +3 -3
- package/mixins/{arrow-keys-mixin.md → arrow-keys/README.md} +2 -2
- package/mixins/arrow-keys/arrow-keys-mixin.js +125 -0
- package/mixins/{demo → arrow-keys/demo}/arrow-keys-mixin.html +2 -2
- package/mixins/{demo → arrow-keys/demo}/arrow-keys-test.js +1 -1
- package/mixins/arrow-keys-mixin.js +1 -125
- package/mixins/{focus-mixin.md → focus/README.md} +1 -1
- package/mixins/focus/focus-mixin.js +43 -0
- package/mixins/focus-mixin.js +1 -43
- package/mixins/{interactive-mixin.md → interactive/README.md} +1 -1
- package/mixins/{interactive-mixin.js → interactive/interactive-mixin.js} +4 -4
- package/mixins/{labelled-mixin.md → labelled/README.md} +2 -2
- package/mixins/{demo → labelled/demo}/labelled-mixin.html +3 -3
- package/mixins/labelled/labelled-mixin.js +215 -0
- package/mixins/labelled-mixin.js +1 -215
- package/mixins/localize/localize-mixin.js +1 -1
- package/mixins/{provider-mixin.md → provider/README.md} +3 -3
- package/mixins/provider/provider-mixin.js +35 -0
- package/mixins/provider-mixin.js +1 -35
- package/mixins/{rtl-mixin.md → rtl/README.md} +1 -1
- package/mixins/rtl/rtl-mixin.js +40 -0
- package/mixins/rtl-mixin.js +1 -40
- package/mixins/theme/theme-mixin.js +19 -0
- package/mixins/theme-mixin.js +1 -19
- package/mixins/{visible-on-ancestor-mixin.md → visible-on-ancestor/README.md} +1 -1
- package/mixins/visible-on-ancestor/visible-on-ancestor-mixin.js +160 -0
- package/mixins/visible-on-ancestor-mixin.js +1 -160
- package/package.json +1 -1
- package/templates/primary-secondary/primary-secondary.js +1 -1
|
@@ -2,17 +2,17 @@ import '../colors/colors.js';
|
|
|
2
2
|
import '../tooltip/tooltip.js';
|
|
3
3
|
import { css, html, LitElement, nothing } from 'lit';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
5
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
6
6
|
import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
7
7
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
8
8
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
9
9
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
10
|
import { inputLabelStyles } from './input-label-styles.js';
|
|
11
11
|
import { inputStyles } from './input-styles.js';
|
|
12
|
-
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
12
|
+
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
|
13
13
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
14
14
|
import { PerfMonitor } from '../../helpers/perfMonitor.js';
|
|
15
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
15
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
16
16
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
17
17
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
18
18
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import '../tooltip/tooltip.js';
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
3
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
4
4
|
import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
5
5
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
6
6
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
7
7
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
8
|
import { inputLabelStyles } from './input-label-styles.js';
|
|
9
9
|
import { inputStyles } from './input-styles.js';
|
|
10
|
-
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
10
|
+
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
|
11
11
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
12
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
12
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
13
13
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
14
14
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
15
15
|
|
|
@@ -4,12 +4,12 @@ import '../tooltip/tooltip.js';
|
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { formatDateInISOTime, formatTimeInISO, getAdjustedTime, getDateFromISOTime, isValidTime, parseISOTime } from '../../helpers/dateTime.js';
|
|
6
6
|
import { getDefaultTime, getIntervalNumber, getTimeAtInterval } from './input-time.js';
|
|
7
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
7
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
8
8
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
9
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
10
10
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
11
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
12
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
12
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
13
13
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
14
14
|
|
|
15
15
|
export function getShiftedEndTime(startValue, endValue, prevStartValue, inclusive) {
|
|
@@ -7,13 +7,13 @@ import { css, html, LitElement } from 'lit';
|
|
|
7
7
|
import { formatDateInISOTime, getDateFromISOTime, getToday } from '../../helpers/dateTime.js';
|
|
8
8
|
import { formatTime, parseTime } from '@brightspace-ui/intl/lib/dateTime.js';
|
|
9
9
|
import { bodySmallStyles } from '../typography/styles.js';
|
|
10
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
10
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
11
11
|
import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
12
12
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
13
13
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
14
14
|
import { inputLabelStyles } from './input-label-styles.js';
|
|
15
15
|
import { inputStyles } from './input-styles.js';
|
|
16
|
-
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
16
|
+
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
|
17
17
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
18
18
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
19
19
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
package/components/link/link.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
4
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
5
5
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
6
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
7
7
|
|
|
@@ -3,11 +3,11 @@ import '../tooltip/tooltip.js';
|
|
|
3
3
|
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { buttonStyles } from '../button/button-styles.js';
|
|
5
5
|
import { findComposedAncestor } from '../../helpers/dom.js';
|
|
6
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
6
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
7
7
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
8
8
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
9
9
|
import { moveActions } from '../button/button-move.js';
|
|
10
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
10
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
11
11
|
|
|
12
12
|
const keyCodes = Object.freeze({
|
|
13
13
|
DOWN: 40,
|
|
@@ -4,7 +4,7 @@ import { css, html, LitElement } from 'lit';
|
|
|
4
4
|
import { bodySmallStyles } from '../typography/styles.js';
|
|
5
5
|
import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
6
6
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
7
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
7
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
8
8
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
9
9
|
|
|
10
10
|
class ListItemDragImage extends LocalizeCoreElement(SkeletonMixin(RtlMixin(LitElement))) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { findComposedAncestor, getNextAncestorSibling, getPreviousAncestorSibling, isComposedAncestor } from '../../helpers/dom.js';
|
|
3
3
|
import { getComposedActiveElement, getFirstFocusableDescendant, getLastFocusableDescendant, getNextFocusable, getPreviousFocusable, isFocusable } from '../../helpers/focus.js';
|
|
4
|
-
import { isInteractiveDescendant } from '../../mixins/interactive-mixin.js';
|
|
5
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
4
|
+
import { isInteractiveDescendant } from '../../mixins/interactive/interactive-mixin.js';
|
|
5
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
6
6
|
|
|
7
7
|
const keyCodes = {
|
|
8
8
|
DOWN: 40,
|
|
@@ -100,7 +100,6 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
|
100
100
|
}
|
|
101
101
|
::slotted([slot="outside-control"]) {
|
|
102
102
|
grid-column: outside-control-start / outside-control-end;
|
|
103
|
-
width: fit-content;
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
::slotted([slot="expand-collapse"]) {
|
|
@@ -10,14 +10,14 @@ import { composeMixins } from '../../helpers/composeMixins.js';
|
|
|
10
10
|
import { getFirstFocusableDescendant } from '../../helpers/focus.js';
|
|
11
11
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
12
12
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
13
|
-
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
13
|
+
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
|
14
14
|
import { ListItemCheckboxMixin } from './list-item-checkbox-mixin.js';
|
|
15
15
|
import { ListItemDragDropMixin } from './list-item-drag-drop-mixin.js';
|
|
16
16
|
import { ListItemExpandCollapseMixin } from './list-item-expand-collapse-mixin.js';
|
|
17
17
|
import { ListItemRoleMixin } from './list-item-role-mixin.js';
|
|
18
18
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
19
19
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
20
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
20
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
21
21
|
|
|
22
22
|
let tabPressed = false;
|
|
23
23
|
let tabListenerAdded = false;
|
|
@@ -2,7 +2,7 @@ import '../icons/icon.js';
|
|
|
2
2
|
import { html, LitElement } from 'lit';
|
|
3
3
|
import { MenuItemSelectableMixin } from './menu-item-selectable-mixin.js';
|
|
4
4
|
import { menuItemSelectableStyles } from './menu-item-selectable-styles.js';
|
|
5
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
5
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A menu item component used for selection. Multiple checkboxes can be selected at once.
|
|
@@ -2,7 +2,7 @@ import '../icons/icon.js';
|
|
|
2
2
|
import { html, LitElement } from 'lit';
|
|
3
3
|
import { MenuItemRadioMixin } from './menu-item-radio-mixin.js';
|
|
4
4
|
import { menuItemSelectableStyles } from './menu-item-selectable-styles.js';
|
|
5
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
5
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A menu item component used for radio selection. Only one radio item in a given d2l-menu may be selected at once (i.e., selecting one option will deselect the other selected "d2l-menu-item-radio" item).
|
|
@@ -3,7 +3,7 @@ import { css, html, LitElement } from 'lit';
|
|
|
3
3
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
4
4
|
import { MenuItemMixin } from './menu-item-mixin.js';
|
|
5
5
|
import { menuItemStyles } from './menu-item-styles.js';
|
|
6
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
6
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
7
7
|
|
|
8
8
|
class MenuItemReturn extends RtlMixin(LocalizeCoreElement(MenuItemMixin(LitElement))) {
|
|
9
9
|
|
package/components/menu/menu.js
CHANGED
|
@@ -3,7 +3,7 @@ import '../icons/icon.js';
|
|
|
3
3
|
import './menu-item-return.js';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { HierarchicalViewMixin } from '../hierarchical-view/hierarchical-view-mixin.js';
|
|
6
|
-
import { ThemeMixin } from '../../mixins/theme-mixin.js';
|
|
6
|
+
import { ThemeMixin } from '../../mixins/theme/theme-mixin.js';
|
|
7
7
|
|
|
8
8
|
const keyCodes = {
|
|
9
9
|
DOWN: 40,
|
|
@@ -3,7 +3,7 @@ import { css, html, LitElement } from 'lit';
|
|
|
3
3
|
import { bodyStandardStyles } from '../typography/styles.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { MeterMixin } from './meter-mixin.js';
|
|
6
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
6
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A circular progress indicator.
|
|
@@ -2,7 +2,7 @@ import { css, html, LitElement } from 'lit';
|
|
|
2
2
|
import { bodySmallStyles } from '../typography/styles.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { MeterMixin } from './meter-mixin.js';
|
|
5
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
5
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A horizontal progress bar.
|
|
@@ -3,7 +3,7 @@ import { bodySmallStyles, heading4Styles } from '../typography/styles.js';
|
|
|
3
3
|
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { MeterMixin } from './meter-mixin.js';
|
|
6
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
6
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A half-circle progress indicator.
|
|
@@ -13,7 +13,7 @@ import '../menu/menu-item-link.js';
|
|
|
13
13
|
import { css, html, LitElement } from 'lit';
|
|
14
14
|
import { OVERFLOW_CLASS, OVERFLOW_MINI_CLASS, OverflowGroupMixin } from './overflow-group-mixin.js';
|
|
15
15
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
16
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
16
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
17
17
|
|
|
18
18
|
const OPENER_STYLE = {
|
|
19
19
|
DEFAULT: 'default',
|
|
@@ -3,7 +3,7 @@ import '../loading-spinner/loading-spinner.js';
|
|
|
3
3
|
import { css, html, LitElement, nothing } from 'lit';
|
|
4
4
|
import { buttonStyles } from '../button/button-styles.js';
|
|
5
5
|
import { findComposedAncestor } from '../../helpers/dom.js';
|
|
6
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
6
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
7
7
|
import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
8
8
|
import { getFirstFocusableDescendant } from '../../helpers/focus.js';
|
|
9
9
|
import { getSeparator } from '@brightspace-ui/intl/lib/list.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../scroll-wrapper.js';
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { RtlMixin } from '../../../mixins/rtl-mixin.js';
|
|
3
|
+
import { RtlMixin } from '../../../mixins/rtl/rtl-mixin.js';
|
|
4
4
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
5
5
|
|
|
6
6
|
class TestScrollWrapper extends RtlMixin(LitElement) {
|
|
@@ -4,7 +4,7 @@ import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
|
4
4
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
7
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
7
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
8
8
|
|
|
9
9
|
const RTL_MULTIPLIER = navigator.userAgent.indexOf('Edge/') > 0 ? 1 : -1; /* legacy-Edge doesn't reverse scrolling in RTL */
|
|
10
10
|
const SCROLL_AMOUNT = 0.8;
|
|
@@ -2,7 +2,7 @@ import '../button/button-subtle.js';
|
|
|
2
2
|
import { html, LitElement } from 'lit';
|
|
3
3
|
import { DropdownOpenerMixin } from '../dropdown/dropdown-opener-mixin.js';
|
|
4
4
|
import { dropdownOpenerStyles } from '../dropdown/dropdown-opener-styles.js';
|
|
5
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
5
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
6
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
7
7
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
8
8
|
import { SelectionActionMixin } from './selection-action-mixin.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../button/button-subtle.js';
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { ButtonMixin } from '../button/button-mixin.js';
|
|
4
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
4
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
7
7
|
import { SelectionActionMixin } from './selection-action-mixin.js';
|
|
@@ -6,7 +6,7 @@ import { css, html, LitElement, nothing } from 'lit';
|
|
|
6
6
|
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
8
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
9
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
9
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
10
10
|
import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -2,7 +2,7 @@ import '../inputs/input-checkbox.js';
|
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import { LabelledMixin } from '../../mixins/labelled-mixin.js';
|
|
5
|
+
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
|
6
6
|
import { radioStyles } from '../inputs/input-radio-styles.js';
|
|
7
7
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../button/button-subtle.js';
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
3
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
4
4
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
5
5
|
import { SelectionInfo } from './selection-mixin.js';
|
|
6
6
|
import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../inputs/input-checkbox.js';
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
3
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
6
6
|
import { SelectionInfo } from './selection-mixin.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import { css } from 'lit';
|
|
3
3
|
import { dedupeMixin } from '@open-wc/dedupe-mixin';
|
|
4
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
4
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
5
5
|
|
|
6
6
|
// DE50056: starting in Safari 16, the pulsing animation causes FACE
|
|
7
7
|
// (and possibly elsewhere) to render a blank page
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import { css, html, unsafeCSS } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
4
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
5
5
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
6
6
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
7
7
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
8
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
9
9
|
|
|
10
10
|
export const SwitchMixin = superclass => class extends FocusMixin(RtlMixin(superclass)) {
|
|
11
11
|
|
|
@@ -12,7 +12,7 @@ import '../../selection/selection-input.js';
|
|
|
12
12
|
import { css, html } from 'lit';
|
|
13
13
|
import { tableStyles, TableWrapper } from '../table-wrapper.js';
|
|
14
14
|
import { DemoPassthroughMixin } from '../../demo/demo-passthrough-mixin.js';
|
|
15
|
-
import { RtlMixin } from '../../../mixins/rtl-mixin.js';
|
|
15
|
+
import { RtlMixin } from '../../../mixins/rtl/rtl-mixin.js';
|
|
16
16
|
|
|
17
17
|
const fruits = ['Apples', 'Oranges', 'Bananas'];
|
|
18
18
|
const thText = ['Additional', 'Placeholder', 'Header', 'Row'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../icons/icon.js';
|
|
3
3
|
import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
4
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
4
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
5
5
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../scroll-wrapper/scroll-wrapper.js';
|
|
3
3
|
import { css, html, LitElement, nothing } from 'lit';
|
|
4
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
4
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
5
5
|
import { SelectionMixin } from '../selection/selection-mixin.js';
|
|
6
6
|
|
|
7
7
|
export const tableStyles = css`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
3
3
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
4
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
4
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
5
5
|
|
|
6
6
|
const keyCodes = {
|
|
7
7
|
ENTER: 13,
|
package/components/tabs/tabs.js
CHANGED
|
@@ -4,14 +4,14 @@ import '../../helpers/queueMicrotask.js';
|
|
|
4
4
|
import './tab-internal.js';
|
|
5
5
|
import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
6
6
|
import { cssEscape, findComposedAncestor } from '../../helpers/dom.js';
|
|
7
|
-
import { ArrowKeysMixin } from '../../mixins/arrow-keys-mixin.js';
|
|
7
|
+
import { ArrowKeysMixin } from '../../mixins/arrow-keys/arrow-keys-mixin.js';
|
|
8
8
|
import { bodyCompactStyles } from '../typography/styles.js';
|
|
9
9
|
import { classMap } from 'lit/directives/class-map.js';
|
|
10
10
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
11
11
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
12
12
|
import { repeat } from 'lit/directives/repeat.js';
|
|
13
13
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
14
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
14
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
15
15
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
16
16
|
|
|
17
17
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
@@ -8,7 +8,7 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
8
8
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
9
9
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
10
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
11
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
11
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
12
12
|
|
|
13
13
|
const keyCodes = {
|
|
14
14
|
BACKSPACE: 8,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../button/button-subtle.js';
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { announce } from '../../helpers/announce.js';
|
|
4
|
-
import { ArrowKeysMixin } from '../../mixins/arrow-keys-mixin.js';
|
|
4
|
+
import { ArrowKeysMixin } from '../../mixins/arrow-keys/arrow-keys-mixin.js';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
6
|
import { getOffsetParent } from '../../helpers/dom.js';
|
|
7
|
-
import { InteractiveMixin } from '../../mixins/interactive-mixin.js';
|
|
7
|
+
import { InteractiveMixin } from '../../mixins/interactive/interactive-mixin.js';
|
|
8
8
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
9
9
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
10
10
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
@@ -3,7 +3,7 @@ import '../tooltip/tooltip.js';
|
|
|
3
3
|
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
|
|
4
4
|
import { bodySmallStyles } from '../typography/styles.js';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
6
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
7
7
|
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
8
8
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
9
9
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
@@ -6,7 +6,7 @@ import { bodySmallStyles } from '../typography/styles.js';
|
|
|
6
6
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
7
7
|
import { isFocusable } from '../../helpers/focus.js';
|
|
8
8
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
9
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
9
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
10
10
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
11
|
|
|
12
12
|
let logAccessibilityWarning = true;
|
package/helpers/demo/prism.html
CHANGED
|
@@ -615,7 +615,7 @@ import { getComposedActiveElement, getFirstFocusableDescendant, getPreviousFocus
|
|
|
615
615
|
import { classMap } from 'lit/directives/class-map.js';
|
|
616
616
|
import { html } from 'lit';
|
|
617
617
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
618
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
618
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
619
619
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
620
620
|
import { tryGetIfrauBackdropService } from '../../helpers/ifrauBackdropService.js';
|
|
621
621
|
|
|
@@ -1768,11 +1768,11 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreE
|
|
|
1768
1768
|
<pre class="d2l-code d2l-code-dark line-numbers"><code class="language-javascript">import '../colors/colors.js';
|
|
1769
1769
|
import { css, html, LitElement } from 'lit';
|
|
1770
1770
|
import { classMap } from 'lit/directives/class-map.js';
|
|
1771
|
-
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
1771
|
+
import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
1772
1772
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
1773
1773
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
1774
1774
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
1775
|
-
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
1775
|
+
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
1776
1776
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
1777
1777
|
|
|
1778
1778
|
/**
|
|
@@ -9,7 +9,7 @@ The focusable elements can be provided in one of two ways:
|
|
|
9
9
|
If the elements are known up-front and are in the element's local DOM scope, simply add the d2l-arrowkeys-focusable class.
|
|
10
10
|
|
|
11
11
|
```javascript
|
|
12
|
-
import { ArrowKeysMixin } from '@brightspace-ui/core/mixins/arrow-keys-mixin.js';
|
|
12
|
+
import { ArrowKeysMixin } from '@brightspace-ui/core/mixins/arrow-keys/arrow-keys-mixin.js';
|
|
13
13
|
class MyElement extends ArrowKeysMixin(LitElement) {
|
|
14
14
|
render() {
|
|
15
15
|
return this.arrowKeysContainer(html`
|
|
@@ -28,7 +28,7 @@ customElements.define('my-element', MyElement);
|
|
|
28
28
|
If the elements are not known up front, or the elements cannot be simply queried in the element's local DOM-scope, an async arrowKeysFocusablesProvider may be implemented.
|
|
29
29
|
|
|
30
30
|
```javascript
|
|
31
|
-
import { ArrowKeysMixin } from '@brightspace-ui/core/mixins/arrow-keys-mixin.js';
|
|
31
|
+
import { ArrowKeysMixin } from '@brightspace-ui/core/mixins/arrow-keys/arrow-keys-mixin.js';
|
|
32
32
|
class MyElement extends ArrowKeysMixin(LitElement) {
|
|
33
33
|
render() {
|
|
34
34
|
return this.arrowKeysContainer(html`
|