@foris/avocado-suite 0.30.10 → 0.31.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.
@@ -1,14 +1,21 @@
1
1
  import { FC } from 'react';
2
+ import { ButtonVariant } from '../button/Button.tsx';
2
3
  import { MenuItem } from '../../types/menu.types';
3
4
  interface MenuProps {
5
+ /** Overwrite className */
6
+ className?: string;
4
7
  /** Control if you want to close the list after clicking one of the options or not */
5
8
  closeOnClick?: boolean;
6
- /** From where to start to render the list */
7
- listOrigin?: 'left' | 'right';
9
+ /** Control if you want to close the list after clicking one of the options or not */
10
+ disabled?: boolean;
8
11
  /** List of the items to render when the menu is open */
9
12
  items: MenuItem[];
10
- /** Overwrite className */
11
- className?: string;
13
+ /** From where to start to render the list */
14
+ listOrigin?: 'left' | 'right';
15
+ /** Size type */
16
+ size?: 'sm' | 'md';
17
+ /** Use the variant prop to change the visual style of the Button */
18
+ variant?: ButtonVariant;
12
19
  }
13
20
  declare const Menu: FC<MenuProps>;
14
21
  export default Menu;
@@ -1,14 +1,54 @@
1
+ /**
2
+ * A reusable text component that displays content with flexible styles.
3
+ * It supports configuration for size, weight, dark mode, and custom class names.
4
+ *
5
+ * @component
6
+ * @example
7
+ * // Basic usage of the Text component
8
+ * <Text type="lg" weight="medium" darkMode={true}>
9
+ * This is a large, medium-weight text in dark mode.
10
+ * </Text>
11
+ *
12
+ * @example
13
+ * // Usage with a custom class
14
+ * <Text className="my-custom-class">
15
+ * This is a text with a custom class.
16
+ * </Text>
17
+ */
1
18
  import { FC } from 'react';
2
19
  export interface TextProps {
3
- /** Render content */
20
+ /**
21
+ * The content to be rendered inside the text component.
22
+ * Can be a React node or a string of text.
23
+ */
4
24
  children: React.ReactNode | string;
5
- /** Overwrite className */
25
+ /**
26
+ * Additional CSS class to be applied to customize the component's styling.
27
+ * If not provided, no additional class is applied.
28
+ */
6
29
  className?: string;
7
- /** Use dark colors palette*/
30
+ /**
31
+ * Enable dark mode (changes the color palette of the component).
32
+ * Defaults to `false` if not provided.
33
+ */
8
34
  darkMode?: boolean;
9
- /** Type can be */
35
+ /**
36
+ * Defines the size of the text. It can be one of the following:
37
+ * - "lg" for large size
38
+ * - "md" for medium size (default value)
39
+ * - "sm" for small size
40
+ * - "xs" for extra small size
41
+ *
42
+ * The default value is 'md'.
43
+ */
10
44
  type?: 'lg' | 'md' | 'sm' | 'xs';
11
- /** Weight can be */
45
+ /**
46
+ * Defines the font weight. It can be one of the following:
47
+ * - "regular" for normal weight
48
+ * - "medium" for medium weight
49
+ *
50
+ * The default value is 'regular'.
51
+ */
12
52
  weight?: 'regular' | 'medium';
13
53
  }
14
54
  declare const Text: FC<TextProps>;
package/dist/index.d.ts CHANGED
@@ -54,4 +54,5 @@ export type { MenuItem } from './types/menu.types';
54
54
  export type { BreadcrumbItem } from './components/breadcrumbs/Breadcrumbs';
55
55
  export type { CardNotificationProps } from './components/card-notification/CardNotification';
56
56
  export type { HeadingProps } from './components/heading/Heading';
57
+ export type { TextProps } from './components/text/Text';
57
58
  export * from './types/table.types';