@brightspace-ui/core 3.267.0 → 3.267.3
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 +98 -102
- package/components/alert/alert.js +109 -113
- package/components/backdrop/backdrop-dirty-overlay.js +13 -17
- package/components/backdrop/backdrop-loading.js +105 -109
- package/components/backdrop/backdrop.js +50 -54
- package/components/breadcrumbs/breadcrumb-current-page.js +19 -23
- package/components/breadcrumbs/breadcrumb.js +50 -54
- package/components/breadcrumbs/breadcrumbs.js +34 -38
- package/components/button/button-add.js +156 -164
- package/components/button/button-copy-mixin.js +9 -11
- package/components/button/button-copy.js +15 -19
- package/components/button/button-icon.js +110 -114
- package/components/button/button-move.js +153 -157
- package/components/button/button-split-item.js +16 -20
- package/components/button/button-split.js +70 -74
- package/components/button/button-subtle-copy.js +17 -19
- package/components/button/button-subtle.js +145 -149
- package/components/button/button-toggle.js +25 -29
- package/components/button/button.js +70 -74
- package/components/button/floating-buttons.js +63 -67
- package/components/calendar/calendar.js +244 -248
- package/components/card/card-content-meta.js +13 -15
- package/components/card/card-content-title.js +9 -11
- package/components/card/card-footer-link.js +76 -80
- package/components/card/card-loading-shimmer.js +35 -39
- package/components/card/card.js +188 -192
- package/components/collapsible-panel/collapsible-panel-group.js +17 -21
- package/components/collapsible-panel/collapsible-panel-summary-item.js +27 -31
- package/components/collapsible-panel/collapsible-panel.js +258 -262
- package/components/count-badge/count-badge-icon.js +12 -16
- package/components/count-badge/count-badge-mixin.js +124 -128
- package/components/count-badge/count-badge.js +2 -4
- package/components/description-list/description-list-wrapper.js +27 -31
- package/components/dialog/dialog-confirm.js +55 -59
- package/components/dialog/dialog-fullscreen.js +128 -132
- package/components/dialog/dialog-mixin.js +39 -41
- package/components/dialog/dialog.js +61 -65
- package/components/dropdown/dropdown-button-subtle.js +21 -25
- package/components/dropdown/dropdown-button.js +31 -35
- package/components/dropdown/dropdown-context-menu.js +28 -31
- package/components/dropdown/dropdown-menu.js +27 -31
- package/components/dropdown/dropdown-more.js +23 -26
- package/components/dropdown/dropdown-opener-mixin.js +44 -46
- package/components/dropdown/dropdown-popover-mixin.js +155 -159
- package/components/dropdown/dropdown-tabs.js +5 -7
- package/components/dropdown/dropdown.js +1 -3
- package/components/empty-state/empty-state-action-button.js +18 -22
- package/components/empty-state/empty-state-action-link.js +14 -18
- package/components/empty-state/empty-state-illustrated.js +21 -25
- package/components/empty-state/empty-state-simple.js +8 -12
- package/components/expand-collapse/expand-collapse-content.js +48 -52
- package/components/filter/filter-dimension-set-date-text-value.js +34 -36
- package/components/filter/filter-dimension-set-date-time-range-value.js +45 -47
- package/components/filter/filter-dimension-set-empty-state.js +17 -19
- package/components/filter/filter-dimension-set-value.js +27 -29
- package/components/filter/filter-dimension-set.js +65 -67
- package/components/filter/filter-overflow-group.js +15 -19
- package/components/filter/filter-tags.js +16 -19
- package/components/filter/filter.js +115 -119
- package/components/focus-trap/focus-trap.js +17 -21
- package/components/form/form-element-mixin.js +33 -35
- package/components/form/form-error-summary.js +37 -42
- package/components/form/form.js +33 -37
- package/components/hierarchical-view/hierarchical-view-mixin.js +76 -80
- package/components/hierarchical-view/hierarchical-view.js +5 -7
- package/components/html-block/html-block.js +45 -49
- package/components/icons/icon-custom.js +20 -24
- package/components/icons/icon.js +20 -24
- package/components/icons/slotted-icon-mixin.js +16 -18
- package/components/inputs/input-checkbox-group.js +34 -38
- package/components/inputs/input-checkbox.js +106 -110
- package/components/inputs/input-color.js +142 -148
- package/components/inputs/input-date-range.js +90 -94
- package/components/inputs/input-date-time-range-to.js +70 -74
- package/components/inputs/input-date-time-range.js +110 -115
- package/components/inputs/input-date-time.js +75 -79
- package/components/inputs/input-date.js +101 -105
- package/components/inputs/input-fieldset.js +37 -43
- package/components/inputs/input-group.js +10 -12
- package/components/inputs/input-inline-help.js +4 -6
- package/components/inputs/input-number.js +112 -118
- package/components/inputs/input-percent.js +52 -58
- package/components/inputs/input-radio-group.js +45 -49
- package/components/inputs/input-radio-spacer.js +11 -13
- package/components/inputs/input-radio.js +62 -66
- package/components/inputs/input-search.js +63 -68
- package/components/inputs/input-styles.js +140 -3
- package/components/inputs/input-text.js +245 -251
- package/components/inputs/input-textarea.js +128 -132
- package/components/inputs/input-time-range.js +100 -104
- package/components/inputs/input-time.js +107 -113
- package/components/link/link-mixin.js +37 -41
- package/components/link/link.js +113 -119
- package/components/list/list-controls.js +25 -29
- package/components/list/list-item-button-mixin.js +10 -12
- package/components/list/list-item-checkbox-mixin.js +35 -37
- package/components/list/list-item-content.js +33 -35
- package/components/list/list-item-drag-drop-mixin.js +45 -47
- package/components/list/list-item-drag-handle.js +80 -84
- package/components/list/list-item-drag-image.js +77 -81
- package/components/list/list-item-expand-collapse-mixin.js +17 -19
- package/components/list/list-item-generic-layout.js +222 -226
- package/components/list/list-item-link-mixin.js +10 -12
- package/components/list/list-item-mixin.js +68 -70
- package/components/list/list-item-nav-mixin.js +17 -19
- package/components/list/list-item-placement-marker.js +65 -67
- package/components/list/list-item-role-mixin.js +9 -11
- package/components/list/list-item.js +7 -9
- package/components/list/list.js +121 -125
- package/components/loading-spinner/loading-spinner.js +93 -97
- package/custom-elements.json +1920 -6694
- package/package.json +3 -2
|
@@ -8,45 +8,41 @@ import { PropertyRequiredMixin } from '../../mixins/property-required/property-r
|
|
|
8
8
|
*/
|
|
9
9
|
class InputCheckboxGroup extends PropertyRequiredMixin(LitElement) {
|
|
10
10
|
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
}
|
|
11
|
+
static properties = {
|
|
12
|
+
/**
|
|
13
|
+
* REQUIRED: Label for the group of checkboxes
|
|
14
|
+
* @type {string}
|
|
15
|
+
*/
|
|
16
|
+
label: { required: true, type: String },
|
|
17
|
+
/**
|
|
18
|
+
* Hides the label visually
|
|
19
|
+
* @type {boolean}
|
|
20
|
+
*/
|
|
21
|
+
labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean }
|
|
22
|
+
};
|
|
25
23
|
|
|
26
|
-
static
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`];
|
|
49
|
-
}
|
|
24
|
+
static styles = [inputLabelStyles, css`
|
|
25
|
+
:host {
|
|
26
|
+
display: block;
|
|
27
|
+
}
|
|
28
|
+
:host([hidden]) {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
.wrapper {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: 0.6rem;
|
|
35
|
+
}
|
|
36
|
+
::slotted(d2l-input-checkbox) {
|
|
37
|
+
margin-bottom: 0;
|
|
38
|
+
}
|
|
39
|
+
.d2l-input-label {
|
|
40
|
+
margin-block-end: 0.6rem;
|
|
41
|
+
}
|
|
42
|
+
.d2l-input-label[hidden] {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
`];
|
|
50
46
|
|
|
51
47
|
constructor() {
|
|
52
48
|
super();
|
|
@@ -21,116 +21,112 @@ export const checkboxStyles = _generateInputCheckboxStyles('input[type="checkbox
|
|
|
21
21
|
*/
|
|
22
22
|
class InputCheckbox extends FormElementMixin(InputInlineHelpMixin(FocusMixin(SkeletonMixin(LitElement)))) {
|
|
23
23
|
|
|
24
|
-
static
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
`
|
|
132
|
-
];
|
|
133
|
-
}
|
|
24
|
+
static properties = {
|
|
25
|
+
/**
|
|
26
|
+
* @ignore
|
|
27
|
+
*/
|
|
28
|
+
ariaLabel: { type: String, attribute: 'aria-label' },
|
|
29
|
+
/**
|
|
30
|
+
* Checked state
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
*/
|
|
33
|
+
checked: { type: Boolean },
|
|
34
|
+
/**
|
|
35
|
+
* ACCESSIBILITY: Additional information communicated to screenreader users when focusing on the input
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
description: { type: String },
|
|
39
|
+
/**
|
|
40
|
+
* Disables the input
|
|
41
|
+
* @type {boolean}
|
|
42
|
+
*/
|
|
43
|
+
disabled: { type: Boolean },
|
|
44
|
+
/**
|
|
45
|
+
* Tooltip text when disabled
|
|
46
|
+
* @type {string}
|
|
47
|
+
*/
|
|
48
|
+
disabledTooltip: { type: String, attribute: 'disabled-tooltip' },
|
|
49
|
+
/**
|
|
50
|
+
* Sets checkbox to an indeterminate state
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
*/
|
|
53
|
+
indeterminate: { type: Boolean },
|
|
54
|
+
/**
|
|
55
|
+
* REQUIRED: Label for the input
|
|
56
|
+
* @type {string}
|
|
57
|
+
*/
|
|
58
|
+
label: { type: String },
|
|
59
|
+
/**
|
|
60
|
+
* Hides the label visually
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
*/
|
|
63
|
+
labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
|
|
64
|
+
/**
|
|
65
|
+
* Hides the supporting slot when unchecked
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
*/
|
|
68
|
+
supportingHiddenWhenUnchecked: { type: Boolean, attribute: 'supporting-hidden-when-unchecked', reflect: true },
|
|
69
|
+
/**
|
|
70
|
+
* Value of the input
|
|
71
|
+
* @type {string}
|
|
72
|
+
*/
|
|
73
|
+
value: { type: String },
|
|
74
|
+
_hasSupporting: { state: true },
|
|
75
|
+
_isHovered: { state: true },
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
static styles = [super.styles, checkboxStyles, offscreenStyles,
|
|
79
|
+
css`
|
|
80
|
+
:host {
|
|
81
|
+
display: block;
|
|
82
|
+
margin-block-end: 0.6rem;
|
|
83
|
+
}
|
|
84
|
+
:host([hidden]) {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
:host([label-hidden]) {
|
|
88
|
+
display: inline-block;
|
|
89
|
+
margin-block-end: 0;
|
|
90
|
+
}
|
|
91
|
+
label {
|
|
92
|
+
display: flex;
|
|
93
|
+
line-height: ${cssSizes.inputBoxSize}rem;
|
|
94
|
+
overflow-wrap: anywhere;
|
|
95
|
+
}
|
|
96
|
+
.d2l-input-checkbox-wrapper {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
}
|
|
99
|
+
.d2l-input-checkbox-text {
|
|
100
|
+
color: var(--d2l-theme-text-color-static-standard);
|
|
101
|
+
display: inline-block;
|
|
102
|
+
font-size: 0.8rem;
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
margin-inline-start: ${cssSizes.checkboxMargin}rem;
|
|
105
|
+
vertical-align: top;
|
|
106
|
+
white-space: normal;
|
|
107
|
+
}
|
|
108
|
+
:host([label-hidden]) .d2l-input-checkbox-text {
|
|
109
|
+
margin-inline-start: 0;
|
|
110
|
+
}
|
|
111
|
+
:host([skeleton]) .d2l-input-checkbox-text.d2l-skeletize::before {
|
|
112
|
+
bottom: 0.3rem;
|
|
113
|
+
top: 0.3rem;
|
|
114
|
+
}
|
|
115
|
+
.d2l-input-inline-help,
|
|
116
|
+
.d2l-input-checkbox-supporting {
|
|
117
|
+
margin-inline-start: ${cssSizes.inputBoxSize + cssSizes.checkboxMargin}rem;
|
|
118
|
+
}
|
|
119
|
+
:host(:not([skeleton])) .d2l-input-checkbox-text-disabled {
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
}
|
|
122
|
+
input[type="checkbox"].d2l-input-checkbox {
|
|
123
|
+
vertical-align: top;
|
|
124
|
+
}
|
|
125
|
+
.d2l-input-checkbox-supporting {
|
|
126
|
+
margin-block-start: 0.6rem;
|
|
127
|
+
}
|
|
128
|
+
`
|
|
129
|
+
];
|
|
134
130
|
|
|
135
131
|
constructor() {
|
|
136
132
|
super();
|
|
@@ -88,155 +88,149 @@ const SWATCH_TRANSPARENT = `<svg xmlns="http://www.w3.org/2000/svg" width="24" h
|
|
|
88
88
|
*/
|
|
89
89
|
class InputColor extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
|
90
90
|
|
|
91
|
-
static
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
91
|
+
static properties = {
|
|
92
|
+
/**
|
|
93
|
+
* ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis
|
|
94
|
+
* @type {string}
|
|
95
|
+
*/
|
|
96
|
+
associatedValue: { attribute: 'associated-value', type: String },
|
|
97
|
+
/**
|
|
98
|
+
* Puts the input into a disabled state
|
|
99
|
+
* @type {boolean}
|
|
100
|
+
*/
|
|
101
|
+
disabled: { reflect: true, type: Boolean },
|
|
102
|
+
/**
|
|
103
|
+
* Disallows the user from selecting "None" as a color value
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
*/
|
|
106
|
+
disallowNone: { attribute: 'disallow-none', type: Boolean },
|
|
107
|
+
/**
|
|
108
|
+
* ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.
|
|
109
|
+
* @type {string}
|
|
110
|
+
*/
|
|
111
|
+
label: {
|
|
112
|
+
type: String,
|
|
113
|
+
required: {
|
|
114
|
+
dependentProps: ['type'],
|
|
115
|
+
validator: (_value, elem, hasValue) => elem.type !== 'custom' || hasValue
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* Hides the label visually
|
|
120
|
+
* @type {boolean}
|
|
121
|
+
*/
|
|
122
|
+
labelHidden: { attribute: 'label-hidden', type: Boolean },
|
|
123
|
+
/**
|
|
124
|
+
* Puts the input into a read-only state
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
*/
|
|
127
|
+
readonly: { type: Boolean },
|
|
128
|
+
/**
|
|
129
|
+
* Type of color being chosen
|
|
130
|
+
* @type {'background'|'foreground'|'custom'}
|
|
131
|
+
* @default end
|
|
132
|
+
*/
|
|
133
|
+
type: { reflect: true, type: String },
|
|
134
|
+
/**
|
|
135
|
+
* Value of the input as a HEX color
|
|
136
|
+
* @type {string}
|
|
137
|
+
*/
|
|
138
|
+
value: { type: String },
|
|
139
|
+
/**
|
|
140
|
+
* @ignore
|
|
141
|
+
*/
|
|
142
|
+
launchType: { attribute: 'launch-type', type: String },
|
|
143
|
+
_opened: { state: true }
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
static styles = [super.styles, buttonStyles, inputLabelStyles, css`
|
|
147
|
+
:host {
|
|
148
|
+
display: inline-block;
|
|
149
|
+
}
|
|
150
|
+
:host([hidden]) {
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
147
153
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
width: 1.2rem;
|
|
229
|
-
}
|
|
230
|
-
${getFocusRingStyles('.readonly-wrapper')}
|
|
231
|
-
@media (prefers-contrast: more) {
|
|
232
|
-
.swatch {
|
|
233
|
-
border: 1px solid FieldText;
|
|
234
|
-
forced-color-adjust: none;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
`
|
|
238
|
-
];
|
|
239
|
-
}
|
|
154
|
+
button {
|
|
155
|
+
align-items: center;
|
|
156
|
+
background-color: var(--d2l-color-gypsum);
|
|
157
|
+
display: flex;
|
|
158
|
+
gap: 0.15rem;
|
|
159
|
+
min-height: auto;
|
|
160
|
+
padding: 0.55rem;
|
|
161
|
+
position: relative;
|
|
162
|
+
}
|
|
163
|
+
button:not([aria-disabled]):hover,
|
|
164
|
+
button:not([aria-disabled]):focus,
|
|
165
|
+
button.opened {
|
|
166
|
+
background-color: var(--d2l-color-mica);
|
|
167
|
+
}
|
|
168
|
+
:host([disabled]) button {
|
|
169
|
+
cursor: default;
|
|
170
|
+
opacity: 0.5;
|
|
171
|
+
}
|
|
172
|
+
/* Firefox includes a hidden border which messes up button dimensions */
|
|
173
|
+
button::-moz-focus-inner {
|
|
174
|
+
border: 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.d2l-input-label {
|
|
178
|
+
margin-bottom: 0;
|
|
179
|
+
padding-bottom: 7px; /* prevent margin-collapse with readonly swatch margins */
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.swatch {
|
|
183
|
+
border: 1px inset rgba(0, 0, 0, 0.42);
|
|
184
|
+
border-radius: 0.1rem;
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
display: inline-block;
|
|
187
|
+
height: 0.3rem;
|
|
188
|
+
width: 1.2rem;
|
|
189
|
+
}
|
|
190
|
+
:host([type="custom"]) .swatch {
|
|
191
|
+
border-radius: 0.15rem;
|
|
192
|
+
height: 1rem;
|
|
193
|
+
}
|
|
194
|
+
.swatch-transparent {
|
|
195
|
+
background-image: ${svgToCSS(SWATCH_TRANSPARENT)};
|
|
196
|
+
background-position-y: -1.5px;
|
|
197
|
+
background-size: cover;
|
|
198
|
+
}
|
|
199
|
+
:host([type="custom"]) .swatch-transparent {
|
|
200
|
+
background-position-y: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.icon-wrapper {
|
|
204
|
+
align-items: center;
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
gap: 0.1rem;
|
|
208
|
+
}
|
|
209
|
+
.icon-wrapper > svg {
|
|
210
|
+
height: 0.6rem;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
button,
|
|
214
|
+
.readonly-wrapper {
|
|
215
|
+
color: var(--d2l-color-ferrite);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.readonly-wrapper {
|
|
219
|
+
border-radius: 0.1rem;
|
|
220
|
+
display: block;
|
|
221
|
+
line-height: 0;
|
|
222
|
+
margin: 0.55rem 0;
|
|
223
|
+
outline: none;
|
|
224
|
+
width: 1.2rem;
|
|
225
|
+
}
|
|
226
|
+
${getFocusRingStyles('.readonly-wrapper')}
|
|
227
|
+
@media (prefers-contrast: more) {
|
|
228
|
+
.swatch {
|
|
229
|
+
border: 1px solid FieldText;
|
|
230
|
+
forced-color-adjust: none;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
`];
|
|
240
234
|
|
|
241
235
|
constructor() {
|
|
242
236
|
super();
|