@akad/design-system 0.2.0-beta.1 → 0.2.0-beta.11

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 (28) 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 +1 -1
  9. package/react/components/atoms/Button/Button.d.ts +2 -2
  10. package/react/components/bosons/Container/Container.config.d.ts +5 -0
  11. package/react/components/bosons/Container/Container.d.ts +3 -1
  12. package/react/components/index.d.ts +3 -1
  13. package/react/components/molecules/Carousel/Carousel.config.d.ts +7 -0
  14. package/react/components/molecules/Carousel/Carousel.d.ts +31 -0
  15. package/react/components/molecules/Carousel/Carousel.test.d.ts +1 -0
  16. package/react/components/molecules/Carousel/index.d.ts +4 -0
  17. package/react/components/molecules/Notification/Notification.config.d.ts +6 -0
  18. package/react/components/molecules/Notification/Notification.d.ts +1 -1
  19. package/react/components/molecules/Notification/Notification.stories.d.ts +5 -0
  20. package/react/components/molecules/PasswordConfirmation/PasswordConfirmation.config.d.ts +5 -0
  21. package/react/components/molecules/PasswordConfirmation/PasswordConfirmation.d.ts +4 -2
  22. package/react/components/templates/SplitLayout/SplitLayout.config.d.ts +7 -0
  23. package/react/components/templates/SplitLayout/SplitLayout.d.ts +9 -0
  24. package/react/components/templates/SplitLayout/SplitLayout.test.d.ts +1 -0
  25. package/react/components/templates/SplitLayout/index.d.ts +5 -0
  26. package/react/react-lib.js +1767 -1623
  27. package/react/react-lib.umd.cjs +5 -5
  28. package/react/types/hooks/types.d.ts +99 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akad/design-system",
3
- "version": "0.2.0-beta.1",
3
+ "version": "0.2.0-beta.11",
4
4
  "main": "react/react.js",
5
5
  "types": "react/main.d.ts",
6
6
  "author": "Gabriel Mule <gabemule@gmail.com>",
@@ -1,8 +1,8 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { default as PropTypes } from 'prop-types';
3
3
 
4
4
  export interface DsButtonProps extends HTMLAttributes<HTMLButtonElement> {
5
- children: string;
5
+ children: string | ReactNode;
6
6
  className?: string;
7
7
  size?: string;
8
8
  disabled?: boolean;
@@ -2,11 +2,16 @@ export interface FluidProps {
2
2
  type: BooleanConstructor;
3
3
  default: boolean;
4
4
  }
5
+ export interface TestIdProps {
6
+ type: StringConstructor;
7
+ default: string;
8
+ }
5
9
  export interface ContainerConfig {
6
10
  name: string;
7
11
  class: string;
8
12
  props: {
9
13
  fluid: FluidProps;
14
+ testId: TestIdProps;
10
15
  };
11
16
  }
12
17
  declare const ContainerConfig: ContainerConfig;
@@ -6,14 +6,16 @@ export interface DsContainerProps {
6
6
  fluid?: boolean;
7
7
  className?: string;
8
8
  style?: object;
9
+ testId?: string;
9
10
  }
10
11
  declare const DsContainer: {
11
- ({ children, fluid, className, style, }: DsContainerProps): import("react/jsx-runtime").JSX.Element;
12
+ ({ children, fluid, className, style, testId, }: DsContainerProps): import("react/jsx-runtime").JSX.Element;
12
13
  propTypes: {
13
14
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
15
  fluid: PropTypes.Requireable<boolean>;
15
16
  className: PropTypes.Requireable<string>;
16
17
  style: PropTypes.Requireable<object>;
18
+ testId: PropTypes.Requireable<string>;
17
19
  };
18
20
  displayName: string;
19
21
  };
@@ -1,4 +1,5 @@
1
1
  import { DsTwoColumns } from './templates/TwoColumns';
2
+ import { DsSplitLayout } from './templates/SplitLayout';
2
3
  import { DsNotificationList } from './organisms/NotificationList';
3
4
  import { ThemeProvider } from './molecules/ThemeProvider';
4
5
  import { DsTabs } from './molecules/Tabs';
@@ -10,6 +11,7 @@ import { DsModal } from './molecules/Modal';
10
11
  import { DsInlineEditable } from './molecules/InlineEditable';
11
12
  import { DsIndicator } from './molecules/Indicator';
12
13
  import { DsEditableSelect } from './molecules/EditableSelect';
14
+ import { DsCarousel } from './molecules/Carousel';
13
15
  import { DsActiveTags } from './molecules/ActiveTags';
14
16
  import { DsAccordion } from './molecules/Accordion';
15
17
  import { DsWrapper } from './bosons/Wrapper';
@@ -34,4 +36,4 @@ import { DsCard } from './atoms/Card';
34
36
  import { DsCaption } from './atoms/Caption';
35
37
  import { DsButton } from './atoms/Button';
36
38
 
37
- export { DsAccordion, DsButton, DsCaption, DsCard, DsCheckbox, DsContainer, DsFlexElement, DsFlexLayout, DsGridElement, DsGridLayout, DsHeading, DsHR, DsIcon, DsIndicator, DsInlineEditable, DsInput, DsLoading, DsModal, DsNotification, DsNotificationList, DsOption, DsParagraph, DsSelect, DsSpacer, DsStepper, DsSubtitle, DsTable, DsTabs, DsTextArea, DsTooltip, DsTwoColumns, DsWrapper, DsProgress, DsPasswordConfirmation, DsEditableSelect, DsActiveTags, ThemeProvider, };
39
+ export { DsAccordion, DsButton, DsCaption, DsCard, DsCheckbox, DsContainer, DsFlexElement, DsFlexLayout, DsGridElement, DsGridLayout, DsHeading, DsHR, DsIcon, DsIndicator, DsInlineEditable, DsInput, DsLoading, DsModal, DsNotification, DsNotificationList, DsOption, DsParagraph, DsSelect, DsSpacer, DsStepper, DsSubtitle, DsTable, DsTabs, DsTextArea, DsTooltip, DsTwoColumns, DsSplitLayout, DsWrapper, DsProgress, DsPasswordConfirmation, DsEditableSelect, DsActiveTags, ThemeProvider, DsCarousel, };
@@ -0,0 +1,7 @@
1
+ export interface CarouselConfig {
2
+ name: string;
3
+ class: string;
4
+ props: Record<string, never>;
5
+ }
6
+ declare const CarouselConfig: CarouselConfig;
7
+ export default CarouselConfig;
@@ -0,0 +1,31 @@
1
+ import { default as PropTypes } from 'prop-types';
2
+
3
+ type Slide = {
4
+ title: string;
5
+ image: string;
6
+ description: string;
7
+ };
8
+ export interface DsCarouselProps {
9
+ slides: Slide[];
10
+ interval?: number;
11
+ imageHeight?: number | string;
12
+ imageWidth?: number | string;
13
+ imageMaxHeight?: number | string;
14
+ imageMaxWidth?: number | string;
15
+ }
16
+ declare const DsCarousel: {
17
+ ({ slides, interval, imageHeight, imageWidth, imageMaxHeight, imageMaxWidth, }: DsCarouselProps): import("react/jsx-runtime").JSX.Element;
18
+ propTypes: {
19
+ slides: PropTypes.Validator<(PropTypes.InferProps<{
20
+ title: PropTypes.Validator<string>;
21
+ image: PropTypes.Validator<string>;
22
+ description: PropTypes.Validator<string>;
23
+ }> | null | undefined)[]>;
24
+ interval: PropTypes.Requireable<number>;
25
+ imageHeight: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
26
+ imageWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
27
+ imageMaxHeight: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
28
+ imageMaxWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
29
+ };
30
+ };
31
+ export default DsCarousel;
@@ -0,0 +1,4 @@
1
+ import { default as DsCarousel, DsCarouselProps } from './Carousel';
2
+
3
+ export { DsCarousel };
4
+ export type { DsCarouselProps };
@@ -45,6 +45,10 @@ export interface ProgressBarProps {
45
45
  type: BooleanConstructor;
46
46
  default: boolean;
47
47
  }
48
+ export interface TestIdProps {
49
+ type: StringConstructor;
50
+ default: string;
51
+ }
48
52
  export interface DsNotificationProps {
49
53
  className?: string;
50
54
  type?: string;
@@ -57,6 +61,7 @@ export interface DsNotificationProps {
57
61
  dismissible?: boolean;
58
62
  elevation?: number;
59
63
  progressBar?: boolean;
64
+ testId?: string;
60
65
  handleClose?: (event: React.MouseEvent) => void;
61
66
  }
62
67
  export interface DsNotificationConfig {
@@ -71,6 +76,7 @@ export interface DsNotificationConfig {
71
76
  elevation: ElevationProps;
72
77
  variant: NotificationVariantProps;
73
78
  progressBar: ProgressBarProps;
79
+ testId: TestIdProps;
74
80
  };
75
81
  }
76
82
  declare const DsNotificationConfig: DsNotificationConfig;
@@ -1,7 +1,7 @@
1
1
  import { DsNotificationProps } from './Notification.config';
2
2
 
3
3
  declare const DsNotification: {
4
- ({ className, type, variant, id, children, message, autoClose, autoCloseTimer, dismissible, elevation, progressBar, handleClose, }: DsNotificationProps): import("react/jsx-runtime").JSX.Element | null;
4
+ ({ className, type, variant, id, children, message, autoClose, autoCloseTimer, dismissible, elevation, progressBar, handleClose, testId, }: DsNotificationProps): import("react/jsx-runtime").JSX.Element | null;
5
5
  displayName: string;
6
6
  };
7
7
  export default DsNotification;
@@ -17,6 +17,7 @@ export declare const Default: {
17
17
  dismissible?: boolean | undefined;
18
18
  elevation?: number | undefined;
19
19
  progressBar?: boolean | undefined;
20
+ testId?: string | undefined;
20
21
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
21
22
  };
22
23
  };
@@ -34,6 +35,7 @@ export declare const NotificationSuccess: {
34
35
  dismissible?: boolean | undefined;
35
36
  elevation?: number | undefined;
36
37
  progressBar?: boolean | undefined;
38
+ testId?: string | undefined;
37
39
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
38
40
  };
39
41
  };
@@ -51,6 +53,7 @@ export declare const NotificationDanger: {
51
53
  dismissible?: boolean | undefined;
52
54
  elevation?: number | undefined;
53
55
  progressBar?: boolean | undefined;
56
+ testId?: string | undefined;
54
57
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
55
58
  };
56
59
  };
@@ -68,6 +71,7 @@ export declare const NotificationWarning: {
68
71
  dismissible?: boolean | undefined;
69
72
  elevation?: number | undefined;
70
73
  progressBar?: boolean | undefined;
74
+ testId?: string | undefined;
71
75
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
72
76
  };
73
77
  };
@@ -85,6 +89,7 @@ export declare const NotificationInfo: {
85
89
  dismissible?: boolean | undefined;
86
90
  elevation?: number | undefined;
87
91
  progressBar?: boolean | undefined;
92
+ testId?: string | undefined;
88
93
  handleClose?: ((event: import('react').MouseEvent<Element, MouseEvent>) => void) | undefined;
89
94
  };
90
95
  };
@@ -14,6 +14,10 @@ export interface InstructionLabelProps {
14
14
  type: StringConstructor;
15
15
  default: string;
16
16
  }
17
+ export interface TestIdProps {
18
+ type: StringConstructor;
19
+ default: string;
20
+ }
17
21
  export interface PasswordConfirmationConfig {
18
22
  name: string;
19
23
  class: string;
@@ -21,6 +25,7 @@ export interface PasswordConfirmationConfig {
21
25
  onChange: OnChangeProps;
22
26
  validationList: ValidationListProps;
23
27
  instructionLabel: InstructionLabelProps;
28
+ testId: TestIdProps;
24
29
  };
25
30
  }
26
31
  declare const DsPasswordConfirmationConfig: PasswordConfirmationConfig;
@@ -18,13 +18,15 @@ export interface DsPasswordConfirmationProps {
18
18
  }) => void;
19
19
  validationList: Array<ValidationRule>;
20
20
  instructionLabel: string;
21
+ testId?: string;
21
22
  }
22
23
  declare const DsPasswordConfirmation: {
23
- ({ onChange, validationList, instructionLabel, }: DsPasswordConfirmationProps): import("react/jsx-runtime").JSX.Element;
24
+ ({ onChange, validationList, instructionLabel, testId, }: DsPasswordConfirmationProps): import("react/jsx-runtime").JSX.Element;
24
25
  propTypes: {
25
26
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
26
- validationList: PropTypes.Validator<any[]>;
27
+ validationList: PropTypes.Requireable<any[]>;
27
28
  instructionLabel: PropTypes.Requireable<string>;
29
+ testId: PropTypes.Requireable<string>;
28
30
  };
29
31
  displayName: string;
30
32
  };
@@ -0,0 +1,7 @@
1
+ export interface SplitLayoutConfig {
2
+ name: string;
3
+ class: string;
4
+ props: Record<string, never>;
5
+ }
6
+ declare const SplitLayoutConfig: SplitLayoutConfig;
7
+ export default SplitLayoutConfig;
@@ -0,0 +1,9 @@
1
+ export interface DsSplitLayoutProps {
2
+ leftContent: React.ReactNode;
3
+ rightContent: React.ReactNode;
4
+ leftBackgroundColor?: string;
5
+ rightBackgroundColor?: string;
6
+ reverseOnMobile?: boolean;
7
+ }
8
+ declare const DsSplitLayout: React.FC<DsSplitLayoutProps>;
9
+ export default DsSplitLayout;
@@ -0,0 +1,5 @@
1
+ import { default as DsSplitLayout, DsSplitLayoutProps } from './SplitLayout';
2
+
3
+ export { DsSplitLayout };
4
+ export type { DsSplitLayoutProps };
5
+ export default DsSplitLayout;