@baishuyun/ai-design 2.0.8 → 2.0.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @baishuyun/ai-design
2
2
 
3
+ ## 2.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - fix input format error
8
+ - Updated dependencies
9
+ - @baishuyun/ai-feat-utils@2.0.10
10
+ - @baishuyun/types@3.0.10
11
+
12
+ ## 2.0.9
13
+
14
+ ### Patch Changes
15
+
16
+ - add standard action
17
+ - Updated dependencies
18
+ - @baishuyun/ai-feat-utils@2.0.9
19
+ - @baishuyun/types@3.0.9
20
+
3
21
  ## 2.0.8
4
22
 
5
23
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ai-design",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "AI 功能 UI 组件库 - 所有 AI 功能的 UI 表现唯一真相来源",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -60,8 +60,8 @@
60
60
  "tw-animate-css": "^1.4.0",
61
61
  "vaul": "^1.1.2",
62
62
  "zod": "^4.1.13",
63
- "@baishuyun/ai-feat-utils": "2.0.8",
64
- "@baishuyun/types": "3.0.8"
63
+ "@baishuyun/ai-feat-utils": "2.0.10",
64
+ "@baishuyun/types": "3.0.10"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "react": "^19.0.0",
@@ -83,9 +83,9 @@
83
83
  "typescript": "^5.5.0",
84
84
  "vite": "^5.1.4",
85
85
  "vite-plugin-dts": "^4.5.4",
86
- "@baishuyun/tailwind-config": "3.0.8",
87
- "@baishuyun/types": "3.0.8",
88
- "@baishuyun/typescript-config": "2.0.8"
86
+ "@baishuyun/types": "3.0.10",
87
+ "@baishuyun/typescript-config": "2.0.9",
88
+ "@baishuyun/tailwind-config": "3.0.9"
89
89
  },
90
90
  "keywords": [],
91
91
  "author": "",
@@ -4,8 +4,18 @@ export const MIN_YEAR = 1000;
4
4
  export const MAX_YEAR = 2999;
5
5
 
6
6
  export const MONTH_NAMES = [
7
- '一月', '二月', '三月', '四月', '五月', '六月',
8
- '七月', '八月', '九月', '十月', '十一月', '十二月',
7
+ '一月',
8
+ '二月',
9
+ '三月',
10
+ '四月',
11
+ '五月',
12
+ '六月',
13
+ '七月',
14
+ '八月',
15
+ '九月',
16
+ '十月',
17
+ '十一月',
18
+ '十二月',
9
19
  ];
10
20
 
11
21
  export const WEEK_NAMES = ['一', '二', '三', '四', '五', '六', '日'];
@@ -21,11 +31,7 @@ export function getDaysInMonth(year: number, month: number): number {
21
31
  return new Date(year, month + 1, 0).getDate();
22
32
  }
23
33
 
24
- export function checkTimeValidate(
25
- current: TimeObj,
26
- start: TimeObj,
27
- end: TimeObj
28
- ): boolean {
34
+ export function checkTimeValidate(current: TimeObj, start: TimeObj, end: TimeObj): boolean {
29
35
  const curTotal = current.h * 3600000 + current.m * 60000 + current.s * 1000 + current.ms;
30
36
  const startTotal = start.h * 3600000 + start.m * 60000 + start.s * 1000 + start.ms;
31
37
  const endTotal = end.h * 3600000 + end.m * 60000 + end.s * 1000 + end.ms;
@@ -74,11 +80,7 @@ export function getCloserDate(target: Date, min: Date, max: Date): Date {
74
80
  return new Date(target);
75
81
  }
76
82
 
77
- export function checkBeforeMenuClick(
78
- date: Date,
79
- minDate: Date,
80
- mode: 'month' | 'year'
81
- ): boolean {
83
+ export function checkBeforeMenuClick(date: Date, minDate: Date, mode: 'month' | 'year'): boolean {
82
84
  if (mode === 'year') {
83
85
  return date.getFullYear() > minDate.getFullYear();
84
86
  }
@@ -89,11 +91,7 @@ export function checkBeforeMenuClick(
89
91
  return y > minY || (y === minY && m > minM);
90
92
  }
91
93
 
92
- export function checkAfterMenuClick(
93
- date: Date,
94
- maxDate: Date,
95
- mode: 'month' | 'year'
96
- ): boolean {
94
+ export function checkAfterMenuClick(date: Date, maxDate: Date, mode: 'month' | 'year'): boolean {
97
95
  if (mode === 'year') {
98
96
  return date.getFullYear() < maxDate.getFullYear();
99
97
  }
@@ -6,6 +6,7 @@ import { cn } from '../../../lib/utils';
6
6
  import { transCls } from '../../../const/ui';
7
7
  import { DateInput } from '../date-picker/date-input';
8
8
  import type { DateFormat } from '../date-picker/types';
9
+ import { formatDateByFormat } from '../date-picker/utils';
9
10
 
10
11
  const inputBaseCls =
11
12
  'h-[34px] px-[10px] py-[7px] rounded-[4px] bg-white border text-[14px] text-[#030303] placeholder:text-[#999999] focus:outline-none focus:border-[#0265FF] w-full disabled:bg-[#EFF0F6] disabled:cursor-not-allowed';
@@ -101,7 +102,7 @@ export function DateTimeInput({ field, value, onChange, disabled, showLabel, sho
101
102
  <FieldWrapper field={field} showLabel={showLabel} showDescription={showDescription}>
102
103
  <DateInput
103
104
  value={dateValue}
104
- onChange={(date) => onChange?.(date ? date.toISOString() : '')}
105
+ onChange={(date) => onChange?.(date ? formatDateByFormat(date, field?.widget?.format ?? 'yyyy-MM-dd HH:mm:ss') /* date.toISOString() */ : '')}
105
106
  format={format}
106
107
  disabled={disabled}
107
108
  />