@delightui/components 0.1.16 → 0.1.18

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 (50) hide show
  1. package/dist/cjs/App.d.ts +0 -1
  2. package/dist/cjs/components/atoms/Input/Input.d.ts +1 -0
  3. package/dist/cjs/components/atoms/Input/Input.types.d.ts +4 -0
  4. package/dist/cjs/components/atoms/List/List.d.ts +9 -3
  5. package/dist/cjs/components/atoms/List/List.types.d.ts +50 -0
  6. package/dist/cjs/components/atoms/List/components/ListItem.d.ts +9 -0
  7. package/dist/cjs/components/atoms/List/components/RootList.d.ts +9 -0
  8. package/dist/cjs/components/atoms/List/components/SortableList.d.ts +11 -0
  9. package/dist/cjs/components/atoms/List/components/SortableListItem.d.ts +9 -0
  10. package/dist/cjs/components/molecules/DatePicker/DatePicker.types.d.ts +23 -3
  11. package/dist/cjs/components/molecules/DatePicker/Plugins/utils.d.ts +18 -0
  12. package/dist/cjs/components/molecules/DatePicker/Plugins/utils.test.d.ts +1 -0
  13. package/dist/cjs/components/molecules/DatePicker/index.d.ts +2 -2
  14. package/dist/cjs/components/molecules/Nav/NavLink/NavLink.types.d.ts +5 -1
  15. package/dist/cjs/components/molecules/Select/Select.types.d.ts +5 -0
  16. package/dist/cjs/components/molecules/TabItem/TabItem.types.d.ts +8 -5
  17. package/dist/cjs/components/molecules/Tabs/Tabs.Context.d.ts +1 -1
  18. package/dist/cjs/components/molecules/Tabs/Tabs.types.d.ts +22 -0
  19. package/dist/cjs/library.css +13218 -48650
  20. package/dist/cjs/library.d.ts +1 -1
  21. package/dist/cjs/library.js +3 -3
  22. package/dist/cjs/library.js.map +1 -1
  23. package/dist/cjs/modules/theme/ThemeProvider.d.ts +0 -2
  24. package/dist/cjs/modules/theme/useBuildVariantProps.d.ts +4 -0
  25. package/dist/esm/App.d.ts +0 -1
  26. package/dist/esm/components/atoms/Input/Input.d.ts +1 -0
  27. package/dist/esm/components/atoms/Input/Input.types.d.ts +4 -0
  28. package/dist/esm/components/atoms/List/List.d.ts +9 -3
  29. package/dist/esm/components/atoms/List/List.types.d.ts +50 -0
  30. package/dist/esm/components/atoms/List/components/ListItem.d.ts +9 -0
  31. package/dist/esm/components/atoms/List/components/RootList.d.ts +9 -0
  32. package/dist/esm/components/atoms/List/components/SortableList.d.ts +11 -0
  33. package/dist/esm/components/atoms/List/components/SortableListItem.d.ts +9 -0
  34. package/dist/esm/components/molecules/DatePicker/DatePicker.types.d.ts +23 -3
  35. package/dist/esm/components/molecules/DatePicker/Plugins/utils.d.ts +18 -0
  36. package/dist/esm/components/molecules/DatePicker/Plugins/utils.test.d.ts +1 -0
  37. package/dist/esm/components/molecules/DatePicker/index.d.ts +2 -2
  38. package/dist/esm/components/molecules/Nav/NavLink/NavLink.types.d.ts +5 -1
  39. package/dist/esm/components/molecules/Select/Select.types.d.ts +5 -0
  40. package/dist/esm/components/molecules/TabItem/TabItem.types.d.ts +8 -5
  41. package/dist/esm/components/molecules/Tabs/Tabs.Context.d.ts +1 -1
  42. package/dist/esm/components/molecules/Tabs/Tabs.types.d.ts +22 -0
  43. package/dist/esm/library.css +13218 -48650
  44. package/dist/esm/library.d.ts +1 -1
  45. package/dist/esm/library.js +3 -3
  46. package/dist/esm/library.js.map +1 -1
  47. package/dist/esm/modules/theme/ThemeProvider.d.ts +0 -2
  48. package/dist/esm/modules/theme/useBuildVariantProps.d.ts +4 -0
  49. package/dist/index.d.ts +143 -54
  50. package/package.json +1 -1
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ThemeContextType, ThemeProviderProps } from './ThemeProvider.types';
3
- import '../../resources/scss/fonts.scss';
4
3
  import '../../resources/themes/base.css';
5
- import '../../resources/themes/override.css';
6
4
  import '../../resources/themes/light.css';
7
5
  import '../../resources/themes/dark.css';
8
6
  export declare const ThemeContext: React.Context<ThemeContextType>;
@@ -0,0 +1,4 @@
1
+ declare const useBuildVariantProps: (componentName: string, variants?: Record<string, string>, stateFlags?: Record<string, boolean | undefined>, componentVariantOverride?: string) => {
2
+ 'component-variant': string;
3
+ };
4
+ export default useBuildVariantProps;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import React$1, { HTMLAttributes, ReactNode, ImgHTMLAttributes, SyntheticEvent, MouseEvent, InputHTMLAttributes, Dispatch, SetStateAction, TextareaHTMLAttributes, CSSProperties, FormHTMLAttributes, Ref, LiHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes } from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default, { HTMLAttributes, ReactNode, ImgHTMLAttributes, SyntheticEvent, MouseEvent, InputHTMLAttributes, Dispatch, SetStateAction, TextareaHTMLAttributes, CSSProperties, FormHTMLAttributes, Ref, LiHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes } from 'react';
2
3
  import { LinkProps } from 'react-router-dom';
3
4
  import { Offset } from 'react-overlays/usePopper';
5
+ import { Plugin } from 'flatpickr/dist/types/options';
4
6
  import FlatPickr from 'react-flatpickr';
5
7
 
6
8
  type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
@@ -35,7 +37,7 @@ type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> &
35
37
  /**
36
38
  * ActionCard component definition.
37
39
  */
38
- declare const ActionCard: (props: ActionCardProps) => React$1.JSX.Element;
40
+ declare const ActionCard: (props: ActionCardProps) => React__default.JSX.Element;
39
41
 
40
42
  /**
41
43
  * Enum for different image fit options.
@@ -87,7 +89,7 @@ type ActionImageProps = ImageProps & {
87
89
  /**
88
90
  * ActionImage component definition.
89
91
  */
90
- declare const ActionImage: (props: ActionImageProps) => React$1.JSX.Element;
92
+ declare const ActionImage: (props: ActionImageProps) => React__default.JSX.Element;
91
93
 
92
94
  type ButtonAppearanceEnum = 'Default' | 'Inverse';
93
95
  type ButtonTypeEnum = 'Filled' | 'Outlined' | 'Ghost';
@@ -151,7 +153,7 @@ type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
151
153
  /**
152
154
  * Button component definition.
153
155
  */
154
- declare const Button: (props: ButtonProps) => React$1.JSX.Element;
156
+ declare const Button: (props: ButtonProps) => React__default.JSX.Element;
155
157
 
156
158
  type CardProps = {
157
159
  /**
@@ -167,7 +169,7 @@ type CardProps = {
167
169
  /**
168
170
  * Card component definition.
169
171
  */
170
- declare const Card: (props: CardProps) => React$1.JSX.Element;
172
+ declare const Card: (props: CardProps) => React__default.JSX.Element;
171
173
 
172
174
  type IconStyleEnum = 'Outlined' | 'Filled' | 'Round';
173
175
  type IconSizeEnum = 'Small' | 'Medium' | 'Large';
@@ -192,7 +194,7 @@ interface IconProps {
192
194
  className?: string;
193
195
  }
194
196
 
195
- declare const Icon: (props: IconProps) => React$1.JSX.Element | null;
197
+ declare const Icon: (props: IconProps) => React__default.JSX.Element | null;
196
198
 
197
199
  type IconButtonAppearanceEnum = 'Default' | 'Inverse';
198
200
  type IconButtonStyleEnum = 'Primary' | 'Secondary';
@@ -219,7 +221,7 @@ interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIco
219
221
  size?: IconButtonSizeEnum;
220
222
  }
221
223
 
222
- declare const IconButton: (props: IconButtonProps) => React$1.JSX.Element;
224
+ declare const IconButton: (props: IconButtonProps) => React__default.JSX.Element;
223
225
 
224
226
  /**
225
227
  * Enum for different input types.
@@ -253,24 +255,49 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value'>
253
255
  * Icon to be displayed after the input.
254
256
  */
255
257
  trailingIcon?: React.ReactNode;
258
+ /**
259
+ * provide a way to override the styling
260
+ */
261
+ 'component-variant'?: string;
256
262
  };
257
263
 
258
- declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "value"> & {
264
+ declare const Input: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "type" | "value"> & {
259
265
  inputType?: InputTypeEnum;
260
266
  value?: string;
261
267
  onValueChanged?: (value: string) => void;
262
268
  invalid?: boolean;
263
- leadingIcon?: React$1.ReactNode;
264
- trailingIcon?: React$1.ReactNode;
265
- } & React$1.RefAttributes<HTMLInputElement>>;
269
+ leadingIcon?: React__default.ReactNode;
270
+ trailingIcon?: React__default.ReactNode;
271
+ 'component-variant'?: string;
272
+ } & React__default.RefAttributes<HTMLInputElement>>;
266
273
 
267
274
  /**
268
275
  * Enum for the alignment of the list.
276
+ *
277
+ * @typedef {'Horizontal' | 'Vertical'} ListAlignEnum
269
278
  */
270
279
  type ListAlignEnum = 'Horizontal' | 'Vertical';
280
+ /**
281
+ * Represents a generic list item.
282
+ *
283
+ * @property {string | number} [id] - A unique identifier for the list item. This is optional and can be auto-generated if not provided.
284
+ */
271
285
  type ListItemType = object & {
272
286
  id?: string | number;
273
287
  };
288
+ /**
289
+ * Props for the list wrapper component.
290
+ *
291
+ * @template T - The type of the list items.
292
+ * @property {T[]} [data] - The data to be rendered in the list.
293
+ * @property {React.FC<any>} component - The React functional component used to render each list item.
294
+ * @property {(item: T, index: number) => string | number} [keyExtractor] - A function to extract unique keys for each item.
295
+ * @property {'Horizontal' | 'Vertical'} [align='Vertical'] - The alignment of the list. Defaults to `'Vertical'`.
296
+ * @property {boolean} [wrap] - Whether the list content should wrap.
297
+ * @property {string} [className] - Additional class for styling the list.
298
+ * @property {boolean} [sortable] - Whether the list items can be sorted using drag-and-drop.
299
+ * @property {Dispatch<SetStateAction<T[]>>} [updateSortOrder] - Callback function to update the order of the list items after sorting.
300
+ */
274
301
  type ListProps<T extends ListItemType> = HTMLAttributes<HTMLUListElement> & {
275
302
  /**
276
303
  * The data to be rendered in the list.
@@ -310,19 +337,26 @@ type ListProps<T extends ListItemType> = HTMLAttributes<HTMLUListElement> & {
310
337
  updateSortOrder?: Dispatch<SetStateAction<T[]>>;
311
338
  };
312
339
 
313
- declare const ListWrapper: <T extends ListItemType>(props: ListProps<T>) => React$1.JSX.Element;
340
+ /**
341
+ * A wrapper component that manages the rendering of either a sortable or regular list based on the provided props.
342
+ *
343
+ * @template T - The type of the list items.
344
+ * @param {ListProps<T>} props - The properties for the list wrapper.
345
+ * @returns {JSX.Element} The rendered list component.
346
+ */
347
+ declare const List: <T extends ListItemType>(props: ListProps<T>) => React$1.JSX.Element;
314
348
 
315
349
  type PasswordProps = Omit<InputProps, 'inputType' | 'trailingIcon'> & {
316
350
  hideTrailingIcon?: boolean;
317
351
  };
318
352
 
319
- declare const Password: (props: PasswordProps) => React$1.JSX.Element;
353
+ declare const Password: (props: PasswordProps) => React__default.JSX.Element;
320
354
 
321
355
  type SpinnerProps = {
322
356
  className?: string;
323
357
  };
324
358
 
325
- declare const Spinner: ({ className }: SpinnerProps) => React$1.JSX.Element;
359
+ declare const Spinner: ({ className }: SpinnerProps) => React__default.JSX.Element;
326
360
 
327
361
  declare const types: readonly ["Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "BodyLarge", "BodyMedium", "BodySmall"];
328
362
  declare const weights: readonly ["Thin", "ExtraLight", "Light", "Regular", "Medium", "SemiBold", "Bold", "ExtraBold", "Black", "ExtraBlack", 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
@@ -402,7 +436,7 @@ interface TextProps {
402
436
  /**
403
437
  * Text component definition.
404
438
  */
405
- declare const Text: (props: TextProps) => React$1.JSX.Element;
439
+ declare const Text: (props: TextProps) => React__default.JSX.Element;
406
440
 
407
441
  type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'> & {
408
442
  /**
@@ -425,12 +459,12 @@ type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'>
425
459
  className?: string;
426
460
  };
427
461
 
428
- declare const TextArea: React$1.ForwardRefExoticComponent<Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "value"> & {
462
+ declare const TextArea: React__default.ForwardRefExoticComponent<Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "value"> & {
429
463
  value?: string;
430
464
  onValueChanged?: (value: string) => void;
431
465
  invalid?: boolean;
432
466
  className?: string;
433
- } & React$1.RefAttributes<HTMLTextAreaElement>>;
467
+ } & React__default.RefAttributes<HTMLTextAreaElement>>;
434
468
 
435
469
  /**
436
470
  * Enum for the alignment of the button-group.
@@ -464,7 +498,7 @@ type ButtonGroupProps = {
464
498
  /**
465
499
  * ButtonGroup component definition.
466
500
  */
467
- declare const ButtonGroup: (props: ButtonGroupProps) => React$1.JSX.Element;
501
+ declare const ButtonGroup: (props: ButtonGroupProps) => React__default.JSX.Element;
468
502
 
469
503
  /**
470
504
  * Enum for the action type of the Popover.
@@ -492,7 +526,7 @@ type PopoverProps = {
492
526
  /**
493
527
  * Ref or Element for the Popover component to render in.
494
528
  */
495
- container?: HTMLElement | React$1.RefObject<HTMLElement> | null;
529
+ container?: HTMLElement | React__default.RefObject<HTMLElement> | null;
496
530
  /**
497
531
  * The content to display in the Popover.
498
532
  */
@@ -578,11 +612,11 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
578
612
  /**
579
613
  * The content to be rendered inside the context menu.
580
614
  */
581
- children: React$1.ReactNode;
615
+ children: React__default.ReactNode;
582
616
  /**
583
617
  * The element that triggers the display of the context menu.
584
618
  */
585
- target: React$1.ReactNode;
619
+ target: React__default.ReactNode;
586
620
  /**
587
621
  * Alignment of the menu relative to its target.
588
622
  * @default 'Center'
@@ -635,7 +669,7 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
635
669
  /**
636
670
  * ContextMenu component that renders a popover menu.
637
671
  */
638
- declare const ContextMenu: (props: ContextMenuProps) => React$1.JSX.Element;
672
+ declare const ContextMenu: (props: ContextMenuProps) => React__default.JSX.Element;
639
673
 
640
674
  /**
641
675
  * Props for the MenuItem component.
@@ -666,7 +700,7 @@ type MenuItemProps = HTMLAttributes<HTMLLIElement> & {
666
700
  *
667
701
  * Renders a menu item (`<li>`) with optional disabled and selected states.
668
702
  */
669
- declare const MenuItem: (props: MenuItemProps) => React$1.JSX.Element;
703
+ declare const MenuItem: (props: MenuItemProps) => React__default.JSX.Element;
670
704
 
671
705
  type DatePickerPosition = 'auto' | 'above' | 'below' | 'auto left' | 'auto center' | 'auto right' | 'above left' | 'above center' | 'above right' | 'below left' | 'below center' | 'below right';
672
706
  type DatePickerProps = {
@@ -738,18 +772,40 @@ type DatePickerProps = {
738
772
  */
739
773
  position?: DatePickerPosition;
740
774
  /**
741
- * Function to parse date string to Date object.
742
- * this function will be used to parse initial date string and date string from input field.
775
+ * Function to parse date strings into Date objects.
776
+ * Used for parsing both the initial date string and any date strings entered in the input field.
777
+ * @param date - The date value to parse, can be a string
778
+ * @param format - Optional format string to use when parsing date strings
779
+ * @returns A Date object representing the parsed date
743
780
  */
744
- parseDate?: (date: string) => Date;
781
+ parseDate?: (date: string, format?: string) => Date;
745
782
  /**
746
783
  * Allow user to type date/time in input.
747
784
  * @default false
748
785
  */
749
786
  allowInput?: boolean;
787
+ /**
788
+ * Container element for the calendar when used inside a Popover
789
+ */
790
+ container?: HTMLElement | null;
791
+ /**
792
+ * Custom time picker plugin
793
+ */
794
+ customTimePickerPlugin?: (config: CustomTimePickerConfig) => Plugin;
795
+ /**
796
+ * Custom time picker plugin
797
+ */
798
+ customDateTimePickerPlugin?: (config: CustomTimePickerConfig) => Plugin;
799
+ };
800
+ type CustomTimePickerConfig = {
801
+ minuteStep: number;
802
+ /**
803
+ * Container element for the calendar when used inside a Popover
804
+ */
805
+ container?: HTMLElement | null;
750
806
  };
751
807
 
752
- declare const DatePicker: (props: DatePickerProps) => React$1.JSX.Element;
808
+ declare const DatePicker: (props: DatePickerProps) => React__default.JSX.Element;
753
809
 
754
810
  /**
755
811
  * Type representing the allowed values for form fields
@@ -871,13 +927,13 @@ type FormContextValues<T extends FormState = FormState> = {
871
927
  updateFieldValue: (name: string, value: FieldValue) => void;
872
928
  formErrors: FormErrors<T>;
873
929
  updateFieldError: (name: keyof T, errorMessage: string) => void;
874
- onFormSubmit: React$1.FormEventHandler<HTMLFormElement>;
930
+ onFormSubmit: React__default.FormEventHandler<HTMLFormElement>;
875
931
  updateFieldValidators: (name: keyof T, validate?: FieldValidationFunction) => void;
876
932
  updateRequiredFields: (name: keyof T, required?: boolean) => void;
877
933
  };
878
934
  type FormProviderProps<T extends FormState = FormState> = {
879
935
  formRef?: Ref<HTMLFormElement>;
880
- children?: React$1.ReactNode;
936
+ children?: React__default.ReactNode;
881
937
  formState?: T;
882
938
  onFormStateChange?: FormStateChangeHandler<T>;
883
939
  formValidator?: FormValidator<T>;
@@ -985,7 +1041,7 @@ declare const useField: <T extends FieldValue = FieldValue>(props: UseFieldProps
985
1041
  formFieldId: string | undefined;
986
1042
  };
987
1043
 
988
- declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React$1.JSX.Element;
1044
+ declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React__default.JSX.Element;
989
1045
 
990
1046
  /**
991
1047
  * Enum defining the possible sizes for the Modal component.
@@ -1044,17 +1100,17 @@ type ModalProps = {
1044
1100
  /**
1045
1101
  * Modal component for displaying a dialog window.
1046
1102
  */
1047
- declare const Modal: (props: ModalProps) => React$1.JSX.Element;
1103
+ declare const Modal: (props: ModalProps) => React__default.JSX.Element;
1048
1104
 
1049
1105
  type NavProps = HTMLAttributes<HTMLElement> & {};
1050
1106
 
1051
- declare const Nav: (props: NavProps) => React$1.JSX.Element;
1107
+ declare const Nav: (props: NavProps) => React__default.JSX.Element;
1052
1108
 
1053
1109
  type NavItemProps = LiHTMLAttributes<HTMLElement> & {};
1054
1110
 
1055
- declare const NavItem: (props: NavItemProps) => React$1.JSX.Element;
1111
+ declare const NavItem: (props: NavItemProps) => React__default.JSX.Element;
1056
1112
 
1057
- type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'size' | 'style' | 'type'> & {
1113
+ type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'size' | 'style' | 'type'> & {
1058
1114
  /**
1059
1115
  * The destination URL or path for the navigation link.
1060
1116
  * If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
@@ -1068,15 +1124,19 @@ type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'size' | 'style' |
1068
1124
  * <NavLink to="https://www.example.com">External</NavLink>
1069
1125
  */
1070
1126
  to: string | -1;
1127
+ /**
1128
+ * provide a way to override the styling
1129
+ */
1130
+ 'component-variant'?: string;
1071
1131
  };
1072
1132
 
1073
- declare const NavLink: (props: NavLinkProps) => React$1.JSX.Element;
1133
+ declare const NavLink: (props: NavLinkProps) => React__default.JSX.Element;
1074
1134
 
1075
1135
  /**
1076
1136
  * Popover component that displays a floating content element in relation to a target element.
1077
1137
  * It can be triggered via different user actions like 'Click' or 'Hover'.
1078
1138
  */
1079
- declare const Popover: React$1.ForwardRefExoticComponent<PopoverProps & React$1.RefAttributes<PopoverHandle>>;
1139
+ declare const Popover: React__default.ForwardRefExoticComponent<PopoverProps & React__default.RefAttributes<PopoverHandle>>;
1080
1140
 
1081
1141
  /**
1082
1142
  * Props for the Option component, extending LiHTMLAttributes<HTMLLIElement>.
@@ -1116,7 +1176,7 @@ type OptionProps = LiHTMLAttributes<HTMLLIElement> & {
1116
1176
  * @param props - Props for configuring the Option component.
1117
1177
  * @returns Element representing the option.
1118
1178
  */
1119
- declare const Option: (props: OptionProps) => React$1.JSX.Element;
1179
+ declare const Option: (props: OptionProps) => React__default.JSX.Element;
1120
1180
 
1121
1181
  /**
1122
1182
  * Represents the context provided by the Select component.
@@ -1233,6 +1293,11 @@ type SelectViewProps = Omit<HTMLAttributes<HTMLElement>, 'style' | 'children'> &
1233
1293
  * @default false
1234
1294
  */
1235
1295
  hasDefaultOption?: boolean;
1296
+ /**
1297
+ * Indicates if multiple options can be selected.
1298
+ * @default false
1299
+ */
1300
+ multiple?: boolean;
1236
1301
  /**
1237
1302
  * Additional CSS classes for customization.
1238
1303
  */
@@ -1262,7 +1327,7 @@ declare const useSelectContext: () => SelectContextType;
1262
1327
  * @param props - Props for configuring the SelectProvider.
1263
1328
  * @returns JSX element that provides context to its children.
1264
1329
  */
1265
- declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) => React$1.JSX.Element;
1330
+ declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) => React__default.JSX.Element;
1266
1331
 
1267
1332
  /**
1268
1333
  * Select component that wraps SelectComponent with SelectProvider.
@@ -1294,9 +1359,10 @@ interface TabContentProps {
1294
1359
  className?: string;
1295
1360
  }
1296
1361
 
1297
- declare const TabContent: (props: TabContentProps) => React$1.JSX.Element | null;
1362
+ declare const TabContent: (props: TabContentProps) => React__default.JSX.Element | null;
1298
1363
 
1299
- type TabItemProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
1364
+ type TabItemStyleEnum = 'Filled' | 'Underlined';
1365
+ type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'style' | 'type'> & {
1300
1366
  /**
1301
1367
  * The tabs value.
1302
1368
  * @remarks
@@ -1314,30 +1380,38 @@ type TabItemProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
1314
1380
  */
1315
1381
  defaultTab?: boolean;
1316
1382
  /**
1317
- * Click event handler for the button.
1318
- */
1319
- onClick?: (event?: MouseEvent<HTMLElement>) => void;
1383
+ * The tab item style to apply.
1384
+ * @default Filled
1385
+ */
1386
+ style?: TabItemStyleEnum;
1320
1387
  };
1321
1388
 
1322
- declare const TabItem: (props: TabItemProps) => React$1.JSX.Element;
1389
+ declare const TabItem: (props: TabItemProps) => React__default.JSX.Element;
1323
1390
 
1324
1391
  type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
1325
1392
 
1326
- declare const TableBody: (props: TableBodyProps) => React$1.JSX.Element;
1393
+ declare const TableBody: (props: TableBodyProps) => React__default.JSX.Element;
1327
1394
 
1328
1395
  type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>;
1329
1396
 
1330
- declare const TableCell: (props: TableCellProps) => React$1.JSX.Element;
1397
+ declare const TableCell: (props: TableCellProps) => React__default.JSX.Element;
1331
1398
 
1332
1399
  type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
1333
1400
 
1334
- declare const TableHeader: (props: TableHeaderProps) => React$1.JSX.Element;
1401
+ declare const TableHeader: (props: TableHeaderProps) => React__default.JSX.Element;
1335
1402
 
1336
1403
  type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
1337
1404
 
1338
- declare const TableRow: (props: TableRowProps) => React$1.JSX.Element;
1405
+ declare const TableRow: (props: TableRowProps) => React__default.JSX.Element;
1339
1406
 
1407
+ type TabsStyleEnum = 'Filled' | 'Underlined';
1408
+ type TabsTypeEnum = 'Horizontal' | 'Vertical';
1340
1409
  type TabContextType = {
1410
+ /**
1411
+ * The tab item style to apply.
1412
+ * @default Filled
1413
+ */
1414
+ style: TabsStyleEnum;
1341
1415
  /**
1342
1416
  * The currently selected tab.
1343
1417
  */
@@ -1357,6 +1431,11 @@ type TabProviderProps = {
1357
1431
  * The value of the tab.
1358
1432
  */
1359
1433
  value?: number | string;
1434
+ /**
1435
+ * The tab item style to apply.
1436
+ * @default Filled
1437
+ */
1438
+ style?: TabsStyleEnum;
1360
1439
  /**
1361
1440
  * Callback function when a tab is clicked.
1362
1441
  * @param value - The value of the clicked tab.
@@ -1372,6 +1451,16 @@ type TabsViewProps = {
1372
1451
  * Additional class for styling.
1373
1452
  */
1374
1453
  className?: string;
1454
+ /**
1455
+ * The tab item style to apply.
1456
+ * @default Filled
1457
+ */
1458
+ style?: TabsStyleEnum;
1459
+ /**
1460
+ * The tab item type to apply.
1461
+ * @default Horizontal
1462
+ */
1463
+ type?: TabsTypeEnum;
1375
1464
  };
1376
1465
  type TabsProps = TabProviderProps & TabsViewProps;
1377
1466
 
@@ -1381,13 +1470,13 @@ type TabsProps = TabProviderProps & TabsViewProps;
1381
1470
  */
1382
1471
  declare const useTab: () => TabContextType;
1383
1472
 
1384
- declare const Tabs: (props: TabsProps) => React$1.JSX.Element;
1473
+ declare const Tabs: (props: TabsProps) => React__default.JSX.Element;
1385
1474
 
1386
- declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) => React$1.JSX.Element;
1475
+ declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) => React__default.JSX.Element;
1387
1476
 
1388
1477
  type TableProps = TableHTMLAttributes<HTMLTableElement>;
1389
1478
 
1390
- declare const Table: (props: TableProps) => React$1.JSX.Element;
1479
+ declare const Table: (props: TableProps) => React__default.JSX.Element;
1391
1480
 
1392
1481
  type ThemeContextType = {
1393
1482
  theme: string;
@@ -1398,7 +1487,7 @@ type ThemeProviderProps = {
1398
1487
  children?: ReactNode;
1399
1488
  };
1400
1489
 
1401
- declare const ThemeContext: React$1.Context<ThemeContextType>;
1402
- declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
1490
+ declare const ThemeContext: React__default.Context<ThemeContextType>;
1491
+ declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
1403
1492
 
1404
- 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 };
1493
+ export { ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, 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, 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.16",
3
+ "version": "0.1.18",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",