@trionesdev/antd-taro-react 0.0.2-beta.15 → 0.0.2-beta.17

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 (62) hide show
  1. package/LICENSE +21 -21
  2. package/dist/ActionSheet/style.scss +52 -52
  3. package/dist/Button/button.d.ts +2 -2
  4. package/dist/Button/button.js +2 -3
  5. package/dist/Button/style.scss +246 -235
  6. package/dist/Calendar/style.scss +88 -88
  7. package/dist/Calendar/touchable-calendar-grid.js +9 -9
  8. package/dist/CalendarDatetimePicker/style.scss +62 -62
  9. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +2 -2
  10. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +3 -3
  11. package/dist/CalendarPicker/style.scss +32 -32
  12. package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +2 -2
  13. package/dist/CalendarPickerCell/CalendarPickerCell.js +3 -3
  14. package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +2 -2
  15. package/dist/CalendarPickerCell/CalendarRangePickerCell.js +3 -3
  16. package/dist/CascaderPicker/style.scss +45 -45
  17. package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +2 -2
  18. package/dist/CascaderPickerCell/CascaderPickerCell.js +3 -3
  19. package/dist/DatePicker/style.scss +41 -41
  20. package/dist/FetchPicker/FetchPicker.d.ts +113 -0
  21. package/dist/FetchPicker/FetchPicker.js +322 -0
  22. package/dist/FetchPicker/index.d.ts +4 -0
  23. package/dist/FetchPicker/index.js +3 -0
  24. package/dist/FetchPicker/styles.scss +118 -0
  25. package/dist/FloatButton/style.scss +126 -126
  26. package/dist/Form/FormItem/{form-item-input.d.ts → form-item-content.d.ts} +3 -1
  27. package/dist/Form/FormItem/{form-item-input.js → form-item-content.js} +2 -2
  28. package/dist/Form/FormItem/form-item-label.js +2 -8
  29. package/dist/Form/FormItem/form-item.d.ts +3 -2
  30. package/dist/Form/FormItem/form-item.js +23 -19
  31. package/dist/Form/index.d.ts +2 -2
  32. package/dist/Form/style.scss +100 -78
  33. package/dist/FormCell/index.d.ts +3 -0
  34. package/dist/FormCell/index.js +2 -0
  35. package/dist/ImagesPreview/style.scss +34 -34
  36. package/dist/ImagesWall/style.scss +70 -70
  37. package/dist/Input/index.scss +282 -267
  38. package/dist/Input/input-affix-wrapper.js +1 -1
  39. package/dist/Input/taro-input.js +16 -3
  40. package/dist/Input/types.d.ts +3 -3
  41. package/dist/Loading/index.d.ts +4 -0
  42. package/dist/Loading/index.js +3 -0
  43. package/dist/Overlay/style.scss +20 -20
  44. package/dist/Picker/Picker.d.ts +8 -0
  45. package/dist/Picker/Picker.js +6 -7
  46. package/dist/Picker/style.scss +41 -41
  47. package/dist/PickerView/style.scss +13 -13
  48. package/dist/PickerView/types.d.ts +2 -2
  49. package/dist/Popup/style.scss +126 -124
  50. package/dist/SideBar/side-bar.js +6 -6
  51. package/dist/SideBar/style.scss +85 -85
  52. package/dist/Stepper/index.d.ts +3 -0
  53. package/dist/Stepper/index.js +2 -0
  54. package/dist/Toast/style.scss +63 -63
  55. package/dist/VerificationCodeInput/style.scss +20 -20
  56. package/dist/index.d.ts +10 -3
  57. package/dist/index.js +4 -1
  58. package/dist/style/variable.scss +34 -20
  59. package/package.json +20 -24
  60. package/readme.md +23 -23
  61. package/dist/SpinLoading/index.d.ts +0 -3
  62. package/dist/SpinLoading/index.js +0 -2
@@ -1,126 +1,126 @@
1
- @use "../style/variable" as variable;
2
-
3
- $floatButtonCls: "triones-antm-float-button";
4
- $floatButtonGroupCls: "triones-antm-float-button-group";
5
-
6
- $floatButtonSize: 48Px;
7
- $floatButtonShadow: 0 6Px 16Px 0 rgba(0, 0, 0, 0.08),
8
- 0 3Px 6Px -4Px rgba(0, 0, 0, 0.12), 0 9Px 28Px 8Px rgba(0, 0, 0, 0.05);
9
-
10
- .#{$floatButtonCls} {
11
- position: fixed;
12
- display: inline-flex;
13
- flex-shrink: 0;
14
- box-sizing: border-box;
15
-
16
- &--embedded {
17
- position: relative;
18
- right: auto;
19
- bottom: auto;
20
- z-index: auto;
21
- }
22
-
23
- &-body {
24
- box-sizing: border-box;
25
- margin: 0;
26
- padding: 0;
27
- display: inline-flex;
28
- align-items: center;
29
- justify-content: center;
30
- gap: 8Px;
31
- min-width: $floatButtonSize;
32
- min-height: $floatButtonSize;
33
- border: none;
34
- border-radius: 50%;
35
- cursor: pointer;
36
- font-size: 20Px;
37
- line-height: 1;
38
- color: rgba(0, 0, 0, 0.88);
39
- background: #fff;
40
- box-shadow: $floatButtonShadow;
41
- transition: color 0.2s, background 0.2s, box-shadow 0.2s;
42
- -webkit-tap-highlight-color: transparent;
43
- text-decoration: none;
44
-
45
- &:active {
46
- filter: brightness(0.95);
47
- }
48
- }
49
-
50
- &--shape-square &-body {
51
- border-radius: variable.$trionesBorderRadius;
52
- }
53
-
54
- &--has-content &-body {
55
- min-height: $floatButtonSize;
56
- display: inline-flex;
57
- flex-direction: column;
58
- align-items: center;
59
- justify-content: center;
60
- }
61
-
62
- &--type-primary &-body {
63
- color: #fff;
64
- background: variable.$trionesColorPrimary;
65
- }
66
-
67
- &-icon {
68
- display: inline-flex;
69
- align-items: center;
70
- justify-content: center;
71
- }
72
-
73
- &-content {
74
- font-size: variable.$trionesFontSizeSm;
75
- font-weight: 500;
76
- white-space: nowrap;
77
- }
78
- }
79
-
80
- .#{$floatButtonGroupCls} {
81
- position: fixed;
82
- display: flex;
83
- gap: 12Px;
84
- align-items: flex-end;
85
- box-sizing: border-box;
86
-
87
- &--placement {
88
- &-top {
89
- flex-direction: column;
90
- }
91
- &-bottom {
92
- flex-direction: column;
93
- }
94
- &-left {
95
- flex-direction: row;
96
- }
97
- &-right {
98
- flex-direction: row;
99
- }
100
- }
101
-
102
- &--menu {
103
- align-items: center;
104
- }
105
-
106
- &-list {
107
- display: flex;
108
- flex-direction: column;
109
- gap: 12Px;
110
- align-items: flex-end;
111
-
112
- &--hidden {
113
- display: none;
114
- }
115
- }
116
-
117
- &--placement-left &-list,
118
- &--placement-right &-list {
119
- flex-direction: column;
120
- }
121
-
122
- /** 小程序点击外部关闭:全屏遮罩;极淡背景避免部分机型不响应 tap */
123
- &-weapp-outside-mask {
124
- background: rgba(0, 0, 0, 0.001);
125
- }
126
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $floatButtonCls: "triones-antm-float-button";
4
+ $floatButtonGroupCls: "triones-antm-float-button-group";
5
+
6
+ $floatButtonSize: 48Px;
7
+ $floatButtonShadow: 0 6Px 16Px 0 rgba(0, 0, 0, 0.08),
8
+ 0 3Px 6Px -4Px rgba(0, 0, 0, 0.12), 0 9Px 28Px 8Px rgba(0, 0, 0, 0.05);
9
+
10
+ .#{$floatButtonCls} {
11
+ position: fixed;
12
+ display: inline-flex;
13
+ flex-shrink: 0;
14
+ box-sizing: border-box;
15
+
16
+ &--embedded {
17
+ position: relative;
18
+ right: auto;
19
+ bottom: auto;
20
+ z-index: auto;
21
+ }
22
+
23
+ &-body {
24
+ box-sizing: border-box;
25
+ margin: 0;
26
+ padding: 0;
27
+ display: inline-flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ gap: 8Px;
31
+ min-width: $floatButtonSize;
32
+ min-height: $floatButtonSize;
33
+ border: none;
34
+ border-radius: 50%;
35
+ cursor: pointer;
36
+ font-size: 20Px;
37
+ line-height: 1;
38
+ color: rgba(0, 0, 0, 0.88);
39
+ background: #fff;
40
+ box-shadow: $floatButtonShadow;
41
+ transition: color 0.2s, background 0.2s, box-shadow 0.2s;
42
+ -webkit-tap-highlight-color: transparent;
43
+ text-decoration: none;
44
+
45
+ &:active {
46
+ filter: brightness(0.95);
47
+ }
48
+ }
49
+
50
+ &--shape-square &-body {
51
+ border-radius: variable.$trionesBorderRadius;
52
+ }
53
+
54
+ &--has-content &-body {
55
+ min-height: $floatButtonSize;
56
+ display: inline-flex;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ justify-content: center;
60
+ }
61
+
62
+ &--type-primary &-body {
63
+ color: #fff;
64
+ background: variable.$trionesColorPrimary;
65
+ }
66
+
67
+ &-icon {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ }
72
+
73
+ &-content {
74
+ font-size: variable.$trionesFontSizeSm;
75
+ font-weight: 500;
76
+ white-space: nowrap;
77
+ }
78
+ }
79
+
80
+ .#{$floatButtonGroupCls} {
81
+ position: fixed;
82
+ display: flex;
83
+ gap: 12Px;
84
+ align-items: flex-end;
85
+ box-sizing: border-box;
86
+
87
+ &--placement {
88
+ &-top {
89
+ flex-direction: column;
90
+ }
91
+ &-bottom {
92
+ flex-direction: column;
93
+ }
94
+ &-left {
95
+ flex-direction: row;
96
+ }
97
+ &-right {
98
+ flex-direction: row;
99
+ }
100
+ }
101
+
102
+ &--menu {
103
+ align-items: center;
104
+ }
105
+
106
+ &-list {
107
+ display: flex;
108
+ flex-direction: column;
109
+ gap: 12Px;
110
+ align-items: flex-end;
111
+
112
+ &--hidden {
113
+ display: none;
114
+ }
115
+ }
116
+
117
+ &--placement-left &-list,
118
+ &--placement-right &-list {
119
+ flex-direction: column;
120
+ }
121
+
122
+ /** 小程序点击外部关闭:全屏遮罩;极淡背景避免部分机型不响应 tap */
123
+ &-weapp-outside-mask {
124
+ background: rgba(0, 0, 0, 0.001);
125
+ }
126
+ }
@@ -1,15 +1,17 @@
1
1
  import { Rule } from 'rc-field-form/lib/interface';
2
2
  import React, { FC } from 'react';
3
+ import { FormHorizontalAlign } from "@trionesdev/antd-mobile-base-react";
3
4
  type FormItemInputProps = {
4
5
  children?: React.ReactElement;
5
6
  className?: string;
6
7
  name?: string;
7
8
  rules?: Rule[];
8
9
  initialValue?: any;
10
+ wrapperAlign?: FormHorizontalAlign;
9
11
  valuePropName?: string;
10
12
  errors?: React.ReactNode[];
11
13
  errorRender?: (errors?: any[]) => React.ReactNode;
12
14
  hiddenError?: boolean;
13
15
  };
14
- export declare const FormItemInput: FC<FormItemInputProps>;
16
+ export declare const FormItemContent: FC<FormItemInputProps>;
15
17
  export {};
@@ -6,9 +6,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import classNames from 'classnames';
8
8
  import { isEmpty } from 'lodash-es';
9
- import { Field } from 'rc-field-form';
10
9
  import React, { useState } from 'react';
11
- export var FormItemInput = function FormItemInput(_ref) {
10
+ import { Field } from "@trionesdev/antd-mobile-base-react";
11
+ export var FormItemContent = function FormItemContent(_ref) {
12
12
  var children = _ref.children,
13
13
  className = _ref.className,
14
14
  name = _ref.name,
@@ -6,27 +6,21 @@ import React from "react";
6
6
  import classNames from "classnames";
7
7
  import { isFunction } from "lodash-es";
8
8
  import { useFormContext } from "@trionesdev/antd-mobile-base-react";
9
- import { useTaro } from "../../hooks";
10
9
  export var FormItemLabel = function FormItemLabel(_ref) {
11
10
  var className = _ref.className,
12
11
  style = _ref.style,
13
12
  label = _ref.label,
14
13
  layout = _ref.layout,
15
14
  required = _ref.required;
16
- var _useTaro = useTaro(),
17
- isTaroWeApp = _useTaro.isTaroWeApp,
18
- isTaroWeb = _useTaro.isTaroWeb;
19
15
  var _useFormContext = useFormContext(),
20
16
  requiredMark = _useFormContext.requiredMark,
21
17
  colon = _useFormContext.colon;
22
18
  var clsPrefix = "triones-antm-form-item-label";
23
19
  return /*#__PURE__*/React.createElement("div", {
24
- className: classNames(className, {
25
- required: "".concat(clsPrefix, "-required")
26
- }),
20
+ className: classNames(className, _defineProperty({}, "".concat(clsPrefix, "-required"), required)),
27
21
  style: style
28
22
  }, /*#__PURE__*/React.createElement("div", {
29
- className: classNames("".concat(clsPrefix, "-wrapper"), _defineProperty(_defineProperty({}, "h5", isTaroWeb), "wx", isTaroWeApp))
23
+ className: classNames("".concat(clsPrefix, "-wrapper"))
30
24
  }, required && /*#__PURE__*/React.createElement("div", {
31
25
  className: "".concat(clsPrefix, "-required-mark")
32
26
  }, isFunction(requiredMark) ? requiredMark(label, {
@@ -1,14 +1,15 @@
1
1
  import React, { CSSProperties, FC, ReactElement, ReactNode } from "react";
2
2
  import { NamePath, Rule } from "rc-field-form/lib/interface";
3
- import { FormItemLayout, FormLayoutAlign } from "@trionesdev/antd-mobile-base-react";
3
+ import { FormItemLayout, FormHorizontalAlign } from "@trionesdev/antd-mobile-base-react";
4
4
  export type FormItemProps = {
5
5
  className?: string;
6
6
  style?: CSSProperties;
7
7
  children?: ReactElement;
8
8
  layout?: FormItemLayout;
9
9
  label?: ReactNode;
10
- labelAlign?: FormLayoutAlign;
10
+ labelAlign?: FormHorizontalAlign;
11
11
  labelWidth?: number;
12
+ contentAlign?: FormHorizontalAlign;
12
13
  name?: NamePath;
13
14
  required?: boolean;
14
15
  hidden?: boolean;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["className", "style", "children", "layout", "label", "labelAlign", "labelWidth", "name", "required", "hidden", "noStyle", "rules", "initialValue", "valuePropName", "errorRender", "extra"];
2
+ var _excluded = ["className", "style", "children", "layout", "label", "labelAlign", "labelWidth", "contentAlign", "name", "required", "hidden", "noStyle", "rules", "initialValue", "valuePropName", "errorRender", "extra"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
@@ -8,10 +8,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
8
8
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
9
  import React from "react";
10
10
  import { FormItemLabel } from "./form-item-label";
11
- import { FormItemInput } from "./form-item-input";
11
+ import { FormItemContent } from "./form-item-content";
12
12
  import classNames from "classnames";
13
- import { Field } from "rc-field-form";
14
- import { useFormContext } from "@trionesdev/antd-mobile-base-react";
13
+ import { Field, useFormContext } from "@trionesdev/antd-mobile-base-react";
14
+ import { useTaro } from "../../hooks";
15
15
  export var FormItem = function FormItem(_ref) {
16
16
  var className = _ref.className,
17
17
  style = _ref.style,
@@ -20,6 +20,7 @@ export var FormItem = function FormItem(_ref) {
20
20
  label = _ref.label,
21
21
  labelAlign = _ref.labelAlign,
22
22
  labelWidth = _ref.labelWidth,
23
+ contentAlign = _ref.contentAlign,
23
24
  name = _ref.name,
24
25
  required = _ref.required,
25
26
  _ref$hidden = _ref.hidden,
@@ -32,42 +33,45 @@ export var FormItem = function FormItem(_ref) {
32
33
  errorRender = _ref.errorRender,
33
34
  extra = _ref.extra,
34
35
  props = _objectWithoutProperties(_ref, _excluded);
35
- var _useFormContext = useFormContext(),
36
- formLayout = _useFormContext.layout,
37
- formLayoutAlign = _useFormContext.labelAlign,
38
- formLabelWidth = _useFormContext.labelWidth,
39
- hiddenError = _useFormContext.hiddenError,
40
- formExtra = _useFormContext.extra;
41
- var formItemLayout = layout ? layout : formLayout === 'inline' ? 'horizontal' : formLayout;
42
- var formItemAlign = labelAlign ? labelAlign : formLayoutAlign || 'left';
43
- var formItemLabelWidth = labelWidth ? labelWidth : formLabelWidth;
44
- var itemExtra = extra !== undefined ? extra : formExtra;
36
+ var _useTaro = useTaro(),
37
+ isTaroWeApp = _useTaro.isTaroWeApp,
38
+ isTaroWeb = _useTaro.isTaroWeb;
39
+ // const { layout: formLayout, labelAlign: formLayoutAlign, labelWidth: formLabelWidth, hiddenError, extra: formExtra } = useFormContext()
40
+ var ctx = useFormContext();
41
+ var formItemLayout = layout ? layout : ctx.layout === 'inline' ? 'horizontal' : ctx.layout;
42
+ var formItemAlign = labelAlign ? labelAlign : ctx.labelAlign || 'left';
43
+ var formItemLabelWidth = labelWidth ? labelWidth : ctx.labelWidth;
44
+ var formItemExtra = extra !== undefined ? extra : ctx.extra;
45
+ var formItemWrapperAlign = contentAlign ? contentAlign : ctx.contentAlign;
45
46
  var clsPrefix = "triones-antm-form-item";
46
47
  if (noStyle) {
47
48
  return /*#__PURE__*/React.createElement(Field, {
48
49
  name: name,
49
50
  rules: rules,
51
+ valuePropName: valuePropName,
50
52
  trigger: 'onChange',
51
53
  initialValue: initialValue
52
54
  }, children);
53
55
  }
54
56
  return /*#__PURE__*/React.createElement("div", {
55
- className: classNames(clsPrefix, "".concat(clsPrefix, "-").concat(formItemLayout), className, _defineProperty({}, "".concat(clsPrefix, "-hidden"), hidden)),
57
+ className: classNames(clsPrefix, "".concat(clsPrefix, "-").concat(formItemLayout), className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(clsPrefix, "-hidden"), hidden), "h5", isTaroWeb), "wx", isTaroWeApp)),
56
58
  style: style
57
59
  }, label && /*#__PURE__*/React.createElement(FormItemLabel, {
58
60
  className: classNames("".concat(clsPrefix, "-label"), "".concat(clsPrefix, "-label-").concat(formItemAlign)),
59
61
  style: {
60
62
  width: formItemLabelWidth
61
63
  },
64
+ layout: formItemLayout,
62
65
  label: label,
63
66
  required: required
64
- }), /*#__PURE__*/React.createElement(FormItemInput, _extends({
65
- className: "".concat(clsPrefix, "-input")
67
+ }), /*#__PURE__*/React.createElement(FormItemContent, _extends({
68
+ className: classNames("".concat(clsPrefix, "-content"), "".concat(clsPrefix, "-content-").concat(formItemWrapperAlign))
66
69
  }, props, {
67
70
  name: name,
68
71
  rules: rules,
69
72
  errorRender: errorRender,
70
73
  initialValue: initialValue,
71
- hiddenError: hiddenError
72
- }), children), formExtra);
74
+ valuePropName: valuePropName,
75
+ hiddenError: ctx.hiddenError
76
+ }), children), formItemExtra);
73
77
  };
@@ -1,4 +1,4 @@
1
- import { Form as InternalForm, FormProps } from "@trionesdev/antd-mobile-base-react";
1
+ import { Form as InternalForm, FormProps, FormInstance } from "@trionesdev/antd-mobile-base-react";
2
2
  import FormItem, { FormItemProps } from "./FormItem";
3
3
  import "./style.scss";
4
4
  type InternalFormType = typeof InternalForm;
@@ -6,5 +6,5 @@ type CompoundedComponent = InternalFormType & {
6
6
  Item: typeof FormItem;
7
7
  };
8
8
  declare const Form: CompoundedComponent;
9
- export type { FormProps, FormItemProps };
9
+ export type { FormProps, FormItemProps, FormInstance };
10
10
  export default Form;
@@ -1,78 +1,100 @@
1
- @use "../style/variable" as variable;
2
-
3
- $cls-prefix-form: 'triones-antm-form';
4
- $cls-prefix-form-item: 'triones-antm-form-item';
5
-
6
- .#{$cls-prefix-form} {
7
- }
8
-
9
- .#{$cls-prefix-form-item} {
10
-
11
- &-label {
12
- font-size: variable.$trionesFontSize;
13
- padding-block: 4Px;
14
- color: #6F6F6F;
15
-
16
-
17
- &-wrapper {
18
- display: flex;
19
- align-items: center;
20
-
21
- &.h5 {
22
- @include variable.h5-input-size;
23
- }
24
-
25
- &.wx {
26
- @include variable.h5-input-size;
27
- }
28
- }
29
-
30
- &-left {
31
- }
32
-
33
- &-right {
34
- text-align: right;
35
- }
36
-
37
- &-required-mark {
38
- display: inline-block;
39
- color: red;
40
- margin-right: 4Px;
41
- }
42
-
43
- }
44
-
45
- &-input {
46
-
47
- .#{$cls-prefix-form-item} {
48
- &-error {
49
- font-size: variable.$trionesFontSizeSm;
50
- color: red;
51
- }
52
- }
53
- }
54
-
55
- &-horizontal {
56
- display: flex;
57
-
58
- .#{$cls-prefix-form-item} {
59
- &-label {
60
- flex-shrink: 1;
61
- min-width: 0;
62
- }
63
-
64
- &-input {
65
- flex: 1;
66
- flex-shrink: 1;
67
- min-width: 0;
68
- display: flex;
69
- flex-direction: column;
70
- justify-content: center;
71
- }
72
- }
73
- }
74
-
75
- &-hidden {
76
- display: none;
77
- }
78
- }
1
+ @use "../style/variable" as variable;
2
+
3
+
4
+ $cls-prefix-form-item: 'triones-antm-form-item';
5
+
6
+
7
+ .#{$cls-prefix-form-item} {
8
+ &.h5 {
9
+ @include variable.h5-line-height;
10
+ }
11
+
12
+ &.wx {
13
+ @include variable.wx-input-size;
14
+ }
15
+
16
+ &-label {
17
+ font-size: variable.$trionesFontSize;
18
+ color: #6F6F6F;
19
+
20
+
21
+ &-wrapper {
22
+ //display: flex;
23
+ //align-items: center;
24
+ height: 100%;
25
+ }
26
+
27
+ &-required-mark {
28
+ display: inline-block;
29
+ color: variable.$trionesColorError;
30
+ width: 8Px;
31
+ margin-left: -8Px;
32
+ }
33
+
34
+ }
35
+
36
+ &-content {
37
+
38
+ &-end {
39
+ text-align: end;
40
+ }
41
+
42
+ .#{$cls-prefix-form-item} {
43
+ &-error {
44
+ font-size: variable.$trionesFontSizeSm;
45
+ color: variable.$trionesColorError;
46
+ line-height: normal;
47
+ }
48
+ }
49
+ }
50
+
51
+ &-horizontal {
52
+ display: flex;
53
+
54
+ .#{$cls-prefix-form-item} {
55
+ &-label {
56
+ padding-block: 12Px;
57
+ flex-shrink: 1;
58
+ min-width: 0;
59
+ }
60
+
61
+ &-content {
62
+ padding-block: 12Px;
63
+ flex: 1;
64
+ flex-shrink: 1;
65
+ min-width: 0;
66
+
67
+ &-end {
68
+ text-align: end;
69
+ }
70
+ }
71
+ }
72
+
73
+ &.#{$cls-prefix-form-item} {
74
+ &-start {
75
+ align-items: flex-start;
76
+ }
77
+
78
+ &-center {
79
+ //align-items: center;
80
+ }
81
+ }
82
+ }
83
+
84
+ &-vertical {
85
+ .#{$cls-prefix-form-item} {
86
+ &-label {
87
+ margin-bottom: 4Px;
88
+ }
89
+
90
+ &-content {
91
+ padding-block-end: 8Px;
92
+ }
93
+ }
94
+
95
+ }
96
+
97
+ &-hidden {
98
+ display: none;
99
+ }
100
+ }
@@ -0,0 +1,3 @@
1
+ import { FormCell, FormCellProps } from '@trionesdev/antd-mobile-base-react';
2
+ export type { FormCellProps };
3
+ export default FormCell;
@@ -0,0 +1,2 @@
1
+ import { FormCell } from '@trionesdev/antd-mobile-base-react';
2
+ export default FormCell;