@scbt-ecom/ui 0.22.8 → 0.23.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.
Files changed (22) hide show
  1. package/dist/shared/ui/formElements/controlled/index.d.ts +19 -13
  2. package/dist/shared/ui/formElements/controlled/select/SelectControl.d.ts +7 -3
  3. package/dist/shared/ui/formElements/uncontrolled/index.d.ts +14 -10
  4. package/dist/shared/ui/formElements/uncontrolled/select/Select.d.ts +55 -30
  5. package/dist/shared/ui/formElements/uncontrolled/select/hooks/useSelectController.d.ts +17 -0
  6. package/dist/shared/ui/formElements/uncontrolled/select/index.d.ts +1 -1
  7. package/dist/shared/ui/formElements/uncontrolled/select/model/index.d.ts +1 -0
  8. package/dist/shared/ui/formElements/uncontrolled/select/model/types.d.ts +14 -0
  9. package/dist/shared/ui/formElements/uncontrolled/select/ui/{control/ui/Chip.d.ts → Chip.d.ts} +1 -1
  10. package/dist/shared/ui/formElements/uncontrolled/select/ui/ChipList.d.ts +11 -0
  11. package/dist/shared/ui/formElements/uncontrolled/select/ui/SelectItem.d.ts +12 -20
  12. package/dist/shared/ui/formElements/uncontrolled/select/ui/index.d.ts +2 -3
  13. package/dist/ui.js +7415 -7531
  14. package/dist/ui.js.map +1 -1
  15. package/package.json +1 -1
  16. package/dist/shared/ui/formElements/uncontrolled/select/ui/SelectList.d.ts +0 -10
  17. package/dist/shared/ui/formElements/uncontrolled/select/ui/control/Control.d.ts +0 -16
  18. package/dist/shared/ui/formElements/uncontrolled/select/ui/control/hooks/useSelectController.d.ts +0 -52
  19. package/dist/shared/ui/formElements/uncontrolled/select/ui/control/index.d.ts +0 -1
  20. package/dist/shared/ui/formElements/uncontrolled/select/ui/control/ui/ChipList.d.ts +0 -11
  21. package/dist/shared/ui/formElements/uncontrolled/select/ui/control/ui/index.d.ts +0 -1
  22. /package/dist/shared/ui/formElements/uncontrolled/select/{ui/control/hooks → hooks}/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.22.8",
3
+ "version": "0.23.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,10 +0,0 @@
1
- import { MenuListProps } from 'react-select';
2
- import { SelectItemOption } from '../../../..';
3
- export type SelectListClasses = {
4
- container?: string;
5
- };
6
- type SelectListProps = MenuListProps<SelectItemOption> & {
7
- classes?: SelectListClasses;
8
- };
9
- export declare const SelectList: ({ classes, ...props }: SelectListProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,16 +0,0 @@
1
- import { ControlProps as ControlPrimitiveProps } from 'react-select';
2
- import { SelectBaseProps } from '../../Select';
3
- import { InputBaseProps, SelectItemOption } from '../../../../..';
4
- type ControlBaseProps = ControlPrimitiveProps<SelectItemOption, boolean>;
5
- export type ControlClasses = {
6
- control?: string;
7
- chip?: string;
8
- };
9
- type ControlProps = ControlBaseProps & Pick<SelectBaseProps, 'isSearchable' | 'label' | 'returnValue' | 'displayValue' | 'invalid'> & Pick<InputBaseProps, 'attachmentProps'> & {
10
- /**
11
- * Дополнительные стили каждого внутреннего элемента
12
- */
13
- classes?: ControlClasses & InputBaseProps['classes'];
14
- };
15
- export declare const Control: ({ isSearchable, label, attachmentProps, displayValue, isMulti, invalid, classes, ...props }: ControlProps) => import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,52 +0,0 @@
1
- import { ActionMeta, InputActionMeta, OnChangeValue, PropsValue } from 'react-select';
2
- import { SelectItemOption } from '../../../../../..';
3
- type InputChangeHandler = (value: string, action: InputActionMeta) => void;
4
- type UseSelectControllerProps<Option> = {
5
- /**
6
- * значение поля ввода
7
- */
8
- inputValue: string;
9
- /**
10
- * функция для изменения поля ввода
11
- */
12
- onInputChange: InputChangeHandler;
13
- /**
14
- * функция для открытия списка
15
- */
16
- onMenuOpen: () => void;
17
- /**
18
- * функция для закрытия списка
19
- */
20
- onMenuClose: () => void;
21
- /**
22
- * состояние отображения списка
23
- */
24
- menuIsOpen: boolean;
25
- /**
26
- * функция, которая управляет отображаемым полем
27
- */
28
- displayValue?: (option: Option) => string;
29
- /**
30
- * выбранные значения компонента
31
- */
32
- value: PropsValue<Option>;
33
- /**
34
- * функция изменения выбранных значений
35
- */
36
- onValueChange: (value: OnChangeValue<Option, boolean>, action: ActionMeta<Option>) => void;
37
- };
38
- /**
39
- * Хук для управления компонентом Select
40
- *
41
- * @returns `onInputValueChange`,
42
- * `onMenuOpenToggle`,
43
- * `selectDisplayValue`,
44
- * `onDeleteItem`
45
- */
46
- export declare const useSelectController: <Option extends SelectItemOption>({ inputValue, onInputChange, menuIsOpen, onMenuClose, onMenuOpen, displayValue, value, onValueChange }: UseSelectControllerProps<Option>) => {
47
- onInputValueChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
48
- onMenuOpenToggle: () => void;
49
- selectDisplayValue: string | undefined;
50
- onDeleteItem: (option: Option) => void;
51
- };
52
- export {};
@@ -1 +0,0 @@
1
- export { Control, type ControlClasses } from './Control';
@@ -1,11 +0,0 @@
1
- import { ChangeEvent } from 'react';
2
- import { PropsValue } from 'react-select';
3
- import { ControlChipProps } from './Chip';
4
- import { SelectItemOption } from '../../../../../..';
5
- type ControlChipListProps<Option extends SelectItemOption> = Omit<ControlChipProps, 'data'> & {
6
- values: PropsValue<Option>;
7
- inputValue: string;
8
- onInputValueChange: (event: ChangeEvent<HTMLInputElement>) => void;
9
- };
10
- export declare const ChipList: <Option extends SelectItemOption>({ values, inputValue, onInputValueChange, ...props }: ControlChipListProps<Option>) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1 +0,0 @@
1
- export { ChipList } from './ChipList';