@akad/design-system 0.1.0-beta.9 → 0.2.0-beta.1

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/css/aon-theme.css +1 -1
  2. package/css/bees-theme.css +1 -1
  3. package/css/bmc-theme.css +1 -1
  4. package/css/default-theme.css +1 -1
  5. package/css/linker-theme.css +1 -1
  6. package/css/oggi-theme.css +1 -1
  7. package/css/streetgo-theme.css +1 -1
  8. package/package.json +10 -10
  9. package/react/components/atoms/Checkbox/Checkbox.config.d.ts +14 -0
  10. package/react/components/atoms/Checkbox/Checkbox.d.ts +2 -13
  11. package/react/components/atoms/Checkbox/index.d.ts +2 -1
  12. package/react/components/atoms/Select/Select.stories.d.ts +8 -0
  13. package/react/components/atoms/TextArea/TextArea.d.ts +5 -2
  14. package/react/components/bosons/GridLayout/GridElement.d.ts +1 -4
  15. package/react/components/bosons/GridLayout/GridElement.test.d.ts +1 -0
  16. package/react/components/bosons/GridLayout/GridLayout.config.d.ts +11 -0
  17. package/react/components/bosons/GridLayout/GridLayout.d.ts +8 -18
  18. package/react/components/bosons/Wrapper/Wrapper.d.ts +0 -8
  19. package/react/components/molecules/Accordion/Accordion.d.ts +1 -1
  20. package/react/components/molecules/Accordion/AccordionItem.d.ts +1 -2
  21. package/react/components/molecules/ActiveTags/ActiveTags.d.ts +2 -2
  22. package/react/components/molecules/EditableSelect/EditableSelect.config.d.ts +5 -0
  23. package/react/components/molecules/EditableSelect/EditableSelect.d.ts +2 -1
  24. package/react/components/molecules/Notification/Notification.config.d.ts +16 -0
  25. package/react/components/molecules/Notification/Notification.d.ts +1 -28
  26. package/react/components/molecules/Notification/Notification.stories.d.ts +5 -5
  27. package/react/components/molecules/Notification/index.d.ts +2 -1
  28. package/react/components/molecules/PasswordConfirmation/PasswordConfirmartion.test.d.ts +1 -0
  29. package/react/components/molecules/PasswordConfirmation/PasswordConfirmation.d.ts +1 -1
  30. package/react/components/molecules/Tabs/Tab.test.d.ts +1 -0
  31. package/react/components/molecules/Tabs/Tabs.test.d.ts +1 -0
  32. package/react/components/molecules/ThemeProvider/ThemeProvider.test.d.ts +1 -0
  33. package/react/components/organisms/NotificationList/NotificationList.d.ts +2 -2
  34. package/react/components/organisms/NotificationList/NotificationList.test.d.ts +1 -0
  35. package/react/components/templates/TwoColumns/TwoColumns.test.d.ts +1 -0
  36. package/react/decorators/storybook.test.d.ts +1 -0
  37. package/react/main.d.ts +0 -2
  38. package/react/react-lib.js +2991 -8442
  39. package/react/react-lib.umd.cjs +5 -12
  40. package/react/helpers/messageParser.d.ts +0 -11
  41. package/react/helpers/utils.d.ts +0 -80
  42. package/react/helpers/validator.d.ts +0 -5
  43. package/react/hooks/index.d.ts +0 -6
  44. package/react/hooks/useForm.d.ts +0 -36
  45. package/react/hooks/useMediaQuery.d.ts +0 -1
  46. package/react/hooks/useNotification.d.ts +0 -8
  47. package/react/hooks/useStepper.d.ts +0 -31
  48. /package/react/{helpers/utils.test.d.ts → components/bosons/GridLayout/GridLayout.test.d.ts} +0 -0
  49. /package/react/{helpers/validator.test.d.ts → components/molecules/Notification/Notification.test.d.ts} +0 -0
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "@akad/design-system",
3
- "version": "0.1.0-beta.9",
4
- "main": "react/react.js",
5
- "types": "react/main.d.ts",
6
- "author": "Gabriel Mule <gabemule@gmail.com>",
7
- "license": "MIT",
8
- "devDependencies": {
9
- "concurrently": "^8.2.2"
10
- }
11
- }
2
+ "name": "@akad/design-system",
3
+ "version": "0.2.0-beta.1",
4
+ "main": "react/react.js",
5
+ "types": "react/main.d.ts",
6
+ "author": "Gabriel Mule <gabemule@gmail.com>",
7
+ "license": "MIT",
8
+ "devDependencies": {
9
+ "concurrently": "^8.2.2"
10
+ }
11
+ }
@@ -1,3 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
1
3
  export interface NameProps {
2
4
  type: StringConstructor;
3
5
  required: false;
@@ -30,6 +32,18 @@ export interface OnChangeHandlerProps {
30
32
  type: FunctionConstructor;
31
33
  default: () => void;
32
34
  }
35
+ export interface DsCheckboxProps {
36
+ id?: string;
37
+ className?: string;
38
+ name?: string;
39
+ testId?: string;
40
+ label?: string | ReactNode;
41
+ description?: string | ReactNode;
42
+ checked?: boolean;
43
+ disabled?: boolean;
44
+ changeByChecked?: boolean;
45
+ onChangeHandler?: (event: React.ChangeEvent<HTMLInputElement>) => void;
46
+ }
33
47
  export interface CheckboxConfig {
34
48
  name: string;
35
49
  class: string;
@@ -1,16 +1,5 @@
1
- import { default as React, ReactNode } from 'react';
1
+ import { DsCheckboxProps } from './Checkbox.config';
2
+ import { default as React } from 'react';
2
3
 
3
- export interface DsCheckboxProps {
4
- id?: string;
5
- className?: string;
6
- name?: string;
7
- testId?: string;
8
- label?: string | ReactNode;
9
- description?: string | ReactNode;
10
- checked?: boolean;
11
- disabled?: boolean;
12
- changeByChecked?: boolean;
13
- onChangeHandler?: (event: React.ChangeEvent<HTMLInputElement>) => void;
14
- }
15
4
  declare const DsCheckbox: React.ForwardRefExoticComponent<DsCheckboxProps & React.RefAttributes<HTMLInputElement>>;
16
5
  export default DsCheckbox;
@@ -1,4 +1,5 @@
1
- import { default as DsCheckbox, DsCheckboxProps } from './Checkbox';
1
+ import { DsCheckboxProps } from './Checkbox.config';
2
+ import { default as DsCheckbox } from './Checkbox';
2
3
 
3
4
  export { DsCheckbox };
4
5
  export type { DsCheckboxProps };
@@ -15,5 +15,13 @@ export declare const Default: {
15
15
  value: string;
16
16
  label: string;
17
17
  }[];
18
+ className: string;
19
+ animated: boolean;
20
+ name: string;
21
+ testId: string;
22
+ placeholder: string;
23
+ tooltip: string;
24
+ tooltipPlacement: import('./Select.config').TooltipPlacement;
25
+ tooltipPosition: import('./Select.config').TooltipPosition;
18
26
  };
19
27
  };
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- export interface DsTextAreaProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ export interface DsTextAreaProps extends React.HTMLAttributes<HTMLTextAreaElement> {
4
4
  name?: string;
5
5
  testId?: string;
6
6
  type?: string;
@@ -12,17 +12,20 @@ export interface DsTextAreaProps extends React.HTMLAttributes<HTMLDivElement> {
12
12
  minLength?: number;
13
13
  maxLength?: number;
14
14
  rows?: number;
15
+ cols?: number;
15
16
  tooltip?: string;
16
17
  icon?: string;
17
18
  status?: string;
18
19
  feedback?: string;
19
20
  disabled?: boolean;
20
- onChangeHandler?: (event: React.ChangeEvent<HTMLTextAreaElement> | React.FormEvent<HTMLTextAreaElement>) => void;
21
+ required?: boolean;
22
+ onChangeHandler?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
21
23
  onBlurHandler?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
22
24
  onKeyDownHandler?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
23
25
  onFocusHandler?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
24
26
  resize: string;
25
27
  description?: string;
28
+ style?: React.CSSProperties;
26
29
  }
27
30
  declare const DsTextArea: React.ForwardRefExoticComponent<DsTextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
28
31
  export default DsTextArea;
@@ -5,8 +5,5 @@ type DsGridElementType = {
5
5
  children: string | React.ReactElement;
6
6
  grid: DsGridElementProps;
7
7
  };
8
- declare const DsGridElement: {
9
- ({ children, grid }: DsGridElementType): import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
8
+ declare const DsGridElement: React.FC<DsGridElementType>;
12
9
  export default DsGridElement;
@@ -53,6 +53,17 @@ export interface VerticalAlignProps {
53
53
  default: Align;
54
54
  options: Align[];
55
55
  }
56
+ export interface GridLayoutProps {
57
+ rows?: string;
58
+ gap?: Gap;
59
+ vGap?: boolean;
60
+ hGap?: boolean;
61
+ width?: string;
62
+ height?: string;
63
+ horizontalAlign?: Align;
64
+ verticalAlign?: Align;
65
+ children: React.ReactNode;
66
+ }
56
67
  export interface GridLayoutConfig {
57
68
  name: string;
58
69
  class: string;
@@ -2,14 +2,14 @@ import { default as PropTypes } from 'prop-types';
2
2
 
3
3
  export interface DsGridLayoutProps {
4
4
  children: JSX.Element | JSX.Element[];
5
- rows: string;
6
- gap: string;
7
- vGap: string;
8
- hGap: string;
9
- horizontalAlign: string;
10
- verticalAlign: string;
11
- width: string;
12
- height: string;
5
+ rows?: string;
6
+ gap?: string;
7
+ vGap?: boolean;
8
+ hGap?: boolean;
9
+ horizontalAlign?: string;
10
+ verticalAlign?: string;
11
+ width?: string;
12
+ height?: string;
13
13
  }
14
14
  declare const DsGridLayout: {
15
15
  ({ children, rows, gap, vGap, hGap, horizontalAlign, verticalAlign, width, height, }: DsGridLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -24,16 +24,6 @@ declare const DsGridLayout: {
24
24
  horizontalAlign: PropTypes.Requireable<import('./GridLayout.config').Align>;
25
25
  verticalAlign: PropTypes.Requireable<import('./GridLayout.config').Align>;
26
26
  };
27
- defaultProps: {
28
- rows: string;
29
- gap: import('./GridLayout.config').Gap;
30
- vGap: boolean;
31
- hGap: boolean;
32
- width: string;
33
- height: string;
34
- horizontalAlign: import('./GridLayout.config').Align;
35
- verticalAlign: import('./GridLayout.config').Align;
36
- };
37
27
  displayName: string;
38
28
  };
39
29
  export default DsGridLayout;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
- import { default as PropTypes } from 'prop-types';
3
2
 
4
3
  export interface DsWrapperProps {
5
4
  children?: React.ReactNode;
@@ -11,13 +10,6 @@ export interface DsWrapperProps {
11
10
  }
12
11
  declare const DsWrapper: {
13
12
  ({ children, space, top, right, bottom, left, }: DsWrapperProps): import("react/jsx-runtime").JSX.Element;
14
- propTypes: {
15
- space: PropTypes.Requireable<import('./Wrapper.config').Space>;
16
- top: PropTypes.Requireable<import('./Wrapper.config').Space>;
17
- right: PropTypes.Requireable<import('./Wrapper.config').Space>;
18
- bottom: PropTypes.Requireable<import('./Wrapper.config').Space>;
19
- left: PropTypes.Requireable<import('./Wrapper.config').Space>;
20
- };
21
13
  displayName: string;
22
14
  };
23
15
  export default DsWrapper;
@@ -3,7 +3,7 @@ import { default as PropTypes } from 'prop-types';
3
3
 
4
4
  interface Props {
5
5
  items: DsAccordionItems[];
6
- activeItem?: number;
6
+ activeItem?: number | null;
7
7
  onClick?: (index: number) => void;
8
8
  }
9
9
  declare const DsAccordion: {
@@ -2,12 +2,11 @@ import { DsAccordionItemProps } from '../../../types/types';
2
2
  import { default as PropTypes } from 'prop-types';
3
3
 
4
4
  declare const DsAccordionItem: {
5
- ({ title, content, className, onToggle, active, disabled, }: DsAccordionItemProps): import("react/jsx-runtime").JSX.Element;
5
+ ({ title, content, onToggle, active, disabled, }: DsAccordionItemProps): import("react/jsx-runtime").JSX.Element;
6
6
  propTypes: {
7
7
  active: PropTypes.Requireable<boolean>;
8
8
  title: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
9
9
  content: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
10
- className: PropTypes.Requireable<string>;
11
10
  disabled: PropTypes.Requireable<boolean>;
12
11
  };
13
12
  displayName: string;
@@ -1,13 +1,13 @@
1
1
  interface Tag {
2
+ id: string;
2
3
  text: string;
3
4
  icon: string;
4
- title: string;
5
5
  hiddenClose?: boolean;
6
6
  }
7
7
  export interface DsActiveTagsProps {
8
8
  title: string;
9
9
  activeTags: Tag[];
10
- handleTagClose: (indexToRemove: number) => void;
10
+ handleTagClose: (_indexToRemove: number) => void;
11
11
  }
12
12
  declare const DsActiveTags: {
13
13
  ({ title, activeTags, handleTagClose, }: DsActiveTagsProps): import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,10 @@ export interface Option {
10
10
  name?: string;
11
11
  id?: string | number;
12
12
  }
13
+ export interface TestIdProps {
14
+ type: StringConstructor;
15
+ default: string;
16
+ }
13
17
  export interface LabelProps {
14
18
  type: StringConstructor;
15
19
  default: string;
@@ -79,6 +83,7 @@ export interface EditableSelectConfig {
79
83
  class: string;
80
84
  props: {
81
85
  label: LabelProps;
86
+ testId: TestIdProps;
82
87
  animated: AnimatedProps;
83
88
  loading: LoadingProps;
84
89
  disabled: DisabledProps;
@@ -3,6 +3,7 @@ import { Option } from './EditableSelect.config';
3
3
  export interface DsEditableSelectProps {
4
4
  label?: string;
5
5
  name?: string;
6
+ testId?: string;
6
7
  value?: string;
7
8
  size?: string;
8
9
  options?: Option[];
@@ -19,7 +20,7 @@ export interface DsEditableSelectProps {
19
20
  onFocusHandler?: () => void;
20
21
  }
21
22
  declare const DsEditableSelect: {
22
- ({ label, name, value, options, size, onChangeHandler, onSelectHandler, icon, noOptionsMessage, disabled, status, onBlurHandler, onFocusHandler, animated, placeholder, loading, }: DsEditableSelectProps): import("react/jsx-runtime").JSX.Element;
23
+ ({ label, name, testId, value, options, size, onChangeHandler, onSelectHandler, icon, noOptionsMessage, disabled, status, onBlurHandler, onFocusHandler, animated, placeholder, loading, }: DsEditableSelectProps): import("react/jsx-runtime").JSX.Element;
23
24
  displayName: string;
24
25
  };
25
26
  export default DsEditableSelect;
@@ -1,3 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
1
3
  export declare const NotificationType: {
2
4
  readonly Success: "success";
3
5
  readonly Danger: "danger";
@@ -43,6 +45,20 @@ export interface ProgressBarProps {
43
45
  type: BooleanConstructor;
44
46
  default: boolean;
45
47
  }
48
+ export interface DsNotificationProps {
49
+ className?: string;
50
+ type?: string;
51
+ variant?: string;
52
+ id: string;
53
+ children?: ReactNode;
54
+ message?: ReactNode;
55
+ autoClose?: boolean;
56
+ autoCloseTimer?: number;
57
+ dismissible?: boolean;
58
+ elevation?: number;
59
+ progressBar?: boolean;
60
+ handleClose?: (event: React.MouseEvent) => void;
61
+ }
46
62
  export interface DsNotificationConfig {
47
63
  name: string;
48
64
  class: string;
@@ -1,34 +1,7 @@
1
- import { default as React, ReactNode } from 'react';
2
- import { default as PropTypes } from 'prop-types';
1
+ import { DsNotificationProps } from './Notification.config';
3
2
 
4
- export interface DsNotificationProps {
5
- className?: string;
6
- type?: string;
7
- variant?: string;
8
- id: string;
9
- children?: ReactNode;
10
- message?: ReactNode;
11
- autoClose?: boolean;
12
- autoCloseTimer?: number;
13
- dismissible?: boolean;
14
- elevation?: number;
15
- progressBar: boolean;
16
- handleClose?: (event: React.MouseEvent) => void;
17
- }
18
3
  declare const DsNotification: {
19
4
  ({ className, type, variant, id, children, message, autoClose, autoCloseTimer, dismissible, elevation, progressBar, handleClose, }: DsNotificationProps): import("react/jsx-runtime").JSX.Element | null;
20
- propTypes: {
21
- type: PropTypes.Requireable<import('./Notification.config').NotificationType>;
22
- id: PropTypes.Requireable<string>;
23
- variant: PropTypes.Requireable<import('./Notification.config').NotificationVariant>;
24
- message: PropTypes.Requireable<PropTypes.ReactNodeLike>;
25
- autoClose: PropTypes.Requireable<boolean>;
26
- autoCloseTimer: PropTypes.Requireable<number>;
27
- dismissible: PropTypes.Requireable<boolean>;
28
- elevation: PropTypes.Requireable<number>;
29
- progressBar: PropTypes.Requireable<boolean>;
30
- handleClose: PropTypes.Requireable<(...args: any[]) => any>;
31
- };
32
5
  displayName: string;
33
6
  };
34
7
  export default DsNotification;
@@ -16,7 +16,7 @@ export declare const Default: {
16
16
  autoCloseTimer?: number | undefined;
17
17
  dismissible?: boolean | undefined;
18
18
  elevation?: number | undefined;
19
- progressBar: boolean;
19
+ progressBar?: boolean | undefined;
20
20
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
21
21
  };
22
22
  };
@@ -33,7 +33,7 @@ export declare const NotificationSuccess: {
33
33
  autoCloseTimer?: number | undefined;
34
34
  dismissible?: boolean | undefined;
35
35
  elevation?: number | undefined;
36
- progressBar: boolean;
36
+ progressBar?: boolean | undefined;
37
37
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
38
38
  };
39
39
  };
@@ -50,7 +50,7 @@ export declare const NotificationDanger: {
50
50
  autoCloseTimer?: number | undefined;
51
51
  dismissible?: boolean | undefined;
52
52
  elevation?: number | undefined;
53
- progressBar: boolean;
53
+ progressBar?: boolean | undefined;
54
54
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
55
55
  };
56
56
  };
@@ -67,7 +67,7 @@ export declare const NotificationWarning: {
67
67
  autoCloseTimer?: number | undefined;
68
68
  dismissible?: boolean | undefined;
69
69
  elevation?: number | undefined;
70
- progressBar: boolean;
70
+ progressBar?: boolean | undefined;
71
71
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
72
72
  };
73
73
  };
@@ -84,7 +84,7 @@ export declare const NotificationInfo: {
84
84
  autoCloseTimer?: number | undefined;
85
85
  dismissible?: boolean | undefined;
86
86
  elevation?: number | undefined;
87
- progressBar: boolean;
87
+ progressBar?: boolean | undefined;
88
88
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
89
89
  };
90
90
  };
@@ -1,4 +1,5 @@
1
- import { default as DsNotification, DsNotificationProps } from './Notification';
1
+ import { DsNotificationProps } from './Notification.config';
2
+ import { default as DsNotification } from './Notification';
2
3
 
3
4
  export { DsNotification };
4
5
  export type { DsNotificationProps };
@@ -10,7 +10,7 @@ interface FeedbackObject {
10
10
  color: string;
11
11
  }
12
12
  export interface DsPasswordConfirmationProps {
13
- onChange?: (data: {
13
+ onChange: (data: {
14
14
  password: string;
15
15
  confirmationPassword: string;
16
16
  isEqual: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -3,8 +3,8 @@ import { default as PropTypes } from 'prop-types';
3
3
 
4
4
  export interface DsNotificationListProps {
5
5
  className?: string;
6
- position: string;
7
- fluid: boolean;
6
+ position?: string;
7
+ fluid?: boolean;
8
8
  notifications: DsNotificationProps[];
9
9
  removeNotification: (notificationid: string) => void;
10
10
  }
@@ -0,0 +1 @@
1
+ export {};
package/react/main.d.ts CHANGED
@@ -1,3 +1 @@
1
1
  export * from './components/index';
2
- export * from './hooks/index';
3
- export * from './helpers/utils';