@delightui/components 0.1.105 → 0.1.107

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.
Files changed (102) hide show
  1. package/README.md +104 -1
  2. package/dist/cjs/components/molecules/Modal/DemoModal.d.ts +8 -0
  3. package/dist/cjs/components/molecules/Modal/ModalContext/ModalContext.d.ts +41 -0
  4. package/dist/cjs/components/molecules/Modal/ModalContext/ModalContext.types.d.ts +87 -0
  5. package/dist/cjs/components/molecules/Modal/ModalContext/index.d.ts +3 -0
  6. package/dist/cjs/components/molecules/Modal/ModalContext/useModal.d.ts +34 -0
  7. package/dist/cjs/components/molecules/Modal/index.d.ts +2 -0
  8. package/dist/cjs/components/molecules/index.d.ts +2 -0
  9. package/dist/cjs/library.css +19 -6
  10. package/dist/cjs/library.js +3 -3
  11. package/dist/cjs/library.js.map +1 -1
  12. package/dist/esm/components/molecules/Modal/DemoModal.d.ts +8 -0
  13. package/dist/esm/components/molecules/Modal/ModalContext/ModalContext.d.ts +41 -0
  14. package/dist/esm/components/molecules/Modal/ModalContext/ModalContext.types.d.ts +87 -0
  15. package/dist/esm/components/molecules/Modal/ModalContext/index.d.ts +3 -0
  16. package/dist/esm/components/molecules/Modal/ModalContext/useModal.d.ts +34 -0
  17. package/dist/esm/components/molecules/Modal/index.d.ts +2 -0
  18. package/dist/esm/components/molecules/index.d.ts +2 -0
  19. package/dist/esm/library.css +19 -6
  20. package/dist/esm/library.js +3 -3
  21. package/dist/esm/library.js.map +1 -1
  22. package/dist/index.d.ts +108 -2
  23. package/docs/README.md +264 -0
  24. package/docs/components/atoms/ActionImage.md +119 -0
  25. package/docs/components/atoms/Button.md +197 -0
  26. package/docs/components/atoms/Checkbox.md +299 -0
  27. package/docs/components/atoms/CheckboxItem.md +314 -0
  28. package/docs/components/atoms/Chip.md +380 -0
  29. package/docs/components/atoms/CustomToggle.md +270 -0
  30. package/docs/components/atoms/Icon.md +365 -0
  31. package/docs/components/atoms/IconButton.md +407 -0
  32. package/docs/components/atoms/Image.md +448 -0
  33. package/docs/components/atoms/Input.md +430 -0
  34. package/docs/components/atoms/ListItem.md +502 -0
  35. package/docs/components/atoms/Password.md +472 -0
  36. package/docs/components/atoms/RadioButton.md +614 -0
  37. package/docs/components/atoms/RadioButtonItem.md +588 -0
  38. package/docs/components/atoms/ResponsiveComponent.md +612 -0
  39. package/docs/components/atoms/SelectListItem.md +609 -0
  40. package/docs/components/atoms/Slider.md +605 -0
  41. package/docs/components/atoms/Spinner.md +605 -0
  42. package/docs/components/atoms/Text.md +463 -0
  43. package/docs/components/atoms/TextArea.md +670 -0
  44. package/docs/components/atoms/ToastNotification.md +668 -0
  45. package/docs/components/atoms/Toggle.md +737 -0
  46. package/docs/components/atoms/ToggleButton.md +751 -0
  47. package/docs/components/atoms/Tooltip.md +391 -0
  48. package/docs/components/molecules/Accordion.md +440 -0
  49. package/docs/components/molecules/AccordionGroup.md +547 -0
  50. package/docs/components/molecules/ActionCard.md +546 -0
  51. package/docs/components/molecules/Breadcrumb.md +403 -0
  52. package/docs/components/molecules/Breadcrumbs.md +485 -0
  53. package/docs/components/molecules/ButtonGroup.md +383 -0
  54. package/docs/components/molecules/Card.md +298 -0
  55. package/docs/components/molecules/ChipInput.md +646 -0
  56. package/docs/components/molecules/ContextMenu.md +768 -0
  57. package/docs/components/molecules/CustomTimeSelector.md +116 -0
  58. package/docs/components/molecules/DatePicker.md +516 -0
  59. package/docs/components/molecules/DateTimeSelector.md +166 -0
  60. package/docs/components/molecules/FormField.md +312 -0
  61. package/docs/components/molecules/Grid.md +577 -0
  62. package/docs/components/molecules/GridItem.md +834 -0
  63. package/docs/components/molecules/GridList.md +244 -0
  64. package/docs/components/molecules/List.md +485 -0
  65. package/docs/components/molecules/Modal.md +470 -0
  66. package/docs/components/molecules/ModalFooter.md +702 -0
  67. package/docs/components/molecules/ModalHeader.md +756 -0
  68. package/docs/components/molecules/ModalProvider.md +205 -0
  69. package/docs/components/molecules/Nav.md +530 -0
  70. package/docs/components/molecules/NavItem.md +572 -0
  71. package/docs/components/molecules/NavLink.md +499 -0
  72. package/docs/components/molecules/Option.md +521 -0
  73. package/docs/components/molecules/Pagination.md +592 -0
  74. package/docs/components/molecules/PaginationNumberField.md +722 -0
  75. package/docs/components/molecules/Popover.md +516 -0
  76. package/docs/components/molecules/ProgressBar.md +624 -0
  77. package/docs/components/molecules/RadioGroup.md +831 -0
  78. package/docs/components/molecules/RepeaterList.md +185 -0
  79. package/docs/components/molecules/Select.md +402 -0
  80. package/docs/components/molecules/SortableTrigger.md +82 -0
  81. package/docs/components/molecules/useModal.md +379 -0
  82. package/docs/components/organisms/Dropzone.md +346 -0
  83. package/docs/components/organisms/DropzoneClear.md +135 -0
  84. package/docs/components/organisms/DropzoneContent.md +216 -0
  85. package/docs/components/organisms/DropzoneFilename.md +191 -0
  86. package/docs/components/organisms/DropzoneSupportedFormats.md +184 -0
  87. package/docs/components/organisms/DropzoneTrigger.md +209 -0
  88. package/docs/components/organisms/Form.md +533 -0
  89. package/docs/components/organisms/SlideOutPanel.md +662 -0
  90. package/docs/components/organisms/TabContent.md +902 -0
  91. package/docs/components/organisms/TabItem.md +1091 -0
  92. package/docs/components/organisms/Table.md +611 -0
  93. package/docs/components/organisms/TableBody.md +679 -0
  94. package/docs/components/organisms/TableCell.md +482 -0
  95. package/docs/components/organisms/TableHeader.md +513 -0
  96. package/docs/components/organisms/TableHeaderCell.md +661 -0
  97. package/docs/components/organisms/TableRow.md +715 -0
  98. package/docs/components/organisms/Tabs.md +1330 -0
  99. package/docs/components/utils/ConditionalView.md +568 -0
  100. package/docs/components/utils/RenderStateView.md +726 -0
  101. package/docs/components/utils/WrapTextNodes.md +614 -0
  102. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, FormHTMLAttributes, Ref, InputHTMLAttributes, TextareaHTMLAttributes, LiHTMLAttributes, CSSProperties, RefObject, TableHTMLAttributes, TdHTMLAttributes, AriaRole, KeyboardEventHandler } from 'react';
3
+ import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, FormHTMLAttributes, Ref, InputHTMLAttributes, TextareaHTMLAttributes, ComponentType, LiHTMLAttributes, CSSProperties, RefObject, TableHTMLAttributes, TdHTMLAttributes, AriaRole, KeyboardEventHandler } from 'react';
4
4
  import { LinkProps } from 'react-router-dom';
5
5
  import { Plugin } from 'flatpickr/dist/types/options';
6
6
  import FlatPickr from 'react-flatpickr';
@@ -1468,6 +1468,97 @@ type ModalProps = {
1468
1468
  */
1469
1469
  declare const Modal: (props: ModalProps) => react_jsx_runtime.JSX.Element;
1470
1470
 
1471
+ /**
1472
+ * Base props that all modal components must implement.
1473
+ */
1474
+ type ModalComponentProps = {
1475
+ /** Controls whether the modal is visible */
1476
+ show?: boolean;
1477
+ /** Callback function to handle modal cancellation/dismissal */
1478
+ onCancel?: () => void;
1479
+ };
1480
+ /**
1481
+ * Props for the ModalProvider component.
1482
+ */
1483
+ type ModalProviderProps = {
1484
+ /** Child components that will have access to the modal context */
1485
+ children: ReactNode;
1486
+ };
1487
+ /**
1488
+ * Return type for the useModal hook when a component type is provided.
1489
+ */
1490
+ type UseModalReturn<T extends ModalComponentProps> = {
1491
+ /**
1492
+ * Opens the modal with the specified props.
1493
+ * Uses the component type provided to the hook.
1494
+ *
1495
+ * @param props - Props to pass to the modal component
1496
+ * @returns void
1497
+ */
1498
+ openModal: (props: T) => void;
1499
+ /**
1500
+ * Closes the modal instance managed by this hook.
1501
+ *
1502
+ * @returns void
1503
+ */
1504
+ closeModal: () => void;
1505
+ /** The unique identifier for this modal instance */
1506
+ modalId: string;
1507
+ };
1508
+
1509
+ /**
1510
+ * Provider component that manages modal state and renders modal instances.
1511
+ * Wraps child components with modal context and renders all active modals.
1512
+ *
1513
+ * @param props - The provider props
1514
+ * @param props.children - Child components that will have access to modal context
1515
+ *
1516
+ * @example
1517
+ * ```tsx
1518
+ * function App() {
1519
+ * return (
1520
+ * <ModalProvider>
1521
+ * <MyApplication />
1522
+ * </ModalProvider>
1523
+ * );
1524
+ * }
1525
+ * ```
1526
+ */
1527
+ declare const ModalProvider: ({ children }: ModalProviderProps) => react_jsx_runtime.JSX.Element;
1528
+
1529
+ /**
1530
+ * Custom hook that provides an abstraction layer over the modal context.
1531
+ * Takes a component type and returns functions to open/close that specific modal.
1532
+ * Uses React's useId hook to generate a unique identifier for the modal instance.
1533
+ *
1534
+ * @template T - The props type for the modal component (must extend ModalComponentProps)
1535
+ * @param Component - React component to use for the modal
1536
+ * @returns An object containing openModal, closeModal functions and the modalId
1537
+ *
1538
+ * @example
1539
+ * ```tsx
1540
+ * function MyComponent() {
1541
+ * const confirmationModal = useModal(ConfirmationModal);
1542
+ *
1543
+ * const handleDelete = () => {
1544
+ * confirmationModal.openModal({
1545
+ * title: 'Delete Item',
1546
+ * message: 'Are you sure you want to delete this item?',
1547
+ * show: true,
1548
+ * onConfirm: () => {
1549
+ * // perform delete
1550
+ * confirmationModal.closeModal();
1551
+ * },
1552
+ * onCancel: confirmationModal.closeModal
1553
+ * });
1554
+ * };
1555
+ *
1556
+ * return <button onClick={handleDelete}>Delete</button>;
1557
+ * }
1558
+ * ```
1559
+ */
1560
+ declare const useModal: <T extends ModalComponentProps>(Component: ComponentType<T>) => UseModalReturn<T>;
1561
+
1471
1562
  /**
1472
1563
  * Defines the type of modal footer layout.
1473
1564
  * @default "1Button"
@@ -1711,6 +1802,21 @@ type ProgressBarProps = {
1711
1802
 
1712
1803
  declare const ProgressBar: React__default.FC<ProgressBarProps>;
1713
1804
 
1805
+ type RadioGroupProps = ControlledFormComponentProps<string | number> & {
1806
+ className?: string;
1807
+ /**
1808
+ * The radio buttons to render
1809
+ */
1810
+ children: React.ReactElement<RadioButtonProps> | React.ReactElement<RadioButtonProps>[];
1811
+ /**
1812
+ * The orientation of the radio group
1813
+ * @default 'vertical'
1814
+ */
1815
+ orientation?: 'horizontal' | 'vertical';
1816
+ };
1817
+
1818
+ declare const RadioGroup: (props: RadioGroupProps) => react_jsx_runtime.JSX.Element;
1819
+
1714
1820
  /**
1715
1821
  * Props for the Option component, extending LiHTMLAttributes<HTMLLIElement>.
1716
1822
  * Represents an option within a Select component.
@@ -2319,4 +2425,4 @@ declare const NotificationContext: React__default.Context<NotificationContextVal
2319
2425
  declare const NotificationProvider: React__default.FC<NotificationProviderProps>;
2320
2426
  declare const useNotification: () => NotificationContextValue;
2321
2427
 
2322
- export { type AccessibilityActions, type AccessibilityProps, Accordion, AccordionDetails, AccordionGroup, AccordionSummary, ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, Checkbox, CheckboxItem, type CheckboxItemProps, type CheckboxLabelAlignmentEnum, type CheckboxProps, type CheckboxSizeEnum, type CheckboxTypeEnum, Chip, _default as ChipInput, type ChipInputProps, type ChipListItemProps, type ChipListItemTypeEnum, type ChipProps, ConditionalView, type ConditionalViewProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DatePicker, type DatePickerProps, SortableItem as DraggableItem, SortableTrigger as DraggableItemTrigger, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, DropzoneSupportedFormats, DropzoneTrigger, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps$1 as ListItemProps, type ListProps, Modal, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, type NotificationContainerProps, NotificationContext, NotificationProvider, Option, type OptionProps, type OverlayDirectionEnum, Pagination, PaginationNumberField, type PaginationNumberFieldProps, type PaginationProps, Password, Popover, type PopoverHandle, type PopoverProps, ProgressBar, type ProgressBarProps, RadioButton, RadioButtonItem, type RadioButtonItemProps, type RadioButtonLabelAlignmentEnum, type RadioButtonProps, type RadioButtonSizeEnum, RenderStateView, type RenderStateViewProps, RepeaterList, type RepeaterListProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, SlideOutPanel, type SlideOutPanelDirectionEnum, type SlideOutPanelProps, type SlideOutPanelSizeEnum, Slider, type SliderProps, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, Toggle, ToggleButton, type ToggleButtonProps, type ToggleLabelAlignmentEnum, type ToggleProps, Tooltip, type TooltipProps, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDropzoneContext, useNotification, useSelectContext, useTab };
2428
+ export { type AccessibilityActions, type AccessibilityProps, Accordion, AccordionDetails, AccordionGroup, AccordionSummary, ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, Checkbox, CheckboxItem, type CheckboxItemProps, type CheckboxLabelAlignmentEnum, type CheckboxProps, type CheckboxSizeEnum, type CheckboxTypeEnum, Chip, _default as ChipInput, type ChipInputProps, type ChipListItemProps, type ChipListItemTypeEnum, type ChipProps, ConditionalView, type ConditionalViewProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DatePicker, type DatePickerProps, SortableItem as DraggableItem, SortableTrigger as DraggableItemTrigger, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, DropzoneSupportedFormats, DropzoneTrigger, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps$1 as ListItemProps, type ListProps, Modal, type ModalComponentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalProvider, type ModalProviderProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, type NotificationContainerProps, NotificationContext, NotificationProvider, Option, type OptionProps, type OverlayDirectionEnum, Pagination, PaginationNumberField, type PaginationNumberFieldProps, type PaginationProps, Password, Popover, type PopoverHandle, type PopoverProps, ProgressBar, type ProgressBarProps, RadioButton, RadioButtonItem, type RadioButtonItemProps, type RadioButtonLabelAlignmentEnum, type RadioButtonProps, type RadioButtonSizeEnum, RadioGroup, type RadioGroupProps, RenderStateView, type RenderStateViewProps, RepeaterList, type RepeaterListProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, SlideOutPanel, type SlideOutPanelDirectionEnum, type SlideOutPanelProps, type SlideOutPanelSizeEnum, Slider, type SliderProps, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, Toggle, ToggleButton, type ToggleButtonProps, type ToggleLabelAlignmentEnum, type ToggleProps, Tooltip, type TooltipProps, type UseModalReturn, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDropzoneContext, useModal, useNotification, useSelectContext, useTab };
package/docs/README.md ADDED
@@ -0,0 +1,264 @@
1
+ # @delightui/components
2
+
3
+ A comprehensive React component library built with TypeScript, providing a complete set of UI components following atomic design principles. This library offers flexible, accessible, and highly customizable components for building modern web applications.
4
+
5
+ ## Features
6
+
7
+ - **Atomic Design Architecture**: Components organized into Atoms, Molecules, and Organisms
8
+ - **TypeScript Support**: Full TypeScript support with comprehensive type definitions
9
+ - **Accessible**: Built with accessibility in mind following WCAG guidelines
10
+ - **Customizable**: Flexible theming system with SCSS modules
11
+ - **Modern React**: Built with React 18+ and modern hooks
12
+ - **Storybook Integration**: Interactive component documentation and testing
13
+ - **Testing**: Comprehensive test coverage with Vitest and Testing Library
14
+
15
+ ## Component Library
16
+
17
+ ### Atoms
18
+ Basic building blocks and fundamental UI elements:
19
+
20
+ - **[ActionImage](./docs/components/atoms/ActionImage.md)** - Interactive image component with action triggers that allows users to perform actions when interacting with images. This component combines visual display with user interaction capabilities.
21
+ - *Aliases: Action Image, Interactive Image, Clickable Image, Image Button*
22
+
23
+ - **[Button](./docs/components/atoms/Button.md)** - Flexible button component with multiple variants, sizes, and states. Supports icons, loading states, and various styling options to fit different use cases throughout the application.
24
+ - *Aliases: Action Button, CTA (Call to Action), Click Button, Submit Button*
25
+
26
+ - **[Checkbox](./docs/components/atoms/Checkbox.md)** - Customizable checkbox input component with support for controlled and uncontrolled states, various sizes, label positioning, and form integration. Includes proper accessibility features and validation support.
27
+ - *Aliases: Check Box, Tick Box, Selection Box, Boolean Input, Toggle Checkbox*
28
+
29
+ - **[CheckboxItem](./docs/components/atoms/CheckboxItem.md)** - Enhanced checkbox component with integrated label styling and an optional right-side action button. Extends the base Checkbox functionality with additional interactive elements for more complex use cases.
30
+ - *Aliases: Checkbox List Item, Enhanced Checkbox, Action Checkbox, Checkbox with Button*
31
+
32
+ - **[Chip](./docs/components/atoms/Chip.md)** - Small, compact elements used for tags, filters, categories, and interactive selections. Supports multiple visual styles, sizes, icons, and dismissible functionality for versatile use cases.
33
+ - *Aliases: Tag, Badge, Label, Token, Filter Chip*
34
+
35
+ - **[CustomToggle](./docs/components/atoms/CustomToggle.md)** - A highly customizable toggle component that allows you to define custom content for both the on and off states. This component provides a flexible alternative to the standard Toggle component by letting you specify what content appears in each state, making it perfect for scenarios where you need more than just basic on/off visual states.
36
+ - *Aliases: CustomToggle, CustomSwitch, ContentToggle*
37
+
38
+ - **[Icon](./docs/components/atoms/Icon.md)** - SVG icon component with dynamic imports that supports multiple icon styles and sizes. Provides a consistent way to display icons throughout the application with automatic SVG loading.
39
+ - *Aliases: SVG Icon, Vector Icon, Glyph, Symbol*
40
+
41
+ - **[IconButton](./docs/components/atoms/IconButton.md)** - A specialized button component designed specifically for displaying icons without text content. IconButton inherits most functionality from the Button component but is optimized for icon-only interactions.
42
+ - *Aliases: IconButton, IconBtn, ActionIcon*
43
+
44
+ - **[Image](./docs/components/atoms/Image.md)** - A versatile image component that extends the standard HTML img element with enhanced features including fallback support, different fit options, loading states, and aspect ratio control.
45
+ - *Aliases: Image, Img, Picture*
46
+
47
+ - **[Input](./docs/components/atoms/Input.md)** - Text input component with validation, icons, and form integration support. Provides a flexible foundation for collecting user text input with proper accessibility and styling.
48
+ - *Aliases: Text Input, Text Field, Input Field, Form Input*
49
+
50
+ - **[ListItem](./docs/components/atoms/ListItem.md)** - A versatile list item component that provides a standardized way to display individual items within lists. It supports leading and trailing icons, click interactions, and disabled states, making it ideal for navigation menus, option lists, and interactive collections.
51
+ - *Aliases: ListItem, ListElement, Item*
52
+
53
+ - **[Password](./docs/components/atoms/Password.md)** - A specialized input component designed specifically for password entry. It extends the Input component with built-in password visibility toggle functionality, providing a secure and user-friendly way to handle password inputs.
54
+ - *Aliases: Password, PasswordInput, SecureInput*
55
+
56
+ - **[RadioButton](./docs/components/atoms/RadioButton.md)** - A radio button component that allows users to select one option from a group of mutually exclusive choices. It provides flexible sizing, label positioning, and integrates seamlessly with form handling.
57
+ - *Aliases: RadioButton, Radio, OptionButton*
58
+
59
+ - **[RadioButtonItem](./docs/components/atoms/RadioButtonItem.md)** - An enhanced radio button component that extends the basic RadioButton with additional action button functionality. It provides all the standard radio button features plus an optional right-side action button, making it perfect for scenarios where you need both selection and additional actions on radio options.
60
+ - *Aliases: RadioButtonItem, RadioItem, ActionRadioButton*
61
+
62
+ - **[ResponsiveComponent](./docs/components/atoms/ResponsiveComponent.md)** - A utility component that renders different components based on screen width breakpoints. It provides a declarative way to handle responsive design by allowing you to specify different component configurations for different screen sizes, making it easy to create adaptive user interfaces.
63
+ - *Aliases: ResponsiveComponent, ResponsiveRenderer, BreakpointComponent*
64
+
65
+ - **[SelectListItem](./docs/components/atoms/SelectListItem.md)** - A specialized list item component designed specifically for use within select dropdowns and option lists. It provides a consistent interface for selectable options with support for icons, disabled states, and click interactions.
66
+ - *Aliases: SelectListItem, SelectOption, DropdownItem*
67
+
68
+ - **[Slider](./docs/components/atoms/Slider.md)** - A versatile slider component that allows users to select numeric values within a specified range. It supports both single-value and range selection modes, with customizable min/max values, step sizes, and display options.
69
+ - *Aliases: Slider, Range, RangeSlider*
70
+
71
+ - **[Spinner](./docs/components/atoms/Spinner.md)** - A loading indicator component that displays an animated spinner to indicate processing, loading, or waiting states. This component provides visual feedback to users during asynchronous operations and helps maintain engagement during loading periods.
72
+ - *Aliases: Spinner, LoadingSpinner, Loader*
73
+
74
+ - **[Text](./docs/components/atoms/Text.md)** - A comprehensive text component that provides a standardized way to display text content with consistent typography. It offers extensive customization options including different text types, weights, decorations, transformations, and layout controls, making it the foundation for all text display in the UI.
75
+ - *Aliases: Text, Typography, TextElement*
76
+
77
+ - **[TextArea](./docs/components/atoms/TextArea.md)** - A multi-line text input component that extends the standard HTML textarea with enhanced form integration capabilities. It provides a consistent interface for collecting longer text inputs from users, with full support for controlled and uncontrolled usage patterns, validation, and accessibility features.
78
+ - *Aliases: TextArea, MultilineInput, TextBox*
79
+
80
+ - **[ToastNotification](./docs/components/atoms/ToastNotification.md)** - A versatile notification component that displays temporary messages to users. It supports different styles (neutral, success, error), customizable icons, dismissible behavior, and auto-dismiss functionality.
81
+ - *Aliases: ToastNotification, Toast, Notification*
82
+
83
+ - **[Toggle](./docs/components/atoms/Toggle.md)** - A toggle switch component that allows users to switch between two states (on/off, enabled/disabled). It provides a visual alternative to checkboxes for boolean inputs and includes flexible label positioning options.
84
+ - *Aliases: Toggle, Switch, ToggleSwitch*
85
+
86
+ - **[ToggleButton](./docs/components/atoms/ToggleButton.md)** - A button component that maintains a pressed/unpressed state, functioning as a toggle between two states. It combines the visual appearance of a button with the state behavior of a toggle, making it perfect for scenarios where you need a button-like interface for binary choices or mode switches.
87
+ - *Aliases: ToggleButton, PressButton, StateButton*
88
+
89
+ - **[Tooltip](./docs/components/atoms/Tooltip.md)** - A contextual tooltip component that displays helpful information when users interact with elements. Supports multiple trigger actions (hover, click, follow), positioning options, and customizable styling with arrow indicators for enhanced user experience.
90
+ - *Aliases: Tooltip, Popover, Hint, Help Text, Info Bubble*
91
+
92
+ ### Molecules
93
+ Combinations of atoms forming more complex UI patterns:
94
+
95
+ - **[Accordion](./docs/components/molecules/Accordion.md)** - A collapsible content component that allows users to expand and collapse sections of information. Supports controlled and uncontrolled modes, custom icons, different sizes, and can be used individually or grouped together for organizing complex content hierarchies.
96
+ - *Aliases: Accordion, Collapsible, Expandable, DropDown, Disclosure*
97
+
98
+ - **[AccordionGroup](./docs/components/molecules/AccordionGroup.md)** - A container component that manages multiple accordion items as a group, allowing for coordinated behavior like ensuring only one accordion is open at a time. Provides structured organization for related collapsible content sections.
99
+ - *Aliases: AccordionGroup, AccordionSet, CollapsibleGroup*
100
+
101
+ - **[ActionCard](./docs/components/molecules/ActionCard.md)** - A flexible card component that functions as a clickable or interactive container. It can serve as a navigation element or trigger actions while maintaining the visual structure of a card. Perfect for creating interactive tiles, feature cards, or clickable content blocks.
102
+ - *Aliases: ActionCard, ClickableCard, InteractiveCard*
103
+
104
+ - **[Breadcrumb](./docs/components/molecules/Breadcrumb.md)** - An individual breadcrumb item component that represents a single step in a navigation path. Can function as a clickable link or a static indicator, with support for icons and selection states to show the current location.
105
+ - *Aliases: Breadcrumb, BreadcrumbItem, PathItem*
106
+
107
+ - **[Breadcrumbs](./docs/components/molecules/Breadcrumbs.md)** - A navigation component that displays the current page's location within a hierarchical structure. Provides users with a clear path to understand their current position and navigate back to previous levels, enhancing website navigation and user experience.
108
+ - *Aliases: Breadcrumbs, BreadcrumbTrail, NavigationPath, PathNavigation, Breadcrumb Navigation*
109
+
110
+ - **[ButtonGroup](./docs/components/molecules/ButtonGroup.md)** - A container component that groups related buttons together with consistent spacing and styling. Supports horizontal and vertical layouts with different visual treatments to create cohesive button collections for actions, navigation, and selection interfaces.
111
+ - *Aliases: ButtonGroup, ActionGroup, ButtonSet, ToolbarGroup, ButtonCluster*
112
+
113
+ - **[Card](./docs/components/molecules/Card.md)** - A flexible container component that provides a consistent visual treatment for grouping related content. It serves as a foundational layout element with proper spacing, borders, and background styling, making it perfect for organizing information into discrete, scannable sections.
114
+ - *Aliases: Card, Panel, Tile, ContentCard*
115
+
116
+ - **[ChipInput](./docs/components/molecules/ChipInput.md)** - An input field component that allows users to enter multiple values as chips or tags. Automatically converts typed input into removable chip elements, providing an intuitive interface for managing lists of items like tags, categories, email addresses, or any collection of discrete values.
117
+ - *Aliases: ChipInput, TagInput, TokenInput, MultiValueInput, ChipField*
118
+
119
+ - **[ContextMenu](./docs/components/molecules/ContextMenu.md)** - A contextual menu component that appears on right-click or trigger actions, providing quick access to relevant actions and options. Supports nested menus, separators, and different item types for creating rich interaction experiences.
120
+ - *Aliases: ContextMenu, RightClickMenu, ActionMenu*
121
+
122
+ - **[CustomTimeSelector](./docs/components/molecules/CustomTimeSelector.md)** - A Flatpickr plugin component that provides a custom time selection interface with dropdown functionality. It creates an enhanced time input field with a searchable time options dropdown, replacing the default Flatpickr time picker with a more user-friendly time selection experience.
123
+ - *Aliases: CustomTimeSelector, TimeDropdownPlugin, TimePickerPlugin, CustomTimePicker*
124
+
125
+ - **[DatePicker](./docs/components/molecules/DatePicker.md)** - A comprehensive date and time selection component that provides an intuitive interface for choosing dates, times, or date ranges. Features calendar views, time selection, and flexible formatting options to handle various date input scenarios.
126
+ - *Aliases: DatePicker, Calendar, DateSelector*
127
+
128
+ - **[DateTimeSelector](./docs/components/molecules/DateTimeSelector.md)** - A Flatpickr plugin component that provides a combined date and time selection interface with a custom time input field and dropdown. It enhances the DatePicker component by adding a labeled time input section alongside the calendar, providing a comprehensive date-time selection experience.
129
+ - *Aliases: DateTimeSelector, DateTimeDropdownPlugin, DateTimePickerPlugin, CombinedDateTimePicker*
130
+
131
+ - **[FormField](./docs/components/molecules/FormField.md)** - A wrapper component that combines form inputs with labels, validation messages, and help text. It provides a consistent structure for form elements while handling validation states, error display, and accessibility requirements automatically.
132
+ - *Aliases: FormField, FieldWrapper, FormGroup*
133
+
134
+ - **[Grid](./docs/components/molecules/Grid.md)** - A CSS Grid-based layout component that provides a flexible and powerful way to create responsive grid layouts. Offers control over columns, rows, gaps, and alignment to create complex layouts with minimal effort.
135
+ - *Aliases: Grid, GridLayout, CSSGrid*
136
+
137
+ - **[GridItem](./docs/components/molecules/GridItem.md)** - An individual item within a Grid component that provides control over its positioning, spanning, and alignment within the grid system. Works in conjunction with the Grid component to create flexible layouts.
138
+ - *Aliases: GridItem, GridCell, GridElement*
139
+
140
+ - **[GridList](./docs/components/molecules/GridList.md)** - A grid-based list component that extends the standard List component with CSS Grid layout functionality. It automatically arranges list items in a responsive grid format with customizable columns and spacing, providing an organized way to display collections of data in a grid pattern.
141
+ - *Aliases: GridList, GridCollection, DataGrid, GridContainer*
142
+
143
+ - **[List](./docs/components/molecules/List.md)** - A flexible list component with sorting capabilities that provides a standardized way to render collections of data. Supports both regular and sortable list rendering with drag-and-drop functionality for reordering items.
144
+ - *Aliases: List, DataList, ItemList*
145
+
146
+ - **[Modal](./docs/components/molecules/Modal.md)** - A comprehensive modal system that displays content in a layer above the main application interface. Includes both traditional modal components and a modern context-based system for programmatic modal management. Provides flexible sizing options, customizable header and footer areas, backdrop controls, and accessibility features for creating overlay dialogs, confirmations, and forms.
147
+ - *Aliases: Modal, Dialog, Popup, Overlay, Lightbox*
148
+
149
+ - **[ModalProvider](./docs/components/molecules/ModalProvider.md)** - Context provider component that manages modal state across your application. Enables programmatic modal management by maintaining a centralized registry of active modals and providing functions to open and close them from anywhere in your component tree.
150
+ - *Aliases: ModalProvider, ModalContext*
151
+
152
+ - **[ModalFooter](./docs/components/molecules/ModalFooter.md)** - A specialized footer component designed for use within Modal components. Provides consistent styling and layout for action buttons and other footer content, with predefined layouts for common button configurations.
153
+ - *Aliases: ModalFooter, DialogFooter, ModalActions*
154
+
155
+ - **[ModalHeader](./docs/components/molecules/ModalHeader.md)** - A specialized header component designed for use within Modal components. Provides consistent styling for modal titles and includes built-in close functionality with customizable icon buttons.
156
+ - *Aliases: ModalHeader, DialogHeader, ModalTitle*
157
+
158
+ - **[Nav](./docs/components/molecules/Nav.md)** - A navigation container component that provides a flexible foundation for building navigation interfaces. Supports various layout options and integrates seamlessly with routing libraries for creating menus, sidebars, and navigation bars.
159
+ - *Aliases: Nav, Navigation, Menu*
160
+
161
+ - **[NavItem](./docs/components/molecules/NavItem.md)** - An individual navigation item component that represents a single entry within a navigation menu. Provides consistent styling and behavior for navigation elements while supporting active states and nested structures.
162
+ - *Aliases: NavItem, NavigationItem, MenuItem*
163
+
164
+ - **[NavLink](./docs/components/molecules/NavLink.md)** - A navigation link component that extends standard link functionality with additional styling and state management. Integrates with routing libraries and provides visual feedback for active, hover, and focus states.
165
+ - *Aliases: NavLink, NavigationLink, MenuLink*
166
+
167
+ - **[Option](./docs/components/molecules/Option.md)** - A select dropdown option component that represents individual choices within select components. Provides consistent styling, support for icons, and proper accessibility attributes for creating rich dropdown experiences.
168
+ - *Aliases: Option, SelectOption, Choice*
169
+
170
+ - **[Pagination](./docs/components/molecules/Pagination.md)** - Pagination controls for navigating through multiple pages of content. Provides a complete interface with page numbers, next/previous navigation, and customizable display options for handling large datasets.
171
+ - *Aliases: Pagination, Pager, PageNavigation*
172
+
173
+ - **[PaginationNumberField](./docs/components/molecules/PaginationNumberField.md)** - A specialized number input component designed for pagination controls. Allows users to directly enter page numbers with validation and integration with pagination systems.
174
+ - *Aliases: PaginationNumberField, PageNumberInput, PaginationInput*
175
+
176
+ - **[Popover](./docs/components/molecules/Popover.md)** - A floating popover component that displays additional content in a positioned overlay. Supports various trigger methods, positioning options, and arrow indicators for creating contextual information displays and interactive menus.
177
+ - *Aliases: Popover, Popup, FloatingContent*
178
+
179
+ - **[ProgressBar](./docs/components/molecules/ProgressBar.md)** - A progress indicator component that visually represents the completion status of tasks or processes. Supports different styles, sizes, and display options including percentage labels and custom formatting.
180
+ - *Aliases: ProgressBar, ProgressIndicator, LoadingBar*
181
+
182
+ - **[RadioGroup](./docs/components/molecules/RadioGroup.md)** - A group container component for radio button options that manages selection state and provides coordinated behavior between radio button children. Supports both horizontal and vertical layouts, form integration, controlled and uncontrolled modes, and accessibility features for creating option selectors, preference settings, and choice-based inputs.
183
+ - *Aliases: RadioGroup, RadioButtonGroup, OptionGroup, ChoiceGroup, SelectionGroup, RadioSet*
184
+
185
+ - **[RepeaterList](./docs/components/molecules/RepeaterList.md)** - A simple list rendering component that iterates over an array of data and renders each item using a specified component. It provides a minimal, lightweight approach to rendering collections without additional layout or styling, making it perfect for simple repetitive content rendering.
186
+ - *Aliases: RepeaterList, ItemRepeater, DataRepeater, ComponentRepeater*
187
+
188
+ - **[Select](./docs/components/molecules/Select.md)** - A dropdown selection component that allows users to choose from a list of options. Supports single and multiple selections, custom icons, placeholder text, and integrates seamlessly with form validation. Built with accessibility and keyboard navigation in mind.
189
+ - *Aliases: Select, Dropdown, ComboBox, Picker, OptionList*
190
+
191
+ - **[SortableTrigger](./docs/components/molecules/SortableTrigger.md)** - A trigger component that initiates drag-and-drop functionality for sortable list items. It provides a dedicated draggable handle with proper visual feedback and accessibility features, allowing users to easily identify and interact with sortable elements.
192
+ - *Aliases: SortableTrigger, DragHandle, DragTrigger, SortHandle*
193
+
194
+ ### Organisms
195
+ Complex components combining multiple molecules and atoms:
196
+
197
+ - **[Dropzone](./docs/components/organisms/Dropzone.md)** - A file upload component with drag-and-drop functionality that provides an intuitive interface for users to upload files. Supports multiple file selection, file type validation, drag-and-drop gestures, and progress tracking for comprehensive file upload experiences.
198
+ - *Aliases: Dropzone, FileUpload, DragDropUpload*
199
+
200
+ - **[DropzoneClear](./docs/components/organisms/DropzoneClear.md)** - A specialized button component for clearing files from a dropzone. It integrates with the Dropzone context to provide a one-click solution for removing all uploaded files, with customizable icon display and consistent styling that matches the dropzone interface.
201
+ - *Aliases: DropzoneClear, ClearFiles, ResetDropzone, RemoveAllFiles*
202
+
203
+ - **[DropzoneContent](./docs/components/organisms/DropzoneContent.md)** - The content area component specifically designed for use within Dropzone components. Provides customizable content display for different dropzone states including empty, dragging, and file preview states.
204
+ - *Aliases: DropzoneContent, UploadContent, FileDropContent*
205
+
206
+ - **[DropzoneFilename](./docs/components/organisms/DropzoneFilename.md)** - A text component that displays the filename of uploaded files in a dropzone. It automatically retrieves file information from the Dropzone context and renders the filename with consistent text styling, supporting multiple files through index selection.
207
+ - *Aliases: DropzoneFilename, FileName, FileNameDisplay, UploadedFileName*
208
+
209
+ - **[DropzoneSupportedFormats](./docs/components/organisms/DropzoneSupportedFormats.md)** - A text component that automatically displays the supported file formats for a dropzone. It reads the accepted file types from the Dropzone context and formats them into a readable list, helping users understand what file types they can upload.
210
+ - *Aliases: DropzoneSupportedFormats, SupportedFormats, AcceptedFileTypes, FileFormatList*
211
+
212
+ - **[DropzoneTrigger](./docs/components/organisms/DropzoneTrigger.md)** - A button component that triggers the file selection dialog for a dropzone. It integrates with the Dropzone context to provide a clickable interface for users to browse and select files, serving as an alternative or complement to drag-and-drop functionality.
213
+ - *Aliases: DropzoneTrigger, FileSelectButton, BrowseButton, UploadTrigger*
214
+
215
+ - **[Form](./docs/components/organisms/Form.md)** - A comprehensive form management component that provides state management, validation, error handling, and submission workflows. Built with TypeScript for type safety and supports both controlled and uncontrolled form patterns with extensive validation capabilities.
216
+ - *Aliases: Form, FormProvider, FormContainer, FormWrapper*
217
+
218
+ - **[SlideOutPanel](./docs/components/organisms/SlideOutPanel.md)** - A sliding panel component that provides additional content space by sliding in from the edge of the screen. Perfect for displaying detailed information, settings, or secondary actions without navigating away from the current context.
219
+ - *Aliases: SlideOutPanel, SidePanel, DrawerPanel*
220
+
221
+ - **[Table](./docs/components/organisms/Table.md)** - A comprehensive data table component that provides structure for presenting tabular data in an organized, accessible format. The Table component serves as the root container for table content and offers features like sticky headers for enhanced usability in data-heavy interfaces.
222
+ - *Aliases: Table, DataTable, Grid, TableContainer, DataGrid*
223
+
224
+ - **[TableBody](./docs/components/organisms/TableBody.md)** - The body container component for tables that wraps and organizes table rows containing the main data content. Provides proper semantic structure and styling for the data portion of table components.
225
+ - *Aliases: TableBody, DataTableBody, GridBody*
226
+
227
+ - **[TableCell](./docs/components/organisms/TableCell.md)** - An individual table cell component that displays data within table rows. Supports various content types, alignment options, and styling variants for flexible data presentation in table structures.
228
+ - *Aliases: TableCell, DataCell, GridCell*
229
+
230
+ - **[TableHeader](./docs/components/organisms/TableHeader.md)** - The header container component for tables that organizes and styles column headers. Provides consistent structure and styling for table headers with support for sorting indicators and interactive elements.
231
+ - *Aliases: TableHeader, DataTableHeader, GridHeader*
232
+
233
+ - **[TableHeaderCell](./docs/components/organisms/TableHeaderCell.md)** - An individual header cell component that displays column titles and controls within table headers. Supports sorting functionality, alignment options, and interactive elements for comprehensive table column management.
234
+ - *Aliases: TableHeaderCell, HeaderCell, ColumnHeader*
235
+
236
+ - **[TableRow](./docs/components/organisms/TableRow.md)** - A table row container component that organizes and styles individual rows of data within tables. Provides consistent row styling, hover states, and selection capabilities for enhanced table interaction.
237
+ - *Aliases: TableRow, DataRow, GridRow*
238
+
239
+ - **[TabContent](./docs/components/organisms/TabContent.md)** - The content area component for tab panels that displays the associated content for each tab. Works in conjunction with Tabs and TabItem components to create complete tabbed interface experiences.
240
+ - *Aliases: TabContent, TabPanel, PanelContent*
241
+
242
+ - **[TabItem](./docs/components/organisms/TabItem.md)** - An individual tab item component that represents a single tab within a tab navigation system. Provides tab styling, active states, and click interactions for building comprehensive tabbed interfaces.
243
+ - *Aliases: TabItem, Tab, TabButton*
244
+
245
+ - **[Tabs](./docs/components/organisms/Tabs.md)** - A tab navigation component that provides a complete tabbed interface system. Manages tab selection, content switching, and supports various tab layouts and styles for organizing content into logical sections.
246
+ - *Aliases: Tabs, TabNavigation, TabContainer*
247
+
248
+ ### Hooks
249
+ React hooks for enhanced functionality:
250
+
251
+ - **[useModal](./docs/components/molecules/useModal.md)** - A React hook that provides programmatic modal management with automatic ID generation and simplified modal state handling. Takes a modal component as a parameter and returns functions to open and close that specific modal, along with automatic unique identifier generation for each modal instance.
252
+ - *Aliases: useModal, Modal Hook, Modal Manager*
253
+
254
+ ### Utilities
255
+ Helper components and utilities:
256
+
257
+ - **[ConditionalView](./docs/components/utils/ConditionalView.md)** - A utility component that conditionally renders content based on boolean conditions or state values. Provides a declarative way to handle conditional rendering logic while maintaining clean and readable component code.
258
+ - *Aliases: ConditionalView, ConditionalRender, ShowIf*
259
+
260
+ - **[RenderStateView](./docs/components/utils/RenderStateView.md)** - A component for handling different render states such as loading, error, empty, and success states. Provides a consistent pattern for managing asynchronous data loading and error handling with customizable content for each state.
261
+ - *Aliases: RenderStateView, StateRenderer, AsyncView*
262
+
263
+ - **[WrapTextNodes](./docs/components/utils/WrapTextNodes.md)** - A utility component that automatically wraps text nodes with specified components or styling. Useful for applying consistent text treatment across complex component hierarchies without manually wrapping each text element.
264
+ - *Aliases: WrapTextNodes, TextWrapper, TextNodeWrapper*
@@ -0,0 +1,119 @@
1
+ # ActionImage
2
+
3
+ ## Description
4
+
5
+ Interactive image component with action triggers that allows users to perform actions when interacting with images. This component combines visual display with user interaction capabilities.
6
+
7
+ ## Aliases
8
+
9
+ - Action Image
10
+ - Interactive Image
11
+ - Clickable Image
12
+ - Image Button
13
+
14
+ ## Props Breakdown
15
+
16
+ **Extends:** `ImgHTMLAttributes<HTMLImageElement>` (via ImageProps)
17
+
18
+ | Prop | Type | Default | Required | Description |
19
+ |------|------|---------|----------|-------------|
20
+ | `src` | `string` | - | Yes | Source URL of the image |
21
+ | `alt` | `string` | - | Yes | Alternative text for accessibility |
22
+ | `onClick` | `(event: MouseEvent) => void` | - | No | Click handler for the image action |
23
+ | `disabled` | `boolean` | `false` | No | Whether the image action is disabled |
24
+ | `loading` | `boolean` | `false` | No | Shows loading state |
25
+ | `className` | `string` | - | No | Additional CSS class names |
26
+ | `width` | `number \| string` | - | No | Width of the image |
27
+ | `height` | `number \| string` | - | No | Height of the image |
28
+ | `objectFit` | `'cover' \| 'contain' \| 'fill'` | `'cover'` | No | How the image should fit within its container |
29
+
30
+ ## Examples
31
+
32
+ ### Basic Usage
33
+ ```tsx
34
+ import { ActionImage } from '@delightui/components';
35
+
36
+ function BasicExample() {
37
+ return (
38
+ <ActionImage
39
+ src="/images/product.jpg"
40
+ alt="Product image"
41
+ onClick={() => console.log('Image clicked')}
42
+ />
43
+ );
44
+ }
45
+ ```
46
+
47
+ ### Disabled State
48
+ ```tsx
49
+ function DisabledExample() {
50
+ return (
51
+ <ActionImage
52
+ src="/images/product.jpg"
53
+ alt="Product image"
54
+ disabled={true}
55
+ onClick={() => console.log('This won\'t fire')}
56
+ />
57
+ );
58
+ }
59
+ ```
60
+
61
+ ### Loading State
62
+ ```tsx
63
+ function LoadingExample() {
64
+ return (
65
+ <ActionImage
66
+ src="/images/product.jpg"
67
+ alt="Product image"
68
+ loading={true}
69
+ onClick={() => console.log('Image clicked')}
70
+ />
71
+ );
72
+ }
73
+ ```
74
+
75
+ ### Custom Dimensions
76
+ ```tsx
77
+ function CustomSizeExample() {
78
+ return (
79
+ <ActionImage
80
+ src="/images/banner.jpg"
81
+ alt="Banner image"
82
+ width={400}
83
+ height={200}
84
+ objectFit="cover"
85
+ onClick={() => console.log('Banner clicked')}
86
+ />
87
+ );
88
+ }
89
+ ```
90
+
91
+ ### Gallery Action
92
+ ```tsx
93
+ function GalleryExample() {
94
+ const handleImageClick = (imageId: string) => {
95
+ console.log(`Opening image ${imageId} in lightbox`);
96
+ };
97
+
98
+ return (
99
+ <div className="gallery-grid">
100
+ <ActionImage
101
+ src="/images/gallery-1.jpg"
102
+ alt="Gallery image 1"
103
+ width={300}
104
+ height={200}
105
+ className="gallery-item"
106
+ onClick={() => handleImageClick('1')}
107
+ />
108
+ <ActionImage
109
+ src="/images/gallery-2.jpg"
110
+ alt="Gallery image 2"
111
+ width={300}
112
+ height={200}
113
+ className="gallery-item"
114
+ onClick={() => handleImageClick('2')}
115
+ />
116
+ </div>
117
+ );
118
+ }
119
+ ```