@sheinx/base 3.6.0-beta.19 → 3.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"animation-list.d.ts","sourceRoot":"","sources":["animation-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAe3D,QAAA,MAAM,aAAa,UAAW,kBAAkB,4CAyP/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"animation-list.d.ts","sourceRoot":"","sources":["animation-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAe3D,QAAA,MAAM,aAAa,UAAW,kBAAkB,4CA8P/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -84,6 +84,7 @@ var AnimationList = function AnimationList(props) {
84
84
  }
85
85
  if (type.indexOf('scale-y') >= 0) {
86
86
  transition.push("transform ".concat(durationNum, "ms ease-in-out"));
87
+ transition.push("opacity ".concat(durationNum, "ms ease-in-out"));
87
88
  }
88
89
  if (type.indexOf('collapse') >= 0) {
89
90
  transition.push("height ".concat(durationNum, "ms ease-in-out"));
@@ -132,6 +133,7 @@ var AnimationList = function AnimationList(props) {
132
133
  }
133
134
  if (type.includes('scale-y')) {
134
135
  newStyle.transform = 'scaleY(0)';
136
+ newStyle.opacity = 0;
135
137
  }
136
138
  setStyle(function (s) {
137
139
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -149,6 +151,7 @@ var AnimationList = function AnimationList(props) {
149
151
  }
150
152
  if (type.includes('scale-y')) {
151
153
  newStyle.transform = 'scaleY(1)';
154
+ newStyle.opacity = 1;
152
155
  }
153
156
  setStyle(function (s) {
154
157
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -180,6 +183,7 @@ var AnimationList = function AnimationList(props) {
180
183
  }
181
184
  if (type.includes('scale-y')) {
182
185
  newStyle.transform = 'scaleY(1)';
186
+ newStyle.opacity = 1;
183
187
  }
184
188
  setStyle(function (s) {
185
189
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -198,6 +202,7 @@ var AnimationList = function AnimationList(props) {
198
202
  }
199
203
  if (type.includes('scale-y')) {
200
204
  newStyle.transform = 'scaleY(0)';
205
+ newStyle.opacity = 0;
201
206
  }
202
207
  setStyle(function (s) {
203
208
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -294,7 +294,7 @@ var DatePicker = function DatePicker(props0) {
294
294
  onRef: popupRef,
295
295
  className: (0, _classnames.default)(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper),
296
296
  display: 'block',
297
- type: 'fade',
297
+ type: 'scale-y',
298
298
  duration: 'fast',
299
299
  show: open,
300
300
  onMouseDown: preventDefault,
@@ -1 +1 @@
1
- {"version":3,"file":"thead-filter.d.ts","sourceRoot":"","sources":["thead-filter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAoC,MAAM,eAAe,CAAC;AAOlG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA8B5C,UAAU,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,GAAG,gBAAgB,CAAC;IAC/F,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CA8HnD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CA2EnD,CAAC"}
1
+ {"version":3,"file":"thead-filter.d.ts","sourceRoot":"","sources":["thead-filter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAoC,MAAM,eAAe,CAAC;AAOlG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA8B5C,UAAU,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,GAAG,gBAAgB,CAAC;IAC/F,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CA8HnD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CAuFnD,CAAC"}
@@ -199,6 +199,7 @@ var FilterSearch = exports.FilterSearch = function FilterSearch(props) {
199
199
  _useState8 = _slicedToArray(_useState7, 2),
200
200
  tempValue = _useState8[0],
201
201
  setTempValue = _useState8[1];
202
+ var inputRef = (0, _react.useRef)(null);
202
203
  var onReset = function onReset() {
203
204
  setTempValue(undefined);
204
205
  props.onFilterChange(props.columnKey, undefined);
@@ -213,6 +214,15 @@ var FilterSearch = exports.FilterSearch = function FilterSearch(props) {
213
214
  if (!visible) {
214
215
  props.onFilterChange(props.columnKey, tempValue);
215
216
  }
217
+
218
+ // 打开时自动focus input
219
+ if (visible) {
220
+ setTimeout(function () {
221
+ if (inputRef.current) {
222
+ inputRef.current.focus();
223
+ }
224
+ }, 100);
225
+ }
216
226
  setPopoverVisible(visible);
217
227
  };
218
228
  var currentFilter = (_props$filterInfo2 = props.filterInfo) === null || _props$filterInfo2 === void 0 ? void 0 : _props$filterInfo2.get(props.columnKey);
@@ -252,7 +262,8 @@ var FilterSearch = exports.FilterSearch = function FilterSearch(props) {
252
262
  }),
253
263
  value: tempValue,
254
264
  onChange: setTempValue,
255
- onEnterPress: onConfirm
265
+ onEnterPress: onConfirm,
266
+ forwardRef: inputRef
256
267
  })
257
268
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFooter, {
258
269
  jssStyle: props.jssStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"animation-list.d.ts","sourceRoot":"","sources":["animation-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAe3D,QAAA,MAAM,aAAa,UAAW,kBAAkB,4CAyP/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"animation-list.d.ts","sourceRoot":"","sources":["animation-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAe3D,QAAA,MAAM,aAAa,UAAW,kBAAkB,4CA8P/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -76,6 +76,7 @@ var AnimationList = function AnimationList(props) {
76
76
  }
77
77
  if (type.indexOf('scale-y') >= 0) {
78
78
  transition.push("transform ".concat(durationNum, "ms ease-in-out"));
79
+ transition.push("opacity ".concat(durationNum, "ms ease-in-out"));
79
80
  }
80
81
  if (type.indexOf('collapse') >= 0) {
81
82
  transition.push("height ".concat(durationNum, "ms ease-in-out"));
@@ -124,6 +125,7 @@ var AnimationList = function AnimationList(props) {
124
125
  }
125
126
  if (type.includes('scale-y')) {
126
127
  newStyle.transform = 'scaleY(0)';
128
+ newStyle.opacity = 0;
127
129
  }
128
130
  setStyle(function (s) {
129
131
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -141,6 +143,7 @@ var AnimationList = function AnimationList(props) {
141
143
  }
142
144
  if (type.includes('scale-y')) {
143
145
  newStyle.transform = 'scaleY(1)';
146
+ newStyle.opacity = 1;
144
147
  }
145
148
  setStyle(function (s) {
146
149
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -172,6 +175,7 @@ var AnimationList = function AnimationList(props) {
172
175
  }
173
176
  if (type.includes('scale-y')) {
174
177
  newStyle.transform = 'scaleY(1)';
178
+ newStyle.opacity = 1;
175
179
  }
176
180
  setStyle(function (s) {
177
181
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -190,6 +194,7 @@ var AnimationList = function AnimationList(props) {
190
194
  }
191
195
  if (type.includes('scale-y')) {
192
196
  newStyle.transform = 'scaleY(0)';
197
+ newStyle.opacity = 0;
193
198
  }
194
199
  setStyle(function (s) {
195
200
  return _objectSpread(_objectSpread({}, s), newStyle);
@@ -287,7 +287,7 @@ var DatePicker = function DatePicker(props0) {
287
287
  onRef: popupRef,
288
288
  className: classNames(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper),
289
289
  display: 'block',
290
- type: 'fade',
290
+ type: 'scale-y',
291
291
  duration: 'fast',
292
292
  show: open,
293
293
  onMouseDown: preventDefault,
@@ -1 +1 @@
1
- {"version":3,"file":"thead-filter.d.ts","sourceRoot":"","sources":["thead-filter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAoC,MAAM,eAAe,CAAC;AAOlG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA8B5C,UAAU,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,GAAG,gBAAgB,CAAC;IAC/F,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CA8HnD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CA2EnD,CAAC"}
1
+ {"version":3,"file":"thead-filter.d.ts","sourceRoot":"","sources":["thead-filter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAoC,MAAM,eAAe,CAAC;AAOlG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA8B5C,UAAU,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,GAAG,gBAAgB,CAAC;IAC/F,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CA8HnD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,gBAAgB,4CAuFnD,CAAC"}
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useEffect, useState } from 'react';
13
+ import React, { useEffect, useRef, useState } from 'react';
14
14
  import classnames from 'classnames';
15
15
  import { useFilter, util } from '@sheinx/hooks';
16
16
  import Icons from "../icons";
@@ -191,6 +191,7 @@ export var FilterSearch = function FilterSearch(props) {
191
191
  _useState8 = _slicedToArray(_useState7, 2),
192
192
  tempValue = _useState8[0],
193
193
  setTempValue = _useState8[1];
194
+ var inputRef = useRef(null);
194
195
  var onReset = function onReset() {
195
196
  setTempValue(undefined);
196
197
  props.onFilterChange(props.columnKey, undefined);
@@ -205,6 +206,15 @@ export var FilterSearch = function FilterSearch(props) {
205
206
  if (!visible) {
206
207
  props.onFilterChange(props.columnKey, tempValue);
207
208
  }
209
+
210
+ // 打开时自动focus input
211
+ if (visible) {
212
+ setTimeout(function () {
213
+ if (inputRef.current) {
214
+ inputRef.current.focus();
215
+ }
216
+ }, 100);
217
+ }
208
218
  setPopoverVisible(visible);
209
219
  };
210
220
  var currentFilter = (_props$filterInfo2 = props.filterInfo) === null || _props$filterInfo2 === void 0 ? void 0 : _props$filterInfo2.get(props.columnKey);
@@ -244,7 +254,8 @@ export var FilterSearch = function FilterSearch(props) {
244
254
  }),
245
255
  value: tempValue,
246
256
  onChange: setTempValue,
247
- onEnterPress: onConfirm
257
+ onEnterPress: onConfirm,
258
+ forwardRef: inputRef
248
259
  })
249
260
  }), /*#__PURE__*/_jsx(FilterFooter, {
250
261
  jssStyle: props.jssStyle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.6.0-beta.19",
3
+ "version": "3.6.0-beta.20",
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.6.0-beta.19",
13
+ "@sheinx/hooks": "3.6.0-beta.20",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"