@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.
- package/artifacts/dist/index.mjs +3636 -3515
- package/artifacts/dist/index.mjs.map +1 -1
- package/artifacts/dist/index.umd.js +2 -2
- package/artifacts/dist/index.umd.js.map +1 -1
- package/artifacts/dist/style.css +1 -1
- package/artifacts/dist/tailwind.css +4 -0
- package/artifacts/dist/types/components/cards/card-action/card-action-styles.d.ts +15 -0
- package/artifacts/dist/types/components/cards/card-action/card-action.d.ts +74 -0
- package/artifacts/dist/types/components/cards/card-action/index.d.ts +2 -0
- package/artifacts/dist/types/components/cards/index.d.ts +1 -0
- package/artifacts/dist/types/components/glossary-letters/glossary-letters.d.ts +4 -0
- package/artifacts/dist/types/components/list/list.d.ts +5 -0
- package/artifacts/dist/types/components/switch/switch.d.ts +4 -0
- package/artifacts/dist/types/components/uploader/button-uploader/button-uploader.d.ts +4 -0
- package/artifacts/dist/types/hooks/use-window-size.d.ts +4 -1
- package/package.json +1 -1
|
@@ -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>;
|
|
@@ -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.
|