@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.
@@ -0,0 +1,2 @@
1
+ import { AccordionProps } from './types';
2
+ export declare function Accordion({ renderHeader, renderContent, initialExpanded, onExpandedChange, disabled, ...rest }: AccordionProps): import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ export * from './Accordion';
2
+ export * from './types';
@@ -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
  }
@@ -12,3 +12,4 @@ export * from './Text';
12
12
  export * from './Touchable';
13
13
  export * from './Vimeo';
14
14
  export * from './Carousel';
15
+ export * from './Accordion';