@via-profit/ui-kit 0.1.0-rc.30 → 0.1.0-rc.32

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.
@@ -43,14 +43,17 @@ const BaseModal = props => {
43
43
  window.document.body.appendChild(newNode);
44
44
  return newNode;
45
45
  }, []);
46
- react_1.default.useEffect(() => () => {
47
- if (typeof window !== 'undefined') {
48
- const node = window.document.body.querySelector(`#${context_1.PORTAL_ID}`);
49
- if (node) {
50
- node.remove();
51
- }
52
- }
53
- }, []);
46
+ // React.useEffect(
47
+ // () => () => {
48
+ // if (typeof window !== 'undefined') {
49
+ // const node = window.document.body.querySelector(`#${PORTAL_ID}`);
50
+ // if (node) {
51
+ // node.remove();
52
+ // }
53
+ // }
54
+ // },
55
+ // [],
56
+ // );
54
57
  return (react_1.default.createElement(NoSSR_1.default, null, domLoaded &&
55
58
  portalEl &&
56
59
  react_dom_1.default.createPortal(react_1.default.createElement(context_1.ContextProvider, { initialState: {
@@ -1,4 +1,8 @@
1
1
  /// <reference types="react" />
2
+ /**
3
+ * @deprecated - Use `Span` instead\
4
+ * Example: `import Span from '@via-profit/ui-kit/Span'`
5
+ */
2
6
  declare const Base: import("@emotion/styled").StyledComponent<{
3
7
  theme?: import("@emotion/react").Theme | undefined;
4
8
  as?: import("react").ElementType<any> | undefined;
@@ -4,6 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const styled_1 = __importDefault(require("@emotion/styled"));
7
+ /**
8
+ * @deprecated - Use `Span` instead\
9
+ * Example: `import Span from '@via-profit/ui-kit/Span'`
10
+ */
7
11
  const Base = styled_1.default.span `
8
12
  font-size: 1rem;
9
13
  font-weight: 300;
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const Del: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").DelHTMLAttributes<HTMLModElement>, HTMLModElement>, {}>;
6
- export default Del;
1
+ import React from 'react';
2
+ export type DelProps = React.DelHTMLAttributes<HTMLModElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<DelProps & React.RefAttributes<HTMLModElement>>;
4
+ export default _default;
package/Typography/Del.js CHANGED
@@ -1,11 +1,27 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const Del = styled_1.default.del `
19
+ const Styled = styled_1.default.del `
8
20
  font-size: 1em;
9
21
  color: currentColor;
10
22
  `;
11
- exports.default = Del;
23
+ const Em = (props, ref) => {
24
+ const { children } = props, nativeProps = __rest(props, ["children"]);
25
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
26
+ };
27
+ exports.default = react_1.default.forwardRef(Em);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const Em: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
6
- export default Em;
1
+ import React from 'react';
2
+ export type EmProps = React.HTMLAttributes<HTMLElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<EmProps & React.RefAttributes<HTMLElement>>;
4
+ export default _default;
package/Typography/Em.js CHANGED
@@ -1,11 +1,27 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const Em = styled_1.default.em `
19
+ const Styled = styled_1.default.em `
8
20
  font-size: 1em;
9
21
  color: currentColor;
10
22
  `;
11
- exports.default = Em;
23
+ const Em = (props, ref) => {
24
+ const { children } = props, nativeProps = __rest(props, ["children"]);
25
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
26
+ };
27
+ exports.default = react_1.default.forwardRef(Em);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const H1: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
6
- export default H1;
1
+ import React from 'react';
2
+ export type H1Props = React.HTMLAttributes<HTMLHeadingElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<H1Props & React.RefAttributes<HTMLHeadingElement>>;
4
+ export default _default;
package/Typography/H1.js CHANGED
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const H1 = styled_1.default.h1 `
19
+ const Styled = styled_1.default.h1 `
8
20
  font-size: 2rem;
9
21
  font-weight: 700;
10
22
  color: currentColor;
11
23
  `;
12
- exports.default = H1;
24
+ const H1 = (props, ref) => {
25
+ const { children } = props, nativeProps = __rest(props, ["children"]);
26
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
27
+ };
28
+ exports.default = react_1.default.forwardRef(H1);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const H2: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
6
- export default H2;
1
+ import React from 'react';
2
+ export type H2Props = React.HTMLAttributes<HTMLHeadingElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<H2Props & React.RefAttributes<HTMLHeadingElement>>;
4
+ export default _default;
package/Typography/H2.js CHANGED
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const H2 = styled_1.default.h2 `
19
+ const Styled = styled_1.default.h2 `
8
20
  font-size: 1.5rem;
9
21
  font-weight: 500;
10
22
  color: currentColor;
11
23
  `;
12
- exports.default = H2;
24
+ const H2 = (props, ref) => {
25
+ const { children } = props, nativeProps = __rest(props, ["children"]);
26
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
27
+ };
28
+ exports.default = react_1.default.forwardRef(H2);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const H3: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
6
- export default H3;
1
+ import React from 'react';
2
+ export type H3Props = React.HTMLAttributes<HTMLHeadingElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<H3Props & React.RefAttributes<HTMLHeadingElement>>;
4
+ export default _default;
package/Typography/H3.js CHANGED
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const H3 = styled_1.default.h3 `
19
+ const Styled = styled_1.default.h3 `
8
20
  font-size: 1.25rem;
9
21
  font-weight: 500;
10
22
  color: currentColor;
11
23
  `;
12
- exports.default = H3;
24
+ const H3 = (props, ref) => {
25
+ const { children } = props, nativeProps = __rest(props, ["children"]);
26
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
27
+ };
28
+ exports.default = react_1.default.forwardRef(H3);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const H4: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
6
- export default H4;
1
+ import React from 'react';
2
+ export type H4Props = React.HTMLAttributes<HTMLHeadingElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<H4Props & React.RefAttributes<HTMLHeadingElement>>;
4
+ export default _default;
package/Typography/H4.js CHANGED
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const H4 = styled_1.default.h4 `
19
+ const Styled = styled_1.default.h4 `
8
20
  font-size: 1.2rem;
9
21
  font-weight: 500;
10
22
  color: currentColor;
11
23
  `;
12
- exports.default = H4;
24
+ const H4 = (props, ref) => {
25
+ const { children } = props, nativeProps = __rest(props, ["children"]);
26
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
27
+ };
28
+ exports.default = react_1.default.forwardRef(H4);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const H5: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
6
- export default H5;
1
+ import React from 'react';
2
+ export type H5Props = React.HTMLAttributes<HTMLHeadingElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<H5Props & React.RefAttributes<HTMLHeadingElement>>;
4
+ export default _default;
package/Typography/H5.js CHANGED
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const H5 = styled_1.default.h5 `
19
+ const Styled = styled_1.default.h5 `
8
20
  font-size: 1.2rem;
9
21
  font-weight: 300;
10
22
  color: currentColor;
11
23
  `;
12
- exports.default = H5;
24
+ const H5 = (props, ref) => {
25
+ const { children } = props, nativeProps = __rest(props, ["children"]);
26
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
27
+ };
28
+ exports.default = react_1.default.forwardRef(H5);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const Span: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
6
- export default Span;
1
+ import React from 'react';
2
+ export type SpanProps = React.HTMLAttributes<HTMLSpanElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<SpanProps & React.RefAttributes<HTMLSpanElement>>;
4
+ export default _default;
@@ -1,11 +1,27 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const Span = styled_1.default.span `
19
+ const Styled = styled_1.default.span `
8
20
  font-size: 1em;
9
21
  color: currentColor;
10
22
  `;
11
- exports.default = Span;
23
+ const Span = (props, ref) => {
24
+ const { children } = props, nativeProps = __rest(props, ["children"]);
25
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
26
+ };
27
+ exports.default = react_1.default.forwardRef(Span);
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- declare const Strong: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
6
- export default Strong;
1
+ import React from 'react';
2
+ export type StrongProps = React.HTMLAttributes<HTMLElement>;
3
+ declare const _default: React.ForwardRefExoticComponent<StrongProps & React.RefAttributes<HTMLElement>>;
4
+ export default _default;
@@ -1,11 +1,27 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
6
18
  const styled_1 = __importDefault(require("@emotion/styled"));
7
- const Strong = styled_1.default.strong `
19
+ const Styled = styled_1.default.strong `
8
20
  font-size: 1em;
9
21
  color: currentColor;
10
22
  `;
11
- exports.default = Strong;
23
+ const Strong = (props, ref) => {
24
+ const { children } = props, nativeProps = __rest(props, ["children"]);
25
+ return (react_1.default.createElement(Styled, Object.assign({}, nativeProps, { ref: ref }), children));
26
+ };
27
+ exports.default = react_1.default.forwardRef(Strong);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@via-profit/ui-kit",
3
- "version": "0.1.0-rc.30",
3
+ "version": "0.1.0-rc.32",
4
4
  "description": "UI Kit",
5
5
  "repository": {
6
6
  "type": "git",