@delightui/components 0.1.5 → 0.1.7

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 (30) hide show
  1. package/dist/cjs/components/atoms/Button/Button.types.d.ts +1 -1
  2. package/dist/cjs/components/atoms/Text/Text.types.d.ts +5 -0
  3. package/dist/cjs/components/molecules/ButtonGroup/ButtonGroup.d.ts +7 -0
  4. package/dist/cjs/components/molecules/ButtonGroup/ButtonGroup.types.d.ts +29 -0
  5. package/dist/cjs/components/molecules/ButtonGroup/index.d.ts +4 -0
  6. package/dist/cjs/components/molecules/ButtonGroup/utils.d.ts +13 -0
  7. package/dist/cjs/components/molecules/DatePicker/DatePicker.types.d.ts +5 -0
  8. package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +4 -0
  9. package/dist/cjs/components/molecules/Popover/Popover.types.d.ts +6 -1
  10. package/dist/cjs/components/molecules/Popover/index.d.ts +2 -2
  11. package/dist/cjs/components/molecules/index.d.ts +2 -0
  12. package/dist/cjs/library.css +228 -71
  13. package/dist/cjs/library.js +3 -3
  14. package/dist/cjs/library.js.map +1 -1
  15. package/dist/esm/components/atoms/Button/Button.types.d.ts +1 -1
  16. package/dist/esm/components/atoms/Text/Text.types.d.ts +5 -0
  17. package/dist/esm/components/molecules/ButtonGroup/ButtonGroup.d.ts +7 -0
  18. package/dist/esm/components/molecules/ButtonGroup/ButtonGroup.types.d.ts +29 -0
  19. package/dist/esm/components/molecules/ButtonGroup/index.d.ts +4 -0
  20. package/dist/esm/components/molecules/ButtonGroup/utils.d.ts +13 -0
  21. package/dist/esm/components/molecules/DatePicker/DatePicker.types.d.ts +5 -0
  22. package/dist/esm/components/molecules/FormField/FormField.types.d.ts +4 -0
  23. package/dist/esm/components/molecules/Popover/Popover.types.d.ts +6 -1
  24. package/dist/esm/components/molecules/Popover/index.d.ts +2 -2
  25. package/dist/esm/components/molecules/index.d.ts +2 -0
  26. package/dist/esm/library.css +228 -71
  27. package/dist/esm/library.js +3 -3
  28. package/dist/esm/library.js.map +1 -1
  29. package/dist/index.d.ts +55 -3
  30. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -76,7 +76,7 @@ type ActionImageProps = ImageProps & {
76
76
  */
77
77
  declare const ActionImage: (props: ActionImageProps) => React$1.JSX.Element;
78
78
 
79
- type ButtonTypeEnum = 'Filled' | 'Outline' | 'Ghost';
79
+ type ButtonTypeEnum = 'Filled' | 'Outlined' | 'Ghost';
80
80
  type ButtonStyleEnum = 'Primary' | 'Secondary' | 'Destructive';
81
81
  type ButtonSizeEnum = 'Small' | 'Medium' | 'Large';
82
82
  type ButtonActionTypeEnum = 'button' | 'submit' | 'reset';
@@ -347,6 +347,11 @@ interface TextProps {
347
347
  * @default 'None'
348
348
  */
349
349
  decoration?: TextDecorationEnum;
350
+ /**
351
+ * Flag to show ellipsis for overflowing text.
352
+ * @default false
353
+ */
354
+ ellipsis?: boolean;
350
355
  /**
351
356
  * Transform style for the text.
352
357
  * @default 'None'
@@ -391,10 +396,44 @@ declare const TextArea: React$1.ForwardRefExoticComponent<Omit<React$1.TextareaH
391
396
  className?: string;
392
397
  } & React$1.RefAttributes<HTMLTextAreaElement>>;
393
398
 
399
+ /**
400
+ * Enum for the alignment of the button-group.
401
+ */
402
+ type ButtonGroupAlignEnum = 'Horizontal' | 'Vertical';
403
+ /**
404
+ * Enum for the type of the button-group.
405
+ */
406
+ type ButtonGroupTypeEnum = 'Outlined' | 'Ghost';
407
+ type ButtonGroupProps = {
408
+ /**
409
+ * The alignment of the button-group.
410
+ * @default 'Horizontal'
411
+ */
412
+ align?: ButtonGroupAlignEnum;
413
+ /**
414
+ * Type of the button-group.
415
+ * @default 'Filled'
416
+ */
417
+ type?: ButtonGroupTypeEnum;
418
+ /**
419
+ * The content to be displayed within the ButtonGroup.
420
+ */
421
+ children: ReactNode | ReactNode[];
422
+ /**
423
+ * Additional class for styling.
424
+ */
425
+ className?: string;
426
+ };
427
+
428
+ /**
429
+ * ButtonGroup component definition.
430
+ */
431
+ declare const ButtonGroup: (props: ButtonGroupProps) => React$1.JSX.Element;
432
+
394
433
  /**
395
434
  * Enum for the action type of the Popover.
396
435
  */
397
- type ActionType = 'Click' | 'Hover';
436
+ type ActionType = 'Click' | 'Hover' | 'DoubleClick';
398
437
  /**
399
438
  * Enum for the overlay direction of the Popover.
400
439
  */
@@ -414,6 +453,10 @@ type ContentProps = {
414
453
  * Props for the Popover component.
415
454
  */
416
455
  type PopoverProps = {
456
+ /**
457
+ * Ref or Element for the Popover component to render in.
458
+ */
459
+ container?: HTMLElement | React$1.RefObject<HTMLElement> | null;
417
460
  /**
418
461
  * The content to display in the Popover.
419
462
  */
@@ -658,6 +701,11 @@ type DatePickerProps = {
658
701
  * Datepicker position
659
702
  */
660
703
  position?: DatePickerPosition;
704
+ /**
705
+ * Function to parse date string to Date object.
706
+ * this function will be used to parse initial date string and date string from input field.
707
+ */
708
+ parseDate?: (date: string) => Date;
661
709
  };
662
710
 
663
711
  declare const DatePicker: (props: DatePickerProps) => React$1.JSX.Element;
@@ -812,6 +860,10 @@ type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
812
860
  * Info icon for message
813
861
  */
814
862
  infoIcon?: React.ReactNode;
863
+ /**
864
+ * Optional field for possible error message
865
+ */
866
+ hasMessage?: boolean;
815
867
  };
816
868
  /**
817
869
  * Props for the FormFieldProvider component.
@@ -1304,4 +1356,4 @@ type ThemeProviderProps = {
1304
1356
  declare const ThemeContext: React$1.Context<ThemeContextType>;
1305
1357
  declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
1306
1358
 
1307
- export { ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Button, type ButtonProps, Card, type CardProps, ContextMenu, type ContextMenuProps, DatePicker, type DatePickerProps, 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, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, ListWrapper as List, type ListProps, MenuItem, type MenuItemProps, Modal, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, Option, type OptionProps, Password, Popover, type PopoverHandle, type PopoverProps, type RequiredFields, Select, type SelectProps, SelectProvider, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, 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, useField, useSelectContext, useTab };
1359
+ export { ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, ContextMenu, type ContextMenuProps, DatePicker, type DatePickerProps, 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, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, ListWrapper as List, type ListProps, MenuItem, type MenuItemProps, Modal, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, Option, type OptionProps, type OverlayDirectionEnum, Password, Popover, type PopoverHandle, type PopoverProps, type RequiredFields, Select, type SelectProps, SelectProvider, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, 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, useField, useSelectContext, useTab };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delightui/components",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",