@juspay/blend-design-system 0.0.18-beta → 0.0.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.
@@ -130,6 +130,7 @@ export type ChartsProps = {
130
130
  xAxis?: XAxisConfig;
131
131
  yAxis?: YAxisConfig;
132
132
  noData?: NoDataProps;
133
+ height?: number;
133
134
  };
134
135
  export type FlattenedDataPoint = {
135
136
  name: string;
@@ -1,5 +1,5 @@
1
1
  import { ColumnManagerProps } from './types';
2
2
  export declare const ColumnManager: {
3
- <T extends Record<string, unknown>>({ columns, visibleColumns, onColumnChange, maxSelections, alwaysSelectedColumns, columnManagerPrimaryAction, columnManagerSecondaryAction, }: ColumnManagerProps<T>): import("react/jsx-runtime").JSX.Element;
3
+ <T extends Record<string, unknown>>({ columns, visibleColumns, onColumnChange, maxSelections, alwaysSelectedColumns, columnManagerPrimaryAction, columnManagerSecondaryAction, multiSelectWidth, }: ColumnManagerProps<T>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
@@ -21,6 +21,7 @@ export type TableHeaderProps<T extends Record<string, unknown>> = {
21
21
  disabled?: boolean;
22
22
  loading?: boolean;
23
23
  };
24
+ columnManagerWidth?: number;
24
25
  enableRowExpansion?: boolean;
25
26
  enableRowSelection?: boolean;
26
27
  rowActions?: RowActionsConfig<T>;
@@ -99,6 +99,7 @@ export type ColumnManagerProps<T extends Record<string, unknown>> = {
99
99
  disabled?: boolean;
100
100
  loading?: boolean;
101
101
  };
102
+ multiSelectWidth?: number;
102
103
  };
103
104
  export type AdvancedFilterProps = {
104
105
  filters: unknown[];
@@ -247,6 +248,7 @@ export type DataTableProps<T extends Record<string, unknown>> = {
247
248
  disabled?: boolean;
248
249
  loading?: boolean;
249
250
  };
251
+ columnManagerWidth?: number;
250
252
  pagination?: PaginationConfig;
251
253
  serverSidePagination?: boolean;
252
254
  onPageChange?: (page: number) => void;
@@ -10,6 +10,7 @@ type QuickRangeSelectorProps = {
10
10
  disablePastDates?: boolean;
11
11
  isDisabled?: boolean;
12
12
  size?: DateRangePickerSize;
13
+ maxMenuHeight?: number;
13
14
  };
14
15
  declare const QuickRangeSelector: import('react').ForwardRefExoticComponent<QuickRangeSelectorProps & import('react').RefAttributes<HTMLDivElement>>;
15
16
  export default QuickRangeSelector;
@@ -0,0 +1,23 @@
1
+ export declare const DATE_RANGE_PICKER_CONSTANTS: {
2
+ readonly DEFAULT_DATE_FORMAT: "dd/MM/yyyy";
3
+ readonly TIME_FORMAT: "HH:mm";
4
+ readonly PRESET_DETECTION_TOLERANCE_MS: number;
5
+ readonly TIMEZONE_TOLERANCE_HOURS: 25;
6
+ readonly CALENDAR_CONTAINER_HEIGHT: 340;
7
+ readonly CALENDAR_LOAD_THRESHOLD: 100;
8
+ readonly MONTH_BUFFER_SIZE: 2;
9
+ readonly MOBILE_PICKER: {
10
+ readonly ITEM_HEIGHT: 44;
11
+ readonly VISIBLE_ITEMS: 3;
12
+ };
13
+ readonly HAPTIC_PATTERNS: {
14
+ readonly SELECTION: readonly [8];
15
+ readonly IMPACT: readonly [15];
16
+ readonly NOTIFICATION: readonly [25, 40, 25];
17
+ };
18
+ readonly MIN_YEAR: 2012;
19
+ readonly MAX_YEAR_OFFSET: 10;
20
+ readonly TIME_MINUTE_INCREMENT: 15;
21
+ readonly SCROLL_DEBOUNCE_MS: 80;
22
+ readonly HAPTIC_COOLDOWN_MS: 50;
23
+ };
@@ -20,11 +20,6 @@ export declare enum DateRangePickerSize {
20
20
  MEDIUM = "md",
21
21
  LARGE = "lg"
22
22
  }
23
- export type DateRange = {
24
- startDate: Date;
25
- endDate: Date;
26
- showTimePicker?: boolean;
27
- };
28
23
  /**
29
24
  * Predefined format presets for common date display patterns
30
25
  */
@@ -39,6 +34,39 @@ export declare enum DateFormatPreset {
39
34
  US_RANGE = "us-range",// "09/03/2025 - 09/05/2025"
40
35
  CUSTOM = "custom"
41
36
  }
37
+ /**
38
+ * Haptic feedback types for different interactions
39
+ */
40
+ export declare enum HapticFeedbackType {
41
+ SELECTION = "selection",
42
+ IMPACT = "impact",
43
+ NOTIFICATION = "notification"
44
+ }
45
+ /**
46
+ * Validation error types for date inputs
47
+ */
48
+ export declare enum DateValidationError {
49
+ NONE = "none",
50
+ INVALID_FORMAT = "format",
51
+ INVALID_DATE = "invalid-date",
52
+ OUT_OF_RANGE = "out-of-range",
53
+ INVALID_TIME_ORDER = "invalid-time-order",
54
+ MISSING_DATES = "missing-dates",
55
+ FUTURE_DATE_DISABLED = "future-date-disabled",
56
+ PAST_DATE_DISABLED = "past-date-disabled"
57
+ }
58
+ /**
59
+ * Calendar interaction modes
60
+ */
61
+ export declare enum CalendarInteractionMode {
62
+ SINGLE_DATE = "single-date",
63
+ DATE_RANGE = "date-range"
64
+ }
65
+ export type DateRange = {
66
+ startDate: Date;
67
+ endDate: Date;
68
+ showTimePicker?: boolean;
69
+ };
42
70
  /**
43
71
  * Custom format function type for advanced formatting
44
72
  */
@@ -78,6 +106,37 @@ export type TriggerConfig = {
78
106
  onClick: () => void;
79
107
  }) => ReactNode;
80
108
  };
109
+ /**
110
+ * Date validation result
111
+ */
112
+ export type DateValidationResult = {
113
+ isValid: boolean;
114
+ error: DateValidationError;
115
+ message?: string;
116
+ };
117
+ /**
118
+ * Date range validation result
119
+ */
120
+ export type DateRangeValidationResult = {
121
+ isValid: boolean;
122
+ error: DateValidationError;
123
+ message?: string;
124
+ };
125
+ /**
126
+ * Calendar month data structure
127
+ */
128
+ export type CalendarMonth = {
129
+ month: number;
130
+ year: number;
131
+ index?: number;
132
+ };
133
+ /**
134
+ * Picker column data
135
+ */
136
+ export type PickerColumnData = {
137
+ items: (string | number)[];
138
+ selectedIndex: number;
139
+ };
81
140
  export type DateRangePickerProps = {
82
141
  value?: DateRange;
83
142
  onChange?: (range: DateRange) => void;
@@ -100,15 +159,8 @@ export type DateRangePickerProps = {
100
159
  size?: DateRangePickerSize;
101
160
  formatConfig?: DateFormatConfig;
102
161
  triggerConfig?: TriggerConfig;
162
+ maxMenuHeight?: number;
103
163
  };
104
- /**
105
- * Haptic feedback types for different interactions
106
- */
107
- export declare enum HapticFeedbackType {
108
- SELECTION = "selection",
109
- IMPACT = "impact",
110
- NOTIFICATION = "notification"
111
- }
112
164
  export type PresetItemProps = {
113
165
  preset: DateRangePreset;
114
166
  isActive: boolean;
@@ -703,3 +703,27 @@ export declare const shouldHideDateFromCalendar: (date: Date, today: Date, hideF
703
703
  * @returns New date range or null if click should be ignored
704
704
  */
705
705
  export declare const handleEnhancedCalendarDateClick: (clickedDate: Date, selectedRange: DateRange, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, isDoubleClick?: boolean) => DateRange | null;
706
+ /**
707
+ * Checks if two dates represent the same calendar day (ignoring time and timezone)
708
+ */
709
+ export declare const isSameCalendarDay: (date1: Date, date2: Date) => boolean;
710
+ /**
711
+ * Checks if a date range represents a full day in any timezone
712
+ */
713
+ export declare const isFullDayRange: (startDate: Date, endDate: Date) => boolean;
714
+ /**
715
+ * Checks if a date range matches "Today" preset
716
+ */
717
+ export declare const matchesTodayPreset: (range: DateRange) => boolean;
718
+ /**
719
+ * Checks if a date range matches "Yesterday" preset
720
+ */
721
+ export declare const matchesYesterdayPreset: (range: DateRange) => boolean;
722
+ /**
723
+ * Checks if a date range matches "Tomorrow" preset
724
+ */
725
+ export declare const matchesTomorrowPreset: (range: DateRange) => boolean;
726
+ /**
727
+ * Robust preset detection that works with both UTC and local timezone dates
728
+ */
729
+ export declare const detectPresetFromRange: (range: DateRange) => DateRangePreset;
@@ -1,6 +1,6 @@
1
1
  import { PopoverProps } from './types';
2
2
  declare const Popover: {
3
- ({ heading, description, trigger, children, showCloseButton, onOpenChange, open, asModal, primaryAction, secondaryAction, sideOffset, side, align, alignOffset, width, minWidth, maxWidth, height, minHeight, maxHeight, zIndex, size, onClose, shadow, useDrawerOnMobile, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ heading, description, trigger, children, showCloseButton, onOpenChange, open, asModal, primaryAction, secondaryAction, sideOffset, side, align, alignOffset, width, minWidth, maxWidth, height, minHeight, maxHeight, zIndex, size, onClose, shadow, useDrawerOnMobile, avoidCollisions, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default Popover;
@@ -30,4 +30,5 @@ export type PopoverProps = {
30
30
  onClose?: () => void;
31
31
  shadow?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
32
32
  useDrawerOnMobile?: boolean;
33
+ avoidCollisions?: boolean;
33
34
  };