@ama-pt/agora-design-system 3.0.0 → 3.0.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.
@@ -937,6 +937,10 @@ input[type]::placeholder{
937
937
  margin: 32px;
938
938
  }
939
939
 
940
+ .m-64{
941
+ margin: 64px;
942
+ }
943
+
940
944
  .m-auto{
941
945
  margin: auto;
942
946
  }
@@ -0,0 +1,15 @@
1
+ import { CardActionStyles } from './card-action';
2
+ import { ButtonVariant } from '../../button/button';
3
+ type CardActionStylesBody = {
4
+ backgroundColor: string;
5
+ textColor?: string;
6
+ titleColor?: string;
7
+ hasBorder?: boolean;
8
+ isBorderWhite?: boolean;
9
+ buttonVariant?: ButtonVariant;
10
+ buttonDarkMode?: boolean;
11
+ iconColor?: string;
12
+ };
13
+ export type CardActionStylesMap = Record<CardActionStyles, CardActionStylesBody>;
14
+ export declare const cardActionStylesMap: CardActionStylesMap;
15
+ export {};
@@ -0,0 +1,74 @@
1
+ import React, { FC } from 'react';
2
+ import './card-action.scss';
3
+ export type CardActionStyles = 'white' | 'neutral-100' | 'primary-100' | 'secondary-100' | 'primary-300' | 'secondary-300' | 'primary-500' | 'primary-700' | 'primary-900' | 'white-line' | 'primary-900-line';
4
+ export interface CardActionProps {
5
+ /**
6
+ * style of card action
7
+ */
8
+ variant?: CardActionStyles;
9
+ /**
10
+ * it allow you align title, text and button
11
+ */
12
+ alignment?: 'left' | 'center';
13
+ /**
14
+ * show the image within the card
15
+ */
16
+ hasImg?: boolean;
17
+ /**
18
+ * source of image
19
+ */
20
+ imgSrc?: string;
21
+ /**
22
+ * alternative text to image
23
+ */
24
+ imgAlt?: string;
25
+ /**
26
+ * show the card horizontally
27
+ */
28
+ isCardHorizontal?: boolean;
29
+ /**
30
+ * show the icon logo
31
+ */
32
+ hasIconLogo?: boolean;
33
+ /**
34
+ * name of icon logo
35
+ */
36
+ iconLogoName?: string;
37
+ /**
38
+ * title of card
39
+ */
40
+ title: string;
41
+ /**
42
+ * text to show within the card
43
+ */
44
+ text: string;
45
+ /**
46
+ * show icon within the button
47
+ */
48
+ buttonHasIcon?: boolean;
49
+ /**
50
+ * allow the button get all empty space
51
+ */
52
+ isButtonFullWidth?: boolean;
53
+ /**
54
+ * name of button
55
+ */
56
+ buttonValue: string;
57
+ /**
58
+ * name of icon to show inside of button
59
+ */
60
+ buttonLeadingIcon?: string;
61
+ /**
62
+ * name of icon to show when hover the button
63
+ */
64
+ buttonLeadingIconHover?: string;
65
+ /**
66
+ * function called when click on the button
67
+ */
68
+ onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
69
+ /**
70
+ * additional class names for the card action component
71
+ */
72
+ className?: string;
73
+ }
74
+ export declare const CardAction: FC<CardActionProps>;
@@ -0,0 +1,2 @@
1
+ export { CardAction } from './card-action';
2
+ export type { CardActionProps } from './card-action';
@@ -15,3 +15,4 @@ export * from './card-links';
15
15
  export * from './card-no-results';
16
16
  export * from './card-single';
17
17
  export * from './card-topic';
18
+ export * from './card-action';
@@ -20,6 +20,10 @@ export interface GlossaryLettersProps extends ComponentProps<'div'> {
20
20
  * Letters Array
21
21
  */
22
22
  letters?: GlossaryLetter[];
23
+ /**
24
+ * Turn the dark mode on or off.
25
+ */
26
+ darkMode?: boolean;
23
27
  }
24
28
  declare const GlossaryLetters: FC<GlossaryLettersProps>;
25
29
  export { GlossaryLetters };
@@ -1,6 +1,7 @@
1
1
  import { ComponentPropsWithoutRef, FC, ReactElement } from 'react';
2
2
  import { ItemProps } from './item';
3
3
  import './list.scss';
4
+ import { BooleanProp } from '../../models';
4
5
  export type ListStyle = 'none' | 'bullet' | 'number' | 'icon';
5
6
  export interface ListProps extends ComponentPropsWithoutRef<'ul'> {
6
7
  /**
@@ -19,5 +20,9 @@ export interface ListProps extends ComponentPropsWithoutRef<'ul'> {
19
20
  * Children content.
20
21
  */
21
22
  children?: ReactElement<ItemProps> | Array<ReactElement<ItemProps>>;
23
+ /**
24
+ * Add a darkMode to the list.
25
+ */
26
+ darkMode?: BooleanProp;
22
27
  }
23
28
  export declare const List: FC<ListProps>;
@@ -3,6 +3,10 @@ import { ComponentProps, FC, ReactNode } from 'react';
3
3
  import './switch.scss';
4
4
  export type SwitchPosition = 'start' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
5
5
  export interface SwitchProps extends ComponentProps<'input'> {
6
+ /**
7
+ * The flag to set dark mode as active or not.
8
+ */
9
+ darkMode?: BooleanProp;
6
10
  /**
7
11
  * Input label text.
8
12
  */
@@ -1,6 +1,10 @@
1
1
  import { BooleanProp, FeedbackState } from '../../../models';
2
2
  import { ComponentProps, FC, ReactNode } from 'react';
3
3
  import './button-uploader.scss';
4
+ export interface ButtonUploaderElement extends HTMLInputElement {
5
+ input: HTMLInputElement | null;
6
+ reset: () => void;
7
+ }
4
8
  export interface ButtonUploaderProps extends ComponentProps<'input'> {
5
9
  /**
6
10
  * Label for the input file uploader.
@@ -1,4 +1,7 @@
1
- declare const useWindowSize: () => {
1
+ declare const useWindowSize: (fallback?: {
2
+ width: number;
3
+ height: number;
4
+ }) => {
2
5
  width: number;
3
6
  height: number;
4
7
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ama-pt/agora-design-system",
3
3
  "description": "Ágora Design system",
4
- "version": "3.0.0",
4
+ "version": "3.0.1",
5
5
  "main": "artifacts/dist/index.mjs",
6
6
  "module": "artifacts/dist/index.umd.js",
7
7
  "files": [