@alifd/chat 0.1.10 → 0.1.12-beta.0

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 (104) hide show
  1. package/es/button/index.d.ts +1 -9
  2. package/es/calendar/index.d.ts +23 -0
  3. package/es/calendar/index.js +33 -0
  4. package/es/calendar/style.d.ts +2 -0
  5. package/es/calendar/style.js +2 -0
  6. package/es/calendar/types.d.ts +123 -0
  7. package/es/calendar/types.js +1 -0
  8. package/es/card/index.d.ts +1 -5
  9. package/es/card/view/card.d.ts +1 -4
  10. package/es/date-picker/index.d.ts +24 -0
  11. package/es/date-picker/index.js +33 -0
  12. package/es/date-picker/style.d.ts +3 -0
  13. package/es/date-picker/style.js +3 -0
  14. package/es/date-picker/types.d.ts +123 -0
  15. package/es/date-picker/types.js +1 -0
  16. package/es/feedback/index.d.ts +1 -6
  17. package/es/feedback/index.js +1 -1
  18. package/es/feedback/view/good.js +1 -1
  19. package/es/float-button/index.d.ts +4 -26
  20. package/es/float-button/view/backtop.d.ts +1 -9
  21. package/es/float-button/view/drawer.d.ts +1 -4
  22. package/es/float-button/view/float-button.d.ts +1 -9
  23. package/es/float-button/view/inner-drawer.d.ts +1 -4
  24. package/es/index.d.ts +5 -0
  25. package/es/index.js +6 -1
  26. package/es/input/index.d.ts +24 -0
  27. package/es/input/index.js +33 -0
  28. package/es/input/style.d.ts +2 -0
  29. package/es/input/style.js +2 -0
  30. package/es/input/types.d.ts +518 -0
  31. package/es/input/types.js +1 -0
  32. package/es/person-picker/index.d.ts +24 -0
  33. package/es/person-picker/index.js +66 -0
  34. package/es/person-picker/style.d.ts +2 -0
  35. package/es/person-picker/style.js +2 -0
  36. package/es/person-picker/types.d.ts +20 -0
  37. package/es/person-picker/types.js +1 -0
  38. package/es/tab/index.d.ts +1 -8
  39. package/es/tag/index.d.ts +1 -9
  40. package/es/text/index.d.ts +1 -7
  41. package/es/time-picker/index.d.ts +23 -0
  42. package/es/time-picker/index.js +79 -0
  43. package/es/time-picker/style.d.ts +2 -0
  44. package/es/time-picker/style.js +2 -0
  45. package/es/time-picker/types.d.ts +20 -0
  46. package/es/time-picker/types.js +1 -0
  47. package/es/utils/dingtalk.d.ts +4 -0
  48. package/es/utils/dingtalk.js +53 -0
  49. package/lib/button/index.d.ts +1 -9
  50. package/lib/calendar/index.d.ts +23 -0
  51. package/lib/calendar/index.js +35 -0
  52. package/{es/button → lib/calendar}/main.scss +1 -1
  53. package/lib/calendar/style.d.ts +2 -0
  54. package/lib/calendar/style.js +4 -0
  55. package/lib/calendar/types.d.ts +123 -0
  56. package/lib/calendar/types.js +2 -0
  57. package/lib/card/index.d.ts +1 -5
  58. package/lib/card/view/card.d.ts +1 -4
  59. package/lib/core/variables.scss +2 -0
  60. package/lib/date-picker/index.d.ts +24 -0
  61. package/lib/date-picker/index.js +35 -0
  62. package/lib/date-picker/main.scss +6 -0
  63. package/lib/date-picker/style.d.ts +3 -0
  64. package/lib/date-picker/style.js +5 -0
  65. package/lib/date-picker/types.d.ts +123 -0
  66. package/lib/date-picker/types.js +2 -0
  67. package/lib/feedback/index.d.ts +1 -6
  68. package/lib/feedback/index.js +1 -1
  69. package/lib/feedback/main.scss +6 -3
  70. package/lib/feedback/view/good.js +1 -1
  71. package/lib/float-button/index.d.ts +4 -26
  72. package/lib/float-button/view/backtop.d.ts +1 -9
  73. package/lib/float-button/view/drawer.d.ts +1 -4
  74. package/lib/float-button/view/float-button.d.ts +1 -9
  75. package/lib/float-button/view/inner-drawer.d.ts +1 -4
  76. package/lib/index.d.ts +4 -0
  77. package/lib/index.js +10 -2
  78. package/lib/input/index.d.ts +24 -0
  79. package/lib/input/index.js +35 -0
  80. package/lib/input/main.scss +5 -0
  81. package/lib/input/style.d.ts +2 -0
  82. package/lib/input/style.js +4 -0
  83. package/lib/input/types.d.ts +518 -0
  84. package/lib/input/types.js +2 -0
  85. package/lib/tab/index.d.ts +1 -8
  86. package/lib/tag/index.d.ts +1 -9
  87. package/lib/text/index.d.ts +1 -7
  88. package/lib/time-picker/index.d.ts +23 -0
  89. package/lib/time-picker/index.js +81 -0
  90. package/lib/time-picker/main.scss +6 -0
  91. package/lib/time-picker/style.d.ts +2 -0
  92. package/lib/time-picker/style.js +4 -0
  93. package/lib/time-picker/types.d.ts +20 -0
  94. package/lib/time-picker/types.js +2 -0
  95. package/lib/utils/dingtalk.d.ts +4 -0
  96. package/lib/utils/dingtalk.js +60 -0
  97. package/package.json +39 -1
  98. package/es/card/main.scss +0 -141
  99. package/es/core/variables.scss +0 -33
  100. package/es/feedback/main.scss +0 -42
  101. package/es/float-button/main.scss +0 -97
  102. package/es/tab/main.scss +0 -10
  103. package/es/tag/main.scss +0 -9
  104. package/es/text/main.scss +0 -19
package/es/tab/index.d.ts CHANGED
@@ -2,14 +2,7 @@ import React from 'react';
2
2
  import { Tab as NextTab } from '@alifd/next';
3
3
  import type { TabProps } from '@alifd/next/types/tab';
4
4
  export type { TabProps, ItemProps } from '@alifd/next/types/tab';
5
- declare const _default: {
6
- new (props: TabProps & React.RefAttributes<NextTab> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<TabProps & React.RefAttributes<NextTab> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTab>;
7
- contextType?: React.Context<any> | undefined;
8
- } & {
9
- displayName: string;
10
- defaultProps: Partial<TabProps & React.RefAttributes<NextTab>> | undefined;
11
- propTypes: React.WeakValidationMap<TabProps & React.RefAttributes<NextTab>> | undefined;
12
- $$typeof: symbol;
5
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TabProps & React.RefAttributes<NextTab>, "key" | keyof TabProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTab, {}> & {
13
6
  Item: typeof import("@alifd/next/types/tab").Item;
14
7
  };
15
8
  export default _default;
package/es/tag/index.d.ts CHANGED
@@ -9,13 +9,5 @@ import React from 'react';
9
9
  import { Tag as NextTag } from '@alifd/next';
10
10
  import type { TagProps } from '@alifd/next/types/tag';
11
11
  export type { TagProps } from '@alifd/next/types/tag';
12
- declare const _default: {
13
- new (props: TagProps & React.RefAttributes<NextTag> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & React.RefAttributes<NextTag> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTag>;
14
- contextType?: React.Context<any> | undefined;
15
- } & {
16
- displayName: string;
17
- defaultProps: Partial<TagProps & React.RefAttributes<NextTag>> | undefined;
18
- propTypes: React.WeakValidationMap<TagProps & React.RefAttributes<NextTag>> | undefined;
19
- $$typeof: symbol;
20
- };
12
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TagProps & React.RefAttributes<NextTag>, "key" | keyof TagProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTag, {}>;
21
13
  export default _default;
@@ -1,9 +1,3 @@
1
- import React from 'react';
2
1
  import type { TextProps } from './types';
3
- declare const _default: {
4
- new (props: TextProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<TextProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
5
- contextType?: React.Context<any> | undefined;
6
- } & {
7
- displayName: string;
8
- };
2
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<TextProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
9
3
  export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @component 时间选择器
3
+ * @en TimePicker
4
+ * @type 通用 - General
5
+ * @remarks 同 Next TimePicker,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
6
+ * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
7
+ * @others
8
+ * ## 无障碍键盘操作指南
9
+ * | 按键 | 说明 |
10
+ * | :---- | :---------- |
11
+ * | Enter | 触发 onClick 事件 |
12
+ * | SPACE | 触发 onClick 事件 |
13
+ * @othersEn
14
+ * ## ARIA and KeyBoard
15
+ * | KeyBoard | Description |
16
+ * | :---------- | :------------------------------ |
17
+ * | Enter | Trigger the onClick event |
18
+ * | SPACE | Trigger the onClick event |
19
+ */
20
+ import React from 'react';
21
+ export * from './types';
22
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<any>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, any, {}>;
23
+ export default _default;
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @component 时间选择器
3
+ * @en TimePicker
4
+ * @type 通用 - General
5
+ * @remarks 同 Next TimePicker,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
6
+ * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
7
+ * @others
8
+ * ## 无障碍键盘操作指南
9
+ * | 按键 | 说明 |
10
+ * | :---- | :---------- |
11
+ * | Enter | 触发 onClick 事件 |
12
+ * | SPACE | 触发 onClick 事件 |
13
+ * @othersEn
14
+ * ## ARIA and KeyBoard
15
+ * | KeyBoard | Description |
16
+ * | :---------- | :------------------------------ |
17
+ * | Enter | Trigger the onClick event |
18
+ * | SPACE | Trigger the onClick event |
19
+ */
20
+ import { __rest } from "tslib";
21
+ import React, { forwardRef } from 'react';
22
+ import { TimePicker as NextTimePicker, Select as NextSelect, ConfigProvider } from '@alifd/next';
23
+ import cs from 'classnames';
24
+ import dayjs from 'dayjs';
25
+ import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
26
+ // Todo: ComponentInstance 与 CombinedProps 类型补全
27
+ // type ComponentInstance = InstanceType<typeof NextTimePicker> | InstanceType<typeof NextSelect>;
28
+ // type CombinedProps = TimePickerProps & SelectProps & {
29
+ // mode: 'timePicker' | 'select';
30
+ // };
31
+ const TimePicker = forwardRef((_a, ref) => {
32
+ var { className, size = 'small', mode = 'normal' } = _a, props = __rest(_a, ["className", "size", "mode"]);
33
+ const getTimeArray = () => {
34
+ const now = dayjs();
35
+ const TODAY = now.hour(0).minute(0).second(0);
36
+ const TOMORROW = dayjs(TODAY).add(1, 'day');
37
+ const { format = 'HH:mm', hourStep = 0, minuteStep = 0, secondStep = 0, } = props;
38
+ let todayClone = dayjs(TODAY);
39
+ const timeArray = [];
40
+ while (todayClone.isBefore(TOMORROW)) {
41
+ timeArray.push({
42
+ label: todayClone.format(format),
43
+ value: todayClone.format(format),
44
+ });
45
+ if (hourStep > 0) {
46
+ todayClone = todayClone.add(hourStep, 'hour');
47
+ }
48
+ else if (minuteStep > 0) {
49
+ todayClone = todayClone.add(minuteStep, 'minute');
50
+ }
51
+ else if (secondStep > 0) {
52
+ todayClone = todayClone.add(secondStep, 'second');
53
+ }
54
+ else {
55
+ break;
56
+ }
57
+ }
58
+ return timeArray;
59
+ };
60
+ const formatSelectValue = () => {
61
+ const { value, format = 'HH:mm' } = props;
62
+ return {
63
+ label: dayjs(value).format(format),
64
+ value,
65
+ };
66
+ };
67
+ if (mode === 'dingtalk') {
68
+ const { format, hourStep, minuteStep, secondStep } = props, otherProps = __rest(props, ["format", "hourStep", "minuteStep", "secondStep"]);
69
+ return (React.createElement(NextSelect, Object.assign({}, otherProps, { className: cs(`${PREFIX_DEFAULT}time-picker`, className), value: formatSelectValue(), size: size, ref: ref }), getTimeArray().map((time, index) => (React.createElement(NextSelect.Option, { value: time.value, key: index }, time.label)))));
70
+ }
71
+ else {
72
+ return (React.createElement(NextTimePicker, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}time-picker`, className), size: size, ref: ref })));
73
+ }
74
+ });
75
+ const TimePickerWithSub = assignSubComponent(TimePicker, {
76
+ displayName: 'TimePicker',
77
+ });
78
+ export * from './types';
79
+ export default ConfigProvider.config(TimePickerWithSub);
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/time-picker/style';
2
+ import './main.scss';
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/time-picker/style';
2
+ import './main.scss';
@@ -0,0 +1,20 @@
1
+ import type React from 'react';
2
+ type HTMLAttributesWeak = Omit<React.ButtonHTMLAttributes<HTMLElement>, 'type' | 'onClick'>;
3
+ /**
4
+ * @api TimePicker
5
+ */
6
+ export interface TimePickerProps extends HTMLAttributesWeak {
7
+ /**
8
+ * 采用模式
9
+ * @en mode of time-picker
10
+ * @defaultValue 'normal'
11
+ */
12
+ mode?: 'normal' | 'dingtalk';
13
+ /**
14
+ * 时间选择器其他属性
15
+ * @en key of time-picker
16
+ * @defaultValue 'medium'
17
+ */
18
+ [key: string]: any;
19
+ }
20
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import '@ali/dingtalk-jsapi/entry/union';
2
+ export declare function userPicker({ pickedUsers, onSuccess }: any): void;
3
+ export declare function quitApp(): void;
4
+ export declare function addZeroInWorkNo(workNo: any): any;
@@ -0,0 +1,53 @@
1
+ import '@ali/dingtalk-jsapi/entry/union';
2
+ import quit from '@ali/dingtalk-jsapi/api/biz/navigation/quit';
3
+ import close from '@ali/dingtalk-jsapi/api/biz/navigation/close';
4
+ import complexPicker from '@ali/dingtalk-jsapi/api/biz/contact/complexPicker';
5
+ import { env as ddEnv } from '@ali/dingtalk-jsapi';
6
+ export function userPicker({ pickedUsers, onSuccess }) {
7
+ complexPicker({
8
+ title: '请选择人员', // 标题
9
+ corpId: 'dingd8e1123006514592', // 企业的corpId
10
+ multiple: true, // 是否多选
11
+ limitTips: '超出了', // 超过限定人数返回提示
12
+ maxUsers: 1000, // 最大可选人数
13
+ pickedUsers, // 已选用户
14
+ pickedDepartments: [], // 已选部门
15
+ disabledUsers: [], // 不可选用户
16
+ disabledDepartments: [], // 不可选部门
17
+ requiredUsers: [], // 必选用户(不可取消选中状态)
18
+ requiredDepartments: [], // 必选部门(不可取消选中状态)
19
+ appId: 158, // 微应用Id,企业内部应用查看AgentId
20
+ permissionType: 'GLOBAL', // 可添加权限校验,选人权限,目前只有GLOBAL这个参数
21
+ responseUserOnly: true, // 返回人,或者返回人和部门
22
+ startWithDepartmentId: 0, // 仅支持0和-1
23
+ showRootOrg: true,
24
+ onSuccess,
25
+ });
26
+ }
27
+ export function quitApp() {
28
+ try {
29
+ if (ddEnv.platform === 'pc') {
30
+ quit({});
31
+ }
32
+ else if (ddEnv.platform === 'android' || ddEnv.platform === 'ios') {
33
+ close({});
34
+ }
35
+ else {
36
+ window.close && window.close();
37
+ }
38
+ }
39
+ catch (err) {
40
+ console.log('quitApp error:', err);
41
+ }
42
+ }
43
+ export function addZeroInWorkNo(workNo) {
44
+ if (!workNo) {
45
+ return '';
46
+ }
47
+ const workNoLength = workNo.length;
48
+ if (workNoLength.length >= 6) {
49
+ return workNo;
50
+ }
51
+ const str = `0000000${workNo}`;
52
+ return str.slice(str.length - 6, str.length);
53
+ }
@@ -20,13 +20,5 @@
20
20
  import React from 'react';
21
21
  import type { ButtonProps } from './types';
22
22
  export * from './types';
23
- declare const _default: {
24
- new (props: ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>;
25
- contextType?: React.Context<any> | undefined;
26
- } & {
27
- displayName: string;
28
- defaultProps: Partial<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>> | undefined;
29
- propTypes: React.WeakValidationMap<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>> | undefined;
30
- $$typeof: symbol;
31
- };
23
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>, keyof ButtonProps | "key"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>, {}>;
32
24
  export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @component 日历
3
+ * @en Button
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
6
+ * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
7
+ * @others
8
+ * ## 无障碍键盘操作指南
9
+ * | 按键 | 说明 |
10
+ * | :---- | :---------- |
11
+ * | Enter | 触发 onClick 事件 |
12
+ * | SPACE | 触发 onClick 事件 |
13
+ * @othersEn
14
+ * ## ARIA and KeyBoard
15
+ * | KeyBoard | Description |
16
+ * | :---------- | :------------------------------ |
17
+ * | Enter | Trigger the onClick event |
18
+ * | SPACE | Trigger the onClick event |
19
+ */
20
+ import React from 'react';
21
+ export * from './types';
22
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>, {}>;
23
+ export default _default;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * @component 日历
4
+ * @en Button
5
+ * @type 通用 - General
6
+ * @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
7
+ * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
8
+ * @others
9
+ * ## 无障碍键盘操作指南
10
+ * | 按键 | 说明 |
11
+ * | :---- | :---------- |
12
+ * | Enter | 触发 onClick 事件 |
13
+ * | SPACE | 触发 onClick 事件 |
14
+ * @othersEn
15
+ * ## ARIA and KeyBoard
16
+ * | KeyBoard | Description |
17
+ * | :---------- | :------------------------------ |
18
+ * | Enter | Trigger the onClick event |
19
+ * | SPACE | Trigger the onClick event |
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const tslib_1 = require("tslib");
23
+ const react_1 = tslib_1.__importStar(require("react"));
24
+ const next_1 = require("@alifd/next");
25
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
26
+ const utils_1 = require("../utils");
27
+ const Calendar = (0, react_1.forwardRef)((_a, ref) => {
28
+ var { className, size = 'small' } = _a, props = tslib_1.__rest(_a, ["className", "size"]);
29
+ return (react_1.default.createElement(next_1.Button, Object.assign({}, props, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}calendar`, className), size: size, ref: ref })));
30
+ });
31
+ const CalendarWithSub = (0, utils_1.assignSubComponent)(Calendar, {
32
+ displayName: 'Calendar',
33
+ });
34
+ tslib_1.__exportStar(require("./types"), exports);
35
+ exports.default = next_1.ConfigProvider.config(CalendarWithSub);
@@ -1,5 +1,5 @@
1
1
  @import "../core/variables.scss";
2
2
 
3
- .#{$prefix}button {
3
+ .#{$prefix}calendar {
4
4
 
5
5
  }
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/calendar/style';
2
+ import './main.scss';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@alifd/next/lib/calendar/style");
4
+ require("./main.scss");
@@ -0,0 +1,123 @@
1
+ import type React from 'react';
2
+ /**
3
+ * 按钮类型
4
+ * @api
5
+ */
6
+ export type ButtonSize = 'small' | 'medium' | 'large';
7
+ /**
8
+ * @api Button.Group
9
+ */
10
+ export interface GroupProps extends React.HTMLAttributes<HTMLElement> {
11
+ /**
12
+ * 统一设置 Button 组件的按钮大小
13
+ */
14
+ size?: ButtonSize;
15
+ }
16
+ type HTMLAttributesWeak = Omit<React.ButtonHTMLAttributes<HTMLElement>, 'type' | 'onClick'>;
17
+ /**
18
+ * @api Button
19
+ */
20
+ export interface ButtonProps extends HTMLAttributesWeak {
21
+ /**
22
+ * 按钮的类型
23
+ * @en Typeo of button
24
+ * @defaultValue 'normal'
25
+ */
26
+ type?: 'primary' | 'secondary' | 'normal';
27
+ /**
28
+ * @deprecated use `warning` `text` `ghost` insteaded
29
+ * @skip
30
+ */
31
+ shape?: 'warning' | 'text' | 'ghost';
32
+ /**
33
+ * 按钮的尺寸
34
+ * @en Size of button
35
+ * @defaultValue 'medium'
36
+ */
37
+ size?: ButtonSize;
38
+ /**
39
+ * 按钮中可配置的 Icon
40
+ * @en Available icons in button
41
+ * @example
42
+ * \{ loading: <Icon type="loading"/> \}
43
+ */
44
+ icons?: {
45
+ loading?: React.ReactNode;
46
+ };
47
+ /**
48
+ * 按钮中 Icon 的尺寸
49
+ * @en Size of icon in button
50
+ * @defaultValue 默认根据 size 自动映射,映射规则:
51
+ * size:large -\> `small`
52
+ * size:medium -\> `xs`
53
+ * size:small -\> `xs`
54
+ */
55
+ iconSize?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
56
+ /**
57
+ * button 标签的 type 值
58
+ * @en Original html type for button element
59
+ * @defaultValue 'button'
60
+ * @remarks 仅当 component = 'button' 时使用
61
+ */
62
+ htmlType?: 'submit' | 'reset' | 'button';
63
+ /**
64
+ * 最终渲染的 jsx 标签标签类型
65
+ * @en The jsx tag to be rendered
66
+ * @remarks 直接去掉原先的 ReactNode 类型,因为即使传递了非法类型运行时也会报错,不如在类型提示阶段就将错误抛出
67
+ */
68
+ component?: 'button' | 'a' | React.ComponentType<unknown>;
69
+ /**
70
+ * 设置按钮的载入状态
71
+ * @en Loading state of a button
72
+ * @defaultValue false
73
+ */
74
+ loading?: boolean;
75
+ /**
76
+ * 是否为幽灵按钮
77
+ * @en Setting ghost button
78
+ * @defaultValue false
79
+ */
80
+ ghost?: true | false | 'light' | 'dark';
81
+ /**
82
+ * 是否为文本按钮
83
+ * @en Is text button
84
+ * @defaultValue false
85
+ */
86
+ text?: boolean;
87
+ /**
88
+ * 是否为警告按钮
89
+ * @en Is warning button
90
+ * @defaultValue false
91
+ */
92
+ warning?: boolean;
93
+ /**
94
+ * 是否禁用
95
+ * @en Is disabled
96
+ * @defaultValue false
97
+ */
98
+ disabled?: boolean;
99
+ /**
100
+ * 点击按钮的回调
101
+ * @en Callback of click event
102
+ */
103
+ onClick?: React.MouseEventHandler;
104
+ /**
105
+ * 'a' 标签的 href 属性
106
+ * @remarks 仅在 component = 'a' 时使用
107
+ * @skip
108
+ */
109
+ href?: string;
110
+ /**
111
+ * 'a' 标签的 target 属性
112
+ * @remarks 仅在 component = 'a' 时使用
113
+ * @skip
114
+ */
115
+ target?: string;
116
+ /**
117
+ * 'ReactRouterLink' 组件的 to 属性
118
+ * @remarks 仅在 component 支持 to 属性时使用
119
+ * @skip
120
+ */
121
+ to?: string;
122
+ }
123
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,5 @@
1
- /// <reference types="react" />
2
1
  import Collapsable from './view/collapsable';
3
- declare const CardWithSub: {
4
- new (props: import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
5
- contextType?: import("react").Context<any> | undefined;
6
- } & {} & {
2
+ declare const CardWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}> & {
7
3
  Collapsable: typeof Collapsable;
8
4
  };
9
5
  export * from './types';
@@ -2,8 +2,5 @@ import React from 'react';
2
2
  import type { CardProps } from '../types';
3
3
  export declare function useCardInner({ prefix, innerClassName, title, titleAlign, titleLine, footer, footerAlign, footerLine, components, children, }: CardProps): React.JSX.Element;
4
4
  export declare function useCardOuter(props: CardProps): React.JSX.Element;
5
- declare const _default: {
6
- new (props: CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
7
- contextType?: React.Context<any> | undefined;
8
- } & {};
5
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
9
6
  export default _default;
@@ -31,3 +31,5 @@ $color-line1-2: var(--color-line1-2, #dcdee3) !default;
31
31
  $color-line1-3: var(--color-line1-3, #c4c6cf) !default;
32
32
  /// 重
33
33
  $color-line1-4: var(--color-line1-4, #a0a2ad) !default;
34
+
35
+
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @component 日期选择器
3
+ * @en DatePicker
4
+ * @type 通用 - General
5
+ * @remarks 同 Next DatePicker,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
6
+ * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
7
+ * @others
8
+ * ## 无障碍键盘操作指南
9
+ * | 按键 | 说明 |
10
+ * | :---- | :---------- |
11
+ * | Enter | 触发 onClick 事件 |
12
+ * | SPACE | 触发 onClick 事件 |
13
+ * @othersEn
14
+ * ## ARIA and KeyBoard
15
+ * | KeyBoard | Description |
16
+ * | :---------- | :------------------------------ |
17
+ * | Enter | Trigger the onClick event |
18
+ * | SPACE | Trigger the onClick event |
19
+ */
20
+ import React from 'react';
21
+ import { DatePicker as NextDatePicker } from '@alifd/next';
22
+ export * from './types';
23
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<NextDatePicker>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextDatePicker, {}>;
24
+ export default _default;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * @component 日期选择器
4
+ * @en DatePicker
5
+ * @type 通用 - General
6
+ * @remarks 同 Next DatePicker,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
7
+ * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
8
+ * @others
9
+ * ## 无障碍键盘操作指南
10
+ * | 按键 | 说明 |
11
+ * | :---- | :---------- |
12
+ * | Enter | 触发 onClick 事件 |
13
+ * | SPACE | 触发 onClick 事件 |
14
+ * @othersEn
15
+ * ## ARIA and KeyBoard
16
+ * | KeyBoard | Description |
17
+ * | :---------- | :------------------------------ |
18
+ * | Enter | Trigger the onClick event |
19
+ * | SPACE | Trigger the onClick event |
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const tslib_1 = require("tslib");
23
+ const react_1 = tslib_1.__importStar(require("react"));
24
+ const next_1 = require("@alifd/next");
25
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
26
+ const utils_1 = require("../utils");
27
+ const DatePicker = (0, react_1.forwardRef)((_a, ref) => {
28
+ var { className, size = 'small' } = _a, props = tslib_1.__rest(_a, ["className", "size"]);
29
+ return (react_1.default.createElement(next_1.DatePicker, Object.assign({}, props, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}date-picker`, className), size: size, ref: ref })));
30
+ });
31
+ const DatePickerWithSub = (0, utils_1.assignSubComponent)(DatePicker, {
32
+ displayName: 'DatePicker',
33
+ });
34
+ tslib_1.__exportStar(require("./types"), exports);
35
+ exports.default = next_1.ConfigProvider.config(DatePickerWithSub);
@@ -0,0 +1,6 @@
1
+ @import '@alifd/next/variables.scss';
2
+ @import "../core/variables.scss";
3
+
4
+ .#{$prefix}date-picker {
5
+
6
+ }
@@ -0,0 +1,3 @@
1
+ import '../calendar/style';
2
+ import '@alifd/next/lib/date-picker/style';
3
+ import './main.scss';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("../calendar/style");
4
+ require("@alifd/next/lib/date-picker/style");
5
+ require("./main.scss");