@lumx/react 4.18.0 → 4.18.1-alpha.0
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/index.d.ts +11 -0
- package/index.js +21 -4
- package/index.js.map +1 -1
- package/package.json +4 -3
package/index.d.ts
CHANGED
|
@@ -5493,6 +5493,17 @@ interface TimePickerFieldWrapperProps {
|
|
|
5493
5493
|
* Translation labels for clear and show suggestions buttons.
|
|
5494
5494
|
*/
|
|
5495
5495
|
translations: TimePickerFieldTranslations;
|
|
5496
|
+
/**
|
|
5497
|
+
* Callback to customize individual option props.
|
|
5498
|
+
* Called for each time option with the hour and minute.
|
|
5499
|
+
* Return partial `ComboboxOptionProps` to override default option rendering
|
|
5500
|
+
* (e.g. `before`, `after`, `children`, `tooltipProps`, `actionProps`).
|
|
5501
|
+
* `isDisabled` is merged with the out-of-range state using `||`.
|
|
5502
|
+
*/
|
|
5503
|
+
getOptionProps?: ({ hour, minute }: {
|
|
5504
|
+
hour: number;
|
|
5505
|
+
minute: number;
|
|
5506
|
+
}) => Partial<ComboboxOptionProps$1>;
|
|
5496
5507
|
}
|
|
5497
5508
|
/**
|
|
5498
5509
|
* `SelectTextField` props managed internally by the `TimePickerField` wrappers
|
package/index.js
CHANGED
|
@@ -21740,6 +21740,7 @@ const TimePickerField$1 = (props, {
|
|
|
21740
21740
|
handleChange,
|
|
21741
21741
|
handleSearch,
|
|
21742
21742
|
handleBlur,
|
|
21743
|
+
getOptionProps,
|
|
21743
21744
|
...fowardedProps
|
|
21744
21745
|
} = props;
|
|
21745
21746
|
return /*#__PURE__*/jsx(SelectTextField, {
|
|
@@ -21748,9 +21749,23 @@ const TimePickerField$1 = (props, {
|
|
|
21748
21749
|
selectionType: "single",
|
|
21749
21750
|
options: options,
|
|
21750
21751
|
getOptionId: "name",
|
|
21751
|
-
renderOption:
|
|
21752
|
-
|
|
21753
|
-
|
|
21752
|
+
renderOption: ({
|
|
21753
|
+
hour,
|
|
21754
|
+
minute,
|
|
21755
|
+
outOfRange
|
|
21756
|
+
}) => {
|
|
21757
|
+
const {
|
|
21758
|
+
isDisabled,
|
|
21759
|
+
...extraProps
|
|
21760
|
+
} = getOptionProps?.({
|
|
21761
|
+
hour,
|
|
21762
|
+
minute
|
|
21763
|
+
}) || {};
|
|
21764
|
+
return /*#__PURE__*/jsx(Option, {
|
|
21765
|
+
isDisabled: outOfRange || isDisabled,
|
|
21766
|
+
...extraProps
|
|
21767
|
+
});
|
|
21768
|
+
},
|
|
21754
21769
|
onChange: handleChange,
|
|
21755
21770
|
onSearch: handleSearch,
|
|
21756
21771
|
onBlur: handleBlur,
|
|
@@ -21950,6 +21965,7 @@ const TimePickerField = props => {
|
|
|
21950
21965
|
theme,
|
|
21951
21966
|
translations,
|
|
21952
21967
|
name,
|
|
21968
|
+
getOptionProps,
|
|
21953
21969
|
...forwardedProps
|
|
21954
21970
|
} = props;
|
|
21955
21971
|
|
|
@@ -22014,7 +22030,8 @@ const TimePickerField = props => {
|
|
|
22014
22030
|
handleChange,
|
|
22015
22031
|
handleSearch,
|
|
22016
22032
|
handleBlur,
|
|
22017
|
-
searchInputValue
|
|
22033
|
+
searchInputValue,
|
|
22034
|
+
getOptionProps
|
|
22018
22035
|
}, {
|
|
22019
22036
|
SelectTextField,
|
|
22020
22037
|
Option: SelectTextField.Option
|