@brightspace-ui/core 2.2.1 → 2.3.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.
- 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 +1 -1
- 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 +3 -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/tag-list-item-mixin.js +1 -1
- package/components/tag-list/tag-list-item.js +1 -1
- package/components/tag-list/tag-list.js +1 -1
- 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 +13 -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/lang/cy.js +2 -2
- package/lang/da.js +1 -1
- package/lang/de.js +2 -2
- package/lang/fr-fr.js +1 -1
- package/lang/hi.js +2 -2
- package/lang/ko.js +1 -1
- package/lang/nl.js +1 -1
- package/lang/pt.js +1 -1
- package/lang/sv.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,6 +1,6 @@
|
|
|
1
1
|
import './alert.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
-
import { ifDefined } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
|
|
5
5
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
6
6
|
|
|
@@ -2,8 +2,8 @@ import '../button/button-icon.js';
|
|
|
2
2
|
import '../button/button-subtle.js';
|
|
3
3
|
import '../colors/colors.js';
|
|
4
4
|
import { bodyCompactStyles, bodyStandardStyles } from '../typography/styles.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit
|
|
6
|
-
import { classMap } from 'lit
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
8
8
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { cssEscape, getComposedChildren, getComposedParent, isVisible } from '../../helpers/dom.js';
|
|
4
4
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../icons/icon.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { findComposedAncestor } from '../../helpers/dom.js';
|
|
4
|
-
import { ifDefined } from 'lit
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { linkStyles } from '../link/link.js';
|
|
6
6
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './breadcrumb.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
4
4
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
5
5
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../icons/icon.js';
|
|
3
3
|
import '../tooltip/tooltip.js';
|
|
4
|
-
import { css, html, LitElement } from 'lit
|
|
4
|
+
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { VisibleOnAncestorMixin, visibleOnAncestorStyles } from '../../mixins/visible-on-ancestor-mixin.js';
|
|
6
6
|
import { ButtonMixin } from './button-mixin.js';
|
|
7
7
|
import { buttonStyles } from './button-styles.js';
|
|
8
8
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
9
|
-
import { ifDefined } from 'lit
|
|
9
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
10
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
11
11
|
import { ThemeMixin } from '../../mixins/theme-mixin.js';
|
|
12
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../icons/icon.js';
|
|
2
2
|
import '../tooltip/tooltip.js';
|
|
3
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { ButtonMixin } from './button-mixin.js';
|
|
5
5
|
import { buttonStyles } from './button-styles.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 { labelStyles } from '../typography/styles.js';
|
|
9
9
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
10
10
|
|
|
@@ -40,6 +40,12 @@ class ButtonSubtle extends ButtonMixin(RtlMixin(LitElement)) {
|
|
|
40
40
|
*/
|
|
41
41
|
iconRight: { type: Boolean, reflect: true, attribute: 'icon-right' },
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Whether to render the slimmer version of the button
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
*/
|
|
47
|
+
slim: { type: Boolean, reflect: true },
|
|
48
|
+
|
|
43
49
|
/**
|
|
44
50
|
* REQUIRED: Text for the button
|
|
45
51
|
* @type {string}
|
|
@@ -59,19 +65,41 @@ class ButtonSubtle extends ButtonMixin(RtlMixin(LitElement)) {
|
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
button {
|
|
68
|
+
--d2l-button-subtle-padding-inline-start: 0.6rem;
|
|
69
|
+
--d2l-button-subtle-padding-inline-end: 0.6rem;
|
|
62
70
|
background-color: transparent;
|
|
63
71
|
border-color: transparent;
|
|
64
72
|
font-family: inherit;
|
|
65
|
-
padding: 0
|
|
73
|
+
padding: 0 var(--d2l-button-subtle-padding-inline-end) 0 var(--d2l-button-subtle-padding-inline-start);
|
|
66
74
|
position: relative;
|
|
67
75
|
}
|
|
68
76
|
|
|
77
|
+
:host([dir="rtl"]) button {
|
|
78
|
+
padding: 0 var(--d2l-button-subtle-padding-inline-start) 0 var(--d2l-button-subtle-padding-inline-end);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([slim]) button {
|
|
82
|
+
--d2l-button-subtle-padding-inline-start: 0.5rem;
|
|
83
|
+
--d2l-button-subtle-padding-inline-end: 0.5rem;
|
|
84
|
+
min-height: 1.5rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([slim][icon]) button {
|
|
88
|
+
--d2l-button-subtle-padding-inline-start: 0.4rem;
|
|
89
|
+
--d2l-button-subtle-padding-inline-end: 0.5rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([slim][icon][icon-right]) button {
|
|
93
|
+
--d2l-button-subtle-padding-inline-start: 0.5rem;
|
|
94
|
+
--d2l-button-subtle-padding-inline-end: 0.4rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
69
97
|
:host([h-align="text"]) button {
|
|
70
|
-
left: -
|
|
98
|
+
left: calc(var(--d2l-button-subtle-padding-inline-start) * -1);
|
|
71
99
|
}
|
|
72
100
|
:host([dir="rtl"][h-align="text"]) button {
|
|
73
101
|
left: 0;
|
|
74
|
-
right: -
|
|
102
|
+
right: calc(var(--d2l-button-subtle-padding-inline-start) * -1);
|
|
75
103
|
}
|
|
76
104
|
|
|
77
105
|
/* Firefox includes a hidden border which messes up button dimensions */
|
|
@@ -98,24 +126,17 @@ class ButtonSubtle extends ButtonMixin(RtlMixin(LitElement)) {
|
|
|
98
126
|
:host([active]:not([disabled])) button .d2l-button-subtle-content {
|
|
99
127
|
color: var(--d2l-color-celestine-minus-1);
|
|
100
128
|
}
|
|
101
|
-
:host([icon]) .d2l-button-subtle-content
|
|
129
|
+
:host([icon]) .d2l-button-subtle-content,
|
|
130
|
+
:host([dir="rtl"][icon][icon-right]) .d2l-button-subtle-content {
|
|
102
131
|
padding-left: 1.2rem;
|
|
132
|
+
padding-right: 0;
|
|
103
133
|
}
|
|
134
|
+
:host([dir="rtl"][icon]) .d2l-button-subtle-content,
|
|
104
135
|
:host([icon][icon-right]) .d2l-button-subtle-content {
|
|
105
136
|
padding-left: 0;
|
|
106
137
|
padding-right: 1.2rem;
|
|
107
138
|
}
|
|
108
139
|
|
|
109
|
-
:host([dir="rtl"][icon]) .d2l-button-subtle-content {
|
|
110
|
-
padding-left: 0;
|
|
111
|
-
padding-right: 1.2rem;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:host([dir="rtl"][icon][icon-right]) .d2l-button-subtle-content {
|
|
115
|
-
padding-left: 1.2rem;
|
|
116
|
-
padding-right: 0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
140
|
d2l-icon.d2l-button-subtle-icon {
|
|
120
141
|
color: var(--d2l-color-celestine);
|
|
121
142
|
display: none;
|
|
@@ -125,19 +146,21 @@ class ButtonSubtle extends ButtonMixin(RtlMixin(LitElement)) {
|
|
|
125
146
|
transform: translateY(-50%);
|
|
126
147
|
width: 0.9rem;
|
|
127
148
|
}
|
|
149
|
+
|
|
128
150
|
button:hover:not([disabled]) d2l-icon.d2l-button-subtle-icon,
|
|
129
151
|
button:focus:not([disabled]) d2l-icon.d2l-button-subtle-icon,
|
|
130
152
|
:host([active]:not([disabled])) button d2l-icon.d2l-button-subtle-icon {
|
|
131
153
|
color: var(--d2l-color-celestine-minus-1);
|
|
132
154
|
}
|
|
155
|
+
|
|
133
156
|
:host([icon]) d2l-icon.d2l-button-subtle-icon {
|
|
134
157
|
display: inline-block;
|
|
135
158
|
}
|
|
136
159
|
:host([icon][icon-right]) d2l-icon.d2l-button-subtle-icon {
|
|
137
|
-
right:
|
|
160
|
+
right: var(--d2l-button-subtle-padding-inline-end);
|
|
138
161
|
}
|
|
139
162
|
:host([dir="rtl"][icon][icon-right]) d2l-icon.d2l-button-subtle-icon {
|
|
140
|
-
left:
|
|
163
|
+
left: var(--d2l-button-subtle-padding-inline-end);
|
|
141
164
|
right: auto;
|
|
142
165
|
}
|
|
143
166
|
|
|
@@ -152,6 +175,7 @@ class ButtonSubtle extends ButtonMixin(RtlMixin(LitElement)) {
|
|
|
152
175
|
constructor() {
|
|
153
176
|
super();
|
|
154
177
|
this.iconRight = false;
|
|
178
|
+
this.slim = false;
|
|
155
179
|
|
|
156
180
|
/** @internal */
|
|
157
181
|
this._buttonId = getUniqueId();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../tooltip/tooltip.js';
|
|
3
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { ButtonMixin } from './button-mixin.js';
|
|
5
5
|
import { buttonStyles } from './button-styles.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 { labelStyles } from '../typography/styles.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
<d2l-demo-snippet>
|
|
19
19
|
<template>
|
|
20
|
-
<d2l-button-subtle
|
|
20
|
+
<d2l-button-subtle text="Subtle Button"></d2l-button-subtle>
|
|
21
|
+
<d2l-button-subtle slim text="Slim Subtle Button"></d2l-button-subtle>
|
|
21
22
|
</template>
|
|
22
23
|
</d2l-demo-snippet>
|
|
23
24
|
|
|
@@ -25,7 +26,8 @@
|
|
|
25
26
|
|
|
26
27
|
<d2l-demo-snippet>
|
|
27
28
|
<template>
|
|
28
|
-
<d2l-button-subtle
|
|
29
|
+
<d2l-button-subtle text="Subtle Button" disabled></d2l-button-subtle>
|
|
30
|
+
<d2l-button-subtle slim text="Slim Subtle Button" disabled></d2l-button-subtle>
|
|
29
31
|
</template>
|
|
30
32
|
</d2l-demo-snippet>
|
|
31
33
|
|
|
@@ -33,7 +35,8 @@
|
|
|
33
35
|
|
|
34
36
|
<d2l-demo-snippet>
|
|
35
37
|
<template>
|
|
36
|
-
<d2l-button-subtle
|
|
38
|
+
<d2l-button-subtle text="Subtle Button" disabled disabled-tooltip="Optional disabled tooltip"></d2l-button-subtle>
|
|
39
|
+
<d2l-button-subtle slim text="Slim Subtle Button" disabled disabled-tooltip="Optional disabled tooltip"></d2l-button-subtle>
|
|
37
40
|
</template>
|
|
38
41
|
</d2l-demo-snippet>
|
|
39
42
|
|
|
@@ -41,7 +44,8 @@
|
|
|
41
44
|
|
|
42
45
|
<d2l-demo-snippet>
|
|
43
46
|
<template>
|
|
44
|
-
<d2l-button-subtle
|
|
47
|
+
<d2l-button-subtle icon="tier1:bookmark-hollow" text="Subtle Button"></d2l-button-subtle>
|
|
48
|
+
<d2l-button-subtle slim icon="tier1:bookmark-hollow" text="Slim Subtle Button"></d2l-button-subtle>
|
|
45
49
|
</template>
|
|
46
50
|
</d2l-demo-snippet>
|
|
47
51
|
|
|
@@ -49,7 +53,8 @@
|
|
|
49
53
|
|
|
50
54
|
<d2l-demo-snippet>
|
|
51
55
|
<template>
|
|
52
|
-
<d2l-button-subtle
|
|
56
|
+
<d2l-button-subtle icon="tier1:chevron-down" text="Subtle Button" icon-right></d2l-button-subtle>
|
|
57
|
+
<d2l-button-subtle slim icon="tier1:chevron-down" text="Slim Subtle Button" icon-right></d2l-button-subtle>
|
|
53
58
|
</template>
|
|
54
59
|
</d2l-demo-snippet>
|
|
55
60
|
|
|
@@ -60,6 +65,12 @@
|
|
|
60
65
|
<d2l-button-subtle icon="tier1:gear" text="Button Edge Aligned (default)"></d2l-button-subtle>
|
|
61
66
|
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>
|
|
62
67
|
<d2l-button-subtle icon="tier1:gear" text="Button Content Aligned" h-align="text"></d2l-button-subtle>
|
|
68
|
+
<br>
|
|
69
|
+
<d2l-button-subtle slim icon="tier1:gear" text="Slim Button Content Aligned" h-align="text"></d2l-button-subtle>
|
|
70
|
+
<br>
|
|
71
|
+
<d2l-button-subtle icon="tier1:chevron-down" text="Subtle Button" icon-right h-align="text"></d2l-button-subtle>
|
|
72
|
+
<br>
|
|
73
|
+
<d2l-button-subtle slim icon="tier1:chevron-down" text="Slim Subtle Button" icon-right h-align="text"></d2l-button-subtle>
|
|
63
74
|
</template>
|
|
64
75
|
</d2l-demo-snippet>
|
|
65
76
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../../helpers/requestIdleCallback.js';
|
|
3
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { getBoundingAncestor, getComposedParent } from '../../helpers/dom.js';
|
|
5
5
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
6
|
-
import { styleMap } from 'lit
|
|
6
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
7
7
|
|
|
8
8
|
const mediaQueryList = window.matchMedia('(max-height: 500px)');
|
|
9
9
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '../button/button-icon.js';
|
|
2
2
|
import '../colors/colors.js';
|
|
3
3
|
import { bodySmallStyles, heading4Styles } from '../typography/styles.js';
|
|
4
|
-
import { css, html, LitElement } from 'lit
|
|
4
|
+
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { formatDateInISO, getClosestValidDate, getDateFromDateObj, getDateFromISODate, getDateTimeDescriptorShared, getToday, isDateInRange } from '../../helpers/dateTime.js';
|
|
6
|
-
import { classMap } from 'lit
|
|
6
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { findComposedAncestor } from '../../helpers/dom.js';
|
|
8
8
|
import { formatDate } from '@brightspace-ui/intl/lib/dateTime.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 { offscreenStyles } from '../offscreen/offscreen.js';
|
|
13
13
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../count-badge/count-badge-icon.js';
|
|
3
3
|
import '../icons/icon.js';
|
|
4
|
-
import { css, html, LitElement } from 'lit
|
|
5
|
-
import { ifDefined } from 'lit
|
|
4
|
+
import { css, html, LitElement } from 'lit';
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
7
7
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
8
8
|
|
package/components/card/card.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
-
import { ifDefined } from 'lit
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
7
7
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
8
8
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
9
|
-
import { styleMap } from 'lit
|
|
9
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A container element that provides specific layout using several slots.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../icons/icon.js';
|
|
3
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { CountBadgeMixin } from './count-badge-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
|
|
|
8
8
|
class CountBadgeIcon extends CountBadgeMixin(LitElement) {
|
|
9
9
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../tooltip/tooltip.js';
|
|
3
|
-
import { css, html } from 'lit
|
|
3
|
+
import { css, html } from 'lit';
|
|
4
4
|
import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
5
5
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
6
6
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.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';
|
|
10
|
-
import { styleMap } from 'lit
|
|
10
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
11
|
|
|
12
12
|
const maxBadgeDigits = 5;
|
|
13
13
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { CountBadgeMixin } from './count-badge-mixin.js';
|
|
4
4
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
5
|
-
import { ifDefined } from 'lit
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
|
|
7
7
|
class CountBadge extends CountBadgeMixin(LitElement) {
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'prismjs/prism.js';
|
|
2
|
-
import { html, LitElement } from 'lit
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
3
|
import { styles } from './code-view-styles.js';
|
|
4
4
|
import { themeStyles } from './code-dark-plus-styles.js';
|
|
5
|
-
import { unsafeHTML } from 'lit
|
|
5
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
6
6
|
|
|
7
7
|
class CodeView extends LitElement {
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import './demo-snippet.js';
|
|
|
2
2
|
import './code-view.js';
|
|
3
3
|
import '../colors/colors.js';
|
|
4
4
|
import '../typography/typography.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
6
|
import { heading2Styles } from '../typography/styles.js';
|
|
7
7
|
|
|
8
8
|
document.body.classList.add('d2l-typography');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../list/list.js';
|
|
2
2
|
import '../../list/list-item.js';
|
|
3
3
|
import '../../list/list-item-content.js';
|
|
4
|
-
import { html, LitElement } from 'lit
|
|
4
|
+
import { html, LitElement } from 'lit';
|
|
5
5
|
import { InitialStateError, runAsync } from '../../../directives/run-async/run-async.js';
|
|
6
6
|
|
|
7
7
|
class DialogAsyncContent extends LitElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { DialogMixin } from './dialog-mixin.js';
|
|
3
3
|
import { dialogStyles } from './dialog-styles.js';
|
|
4
4
|
import { forceFocusVisible } from '../../helpers/focus.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import '../button/button-icon.js';
|
|
2
2
|
import '../loading-spinner/loading-spinner.js';
|
|
3
3
|
import { AsyncContainerMixin, asyncStates } from '../../mixins/async-container/async-container-mixin.js';
|
|
4
|
-
import { css, html, LitElement } from 'lit
|
|
4
|
+
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { heading2Styles, heading3Styles } from '../typography/styles.js';
|
|
6
|
-
import { classMap } from 'lit
|
|
6
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { DialogMixin } from './dialog-mixin.js';
|
|
8
8
|
import { dialogStyles } from './dialog-styles.js';
|
|
9
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
10
10
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
11
|
-
import { styleMap } from 'lit
|
|
11
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
12
12
|
|
|
13
13
|
const mediaQueryList = window.matchMedia('(max-width: 615px), (max-height: 420px) and (max-width: 900px)');
|
|
14
14
|
|
|
@@ -3,12 +3,12 @@ import { allowBodyScroll, preventBodyScroll } from '../backdrop/backdrop.js';
|
|
|
3
3
|
import { clearDismissible, setDismissible } from '../../helpers/dismissible.js';
|
|
4
4
|
import { findComposedAncestor, isComposedAncestor } from '../../helpers/dom.js';
|
|
5
5
|
import { forceFocusVisible, getComposedActiveElement, getNextFocusable, tryApplyFocus } from '../../helpers/focus.js';
|
|
6
|
-
import { classMap } from 'lit
|
|
6
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
8
|
-
import { html } from 'lit
|
|
9
|
-
import { ifDefined } from 'lit
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
10
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
11
|
-
import { styleMap } from 'lit
|
|
11
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
12
12
|
import { tryGetIfrauBackdropService } from '../../helpers/ifrauBackdropService.js';
|
|
13
13
|
|
|
14
14
|
window.D2L = window.D2L || {};
|
|
@@ -2,15 +2,15 @@ import '../button/button-icon.js';
|
|
|
2
2
|
import '../loading-spinner/loading-spinner.js';
|
|
3
3
|
import '../../helpers/viewport-size.js';
|
|
4
4
|
import { AsyncContainerMixin, asyncStates } from '../../mixins/async-container/async-container-mixin.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit
|
|
6
|
-
import { classMap } from 'lit
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { DialogMixin } from './dialog-mixin.js';
|
|
8
8
|
import { dialogStyles } from './dialog-styles.js';
|
|
9
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
10
10
|
import { heading3Styles } from '../typography/styles.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
|
-
import { styleMap } from 'lit
|
|
13
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
14
14
|
|
|
15
15
|
const mediaQueryList = window.matchMedia('(max-width: 615px), (max-height: 420px) and (max-width: 900px)');
|
|
16
16
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../button/button-subtle.js';
|
|
2
|
-
import { html, LitElement } from 'lit
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
3
|
import { DropdownOpenerMixin } from './dropdown-opener-mixin.js';
|
|
4
4
|
import { dropdownOpenerStyles } from './dropdown-opener-styles.js';
|
|
5
|
-
import { ifDefined } from 'lit
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A "d2l-button-subtle" opener for dropdown content.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../button/button.js';
|
|
2
2
|
import '../icons/icon.js';
|
|
3
|
-
import { css, html, LitElement } from 'lit
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { DropdownOpenerMixin } from './dropdown-opener-mixin.js';
|
|
5
5
|
import { dropdownOpenerStyles } from './dropdown-opener-styles.js';
|
|
6
6
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
@@ -4,11 +4,11 @@ import '../focus-trap/focus-trap.js';
|
|
|
4
4
|
import { clearDismissible, setDismissible } from '../../helpers/dismissible.js';
|
|
5
5
|
import { findComposedAncestor, getBoundingAncestor, isComposedAncestor, isVisible } from '../../helpers/dom.js';
|
|
6
6
|
import { getComposedActiveElement, getFirstFocusableDescendant, getPreviousFocusableAncestor } from '../../helpers/focus.js';
|
|
7
|
-
import { classMap } from 'lit
|
|
8
|
-
import { html } from 'lit
|
|
7
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
8
|
+
import { html } from 'lit';
|
|
9
9
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
10
10
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
11
|
-
import { styleMap } from 'lit
|
|
11
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
12
12
|
import { tryGetIfrauBackdropService } from '../../helpers/ifrauBackdropService.js';
|
|
13
13
|
|
|
14
14
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
@@ -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';
|