antd-solid 0.0.11 → 0.0.13
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/css/index.css +10 -73
- package/dist/index.esm.js +7802 -2378
- package/dist/index.umd.js +1 -1
- package/es/Alert/index.d.ts +10 -0
- package/es/Alert/index.js +26 -0
- package/es/Button/index.d.ts +32 -0
- package/es/Button/index.js +123 -0
- package/es/Button/index.scss.js +6 -0
- package/es/Checkbox/Group.d.ts +19 -0
- package/es/Checkbox/Group.js +49 -0
- package/es/Checkbox/index.d.ts +15 -0
- package/es/Checkbox/index.js +60 -0
- package/es/CodeInput/index.d.ts +18 -0
- package/es/CodeInput/index.js +72 -0
- package/es/Collapse/Item.d.ts +46 -0
- package/es/Collapse/Item.js +130 -0
- package/es/Collapse/context.d.ts +5 -0
- package/es/Collapse/context.js +8 -0
- package/es/Collapse/index.d.ts +25 -10
- package/es/Collapse/index.js +95 -74
- package/es/Collapse/utils.d.ts +8 -0
- package/es/Collapse/utils.js +35 -0
- package/es/ColorPicker/ColorPickerInput.d.ts +3 -0
- package/es/ColorPicker/ColorPickerInput.js +250 -0
- package/es/ColorPicker/ColorPickerSelect.d.ts +3 -0
- package/es/ColorPicker/ColorPickerSelect.js +71 -0
- package/es/ColorPicker/ColorPickerSlider.d.ts +3 -0
- package/es/ColorPicker/ColorPickerSlider.js +115 -0
- package/es/ColorPicker/color.d.ts +24 -0
- package/es/ColorPicker/color.js +63 -0
- package/es/ColorPicker/context.d.ts +9 -0
- package/es/ColorPicker/context.js +5 -0
- package/es/ColorPicker/index.d.ts +31 -0
- package/es/ColorPicker/index.js +139 -0
- package/es/Command/context.d.ts +9 -0
- package/es/Command/context.js +11 -0
- package/es/Command/createCommand.d.ts +17 -0
- package/es/Command/createCommand.js +112 -0
- package/es/Command/index.d.ts +7 -0
- package/es/Command/index.js +9 -0
- package/es/Command/useCommandProps.d.ts +13 -0
- package/es/Command/useCommandProps.js +28 -0
- package/es/Compact/CompactContextIsolator.d.ts +3 -0
- package/es/Compact/CompactContextIsolator.js +15 -0
- package/es/Compact/context.d.ts +4 -0
- package/es/Compact/context.js +7 -0
- package/es/Compact/index.d.ts +14 -0
- package/es/Compact/index.js +32 -0
- package/es/Compact/index.scss.js +6 -0
- package/es/ConfigProvider/context.d.ts +11 -0
- package/es/ConfigProvider/context.js +15 -0
- package/es/ConfigProvider/dark/colorAlgorithm.d.ts +2 -0
- package/es/ConfigProvider/dark/colorAlgorithm.js +9 -0
- package/es/ConfigProvider/dark/colors.d.ts +3 -0
- package/es/ConfigProvider/dark/colors.js +47 -0
- package/es/ConfigProvider/dark/index.d.ts +2 -0
- package/es/ConfigProvider/dark/index.js +11 -0
- package/es/ConfigProvider/index.d.ts +32 -0
- package/es/ConfigProvider/index.js +44 -0
- package/es/ConfigProvider/light/colorAlgorithm.d.ts +2 -0
- package/es/ConfigProvider/light/colorAlgorithm.js +9 -0
- package/es/ConfigProvider/light/colors.d.ts +3 -0
- package/es/ConfigProvider/light/colors.js +45 -0
- package/es/ConfigProvider/light/index.d.ts +2 -0
- package/es/ConfigProvider/light/index.js +11 -0
- package/es/ConfigProvider/seed.d.ts +3 -0
- package/es/ConfigProvider/seed.js +22 -0
- package/es/ConfigProvider/types/index.d.ts +594 -0
- package/es/ConfigProvider/types/index.js +1 -0
- package/es/ConfigProvider/utils/genColorMapToken.d.ts +7 -0
- package/es/ConfigProvider/utils/genColorMapToken.js +85 -0
- package/es/ConfigProvider/utils/getAlphaColor.d.ts +2 -0
- package/es/ConfigProvider/utils/getAlphaColor.js +44 -0
- package/es/ConfigProvider/utils/index.d.ts +3 -0
- package/es/ConfigProvider/utils/index.js +181 -0
- package/es/ContextMenu/index.d.ts +8 -0
- package/es/ContextMenu/index.js +99 -0
- package/es/Cursor/index.d.ts +6 -0
- package/es/Cursor/index.js +71 -0
- package/es/DelayShow/index.d.ts +16 -0
- package/es/DelayShow/index.js +27 -0
- package/es/Divider/index.d.ts +17 -0
- package/es/Divider/index.js +71 -0
- package/es/Drawer/index.d.ts +20 -16
- package/es/Drawer/index.js +162 -112
- package/es/Drawer/index.scss.js +1 -1
- package/es/Dropdown/index.d.ts +16 -0
- package/es/Dropdown/index.js +47 -0
- package/es/Element/index.d.ts +10 -0
- package/es/Element/index.js +42 -0
- package/es/Empty/PRESENTED_IMAGE_SIMPLE.d.ts +2 -1
- package/es/Empty/PRESENTED_IMAGE_SIMPLE.js +25 -9
- package/es/Empty/assets/EmptySvg.js +1 -1
- package/es/Empty/assets/SimpleEmptySvg.js +1 -1
- package/es/Empty/index.d.ts +9 -3
- package/es/Empty/index.js +24 -9
- package/es/Form/Form.d.ts +8 -5
- package/es/Form/Form.js +50 -34
- package/es/Form/FormItem.d.ts +10 -5
- package/es/Form/FormItem.js +121 -104
- package/es/Form/context.d.ts +9 -9
- package/es/Form/context.js +4 -2
- package/es/Fragment/index.d.ts +4 -0
- package/es/Fragment/index.js +7 -0
- package/es/Image/index.d.ts +10 -0
- package/es/Image/index.js +37 -0
- package/es/Input/TextArea.d.ts +23 -0
- package/es/Input/TextArea.js +84 -0
- package/es/Input/index.d.ts +44 -0
- package/es/Input/index.js +213 -0
- package/es/Input/index.scss.js +6 -0
- package/es/InputNumber/index.d.ts +30 -0
- package/es/InputNumber/index.js +122 -0
- package/es/{InputNumber.test.js → InputNumber/index.test.js} +2 -1
- package/es/Menu/InternalMenu.d.ts +22 -0
- package/es/Menu/InternalMenu.js +196 -0
- package/es/Menu/index.d.ts +75 -0
- package/es/Menu/index.js +64 -0
- package/es/Message/Message.d.ts +9 -0
- package/es/Message/Message.js +34 -0
- package/es/Message/index.d.ts +12 -0
- package/es/Message/index.js +80 -0
- package/es/Message/index.scss.js +6 -0
- package/es/Message/useMessage.d.ts +6 -0
- package/es/Message/useMessage.js +54 -0
- package/es/Modal/index.d.ts +73 -0
- package/es/Modal/index.js +237 -0
- package/es/Modal/index.scss.js +6 -0
- package/es/Modal/useModal.d.ts +5 -0
- package/es/Modal/useModal.js +51 -0
- package/es/Modal/warning.d.ts +5 -0
- package/es/Modal/warning.js +43 -0
- package/es/{Popconfirm.d.ts → Popconfirm/index.d.ts} +2 -2
- package/es/Popconfirm/index.js +62 -0
- package/es/{Popover.d.ts → Popover/index.d.ts} +2 -2
- package/es/{Popover.js → Popover/index.js} +7 -12
- package/es/Progress/Circle.d.ts +16 -0
- package/es/Progress/Circle.js +122 -0
- package/es/Progress/index.d.ts +6 -4
- package/es/Progress/index.js +75 -60
- package/es/Radio/Button.d.ts +7 -0
- package/es/Radio/Button.js +72 -0
- package/es/Radio/Group.d.ts +18 -0
- package/es/Radio/Group.js +57 -0
- package/es/Radio/index.d.ts +14 -0
- package/es/Radio/index.js +68 -0
- package/es/RangeInput/index.d.ts +23 -0
- package/es/RangeInput/index.js +208 -0
- package/es/Result/index.js +49 -0
- package/es/Segmented/index.d.ts +10 -7
- package/es/Segmented/index.js +54 -53
- package/es/Select/index.d.ts +17 -0
- package/es/Select/index.js +75 -0
- package/es/SelectInput/index.d.ts +39 -0
- package/es/SelectInput/index.js +245 -0
- package/es/Slider/index.d.ts +47 -0
- package/es/Slider/index.js +177 -0
- package/es/Space/index.d.ts +13 -0
- package/es/Space/index.js +16 -0
- package/es/Spin/index.d.ts +19 -0
- package/es/Spin/index.js +82 -0
- package/es/{Switch.d.ts → Switch/index.d.ts} +9 -0
- package/es/Switch/index.js +41 -0
- package/es/{Table.d.ts → Table/index.d.ts} +6 -2
- package/es/Table/index.js +71 -0
- package/es/Tabs/index.d.ts +49 -0
- package/es/Tabs/index.js +256 -0
- package/es/Timeline/index.js +31 -0
- package/es/Tooltip/context.d.ts +5 -0
- package/es/Tooltip/context.js +5 -0
- package/es/Tooltip/index.d.ts +64 -0
- package/es/Tooltip/index.js +499 -0
- package/es/Transformer/index.d.ts +88 -0
- package/es/Transformer/index.js +882 -0
- package/es/Tree/SingleLevelTree.d.ts +28 -0
- package/es/Tree/SingleLevelTree.js +299 -0
- package/es/Tree/index.d.ts +83 -0
- package/es/Tree/index.js +197 -0
- package/es/TreeFor/index.d.ts +31 -0
- package/es/TreeFor/index.js +80 -0
- package/es/TreeSelect/index.d.ts +26 -0
- package/es/TreeSelect/index.js +98 -0
- package/es/Upload/index.d.ts +64 -0
- package/es/Upload/index.js +112 -0
- package/es/assets/svg/ColorPickUp.d.ts +4 -0
- package/es/assets/svg/ColorPickUp.js +25 -0
- package/es/assets/svg/Crosshair.d.ts +7 -0
- package/es/assets/svg/Crosshair.js +51 -0
- package/es/assets/svg/Resize.d.ts +4 -0
- package/es/assets/svg/Resize.js +25 -0
- package/es/assets/svg/Rotate.d.ts +4 -0
- package/es/assets/svg/Rotate.js +20 -0
- package/es/assets/svg/RotateArrow.d.ts +4 -0
- package/es/assets/svg/RotateArrow.js +21 -0
- package/es/assets/svg/common.d.ts +2 -0
- package/es/assets/svg/common.js +9 -0
- package/es/hooks/createControllableValue.d.ts +1 -1
- package/es/hooks/createControllableValue.js +16 -17
- package/es/hooks/createTransition.d.ts +6 -2
- package/es/hooks/createTransition.js +12 -8
- package/es/hooks/useClickAway.d.ts +1 -1
- package/es/hooks/useClickAway.js +4 -3
- package/es/hooks/useComponentSize.d.ts +3 -0
- package/es/hooks/useComponentSize.js +12 -0
- package/es/hooks/useCounter.d.ts +12 -0
- package/es/hooks/useCounter.js +30 -0
- package/es/hooks/useFocus.d.ts +2 -0
- package/es/hooks/useFocus.js +24 -0
- package/es/hooks/useHover.d.ts +2 -0
- package/es/hooks/useHover.js +33 -0
- package/es/hooks/useLocale.d.ts +1 -0
- package/es/hooks/useLocale.js +11 -0
- package/es/hooks/useMouse.d.ts +1 -0
- package/es/hooks/useMouse.js +18 -0
- package/es/hooks/useScroll.d.ts +2 -0
- package/es/hooks/useScroll.js +29 -0
- package/es/hooks/useSize.d.ts +8 -2
- package/es/hooks/useSize.js +25 -13
- package/es/hooks/useVirtualList.d.ts +14 -0
- package/es/hooks/useVirtualList.js +45 -0
- package/es/index.d.ts +59 -8
- package/es/index.js +53 -23
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/en_US.js +9 -0
- package/es/locale/index.d.ts +5 -0
- package/es/locale/index.js +1 -0
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_CN.js +9 -0
- package/es/types/index.d.ts +11 -2
- package/es/utils/animation.d.ts +6 -0
- package/es/utils/animation.js +20 -0
- package/es/utils/array.d.ts +2 -1
- package/es/utils/array.js +5 -1
- package/es/utils/domPoint.d.ts +7 -0
- package/es/utils/domPoint.js +11 -0
- package/es/utils/math.d.ts +17 -0
- package/es/utils/math.js +25 -0
- package/es/utils/number.d.ts +1 -0
- package/es/utils/number.js +14 -0
- package/es/utils/setupGlobalDrag.d.ts +10 -0
- package/es/utils/setupGlobalDrag.js +38 -0
- package/es/utils/solid.d.ts +2 -2
- package/es/utils/solid.js +7 -8
- package/package.json +10 -11
- package/es/Button.d.ts +0 -19
- package/es/Button.js +0 -73
- package/es/ColorPicker.d.ts +0 -8
- package/es/ColorPicker.js +0 -6
- package/es/Compact.d.ts +0 -12
- package/es/Compact.js +0 -17
- package/es/DatePicker.d.ts +0 -19
- package/es/DatePicker.js +0 -9
- package/es/Image.d.ts +0 -9
- package/es/Image.js +0 -22
- package/es/Input.d.ts +0 -29
- package/es/Input.js +0 -144
- package/es/InputNumber.d.ts +0 -11
- package/es/InputNumber.js +0 -92
- package/es/Modal.d.ts +0 -48
- package/es/Modal.js +0 -209
- package/es/Popconfirm.js +0 -64
- package/es/Radio.d.ts +0 -27
- package/es/Radio.js +0 -93
- package/es/Result.js +0 -29
- package/es/Select.d.ts +0 -16
- package/es/Select.js +0 -113
- package/es/Skeleton.d.ts +0 -9
- package/es/Skeleton.js +0 -9
- package/es/Spin.d.ts +0 -9
- package/es/Spin.js +0 -22
- package/es/Switch.js +0 -30
- package/es/Table.js +0 -57
- package/es/Tabs.d.ts +0 -17
- package/es/Tabs.js +0 -117
- package/es/Timeline.js +0 -30
- package/es/Tooltip.d.ts +0 -34
- package/es/Tooltip.js +0 -302
- package/es/Tree.d.ts +0 -28
- package/es/Tree.js +0 -198
- package/es/Upload.d.ts +0 -11
- package/es/Upload.js +0 -6
- package/es/hooks/createUpdateEffect.d.ts +0 -5
- package/es/hooks/createUpdateEffect.js +0 -12
- package/es/utils/EventEmitter.d.ts +0 -7
- package/es/utils/EventEmitter.js +0 -13
- package/es/utils/ReactToSolid.d.ts +0 -8
- package/es/utils/ReactToSolid.js +0 -30
- package/es/utils/SolidToReact.d.ts +0 -8
- package/es/utils/SolidToReact.js +0 -23
- package/es/utils/component.d.ts +0 -31
- package/es/utils/component.js +0 -68
- package/es/utils/zh_CN.d.ts +0 -2
- package/es/utils/zh_CN.js +0 -236
- package/src/Button.tsx +0 -128
- package/src/Collapse/index.tsx +0 -86
- package/src/ColorPicker.tsx +0 -11
- package/src/Compact.tsx +0 -15
- package/src/DatePicker.tsx +0 -30
- package/src/Drawer/index.scss +0 -53
- package/src/Drawer/index.tsx +0 -212
- package/src/Empty/PRESENTED_IMAGE_SIMPLE.tsx +0 -15
- package/src/Empty/assets/EmptySvg.tsx +0 -43
- package/src/Empty/assets/SimpleEmptySvg.tsx +0 -16
- package/src/Empty/index.tsx +0 -20
- package/src/Form/Form.tsx +0 -94
- package/src/Form/FormItem.tsx +0 -141
- package/src/Form/context.ts +0 -16
- package/src/Form/index.ts +0 -13
- package/src/Image.tsx +0 -29
- package/src/Input.tsx +0 -202
- package/src/InputNumber.test.tsx +0 -46
- package/src/InputNumber.tsx +0 -125
- package/src/Modal.tsx +0 -220
- package/src/Popconfirm.tsx +0 -75
- package/src/Popover.tsx +0 -30
- package/src/Progress/index.tsx +0 -73
- package/src/Radio.tsx +0 -142
- package/src/Result.tsx +0 -38
- package/src/Segmented/index.tsx +0 -95
- package/src/Select.tsx +0 -128
- package/src/Skeleton.tsx +0 -14
- package/src/Spin.tsx +0 -23
- package/src/Switch.tsx +0 -34
- package/src/Table.tsx +0 -53
- package/src/Tabs.tsx +0 -131
- package/src/Timeline.tsx +0 -33
- package/src/Tooltip.tsx +0 -340
- package/src/Tree.tsx +0 -246
- package/src/Upload.tsx +0 -10
- package/src/hooks/createControllableValue.ts +0 -68
- package/src/hooks/createTransition.ts +0 -52
- package/src/hooks/createUpdateEffect.ts +0 -16
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useClickAway.ts +0 -18
- package/src/hooks/useSize.ts +0 -26
- package/src/index.ts +0 -47
- package/src/types/index.ts +0 -5
- package/src/utils/EventEmitter.ts +0 -15
- package/src/utils/ReactToSolid.tsx +0 -38
- package/src/utils/SolidToReact.tsx +0 -27
- package/src/utils/array.ts +0 -21
- package/src/utils/component.tsx +0 -85
- package/src/utils/solid.ts +0 -61
- package/src/utils/zh_CN.ts +0 -236
- /package/es/{InputNumber.test.d.ts → InputNumber/index.test.d.ts} +0 -0
- /package/es/{Result.d.ts → Result/index.d.ts} +0 -0
- /package/es/{Timeline.d.ts → Timeline/index.d.ts} +0 -0
package/es/utils/component.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Component, type JSXElement } from 'solid-js';
|
|
3
|
-
import { type ConfigProviderProps } from 'antd/es/config-provider';
|
|
4
|
-
/**
|
|
5
|
-
* 将组件 props 中的 className 替换为 class
|
|
6
|
-
* @param C
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export declare function replaceClassName<T extends {
|
|
10
|
-
className?: string;
|
|
11
|
-
}, Target extends Omit<T, 'className'> & {
|
|
12
|
-
class?: string;
|
|
13
|
-
}>(C: Component<T>): Component<Target>;
|
|
14
|
-
/**
|
|
15
|
-
* 将组件 props 中的 children 替换为 JSXElement
|
|
16
|
-
* @param C
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export declare function replaceChildren<T extends {
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
}, Target extends Omit<T, 'children'> & {
|
|
22
|
-
children?: JSXElement;
|
|
23
|
-
}>(C: Component<T>): Component<Target>;
|
|
24
|
-
export declare function reactToSolidComponent<P extends {} = {}>(component: React.FunctionComponent<P> | React.ComponentClass<P>, container?: Element | (() => Element)): (props: P) => import("solid-js").JSX.Element;
|
|
25
|
-
/**
|
|
26
|
-
* 返回被 ConfigProvider 包裹后的 component
|
|
27
|
-
* @param component
|
|
28
|
-
* @param configProviderProps
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
export declare function configProvider<P extends {} = {}>(component: React.FunctionComponent<P> | React.ComponentClass<P>, configProviderProps?: ConfigProviderProps): (props: P) => React.FunctionComponentElement<ConfigProviderProps>;
|
package/es/utils/component.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { createComponent, mergeProps } from 'solid-js/web';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { createMemo } from 'solid-js';
|
|
4
|
-
import { omit } from 'lodash-es';
|
|
5
|
-
import { solidToReact } from './solid.js';
|
|
6
|
-
import ReactToSolid from './ReactToSolid.js';
|
|
7
|
-
import { ConfigProvider } from 'antd';
|
|
8
|
-
import zhCN from './zh_CN.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 将组件 props 中的 className 替换为 class
|
|
12
|
-
* @param C
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
function replaceClassName(C) {
|
|
16
|
-
return function (_props) {
|
|
17
|
-
const props = createMemo(() => {
|
|
18
|
-
return {
|
|
19
|
-
...omit(_props, 'class'),
|
|
20
|
-
className: _props.class
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
return createComponent(C, mergeProps(props));
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 将组件 props 中的 children 替换为 JSXElement
|
|
28
|
-
* @param C
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
function replaceChildren(C) {
|
|
32
|
-
return function (_props) {
|
|
33
|
-
const props = createMemo(() => {
|
|
34
|
-
return {
|
|
35
|
-
..._props,
|
|
36
|
-
children: solidToReact(_props.children)
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
return createComponent(C, mergeProps(props));
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function reactToSolidComponent(component, container) {
|
|
43
|
-
return function (props) {
|
|
44
|
-
return createComponent(ReactToSolid, {
|
|
45
|
-
component: component,
|
|
46
|
-
props: props,
|
|
47
|
-
get container() {
|
|
48
|
-
return typeof container === 'function' ? container() : container;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* 返回被 ConfigProvider 包裹后的 component
|
|
55
|
-
* @param component
|
|
56
|
-
* @param configProviderProps
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
function configProvider(component, configProviderProps) {
|
|
60
|
-
return function (props) {
|
|
61
|
-
return React.createElement(ConfigProvider, {
|
|
62
|
-
locale: zhCN,
|
|
63
|
-
...configProviderProps
|
|
64
|
-
}, React.createElement(component, props));
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { configProvider, reactToSolidComponent, replaceChildren, replaceClassName };
|
package/es/utils/zh_CN.d.ts
DELETED
package/es/utils/zh_CN.js
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
var zhCN = {
|
|
2
|
-
locale: 'zh-cn',
|
|
3
|
-
Pagination: {
|
|
4
|
-
items_per_page: '条/页',
|
|
5
|
-
jump_to: '跳至',
|
|
6
|
-
jump_to_confirm: '确定',
|
|
7
|
-
page: '页',
|
|
8
|
-
prev_page: '上一页',
|
|
9
|
-
next_page: '下一页',
|
|
10
|
-
prev_5: '向前 5 页',
|
|
11
|
-
next_5: '向后 5 页',
|
|
12
|
-
prev_3: '向前 3 页',
|
|
13
|
-
next_3: '向后 3 页',
|
|
14
|
-
page_size: '页码'
|
|
15
|
-
},
|
|
16
|
-
DatePicker: {
|
|
17
|
-
lang: {
|
|
18
|
-
placeholder: '请选择日期',
|
|
19
|
-
yearPlaceholder: '请选择年份',
|
|
20
|
-
quarterPlaceholder: '请选择季度',
|
|
21
|
-
monthPlaceholder: '请选择月份',
|
|
22
|
-
weekPlaceholder: '请选择周',
|
|
23
|
-
rangePlaceholder: ['开始日期', '结束日期'],
|
|
24
|
-
rangeYearPlaceholder: ['开始年份', '结束年份'],
|
|
25
|
-
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
26
|
-
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
|
|
27
|
-
rangeWeekPlaceholder: ['开始周', '结束周'],
|
|
28
|
-
locale: 'zh_CN',
|
|
29
|
-
today: '今天',
|
|
30
|
-
now: '此刻',
|
|
31
|
-
backToToday: '返回今天',
|
|
32
|
-
ok: '确定',
|
|
33
|
-
timeSelect: '选择时间',
|
|
34
|
-
dateSelect: '选择日期',
|
|
35
|
-
weekSelect: '选择周',
|
|
36
|
-
clear: '清除',
|
|
37
|
-
month: '月',
|
|
38
|
-
year: '年',
|
|
39
|
-
previousMonth: '上个月 (翻页上键)',
|
|
40
|
-
nextMonth: '下个月 (翻页下键)',
|
|
41
|
-
monthSelect: '选择月份',
|
|
42
|
-
yearSelect: '选择年份',
|
|
43
|
-
decadeSelect: '选择年代',
|
|
44
|
-
yearFormat: 'YYYY年',
|
|
45
|
-
dayFormat: 'D日',
|
|
46
|
-
dateFormat: 'YYYY年M月D日',
|
|
47
|
-
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
|
|
48
|
-
previousYear: '上一年 (Control键加左方向键)',
|
|
49
|
-
nextYear: '下一年 (Control键加右方向键)',
|
|
50
|
-
previousDecade: '上一年代',
|
|
51
|
-
nextDecade: '下一年代',
|
|
52
|
-
previousCentury: '上一世纪',
|
|
53
|
-
nextCentury: '下一世纪'
|
|
54
|
-
},
|
|
55
|
-
timePickerLocale: {
|
|
56
|
-
placeholder: '请选择时间',
|
|
57
|
-
rangePlaceholder: ['开始时间', '结束时间']
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
TimePicker: {
|
|
61
|
-
placeholder: '请选择时间',
|
|
62
|
-
rangePlaceholder: ['开始时间', '结束时间']
|
|
63
|
-
},
|
|
64
|
-
Calendar: {
|
|
65
|
-
lang: {
|
|
66
|
-
placeholder: '请选择日期',
|
|
67
|
-
yearPlaceholder: '请选择年份',
|
|
68
|
-
quarterPlaceholder: '请选择季度',
|
|
69
|
-
monthPlaceholder: '请选择月份',
|
|
70
|
-
weekPlaceholder: '请选择周',
|
|
71
|
-
rangePlaceholder: ['开始日期', '结束日期'],
|
|
72
|
-
rangeYearPlaceholder: ['开始年份', '结束年份'],
|
|
73
|
-
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
74
|
-
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
|
|
75
|
-
rangeWeekPlaceholder: ['开始周', '结束周'],
|
|
76
|
-
locale: 'zh_CN',
|
|
77
|
-
today: '今天',
|
|
78
|
-
now: '此刻',
|
|
79
|
-
backToToday: '返回今天',
|
|
80
|
-
ok: '确定',
|
|
81
|
-
timeSelect: '选择时间',
|
|
82
|
-
dateSelect: '选择日期',
|
|
83
|
-
weekSelect: '选择周',
|
|
84
|
-
clear: '清除',
|
|
85
|
-
month: '月',
|
|
86
|
-
year: '年',
|
|
87
|
-
previousMonth: '上个月 (翻页上键)',
|
|
88
|
-
nextMonth: '下个月 (翻页下键)',
|
|
89
|
-
monthSelect: '选择月份',
|
|
90
|
-
yearSelect: '选择年份',
|
|
91
|
-
decadeSelect: '选择年代',
|
|
92
|
-
yearFormat: 'YYYY年',
|
|
93
|
-
dayFormat: 'D日',
|
|
94
|
-
dateFormat: 'YYYY年M月D日',
|
|
95
|
-
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
|
|
96
|
-
previousYear: '上一年 (Control键加左方向键)',
|
|
97
|
-
nextYear: '下一年 (Control键加右方向键)',
|
|
98
|
-
previousDecade: '上一年代',
|
|
99
|
-
nextDecade: '下一年代',
|
|
100
|
-
previousCentury: '上一世纪',
|
|
101
|
-
nextCentury: '下一世纪'
|
|
102
|
-
},
|
|
103
|
-
timePickerLocale: {
|
|
104
|
-
placeholder: '请选择时间',
|
|
105
|
-
rangePlaceholder: ['开始时间', '结束时间']
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
global: {
|
|
109
|
-
placeholder: '请选择'
|
|
110
|
-
},
|
|
111
|
-
Table: {
|
|
112
|
-
filterTitle: '筛选',
|
|
113
|
-
filterConfirm: '确定',
|
|
114
|
-
filterReset: '重置',
|
|
115
|
-
filterEmptyText: '无筛选项',
|
|
116
|
-
filterCheckall: '全选',
|
|
117
|
-
filterSearchPlaceholder: '在筛选项中搜索',
|
|
118
|
-
selectAll: '全选当页',
|
|
119
|
-
selectInvert: '反选当页',
|
|
120
|
-
selectNone: '清空所有',
|
|
121
|
-
selectionAll: '全选所有',
|
|
122
|
-
sortTitle: '排序',
|
|
123
|
-
expand: '展开行',
|
|
124
|
-
collapse: '关闭行',
|
|
125
|
-
triggerDesc: '点击降序',
|
|
126
|
-
triggerAsc: '点击升序',
|
|
127
|
-
cancelSort: '取消排序'
|
|
128
|
-
},
|
|
129
|
-
Modal: {
|
|
130
|
-
okText: '确定',
|
|
131
|
-
cancelText: '取消',
|
|
132
|
-
justOkText: '知道了'
|
|
133
|
-
},
|
|
134
|
-
Tour: {
|
|
135
|
-
Next: '下一步',
|
|
136
|
-
Previous: '上一步',
|
|
137
|
-
Finish: '结束导览'
|
|
138
|
-
},
|
|
139
|
-
Popconfirm: {
|
|
140
|
-
cancelText: '取消',
|
|
141
|
-
okText: '确定'
|
|
142
|
-
},
|
|
143
|
-
Transfer: {
|
|
144
|
-
titles: ['', ''],
|
|
145
|
-
searchPlaceholder: '请输入搜索内容',
|
|
146
|
-
itemUnit: '项',
|
|
147
|
-
itemsUnit: '项',
|
|
148
|
-
remove: '删除',
|
|
149
|
-
selectCurrent: '全选当页',
|
|
150
|
-
removeCurrent: '删除当页',
|
|
151
|
-
selectAll: '全选所有',
|
|
152
|
-
removeAll: '删除全部',
|
|
153
|
-
selectInvert: '反选当页'
|
|
154
|
-
},
|
|
155
|
-
Upload: {
|
|
156
|
-
uploading: '文件上传中',
|
|
157
|
-
removeFile: '删除文件',
|
|
158
|
-
uploadError: '上传错误',
|
|
159
|
-
previewFile: '预览文件',
|
|
160
|
-
downloadFile: '下载文件'
|
|
161
|
-
},
|
|
162
|
-
Empty: {
|
|
163
|
-
description: '暂无数据'
|
|
164
|
-
},
|
|
165
|
-
Icon: {
|
|
166
|
-
icon: '图标'
|
|
167
|
-
},
|
|
168
|
-
Text: {
|
|
169
|
-
edit: '编辑',
|
|
170
|
-
copy: '复制',
|
|
171
|
-
copied: '复制成功',
|
|
172
|
-
expand: '展开'
|
|
173
|
-
},
|
|
174
|
-
PageHeader: {
|
|
175
|
-
back: '返回'
|
|
176
|
-
},
|
|
177
|
-
Form: {
|
|
178
|
-
optional: '(可选)',
|
|
179
|
-
defaultValidateMessages: {
|
|
180
|
-
default: '字段验证错误${label}',
|
|
181
|
-
required: '请输入${label}',
|
|
182
|
-
enum: '${label}必须是其中一个[${enum}]',
|
|
183
|
-
whitespace: '${label}不能为空字符',
|
|
184
|
-
date: {
|
|
185
|
-
format: '${label}日期格式无效',
|
|
186
|
-
parse: '${label}不能转换为日期',
|
|
187
|
-
invalid: '${label}是一个无效日期'
|
|
188
|
-
},
|
|
189
|
-
types: {
|
|
190
|
-
string: '${label}不是一个有效的${type}',
|
|
191
|
-
method: '${label}不是一个有效的${type}',
|
|
192
|
-
array: '${label}不是一个有效的${type}',
|
|
193
|
-
object: '${label}不是一个有效的${type}',
|
|
194
|
-
number: '${label}不是一个有效的${type}',
|
|
195
|
-
date: '${label}不是一个有效的${type}',
|
|
196
|
-
boolean: '${label}不是一个有效的${type}',
|
|
197
|
-
integer: '${label}不是一个有效的${type}',
|
|
198
|
-
float: '${label}不是一个有效的${type}',
|
|
199
|
-
regexp: '${label}不是一个有效的${type}',
|
|
200
|
-
email: '${label}不是一个有效的${type}',
|
|
201
|
-
url: '${label}不是一个有效的${type}',
|
|
202
|
-
hex: '${label}不是一个有效的${type}'
|
|
203
|
-
},
|
|
204
|
-
string: {
|
|
205
|
-
len: '${label}须为${len}个字符',
|
|
206
|
-
min: '${label}最少${min}个字符',
|
|
207
|
-
max: '${label}最多${max}个字符',
|
|
208
|
-
range: '${label}须在${min}-${max}字符之间'
|
|
209
|
-
},
|
|
210
|
-
number: {
|
|
211
|
-
len: '${label}必须等于${len}',
|
|
212
|
-
min: '${label}最小值为${min}',
|
|
213
|
-
max: '${label}最大值为${max}',
|
|
214
|
-
range: '${label}须在${min}-${max}之间'
|
|
215
|
-
},
|
|
216
|
-
array: {
|
|
217
|
-
len: '须为${len}个${label}',
|
|
218
|
-
min: '最少${min}个${label}',
|
|
219
|
-
max: '最多${max}个${label}',
|
|
220
|
-
range: '${label}数量须在${min}-${max}之间'
|
|
221
|
-
},
|
|
222
|
-
pattern: {
|
|
223
|
-
mismatch: '${label}与模式不匹配${pattern}'
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
Image: {
|
|
228
|
-
preview: '预览'
|
|
229
|
-
},
|
|
230
|
-
QRCode: {
|
|
231
|
-
expired: '二维码过期',
|
|
232
|
-
refresh: '点击刷新'
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
export { zhCN as default };
|
package/src/Button.tsx
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Component,
|
|
3
|
-
mergeProps,
|
|
4
|
-
type ParentProps,
|
|
5
|
-
type JSX,
|
|
6
|
-
Show,
|
|
7
|
-
createSignal,
|
|
8
|
-
createMemo,
|
|
9
|
-
} from 'solid-js'
|
|
10
|
-
import cs from 'classnames'
|
|
11
|
-
|
|
12
|
-
interface ButtonProps extends ParentProps, JSX.CustomAttributes<HTMLButtonElement> {
|
|
13
|
-
type?: 'default' | 'primary' | 'dashed' | 'text' | 'link'
|
|
14
|
-
onClick?: ((e: MouseEvent) => void) | ((e: MouseEvent) => Promise<unknown>)
|
|
15
|
-
/**
|
|
16
|
-
* 默认: middle
|
|
17
|
-
* plain: 没有多余的 padding 和高度等
|
|
18
|
-
*/
|
|
19
|
-
size?: 'large' | 'middle' | 'small' | 'plain'
|
|
20
|
-
class?: string
|
|
21
|
-
style?: JSX.CSSProperties
|
|
22
|
-
loading?: boolean
|
|
23
|
-
/**
|
|
24
|
-
* 设置危险按钮
|
|
25
|
-
*/
|
|
26
|
-
danger?: boolean
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const sizeClassMap = {
|
|
30
|
-
large: 'ant-px-15px ant-py-6px ant-h-40px ant-rounded-8px',
|
|
31
|
-
middle: 'ant-px-15px ant-py-4px ant-h-32px ant-rounded-6px',
|
|
32
|
-
small: 'ant-px-7px ant-h-24px ant-rounded-4px',
|
|
33
|
-
plain: 'ant-p-0',
|
|
34
|
-
} as const
|
|
35
|
-
|
|
36
|
-
const typeClassMap = {
|
|
37
|
-
default: (danger: boolean) =>
|
|
38
|
-
cs(
|
|
39
|
-
'ant-bg-white',
|
|
40
|
-
danger
|
|
41
|
-
? 'ant-[border:1px_solid_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]'
|
|
42
|
-
: 'ant-[border:1px_solid_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--light-primary-color)] hover:ant-text-[var(--light-primary-color)] active:ant-[border-color:var(--dark-primary-color)] active:ant-text-[var(--dark-primary-color)]',
|
|
43
|
-
),
|
|
44
|
-
primary: (danger: boolean) =>
|
|
45
|
-
cs(
|
|
46
|
-
'ant-text-white',
|
|
47
|
-
danger
|
|
48
|
-
? 'ant-[border:1px_solid_var(--ant-color-error)] ant-bg-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-bg-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-bg-[var(--dark-error-color)]'
|
|
49
|
-
: 'ant-[border:1px_solid_var(--primary-color)] ant-bg-[var(--primary-color)] hover:ant-[border-color:var(--light-primary-color)] hover:ant-bg-[var(--light-primary-color)] active:ant-[border-color:var(--dark-primary-color)] active:ant-bg-[var(--dark-primary-color)]',
|
|
50
|
-
),
|
|
51
|
-
dashed: (danger: boolean) =>
|
|
52
|
-
cs(
|
|
53
|
-
' ant-bg-white',
|
|
54
|
-
danger
|
|
55
|
-
? 'ant-[border:1px_dashed_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]'
|
|
56
|
-
: 'ant-[border:1px_dashed_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--light-primary-color)] hover:ant-text-[var(--light-primary-color)] active:ant-[border-color:var(--dark-primary-color)] active:ant-text-[var(--dark-primary-color)]',
|
|
57
|
-
),
|
|
58
|
-
text: (danger: boolean) =>
|
|
59
|
-
cs(
|
|
60
|
-
'ant-border-none ant-bg-transparent',
|
|
61
|
-
danger
|
|
62
|
-
? 'ant-text-[var(--ant-color-error)] hover:ant-bg-[var(--error-bg-color)] active:ant-bg-[var(--error-bg-color)]'
|
|
63
|
-
: 'ant-text-[var(--dark-color)] hover:ant-bg-[rgba(0,0,0,0.06)] active:ant-bg-[rgba(0,0,0,.15)]',
|
|
64
|
-
),
|
|
65
|
-
link: (danger: boolean) =>
|
|
66
|
-
cs(
|
|
67
|
-
'ant-border-none ant-bg-transparent',
|
|
68
|
-
danger
|
|
69
|
-
? 'ant-text-[var(--ant-color-error)] hover:ant-text-[var(--light-error-color)] active:ant-text-[var(--dark-error-color)]'
|
|
70
|
-
: 'ant-text-[var(--primary-color)] hover:ant-text-[var(--light-primary-color)] active:ant-text-[var(--dark-primary-color)]',
|
|
71
|
-
),
|
|
72
|
-
} as const
|
|
73
|
-
|
|
74
|
-
const Button: Component<ButtonProps> = props => {
|
|
75
|
-
const mergedProps = mergeProps({ type: 'default', size: 'middle' } as ButtonProps, props)
|
|
76
|
-
const [innerLoading, setLoading] = createSignal(false)
|
|
77
|
-
const loading = createMemo(() => props.loading ?? innerLoading())
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<button
|
|
81
|
-
ref={mergedProps.ref}
|
|
82
|
-
class={cs(
|
|
83
|
-
'ant-relative ant-cursor-pointer',
|
|
84
|
-
'focus-visible:ant-[outline:4px_solid_var(--ant-color-primary-border)] focus-visible:ant-[outline-offset:1px]',
|
|
85
|
-
mergedProps.class,
|
|
86
|
-
sizeClassMap[mergedProps.size!],
|
|
87
|
-
typeClassMap[mergedProps.type!](props.danger ?? false),
|
|
88
|
-
loading() && 'ant-opacity-65',
|
|
89
|
-
'ant-[--color:--light-primary-color]',
|
|
90
|
-
)}
|
|
91
|
-
style={mergedProps.style}
|
|
92
|
-
onClick={e => {
|
|
93
|
-
const res = mergedProps.onClick?.(e)
|
|
94
|
-
if (res instanceof Promise) {
|
|
95
|
-
setLoading(true)
|
|
96
|
-
res.finally(() => setLoading(false))
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
mergedProps.type === 'default' ||
|
|
101
|
-
mergedProps.type === 'primary' ||
|
|
102
|
-
mergedProps.type === 'dashed'
|
|
103
|
-
) {
|
|
104
|
-
const div = document.createElement('div')
|
|
105
|
-
div.className = cs(
|
|
106
|
-
props.danger
|
|
107
|
-
? 'ant-[--color:var(--light-error-color)]'
|
|
108
|
-
: 'ant-[--color:var(--light-primary-color)]',
|
|
109
|
-
'ant-absolute ant-inset-0 ant-rounded-inherit ant-[background:radial-gradient(var(--color),rgba(0,0,0,0))] ant-z--1 ant-keyframes-button-border[inset:0px][inset:-6px] ant-[animation:button-border_ease-out_0.3s]',
|
|
110
|
-
)
|
|
111
|
-
const onAnimationEnd = () => {
|
|
112
|
-
div.remove()
|
|
113
|
-
div.removeEventListener('animationend', onAnimationEnd)
|
|
114
|
-
}
|
|
115
|
-
div.addEventListener('animationend', onAnimationEnd)
|
|
116
|
-
e.currentTarget.insertBefore(div, e.currentTarget.childNodes[0])
|
|
117
|
-
}
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
<Show when={loading()}>
|
|
121
|
-
<span class="i-ant-design:loading ant-[vertical-align:-0.125em] keyframes-spin ant-[animation:spin_1s_linear_infinite] ant-mr-8px" />
|
|
122
|
-
</Show>
|
|
123
|
-
<span>{mergedProps.children}</span>
|
|
124
|
-
</button>
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export default Button
|
package/src/Collapse/index.tsx
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { type JSX, type JSXElement, type Component, For, Show } from 'solid-js'
|
|
2
|
-
import cs from 'classnames'
|
|
3
|
-
import { Transition } from 'solid-transition-group'
|
|
4
|
-
import { type Key } from '../types'
|
|
5
|
-
import createControllableValue from '../hooks/createControllableValue'
|
|
6
|
-
|
|
7
|
-
export interface CollapseItem {
|
|
8
|
-
key: Key
|
|
9
|
-
label: JSXElement
|
|
10
|
-
children: JSXElement
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface CollapseProps {
|
|
14
|
-
class?: string
|
|
15
|
-
defaultActiveKey?: Key[]
|
|
16
|
-
activeKey?: Key[]
|
|
17
|
-
items: CollapseItem[]
|
|
18
|
-
style?: JSX.CSSProperties
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const Collapse: Component<CollapseProps> = props => {
|
|
22
|
-
const [activeKey, setActiveKey] = createControllableValue<Key[]>(props, {
|
|
23
|
-
defaultValuePropName: 'defaultActiveKey',
|
|
24
|
-
valuePropName: 'activeKey',
|
|
25
|
-
defaultValue: [],
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
class={cs(
|
|
31
|
-
'ant-rounded-[var(--ant-border-radius-lg)] ant-[border:1px_solid_var(--ant-color-border)] ant-border-b-0',
|
|
32
|
-
props.class,
|
|
33
|
-
)}
|
|
34
|
-
style={props.style}
|
|
35
|
-
>
|
|
36
|
-
<For each={props.items}>
|
|
37
|
-
{item => (
|
|
38
|
-
<div class="ant-[border-bottom:1px_solid_var(--ant-color-border)] first:ant-rounded-t-[var(--ant-border-radius-lg)] last:ant-rounded-b-[var(--ant-border-radius-lg)] ant-cursor-pointer">
|
|
39
|
-
<div
|
|
40
|
-
class="ant-bg-[var(--ant-collapse-header-bg)] ant-text-[var(--ant-color-text-heading)] ant-p-[var(--ant-collapse-header-padding)]"
|
|
41
|
-
onClick={() => {
|
|
42
|
-
setActiveKey(keys => {
|
|
43
|
-
if (keys.includes(item.key)) {
|
|
44
|
-
return keys.filter(key => key !== item.key)
|
|
45
|
-
}
|
|
46
|
-
return [...keys, item.key]
|
|
47
|
-
})
|
|
48
|
-
}}
|
|
49
|
-
>
|
|
50
|
-
<span
|
|
51
|
-
class={cs(
|
|
52
|
-
'i-ant-design:right-outlined',
|
|
53
|
-
'ant-mr-[var(--ant-margin-sm)] ant-duration-.3s',
|
|
54
|
-
activeKey().includes(item.key) && 'ant-rotate-[90deg]',
|
|
55
|
-
)}
|
|
56
|
-
/>
|
|
57
|
-
{item.label}
|
|
58
|
-
</div>
|
|
59
|
-
<Transition
|
|
60
|
-
onEnter={(el, done) => {
|
|
61
|
-
el.animate([{ height: '0px' }, { height: `${el.scrollHeight}px` }], {
|
|
62
|
-
duration: 300,
|
|
63
|
-
}).finished.finally(done)
|
|
64
|
-
}}
|
|
65
|
-
onExit={(el, done) => {
|
|
66
|
-
el.animate([{ height: `${el.scrollHeight}px` }, { height: '0px' }], {
|
|
67
|
-
duration: 300,
|
|
68
|
-
}).finished.finally(done)
|
|
69
|
-
}}
|
|
70
|
-
>
|
|
71
|
-
<Show when={activeKey().includes(item.key)}>
|
|
72
|
-
<div class="ant-overflow-hidden">
|
|
73
|
-
<div class="ant-p-[var(--ant-padding-sm)] ant-[border-top:1px_solid_var(--ant-color-border)]">
|
|
74
|
-
{item.children}
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</Show>
|
|
78
|
-
</Transition>
|
|
79
|
-
</div>
|
|
80
|
-
)}
|
|
81
|
-
</For>
|
|
82
|
-
</div>
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export default Collapse
|
package/src/ColorPicker.tsx
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ColorPicker } from 'antd'
|
|
2
|
-
import { type Color } from 'antd/es/color-picker'
|
|
3
|
-
import { reactToSolidComponent } from './utils/component'
|
|
4
|
-
|
|
5
|
-
export interface ColorPickerProps {
|
|
6
|
-
defaultValue?: string | Color
|
|
7
|
-
value?: string | Color
|
|
8
|
-
onChange?: (value: Color, hex: string) => void
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default reactToSolidComponent(ColorPicker)
|
package/src/Compact.tsx
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ParentProps } from 'solid-js'
|
|
2
|
-
|
|
3
|
-
interface CompactProps extends ParentProps {}
|
|
4
|
-
|
|
5
|
-
function Compact(props: CompactProps) {
|
|
6
|
-
return <div class="ant-compact ant-flex">{props.children}</div>
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
Compact.compactItemClass = 'p[.ant-compact]:ant-ml--1px'
|
|
10
|
-
Compact.compactItemRounded0Class = 'p[.ant-compact>*]:ant-rounded-0'
|
|
11
|
-
Compact.compactItemRoundedLeftClass = 'p[.ant-compact>:first-child]:ant-rounded-l-6px'
|
|
12
|
-
Compact.compactItemRoundedRightClass = 'p[.ant-compact>:last-child]:ant-rounded-r-6px'
|
|
13
|
-
Compact.compactItemZIndexClass = 'p[.ant-compact>*]:focus:ant-z-10 p[.ant-compact>*]:focus-within:ant-z-10'
|
|
14
|
-
|
|
15
|
-
export default Compact
|
package/src/DatePicker.tsx
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DatePicker as DatePickerAntd } from 'antd'
|
|
2
|
-
import { type DatePickerProps, type RangePickerProps } from 'antd/es/date-picker'
|
|
3
|
-
import { reactToSolidComponent, replaceClassName } from './utils/component'
|
|
4
|
-
|
|
5
|
-
const RangePicker = replaceClassName(
|
|
6
|
-
reactToSolidComponent<
|
|
7
|
-
RangePickerProps & {
|
|
8
|
-
dropdownClassName?: string | undefined
|
|
9
|
-
popupClassName?: string | undefined
|
|
10
|
-
rootClassName?: string | undefined
|
|
11
|
-
}
|
|
12
|
-
>(DatePickerAntd.RangePicker),
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
const _DatePicker = replaceClassName(
|
|
16
|
-
reactToSolidComponent<
|
|
17
|
-
DatePickerProps & {
|
|
18
|
-
status?: '' | 'error' | 'warning' | undefined
|
|
19
|
-
hashId?: string | undefined
|
|
20
|
-
popupClassName?: string | undefined
|
|
21
|
-
rootClassName?: string | undefined
|
|
22
|
-
}
|
|
23
|
-
>(DatePickerAntd),
|
|
24
|
-
)
|
|
25
|
-
const DatePicker = _DatePicker as typeof _DatePicker & {
|
|
26
|
-
RangePicker: typeof RangePicker
|
|
27
|
-
}
|
|
28
|
-
DatePicker.RangePicker = RangePicker
|
|
29
|
-
|
|
30
|
-
export default DatePicker
|
package/src/Drawer/index.scss
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
.ant-drawer-content-right {
|
|
2
|
-
top: 0;
|
|
3
|
-
bottom: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.ant-drawer-content-left {
|
|
8
|
-
top: 0;
|
|
9
|
-
bottom: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.ant-drawer-content-top {
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
right: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.ant-drawer-content-bottom {
|
|
20
|
-
bottom: 0;
|
|
21
|
-
left: 0;
|
|
22
|
-
right: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ant-drawer-fade-enter-active,
|
|
26
|
-
.ant-drawer-fade-exit-active {
|
|
27
|
-
transition: opacity .3s;
|
|
28
|
-
|
|
29
|
-
.ant-drawer-content {
|
|
30
|
-
transition: transform .3s;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ant-drawer-fade-enter,
|
|
35
|
-
.ant-drawer-fade-exit-to {
|
|
36
|
-
opacity: 0;
|
|
37
|
-
|
|
38
|
-
.ant-drawer-content-right {
|
|
39
|
-
transform: translateX(100%);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ant-drawer-content-left {
|
|
43
|
-
transform: translateX(-100%);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.ant-drawer-content-top {
|
|
47
|
-
transform: translateY(-100%);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.ant-drawer-content-bottom {
|
|
51
|
-
transform: translateY(100%);
|
|
52
|
-
}
|
|
53
|
-
}
|