@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
|
@@ -34,101 +34,97 @@ export function getShiftedEndDate(startValue, endValue, prevStartValue, inclusiv
|
|
|
34
34
|
*/
|
|
35
35
|
class InputDateRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
|
36
36
|
|
|
37
|
-
static
|
|
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
|
-
}
|
|
37
|
+
static properties = {
|
|
38
|
+
/**
|
|
39
|
+
* ADVANCED: Automatically shifts end date when start date changes to keep same range
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
autoShiftDates: { attribute: 'auto-shift-dates', reflect: true, type: Boolean },
|
|
43
|
+
/**
|
|
44
|
+
* Hides the start and end labels visually. Hidden labels are still read by screen readers so make sure to set appropriate start and end labels.
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
*/
|
|
47
|
+
childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
|
|
48
|
+
/**
|
|
49
|
+
* Disables the inputs
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
*/
|
|
52
|
+
disabled: { type: Boolean, reflect: true },
|
|
53
|
+
/**
|
|
54
|
+
* ACCESSIBILITY: Label for the end date input. Defaults to localized "End Date".
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @default "End Date"
|
|
57
|
+
*/
|
|
58
|
+
endLabel: { attribute: 'end-label', reflect: true, type: String },
|
|
59
|
+
/**
|
|
60
|
+
* ADVANCED: Indicates if the end calendar dropdown is open
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
*/
|
|
63
|
+
endOpened: { attribute: 'end-opened', type: Boolean },
|
|
64
|
+
/**
|
|
65
|
+
* Value of the end date input
|
|
66
|
+
* @type {string}
|
|
67
|
+
*/
|
|
68
|
+
endValue: { attribute: 'end-value', reflect: true, type: String },
|
|
69
|
+
/**
|
|
70
|
+
* Validates on inclusive range (i.e., it is valid for start and end dates to be equal)
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
inclusiveDateRange: { attribute: 'inclusive-date-range', reflect: true, type: Boolean },
|
|
74
|
+
/**
|
|
75
|
+
* ACCESSIBILITY: REQUIRED: Label for the input fieldset that wraps the date inputs
|
|
76
|
+
* @type {string}
|
|
77
|
+
*/
|
|
78
|
+
label: { type: String, reflect: true },
|
|
79
|
+
/**
|
|
80
|
+
* Hides the fieldset label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
|
|
81
|
+
* @type {boolean}
|
|
82
|
+
*/
|
|
83
|
+
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
84
|
+
/**
|
|
85
|
+
* Maximum valid date that could be selected by a user
|
|
86
|
+
* @type {string}
|
|
87
|
+
*/
|
|
88
|
+
maxValue: { attribute: 'max-value', reflect: true, type: String },
|
|
89
|
+
/**
|
|
90
|
+
* Minimum valid date that could be selected by a user
|
|
91
|
+
* @type {string}
|
|
92
|
+
*/
|
|
93
|
+
minValue: { attribute: 'min-value', reflect: true, type: String },
|
|
94
|
+
/**
|
|
95
|
+
* Indicates that values are required
|
|
96
|
+
* @type {boolean}
|
|
97
|
+
*/
|
|
98
|
+
required: { type: Boolean, reflect: true },
|
|
99
|
+
/**
|
|
100
|
+
* ACCESSIBILITY: Label for the start date input. Defaults to localized "Start Date".
|
|
101
|
+
* @type {string}
|
|
102
|
+
* @default "Start Date"
|
|
103
|
+
*/
|
|
104
|
+
startLabel: { attribute: 'start-label', reflect: true, type: String },
|
|
105
|
+
/**
|
|
106
|
+
* ADVANCED: Indicates if the start calendar dropdown is open
|
|
107
|
+
* @type {boolean}
|
|
108
|
+
*/
|
|
109
|
+
startOpened: { attribute: 'start-opened', type: Boolean },
|
|
110
|
+
/**
|
|
111
|
+
* Value of the start date input
|
|
112
|
+
* @type {string}
|
|
113
|
+
*/
|
|
114
|
+
startValue: { attribute: 'start-value', reflect: true, type: String }
|
|
115
|
+
};
|
|
118
116
|
|
|
119
|
-
static
|
|
120
|
-
|
|
121
|
-
:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
`];
|
|
131
|
-
}
|
|
117
|
+
static styles = [super.styles, css`
|
|
118
|
+
:host {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
}
|
|
121
|
+
:host([hidden]) {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
d2l-input-date {
|
|
125
|
+
display: block;
|
|
126
|
+
}
|
|
127
|
+
`];
|
|
132
128
|
|
|
133
129
|
constructor() {
|
|
134
130
|
super();
|
|
@@ -16,83 +16,79 @@ function debounce(func, delay) {
|
|
|
16
16
|
|
|
17
17
|
class InputDateTimeRangeTo extends SkeletonMixin(LocalizeCoreElement(LitElement)) {
|
|
18
18
|
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
}
|
|
19
|
+
static properties = {
|
|
20
|
+
/**
|
|
21
|
+
* Force block (stacked) range display if true
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
*/
|
|
24
|
+
blockDisplay: { attribute: 'block-display', type: Boolean },
|
|
25
|
+
/**
|
|
26
|
+
* Display localized "to" between the left and right slot contents
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
*/
|
|
29
|
+
displayTo: { attribute: 'display-to', type: Boolean },
|
|
30
|
+
/**
|
|
31
|
+
* Add margin-top for case where there would be a label above the range
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
*/
|
|
34
|
+
topMargin: { attribute: 'top-margin', type: Boolean },
|
|
35
|
+
_blockDisplay: { attribute: false, type: Boolean }
|
|
36
|
+
};
|
|
39
37
|
|
|
40
|
-
static
|
|
41
|
-
|
|
42
|
-
:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
:
|
|
52
|
-
|
|
53
|
-
}
|
|
38
|
+
static styles = [super.styles, bodySmallStyles, css`
|
|
39
|
+
:host {
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
:host([hidden]) {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
:host([top-margin]) {
|
|
46
|
+
margin-top: calc(0.9rem - 7px);
|
|
47
|
+
}
|
|
48
|
+
:host(:not([display-to])) .d2l-input-date-time-range-to-to {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
54
51
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
/* flex case (not wrapped) */
|
|
53
|
+
.d2l-input-date-time-range-to-container {
|
|
54
|
+
column-gap: 1.5rem;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
}
|
|
58
|
+
:host([display-to]) div:not(.d2l-input-date-time-range-to-container-block).d2l-input-date-time-range-to-container,
|
|
59
|
+
:host([display-to]) div:not(.d2l-input-date-time-range-to-container-block).d2l-input-date-time-range-to-container .d2l-input-date-time-range-end-container {
|
|
60
|
+
column-gap: 0.9rem;
|
|
61
|
+
}
|
|
62
|
+
.d2l-input-date-time-range-end-container {
|
|
63
|
+
display: flex;
|
|
64
|
+
}
|
|
65
|
+
.d2l-input-date-time-range-end-container ::slotted(*) {
|
|
66
|
+
align-self: flex-end;
|
|
67
|
+
}
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
69
|
+
/* block case (wrapped) */
|
|
70
|
+
.d2l-input-date-time-range-to-container-block.d2l-input-date-time-range-to-container {
|
|
71
|
+
display: block;
|
|
72
|
+
margin-bottom: -1.2rem;
|
|
73
|
+
}
|
|
74
|
+
.d2l-input-date-time-range-to-container-block .d2l-input-date-time-range-start-container {
|
|
75
|
+
margin-inline: 0;
|
|
76
|
+
margin-bottom: 1.2rem;
|
|
77
|
+
}
|
|
78
|
+
:host([display-to]) .d2l-input-date-time-range-to-container-block .d2l-input-date-time-range-start-container {
|
|
79
|
+
margin-bottom: 0.6rem;
|
|
80
|
+
}
|
|
81
|
+
.d2l-input-date-time-range-to-container-block .d2l-input-date-time-range-end-container {
|
|
82
|
+
display: block;
|
|
83
|
+
margin-bottom: 1.2rem;
|
|
84
|
+
}
|
|
85
|
+
.d2l-input-date-time-range-to-container-block .d2l-input-date-time-range-to-to {
|
|
86
|
+
display: inline-block;
|
|
87
|
+
margin-bottom: 0.6rem;
|
|
88
|
+
margin-top: auto;
|
|
89
|
+
vertical-align: top;
|
|
90
|
+
}
|
|
91
|
+
`];
|
|
96
92
|
|
|
97
93
|
constructor() {
|
|
98
94
|
super();
|
|
@@ -67,121 +67,116 @@ export function getShiftedEndDateTime(startValue, endValue, prevStartValue, incl
|
|
|
67
67
|
*/
|
|
68
68
|
class InputDateTimeRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
|
69
69
|
|
|
70
|
-
static
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
margin-top: 0.6rem;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
`];
|
|
184
|
-
}
|
|
70
|
+
static properties = {
|
|
71
|
+
/**
|
|
72
|
+
* ADVANCED: Automatically shifts end date when start date changes to keep same range. If start and end date are equal, automatically shifts end time when start time changes.
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
*/
|
|
75
|
+
autoShiftDates: { attribute: 'auto-shift-dates', reflect: true, type: Boolean },
|
|
76
|
+
/**
|
|
77
|
+
* Hides the start and end labels visually. Hidden labels are still read by screen readers so make sure to set appropriate start and end labels.
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
*/
|
|
80
|
+
childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
|
|
81
|
+
/**
|
|
82
|
+
* Disables the inputs
|
|
83
|
+
* @type {boolean}
|
|
84
|
+
*/
|
|
85
|
+
disabled: { type: Boolean, reflect: true },
|
|
86
|
+
/**
|
|
87
|
+
* ACCESSIBILITY: Label for the end date-time input. Defaults to localized "End Date".
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @default "End Date"
|
|
90
|
+
*/
|
|
91
|
+
endLabel: { attribute: 'end-label', reflect: true, type: String },
|
|
92
|
+
/**
|
|
93
|
+
* ADVANCED: Indicates if the end date or time dropdown is open
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
*/
|
|
96
|
+
endOpened: { attribute: 'end-opened', type: Boolean },
|
|
97
|
+
/**
|
|
98
|
+
* Value of the end date-time input
|
|
99
|
+
* @type {string}
|
|
100
|
+
*/
|
|
101
|
+
endValue: { attribute: 'end-value', reflect: true, type: String },
|
|
102
|
+
/**
|
|
103
|
+
* Validates on inclusive range (i.e., it is valid for start and end date-times to be equal)
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
*/
|
|
106
|
+
inclusiveDateRange: { attribute: 'inclusive-date-range', reflect: true, type: Boolean },
|
|
107
|
+
/**
|
|
108
|
+
* ACCESSIBILITY: REQUIRED: Label for the input fieldset that wraps the date-time inputs
|
|
109
|
+
* @type {string}
|
|
110
|
+
*/
|
|
111
|
+
label: { type: String, reflect: true },
|
|
112
|
+
/**
|
|
113
|
+
* Hides the fieldset label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
|
|
114
|
+
* @type {boolean}
|
|
115
|
+
*/
|
|
116
|
+
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
117
|
+
/**
|
|
118
|
+
* Indicates that localization will be handled by the consumer. `*value` will not be converted from/to UTC.
|
|
119
|
+
* @type {boolean}
|
|
120
|
+
*/
|
|
121
|
+
localized: { reflect: true, type: Boolean },
|
|
122
|
+
/**
|
|
123
|
+
* Maximum valid date/time that could be selected by a user
|
|
124
|
+
* @type {string}
|
|
125
|
+
*/
|
|
126
|
+
maxValue: { attribute: 'max-value', reflect: true, type: String },
|
|
127
|
+
/**
|
|
128
|
+
* Minimum valid date/time that could be selected by a user
|
|
129
|
+
* @type {string}
|
|
130
|
+
*/
|
|
131
|
+
minValue: { attribute: 'min-value', reflect: true, type: String },
|
|
132
|
+
/**
|
|
133
|
+
* Indicates that values are required
|
|
134
|
+
* @type {boolean}
|
|
135
|
+
*/
|
|
136
|
+
required: { type: Boolean, reflect: true },
|
|
137
|
+
/**
|
|
138
|
+
* ACCESSIBILITY: Label for the start date-time input. Defaults to localized "Start Date".
|
|
139
|
+
* @type {string}
|
|
140
|
+
* @default "Start Date"
|
|
141
|
+
*/
|
|
142
|
+
startLabel: { attribute: 'start-label', reflect: true, type: String },
|
|
143
|
+
/**
|
|
144
|
+
* ADVANCED: Indicates if the start date or time dropdown is open
|
|
145
|
+
* @type {boolean}
|
|
146
|
+
*/
|
|
147
|
+
startOpened: { attribute: 'start-opened', type: Boolean },
|
|
148
|
+
/**
|
|
149
|
+
* Value of the start date-time input
|
|
150
|
+
* @type {string}
|
|
151
|
+
*/
|
|
152
|
+
startValue: { attribute: 'start-value', reflect: true, type: String },
|
|
153
|
+
/**
|
|
154
|
+
* Time zone identifier for the time inputs to use.
|
|
155
|
+
* @type {string}
|
|
156
|
+
*/
|
|
157
|
+
timeZoneId: { attribute: 'time-zone-id', type: String },
|
|
158
|
+
/**
|
|
159
|
+
* Hides the time zone inside the time selection dropdowns. Should only be used when the time input values are not related to any one time zone
|
|
160
|
+
* @type {Boolean}
|
|
161
|
+
*/
|
|
162
|
+
timeZoneHidden: { type: Boolean, attribute: 'time-zone-hidden' },
|
|
163
|
+
_slotOccupied: { type: Boolean }
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
static styles = [super.styles, css`
|
|
167
|
+
:host {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
}
|
|
170
|
+
:host([hidden]) {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
d2l-input-date-time {
|
|
174
|
+
display: block;
|
|
175
|
+
}
|
|
176
|
+
::slotted(*) {
|
|
177
|
+
margin-top: 0.6rem;
|
|
178
|
+
}
|
|
179
|
+
`];
|
|
185
180
|
|
|
186
181
|
constructor() {
|
|
187
182
|
super();
|