@ama-pt/agora-design-system 0.2.0 → 0.2.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/dist/cjs/index.ts +1 -1
- package/dist/cjs/index.ts.map +1 -1
- package/dist/cjs/types/components/ui/atoms/scribbles/scribbles.d.ts +2 -2
- package/dist/cjs/types/components/ui/atoms/switch/index.d.ts +2 -0
- package/dist/cjs/types/components/ui/atoms/switch/switch.d.ts +28 -0
- package/dist/cjs/types/components/ui/atoms/tabs/index.d.ts +8 -0
- package/dist/cjs/types/components/ui/atoms/tabs/tab/tab.d.ts +15 -0
- package/dist/cjs/types/components/ui/atoms/tabs/tab-body/tab-body.d.ts +9 -0
- package/dist/cjs/types/components/ui/atoms/tabs/tab-header/tab-header.d.ts +9 -0
- package/dist/cjs/types/components/ui/atoms/tabs/tabs.d.ts +19 -0
- package/dist/cjs/types/components/ui/index.d.ts +1 -0
- package/dist/esm/index.ts +2 -2
- package/dist/esm/index.ts.map +1 -1
- package/dist/esm/types/components/ui/atoms/scribbles/scribbles.d.ts +2 -2
- package/dist/esm/types/components/ui/atoms/switch/index.d.ts +2 -0
- package/dist/esm/types/components/ui/atoms/switch/switch.d.ts +28 -0
- package/dist/esm/types/components/ui/atoms/tabs/index.d.ts +8 -0
- package/dist/esm/types/components/ui/atoms/tabs/tab/tab.d.ts +15 -0
- package/dist/esm/types/components/ui/atoms/tabs/tab-body/tab-body.d.ts +9 -0
- package/dist/esm/types/components/ui/atoms/tabs/tab-header/tab-header.d.ts +9 -0
- package/dist/esm/types/components/ui/atoms/tabs/tabs.d.ts +19 -0
- package/dist/esm/types/components/ui/index.d.ts +1 -0
- package/dist/index.d.ts +28 -3
- package/package.json +24 -18
|
@@ -14,11 +14,11 @@ export interface ScribblesProps extends SuperScribblesProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* Callback to run when scribble is loaded.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
onScribblesLoad?: () => void;
|
|
18
18
|
/**
|
|
19
19
|
* Callback to run when scribble fails to load.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
onScribblesError?: () => void;
|
|
22
22
|
}
|
|
23
23
|
export declare const Scribbles: FC<ScribblesProps>;
|
|
24
24
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ForwardRefRenderFunction } from 'react';
|
|
2
|
+
import { BooleanProp } from '../../../models';
|
|
3
|
+
import './switch.scss';
|
|
4
|
+
export type SwitchPosition = 'start' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
5
|
+
export interface SwitchProps extends React.ComponentPropsWithRef<'input'> {
|
|
6
|
+
/**
|
|
7
|
+
* Input label text.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Show or hide input label.
|
|
12
|
+
*/
|
|
13
|
+
hideLabel?: BooleanProp;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the switch is disabled.
|
|
16
|
+
*/
|
|
17
|
+
reverse?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The position of the switch.
|
|
20
|
+
*/
|
|
21
|
+
position?: SwitchPosition;
|
|
22
|
+
/**
|
|
23
|
+
* Defines if the Switch should be fluid
|
|
24
|
+
*/
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const InnerSwitch: ForwardRefRenderFunction<HTMLInputElement, SwitchProps>;
|
|
28
|
+
export declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { TabBody } from './tab-body/tab-body';
|
|
2
|
+
export { TabHeader } from './tab-header/tab-header';
|
|
3
|
+
export { Tab } from './tab/tab';
|
|
4
|
+
export { Tabs } from './tabs';
|
|
5
|
+
export type { TabProps } from './tab/tab';
|
|
6
|
+
export type { TabsProps } from './tabs';
|
|
7
|
+
export type { TabHeaderProps } from './tab-header/tab-header';
|
|
8
|
+
export type { TabBodyProps } from './tab-body/tab-body';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC, ReactElement } from 'react';
|
|
2
|
+
import { BooleanProp } from '../../../../models';
|
|
3
|
+
import { TabBodyProps } from '../tab-body/tab-body';
|
|
4
|
+
import { TabHeaderProps } from '../tab-header/tab-header';
|
|
5
|
+
export interface TabProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Children content.
|
|
8
|
+
*/
|
|
9
|
+
children?: Array<ReactElement<TabHeaderProps> | ReactElement<TabBodyProps>>;
|
|
10
|
+
/**
|
|
11
|
+
* Active tab.
|
|
12
|
+
*/
|
|
13
|
+
active?: BooleanProp;
|
|
14
|
+
}
|
|
15
|
+
export declare const Tab: FC<TabProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
|
|
2
|
+
import './tab-body.scss';
|
|
3
|
+
export interface TabBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Children content.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const TabBody: FC<TabBodyProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
|
|
2
|
+
import './tab-header.scss';
|
|
3
|
+
export interface TabHeaderProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Children content.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const TabHeader: FC<TabHeaderProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC, ReactElement } from 'react';
|
|
2
|
+
import { BooleanProp } from '../../../models';
|
|
3
|
+
import { TabProps } from './tab/tab';
|
|
4
|
+
import './tabs.scss';
|
|
5
|
+
export interface TabsProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Children content.
|
|
8
|
+
*/
|
|
9
|
+
children: ReactElement<TabProps> | Array<ReactElement<TabProps>>;
|
|
10
|
+
/**
|
|
11
|
+
* Defines if the tab should be fluid.
|
|
12
|
+
*/
|
|
13
|
+
fullWidth?: BooleanProp;
|
|
14
|
+
/**
|
|
15
|
+
* Automatic activation.
|
|
16
|
+
*/
|
|
17
|
+
automaticActivation?: BooleanProp;
|
|
18
|
+
}
|
|
19
|
+
export declare const Tabs: FC<TabsProps>;
|
|
@@ -13,6 +13,7 @@ export * from './atoms/progress-bar';
|
|
|
13
13
|
export * from './atoms/radio';
|
|
14
14
|
export * from './atoms/scribbles';
|
|
15
15
|
export * from './atoms/tag';
|
|
16
|
+
export * from './atoms/switch';
|
|
16
17
|
export * from './molecules/accordion-group';
|
|
17
18
|
export * from './molecules/checkbox-group';
|
|
18
19
|
export * from './molecules/dropdown-list';
|
package/dist/index.d.ts
CHANGED
|
@@ -467,11 +467,11 @@ interface ScribblesProps extends SuperScribblesProps {
|
|
|
467
467
|
/**
|
|
468
468
|
* Callback to run when scribble is loaded.
|
|
469
469
|
*/
|
|
470
|
-
|
|
470
|
+
onScribblesLoad?: () => void;
|
|
471
471
|
/**
|
|
472
472
|
* Callback to run when scribble fails to load.
|
|
473
473
|
*/
|
|
474
|
-
|
|
474
|
+
onScribblesError?: () => void;
|
|
475
475
|
}
|
|
476
476
|
declare const Scribbles: FC<ScribblesProps>;
|
|
477
477
|
|
|
@@ -511,6 +511,31 @@ interface TagProps extends ComponentPropsWithRef<'button'> {
|
|
|
511
511
|
}
|
|
512
512
|
declare const Tag: React$1.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
513
513
|
|
|
514
|
+
type SwitchPosition = 'start' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
515
|
+
interface SwitchProps extends React$1.ComponentPropsWithRef<'input'> {
|
|
516
|
+
/**
|
|
517
|
+
* Input label text.
|
|
518
|
+
*/
|
|
519
|
+
label?: string;
|
|
520
|
+
/**
|
|
521
|
+
* Show or hide input label.
|
|
522
|
+
*/
|
|
523
|
+
hideLabel?: BooleanProp;
|
|
524
|
+
/**
|
|
525
|
+
* Whether the switch is disabled.
|
|
526
|
+
*/
|
|
527
|
+
reverse?: boolean;
|
|
528
|
+
/**
|
|
529
|
+
* The position of the switch.
|
|
530
|
+
*/
|
|
531
|
+
position?: SwitchPosition;
|
|
532
|
+
/**
|
|
533
|
+
* Defines if the Switch should be fluid
|
|
534
|
+
*/
|
|
535
|
+
fullWidth?: boolean;
|
|
536
|
+
}
|
|
537
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
538
|
+
|
|
514
539
|
type AccordionGroupType = 'single' | 'multiple';
|
|
515
540
|
interface AccordionGroupProps extends ComponentPropsWithRef<'div'> {
|
|
516
541
|
/**
|
|
@@ -958,4 +983,4 @@ declare class TypedEventEmitter<K extends string, T> {
|
|
|
958
983
|
emit(eventName: K, event: T): boolean;
|
|
959
984
|
}
|
|
960
985
|
|
|
961
|
-
export { Accordion, AccordionGroup, AccordionGroupProps, AccordionGroupType, AccordionProps, AccordionRef, BooleanProp, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Button, ButtonAppearance, ButtonProps, ButtonVariant, CardFederatedFooterProps, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, DropdownList, DropdownListProps, DropdownSection, DropdownSectionOption, DropdownSectionOptionProps, DropdownSectionProps, DropdownSectionType, FederatedFooter, FederatedFooterProps, FeedbackState, Icon, IconDimensions, IconName, IconPosition, IconProps, InputDate, InputDateEventProps, InputDateLanguageProps, InputDateProps, InputNumber, InputNumberProps, InputPassword, InputPasswordProps, InputPhone, InputPhoneProps, InputPhoneRef, InputSearch, InputSearchProps, InputSelect, InputSelectProps, InputText, InputTextArea, InputTextAreaProps, InputTextProps, LinkableIconsProps, LinkableImagesProps, PhoneCountryCode, PhoneCountryCodes, PhoneCountryISO, PhoneCountryISOs, Pill, PillAppearance, PillProps, PillVariant, ProgressBar, ProgressBarProps, RadioButton, RadioButtonGroup, RadioButtonGroupProps, RadioButtonProps, Scribbles, ScribblesName, ScribblesProps, Tag, TagProps, TagVariant, TypedEventEmitter, allIcons, allScribbles, debounce, normalizeText, stringToBoolean };
|
|
986
|
+
export { Accordion, AccordionGroup, AccordionGroupProps, AccordionGroupType, AccordionProps, AccordionRef, BooleanProp, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Button, ButtonAppearance, ButtonProps, ButtonVariant, CardFederatedFooterProps, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, DropdownList, DropdownListProps, DropdownSection, DropdownSectionOption, DropdownSectionOptionProps, DropdownSectionProps, DropdownSectionType, FederatedFooter, FederatedFooterProps, FeedbackState, Icon, IconDimensions, IconName, IconPosition, IconProps, InputDate, InputDateEventProps, InputDateLanguageProps, InputDateProps, InputNumber, InputNumberProps, InputPassword, InputPasswordProps, InputPhone, InputPhoneProps, InputPhoneRef, InputSearch, InputSearchProps, InputSelect, InputSelectProps, InputText, InputTextArea, InputTextAreaProps, InputTextProps, LinkableIconsProps, LinkableImagesProps, PhoneCountryCode, PhoneCountryCodes, PhoneCountryISO, PhoneCountryISOs, Pill, PillAppearance, PillProps, PillVariant, ProgressBar, ProgressBarProps, RadioButton, RadioButtonGroup, RadioButtonGroupProps, RadioButtonProps, Scribbles, ScribblesName, ScribblesProps, Switch, SwitchPosition, SwitchProps, Tag, TagProps, TagVariant, TypedEventEmitter, allIcons, allScribbles, debounce, normalizeText, stringToBoolean };
|
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": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "18.15.0"
|
|
7
7
|
},
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
],
|
|
13
13
|
"types": "dist/index.d.ts",
|
|
14
14
|
"scripts": {
|
|
15
|
-
"storybook": "storybook dev -p 6006",
|
|
16
|
-
"build-storybook": "storybook build",
|
|
15
|
+
"storybook": "gulp JSONStories && storybook dev -p 6006",
|
|
16
|
+
"build-storybook": "gulp JSONStories && storybook build",
|
|
17
17
|
"lint": "eslint src --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
18
|
"lint:fix": "eslint --fix ./**/*.{js,jsx,ts,tsx,json}",
|
|
19
19
|
"format": "prettier --write ./**/*.{js,jsx,ts,tsx,css,scss,mdx,md,json} --config ./.prettierrc",
|
|
@@ -29,8 +29,13 @@
|
|
|
29
29
|
"babel-loader": "^8.2.5",
|
|
30
30
|
"classnames": "^2.3.2",
|
|
31
31
|
"fs": "^0.0.1-security",
|
|
32
|
+
"glob": "^7.2.3",
|
|
33
|
+
"gulp": "^4.0.2",
|
|
34
|
+
"gulp-clean": "^0.4.0",
|
|
35
|
+
"gulp-typescript": "^6.0.0-alpha.1",
|
|
32
36
|
"path": "^0.12.7",
|
|
33
37
|
"raw-loader": "^4.0.2",
|
|
38
|
+
"react-syntax-highlighter": "^15.5.0",
|
|
34
39
|
"sass": "^1.56.2",
|
|
35
40
|
"source-map-loader": "^4.0.1",
|
|
36
41
|
"url-loader": "^4.1.1"
|
|
@@ -42,21 +47,22 @@
|
|
|
42
47
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
43
48
|
"@rollup/plugin-terser": "^0.4.3",
|
|
44
49
|
"@rollup/plugin-typescript": "^11.1.1",
|
|
45
|
-
"@storybook/addon-a11y": "^7.0.
|
|
46
|
-
"@storybook/addon-actions": "^7.0.
|
|
47
|
-
"@storybook/addon-docs": "^7.0.
|
|
48
|
-
"@storybook/addon-
|
|
49
|
-
"@storybook/addon-
|
|
50
|
-
"@storybook/addon-
|
|
51
|
-
"@storybook/addon-
|
|
52
|
-
"@storybook/
|
|
50
|
+
"@storybook/addon-a11y": "^7.0.20",
|
|
51
|
+
"@storybook/addon-actions": "^7.0.20",
|
|
52
|
+
"@storybook/addon-docs": "^7.0.20",
|
|
53
|
+
"@storybook/addon-storysource": "^7.0.20",
|
|
54
|
+
"@storybook/addon-essentials": "^7.0.20",
|
|
55
|
+
"@storybook/addon-interactions": "^7.0.20",
|
|
56
|
+
"@storybook/addon-links": "^7.0.20",
|
|
57
|
+
"@storybook/addon-mdx-gfm": "^7.0.20",
|
|
58
|
+
"@storybook/blocks": "^7.0.20",
|
|
53
59
|
"@storybook/mdx2-csf": "^1.1.0",
|
|
54
60
|
"@storybook/preset-scss": "^1.0.3",
|
|
55
61
|
"@storybook/preset-typescript": "^3.0.0",
|
|
56
|
-
"@storybook/react": "^7.0.
|
|
57
|
-
"@storybook/react-vite": "^7.0.
|
|
62
|
+
"@storybook/react": "^7.0.20",
|
|
63
|
+
"@storybook/react-vite": "^7.0.20",
|
|
58
64
|
"@storybook/testing-library": "^0.1.0",
|
|
59
|
-
"@storybook/theming": "^7.0.
|
|
65
|
+
"@storybook/theming": "^7.0.20",
|
|
60
66
|
"@types/node": "^18.11.9",
|
|
61
67
|
"@types/prop-types": "^15.7.5",
|
|
62
68
|
"@types/react": "^18.0.25",
|
|
@@ -87,7 +93,7 @@
|
|
|
87
93
|
"rollup-plugin-postcss": "^4.0.2",
|
|
88
94
|
"sass": "^1.56.1",
|
|
89
95
|
"sass-loader": "^13.2.0",
|
|
90
|
-
"storybook": "^7.0.
|
|
96
|
+
"storybook": "^7.0.20",
|
|
91
97
|
"tailwindcss": "^3.2.4",
|
|
92
98
|
"ts-dedent": "^2.2.0",
|
|
93
99
|
"typescript": "4.9.3",
|
|
@@ -101,10 +107,10 @@
|
|
|
101
107
|
"enhanced-resolve": "5.10.0"
|
|
102
108
|
},
|
|
103
109
|
"peerDependencies": {
|
|
104
|
-
"react": "^18.2.0",
|
|
105
|
-
"react-dom": "^18.2.0",
|
|
106
110
|
"@types/react": "^18.2.0",
|
|
107
|
-
"@types/react-dom": "^18.2.0"
|
|
111
|
+
"@types/react-dom": "^18.2.0",
|
|
112
|
+
"react": "^18.2.0",
|
|
113
|
+
"react-dom": "^18.2.0"
|
|
108
114
|
},
|
|
109
115
|
"author": {
|
|
110
116
|
"name": "AMA"
|