@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';
|