@vchasno/ui-kit 0.3.33 → 0.3.34

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 (60) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Datepicker/index.cjs.js +4 -3
  3. package/dist/Datepicker/index.cjs.js.map +1 -1
  4. package/dist/Datepicker/index.d.ts +6 -1
  5. package/dist/Datepicker/index.js +4 -3
  6. package/dist/Datepicker/index.js.map +1 -1
  7. package/dist/Datepicker/types/components/Datepicker/DatePicker.d.ts +3 -2
  8. package/dist/Datepicker/types/components/Input/Input.d.ts +2 -3
  9. package/dist/Datepicker/types/components/Select/Select.d.ts +2 -2
  10. package/dist/Datepicker/types/components/Select/SelectCreatable.d.ts +2 -2
  11. package/dist/Datepicker/types/components/types.d.ts +4 -0
  12. package/dist/Menu/types/components/Datepicker/DatePicker.d.ts +3 -2
  13. package/dist/Menu/types/components/Input/Input.d.ts +2 -3
  14. package/dist/Menu/types/components/Select/Select.d.ts +2 -2
  15. package/dist/Menu/types/components/Select/SelectCreatable.d.ts +2 -2
  16. package/dist/Menu/types/components/types.d.ts +4 -0
  17. package/dist/ProjectsPopover/types/components/Datepicker/DatePicker.d.ts +3 -2
  18. package/dist/ProjectsPopover/types/components/Input/Input.d.ts +2 -3
  19. package/dist/ProjectsPopover/types/components/Select/Select.d.ts +2 -2
  20. package/dist/ProjectsPopover/types/components/Select/SelectCreatable.d.ts +2 -2
  21. package/dist/ProjectsPopover/types/components/types.d.ts +4 -0
  22. package/dist/Select/index.cjs.js +2 -2
  23. package/dist/Select/index.cjs.js.map +1 -1
  24. package/dist/Select/index.d.ts +5 -1
  25. package/dist/Select/index.js +2 -2
  26. package/dist/Select/index.js.map +1 -1
  27. package/dist/Select/types/components/Datepicker/DatePicker.d.ts +3 -2
  28. package/dist/Select/types/components/Input/Input.d.ts +2 -3
  29. package/dist/Select/types/components/Select/Select.d.ts +2 -2
  30. package/dist/Select/types/components/Select/SelectCreatable.d.ts +2 -2
  31. package/dist/Select/types/components/types.d.ts +4 -0
  32. package/dist/SelectCreatable/index.cjs.js +2 -2
  33. package/dist/SelectCreatable/index.cjs.js.map +1 -1
  34. package/dist/SelectCreatable/index.d.ts +5 -1
  35. package/dist/SelectCreatable/index.js +2 -2
  36. package/dist/SelectCreatable/index.js.map +1 -1
  37. package/dist/SelectCreatable/types/components/Datepicker/DatePicker.d.ts +3 -2
  38. package/dist/SelectCreatable/types/components/Input/Input.d.ts +2 -3
  39. package/dist/SelectCreatable/types/components/Select/Select.d.ts +2 -2
  40. package/dist/SelectCreatable/types/components/Select/SelectCreatable.d.ts +2 -2
  41. package/dist/SelectCreatable/types/components/types.d.ts +4 -0
  42. package/dist/Snackbar/index.cjs.js +2 -2
  43. package/dist/Snackbar/index.cjs.js.map +1 -1
  44. package/dist/Snackbar/index.js +2 -2
  45. package/dist/Snackbar/index.js.map +1 -1
  46. package/dist/Snackbar/types/components/Datepicker/DatePicker.d.ts +3 -2
  47. package/dist/Snackbar/types/components/Input/Input.d.ts +2 -3
  48. package/dist/Snackbar/types/components/Select/Select.d.ts +2 -2
  49. package/dist/Snackbar/types/components/Select/SelectCreatable.d.ts +2 -2
  50. package/dist/Snackbar/types/components/types.d.ts +4 -0
  51. package/dist/css/DatePicker.global.css +4 -0
  52. package/dist/index.d.ts +5 -2
  53. package/dist/index.js +4 -4
  54. package/dist/index.js.map +1 -1
  55. package/dist/types/components/Datepicker/DatePicker.d.ts +3 -2
  56. package/dist/types/components/Input/Input.d.ts +2 -3
  57. package/dist/types/components/Select/Select.d.ts +2 -2
  58. package/dist/types/components/Select/SelectCreatable.d.ts +2 -2
  59. package/dist/types/components/types.d.ts +4 -0
  60. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { ReactDatePickerProps } from 'react-datepicker';
3
3
  import { MaskedInputProps } from 'react-text-mask';
4
- import type { DataQa, ErrorFeedback, LoadingFeedback, WithHint } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint } from '../types';
5
5
  import './DatePicker.global.css';
6
- export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa> {
6
+ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta> {
7
7
  label?: string;
8
8
  className?: string;
9
9
  showMask?: boolean;
@@ -11,6 +11,7 @@ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFe
11
11
  onChange: ReactDatePickerProps['onChange'];
12
12
  isClearable?: ReactDatePickerProps['isClearable'];
13
13
  dateFormat?: ReactDatePickerProps['dateFormat'];
14
+ wide?: boolean;
14
15
  }
15
16
  /**
16
17
  * @see <https://reactdatepicker.com/>
@@ -1,7 +1,7 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
- import type { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
2
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
3
3
  import './Input.global.css';
4
- export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
4
+ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
5
5
  className?: string;
6
6
  disabled?: boolean;
7
7
  required?: boolean;
@@ -9,7 +9,6 @@ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedba
9
9
  startElement?: string | React.ReactElement;
10
10
  endElement?: string | React.ReactElement;
11
11
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
12
- hideEmptyMeta?: boolean;
13
12
  children: React.ReactHTMLElement<HTMLInputElement> | React.ReactElement | JSX.Element[];
14
13
  }
15
14
  export declare const Input: React.FC<InputProps>;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Props as ReactSelectProps } from 'react-select';
3
3
  import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
5
5
  import { Option } from './types';
6
6
  import './Select.global.css';
7
7
  export type SelectOption = Option;
8
- export interface SelectProps extends ReactSelectProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
8
+ export interface SelectProps extends ReactSelectProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
9
9
  wide?: boolean;
10
10
  }
11
11
  declare const Select: React.FC<SelectProps>;
@@ -1,11 +1,11 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { CreatableProps } from 'react-select/creatable';
3
3
  import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
5
5
  import { Option } from './types';
6
6
  import './Select.global.css';
7
7
  export type SelectOption = Option;
8
- export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
8
+ export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
9
9
  wide?: boolean;
10
10
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
11
11
  }
@@ -26,6 +26,10 @@ export interface DataQa {
26
26
  /** для тестування */
27
27
  dataQa?: string;
28
28
  }
29
+ export interface HideEmptyMeta {
30
+ /** приховувати пустий блок під інпутом - якщо не має повідомлень щоб не займав місце */
31
+ hideEmptyMeta?: boolean;
32
+ }
29
33
  export interface TextAlign {
30
34
  /** для центрування тексту **/
31
35
  textAlign?: 'center' | 'start' | 'end' | 'justify';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { ReactDatePickerProps } from 'react-datepicker';
3
3
  import { MaskedInputProps } from 'react-text-mask';
4
- import type { DataQa, ErrorFeedback, LoadingFeedback, WithHint } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint } from '../types';
5
5
  import './DatePicker.global.css';
6
- export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa> {
6
+ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta> {
7
7
  label?: string;
8
8
  className?: string;
9
9
  showMask?: boolean;
@@ -11,6 +11,7 @@ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFe
11
11
  onChange: ReactDatePickerProps['onChange'];
12
12
  isClearable?: ReactDatePickerProps['isClearable'];
13
13
  dateFormat?: ReactDatePickerProps['dateFormat'];
14
+ wide?: boolean;
14
15
  }
15
16
  /**
16
17
  * @see <https://reactdatepicker.com/>
@@ -1,7 +1,7 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
- import type { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
2
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
3
3
  import './Input.global.css';
4
- export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
4
+ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
5
5
  className?: string;
6
6
  disabled?: boolean;
7
7
  required?: boolean;
@@ -9,7 +9,6 @@ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedba
9
9
  startElement?: string | React.ReactElement;
10
10
  endElement?: string | React.ReactElement;
11
11
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
12
- hideEmptyMeta?: boolean;
13
12
  children: React.ReactHTMLElement<HTMLInputElement> | React.ReactElement | JSX.Element[];
14
13
  }
15
14
  export declare const Input: React.FC<InputProps>;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Props as ReactSelectProps } from 'react-select';
3
3
  import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
5
5
  import { Option } from './types';
6
6
  import './Select.global.css';
7
7
  export type SelectOption = Option;
8
- export interface SelectProps extends ReactSelectProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
8
+ export interface SelectProps extends ReactSelectProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
9
9
  wide?: boolean;
10
10
  }
11
11
  declare const Select: React.FC<SelectProps>;
@@ -1,11 +1,11 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { CreatableProps } from 'react-select/creatable';
3
3
  import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
5
5
  import { Option } from './types';
6
6
  import './Select.global.css';
7
7
  export type SelectOption = Option;
8
- export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
8
+ export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
9
9
  wide?: boolean;
10
10
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
11
11
  }
@@ -26,6 +26,10 @@ export interface DataQa {
26
26
  /** для тестування */
27
27
  dataQa?: string;
28
28
  }
29
+ export interface HideEmptyMeta {
30
+ /** приховувати пустий блок під інпутом - якщо не має повідомлень щоб не займав місце */
31
+ hideEmptyMeta?: boolean;
32
+ }
29
33
  export interface TextAlign {
30
34
  /** для центрування тексту **/
31
35
  textAlign?: 'center' | 'start' | 'end' | 'justify';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { ReactDatePickerProps } from 'react-datepicker';
3
3
  import { MaskedInputProps } from 'react-text-mask';
4
- import type { DataQa, ErrorFeedback, LoadingFeedback, WithHint } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint } from '../types';
5
5
  import './DatePicker.global.css';
6
- export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa> {
6
+ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta> {
7
7
  label?: string;
8
8
  className?: string;
9
9
  showMask?: boolean;
@@ -11,6 +11,7 @@ export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFe
11
11
  onChange: ReactDatePickerProps['onChange'];
12
12
  isClearable?: ReactDatePickerProps['isClearable'];
13
13
  dateFormat?: ReactDatePickerProps['dateFormat'];
14
+ wide?: boolean;
14
15
  }
15
16
  /**
16
17
  * @see <https://reactdatepicker.com/>
@@ -1,7 +1,7 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
- import type { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
2
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
3
3
  import './Input.global.css';
4
- export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
4
+ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
5
5
  className?: string;
6
6
  disabled?: boolean;
7
7
  required?: boolean;
@@ -9,7 +9,6 @@ export interface InputProps extends Partial<WithLabel & WithHint & LoadingFeedba
9
9
  startElement?: string | React.ReactElement;
10
10
  endElement?: string | React.ReactElement;
11
11
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
12
- hideEmptyMeta?: boolean;
13
12
  children: React.ReactHTMLElement<HTMLInputElement> | React.ReactElement | JSX.Element[];
14
13
  }
15
14
  export declare const Input: React.FC<InputProps>;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Props as ReactSelectProps } from 'react-select';
3
3
  import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
5
5
  import { Option } from './types';
6
6
  import './Select.global.css';
7
7
  export type SelectOption = Option;
8
- export interface SelectProps extends ReactSelectProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
8
+ export interface SelectProps extends ReactSelectProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
9
9
  wide?: boolean;
10
10
  }
11
11
  declare const Select: React.FC<SelectProps>;
@@ -1,11 +1,11 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { CreatableProps } from 'react-select/creatable';
3
3
  import type { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { DataQa, ErrorFeedback, LoadingFeedback, WithHint, WithLabel } from '../types';
4
+ import { DataQa, ErrorFeedback, HideEmptyMeta, LoadingFeedback, WithHint, WithLabel } from '../types';
5
5
  import { Option } from './types';
6
6
  import './Select.global.css';
7
7
  export type SelectOption = Option;
8
- export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa> {
8
+ export interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
9
9
  wide?: boolean;
10
10
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
11
11
  }
@@ -26,6 +26,10 @@ export interface DataQa {
26
26
  /** для тестування */
27
27
  dataQa?: string;
28
28
  }
29
+ export interface HideEmptyMeta {
30
+ /** приховувати пустий блок під інпутом - якщо не має повідомлень щоб не займав місце */
31
+ hideEmptyMeta?: boolean;
32
+ }
29
33
  export interface TextAlign {
30
34
  /** для центрування тексту **/
31
35
  textAlign?: 'center' | 'start' | 'end' | 'justify';
@@ -7787,7 +7787,7 @@ styleInject(css_248z);
7787
7787
  var Select = function (_a) {
7788
7788
  var className = _a.className, label = _a.label, hint = _a.hint, wide = _a.wide, required = _a.required, loading = _a.loading, isDisabled = _a.isDisabled, _b = _a.menuPlacement, menuPlacement = _b === void 0 ? 'auto' : _b, _c = _a.noOptionsMessage, noOptionsMessage = _c === void 0 ? defaultProps.noOptionsMessageDefault : _c, _d = _a.loadingMessage, loadingMessage = _d === void 0 ? defaultProps.loadingMessageDefault : _d, _e = _a.placeholder, placeholder = _e === void 0 ? ' ' : _e, //need "space" for correct label working
7789
7789
  _f = _a.components, //need "space" for correct label working
7790
- components = _f === void 0 ? {} : _f, _g = _a.error, error = _g === void 0 ? '' : _g, dataQa = _a.dataQa, _h = _a.closeMenuOnSelect, closeMenuOnSelect = _h === void 0 ? true : _h, rest = __rest(_a, ["className", "label", "hint", "wide", "required", "loading", "isDisabled", "menuPlacement", "noOptionsMessage", "loadingMessage", "placeholder", "components", "error", "dataQa", "closeMenuOnSelect"]);
7790
+ components = _f === void 0 ? {} : _f, _g = _a.error, error = _g === void 0 ? '' : _g, dataQa = _a.dataQa, _h = _a.closeMenuOnSelect, closeMenuOnSelect = _h === void 0 ? true : _h, _j = _a.hideEmptyMeta, hideEmptyMeta = _j === void 0 ? false : _j, rest = __rest(_a, ["className", "label", "hint", "wide", "required", "loading", "isDisabled", "menuPlacement", "noOptionsMessage", "loadingMessage", "placeholder", "components", "error", "dataQa", "closeMenuOnSelect", "hideEmptyMeta"]);
7791
7791
  return (React.createElement("label", { "data-qa": dataQa, className: cn('vchasno-ui-select', {
7792
7792
  '--required': required,
7793
7793
  '--disabled': isDisabled,
@@ -7796,7 +7796,7 @@ var Select = function (_a) {
7796
7796
  }, className) },
7797
7797
  label && React.createElement(Label, { label: label }),
7798
7798
  React.createElement(StateManagedSelect$1, __assign({ required: required, isLoading: loading, components: __assign(__assign({}, CustomComponents), components), closeMenuOnSelect: closeMenuOnSelect, classNamePrefix: "vchasno-ui-select", menuPlacement: menuPlacement, isDisabled: isDisabled, noOptionsMessage: noOptionsMessage, loadingMessage: loadingMessage, placeholder: placeholder }, rest, { styles: __assign(__assign({}, composeStyles), rest.styles) })),
7799
- React.createElement(InputMeta, { hint: hint, error: error })));
7799
+ hideEmptyMeta && !error && !hint ? null : React.createElement(InputMeta, { hint: hint, error: error })));
7800
7800
  };
7801
7801
  var SelectComponents = components;
7802
7802