@homecode/ui 4.27.1 → 4.27.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.
- package/dist/esm/src/components/Icon/icons/index.js +1 -0
- package/dist/esm/src/components/Icon/icons/mic.svg.js +1 -1
- package/dist/esm/src/components/Icon/icons/micMuted.svg.js +27 -0
- package/dist/esm/src/components/Notifications/store.js +8 -9
- package/dist/esm/src/components/Router/store.js +1 -1
- package/dist/esm/types/src/components/Icon/icons/index.d.ts +1 -0
- package/dist/esm/types/src/components/Notifications/Notifications.types.d.ts +1 -0
- package/dist/esm/types/src/components/Notifications/store.d.ts +3 -2
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ var ICONS = {
|
|
|
57
57
|
map: () => import('./map.svg.js'),
|
|
58
58
|
menu: () => import('./menu.svg.js'),
|
|
59
59
|
mic: () => import('./mic.svg.js'),
|
|
60
|
+
micMuted: () => import('./micMuted.svg.js'),
|
|
60
61
|
minus: () => import('./minus.svg.js'),
|
|
61
62
|
moreVertical: () => import('./moreVertical.svg.js'),
|
|
62
63
|
moreHorizontal: () => import('./moreHorizontal.svg.js'),
|
|
@@ -8,7 +8,7 @@ var SvgMic = function SvgMic(props) {
|
|
|
8
8
|
fill: "currentColor",
|
|
9
9
|
viewBox: "0 0 48 48"
|
|
10
10
|
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
d: "M24.05
|
|
11
|
+
d: "M24.05 30.785q-2.511 0-4.203-1.805-1.695-1.805-1.693-4.383V7.944q0-2.432 1.718-4.135 1.719-1.703 4.174-1.703t4.178 1.703q1.722 1.703 1.722 4.135v16.653q0 2.58-1.693 4.383-1.694 1.806-4.203 1.805m-1.752 15.689v-7.94q-6.188-.642-10.39-5.195c-2.803-3.036-4.204-8.68-4.204-10.742s3.503-1.77 3.503 0 1.25 6.519 3.753 8.932q3.753 3.62 9.077 3.62 5.325 0 9.09-3.62c2.51-2.413 3.766-7.161 3.766-8.932 0-1.77 3.503-2.063 3.503 0s-1.401 7.706-4.204 10.742q-4.203 4.553-10.39 5.195v7.94z"
|
|
12
12
|
})));
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
var SvgMicMuted = function SvgMicMuted(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
viewBox: "0 0 48 48"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
d: "M24.034 30.91q-2.511 0-4.203-1.805t-1.693-4.383V8.069c0-1.621.589-3.125 1.734-4.26q1.719-1.703 4.174-1.703t4.178 1.703c1.148 1.135 1.706 2.639 1.706 4.26v16.653c0 .186.001.557-.08.765-.027.071-11.088-11.504-11.667-12.118-.075-.08-.04 2.104-.038 2.296.028 2.828 9.535 9.996 11.103 12.02.35.45-.598.98-1.01 1.42q-1.695 1.806-4.204 1.805m-1.736 15.564-.016-7.815q-6.187-.642-10.39-5.195c-2.803-3.036-4.188-8.805-4.188-10.867s3.487-1.645 3.487.125 1.25 6.519 3.753 8.932q3.753 3.62 9.077 3.62 5.325 0 9.09-3.62c.076-.073.146-.297.225-.226.052.047 2.286 2.438 2.403 2.489.047.02 1.132-1.06 1.095-1.117-.317-.49-2.388-2.5-2.27-2.65 2.002-2.546 2.313-5.845 2.313-7.428 0-1.77 3.503-2.063 3.503 0s-.709 7.048-3.512 10.084-6.957 5.425-11.082 5.853l.016 7.815z",
|
|
11
|
+
style: {
|
|
12
|
+
strokeWidth: 7.2
|
|
13
|
+
}
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "m7.535 6.98 33.241 34.645",
|
|
16
|
+
style: {
|
|
17
|
+
stroke: "currentColor",
|
|
18
|
+
strokeWidth: 3.7728,
|
|
19
|
+
strokeLinecap: "round",
|
|
20
|
+
strokeLinejoin: "round",
|
|
21
|
+
strokeDasharray: "none",
|
|
22
|
+
strokeOpacity: 1
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SvgMicMuted as default };
|
|
@@ -7,7 +7,7 @@ import C from './Notifications.constants.json.js';
|
|
|
7
7
|
const SHOW_TIME = 5000;
|
|
8
8
|
const STORE = createStore('notifications', {
|
|
9
9
|
items: [],
|
|
10
|
-
|
|
10
|
+
autoHide: [],
|
|
11
11
|
data: {},
|
|
12
12
|
paused: false,
|
|
13
13
|
show(data) {
|
|
@@ -18,9 +18,8 @@ const STORE = createStore('notifications', {
|
|
|
18
18
|
createdAt: Date.now(),
|
|
19
19
|
};
|
|
20
20
|
Time.after(C.ANIMATION_DURATION, () => (this.data[id].visible = true));
|
|
21
|
-
if (data.
|
|
22
|
-
this.
|
|
23
|
-
}
|
|
21
|
+
if (data.autoHide !== false)
|
|
22
|
+
this.autoHide.push(id);
|
|
24
23
|
return id;
|
|
25
24
|
},
|
|
26
25
|
pause() {
|
|
@@ -29,7 +28,7 @@ const STORE = createStore('notifications', {
|
|
|
29
28
|
},
|
|
30
29
|
unpause() {
|
|
31
30
|
const pauseTime = Date.now() - this.pausedAt;
|
|
32
|
-
this.
|
|
31
|
+
this.autoHide.forEach(id => {
|
|
33
32
|
this.data[id].createdAt += pauseTime;
|
|
34
33
|
});
|
|
35
34
|
this.paused = false;
|
|
@@ -39,18 +38,18 @@ const STORE = createStore('notifications', {
|
|
|
39
38
|
Time.after(C.ANIMATION_DURATION, () => this.remove(id));
|
|
40
39
|
},
|
|
41
40
|
remove(id) {
|
|
42
|
-
spliceWhere(this.
|
|
41
|
+
spliceWhere(this.autoHide, id);
|
|
43
42
|
spliceWhere(this.items, id);
|
|
44
43
|
delete this.data[id];
|
|
45
44
|
},
|
|
46
45
|
});
|
|
47
46
|
// worker
|
|
48
47
|
Time.every(50, function tick() {
|
|
49
|
-
const { paused,
|
|
50
|
-
if (paused ||
|
|
48
|
+
const { paused, autoHide, data } = STORE;
|
|
49
|
+
if (paused || autoHide.length === 0) {
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
const id =
|
|
52
|
+
const id = autoHide[0]; // TODO: move trough all autoHide until some will !readyToHide
|
|
54
53
|
const item = data[id];
|
|
55
54
|
const readyToHide = Date.now() - item.createdAt > SHOW_TIME;
|
|
56
55
|
if (item.visible && readyToHide) {
|
|
@@ -49,7 +49,7 @@ function onRouteChange(path = window.location.pathname) {
|
|
|
49
49
|
STORE.queryString = location.search;
|
|
50
50
|
STORE.query = parseQueryParams();
|
|
51
51
|
STORE.path = path.replace(/\?.+/, '') || '/';
|
|
52
|
-
LISTENERS.forEach(cb => cb(STORE.path));
|
|
52
|
+
LISTENERS.forEach(cb => cb(STORE.path, STORE.query));
|
|
53
53
|
}
|
|
54
54
|
function updateRouteState() {
|
|
55
55
|
if (STORE.path !== window.location.pathname ||
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ItemParams } from './Notifications.types';
|
|
1
2
|
declare const STORE: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
2
3
|
items: string[];
|
|
3
|
-
|
|
4
|
+
autoHide: string[];
|
|
4
5
|
data: {};
|
|
5
6
|
paused: boolean;
|
|
6
|
-
show(data:
|
|
7
|
+
show(data: ItemParams): any;
|
|
7
8
|
pause(): void;
|
|
8
9
|
unpause(): void;
|
|
9
10
|
close(id: any): void;
|