@popsure/dirty-swan 0.60.0 → 0.61.0
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/cjs/index.js +17 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/table/Table.d.ts +2 -1
- package/dist/cjs/lib/components/table/Table.stories.d.ts +2 -2
- package/dist/cjs/lib/components/table/utils/useTableNavigation/useTableNavigation.d.ts +1 -0
- package/dist/esm/{TableSection-65e88f87.js → TableSection-442941de.js} +1 -1
- package/dist/esm/{TableSection-65e88f87.js.map → TableSection-442941de.js.map} +1 -1
- package/dist/esm/components/autocompleteAddress/index.js +2 -2
- package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/Row/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableArrows/index.js +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
- package/dist/esm/components/table/Table.js +10 -5
- package/dist/esm/components/table/Table.js.map +1 -1
- package/dist/esm/components/table/Table.stories.js +4 -4
- package/dist/esm/components/table/Table.stories.js.map +1 -1
- package/dist/esm/components/table/Table.test.js +2 -2
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +2 -2
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/TableCell.js +1 -2
- package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.js +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.test.js +1 -1
- package/dist/esm/components/table/components/TableControls/TableControls.js +1 -1
- package/dist/esm/components/table/components/TableControls/TableControls.js.map +1 -1
- package/dist/esm/components/table/components/TableSection/TableSection.js +1 -1
- package/dist/esm/components/table/components/TableSection/TableSection.test.js +1 -1
- package/dist/esm/components/table/utils/useTableNavigation/useTableNavigation.test.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib/components/table/Table.d.ts +2 -1
- package/dist/esm/lib/components/table/Table.stories.d.ts +2 -2
- package/dist/esm/lib/components/table/utils/useTableNavigation/useTableNavigation.d.ts +1 -0
- package/dist/esm/{useTableNavigation-f929fbc9.js → useTableNavigation-17d5cd3c.js} +2 -1
- package/dist/esm/useTableNavigation-17d5cd3c.js.map +1 -0
- package/dist/index.css +4 -4
- package/dist/index.css.map +1 -1
- package/dist/lib/scss/private/base/_typography.scss +2 -2
- package/dist/lib/scss/private/components/_buttons.scss +1 -1
- package/dist/lib/scss/private/components/_input.scss +1 -1
- package/package.json +1 -1
- package/src/lib/components/autocompleteAddress/index.tsx +2 -2
- package/src/lib/components/comparisonTable/components/Row/style.module.scss +5 -1
- package/src/lib/components/comparisonTable/components/TableArrows/style.module.scss +1 -1
- package/src/lib/components/input/autoSuggestInput/style.module.scss +2 -2
- package/src/lib/components/table/Table.stories.tsx +2 -0
- package/src/lib/components/table/Table.tsx +10 -2
- package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +4 -4
- package/src/lib/components/table/components/TableCell/TableCell.module.scss +4 -0
- package/src/lib/components/table/components/TableCell/TableCell.tsx +0 -1
- package/src/lib/components/table/components/TableControls/TableControls.tsx +1 -1
- package/src/lib/components/table/utils/useTableNavigation/useTableNavigation.ts +2 -0
- package/src/lib/scss/private/base/_typography.scss +2 -2
- package/src/lib/scss/private/components/_buttons.scss +1 -1
- package/src/lib/scss/private/components/_input.scss +1 -1
- package/dist/esm/useTableNavigation-f929fbc9.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -5206,8 +5206,8 @@ var AutocompleteAddress = function (_a) {
|
|
|
5206
5206
|
};
|
|
5207
5207
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames$1("wmx8 bg-neutral-600 ".concat(styles$E['map-container']), (_b = {},
|
|
5208
5208
|
_b[styles$E['map-container--hidden']] = place === null,
|
|
5209
|
-
_b)), children: [jsxRuntime.jsx("div", { className: styles$E.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$E['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] }), jsxRuntime.jsx("div", { className: "wmx8", children: manualAddressEntry === false ? (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(Input, { className: "w100", id: "autocomplete", "data-cy": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.manualAddressEntry) || 'Search for address', ref: autocompleteElement, disabled: hasLoadedGoogleAPI === false }, "autocomplete-search"), hasLoadedGoogleAPI === false && (jsxRuntime.jsx("div", { "data-cy": "google-api-loader", className: styles$E['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "d-flex c-gap16 ".concat(styles$E['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.street) || 'Street', value: (address === null || address === void 0 ? void 0 : address.street) || '', onChange: onManualAddressChange(), name: "street" }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.street), "autocomplete-street"), jsxRuntime.jsx(Input, __assign({ className: "wmx2 ".concat(styles$E['house-number-input']), "data-cy": "autocomplete-house-number", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.houseNumber) || 'House
|
|
5210
|
-
'Additional information (C/O, apartment,
|
|
5209
|
+
_b)), children: [jsxRuntime.jsx("div", { className: styles$E.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$E['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] }), jsxRuntime.jsx("div", { className: "wmx8", children: manualAddressEntry === false ? (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(Input, { className: "w100", id: "autocomplete", "data-cy": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.manualAddressEntry) || 'Search for address', ref: autocompleteElement, disabled: hasLoadedGoogleAPI === false }, "autocomplete-search"), hasLoadedGoogleAPI === false && (jsxRuntime.jsx("div", { "data-cy": "google-api-loader", className: styles$E['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "d-flex c-gap16 ".concat(styles$E['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.street) || 'Street', value: (address === null || address === void 0 ? void 0 : address.street) || '', onChange: onManualAddressChange(), name: "street" }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.street), "autocomplete-street"), jsxRuntime.jsx(Input, __assign({ className: "wmx2 ".concat(styles$E['house-number-input']), "data-cy": "autocomplete-house-number", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.houseNumber) || 'House number', value: (address === null || address === void 0 ? void 0 : address.houseNumber) || '', name: "houseNumber", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.houseNumber), "autocomplete-house-number")] }), jsxRuntime.jsx(Input, __assign({ className: "mt16", "data-cy": "autocomplete-additional-info", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.additionalInformation) ||
|
|
5210
|
+
'Additional information (C/O, apartment, etc.)', value: (address === null || address === void 0 ? void 0 : address.additionalInformation) || '', name: "additionalInformation", onChange: onManualAddressChange({ updatePlace: false }) }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.additionalInformation), "autocomplete-additional-info"), jsxRuntime.jsxs("div", { className: "d-flex mt16 c-gap16 ".concat(styles$E['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete-postcode", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.postcode) || 'Postcode', value: (address === null || address === void 0 ? void 0 : address.postcode) || '', name: "postcode", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.postcode), "autocomplete-postcode"), jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete-city", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.city) || 'City', value: (address === null || address === void 0 ? void 0 : address.city) || '', name: "city", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.city), "autocomplete-city")] })] })) }), manualAddressEntry === false && (jsxRuntime.jsxs("div", { className: "p-p mt8", children: [(manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.preText) || 'Or ', jsxRuntime.jsx("button", { className: 'p-a p-p fw-bold c-pointer bg-transparent', onClick: handleEnterAddressManually, type: "button", children: (manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.cta) || 'enter address manually' })] }))] }));
|
|
5211
5211
|
};
|
|
5212
5212
|
|
|
5213
5213
|
var propTypes$2 = {exports: {}};
|
|
@@ -13854,7 +13854,7 @@ _defineProperty(Autosuggest, "defaultProps", {
|
|
|
13854
13854
|
|
|
13855
13855
|
var dist$2 = Autosuggest["default"];
|
|
13856
13856
|
|
|
13857
|
-
var css_248z$o = "@keyframes style-module_appearInAnimation__yvH4A {\n from {\n opacity: 0;\n transform: translateY(16px);\n }\n to {\n opacity: 1;\n }\n}\n.style-module_suggestionsContainer__2yVXd {\n position: relative;\n}\n\n.style-module_suggestionsList__11o48 {\n position: absolute;\n z-index: 100;\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--ds-
|
|
13857
|
+
var css_248z$o = "@keyframes style-module_appearInAnimation__yvH4A {\n from {\n opacity: 0;\n transform: translateY(16px);\n }\n to {\n opacity: 1;\n }\n}\n.style-module_suggestionsContainer__2yVXd {\n position: relative;\n}\n\n.style-module_suggestionsList__11o48 {\n position: absolute;\n z-index: 100;\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--ds-neutral-600);\n width: 100%;\n height: fit-content;\n max-height: 216px;\n overflow-y: scroll;\n background-color: white;\n animation-name: style-module_appearInAnimation__yvH4A;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform: translateY(8px);\n}\n\n.style-module_suggestion-option__z7pqG {\n display: flex;\n align-items: center;\n cursor: pointer;\n position: relative;\n margin: 0;\n padding: 12px 16px;\n color: var(--ds-neutral-900);\n min-height: 48px;\n line-height: 24px;\n}\n\n.style-module_suggestion-img__1TfiA {\n width: 32px;\n height: 24px;\n border-radius: 2px;\n}\n\n.style-module_suggestion-text__7wL31 {\n flex: 1;\n}\n\n.style-module_nowrap__uks9c {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.style-module_suggestionHighlighted__2zu5h {\n background-color: var(--ds-orange-100);\n}";
|
|
13858
13858
|
var styles$n = {"suggestionsContainer":"style-module_suggestionsContainer__2yVXd","suggestionsList":"style-module_suggestionsList__11o48","appearInAnimation":"style-module_appearInAnimation__yvH4A","suggestion-option":"style-module_suggestion-option__z7pqG","suggestion-img":"style-module_suggestion-img__1TfiA","suggestion-text":"style-module_suggestion-text__7wL31","nowrap":"style-module_nowrap__uks9c","suggestionHighlighted":"style-module_suggestionHighlighted__2zu5h"};
|
|
13859
13859
|
styleInject(css_248z$o);
|
|
13860
13860
|
|
|
@@ -15453,7 +15453,7 @@ var Chevron = function (_a) {
|
|
|
15453
15453
|
return (jsxRuntime.jsx("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M15 12.5l-5-5-5 5", stroke: "#26262e", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
15454
15454
|
};
|
|
15455
15455
|
|
|
15456
|
-
var css_248z$l = ".style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: 100vw;\n}\n.style-module_header__32rw- > div:nth-child(n+3) {\n margin: 0;\n}\n@media (min-width: 34rem) {\n .style-module_header__32rw- > div {\n width: 211px;\n width: var(--cellWidth, 211px);\n max-width: var(--tableWidth);\n scroll-snap-align: unset;\n }\n}\n\n.style-module_cell__1NoZ6 {\n display: flex;\n justify-content: center;\n align-items: center;\n scroll-snap-align: end;\n line-height: 24px;\n padding: 16px 8px;\n color: #26262e;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\n}\n.style-module_cell__1NoZ6:first-child {\n padding: 16px 8px 16px 16px;\n}\n.style-module_cell__1NoZ6:first-child {\n background-color: white;\n /** Add scroll snap to every column except the first one */\n scroll-snap-align: unset;\n}\n.style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: unset;\n }\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6 {\n flex: 1 0 211px;\n flex: 1 0 var(--cellWidth, 211px);\n width: 211px;\n width: var(--cellWidth, 211px);\n padding: 24px 8px;\n }\n .style-module_cell__1NoZ6:first-child {\n padding: 24px 8px 24px 24px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(212px, calc(var(--tableWidth) / 2));\n max-width: min(var(--firstColumnWidth, 212px), calc(var(--tableWidth) / 2));\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n line-height: 38px;\n}\n@media (min-width: 34rem) {\n .style-module_title__1xYvu {\n display: flex;\n }\n}\n\n.style-module_sticky__2T5jm {\n position: sticky;\n justify-content: flex-start;\n z-index: 1;\n top: 0;\n left: 0;\n width: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_sticky__2T5jm {\n border-right: 1px solid #f9f9fd;\n flex: 1 0 288px;\n }\n}\n\nh4.style-module_addon__CPf60 {\n border-right: none;\n max-width: calc(100vw - 64px);\n width: 100%;\n}\n@media (min-width: 64rem) {\n h4.style-module_addon__CPf60 {\n max-width: 976px;\n }\n}";
|
|
15456
|
+
var css_248z$l = ".style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: 100vw;\n}\n.style-module_header__32rw- > div:nth-child(n+3) {\n margin: 0;\n}\n@media (min-width: 34rem) {\n .style-module_header__32rw- > div {\n width: 211px;\n width: var(--cellWidth, 211px);\n max-width: var(--tableWidth);\n scroll-snap-align: unset;\n }\n}\n\n.style-module_cell__1NoZ6 {\n display: flex;\n justify-content: center;\n align-items: center;\n scroll-snap-align: end;\n line-height: 24px;\n padding: 16px 8px;\n color: #26262e;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\n}\n.style-module_cell__1NoZ6:first-child {\n padding: 16px 8px 16px 0;\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6:first-child {\n padding: 16px 8px 16px 16px;\n }\n}\n.style-module_cell__1NoZ6:first-child {\n background-color: white;\n /** Add scroll snap to every column except the first one */\n scroll-snap-align: unset;\n}\n.style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: unset;\n }\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6 {\n flex: 1 0 211px;\n flex: 1 0 var(--cellWidth, 211px);\n width: 211px;\n width: var(--cellWidth, 211px);\n padding: 24px 8px;\n }\n .style-module_cell__1NoZ6:first-child {\n padding: 24px 8px 24px 24px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(212px, calc(var(--tableWidth) / 2));\n max-width: min(var(--firstColumnWidth, 212px), calc(var(--tableWidth) / 2));\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n line-height: 38px;\n}\n@media (min-width: 34rem) {\n .style-module_title__1xYvu {\n display: flex;\n }\n}\n\n.style-module_sticky__2T5jm {\n position: sticky;\n justify-content: flex-start;\n z-index: 1;\n top: 0;\n left: 0;\n width: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_sticky__2T5jm {\n border-right: 1px solid #f9f9fd;\n flex: 1 0 288px;\n }\n}\n\nh4.style-module_addon__CPf60 {\n border-right: none;\n max-width: calc(100vw - 64px);\n width: 100%;\n}\n@media (min-width: 64rem) {\n h4.style-module_addon__CPf60 {\n max-width: 976px;\n }\n}";
|
|
15457
15457
|
var styles$k = {"header":"style-module_header__32rw-","cell":"style-module_cell__1NoZ6","title":"style-module_title__1xYvu","sticky":"style-module_sticky__2T5jm","addon":"style-module_addon__CPf60"};
|
|
15458
15458
|
styleInject(css_248z$l);
|
|
15459
15459
|
|
|
@@ -15492,7 +15492,7 @@ var ArrowIcon = function (_a) {
|
|
|
15492
15492
|
return (jsxRuntime.jsx("svg", { width: "14", height: "8", viewBox: "0 0 14 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M1 1.00003L7 7.00003L13 1.00003", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
15493
15493
|
};
|
|
15494
15494
|
|
|
15495
|
-
var css_248z$k = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 0
|
|
15495
|
+
var css_248z$k = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 0 8px;\n justify-content: space-between;\n align-items: stretch;\n display: flex;\n}\n@media (min-width: 34rem) {\n .style-module_container__3BxOi {\n display: none;\n }\n}\n\n.style-module_next__3yJsi {\n transform: rotate(-90deg);\n}\n\n.style-module_prev__3rIR_ {\n transform: rotate(90deg);\n}\n\n.style-module_arrow__1tlbD {\n width: 32px;\n height: 56px;\n z-index: 3;\n padding: 0;\n border-radius: 8px;\n background-color: #f7f7fd;\n justify-content: center;\n align-items: center;\n stroke: #b8b8c0;\n}\n.style-module_arrow__1tlbD:hover, .style-module_arrow__1tlbD:focus {\n background-color: #f7f7fd;\n cursor: not-allowed;\n}\n\n.style-module_active__2kklB {\n stroke: #26262e;\n}\n.style-module_active__2kklB:hover, .style-module_active__2kklB:focus {\n background-color: #f7f7fd;\n cursor: pointer;\n}\n\n.style-module_noPointerEvents__21KuB {\n visibility: hidden;\n pointer-events: none;\n}";
|
|
15496
15496
|
var styles$j = {"container":"style-module_container__3BxOi","next":"style-module_next__3yJsi","prev":"style-module_prev__3rIR_","arrow":"style-module_arrow__1tlbD","active":"style-module_active__2kklB","noPointerEvents":"style-module_noPointerEvents__21KuB"};
|
|
15497
15497
|
styleInject(css_248z$k);
|
|
15498
15498
|
|
|
@@ -16241,7 +16241,7 @@ var Accordion = function (_a) {
|
|
|
16241
16241
|
}) }));
|
|
16242
16242
|
};
|
|
16243
16243
|
|
|
16244
|
-
var css_248z$a = ".TableCell-module_th__2rjCU {\n vertical-align: middle;\n scroll-snap-align: end;\n width: 50%;\n}\n@media (min-width: 34rem) {\n .TableCell-module_th__2rjCU {\n width: auto;\n scroll-snap-align: unset;\n }\n}\n.TableCell-module_thNavigation__qZ2sY {\n width: 100%;\n}\n@media (min-width: 34rem) {\n .TableCell-module_thNavigation__qZ2sY {\n width: auto;\n }\n}\n\n.TableCell-module_fixedCell__cL3-m {\n position: sticky;\n left: 0;\n z-index: 2;\n}\n.TableCell-module_fixedCell__cL3-m:after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 1px;\n background-color: #f7f7fd;\n}\n\n.TableCell-module_fixedCard__2LO8s {\n position: sticky;\n left: 0;\n right: 0;\n z-index: 2;\n width: 100%;\n}";
|
|
16244
|
+
var css_248z$a = ".TableCell-module_th__2rjCU {\n vertical-align: middle;\n scroll-snap-align: end;\n width: 50%;\n}\n@media (min-width: 34rem) {\n .TableCell-module_th__2rjCU {\n width: auto;\n scroll-snap-align: unset;\n }\n}\n.TableCell-module_thNavigation__qZ2sY {\n width: 100%;\n}\n@media (min-width: 34rem) {\n .TableCell-module_thNavigation__qZ2sY {\n width: auto;\n }\n}\n\n.TableCell-module_fixedCell__cL3-m {\n position: sticky;\n left: 0;\n z-index: 2;\n}\n.TableCell-module_fixedCell__cL3-m:after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 1px;\n background-color: #f7f7fd;\n}\n@media (min-width: 34rem) {\n .TableCell-module_fixedCell__cL3-m {\n padding-left: 16px;\n }\n}\n\n.TableCell-module_fixedCard__2LO8s {\n position: sticky;\n left: 0;\n right: 0;\n z-index: 2;\n width: 100%;\n}";
|
|
16245
16245
|
var styles$a = {"th":"TableCell-module_th__2rjCU","thNavigation":"TableCell-module_thNavigation__qZ2sY","fixedCell":"TableCell-module_fixedCell__cL3-m","fixedCard":"TableCell-module_fixedCard__2LO8s"};
|
|
16246
16246
|
styleInject(css_248z$a);
|
|
16247
16247
|
|
|
@@ -16287,12 +16287,12 @@ var BaseCell = function (_a) {
|
|
|
16287
16287
|
'jc-center': align === 'center',
|
|
16288
16288
|
}), children: jsxRuntime.jsxs("div", { className: classNames$1('d-flex fd-column', alignClassName, (_b = {},
|
|
16289
16289
|
_b[styles$9.maxWidth] = modalContent && align === 'center',
|
|
16290
|
-
_b)), children: [
|
|
16290
|
+
_b)), children: [jsxRuntime.jsxs("div", { className: "d-flex ai-center", children: [(rating === null || rating === void 0 ? void 0 : rating.value) && (jsxRuntime.jsx("span", { "data-testid": "table-cell-rating", title: "".concat(rating === null || rating === void 0 ? void 0 : rating.value, " out of 3"), children: validRatingValues.map(function (value) { return (jsxRuntime.jsx(SelectedIcon, { "aria-hidden": "true", color: value <= (rating === null || rating === void 0 ? void 0 : rating.value) ? 'neutral-900' : 'neutral-400', className: styles$9.icon, size: (rating === null || rating === void 0 ? void 0 : rating.type) === 'zap' ? 16 : 14 }, value)); }) })), checkmarkValue !== undefined && (jsxRuntime.jsx("span", { className: 'd-inline-block mx8', title: checkmarkValue ? 'Yes' : 'No', children: checkmarkValue ? (jsxRuntime.jsx(CheckThickIcon, { noMargin: true, "data-testid": "table-cell-boolean-yes", size: 24, "aria-hidden": true, color: "neutral-900" })) : (jsxRuntime.jsx(XIcon, { noMargin: true, "data-testid": "table-cell-boolean-no", size: 24, "aria-hidden": true, color: "neutral-400" })) })), jsxRuntime.jsxs("div", { className: "d-inline", children: [text && fontVariant === 'NORMAL' && (jsxRuntime.jsx("div", { className: classNames$1("p-p d-inline", { 'ml8': align !== 'left' }), "data-testid": "table-cell-text", children: text })), text && fontVariant === 'PRICE' && (jsxRuntime.jsx("div", { className: "p-h1 p--serif tc-neutral-900", "data-testid": "table-cell-content", children: text })), text && fontVariant === 'TITLE' && (jsxRuntime.jsx("h2", { "aria-hidden": true, className: "tc-grey-800 p-h2 p--serif", children: text })), modalContent && openModal && (jsxRuntime.jsx("span", { className: "ml8", children: jsxRuntime.jsx(TableInfoButton, { onClick: function () {
|
|
16291
16291
|
return openModal({
|
|
16292
16292
|
title: modalTitle,
|
|
16293
16293
|
body: modalContent,
|
|
16294
16294
|
});
|
|
16295
|
-
} }) }))] })] }), description && (jsxRuntime.jsx("div", { className: classNames$1(styles$9.description, 'd-flex p-p--small tc-neutral-600', alignClassName), children: description }))] }) }));
|
|
16295
|
+
} }) }))] })] }), progressBarValue !== undefined && (jsxRuntime.jsx(MiniProgressBar, { nFilledBars: progressBarValue })), description && (jsxRuntime.jsx("div", { className: classNames$1(styles$9.description, 'd-flex p-p--small tc-neutral-600', alignClassName), children: description }))] }) }));
|
|
16296
16296
|
};
|
|
16297
16297
|
|
|
16298
16298
|
var css_248z$7 = ".CTACell-module_narrow__1EPPT {\n height: 40px;\n padding: 8px !important;\n}";
|
|
@@ -16365,7 +16365,6 @@ var TableCell = React__default['default'].memo(function (_a) {
|
|
|
16365
16365
|
_b[styles$a.thNavigation] = isNavigation,
|
|
16366
16366
|
_b[styles$a.fixedCell] = isFirstCellInRow && colSpan < 1,
|
|
16367
16367
|
_b[styles$a.fixedCard] = cellProps.type === 'CARD',
|
|
16368
|
-
_b.pl16 = isFirstCellInRow,
|
|
16369
16368
|
_b)), colSpan: isBelowDesktop && cellProps.type === 'CARD' ? 2 : colSpan, children: [!cellProps.type && (jsxRuntime.jsx(BaseCell, __assign({}, cellProps, { fontVariant: isTopLeftCell
|
|
16370
16369
|
? 'TITLE'
|
|
16371
16370
|
: (_c = cellProps.fontVariant) !== null && _c !== void 0 ? _c : 'NORMAL' }))), cellProps.type === 'CTA' && jsxRuntime.jsx(CTACell, __assign({}, cellProps)), cellProps.type === 'BUTTON' && jsxRuntime.jsx(ButtonCell, __assign({}, cellProps)), cellProps.type === 'CARD' && jsxRuntime.jsx(CardCell, __assign({}, cellProps))] })));
|
|
@@ -16570,6 +16569,7 @@ var useTableNavigation = function (_a) {
|
|
|
16570
16569
|
return {
|
|
16571
16570
|
activeSection: activeSection + 1,
|
|
16572
16571
|
navigateTable: handleScrollToSection,
|
|
16572
|
+
setActiveSection: setActiveSection,
|
|
16573
16573
|
};
|
|
16574
16574
|
};
|
|
16575
16575
|
|
|
@@ -16580,7 +16580,7 @@ styleInject(css_248z$1);
|
|
|
16580
16580
|
var TableControls = function (_a) {
|
|
16581
16581
|
var _b, _c;
|
|
16582
16582
|
var activeSection = _a.activeSection, children = _a.children, columnsLength = _a.columnsLength, stickyHeaderTopOffset = _a.stickyHeaderTopOffset, navigateTable = _a.navigateTable;
|
|
16583
|
-
return (jsxRuntime.jsxs("div", { "aria-hidden": true, className: classNames$1('d-flex ai-stretch jc-between bg-white
|
|
16583
|
+
return (jsxRuntime.jsxs("div", { "aria-hidden": true, className: classNames$1('d-flex ai-stretch jc-between bg-white', styles$1.stickyHeader), style: { top: "".concat(stickyHeaderTopOffset, "px") }, children: [jsxRuntime.jsx("div", { className: 'py24', children: jsxRuntime.jsx(Button, { className: classNames$1((_b = {}, _b[styles$1.controlButtonHidden] = activeSection <= 1, _b), 'br8', styles$1.controlButton), disabled: activeSection <= 1, hideLabel: true, leftIcon: jsxRuntime.jsx(ChevronLeftIcon, {}), onClick: function () { return navigateTable(); }, type: "button", variant: "filledGray", "data-testid": "previous-section-button", style: { height: '100%' }, children: "Previous section" }) }), children, jsxRuntime.jsx("div", { className: 'py24', children: jsxRuntime.jsx(Button, { className: classNames$1((_c = {}, _c[styles$1.controlButtonHidden] = activeSection >= columnsLength - 1, _c), 'br8', styles$1.controlButton), disabled: activeSection >= columnsLength - 1, hideLabel: true, leftIcon: jsxRuntime.jsx(ChevronRightIcon, {}), onClick: function () { return navigateTable(true); }, type: "button", variant: "filledGray", "data-testid": "next-section-button", children: "Next section" }) })] }));
|
|
16584
16584
|
};
|
|
16585
16585
|
|
|
16586
16586
|
var useScrollSync = function (sourceRef, targetRef, enabled) {
|
|
@@ -16617,7 +16617,7 @@ var defaultTextOverrides = {
|
|
|
16617
16617
|
};
|
|
16618
16618
|
var Table = function (_a) {
|
|
16619
16619
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
16620
|
-
var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _k = _a.hideColumns, hideColumns = _k === void 0 ? [] : _k, hideDetails = _a.hideDetails, _l = _a.hideRows, hideRows = _l === void 0 ? [] : _l, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged, _m = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _m === void 0 ? 0 : _m, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title;
|
|
16620
|
+
var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _k = _a.hideColumns, hideColumns = _k === void 0 ? [] : _k, hideDetails = _a.hideDetails, _l = _a.hideRows, hideRows = _l === void 0 ? [] : _l, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged, _m = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _m === void 0 ? 0 : _m, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title, externalActiveSection = _a.activeSection;
|
|
16621
16621
|
var textOverrides = __assign(__assign({}, defaultTextOverrides), definedTextOverrides);
|
|
16622
16622
|
var isMobile = useMediaQuery('BELOW_MOBILE');
|
|
16623
16623
|
var _o = React.useState(null), infoModalData = _o[0], setInfoModalData = _o[1];
|
|
@@ -16630,7 +16630,7 @@ var Table = function (_a) {
|
|
|
16630
16630
|
enabled: isMobile,
|
|
16631
16631
|
containerRef: containerRef,
|
|
16632
16632
|
onSelectionChanged: onSelectionChanged,
|
|
16633
|
-
}), activeSection = _q.activeSection, navigateTable = _q.navigateTable;
|
|
16633
|
+
}), activeSection = _q.activeSection, navigateTable = _q.navigateTable, setActiveSection = _q.setActiveSection;
|
|
16634
16634
|
var titleCell = __assign({ text: '' }, ((_d = (_c = (_b = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _b === void 0 ? void 0 : _b.rows) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d[0]) || {});
|
|
16635
16635
|
var currentActiveSection = (_g = (_f = (_e = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _e === void 0 ? void 0 : _e.rows) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g[activeSection];
|
|
16636
16636
|
var currentActiveSectionReplacements = (currentActiveSection.cellId &&
|
|
@@ -16642,6 +16642,11 @@ var Table = function (_a) {
|
|
|
16642
16642
|
onModalOpen === null || onModalOpen === void 0 ? void 0 : onModalOpen({ body: body, title: title });
|
|
16643
16643
|
setInfoModalData({ body: body, title: title });
|
|
16644
16644
|
}, []);
|
|
16645
|
+
React.useEffect(function () {
|
|
16646
|
+
if (externalActiveSection && externalActiveSection !== activeSection) {
|
|
16647
|
+
setActiveSection(externalActiveSection - 1);
|
|
16648
|
+
}
|
|
16649
|
+
}, [externalActiveSection]);
|
|
16645
16650
|
return (jsxRuntime.jsxs("div", { className: classNames$1(styles$5.wrapper, 'bg-white'), children: [isMobile ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(titleCell === null || titleCell === void 0 ? void 0 : titleCell.text) && (jsxRuntime.jsx(TableCell, __assign({}, titleCell, { align: 'left', isNavigation: true, isTopLeftCell: true, type: undefined }))), jsxRuntime.jsx(TableControls, { activeSection: activeSection, columnsLength: columnsLength, navigateTable: navigateTable, stickyHeaderTopOffset: stickyHeaderTopOffset, children: jsxRuntime.jsx(TableCell, __assign({}, (isBaseCell(currentActiveSection)
|
|
16646
16651
|
? {
|
|
16647
16652
|
openModal: function (body) {
|