@popsure/dirty-swan 0.66.28 → 0.66.30
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 +12 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/dateSelector/index.d.ts +0 -1
- package/dist/cjs/lib/components/downloadButton/index.test.d.ts +1 -0
- package/dist/cjs/lib/components/input/autoSuggestInput/index.test.d.ts +1 -0
- package/dist/cjs/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +0 -1
- package/dist/cjs/lib/components/table/components/TableCell/ButtonCell/ButtonCell.d.ts +1 -2
- package/dist/cjs/lib/components/table/components/TableCell/ButtonCell/ButtonCell.stories.d.ts +1 -1
- package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +1 -2
- package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +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/autocompleteAddress/index.test.js +21 -12
- package/dist/esm/components/autocompleteAddress/index.test.js.map +1 -1
- package/dist/esm/components/dateSelector/index.js +1 -1
- package/dist/esm/components/dateSelector/index.js.map +1 -1
- package/dist/esm/components/downloadButton/index.js +1 -1
- package/dist/esm/components/downloadButton/index.js.map +1 -1
- package/dist/esm/components/downloadButton/index.test.js +25 -0
- package/dist/esm/components/downloadButton/index.test.js.map +1 -0
- package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.test.js +24 -0
- package/dist/esm/components/input/autoSuggestInput/index.test.js.map +1 -0
- package/dist/esm/components/input/checkbox/index.js +1 -1
- package/dist/esm/components/input/checkbox/index.js.map +1 -1
- package/dist/esm/components/input/radio/index.js +1 -1
- package/dist/esm/components/input/radio/index.js.map +1 -1
- package/dist/esm/components/input/toggle/index.js +1 -1
- package/dist/esm/components/input/toggle/index.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js +2 -2
- package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js +2 -2
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js.map +1 -1
- package/dist/esm/lib/components/dateSelector/index.d.ts +0 -1
- package/dist/esm/lib/components/downloadButton/index.test.d.ts +1 -0
- package/dist/esm/lib/components/input/autoSuggestInput/index.test.d.ts +1 -0
- package/dist/esm/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +0 -1
- package/dist/esm/lib/components/table/components/TableCell/ButtonCell/ButtonCell.d.ts +1 -2
- package/dist/esm/lib/components/table/components/TableCell/ButtonCell/ButtonCell.stories.d.ts +1 -1
- package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +1 -2
- package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/autocompleteAddress/index.test.tsx +17 -11
- package/src/lib/components/autocompleteAddress/index.tsx +7 -7
- package/src/lib/components/dateSelector/index.tsx +0 -2
- package/src/lib/components/downloadButton/index.test.tsx +22 -0
- package/src/lib/components/downloadButton/index.tsx +1 -1
- package/src/lib/components/input/autoSuggestInput/index.test.tsx +22 -0
- package/src/lib/components/input/autoSuggestInput/index.tsx +1 -1
- package/src/lib/components/input/checkbox/index.tsx +0 -1
- package/src/lib/components/input/radio/index.tsx +0 -1
- package/src/lib/components/input/toggle/index.tsx +0 -1
- package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +0 -1
- package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.tsx +0 -3
- package/src/lib/components/table/components/TableCell/CTACell/CTACell.tsx +0 -3
package/dist/cjs/index.js
CHANGED
|
@@ -10096,7 +10096,7 @@ var DateSelector = function (_a) {
|
|
|
10096
10096
|
};
|
|
10097
10097
|
var getInputProps = function (key, index) {
|
|
10098
10098
|
var _a, _b;
|
|
10099
|
-
return (__assign({ 'data-
|
|
10099
|
+
return (__assign({ 'data-testid': "date-selector-".concat(key), className: styles$L["".concat(key, "Input")], id: key, name: key, maxLength: key === 'year' ? 4 : 2, required: true, label: placeholders === null || placeholders === void 0 ? void 0 : placeholders[key], placeholder: (_a = placeholders === null || placeholders === void 0 ? void 0 : placeholders["".concat(key, "Format")]) !== null && _a !== void 0 ? _a : "", labelInsideInput: true, value: (_b = internalValue[key]) !== null && _b !== void 0 ? _b : '', error: hasError && isDirty, type: "text", inputMode: "numeric", ref: function (el) { itemsRef.current[index] = el; }, onKeyUp: function (event) { return handleOnKeyUp(event, index); }, onKeyDown: function (event) { return handleOnKeyDown(event, index); }, onChange: function (_a) {
|
|
10100
10100
|
var target = _a.target;
|
|
10101
10101
|
return handleOnChange(key, target.value);
|
|
10102
10102
|
} }, (inputProps === null || inputProps === void 0 ? void 0 : inputProps(key)) || {}));
|
|
@@ -11224,8 +11224,8 @@ var AutocompleteAddress = function (_a) {
|
|
|
11224
11224
|
};
|
|
11225
11225
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames("wmx8 bg-neutral-600 ".concat(styles$G['map-container']), (_b = {},
|
|
11226
11226
|
_b[styles$G['map-container--hidden']] = place === null,
|
|
11227
|
-
_b)), children: [jsxRuntime.jsx("div", { className: styles$G.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$G['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-
|
|
11228
|
-
'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$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-
|
|
11227
|
+
_b)), children: [jsxRuntime.jsx("div", { className: styles$G.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$G['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-testid": "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-testid": "google-api-loader", className: styles$G['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$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-testid": "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$G['house-number-input']), "data-testid": "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-testid": "autocomplete-additional-info", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.additionalInformation) ||
|
|
11228
|
+
'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$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-testid": "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-testid": "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' })] }))] }));
|
|
11229
11229
|
};
|
|
11230
11230
|
|
|
11231
11231
|
var propTypes$2 = {exports: {}};
|
|
@@ -14571,7 +14571,7 @@ styleInject(css_248z$E);
|
|
|
14571
14571
|
|
|
14572
14572
|
var InitialButton = function (_a) {
|
|
14573
14573
|
var onDownload = _a.onDownload;
|
|
14574
|
-
return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$D.button), leftIcon: jsxRuntime.jsx(DownloadIcon, {}), onClick: onDownload, "data-
|
|
14574
|
+
return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$D.button), leftIcon: jsxRuntime.jsx(DownloadIcon, {}), onClick: onDownload, "data-testid": "download-documents-button", children: "Download" }));
|
|
14575
14575
|
};
|
|
14576
14576
|
// TODO: Allow setting loading to true to display text
|
|
14577
14577
|
var GeneratingButton = function () { return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$D.button), loading: true, children: "Generating" })); };
|
|
@@ -14744,7 +14744,7 @@ var Checkbox = function (_a) {
|
|
|
14744
14744
|
'p-label--bordered': bordered,
|
|
14745
14745
|
'jc-center': customIcon,
|
|
14746
14746
|
'fd-column': customIcon,
|
|
14747
|
-
}), "data-
|
|
14747
|
+
}), "data-testid": "checkbox-".concat(currentValue), children: [customIcon && jsxRuntime.jsx("div", { className: "mt8", children: customIcon === null || customIcon === void 0 ? void 0 : customIcon(checked) }), isCheckboxLabelObject(label) ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { className: "p-p", children: label.title }), jsxRuntime.jsx("span", { className: "d-block p-p p-p--small tc-neutral-700", children: label.description })] })) : (label)] })] }, currentValue));
|
|
14748
14748
|
})] }));
|
|
14749
14749
|
};
|
|
14750
14750
|
|
|
@@ -14778,7 +14778,7 @@ var Radio = function (_a) {
|
|
|
14778
14778
|
'jc-center': customIcon && !inlineIcon,
|
|
14779
14779
|
'fd-column': customIcon && !inlineIcon,
|
|
14780
14780
|
'p-label--bordered': bordered,
|
|
14781
|
-
}), "data-
|
|
14781
|
+
}), "data-testid": "radio-".concat(currentValue), children: [customIcon && (jsxRuntime.jsx("div", { className: classNames('d-inline-flex ai-center jc-center', inlineIcon ? 'mr8' : 'mt8'), children: customIcon === null || customIcon === void 0 ? void 0 : customIcon(checked) })), isRadioLabelObject(label) ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { className: "p-p", children: label.title }), jsxRuntime.jsx("span", { className: "d-block p-p p-p--small tc-neutral-700", children: label.description })] })) : (label)] })] }, currentValue));
|
|
14782
14782
|
})] }));
|
|
14783
14783
|
};
|
|
14784
14784
|
|
|
@@ -20100,7 +20100,7 @@ var AutoSuggestInput = function (_a) {
|
|
|
20100
20100
|
_a)), children: suggestion.value })] }));
|
|
20101
20101
|
};
|
|
20102
20102
|
var getSuggestionValue = function (suggestion) { return suggestion.value; };
|
|
20103
|
-
var renderInputComponent = function (autoSuggestInputProps) { return (jsxRuntime.jsx(Input, __assign({}, autoSuggestInputProps, { placeholder: placeholder, "data-
|
|
20103
|
+
var renderInputComponent = function (autoSuggestInputProps) { return (jsxRuntime.jsx(Input, __assign({}, autoSuggestInputProps, { placeholder: placeholder, "data-testid": "suggest-multi-select-input" }))); };
|
|
20104
20104
|
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(Autosuggest, { theme: styles$p, suggestions: suggestions, onSuggestionsFetchRequested: handleSuggestionFetchRequest, onSuggestionsClearRequested: handleSuggestionClearRequest, getSuggestionValue: getSuggestionValue, renderSuggestion: renderSuggestion, highlightFirstSuggestion: true, inputProps: __assign(__assign({}, inputProps), { value: currentOption, onChange: function (_, _a) {
|
|
20105
20105
|
var newValue = _a.newValue;
|
|
20106
20106
|
onChange(newValue);
|
|
@@ -22405,7 +22405,7 @@ var Toggle = function (_a) {
|
|
|
22405
22405
|
var checked = value === null || value === void 0 ? void 0 : value.includes(currentValue);
|
|
22406
22406
|
return (jsxRuntime.jsx("div", { className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option, children: jsxRuntime.jsxs("label", { className: classNames(styles$e.label, classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label pr16 gap16', {
|
|
22407
22407
|
'p-label--bordered': bordered,
|
|
22408
|
-
}), "data-
|
|
22408
|
+
}), "data-testid": "toggle-".concat(currentValue), children: [jsxRuntime.jsxs("span", { className: classNames(styles$e.toggleContainer, 'd-inline-block'), children: [jsxRuntime.jsx("input", { checked: checked, className: styles$e.input, "data-testid": "toggle-input-".concat(currentValue), onChange: function () { return handleOnChange(currentValue); }, type: "checkbox", value: currentValue, disabled: disabled }), jsxRuntime.jsx("span", { className: styles$e.toggle })] }), isToggleLabelObject(label) ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { className: "p-p", children: label.title }), jsxRuntime.jsx("span", { className: "d-block p-p p-p--small tc-neutral-700", children: label.description })] })) : label] }) }, currentValue));
|
|
22409
22409
|
}) }));
|
|
22410
22410
|
};
|
|
22411
22411
|
|
|
@@ -22727,11 +22727,11 @@ var IconRenderer = function (_a) {
|
|
|
22727
22727
|
|
|
22728
22728
|
var CTACell = function (_a) {
|
|
22729
22729
|
var _b;
|
|
22730
|
-
var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, centered = _a.centered, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className,
|
|
22730
|
+
var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, centered = _a.centered, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataTestId = _a.dataTestId, onClick = _a.onClick;
|
|
22731
22731
|
var renderedIcon = (jsxRuntime.jsx(IconRenderer, { icon: icon, imageComponent: imageComponent }));
|
|
22732
22732
|
return (jsxRuntime.jsxs("div", { className: classNames(className, 'ta-left', {
|
|
22733
22733
|
'd-flex fd-column ai-center': centered,
|
|
22734
|
-
}), "data-
|
|
22734
|
+
}), "data-testid": dataTestId, children: [jsxRuntime.jsxs("div", { className: "d-flex ai-center gap8", children: [renderedIcon, jsxRuntime.jsxs("p", { className: "p-h3", children: [title, price && jsxRuntime.jsxs("span", { className: "tc-purple-600", children: [" ", price] })] })] }), jsxRuntime.jsx(Button, __assign({}, onClick ? { onClick: onClick } : {
|
|
22735
22735
|
as: 'a',
|
|
22736
22736
|
href: href,
|
|
22737
22737
|
target: '_blank',
|
|
@@ -22756,8 +22756,8 @@ styleInject(css_248z$7);
|
|
|
22756
22756
|
|
|
22757
22757
|
var ButtonCell = function (_a) {
|
|
22758
22758
|
var _b;
|
|
22759
|
-
var isSelected = _a.isSelected, onClick = _a.onClick, buttonCaption = _a.buttonCaption, price = _a.price, disabled = _a.disabled, className = _a.className,
|
|
22760
|
-
return (jsxRuntime.jsx("div", { className: classNames("w100 d-flex fd-column ai-start jc-center gap8", styles$7.wrapper, className), "data-
|
|
22759
|
+
var isSelected = _a.isSelected, onClick = _a.onClick, buttonCaption = _a.buttonCaption, price = _a.price, disabled = _a.disabled, className = _a.className, dataTestId = _a.dataTestId;
|
|
22760
|
+
return (jsxRuntime.jsx("div", { className: classNames("w100 d-flex fd-column ai-start jc-center gap8", styles$7.wrapper, className), "data-testid": dataTestId, children: jsxRuntime.jsxs("button", { className: classNames('w100 wmx5', styles$7.buttonCell, (_b = {},
|
|
22761
22761
|
_b[styles$7.selected] = isSelected,
|
|
22762
22762
|
_b[styles$7.disabled] = disabled,
|
|
22763
22763
|
_b)), type: "button", onClick: onClick, disabled: disabled, children: [jsxRuntime.jsxs("div", { className: "d-flex fd-column ai-start", children: [jsxRuntime.jsx("span", { className: "p-p fw-bold", children: buttonCaption }), price && jsxRuntime.jsx("span", { className: "p-p", children: price })] }), !disabled && (isSelected ? (jsxRuntime.jsx(CircleSelectedIcon, { size: 16 })) : (jsxRuntime.jsx(CircleUnselectedIcon, { size: 16 })))] }) }));
|