@delightui/components 0.1.50 → 0.1.52

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 (28) hide show
  1. package/dist/cjs/components/atoms/RadioButtonItem/RadioButtonItem.d.ts +1 -1
  2. package/dist/cjs/components/atoms/RadioButtonItem/index.d.ts +3 -2
  3. package/dist/cjs/components/atoms/index.d.ts +4 -0
  4. package/dist/cjs/components/molecules/ChipInput/index.d.ts +3 -0
  5. package/dist/cjs/components/molecules/List/components/SortableTrigger.d.ts +2 -1
  6. package/dist/cjs/components/molecules/List/index.d.ts +3 -0
  7. package/dist/cjs/components/molecules/index.d.ts +2 -0
  8. package/dist/cjs/components/organisms/Dropzone/index.d.ts +6 -2
  9. package/dist/cjs/components/organisms/index.d.ts +1 -1
  10. package/dist/cjs/library.css +2221 -1134
  11. package/dist/cjs/library.js +3 -3
  12. package/dist/cjs/library.js.map +1 -1
  13. package/dist/esm/components/atoms/RadioButtonItem/RadioButtonItem.d.ts +1 -1
  14. package/dist/esm/components/atoms/RadioButtonItem/index.d.ts +3 -2
  15. package/dist/esm/components/atoms/index.d.ts +4 -0
  16. package/dist/esm/components/molecules/ChipInput/index.d.ts +3 -0
  17. package/dist/esm/components/molecules/List/components/SortableTrigger.d.ts +2 -1
  18. package/dist/esm/components/molecules/List/index.d.ts +3 -0
  19. package/dist/esm/components/molecules/index.d.ts +2 -0
  20. package/dist/esm/components/organisms/Dropzone/index.d.ts +6 -2
  21. package/dist/esm/components/organisms/index.d.ts +1 -1
  22. package/dist/esm/library.css +2221 -1134
  23. package/dist/esm/library.js +3 -3
  24. package/dist/esm/library.js.map +1 -1
  25. package/dist/index.d.ts +121 -3
  26. package/package.json +1 -1
  27. /package/dist/cjs/components/organisms/Dropzone/components/{DrozoneTrigger.d.ts → DropzoneTrigger.d.ts} +0 -0
  28. /package/dist/esm/components/organisms/Dropzone/components/{DrozoneTrigger.d.ts → DropzoneTrigger.d.ts} +0 -0
package/dist/index.d.ts CHANGED
@@ -365,7 +365,7 @@ type BreakpointProps<T> = {
365
365
  declare const Breakpoint: <T>({ children }: BreakpointProps<T>) => React__default.JSX.Element;
366
366
  declare const ResponsiveComponent: <T>(props: ResponsiveComponentProps<T>) => React__default.JSX.Element;
367
367
 
368
- type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
368
+ type ListItemProps$1 = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
369
369
  /**
370
370
  * Icon to be displayed before the button's content.
371
371
  */
@@ -392,7 +392,7 @@ type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
392
392
  className?: string;
393
393
  };
394
394
 
395
- declare const ListItem: (props: ListItemProps) => React__default.JSX.Element;
395
+ declare const ListItem: (props: ListItemProps$1) => React__default.JSX.Element;
396
396
 
397
397
  type SelectListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
398
398
  /**
@@ -820,6 +820,81 @@ type SliderProps = React.HTMLAttributes<HTMLDivElement> & {
820
820
 
821
821
  declare const Slider: (props: SliderProps) => React__default.JSX.Element;
822
822
 
823
+ type RadioButtonSizeEnum = 'Small' | 'Medium' | 'Large';
824
+ type RadioButtonLabelAlignmentEnum = 'Left' | 'Right';
825
+ type RadioButtonProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value'> & {
826
+ /**
827
+ * The label of the radio button.
828
+ */
829
+ children?: React.ReactNode;
830
+ /**
831
+ * The size of the radio button.
832
+ * @default 'Medium'
833
+ */
834
+ size?: RadioButtonSizeEnum;
835
+ /**
836
+ * The checked state of the radio button.
837
+ */
838
+ checked?: boolean;
839
+ /**
840
+ * Callback function when the radio button state changes.
841
+ * @param value - The new checked state of the radio button.
842
+ */
843
+ onValueChanged?: (value: string | number) => void;
844
+ /**
845
+ * Indicates if the radio button is invalid.
846
+ * @default false
847
+ */
848
+ invalid?: boolean;
849
+ /**
850
+ * Flag to show the label on the right side of the radio button.
851
+ * @default false
852
+ */
853
+ labelAlignment?: RadioButtonLabelAlignmentEnum;
854
+ /**
855
+ * The value of the radio button.
856
+ */
857
+ value?: string | number;
858
+ };
859
+
860
+ declare const RadioButton: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "checked" | "value" | "type"> & {
861
+ children?: React__default.ReactNode;
862
+ size?: RadioButtonSizeEnum;
863
+ checked?: boolean;
864
+ onValueChanged?: (value: string | number) => void;
865
+ invalid?: boolean;
866
+ labelAlignment?: RadioButtonLabelAlignmentEnum;
867
+ value?: string | number;
868
+ } & React__default.RefAttributes<HTMLInputElement>>;
869
+
870
+ declare const RadioButtonItem: React__default.ForwardRefExoticComponent<Omit<RadioButtonProps, "onValueChanged"> & {
871
+ onChange?: (value: string | number) => void;
872
+ showRightButton?: boolean;
873
+ onRightButtonClick?: () => void;
874
+ rightButtonIcon?: React__default.ReactNode;
875
+ } & React__default.RefAttributes<HTMLInputElement>>;
876
+
877
+ type RadioButtonItemProps = Omit<RadioButtonProps, 'onValueChanged'> & {
878
+ /**
879
+ * Callback function when the radio button state changes.
880
+ * @param value: string | number - The value of the selected radio button.
881
+ */
882
+ onChange?: (value: string | number) => void;
883
+ /**
884
+ * Flag to show right button.
885
+ * @default false
886
+ */
887
+ showRightButton?: boolean;
888
+ /**
889
+ * Callback function when the right button is clicked.
890
+ */
891
+ onRightButtonClick?: () => void;
892
+ /**
893
+ * Custom icon for the right button.
894
+ */
895
+ rightButtonIcon?: ReactNode;
896
+ };
897
+
823
898
  type AccordionSizeEnum = 'Small' | 'Medium' | 'Large';
824
899
  type AccordionSummaryProps = {
825
900
  children: ReactNode;
@@ -1048,6 +1123,20 @@ type ListItemType = object & {
1048
1123
  itemClassName?: string;
1049
1124
  itemStyle?: React.CSSProperties;
1050
1125
  };
1126
+ /**
1127
+ * Props for an individual list item component.
1128
+ *
1129
+ * @template T - The type of the list item.
1130
+ * @property {string | number} id - The unique identifier of the list item.
1131
+ * @property {React.FC<any>} component - The React functional component used to render the list item.
1132
+ * @property {T} item - The data for the list item.
1133
+ */
1134
+ type ListItemProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLLIElement>, 'id' | 'children'> & {
1135
+ id: string | number;
1136
+ component: React.FC<any>;
1137
+ item: T;
1138
+ };
1139
+ type SortableTriggerProps = IconButtonProps;
1051
1140
  /**
1052
1141
  * Props for the list wrapper component.
1053
1142
  *
@@ -1109,6 +1198,17 @@ type ListProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLUListElement>,
1109
1198
  */
1110
1199
  declare const List: <T extends ListItemType>(props: ListProps<T>) => React__default.JSX.Element;
1111
1200
 
1201
+ /**
1202
+ * A sortable item component that integrates with the dnd-kit library for drag-and-drop functionality.
1203
+ *
1204
+ * @template T - The type of the list item.
1205
+ * @param {ListItemProps<T>} props - The properties for the sortable item.
1206
+ * @returns {JSX.Element} The rendered sortable item.
1207
+ */
1208
+ declare const SortableItem: <T extends ListItemType>(props: ListItemProps<T>) => React__default.JSX.Element;
1209
+
1210
+ declare const SortableTrigger: (props: SortableTriggerProps) => React__default.JSX.Element;
1211
+
1112
1212
  type ContextMenuProps<T extends ListItemType> = ListProps<T>;
1113
1213
 
1114
1214
  declare const ContextMenu: <T extends ListItemType>(props: ContextMenuProps<T>) => React__default.JSX.Element;
@@ -1978,6 +2078,24 @@ declare const SelectProvider: ({ children, value, defaultValue, multiple, disabl
1978
2078
  */
1979
2079
  declare const Select: (props: SelectProps) => JSX.Element;
1980
2080
 
2081
+ type ChipListItemTypeEnum = 'chip' | 'input';
2082
+ type ChipListItemProps = {
2083
+ type: ChipListItemTypeEnum;
2084
+ props: ChipProps | InputProps;
2085
+ };
2086
+ type ChipInputProps = {
2087
+ inputValue?: string;
2088
+ onInputChange?: (value: string) => void;
2089
+ options?: string[];
2090
+ placeholder?: string;
2091
+ className?: string;
2092
+ onValueChanged?: (value: string[]) => void;
2093
+ onAddNewOption?: (value: string) => void;
2094
+ selectedValues?: string[];
2095
+ };
2096
+
2097
+ declare const _default: React__default.NamedExoticComponent<ChipInputProps>;
2098
+
1981
2099
  /**
1982
2100
  * Dropzone component props
1983
2101
  * @param initial React.ReactNode - The initial state of the dropzone.
@@ -2301,4 +2419,4 @@ declare const NotificationContext: React__default.Context<NotificationContextVal
2301
2419
  declare const NotificationProvider: React__default.FC<NotificationProviderProps>;
2302
2420
  declare const useNotification: () => NotificationContextValue;
2303
2421
 
2304
- export { 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, Chip, type ChipProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DatePicker, type DatePickerProps, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormFieldPropsWithProvider, 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, 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, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, 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, useDropzoneContext, useField, useNotification, useSelectContext, useTab };
2422
+ export { 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, Chip, _default as ChipInput, type ChipInputProps, type ChipListItemProps, type ChipListItemTypeEnum, type ChipProps, 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 FormFieldPropsWithProvider, 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, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, 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, useDropzoneContext, useField, useNotification, useSelectContext, useTab };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delightui/components",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",