@momentum-design/components 0.134.4 → 0.134.6
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/dist/browser/index.js +210 -199
- package/dist/browser/index.js.map +3 -3
- package/dist/components/timepicker/timepicker.component.d.ts +13 -1
- package/dist/components/timepicker/timepicker.component.js +13 -1
- package/dist/components/timepicker/timepicker.types.d.ts +8 -1
- package/dist/components/toast/toast.component.d.ts +12 -1
- package/dist/components/toast/toast.component.js +28 -3
- package/dist/components/toast/toast.styles.js +10 -0
- package/dist/custom-elements.json +79 -1
- package/dist/react/timepicker/index.d.ts +1 -0
- package/dist/react/timepicker/index.js +1 -0
- package/dist/utils/mixins/OverflowMixin.d.ts +1 -0
- package/dist/utils/mixins/OverflowMixin.js +4 -0
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@ import { CSSResult } from 'lit';
|
|
|
3
3
|
import { AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';
|
|
4
4
|
import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
|
5
5
|
import type { PopoverStrategy } from '../popover/popover.types';
|
|
6
|
-
import type {
|
|
6
|
+
import type { IconNames } from '../icon/icon.types';
|
|
7
|
+
import type { OptionLabelFormatter, Placement, TimeFormat } from './timepicker.types';
|
|
7
8
|
declare const TimePicker_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
|
8
9
|
/**
|
|
9
10
|
* mdc-timepicker is a component that allows users to select a specific time
|
|
@@ -61,6 +62,7 @@ declare const TimePicker_base: import("../../utils/mixins/index.types").Construc
|
|
|
61
62
|
* @csspart separator - The colon separator between spinbuttons.
|
|
62
63
|
* @csspart period - The AM/PM period spinbutton.
|
|
63
64
|
* @csspart icon-container - The dropdown arrow button container.
|
|
65
|
+
* @csspart leading-icon - The prefix icon element displayed before spinbuttons.
|
|
64
66
|
* @csspart native-input - The hidden native input for form participation.
|
|
65
67
|
* @csspart listbox - The dropdown list container.
|
|
66
68
|
*/
|
|
@@ -152,6 +154,16 @@ declare class TimePicker extends TimePicker_base implements AssociatedFormContro
|
|
|
152
154
|
* Consumers must provide a translated string.
|
|
153
155
|
*/
|
|
154
156
|
localePmLabel: string;
|
|
157
|
+
/**
|
|
158
|
+
* The icon name to display as a prefix icon in the timepicker input.
|
|
159
|
+
*/
|
|
160
|
+
prefixIcon?: IconNames;
|
|
161
|
+
/**
|
|
162
|
+
* A callback function to format the label of each dropdown option.
|
|
163
|
+
* Receives the default label string and the 24h value string, and should return a formatted label.
|
|
164
|
+
* When not set, the default time formatting is used.
|
|
165
|
+
*/
|
|
166
|
+
optionLabelFormatter?: OptionLabelFormatter;
|
|
155
167
|
/**
|
|
156
168
|
* Accessible label for the dropdown toggle button.
|
|
157
169
|
* Consumers must provide a translated string.
|
|
@@ -73,6 +73,7 @@ import styles from './timepicker.styles';
|
|
|
73
73
|
* @csspart separator - The colon separator between spinbuttons.
|
|
74
74
|
* @csspart period - The AM/PM period spinbutton.
|
|
75
75
|
* @csspart icon-container - The dropdown arrow button container.
|
|
76
|
+
* @csspart leading-icon - The prefix icon element displayed before spinbuttons.
|
|
76
77
|
* @csspart native-input - The hidden native input for form participation.
|
|
77
78
|
* @csspart listbox - The dropdown list container.
|
|
78
79
|
*/
|
|
@@ -770,7 +771,7 @@ class TimePicker extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)
|
|
|
770
771
|
const currentValue = this.internalToValue();
|
|
771
772
|
return options.map(option => html `
|
|
772
773
|
<mdc-option
|
|
773
|
-
label="${option.label}"
|
|
774
|
+
label="${this.optionLabelFormatter ? this.optionLabelFormatter(option.label, option.value) : option.label}"
|
|
774
775
|
?selected="${option.value === currentValue}"
|
|
775
776
|
aria-selected="${option.value === currentValue ? 'true' : 'false'}"
|
|
776
777
|
@click="${() => this.handleOptionClick(option.value)}"
|
|
@@ -791,6 +792,9 @@ class TimePicker extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)
|
|
|
791
792
|
@click="${this.handleBaseContainerClick}"
|
|
792
793
|
@keydown="${this.handleBaseKeydown}"
|
|
793
794
|
>
|
|
795
|
+
${this.prefixIcon
|
|
796
|
+
? html `<mdc-icon part="leading-icon" name="${this.prefixIcon}" size="1"></mdc-icon>`
|
|
797
|
+
: nothing}
|
|
794
798
|
<div part="spinbutton-group">
|
|
795
799
|
<input
|
|
796
800
|
id="hours-spinbutton"
|
|
@@ -984,6 +988,14 @@ __decorate([
|
|
|
984
988
|
property({ type: String, attribute: 'locale-pm-label' }),
|
|
985
989
|
__metadata("design:type", Object)
|
|
986
990
|
], TimePicker.prototype, "localePmLabel", void 0);
|
|
991
|
+
__decorate([
|
|
992
|
+
property({ type: String, reflect: true, attribute: 'prefix-icon' }),
|
|
993
|
+
__metadata("design:type", String)
|
|
994
|
+
], TimePicker.prototype, "prefixIcon", void 0);
|
|
995
|
+
__decorate([
|
|
996
|
+
property({ attribute: false }),
|
|
997
|
+
__metadata("design:type", Function)
|
|
998
|
+
], TimePicker.prototype, "optionLabelFormatter", void 0);
|
|
987
999
|
__decorate([
|
|
988
1000
|
property({ type: String, attribute: 'locale-show-time-picker-label' }),
|
|
989
1001
|
__metadata("design:type", Object)
|
|
@@ -18,4 +18,11 @@ interface Events {
|
|
|
18
18
|
onHiddenEvent: PopoverHiddenEvent;
|
|
19
19
|
}
|
|
20
20
|
type Placement = Extract<PopoverPlacement, 'bottom-start' | 'top-start'>;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* A callback function to format the label of each dropdown option.
|
|
23
|
+
* @param label - The default formatted label string (e.g., "1:30 PM" or "13:30").
|
|
24
|
+
* @param value - The 24-hour time value string (e.g., "13:30").
|
|
25
|
+
* @returns The formatted label string to display.
|
|
26
|
+
*/
|
|
27
|
+
type OptionLabelFormatter = (label: string, value: string) => string;
|
|
28
|
+
export type { Events, OptionLabelFormatter, Placement, TimeFormat, TimePickerChangeEvent, TimePickerInputEvent };
|
|
@@ -44,6 +44,11 @@ declare const Toast_base: import("../../utils/mixins/index.types").Constructor<i
|
|
|
44
44
|
* @cssproperty --mdc-toast-padding - Padding inside the toast.
|
|
45
45
|
*/
|
|
46
46
|
declare class Toast extends Toast_base {
|
|
47
|
+
/**
|
|
48
|
+
* Reference to the header text element
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
private headerTextElement;
|
|
47
52
|
/**
|
|
48
53
|
* Type of toast
|
|
49
54
|
* - Can be `custom`, `success`, `warning` or `error`.
|
|
@@ -79,6 +84,12 @@ declare class Toast extends Toast_base {
|
|
|
79
84
|
showLessText?: string;
|
|
80
85
|
private isDetailVisible;
|
|
81
86
|
private hasDetailedSlot;
|
|
87
|
+
/**
|
|
88
|
+
* Indicates whether the header text is overflowing and requires the show more/less toggle button to be shown when detailed content is present.
|
|
89
|
+
* This is determined on first update and will not update dynamically if the header text changes after initial render.
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
private hasOverflowingHeaderText;
|
|
82
93
|
private detailedElements;
|
|
83
94
|
private hasFooterButtons;
|
|
84
95
|
/**
|
|
@@ -90,7 +101,7 @@ declare class Toast extends Toast_base {
|
|
|
90
101
|
private toggleDetailVisibility;
|
|
91
102
|
private updateDetailedSlotPresence;
|
|
92
103
|
private updateFooterButtonsPresence;
|
|
93
|
-
protected firstUpdated(changedProperties: PropertyValues): void
|
|
104
|
+
protected firstUpdated(changedProperties: PropertyValues): Promise<void>;
|
|
94
105
|
protected renderIcon(iconName: string): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
95
106
|
private shouldRenderToggleButton;
|
|
96
107
|
private renderToggleDetailButton;
|
|
@@ -8,11 +8,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { html, nothing } from 'lit';
|
|
11
|
-
import { property, queryAssignedElements, state } from 'lit/decorators.js';
|
|
11
|
+
import { property, query, queryAssignedElements, state } from 'lit/decorators.js';
|
|
12
12
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
13
13
|
import { Component } from '../../models';
|
|
14
14
|
import { FooterMixin } from '../../utils/mixins/FooterMixin';
|
|
15
15
|
import { TYPE } from '../text/text.constants';
|
|
16
|
+
import { hasOverflowMixin } from '../../utils/dom';
|
|
16
17
|
import { DEFAULTS } from './toast.constants';
|
|
17
18
|
import { getIconNameForVariant } from './toast.utils';
|
|
18
19
|
import styles from './toast.styles';
|
|
@@ -77,6 +78,12 @@ class Toast extends FooterMixin(Component) {
|
|
|
77
78
|
this.ariaLabel = null;
|
|
78
79
|
this.isDetailVisible = false;
|
|
79
80
|
this.hasDetailedSlot = false;
|
|
81
|
+
/**
|
|
82
|
+
* Indicates whether the header text is overflowing and requires the show more/less toggle button to be shown when detailed content is present.
|
|
83
|
+
* This is determined on first update and will not update dynamically if the header text changes after initial render.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
this.hasOverflowingHeaderText = false;
|
|
80
87
|
this.hasFooterButtons = '';
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
@@ -94,6 +101,12 @@ class Toast extends FooterMixin(Component) {
|
|
|
94
101
|
}
|
|
95
102
|
toggleDetailVisibility() {
|
|
96
103
|
this.isDetailVisible = !this.isDetailVisible;
|
|
104
|
+
if (this.isDetailVisible) {
|
|
105
|
+
this.setAttribute('data-expanded', 'true');
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.removeAttribute('data-expanded');
|
|
109
|
+
}
|
|
97
110
|
}
|
|
98
111
|
updateDetailedSlotPresence() {
|
|
99
112
|
var _a, _b;
|
|
@@ -108,9 +121,13 @@ class Toast extends FooterMixin(Component) {
|
|
|
108
121
|
? 'has-footer-buttons'
|
|
109
122
|
: '';
|
|
110
123
|
}
|
|
111
|
-
firstUpdated(changedProperties) {
|
|
124
|
+
async firstUpdated(changedProperties) {
|
|
112
125
|
super.firstUpdated(changedProperties);
|
|
113
126
|
this.updateDetailedSlotPresence();
|
|
127
|
+
await this.updateComplete;
|
|
128
|
+
if (hasOverflowMixin(this.headerTextElement)) {
|
|
129
|
+
this.hasOverflowingHeaderText = this.headerTextElement.isHeightOverflowing();
|
|
130
|
+
}
|
|
114
131
|
}
|
|
115
132
|
renderIcon(iconName) {
|
|
116
133
|
if (!iconName)
|
|
@@ -120,7 +137,7 @@ class Toast extends FooterMixin(Component) {
|
|
|
120
137
|
`;
|
|
121
138
|
}
|
|
122
139
|
shouldRenderToggleButton() {
|
|
123
|
-
return this.hasDetailedSlot && this.showMoreText && this.showLessText;
|
|
140
|
+
return (this.hasDetailedSlot || this.hasOverflowingHeaderText) && this.showMoreText && this.showLessText;
|
|
124
141
|
}
|
|
125
142
|
renderToggleDetailButton() {
|
|
126
143
|
if (!this.shouldRenderToggleButton())
|
|
@@ -193,6 +210,10 @@ class Toast extends FooterMixin(Component) {
|
|
|
193
210
|
}
|
|
194
211
|
}
|
|
195
212
|
Toast.styles = [...Component.styles, ...styles];
|
|
213
|
+
__decorate([
|
|
214
|
+
query("[part='toast-header']"),
|
|
215
|
+
__metadata("design:type", HTMLElement)
|
|
216
|
+
], Toast.prototype, "headerTextElement", void 0);
|
|
196
217
|
__decorate([
|
|
197
218
|
property({ type: String, reflect: true }),
|
|
198
219
|
__metadata("design:type", String)
|
|
@@ -229,6 +250,10 @@ __decorate([
|
|
|
229
250
|
state(),
|
|
230
251
|
__metadata("design:type", Boolean)
|
|
231
252
|
], Toast.prototype, "hasDetailedSlot", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
state(),
|
|
255
|
+
__metadata("design:type", Boolean)
|
|
256
|
+
], Toast.prototype, "hasOverflowingHeaderText", void 0);
|
|
232
257
|
__decorate([
|
|
233
258
|
queryAssignedElements({ slot: 'toast-body-detailed', flatten: true }),
|
|
234
259
|
__metadata("design:type", Array)
|
|
@@ -65,6 +65,16 @@ const styles = css `
|
|
|
65
65
|
line-height: var(--mds-font-lineheight-body-large);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
[part='toast-header']::part(text) {
|
|
69
|
+
display: unset;
|
|
70
|
+
-webkit-box-orient: inherit;
|
|
71
|
+
-webkit-line-clamp: inherit;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([data-expanded='true'])::part(toast-header) {
|
|
75
|
+
-webkit-line-clamp: unset;
|
|
76
|
+
}
|
|
77
|
+
|
|
68
78
|
:host::part(footer) {
|
|
69
79
|
display: flex;
|
|
70
80
|
justify-content: flex-end;
|
|
@@ -5160,6 +5160,20 @@
|
|
|
5160
5160
|
"attribute": "inverted",
|
|
5161
5161
|
"reflects": true
|
|
5162
5162
|
},
|
|
5163
|
+
{
|
|
5164
|
+
"kind": "method",
|
|
5165
|
+
"name": "isHeightOverflowing",
|
|
5166
|
+
"privacy": "public",
|
|
5167
|
+
"return": {
|
|
5168
|
+
"type": {
|
|
5169
|
+
"text": "boolean"
|
|
5170
|
+
}
|
|
5171
|
+
},
|
|
5172
|
+
"inheritedFrom": {
|
|
5173
|
+
"name": "OverflowMixin",
|
|
5174
|
+
"module": "utils/mixins/OverflowMixin.js"
|
|
5175
|
+
}
|
|
5176
|
+
},
|
|
5163
5177
|
{
|
|
5164
5178
|
"kind": "method",
|
|
5165
5179
|
"name": "isWidthOverflowing",
|
|
@@ -47421,6 +47435,20 @@
|
|
|
47421
47435
|
}
|
|
47422
47436
|
],
|
|
47423
47437
|
"members": [
|
|
47438
|
+
{
|
|
47439
|
+
"kind": "method",
|
|
47440
|
+
"name": "isHeightOverflowing",
|
|
47441
|
+
"privacy": "public",
|
|
47442
|
+
"return": {
|
|
47443
|
+
"type": {
|
|
47444
|
+
"text": "boolean"
|
|
47445
|
+
}
|
|
47446
|
+
},
|
|
47447
|
+
"inheritedFrom": {
|
|
47448
|
+
"name": "OverflowMixin",
|
|
47449
|
+
"module": "utils/mixins/OverflowMixin.js"
|
|
47450
|
+
}
|
|
47451
|
+
},
|
|
47424
47452
|
{
|
|
47425
47453
|
"kind": "method",
|
|
47426
47454
|
"name": "isWidthOverflowing",
|
|
@@ -49083,6 +49111,10 @@
|
|
|
49083
49111
|
"description": "The dropdown arrow button container.",
|
|
49084
49112
|
"name": "icon-container"
|
|
49085
49113
|
},
|
|
49114
|
+
{
|
|
49115
|
+
"description": "The prefix icon element displayed before spinbuttons.",
|
|
49116
|
+
"name": "leading-icon"
|
|
49117
|
+
},
|
|
49086
49118
|
{
|
|
49087
49119
|
"description": "The hidden native input for form participation.",
|
|
49088
49120
|
"name": "native-input"
|
|
@@ -49414,6 +49446,14 @@
|
|
|
49414
49446
|
"module": "utils/mixins/FormInternalsMixin.js"
|
|
49415
49447
|
}
|
|
49416
49448
|
},
|
|
49449
|
+
{
|
|
49450
|
+
"kind": "field",
|
|
49451
|
+
"name": "optionLabelFormatter",
|
|
49452
|
+
"type": {
|
|
49453
|
+
"text": "OptionLabelFormatter | undefined"
|
|
49454
|
+
},
|
|
49455
|
+
"description": "A callback function to format the label of each dropdown option.\nReceives the default label string and the 24h value string, and should return a formatted label.\nWhen not set, the default time formatting is used."
|
|
49456
|
+
},
|
|
49417
49457
|
{
|
|
49418
49458
|
"kind": "field",
|
|
49419
49459
|
"name": "placement",
|
|
@@ -49425,6 +49465,16 @@
|
|
|
49425
49465
|
"attribute": "placement",
|
|
49426
49466
|
"reflects": true
|
|
49427
49467
|
},
|
|
49468
|
+
{
|
|
49469
|
+
"kind": "field",
|
|
49470
|
+
"name": "prefixIcon",
|
|
49471
|
+
"type": {
|
|
49472
|
+
"text": "IconNames | undefined"
|
|
49473
|
+
},
|
|
49474
|
+
"description": "The icon name to display as a prefix icon in the timepicker input.",
|
|
49475
|
+
"attribute": "prefix-icon",
|
|
49476
|
+
"reflects": true
|
|
49477
|
+
},
|
|
49428
49478
|
{
|
|
49429
49479
|
"kind": "field",
|
|
49430
49480
|
"name": "readonly",
|
|
@@ -49862,6 +49912,14 @@
|
|
|
49862
49912
|
"description": "Label for the PM period.\nConsumers must provide a translated string.",
|
|
49863
49913
|
"fieldName": "localePmLabel"
|
|
49864
49914
|
},
|
|
49915
|
+
{
|
|
49916
|
+
"name": "prefix-icon",
|
|
49917
|
+
"type": {
|
|
49918
|
+
"text": "IconNames | undefined"
|
|
49919
|
+
},
|
|
49920
|
+
"description": "The icon name to display as a prefix icon in the timepicker input.",
|
|
49921
|
+
"fieldName": "prefixIcon"
|
|
49922
|
+
},
|
|
49865
49923
|
{
|
|
49866
49924
|
"name": "locale-show-time-picker-label",
|
|
49867
49925
|
"type": {
|
|
@@ -50095,7 +50153,7 @@
|
|
|
50095
50153
|
"module": "/src/components/formfieldwrapper/formfieldwrapper.component"
|
|
50096
50154
|
},
|
|
50097
50155
|
"tagName": "mdc-timepicker",
|
|
50098
|
-
"jsDoc": "/**\n * mdc-timepicker is a component that allows users to select a specific time\n * or enter a time manually. It supports both 12-hour and 24-hour formats.\n *\n * The component consists of:\n * - label - describes the time picker field\n * - input field - made up of 2-3 spinbuttons (hours, minutes, optional AM/PM period)\n * - dropdown arrow button - opens a flyout menu with predefined time intervals\n * - helper text - displayed below the input field\n *\n * Users can input values by:\n * - Manually entering numbers/characters in spinbuttons\n * - Navigating using arrow keys to increment/decrement values\n * - Selecting a predefined time from the dropdown menu\n *\n * @tagname mdc-timepicker\n *\n * @dependency mdc-button\n * @dependency mdc-icon\n * @dependency mdc-option\n * @dependency mdc-popover\n * @dependency mdc-text\n * @dependency mdc-toggletip\n *\n * @event input - (React: onInput) This event is dispatched when the time value changes.\n * @event change - (React: onChange) This event is dispatched when the time value is committed.\n * @event focus - (React: onFocus) This event is dispatched when the timepicker receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the timepicker loses focus.\n *\n * @slot label - Slot for the label element.\n * @slot toggletip - Slot for the toggletip info icon button.\n * @slot help-icon - Slot for the helper/validation icon.\n * @slot help-text - Slot for the helper/validation text.\n *\n * @cssproperty --mdc-timepicker-background-color - Background color of the timepicker input.\n * @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.\n * @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.\n * @cssproperty --mdc-timepicker-height - The height of the timepicker trigger control.\n * @cssproperty --mdc-timepicker-width - Width of the timepicker component.\n * @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element.\n * @csspart info-icon-btn - The info icon button element.\n * @csspart label-toggletip - The toggletip element.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element.\n * @csspart help-text-container - The container for helper/validation elements.\n * @csspart container - The outer container for the input and popover.\n * @csspart base-container - The input container with border and background.\n * @csspart spinbutton-group - The container for spinbutton elements.\n * @csspart spinbutton - A spinbutton input element.\n * @csspart separator - The colon separator between spinbuttons.\n * @csspart period - The AM/PM period spinbutton.\n * @csspart icon-container - The dropdown arrow button container.\n * @csspart native-input - The hidden native input for form participation.\n * @csspart listbox - The dropdown list container.\n */",
|
|
50156
|
+
"jsDoc": "/**\n * mdc-timepicker is a component that allows users to select a specific time\n * or enter a time manually. It supports both 12-hour and 24-hour formats.\n *\n * The component consists of:\n * - label - describes the time picker field\n * - input field - made up of 2-3 spinbuttons (hours, minutes, optional AM/PM period)\n * - dropdown arrow button - opens a flyout menu with predefined time intervals\n * - helper text - displayed below the input field\n *\n * Users can input values by:\n * - Manually entering numbers/characters in spinbuttons\n * - Navigating using arrow keys to increment/decrement values\n * - Selecting a predefined time from the dropdown menu\n *\n * @tagname mdc-timepicker\n *\n * @dependency mdc-button\n * @dependency mdc-icon\n * @dependency mdc-option\n * @dependency mdc-popover\n * @dependency mdc-text\n * @dependency mdc-toggletip\n *\n * @event input - (React: onInput) This event is dispatched when the time value changes.\n * @event change - (React: onChange) This event is dispatched when the time value is committed.\n * @event focus - (React: onFocus) This event is dispatched when the timepicker receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the timepicker loses focus.\n *\n * @slot label - Slot for the label element.\n * @slot toggletip - Slot for the toggletip info icon button.\n * @slot help-icon - Slot for the helper/validation icon.\n * @slot help-text - Slot for the helper/validation text.\n *\n * @cssproperty --mdc-timepicker-background-color - Background color of the timepicker input.\n * @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.\n * @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.\n * @cssproperty --mdc-timepicker-height - The height of the timepicker trigger control.\n * @cssproperty --mdc-timepicker-width - Width of the timepicker component.\n * @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element.\n * @csspart info-icon-btn - The info icon button element.\n * @csspart label-toggletip - The toggletip element.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element.\n * @csspart help-text-container - The container for helper/validation elements.\n * @csspart container - The outer container for the input and popover.\n * @csspart base-container - The input container with border and background.\n * @csspart spinbutton-group - The container for spinbutton elements.\n * @csspart spinbutton - A spinbutton input element.\n * @csspart separator - The colon separator between spinbuttons.\n * @csspart period - The AM/PM period spinbutton.\n * @csspart icon-container - The dropdown arrow button container.\n * @csspart leading-icon - The prefix icon element displayed before spinbuttons.\n * @csspart native-input - The hidden native input for form participation.\n * @csspart listbox - The dropdown list container.\n */",
|
|
50099
50157
|
"customElement": true
|
|
50100
50158
|
}
|
|
50101
50159
|
],
|
|
@@ -57835,6 +57893,16 @@
|
|
|
57835
57893
|
"description": "",
|
|
57836
57894
|
"name": "OverflowMixin",
|
|
57837
57895
|
"members": [
|
|
57896
|
+
{
|
|
57897
|
+
"kind": "method",
|
|
57898
|
+
"name": "isHeightOverflowing",
|
|
57899
|
+
"privacy": "public",
|
|
57900
|
+
"return": {
|
|
57901
|
+
"type": {
|
|
57902
|
+
"text": "boolean"
|
|
57903
|
+
}
|
|
57904
|
+
}
|
|
57905
|
+
},
|
|
57838
57906
|
{
|
|
57839
57907
|
"kind": "method",
|
|
57840
57908
|
"name": "isWidthOverflowing",
|
|
@@ -57861,6 +57929,16 @@
|
|
|
57861
57929
|
"description": "",
|
|
57862
57930
|
"name": "OverflowMixinInterface",
|
|
57863
57931
|
"members": [
|
|
57932
|
+
{
|
|
57933
|
+
"kind": "method",
|
|
57934
|
+
"name": "isHeightOverflowing",
|
|
57935
|
+
"privacy": "public",
|
|
57936
|
+
"return": {
|
|
57937
|
+
"type": {
|
|
57938
|
+
"text": "boolean"
|
|
57939
|
+
}
|
|
57940
|
+
}
|
|
57941
|
+
},
|
|
57864
57942
|
{
|
|
57865
57943
|
"kind": "method",
|
|
57866
57944
|
"name": "isWidthOverflowing",
|
|
@@ -57,6 +57,7 @@ import type { Events } from '../../components/timepicker/timepicker.types';
|
|
|
57
57
|
* @csspart separator - The colon separator between spinbuttons.
|
|
58
58
|
* @csspart period - The AM/PM period spinbutton.
|
|
59
59
|
* @csspart icon-container - The dropdown arrow button container.
|
|
60
|
+
* @csspart leading-icon - The prefix icon element displayed before spinbuttons.
|
|
60
61
|
* @csspart native-input - The hidden native input for form participation.
|
|
61
62
|
* @csspart listbox - The dropdown list container.
|
|
62
63
|
*/
|
|
@@ -58,6 +58,7 @@ import { TAG_NAME } from '../../components/timepicker/timepicker.constants';
|
|
|
58
58
|
* @csspart separator - The colon separator between spinbuttons.
|
|
59
59
|
* @csspart period - The AM/PM period spinbutton.
|
|
60
60
|
* @csspart icon-container - The dropdown arrow button container.
|
|
61
|
+
* @csspart leading-icon - The prefix icon element displayed before spinbuttons.
|
|
61
62
|
* @csspart native-input - The hidden native input for form participation.
|
|
62
63
|
* @csspart listbox - The dropdown list container.
|
|
63
64
|
*/
|
|
@@ -3,5 +3,6 @@ import type { Constructor } from './index.types';
|
|
|
3
3
|
export declare abstract class OverflowMixinInterface {
|
|
4
4
|
protected get overflowElement(): HTMLElement;
|
|
5
5
|
isWidthOverflowing(): boolean;
|
|
6
|
+
isHeightOverflowing(): boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const OverflowMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<OverflowMixinInterface> & T;
|
|
@@ -17,6 +17,10 @@ export const OverflowMixin = (superClass) => {
|
|
|
17
17
|
const el = this.overflowElement;
|
|
18
18
|
return el.scrollWidth > el.clientWidth;
|
|
19
19
|
}
|
|
20
|
+
isHeightOverflowing() {
|
|
21
|
+
const el = this.overflowElement;
|
|
22
|
+
return el.scrollHeight > el.clientHeight;
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
// Cast return type to your mixin's interface intersected with the superClass type
|
|
22
26
|
return InnerMixinClass;
|