@uncinc/uncinc-react-kitchen-sink 2.6.1 → 2.6.4
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/dist/Context/ViewportContext.d.ts +23 -0
- package/dist/components/AbbreviationAnnotation/index.d.ts +24 -0
- package/dist/components/Accordion/AccordionItem/index.d.ts +17 -0
- package/dist/components/Accordion/AccordionItem/index.js +8 -8
- package/dist/components/Accordion/AccordionItemVariant/index.d.ts +23 -0
- package/dist/components/Accordion/index.d.ts +3 -0
- package/dist/components/Accordion/index.js +3 -3
- package/dist/components/ApiAutocomplete/index.d.ts +19 -0
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Cookie/Checkbox/index.d.ts +12 -0
- package/dist/components/Cookie/index.d.ts +72 -0
- package/dist/components/Dialog/DialogHelpersStory/index.d.ts +3 -0
- package/dist/components/Dialog/DialogHookStory/index.d.ts +3 -0
- package/dist/components/Dialog/DialogHookStory/index.js +15 -23
- package/dist/components/Dialog/DialogOverrideStory/index.d.ts +3 -0
- package/dist/components/Dialog/index.d.ts +5 -5
- package/dist/components/Download/index.js +1 -1
- package/dist/components/FontSizeSwitcher/index.d.ts +11 -0
- package/dist/components/Form/Checkbox/index.d.ts +9 -0
- package/dist/components/Form/Checkbox/index.js +2 -1
- package/dist/components/Form/Checkboxes/index.d.ts +3 -0
- package/dist/components/Form/Date/index.d.ts +3 -0
- package/dist/components/Form/DatePicker/index.d.ts +3 -0
- package/dist/components/Form/DateSelect/index.d.ts +17 -0
- package/dist/components/Form/Email/index.d.ts +3 -0
- package/dist/components/Form/FormikWrapper/index.d.ts +3 -0
- package/dist/components/Form/GenericFormElement/index.d.ts +3 -0
- package/dist/components/Form/Number/index.d.ts +3 -0
- package/dist/components/Form/RadioButtons/index.d.ts +3 -0
- package/dist/components/Form/SearchField/index.d.ts +3 -0
- package/dist/components/Form/Select/Input/index.d.ts +3 -0
- package/dist/components/Form/Select/index.d.ts +3 -0
- package/dist/components/Form/TextField/index.d.ts +4 -0
- package/dist/components/Form/TextField/index.js +2 -1
- package/dist/components/Form/Textarea/index.d.ts +3 -0
- package/dist/components/Form/commonTests.d.ts +6 -0
- package/dist/components/Form/{TextField/index.test.js → commonTests.js} +65 -94
- package/dist/components/Hamburger/index.d.ts +14 -0
- package/dist/components/Header/index.d.ts +10 -0
- package/dist/components/Image/Background/index.d.ts +8 -0
- package/dist/components/Image/Picture/index.d.ts +2 -2
- package/dist/components/InlineMenu/index.d.ts +44 -0
- package/dist/components/InlineMenu/index.js +156 -40
- package/dist/components/Layout/Container/index.d.ts +22 -0
- package/dist/components/Layout/Container/index.js +14 -12
- package/dist/components/Layout/QuickLayout/Auto/index.d.ts +14 -0
- package/dist/components/Layout/QuickLayout/Center/index.d.ts +6 -0
- package/dist/components/Layout/QuickLayout/Clamp/index.d.ts +16 -0
- package/dist/components/Layout/QuickLayout/Sidebar/index.d.ts +14 -0
- package/dist/components/Layout/QuickLayout/SpaceBetween/index.d.ts +14 -0
- package/dist/components/Layout/QuickLayout/Stack/index.d.ts +7 -0
- package/dist/components/Layout/QuickLayout/Wrap/index.d.ts +14 -0
- package/dist/components/Layout/QuickLayout/index.d.ts +12 -0
- package/dist/components/Lottie/LottieAnimation/index.d.ts +3 -0
- package/dist/components/Lottie/LottieAnimationWithMousePosition.d.ts +6 -0
- package/dist/components/Lottie/index.d.ts +3 -0
- package/dist/components/MagicLine/index.d.ts +6 -0
- package/dist/components/MediaPlayer/index.js +6 -5
- package/dist/components/NavigationScroll/index.d.ts +10 -0
- package/dist/components/Pagination/index.d.ts +57 -0
- package/dist/components/SearchKit/Facets/ChipFacet/index.d.ts +8 -0
- package/dist/components/SearchKit/Facets/ListFacet/index.d.ts +8 -0
- package/dist/components/SearchKit/Facets/SelectFacet/index.d.ts +8 -0
- package/dist/components/SearchKit/Query/index.d.ts +7 -0
- package/dist/components/SearchKit/SearchFacets/index.d.ts +14 -0
- package/dist/components/SearchKit/SearchField/index.d.ts +16 -0
- package/dist/components/SearchKit/SearchLoadMore/index.d.ts +7 -0
- package/dist/components/SearchKit/SearchPage/index.d.ts +14 -0
- package/dist/components/SearchKit/SearchPagination/index.d.ts +5 -0
- package/dist/components/SearchKit/SearchReset/index.d.ts +7 -0
- package/dist/components/SearchKit/SearchResults/index.d.ts +33 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/CustomValue/index.d.ts +5 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/DateRange/index.d.ts +6 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/NumericRange/index.d.ts +6 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/Value/index.d.ts +6 -0
- package/dist/components/SearchKit/SearchSelectedFilters/index.d.ts +6 -0
- package/dist/components/SearchKit/SearchSorting/index.d.ts +6 -0
- package/dist/components/SearchKit/index.d.ts +37 -0
- package/dist/components/Share/index.d.ts +18 -0
- package/dist/components/Sliders/SliderRelated/index.d.ts +21 -0
- package/dist/components/TableRender/index.d.ts +10 -0
- package/dist/components/TableRender/index.js +66 -0
- package/dist/components/TableRender/style.scss +106 -0
- package/dist/components/TitleWithText/index.d.ts +3 -1
- package/dist/components/TitleWithText/index.js +8 -5
- package/dist/components/WysiwygField/index.d.ts +1 -1
- package/dist/components/WysiwygField/index.js +2 -1
- package/dist/components/index.d.ts +16 -0
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/i18next/index.d.ts +2 -0
- package/dist/helpers/date.d.ts +3 -0
- package/dist/helpers/gtm.d.ts +1 -1
- package/dist/helpers/index.d.ts +14 -0
- package/dist/helpers/index.js +31 -0
- package/dist/helpers/useValueForCurrentViewPort.d.ts +1 -0
- package/dist/hooks/useClickOutside.js +1 -1
- package/dist/hooks/useDialog.d.ts +1 -4
- package/dist/hooks/useDialogHelpers.d.ts +1 -1
- package/dist/hooks/useOnScreen.d.ts +2 -0
- package/dist/hooks/useOnScreen.js +6 -6
- package/dist/hooks/usePrevious.d.ts +1 -0
- package/dist/hooks/usePrevious.js +1 -7
- package/dist/hooks/useScrollPosition.d.ts +2 -0
- package/dist/hooks/useScrollPosition.js +1 -1
- package/dist/hooks/useWindowDimensions.d.ts +4 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +14 -0
- package/dist/organisms/Downloads/index.js +4 -2
- package/dist/organisms/ImageGrid/index.d.ts +25 -0
- package/dist/organisms/ImageGrid/index.js +30 -0
- package/dist/organisms/ImageGrid/style.scss +53 -0
- package/dist/organisms/Text/index.d.ts +2 -0
- package/dist/organisms/Text/index.js +5 -1
- package/dist/setupTests.d.ts +1 -0
- package/dist/styles/assets/_variables.scss +5 -1
- package/package.json +10 -8
- package/dist/components/AbbreviationAnnotation/stories.js +0 -38
- package/dist/components/AbbreviationAnnotation/stories.scss +0 -39
- package/dist/components/Accordion/stories.js +0 -40
- package/dist/components/ApiAutocomplete/stories.js +0 -29
- package/dist/components/Button/stories.js +0 -36
- package/dist/components/Button/stories.scss +0 -45
- package/dist/components/CallToAction/stories.d.ts +0 -8
- package/dist/components/CallToAction/stories.js +0 -37
- package/dist/components/Cookie/stories.js +0 -91
- package/dist/components/Cookie/stories.scss +0 -70
- package/dist/components/Dialog/stories.js +0 -21
- package/dist/components/Download/stories.d.ts +0 -8
- package/dist/components/Download/stories.js +0 -28
- package/dist/components/Download/stories.scss +0 -67
- package/dist/components/FontSizeSwitcher/stories.js +0 -25
- package/dist/components/Form/Checkbox/stories.js +0 -37
- package/dist/components/Form/Checkboxes/index.test.js +0 -155
- package/dist/components/Form/Checkboxes/stories.js +0 -49
- package/dist/components/Form/Date/stories.js +0 -31
- package/dist/components/Form/DatePicker/stories.js +0 -31
- package/dist/components/Form/DateSelect/stories.js +0 -54
- package/dist/components/Form/Email/stories.js +0 -31
- package/dist/components/Form/Number/stories.js +0 -34
- package/dist/components/Form/RadioButtons/index.test.js +0 -146
- package/dist/components/Form/RadioButtons/stories.js +0 -54
- package/dist/components/Form/Select/stories.js +0 -70
- package/dist/components/Form/TextField/stories.js +0 -40
- package/dist/components/Form/Textarea/stories.js +0 -31
- package/dist/components/Hamburger/stories.js +0 -50
- package/dist/components/Header/stories.js +0 -50
- package/dist/components/Header/stories.scss +0 -11
- package/dist/components/Image/stories.js +0 -89
- package/dist/components/Image/stories.scss +0 -20
- package/dist/components/InlineMenu/stories.js +0 -68
- package/dist/components/InlineMenu/stories.scss +0 -10
- package/dist/components/Layout/Container/stories.js +0 -95
- package/dist/components/Layout/Container/stories.scss +0 -21
- package/dist/components/Layout/QuickLayout/stories.js +0 -104
- package/dist/components/Lottie/stories.js +0 -66
- package/dist/components/MagicLine/stories.js +0 -63
- package/dist/components/MagicLine/stories.scss +0 -38
- package/dist/components/MediaPlayer/stories.d.ts +0 -12
- package/dist/components/MediaPlayer/stories.js +0 -146
- package/dist/components/NavigationScroll/stories.js +0 -21
- package/dist/components/NavigationScroll/stories.scss +0 -17
- package/dist/components/Pagination/stories.js +0 -103
- package/dist/components/Pagination/stories.scss +0 -31
- package/dist/components/SearchKit/stories.js +0 -205
- package/dist/components/Share/stories.js +0 -18
- package/dist/components/Share/stories.scss +0 -63
- package/dist/components/Sliders/SliderRelated/stories.js +0 -91
- package/dist/components/TitleWithText/stories.d.ts +0 -8
- package/dist/components/TitleWithText/stories.js +0 -24
- package/dist/components/TitleWithText/stories.scss +0 -0
- package/dist/components/WysiwygField/stories.js +0 -43
- package/dist/organisms/Downloads/stories.d.ts +0 -8
- package/dist/organisms/Downloads/stories.js +0 -43
- package/dist/organisms/Downloads/stories.scss +0 -67
- package/dist/organisms/Quote/stories.d.ts +0 -8
- package/dist/organisms/Quote/stories.js +0 -39
- package/dist/organisms/Quote/stories.scss +0 -48
- package/dist/organisms/Text/stories.d.ts +0 -8
- package/dist/organisms/Text/stories.js +0 -30
- package/dist/organisms/Text/stories.scss +0 -29
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@import "../../styles/assets/mixins";
|
|
2
|
+
@import "../../styles/assets/variables";
|
|
3
|
+
|
|
4
|
+
.TableRender {
|
|
5
|
+
table {
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
display: block;
|
|
8
|
+
border-spacing: 0;
|
|
9
|
+
border-collapse: collapse;
|
|
10
|
+
max-width: min-content;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
-webkit-overflow-scrolling: touch;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&--transposedOnMobile {
|
|
16
|
+
@media #{$mobile-only} {
|
|
17
|
+
table {
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
display: flex;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
thead {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
min-width: min-content;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
tbody {
|
|
29
|
+
position: relative;
|
|
30
|
+
overflow-x: auto;
|
|
31
|
+
display: flex;
|
|
32
|
+
-webkit-overflow-scrolling: touch;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
tr {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
min-width: min-content;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
td,
|
|
43
|
+
th {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.TableRender--cards-mobile {
|
|
51
|
+
width: 100%;
|
|
52
|
+
border-collapse: collapse;
|
|
53
|
+
|
|
54
|
+
table {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
th,
|
|
59
|
+
td {
|
|
60
|
+
text-align: left;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
thead {
|
|
64
|
+
tr {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
tbody {
|
|
70
|
+
@media #{$tablet} {
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: repeat(2, 1fr);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
tr {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
td {
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: 1fr 1fr;
|
|
84
|
+
position: relative;
|
|
85
|
+
|
|
86
|
+
&:first-child {
|
|
87
|
+
.faux-th {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.faux-th {
|
|
94
|
+
margin: 0;
|
|
95
|
+
|
|
96
|
+
&:after {
|
|
97
|
+
content: ":";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.hide-faux-th {
|
|
103
|
+
.faux-th {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface TitleWithTextProps {
|
|
3
3
|
title?: string;
|
|
4
|
-
|
|
4
|
+
titleProps?: React.ComponentPropsWithoutRef<'h2'>;
|
|
5
|
+
text?: string;
|
|
6
|
+
textProps?: React.HTMLProps<HTMLDivElement>;
|
|
5
7
|
className?: string;
|
|
6
8
|
}
|
|
7
9
|
declare const TitleWithText: React.FC<TitleWithTextProps>;
|
|
@@ -8,21 +8,24 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _WysiwygField = _interopRequireDefault(require("../WysiwygField"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
11
12
|
var TitleWithText = function TitleWithText(_ref) {
|
|
12
13
|
var title = _ref.title,
|
|
14
|
+
titleProps = _ref.titleProps,
|
|
13
15
|
text = _ref.text,
|
|
16
|
+
textProps = _ref.textProps,
|
|
14
17
|
className = _ref.className;
|
|
15
18
|
var classes = (0, _classnames.default)('TitleWithText', className);
|
|
16
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
17
20
|
className: classes
|
|
18
|
-
}, title && /*#__PURE__*/_react.default.createElement("h2", {
|
|
21
|
+
}, title && /*#__PURE__*/_react.default.createElement("h2", _extends({
|
|
19
22
|
className: "TitleWithText__title"
|
|
20
|
-
}, title), /*#__PURE__*/_react.default.createElement(_WysiwygField.default, {
|
|
23
|
+
}, titleProps), title), text && /*#__PURE__*/_react.default.createElement(_WysiwygField.default, _extends({
|
|
21
24
|
className: "TitleWithText__text",
|
|
22
|
-
property: "schema:text"
|
|
23
|
-
|
|
25
|
+
property: "schema:text"
|
|
26
|
+
}, textProps, {
|
|
24
27
|
html: text
|
|
25
|
-
}));
|
|
28
|
+
})));
|
|
26
29
|
};
|
|
27
30
|
var _default = TitleWithText;
|
|
28
31
|
exports.default = _default;
|
|
@@ -2,7 +2,7 @@ export default WysiwygField;
|
|
|
2
2
|
declare function WysiwygField({ html, customElementHandler, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
html: any;
|
|
5
|
-
customElementHandler
|
|
5
|
+
customElementHandler?: (() => void) | undefined;
|
|
6
6
|
}): React.JSX.Element;
|
|
7
7
|
declare namespace WysiwygField {
|
|
8
8
|
namespace propTypes {
|
|
@@ -15,7 +15,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
15
15
|
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; }
|
|
16
16
|
var WysiwygField = function WysiwygField(_ref) {
|
|
17
17
|
var html = _ref.html,
|
|
18
|
-
|
|
18
|
+
_ref$customElementHan = _ref.customElementHandler,
|
|
19
|
+
customElementHandler = _ref$customElementHan === void 0 ? function () {} : _ref$customElementHan,
|
|
19
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
var parsedHtml = (0, _reactHtmlParser.default)(html, {
|
|
21
22
|
transform: function transform(node) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as Button } from "./Button";
|
|
2
|
+
export { default as WysiwygField } from "./WysiwygField";
|
|
3
|
+
export { default as MediaPlayer } from "./MediaPlayer";
|
|
4
|
+
export { default as FormikWrapper } from "./Form/FormikWrapper";
|
|
5
|
+
export { default as FormCheckbox } from "./Form/Checkbox";
|
|
6
|
+
export { default as FormCheckboxes } from "./Form/Checkboxes";
|
|
7
|
+
export { default as FormDate } from "./Form/Date";
|
|
8
|
+
export { default as FormDatePicker } from "./Form/DatePicker";
|
|
9
|
+
export { default as FormDateSelect } from "./Form/DateSelect";
|
|
10
|
+
export { default as FormEmail } from "./Form/Email";
|
|
11
|
+
export { default as FormNumber } from "./Form/Number";
|
|
12
|
+
export { default as FormRadioButtons } from "./Form/RadioButtons";
|
|
13
|
+
export { default as FormSearchField } from "./Form/SearchField";
|
|
14
|
+
export { default as FormSelect } from "./Form/Select";
|
|
15
|
+
export { default as FormTextarea } from "./Form/Textarea";
|
|
16
|
+
export { default as FormTextField } from "./Form/TextField";
|
package/dist/helpers/gtm.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively converts an element object to an HTML string.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} element - The element object representing an HTML element.
|
|
5
|
+
* @param {string} element.name - The HTML tag name.
|
|
6
|
+
* @param {Object} [element.attribs] - Attributes associated with the HTML element.
|
|
7
|
+
* @param {Array|Object} [element.children] - Child elements or strings.
|
|
8
|
+
* @returns {string} The HTML string representation of the element and its children.
|
|
9
|
+
*/
|
|
10
|
+
export function elementToHtml(element: {
|
|
11
|
+
name: string;
|
|
12
|
+
attribs?: Object | undefined;
|
|
13
|
+
children?: Object | any[] | undefined;
|
|
14
|
+
}): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.elementToHtml = elementToHtml;
|
|
7
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
|
+
/**
|
|
9
|
+
* Recursively converts an element object to an HTML string.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} element - The element object representing an HTML element.
|
|
12
|
+
* @param {string} element.name - The HTML tag name.
|
|
13
|
+
* @param {Object} [element.attribs] - Attributes associated with the HTML element.
|
|
14
|
+
* @param {Array|Object} [element.children] - Child elements or strings.
|
|
15
|
+
* @returns {string} The HTML string representation of the element and its children.
|
|
16
|
+
*/
|
|
17
|
+
function elementToHtml(element) {
|
|
18
|
+
var attributes = Object.keys(element.attribs || {}).map(function (key) {
|
|
19
|
+
return "".concat(key, "=\"").concat(element.attribs[key], "\"");
|
|
20
|
+
}).join(' ');
|
|
21
|
+
var childrenHtml = (element.children || []).map(function (child) {
|
|
22
|
+
if (typeof child.data === 'string') {
|
|
23
|
+
return child.data;
|
|
24
|
+
} else if (_typeof(child) === 'object') {
|
|
25
|
+
return elementToHtml(child);
|
|
26
|
+
} else {
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
}).join('');
|
|
30
|
+
return "<".concat(element.name, " ").concat(attributes, ">").concat(childrenHtml, "</").concat(element.name, ">");
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useValueForCurrentViewPort(val1: any, val2: any, val3: any, val4: any, val5: any): any;
|
|
@@ -10,8 +10,8 @@ function useClickOutside(_ref) {
|
|
|
10
10
|
_ref$unless = _ref.unless,
|
|
11
11
|
unless = _ref$unless === void 0 ? false : _ref$unless,
|
|
12
12
|
onClick = _ref.onClick;
|
|
13
|
-
var refsAsArray = Array.isArray(refs) ? refs : [refs];
|
|
14
13
|
(0, _react.useEffect)(function () {
|
|
14
|
+
var refsAsArray = Array.isArray(refs) ? refs : [refs];
|
|
15
15
|
function handleOutsideClick(e) {
|
|
16
16
|
var allRefsHaveCurrent = refsAsArray.every(function (ref) {
|
|
17
17
|
return !!ref.current;
|
|
@@ -3,8 +3,5 @@ export default function useDialog(): {
|
|
|
3
3
|
readonly dialogIsOpen: boolean;
|
|
4
4
|
readonly openDialog: () => void;
|
|
5
5
|
readonly closeDialog: () => void;
|
|
6
|
-
readonly DialogComponent:
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
children: any;
|
|
9
|
-
}) => React.FunctionComponentElement<any>;
|
|
6
|
+
readonly DialogComponent: React.FunctionComponent<any>;
|
|
10
7
|
};
|
|
@@ -12,7 +12,7 @@ export interface UseDialogHelpersOptions<T extends HTMLElement> {
|
|
|
12
12
|
* click outside it, or hitting Escape.
|
|
13
13
|
*/
|
|
14
14
|
export default function useDialogHelpers<T extends HTMLElement>(options: UseDialogHelpersOptions<T>): {
|
|
15
|
-
readonly id:
|
|
15
|
+
readonly id: string;
|
|
16
16
|
readonly labelId: string;
|
|
17
17
|
readonly dialogHelpersProps: {
|
|
18
18
|
'aria-role': string;
|
|
@@ -16,17 +16,17 @@ function useOnScreen(ref) {
|
|
|
16
16
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17
17
|
isIntersecting = _useState2[0],
|
|
18
18
|
setIntersecting = _useState2[1];
|
|
19
|
-
var observer = new IntersectionObserver(function (_ref) {
|
|
20
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
21
|
-
entry = _ref2[0];
|
|
22
|
-
return setIntersecting(entry.isIntersecting);
|
|
23
|
-
});
|
|
24
19
|
(0, _react.useEffect)(function () {
|
|
20
|
+
var observer = new IntersectionObserver(function (_ref) {
|
|
21
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
22
|
+
entry = _ref2[0];
|
|
23
|
+
return setIntersecting(entry.isIntersecting);
|
|
24
|
+
});
|
|
25
25
|
observer.observe(ref.current);
|
|
26
26
|
// Remove the observer as soon as the component is unmounted
|
|
27
27
|
return function () {
|
|
28
28
|
return observer.disconnect();
|
|
29
29
|
};
|
|
30
|
-
}, [
|
|
30
|
+
}, [ref]);
|
|
31
31
|
return isIntersecting;
|
|
32
32
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function usePrevious<T>(value: T): T | undefined;
|
|
@@ -6,15 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = usePrevious;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
function usePrevious(value) {
|
|
9
|
-
// The ref object is a generic container whose current property is mutable ...
|
|
10
|
-
// ... and can hold any value, similar to an instance property on a class
|
|
11
9
|
var ref = (0, _react.useRef)();
|
|
12
|
-
|
|
13
|
-
// Store current value in ref
|
|
14
10
|
(0, _react.useEffect)(function () {
|
|
15
11
|
ref.current = value;
|
|
16
|
-
}, [value]);
|
|
17
|
-
|
|
18
|
-
// Return previous value (happens before update in useEffect above)
|
|
12
|
+
}, [value]);
|
|
19
13
|
return ref.current;
|
|
20
14
|
}
|
|
@@ -18,7 +18,7 @@ var useScrollPosition = function useScrollPosition() {
|
|
|
18
18
|
setScrollPosition = _useState2[1];
|
|
19
19
|
(0, _react.useEffect)(function () {
|
|
20
20
|
var updatePosition = function updatePosition() {
|
|
21
|
-
setScrollPosition(window.
|
|
21
|
+
setScrollPosition(window.scrollY);
|
|
22
22
|
};
|
|
23
23
|
window.addEventListener('scroll', updatePosition);
|
|
24
24
|
updatePosition();
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export { default as AbbreviationAnnotation } from "./components/AbbreviationAnnotation";
|
|
2
|
+
export { default as Accordion } from "./components/Accordion";
|
|
3
|
+
export { default as AccordionItem } from "./components/Accordion/AccordionItem";
|
|
4
|
+
export { default as AccordionItemVariant } from "./components/Accordion/AccordionItemVariant";
|
|
5
|
+
export { default as Button } from "./components/Button";
|
|
6
|
+
export { default as Hamburger } from "./components/Hamburger";
|
|
7
|
+
export { default as Image } from "./components/Image";
|
|
8
|
+
export { default as ImageBackground } from "./components/Image/Background";
|
|
9
|
+
export { default as Lottie } from "./components/Lottie";
|
|
10
|
+
export { default as LottieAnimationWithMousePosition } from "./components/Lottie/LottieAnimationWithMousePosition";
|
|
11
|
+
export { default as WysiwygField } from "./components/WysiwygField";
|
|
12
|
+
export { default as CallToAction } from "./components/CallToAction";
|
|
13
|
+
export { default as ChipFacet } from "./components/SearchKit/Facets/ChipFacet";
|
|
14
|
+
export { default as Dialog } from "./components/Dialog";
|
|
15
|
+
export { default as Download } from "./components/Download";
|
|
16
|
+
export { default as FontSizeSwitcher } from "./components/FontSizeSwitcher";
|
|
17
|
+
export { default as FormCheckbox } from "./components/Form/Checkbox";
|
|
18
|
+
export { default as FormCheckboxes } from "./components/Form/Checkboxes";
|
|
19
|
+
export { default as FormDate } from "./components/Form/Date";
|
|
20
|
+
export { default as FormDatePicker } from "./components/Form/DatePicker";
|
|
21
|
+
export { default as FormDateSelect } from "./components/Form/DateSelect";
|
|
22
|
+
export { default as FormEmail } from "./components/Form/Email";
|
|
23
|
+
export { default as FormikWrapper } from "./components/Form/FormikWrapper";
|
|
24
|
+
export { default as FormNumber } from "./components/Form/Number";
|
|
25
|
+
export { default as FormRadioButtons } from "./components/Form/RadioButtons";
|
|
26
|
+
export { default as FormSearchField } from "./components/Form/SearchField";
|
|
27
|
+
export { default as FormSelect } from "./components/Form/Select";
|
|
28
|
+
export { default as FormTextarea } from "./components/Form/Textarea";
|
|
29
|
+
export { default as FormTextField } from "./components/Form/TextField";
|
|
30
|
+
export { default as InlineMenu } from "./components/InlineMenu";
|
|
31
|
+
export { default as ListFacet } from "./components/SearchKit/Facets/ListFacet";
|
|
32
|
+
export { default as MagicLine } from "./components/MagicLine";
|
|
33
|
+
export { default as NavigationScroll } from "./components/NavigationScroll";
|
|
34
|
+
export { default as Pagination } from "./components/Pagination";
|
|
35
|
+
export { default as Picture } from "./components/Image/Picture";
|
|
36
|
+
export { default as SearchFacets } from "./components/SearchKit/SearchFacets";
|
|
37
|
+
export { default as SearchField } from "./components/SearchKit/SearchField";
|
|
38
|
+
export { default as SearchKit } from "./components/SearchKit";
|
|
39
|
+
export { default as SearchLoadMore } from "./components/SearchKit/SearchLoadMore";
|
|
40
|
+
export { default as SearchPagination } from "./components/SearchKit/SearchPagination";
|
|
41
|
+
export { default as SearchReset } from "./components/SearchKit/SearchReset";
|
|
42
|
+
export { default as SearchResults } from "./components/SearchKit/SearchResults";
|
|
43
|
+
export { default as SearchSelectedFilters } from "./components/SearchKit/SearchSelectedFilters";
|
|
44
|
+
export { default as SearchSorting } from "./components/SearchKit/SearchSorting";
|
|
45
|
+
export { default as SelectFacet } from "./components/SearchKit/Facets/SelectFacet";
|
|
46
|
+
export { default as TitleWithText } from "./components/TitleWithText";
|
|
47
|
+
export { default as TableRender } from "./components/TableRender";
|
|
48
|
+
export { default as ApiAutocomplete } from "./components/ApiAutocomplete";
|
|
49
|
+
export { default as Cookie } from "./components/Cookie";
|
|
50
|
+
export { default as Downloads } from "./organisms/Downloads";
|
|
51
|
+
export { default as Header } from "./components/Header";
|
|
52
|
+
export { default as MediaPlayer } from "./components/MediaPlayer";
|
|
53
|
+
export { default as Quote } from "./organisms/Quote";
|
|
54
|
+
export { default as Share } from "./components/Share";
|
|
55
|
+
export { default as SliderRelated } from "./components/Sliders/SliderRelated";
|
|
56
|
+
export { default as Text } from "./organisms/Text";
|
|
57
|
+
export { default as ImageGrid } from "./organisms/ImageGrid";
|
|
58
|
+
export { default as Container } from "./components/Layout/Container";
|
|
59
|
+
export { default as QuickLayout } from "./components/Layout/QuickLayout";
|
|
60
|
+
export { default as KitchenSinkComponentMapperContext } from "./Context/KitchenSinkComponentMapperContext";
|
|
61
|
+
export { default as ViewportContext } from "./Context/ViewportContext";
|
|
62
|
+
export { default as useBoolean } from "./hooks/useBoolean";
|
|
63
|
+
export { default as useDialog } from "./hooks/useDialog";
|
|
64
|
+
export { default as useDialogHelpers } from "./hooks/useDialogHelpers";
|
|
65
|
+
export { default as useEscape } from "./hooks/useEscape";
|
|
66
|
+
export { default as useOnScreen } from "./hooks/useOnScreen";
|
|
67
|
+
export { default as usePrevious } from "./hooks/usePrevious";
|
|
68
|
+
export { default as useScrollPosition } from "./hooks/useScrollPosition";
|
|
69
|
+
export { default as useWindowDimensions } from "./hooks/useWindowDimensions";
|
|
70
|
+
export { default as gtm } from "./helpers/gtm";
|
|
71
|
+
export { default as useValueForCurrentViewPort } from "./helpers/useValueForCurrentViewPort";
|
|
72
|
+
export { parseDateWithTimezoneOffset, isValidDate, doubleDigits } from "./helpers/date";
|
|
73
|
+
export { isExternalLink, normalizeLink } from "./helpers/link";
|
package/dist/index.js
CHANGED
|
@@ -189,6 +189,12 @@ Object.defineProperty(exports, "ImageBackground", {
|
|
|
189
189
|
return _Background.default;
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
|
+
Object.defineProperty(exports, "ImageGrid", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function get() {
|
|
195
|
+
return _ImageGrid.default;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
192
198
|
Object.defineProperty(exports, "InlineMenu", {
|
|
193
199
|
enumerable: true,
|
|
194
200
|
get: function get() {
|
|
@@ -333,6 +339,12 @@ Object.defineProperty(exports, "SliderRelated", {
|
|
|
333
339
|
return _SliderRelated.default;
|
|
334
340
|
}
|
|
335
341
|
});
|
|
342
|
+
Object.defineProperty(exports, "TableRender", {
|
|
343
|
+
enumerable: true,
|
|
344
|
+
get: function get() {
|
|
345
|
+
return _TableRender.default;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
336
348
|
Object.defineProperty(exports, "Text", {
|
|
337
349
|
enumerable: true,
|
|
338
350
|
get: function get() {
|
|
@@ -493,6 +505,7 @@ var _SearchSelectedFilters = _interopRequireDefault(require("./components/Search
|
|
|
493
505
|
var _SearchSorting = _interopRequireDefault(require("./components/SearchKit/SearchSorting"));
|
|
494
506
|
var _SelectFacet = _interopRequireDefault(require("./components/SearchKit/Facets/SelectFacet"));
|
|
495
507
|
var _TitleWithText = _interopRequireDefault(require("./components/TitleWithText"));
|
|
508
|
+
var _TableRender = _interopRequireDefault(require("./components/TableRender"));
|
|
496
509
|
var _ApiAutocomplete = _interopRequireDefault(require("./components/ApiAutocomplete"));
|
|
497
510
|
var _Cookie = _interopRequireDefault(require("./components/Cookie"));
|
|
498
511
|
var _Downloads = _interopRequireDefault(require("./organisms/Downloads"));
|
|
@@ -502,6 +515,7 @@ var _Quote = _interopRequireDefault(require("./organisms/Quote"));
|
|
|
502
515
|
var _Share = _interopRequireDefault(require("./components/Share"));
|
|
503
516
|
var _SliderRelated = _interopRequireDefault(require("./components/Sliders/SliderRelated"));
|
|
504
517
|
var _Text = _interopRequireDefault(require("./organisms/Text"));
|
|
518
|
+
var _ImageGrid = _interopRequireDefault(require("./organisms/ImageGrid"));
|
|
505
519
|
var _Container = _interopRequireDefault(require("./components/Layout/Container"));
|
|
506
520
|
var _QuickLayout = _interopRequireDefault(require("./components/Layout/QuickLayout"));
|
|
507
521
|
var _KitchenSinkComponentMapperContext = _interopRequireDefault(require("./Context/KitchenSinkComponentMapperContext"));
|
|
@@ -21,7 +21,9 @@ var Downloads = function Downloads(_ref) {
|
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement(_TitleWithText.default, {
|
|
22
22
|
title: title,
|
|
23
23
|
text: text
|
|
24
|
-
}),
|
|
24
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: "Downloads__files"
|
|
26
|
+
}, downloads.map(function (download) {
|
|
25
27
|
return /*#__PURE__*/_react.default.createElement(_Download.default, {
|
|
26
28
|
source: download.source,
|
|
27
29
|
title: download.title,
|
|
@@ -31,7 +33,7 @@ var Downloads = function Downloads(_ref) {
|
|
|
31
33
|
target: target,
|
|
32
34
|
mime: download.mime
|
|
33
35
|
});
|
|
34
|
-
}));
|
|
36
|
+
})));
|
|
35
37
|
};
|
|
36
38
|
var _default = Downloads;
|
|
37
39
|
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
export interface ImageGridProps {
|
|
4
|
+
items: [
|
|
5
|
+
React.JSX.Element,
|
|
6
|
+
React.JSX.Element
|
|
7
|
+
] | [
|
|
8
|
+
React.JSX.Element,
|
|
9
|
+
React.JSX.Element,
|
|
10
|
+
React.JSX.Element
|
|
11
|
+
] | [
|
|
12
|
+
React.JSX.Element,
|
|
13
|
+
React.JSX.Element,
|
|
14
|
+
React.JSX.Element,
|
|
15
|
+
React.JSX.Element
|
|
16
|
+
] | [
|
|
17
|
+
React.JSX.Element,
|
|
18
|
+
React.JSX.Element,
|
|
19
|
+
React.JSX.Element,
|
|
20
|
+
React.JSX.Element,
|
|
21
|
+
React.JSX.Element
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
declare const ImageGrid: React.FC<ImageGridProps>;
|
|
25
|
+
export default ImageGrid;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
require("./style.scss");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var ImageGrid = function ImageGrid(_ref) {
|
|
11
|
+
var _ref$items = _ref.items,
|
|
12
|
+
items = _ref$items === void 0 ? [] : _ref$items;
|
|
13
|
+
if (items.length < 2) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
var visibleItems = items.slice(0, 5);
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: "ImageGrid ImageGrid--size-".concat(visibleItems.length)
|
|
19
|
+
}, visibleItems.map(function (item, index) {
|
|
20
|
+
return (
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
23
|
+
_react.default.createElement("div", {
|
|
24
|
+
key: index
|
|
25
|
+
}, item)
|
|
26
|
+
);
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
var _default = ImageGrid;
|
|
30
|
+
exports.default = _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@import '../../styles/assets/variables';
|
|
2
|
+
|
|
3
|
+
.ImageGrid {
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: var(--image-grid-gap--mobile, 2rem);
|
|
6
|
+
|
|
7
|
+
@media #{$tablet} {
|
|
8
|
+
gap: var(--image-grid-gap--desktop, 4rem);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ImageGrid--size-2 {
|
|
13
|
+
grid-template-columns: 1fr;
|
|
14
|
+
|
|
15
|
+
@media #{$tablet} {
|
|
16
|
+
grid-template-columns: 1fr 1fr;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ImageGrid--size-3 {
|
|
21
|
+
grid-template-columns: 1fr 1fr;
|
|
22
|
+
|
|
23
|
+
> div {
|
|
24
|
+
&:first-child {
|
|
25
|
+
grid-column: 1 / span 2;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ImageGrid--size-4 {
|
|
31
|
+
grid-template-columns: 1fr 1fr;
|
|
32
|
+
|
|
33
|
+
> div {
|
|
34
|
+
&:nth-child(1),
|
|
35
|
+
&:nth-child(4) {
|
|
36
|
+
grid-column: 1 / span 2;
|
|
37
|
+
|
|
38
|
+
@media #{$tablet} {
|
|
39
|
+
grid-column: unset;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ImageGrid--size-5 {
|
|
46
|
+
grid-template-columns: 1fr 1fr;
|
|
47
|
+
|
|
48
|
+
> div {
|
|
49
|
+
&:nth-child(3) {
|
|
50
|
+
grid-column: 1 / span 2;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -21,7 +21,9 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
var Text = function Text(_ref) {
|
|
23
23
|
var title = _ref.title,
|
|
24
|
+
titleProps = _ref.titleProps,
|
|
24
25
|
text = _ref.text,
|
|
26
|
+
textProps = _ref.textProps,
|
|
25
27
|
readMore = _ref.readMore,
|
|
26
28
|
_ref$duration = _ref.duration,
|
|
27
29
|
duration = _ref$duration === void 0 ? 333 : _ref$duration,
|
|
@@ -48,7 +50,9 @@ var Text = function Text(_ref) {
|
|
|
48
50
|
className: classes
|
|
49
51
|
}, /*#__PURE__*/_react.default.createElement(_TitleWithText.default, {
|
|
50
52
|
title: title,
|
|
51
|
-
text: text
|
|
53
|
+
text: text,
|
|
54
|
+
titleProps: titleProps,
|
|
55
|
+
textProps: textProps
|
|
52
56
|
}), readMore && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
53
57
|
className: readMoreClasses
|
|
54
58
|
}, /*#__PURE__*/_react.default.createElement(_reactAnimateHeight.default, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|