@sima-land/ui-nucleons 45.0.0-alpha.6 → 45.0.0-alpha.7
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.
- package/avatar/avatar.d.ts +8 -0
- package/avatar/avatar.js +26 -0
- package/avatar/avatar.js.map +1 -0
- package/avatar/avatar.module.scss +13 -36
- package/avatar/index.d.ts +3 -30
- package/avatar/index.js +8 -41
- package/avatar/index.js.map +1 -1
- package/avatar/types.d.ts +18 -0
- package/avatar/types.js +3 -0
- package/avatar/types.js.map +1 -0
- package/avatar/utils.d.ts +28 -4
- package/avatar/utils.js +76 -13
- package/avatar/utils.js.map +1 -1
- package/avatar/utils.module.scss +9 -0
- package/button/button-util.scss +46 -0
- package/button/button.module.scss +17 -26
- package/button/index.d.ts +12 -2
- package/button/index.js +1 -1
- package/button/index.js.map +1 -1
- package/colors/index.d.ts +6 -4
- package/colors/index.js +6 -3
- package/colors/index.js.map +1 -1
- package/colors.scss +2 -0
- package/expandable/expandable-group.module.scss +1 -5
- package/expandable/index.d.ts +4 -34
- package/expandable/index.js +77 -30
- package/expandable/index.js.map +1 -1
- package/expandable/types.d.ts +39 -0
- package/expandable/types.js +3 -0
- package/expandable/types.js.map +1 -0
- package/expandable/utils.d.ts +22 -23
- package/expandable/utils.js +65 -80
- package/expandable/utils.js.map +1 -1
- package/package.json +1 -1
- package/styling/colors.d.ts +5 -5
- package/avatar/user.d.ts +0 -10
- package/avatar/user.js +0 -41
- package/avatar/user.js.map +0 -1
package/avatar/user.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserAvatar = exports.colorKey = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const lodash_1 = require("lodash");
|
|
7
|
-
const _1 = require(".");
|
|
8
|
-
const COLORS = [
|
|
9
|
-
'additional-deep-red',
|
|
10
|
-
'additional-red',
|
|
11
|
-
'additional-teal',
|
|
12
|
-
'additional-green',
|
|
13
|
-
'additional-light-green',
|
|
14
|
-
'additional-amber',
|
|
15
|
-
'additional-purple',
|
|
16
|
-
'additional-violet',
|
|
17
|
-
'additional-deep-purple',
|
|
18
|
-
'additional-electric-blue',
|
|
19
|
-
'additional-light-blue',
|
|
20
|
-
'additional-cyan',
|
|
21
|
-
'additional-blue-gray',
|
|
22
|
-
'additional-deep-orange',
|
|
23
|
-
];
|
|
24
|
-
exports.colorKey = Symbol.for('user-avatar:color-key');
|
|
25
|
-
/**
|
|
26
|
-
* Компонент аватара пользователя (не сотрудника).
|
|
27
|
-
* @param props Свойства. Поддерживаются свойства Avatar.
|
|
28
|
-
* @return Элемент.
|
|
29
|
-
*/
|
|
30
|
-
function UserAvatar(props) {
|
|
31
|
-
const [color, setColor] = (0, react_1.useState)();
|
|
32
|
-
(0, react_1.useEffect)(() => {
|
|
33
|
-
const source = window;
|
|
34
|
-
// запоминаем цвет (пока только один для всех аватаров на странице)
|
|
35
|
-
source[exports.colorKey] = source[exports.colorKey] || (0, lodash_1.sample)(COLORS);
|
|
36
|
-
setColor(source[exports.colorKey]);
|
|
37
|
-
}, []);
|
|
38
|
-
return (0, jsx_runtime_1.jsx)(_1.Avatar, { ...props, bgColor: color, bgOpacity: color ? 0.48 : 0, textColor: 'basic-white' });
|
|
39
|
-
}
|
|
40
|
-
exports.UserAvatar = UserAvatar;
|
|
41
|
-
//# sourceMappingURL=user.js.map
|
package/avatar/user.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/avatar/user.tsx"],"names":[],"mappings":";;;;AAAA,iCAA4C;AAC5C,mCAAgC;AAChC,wBAAwC;AAKxC,MAAM,MAAM,GAAyB;IACnC,qBAAqB;IACrB,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,wBAAwB;IACxB,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,wBAAwB;IACxB,0BAA0B;IAC1B,uBAAuB;IACvB,iBAAiB;IACjB,sBAAsB;IACtB,wBAAwB;CACzB,CAAC;AAEW,QAAA,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAE5D;;;;GAIG;AACH,SAAgB,UAAU,CAAC,KAAsB;IAC/C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,GAA2B,CAAC;IAE9D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,MAAM,GAAQ,MAAM,CAAC;QAE3B,mEAAmE;QACnE,MAAM,CAAC,gBAAQ,CAAC,GAAG,MAAM,CAAC,gBAAQ,CAAC,IAAI,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC;QAEtD,QAAQ,CAAC,MAAM,CAAC,gBAAQ,CAAC,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,uBAAC,SAAM,OAAK,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAC,aAAa,GAAG,CAAC;AACpG,CAAC;AAbD,gCAaC"}
|