@homecode/ui 4.27.0 → 4.27.2

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.
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+
3
+ var _path;
4
+ 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); }
5
+ var SvgApple = function SvgApple(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "0 0 24 24"
9
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "evenodd",
12
+ d: "M15.649 4c.865-1 1.447-2.395 1.288-3.783-1.246.047-2.753.795-3.646 1.795-.801.888-1.502 2.307-1.313 3.668 1.389.103 2.807-.676 3.67-1.678m3.117 8.81c.035 3.588 3.284 4.782 3.32 4.797-.026.084-.52 1.7-1.712 3.373-1.032 1.443-2.102 2.88-3.79 2.912-1.655.03-2.19-.941-4.084-.941s-2.486.91-4.054.97c-1.628.059-2.868-1.562-3.908-3-2.126-2.944-3.75-8.32-1.57-11.946 1.085-1.8 3.02-2.942 5.124-2.97 1.598-.03 3.107 1.03 4.084 1.03s2.81-1.275 4.739-1.088c.807.032 3.072.312 4.526 2.352-.117.07-2.703 1.512-2.674 4.51"
13
+ })));
14
+ };
15
+
16
+ export { SvgApple as default };
@@ -0,0 +1,18 @@
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 SvgGithub = function SvgGithub(props) {
5
+ return /*#__PURE__*/React.createElement("svg", _extends({
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ viewBox: "0 0 24 24"
8
+ }, props), /*#__PURE__*/React.createElement("path", {
9
+ fill: "currentColor",
10
+ fillRule: "evenodd",
11
+ d: "M12.085.104A11.957 11.968 0 0 1 23.882 12.23a11.957 11.968 0 0 1-8.09 11.53c-.598.119-.798-.28-.798-.6v-3.31c0-1.157-.398-1.875-.797-2.274 2.63-.28 5.42-1.317 5.42-5.984a4.783 4.787 0 0 0-1.235-3.271 3.986 3.99 0 0 0-.12-3.192s-.996-.319-3.228 1.197a11.957 11.968 0 0 0-5.979 0C6.863 4.811 5.867 5.21 5.867 5.21a3.986 3.99 0 0 0-.12 3.191 4.783 4.787 0 0 0-1.195 3.232c0 4.667 2.75 5.704 5.38 5.984a2.79 2.793 0 0 0-.757 1.635c-.717.32-2.431.838-3.468-1.037 0 0-.637-1.197-1.833-1.237 0 0-1.156 0-.08.719 0 0 .797.398 1.316 1.795 0 0 .677 2.154 3.985 1.436v2.234c0 .319-.199.718-.797.598a11.957 11.968 0 0 1-8.09-11.529A11.957 11.968 0 0 1 12.044.104",
12
+ style: {
13
+ strokeWidth: 39.8753
14
+ }
15
+ }));
16
+ };
17
+
18
+ export { SvgGithub as default };
@@ -0,0 +1,42 @@
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 SvgGoogle = function SvgGoogle(props) {
5
+ return /*#__PURE__*/React.createElement("svg", _extends({
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: 24,
8
+ height: 24,
9
+ preserveAspectRatio: "xMidYMid",
10
+ viewBox: "-3 0 7.86 7.86"
11
+ }, props), /*#__PURE__*/React.createElement("path", {
12
+ fill: "#4285f4",
13
+ d: "M12.052 8.96c0-.716-.051-1.239-.162-1.78H4.68v3.23h4.232c-.086.802-.546 2.011-1.57 2.823l-.015.109 2.28 2.001.158.018c1.45-1.518 2.287-3.752 2.287-6.402",
14
+ style: {
15
+ strokeWidth: 0.0626224
16
+ },
17
+ transform: "matrix(.51004 0 0 .44168 -1.376 .066)"
18
+ }), /*#__PURE__*/React.createElement("path", {
19
+ fill: "#34a853",
20
+ d: "M4.68 17.47c2.073 0 3.814-.775 5.085-2.109l-2.423-2.128c-.649.513-1.52.87-2.662.87-2.031 0-3.755-1.517-4.37-3.616l-.09.009-2.37 2.079-.03.098c1.262 2.843 3.856 4.796 6.86 4.796",
21
+ style: {
22
+ strokeWidth: 0.0626224
23
+ },
24
+ transform: "matrix(.51004 0 0 .44168 -1.376 .066)"
25
+ }), /*#__PURE__*/React.createElement("path", {
26
+ fill: "#fbbc05",
27
+ d: "M.31 10.487a6 6 0 0 1-.255-1.721c0-.6.094-1.18.247-1.722L.298 6.93l-2.4-2.112-.079.042A9.7 9.7 0 0 0-3 8.766a9.7 9.7 0 0 0 .82 3.907z",
28
+ style: {
29
+ strokeWidth: 0.0626224
30
+ },
31
+ transform: "matrix(.51004 0 0 .44168 -1.376 .066)"
32
+ }), /*#__PURE__*/React.createElement("path", {
33
+ fill: "#eb4335",
34
+ d: "M4.68 3.428c1.442 0 2.414.706 2.969 1.296l2.167-2.399C8.486.923 6.753.062 4.68.062 1.676.062-.918 2.016-2.18 4.86L.301 7.044C.925 4.946 2.65 3.428 4.68 3.428",
35
+ style: {
36
+ strokeWidth: 0.0626224
37
+ },
38
+ transform: "matrix(.51004 0 0 .44168 -1.376 .066)"
39
+ }));
40
+ };
41
+
42
+ export { SvgGoogle as default };
@@ -1,5 +1,6 @@
1
1
  var ICONS = {
2
2
  attach: () => import('./attach.svg.js'),
3
+ apple: () => import('./apple.svg.js'),
3
4
  arrowRight: () => import('./arrowRight.svg.js'),
4
5
  arrowLeft: () => import('./arrowLeft.svg.js'),
5
6
  arrowUp: () => import('./arrowUp.svg.js'),
@@ -41,7 +42,9 @@ var ICONS = {
41
42
  gear: () => import('./gear.svg.js'),
42
43
  geolocation: () => import('./geolocation.svg.js'),
43
44
  globe: () => import('./globe.svg.js'),
45
+ google: () => import('./google.svg.js'),
44
46
  group: () => import('./group.svg.js'),
47
+ github: () => import('./github.svg.js'),
45
48
  history: () => import('./history.svg.js'),
46
49
  image: () => import('./image.svg.js'),
47
50
  instagram: () => import('./instagram.svg.js'),
@@ -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
- autohide: [],
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.autohide !== false) {
22
- this.autohide.push(id);
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.autohide.forEach(id => {
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.autohide, id);
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, autohide, data } = STORE;
50
- if (paused || autohide.length === 0) {
48
+ const { paused, autoHide, data } = STORE;
49
+ if (paused || autoHide.length === 0) {
51
50
  return;
52
51
  }
53
- const id = autohide[0]; // TODO: move trough all autohide until some will !readyToHide
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) {
@@ -1,5 +1,6 @@
1
1
  declare const _default: {
2
2
  attach: () => Promise<any>;
3
+ apple: () => Promise<any>;
3
4
  arrowRight: () => Promise<any>;
4
5
  arrowLeft: () => Promise<any>;
5
6
  arrowUp: () => Promise<any>;
@@ -41,7 +42,9 @@ declare const _default: {
41
42
  gear: () => Promise<any>;
42
43
  geolocation: () => Promise<any>;
43
44
  globe: () => Promise<any>;
45
+ google: () => Promise<any>;
44
46
  group: () => Promise<any>;
47
+ github: () => Promise<any>;
45
48
  history: () => Promise<any>;
46
49
  image: () => Promise<any>;
47
50
  instagram: () => Promise<any>;
@@ -4,6 +4,7 @@ export type ItemParams = {
4
4
  type?: NotificationType;
5
5
  title?: string;
6
6
  content?: string;
7
+ autoHide?: boolean;
7
8
  };
8
9
  export type Methods = {
9
10
  show: (data: ItemParams) => Id;
@@ -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
- autohide: string[];
4
+ autoHide: string[];
4
5
  data: {};
5
6
  paused: boolean;
6
- show(data: any): any;
7
+ show(data: ItemParams): any;
7
8
  pause(): void;
8
9
  unpause(): void;
9
10
  close(id: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",