@momentum-design/components 0.131.2 → 0.131.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/dist/browser/index.js +10 -5
- package/dist/browser/index.js.map +2 -2
- package/dist/components/timepicker/index.d.ts +1 -0
- package/dist/components/timepicker/index.js +1 -0
- package/dist/components/timepicker/timepicker.component.d.ts +1 -0
- package/dist/components/timepicker/timepicker.component.js +3 -3
- package/dist/components/timepicker/timepicker.styles.js +7 -1
- package/dist/custom-elements.json +5 -1
- package/dist/react/timepicker/index.d.ts +1 -0
- package/dist/react/timepicker/index.js +1 -0
- package/package.json +1 -1
|
@@ -43,6 +43,7 @@ declare const TimePicker_base: import("../../utils/mixins/index.types").Construc
|
|
|
43
43
|
* @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.
|
|
44
44
|
* @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.
|
|
45
45
|
* @cssproperty --mdc-timepicker-width - Width of the timepicker component.
|
|
46
|
+
* @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.
|
|
46
47
|
*
|
|
47
48
|
* @csspart label - The label element.
|
|
48
49
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -55,6 +55,7 @@ import styles from './timepicker.styles';
|
|
|
55
55
|
* @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.
|
|
56
56
|
* @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.
|
|
57
57
|
* @cssproperty --mdc-timepicker-width - Width of the timepicker component.
|
|
58
|
+
* @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.
|
|
58
59
|
*
|
|
59
60
|
* @csspart label - The label element.
|
|
60
61
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -881,15 +882,14 @@ class TimePicker extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)
|
|
|
881
882
|
}}"
|
|
882
883
|
exportparts="popover-content"
|
|
883
884
|
>
|
|
884
|
-
<
|
|
885
|
+
<mdc-selectlistbox
|
|
885
886
|
id="${LISTBOX_ID}"
|
|
886
887
|
part="listbox"
|
|
887
|
-
role="listbox"
|
|
888
888
|
aria-label="${this.localeTimeOptionsLabel}"
|
|
889
889
|
@keydown="${this.handleListboxKeydown}"
|
|
890
890
|
>
|
|
891
891
|
${this.renderTimeOptions()}
|
|
892
|
-
</
|
|
892
|
+
</mdc-selectlistbox>
|
|
893
893
|
</mdc-popover>
|
|
894
894
|
</div>
|
|
895
895
|
${this.helpText ? this.renderHelperText() : nothing}
|
|
@@ -7,6 +7,7 @@ const styles = css `
|
|
|
7
7
|
--mdc-timepicker-border-color: var(--mds-color-theme-outline-input-normal);
|
|
8
8
|
--mdc-timepicker-width: fit-content;
|
|
9
9
|
--mdc-timepicker-listbox-width: 100%;
|
|
10
|
+
--mdc-timepicker-listbox-height: 15rem;
|
|
10
11
|
|
|
11
12
|
display: flex;
|
|
12
13
|
flex-direction: column;
|
|
@@ -130,9 +131,14 @@ const styles = css `
|
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
/* Popover height, width & padding overrides */
|
|
134
|
+
:host mdc-popover {
|
|
135
|
+
--mdc-popover-max-width: var(--mdc-timepicker-listbox-width);
|
|
136
|
+
--mdc-popover-max-height: var(--mdc-timepicker-listbox-height);
|
|
137
|
+
min-width: max-content;
|
|
138
|
+
}
|
|
133
139
|
:host mdc-popover::part(popover-content) {
|
|
134
140
|
max-height: var(--mdc-popover-max-height);
|
|
135
|
-
min-width:
|
|
141
|
+
min-width: auto;
|
|
136
142
|
padding: 0.75rem 0.5rem;
|
|
137
143
|
}
|
|
138
144
|
|
|
@@ -45324,6 +45324,10 @@
|
|
|
45324
45324
|
"description": "Width of the timepicker component.",
|
|
45325
45325
|
"name": "--mdc-timepicker-width"
|
|
45326
45326
|
},
|
|
45327
|
+
{
|
|
45328
|
+
"description": "The max-height of the dropdown listbox. Default shows ~6 items.",
|
|
45329
|
+
"name": "--mdc-timepicker-listbox-height"
|
|
45330
|
+
},
|
|
45327
45331
|
{
|
|
45328
45332
|
"description": "Font size for the label text.",
|
|
45329
45333
|
"name": "--mdc-label-font-size",
|
|
@@ -46502,7 +46506,7 @@
|
|
|
46502
46506
|
"module": "/src/components/formfieldwrapper/formfieldwrapper.component"
|
|
46503
46507
|
},
|
|
46504
46508
|
"tagName": "mdc-timepicker",
|
|
46505
|
-
"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-width - Width of the timepicker component.\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 */",
|
|
46509
|
+
"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-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 */",
|
|
46506
46510
|
"customElement": true
|
|
46507
46511
|
}
|
|
46508
46512
|
],
|
|
@@ -39,6 +39,7 @@ import type { Events } from '../../components/timepicker/timepicker.types';
|
|
|
39
39
|
* @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.
|
|
40
40
|
* @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.
|
|
41
41
|
* @cssproperty --mdc-timepicker-width - Width of the timepicker component.
|
|
42
|
+
* @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.
|
|
42
43
|
*
|
|
43
44
|
* @csspart label - The label element.
|
|
44
45
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
@@ -40,6 +40,7 @@ import { TAG_NAME } from '../../components/timepicker/timepicker.constants';
|
|
|
40
40
|
* @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.
|
|
41
41
|
* @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.
|
|
42
42
|
* @cssproperty --mdc-timepicker-width - Width of the timepicker component.
|
|
43
|
+
* @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.
|
|
43
44
|
*
|
|
44
45
|
* @csspart label - The label element.
|
|
45
46
|
* @csspart label-text - The container for the label and required indicator elements.
|