@reportportal/ui-kit 0.0.1-alpha.106 → 0.0.1-alpha.108

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.
Files changed (45) hide show
  1. package/dist/attachedFile.js +1 -1
  2. package/dist/autocompletes.js +694 -0
  3. package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +9 -0
  4. package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
  5. package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
  6. package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
  7. package/dist/components/autocompletes/common/autocompleteOptions.d.ts +19 -0
  8. package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
  9. package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
  10. package/dist/components/autocompletes/common/index.d.ts +19 -0
  11. package/dist/components/autocompletes/constants.d.ts +2 -0
  12. package/dist/components/autocompletes/index.d.ts +3 -0
  13. package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
  14. package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +46 -0
  15. package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
  16. package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
  17. package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +35 -0
  18. package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
  19. package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +40 -0
  20. package/dist/components/autocompletes/types.d.ts +8 -0
  21. package/dist/components/autocompletes/utils.d.ts +5 -0
  22. package/dist/components/button/button.d.ts +1 -1
  23. package/dist/components/fieldText/fieldText.d.ts +2 -2
  24. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +2 -1
  25. package/dist/components/fileDropArea/index.d.ts +3 -3
  26. package/dist/components/icons/index.d.ts +4 -0
  27. package/dist/components/index.d.ts +4 -1
  28. package/dist/components/sidePanel/index.d.ts +2 -0
  29. package/dist/components/sidePanel/sidePanel.d.ts +17 -0
  30. package/dist/{fieldNumber-1fa248f5.js → fieldNumber-d1b5a7a1.js} +15 -14
  31. package/dist/fieldNumber.js +3 -2
  32. package/dist/fieldTextFlex-2f51c173.js +80 -0
  33. package/dist/fieldTextFlex.js +1 -1
  34. package/dist/fileDropArea.js +135 -168
  35. package/dist/icons.js +65 -60
  36. package/dist/{index-803576c3.js → index-1a874a8b.js} +1 -1
  37. package/dist/index.js +126 -116
  38. package/dist/isEmpty-ccacb5ff.js +38 -0
  39. package/dist/minus-2857540f.js +5 -0
  40. package/dist/plus-199fb2a8.js +5 -0
  41. package/dist/sidePanel.js +74 -0
  42. package/dist/style.css +1 -1
  43. package/package.json +13 -1
  44. package/dist/fieldTextFlex-8afaab31.js +0 -78
  45. package/dist/plus-0929dda4.js +0 -6
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+
3
+ type AutocompleteOptionProps = {
4
+ isActive?: boolean;
5
+ isSelected?: boolean;
6
+ isNew?: boolean;
7
+ children?: ReactNode;
8
+ disabled?: boolean;
9
+ optionVariant?: 'key-variant' | 'value-variant' | '';
10
+ newItemButtonText?: string;
11
+ } & HTMLAttributes<HTMLLIElement | HTMLButtonElement>;
12
+ export declare const AutocompleteOption: ({ isActive, isSelected, isNew, children, disabled, optionVariant, newItemButtonText, ...props }: AutocompleteOptionProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1 @@
1
+ export { AutocompleteOption } from './autocompleteOption';
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { GetItemPropsT } from '../types';
3
+
4
+ export interface AutocompleteOptionsProps<T> {
5
+ options: T[];
6
+ loading: boolean;
7
+ inputValue: string;
8
+ parseValueToString: (value: T | null) => string;
9
+ getItemProps: GetItemPropsT<T>;
10
+ renderOption?: (item: T, index: number, isNew: boolean, getItemProps: GetItemPropsT<T>) => ReactNode;
11
+ async: boolean;
12
+ optionVariant: 'key-variant' | 'value-variant' | '';
13
+ createWithoutConfirmation: boolean;
14
+ customEmptyListMessage?: string;
15
+ customNoMatchesMessage?: string;
16
+ getUniqKey?: (item: T) => string;
17
+ newItemButtonText: string;
18
+ }
19
+ export declare const AutocompleteOptions: <T>(props: AutocompleteOptionsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ interface AutocompletePromptProps {
4
+ children: ReactNode;
5
+ }
6
+ export declare const AutocompletePrompt: ({ children }: AutocompletePromptProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { AutocompletePrompt } from './autocompletePrompt';
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2025 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export { AutocompleteMenu } from './autocompleteMenu';
17
+ export { AutocompletePrompt } from './autocompletePrompt';
18
+ export { AutocompleteOption } from './autocompleteOption';
19
+ export { AutocompleteOptions } from './autocompleteOptions';
@@ -0,0 +1,2 @@
1
+ export declare const ENTER_KEY_NAME = "Enter";
2
+ export declare const TAB_KEY_NAME = "Tab";
@@ -0,0 +1,3 @@
1
+ export * from './common';
2
+ export { SingleAutocomplete } from './singleAutocomplete';
3
+ export { MultipleAutocomplete } from './multipleAutocomplete';
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2025 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export { SelectedItems } from './selectedItems';
17
+ export { MultipleAutocomplete } from './multipleAutocomplete';
@@ -0,0 +1,46 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { ControllerStateAndHelpers } from 'downshift';
3
+ import { default as FieldText } from '../../fieldText';
4
+ import { AutocompleteMenu } from '../common/autocompleteMenu';
5
+ import { DownshiftStore, MultipleDownshiftProps } from './multipleDownshift';
6
+
7
+ export interface MultipleAutocompleteProps<T> {
8
+ options: T[];
9
+ loading: boolean;
10
+ onStateChange: MultipleDownshiftProps<T>['onStateChange'];
11
+ value: T[];
12
+ placeholder: string;
13
+ error: string | boolean;
14
+ touched: boolean;
15
+ creatable: boolean;
16
+ editable: boolean;
17
+ onChange: (selectedItems: T | T[] | null, downshift: ControllerStateAndHelpers<T> | null) => void;
18
+ onFocus: () => void;
19
+ onBlur: () => void;
20
+ disabled: boolean;
21
+ mobileDisabled: boolean;
22
+ inputProps: ComponentProps<typeof FieldText>;
23
+ parseValueToString: (value: T | null) => string;
24
+ minLength: number | null;
25
+ maxLength: number | null;
26
+ async: boolean;
27
+ customClass: string;
28
+ createWithoutConfirmation: boolean;
29
+ getItemValidationErrorType?: (item: T) => string;
30
+ clearItemsError: () => void;
31
+ getAdditionalCreationCondition: (value: string) => boolean;
32
+ highlightUnStoredItem: boolean;
33
+ parseInputValueFn: ((value: string) => T[]) | null;
34
+ handleUnStoredItemCb: ((newSelectedItems: DownshiftStore<T>, prevSelectedItems: DownshiftStore<T>) => void) | null;
35
+ dataAutomationId: string;
36
+ existingItemsMap: Record<string | number, boolean>;
37
+ optionVariant: ComponentProps<typeof AutocompleteMenu>['optionVariant'];
38
+ customizeNewSelectedValue: (value: T) => T;
39
+ renderCustomSelectedItem?: (item: T) => ReactNode;
40
+ getUniqKey?: (item: T) => string;
41
+ customEmptyListMessage?: string;
42
+ customNoMatchesMessage?: string;
43
+ useFixedPositioning?: boolean;
44
+ newItemButtonText?: string;
45
+ }
46
+ export declare const MultipleAutocomplete: <T>(componentsProps: MultipleAutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { ControllerStateAndHelpers, DownshiftProps } from 'downshift';
2
+
3
+ export type DownshiftStore<T> = {
4
+ [key: string]: boolean;
5
+ } | T[];
6
+ export interface MultipleDownshiftProps<T> extends Partial<DownshiftProps<T>> {
7
+ options: T[];
8
+ selectedItems: T[];
9
+ handleUnStoredItemCb: ((newSelectedItems: DownshiftStore<T>, prevSelectedItems: DownshiftStore<T>) => void) | null;
10
+ existingItemsMap: {
11
+ [key: string]: boolean;
12
+ };
13
+ customizeNewSelectedValue: (value: T) => T;
14
+ getOptionUniqKey?: (option: T) => keyof T;
15
+ getOptionUniqKeyValue?: (option: T) => string;
16
+ onChange: (selectedItems: T | T[] | null, downshift: ControllerStateAndHelpers<T> | null) => void;
17
+ }
18
+ export type GetStateAndHelpersT<T> = ControllerStateAndHelpers<T> & {
19
+ removeItem: (removedItem: T, downshift: ControllerStateAndHelpers<T> | null) => void;
20
+ editItem: (oldItem: T, newValue: string) => void;
21
+ handleChange: MultipleDownshiftProps<T>['onChange'];
22
+ getOptionUniqKeyValue?: (option: T) => string;
23
+ storedItemsMap: MultipleDownshiftProps<T>['existingItemsMap'];
24
+ };
25
+ export declare const MultipleDownshift: <T>({ options, onChange, selectedItems, handleUnStoredItemCb, existingItemsMap, children, customizeNewSelectedValue, getOptionUniqKey, getOptionUniqKeyValue, ...props }: MultipleDownshiftProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { SelectedItems } from './selectedItems';
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ type VariantType = 'light' | 'dark';
4
+ interface SelectedItemProps<T> {
5
+ item: T;
6
+ onRemoveItem: (item: T) => void;
7
+ parseValueToString?: (value: T) => string;
8
+ editItem: (oldItem: T, newValue: string) => void;
9
+ disabled?: boolean;
10
+ mobileDisabled?: boolean;
11
+ error?: string | boolean;
12
+ editable?: boolean;
13
+ getAdditionalCreationCondition?: (value: string) => boolean;
14
+ storedOption?: boolean;
15
+ highlightUnStoredItem?: boolean;
16
+ variant?: VariantType;
17
+ getItemName?: (item: T) => string;
18
+ changeItemHandler?: (item: T, value: string) => T;
19
+ }
20
+ type SelectedItemsProps<T> = Omit<SelectedItemProps<T>, 'item' | 'editItem'> & {
21
+ items?: T[];
22
+ onRemoveItem?: (item: T) => void;
23
+ parseValueToString: (value: T | null) => string;
24
+ editItem: (oldItem: T, newValue: string) => void;
25
+ disabled?: boolean;
26
+ mobileDisabled?: boolean;
27
+ storedItemsMap?: Record<string, boolean>;
28
+ highlightUnStoredItem?: boolean;
29
+ editable?: boolean;
30
+ variant?: VariantType;
31
+ getItemValidationErrorType?: ((item: T) => string) | null;
32
+ renderCustomSelectedItem?: (item: T) => ReactNode;
33
+ };
34
+ export declare const SelectedItems: <T>({ items, parseValueToString, getItemValidationErrorType, storedItemsMap, highlightUnStoredItem, renderCustomSelectedItem, ...props }: SelectedItemsProps<T>) => (string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined)[];
35
+ export {};
@@ -0,0 +1 @@
1
+ export { SingleAutocomplete } from './singleAutocomplete';
@@ -0,0 +1,40 @@
1
+ import { ComponentProps, FocusEvent, ReactNode, Ref } from 'react';
2
+ import { default as Downshift, DownshiftState, StateChangeOptions } from 'downshift';
3
+ import { default as FieldText } from '../../fieldText';
4
+ import { AutocompleteMenu } from '../common/autocompleteMenu';
5
+
6
+ export interface SingleAutocompleteProps<T> {
7
+ options: T[];
8
+ loading: boolean;
9
+ onStateChange: ComponentProps<typeof Downshift<T>>['onStateChange'];
10
+ value: T | null;
11
+ placeholder: string;
12
+ onChange: ComponentProps<typeof Downshift<T>>['onChange'];
13
+ onFocus: () => void;
14
+ onBlur: (e: FocusEvent<HTMLInputElement>) => void;
15
+ disabled: boolean;
16
+ inputProps: ComponentProps<typeof FieldText>;
17
+ parseValueToString: (value: T | null) => string;
18
+ renderOption: (value: T) => ReactNode;
19
+ minLength: number;
20
+ maxLength: number | null;
21
+ async: boolean;
22
+ optionVariant: ComponentProps<typeof AutocompleteMenu>['optionVariant'];
23
+ isRequired: boolean;
24
+ error: string;
25
+ touched: boolean;
26
+ setTouch?: (value: boolean) => void;
27
+ createWithoutConfirmation: boolean;
28
+ menuClassName: string;
29
+ icon?: ReactNode;
30
+ skipOptionCreation?: boolean;
31
+ isOptionUnique?: (value: boolean | null) => void;
32
+ refFunction?: Ref<HTMLInputElement>;
33
+ stateReducer?: (state: DownshiftState<T>, changes: StateChangeOptions<T>) => Partial<StateChangeOptions<T>>;
34
+ useFixedPositioning: boolean;
35
+ getUniqKey?: (item: T) => string;
36
+ customEmptyListMessage?: string;
37
+ customNoMatchesMessage?: string;
38
+ newItemButtonText?: string;
39
+ }
40
+ export declare const SingleAutocomplete: <T>(componentProps: SingleAutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { GetItemPropsOptions } from 'downshift';
2
+
3
+ export type GetOptionUniqKeyT<T> = (value: T) => keyof T;
4
+ export interface AdditionalDownshiftFields {
5
+ isActive?: boolean;
6
+ }
7
+ export type OptionVariant = 'light' | 'dark' | string;
8
+ export type GetItemPropsT<T> = (args: GetItemPropsOptions<T> & AdditionalDownshiftFields) => GetItemPropsOptions<T> & AdditionalDownshiftFields;
@@ -0,0 +1,5 @@
1
+ import { GetOptionUniqKeyT } from './types';
2
+
3
+ export declare const getUniqKey: <T>(option: T, getOptionUniqKey?: GetOptionUniqKeyT<T>) => string;
4
+ export declare const isEqual: <T>(option: T, item: T) => boolean;
5
+ export declare const compareOptionWithItem: <T>(option: T, item: T, getUniqKeyCb?: GetOptionUniqKeyT<T>) => boolean;
@@ -15,5 +15,5 @@ export interface ButtonProps extends ComponentPropsWithRef<'button'> {
15
15
  className?: string;
16
16
  variant?: ButtonVariant;
17
17
  }
18
- export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
18
+ export declare const Button: (props: ButtonProps & import('react').RefAttributes<HTMLButtonElement>) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | null;
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { ChangeEventHandler, ReactNode, InputHTMLAttributes } from 'react';
1
+ import { ChangeEventHandler, ReactElement, ReactNode, InputHTMLAttributes } from 'react';
2
2
 
3
3
  type InputType = 'password' | 'text' | 'email';
4
4
  export interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
@@ -28,5 +28,5 @@ export interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
28
28
  collapsible?: boolean;
29
29
  loading?: boolean;
30
30
  }
31
- export declare const FieldText: import('react').ForwardRefExoticComponent<FieldTextProps & import('react').RefAttributes<HTMLInputElement>>;
31
+ export declare const FieldText: (props: FieldTextProps & import('react').RefAttributes<HTMLInputElement>) => ReactElement<any, string | import('react').JSXElementConstructor<any>> | null;
32
32
  export {};
@@ -8,9 +8,10 @@ export interface FieldTextFlexProps extends ComponentPropsWithRef<'textarea'> {
8
8
  label?: string;
9
9
  helpText?: string;
10
10
  maxLengthDisplay?: number;
11
+ minHeight?: number;
11
12
  onChange?: ChangeEventHandler<HTMLTextAreaElement>;
12
13
  onFocus?: FocusEventHandler<HTMLTextAreaElement>;
13
14
  onBlur?: FocusEventHandler<HTMLTextAreaElement>;
14
15
  onKeyUp?: KeyboardEventHandler<HTMLTextAreaElement>;
15
16
  }
16
- export declare const FieldTextFlex: import('react').ForwardRefExoticComponent<Omit<FieldTextFlexProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
17
+ export declare const FieldTextFlex: (props: FieldTextFlexProps & import('react').RefAttributes<HTMLTextAreaElement>) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | null;
@@ -1,6 +1,6 @@
1
1
  import { FileDropArea } from './fileDropArea';
2
- import { MIME_TYPES, FileWithValidation } from './types';
2
+ import { MIME_TYPES, FileValidationError, MimeType, FileWithValidation, FileValidationMessages } from './types';
3
3
 
4
4
  export { FileDropArea };
5
- export { MIME_TYPES };
6
- export type { FileWithValidation };
5
+ export { MIME_TYPES, FileValidationError };
6
+ export type { MimeType, FileWithValidation, FileValidationMessages };
@@ -12,6 +12,7 @@ export { default as ChevronRightBreadcrumbsIcon } from './svg/chevronRightBreadc
12
12
  export { default as ClearIcon } from './svg/clear.svg';
13
13
  export { default as CloseEyeIcon } from './svg/closeEye.svg';
14
14
  export { default as CloseIcon } from './svg/close.svg';
15
+ export { default as ConfigurationIcon } from './svg/configuration.svg';
15
16
  export { default as CopyIcon } from './svg/copy.svg';
16
17
  export { default as CoveredManuallyIcon } from './svg/coveredManually.svg';
17
18
  export { default as CsvIcon } from './svg/csv.svg';
@@ -28,6 +29,7 @@ export { default as FileOtherIcon } from './svg/fileOther.svg';
28
29
  export { default as FilterFilledIcon } from './svg/filterFilled.svg';
29
30
  export { default as FilterOutlineIcon } from './svg/filterOutline.svg';
30
31
  export { default as FlagIcon } from './svg/flag.svg';
32
+ export { default as GroupByIcon } from './svg/groupBy.svg';
31
33
  export { default as HideIcon } from './svg/hide.svg';
32
34
  export { default as ImageIcon } from './svg/image.svg';
33
35
  export { default as InfoIcon } from './svg/info.svg';
@@ -38,6 +40,8 @@ export { default as MinusIcon } from './svg/minus.svg';
38
40
  export { default as MoveToFolderIcon } from './svg/moveToFolder.svg';
39
41
  export { default as OpenEyeIcon } from './svg/openEye.svg';
40
42
  export { default as PdfIcon } from './svg/pdf.svg';
43
+ export { default as PinFilledIcon } from './svg/pinFilled.svg';
44
+ export { default as PinOutlineIcon } from './svg/pinOutline.svg';
41
45
  export { default as PlusIcon } from './svg/plus.svg';
42
46
  export { default as PrevChapterIcon } from './svg/prevChapter.svg';
43
47
  export { default as PrevPageIcon } from './svg/prevPage.svg';
@@ -10,8 +10,9 @@ export { FieldLabel } from './fieldLabel';
10
10
  export { FieldNumber } from './fieldNumber';
11
11
  export { FieldText } from './fieldText';
12
12
  export { FieldTextFlex } from './fieldTextFlex';
13
- export { FileDropArea, MIME_TYPES } from './fileDropArea';
13
+ export { FileDropArea } from './fileDropArea';
14
14
  export { Modal } from './modal';
15
+ export { MultipleAutocomplete } from './autocompletes/multipleAutocomplete';
15
16
  export { Pagination } from './pagination';
16
17
  export { Popover } from './popover';
17
18
  export { Radio } from './radio';
@@ -19,8 +20,10 @@ export { Selection } from './selection';
19
20
  export { SpinLoader } from './spinLoader';
20
21
  export { SystemAlert } from './systemAlert';
21
22
  export { SystemMessage } from './systemMessage';
23
+ export { SingleAutocomplete } from './autocompletes/singleAutocomplete';
22
24
  export { Table } from './table';
23
25
  export { ThemeProvider } from './themeProvider';
24
26
  export { Toggle } from './toggle';
25
27
  export { Tooltip } from './tooltip';
28
+ export { SidePanel } from './sidePanel';
26
29
  export * from './icons';
@@ -0,0 +1,2 @@
1
+ export { SidePanel } from './sidePanel';
2
+ export type { SidePanelProps } from './sidePanel';
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface SidePanelProps {
4
+ className?: string;
5
+ title?: ReactNode;
6
+ headerComponent?: ReactNode;
7
+ descriptionComponent?: ReactNode;
8
+ contentComponent?: ReactNode;
9
+ footerComponent?: ReactNode;
10
+ top?: number;
11
+ side?: 'left' | 'right';
12
+ isOpen?: boolean;
13
+ onClose?: () => void;
14
+ closeButtonAriaLabel?: string;
15
+ }
16
+ export declare const SidePanel: ({ className, title, descriptionComponent, headerComponent, contentComponent, footerComponent, top, side, isOpen, onClose, closeButtonAriaLabel, }: SidePanelProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default SidePanel;
@@ -1,9 +1,10 @@
1
- import { jsxs as a, Fragment as y, jsx as r } from "react/jsx-runtime";
2
- import { useRef as B, useId as F, useMemo as S } from "react";
1
+ import { jsxs as a, Fragment as W, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as y, useId as B, useMemo as F } from "react";
3
3
  import { c as w } from "./bind-06a7ff84.js";
4
4
  import { K as _ } from "./keyCodes-f63c0e11.js";
5
5
  import { B as p } from "./baseIconButton-251479f7.js";
6
- import { S as V, a as k } from "./plus-0929dda4.js";
6
+ import { S as V } from "./minus-2857540f.js";
7
+ import { S as k } from "./plus-199fb2a8.js";
7
8
  import { FieldLabel as H } from "./fieldLabel.js";
8
9
  const P = 5, N = 16, j = [
9
10
  _.TAB_KEY_CODE,
@@ -33,7 +34,7 @@ const P = 5, N = 16, j = [
33
34
  input: $,
34
35
  "additional-content": "_additional-content_3v3h5_84",
35
36
  "error-text": "_error-text_3v3h5_88"
36
- }, c = w.bind(b), en = ({
37
+ }, c = w.bind(b), tn = ({
37
38
  value: i = "",
38
39
  placeholder: Y = "0",
39
40
  disabled: t = !1,
@@ -49,7 +50,7 @@ const P = 5, N = 16, j = [
49
50
  id: D,
50
51
  ...M
51
52
  }) => {
52
- const u = B(null), f = F(), R = (n) => n < l ? l : n > E ? E : n, U = (n) => {
53
+ const u = y(null), m = B(), R = (n) => n < l ? l : n > E ? E : n, U = (n) => {
53
54
  let e = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
54
55
  if (e === "") {
55
56
  s("");
@@ -57,8 +58,8 @@ const P = 5, N = 16, j = [
57
58
  }
58
59
  e = +e, s(e);
59
60
  }, A = (n) => {
60
- const e = +n.currentTarget.value, m = R(e);
61
- m !== e && s(m), O && O(n);
61
+ const e = +n.currentTarget.value, f = R(e);
62
+ f !== e && s(f), O && O(n);
62
63
  }, g = (n) => {
63
64
  const { keyCode: e } = n;
64
65
  j.includes(e) || (e < _.NUMBER_START_KEY_CODE || e > _.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
@@ -68,15 +69,15 @@ const P = 5, N = 16, j = [
68
69
  }, v = () => {
69
70
  const n = +i + 1;
70
71
  n >= l && n <= E && s(n);
71
- }, K = Y + o, I = S(() => {
72
+ }, K = Y + o, I = F(() => {
72
73
  let n = (String(i) || K).length;
73
74
  return o && !i && (n += 1), n > N ? `${N}ch` : `${n || P}ch`;
74
- }, [K, o, i]), W = () => {
75
+ }, [K, o, i]), S = () => {
75
76
  u && u.current && u.current.focus(), d && d();
76
77
  };
77
- return /* @__PURE__ */ a(y, { children: [
78
+ return /* @__PURE__ */ a(W, { children: [
78
79
  /* @__PURE__ */ a("div", { className: c("field-number", { disabled: t }), children: [
79
- h && /* @__PURE__ */ r(H, { htmlFor: D ?? f, children: h }),
80
+ h && /* @__PURE__ */ r(H, { htmlFor: D ?? m, children: h }),
80
81
  /* @__PURE__ */ a(
81
82
  "div",
82
83
  {
@@ -95,11 +96,11 @@ const P = 5, N = 16, j = [
95
96
  children: /* @__PURE__ */ r(V, {})
96
97
  }
97
98
  ),
98
- /* @__PURE__ */ a("span", { className: c("input-field", { disabled: t }), onClick: W, children: [
99
+ /* @__PURE__ */ a("span", { className: c("input-field", { disabled: t }), onClick: S, children: [
99
100
  /* @__PURE__ */ r(
100
101
  "input",
101
102
  {
102
- id: D ?? f,
103
+ id: D ?? m,
103
104
  ref: u,
104
105
  className: c("input"),
105
106
  type: "number",
@@ -135,5 +136,5 @@ const P = 5, N = 16, j = [
135
136
  ] });
136
137
  };
137
138
  export {
138
- en as F
139
+ tn as F
139
140
  };
@@ -1,10 +1,11 @@
1
- import { F as m } from "./fieldNumber-1fa248f5.js";
1
+ import { F as m } from "./fieldNumber-d1b5a7a1.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
5
5
  import "./keyCodes-f63c0e11.js";
6
6
  import "./baseIconButton-251479f7.js";
7
- import "./plus-0929dda4.js";
7
+ import "./minus-2857540f.js";
8
+ import "./plus-199fb2a8.js";
8
9
  import "./fieldLabel.js";
9
10
  export {
10
11
  m as FieldNumber,
@@ -0,0 +1,80 @@
1
+ import { jsxs as _, Fragment as R, jsx as t } from "react/jsx-runtime";
2
+ import { c as j } from "./bind-06a7ff84.js";
3
+ import { forwardRef as D, useId as H } from "react";
4
+ import { M } from "./maxValueDisplay-9be01a75.js";
5
+ import { FieldLabel as O } from "./fieldLabel.js";
6
+ const V = "_disabled_1pfea_16", $ = "_error_1pfea_19", b = "_touched_1pfea_19", w = {
7
+ "text-area": "_text-area_1pfea_1",
8
+ disabled: V,
9
+ error: $,
10
+ touched: b,
11
+ "max-length-display": "_max-length-display_1pfea_26",
12
+ "additional-content": "_additional-content_1pfea_45",
13
+ "error-text": "_error-text_1pfea_45",
14
+ "help-text": "_help-text_1pfea_53"
15
+ }, e = j.bind(w), z = 72, A = 2, C = D(
16
+ ({
17
+ value: s = "",
18
+ readonly: x = !1,
19
+ error: r = "",
20
+ placeholder: h = "",
21
+ disabled: a = !1,
22
+ touched: c = !1,
23
+ className: m = "",
24
+ label: i = "",
25
+ helpText: l = "",
26
+ minHeight: o = z,
27
+ maxLengthDisplay: f,
28
+ onChange: g,
29
+ onFocus: y,
30
+ onBlur: N,
31
+ onKeyUp: u,
32
+ ...F
33
+ }, I) => {
34
+ const d = H(), p = r && c, E = (n) => {
35
+ n.target.style.height = `${o}px`, n.target.style.height = `${n.target.scrollHeight + A}px`;
36
+ };
37
+ return /* @__PURE__ */ _(R, { children: [
38
+ i && /* @__PURE__ */ t(O, { htmlFor: d, className: e({ disabled: a }), children: i }),
39
+ /* @__PURE__ */ t(
40
+ "textarea",
41
+ {
42
+ id: d,
43
+ ref: I,
44
+ className: e("text-area", m, {
45
+ disabled: a,
46
+ error: r,
47
+ touched: c
48
+ }),
49
+ style: { minHeight: o, height: o },
50
+ value: s,
51
+ placeholder: h,
52
+ disabled: a,
53
+ readOnly: x,
54
+ onChange: g,
55
+ onFocus: y,
56
+ onBlur: N,
57
+ onKeyUp: u,
58
+ onInput: E,
59
+ ...F,
60
+ children: s
61
+ }
62
+ ),
63
+ /* @__PURE__ */ t(
64
+ M,
65
+ {
66
+ className: e("max-length-display"),
67
+ value: s.length,
68
+ maxValue: f
69
+ }
70
+ ),
71
+ (p || l) && /* @__PURE__ */ _("div", { className: e("additional-content", { disabled: a }), children: [
72
+ p && /* @__PURE__ */ t("span", { className: e("error-text"), children: r }),
73
+ l && /* @__PURE__ */ t("span", { className: e("help-text"), children: l })
74
+ ] })
75
+ ] });
76
+ }
77
+ );
78
+ export {
79
+ C as F
80
+ };
@@ -1,4 +1,4 @@
1
- import { F as o } from "./fieldTextFlex-8afaab31.js";
1
+ import { F as o } from "./fieldTextFlex-2f51c173.js";
2
2
  import "react/jsx-runtime";
3
3
  import "./bind-06a7ff84.js";
4
4
  import "react";