@univerjs/design 0.1.4 → 0.1.6
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/README.md +16 -1
- package/lib/cjs/index.js +11 -11
- package/lib/es/index.js +3464 -3428
- package/lib/index.css +1 -1
- package/lib/types/components/avatar/Avatar.d.ts +2 -16
- package/lib/types/components/avatar/Avatar.stories.d.ts +3 -17
- package/lib/types/components/button/Button.d.ts +2 -16
- package/lib/types/components/button/Button.stories.d.ts +3 -17
- package/lib/types/components/cascader-list/CascaderList.d.ts +2 -16
- package/lib/types/components/cascader-list/CascaderList.stories.d.ts +3 -17
- package/lib/types/components/checkbox/Checkbox.d.ts +2 -16
- package/lib/types/components/checkbox/Checkbox.stories.d.ts +3 -17
- package/lib/types/components/checkbox-group/CheckboxGroup.d.ts +2 -16
- package/lib/types/components/checkbox-group/CheckboxGroup.stories.d.ts +3 -17
- package/lib/types/components/color-picker/ColorPicker.d.ts +2 -16
- package/lib/types/components/color-picker/ColorPicker.stories.d.ts +3 -17
- package/lib/types/components/config-provider/ConfigProvider.d.ts +3 -17
- package/lib/types/components/config-provider/ConfigProvider.stories.d.ts +3 -17
- package/lib/types/components/confirm/Confirm.d.ts +2 -16
- package/lib/types/components/confirm/Confirm.stories.d.ts +3 -17
- package/lib/types/components/container/Container.d.ts +2 -16
- package/lib/types/components/container/Container.stories.d.ts +3 -17
- package/lib/types/components/date-picker/DatePicker.d.ts +5 -18
- package/lib/types/components/date-picker/DatePicker.stories.d.ts +3 -17
- package/lib/types/components/date-picker/Panel.d.ts +6 -0
- package/lib/types/components/date-picker/index.d.ts +2 -0
- package/lib/types/components/date-range-picker/DateRangePicker.d.ts +4 -18
- package/lib/types/components/date-range-picker/DateRangePicker.stories.d.ts +3 -17
- package/lib/types/components/design-token/Palette.d.ts +2 -16
- package/lib/types/components/design-token/Palette.stories.d.ts +2 -16
- package/lib/types/components/dialog/Dialog.d.ts +2 -16
- package/lib/types/components/dialog/Dialog.stories.d.ts +3 -17
- package/lib/types/components/dropdown/Dropdown.d.ts +9 -18
- package/lib/types/components/dropdown/Dropdown.stories.d.ts +3 -17
- package/lib/types/components/form-layout/FormLayout.d.ts +3 -17
- package/lib/types/components/form-layout/FormLayout.stories.d.ts +3 -17
- package/lib/types/components/icon/Icon.stories.d.ts +3 -17
- package/lib/types/components/input/Input.d.ts +4 -18
- package/lib/types/components/input/Input.stories.d.ts +3 -17
- package/lib/types/components/input/InputWithSlot.d.ts +3 -17
- package/lib/types/components/input/InputWithSlot.stories.d.ts +3 -17
- package/lib/types/components/input-number/InputNumber.d.ts +2 -16
- package/lib/types/components/input-number/InputNumber.stories.d.ts +3 -17
- package/lib/types/components/menu/Menu.d.ts +3 -17
- package/lib/types/components/message/Message.stories.d.ts +3 -17
- package/lib/types/components/pager/Pager.d.ts +2 -16
- package/lib/types/components/pager/Pager.stories.d.ts +3 -17
- package/lib/types/components/popup/Popup.d.ts +2 -16
- package/lib/types/components/popup/Popup.stories.d.ts +3 -17
- package/lib/types/components/popup/RectPopup.d.ts +9 -16
- package/lib/types/components/radio/Radio.d.ts +2 -16
- package/lib/types/components/radio/Radio.stories.d.ts +3 -17
- package/lib/types/components/radio-group/RadioGroup.d.ts +2 -16
- package/lib/types/components/radio-group/RadioGroup.stories.d.ts +3 -17
- package/lib/types/components/scrollbar/Scrollbar.d.ts +2 -16
- package/lib/types/components/scrollbar/Scrollbar.stories.d.ts +2 -16
- package/lib/types/components/segmented/Segmented.d.ts +3 -17
- package/lib/types/components/segmented/Segmented.stories.d.ts +3 -17
- package/lib/types/components/select/Select.d.ts +8 -16
- package/lib/types/components/select/Select.stories.d.ts +3 -17
- package/lib/types/components/select-list/SelectList.d.ts +5 -18
- package/lib/types/components/select-list/SelectList.stories.d.ts +3 -17
- package/lib/types/components/slider/Slider.d.ts +2 -16
- package/lib/types/components/slider/Slider.stories.d.ts +3 -17
- package/lib/types/components/textarea/Textarea.d.ts +49 -0
- package/lib/types/components/textarea/Textarea.stories.d.ts +12 -0
- package/lib/types/components/textarea/index.d.ts +16 -0
- package/lib/types/components/tooltip/Tooltip.d.ts +3 -17
- package/lib/types/components/tooltip/Tooltip.stories.d.ts +3 -17
- package/lib/types/components/tooltip/placements.d.ts +2 -16
- package/lib/types/components/tree/Tree.d.ts +2 -16
- package/lib/types/components/tree/Tree.stories.d.ts +3 -17
- package/lib/types/index.d.ts +2 -0
- package/lib/types/locale/en-US.d.ts +2 -16
- package/lib/types/locale/interface.d.ts +2 -16
- package/lib/types/locale/zh-CN.d.ts +2 -16
- package/lib/umd/index.js +11 -11
- package/package.json +10 -9
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface IPagerProps {
|
|
18
4
|
text?: string;
|
|
19
5
|
value: number;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
|
|
18
4
|
declare const meta: Meta;
|
|
19
5
|
export default meta;
|
|
20
6
|
export declare const Playground: {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface IPopupProps {
|
|
18
4
|
children: React.ReactElement;
|
|
19
5
|
/**
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { Popup } from './Popup';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof Popup>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const PopupBasic: {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
interface IAbsolutePosition {
|
|
18
4
|
left: number;
|
|
19
5
|
right: number;
|
|
@@ -28,6 +14,7 @@ export interface IRectPopupProps {
|
|
|
28
14
|
anchorRect: IAbsolutePosition;
|
|
29
15
|
direction?: 'horizontal' | 'vertical';
|
|
30
16
|
onClickOutside?: (e: MouseEvent) => void;
|
|
17
|
+
excludeOutside?: HTMLElement[];
|
|
31
18
|
}
|
|
32
19
|
export interface IPopupLayoutInfo {
|
|
33
20
|
position: IAbsolutePosition;
|
|
@@ -43,5 +30,11 @@ declare namespace RectPopup {
|
|
|
43
30
|
left: number;
|
|
44
31
|
top: number;
|
|
45
32
|
};
|
|
33
|
+
var useContext: () => {
|
|
34
|
+
top: number;
|
|
35
|
+
bottom: number;
|
|
36
|
+
left: number;
|
|
37
|
+
right: number;
|
|
38
|
+
};
|
|
46
39
|
}
|
|
47
40
|
export { RectPopup };
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface IRadioProps {
|
|
18
4
|
children?: React.ReactNode;
|
|
19
5
|
/**
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { Radio } from './Radio';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof Radio>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const RadioBasic: {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface IRadioGroupProps {
|
|
18
4
|
children: React.ReactNode[];
|
|
19
5
|
/**
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { RadioGroup } from './RadioGroup';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof RadioGroup>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const Playground: {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface IScrollbarProps {
|
|
18
4
|
children?: React.ReactNode;
|
|
19
5
|
}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
17
1
|
import { Scrollbar } from './Scrollbar';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
18
4
|
declare const meta: Meta<typeof Scrollbar>;
|
|
19
5
|
export default meta;
|
|
20
6
|
export declare const ScrollbarBasic: StoryObj;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import type { SegmentedProps } from 'rc-segmented';
|
|
1
|
+
import { SegmentedProps } from 'rc-segmented';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
18
4
|
export interface ISegmentedProps extends Omit<SegmentedProps, 'prefixCls'> {
|
|
19
5
|
}
|
|
20
6
|
export declare const Segmented: React.ForwardRefExoticComponent<Omit<ISegmentedProps, "ref"> & React.RefAttributes<HTMLDivElement | null>>;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import type { Meta } from '@storybook/react';
|
|
18
1
|
import { Segmented } from './Segmented';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof Segmented>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const SegmentedBasic: {
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { LabelInValueType } from 'rc-select/lib/Select';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
17
4
|
interface IOption {
|
|
18
5
|
label?: string | React.ReactNode;
|
|
19
6
|
value?: string;
|
|
@@ -40,6 +27,11 @@ export interface ISelectProps {
|
|
|
40
27
|
*/
|
|
41
28
|
mode?: 'combobox' | 'multiple' | 'tags' | undefined;
|
|
42
29
|
dropdownRender?: (menu: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
30
|
+
labelRender?: ((props: LabelInValueType) => React.ReactNode) | undefined;
|
|
31
|
+
open?: boolean;
|
|
32
|
+
dropdownStyle?: React.CSSProperties;
|
|
33
|
+
onDropdownVisibleChange?: (open: boolean) => void;
|
|
34
|
+
disabled?: boolean;
|
|
43
35
|
}
|
|
44
36
|
export declare function Select(props: ISelectProps): React.JSX.Element | null;
|
|
45
37
|
export {};
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { Select } from './Select';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof Select>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const SelectBasic: {
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface ISelectListProps {
|
|
18
4
|
/**
|
|
19
5
|
* The value of select
|
|
20
6
|
*/
|
|
21
|
-
value: string;
|
|
7
|
+
value: string | string[];
|
|
22
8
|
/**
|
|
23
9
|
* The options of select
|
|
24
10
|
* @default []
|
|
@@ -36,6 +22,7 @@ export interface ISelectListProps {
|
|
|
36
22
|
/**
|
|
37
23
|
* The callback function that is triggered when the value is changed
|
|
38
24
|
*/
|
|
39
|
-
onChange: (value: string) => void;
|
|
25
|
+
onChange: (value: string | string[] | undefined) => void;
|
|
26
|
+
multiple?: boolean;
|
|
40
27
|
}
|
|
41
28
|
export declare function SelectList(props: ISelectListProps): React.JSX.Element;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { SelectList } from './SelectList';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof SelectList>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const Playground: {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export interface ISliderProps {
|
|
18
4
|
/** The value of slider. When range is false, use number, otherwise, use [number, number] */
|
|
19
5
|
value: number;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { Slider } from './Slider';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof Slider>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const Playground: {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextAreaProps } from 'rc-textarea';
|
|
3
|
+
|
|
4
|
+
export interface ITextareaProps extends Pick<TextAreaProps, 'onFocus' | 'onBlur'> {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the input is autoFocus
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The input class name
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The input affix wrapper style
|
|
16
|
+
*/
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
/**
|
|
19
|
+
* The input affix wrapper style
|
|
20
|
+
*/
|
|
21
|
+
autoSize?: boolean | {
|
|
22
|
+
minRows?: number;
|
|
23
|
+
maxRows?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The input placeholder
|
|
27
|
+
*/
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The input content value
|
|
31
|
+
*/
|
|
32
|
+
value?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the input is disabled
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Callback when user press a key
|
|
40
|
+
* @param e
|
|
41
|
+
*/
|
|
42
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
43
|
+
/**
|
|
44
|
+
* Callback when user input
|
|
45
|
+
* @param value
|
|
46
|
+
*/
|
|
47
|
+
onChange?: (value: string) => void;
|
|
48
|
+
}
|
|
49
|
+
export declare function Textarea(props: ITextareaProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Textarea } from './Textarea';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
5
|
+
declare const meta: Meta<typeof Textarea>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const TextareaBasic: {
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export declare const TextareaDisabled: {
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { type ITextareaProps, Textarea } from './Textarea';
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { TooltipRef } from 'rc-tooltip';
|
|
17
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipRef } from 'rc-tooltip';
|
|
3
|
+
|
|
18
4
|
export interface ITooltipProps {
|
|
19
5
|
visible?: boolean;
|
|
20
6
|
placement?: 'top' | 'bottom';
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
18
1
|
import { Tooltip } from './Tooltip';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
|
|
19
5
|
declare const meta: Meta<typeof Tooltip>;
|
|
20
6
|
export default meta;
|
|
21
7
|
export declare const Playground: {
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { BuildInPlacements } from '@rc-component/trigger';
|
|
1
|
+
import { BuildInPlacements } from '@rc-component/trigger';
|
|
2
|
+
|
|
17
3
|
export declare const placements: BuildInPlacements;
|
|
18
4
|
export default placements;
|