@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.
@@ -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.MutableRefObject<HTMLInputElement | null>, cappedSuggestions: SearchSuggestion[], value?: string, defaultValue?: string, onChange?: (value: string) => void, onSearch?: (value: string) => void, onKeyboardNavigate?: (value: string) => void): {
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.MutableRefObject<HTMLDivElement | null>;
20
- scrollContent: React.MutableRefObject<HTMLDivElement | null>;
21
- scrollArea: React.MutableRefObject<HTMLDivElement | null>;
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 = /\((.+?)\)/.exec(transformValue);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "10.0.1-dev.846",
3
+ "version": "10.0.1-dev.848",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "copyright": "Copyright (c) 2025 Festo SE & Co. KG. All rights reserved.",
6
6
  "license": "apache-2.0",