antd-solid 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/index.esm.js +0 -13
  2. package/dist/index.umd.js +1 -1
  3. package/es/Button.d.ts +19 -0
  4. package/es/Button.js +73 -0
  5. package/es/Collapse/index.d.ts +16 -0
  6. package/es/Collapse/index.js +87 -0
  7. package/es/ColorPicker.d.ts +8 -0
  8. package/es/ColorPicker.js +6 -0
  9. package/es/Compact.d.ts +12 -0
  10. package/es/Compact.js +17 -0
  11. package/es/DatePicker.d.ts +19 -0
  12. package/es/DatePicker.js +9 -0
  13. package/es/Empty/PRESENTED_IMAGE_SIMPLE.d.ts +3 -0
  14. package/es/Empty/PRESENTED_IMAGE_SIMPLE.js +14 -0
  15. package/es/Empty/assets/EmptySvg.d.ts +2 -0
  16. package/es/Empty/assets/EmptySvg.js +6 -0
  17. package/es/Empty/assets/SimpleEmptySvg.d.ts +2 -0
  18. package/es/Empty/assets/SimpleEmptySvg.js +6 -0
  19. package/es/Empty/index.d.ts +5 -0
  20. package/es/Empty/index.js +16 -0
  21. package/es/Image.d.ts +9 -0
  22. package/es/Image.js +22 -0
  23. package/es/Input.d.ts +29 -0
  24. package/es/Input.js +144 -0
  25. package/es/InputNumber.d.ts +11 -0
  26. package/es/InputNumber.js +92 -0
  27. package/es/InputNumber.test.d.ts +1 -0
  28. package/es/InputNumber.test.js +42 -0
  29. package/es/Modal.d.ts +47 -0
  30. package/es/Modal.js +195 -0
  31. package/es/Popconfirm.d.ts +21 -0
  32. package/es/Popconfirm.js +64 -0
  33. package/es/Popover.d.ts +7 -0
  34. package/es/Popover.js +36 -0
  35. package/es/Progress.d.ts +7 -0
  36. package/es/Progress.js +6 -0
  37. package/es/Radio.d.ts +27 -0
  38. package/es/Radio.js +89 -0
  39. package/es/Result.d.ts +10 -0
  40. package/es/Result.js +29 -0
  41. package/es/Segmented/index.d.ts +21 -0
  42. package/es/Segmented/index.js +72 -0
  43. package/es/Select.d.ts +16 -0
  44. package/es/Select.js +113 -0
  45. package/es/Skeleton.d.ts +9 -0
  46. package/es/Skeleton.js +9 -0
  47. package/es/Spin.d.ts +9 -0
  48. package/es/Spin.js +22 -0
  49. package/es/Switch.d.ts +8 -0
  50. package/es/Switch.js +30 -0
  51. package/es/Table.d.ts +11 -0
  52. package/es/Table.js +57 -0
  53. package/es/Tabs.d.ts +17 -0
  54. package/es/Tabs.js +117 -0
  55. package/es/Timeline.d.ts +13 -0
  56. package/es/Timeline.js +30 -0
  57. package/es/Tooltip.d.ts +34 -0
  58. package/es/Tooltip.js +302 -0
  59. package/es/Tree.d.ts +28 -0
  60. package/es/Tree.js +198 -0
  61. package/es/Upload.d.ts +11 -0
  62. package/es/Upload.js +6 -0
  63. package/es/form/Form.d.ts +18 -0
  64. package/es/form/Form.js +70 -0
  65. package/es/form/FormItem.d.ts +19 -0
  66. package/es/form/FormItem.js +141 -0
  67. package/es/form/context.d.ts +12 -0
  68. package/es/form/context.js +5 -0
  69. package/es/form/index.d.ts +8 -0
  70. package/es/form/index.js +7 -0
  71. package/es/hooks/createControllableValue.d.ts +16 -0
  72. package/es/hooks/createControllableValue.js +41 -0
  73. package/es/hooks/createUpdateEffect.d.ts +5 -0
  74. package/es/hooks/createUpdateEffect.js +12 -0
  75. package/es/hooks/index.d.ts +2 -0
  76. package/es/hooks/index.js +2 -0
  77. package/es/hooks/useClickAway.d.ts +2 -0
  78. package/es/hooks/useClickAway.js +17 -0
  79. package/es/hooks/useSize.d.ts +5 -0
  80. package/es/hooks/useSize.js +22 -0
  81. package/es/index.d.ts +42 -0
  82. package/es/index.js +29 -0
  83. package/es/types/index.d.ts +3 -0
  84. package/es/types/index.js +1 -0
  85. package/es/utils/EventEmitter.d.ts +7 -0
  86. package/es/utils/EventEmitter.js +13 -0
  87. package/es/utils/ReactToSolid.d.ts +8 -0
  88. package/es/utils/ReactToSolid.js +30 -0
  89. package/es/utils/SolidToReact.d.ts +8 -0
  90. package/es/utils/SolidToReact.js +23 -0
  91. package/es/utils/array.d.ts +15 -0
  92. package/es/utils/array.js +19 -0
  93. package/es/utils/component.d.ts +31 -0
  94. package/es/utils/component.js +68 -0
  95. package/es/utils/solid.d.ts +15 -0
  96. package/es/utils/solid.js +32 -0
  97. package/es/utils/zh_CN.d.ts +2 -0
  98. package/es/utils/zh_CN.js +236 -0
  99. package/package.json +6 -4
  100. package/src/DatePicker.tsx +20 -12
  101. package/src/Tooltip.tsx +0 -15
  102. /package/{dist → css}/index.css +0 -0
package/es/index.d.ts ADDED
@@ -0,0 +1,42 @@
1
+ export { default as Button } from './Button';
2
+ export { default as Input } from './Input';
3
+ export type { InputProps } from './Input';
4
+ export { default as InputNumber } from './InputNumber';
5
+ export type { InputNumberProps } from './InputNumber';
6
+ export { default as Timeline } from './Timeline';
7
+ export { default as Modal } from './Modal';
8
+ export type { ModalInstance } from './Modal';
9
+ export { default as DatePicker } from './DatePicker';
10
+ export { default as Select } from './Select';
11
+ export { default as Tree } from './Tree';
12
+ export type { TreeProps } from './Tree';
13
+ export { default as Popover } from './Popover';
14
+ export { default as Tooltip } from './Tooltip';
15
+ export { default as ColorPicker } from './ColorPicker';
16
+ export type { ColorPickerProps } from './ColorPicker';
17
+ export { default as Result } from './Result';
18
+ export { default as Progress } from './Progress';
19
+ export { default as Tabs } from './Tabs';
20
+ export type { TabsProps, Tab } from './Tabs';
21
+ export { default as Popconfirm } from './Popconfirm';
22
+ export { default as Upload } from './Upload';
23
+ export type { UploadProps, UploadFile } from './Upload';
24
+ export { default as Radio } from './Radio';
25
+ export type { RadioProps, RadioGroupProps } from './Radio';
26
+ export { default as Form } from './form';
27
+ export type { FormInstance, FormProps, FormItemProps, FormItemComponentProps } from './form';
28
+ export { default as Switch } from './Switch';
29
+ export type { SwitchProps } from './Switch';
30
+ export { default as Skeleton } from './Skeleton';
31
+ export { default as Spin } from './Spin';
32
+ export { default as Image } from './Image';
33
+ export { default as Table } from './Table';
34
+ export type { TableProps, TableColumn } from './Table';
35
+ export { default as Compact } from './Compact';
36
+ export type { CollapseProps, CollapseItem } from './Collapse';
37
+ export { default as Collapse } from './Collapse';
38
+ export { default as Empty } from './Empty';
39
+ export type { SegmentedProps } from './Segmented';
40
+ export { default as Segmented } from './Segmented';
41
+ export { default as createControllableValue } from './hooks/createControllableValue';
42
+ export { message } from 'antd';
package/es/index.js ADDED
@@ -0,0 +1,29 @@
1
+ export { default as Button } from './Button.js';
2
+ export { default as Input } from './Input.js';
3
+ export { default as InputNumber } from './InputNumber.js';
4
+ export { default as Timeline } from './Timeline.js';
5
+ export { default as Modal } from './Modal.js';
6
+ export { default as DatePicker } from './DatePicker.js';
7
+ export { default as Select } from './Select.js';
8
+ export { default as Tree } from './Tree.js';
9
+ export { default as Popover } from './Popover.js';
10
+ export { default as Tooltip } from './Tooltip.js';
11
+ export { default as ColorPicker } from './ColorPicker.js';
12
+ export { default as Result } from './Result.js';
13
+ export { default as Progress } from './Progress.js';
14
+ export { default as Tabs } from './Tabs.js';
15
+ export { default as Popconfirm } from './Popconfirm.js';
16
+ export { default as Upload } from './Upload.js';
17
+ export { default as Radio } from './Radio.js';
18
+ export { default as Form } from './form/index.js';
19
+ export { default as Switch } from './Switch.js';
20
+ export { default as Skeleton } from './Skeleton.js';
21
+ export { default as Spin } from './Spin.js';
22
+ export { default as Image } from './Image.js';
23
+ export { default as Table } from './Table.js';
24
+ export { default as Compact } from './Compact.js';
25
+ export { default as Collapse } from './Collapse/index.js';
26
+ export { default as Empty } from './Empty/index.js';
27
+ export { default as Segmented } from './Segmented/index.js';
28
+ export { default as createControllableValue } from './hooks/createControllableValue.js';
29
+ export { message } from 'antd';
@@ -0,0 +1,3 @@
1
+ import { type JSXElement } from 'solid-js';
2
+ export type Key = string | number;
3
+ export type StringOrJSXElement = string | number | undefined | null | (() => JSXElement);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,7 @@
1
+ type Subscription<T> = (val: T) => void;
2
+ export default class EventEmitter<T> {
3
+ private readonly subscriptions;
4
+ emit: (val: T) => void;
5
+ subscription: (callback: Subscription<T>) => void;
6
+ }
7
+ export {};
@@ -0,0 +1,13 @@
1
+ class EventEmitter {
2
+ subscriptions = new Set();
3
+ emit = val => {
4
+ for (const subscription of this.subscriptions) {
5
+ subscription(val);
6
+ }
7
+ };
8
+ subscription = callback => {
9
+ this.subscriptions.add(callback);
10
+ };
11
+ }
12
+
13
+ export { EventEmitter as default };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface ReactToSolidProps<P extends {} = {}> {
3
+ component: React.FunctionComponent<P> | React.ComponentClass<P>;
4
+ props: P;
5
+ container?: Element;
6
+ }
7
+ declare function ReactToSolid<P extends {} = {}>(props: ReactToSolidProps<P>): import("solid-js").JSX.Element;
8
+ export default ReactToSolid;
@@ -0,0 +1,30 @@
1
+ import { template } from 'solid-js/web';
2
+ import React from 'react';
3
+ import { createRoot } from 'react-dom/client';
4
+ import { createMemo, onMount, onCleanup, createEffect } from 'solid-js';
5
+
6
+ const _tmpl$ = /*#__PURE__*/template(`<div role="ReactToSolid">`);
7
+ function ReactToSolid(props) {
8
+ let root;
9
+ const rootEle = createMemo(() => props.container ?? _tmpl$());
10
+ onMount(() => {
11
+ root = createRoot(rootEle());
12
+ onCleanup(() => {
13
+ root.unmount();
14
+ });
15
+ });
16
+ createEffect(() => {
17
+ root.render(React.createElement(props.component, {
18
+ ...props.props
19
+ }));
20
+ });
21
+ // if (import.meta.env.SSR) {
22
+ // // eslint-disable-next-line solid/reactivity
23
+ // const node = React.createElement(props.component, { ...props.props })
24
+ // // eslint-disable-next-line solid/components-return-once, solid/no-innerhtml
25
+ // return <div innerHTML={renderToString(node)} />
26
+ // }
27
+ return rootEle;
28
+ }
29
+
30
+ export { ReactToSolid as default };
@@ -0,0 +1,8 @@
1
+ import { type FunctionComponent, type ReactElement } from 'react';
2
+ import { type JSX } from 'solid-js';
3
+ export interface SolidToReactProps {
4
+ children?: JSX.Element;
5
+ container?: ReactElement;
6
+ }
7
+ declare const SolidToReact: FunctionComponent<SolidToReactProps>;
8
+ export default SolidToReact;
@@ -0,0 +1,23 @@
1
+ import React, { useRef, useEffect } from 'react';
2
+ import { render } from 'solid-js/web';
3
+
4
+ const SolidToReact = ({
5
+ children,
6
+ container
7
+ }) => {
8
+ const ref = useRef();
9
+ useEffect(() => render(() => children, ref.current), []);
10
+ // if (import.meta.env.SSR) {
11
+ // return React.createElement('div', {
12
+ // dangerouslySetInnerHTML: { __html: renderToString(() => children) },
13
+ // })
14
+ // }
15
+ return container ? React.cloneElement(container, {
16
+ ref
17
+ }) : React.createElement('div', {
18
+ ref,
19
+ role: 'SolidToReact'
20
+ });
21
+ };
22
+
23
+ export { SolidToReact as default };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 如果传入一个非数组字段,则将其转化为数组
3
+ * @param value
4
+ * @returns
5
+ */
6
+ export declare function toArray<T>(value: T | T[]): T[];
7
+ export interface StandardNode {
8
+ children?: this[];
9
+ }
10
+ /**
11
+ * 将数组中每个对象的 children 拍扁后返回
12
+ * @param nodes
13
+ * @returns
14
+ */
15
+ export declare function flatChildren<T extends StandardNode = StandardNode>(nodes: T[] | undefined): T[];
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 如果传入一个非数组字段,则将其转化为数组
3
+ * @param value
4
+ * @returns
5
+ */
6
+ function toArray(value) {
7
+ return Array.isArray(value) ? value : [value];
8
+ }
9
+ /**
10
+ * 将数组中每个对象的 children 拍扁后返回
11
+ * @param nodes
12
+ * @returns
13
+ */
14
+ function flatChildren(nodes) {
15
+ if (!nodes) return [];
16
+ return nodes.flatMap(node => [node, ...flatChildren(node.children)]);
17
+ }
18
+
19
+ export { flatChildren, toArray };
@@ -0,0 +1,31 @@
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>;
@@ -0,0 +1,68 @@
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 };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { type JSXElement, type JSX } from 'solid-js';
3
+ import { type StringOrJSXElement } from '../types';
4
+ /**
5
+ * 判断 JSXElement 是否是基础类型
6
+ * @param value JSXElement
7
+ * @returns
8
+ */
9
+ export declare function isBaseType(value: JSXElement): value is string | number | boolean | null | undefined;
10
+ export declare function solidToReact(children: JSXElement): number | boolean | (string & {}) | React.FunctionComponentElement<import("./SolidToReact").SolidToReactProps> | null | undefined;
11
+ export declare function dispatchEventHandlerUnion<T, E extends Event>(handler: JSX.EventHandlerUnion<T, E> | undefined, e: E & {
12
+ currentTarget: T;
13
+ target: Element;
14
+ }): void;
15
+ export declare function unwrapStringOrJSXElement(value: StringOrJSXElement): JSXElement;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { isNil } from 'lodash-es';
3
+ import SolidToReact from './SolidToReact.js';
4
+
5
+ /**
6
+ * 判断 JSXElement 是否是基础类型
7
+ * @param value JSXElement
8
+ * @returns
9
+ */
10
+ function isBaseType(value) {
11
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || value === null || value === undefined;
12
+ }
13
+ function solidToReact(children) {
14
+ return isBaseType(children) ? children : React.createElement(SolidToReact, {
15
+ children
16
+ });
17
+ }
18
+ function dispatchEventHandlerUnion(handler, e) {
19
+ if (isNil(handler)) {
20
+ return;
21
+ }
22
+ if (typeof handler === 'function') {
23
+ handler(e);
24
+ return;
25
+ }
26
+ handler[0](handler[1], e);
27
+ }
28
+ function unwrapStringOrJSXElement(value) {
29
+ return typeof value === 'function' ? value() : value;
30
+ }
31
+
32
+ export { dispatchEventHandlerUnion, isBaseType, solidToReact, unwrapStringOrJSXElement };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("antd/es/locale").Locale | undefined;
2
+ export default _default;
@@ -0,0 +1,236 @@
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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "antd-solid",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
- "main": "dist/index.esm.js",
5
+ "main": "src/index.ts",
6
6
  "types": "src/index.ts",
7
7
  "type": "module",
8
8
  "devDependencies": {
@@ -67,14 +67,16 @@
67
67
  },
68
68
  "files": [
69
69
  "dist",
70
+ "es",
71
+ "css",
70
72
  "src"
71
73
  ],
72
74
  "scripts": {
73
75
  "docs:dev": "vitepress dev docs",
74
76
  "docs:build": "node scripts/annotationNonProductionCode && vitepress build docs && node scripts/cancelAnnotationNonProductionCode",
75
77
  "docs:preview": "vitepress preview docs",
76
- "build": "rm -rf dist && NODE_ENV=production && npx rollup -c && npm run build:unocss",
77
- "build:unocss": "npx unocss './src/**' -o dist/index.css -m",
78
+ "build": "rm -rf dist && rm -rf es && rm -rf css && NODE_ENV=production && npx rollup -c && npm run build:unocss",
79
+ "build:unocss": "npx unocss './src/**' -o css/index.css -m",
78
80
  "test": "vitest"
79
81
  }
80
82
  }