@sheinx/base 3.5.6-beta.1 → 3.5.6-beta.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAarD,QAAA,MAAM,KAAK,4EA8HV,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAarD,QAAA,MAAM,KAAK,4EA+HV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -130,6 +130,7 @@ var Group = function Group(props0) {
130
130
  checked: datum.check(d),
131
131
  disabled: datum.disabledCheck(d),
132
132
  htmlValue: i,
133
+ size: size,
133
134
  onChange: handleIndexChange,
134
135
  renderRadio: renderRadio,
135
136
  children: getContent(d, i)
@@ -1 +1 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,QAAA,MAAM,MAAM,uEAqaX,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,QAAA,MAAM,MAAM,uEA4aX,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -360,6 +360,13 @@ var Result = function Result(props) {
360
360
  }
361
361
  mounted.current = true;
362
362
  }, [focus, placeholder, multiple]);
363
+
364
+ // Select多选模式下,且开启了onFilter,自动聚焦
365
+ (0, _react.useLayoutEffect)(function () {
366
+ if (multiple && focus && inputRef !== null && inputRef !== void 0 && inputRef.current) {
367
+ inputRef.current.focus();
368
+ }
369
+ }, [focus, multiple]);
363
370
  (0, _react.useLayoutEffect)(function () {
364
371
  handleResetMore();
365
372
  }, [valueProp, data]);
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAarD,QAAA,MAAM,KAAK,4EA8HV,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAarD,QAAA,MAAM,KAAK,4EA+HV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { useInputAble, useListSelectSingle, usePersistFn, util } from '@sheinx/hooks';
8
- import groupContext from "./group-context";
8
+ import GroupContext from "./group-context";
9
9
  import Radio from "./radio";
10
10
  import React, { useContext } from 'react';
11
11
  import classNames from 'classnames';
@@ -113,7 +113,7 @@ var Group = function Group(props0) {
113
113
  disabled: disabled
114
114
  });
115
115
  var groupClass = classNames(className, radioClasses === null || radioClasses === void 0 ? void 0 : radioClasses.group, !!block && (radioClasses === null || radioClasses === void 0 ? void 0 : radioClasses.groupBlock), !!button && (radioClasses === null || radioClasses === void 0 ? void 0 : radioClasses.groupButton));
116
- var Radios = props.data === undefined ? /*#__PURE__*/_jsx(groupContext.Provider, {
116
+ var Radios = props.data === undefined ? /*#__PURE__*/_jsx(GroupContext.Provider, {
117
117
  value: providerValue,
118
118
  children: children
119
119
  }) : /*#__PURE__*/_jsxs(_Fragment, {
@@ -123,6 +123,7 @@ var Group = function Group(props0) {
123
123
  checked: datum.check(d),
124
124
  disabled: datum.disabledCheck(d),
125
125
  htmlValue: i,
126
+ size: size,
126
127
  onChange: handleIndexChange,
127
128
  renderRadio: renderRadio,
128
129
  children: getContent(d, i)
@@ -1 +1 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,QAAA,MAAM,MAAM,uEAqaX,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,QAAA,MAAM,MAAM,uEA4aX,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -352,6 +352,13 @@ var Result = function Result(props) {
352
352
  }
353
353
  mounted.current = true;
354
354
  }, [focus, placeholder, multiple]);
355
+
356
+ // Select多选模式下,且开启了onFilter,自动聚焦
357
+ useLayoutEffect(function () {
358
+ if (multiple && focus && inputRef !== null && inputRef !== void 0 && inputRef.current) {
359
+ inputRef.current.focus();
360
+ }
361
+ }, [focus, multiple]);
355
362
  useLayoutEffect(function () {
356
363
  handleResetMore();
357
364
  }, [valueProp, data]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.5.6-beta.1",
3
+ "version": "3.5.6-beta.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.5.6-beta.1",
13
+ "@sheinx/hooks": "3.5.6-beta.3",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"