@nutui/nutui-react 1.1.4-beta.2 → 1.1.4-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.
@@ -7,12 +7,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
7
7
 
8
8
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
9
 
10
- import React__default, { createContext, useState, useRef, useContext, useEffect } from 'react';
10
+ import React__default, { useState, useRef, useContext, useEffect } from 'react';
11
+ import { A as AvatarContext } from './AvatarContext-7153ad2b.js';
11
12
  import { c as cn } from './bem-893ad28d.js';
12
13
  import classNames from 'classnames';
13
14
  import Icon from './Icon.js';
14
15
  import '@bem-react/classname';
15
- var AvatarContext = createContext({});
16
16
  var defaultProps = {
17
17
  size: '',
18
18
  icon: '',
@@ -0,0 +1,3 @@
1
+ import { createContext } from 'react';
2
+ var AvatarContext = createContext({});
3
+ export { AvatarContext as A };
@@ -0,0 +1,2 @@
1
+
2
+ require('../../../packages/avatargroup/avatargroup.scss')
@@ -0,0 +1,50 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ import React__default, { useRef } from 'react';
8
+ import { A as AvatarContext } from './AvatarContext-7153ad2b.js';
9
+ import { c as cn } from './bem-893ad28d.js';
10
+ import classNames from 'classnames';
11
+ import { useConfig } from './ConfigProvider.js';
12
+ import '@bem-react/classname';
13
+ var defaultProps = {
14
+ maxContent: '',
15
+ maxCount: '',
16
+ maxBgColor: '#eee',
17
+ maxColor: '#666',
18
+ size: '',
19
+ shape: '',
20
+ span: '-8',
21
+ zIndex: 'left'
22
+ };
23
+
24
+ var AvatarGroup = function AvatarGroup(props) {
25
+ useConfig();
26
+
27
+ var propAvatarGroup = _objectSpread(_objectSpread({}, defaultProps), props);
28
+
29
+ var className = propAvatarGroup.className,
30
+ style = propAvatarGroup.style,
31
+ children = propAvatarGroup.children;
32
+ var avatarGroupRef = useRef(null);
33
+ var b = cn('avatar-group');
34
+ var cls = classNames(b(''), className);
35
+ var parentAvatar = {
36
+ propAvatarGroup: propAvatarGroup,
37
+ avatarGroupRef: avatarGroupRef
38
+ };
39
+ return React__default.createElement(AvatarContext.Provider, {
40
+ value: parentAvatar
41
+ }, React__default.createElement("div", {
42
+ className: cls,
43
+ style: style,
44
+ ref: avatarGroupRef
45
+ }, children));
46
+ };
47
+
48
+ AvatarGroup.defaultProps = defaultProps;
49
+ AvatarGroup.displayName = 'NutAvatarGroup';
50
+ export { AvatarGroup as default };
@@ -46,6 +46,7 @@ export { default as Step } from './Step.js';
46
46
  export { default as Swiper } from './Swiper.js';
47
47
  export { default as SwiperItem } from './SwiperItem.js';
48
48
  export { default as Avatar } from './Avatar.js';
49
+ export { default as AvatarGroup } from './AvatarGroup.js';
49
50
  export { default as Price } from './Price.js';
50
51
  export { default as Badge } from './Badge.js';
51
52
  export { default as Tag } from './Tag.js';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.1.4-beta.2 Fri May 20 2022 09:39:16 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.1.4-beta.3 Mon May 23 2022 14:48:01 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.1.4-beta.2 Fri May 20 2022 09:39:16 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.1.4-beta.3 Mon May 23 2022 14:48:01 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.1.4-beta.2 Fri May 20 2022 09:39:16 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.1.4-beta.3 Mon May 23 2022 14:48:01 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.1.4-beta.2 Fri May 20 2022 09:39:16 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.1.4-beta.3 Mon May 23 2022 14:48:01 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */