@uncinc/uncinc-react-kitchen-sink 2.8.4 → 2.8.9

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.
Files changed (34) hide show
  1. package/dist/components/Cookie/Checkbox/style.scss +0 -1
  2. package/dist/components/Dialog/DialogDrawerStory/index.d.ts +3 -0
  3. package/dist/components/Dialog/DialogDrawerStory/index.js +81 -0
  4. package/dist/components/Dialog/DialogDrawerStory/story.scss +39 -0
  5. package/dist/components/Dialog/DialogHookStory/index.js +63 -12
  6. package/dist/components/Dialog/index.d.ts +10 -0
  7. package/dist/components/Dialog/index.js +39 -8
  8. package/dist/components/Dialog/style.scss +1 -2
  9. package/dist/components/Download/index.d.ts +1 -1
  10. package/dist/components/GoogleConsentCookieBanner/Checkbox/index.d.ts +14 -0
  11. package/dist/components/GoogleConsentCookieBanner/Checkbox/index.js +29 -0
  12. package/dist/components/GoogleConsentCookieBanner/Checkbox/style.scss +40 -0
  13. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContents/index.d.ts +14 -0
  14. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContents/index.js +19 -0
  15. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContentsPartners/index.d.ts +14 -0
  16. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContentsPartners/index.js +23 -0
  17. package/dist/components/GoogleConsentCookieBanner/index.d.ts +15 -0
  18. package/dist/components/GoogleConsentCookieBanner/index.js +338 -0
  19. package/dist/components/GoogleConsentCookieBanner/style.scss +105 -0
  20. package/dist/components/GoogleConsentCookieBanner/types.d.ts +67 -0
  21. package/dist/components/GoogleConsentCookieBanner/types.js +22 -0
  22. package/dist/components/Icon/style.scss +53 -53
  23. package/dist/components/Pagination/index.d.ts +1 -1
  24. package/dist/components/SearchKit/SearchPage/index.js +1 -1
  25. package/dist/components/Tag/index.d.ts +5 -3
  26. package/dist/components/Tag/index.js +45 -19
  27. package/dist/components/Tag/style.scss +3 -3
  28. package/dist/config/i18next/locales/nl.json +33 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +3 -0
  31. package/dist/organisms/Downloads/index.d.ts +1 -1
  32. package/dist/organisms/Text/index.d.ts +3 -2
  33. package/dist/organisms/Text/index.js +3 -2
  34. package/package.json +13 -11
@@ -30,7 +30,6 @@
30
30
  // Checked
31
31
  &:checked ~ label:not(.no-styling) {
32
32
  &:before {
33
-
34
33
  background-position-y: -1em;
35
34
  }
36
35
  }
@@ -0,0 +1,3 @@
1
+ export function DialogHookStory(args: any): React.JSX.Element;
2
+ export default DialogHookStory;
3
+ import React from 'react';
@@ -0,0 +1,81 @@
1
+ var _excluded = ["forwardRef", "children"],
2
+ _excluded2 = ["children"];
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
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
+ import React from 'react';
7
+ import { motion, AnimatePresence, MotionConfig } from 'framer-motion';
8
+ import useDialog from '../../../hooks/useDialog';
9
+ import Icon from '../../Icon';
10
+ import './story.scss';
11
+ var Content = function Content(_ref) {
12
+ var closeDialog = _ref.closeDialog;
13
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
14
+ className: "Dialog__button_close",
15
+ type: "button",
16
+ onClick: function onClick() {
17
+ return closeDialog();
18
+ }
19
+ }, /*#__PURE__*/React.createElement(Icon, {
20
+ name: "close",
21
+ flair: "filled"
22
+ })), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "DialogComponent"), " - the Dialog component"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "dialogIsOpen"), " - a const which tells you if the dialog is open or closed"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "openDialog"), " - a function to open the dialog"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeDialog"), " - a function to close the dialog")));
23
+ };
24
+ var WrapperComponent = function WrapperComponent(_ref2) {
25
+ var forwardRef = _ref2.forwardRef,
26
+ children = _ref2.children,
27
+ props = _objectWithoutProperties(_ref2, _excluded);
28
+ return /*#__PURE__*/React.createElement(motion.div, _extends({}, props, {
29
+ initial: {
30
+ x: '100%'
31
+ },
32
+ animate: {
33
+ x: 0
34
+ },
35
+ exit: {
36
+ x: '100%'
37
+ },
38
+ ref: forwardRef
39
+ }), children);
40
+ };
41
+ var BackdropComponent = function BackdropComponent(_ref3) {
42
+ var children = _ref3.children,
43
+ props = _objectWithoutProperties(_ref3, _excluded2);
44
+ return /*#__PURE__*/React.createElement(motion.div, _extends({}, props, {
45
+ initial: {
46
+ opacity: 0
47
+ },
48
+ animate: {
49
+ opacity: 1
50
+ },
51
+ exit: {
52
+ opacity: 0
53
+ }
54
+ }), children);
55
+ };
56
+ export var DialogHookStory = function DialogHookStory(args) {
57
+ var _useDialog = useDialog(),
58
+ dialogIsOpen = _useDialog.dialogIsOpen,
59
+ openDialog = _useDialog.openDialog,
60
+ closeDialog = _useDialog.closeDialog,
61
+ DialogComponent = _useDialog.DialogComponent;
62
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
63
+ type: "button",
64
+ onClick: openDialog
65
+ }, "Open a dialog"), /*#__PURE__*/React.createElement(MotionConfig, {
66
+ transition: {
67
+ duration: 0.5,
68
+ ease: 'easeOut'
69
+ }
70
+ }, /*#__PURE__*/React.createElement(AnimatePresence, null, dialogIsOpen && /*#__PURE__*/React.createElement(DialogComponent, _extends({
71
+ className: "DialogDrawer",
72
+ dialogIsOpen: dialogIsOpen,
73
+ closeDialog: closeDialog,
74
+ closeIcon: "icon-cross",
75
+ wrapperComponent: WrapperComponent,
76
+ backdropComponent: BackdropComponent
77
+ }, args), /*#__PURE__*/React.createElement(Content, {
78
+ closeDialog: closeDialog
79
+ })))));
80
+ };
81
+ export default DialogHookStory;
@@ -0,0 +1,39 @@
1
+ @import '../../Icon/style';
2
+
3
+ $material-icon-names: (
4
+ close,
5
+ );
6
+ $custom-icon-path: '/assets/icons/';
7
+
8
+ @include generateMaterialIconClasses;
9
+
10
+ .DialogDrawer {
11
+ .Dialog__wrapper {
12
+ position: fixed;
13
+ right: 0;
14
+ top: 0;
15
+ bottom: 0;
16
+ width: 25%;
17
+ max-height: none;
18
+ border-radius: 0;
19
+ }
20
+
21
+ .Dialog__button_close {
22
+ position: absolute;
23
+ right: 1rem;
24
+ top: 1rem;
25
+ background: none;
26
+ border: none;
27
+ cursor: pointer;
28
+
29
+ .Icon {
30
+ font-size: 300%;
31
+ }
32
+ }
33
+
34
+ .Dialog__backdrop {
35
+ background-color: rgba(0, 0, 0, 0.2);
36
+ -webkit-backdrop-filter: blur(2px);
37
+ backdrop-filter: blur(2px);
38
+ }
39
+ }
@@ -1,28 +1,79 @@
1
+ var _excluded = ["forwardRef", "children"],
2
+ _excluded2 = ["children"];
1
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
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
6
  import React from 'react';
3
7
  import { v4 as uuidv4 } from 'uuid';
8
+ import { motion, AnimatePresence, MotionConfig } from 'framer-motion';
4
9
  import useDialog from '../../../hooks/useDialog';
10
+ var Content = function Content() {
11
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "I've been created using the ", /*#__PURE__*/React.createElement("code", null, "useDialog"), " hook.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "This hook provides you with:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "DialogComponent"), " - the Dialog component"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "dialogIsOpen"), " - a const which tells you if the dialog is open or closed"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "openDialog"), " - a function to open the dialog"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeDialog"), " - a function to close the dialog")), "The ", /*#__PURE__*/React.createElement("code", null, "DialogComponent"), " has several arguments:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "id"), " - a unique identifier (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "title"), " - a header element, or any element, really (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "children"), " - the dialog's content. Wrapped within the dialog."), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "showCloseButton"), " - render a close button? (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "showCloseIcon"), " - render a close icon? (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeButtonText"), " - text for the close button (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeIcon"), " - what icon to use. Default 'icon-cross' (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "dialogLabel"), " - a label for a11y - default 'dialog' (optional)")), "Depending on where the dialog is being used, you might need to add a z-index.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "This Dialog handles several things for you: Taking focus and keeping it inside and it allows you to close the Dialog by either pressing Escape or clicking outside of it. This is done by several different hooks.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Alternatively, if you need a more custom approach, you can opt to use the ", /*#__PURE__*/React.createElement("code", null, "useDialogHelpers"), " hook instead."));
12
+ };
13
+ var Title = function Title() {
14
+ return /*#__PURE__*/React.createElement("h2", null, "I'm a Dialog!");
15
+ };
16
+ var WrapperComponent = function WrapperComponent(_ref) {
17
+ var forwardRef = _ref.forwardRef,
18
+ children = _ref.children,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+ return /*#__PURE__*/React.createElement(motion.div, _extends({}, props, {
21
+ initial: {
22
+ opacity: 0,
23
+ y: '100px'
24
+ },
25
+ animate: {
26
+ opacity: 1,
27
+ y: 0
28
+ },
29
+ exit: {
30
+ opacity: 0,
31
+ y: '100px'
32
+ },
33
+ ref: forwardRef
34
+ }), children);
35
+ };
36
+ var BackdropComponent = function BackdropComponent(_ref2) {
37
+ var children = _ref2.children,
38
+ props = _objectWithoutProperties(_ref2, _excluded2);
39
+ return /*#__PURE__*/React.createElement(motion.div, _extends({}, props, {
40
+ initial: {
41
+ opacity: 0
42
+ },
43
+ animate: {
44
+ opacity: 1
45
+ },
46
+ exit: {
47
+ opacity: 0
48
+ }
49
+ }), children);
50
+ };
51
+ var uuid = uuidv4();
5
52
  export var DialogHookStory = function DialogHookStory(args) {
6
53
  var _useDialog = useDialog(),
54
+ dialogIsOpen = _useDialog.dialogIsOpen,
7
55
  openDialog = _useDialog.openDialog,
56
+ closeDialog = _useDialog.closeDialog,
8
57
  DialogComponent = _useDialog.DialogComponent;
9
- var uuid = uuidv4();
10
- var Content = function Content() {
11
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "I've been created using the ", /*#__PURE__*/React.createElement("code", null, "useDialog"), " hook.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "This hook provides you with:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "DialogComponent"), " - the Dialog component"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "dialogIsOpen"), " - a const which tells you if the dialog is open or closed"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "openDialog"), " - a function to open the dialog"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeDialog"), " - a function to close the dialog")), "The ", /*#__PURE__*/React.createElement("code", null, "DialogComponent"), " has several arguments:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "id"), " - a unique identifier (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "title"), " - a header element, or any element, really (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "children"), " - the dialog's content. Wrapped within the dialog."), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "showCloseButton"), " - render a close button? (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "showCloseIcon"), " - render a close icon? (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeButtonText"), " - text for the close button (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "closeIcon"), " - what icon to use. Default 'icon-cross' (optional)"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "dialogLabel"), " - a label for a11y - default 'dialog' (optional)")), "Depending on where the dialog is being used, you might need to add a z-index.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "This Dialog handles several things for you: Taking focus and keeping it inside and it allows you to close the Dialog by either pressing Escape or clicking outside of it. This is done by several different hooks.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Alternatively, if you need a more custom approach, you can opt to use the ", /*#__PURE__*/React.createElement("code", null, "useDialogHelpers"), " hook instead."));
12
- };
13
- var title = function title() {
14
- return /*#__PURE__*/React.createElement("h2", null, "I'm a Dialog!");
15
- };
16
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
58
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
17
59
  type: "button",
18
60
  onClick: openDialog
19
- }, "Open a dialog"), /*#__PURE__*/React.createElement(DialogComponent, _extends({
61
+ }, "Open a dialog"), /*#__PURE__*/React.createElement(MotionConfig, {
62
+ transition: {
63
+ duration: 0.5,
64
+ ease: 'easeOut'
65
+ }
66
+ }, /*#__PURE__*/React.createElement(AnimatePresence, null, dialogIsOpen && /*#__PURE__*/React.createElement(DialogComponent, _extends({
20
67
  id: uuid,
21
- title: title,
22
68
  showCloseButton: true,
69
+ dialogIsOpen: dialogIsOpen,
70
+ closeDialog: closeDialog,
23
71
  closeButtonText: "Click here to close me.",
24
72
  showCloseIcon: true,
25
- closeIcon: "icon-cross"
26
- }, args), /*#__PURE__*/React.createElement(Content, null))));
73
+ closeIcon: "icon-cross",
74
+ titleComponent: Title,
75
+ wrapperComponent: WrapperComponent,
76
+ backdropComponent: BackdropComponent
77
+ }, args), /*#__PURE__*/React.createElement(Content, null)))));
27
78
  };
28
79
  export default DialogHookStory;
@@ -39,6 +39,16 @@ declare namespace Dialog {
39
39
  let disableClosers_1: boolean;
40
40
  export { disableClosers_1 as disableClosers };
41
41
  }
42
+ function Wrapper({ forwardRef, children, ...props }: {
43
+ [x: string]: any;
44
+ forwardRef: any;
45
+ children: any;
46
+ }): React.JSX.Element;
47
+ function Backdrop({ forwardRef, children, ...props }: {
48
+ [x: string]: any;
49
+ forwardRef: any;
50
+ children: any;
51
+ }): React.JSX.Element;
42
52
  }
43
53
  import React from 'react';
44
54
  import PropTypes from 'prop-types';
@@ -1,14 +1,18 @@
1
+ var _excluded = ["forwardRef", "children"],
2
+ _excluded2 = ["forwardRef", "children"];
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1
5
  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); }
2
6
  import React, { useRef } from 'react';
3
7
  import { createPortal } from 'react-dom';
4
8
  import { RemoveScroll } from 'react-remove-scroll';
5
9
  import { useTranslation } from 'react-i18next';
6
10
  import PropTypes from 'prop-types';
11
+ import classnames from 'classnames';
7
12
  import useDialogHelpers from '../../hooks/useDialogHelpers';
8
13
  import './style.scss';
9
14
  var Dialog = function Dialog(props) {
10
15
  var id = props.id,
11
- title = props.title,
12
16
  children = props.children,
13
17
  isOpen = props.isOpen,
14
18
  closeFunction = props.closeFunction,
@@ -18,10 +22,21 @@ var Dialog = function Dialog(props) {
18
22
  closeIcon = props.closeIcon,
19
23
  dialogLabel = props.dialogLabel,
20
24
  portalTarget = props.portalTarget,
21
- disableClosers = props.disableClosers;
25
+ disableClosers = props.disableClosers,
26
+ _props$className = props.className,
27
+ className = _props$className === void 0 ? '' : _props$className,
28
+ _props$titleComponent = props.titleComponent,
29
+ titleComponent = _props$titleComponent === void 0 ? null : _props$titleComponent,
30
+ _props$wrapperCompone = props.wrapperComponent,
31
+ wrapperComponent = _props$wrapperCompone === void 0 ? Dialog.Wrapper : _props$wrapperCompone,
32
+ _props$backdropCompon = props.backdropComponent,
33
+ backdropComponent = _props$backdropCompon === void 0 ? Dialog.Wrapper : _props$backdropCompon;
22
34
  var wrapper = useRef(null);
23
35
  var _useTranslation = useTranslation(),
24
36
  t = _useTranslation.t;
37
+ var TitleComponent = titleComponent;
38
+ var WrapperComponent = wrapperComponent;
39
+ var BackdropComponent = backdropComponent;
25
40
  var _useDialogHelpers = useDialogHelpers({
26
41
  id: id,
27
42
  wrapperElement: wrapper,
@@ -34,18 +49,18 @@ var Dialog = function Dialog(props) {
34
49
  dialogId = _useDialogHelpers.id;
35
50
  if (!isOpen) return null;
36
51
  return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
37
- className: "Dialog",
52
+ className: classnames('Dialog', className),
38
53
  id: dialogId
39
- }, /*#__PURE__*/React.createElement("div", _extends({
54
+ }, /*#__PURE__*/React.createElement(WrapperComponent, _extends({
40
55
  className: "Dialog__wrapper"
41
56
  }, dialogHelpersProps, {
42
- ref: wrapper
57
+ forwardRef: wrapper
43
58
  }), /*#__PURE__*/React.createElement("div", {
44
59
  id: labelId,
45
60
  className: "Dialog__sr-only"
46
- }, dialogLabel), title && /*#__PURE__*/React.createElement("div", {
61
+ }, dialogLabel), TitleComponent && /*#__PURE__*/React.createElement("div", {
47
62
  className: "Dialog__title"
48
- }, title()), showCloseIcon && /*#__PURE__*/React.createElement("button", {
63
+ }, /*#__PURE__*/React.createElement(TitleComponent, null)), showCloseIcon && /*#__PURE__*/React.createElement("button", {
49
64
  type: "button",
50
65
  className: "Dialog__closeicon",
51
66
  "aria-label": t('general.close', 'Close'),
@@ -60,7 +75,7 @@ var Dialog = function Dialog(props) {
60
75
  type: "button",
61
76
  className: "Dialog__closebutton",
62
77
  onClick: closeFunction
63
- }, closeButtonText))), /*#__PURE__*/React.createElement("div", {
78
+ }, closeButtonText))), /*#__PURE__*/React.createElement(BackdropComponent, {
64
79
  className: "Dialog__backdrop",
65
80
  "aria-label": t('general.close', 'Close')
66
81
  })), portalTarget);
@@ -92,4 +107,20 @@ Dialog.defaultProps = {
92
107
  portalTarget: typeof document !== 'undefined' ? document.body : null,
93
108
  disableClosers: false
94
109
  };
110
+ Dialog.Wrapper = function (_ref) {
111
+ var forwardRef = _ref.forwardRef,
112
+ children = _ref.children,
113
+ props = _objectWithoutProperties(_ref, _excluded);
114
+ return /*#__PURE__*/React.createElement("div", _extends({
115
+ ref: forwardRef
116
+ }, props), children);
117
+ };
118
+ Dialog.Backdrop = function (_ref2) {
119
+ var forwardRef = _ref2.forwardRef,
120
+ children = _ref2.children,
121
+ props = _objectWithoutProperties(_ref2, _excluded2);
122
+ return /*#__PURE__*/React.createElement("div", _extends({
123
+ ref: forwardRef
124
+ }, props), children);
125
+ };
95
126
  export default Dialog;
@@ -50,7 +50,6 @@
50
50
  height: 100%;
51
51
  position: absolute;
52
52
  cursor: pointer;
53
- background: black;
54
- opacity: 0.7;
53
+ background-color: var(--Dialog--backdrop-background-color, rgba(0, 0, 0, 0.7));
55
54
  }
56
55
  }
@@ -6,7 +6,7 @@ export interface DownloadProps {
6
6
  filesize?: number;
7
7
  filename?: string;
8
8
  mime: string;
9
- target?: string;
9
+ target?: HTMLAnchorElement['target'];
10
10
  className?: string;
11
11
  }
12
12
  declare const Download: React.FC<DownloadProps>;
@@ -0,0 +1,14 @@
1
+ import React, { ChangeEventHandler } from 'react';
2
+ import './style.scss';
3
+ interface Props {
4
+ name: string;
5
+ id: string;
6
+ value: string;
7
+ label: string;
8
+ subLabel?: string;
9
+ checked: boolean;
10
+ onChange: ChangeEventHandler<HTMLInputElement>;
11
+ disabled: boolean;
12
+ }
13
+ declare const Checkbox: React.FC<Props>;
14
+ export default Checkbox;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import './style.scss';
3
+ var Checkbox = function Checkbox(_ref) {
4
+ var name = _ref.name,
5
+ id = _ref.id,
6
+ value = _ref.value,
7
+ label = _ref.label,
8
+ subLabel = _ref.subLabel,
9
+ _ref$checked = _ref.checked,
10
+ checked = _ref$checked === void 0 ? false : _ref$checked,
11
+ onChange = _ref.onChange,
12
+ disabled = _ref.disabled;
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: "Checkbox GoogleConsentCookieBanner__checkbox"
15
+ }, /*#__PURE__*/React.createElement("input", {
16
+ type: "checkbox",
17
+ className: "Checkbox__input",
18
+ name: name,
19
+ id: id,
20
+ value: value,
21
+ checked: checked,
22
+ onChange: onChange,
23
+ disabled: disabled
24
+ }), /*#__PURE__*/React.createElement("label", {
25
+ htmlFor: id,
26
+ className: "icon-before icon-checkmark"
27
+ }, label, " ", /*#__PURE__*/React.createElement("span", null, subLabel)));
28
+ };
29
+ export default Checkbox;
@@ -0,0 +1,40 @@
1
+ @import '../../../styles/assets/mixins';
2
+ @import '../../../styles/assets/variables';
3
+
4
+ // Radio's and checkboxes
5
+ .GoogleConsentCookieBanner {
6
+
7
+ &__checkbox {
8
+ label span {
9
+ font-size: 1.4rem;
10
+ }
11
+
12
+ input[type='checkbox'] {
13
+ position: absolute;
14
+ opacity: 0;
15
+
16
+ // Unchecked
17
+ ~ label:not(.no-styling) {
18
+ position: relative;
19
+ display: inline-block;
20
+ user-select: none;
21
+ cursor: pointer;
22
+
23
+ display: flex;
24
+ align-items: center;
25
+
26
+ &:before {
27
+ background-position-y: -1em;
28
+ font-size: 1.8rem;
29
+ }
30
+ }
31
+
32
+ // Checked
33
+ &:checked ~ label:not(.no-styling) {
34
+ &:before {
35
+ background-position-y: 0em;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface CookieInformation {
3
+ title: string;
4
+ duration: string;
5
+ description: string;
6
+ }
7
+ export interface CookieCategoryContentsProps {
8
+ cookies: Array<CookieInformation>;
9
+ cookieNameLabel?: string;
10
+ durationLabel?: string;
11
+ descriptionLabel?: string;
12
+ }
13
+ declare const CookieCategoryContents: React.FC<CookieCategoryContentsProps>;
14
+ export default CookieCategoryContents;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ var CookieCategoryContents = function CookieCategoryContents(_ref) {
3
+ var _ref$cookies = _ref.cookies,
4
+ cookies = _ref$cookies === void 0 ? [] : _ref$cookies,
5
+ _ref$cookieNameLabel = _ref.cookieNameLabel,
6
+ cookieNameLabel = _ref$cookieNameLabel === void 0 ? 'Cookie' : _ref$cookieNameLabel,
7
+ _ref$durationLabel = _ref.durationLabel,
8
+ durationLabel = _ref$durationLabel === void 0 ? 'Looptijd' : _ref$durationLabel,
9
+ _ref$descriptionLabel = _ref.descriptionLabel,
10
+ descriptionLabel = _ref$descriptionLabel === void 0 ? 'Beschrijving' : _ref$descriptionLabel;
11
+ return /*#__PURE__*/React.createElement("ul", {
12
+ className: "CookieCategoryContents"
13
+ }, cookies.map(function (cookie) {
14
+ return /*#__PURE__*/React.createElement("li", {
15
+ key: "cookie-description-".concat(cookie.title)
16
+ }, /*#__PURE__*/React.createElement("h3", null, cookieNameLabel), /*#__PURE__*/React.createElement("p", null, cookie.title), /*#__PURE__*/React.createElement("h3", null, durationLabel), /*#__PURE__*/React.createElement("p", null, cookie.duration), /*#__PURE__*/React.createElement("h3", null, descriptionLabel), /*#__PURE__*/React.createElement("p", null, cookie.description));
17
+ }));
18
+ };
19
+ export default CookieCategoryContents;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface PartnerInformation {
3
+ name: string;
4
+ description: string;
5
+ privacyPolicy: string;
6
+ }
7
+ export interface CookieCategoryContentsProps {
8
+ partners: Array<PartnerInformation>;
9
+ partnerNameLabel?: string;
10
+ descriptionLabel?: string;
11
+ privacyPolicyLabel?: string;
12
+ }
13
+ declare const CookieCategoryContentsPartners: React.FC<CookieCategoryContentsProps>;
14
+ export default CookieCategoryContentsPartners;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ var CookieCategoryContentsPartners = function CookieCategoryContentsPartners(_ref) {
3
+ var _ref$partners = _ref.partners,
4
+ partners = _ref$partners === void 0 ? [] : _ref$partners,
5
+ _ref$partnerNameLabel = _ref.partnerNameLabel,
6
+ partnerNameLabel = _ref$partnerNameLabel === void 0 ? 'Partner' : _ref$partnerNameLabel,
7
+ _ref$descriptionLabel = _ref.descriptionLabel,
8
+ descriptionLabel = _ref$descriptionLabel === void 0 ? 'Beschrijving' : _ref$descriptionLabel,
9
+ _ref$privacyPolicyLab = _ref.privacyPolicyLabel,
10
+ privacyPolicyLabel = _ref$privacyPolicyLab === void 0 ? 'Privacy Policy' : _ref$privacyPolicyLab;
11
+ return /*#__PURE__*/React.createElement("ul", {
12
+ className: "CookieCategoryContents"
13
+ }, partners.map(function (partner) {
14
+ return /*#__PURE__*/React.createElement("li", {
15
+ key: "partner-description-".concat(partner.name)
16
+ }, /*#__PURE__*/React.createElement("h3", null, partnerNameLabel), /*#__PURE__*/React.createElement("p", null, partner.name), /*#__PURE__*/React.createElement("h3", null, descriptionLabel), /*#__PURE__*/React.createElement("p", null, partner.description), /*#__PURE__*/React.createElement("a", {
17
+ href: partner.privacyPolicy,
18
+ rel: "noreferrer",
19
+ target: "_blank"
20
+ }, privacyPolicyLabel));
21
+ }));
22
+ };
23
+ export default CookieCategoryContentsPartners;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './style.scss';
3
+ import { CookieCompliancePopupProps } from './types';
4
+ export declare const COOKIE_CONSENT_CATEGORIES = "cookie_consent_categories";
5
+ export declare const COOKIE_CONSENT_STATE = "cookie_consent_state";
6
+ export declare const DEFAULT_COOKIE_EXPIRATION_DAYS = 365;
7
+ export declare const CONSENT_UPDATE_EVENT = "consentUpdate";
8
+ declare global {
9
+ interface Window {
10
+ dataLayer: any;
11
+ gtag: any;
12
+ }
13
+ }
14
+ declare const CookieCompliancePopup: React.FC<CookieCompliancePopupProps>;
15
+ export default CookieCompliancePopup;