@vchasno/ui-kit 0.1.6 → 0.2.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 (156) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +20 -2
  3. package/dist/Datepicker/index.d.ts +28 -0
  4. package/dist/Datepicker/index.js +10356 -0
  5. package/dist/Datepicker/index.js.map +1 -0
  6. package/dist/Datepicker/types/components/Alert/Alert.d.ts +16 -0
  7. package/dist/Datepicker/types/components/Alert/index.d.ts +2 -0
  8. package/dist/Datepicker/types/components/Button/Button.d.ts +12 -0
  9. package/dist/Datepicker/types/components/Button/index.d.ts +2 -0
  10. package/dist/Datepicker/types/components/Checkbox/Checkbox.d.ts +11 -0
  11. package/dist/Datepicker/types/components/Checkbox/index.d.ts +2 -0
  12. package/dist/Datepicker/types/components/Datepicker/DatePicker.d.ts +15 -0
  13. package/dist/Datepicker/types/components/Datepicker/index.d.ts +2 -0
  14. package/dist/Datepicker/types/components/FlexBox/FlexBox.d.ts +15 -0
  15. package/dist/Datepicker/types/components/FlexBox/index.d.ts +2 -0
  16. package/dist/Datepicker/types/components/Input/Input.d.ts +15 -0
  17. package/dist/Datepicker/types/components/Input/index.d.ts +2 -0
  18. package/dist/Datepicker/types/components/InputMeta/InputMeta.d.ts +8 -0
  19. package/dist/Datepicker/types/components/InputMeta/index.d.ts +2 -0
  20. package/dist/Datepicker/types/components/LabelText/LabelText.d.ts +8 -0
  21. package/dist/Datepicker/types/components/LabelText/index.d.ts +1 -0
  22. package/dist/Datepicker/types/components/MaskInput/MaskInput.d.ts +10 -0
  23. package/dist/Datepicker/types/components/MaskInput/index.d.ts +2 -0
  24. package/dist/Datepicker/types/components/Pagination/Pagination.d.ts +13 -0
  25. package/dist/Datepicker/types/components/Pagination/index.d.ts +2 -0
  26. package/dist/Datepicker/types/components/Pagination/utils.d.ts +1 -0
  27. package/dist/Datepicker/types/components/Paragraph/Paragraph.d.ts +9 -0
  28. package/dist/Datepicker/types/components/Paragraph/index.d.ts +2 -0
  29. package/dist/Datepicker/types/components/Select/Select.d.ts +10 -0
  30. package/dist/Datepicker/types/components/Select/SelectCreatable.d.ts +13 -0
  31. package/dist/Datepicker/types/components/Select/customComponents.d.ts +9 -0
  32. package/dist/Datepicker/types/components/Select/defaultProps.d.ts +6 -0
  33. package/dist/Datepicker/types/components/Select/index.d.ts +5 -0
  34. package/dist/Datepicker/types/components/Select/types.d.ts +4 -0
  35. package/dist/Datepicker/types/components/Spinner/Spinner.d.ts +18 -0
  36. package/dist/Datepicker/types/components/Spinner/index.d.ts +2 -0
  37. package/dist/Datepicker/types/components/Switcher/Switcher.d.ts +14 -0
  38. package/dist/Datepicker/types/components/Switcher/index.d.ts +2 -0
  39. package/dist/Datepicker/types/components/Tabs/Tabs.d.ts +19 -0
  40. package/dist/Datepicker/types/components/Tabs/index.d.ts +2 -0
  41. package/dist/Datepicker/types/components/Text/Text.d.ts +14 -0
  42. package/dist/Datepicker/types/components/Text/index.d.ts +2 -0
  43. package/dist/Datepicker/types/components/TextAreaInput/TextAreaInput.d.ts +10 -0
  44. package/dist/Datepicker/types/components/TextAreaInput/index.d.ts +2 -0
  45. package/dist/Datepicker/types/components/TextInput/TextInput.d.ts +9 -0
  46. package/dist/Datepicker/types/components/TextInput/index.d.ts +2 -0
  47. package/dist/Datepicker/types/components/Title/Title.d.ts +9 -0
  48. package/dist/Datepicker/types/components/Title/index.d.ts +2 -0
  49. package/dist/Datepicker/types/components/index.d.ts +32 -0
  50. package/dist/Datepicker/types/components/types.d.ts +24 -0
  51. package/dist/Datepicker/types/index.d.ts +1 -0
  52. package/dist/Select/index.d.ts +27 -0
  53. package/dist/Select/index.js +7721 -0
  54. package/dist/Select/index.js.map +1 -0
  55. package/dist/Select/types/components/Alert/Alert.d.ts +16 -0
  56. package/dist/Select/types/components/Alert/index.d.ts +2 -0
  57. package/dist/Select/types/components/Button/Button.d.ts +12 -0
  58. package/dist/Select/types/components/Button/index.d.ts +2 -0
  59. package/dist/Select/types/components/Checkbox/Checkbox.d.ts +11 -0
  60. package/dist/Select/types/components/Checkbox/index.d.ts +2 -0
  61. package/dist/Select/types/components/Datepicker/DatePicker.d.ts +15 -0
  62. package/dist/Select/types/components/Datepicker/index.d.ts +2 -0
  63. package/dist/Select/types/components/FlexBox/FlexBox.d.ts +15 -0
  64. package/dist/Select/types/components/FlexBox/index.d.ts +2 -0
  65. package/dist/Select/types/components/Input/Input.d.ts +15 -0
  66. package/dist/Select/types/components/Input/index.d.ts +2 -0
  67. package/dist/Select/types/components/InputMeta/InputMeta.d.ts +8 -0
  68. package/dist/Select/types/components/InputMeta/index.d.ts +2 -0
  69. package/dist/Select/types/components/LabelText/LabelText.d.ts +8 -0
  70. package/dist/Select/types/components/LabelText/index.d.ts +1 -0
  71. package/dist/Select/types/components/MaskInput/MaskInput.d.ts +10 -0
  72. package/dist/Select/types/components/MaskInput/index.d.ts +2 -0
  73. package/dist/Select/types/components/Pagination/Pagination.d.ts +13 -0
  74. package/dist/Select/types/components/Pagination/index.d.ts +2 -0
  75. package/dist/Select/types/components/Pagination/utils.d.ts +1 -0
  76. package/dist/Select/types/components/Paragraph/Paragraph.d.ts +9 -0
  77. package/dist/Select/types/components/Paragraph/index.d.ts +2 -0
  78. package/dist/Select/types/components/Select/Select.d.ts +10 -0
  79. package/dist/Select/types/components/Select/SelectCreatable.d.ts +13 -0
  80. package/dist/Select/types/components/Select/customComponents.d.ts +9 -0
  81. package/dist/Select/types/components/Select/defaultProps.d.ts +6 -0
  82. package/dist/Select/types/components/Select/index.d.ts +5 -0
  83. package/dist/Select/types/components/Select/types.d.ts +4 -0
  84. package/dist/Select/types/components/Spinner/Spinner.d.ts +18 -0
  85. package/dist/Select/types/components/Spinner/index.d.ts +2 -0
  86. package/dist/Select/types/components/Switcher/Switcher.d.ts +14 -0
  87. package/dist/Select/types/components/Switcher/index.d.ts +2 -0
  88. package/dist/Select/types/components/Tabs/Tabs.d.ts +19 -0
  89. package/dist/Select/types/components/Tabs/index.d.ts +2 -0
  90. package/dist/Select/types/components/Text/Text.d.ts +14 -0
  91. package/dist/Select/types/components/Text/index.d.ts +2 -0
  92. package/dist/Select/types/components/TextAreaInput/TextAreaInput.d.ts +10 -0
  93. package/dist/Select/types/components/TextAreaInput/index.d.ts +2 -0
  94. package/dist/Select/types/components/TextInput/TextInput.d.ts +9 -0
  95. package/dist/Select/types/components/TextInput/index.d.ts +2 -0
  96. package/dist/Select/types/components/Title/Title.d.ts +9 -0
  97. package/dist/Select/types/components/Title/index.d.ts +2 -0
  98. package/dist/Select/types/components/index.d.ts +32 -0
  99. package/dist/Select/types/components/types.d.ts +24 -0
  100. package/dist/Select/types/index.d.ts +1 -0
  101. package/dist/SelectCreatable/index.d.ts +34 -0
  102. package/dist/SelectCreatable/index.js +7810 -0
  103. package/dist/SelectCreatable/index.js.map +1 -0
  104. package/dist/SelectCreatable/types/components/Alert/Alert.d.ts +16 -0
  105. package/dist/SelectCreatable/types/components/Alert/index.d.ts +2 -0
  106. package/dist/SelectCreatable/types/components/Button/Button.d.ts +12 -0
  107. package/dist/SelectCreatable/types/components/Button/index.d.ts +2 -0
  108. package/dist/SelectCreatable/types/components/Checkbox/Checkbox.d.ts +11 -0
  109. package/dist/SelectCreatable/types/components/Checkbox/index.d.ts +2 -0
  110. package/dist/SelectCreatable/types/components/Datepicker/DatePicker.d.ts +15 -0
  111. package/dist/SelectCreatable/types/components/Datepicker/index.d.ts +2 -0
  112. package/dist/SelectCreatable/types/components/FlexBox/FlexBox.d.ts +15 -0
  113. package/dist/SelectCreatable/types/components/FlexBox/index.d.ts +2 -0
  114. package/dist/SelectCreatable/types/components/Input/Input.d.ts +15 -0
  115. package/dist/SelectCreatable/types/components/Input/index.d.ts +2 -0
  116. package/dist/SelectCreatable/types/components/InputMeta/InputMeta.d.ts +8 -0
  117. package/dist/SelectCreatable/types/components/InputMeta/index.d.ts +2 -0
  118. package/dist/SelectCreatable/types/components/LabelText/LabelText.d.ts +8 -0
  119. package/dist/SelectCreatable/types/components/LabelText/index.d.ts +1 -0
  120. package/dist/SelectCreatable/types/components/MaskInput/MaskInput.d.ts +10 -0
  121. package/dist/SelectCreatable/types/components/MaskInput/index.d.ts +2 -0
  122. package/dist/SelectCreatable/types/components/Pagination/Pagination.d.ts +13 -0
  123. package/dist/SelectCreatable/types/components/Pagination/index.d.ts +2 -0
  124. package/dist/SelectCreatable/types/components/Pagination/utils.d.ts +1 -0
  125. package/dist/SelectCreatable/types/components/Paragraph/Paragraph.d.ts +9 -0
  126. package/dist/SelectCreatable/types/components/Paragraph/index.d.ts +2 -0
  127. package/dist/SelectCreatable/types/components/Select/Select.d.ts +10 -0
  128. package/dist/SelectCreatable/types/components/Select/SelectCreatable.d.ts +13 -0
  129. package/dist/SelectCreatable/types/components/Select/customComponents.d.ts +9 -0
  130. package/dist/SelectCreatable/types/components/Select/defaultProps.d.ts +6 -0
  131. package/dist/SelectCreatable/types/components/Select/index.d.ts +5 -0
  132. package/dist/SelectCreatable/types/components/Select/types.d.ts +4 -0
  133. package/dist/SelectCreatable/types/components/Spinner/Spinner.d.ts +18 -0
  134. package/dist/SelectCreatable/types/components/Spinner/index.d.ts +2 -0
  135. package/dist/SelectCreatable/types/components/Switcher/Switcher.d.ts +14 -0
  136. package/dist/SelectCreatable/types/components/Switcher/index.d.ts +2 -0
  137. package/dist/SelectCreatable/types/components/Tabs/Tabs.d.ts +19 -0
  138. package/dist/SelectCreatable/types/components/Tabs/index.d.ts +2 -0
  139. package/dist/SelectCreatable/types/components/Text/Text.d.ts +14 -0
  140. package/dist/SelectCreatable/types/components/Text/index.d.ts +2 -0
  141. package/dist/SelectCreatable/types/components/TextAreaInput/TextAreaInput.d.ts +10 -0
  142. package/dist/SelectCreatable/types/components/TextAreaInput/index.d.ts +2 -0
  143. package/dist/SelectCreatable/types/components/TextInput/TextInput.d.ts +9 -0
  144. package/dist/SelectCreatable/types/components/TextInput/index.d.ts +2 -0
  145. package/dist/SelectCreatable/types/components/Title/Title.d.ts +9 -0
  146. package/dist/SelectCreatable/types/components/Title/index.d.ts +2 -0
  147. package/dist/SelectCreatable/types/components/index.d.ts +32 -0
  148. package/dist/SelectCreatable/types/components/types.d.ts +24 -0
  149. package/dist/SelectCreatable/types/index.d.ts +1 -0
  150. package/dist/index.d.ts +1 -30
  151. package/dist/index.js +339 -17957
  152. package/dist/index.js.map +1 -1
  153. package/dist/types/components/Datepicker/DatePicker.d.ts +4 -0
  154. package/dist/types/components/index.d.ts +0 -7
  155. package/package.json +24 -9
  156. package/dist/index.min.js +0 -14
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import './Alert.global.css';
3
+ type AlertType = 'error' | 'warning' | 'success' | 'info';
4
+ type IconType = 'info' | 'cross' | 'error' | 'warning' | 'success';
5
+ export interface AlertProps {
6
+ type?: AlertType;
7
+ icon?: IconType | React.ReactNode;
8
+ leftBorder?: boolean;
9
+ className?: string;
10
+ onClose?: VoidFunction;
11
+ close?: boolean;
12
+ wide?: boolean;
13
+ children: React.ReactNode;
14
+ }
15
+ declare const Alert: React.FC<AlertProps>;
16
+ export default Alert;
@@ -0,0 +1,2 @@
1
+ export { default } from './Alert';
2
+ export type { AlertProps } from './Alert';
@@ -0,0 +1,12 @@
1
+ import React, { ButtonHTMLAttributes } from "react";
2
+ import type { LoadingFeedback, Sizable } from "../types";
3
+ import "./Button.global.css";
4
+ type ButtonTheme = "primary" | "secondary" | "transparent" | "light" | "danger";
5
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Partial<Sizable>, Partial<LoadingFeedback> {
6
+ className?: string;
7
+ theme?: ButtonTheme;
8
+ outline?: boolean;
9
+ wide?: boolean;
10
+ }
11
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
+ export default Button;
@@ -0,0 +1,2 @@
1
+ export { default } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,11 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import type { LoadingFeedback } from '../types';
3
+ import './Checkbox.global.css';
4
+ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement>, Partial<LoadingFeedback> {
5
+ className?: string;
6
+ label?: string;
7
+ disabled?: boolean;
8
+ partial?: boolean;
9
+ }
10
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
11
+ export default Checkbox;
@@ -0,0 +1,2 @@
1
+ export { default } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { ReactDatePickerProps } from 'react-datepicker';
3
+ import { MaskedInputProps } from 'react-text-mask';
4
+ import type { ErrorFeedback, LoadingFeedback, WithHint } from '../types';
5
+ import './DatePicker.global.css';
6
+ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback> {
7
+ label?: string;
8
+ className?: string;
9
+ showMask?: boolean;
10
+ mask?: MaskedInputProps['mask'];
11
+ onChange: ReactDatePickerProps['onChange'];
12
+ }
13
+ /** Компонент вводу дати/часу */
14
+ declare const DatePicker: React.FC<DatePickerProps>;
15
+ export default DatePicker;
@@ -0,0 +1,2 @@
1
+ export { default } from './DatePicker';
2
+ export type { DatePickerProps } from './DatePicker';
@@ -0,0 +1,15 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import './FlexBox.css';
3
+ export interface FlexBoxProps extends HTMLAttributes<HTMLElement> {
4
+ className?: string;
5
+ tagName?: keyof HTMLElementTagNameMap;
6
+ direction?: React.CSSProperties['flexDirection'];
7
+ gap?: number;
8
+ grow?: React.CSSProperties['flexGrow'];
9
+ shrink?: React.CSSProperties['flexShrink'];
10
+ wrap?: React.CSSProperties['flexWrap'];
11
+ align?: React.CSSProperties['alignItems'];
12
+ justify?: React.CSSProperties['justifyContent'];
13
+ }
14
+ declare const FlexBox: React.ForwardRefExoticComponent<FlexBoxProps & React.RefAttributes<HTMLElement>>;
15
+ export default FlexBox;
@@ -0,0 +1,2 @@
1
+ export { default } from './FlexBox';
2
+ export type { FlexBoxProps } from './FlexBox';
@@ -0,0 +1,15 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import type { ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
3
+ import './Input.global.css';
4
+ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback> {
5
+ className?: string;
6
+ disabled?: boolean;
7
+ required?: boolean;
8
+ wide?: boolean;
9
+ startElement?: string | React.ReactElement;
10
+ endElement?: string | React.ReactElement;
11
+ labelProps?: InputHTMLAttributes<HTMLLabelElement>;
12
+ children: React.ReactHTMLElement<HTMLInputElement> | React.ReactElement | JSX.Element[];
13
+ }
14
+ export declare const Input: React.FC<InputProps>;
15
+ export default Input;
@@ -0,0 +1,2 @@
1
+ export { default } from './Input';
2
+ export type { InputProps } from './Input';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { ErrorFeedback, WithHint } from '../types';
3
+ import './InputMeta.global.css';
4
+ export interface InputMetaProps extends Partial<WithHint & ErrorFeedback> {
5
+ className?: string;
6
+ }
7
+ declare const InputMeta: React.FC<InputMetaProps>;
8
+ export default InputMeta;
@@ -0,0 +1,2 @@
1
+ export { default } from './InputMeta';
2
+ export type { InputMetaProps } from './InputMeta';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './LabelText.global.css';
3
+ export interface LabelTextProps {
4
+ className?: string;
5
+ children?: string;
6
+ }
7
+ declare const LabelText: React.FC<LabelTextProps>;
8
+ export default LabelText;
@@ -0,0 +1 @@
1
+ export { default } from './LabelText';
@@ -0,0 +1,10 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import { MaskedInputProps } from 'react-text-mask';
3
+ import { InputProps } from '../Input';
4
+ import './MaskInput.global.css';
5
+ export interface MaskInputProps extends MaskedInputProps, Omit<InputProps, 'children'> {
6
+ inputClassName?: string;
7
+ labelProps?: InputHTMLAttributes<HTMLLabelElement>;
8
+ }
9
+ declare const MaskInput: React.FC<MaskInputProps>;
10
+ export default MaskInput;
@@ -0,0 +1,2 @@
1
+ export { default } from './MaskInput';
2
+ export type { MaskInputProps } from './MaskInput';
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import './Pagination.global.css';
3
+ export interface PaginationProps {
4
+ className?: string;
5
+ initPage?: number;
6
+ total?: number;
7
+ hideOnSinglePage?: boolean;
8
+ onChange?: (page: number) => void;
9
+ current?: number;
10
+ scrollOnChange?: boolean;
11
+ }
12
+ declare const Pagination: React.FC<PaginationProps>;
13
+ export default Pagination;
@@ -0,0 +1,2 @@
1
+ export { default } from './Pagination';
2
+ export type { PaginationProps } from './Pagination';
@@ -0,0 +1 @@
1
+ export declare const composePaginationSteps: (total: number, current: number) => Array<number[] | number>;
@@ -0,0 +1,9 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { EllipsisText } from '../types';
3
+ import './Paragraph.global.css';
4
+ export interface ParagraphProps extends EllipsisText, HTMLAttributes<HTMLParagraphElement> {
5
+ className?: string;
6
+ children: React.ReactNode;
7
+ }
8
+ declare const Paragraph: React.ForwardRefExoticComponent<ParagraphProps & React.RefAttributes<HTMLParagraphElement>>;
9
+ export default Paragraph;
@@ -0,0 +1,2 @@
1
+ export { default } from './Paragraph';
2
+ export type { ParagraphProps } from './Paragraph';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { Props as ReactSelectProps } from 'react-select';
3
+ import type { ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import './Select.global.css';
5
+ export interface SelectProps extends ReactSelectProps, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback> {
6
+ wide?: boolean;
7
+ dataQa?: string;
8
+ }
9
+ declare const Select: React.FC<SelectProps>;
10
+ export default Select;
@@ -0,0 +1,13 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import { CreatableProps } from 'react-select/creatable';
3
+ import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
+ import type { ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
5
+ import { Option } from './types';
6
+ import './Select.global.css';
7
+ export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback> {
8
+ wide?: boolean;
9
+ labelProps?: InputHTMLAttributes<HTMLLabelElement>;
10
+ dataQa?: string;
11
+ }
12
+ declare const SelectCreatable: React.FC<SelectCreatableProps>;
13
+ export default SelectCreatable;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ClearIndicatorProps, DropdownIndicatorProps } from 'react-select';
3
+ declare const _default: {
4
+ DropdownIndicator: (props: DropdownIndicatorProps<unknown, boolean, import("react-select").GroupBase<unknown>>) => React.JSX.Element;
5
+ LoadingIndicator: () => React.JSX.Element;
6
+ IndicatorSeparator: () => null;
7
+ ClearIndicator: (props: ClearIndicatorProps<unknown, boolean, import("react-select").GroupBase<unknown>>) => React.JSX.Element;
8
+ };
9
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ noOptionsMessageDefault: () => React.ReactNode;
4
+ loadingMessageDefault: () => React.ReactNode;
5
+ };
6
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export { default } from './Select';
2
+ export type { SelectProps } from './Select';
3
+ export { default as SelectCreatable } from './SelectCreatable';
4
+ export type { SelectCreatableProps } from './SelectCreatable';
5
+ export type { Option } from './types';
@@ -0,0 +1,4 @@
1
+ export interface Option {
2
+ readonly label: string;
3
+ readonly value: string;
4
+ }
@@ -0,0 +1,18 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import './Spinner.global.css';
3
+ export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /**
5
+ * CSS color #fff - default
6
+ */
7
+ color?: string;
8
+ /**
9
+ * CSS width values like 10em | 10px | 50%
10
+ */
11
+ width?: React.CSSProperties['width'];
12
+ /**
13
+ * CSS height values like 10em | 10px | 50%
14
+ */
15
+ height?: React.CSSProperties['height'];
16
+ }
17
+ declare const Spinner: React.FC<SpinnerProps>;
18
+ export default Spinner;
@@ -0,0 +1,2 @@
1
+ export { default } from './Spinner';
2
+ export type { SpinnerProps } from './Spinner';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import './Switcher.global.css';
3
+ export interface SwitcherProps {
4
+ className?: string;
5
+ color?: string;
6
+ size?: string | number;
7
+ checked?: boolean;
8
+ onChecked?: (checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
9
+ disabled?: boolean;
10
+ defaultChecked?: boolean;
11
+ lazy?: boolean;
12
+ }
13
+ declare const Switcher: React.ForwardRefExoticComponent<SwitcherProps & React.RefAttributes<HTMLInputElement>>;
14
+ export default Switcher;
@@ -0,0 +1,2 @@
1
+ export { default } from './Switcher';
2
+ export type { SwitcherProps } from './Switcher';
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import './Tabs.global.css';
3
+ export interface Tab<T> {
4
+ key: T;
5
+ children: React.ReactNode;
6
+ label: string | React.ReactNode;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+ export interface TabsProps<T> {
11
+ items: Tab<T>[];
12
+ activeTab?: T;
13
+ defaultActiveKey?: T;
14
+ onChange?: (key: T) => void;
15
+ className?: string;
16
+ isPending?: boolean;
17
+ }
18
+ declare const Tabs: <T extends string>({ onChange, items, defaultActiveKey, activeTab, className, isPending, }: TabsProps<T>) => React.JSX.Element;
19
+ export default Tabs;
@@ -0,0 +1,2 @@
1
+ export { default } from './Tabs';
2
+ export type { Tab, TabsProps } from './Tabs';
@@ -0,0 +1,14 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { EllipsisText, TextType } from '../types';
3
+ import './Text.global.css';
4
+ export interface TextProps extends HTMLAttributes<HTMLSpanElement>, EllipsisText {
5
+ type?: TextType;
6
+ code?: boolean;
7
+ underline?: boolean;
8
+ del?: boolean;
9
+ strong?: boolean;
10
+ className?: string;
11
+ required?: boolean;
12
+ }
13
+ declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
14
+ export default Text;
@@ -0,0 +1,2 @@
1
+ export { default } from './Text';
2
+ export type { TextProps } from './Text';
@@ -0,0 +1,10 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import { TextareaAutosizeProps } from 'react-textarea-autosize';
3
+ import { InputProps } from '../Input';
4
+ import './TextAreaInput.global.css';
5
+ export interface TextAreaInputProps extends TextareaAutosizeProps, Omit<InputProps, 'children'> {
6
+ textareaClassName?: string;
7
+ labelProps?: InputHTMLAttributes<HTMLLabelElement>;
8
+ }
9
+ declare const TextAreaInput: React.ForwardRefExoticComponent<TextAreaInputProps & React.RefAttributes<HTMLTextAreaElement>>;
10
+ export default TextAreaInput;
@@ -0,0 +1,2 @@
1
+ export { default } from './TextAreaInput';
2
+ export type { TextAreaInputProps } from './TextAreaInput';
@@ -0,0 +1,9 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import type { InputProps } from '../Input';
3
+ import './TextInput.global.css';
4
+ export interface TextInputProps extends InputHTMLAttributes<HTMLInputElement>, Omit<InputProps, 'children'> {
5
+ inputClassName?: string;
6
+ labelProps?: InputHTMLAttributes<HTMLLabelElement>;
7
+ }
8
+ export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
9
+ export default TextInput;
@@ -0,0 +1,2 @@
1
+ export { default } from './TextInput';
2
+ export type { TextInputProps } from './TextInput';
@@ -0,0 +1,9 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import type { EllipsisText } from '../types';
3
+ import './Title.global.css';
4
+ export interface TitleProps extends EllipsisText, HTMLAttributes<HTMLHeadingElement> {
5
+ level?: 1 | 2 | 3 | 4 | 5;
6
+ className?: string;
7
+ }
8
+ export declare const Title: React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLHeadingElement>>;
9
+ export default Title;
@@ -0,0 +1,2 @@
1
+ export { default } from './Title';
2
+ export type { TitleProps } from './Title';
@@ -0,0 +1,32 @@
1
+ export { default as FlexBox } from './FlexBox';
2
+ export type { FlexBoxProps } from './FlexBox';
3
+ export { default as Button } from './Button';
4
+ export type { ButtonProps } from './Button';
5
+ export { default as Input } from './Input';
6
+ export type { InputProps } from './Input';
7
+ export { default as InputMeta } from './InputMeta';
8
+ export type { InputMetaProps } from './InputMeta';
9
+ export { default as MaskInput } from './MaskInput';
10
+ export type { MaskInputProps } from './MaskInput';
11
+ export { default as Pagination } from './Pagination';
12
+ export type { PaginationProps } from './Pagination';
13
+ export { default as TextInput } from './TextInput';
14
+ export type { TextInputProps } from './TextInput';
15
+ export { default as Text } from './Text';
16
+ export type { TextProps } from './Text';
17
+ export { default as Title } from './Title';
18
+ export type { TitleProps } from './Title';
19
+ export { default as Paragraph } from './Paragraph';
20
+ export type { ParagraphProps } from './Paragraph';
21
+ export { default as TextAreaInput } from './TextAreaInput';
22
+ export type { TextAreaInputProps } from './TextAreaInput';
23
+ export { default as Alert } from './Alert';
24
+ export type { AlertProps } from './Alert';
25
+ export { default as Spinner } from './Spinner';
26
+ export type { SpinnerProps } from './Spinner';
27
+ export { default as Switcher } from './Switcher';
28
+ export type { SwitcherProps } from './Switcher';
29
+ export { default as Tabs } from './Tabs';
30
+ export type { TabsProps } from './Tabs';
31
+ export { default as Checkbox } from './Checkbox';
32
+ export type { CheckboxProps } from './Checkbox';
@@ -0,0 +1,24 @@
1
+ export interface Sizable {
2
+ size: 'sm' | 'md' | 'lg';
3
+ }
4
+ export type TextType = 'secondary' | 'success' | 'warning' | 'danger' | 'default' | 'link' | 'likeLink';
5
+ export interface LoadingFeedback {
6
+ /** індикатор процесу */
7
+ loading: boolean;
8
+ }
9
+ export interface ErrorFeedback {
10
+ /** для виведення тексту помилки */
11
+ error: string;
12
+ }
13
+ export interface WithLabel {
14
+ /** Лейбл для інпуту */
15
+ label: string;
16
+ }
17
+ export interface WithHint {
18
+ /** для виведення тексту підсказки */
19
+ hint: string;
20
+ }
21
+ export interface EllipsisText {
22
+ /** для скорочення тексту і виведення 3 точок */
23
+ ellipsis?: boolean;
24
+ }
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,34 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import { CreatableProps } from 'react-select/creatable';
3
+ import { GroupBase } from 'react-select/dist/declarations/src/types';
4
+
5
+ interface LoadingFeedback {
6
+ /** індикатор процесу */
7
+ loading: boolean;
8
+ }
9
+ interface ErrorFeedback {
10
+ /** для виведення тексту помилки */
11
+ error: string;
12
+ }
13
+ interface WithLabel {
14
+ /** Лейбл для інпуту */
15
+ label: string;
16
+ }
17
+ interface WithHint {
18
+ /** для виведення тексту підсказки */
19
+ hint: string;
20
+ }
21
+
22
+ interface Option {
23
+ readonly label: string;
24
+ readonly value: string;
25
+ }
26
+
27
+ interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback> {
28
+ wide?: boolean;
29
+ labelProps?: InputHTMLAttributes<HTMLLabelElement>;
30
+ dataQa?: string;
31
+ }
32
+ declare const SelectCreatable: React.FC<SelectCreatableProps>;
33
+
34
+ export { type SelectCreatableProps, SelectCreatable as default };