@popsure/dirty-swan 0.28.2 → 0.28.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/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +14 -71
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/comparisonTable/components/TableButton/index.d.ts +2 -1
- package/dist/cjs/lib/components/multiDropzone/types.d.ts +0 -1
- package/dist/cjs/lib/index.d.ts +1 -2
- package/dist/cjs/lib/util/generateId/index.d.ts +2 -0
- package/dist/esm/components/autocompleteAddress/demo.js +1 -2
- package/dist/esm/components/autocompleteAddress/demo.js.map +1 -1
- package/dist/esm/components/autocompleteAddress/index.js +1 -2
- package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
- package/dist/esm/components/autocompleteAddress/index.test.js +1 -2
- package/dist/esm/components/autocompleteAddress/index.test.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/Row/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableButton/index.js +2 -2
- package/dist/esm/components/comparisonTable/components/TableButton/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/TableRating/index.js +2 -2
- package/dist/esm/components/comparisonTable/components/TableRating/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/TableRowHeader/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableRowHeader/index.js.map +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.js +1 -2
- package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
- package/dist/esm/components/input/autoSuggestMultiSelect/index.js +1 -2
- package/dist/esm/components/input/autoSuggestMultiSelect/index.js.map +1 -1
- package/dist/esm/components/input/currency/index.js +1 -2
- package/dist/esm/components/input/currency/index.js.map +1 -1
- package/dist/esm/components/input/currency/index.test.js +1 -2
- package/dist/esm/components/input/currency/index.test.js.map +1 -1
- package/dist/esm/components/input/iban/index.js +1 -2
- package/dist/esm/components/input/iban/index.js.map +1 -1
- package/dist/esm/components/input/index.js +2 -3
- package/dist/esm/components/input/index.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.js +2 -3
- package/dist/esm/components/multiDropzone/index.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.test.js +1 -2
- package/dist/esm/components/multiDropzone/index.test.js.map +1 -1
- package/dist/esm/index-a5a71d5e.js +12 -0
- package/dist/esm/index-a5a71d5e.js.map +1 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/components/comparisonTable/components/TableButton/index.d.ts +2 -1
- package/dist/esm/lib/components/multiDropzone/types.d.ts +0 -1
- package/dist/esm/lib/index.d.ts +1 -2
- package/dist/esm/lib/util/generateId/index.d.ts +2 -0
- package/package.json +2 -4
- package/src/index.tsx +8 -1
- package/src/lib/components/comparisonTable/components/Row/style.module.scss +4 -4
- package/src/lib/components/comparisonTable/components/TableButton/index.tsx +5 -1
- package/src/lib/components/comparisonTable/components/TableButton/style.module.scss +12 -4
- package/src/lib/components/comparisonTable/components/TableRating/index.tsx +2 -2
- package/src/lib/components/comparisonTable/components/TableRowHeader/index.tsx +1 -1
- package/src/lib/components/comparisonTable/index.stories.mdx +57 -7
- package/src/lib/components/input/index.tsx +2 -2
- package/src/lib/components/multiDropzone/index.tsx +2 -2
- package/src/lib/components/multiDropzone/types.ts +0 -1
- package/src/lib/index.tsx +7 -8
- package/src/lib/util/generateId/index.test.ts +10 -0
- package/src/lib/util/generateId/index.ts +15 -0
- package/dist/esm/v4-d2999257.js +0 -69
- package/dist/esm/v4-d2999257.js.map +0 -1
|
@@ -9,9 +9,8 @@ import 'react-dom/test-utils';
|
|
|
9
9
|
import '../../index-e9e37a34.js';
|
|
10
10
|
import '../../index-1463d5e9.js';
|
|
11
11
|
import '../input/index.js';
|
|
12
|
+
import '../../index-a5a71d5e.js';
|
|
12
13
|
import '../../style-inject.es-1f59c1d0.js';
|
|
13
|
-
import '../../v4-d2999257.js';
|
|
14
|
-
import 'crypto';
|
|
15
14
|
|
|
16
15
|
var address = {
|
|
17
16
|
street: 'Köpeniker Strasse',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sources":["../../../../../src/lib/components/autocompleteAddress/index.test.tsx"],"sourcesContent":["import { Address } from '@popsure/public-models';\nimport { fireEvent, render } from '../../util/testUtils';\n\nimport AutoCompleteAddress from '.';\n\nconst address = {\n street: 'Köpeniker Strasse',\n houseNumber: '4000',\n postcode: '10179',\n city: 'Berlin',\n country: 'DE',\n};\n\nconst setup = (\n address: Partial<Address> | undefined = undefined,\n onAddressChange: (address: Partial<Address>) => void = () => {}\n) => {\n return render(\n <AutoCompleteAddress\n address={address}\n apiKey={''}\n onAddressChange={onAddressChange}\n />\n );\n};\n\nconst inputTestId = 'ds-input-input';\n\ndescribe('AutocompleteAddress component', () => {\n it('Should show all address fields once a search is completed', async () => {\n // @ts-ignore\n window.google.maps.places.Autocomplete = class {\n reference: HTMLElement;\n constructor(reference: HTMLElement) {\n this.reference = reference;\n }\n // @ts-ignore\n addListener(_action, callback) {\n this.reference.addEventListener('change', (e: Event) =>\n (e.target as HTMLInputElement).value !== ''\n ? callback({\n geometry: {\n location: class {},\n },\n address_components: [\n {\n long_name: 'Köpeniker Strasse',\n short_name: 'Köpeniker Strasse',\n types: ['route'],\n },\n ],\n })\n : null\n );\n }\n };\n\n const { getAllByTestId, getByDisplayValue, getByTestId } = setup();\n\n fireEvent.change(getByTestId(inputTestId), {\n target: { value: 'Köpeniker' },\n });\n\n expect(getAllByTestId(inputTestId).length).toEqual(5);\n expect(getByDisplayValue(\"Köpeniker Strasse\")).toBeVisible();\n });\n\n it('Should enable to enter the address manually', async () => {\n const callback = jest.fn();\n const { findByText, getAllByTestId, user } = setup(undefined, callback);\n const btn = await findByText('Enter address manually');\n\n await user.click(btn);\n\n // fill out all fields\n const inputs = getAllByTestId(inputTestId);\n\n await user.type(inputs[0], 'Köpeniker Strasse');\n await user.type(inputs[1], '4000');\n await user.type(inputs[3], '10179');\n await user.type(inputs[4], 'Berlin');\n\n // callback should be called with a complete address\n expect(callback).toHaveBeenCalledWith(address);\n });\n\n it('Should prefill fields if an address is provided', async () => {\n const { getByDisplayValue } = setup(address);\n\n expect(getByDisplayValue(\"Köpeniker Strasse\")).toBeVisible();\n expect(getByDisplayValue(\"4000\")).toBeVisible();\n expect(getByDisplayValue(\"10179\")).toBeVisible();\n expect(getByDisplayValue(\"Berlin\")).toBeVisible();\n });\n});\n"],"names":["render","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.test.js","sources":["../../../../../src/lib/components/autocompleteAddress/index.test.tsx"],"sourcesContent":["import { Address } from '@popsure/public-models';\nimport { fireEvent, render } from '../../util/testUtils';\n\nimport AutoCompleteAddress from '.';\n\nconst address = {\n street: 'Köpeniker Strasse',\n houseNumber: '4000',\n postcode: '10179',\n city: 'Berlin',\n country: 'DE',\n};\n\nconst setup = (\n address: Partial<Address> | undefined = undefined,\n onAddressChange: (address: Partial<Address>) => void = () => {}\n) => {\n return render(\n <AutoCompleteAddress\n address={address}\n apiKey={''}\n onAddressChange={onAddressChange}\n />\n );\n};\n\nconst inputTestId = 'ds-input-input';\n\ndescribe('AutocompleteAddress component', () => {\n it('Should show all address fields once a search is completed', async () => {\n // @ts-ignore\n window.google.maps.places.Autocomplete = class {\n reference: HTMLElement;\n constructor(reference: HTMLElement) {\n this.reference = reference;\n }\n // @ts-ignore\n addListener(_action, callback) {\n this.reference.addEventListener('change', (e: Event) =>\n (e.target as HTMLInputElement).value !== ''\n ? callback({\n geometry: {\n location: class {},\n },\n address_components: [\n {\n long_name: 'Köpeniker Strasse',\n short_name: 'Köpeniker Strasse',\n types: ['route'],\n },\n ],\n })\n : null\n );\n }\n };\n\n const { getAllByTestId, getByDisplayValue, getByTestId } = setup();\n\n fireEvent.change(getByTestId(inputTestId), {\n target: { value: 'Köpeniker' },\n });\n\n expect(getAllByTestId(inputTestId).length).toEqual(5);\n expect(getByDisplayValue(\"Köpeniker Strasse\")).toBeVisible();\n });\n\n it('Should enable to enter the address manually', async () => {\n const callback = jest.fn();\n const { findByText, getAllByTestId, user } = setup(undefined, callback);\n const btn = await findByText('Enter address manually');\n\n await user.click(btn);\n\n // fill out all fields\n const inputs = getAllByTestId(inputTestId);\n\n await user.type(inputs[0], 'Köpeniker Strasse');\n await user.type(inputs[1], '4000');\n await user.type(inputs[3], '10179');\n await user.type(inputs[4], 'Berlin');\n\n // callback should be called with a complete address\n expect(callback).toHaveBeenCalledWith(address);\n });\n\n it('Should prefill fields if an address is provided', async () => {\n const { getByDisplayValue } = setup(address);\n\n expect(getByDisplayValue(\"Köpeniker Strasse\")).toBeVisible();\n expect(getByDisplayValue(\"4000\")).toBeVisible();\n expect(getByDisplayValue(\"10179\")).toBeVisible();\n expect(getByDisplayValue(\"Berlin\")).toBeVisible();\n });\n});\n"],"names":["render","_jsx"],"mappings":";;;;;;;;;;;;;;AAKA,IAAM,OAAO,GAAG;IACd,MAAM,EAAE,mBAAmB;IAC3B,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,IAAM,KAAK,GAAG,UACZ,OAAiD,EACjD,eAA+D;IAD/D,wBAAA,EAAA,mBAAiD;IACjD,gCAAA,EAAA,iCAA+D;IAE/D,OAAOA,YAAM,CACXC,IAAC,mBAAmB,IAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,EAAE,EACV,eAAe,EAAE,eAAe,WAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC,QAAQ,CAAC,+BAA+B,EAAE;IACxC,EAAE,CAAC,2DAA2D,EAAE;;;;YAE9D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY;gBAEpC,iBAAY,SAAsB;oBAChC,IAAI,CAAC,SAAS,GAAG,SAAS,CAA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
|
-
var css_248z = ".style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: var(--tableWidth);\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: 256px;\n width: var(--cellWidth, 256px);\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;\n color: #4c4c53;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\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 256px;\n flex: 1 0 var(--cellWidth, 256px);\n width: 256px;\n width: var(--cellWidth, 256px);\n padding: 24px;\n }\n .style-module_cell__1NoZ6:last-child {\n padding: 24px 8px 24px 24px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(288px, calc(var(--tableWidth) / 2));\n max-width: min(var(--firstColumnWidth, 288px), calc(var(--tableWidth) / 2));\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n}\n.style-module_title__1xYvu:after {\n content: \"\";\n display: block;\n position: absolute;\n top: calc( 50% + 16px );\n height: 4px;\n width: 100%;\n max-width: 140px;\n background-color: #8e8cee;\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 #fafaff;\n flex: 1 0 288px;\n }\n}\n\
|
|
6
|
+
var css_248z = ".style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: var(--tableWidth);\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: 256px;\n width: var(--cellWidth, 256px);\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;\n color: #4c4c53;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\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 256px;\n flex: 1 0 var(--cellWidth, 256px);\n width: 256px;\n width: var(--cellWidth, 256px);\n padding: 24px;\n }\n .style-module_cell__1NoZ6:last-child {\n padding: 24px 8px 24px 24px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(288px, calc(var(--tableWidth) / 2));\n max-width: min(var(--firstColumnWidth, 288px), calc(var(--tableWidth) / 2));\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n}\n.style-module_title__1xYvu:after {\n content: \"\";\n display: block;\n position: absolute;\n top: calc( 50% + 16px );\n height: 4px;\n width: 100%;\n max-width: 140px;\n background-color: #8e8cee;\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 #fafaff;\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: 100vw;\n}\n@media (min-width: 64rem) {\n h4.style-module_addon__CPf60 {\n max-width: 976px;\n }\n}";
|
|
7
7
|
var styles = {"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"};
|
|
8
8
|
styleInject(css_248z);
|
|
9
9
|
|
|
@@ -2,13 +2,13 @@ import { _ as __assign } from '../../../../tslib.es6-5bc94358.js';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { s as styleInject } from '../../../../style-inject.es-1f59c1d0.js';
|
|
4
4
|
|
|
5
|
-
var css_248z = ".style-module_button__2W-YC {\n background-color: transparent;\n
|
|
5
|
+
var css_248z = ".style-module_button__2W-YC {\n background-color: transparent;\n color: #4c4c53;\n cursor: pointer;\n margin: 2px 0;\n padding: 2px;\n transition: color 0.3s ease;\n}\n.style-module_button__2W-YC span {\n border-bottom: 2px dashed #696970;\n display: inline;\n transition: border-color 0.3s ease;\n}\n.style-module_button__2W-YC:hover, .style-module_button__2W-YC:focus {\n color: #8e8cee;\n outline-color: #8e8cee;\n}\n.style-module_button__2W-YC:hover span, .style-module_button__2W-YC:focus span {\n border-color: #8e8cee;\n}";
|
|
6
6
|
var styles = {"button":"style-module_button__2W-YC"};
|
|
7
7
|
styleInject(css_248z);
|
|
8
8
|
|
|
9
9
|
var TableButton = function (_a) {
|
|
10
10
|
var children = _a.children, onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
11
|
-
return (jsx("button", __assign({ className: styles.button + " " + className, "data-testid": "ds-table-button", onClick: onClick }, { children: children }), void 0));
|
|
11
|
+
return (jsx("button", __assign({ className: styles.button + " " + className, "data-testid": "ds-table-button", onClick: onClick }, { children: jsx("span", { children: children }, void 0) }), void 0));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export default TableButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableButton/index.tsx"],"sourcesContent":["import styles from './style.module.scss';\n\ninterface Props {\n onClick: () => void;\n className?: string;\n}\n\nconst TableButton: React.FC<Props> = ({\n children,\n onClick,\n className = '',\n}) => (\n <button\n className={`${styles.button} ${className}`}\n data-testid=\"ds-table-button\"\n onClick={onClick}\n >\n {children}\n </button>\n);\n\nexport default TableButton;\n"],"names":["_jsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableButton/index.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport styles from './style.module.scss';\n\ninterface Props {\n children: ReactNode;\n onClick: () => void;\n className?: string;\n}\n\nconst TableButton: React.FC<Props> = ({\n children,\n onClick,\n className = '',\n}) => (\n <button\n className={`${styles.button} ${className}`}\n data-testid=\"ds-table-button\"\n onClick={onClick}\n >\n <span>\n {children}\n </span>\n </button>\n);\n\nexport default TableButton;\n"],"names":["_jsx"],"mappings":";;;;;;;;IASM,WAAW,GAAoB,UAAC,EAIrC;QAHC,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA;IACV,QACJA,yBACE,SAAS,EAAK,MAAM,CAAC,MAAM,SAAI,SAAW,iBAC9B,iBAAiB,EAC7B,OAAO,EAAE,OAAO,gBAEhBA,wBACG,QAAQ,WACJ,YACA;AATL;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { c as classnames } from '../../../../index-e9e37a34.js';
|
|
3
3
|
import StarIcon from './StarIcon.js';
|
|
4
4
|
import ZapIcon from './ZapIcon.js';
|
|
@@ -20,7 +20,7 @@ var VALID_VALUES = [1, 2, 3];
|
|
|
20
20
|
var TableRating = function (props) {
|
|
21
21
|
var rating = props.rating, type = props.type;
|
|
22
22
|
var SelectedIcon = getRatingIcon(type);
|
|
23
|
-
return (jsx(
|
|
23
|
+
return (jsx(Fragment, { children: VALID_VALUES.map(function (value) { return (jsx(SelectedIcon, { className: classnames(styles.icon, value <= rating ? styles.filled : styles.empty) }, value)); }) }, void 0));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export default TableRating;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableRating/index.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport StarIcon from './StarIcon';\nimport ZapIcon from './ZapIcon';\n\nimport styles from './style.module.scss';\n\ntype RatingTypes = 'star' | 'zap';\n\ninterface TableRatingProps {\n type: RatingTypes;\n rating: number;\n}\n\nconst getRatingIcon = (type: RatingTypes) => {\n const iconDictionary = {\n zap: ZapIcon,\n star: StarIcon,\n };\n\n return iconDictionary[type] || iconDictionary['star'];\n};\n\nconst VALID_VALUES = [1, 2, 3];\n\nconst TableRating = (props: TableRatingProps) => {\n const { rating, type } = props;\n const SelectedIcon = getRatingIcon(type);\n\n return (\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableRating/index.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport StarIcon from './StarIcon';\nimport ZapIcon from './ZapIcon';\n\nimport styles from './style.module.scss';\n\ntype RatingTypes = 'star' | 'zap';\n\ninterface TableRatingProps {\n type: RatingTypes;\n rating: number;\n}\n\nconst getRatingIcon = (type: RatingTypes) => {\n const iconDictionary = {\n zap: ZapIcon,\n star: StarIcon,\n };\n\n return iconDictionary[type] || iconDictionary['star'];\n};\n\nconst VALID_VALUES = [1, 2, 3];\n\nconst TableRating = (props: TableRatingProps) => {\n const { rating, type } = props;\n const SelectedIcon = getRatingIcon(type);\n\n return (\n <>\n {VALID_VALUES.map((value) => (\n <SelectedIcon\n key={value}\n className={classNames(\n styles.icon,\n value <= rating ? styles.filled : styles.empty\n )}\n />\n ))}\n </>\n );\n};\n\nexport default TableRating;\n"],"names":["_jsx","classNames"],"mappings":";;;;;;;;;;;AAcA,IAAM,aAAa,GAAG,UAAC,IAAiB;IACtC,IAAM,cAAc,GAAG;QACrB,GAAG,EAAE,OAAO;QACZ,IAAI,EAAE,QAAQ;KACf,CAAC;IAEF,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,IAAM,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEzB,WAAW,GAAG,UAAC,KAAuB;IAClC,IAAA,MAAM,GAAW,KAAK,OAAhB,EAAE,IAAI,GAAK,KAAK,KAAV,CAAW;IAC/B,IAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEzC,QACEA,0BACG,YAAY,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,QAC3BA,IAAC,YAAY,IAEX,SAAS,EAAEC,UAAU,CACnB,MAAM,CAAC,IAAI,EACX,KAAK,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAC/C,IAJI,KAAK,CAKV,IACH,CAAC,WACD,EACH;AACJ;;;;"}
|
|
@@ -10,7 +10,7 @@ styleInject(css_248z);
|
|
|
10
10
|
var TableRowHeader = function (_a) {
|
|
11
11
|
var icon = _a.icon, label = _a.label, subtitle = _a.subtitle, onClickInfo = _a.onClickInfo;
|
|
12
12
|
return (jsxs("div", __assign({ className: "d-flex" }, { children: [icon && jsx("span", __assign({ className: "mr8 " + styles.icon }, { children: icon }), void 0),
|
|
13
|
-
jsxs("div", { children: [jsx("p", __assign({ className: "p-p d-inline" }, { children: !onClickInfo ? (jsx("span", { children: label }, void 0)) : (jsx(TableButton, __assign({ className: "mr8", onClick: onClickInfo }, { children: label }), void 0)) }), void 0),
|
|
13
|
+
jsxs("div", { children: [jsx("p", __assign({ className: "p-p d-inline" }, { children: !onClickInfo ? (jsx("span", { children: label }, void 0)) : (jsx(TableButton, __assign({ className: "mr8 ta-left", onClick: onClickInfo }, { children: label }), void 0)) }), void 0),
|
|
14
14
|
subtitle && jsx("p", __assign({ className: "p-p--small tc-grey-500" }, { children: subtitle }), void 0)] }, void 0)] }), void 0));
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableRowHeader/index.tsx"],"sourcesContent":["import TableButton from '../TableButton';\nimport styles from './style.module.scss';\n\ninterface TableRowHeaderProps {\n label: string;\n icon?: string;\n subtitle?: string;\n onClickInfo?: () => void;\n}\n\nconst TableRowHeader = ({ icon, label, subtitle, onClickInfo }: TableRowHeaderProps) => (\n <div className=\"d-flex\">\n {icon && <span className={`mr8 ${styles.icon}`}>{icon}</span>}\n <div>\n <p className=\"p-p d-inline\">\n {!onClickInfo ? (\n <span>{label}</span>\n ) : (\n <TableButton className=\"mr8\" onClick={onClickInfo}>\n {label}\n </TableButton>\n )}\n </p>\n {subtitle && <p className=\"p-p--small tc-grey-500\">{subtitle}</p>}\n </div>\n </div>\n);\n\nexport type { TableRowHeaderProps };\nexport default TableRowHeader;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;IAUM,cAAc,GAAG,UAAC,EAA2D;QAAzD,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,WAAW,iBAAA;IAA4B,QACtFA,uBAAK,SAAS,EAAC,QAAQ,iBACpB,IAAI,IAAIC,uBAAM,SAAS,EAAE,SAAO,MAAM,CAAC,IAAM,gBAAG,IAAI,YAAQ;YAC7DD,yBACEC,oBAAG,SAAS,EAAC,cAAc,gBACxB,CAAC,WAAW,IACXA,wBAAO,KAAK,WAAQ,KAEpBA,IAAC,WAAW,aAAC,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableRowHeader/index.tsx"],"sourcesContent":["import TableButton from '../TableButton';\nimport styles from './style.module.scss';\n\ninterface TableRowHeaderProps {\n label: string;\n icon?: string;\n subtitle?: string;\n onClickInfo?: () => void;\n}\n\nconst TableRowHeader = ({ icon, label, subtitle, onClickInfo }: TableRowHeaderProps) => (\n <div className=\"d-flex\">\n {icon && <span className={`mr8 ${styles.icon}`}>{icon}</span>}\n <div>\n <p className=\"p-p d-inline\">\n {!onClickInfo ? (\n <span>{label}</span>\n ) : (\n <TableButton className=\"mr8 ta-left\" onClick={onClickInfo}>\n {label}\n </TableButton>\n )}\n </p>\n {subtitle && <p className=\"p-p--small tc-grey-500\">{subtitle}</p>}\n </div>\n </div>\n);\n\nexport type { TableRowHeaderProps };\nexport default TableRowHeader;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;IAUM,cAAc,GAAG,UAAC,EAA2D;QAAzD,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,WAAW,iBAAA;IAA4B,QACtFA,uBAAK,SAAS,EAAC,QAAQ,iBACpB,IAAI,IAAIC,uBAAM,SAAS,EAAE,SAAO,MAAM,CAAC,IAAM,gBAAG,IAAI,YAAQ;YAC7DD,yBACEC,oBAAG,SAAS,EAAC,cAAc,gBACxB,CAAC,WAAW,IACXA,wBAAO,KAAK,WAAQ,KAEpBA,IAAC,WAAW,aAAC,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,WAAW,gBACtD,KAAK,YACM,CACf,YACC;oBACH,QAAQ,IAAIA,oBAAG,SAAS,EAAC,wBAAwB,gBAAE,QAAQ,YAAK,YAC7D,aACF;AAfgF;;;;"}
|
|
@@ -6,8 +6,7 @@ import { p as propTypes } from '../../../index-171a0108.js';
|
|
|
6
6
|
import { s as styleInject } from '../../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
import Input from '../index.js';
|
|
8
8
|
import '../../../index-dd80248b.js';
|
|
9
|
-
import '../../../
|
|
10
|
-
import 'crypto';
|
|
9
|
+
import '../../../index-a5a71d5e.js';
|
|
11
10
|
|
|
12
11
|
var Autosuggest = {};
|
|
13
12
|
|