@trionesdev/antd-mobile-base-react 0.0.2-beta.16 → 0.0.2-beta.18

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 (118) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -23
  3. package/dist/Alert/alert.js +1 -1
  4. package/dist/Alert/style.scss +69 -69
  5. package/dist/Avatar/avatar.d.ts +2 -2
  6. package/dist/Avatar/avatar.js +1 -1
  7. package/dist/Avatar/style.scss +17 -17
  8. package/dist/Badge/style.scss +100 -100
  9. package/dist/Card/style.scss +35 -35
  10. package/dist/CascaderView/cascader-column-item.js +1 -1
  11. package/dist/CascaderView/style.scss +22 -22
  12. package/dist/Cell/CellGroup.js +25 -8
  13. package/dist/Cell/cell.js +20 -37
  14. package/dist/Cell/context.d.ts +4 -2
  15. package/dist/Cell/styles.scss +81 -52
  16. package/dist/Cell/types.d.ts +6 -4
  17. package/dist/Checkbox/checkbox-button.js +1 -1
  18. package/dist/Checkbox/checkbox-group.js +1 -2
  19. package/dist/Checkbox/checkbox-round.js +1 -1
  20. package/dist/Checkbox/index.scss +165 -165
  21. package/dist/ConfigProvider/config-provider.d.ts +1 -0
  22. package/dist/DemoBlock/index.scss +20 -20
  23. package/dist/DemoDescription/index.scss +3 -3
  24. package/dist/Descriptions/style.scss +65 -65
  25. package/dist/Divider/divider.d.ts +1 -1
  26. package/dist/Divider/divider.js +5 -3
  27. package/dist/Divider/style.scss +62 -62
  28. package/dist/Ellipsis/style.scss +13 -13
  29. package/dist/Empty/style.scss +29 -29
  30. package/dist/ErrorBlock/demo/base.js +2 -2
  31. package/dist/ErrorBlock/style.scss +62 -62
  32. package/dist/Footer/style.scss +55 -55
  33. package/dist/Form/ErrorList.d.ts +4 -0
  34. package/dist/Form/ErrorList.js +9 -0
  35. package/dist/Form/context.d.ts +4 -2
  36. package/dist/Form/context.js +2 -1
  37. package/dist/Form/form.d.ts +24 -6
  38. package/dist/Form/form.js +22 -11
  39. package/dist/Form/hooks/useForm.js +1 -8
  40. package/dist/Form/hooks/useFormContext.js +1 -2
  41. package/dist/Form/index.d.ts +6 -3
  42. package/dist/Form/index.js +4 -1
  43. package/dist/Form/styles.scss +11 -0
  44. package/dist/Form/types.d.ts +2 -1
  45. package/dist/FormCell/FormCell.d.ts +21 -0
  46. package/dist/FormCell/FormCell.js +56 -0
  47. package/dist/FormCell/index.d.ts +4 -0
  48. package/dist/FormCell/index.js +3 -0
  49. package/dist/FormCell/styles.scss +103 -0
  50. package/dist/Grid/style.scss +17 -17
  51. package/dist/Icon/demo/base.js +2 -2
  52. package/dist/InputNumber/style.scss +100 -100
  53. package/dist/Loading/DotLoading.d.ts +8 -0
  54. package/dist/Loading/DotLoading.js +33 -0
  55. package/dist/Loading/SpinLoading.js +70 -0
  56. package/dist/Loading/dot-loading.scss +72 -0
  57. package/dist/Loading/index.d.ts +5 -0
  58. package/dist/Loading/index.js +3 -0
  59. package/dist/{SpinLoading → Loading}/spin-loading.scss +39 -40
  60. package/dist/NavBar/nav-bar.js +1 -1
  61. package/dist/NavBar/style.scss +64 -64
  62. package/dist/NoticeBar/style.scss +130 -130
  63. package/dist/PageIndicator/style.scss +59 -59
  64. package/dist/Progress/Progress.js +1 -1
  65. package/dist/Progress/ProgressCircle.js +5 -2
  66. package/dist/Progress/ProgressLine.js +2 -2
  67. package/dist/Progress/style.scss +33 -33
  68. package/dist/Progress/types.d.ts +2 -2
  69. package/dist/Radio/radio.js +1 -1
  70. package/dist/Radio/style.scss +154 -141
  71. package/dist/Rate/rate.js +1 -1
  72. package/dist/Rate/style.scss +37 -37
  73. package/dist/Result/demo/base.js +2 -2
  74. package/dist/Result/style.scss +73 -73
  75. package/dist/Result/use-result-icon.js +1 -1
  76. package/dist/SafeArea/style.scss +20 -20
  77. package/dist/Scaffold/style.scss +17 -17
  78. package/dist/Segmented/style.scss +75 -75
  79. package/dist/Skeleton/Skeleton.d.ts +80 -21
  80. package/dist/Skeleton/Skeleton.js +248 -57
  81. package/dist/Skeleton/index.d.ts +3 -1
  82. package/dist/Skeleton/index.js +2 -1
  83. package/dist/Skeleton/style.scss +215 -48
  84. package/dist/Space/space.js +12 -9
  85. package/dist/Space/style.scss +101 -80
  86. package/dist/Stepper/stepper.js +2 -1
  87. package/dist/Stepper/style.scss +100 -100
  88. package/dist/Steps/HorizontalSteps.js +5 -2
  89. package/dist/Steps/VerticalSteps.js +5 -2
  90. package/dist/Steps/style.scss +153 -153
  91. package/dist/Steps/types.d.ts +2 -0
  92. package/dist/Switch/style.scss +127 -128
  93. package/dist/Switch/switch.d.ts +2 -0
  94. package/dist/Switch/switch.js +6 -5
  95. package/dist/TabBar/demo/base.js +2 -2
  96. package/dist/TabBar/index.scss +37 -37
  97. package/dist/Tabs/style.scss +108 -108
  98. package/dist/Tag/style.scss +110 -109
  99. package/dist/Tag/tag.d.ts +1 -1
  100. package/dist/Tag/tag.js +1 -1
  101. package/dist/WaterMark/style.scss +17 -17
  102. package/dist/index.d.ts +9 -4
  103. package/dist/index.js +4 -2
  104. package/dist/style/css-variable.scss +6 -6
  105. package/dist/style/style.scss +52 -52
  106. package/dist/style/theme-dark.scss +24 -24
  107. package/dist/style/theme-default.scss +54 -54
  108. package/dist/style/variable.scss +180 -173
  109. package/dist/types.d.ts +6 -1
  110. package/dist/utils/type.js +36 -36
  111. package/dist/utils/with-default-props.js +4 -4
  112. package/package.json +4 -7
  113. package/dist/SpinLoading/index.d.ts +0 -3
  114. package/dist/SpinLoading/index.js +0 -2
  115. package/dist/SpinLoading/spin-loading.js +0 -59
  116. package/dist/Tabs/demo/base.d.ts +0 -3
  117. package/dist/Tabs/demo/base.js +0 -59
  118. /package/dist/{SpinLoading/spin-loading.d.ts → Loading/SpinLoading.d.ts} +0 -0
@@ -1,45 +1,45 @@
1
1
  /** https://github.com/Microsoft/TypeScript/issues/29729 */
2
2
 
3
- /**
4
- * Get component props
5
- * @example
6
- * ```ts
7
- * import { Checkbox } from 'antd'
8
- * import type { GetProps } from 'antd';
9
- *
10
- * type CheckboxGroupProps = GetProps<typeof Checkbox.Group>
11
- * ```
12
- * @since 5.13.0
3
+ /**
4
+ * Get component props
5
+ * @example
6
+ * ```ts
7
+ * import { Checkbox } from 'antd'
8
+ * import type { GetProps } from 'antd';
9
+ *
10
+ * type CheckboxGroupProps = GetProps<typeof Checkbox.Group>
11
+ * ```
12
+ * @since 5.13.0
13
13
  */
14
14
 
15
- /**
16
- * Get component props by component name
17
- * @example
18
- * ```ts
19
- * import { Select } from 'antd';
20
- * import type { GetProp, SelectProps } from 'antd';
21
- *
22
- * type SelectOption1 = GetProp<SelectProps, 'options'>[number];
23
- * // or
24
- * type SelectOption2 = GetProp<typeof Select, 'options'>[number];
25
- *
26
- * const onChange: GetProp<typeof Select, 'onChange'> = (value, option) => {
27
- * // Do something
28
- * };
29
- * ```
30
- * @since 5.13.0
15
+ /**
16
+ * Get component props by component name
17
+ * @example
18
+ * ```ts
19
+ * import { Select } from 'antd';
20
+ * import type { GetProp, SelectProps } from 'antd';
21
+ *
22
+ * type SelectOption1 = GetProp<SelectProps, 'options'>[number];
23
+ * // or
24
+ * type SelectOption2 = GetProp<typeof Select, 'options'>[number];
25
+ *
26
+ * const onChange: GetProp<typeof Select, 'onChange'> = (value, option) => {
27
+ * // Do something
28
+ * };
29
+ * ```
30
+ * @since 5.13.0
31
31
  */
32
32
 
33
- /**
34
- * Get component ref
35
- * @example
36
- * ```ts
37
- * import { Input } from 'antd';
38
- * import type { GetRef } from 'antd';
39
- *
40
- * type InputRef = GetRef<typeof Input>;
41
- * ```
42
- * @since 5.13.0
33
+ /**
34
+ * Get component ref
35
+ * @example
36
+ * ```ts
37
+ * import { Input } from 'antd';
38
+ * import type { GetRef } from 'antd';
39
+ *
40
+ * type InputRef = GetRef<typeof Input>;
41
+ * ```
42
+ * @since 5.13.0
43
43
  */
44
44
 
45
45
  export var ComponentDefaults = {
@@ -15,10 +15,10 @@ export function mergeProps() {
15
15
  return ret;
16
16
  }
17
17
 
18
- /**
19
- * Merge props and return the first non-undefined value.
20
- * The later has higher priority. e.g. (10, 1, 5) => 5 wins.
21
- * This is useful with legacy props that have been deprecated.
18
+ /**
19
+ * Merge props and return the first non-undefined value.
20
+ * The later has higher priority. e.g. (10, 1, 5) => 5 wins.
21
+ * This is useful with legacy props that have been deprecated.
22
22
  */
23
23
  export function mergeProp(defaultProp) {
24
24
  for (var _len2 = arguments.length, propList = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trionesdev/antd-mobile-base-react",
3
- "version": "0.0.2-beta.16",
3
+ "version": "0.0.2-beta.18",
4
4
  "description": "antd mobile base react",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,13 +30,13 @@
30
30
  "react": ">=16.9.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@trionesdev/antd-mobile-icons-react": "workspace:*",
33
+ "@trionesdev/antd-mobile-icons-react": "0.0.2-beta.17",
34
34
  "@types/crypto-js": "^4.2.2",
35
35
  "@types/lodash-es": "^4.17.12",
36
36
  "@types/node": "^18.19.123",
37
37
  "@types/react": "^18.0.0",
38
38
  "classnames": "^2.5.1",
39
- "father": "^4.6.9",
39
+ "father": "^4.6.19",
40
40
  "react": "^18.0.0",
41
41
  "stylelint": "^16.12.0"
42
42
  },
@@ -47,8 +47,5 @@
47
47
  "react": "^18.0.0",
48
48
  "runes2": "^1.1.4"
49
49
  },
50
- "optionalDependencies": {
51
- "@trionesdev/antd-mobile-icons-react": "0.0.2-beta.16"
52
- },
53
- "gitHead": "c43752ae341cc478de96784586fbf3b36251f4a0"
50
+ "gitHead": "2dd659ecca3e4ce4cdca02cb9dd6b0bb512bb32e"
54
51
  }
@@ -1,3 +0,0 @@
1
- import { SpinLoading, SpinLoadingProps } from "./spin-loading";
2
- export type { SpinLoadingProps };
3
- export default SpinLoading;
@@ -1,2 +0,0 @@
1
- import { SpinLoading } from "./spin-loading";
2
- export default SpinLoading;
@@ -1,59 +0,0 @@
1
- import classNames from 'classnames';
2
- import Base64 from 'crypto-js/enc-base64';
3
- import Utf8 from 'crypto-js/enc-utf8';
4
- import React from 'react';
5
- import "./spin-loading.scss";
6
- var spinLoadingCls = 'triones-antm-spin-loading';
7
- export function createSvgStr(props) {
8
- return "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;height:100%\" viewBox=\"0 0 32 32\">\n <circle r=\"15\" cx=\"16\" cy=\"16\"\n stroke-width=\"2\"\n stroke=\"".concat(props.stroke, "\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"").concat(15 * 3.14159265358979 * 2, "\"\n stroke-dashoffset=\"").concat(15 * 3.14159265358979 * 0.5, "\"></circle>\n </svg>");
9
- }
10
- export var SpinLoading = function SpinLoading(_ref) {
11
- var _ref$size = _ref.size,
12
- size = _ref$size === void 0 ? 'middle' : _ref$size,
13
- _ref$color = _ref.color,
14
- color = _ref$color === void 0 ? 'default' : _ref$color;
15
- var computedSize = React.useMemo(function () {
16
- var resSize = null;
17
- if (size === 'small') {
18
- resSize = '24Px';
19
- } else if (size === 'middle') {
20
- resSize = '32Px';
21
- } else if (size === 'large') {
22
- resSize = '48Px';
23
- } else {
24
- resSize = size;
25
- }
26
- if (typeof resSize === 'number') {
27
- return "".concat(resSize, "Px");
28
- } else {
29
- return resSize;
30
- }
31
- }, [size]);
32
- var computedColor = React.useMemo(function () {
33
- if (color === 'default') {
34
- return '#9D9D9D';
35
- } else if (color === 'primary') {
36
- return '#1677ff';
37
- } else if (color === 'white') {
38
- return '#ffffff';
39
- } else {
40
- return color;
41
- }
42
- }, [color]);
43
- var completedStyle = React.useMemo(function () {
44
- var maskImageSvg = createSvgStr({
45
- stroke: computedColor
46
- });
47
- return {
48
- '--size': computedSize,
49
- '--color': computedColor,
50
- '--maskImage': "url(data:image/svg+xml;base64,".concat(Base64.stringify(Utf8.parse(maskImageSvg)), ")")
51
- };
52
- }, [computedSize, computedColor]);
53
- return /*#__PURE__*/React.createElement("div", {
54
- className: classNames(spinLoadingCls),
55
- style: completedStyle
56
- }, /*#__PURE__*/React.createElement("i", {
57
- className: classNames("".concat(spinLoadingCls, "-loading"))
58
- }));
59
- };
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const _default: () => React.JSX.Element;
3
- export default _default;
@@ -1,59 +0,0 @@
1
- import React from "react";
2
- import { DemoBlock } from "../../DemoBlock";
3
- import Tabs from "../index";
4
- export default (function () {
5
- var items = [{
6
- key: '1',
7
- label: 'Tab1',
8
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "1")
9
- }, {
10
- key: '2',
11
- label: 'Tab2',
12
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "2")
13
- }];
14
- var items2 = [{
15
- key: '1',
16
- label: 'Tab1-测试',
17
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "1")
18
- }, {
19
- key: '2',
20
- label: 'Tab2-测试',
21
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "2")
22
- }, {
23
- key: '3',
24
- label: 'Tab3-测试',
25
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "3")
26
- }, {
27
- key: '4',
28
- label: 'Tab4-测试',
29
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "4")
30
- }, {
31
- key: '5',
32
- label: 'Tab5-测试',
33
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "5")
34
- }, {
35
- key: '6',
36
- label: 'Tab6-测试',
37
- children: /*#__PURE__*/React.createElement(React.Fragment, null, "6")
38
- }];
39
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
40
- title: "\u57FA\u672C\u4F7F\u7528"
41
- }, /*#__PURE__*/React.createElement(Tabs, {
42
- items: items
43
- })), /*#__PURE__*/React.createElement(DemoBlock, {
44
- title: "\u6EDA\u52A8"
45
- }, /*#__PURE__*/React.createElement(Tabs, {
46
- items: items2,
47
- stretch: false
48
- })), /*#__PURE__*/React.createElement(DemoBlock, {
49
- title: "Tab"
50
- }, /*#__PURE__*/React.createElement(Tabs, {
51
- stretch: false
52
- }, /*#__PURE__*/React.createElement(Tabs.Tab, {
53
- key: "1",
54
- label: "Tab1"
55
- }, /*#__PURE__*/React.createElement("div", null, "1")), /*#__PURE__*/React.createElement(Tabs.Tab, {
56
- key: "2",
57
- label: "Tab2"
58
- }, /*#__PURE__*/React.createElement("div", null, "2")))));
59
- });