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/Radio.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { delegateEvents, insert, effect, className, createComponent, Dynamic, template } from 'solid-js/web';
|
|
2
|
-
import { untrack, mergeProps, createSelector, For } from 'solid-js';
|
|
3
|
-
import cs from 'classnames';
|
|
4
|
-
import createControllableValue from './hooks/createControllableValue.js';
|
|
5
|
-
|
|
6
|
-
const _tmpl$ = /*#__PURE__*/template(`<label class="ant-inline-flex ant-gap-4px ant-cursor-pointer ant-inline-flex ant-items-center"><span><input class="ant-m-0 ant-hidden" type="radio">`),
|
|
7
|
-
_tmpl$2 = /*#__PURE__*/template(`<label><input class="ant-w-0 ant-h-0" type="radio">`),
|
|
8
|
-
_tmpl$3 = /*#__PURE__*/template(`<div>`);
|
|
9
|
-
const Radio = props => {
|
|
10
|
-
const [checked, setChecked] = createControllableValue(props, {
|
|
11
|
-
defaultValue: false,
|
|
12
|
-
defaultValuePropName: 'defaultChecked',
|
|
13
|
-
valuePropName: 'checked',
|
|
14
|
-
trigger: null
|
|
15
|
-
});
|
|
16
|
-
return (() => {
|
|
17
|
-
const _el$ = _tmpl$(),
|
|
18
|
-
_el$2 = _el$.firstChild,
|
|
19
|
-
_el$3 = _el$2.firstChild;
|
|
20
|
-
_el$3.$$input = e => {
|
|
21
|
-
setChecked(e.target.checked);
|
|
22
|
-
untrack(() => props.onChange?.(e));
|
|
23
|
-
};
|
|
24
|
-
insert(_el$, () => props.children, null);
|
|
25
|
-
effect(() => className(_el$2, cs('ant-w-16px ant-h-16px ant-rounded-50% ant-[border:1px_solid_var(--ant-color-border)]', checked() && 'ant-[border:5px_solid_var(--primary-color)]')));
|
|
26
|
-
effect(() => _el$3.checked = checked());
|
|
27
|
-
effect(() => _el$3.value = props.value ?? '');
|
|
28
|
-
return _el$;
|
|
29
|
-
})();
|
|
30
|
-
};
|
|
31
|
-
Radio.Button = props => {
|
|
32
|
-
const [checked, setChecked] = createControllableValue(props, {
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
defaultValuePropName: 'defaultChecked',
|
|
35
|
-
valuePropName: 'checked',
|
|
36
|
-
trigger: null
|
|
37
|
-
});
|
|
38
|
-
return (() => {
|
|
39
|
-
const _el$4 = _tmpl$2(),
|
|
40
|
-
_el$5 = _el$4.firstChild;
|
|
41
|
-
_el$5.$$input = e => {
|
|
42
|
-
setChecked(e.target.checked);
|
|
43
|
-
untrack(() => props.onChange?.(e));
|
|
44
|
-
};
|
|
45
|
-
insert(_el$4, () => props.children, null);
|
|
46
|
-
effect(() => className(_el$4, cs('ant-px-15px ant-[border:1px_solid_rgb(217,217,217)] first:ant-rounded-l-6px last:ant-rounded-r-6px ant-h-32px ant-inline-flex ant-items-center hover:ant-text-[var(--primary-color)] not[:last-child]:ant-border-r-transparent ant-cursor-pointer ant-flex-grow ant-justify-center', checked() && 'ant-text-[var(--primary-color)] ant-[border:1px_solid_var(--primary-color)] !ant-border-r-[var(--primary-color)]')));
|
|
47
|
-
effect(() => _el$5.checked = checked());
|
|
48
|
-
effect(() => _el$5.value = props.value ?? '');
|
|
49
|
-
return _el$4;
|
|
50
|
-
})();
|
|
51
|
-
};
|
|
52
|
-
Radio.Group = _props => {
|
|
53
|
-
const props = mergeProps({
|
|
54
|
-
optionType: 'default'
|
|
55
|
-
}, _props);
|
|
56
|
-
const [value, setValue] = createControllableValue(props, {
|
|
57
|
-
trigger: null
|
|
58
|
-
});
|
|
59
|
-
const isChecked = createSelector(value);
|
|
60
|
-
return (() => {
|
|
61
|
-
const _el$6 = _tmpl$3();
|
|
62
|
-
insert(_el$6, createComponent(For, {
|
|
63
|
-
get each() {
|
|
64
|
-
return props.options;
|
|
65
|
-
},
|
|
66
|
-
children: option => createComponent(Dynamic, {
|
|
67
|
-
get component() {
|
|
68
|
-
return props.optionType === 'default' ? Radio : Radio.Button;
|
|
69
|
-
},
|
|
70
|
-
get checked() {
|
|
71
|
-
return isChecked(option.value);
|
|
72
|
-
},
|
|
73
|
-
get value() {
|
|
74
|
-
return option.value;
|
|
75
|
-
},
|
|
76
|
-
onChange: e => {
|
|
77
|
-
setValue(option.value);
|
|
78
|
-
untrack(() => {
|
|
79
|
-
props.onChange?.(e);
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
get children() {
|
|
83
|
-
return option.label;
|
|
84
|
-
}
|
|
85
|
-
})
|
|
86
|
-
}));
|
|
87
|
-
effect(() => className(_el$6, cs(props.block ? 'ant-flex' : 'ant-inline-flex', props.optionType === 'default' ? 'ant-gap-8px' : '')));
|
|
88
|
-
return _el$6;
|
|
89
|
-
})();
|
|
90
|
-
};
|
|
91
|
-
delegateEvents(["input"]);
|
|
92
|
-
|
|
93
|
-
export { Radio as default };
|
package/es/Result.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { insert, effect, className, template } from 'solid-js/web';
|
|
2
|
-
import cs from 'classnames';
|
|
3
|
-
|
|
4
|
-
const _tmpl$ = /*#__PURE__*/template(`<div class="ant-text-center ant-px-32px ant-py-48px"><div class="ant-mb-24px"><span></span></div><div class="ant-my-8px ant-text-[rgba(0,0,0,.88)] ant-text-24px"></div><div class="ant-text-[rgba(0,0,0,.45)] ant-text-14px"></div><div class="ant-mt-24px"></div><div class="ant-mt-24px">`);
|
|
5
|
-
const statusIconMap = {
|
|
6
|
-
success: 'ant-text-#52c41a i-ant-design:check-circle-filled',
|
|
7
|
-
info: 'ant-text-[var(--primary-color)] i-ant-design:exclamation-circle-filled',
|
|
8
|
-
warning: 'ant-text-#faad14 i-ant-design:warning-filled',
|
|
9
|
-
error: 'ant-text-#ff4d4f i-ant-design:close-circle-filled'
|
|
10
|
-
};
|
|
11
|
-
const Result = props => {
|
|
12
|
-
return (() => {
|
|
13
|
-
const _el$ = _tmpl$(),
|
|
14
|
-
_el$2 = _el$.firstChild,
|
|
15
|
-
_el$3 = _el$2.firstChild,
|
|
16
|
-
_el$4 = _el$2.nextSibling,
|
|
17
|
-
_el$5 = _el$4.nextSibling,
|
|
18
|
-
_el$6 = _el$5.nextSibling,
|
|
19
|
-
_el$7 = _el$6.nextSibling;
|
|
20
|
-
insert(_el$4, () => props.title);
|
|
21
|
-
insert(_el$5, () => props.subTitle);
|
|
22
|
-
insert(_el$6, () => props.extra);
|
|
23
|
-
insert(_el$7, () => props.children);
|
|
24
|
-
effect(() => className(_el$3, cs(statusIconMap[props.status], 'ant-text-72px')));
|
|
25
|
-
return _el$;
|
|
26
|
-
})();
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { Result as default };
|
package/es/Select.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type JSXElement, type Component } from 'solid-js';
|
|
2
|
-
import { type Key } from './types';
|
|
3
|
-
interface SelectOption {
|
|
4
|
-
label: JSXElement;
|
|
5
|
-
value: Key;
|
|
6
|
-
}
|
|
7
|
-
interface SelectProps {
|
|
8
|
-
value?: Key;
|
|
9
|
-
onChange?: (value: Key) => void;
|
|
10
|
-
options: SelectOption[];
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
allowClear?: boolean;
|
|
13
|
-
class?: string;
|
|
14
|
-
}
|
|
15
|
-
declare const Select: Component<SelectProps>;
|
|
16
|
-
export default Select;
|
package/es/Select.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { delegateEvents, createComponent, insert, effect, className, use, setAttribute, template } from 'solid-js/web';
|
|
2
|
-
import { createSelector, createMemo, createSignal, For, Show } from 'solid-js';
|
|
3
|
-
import Tooltip from './Tooltip.js';
|
|
4
|
-
import createControllableValue from './hooks/createControllableValue.js';
|
|
5
|
-
import cs from 'classnames';
|
|
6
|
-
import useClickAway from './hooks/useClickAway.js';
|
|
7
|
-
import { isNil } from 'lodash-es';
|
|
8
|
-
|
|
9
|
-
const _tmpl$ = /*#__PURE__*/template(`<div>`),
|
|
10
|
-
_tmpl$2 = /*#__PURE__*/template(`<span class="i-ant-design:close-circle-filled ant-cursor-pointer ant-text-[var(--ant-clear-color)] hover:ant-text-[var(--ant-clear-color-hover)]">`),
|
|
11
|
-
_tmpl$3 = /*#__PURE__*/template(`<div tabindex="0"><div class="ant-relative ant-h-full"><div class="ant-absolute ant-top-0 ant-bottom-0 ant-right-0">`),
|
|
12
|
-
_tmpl$4 = /*#__PURE__*/template(`<div class="ant-bg-white ant-w-200px">`),
|
|
13
|
-
_tmpl$5 = /*#__PURE__*/template(`<input class="ant-h-full ant-w-full ant-float-left ant-[outline:none]" readonly>`),
|
|
14
|
-
_tmpl$6 = /*#__PURE__*/template(`<span class="i-ant-design:down-outlined ant-text-[var(--ant-allow-color)]">`);
|
|
15
|
-
const Select = props => {
|
|
16
|
-
let select;
|
|
17
|
-
const [value, setValue] = createControllableValue(props);
|
|
18
|
-
const selectedValue = createSelector(value);
|
|
19
|
-
const selectedOption = createMemo(() => !isNil(value()) ? props.options.find(option => option.value === value()) : undefined);
|
|
20
|
-
const [open, setOpen] = createSignal(false);
|
|
21
|
-
useClickAway(() => setOpen(false), () => select);
|
|
22
|
-
const [width, setWidth] = createSignal(0);
|
|
23
|
-
const [hover, setHover] = createSignal(false);
|
|
24
|
-
const showClearBtn = createMemo(() => props.allowClear && hover() && !isNil(value()));
|
|
25
|
-
return createComponent(Tooltip, {
|
|
26
|
-
mode: "light",
|
|
27
|
-
get open() {
|
|
28
|
-
return open();
|
|
29
|
-
},
|
|
30
|
-
onOpenChange: setOpen,
|
|
31
|
-
trigger: [],
|
|
32
|
-
placement: "bottomLeft",
|
|
33
|
-
arrow: false,
|
|
34
|
-
contentStyle: {
|
|
35
|
-
padding: 0
|
|
36
|
-
},
|
|
37
|
-
content: close => (() => {
|
|
38
|
-
const _el$6 = _tmpl$4();
|
|
39
|
-
insert(_el$6, createComponent(For, {
|
|
40
|
-
get each() {
|
|
41
|
-
return props.options;
|
|
42
|
-
},
|
|
43
|
-
children: item => (() => {
|
|
44
|
-
const _el$7 = _tmpl$();
|
|
45
|
-
_el$7.$$click = () => {
|
|
46
|
-
setValue(item.value);
|
|
47
|
-
close();
|
|
48
|
-
};
|
|
49
|
-
insert(_el$7, () => item.label);
|
|
50
|
-
effect(() => className(_el$7, cs('ant-box-content ant-px-12px ant-py-5px ant-h-22px ant-leading-22px hover:ant-bg-[var(--hover-bg-color)]', selectedValue(item.value) ? '!ant-bg-[var(--active-bg-color)]' : '')));
|
|
51
|
-
return _el$7;
|
|
52
|
-
})()
|
|
53
|
-
}));
|
|
54
|
-
effect(() => `${width()}px` != null ? _el$6.style.setProperty("width", `${width()}px`) : _el$6.style.removeProperty("width"));
|
|
55
|
-
return _el$6;
|
|
56
|
-
})(),
|
|
57
|
-
get children() {
|
|
58
|
-
const _el$ = _tmpl$3(),
|
|
59
|
-
_el$2 = _el$.firstChild,
|
|
60
|
-
_el$4 = _el$2.firstChild;
|
|
61
|
-
_el$.addEventListener("mouseleave", () => setHover(false));
|
|
62
|
-
_el$.addEventListener("mouseenter", () => setHover(true));
|
|
63
|
-
_el$.$$click = e => {
|
|
64
|
-
setOpen(true);
|
|
65
|
-
setWidth(e.currentTarget.offsetWidth);
|
|
66
|
-
e.currentTarget.focus();
|
|
67
|
-
};
|
|
68
|
-
const _ref$ = select;
|
|
69
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : select = _el$;
|
|
70
|
-
_el$.style.setProperty("--ant-arrow-color", "rgba(146, 146, 146, 1)");
|
|
71
|
-
_el$.style.setProperty("--ant-clear-color", "rgba(146, 146, 146, 1)");
|
|
72
|
-
_el$.style.setProperty("--ant-clear-color-hover", "rgba(194, 194, 194, 1)");
|
|
73
|
-
insert(_el$2, createComponent(Show, {
|
|
74
|
-
get when() {
|
|
75
|
-
return !isNil(value());
|
|
76
|
-
},
|
|
77
|
-
get fallback() {
|
|
78
|
-
return (() => {
|
|
79
|
-
const _el$8 = _tmpl$5();
|
|
80
|
-
effect(() => setAttribute(_el$8, "placeholder", props.placeholder));
|
|
81
|
-
return _el$8;
|
|
82
|
-
})();
|
|
83
|
-
},
|
|
84
|
-
get children() {
|
|
85
|
-
const _el$3 = _tmpl$();
|
|
86
|
-
insert(_el$3, () => selectedOption().label ?? value());
|
|
87
|
-
return _el$3;
|
|
88
|
-
}
|
|
89
|
-
}), _el$4);
|
|
90
|
-
insert(_el$4, createComponent(Show, {
|
|
91
|
-
get when() {
|
|
92
|
-
return showClearBtn();
|
|
93
|
-
},
|
|
94
|
-
get fallback() {
|
|
95
|
-
return _tmpl$6();
|
|
96
|
-
},
|
|
97
|
-
get children() {
|
|
98
|
-
const _el$5 = _tmpl$2();
|
|
99
|
-
_el$5.$$click = e => {
|
|
100
|
-
e.stopPropagation();
|
|
101
|
-
setValue(undefined);
|
|
102
|
-
};
|
|
103
|
-
return _el$5;
|
|
104
|
-
}
|
|
105
|
-
}));
|
|
106
|
-
effect(() => className(_el$, cs('ant-h-32px ant-leading-32px ant-rounded-6px ant-[border:1px_solid_var(--ant-color-border)] ant-px-11px focus:ant-[border-color:var(--primary-color)]', props.class)));
|
|
107
|
-
return _el$;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
delegateEvents(["click"]);
|
|
112
|
-
|
|
113
|
-
export { Select as default };
|
package/es/Skeleton.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const Image: import("solid-js").Component<Omit<import("antd/es/skeleton/Image").SkeletonImageProps, "className"> & {
|
|
2
|
-
class?: string | undefined;
|
|
3
|
-
}>;
|
|
4
|
-
declare const Skeleton: import("solid-js").Component<Omit<import("antd").SkeletonProps, "className"> & {
|
|
5
|
-
class?: string | undefined;
|
|
6
|
-
}> & {
|
|
7
|
-
Image: typeof Image;
|
|
8
|
-
};
|
|
9
|
-
export default Skeleton;
|
package/es/Skeleton.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Skeleton as Skeleton$1 } from 'antd';
|
|
2
|
-
import { replaceClassName, reactToSolidComponent } from './utils/component.js';
|
|
3
|
-
|
|
4
|
-
const _Skeleton = replaceClassName(reactToSolidComponent(Skeleton$1));
|
|
5
|
-
const Image = replaceClassName(reactToSolidComponent(Skeleton$1.Image));
|
|
6
|
-
const Skeleton = _Skeleton;
|
|
7
|
-
Skeleton.Image = Image;
|
|
8
|
-
|
|
9
|
-
export { Skeleton as default };
|
package/es/Spin.d.ts
DELETED
package/es/Spin.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { insert, createComponent, template } from 'solid-js/web';
|
|
2
|
-
import { Show } from 'solid-js';
|
|
3
|
-
|
|
4
|
-
const _tmpl$ = /*#__PURE__*/template(`<div class="ant-absolute ant-inset-0 ant-flex ant-items-center ant-justify-center ant-bg-[rgba(255,255,255,.5)]"><span class="i-ant-design:loading keyframes-spin ant-[animation:spin_1s_linear_infinite] ant-text-32px ant-text-[var(--primary-color)]">`),
|
|
5
|
-
_tmpl$2 = /*#__PURE__*/template(`<div class="ant-relative ant-min-h-32px">`);
|
|
6
|
-
const Spin = props => {
|
|
7
|
-
return (() => {
|
|
8
|
-
const _el$ = _tmpl$2();
|
|
9
|
-
insert(_el$, () => props.children, null);
|
|
10
|
-
insert(_el$, createComponent(Show, {
|
|
11
|
-
get when() {
|
|
12
|
-
return props.spinning;
|
|
13
|
-
},
|
|
14
|
-
get children() {
|
|
15
|
-
return _tmpl$();
|
|
16
|
-
}
|
|
17
|
-
}), null);
|
|
18
|
-
return _el$;
|
|
19
|
-
})();
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { Spin as default };
|
package/es/Switch.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { delegateEvents, effect, className, template } from 'solid-js/web';
|
|
2
|
-
import createControllableValue from './hooks/createControllableValue.js';
|
|
3
|
-
import cs from 'classnames';
|
|
4
|
-
|
|
5
|
-
const _tmpl$ = /*#__PURE__*/template(`<button><div>`);
|
|
6
|
-
const Switch = props => {
|
|
7
|
-
const [checked, setChecked] = createControllableValue(props, {
|
|
8
|
-
defaultValuePropName: 'defaultChecked',
|
|
9
|
-
valuePropName: 'checked'
|
|
10
|
-
});
|
|
11
|
-
return (() => {
|
|
12
|
-
const _el$ = _tmpl$(),
|
|
13
|
-
_el$2 = _el$.firstChild;
|
|
14
|
-
_el$.$$click = () => setChecked(c => !c);
|
|
15
|
-
effect(_p$ => {
|
|
16
|
-
const _v$ = cs('ant-w-44px ant-h-22px ant-rounded-100px ant-relative', checked() ? 'ant-bg-[var(--primary-color)]' : 'ant-bg-[rgba(0,0,0,0.45)]'),
|
|
17
|
-
_v$2 = cs('ant-w-18px ant-h-18px ant-rounded-50% ant-bg-white ant-absolute ant-top-1/2 -ant-translate-y-1/2 ant-transition-left', checked() ? 'ant-left-[calc(100%-20px)]' : 'ant-left-2px');
|
|
18
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
19
|
-
_v$2 !== _p$._v$2 && className(_el$2, _p$._v$2 = _v$2);
|
|
20
|
-
return _p$;
|
|
21
|
-
}, {
|
|
22
|
-
_v$: undefined,
|
|
23
|
-
_v$2: undefined
|
|
24
|
-
});
|
|
25
|
-
return _el$;
|
|
26
|
-
})();
|
|
27
|
-
};
|
|
28
|
-
delegateEvents(["click"]);
|
|
29
|
-
|
|
30
|
-
export { Switch as default };
|
package/es/Table.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { insert, createComponent, template } from 'solid-js/web';
|
|
2
|
-
import Empty from './Empty/index.js';
|
|
3
|
-
import { For, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
const _tmpl$ = /*#__PURE__*/template(`<div><table class="ant-w-full"><thead><tr></tr></thead><tbody>`),
|
|
6
|
-
_tmpl$2 = /*#__PURE__*/template(`<th class="ant-p-16px ant-bg-[var(--light-bg-color)] ant-font-bold ant-[border-bottom:1px_solid_var(--secondary-border-color)] ant-text-left">`),
|
|
7
|
-
_tmpl$3 = /*#__PURE__*/template(`<tr class="hover:ant-bg-[var(--light-bg-color)]">`),
|
|
8
|
-
_tmpl$4 = /*#__PURE__*/template(`<td class="ant-p-16px ant-[border-bottom:1px_solid_var(--secondary-border-color)]">`);
|
|
9
|
-
const Table = props => {
|
|
10
|
-
return (() => {
|
|
11
|
-
const _el$ = _tmpl$(),
|
|
12
|
-
_el$2 = _el$.firstChild,
|
|
13
|
-
_el$3 = _el$2.firstChild,
|
|
14
|
-
_el$4 = _el$3.firstChild,
|
|
15
|
-
_el$5 = _el$3.nextSibling;
|
|
16
|
-
insert(_el$4, createComponent(For, {
|
|
17
|
-
get each() {
|
|
18
|
-
return props.columns;
|
|
19
|
-
},
|
|
20
|
-
children: item => (() => {
|
|
21
|
-
const _el$6 = _tmpl$2();
|
|
22
|
-
insert(_el$6, () => item.title);
|
|
23
|
-
return _el$6;
|
|
24
|
-
})()
|
|
25
|
-
}));
|
|
26
|
-
insert(_el$5, createComponent(For, {
|
|
27
|
-
get each() {
|
|
28
|
-
return props.dataSource;
|
|
29
|
-
},
|
|
30
|
-
children: row => (() => {
|
|
31
|
-
const _el$7 = _tmpl$3();
|
|
32
|
-
insert(_el$7, createComponent(For, {
|
|
33
|
-
get each() {
|
|
34
|
-
return props.columns;
|
|
35
|
-
},
|
|
36
|
-
children: item => (() => {
|
|
37
|
-
const _el$8 = _tmpl$4();
|
|
38
|
-
insert(_el$8, () => item.render(row));
|
|
39
|
-
return _el$8;
|
|
40
|
-
})()
|
|
41
|
-
}));
|
|
42
|
-
return _el$7;
|
|
43
|
-
})()
|
|
44
|
-
}));
|
|
45
|
-
insert(_el$, createComponent(Show, {
|
|
46
|
-
get when() {
|
|
47
|
-
return !props.dataSource.length;
|
|
48
|
-
},
|
|
49
|
-
get children() {
|
|
50
|
-
return createComponent(Empty.PRESENTED_IMAGE_SIMPLE, {});
|
|
51
|
-
}
|
|
52
|
-
}), null);
|
|
53
|
-
return _el$;
|
|
54
|
-
})();
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export { Table as default };
|
package/es/Tabs.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Component } from 'solid-js';
|
|
2
|
-
import { type StringOrJSXElement } from './types';
|
|
3
|
-
export interface Tab {
|
|
4
|
-
key: string;
|
|
5
|
-
label: StringOrJSXElement;
|
|
6
|
-
children?: StringOrJSXElement;
|
|
7
|
-
}
|
|
8
|
-
export interface TabsProps {
|
|
9
|
-
type?: 'line' | 'segment';
|
|
10
|
-
class?: string;
|
|
11
|
-
navClass?: string;
|
|
12
|
-
navItemClass?: string;
|
|
13
|
-
contentClass?: string;
|
|
14
|
-
items: Tab[];
|
|
15
|
-
}
|
|
16
|
-
declare const Tabs: Component<TabsProps>;
|
|
17
|
-
export default Tabs;
|
package/es/Tabs.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { delegateEvents, insert, createComponent, effect, className, style, template, use } from 'solid-js/web';
|
|
2
|
-
import { mergeProps, createSignal, untrack, createSelector, onMount, Switch, Match, For, onCleanup } from 'solid-js';
|
|
3
|
-
import cs from 'classnames';
|
|
4
|
-
import Segmented from './Segmented/index.js';
|
|
5
|
-
import { unwrapStringOrJSXElement } from './utils/solid.js';
|
|
6
|
-
|
|
7
|
-
const _tmpl$ = /*#__PURE__*/template(`<div><div role="selected-bar" class="ant-absolute ant-bottom-0 ant-bg-[var(--primary-color)] ant-h-2px ant-transition-left">`),
|
|
8
|
-
_tmpl$2 = /*#__PURE__*/template(`<div><div>`),
|
|
9
|
-
_tmpl$3 = /*#__PURE__*/template(`<div>`);
|
|
10
|
-
const Tabs = _props => {
|
|
11
|
-
const props = mergeProps({
|
|
12
|
-
type: 'line'
|
|
13
|
-
}, _props);
|
|
14
|
-
const [selectedItem, setSelectedItem] = createSignal(untrack(() => props.items[0]));
|
|
15
|
-
const isSelectedItem = createSelector(() => selectedItem()?.key);
|
|
16
|
-
const [selectedBarStyle, setSelectedBarStyle] = createSignal({
|
|
17
|
-
left: '0px',
|
|
18
|
-
width: '0px'
|
|
19
|
-
});
|
|
20
|
-
let nav;
|
|
21
|
-
const updateSelectedBarStyle = () => {
|
|
22
|
-
if (!nav) return;
|
|
23
|
-
const el = nav.querySelector(':scope > .selected');
|
|
24
|
-
if (!el) return;
|
|
25
|
-
setSelectedBarStyle({
|
|
26
|
-
left: `${el.offsetLeft}px`,
|
|
27
|
-
width: `${el.clientWidth}px`
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
onMount(() => {
|
|
31
|
-
if (!nav) return;
|
|
32
|
-
updateSelectedBarStyle();
|
|
33
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
34
|
-
updateSelectedBarStyle();
|
|
35
|
-
});
|
|
36
|
-
resizeObserver.observe(nav);
|
|
37
|
-
onCleanup(() => {
|
|
38
|
-
resizeObserver.disconnect();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
return (() => {
|
|
42
|
-
const _el$ = _tmpl$2(),
|
|
43
|
-
_el$4 = _el$.firstChild;
|
|
44
|
-
insert(_el$, createComponent(Switch, {
|
|
45
|
-
get children() {
|
|
46
|
-
return [createComponent(Match, {
|
|
47
|
-
get when() {
|
|
48
|
-
return props.type === 'line';
|
|
49
|
-
},
|
|
50
|
-
get children() {
|
|
51
|
-
const _el$2 = _tmpl$(),
|
|
52
|
-
_el$3 = _el$2.firstChild;
|
|
53
|
-
const _ref$ = nav;
|
|
54
|
-
typeof _ref$ === "function" ? use(_ref$, _el$2) : nav = _el$2;
|
|
55
|
-
insert(_el$2, createComponent(For, {
|
|
56
|
-
get each() {
|
|
57
|
-
return props.items;
|
|
58
|
-
},
|
|
59
|
-
children: item => (() => {
|
|
60
|
-
const _el$5 = _tmpl$3();
|
|
61
|
-
_el$5.$$click = () => {
|
|
62
|
-
setSelectedItem(item);
|
|
63
|
-
updateSelectedBarStyle();
|
|
64
|
-
};
|
|
65
|
-
insert(_el$5, () => unwrapStringOrJSXElement(item.label));
|
|
66
|
-
effect(() => className(_el$5, cs('ant-py-12px ant-cursor-pointer', props.navItemClass, isSelectedItem(item.key) && 'ant-text-[var(--primary-color)] selected')));
|
|
67
|
-
return _el$5;
|
|
68
|
-
})()
|
|
69
|
-
}), _el$3);
|
|
70
|
-
effect(_p$ => {
|
|
71
|
-
const _v$ = cs('ant-mb-16px ant-flex ant-gap-32px ant-[border-bottom:solid_1px_rgba(5,5,5,0.1)] ant-relative', props.navClass),
|
|
72
|
-
_v$2 = selectedBarStyle();
|
|
73
|
-
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
74
|
-
_p$._v$2 = style(_el$3, _v$2, _p$._v$2);
|
|
75
|
-
return _p$;
|
|
76
|
-
}, {
|
|
77
|
-
_v$: undefined,
|
|
78
|
-
_v$2: undefined
|
|
79
|
-
});
|
|
80
|
-
return _el$2;
|
|
81
|
-
}
|
|
82
|
-
}), createComponent(Match, {
|
|
83
|
-
get when() {
|
|
84
|
-
return props.type === 'segment';
|
|
85
|
-
},
|
|
86
|
-
get children() {
|
|
87
|
-
return createComponent(Segmented, {
|
|
88
|
-
block: true,
|
|
89
|
-
get options() {
|
|
90
|
-
return props.items.map(item => ({
|
|
91
|
-
label: item.label,
|
|
92
|
-
value: item.key,
|
|
93
|
-
onClick: () => setSelectedItem(item)
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
})];
|
|
99
|
-
}
|
|
100
|
-
}), _el$4);
|
|
101
|
-
insert(_el$4, () => unwrapStringOrJSXElement(selectedItem()?.children));
|
|
102
|
-
effect(_p$ => {
|
|
103
|
-
const _v$3 = props.class,
|
|
104
|
-
_v$4 = props.contentClass;
|
|
105
|
-
_v$3 !== _p$._v$3 && className(_el$, _p$._v$3 = _v$3);
|
|
106
|
-
_v$4 !== _p$._v$4 && className(_el$4, _p$._v$4 = _v$4);
|
|
107
|
-
return _p$;
|
|
108
|
-
}, {
|
|
109
|
-
_v$3: undefined,
|
|
110
|
-
_v$4: undefined
|
|
111
|
-
});
|
|
112
|
-
return _el$;
|
|
113
|
-
})();
|
|
114
|
-
};
|
|
115
|
-
delegateEvents(["click"]);
|
|
116
|
-
|
|
117
|
-
export { Tabs as default };
|
package/es/Timeline.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { insert, createComponent, memo, template } from 'solid-js/web';
|
|
2
|
-
import { For } from 'solid-js';
|
|
3
|
-
|
|
4
|
-
const _tmpl$ = /*#__PURE__*/template(`<div class="ant-flex ant-flex-col ant-gap-[16px]">`),
|
|
5
|
-
_tmpl$2 = /*#__PURE__*/template(`<div class="ant-flex ant-relative"><div class="ant-w-[10px] ant-h-[10px] ant-border-solid ant-border-width-[3px] ant-border-[var(--primary-color)] ant-bg-white ant-rounded-[50%] ant-mt-[8px]"></div><div class="ant-ml-[8px]">`),
|
|
6
|
-
_tmpl$3 = /*#__PURE__*/template(`<div class="ant-absolute ant-top-[8px] ant-bottom-[-24px] ant-left-[4px] ant-w-[2px] ant-bg-[rgba(5,5,5,.06)]">`);
|
|
7
|
-
const Timeline = props => {
|
|
8
|
-
return (() => {
|
|
9
|
-
const _el$ = _tmpl$();
|
|
10
|
-
insert(_el$, createComponent(For, {
|
|
11
|
-
get each() {
|
|
12
|
-
return props.items;
|
|
13
|
-
},
|
|
14
|
-
children: (item, i) => (() => {
|
|
15
|
-
const _el$2 = _tmpl$2(),
|
|
16
|
-
_el$3 = _el$2.firstChild,
|
|
17
|
-
_el$4 = _el$3.nextSibling;
|
|
18
|
-
insert(_el$2, (() => {
|
|
19
|
-
const _c$ = memo(() => i() !== props.items.length - 1);
|
|
20
|
-
return () => _c$() && _tmpl$3();
|
|
21
|
-
})(), _el$3);
|
|
22
|
-
insert(_el$4, () => item.children?.());
|
|
23
|
-
return _el$2;
|
|
24
|
-
})()
|
|
25
|
-
}));
|
|
26
|
-
return _el$;
|
|
27
|
-
})();
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { Timeline as default };
|
package/es/Tooltip.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type Component, type JSXElement, type JSX } from 'solid-js';
|
|
2
|
-
type ActionType = 'hover' | 'focus' | 'click' | 'contextMenu';
|
|
3
|
-
type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
4
|
-
export interface TooltipProps {
|
|
5
|
-
/**
|
|
6
|
-
* 默认: hover
|
|
7
|
-
*/
|
|
8
|
-
trigger?: ActionType | ActionType[];
|
|
9
|
-
/**
|
|
10
|
-
* 默认: top
|
|
11
|
-
*/
|
|
12
|
-
placement?: TooltipPlacement;
|
|
13
|
-
contentStyle?: JSX.CSSProperties;
|
|
14
|
-
content?: JSXElement | ((close: () => void) => JSXElement);
|
|
15
|
-
children?: JSXElement;
|
|
16
|
-
open?: boolean;
|
|
17
|
-
onOpenChange?: (open: boolean) => void;
|
|
18
|
-
/**
|
|
19
|
-
* 默认: dark
|
|
20
|
-
*/
|
|
21
|
-
mode?: 'dark' | 'light';
|
|
22
|
-
/**
|
|
23
|
-
* 默认: true
|
|
24
|
-
*/
|
|
25
|
-
arrow?: boolean | {
|
|
26
|
-
pointAtCenter: boolean;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export declare const Content: Component<{
|
|
30
|
-
content: TooltipProps['content'];
|
|
31
|
-
close: () => void;
|
|
32
|
-
}>;
|
|
33
|
-
declare const Tooltip: Component<TooltipProps>;
|
|
34
|
-
export default Tooltip;
|