prometeo-design-system 2.6.7 → 2.7.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 (49) hide show
  1. package/dist/{Button-DsbEyjth.js → Button-CvBWH1HX.js} +8 -8
  2. package/dist/Button.es.js +1 -1
  3. package/dist/ButtonV2.d.ts +6 -0
  4. package/dist/ButtonV2.es.js +217 -0
  5. package/dist/CheckboxFormik.es.js +10 -10
  6. package/dist/DatePicker.es.js +2 -2
  7. package/dist/DrawerDesktop.es.js +1 -1
  8. package/dist/DropZone.es.js +5 -5
  9. package/dist/FAButton.es.js +1 -1
  10. package/dist/Header.es.js +11 -11
  11. package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-DKzJg3un.js} +1 -1
  12. package/dist/ImageGallery.es.js +1 -1
  13. package/dist/Input-BTsR-vNF.js +281 -0
  14. package/dist/Input.es.js +1 -1
  15. package/dist/InputFormikV2.es.js +1 -1
  16. package/dist/Pagination.es.js +8 -8
  17. package/dist/ProfilePictureUpload.es.js +3 -3
  18. package/dist/Select-BQMdfu1n.js +1003 -0
  19. package/dist/Select.es.js +1 -1
  20. package/dist/SelectFormik.es.js +1 -1
  21. package/dist/SelectFormikLegacy.es.js +14 -14
  22. package/dist/SelectSearch.es.js +66 -63
  23. package/dist/TabLinks.es.js +8 -8
  24. package/dist/TextArea.es.js +28 -26
  25. package/dist/Toast.es.js +1 -1
  26. package/dist/components/Button/ButtonV2.d.ts +23 -0
  27. package/dist/components/Header/Header.d.ts +2 -1
  28. package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +29 -3
  29. package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +2 -1
  30. package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +9 -3
  31. package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +28 -1
  32. package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +1 -0
  33. package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +2 -1
  34. package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +13 -2
  35. package/dist/components/RecurrentDatePicker/recurrentDatePicker.validations.d.ts +69 -0
  36. package/dist/components/Select/Select.d.ts +18 -0
  37. package/dist/components/TextArea/TextArea.d.ts +2 -1
  38. package/dist/exports/ButtonV2.d.ts +2 -0
  39. package/dist/index.d.ts +3 -0
  40. package/dist/preview/ButtonPreview.d.ts +2 -0
  41. package/dist/preview/SelectPreview/SelectGroupedOptionsPreview.d.ts +2 -0
  42. package/dist/prometeo-design-system.css +1 -1
  43. package/dist/prometeo-design-system.es.js +21 -19
  44. package/package.json +5 -2
  45. package/src/styles/intellisense.css +2 -1
  46. package/dist/Input-i6OzjjFo.js +0 -280
  47. package/dist/Select-D3aU7dXF.js +0 -812
  48. package/dist/components/Drawer/DrawerDesktop_old.d.ts +0 -15
  49. package/dist/components/Drawer/DrawerMobile_old.d.ts +0 -18
@@ -1,10 +1,21 @@
1
+ type monthValue = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
1
2
  export interface YearlyFrequencySettingsValue {
2
3
  month: number;
3
4
  day?: number;
4
5
  }
6
+ export interface YearlyFrequencySettingsErrors {
7
+ month?: string;
8
+ day?: string;
9
+ }
5
10
  interface YearlyFrequencySettingsProps {
6
11
  value?: YearlyFrequencySettingsValue;
7
- onChange: (value: YearlyFrequencySettingsValue) => void;
12
+ onChange: (delta: YearlyFequencyValueDelta) => void;
13
+ errors?: YearlyFrequencySettingsErrors;
14
+ }
15
+ export interface YearlyFequencyValueDelta {
16
+ kind: 'setMonth' | 'setDay';
17
+ newMonth?: monthValue;
18
+ newDay?: number;
8
19
  }
9
- declare const YearlyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: YearlyFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
20
+ declare const YearlyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange, errors }: YearlyFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
10
21
  export default YearlyFrequencySettings;
@@ -0,0 +1,69 @@
1
+ import { RecurrentDatePickerValue, RecurrentDatePickerErrors } from './RecurrentDatePicker';
2
+ export declare const dataValidations: {
3
+ weekly: {
4
+ weekDay: {
5
+ required: boolean;
6
+ type: string;
7
+ enum: string[];
8
+ minLength: number;
9
+ maxLength: number;
10
+ };
11
+ };
12
+ monthly: {
13
+ type: {
14
+ relative: {
15
+ dayOrder: {
16
+ required: boolean;
17
+ type: string;
18
+ enum: string[];
19
+ };
20
+ weekDay: {
21
+ required: boolean;
22
+ type: string;
23
+ enum: string[];
24
+ };
25
+ };
26
+ absolute: {
27
+ day: {
28
+ required: boolean;
29
+ type: string;
30
+ };
31
+ };
32
+ };
33
+ };
34
+ yearly: {
35
+ month: {
36
+ required: boolean;
37
+ type: string;
38
+ min: number;
39
+ max: number;
40
+ };
41
+ day: {
42
+ required: boolean;
43
+ type: string;
44
+ };
45
+ };
46
+ custom: {
47
+ frequency: {
48
+ monthly: {
49
+ dayOfMonth: {
50
+ required: boolean;
51
+ type: string;
52
+ };
53
+ };
54
+ weekly: {
55
+ weekDays: {
56
+ required: boolean;
57
+ type: string;
58
+ enum: string[];
59
+ };
60
+ };
61
+ };
62
+ interval: {
63
+ required: boolean;
64
+ type: string;
65
+ };
66
+ };
67
+ };
68
+ export declare const validateRecurrentDatePickerValue: (value: RecurrentDatePickerValue) => RecurrentDatePickerErrors;
69
+ export declare const isRecurrentDatePickerValid: (value: RecurrentDatePickerValue) => boolean;
@@ -6,6 +6,10 @@ export type SelectOptionType = {
6
6
  label: string;
7
7
  value: string | number;
8
8
  id: string | number;
9
+ isGroupHeader?: boolean;
10
+ groupLabelNode?: React.ReactNode;
11
+ groupData?: unknown;
12
+ originalOption?: unknown;
9
13
  };
10
14
  export type CustomSelectionDisplayProps<T> = {
11
15
  selectedOptions: T[];
@@ -29,6 +33,18 @@ export interface CustomSelectOptionRendererProps<T, TContext = unknown> extends
29
33
  isLoading?: boolean;
30
34
  renderContext?: TContext;
31
35
  }
36
+ export interface CustomSelectOptionGroupHeaderProps<T, TContext = unknown> {
37
+ group: T;
38
+ label: React.ReactNode | string;
39
+ groupOptions: T[];
40
+ groupSelectedIds: string[];
41
+ multiple: boolean;
42
+ disabled?: boolean;
43
+ expanded: boolean;
44
+ toggleGroup: (nextExpanded?: boolean) => void;
45
+ selectGroup: (mode?: 'toggle' | 'select' | 'deselect') => void;
46
+ renderContext?: TContext;
47
+ }
32
48
  export type SelectVariant = "default" | "error" | "success";
33
49
  export type SelectControlsHandler = {
34
50
  open: () => void;
@@ -50,6 +66,7 @@ export interface DropdownOptionsProps {
50
66
  isLoading?: boolean;
51
67
  footer?: React.ReactNode;
52
68
  loadingComponent?: React.ReactNode;
69
+ enableGroupToggle?: boolean;
53
70
  }
54
71
  export interface BaseSelectProps<T, TContext = unknown> {
55
72
  id?: string;
@@ -59,6 +76,7 @@ export interface BaseSelectProps<T, TContext = unknown> {
59
76
  optionLabel: OptionAccessor<T, string>;
60
77
  optionValue: OptionAccessor<T, string | number>;
61
78
  renderOption?: ComponentType<CustomSelectOptionRendererProps<T, TContext>>;
79
+ renderOptionGroupHeader?: ComponentType<CustomSelectOptionGroupHeaderProps<T, TContext>>;
62
80
  renderSelection?: ComponentType<CustomSelectionDisplayProps<T>>;
63
81
  renderOptionContext?: TContext;
64
82
  disabled?: boolean;
@@ -9,6 +9,7 @@ export interface TextAreaProps {
9
9
  value?: string;
10
10
  placeholder?: string;
11
11
  rows?: number;
12
+ disabled?: boolean;
12
13
  }
13
- declare function TextArea({ className, autoResize, userResize, minRows, maxRows, placeholder, onChange, value, rows, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function TextArea({ className, autoResize, userResize, minRows, maxRows, placeholder, onChange, value, rows, disabled }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
14
15
  export default TextArea;
@@ -0,0 +1,2 @@
1
+ export { default } from '../components/Button/ButtonV2';
2
+ export type { ButtonProps } from '../components/Button/ButtonV2';
package/dist/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export { default as FAButton } from './components/FAB/FAButton';
41
41
  export { default as InputFormikV2 } from './components/InputFormik/InputFormikV2';
42
42
  export { default as RadioButtonFormik } from './components/RadioButtonFormik/RadioButtonFormik';
43
43
  export { default as RadioButton } from './components/RadioButton/RadioButton';
44
+ export { default as ButtonV2 } from './components/Button/ButtonV2';
44
45
  export * from './components/Sidebar';
45
46
  export { SecondaryBar } from './components/Sidebar/SecondaryBar/SecondaryBar';
46
47
  export { Badge } from './components/Sidebar/components/badge';
@@ -95,6 +96,7 @@ export type { SegmentedButtonProps } from './components/SegmentedButton/Segmente
95
96
  export type { DatePickerProps } from './components/DatePicker/DatePicker';
96
97
  export type { ImageProps } from './components/Image/Image';
97
98
  export type { ImageGalleryProps } from './components/Image/ImageGallery';
99
+ export type { ImageGalleryHandle } from './components/Image/ImageGallery';
98
100
  export type { DrawerMobileProps } from './components/Drawer/DrawerMobile';
99
101
  export type { DrawerDesktopProps } from './components/Drawer/DrawerDesktop';
100
102
  export type { DrawerMobileHandle } from './components/Drawer/DrawerMobile';
@@ -108,4 +110,5 @@ export type { FAButtonProps } from './components/FAB/FAButton';
108
110
  export type { IInputFormikV2 } from './components/InputFormik/InputFormikV2';
109
111
  export type { RadioButtonProps } from './components/RadioButton/RadioButton';
110
112
  export type { RadioButtonFormikProps } from './components/RadioButtonFormik/RadioButtonFormik';
113
+ export type { ButtonProps as ButtonV2Props } from './components/Button/ButtonV2';
111
114
  export { Icons } from './Icons/Icons';
@@ -0,0 +1,2 @@
1
+ declare const ButtonPreview: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ButtonPreview;
@@ -0,0 +1,2 @@
1
+ declare const SelectGroupedOptionsPreview: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SelectGroupedOptionsPreview;