antd-solid 0.0.3 → 0.0.5

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 (125) hide show
  1. package/dist/index.css +69 -0
  2. package/dist/index.esm.js +2369 -0
  3. package/dist/index.umd.js +1 -0
  4. package/package.json +5 -3
  5. package/.eslintignore +0 -2
  6. package/.eslintrc.cjs +0 -36
  7. package/.husky/pre-commit +0 -4
  8. package/.prettierrc +0 -11
  9. package/.vscode/settings.json +0 -13
  10. package/docs/.vitepress/components/Code.vue +0 -175
  11. package/docs/.vitepress/config.ts +0 -87
  12. package/docs/.vitepress/theme/index.css +0 -19
  13. package/docs/.vitepress/theme/index.ts +0 -12
  14. package/docs/components/button/Base.tsx +0 -21
  15. package/docs/components/button/Danger.tsx +0 -21
  16. package/docs/components/button.md +0 -35
  17. package/docs/components/collapse/Base.tsx +0 -25
  18. package/docs/components/collapse.md +0 -26
  19. package/docs/components/color-picker/Base.tsx +0 -14
  20. package/docs/components/color-picker.md +0 -26
  21. package/docs/components/compact/Base.tsx +0 -27
  22. package/docs/components/compact.md +0 -26
  23. package/docs/components/date-picker/Base.tsx +0 -15
  24. package/docs/components/date-picker.md +0 -26
  25. package/docs/components/empty/Base.tsx +0 -8
  26. package/docs/components/empty/PRESENTED_IMAGE_SIMPLE.tsx +0 -8
  27. package/docs/components/empty.md +0 -32
  28. package/docs/components/form/Base.tsx +0 -63
  29. package/docs/components/form.md +0 -27
  30. package/docs/components/image/Base.tsx +0 -13
  31. package/docs/components/image.md +0 -26
  32. package/docs/components/input/AddonBeforeAndAfter.tsx +0 -14
  33. package/docs/components/input/Base.tsx +0 -15
  34. package/docs/components/input/Disabled.tsx +0 -19
  35. package/docs/components/input/PrefixAndSuffix.tsx +0 -14
  36. package/docs/components/input/Status.tsx +0 -25
  37. package/docs/components/input/TextArea.tsx +0 -14
  38. package/docs/components/input-number/Base.tsx +0 -15
  39. package/docs/components/input-number/MinMax.tsx +0 -17
  40. package/docs/components/input-number.md +0 -34
  41. package/docs/components/input.md +0 -57
  42. package/docs/components/modal/Base.tsx +0 -35
  43. package/docs/components/modal.md +0 -26
  44. package/docs/components/popconfirm/Base.tsx +0 -25
  45. package/docs/components/popconfirm.md +0 -26
  46. package/docs/components/popover/Base.tsx +0 -19
  47. package/docs/components/popover.md +0 -26
  48. package/docs/components/progress/Base.tsx +0 -16
  49. package/docs/components/progress.md +0 -26
  50. package/docs/components/radio/Base.tsx +0 -10
  51. package/docs/components/radio.md +0 -26
  52. package/docs/components/segmented/Base.tsx +0 -10
  53. package/docs/components/segmented/Block.tsx +0 -10
  54. package/docs/components/segmented/Disabled.tsx +0 -28
  55. package/docs/components/segmented.md +0 -38
  56. package/docs/components/select/AllowClear.tsx +0 -18
  57. package/docs/components/select/Base.tsx +0 -17
  58. package/docs/components/select.md +0 -35
  59. package/docs/components/switch/Base.tsx +0 -14
  60. package/docs/components/switch.md +0 -26
  61. package/docs/components/table/Base.tsx +0 -34
  62. package/docs/components/table.md +0 -29
  63. package/docs/components/tabs/Base.tsx +0 -25
  64. package/docs/components/tabs/Segment.tsx +0 -25
  65. package/docs/components/tabs.md +0 -33
  66. package/docs/components/tooltip/Base.tsx +0 -12
  67. package/docs/components/tooltip/Placement.tsx +0 -90
  68. package/docs/components/tooltip.md +0 -32
  69. package/docs/components/tree/Base.tsx +0 -45
  70. package/docs/components/tree.md +0 -26
  71. package/docs/index.md +0 -28
  72. package/global.d.ts +0 -9
  73. package/patches/vitepress@1.0.0-rc.4.patch +0 -60
  74. package/rollup.config.js +0 -65
  75. package/scripts/annotationNonProductionCode.js +0 -30
  76. package/scripts/cancelAnnotationNonProductionCode.js +0 -30
  77. package/src/Button.tsx +0 -125
  78. package/src/Collapse/index.tsx +0 -86
  79. package/src/ColorPicker.tsx +0 -11
  80. package/src/Compact.tsx +0 -15
  81. package/src/DatePicker.tsx +0 -12
  82. package/src/Empty/PRESENTED_IMAGE_SIMPLE.tsx +0 -15
  83. package/src/Empty/assets/EmptySvg.tsx +0 -43
  84. package/src/Empty/assets/SimpleEmptySvg.tsx +0 -16
  85. package/src/Empty/index.tsx +0 -20
  86. package/src/Image.tsx +0 -29
  87. package/src/Input.tsx +0 -202
  88. package/src/InputNumber.test.tsx +0 -46
  89. package/src/InputNumber.tsx +0 -125
  90. package/src/Modal.tsx +0 -196
  91. package/src/Popconfirm.tsx +0 -75
  92. package/src/Popover.tsx +0 -30
  93. package/src/Progress.tsx +0 -4
  94. package/src/Radio.tsx +0 -132
  95. package/src/Result.tsx +0 -38
  96. package/src/Segmented/index.tsx +0 -95
  97. package/src/Select.tsx +0 -128
  98. package/src/Skeleton.tsx +0 -14
  99. package/src/Spin.tsx +0 -23
  100. package/src/Switch.tsx +0 -34
  101. package/src/Table.tsx +0 -53
  102. package/src/Tabs.tsx +0 -131
  103. package/src/Timeline.tsx +0 -33
  104. package/src/Tooltip.tsx +0 -355
  105. package/src/Tree.tsx +0 -246
  106. package/src/Upload.tsx +0 -10
  107. package/src/form/Form.tsx +0 -94
  108. package/src/form/FormItem.tsx +0 -139
  109. package/src/form/context.ts +0 -16
  110. package/src/form/index.ts +0 -13
  111. package/src/hooks/createControllableValue.ts +0 -68
  112. package/src/hooks/createUpdateEffect.ts +0 -16
  113. package/src/hooks/index.ts +0 -2
  114. package/src/hooks/useClickAway.ts +0 -18
  115. package/src/hooks/useSize.ts +0 -26
  116. package/src/types/index.ts +0 -5
  117. package/src/utils/EventEmitter.ts +0 -15
  118. package/src/utils/ReactToSolid.tsx +0 -38
  119. package/src/utils/SolidToReact.tsx +0 -27
  120. package/src/utils/array.ts +0 -21
  121. package/src/utils/component.tsx +0 -85
  122. package/src/utils/solid.ts +0 -53
  123. package/src/utils/zh_CN.ts +0 -236
  124. package/tsconfig.json +0 -25
  125. package/unocss.config.ts +0 -176
@@ -1,236 +0,0 @@
1
- import { type ConfigProviderProps } from 'antd/es/config-provider'
2
-
3
- export default {
4
- locale: 'zh-cn',
5
- Pagination: {
6
- items_per_page: '条/页',
7
- jump_to: '跳至',
8
- jump_to_confirm: '确定',
9
- page: '页',
10
- prev_page: '上一页',
11
- next_page: '下一页',
12
- prev_5: '向前 5 页',
13
- next_5: '向后 5 页',
14
- prev_3: '向前 3 页',
15
- next_3: '向后 3 页',
16
- page_size: '页码',
17
- },
18
- DatePicker: {
19
- lang: {
20
- placeholder: '请选择日期',
21
- yearPlaceholder: '请选择年份',
22
- quarterPlaceholder: '请选择季度',
23
- monthPlaceholder: '请选择月份',
24
- weekPlaceholder: '请选择周',
25
- rangePlaceholder: ['开始日期', '结束日期'],
26
- rangeYearPlaceholder: ['开始年份', '结束年份'],
27
- rangeMonthPlaceholder: ['开始月份', '结束月份'],
28
- rangeQuarterPlaceholder: ['开始季度', '结束季度'],
29
- rangeWeekPlaceholder: ['开始周', '结束周'],
30
- locale: 'zh_CN',
31
- today: '今天',
32
- now: '此刻',
33
- backToToday: '返回今天',
34
- ok: '确定',
35
- timeSelect: '选择时间',
36
- dateSelect: '选择日期',
37
- weekSelect: '选择周',
38
- clear: '清除',
39
- month: '月',
40
- year: '年',
41
- previousMonth: '上个月 (翻页上键)',
42
- nextMonth: '下个月 (翻页下键)',
43
- monthSelect: '选择月份',
44
- yearSelect: '选择年份',
45
- decadeSelect: '选择年代',
46
- yearFormat: 'YYYY年',
47
- dayFormat: 'D日',
48
- dateFormat: 'YYYY年M月D日',
49
- dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
50
- previousYear: '上一年 (Control键加左方向键)',
51
- nextYear: '下一年 (Control键加右方向键)',
52
- previousDecade: '上一年代',
53
- nextDecade: '下一年代',
54
- previousCentury: '上一世纪',
55
- nextCentury: '下一世纪',
56
- },
57
- timePickerLocale: {
58
- placeholder: '请选择时间',
59
- rangePlaceholder: ['开始时间', '结束时间'],
60
- },
61
- },
62
- TimePicker: {
63
- placeholder: '请选择时间',
64
- rangePlaceholder: ['开始时间', '结束时间'],
65
- },
66
- Calendar: {
67
- lang: {
68
- placeholder: '请选择日期',
69
- yearPlaceholder: '请选择年份',
70
- quarterPlaceholder: '请选择季度',
71
- monthPlaceholder: '请选择月份',
72
- weekPlaceholder: '请选择周',
73
- rangePlaceholder: ['开始日期', '结束日期'],
74
- rangeYearPlaceholder: ['开始年份', '结束年份'],
75
- rangeMonthPlaceholder: ['开始月份', '结束月份'],
76
- rangeQuarterPlaceholder: ['开始季度', '结束季度'],
77
- rangeWeekPlaceholder: ['开始周', '结束周'],
78
- locale: 'zh_CN',
79
- today: '今天',
80
- now: '此刻',
81
- backToToday: '返回今天',
82
- ok: '确定',
83
- timeSelect: '选择时间',
84
- dateSelect: '选择日期',
85
- weekSelect: '选择周',
86
- clear: '清除',
87
- month: '月',
88
- year: '年',
89
- previousMonth: '上个月 (翻页上键)',
90
- nextMonth: '下个月 (翻页下键)',
91
- monthSelect: '选择月份',
92
- yearSelect: '选择年份',
93
- decadeSelect: '选择年代',
94
- yearFormat: 'YYYY年',
95
- dayFormat: 'D日',
96
- dateFormat: 'YYYY年M月D日',
97
- dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
98
- previousYear: '上一年 (Control键加左方向键)',
99
- nextYear: '下一年 (Control键加右方向键)',
100
- previousDecade: '上一年代',
101
- nextDecade: '下一年代',
102
- previousCentury: '上一世纪',
103
- nextCentury: '下一世纪',
104
- },
105
- timePickerLocale: {
106
- placeholder: '请选择时间',
107
- rangePlaceholder: ['开始时间', '结束时间'],
108
- },
109
- },
110
- global: {
111
- placeholder: '请选择',
112
- },
113
- Table: {
114
- filterTitle: '筛选',
115
- filterConfirm: '确定',
116
- filterReset: '重置',
117
- filterEmptyText: '无筛选项',
118
- filterCheckall: '全选',
119
- filterSearchPlaceholder: '在筛选项中搜索',
120
- selectAll: '全选当页',
121
- selectInvert: '反选当页',
122
- selectNone: '清空所有',
123
- selectionAll: '全选所有',
124
- sortTitle: '排序',
125
- expand: '展开行',
126
- collapse: '关闭行',
127
- triggerDesc: '点击降序',
128
- triggerAsc: '点击升序',
129
- cancelSort: '取消排序',
130
- },
131
- Modal: {
132
- okText: '确定',
133
- cancelText: '取消',
134
- justOkText: '知道了',
135
- },
136
- Tour: {
137
- Next: '下一步',
138
- Previous: '上一步',
139
- Finish: '结束导览',
140
- },
141
- Popconfirm: {
142
- cancelText: '取消',
143
- okText: '确定',
144
- },
145
- Transfer: {
146
- titles: ['', ''],
147
- searchPlaceholder: '请输入搜索内容',
148
- itemUnit: '项',
149
- itemsUnit: '项',
150
- remove: '删除',
151
- selectCurrent: '全选当页',
152
- removeCurrent: '删除当页',
153
- selectAll: '全选所有',
154
- removeAll: '删除全部',
155
- selectInvert: '反选当页',
156
- },
157
- Upload: {
158
- uploading: '文件上传中',
159
- removeFile: '删除文件',
160
- uploadError: '上传错误',
161
- previewFile: '预览文件',
162
- downloadFile: '下载文件',
163
- },
164
- Empty: {
165
- description: '暂无数据',
166
- },
167
- Icon: {
168
- icon: '图标',
169
- },
170
- Text: {
171
- edit: '编辑',
172
- copy: '复制',
173
- copied: '复制成功',
174
- expand: '展开',
175
- },
176
- PageHeader: {
177
- back: '返回',
178
- },
179
- Form: {
180
- optional: '(可选)',
181
- defaultValidateMessages: {
182
- default: '字段验证错误${label}',
183
- required: '请输入${label}',
184
- enum: '${label}必须是其中一个[${enum}]',
185
- whitespace: '${label}不能为空字符',
186
- date: {
187
- format: '${label}日期格式无效',
188
- parse: '${label}不能转换为日期',
189
- invalid: '${label}是一个无效日期',
190
- },
191
- types: {
192
- string: '${label}不是一个有效的${type}',
193
- method: '${label}不是一个有效的${type}',
194
- array: '${label}不是一个有效的${type}',
195
- object: '${label}不是一个有效的${type}',
196
- number: '${label}不是一个有效的${type}',
197
- date: '${label}不是一个有效的${type}',
198
- boolean: '${label}不是一个有效的${type}',
199
- integer: '${label}不是一个有效的${type}',
200
- float: '${label}不是一个有效的${type}',
201
- regexp: '${label}不是一个有效的${type}',
202
- email: '${label}不是一个有效的${type}',
203
- url: '${label}不是一个有效的${type}',
204
- hex: '${label}不是一个有效的${type}',
205
- },
206
- string: {
207
- len: '${label}须为${len}个字符',
208
- min: '${label}最少${min}个字符',
209
- max: '${label}最多${max}个字符',
210
- range: '${label}须在${min}-${max}字符之间',
211
- },
212
- number: {
213
- len: '${label}必须等于${len}',
214
- min: '${label}最小值为${min}',
215
- max: '${label}最大值为${max}',
216
- range: '${label}须在${min}-${max}之间',
217
- },
218
- array: {
219
- len: '须为${len}个${label}',
220
- min: '最少${min}个${label}',
221
- max: '最多${max}个${label}',
222
- range: '${label}数量须在${min}-${max}之间',
223
- },
224
- pattern: {
225
- mismatch: '${label}与模式不匹配${pattern}',
226
- },
227
- },
228
- },
229
- Image: {
230
- preview: '预览',
231
- },
232
- QRCode: {
233
- expired: '二维码过期',
234
- refresh: '点击刷新',
235
- },
236
- } as ConfigProviderProps['locale']
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strictNullChecks": true,
4
- "noImplicitAny": true,
5
- "allowSyntheticDefaultImports": true,
6
- "esModuleInterop": true,
7
- "target": "ESNext",
8
- "module": "ESNext",
9
- "moduleResolution": "node",
10
- "jsxImportSource": "solid-js",
11
- "jsx": "preserve",
12
- "emitDecoratorMetadata": true,
13
- "experimentalDecorators": true,
14
- "paths": {
15
- "antd-solid": ["./src/index"],
16
- },
17
- "skipLibCheck": true,
18
- },
19
- "include": [
20
- "./src",
21
- "./docs",
22
- "./global.d.ts",
23
- "./unocss.config.ts"
24
- ],
25
- }
package/unocss.config.ts DELETED
@@ -1,176 +0,0 @@
1
- import { defineConfig } from '@unocss/vite'
2
- import { presetMini } from '@unocss/preset-mini'
3
- import transformerVariantGroup from '@unocss/transformer-variant-group'
4
- import presetIcons from '@unocss/preset-icons'
5
-
6
- export default defineConfig({
7
- preflights: [
8
- {
9
- getCSS: () => `
10
- :root {
11
- --primary-color: #52c41a;
12
- --light-primary-color: #95de64;
13
- --dark-primary-color: #237804;
14
- --active-bg-color: #d9f7be;
15
- --hover-bg-color: rgba(0,0,0,.04);
16
-
17
- --light-error-color: #ff7875;
18
- --dark-error-color: #d9363e;
19
-
20
- --error-bg-color: #fff2f0;
21
- --error-bg-hover-color: #fff1f0;
22
-
23
- --warning-color: #faad14;
24
- --color-warning-border-hover: #ffd666;
25
-
26
- --secondary-border-color: #f0f0f0;
27
-
28
- --light-color: rgba(0, 0, 0, 0.45);
29
- --dark-color: rgba(0, 0, 0, 0.88);
30
-
31
- --color-text-secondary: rgba(0, 0, 0, 0.65);
32
- --color-text-tertiary: rgba(0, 0, 0, 0.45);
33
- --color-text-quaternary: rgba(0, 0, 0, 0.25);
34
-
35
- --light-bg-color: #fafafa;
36
-
37
- --ant-color-error: #ff4d4f;
38
- --ant-color-text: rgba(0, 0, 0, 0.88);
39
- --ant-color-text-disabled: rgba(0, 0, 0, 0.25);
40
- --ant-color-text-heading: rgba(0, 0, 0, 0.88);
41
- --ant-color-border: #d9d9d9;
42
- --ant-color-bg-container-disabled: rgba(0, 0, 0, 0.04);
43
-
44
- --ant-color-bg-layout: #f5f5f5;
45
-
46
- --ant-margin-xs: 8px;
47
- --ant-margin-sm: 12px;
48
- --ant-margin-xl: 32px;
49
-
50
- --ant-padding-sm: 12px;
51
-
52
- --ant-box-shadow-tertiary: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
53
-
54
- --ant-border-radius-sm: 4px;
55
- --ant-border-radius: 6px;
56
- --ant-border-radius-lg: 8px;
57
-
58
- --ant-collapse-header-bg: rgba(0, 0, 0, 0.02);
59
- --ant-collapse-header-padding: 12px 16px;
60
-
61
- font-size: 14px;
62
- }
63
- `,
64
- },
65
- ],
66
- presets: [
67
- presetMini({
68
- prefix: 'ant-',
69
- }),
70
- presetIcons({
71
- collections: {
72
- 'ant-design': async () => await import('@iconify-json/ant-design').then(i => i.icons),
73
- },
74
- extraProperties: {
75
- display: 'inline-block',
76
- 'vertical-align': 'middle',
77
- },
78
- }) as any,
79
- ],
80
- transformers: [transformerVariantGroup()],
81
- variants: [
82
- /**
83
- * not[.*]:
84
- */
85
- matcher => {
86
- const prevReg = /^not\[(.*)\]:/
87
- const match = matcher.match(prevReg)
88
- if (!match) return matcher
89
- return {
90
- matcher: matcher.slice(match[0].length),
91
- selector: s => `${s}:not(${match[1]})`,
92
- }
93
- },
94
- /**
95
- * where:
96
- */
97
- matcher => {
98
- const prev = 'where:'
99
- if (!matcher.startsWith(prev)) {
100
- return matcher
101
- }
102
- return {
103
- matcher: matcher.slice(prev.length),
104
- selector: s => `:where(${s})`,
105
- }
106
- },
107
- /**
108
- * 定义子级的样式
109
- * child[.*]:
110
- */
111
- matcher => {
112
- const prevReg = /^child\[(.*)\]:/
113
- const match = matcher.match(prevReg)
114
- if (!match) return matcher
115
- return {
116
- matcher: matcher.slice(match[0].length),
117
- selector: s => `${s} ${match[1] || '*'}`,
118
- }
119
- },
120
- /**
121
- * 父级 hover 的状态定义子级的样式
122
- * p:hover-child[.*]:
123
- */
124
- matcher => {
125
- const prevReg = /^p:hover-child\[(.*)\]:/
126
- const match = matcher.match(prevReg)
127
- if (!match) return matcher
128
- return {
129
- matcher: matcher.slice(match[0].length),
130
- selector: s => `${s}:hover ${match[1] || '*'}`,
131
- }
132
- },
133
- /**
134
- * 有父级 class 的时候才会生效
135
- * p[.*]:
136
- */
137
- matcher => {
138
- const prevReg = /^p\[(.*)\]:/
139
- const match = matcher.match(prevReg)
140
- if (!match) return matcher
141
- return {
142
- matcher: matcher.slice(match[0].length),
143
- selector: s => `${match[1] || '*'} ${s}`,
144
- }
145
- },
146
- ],
147
- rules: [
148
- ['ant-rm-size-btn', { padding: 0, border: 'none', height: 'auto' }],
149
- [
150
- /^keyframes-spin$/,
151
- () => {
152
- return `@keyframes spin {
153
- from {
154
- transform: rotate(0deg);
155
- }
156
- to {
157
- transform: rotate(360deg);
158
- }
159
- }`
160
- },
161
- ],
162
- [
163
- /^ant-keyframes-(.*)(\[.*\])(\[.*\])$/,
164
- match => {
165
- return `@keyframes ${match[1]} {
166
- from {
167
- ${match[2].slice(1, -1)};
168
- }
169
- to {
170
- ${match[3].slice(1, -1)};
171
- }
172
- }`
173
- },
174
- ],
175
- ],
176
- })