shineout 3.8.0-beta.19 → 3.8.0-beta.20

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.
@@ -2,11 +2,15 @@ import { FormFieldProps as UiFormFieldProps, FormFieldSetProps as UiFormFieldSet
2
2
  /**
3
3
  * @title FormRef
4
4
  * @sort 6
5
+ * @en Form reference object that provides a series of methods to operate the form. After obtaining the instance through ref or useForm, you can actively control the form's validation, submission, reset and other behaviors
6
+ * @cn 表单引用对象,提供了一系列操作表单的方法。通过 ref 或 useForm 获取实例后,可以主动控制表单的校验、提交、重置等行为
5
7
  */
6
8
  export type FormRef<T> = UiFormRef<T>;
7
9
  /**
8
10
  * @title FormDatum
9
11
  * @sort 7
12
+ * @en Form data management object, used to manage the internal data state and validation logic of the form
13
+ * @cn 表单数据管理对象,用于管理表单内部的数据状态和校验逻辑
10
14
  */
11
15
  export type FormDatum = UiFormDatum;
12
16
  /**
@@ -15,34 +19,42 @@ export type FormDatum = UiFormDatum;
15
19
  */
16
20
  export interface FormProps<T extends ObjectType> extends Omit<UiFormProps<T>, 'jssStyle'> {
17
21
  /**
18
- * @en Form value
19
- * @cn 表单数据
22
+ * @en When set, the form becomes a controlled component and needs to be used with onChange. Suitable for scenarios where external management of form state is required, such as sharing form data across components, real-time synchronization of form data to state managers, etc.
23
+ * @cn 设置后表单变为受控组件,需要配合 onChange 使用。适用于需要外部管理表单状态的场景,如跨组件共享表单数据、实时同步表单数据到状态管理器等
20
24
  * @override object
21
25
  */
22
26
  value?: T;
23
27
  /**
24
- * @en callback function, executed when the value is changing
25
- * @cn 表单内组件值变化函数
28
+ * @en Must be set in controlled mode to update external state. Triggered whenever any field value in the form changes, with the parameter being the latest data of the entire form
29
+ * @cn 在受控模式下必须设置此函数来更新外部状态。每当表单内任意字段值改变时都会触发,参数为整个表单的最新数据
26
30
  */
27
31
  onChange?: (value: T) => void;
28
32
  }
29
33
  /**
30
34
  * @title Form.Item
31
35
  * @sort 2
36
+ * @en Form item component, used to wrap form controls and provide label, error tips and other functions. Each form control should be wrapped with Form.Item to properly display labels and validation information
37
+ * @cn 表单项组件,用于包装表单控件并提供标签、错误提示等功能。每个表单控件都应该被 Form.Item 包裹,以便正确显示标签和校验信息
32
38
  */
33
39
  export type FormItemProps = Omit<UiFormItemProps, 'jssStyle'>;
34
40
  /**
35
41
  * @title Form.Field
36
42
  * @sort 3
43
+ * @en Form field component for creating custom form controls. Provides form data binding, validation and other functions, suitable for encapsulating complex custom form components
44
+ * @cn 表单字段组件,用于创建自定义的表单控件。提供了表单数据绑定、校验等功能,适用于封装复杂的自定义表单组件
37
45
  */
38
46
  export type FormFieldProps<T> = UiFormFieldProps<T>;
39
47
  /**
40
48
  * @title Form.FieldSet
41
49
  * @sort 4
50
+ * @en Form field set component for managing a group of related form fields. Suitable for handling object or array type form data, such as dynamic form lists, nested objects and other complex scenarios
51
+ * @cn 表单字段集组件,用于管理一组相关的表单字段。适用于处理对象或数组类型的表单数据,如动态表单列表、嵌套对象等复杂场景
42
52
  */
43
53
  export type FormFieldSetProps<T> = UiFormFieldSetProps<T>;
44
54
  /**
45
55
  * @title Form.Flow
46
56
  * @sort 5
57
+ * @en Form flow component for listening to form data changes and executing corresponding side effects. Suitable for implementing form linkage, conditional rendering and other scenarios
58
+ * @cn 表单流程组件,用于监听表单数据变化并执行相应的副作用。适用于实现表单联动、条件渲染等场景
47
59
  */
48
60
  export type FormFlowProps = UiFormFlowProps;
package/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.8.0-beta.19'
525
+ version: '3.8.0-beta.20'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.8.0-beta.19');
12237
+ /* harmony default export */ var version = ('3.8.0-beta.20');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -28084,7 +28084,6 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
28084
28084
  color: src.textareaPlaceholderColor
28085
28085
  },
28086
28086
  width: '100%',
28087
- height: '100%',
28088
28087
  background: 'transparent',
28089
28088
  border: '0',
28090
28089
  margin: '0',
@@ -28101,6 +28100,9 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
28101
28100
  scrollbarColor: "".concat(src.inputBorderColor, " transparent"),
28102
28101
  '&$resize': {
28103
28102
  resize: 'vertical'
28103
+ },
28104
+ '&:not($shadow)': {
28105
+ minHeight: '-webkit-fill-available'
28104
28106
  }
28105
28107
  },
28106
28108
  resize: {
@@ -61512,6 +61514,7 @@ function getStaticTop(el) {
61512
61514
  return top;
61513
61515
  }
61514
61516
  var Sticky = function Sticky(props) {
61517
+ var _props$style;
61515
61518
  if (props.target) {
61516
61519
  sticky_devUseWarning.deprecated('target', 'scrollContainer', 'Sticky');
61517
61520
  }
@@ -61956,9 +61959,8 @@ var Sticky = function Sticky(props) {
61956
61959
  }
61957
61960
  var StickyEl = show && parentVisible ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
61958
61961
  style: objectSpread2_default()(objectSpread2_default()({
61959
- zIndex: defaultZIndex
61962
+ zIndex: ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.zIndex) || defaultZIndex
61960
61963
  }, style), elementSize),
61961
- ref: fixedStickyElRef,
61962
61964
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
61963
61965
  className: props.className,
61964
61966
  style: props.style,
@@ -65047,8 +65049,12 @@ var tfoot_isArray = isArray,
65047
65049
  }, index);
65048
65050
  };
65049
65051
  var getTrs = function getTrs() {
65050
- var _props$summary = props.summary,
65051
- summary = _props$summary === void 0 ? [] : _props$summary;
65052
+ var _props$summary, _props$data;
65053
+ if (props !== null && props !== void 0 && (_props$summary = props.summary) !== null && _props$summary !== void 0 && _props$summary.length && (props === null || props === void 0 || (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) === 0) {
65054
+ return [];
65055
+ }
65056
+ var _props$summary2 = props.summary,
65057
+ summary = _props$summary2 === void 0 ? [] : _props$summary2;
65052
65058
  if (!tfoot_isArray(summary[0])) {
65053
65059
  summary = [summary];
65054
65060
  }
@@ -65498,7 +65504,8 @@ var emptyRef = {
65498
65504
  summary: props.summary,
65499
65505
  columns: columns,
65500
65506
  jssStyle: props.jssStyle,
65501
- colgroup: colgroup
65507
+ colgroup: colgroup,
65508
+ data: props.data
65502
65509
  };
65503
65510
  var StickyWrapper = props.sticky ? src_sticky_sticky : (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment;
65504
65511
  var sticky = typeof_default()(props.sticky) === 'object' ? props.sticky : {
@@ -72239,7 +72246,7 @@ var upload_interface = __webpack_require__(8821);
72239
72246
 
72240
72247
 
72241
72248
  /* harmony default export */ var src_0 = ({
72242
- version: '3.8.0-beta.19'
72249
+ version: '3.8.0-beta.20'
72243
72250
  });
72244
72251
  }();
72245
72252
  /******/ return __webpack_exports__;