indicator-ui 0.0.22 → 0.0.24

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.
@@ -31,7 +31,7 @@
31
31
 
32
32
  @include fnt($size: 16, $line-height: 24, $weight: 400, $color: var(--gray-900));
33
33
 
34
- &::placeholder, .placeholder {
34
+ &::placeholder, &.placeholder {
35
35
  @include fnt($size: 16, $line-height: 24, $weight: 400, $color: var(--gray-400));
36
36
  }
37
37
  }
@@ -1,3 +1,4 @@
1
1
  export { default as isArray } from './isArray';
2
2
  export { default as isEqualArrays } from './isEqualArrays';
3
3
  export { default as getUniqueArray } from './getUniqueArray';
4
+ export * from './traverseTreeByStack';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Массив структуры данных **Tree**.
3
+ * */
4
+ export type TraverseTreeByStackArrayType<T> = T[];
5
+ /**
6
+ * Функция обработки узлов.
7
+ * */
8
+ export type TraverseTreeByStackProcessType<T> = (item: T) => void;
9
+ /**
10
+ * Дополнительны настройки.
11
+ * */
12
+ export type TraverseTreeByStackOptionsType<T> = {
13
+ /**
14
+ * Функция получения **поддерева** из текущего узла.
15
+ * Если возвращается ```undefined```, то узел - лист.
16
+ * Требуемое возвращаемое значение - поддерево из текущего узла.
17
+ * Входные данные - текущий узел.
18
+ * */
19
+ getArray?: (item: T) => (TraverseTreeByStackArrayType<T> | undefined);
20
+ /**
21
+ * Нужно ли обрабатывать **process-функцией** узлы с поддеревом.
22
+ * По-умолчанию - ```false```.
23
+ * */
24
+ isProcessArray?: boolean;
25
+ };
26
+ export declare function traverseTreeByStack<T>(arr: TraverseTreeByStackArrayType<T>, process: TraverseTreeByStackProcessType<T>, options?: TraverseTreeByStackOptionsType<T>): void;
@@ -0,0 +1 @@
1
+ export declare function CascadeSelectorPage(): import("react/jsx-runtime").JSX.Element;
@@ -8,3 +8,4 @@ export * from './FormBuilderPage';
8
8
  export * from './CheckboxPage';
9
9
  export * from './ToggleBasePage';
10
10
  export * from './TogglePage';
11
+ export * from './CascadeSelectorPage';
@@ -0,0 +1,2 @@
1
+ export * from './ui';
2
+ export * from './types';
@@ -0,0 +1 @@
1
+ export { default as CascadeBlockStyle } from './CascadeBlock.module.scss';
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { CascadeSelectorOptionsType } from "./CascadeSelectorTypes";
3
+ export type CascadeBlockPropsType = {
4
+ value: any[];
5
+ onClick: (value: any) => void;
6
+ options: CascadeSelectorOptionsType;
7
+ label?: React.ReactNode;
8
+ supportingText?: React.ReactNode;
9
+ noWrapper?: boolean;
10
+ };
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ export type CascadeSelectorOptionsItemType = {
3
+ value?: any;
4
+ label?: React.ReactNode;
5
+ supportingText?: React.ReactNode;
6
+ };
7
+ export type CascadeSelectorOptionsCascadeType = {
8
+ label?: string;
9
+ supportingText?: React.ReactNode;
10
+ options?: CascadeSelectorOptionsType;
11
+ };
12
+ export type CascadeSelectorOptionsType = (CascadeSelectorOptionsCascadeType | CascadeSelectorOptionsItemType)[];
13
+ export type CascadeSelectorPropsType = {
14
+ /**
15
+ * Учтите, что переменные сравниваются без глубокого сравнения, то есть словари, массивы будут сравниваться по значению указателя.
16
+ * */
17
+ value?: any | any[];
18
+ onChange?: (value?: string[]) => void;
19
+ options?: CascadeSelectorOptionsType;
20
+ multiple?: boolean;
21
+ };
@@ -0,0 +1,2 @@
1
+ export * from './CascadeSelectorTypes';
2
+ export * from './CascadeBlockTypes';
@@ -0,0 +1,2 @@
1
+ import { CascadeBlockPropsType } from "../types";
2
+ export declare function CascadeBlock({ options, onClick, label, supportingText, noWrapper, value }: CascadeBlockPropsType): import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[];
@@ -0,0 +1,2 @@
1
+ import { CascadeSelectorPropsType } from "../types";
2
+ export declare function CascadeSelector({ value, options, onChange, multiple }: CascadeSelectorPropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './CascadeSelector';
2
+ export * from './CascadeSelector';
@@ -7,3 +7,4 @@ export * from './CheckboxMark';
7
7
  export * from './Checkbox';
8
8
  export * from './ToggleBase';
9
9
  export * from './Toggle';
10
+ export * from './CascadeSelector';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indicator-ui",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/types/src/index.d.ts",
6
6
  "style": "dist/index.css",