aha-components 1.5.1 → 1.5.3

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.
@@ -8,6 +8,7 @@ export declare const Sizes: Story;
8
8
  export declare const RangeWithPresets: Story;
9
9
  export declare const RangeWithPresetsAndDoubleCalendar: Story;
10
10
  export declare const RangeDoubleCalendar: Story;
11
+ export declare const RangeWithCustomPresets: Story;
11
12
  export declare const Disabled: Story;
12
13
  export declare const Error: Story;
13
14
  export declare const WithClear: Story;
@@ -18,3 +19,7 @@ export declare const AllStates: Story;
18
19
  export declare const RangeMode: Story;
19
20
  export declare const RangeWithDefault: Story;
20
21
  export declare const RangeCustomFormat: Story;
22
+ export declare const CustomPlaceholders: Story;
23
+ export declare const ShowSelectedRange: Story;
24
+ export declare const RangeDisplayMode: Story;
25
+ export declare const TextModeWithSelectedRange: Story;
@@ -3,6 +3,10 @@ export interface DateRange {
3
3
  startDate: Date | null;
4
4
  endDate: Date | null;
5
5
  }
6
+ export interface PresetRange {
7
+ label: string;
8
+ range: DateRange;
9
+ }
6
10
  export interface DatePickerBaseProps {
7
11
  /** 是否禁用 */
8
12
  disabled?: boolean;
@@ -44,8 +48,8 @@ export interface DatePickerBaseProps {
44
48
  maxDate?: Date;
45
49
  /** 分隔符(范围模式) */
46
50
  separator?: string;
47
- /** 是否显示预设日期范围(仅在范围模式下有效) */
48
- presetRanges?: boolean;
51
+ /** 预设日期范围列表(仅在范围模式下有效) */
52
+ presetRanges?: PresetRange[] | boolean;
49
53
  /** 显示日历数量:1=单月,2=双月(仅在范围模式下有效,默认1) */
50
54
  calendarCount?: 1 | 2;
51
55
  /** 是否显示 Apply/Cancel 按钮(仅在范围模式下有效) */
@@ -58,6 +62,14 @@ export interface DatePickerBaseProps {
58
62
  onApply?: (range: DateRange) => void;
59
63
  /** Cancel 按钮回调 */
60
64
  onCancel?: () => void;
65
+ /** 是否显示选中的日期段(仅在范围模式下有效,默认false) */
66
+ showSelectedRange?: boolean;
67
+ /** 选中的开始日期段文本 */
68
+ startSelectedRangeText?: string;
69
+ /** 选中的结束日期段文本 */
70
+ endSelectedRangeText?: string;
71
+ /** 范围显示模式:'range'=显示两个输入框(xxx - xxx),'text'=显示一句话(仅在范围模式下有效,默认'range') */
72
+ rangeDisplayMode?: 'range' | 'text';
61
73
  }
62
74
  export interface DatePickerSingleProps extends DatePickerBaseProps {
63
75
  /** 模式:单个日期 */
package/dist/index.d.ts CHANGED
@@ -546,6 +546,10 @@ interface DateRange {
546
546
  startDate: Date | null;
547
547
  endDate: Date | null;
548
548
  }
549
+ interface PresetRange {
550
+ label: string;
551
+ range: DateRange;
552
+ }
549
553
  interface DatePickerBaseProps {
550
554
  /** 是否禁用 */
551
555
  disabled?: boolean;
@@ -587,8 +591,8 @@ interface DatePickerBaseProps {
587
591
  maxDate?: Date;
588
592
  /** 分隔符(范围模式) */
589
593
  separator?: string;
590
- /** 是否显示预设日期范围(仅在范围模式下有效) */
591
- presetRanges?: boolean;
594
+ /** 预设日期范围列表(仅在范围模式下有效) */
595
+ presetRanges?: PresetRange[] | boolean;
592
596
  /** 显示日历数量:1=单月,2=双月(仅在范围模式下有效,默认1) */
593
597
  calendarCount?: 1 | 2;
594
598
  /** 是否显示 Apply/Cancel 按钮(仅在范围模式下有效) */
@@ -601,6 +605,14 @@ interface DatePickerBaseProps {
601
605
  onApply?: (range: DateRange) => void;
602
606
  /** Cancel 按钮回调 */
603
607
  onCancel?: () => void;
608
+ /** 是否显示选中的日期段(仅在范围模式下有效,默认false) */
609
+ showSelectedRange?: boolean;
610
+ /** 选中的开始日期段文本 */
611
+ startSelectedRangeText?: string;
612
+ /** 选中的结束日期段文本 */
613
+ endSelectedRangeText?: string;
614
+ /** 范围显示模式:'range'=显示两个输入框(xxx - xxx),'text'=显示一句话(仅在范围模式下有效,默认'range') */
615
+ rangeDisplayMode?: 'range' | 'text';
604
616
  }
605
617
  interface DatePickerSingleProps extends DatePickerBaseProps {
606
618
  /** 模式:单个日期 */