@dsh-plugin/dsh-ui-components 0.0.1 → 0.1.0-dev.43613492370

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 (65) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +21 -21
  3. package/README.md +136 -136
  4. package/README.zh_CN.md +136 -136
  5. package/docs/tokens.md +67 -67
  6. package/lib/basic/form.js +49 -49
  7. package/lib/basic/styles.js +391 -391
  8. package/lib/composites/styles.js +427 -427
  9. package/lib/data/styles.js +257 -257
  10. package/lib/display/styles.js +310 -310
  11. package/lib/feedback/styles.js +228 -228
  12. package/lib/foundation/bridge.js +203 -203
  13. package/lib/navigation/styles.js +417 -417
  14. package/package.json +104 -104
  15. package/scripts/check-size.mjs +69 -69
  16. package/scripts/dump-npm-latest.mjs +59 -59
  17. package/scripts/gen-host-tokens.mjs +61 -61
  18. package/scripts/gen-icons.mjs +188 -178
  19. package/scripts/verify-no-literal-colors.mjs +63 -63
  20. package/scripts/verify-tokens.mjs +135 -135
  21. package/src/basic/button.tsx +76 -76
  22. package/src/basic/form.tsx +187 -187
  23. package/src/basic/icon-button.tsx +66 -66
  24. package/src/basic/index.ts +38 -38
  25. package/src/basic/input.tsx +140 -140
  26. package/src/basic/select.tsx +120 -120
  27. package/src/basic/styles.ts +412 -412
  28. package/src/basic/toggle.tsx +116 -116
  29. package/src/composites/data-view.tsx +189 -189
  30. package/src/composites/index.ts +11 -11
  31. package/src/composites/indicator.tsx +90 -90
  32. package/src/composites/menu-select.tsx +230 -230
  33. package/src/composites/panel.tsx +72 -72
  34. package/src/composites/settings.tsx +80 -80
  35. package/src/composites/styles.ts +450 -450
  36. package/src/data/collection.tsx +71 -71
  37. package/src/data/index.ts +39 -39
  38. package/src/data/info.tsx +89 -89
  39. package/src/data/picker.tsx +113 -113
  40. package/src/data/styles.ts +278 -278
  41. package/src/display/container.tsx +67 -67
  42. package/src/display/feedback.tsx +92 -92
  43. package/src/display/index.ts +44 -44
  44. package/src/display/label.tsx +165 -165
  45. package/src/display/overlay.tsx +103 -103
  46. package/src/display/styles.ts +332 -332
  47. package/src/feedback/global.tsx +110 -110
  48. package/src/feedback/index.ts +19 -19
  49. package/src/feedback/inline.tsx +50 -50
  50. package/src/feedback/panel.tsx +93 -93
  51. package/src/feedback/styles.ts +250 -250
  52. package/src/foundation/bridge.ts +318 -318
  53. package/src/foundation/icons.tsx +315 -315
  54. package/src/foundation/index.ts +33 -33
  55. package/src/foundation/palette.ts +153 -153
  56. package/src/foundation/provider.tsx +62 -62
  57. package/src/foundation/style.ts +63 -63
  58. package/src/foundation/tokens.ts +62 -62
  59. package/src/index.ts +18 -18
  60. package/src/navigation/hierarchy.tsx +82 -82
  61. package/src/navigation/index.ts +21 -21
  62. package/src/navigation/indicator.tsx +125 -125
  63. package/src/navigation/menu.tsx +94 -94
  64. package/src/navigation/segmented.tsx +136 -136
  65. package/src/navigation/styles.ts +438 -438
@@ -1,71 +1,71 @@
1
- /**
2
- * 表格、列表与树。
3
- *
4
- * @module @dsh-plugin/dsh-ui-components/data/collection
5
- */
6
- import * as React from 'react'
7
- import { Arco } from '@dsh-plugin/dsh-loader/client'
8
- import { injectDataStyles } from './styles.js'
9
-
10
- /** {@link Table} 的 props。 */
11
- export type TableProps = React.ComponentPropsWithoutRef<typeof Arco.Table>
12
-
13
- /**
14
- * 数据表格。表头用模块底色,行悬停用交互填充。
15
- *
16
- * @param props - 见 {@link TableProps}。
17
- * @returns 表格元素。
18
- */
19
- function TableBase(props: TableProps): React.ReactElement {
20
- injectDataStyles()
21
- return <Arco.Table {...props} />
22
- }
23
-
24
- /**
25
- * 表格列配置的类型别名。
26
- *
27
- * 直接取 Arco 的列定义,避免手写一份会漂移的副本。
28
- */
29
- export type TableColumn = NonNullable<TableProps['columns']>[number]
30
-
31
- /** 带静态子组件的表格导出。 */
32
- export const Table = TableBase
33
-
34
- /** {@link List} 的 props。 */
35
- export type ListProps = React.ComponentPropsWithoutRef<typeof Arco.List>
36
-
37
- /**
38
- * 纵向列表。
39
- *
40
- * @param props - 见 {@link ListProps}。
41
- * @returns 列表元素。
42
- */
43
- function ListBase(props: ListProps): React.ReactElement {
44
- injectDataStyles()
45
- return <Arco.List {...props} />
46
- }
47
-
48
- /** {@link ListItem} 的 props。 */
49
- export type ListItemProps = React.ComponentPropsWithoutRef<typeof Arco.List.Item>
50
-
51
- /** 列表项,直接取 Arco 的原组件以保持子组件识别。 */
52
- export const ListItem: typeof Arco.List.Item = Arco.List.Item
53
-
54
- /** 带静态子组件的列表导出。 */
55
- export const List: typeof ListBase & { Item: typeof Arco.List.Item } = Object.assign(ListBase, {
56
- Item: Arco.List.Item,
57
- })
58
-
59
- /** {@link Tree} 的 props。 */
60
- export type TreeProps = React.ComponentPropsWithoutRef<typeof Arco.Tree>
61
-
62
- /**
63
- * 树形结构。
64
- *
65
- * @param props - 见 {@link TreeProps}。
66
- * @returns 树元素。
67
- */
68
- export function Tree(props: TreeProps): React.ReactElement {
69
- injectDataStyles()
70
- return <Arco.Tree {...props} />
71
- }
1
+ /**
2
+ * 表格、列表与树。
3
+ *
4
+ * @module @dsh-plugin/dsh-ui-components/data/collection
5
+ */
6
+ import * as React from 'react'
7
+ import { Arco } from '@dsh-plugin/dsh-loader/client'
8
+ import { injectDataStyles } from './styles.js'
9
+
10
+ /** {@link Table} 的 props。 */
11
+ export type TableProps = React.ComponentPropsWithoutRef<typeof Arco.Table>
12
+
13
+ /**
14
+ * 数据表格。表头用模块底色,行悬停用交互填充。
15
+ *
16
+ * @param props - 见 {@link TableProps}。
17
+ * @returns 表格元素。
18
+ */
19
+ function TableBase(props: TableProps): React.ReactElement {
20
+ injectDataStyles()
21
+ return <Arco.Table {...props} />
22
+ }
23
+
24
+ /**
25
+ * 表格列配置的类型别名。
26
+ *
27
+ * 直接取 Arco 的列定义,避免手写一份会漂移的副本。
28
+ */
29
+ export type TableColumn = NonNullable<TableProps['columns']>[number]
30
+
31
+ /** 带静态子组件的表格导出。 */
32
+ export const Table = TableBase
33
+
34
+ /** {@link List} 的 props。 */
35
+ export type ListProps = React.ComponentPropsWithoutRef<typeof Arco.List>
36
+
37
+ /**
38
+ * 纵向列表。
39
+ *
40
+ * @param props - 见 {@link ListProps}。
41
+ * @returns 列表元素。
42
+ */
43
+ function ListBase(props: ListProps): React.ReactElement {
44
+ injectDataStyles()
45
+ return <Arco.List {...props} />
46
+ }
47
+
48
+ /** {@link ListItem} 的 props。 */
49
+ export type ListItemProps = React.ComponentPropsWithoutRef<typeof Arco.List.Item>
50
+
51
+ /** 列表项,直接取 Arco 的原组件以保持子组件识别。 */
52
+ export const ListItem: typeof Arco.List.Item = Arco.List.Item
53
+
54
+ /** 带静态子组件的列表导出。 */
55
+ export const List: typeof ListBase & { Item: typeof Arco.List.Item } = Object.assign(ListBase, {
56
+ Item: Arco.List.Item,
57
+ })
58
+
59
+ /** {@link Tree} 的 props。 */
60
+ export type TreeProps = React.ComponentPropsWithoutRef<typeof Arco.Tree>
61
+
62
+ /**
63
+ * 树形结构。
64
+ *
65
+ * @param props - 见 {@link TreeProps}。
66
+ * @returns 树元素。
67
+ */
68
+ export function Tree(props: TreeProps): React.ReactElement {
69
+ injectDataStyles()
70
+ return <Arco.Tree {...props} />
71
+ }
package/src/data/index.ts CHANGED
@@ -1,39 +1,39 @@
1
- /**
2
- * 数据展示组件出口。
3
- *
4
- * @module @dsh-plugin/dsh-ui-components/data
5
- */
6
- export { List, ListItem, Table, Tree, type ListItemProps, type ListProps, type TableColumn, type TableProps, type TreeProps } from './collection.js'
7
- export {
8
- Cascader,
9
- DatePicker,
10
- MonthPicker,
11
- QuarterPicker,
12
- RangePicker,
13
- TimePicker,
14
- TimeRangePicker,
15
- Transfer,
16
- TreeSelect,
17
- WeekPicker,
18
- YearPicker,
19
- type CascaderProps,
20
- type DatePickerProps,
21
- type TimePickerProps,
22
- type TransferProps,
23
- type TreeSelectProps,
24
- } from './picker.js'
25
- export {
26
- Calendar,
27
- Carousel,
28
- Image,
29
- Statistic,
30
- Timeline,
31
- TimelineItem,
32
- type CalendarProps,
33
- type CarouselProps,
34
- type ImageProps,
35
- type StatisticProps,
36
- type TimelineItemProps,
37
- type TimelineProps,
38
- } from './info.js'
39
- export { DATA_CSS, injectDataStyles } from './styles.js'
1
+ /**
2
+ * 数据展示组件出口。
3
+ *
4
+ * @module @dsh-plugin/dsh-ui-components/data
5
+ */
6
+ export { List, ListItem, Table, Tree, type ListItemProps, type ListProps, type TableColumn, type TableProps, type TreeProps } from './collection.js'
7
+ export {
8
+ Cascader,
9
+ DatePicker,
10
+ MonthPicker,
11
+ QuarterPicker,
12
+ RangePicker,
13
+ TimePicker,
14
+ TimeRangePicker,
15
+ Transfer,
16
+ TreeSelect,
17
+ WeekPicker,
18
+ YearPicker,
19
+ type CascaderProps,
20
+ type DatePickerProps,
21
+ type TimePickerProps,
22
+ type TransferProps,
23
+ type TreeSelectProps,
24
+ } from './picker.js'
25
+ export {
26
+ Calendar,
27
+ Carousel,
28
+ Image,
29
+ Statistic,
30
+ Timeline,
31
+ TimelineItem,
32
+ type CalendarProps,
33
+ type CarouselProps,
34
+ type ImageProps,
35
+ type StatisticProps,
36
+ type TimelineItemProps,
37
+ type TimelineProps,
38
+ } from './info.js'
39
+ export { DATA_CSS, injectDataStyles } from './styles.js'
package/src/data/info.tsx CHANGED
@@ -1,89 +1,89 @@
1
- /**
2
- * 其余数据展示组件:统计、时间线、日历、轮播与图片。
3
- *
4
- * @module @dsh-plugin/dsh-ui-components/data/info
5
- */
6
- import * as React from 'react'
7
- import { Arco } from '@dsh-plugin/dsh-loader/client'
8
- import { injectDataStyles } from './styles.js'
9
-
10
- /** {@link Statistic} 的 props。 */
11
- export type StatisticProps = React.ComponentPropsWithoutRef<typeof Arco.Statistic>
12
-
13
- /**
14
- * 指标数值。
15
- *
16
- * @param props - 见 {@link StatisticProps}。
17
- * @returns 统计元素。
18
- */
19
- export function Statistic(props: StatisticProps): React.ReactElement {
20
- injectDataStyles()
21
- return <Arco.Statistic {...props} />
22
- }
23
-
24
- /** {@link Timeline} 的 props。 */
25
- export type TimelineProps = React.ComponentPropsWithoutRef<typeof Arco.Timeline>
26
-
27
- /**
28
- * 时间线。
29
- *
30
- * @param props - 见 {@link TimelineProps}。
31
- * @returns 时间线元素。
32
- */
33
- function TimelineBase(props: TimelineProps): React.ReactElement {
34
- injectDataStyles()
35
- return <Arco.Timeline {...props} />
36
- }
37
-
38
- /** {@link TimelineItem} 的 props。 */
39
- export type TimelineItemProps = React.ComponentPropsWithoutRef<typeof Arco.Timeline.Item>
40
-
41
- /** 时间线节点,直接取 Arco 的原组件以保持子组件识别。 */
42
- export const TimelineItem: typeof Arco.Timeline.Item = Arco.Timeline.Item
43
-
44
- /** 带静态子组件的时间线导出。 */
45
- export const Timeline: typeof TimelineBase & { Item: typeof Arco.Timeline.Item } = Object.assign(TimelineBase, {
46
- Item: Arco.Timeline.Item,
47
- })
48
-
49
- /** {@link Calendar} 的 props。 */
50
- export type CalendarProps = React.ComponentPropsWithoutRef<typeof Arco.Calendar>
51
-
52
- /**
53
- * 日历。
54
- *
55
- * @param props - 见 {@link CalendarProps}。
56
- * @returns 日历元素。
57
- */
58
- export function Calendar(props: CalendarProps): React.ReactElement {
59
- injectDataStyles()
60
- return <Arco.Calendar {...props} />
61
- }
62
-
63
- /** {@link Carousel} 的 props。 */
64
- export type CarouselProps = React.ComponentPropsWithoutRef<typeof Arco.Carousel>
65
-
66
- /**
67
- * 轮播。
68
- *
69
- * @param props - 见 {@link CarouselProps}。
70
- * @returns 轮播元素。
71
- */
72
- export function Carousel(props: CarouselProps): React.ReactElement {
73
- injectDataStyles()
74
- return <Arco.Carousel {...props} />
75
- }
76
-
77
- /** {@link Image} 的 props。 */
78
- export type ImageProps = React.ComponentPropsWithoutRef<typeof Arco.Image>
79
-
80
- /**
81
- * 图片,带预览。
82
- *
83
- * @param props - 见 {@link ImageProps}。
84
- * @returns 图片元素。
85
- */
86
- export function Image(props: ImageProps): React.ReactElement {
87
- injectDataStyles()
88
- return <Arco.Image {...props} />
89
- }
1
+ /**
2
+ * 其余数据展示组件:统计、时间线、日历、轮播与图片。
3
+ *
4
+ * @module @dsh-plugin/dsh-ui-components/data/info
5
+ */
6
+ import * as React from 'react'
7
+ import { Arco } from '@dsh-plugin/dsh-loader/client'
8
+ import { injectDataStyles } from './styles.js'
9
+
10
+ /** {@link Statistic} 的 props。 */
11
+ export type StatisticProps = React.ComponentPropsWithoutRef<typeof Arco.Statistic>
12
+
13
+ /**
14
+ * 指标数值。
15
+ *
16
+ * @param props - 见 {@link StatisticProps}。
17
+ * @returns 统计元素。
18
+ */
19
+ export function Statistic(props: StatisticProps): React.ReactElement {
20
+ injectDataStyles()
21
+ return <Arco.Statistic {...props} />
22
+ }
23
+
24
+ /** {@link Timeline} 的 props。 */
25
+ export type TimelineProps = React.ComponentPropsWithoutRef<typeof Arco.Timeline>
26
+
27
+ /**
28
+ * 时间线。
29
+ *
30
+ * @param props - 见 {@link TimelineProps}。
31
+ * @returns 时间线元素。
32
+ */
33
+ function TimelineBase(props: TimelineProps): React.ReactElement {
34
+ injectDataStyles()
35
+ return <Arco.Timeline {...props} />
36
+ }
37
+
38
+ /** {@link TimelineItem} 的 props。 */
39
+ export type TimelineItemProps = React.ComponentPropsWithoutRef<typeof Arco.Timeline.Item>
40
+
41
+ /** 时间线节点,直接取 Arco 的原组件以保持子组件识别。 */
42
+ export const TimelineItem: typeof Arco.Timeline.Item = Arco.Timeline.Item
43
+
44
+ /** 带静态子组件的时间线导出。 */
45
+ export const Timeline: typeof TimelineBase & { Item: typeof Arco.Timeline.Item } = Object.assign(TimelineBase, {
46
+ Item: Arco.Timeline.Item,
47
+ })
48
+
49
+ /** {@link Calendar} 的 props。 */
50
+ export type CalendarProps = React.ComponentPropsWithoutRef<typeof Arco.Calendar>
51
+
52
+ /**
53
+ * 日历。
54
+ *
55
+ * @param props - 见 {@link CalendarProps}。
56
+ * @returns 日历元素。
57
+ */
58
+ export function Calendar(props: CalendarProps): React.ReactElement {
59
+ injectDataStyles()
60
+ return <Arco.Calendar {...props} />
61
+ }
62
+
63
+ /** {@link Carousel} 的 props。 */
64
+ export type CarouselProps = React.ComponentPropsWithoutRef<typeof Arco.Carousel>
65
+
66
+ /**
67
+ * 轮播。
68
+ *
69
+ * @param props - 见 {@link CarouselProps}。
70
+ * @returns 轮播元素。
71
+ */
72
+ export function Carousel(props: CarouselProps): React.ReactElement {
73
+ injectDataStyles()
74
+ return <Arco.Carousel {...props} />
75
+ }
76
+
77
+ /** {@link Image} 的 props。 */
78
+ export type ImageProps = React.ComponentPropsWithoutRef<typeof Arco.Image>
79
+
80
+ /**
81
+ * 图片,带预览。
82
+ *
83
+ * @param props - 见 {@link ImageProps}。
84
+ * @returns 图片元素。
85
+ */
86
+ export function Image(props: ImageProps): React.ReactElement {
87
+ injectDataStyles()
88
+ return <Arco.Image {...props} />
89
+ }
@@ -1,113 +1,113 @@
1
- /**
2
- * 选择类数据组件:日期、时间、级联、树选择与穿梭框。
3
- *
4
- * 这些组件的浮层统一走菜单材质与浮起阴影,由 `data/styles` 落实。
5
- *
6
- * @module @dsh-plugin/dsh-ui-components/data/picker
7
- */
8
- import * as React from 'react'
9
- import { Arco } from '@dsh-plugin/dsh-loader/client'
10
- import { injectDataStyles } from './styles.js'
11
-
12
- /** {@link DatePicker} 的 props。 */
13
- export type DatePickerProps = React.ComponentPropsWithoutRef<typeof Arco.DatePicker>
14
-
15
- /**
16
- * 日期选择。
17
- *
18
- * @param props - 见 {@link DatePickerProps}。
19
- * @returns 日期选择元素。
20
- */
21
- function DatePickerBase(props: DatePickerProps): React.ReactElement {
22
- injectDataStyles()
23
- return <Arco.DatePicker {...props} />
24
- }
25
-
26
- /** 月份选择。 */
27
- export const MonthPicker: typeof Arco.DatePicker.MonthPicker = Arco.DatePicker.MonthPicker
28
- /** 年份选择。 */
29
- export const YearPicker: typeof Arco.DatePicker.YearPicker = Arco.DatePicker.YearPicker
30
- /** 季度选择。 */
31
- export const QuarterPicker: typeof Arco.DatePicker.QuarterPicker = Arco.DatePicker.QuarterPicker
32
- /** 周选择。 */
33
- export const WeekPicker: typeof Arco.DatePicker.WeekPicker = Arco.DatePicker.WeekPicker
34
- /** 日期区间选择。 */
35
- export const RangePicker: typeof Arco.DatePicker.RangePicker = Arco.DatePicker.RangePicker
36
-
37
- /** 带静态子组件的日期选择导出。 */
38
- export const DatePicker: typeof DatePickerBase & {
39
- MonthPicker: typeof Arco.DatePicker.MonthPicker
40
- YearPicker: typeof Arco.DatePicker.YearPicker
41
- QuarterPicker: typeof Arco.DatePicker.QuarterPicker
42
- WeekPicker: typeof Arco.DatePicker.WeekPicker
43
- RangePicker: typeof Arco.DatePicker.RangePicker
44
- } = Object.assign(DatePickerBase, {
45
- MonthPicker: Arco.DatePicker.MonthPicker,
46
- YearPicker: Arco.DatePicker.YearPicker,
47
- QuarterPicker: Arco.DatePicker.QuarterPicker,
48
- WeekPicker: Arco.DatePicker.WeekPicker,
49
- RangePicker: Arco.DatePicker.RangePicker,
50
- })
51
-
52
- /** {@link TimePicker} 的 props。 */
53
- export type TimePickerProps = React.ComponentPropsWithoutRef<typeof Arco.TimePicker>
54
-
55
- /**
56
- * 时间选择。
57
- *
58
- * @param props - 见 {@link TimePickerProps}。
59
- * @returns 时间选择元素。
60
- */
61
- function TimePickerBase(props: TimePickerProps): React.ReactElement {
62
- injectDataStyles()
63
- return <Arco.TimePicker {...props} />
64
- }
65
-
66
- /** 时间区间选择。 */
67
- export const TimeRangePicker: typeof Arco.TimePicker.RangePicker = Arco.TimePicker.RangePicker
68
-
69
- /** 带静态子组件的时间选择导出。 */
70
- export const TimePicker: typeof TimePickerBase & { RangePicker: typeof Arco.TimePicker.RangePicker } =
71
- Object.assign(TimePickerBase, { RangePicker: Arco.TimePicker.RangePicker })
72
-
73
- /** {@link Cascader} 的 props。 */
74
- export type CascaderProps = React.ComponentPropsWithoutRef<typeof Arco.Cascader>
75
-
76
- /**
77
- * 级联选择。
78
- *
79
- * @param props - 见 {@link CascaderProps}。
80
- * @returns 级联元素。
81
- */
82
- export function Cascader(props: CascaderProps): React.ReactElement {
83
- injectDataStyles()
84
- return <Arco.Cascader {...props} />
85
- }
86
-
87
- /** {@link TreeSelect} 的 props。 */
88
- export type TreeSelectProps = React.ComponentPropsWithoutRef<typeof Arco.TreeSelect>
89
-
90
- /**
91
- * 树形选择。
92
- *
93
- * @param props - 见 {@link TreeSelectProps}。
94
- * @returns 树选择元素。
95
- */
96
- export function TreeSelect(props: TreeSelectProps): React.ReactElement {
97
- injectDataStyles()
98
- return <Arco.TreeSelect {...props} />
99
- }
100
-
101
- /** {@link Transfer} 的 props。 */
102
- export type TransferProps = React.ComponentPropsWithoutRef<typeof Arco.Transfer>
103
-
104
- /**
105
- * 穿梭框。
106
- *
107
- * @param props - 见 {@link TransferProps}。
108
- * @returns 穿梭框元素。
109
- */
110
- export function Transfer(props: TransferProps): React.ReactElement {
111
- injectDataStyles()
112
- return <Arco.Transfer {...props} />
113
- }
1
+ /**
2
+ * 选择类数据组件:日期、时间、级联、树选择与穿梭框。
3
+ *
4
+ * 这些组件的浮层统一走菜单材质与浮起阴影,由 `data/styles` 落实。
5
+ *
6
+ * @module @dsh-plugin/dsh-ui-components/data/picker
7
+ */
8
+ import * as React from 'react'
9
+ import { Arco } from '@dsh-plugin/dsh-loader/client'
10
+ import { injectDataStyles } from './styles.js'
11
+
12
+ /** {@link DatePicker} 的 props。 */
13
+ export type DatePickerProps = React.ComponentPropsWithoutRef<typeof Arco.DatePicker>
14
+
15
+ /**
16
+ * 日期选择。
17
+ *
18
+ * @param props - 见 {@link DatePickerProps}。
19
+ * @returns 日期选择元素。
20
+ */
21
+ function DatePickerBase(props: DatePickerProps): React.ReactElement {
22
+ injectDataStyles()
23
+ return <Arco.DatePicker {...props} />
24
+ }
25
+
26
+ /** 月份选择。 */
27
+ export const MonthPicker: typeof Arco.DatePicker.MonthPicker = Arco.DatePicker.MonthPicker
28
+ /** 年份选择。 */
29
+ export const YearPicker: typeof Arco.DatePicker.YearPicker = Arco.DatePicker.YearPicker
30
+ /** 季度选择。 */
31
+ export const QuarterPicker: typeof Arco.DatePicker.QuarterPicker = Arco.DatePicker.QuarterPicker
32
+ /** 周选择。 */
33
+ export const WeekPicker: typeof Arco.DatePicker.WeekPicker = Arco.DatePicker.WeekPicker
34
+ /** 日期区间选择。 */
35
+ export const RangePicker: typeof Arco.DatePicker.RangePicker = Arco.DatePicker.RangePicker
36
+
37
+ /** 带静态子组件的日期选择导出。 */
38
+ export const DatePicker: typeof DatePickerBase & {
39
+ MonthPicker: typeof Arco.DatePicker.MonthPicker
40
+ YearPicker: typeof Arco.DatePicker.YearPicker
41
+ QuarterPicker: typeof Arco.DatePicker.QuarterPicker
42
+ WeekPicker: typeof Arco.DatePicker.WeekPicker
43
+ RangePicker: typeof Arco.DatePicker.RangePicker
44
+ } = Object.assign(DatePickerBase, {
45
+ MonthPicker: Arco.DatePicker.MonthPicker,
46
+ YearPicker: Arco.DatePicker.YearPicker,
47
+ QuarterPicker: Arco.DatePicker.QuarterPicker,
48
+ WeekPicker: Arco.DatePicker.WeekPicker,
49
+ RangePicker: Arco.DatePicker.RangePicker,
50
+ })
51
+
52
+ /** {@link TimePicker} 的 props。 */
53
+ export type TimePickerProps = React.ComponentPropsWithoutRef<typeof Arco.TimePicker>
54
+
55
+ /**
56
+ * 时间选择。
57
+ *
58
+ * @param props - 见 {@link TimePickerProps}。
59
+ * @returns 时间选择元素。
60
+ */
61
+ function TimePickerBase(props: TimePickerProps): React.ReactElement {
62
+ injectDataStyles()
63
+ return <Arco.TimePicker {...props} />
64
+ }
65
+
66
+ /** 时间区间选择。 */
67
+ export const TimeRangePicker: typeof Arco.TimePicker.RangePicker = Arco.TimePicker.RangePicker
68
+
69
+ /** 带静态子组件的时间选择导出。 */
70
+ export const TimePicker: typeof TimePickerBase & { RangePicker: typeof Arco.TimePicker.RangePicker } =
71
+ Object.assign(TimePickerBase, { RangePicker: Arco.TimePicker.RangePicker })
72
+
73
+ /** {@link Cascader} 的 props。 */
74
+ export type CascaderProps = React.ComponentPropsWithoutRef<typeof Arco.Cascader>
75
+
76
+ /**
77
+ * 级联选择。
78
+ *
79
+ * @param props - 见 {@link CascaderProps}。
80
+ * @returns 级联元素。
81
+ */
82
+ export function Cascader(props: CascaderProps): React.ReactElement {
83
+ injectDataStyles()
84
+ return <Arco.Cascader {...props} />
85
+ }
86
+
87
+ /** {@link TreeSelect} 的 props。 */
88
+ export type TreeSelectProps = React.ComponentPropsWithoutRef<typeof Arco.TreeSelect>
89
+
90
+ /**
91
+ * 树形选择。
92
+ *
93
+ * @param props - 见 {@link TreeSelectProps}。
94
+ * @returns 树选择元素。
95
+ */
96
+ export function TreeSelect(props: TreeSelectProps): React.ReactElement {
97
+ injectDataStyles()
98
+ return <Arco.TreeSelect {...props} />
99
+ }
100
+
101
+ /** {@link Transfer} 的 props。 */
102
+ export type TransferProps = React.ComponentPropsWithoutRef<typeof Arco.Transfer>
103
+
104
+ /**
105
+ * 穿梭框。
106
+ *
107
+ * @param props - 见 {@link TransferProps}。
108
+ * @returns 穿梭框元素。
109
+ */
110
+ export function Transfer(props: TransferProps): React.ReactElement {
111
+ injectDataStyles()
112
+ return <Arco.Transfer {...props} />
113
+ }