@aic-kits/react 0.5.0 → 0.6.0
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/components/Accordion/Accordion.d.ts +2 -0
- package/dist/components/Accordion/AccordionContent.d.ts +7 -0
- package/dist/components/Accordion/AccordionHeader.d.ts +9 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/types.d.ts +27 -0
- package/dist/components/Touchable/types.d.ts +10 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +58 -53
- package/dist/index.js +2416 -2260
- package/dist/theme/common/spaces.d.ts +1 -1
- package/dist/theme/components/accordion.d.ts +22 -0
- package/dist/theme/components/index.d.ts +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AccordionContentProps {
|
|
3
|
+
renderContent: () => React.ReactNode;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function AccordionContent({ renderContent, isExpanded, }: AccordionContentProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AccordionHeaderProps {
|
|
3
|
+
renderHeader: (isExpanded: boolean) => React.ReactNode;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
onToggle: () => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function AccordionHeader({ renderHeader, isExpanded, onToggle, disabled, }: AccordionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '../Box';
|
|
3
|
+
export interface AccordionProps extends BoxProps {
|
|
4
|
+
/**
|
|
5
|
+
* Function to render the header content.
|
|
6
|
+
* Receives an `isExpanded` boolean.
|
|
7
|
+
*/
|
|
8
|
+
renderHeader: (isExpanded: boolean) => React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Function to render the collapsible content.
|
|
11
|
+
*/
|
|
12
|
+
renderContent: () => React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Initial expanded state.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
initialExpanded?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Callback fired when the expanded state changes.
|
|
20
|
+
*/
|
|
21
|
+
onExpandedChange?: (isExpanded: boolean) => void;
|
|
22
|
+
/**
|
|
23
|
+
* If true, the accordion will be disabled and cannot be toggled.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
@@ -13,4 +13,14 @@ export interface TouchableProps extends React.HTMLAttributes<HTMLDivElement>, Bo
|
|
|
13
13
|
* Testing id of the component.
|
|
14
14
|
*/
|
|
15
15
|
'data-testid'?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Toggle the scale animation of the component.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
useScaleAnimation?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Toggle the opacity animation of the component.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
useOpacityAnimation?: boolean;
|
|
16
26
|
}
|