@hybr1d-tech/charizard 0.7.139 → 0.7.140

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.
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ import { StylesConfig } from 'react-select';
23
23
  import { ToastOptions } from 'react-toastify';
24
24
  import { ToastPosition } from 'react-toastify';
25
25
  import { UseBoundStore } from 'zustand';
26
+ import * as zagSwitch from '@zag-js/switch';
26
27
 
27
28
  export declare const Accordion: {
28
29
  ({ children, defaultActiveKey }: AccordionProps): JSX_2.Element;
@@ -335,6 +336,24 @@ declare interface CommonOptions {
335
336
  onClick?: (event: React_2.MouseEvent) => void;
336
337
  }
337
338
 
339
+ /**
340
+ * Converts a timestamp to a formatted time string.
341
+ *
342
+ * @param {number} timestamp - The timestamp to convert (in milliseconds).
343
+ * @param {TIME_PICKER_FORMAT} [timeFormat=TIME_PICKER_FORMAT.STANDARD] - The desired time format (12-hour or 24-hour).
344
+ * @param {boolean} [enableSeconds=false] - Whether to include seconds in the formatted time string.
345
+ * @returns {string} - The formatted time string.
346
+ *
347
+ * @example
348
+ * // Returns "02:30 PM"
349
+ * convertFromTimestamp(1620000000000, TIME_PICKER_FORMAT.STANDARD);
350
+ *
351
+ * @example
352
+ * // Returns "14:30:45"
353
+ * convertFromTimestamp(1620000000000, TIME_PICKER_FORMAT.MILITARY, true);
354
+ */
355
+ export declare const convertFromTimestamp: (timestamp: number, timeFormat?: TIME_PICKER_FORMAT, enableSeconds?: boolean) => string;
356
+
338
357
  /**
339
358
  * Converts a time string (e.g., "12:30 PM") to a timestamp
340
359
  * @param {string} timeString - The time string to convert
@@ -460,7 +479,7 @@ declare type CustomColCheckedState = {
460
479
 
461
480
  declare type DateConfig = Partial<DateRangePickerProps>;
462
481
 
463
- export declare function DatePicker({ value, onChange, mode, variant, displayDateFormat, errorMsg, disableDatepicker, disabled, buttonVariant, customContainerStyles, popoverConfig, isError, showOutsideDays, ...props }: DatePickerProps): JSX_2.Element;
482
+ export declare function DatePicker({ value, onChange, mode, variant, displayDateFormat, errorMsg, disableDatepicker, disabled, buttonVariant, customContainerStyles, popoverConfig, isError, showOutsideDays, trigger, ...props }: DatePickerProps): JSX_2.Element;
464
483
 
465
484
  declare interface DatePickerProps extends PropsSingle {
466
485
  value?: Date | string;
@@ -485,9 +504,10 @@ declare interface DatePickerProps extends PropsSingle {
485
504
  };
486
505
  showOutsideDays?: boolean;
487
506
  disabled?: Matcher | Matcher[];
507
+ trigger?: React_2.ReactNode;
488
508
  }
489
509
 
490
- export declare function DateRangePicker({ value, onChange, mode, datePickerClassNames, showQuickSelect, disabled, customDisable, disableDatepicker, disableWeekends, showOutsideDays, errorMsg, customInputContentStyles, customClasses, size, onReset, placeholder, ...props }: DateRangePickerProps): JSX_2.Element;
510
+ export declare function DateRangePicker({ value, onChange, mode, datePickerClassNames, showQuickSelect, disabled, customDisable, disableDatepicker, disableWeekends, showOutsideDays, errorMsg, customInputContentStyles, customClasses, size, onReset, placeholder, trigger, ...props }: DateRangePickerProps): JSX_2.Element;
491
511
 
492
512
  declare interface DateRangePickerProps extends PropsRange {
493
513
  value: DateRange;
@@ -511,6 +531,7 @@ declare interface DateRangePickerProps extends PropsRange {
511
531
  };
512
532
  size?: BUTTON_V2_SIZE;
513
533
  placeholder?: string;
534
+ trigger?: React_2.ReactNode;
514
535
  }
515
536
 
516
537
  /**
@@ -2611,6 +2632,33 @@ declare type SwitchProps = {
2611
2632
  title?: string;
2612
2633
  };
2613
2634
 
2635
+ /**
2636
+ * SwitchV2 Component
2637
+ *
2638
+ * A custom switch component that utilizes `@zag-js/switch` for accessibility and state management.
2639
+ * It includes an optional label, error message, and an info tooltip triggered by an info icon.
2640
+ *
2641
+ * The switch can be controlled via the `checked` prop and supports accessibility features like
2642
+ * hidden inputs and keyboard navigation.
2643
+ *
2644
+ * @param {SwitchV2Props} props - The props for configuring the switch.
2645
+ * @param {React.ReactNode} [props.children] - Optional label content displayed next to the switch.
2646
+ * @param {string} [props.errorMsg] - Optional error message displayed below the switch.
2647
+ * @param {string} [props.info] - Optional informational text that will be shown inside a tooltip.
2648
+ * @param {Partial<TooltipV2Props>} [props.tooltipProps] - Optional tooltip configuration for the info icon.
2649
+ * @param {boolean} [props.checked] - The checked state of the switch. Controls the on/off state if provided.
2650
+ *
2651
+ * @returns {JSX.Element} The rendered switch component with optional label, error message, and info tooltip.
2652
+ */
2653
+ export declare function SwitchV2({ children, errorMsg, info, tooltipProps, ...props }: SwitchV2Props): JSX_2.Element;
2654
+
2655
+ declare interface SwitchV2Props extends Omit<zagSwitch.Context, 'id'> {
2656
+ children?: React_2.ReactNode;
2657
+ errorMsg?: string;
2658
+ info?: string;
2659
+ tooltipProps?: Partial<TooltipV2Props>;
2660
+ }
2661
+
2614
2662
  export declare const Tab: default_2.FC<TabProps>;
2615
2663
 
2616
2664
  export declare function Table({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText, paginationConfig, emptyStateConfig, tableStyleConfig, customColumnConfig, exportConfig, }: TableProps): JSX_2.Element;