@balena/ui-shared-components 0.5.0 → 0.5.1

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.
@@ -50,6 +50,7 @@ export var Default = {
50
50
  title: 'Marketing',
51
51
  description: 'We use cookies to get marketing info from the traffic in our platform',
52
52
  value: false,
53
+ required: true,
53
54
  },
54
55
  analytics: {
55
56
  title: 'Analytics',
@@ -5,6 +5,7 @@ export interface Cookie {
5
5
  title: string;
6
6
  description: string;
7
7
  value: boolean;
8
+ required?: boolean;
8
9
  }
9
10
  export interface CookiesBannerProps {
10
11
  show: boolean;
@@ -48,6 +48,6 @@ export var CookiesBanner = function (_a) {
48
48
  }
49
49
  return (_jsx(Drawer, __assign({ anchor: "bottom", open: show, disableEscapeKeyDown: true }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", p: 4 }, { children: [showCustomizeView ? (_jsx(Box, __assign({ display: "flex", flexDirection: "column" }, { children: Object.entries(cookies).map(function (_a) {
50
50
  var key = _a[0], cookie = _a[1];
51
- return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 3 }, { children: [_jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: "90%" }, { children: [_jsx(Typography, __assign({ variant: "h5" }, { children: cookie.title })), _jsx(Typography, __assign({ variant: "body1" }, { children: cookie.description }))] })), _jsx(Box, __assign({ display: "flex" }, { children: _jsx(Switch, { checked: cookie.value, onChange: function (_event, checked) { return handleOnChange(checked, key); } }) }))] }), key));
51
+ return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 3 }, { children: [_jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: "90%" }, { children: [_jsx(Typography, __assign({ variant: "h5" }, { children: cookie.title })), _jsx(Typography, __assign({ variant: "body1" }, { children: cookie.description }))] })), _jsx(Box, __assign({ display: "flex" }, { children: _jsx(Switch, { checked: cookie.value, onChange: function (_event, checked) { return handleOnChange(checked, key); }, disabled: cookie.required }) }))] }), key));
52
52
  }) }))) : (_jsx(Box, __assign({ display: "flex", justifyContent: "center" }, { children: _jsxs(Typography, __assign({ variant: "body1" }, { children: ["We use cookies to enhance your browsing experience and analyze our traffic. By clicking \"Accept All\" you consent to our use of cookies. Read more about our", ' ', _jsx(Link, __assign({ href: "https://www.balena.io/privacy-policy", target: "_blank" }, { children: "privacy policy" })), "."] })) }))), _jsxs(Box, __assign({ display: "flex", mt: 4, ml: "auto", justifyContent: "space-around", width: "400px" }, { children: [_jsx(Button, __assign({ variant: "outlined", onClick: handleReject }, { children: "Reject all" })), _jsx(Button, __assign({ variant: "outlined", onClick: function () { return setShowCustomizeView(!showCustomizeView); } }, { children: showCustomizeView ? 'Back' : 'Customize' })), _jsx(Button, __assign({ variant: "contained", onClick: handleSaveOrAcceptAll }, { children: showCustomizeView ? 'Save selection' : 'Accept all' }))] }))] })) })));
53
53
  };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export { AnimatedText } from './components/AnimatedText';
4
4
  export type { ButtonWithTrackingProps } from './components/ButtonWithTracking';
5
5
  export { ButtonWithTracking } from './components/ButtonWithTracking';
6
6
  export { Code } from './components/Code';
7
+ export type { CookiesBannerProps } from './components/CookiesBanner';
8
+ export { CookiesBanner } from './components/CookiesBanner';
7
9
  export type { CollapsedListProps } from './components/CollapsedList';
8
10
  export { CollapsedList } from './components/CollapsedList';
9
11
  export type { CustomHelmetProps } from './components/CustomHelmet';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export { theme } from './theme';
2
2
  export { AnimatedText } from './components/AnimatedText';
3
3
  export { ButtonWithTracking } from './components/ButtonWithTracking';
4
4
  export { Code } from './components/Code';
5
+ export { CookiesBanner } from './components/CookiesBanner';
5
6
  export { CollapsedList } from './components/CollapsedList';
6
7
  export { CustomHelmet } from './components/CustomHelmet';
7
8
  export { DropDownButton } from './components/DropDownButton';
@@ -29,6 +29,7 @@ export var Default = {
29
29
  title: 'Marketing',
30
30
  description: 'We use cookies to get marketing info from the traffic in our platform',
31
31
  value: false,
32
+ required: true,
32
33
  },
33
34
  analytics: {
34
35
  title: 'Analytics',
@@ -5,6 +5,7 @@ export interface Cookie {
5
5
  title: string;
6
6
  description: string;
7
7
  value: boolean;
8
+ required?: boolean;
8
9
  }
9
10
  export interface CookiesBannerProps {
10
11
  show: boolean;
@@ -38,6 +38,6 @@ export var CookiesBanner = function (_a) {
38
38
  }
39
39
  return (_jsx(Drawer, __assign({ anchor: "bottom", open: show, disableEscapeKeyDown: true }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", p: 4 }, { children: [showCustomizeView ? (_jsx(Box, __assign({ display: "flex", flexDirection: "column" }, { children: Object.entries(cookies).map(function (_a) {
40
40
  var key = _a[0], cookie = _a[1];
41
- return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 3 }, { children: [_jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: "90%" }, { children: [_jsx(Typography, __assign({ variant: "h5" }, { children: cookie.title })), _jsx(Typography, __assign({ variant: "body1" }, { children: cookie.description }))] })), _jsx(Box, __assign({ display: "flex" }, { children: _jsx(Switch, { checked: cookie.value, onChange: function (_event, checked) { return handleOnChange(checked, key); } }) }))] }), key));
41
+ return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 3 }, { children: [_jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: "90%" }, { children: [_jsx(Typography, __assign({ variant: "h5" }, { children: cookie.title })), _jsx(Typography, __assign({ variant: "body1" }, { children: cookie.description }))] })), _jsx(Box, __assign({ display: "flex" }, { children: _jsx(Switch, { checked: cookie.value, onChange: function (_event, checked) { return handleOnChange(checked, key); }, disabled: cookie.required }) }))] }), key));
42
42
  }) }))) : (_jsx(Box, __assign({ display: "flex", justifyContent: "center" }, { children: _jsxs(Typography, __assign({ variant: "body1" }, { children: ["We use cookies to enhance your browsing experience and analyze our traffic. By clicking \"Accept All\" you consent to our use of cookies. Read more about our", ' ', _jsx(Link, __assign({ href: "https://www.balena.io/privacy-policy", target: "_blank" }, { children: "privacy policy" })), "."] })) }))), _jsxs(Box, __assign({ display: "flex", mt: 4, ml: "auto", justifyContent: "space-around", width: "400px" }, { children: [_jsx(Button, __assign({ variant: "outlined", onClick: handleReject }, { children: "Reject all" })), _jsx(Button, __assign({ variant: "outlined", onClick: function () { return setShowCustomizeView(!showCustomizeView); } }, { children: showCustomizeView ? 'Back' : 'Customize' })), _jsx(Button, __assign({ variant: "contained", onClick: handleSaveOrAcceptAll }, { children: showCustomizeView ? 'Save selection' : 'Accept all' }))] }))] })) })));
43
43
  };
@@ -4,6 +4,8 @@ export { AnimatedText } from './components/AnimatedText';
4
4
  export type { ButtonWithTrackingProps } from './components/ButtonWithTracking';
5
5
  export { ButtonWithTracking } from './components/ButtonWithTracking';
6
6
  export { Code } from './components/Code';
7
+ export type { CookiesBannerProps } from './components/CookiesBanner';
8
+ export { CookiesBanner } from './components/CookiesBanner';
7
9
  export type { CollapsedListProps } from './components/CollapsedList';
8
10
  export { CollapsedList } from './components/CollapsedList';
9
11
  export type { CustomHelmetProps } from './components/CustomHelmet';
@@ -2,6 +2,7 @@ export { theme } from './theme';
2
2
  export { AnimatedText } from './components/AnimatedText';
3
3
  export { ButtonWithTracking } from './components/ButtonWithTracking';
4
4
  export { Code } from './components/Code';
5
+ export { CookiesBanner } from './components/CookiesBanner';
5
6
  export { CollapsedList } from './components/CollapsedList';
6
7
  export { CustomHelmet } from './components/CustomHelmet';
7
8
  export { DropDownButton } from './components/DropDownButton';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist_esm5/index.js",
6
6
  "sideEffects": false,
@@ -100,6 +100,6 @@
100
100
  },
101
101
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
102
102
  "versionist": {
103
- "publishedAt": "2023-09-07T14:09:10.861Z"
103
+ "publishedAt": "2023-09-07T14:48:39.841Z"
104
104
  }
105
105
  }