@dfds-ui/react-components 1.0.1 → 1.0.2-alpha.0411cbd6

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Shared react components within DFDS",
4
4
  "license": "MIT",
5
5
  "private": false,
6
- "version": "1.0.1",
6
+ "version": "1.0.2-alpha.0411cbd6",
7
7
  "sideEffects": false,
8
8
  "main": "./cjs/index.js",
9
9
  "module": "./index.js",
@@ -18,13 +18,13 @@
18
18
  "react-select": "^4.0.0"
19
19
  },
20
20
  "dependencies": {
21
- "@dfds-ui/colors": "1.0.1",
22
- "@dfds-ui/fonts": "1.0.1",
23
- "@dfds-ui/hooks": "1.0.1",
24
- "@dfds-ui/icons": "1.0.1",
25
- "@dfds-ui/spacing": "1.0.1",
26
- "@dfds-ui/theme": "1.0.1",
27
- "@dfds-ui/typography": "1.0.1",
21
+ "@dfds-ui/colors": "1.0.2-alpha.0411cbd6",
22
+ "@dfds-ui/fonts": "1.0.2-alpha.0411cbd6",
23
+ "@dfds-ui/hooks": "1.0.2-alpha.0411cbd6",
24
+ "@dfds-ui/icons": "1.0.2-alpha.0411cbd6",
25
+ "@dfds-ui/spacing": "1.0.2-alpha.0411cbd6",
26
+ "@dfds-ui/theme": "1.0.2-alpha.0411cbd6",
27
+ "@dfds-ui/typography": "1.0.2-alpha.0411cbd6",
28
28
  "@kunukn/react-collapse": "^2.2.9",
29
29
  "@material-ui/core": "^4.12.3",
30
30
  "@material-ui/lab": "4.0.0-alpha.60",
@@ -34,7 +34,7 @@
34
34
  "react-hook-intersection-observer": "^0.1.0",
35
35
  "uuid": "^3.3.2"
36
36
  },
37
- "gitHead": "7ebfbfcc17bc141b77a22298567f4690f4a4f031",
37
+ "gitHead": "0411cbd60ec263978759db86dd8da62320a73e5c",
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  }
package/tab/typings.d.js CHANGED
@@ -0,0 +1 @@
1
+ //declare module 'use-resize-observer/polyfilled'
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Intent } from '../../common/intent';
3
- declare type BannerActionContextProps = {
4
- variant: 'default' | 'inverted';
5
- intent: Intent;
6
- };
7
- export declare const BannerActionContext: React.Context<BannerActionContextProps>;
8
- export declare const BannerActionContextProvider: React.FC<{
9
- value: BannerActionContextProps;
10
- }>;
11
- declare const useBannerActionContext: () => BannerActionContextProps;
12
- export default useBannerActionContext;
@@ -1,25 +0,0 @@
1
- import React, { createContext, useContext } from 'react';
2
- import { jsx as ___EmotionJSX } from "@emotion/react";
3
- export var BannerActionContext = /*#__PURE__*/createContext({
4
- variant: 'inverted',
5
- intent: 'critical'
6
- });
7
- export var BannerActionContextProvider = function BannerActionContextProvider(_ref) {
8
- var children = _ref.children,
9
- value = _ref.value;
10
- return ___EmotionJSX(BannerActionContext.Provider, {
11
- value: value
12
- }, children);
13
- };
14
-
15
- var useBannerActionContext = function useBannerActionContext() {
16
- var context = useContext(BannerActionContext);
17
-
18
- if (context === undefined) {
19
- throw new Error('useBannerActionContext must be used within BannerAction component.');
20
- }
21
-
22
- return context;
23
- };
24
-
25
- export default useBannerActionContext;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Intent } from '../../common/intent';
3
- declare type BannerActionContextProps = {
4
- variant: 'default' | 'inverted';
5
- intent: Intent;
6
- };
7
- export declare const BannerActionContext: React.Context<BannerActionContextProps>;
8
- export declare const BannerActionContextProvider: React.FC<{
9
- value: BannerActionContextProps;
10
- }>;
11
- declare const useBannerActionContext: () => BannerActionContextProps;
12
- export default useBannerActionContext;
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.BannerActionContextProvider = exports.BannerActionContext = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _react2 = require("@emotion/react");
11
-
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
-
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
-
16
- const BannerActionContext = /*#__PURE__*/(0, _react.createContext)({
17
- variant: 'inverted',
18
- intent: 'critical'
19
- });
20
- exports.BannerActionContext = BannerActionContext;
21
-
22
- const BannerActionContextProvider = ({
23
- children,
24
- value
25
- }) => {
26
- return (0, _react2.jsx)(BannerActionContext.Provider, {
27
- value: value
28
- }, children);
29
- };
30
-
31
- exports.BannerActionContextProvider = BannerActionContextProvider;
32
-
33
- const useBannerActionContext = () => {
34
- const context = (0, _react.useContext)(BannerActionContext);
35
-
36
- if (context === undefined) {
37
- throw new Error('useBannerActionContext must be used within BannerAction component.');
38
- }
39
-
40
- return context;
41
- };
42
-
43
- var _default = useBannerActionContext;
44
- exports.default = _default;