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
@@ -1,19 +1,27 @@
1
1
  import { DatePicker as DatePickerAntd } from 'antd'
2
- import { type DatePickerProps, type RangePickerProps } from 'antd/es/date-picker';
2
+ import { type DatePickerProps, type RangePickerProps } from 'antd/es/date-picker'
3
3
  import { reactToSolidComponent, replaceClassName } from './utils/component'
4
4
 
5
- const RangePicker = replaceClassName(reactToSolidComponent<RangePickerProps & {
6
- dropdownClassName?: string | undefined;
7
- popupClassName?: string | undefined;
8
- rootClassName?: string | undefined;
9
- }>(DatePickerAntd.RangePicker))
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
+ )
10
14
 
11
- const _DatePicker = replaceClassName(reactToSolidComponent<DatePickerProps & {
12
- status?: '' | 'error' | 'warning' | undefined;
13
- hashId?: string | undefined;
14
- popupClassName?: string | undefined;
15
- rootClassName?: string | undefined;
16
- }>(DatePickerAntd))
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
+ )
17
25
  const DatePicker = _DatePicker as typeof _DatePicker & {
18
26
  RangePicker: typeof RangePicker
19
27
  }
package/src/Tooltip.tsx CHANGED
@@ -130,21 +130,6 @@ const Tooltip: Component<TooltipProps> = _props => {
130
130
  }
131
131
  })
132
132
 
133
- const firstDirection = createMemo(() => {
134
- if (props.placement.startsWith('bottom')) return 'bottom'
135
- if (props.placement.startsWith('left')) return 'left'
136
- if (props.placement.startsWith('right')) return 'right'
137
- return 'top'
138
- })
139
-
140
- const secondDirection = createMemo(() => {
141
- if (props.placement.endsWith('Left')) return 'left'
142
- if (props.placement.endsWith('Right')) return 'right'
143
- if (props.placement.endsWith('Top')) return 'top'
144
- if (props.placement.endsWith('Bottom')) return 'bottom'
145
- return 'center'
146
- })
147
-
148
133
  const arrowOffset = createMemo(() => (props.arrow ? 8 : 0))
149
134
  const contentPositionStyle = createMemo(() => {
150
135
  switch (props.placement) {
File without changes