@festo-ui/react 10.0.1-dev.846 → 10.0.1-dev.848
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/components/modals/Prompt.js +2 -2
- package/dist/components/search-input/useSearchInput.d.ts +1 -1
- package/dist/components/tab/useTabScroll.d.ts +3 -3
- package/dist/components/tab/useTabScroll.js +1 -1
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,9 +4,9 @@ import { TextInput } from "../../forms/text-input/TextInput.js";
|
|
|
4
4
|
import { Modal } from "./Modal.js";
|
|
5
5
|
import { ModalFooter } from "./ModalFooter.js";
|
|
6
6
|
const Prompt = /*#__PURE__*/ forwardRef(({ title, subtitle, hint, label, value, onChange, onOk, onCancel, cancel, ok, className, ...props }, ref)=>{
|
|
7
|
-
const [innerValue, setInnerValue] = useState(value);
|
|
7
|
+
const [innerValue, setInnerValue] = useState(value ?? '');
|
|
8
8
|
useEffect(()=>{
|
|
9
|
-
setInnerValue(value);
|
|
9
|
+
setInnerValue(value ?? '');
|
|
10
10
|
}, [
|
|
11
11
|
value
|
|
12
12
|
]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { SearchSuggestion } from './SearchSuggestion';
|
|
3
|
-
export declare function useSearchInput(inputRef: React.
|
|
3
|
+
export declare function useSearchInput(inputRef: React.RefObject<HTMLInputElement | null>, cappedSuggestions: SearchSuggestion[], value?: string, defaultValue?: string, onChange?: (value: string) => void, onSearch?: (value: string) => void, onKeyboardNavigate?: (value: string) => void): {
|
|
4
4
|
innerValue: string | undefined;
|
|
5
5
|
hideSuggestionList: boolean;
|
|
6
6
|
selectedSuggestionIndex: number;
|
|
@@ -16,9 +16,9 @@ export interface TabScrollHorizontalEdges {
|
|
|
16
16
|
}
|
|
17
17
|
type TypeHandleTabScroll = (e: React.MouseEvent<HTMLButtonElement>, index: number) => void;
|
|
18
18
|
interface Refs {
|
|
19
|
-
elRef: React.
|
|
20
|
-
scrollContent: React.
|
|
21
|
-
scrollArea: React.
|
|
19
|
+
elRef: React.RefObject<HTMLDivElement | null>;
|
|
20
|
+
scrollContent: React.RefObject<HTMLDivElement | null>;
|
|
21
|
+
scrollArea: React.RefObject<HTMLDivElement | null>;
|
|
22
22
|
}
|
|
23
23
|
type TypeUseTabScroll = (tabLength: number, componentId: string, refs: Refs) => [TypeHandleTabScroll, string, CSSProperties];
|
|
24
24
|
export declare const useTabScroll: TypeUseTabScroll;
|
|
@@ -9,7 +9,7 @@ const useTabScroll = (tabLength, componentId, refs)=>{
|
|
|
9
9
|
function calculateCurrentTranslateX() {
|
|
10
10
|
const transformValue = getScrollContentStyleValue('transform');
|
|
11
11
|
if ('none' === transformValue) return 0;
|
|
12
|
-
const match = /\((
|
|
12
|
+
const match = /\(([^)]+)\)/.exec(transformValue);
|
|
13
13
|
if (!match) return 0;
|
|
14
14
|
const matrixParams = match[1];
|
|
15
15
|
const [_a, _b, _c, _d, tx, _ty] = matrixParams.split(',');
|
|
@@ -13,7 +13,7 @@ interface TimePickerDropdownProps {
|
|
|
13
13
|
};
|
|
14
14
|
onClose: (date?: Date) => void;
|
|
15
15
|
style?: React.CSSProperties;
|
|
16
|
-
labelRef: RefObject<HTMLLabelElement>;
|
|
16
|
+
labelRef: RefObject<HTMLLabelElement | null>;
|
|
17
17
|
}
|
|
18
18
|
export declare const TimePickerDropdown: (props: TimePickerDropdownProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
19
19
|
export {};
|
package/package.json
CHANGED