@popsure/dirty-swan 0.58.3 → 0.58.5
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 +110 -59
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/icon/icons/Bone.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Car.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Files.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Id.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Prohibit.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Receipt.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Signature.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Stamp.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/Translation.d.ts +4 -0
- package/dist/cjs/lib/components/icon/icons/index.d.ts +9 -0
- package/dist/cjs/lib/components/multiDropzone/index.stories.d.ts +9 -0
- package/dist/cjs/lib/components/multiDropzone/types.d.ts +3 -2
- package/dist/esm/{TableSection-ebace923.js → TableSection-f41d4248.js} +4 -60
- package/dist/esm/TableSection-f41d4248.js.map +1 -0
- package/dist/esm/components/icon/icons/Bone.js +13 -0
- package/dist/esm/components/icon/icons/Bone.js.map +1 -0
- package/dist/esm/components/icon/icons/Car.js +13 -0
- package/dist/esm/components/icon/icons/Car.js.map +1 -0
- package/dist/esm/components/icon/icons/Files.js +13 -0
- package/dist/esm/components/icon/icons/Files.js.map +1 -0
- package/dist/esm/components/icon/icons/Id.js +13 -0
- package/dist/esm/components/icon/icons/Id.js.map +1 -0
- package/dist/esm/components/icon/icons/Prohibit.js +13 -0
- package/dist/esm/components/icon/icons/Prohibit.js.map +1 -0
- package/dist/esm/components/icon/icons/Receipt.js +13 -0
- package/dist/esm/components/icon/icons/Receipt.js.map +1 -0
- package/dist/esm/components/icon/icons/Signature.js +13 -0
- package/dist/esm/components/icon/icons/Signature.js.map +1 -0
- package/dist/esm/components/icon/icons/Stamp.js +13 -0
- package/dist/esm/components/icon/icons/Stamp.js.map +1 -0
- package/dist/esm/components/icon/icons/Translation.js +13 -0
- package/dist/esm/components/icon/icons/Translation.js.map +1 -0
- package/dist/esm/components/icon/icons.stories.js +10 -1
- package/dist/esm/components/icon/icons.stories.js.map +1 -1
- package/dist/esm/components/icon/index.stories.js +10 -1
- package/dist/esm/components/icon/index.stories.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.js +9 -2
- package/dist/esm/components/multiDropzone/index.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.stories.js +22 -7
- package/dist/esm/components/multiDropzone/index.stories.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.test.js +1 -0
- package/dist/esm/components/multiDropzone/index.test.js.map +1 -1
- package/dist/esm/components/table/Table.js +2 -1
- package/dist/esm/components/table/Table.js.map +1 -1
- package/dist/esm/components/table/Table.stories.js +2 -1
- package/dist/esm/components/table/Table.stories.js.map +1 -1
- package/dist/esm/components/table/Table.test.js +2 -1
- package/dist/esm/components/table/Table.test.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.js +2 -1
- package/dist/esm/components/table/components/TableContents/TableContents.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.test.js +2 -1
- package/dist/esm/components/table/components/TableContents/TableContents.test.js.map +1 -1
- package/dist/esm/components/table/components/TableSection/TableSection.js +2 -1
- package/dist/esm/components/table/components/TableSection/TableSection.js.map +1 -1
- package/dist/esm/components/table/components/TableSection/TableSection.test.js +2 -1
- package/dist/esm/components/table/components/TableSection/TableSection.test.js.map +1 -1
- package/dist/esm/{index-2faa4731.js → index-608a56e3.js} +19 -1
- package/dist/esm/{index-2faa4731.js.map → index-608a56e3.js.map} +1 -1
- package/dist/esm/index.js +11 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/components/icon/icons/Bone.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Car.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Files.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Id.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Prohibit.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Receipt.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Signature.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Stamp.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/Translation.d.ts +4 -0
- package/dist/esm/lib/components/icon/icons/index.d.ts +9 -0
- package/dist/esm/lib/components/multiDropzone/index.stories.d.ts +9 -0
- package/dist/esm/lib/components/multiDropzone/types.d.ts +3 -2
- package/dist/esm/useMediaQuery-1a3a2432.js +61 -0
- package/dist/esm/useMediaQuery-1a3a2432.js.map +1 -0
- package/package.json +1 -1
- package/src/lib/components/icon/assets/bone.svg +10 -0
- package/src/lib/components/icon/assets/car.svg +15 -0
- package/src/lib/components/icon/assets/files.svg +13 -0
- package/src/lib/components/icon/assets/id.svg +14 -0
- package/src/lib/components/icon/assets/prohibit.svg +11 -0
- package/src/lib/components/icon/assets/receipt.svg +12 -0
- package/src/lib/components/icon/assets/signature.svg +11 -0
- package/src/lib/components/icon/assets/stamp.svg +12 -0
- package/src/lib/components/icon/assets/translation.svg +15 -0
- package/src/lib/components/icon/icons/Bone.tsx +23 -0
- package/src/lib/components/icon/icons/Car.tsx +30 -0
- package/src/lib/components/icon/icons/Files.tsx +24 -0
- package/src/lib/components/icon/icons/Id.tsx +24 -0
- package/src/lib/components/icon/icons/Prohibit.tsx +25 -0
- package/src/lib/components/icon/icons/Receipt.tsx +23 -0
- package/src/lib/components/icon/icons/Signature.tsx +23 -0
- package/src/lib/components/icon/icons/Stamp.tsx +23 -0
- package/src/lib/components/icon/icons/Translation.tsx +35 -0
- package/src/lib/components/icon/icons/index.ts +9 -0
- package/src/lib/components/multiDropzone/index.stories.tsx +49 -19
- package/src/lib/components/multiDropzone/index.tsx +13 -1
- package/src/lib/components/multiDropzone/types.ts +19 -18
- package/dist/esm/TableSection-ebace923.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_44145_9396)">
|
|
3
|
+
<path d="M3.125 17.5H16.875" stroke="#91919C" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M8.93118 10.625L7.54212 4.14062C7.48393 3.86746 7.48751 3.58474 7.55258 3.31313C7.61766 3.04153 7.74259 2.78788 7.91824 2.57074C8.0939 2.3536 8.31585 2.17845 8.56788 2.05808C8.8199 1.9377 9.09564 1.87516 9.37493 1.875H10.6249C10.9043 1.87504 11.1801 1.9375 11.4322 2.05783C11.6844 2.17815 11.9064 2.35329 12.0822 2.57044C12.2579 2.7876 12.3829 3.04128 12.448 3.31294C12.5131 3.58461 12.5167 3.86739 12.4585 4.14062L11.0695 10.625" stroke="#91919C" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M16.25 10.625H3.75C3.40482 10.625 3.125 10.9048 3.125 11.25V14.375C3.125 14.7202 3.40482 15 3.75 15H16.25C16.5952 15 16.875 14.7202 16.875 14.375V11.25C16.875 10.9048 16.5952 10.625 16.25 10.625Z" stroke="#91919C" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="clip0_44145_9396">
|
|
9
|
+
<rect width="20" height="20" fill="white"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_44145_9287)">
|
|
3
|
+
<ellipse cx="11.2498" cy="8.75008" rx="7.08333" ry="7.08333" stroke="#91919C" stroke-width="1.8"/>
|
|
4
|
+
<path d="M11.6668 1.66675C8.85912 3.90414 7.82514 7.55498 8.56488 10.8334" stroke="#91919C" stroke-width="1.8" stroke-linecap="round"/>
|
|
5
|
+
<path d="M10.8332 1.66675C15.2776 5.20841 15.2776 12.2917 10.8332 15.8334" stroke="#91919C" stroke-width="1.8" stroke-linecap="round"/>
|
|
6
|
+
<path d="M5 6.66675C7.77778 6.66675 16.4107 6.66675 17.5 6.66675" stroke="#91919C" stroke-width="1.8" stroke-linecap="round"/>
|
|
7
|
+
<path d="M5 10.8333C7.77778 10.8333 16.4107 10.8333 17.5 10.8333" stroke="#91919C" stroke-width="1.8" stroke-linecap="round"/>
|
|
8
|
+
<path d="M9.99984 16.1458C9.99984 16.422 9.89145 16.687 9.69851 16.8823C9.50557 17.0777 9.24389 17.1874 8.97103 17.1874H3.72412L1.6665 18.3333V11.8749C1.6665 11.5987 1.7749 11.3337 1.96783 11.1383C2.16077 10.943 2.42245 10.8333 2.69531 10.8333H8.97103C9.24389 10.8333 9.50557 10.943 9.69851 11.1383C9.89145 11.3337 9.99984 11.5987 9.99984 11.8749V16.1458Z" fill="white" stroke="#91919C" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</g>
|
|
10
|
+
<defs>
|
|
11
|
+
<clipPath id="clip0_44145_9287">
|
|
12
|
+
<rect width="20" height="20" fill="white"/>
|
|
13
|
+
</clipPath>
|
|
14
|
+
</defs>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g clipPath="url(#bone_svg__a)">
|
|
10
|
+
<path
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
strokeLinecap="round"
|
|
13
|
+
strokeLinejoin="round"
|
|
14
|
+
strokeWidth={1.8}
|
|
15
|
+
d="M4.4 15.6a2.188 2.188 0 1 1 .821-4.017.625.625 0 0 0 .781-.084l5.499-5.498a.625.625 0 0 0 .083-.781 2.187 2.187 0 1 1 4.018-.821 2.188 2.188 0 1 1-.822 4.017.625.625 0 0 0-.78.083l-5.5 5.499a.625.625 0 0 0-.083.781A2.188 2.188 0 1 1 4.4 15.6Z"
|
|
16
|
+
/>
|
|
17
|
+
</g>,
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="bone_svg__a">
|
|
20
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
clipPath="url(#car_svg__a)"
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
strokeWidth={1.8}
|
|
17
|
+
d="M1.25 8.75h17.5M17.5 13.75v1.875a.624.624 0 0 1-.625.625H15a.624.624 0 0 1-.625-.625V13.75M5.625 13.75v1.875A.625.625 0 0 1 5 16.25H3.125a.625.625 0 0 1-.625-.625V13.75"
|
|
18
|
+
/>
|
|
19
|
+
<path strokeWidth={1.3} d="M5 11.25h1.25M13.75 11.25H15" />
|
|
20
|
+
<path
|
|
21
|
+
strokeWidth={1.8}
|
|
22
|
+
d="m17.5 8.75-2.335-5.254a.625.625 0 0 0-.571-.371H5.406a.625.625 0 0 0-.57.371L2.5 8.75v5h15v-5Z"
|
|
23
|
+
/>
|
|
24
|
+
</g>,
|
|
25
|
+
<defs>
|
|
26
|
+
<clipPath id="car_svg__a">
|
|
27
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
28
|
+
</clipPath>
|
|
29
|
+
</defs>
|
|
30
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
strokeWidth={1.8}
|
|
14
|
+
clipPath="url(#files_svg__a)"
|
|
15
|
+
>
|
|
16
|
+
<path d="M13.125 17.5h-8.75a.625.625 0 0 1-.625-.625V5.625A.625.625 0 0 1 4.375 5h6.25l3.125 3.125v8.75a.624.624 0 0 1-.625.625Z" />
|
|
17
|
+
<path d="M6.25 5V3.125a.625.625 0 0 1 .625-.625h6.25l3.125 3.125v8.75a.624.624 0 0 1-.625.625H13.75M6.875 11.875h3.75M6.875 14.375h3.75" />
|
|
18
|
+
</g>,
|
|
19
|
+
<defs>
|
|
20
|
+
<clipPath id="files_svg__a">
|
|
21
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
22
|
+
</clipPath>
|
|
23
|
+
</defs>
|
|
24
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
strokeWidth={1.8}
|
|
14
|
+
clipPath="url(#id_svg__a)"
|
|
15
|
+
>
|
|
16
|
+
<path d="M11.875 8.75H15M11.875 11.25H15M16.875 3.75H3.125a.625.625 0 0 0-.625.625v11.25c0 .345.28.625.625.625h13.75c.345 0 .625-.28.625-.625V4.375a.625.625 0 0 0-.625-.625Z" />
|
|
17
|
+
<path d="M7.5 11.25a1.875 1.875 0 1 0 0-3.75 1.875 1.875 0 0 0 0 3.75ZM5 13.125c.277-1.078 1.335-1.875 2.5-1.875s2.223.796 2.5 1.875" />
|
|
18
|
+
</g>,
|
|
19
|
+
<defs>
|
|
20
|
+
<clipPath id="id_svg__a">
|
|
21
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
22
|
+
</clipPath>
|
|
23
|
+
</defs>
|
|
24
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g stroke="currentColor" strokeWidth={1.8} clipPath="url(#prohibit_svg__a)">
|
|
10
|
+
<path
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
d="M15.303 15.303 4.697 4.697"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
strokeMiterlimit={10}
|
|
17
|
+
d="M10 17.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z"
|
|
18
|
+
/>
|
|
19
|
+
</g>,
|
|
20
|
+
<defs>
|
|
21
|
+
<clipPath id="prohibit_svg__a">
|
|
22
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
23
|
+
</clipPath>
|
|
24
|
+
</defs>
|
|
25
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
strokeWidth={1.8}
|
|
14
|
+
clipPath="url(#receipt_svg__a)"
|
|
15
|
+
>
|
|
16
|
+
<path d="M6.25 8.125h7.5M6.25 10.625h7.5M2.5 16.25V4.375a.625.625 0 0 1 .625-.625h13.75a.625.625 0 0 1 .625.625V16.25L15 15l-2.5 1.25L10 15l-2.5 1.25L5 15l-2.5 1.25Z" />
|
|
17
|
+
</g>,
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="receipt_svg__a">
|
|
20
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
strokeWidth={1.8}
|
|
14
|
+
clipPath="url(#signature_svg__a)"
|
|
15
|
+
>
|
|
16
|
+
<path d="M1.875 14h16.25M1.875 17.5s9.025-15 4.212-15C2.505 2.5 2.467 17.587 10 8.14c0 0 .634 3.081 2.127 3.11.603.012 1.348-.493 2.248-1.875 0 0 0 1.875 3.75 1.875" />
|
|
17
|
+
</g>,
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="signature_svg__a">
|
|
20
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
strokeWidth={1.8}
|
|
14
|
+
clipPath="url(#stamp_svg__a)"
|
|
15
|
+
>
|
|
16
|
+
<path d="M3.125 17.5h13.75M8.931 10.625 7.542 4.141a1.875 1.875 0 0 1 1.833-2.266h1.25a1.875 1.875 0 0 1 1.834 2.266l-1.39 6.484M16.25 10.625H3.75a.625.625 0 0 0-.625.625v3.125c0 .345.28.625.625.625h12.5c.345 0 .625-.28.625-.625V11.25a.625.625 0 0 0-.625-.625Z" />
|
|
17
|
+
</g>,
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="stamp_svg__a">
|
|
20
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* Generated file. Do not modify. */
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { IconWrapper } from '../IconWrapper';
|
|
4
|
+
import type { IconWrapperProps } from '../IconWrapper';
|
|
5
|
+
export default (props: IconWrapperProps) =>
|
|
6
|
+
createElement(
|
|
7
|
+
IconWrapper,
|
|
8
|
+
props,
|
|
9
|
+
<g
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeWidth={1.8}
|
|
12
|
+
clipPath="url(#translation_svg__a)"
|
|
13
|
+
>
|
|
14
|
+
<circle cx={11.25} cy={8.75} r={7.083} />
|
|
15
|
+
<path
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
d="M11.667 1.667c-2.808 2.237-3.842 5.888-3.102 9.166"
|
|
18
|
+
/>
|
|
19
|
+
<path
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
d="M10.833 1.667c4.445 3.541 4.445 10.625 0 14.166M5 6.667h12.5M5 10.833h12.5"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
fill="#fff"
|
|
25
|
+
strokeLinecap="round"
|
|
26
|
+
strokeLinejoin="round"
|
|
27
|
+
d="M10 16.146c0 .276-.109.541-.301.736a1.022 1.022 0 0 1-.728.305H3.724l-2.058 1.146v-6.458c0-.276.109-.541.302-.737.193-.195.454-.305.727-.305h6.276c.273 0 .535.11.728.305.192.196.3.46.3.737v4.27Z"
|
|
28
|
+
/>
|
|
29
|
+
</g>,
|
|
30
|
+
<defs>
|
|
31
|
+
<clipPath id="translation_svg__a">
|
|
32
|
+
<path fill="#fff" d="M0 0h20v20H0z" />
|
|
33
|
+
</clipPath>
|
|
34
|
+
</defs>
|
|
35
|
+
);
|
|
@@ -52,6 +52,7 @@ export { default as BikeBicycleIcon } from './BikeBicycle';
|
|
|
52
52
|
export { default as BlogIcon } from './Blog';
|
|
53
53
|
export { default as BluetoothIcon } from './Bluetooth';
|
|
54
54
|
export { default as BoldIcon } from './Bold';
|
|
55
|
+
export { default as BoneIcon } from './Bone';
|
|
55
56
|
export { default as BookOpenIcon } from './BookOpen';
|
|
56
57
|
export { default as BookIcon } from './Book';
|
|
57
58
|
export { default as BookmarkIcon } from './Bookmark';
|
|
@@ -67,6 +68,7 @@ export { default as CalendarIcon } from './Calendar';
|
|
|
67
68
|
export { default as CameraOffIcon } from './CameraOff';
|
|
68
69
|
export { default as CameraIcon } from './Camera';
|
|
69
70
|
export { default as CarTrafficIcon } from './CarTraffic';
|
|
71
|
+
export { default as CarIcon } from './Car';
|
|
70
72
|
export { default as CastIcon } from './Cast';
|
|
71
73
|
export { default as ChainBikeBrokenIcon } from './ChainBikeBroken';
|
|
72
74
|
export { default as CheckCircleIcon } from './CheckCircle';
|
|
@@ -156,6 +158,7 @@ export { default as FileMinusIcon } from './FileMinus';
|
|
|
156
158
|
export { default as FilePlusIcon } from './FilePlus';
|
|
157
159
|
export { default as FileTextIcon } from './FileText';
|
|
158
160
|
export { default as FileIcon } from './File';
|
|
161
|
+
export { default as FilesIcon } from './Files';
|
|
159
162
|
export { default as FilmIcon } from './Film';
|
|
160
163
|
export { default as FilterIcon } from './Filter';
|
|
161
164
|
export { default as FireIcon } from './Fire';
|
|
@@ -184,6 +187,7 @@ export { default as HeartIcon } from './Heart';
|
|
|
184
187
|
export { default as HexagonIcon } from './Hexagon';
|
|
185
188
|
export { default as HomeIcon } from './Home';
|
|
186
189
|
export { default as HospitalBuildingIcon } from './HospitalBuilding';
|
|
190
|
+
export { default as IdIcon } from './Id';
|
|
187
191
|
export { default as ImagePictureIcon } from './ImagePicture';
|
|
188
192
|
export { default as InboxIcon } from './Inbox';
|
|
189
193
|
export { default as InfoFilledIcon } from './InfoFilled';
|
|
@@ -269,10 +273,12 @@ export { default as PowerIcon } from './Power';
|
|
|
269
273
|
export { default as PregnacyIcon } from './Pregnacy';
|
|
270
274
|
export { default as PrinterIcon } from './Printer';
|
|
271
275
|
export { default as ProgressIcon } from './Progress';
|
|
276
|
+
export { default as ProhibitIcon } from './Prohibit';
|
|
272
277
|
export { default as QrCodeIcon } from './QrCode';
|
|
273
278
|
export { default as QuestionmarkHelpCircleIcon } from './QuestionmarkHelpCircle';
|
|
274
279
|
export { default as QuotationMarksIcon } from './QuotationMarks';
|
|
275
280
|
export { default as RadioIcon } from './Radio';
|
|
281
|
+
export { default as ReceiptIcon } from './Receipt';
|
|
276
282
|
export { default as RefreshCcwIcon } from './RefreshCcw';
|
|
277
283
|
export { default as RefreshCwIcon } from './RefreshCw';
|
|
278
284
|
export { default as RepeatIcon } from './Repeat';
|
|
@@ -298,6 +304,7 @@ export { default as ShoppingBagIcon } from './ShoppingBag';
|
|
|
298
304
|
export { default as ShoppingCartIcon } from './ShoppingCart';
|
|
299
305
|
export { default as ShuffleIcon } from './Shuffle';
|
|
300
306
|
export { default as SidebarIcon } from './Sidebar';
|
|
307
|
+
export { default as SignatureIcon } from './Signature';
|
|
301
308
|
export { default as SkipBackIcon } from './SkipBack';
|
|
302
309
|
export { default as SkipForwardIcon } from './SkipForward';
|
|
303
310
|
export { default as SlackIcon } from './Slack';
|
|
@@ -308,6 +315,7 @@ export { default as SmileIcon } from './Smile';
|
|
|
308
315
|
export { default as SofaIcon } from './Sofa';
|
|
309
316
|
export { default as SpeakerIcon } from './Speaker';
|
|
310
317
|
export { default as SquareIcon } from './Square';
|
|
318
|
+
export { default as StampIcon } from './Stamp';
|
|
311
319
|
export { default as StarFilledIcon } from './StarFilled';
|
|
312
320
|
export { default as StarHalfIcon } from './StarHalf';
|
|
313
321
|
export { default as StarIcon } from './Star';
|
|
@@ -329,6 +337,7 @@ export { default as ToggleRightIcon } from './ToggleRight';
|
|
|
329
337
|
export { default as ToolIcon } from './Tool';
|
|
330
338
|
export { default as ToothFillingCrackedIcon } from './ToothFillingCracked';
|
|
331
339
|
export { default as TrailerPartsIcon } from './TrailerParts';
|
|
340
|
+
export { default as TranslationIcon } from './Translation';
|
|
332
341
|
export { default as Trash2Icon } from './Trash2';
|
|
333
342
|
export { default as TrashIcon } from './Trash';
|
|
334
343
|
export { default as TrelloIcon } from './Trello';
|
|
@@ -2,6 +2,8 @@ import { useState } from 'react';
|
|
|
2
2
|
import { MultiDropzone, MultiDropzoneProps } from '.';
|
|
3
3
|
import { UploadedFile } from './types';
|
|
4
4
|
|
|
5
|
+
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
|
|
6
|
+
|
|
5
7
|
const story = {
|
|
6
8
|
title: 'JSX/MultiDropzone',
|
|
7
9
|
component: MultiDropzone,
|
|
@@ -11,26 +13,31 @@ const story = {
|
|
|
11
13
|
},
|
|
12
14
|
uploading: {
|
|
13
15
|
defaultValue: false,
|
|
14
|
-
description:
|
|
16
|
+
description:
|
|
17
|
+
'Property that allows to display component in an uploading state',
|
|
15
18
|
},
|
|
16
19
|
isCondensed: {
|
|
17
20
|
defaultValue: false,
|
|
18
|
-
description:
|
|
21
|
+
description:
|
|
22
|
+
'Property that allows to display component in a smaller layout',
|
|
19
23
|
},
|
|
20
24
|
maxFiles: {
|
|
21
|
-
description:
|
|
25
|
+
description:
|
|
26
|
+
'Property that allows to display the maximum number of files allowed',
|
|
22
27
|
table: {
|
|
23
28
|
category: 'File Validation',
|
|
24
29
|
},
|
|
25
30
|
},
|
|
26
31
|
maxSize: {
|
|
27
|
-
description:
|
|
32
|
+
description:
|
|
33
|
+
'Property that allows to display the maximum size of files allowed',
|
|
28
34
|
table: {
|
|
29
35
|
category: 'File Validation',
|
|
30
36
|
},
|
|
31
37
|
},
|
|
32
38
|
accept: {
|
|
33
|
-
description:
|
|
39
|
+
description:
|
|
40
|
+
'Property that allows to define which file types are accepted',
|
|
34
41
|
table: {
|
|
35
42
|
category: 'File Validation',
|
|
36
43
|
},
|
|
@@ -54,17 +61,20 @@ const story = {
|
|
|
54
61
|
},
|
|
55
62
|
},
|
|
56
63
|
args: {
|
|
57
|
-
uploadedFiles: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
uploadedFiles: [
|
|
65
|
+
{
|
|
66
|
+
id: '123456789',
|
|
67
|
+
name: 'my-code-doesnt-work-i-have-no-idea-why-my-code-works.jpg',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
61
70
|
uploading: false,
|
|
62
71
|
isCondensed: false,
|
|
63
72
|
textOverrides: {},
|
|
64
|
-
maxFiles: 0
|
|
73
|
+
maxFiles: 0,
|
|
65
74
|
},
|
|
66
75
|
parameters: {
|
|
67
|
-
componentSubtitle:
|
|
76
|
+
componentSubtitle:
|
|
77
|
+
'MultiDropzone component allows upload of multiple documents / files.',
|
|
68
78
|
},
|
|
69
79
|
};
|
|
70
80
|
|
|
@@ -96,11 +106,11 @@ export const MultiDropzoneStory = ({
|
|
|
96
106
|
};
|
|
97
107
|
|
|
98
108
|
return (
|
|
99
|
-
<MultiDropzone
|
|
100
|
-
onFileSelect={handleOnFileSelect}
|
|
101
|
-
onRemoveFile={handleOnRemoveFile}
|
|
102
|
-
uploadedFiles={localFiles}
|
|
103
|
-
uploading={uploading}
|
|
109
|
+
<MultiDropzone
|
|
110
|
+
onFileSelect={handleOnFileSelect}
|
|
111
|
+
onRemoveFile={handleOnRemoveFile}
|
|
112
|
+
uploadedFiles={localFiles}
|
|
113
|
+
uploading={uploading}
|
|
104
114
|
isCondensed={isCondensed}
|
|
105
115
|
maxFiles={maxFiles}
|
|
106
116
|
maxSize={maxSize}
|
|
@@ -109,7 +119,7 @@ export const MultiDropzoneStory = ({
|
|
|
109
119
|
);
|
|
110
120
|
};
|
|
111
121
|
|
|
112
|
-
MultiDropzoneStory.storyName =
|
|
122
|
+
MultiDropzoneStory.storyName = 'MultiDropzone';
|
|
113
123
|
|
|
114
124
|
export const UploadingState = () => (
|
|
115
125
|
<MultiDropzone
|
|
@@ -148,7 +158,6 @@ export const UploadingState = () => (
|
|
|
148
158
|
/>
|
|
149
159
|
);
|
|
150
160
|
|
|
151
|
-
|
|
152
161
|
export const CondensedView = () => (
|
|
153
162
|
<MultiDropzone
|
|
154
163
|
uploadedFiles={[
|
|
@@ -269,9 +278,30 @@ export const I18nSupport = () => (
|
|
|
269
278
|
instructionsText: 'Datei auswählen oder per Drag & Drop platzieren',
|
|
270
279
|
supportsTextShort: 'Unterstützt werden',
|
|
271
280
|
currentlyUploadingText:
|
|
272
|
-
'Bitte warten während die Datei hochgeladen wird...'
|
|
281
|
+
'Bitte warten während die Datei hochgeladen wird...',
|
|
282
|
+
}}
|
|
283
|
+
/>
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
export const NonDesktopDevice = () => (
|
|
287
|
+
<MultiDropzone
|
|
288
|
+
uploadedFiles={[]}
|
|
289
|
+
onFileSelect={() => {}}
|
|
290
|
+
uploading={false}
|
|
291
|
+
onRemoveFile={() => {}}
|
|
292
|
+
textOverrides={{
|
|
293
|
+
instructionsTextMobile: 'Tippen Sie, um eine Datei auszuwählen',
|
|
294
|
+
currentlyUploadingText:
|
|
295
|
+
'Bitte warten, während die Datei hochgeladen wird...',
|
|
273
296
|
}}
|
|
274
297
|
/>
|
|
275
298
|
);
|
|
276
299
|
|
|
300
|
+
NonDesktopDevice.parameters = {
|
|
301
|
+
viewport: {
|
|
302
|
+
viewports: INITIAL_VIEWPORTS,
|
|
303
|
+
defaultViewport: 'iphone6',
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
|
|
277
307
|
export default story;
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
} from './types';
|
|
25
25
|
|
|
26
26
|
import { getPlaceholder } from './utils';
|
|
27
|
+
import { useMediaQuery } from '../../hooks/useMediaQuery';
|
|
27
28
|
|
|
28
29
|
interface MultiDropzoneProps {
|
|
29
30
|
uploadedFiles: UploadedFile[];
|
|
@@ -93,6 +94,17 @@ const MultiDropzone = ({
|
|
|
93
94
|
onDrop,
|
|
94
95
|
});
|
|
95
96
|
|
|
97
|
+
const isNonDesktopDevice = useMediaQuery('BELOW_TABLET');
|
|
98
|
+
|
|
99
|
+
const instructionsTextDesktop =
|
|
100
|
+
textOverrides?.instructionsText || 'Choose file or drag & drop';
|
|
101
|
+
const instructionsTextMobile =
|
|
102
|
+
textOverrides?.instructionsTextMobile || 'Tap to choose file';
|
|
103
|
+
|
|
104
|
+
const instructionsText = isNonDesktopDevice
|
|
105
|
+
? instructionsTextMobile
|
|
106
|
+
: instructionsTextDesktop;
|
|
107
|
+
|
|
96
108
|
return (
|
|
97
109
|
<div className={styles.container}>
|
|
98
110
|
<div
|
|
@@ -121,7 +133,7 @@ const MultiDropzone = ({
|
|
|
121
133
|
{uploading
|
|
122
134
|
? textOverrides?.currentlyUploadingText ||
|
|
123
135
|
'Please wait while uploading file...'
|
|
124
|
-
:
|
|
136
|
+
: instructionsText}
|
|
125
137
|
</div>
|
|
126
138
|
<div className="p-p--small tc-grey-500">
|
|
127
139
|
{textOverrides?.supportsText || placeholder}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Accept } from
|
|
1
|
+
import { Accept } from 'react-dropzone';
|
|
2
2
|
|
|
3
3
|
export enum FileMimeTypes {
|
|
4
|
-
avi =
|
|
5
|
-
bmp =
|
|
6
|
-
doc =
|
|
7
|
-
docx =
|
|
8
|
-
heic =
|
|
9
|
-
jpeg =
|
|
10
|
-
jpg =
|
|
11
|
-
mov =
|
|
12
|
-
mp4 =
|
|
13
|
-
pdf =
|
|
14
|
-
png =
|
|
15
|
-
svg =
|
|
16
|
-
tif =
|
|
17
|
-
tiff =
|
|
18
|
-
webp =
|
|
4
|
+
avi = 'video/x-msvideo',
|
|
5
|
+
bmp = 'image/bmp',
|
|
6
|
+
doc = 'application/msword',
|
|
7
|
+
docx = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
8
|
+
heic = 'image/heic',
|
|
9
|
+
jpeg = 'image/jpeg',
|
|
10
|
+
jpg = 'image/jpg',
|
|
11
|
+
mov = 'video/quicktime',
|
|
12
|
+
mp4 = 'video/mp4',
|
|
13
|
+
pdf = 'application/pdf',
|
|
14
|
+
png = 'image/png',
|
|
15
|
+
svg = 'image/svg+xml',
|
|
16
|
+
tif = 'image/tiff',
|
|
17
|
+
tiff = 'image/tiff',
|
|
18
|
+
webp = 'image/webp',
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// mp4, mov, avi
|
|
@@ -34,7 +34,7 @@ export const IMAGE_FILES: FileType[] = [
|
|
|
34
34
|
'png',
|
|
35
35
|
'tiff',
|
|
36
36
|
'webp',
|
|
37
|
-
'svg'
|
|
37
|
+
'svg',
|
|
38
38
|
];
|
|
39
39
|
|
|
40
40
|
export interface UploadedFile {
|
|
@@ -47,13 +47,14 @@ export interface UploadedFile {
|
|
|
47
47
|
showLoadingSpinner?: boolean;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export type AcceptType =
|
|
50
|
+
export type AcceptType = 'document' | 'image' | 'video' | Accept;
|
|
51
51
|
|
|
52
52
|
export interface TextOverrides {
|
|
53
53
|
currentlyUploadingText?: string;
|
|
54
54
|
fileTypeError?: string;
|
|
55
55
|
fileTooLargeError?: string;
|
|
56
56
|
instructionsText?: string;
|
|
57
|
+
instructionsTextMobile?: string;
|
|
57
58
|
sizeUpToText?: string;
|
|
58
59
|
supportsText?: string;
|
|
59
60
|
supportsTextShort?: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableSection-ebace923.js","sources":["../../../src/lib/components/table/types.ts","../../../src/lib/hooks/useMediaQuery.ts","../../../src/lib/components/table/components/TableSection/TableSection.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { BaseCellProps } from './components/TableCell/BaseCell/BaseCell';\nimport { CTACellProps } from './components/TableCell/CTACell/CTACell';\nimport { ButtonCellProps } from './components/TableCell/ButtonCell/ButtonCell';\nimport { CardCellProps } from './components/TableCell/CardCell/CardCell';\n\ntype DefaultCellProps = {\n cellId?: string;\n colSpan?: number;\n modalTitle?: ReactNode;\n};\n\ntype BaseCellData = BaseCellProps & { type?: undefined } & DefaultCellProps;\ntype CTACellData = CTACellProps & { type: 'CTA' } & DefaultCellProps;\ntype ButtonCellData = ButtonCellProps & { type: 'BUTTON' } & DefaultCellProps;\ntype CardCellData = CardCellProps & { type: 'CARD' } & DefaultCellProps;\n\nexport type TableCellData =\n | BaseCellData\n | CTACellData\n | ButtonCellData\n | CardCellData;\n\nexport const isBaseCell = (\n tableCellData: TableCellData\n): tableCellData is BaseCellData => {\n return !tableCellData.type;\n};\n\nexport type TableSectionType = {\n title?: string;\n icon?: ReactNode;\n};\n\nexport type ModalData = {\n title?: ReactNode;\n body?: ReactNode;\n};\n\nexport type TableCellRowData = TableCellData[];\n\nexport type TableSectionData = {\n section?: TableSectionType;\n rows: TableCellRowData[];\n};\n\nexport type TableData = TableSectionData[];\n\nexport type ModalFunction = (modalData: ModalData) => void;\n\nexport type CellReplacements = Record<string, Partial<TableCellData>>;\n","import { useEffect, useState } from 'react';\n\n// USAGE:\n// const isMobile = useMediaQuery('BELOW_MOBILE');\n\nexport const breakpointsArray = [\n 'ABOVE_MOBILE',\n 'ABOVE_TABLET',\n 'ABOVE_DESKTOP',\n 'BELOW_MOBILE',\n 'BELOW_TABLET',\n 'BELOW_DESKTOP',\n] as const;\n\nexport type Breakpoint = typeof breakpointsArray[number];\nexport type BreakpointData = { initialValue: boolean; queryString: string };\n\nexport const breakpointLookup = (breakpoint: Breakpoint): BreakpointData => {\n if (typeof window === 'undefined') {\n return {\n initialValue: false,\n queryString: '',\n };\n }\n\n switch (breakpoint) {\n case 'BELOW_TABLET':\n return {\n initialValue: window.innerWidth <= 720, // 45rem = 720px = tablet breakpoint\n queryString: '(max-width: 45rem)',\n };\n case 'BELOW_DESKTOP':\n return {\n initialValue: window.innerWidth <= 1024, // 64rem = 1024px = desktop breakpoint\n queryString: '(max-width: 64rem)',\n };\n case 'ABOVE_MOBILE':\n return {\n initialValue: window.innerWidth >= 544, // 34rem = 544px = mobile breakpoint}\n queryString: '(min-width: 34rem)',\n };\n case 'ABOVE_TABLET':\n return {\n initialValue: window.innerWidth >= 720, // 45rem = 720px = tablet breakpoint\n queryString: '(min-width: 45rem)',\n };\n case 'ABOVE_DESKTOP':\n return {\n initialValue: window.innerWidth >= 1024, // 64rem = 1024px = desktop breakpoint\n queryString: '(min-width: 64rem)',\n };\n case 'BELOW_MOBILE':\n default:\n return {\n initialValue: window.innerWidth <= 544, // 34rem = 544px = mobile breakpoint}\n queryString: '(max-width: 34rem)',\n };\n }\n};\n\nexport const useMediaQuery = (breakpoint: Breakpoint) => {\n const { initialValue, queryString } = breakpointLookup(breakpoint);\n\n const [matchesBreakpoint, setMatchesBreakpoint] = useState(initialValue);\n\n useEffect(() => {\n const mediaQuery = window.matchMedia(queryString);\n\n const updateMediaQuery = (e: MediaQueryListEvent) =>\n setMatchesBreakpoint(e.matches);\n\n mediaQuery.addEventListener('change', updateMediaQuery);\n\n return () => {\n mediaQuery.removeEventListener('change', updateMediaQuery);\n };\n }, [queryString]);\n\n return matchesBreakpoint;\n};\n","import classNames from 'classnames';\n\nimport styles from './TableSection.module.scss';\nimport { TableCell } from '../TableCell/TableCell';\nimport {\n CellReplacements,\n isBaseCell,\n ModalFunction,\n TableCellData,\n TableCellRowData,\n} from '../../types';\nimport { useCallback } from 'react';\nimport { useMediaQuery } from '../../../../hooks/useMediaQuery';\n\nexport interface TableSectionProps {\n className?: string;\n tableCellRows: TableCellRowData[];\n hideColumns?: number[];\n hideHeader?: boolean;\n openModal?: ModalFunction;\n title: string;\n width?: number | string;\n cellReplacements?: CellReplacements;\n imageComponent?: (args: any) => JSX.Element;\n}\n\nconst TableSection = ({\n className,\n tableCellRows,\n hideColumns = [],\n hideHeader,\n openModal,\n title,\n width,\n cellReplacements,\n imageComponent,\n}: TableSectionProps) => {\n const headerRow = tableCellRows?.[0];\n const isBelowDesktop = useMediaQuery('BELOW_DESKTOP');\n\n const getModalTitleFromColumnHeader = (cellIndex: number) => {\n const firstCellInColumn = tableCellRows?.[0]?.[cellIndex];\n let titleFromColumn;\n\n switch (firstCellInColumn.type) {\n case 'BUTTON':\n titleFromColumn = firstCellInColumn.buttonCaption;\n break;\n case 'CTA':\n titleFromColumn = firstCellInColumn.title;\n break;\n case undefined:\n titleFromColumn = firstCellInColumn.text || '';\n break;\n }\n\n return titleFromColumn;\n };\n\n const getModalTitleFromRowHeader = (currentRow: TableCellRowData) => {\n const firstCellInRow = currentRow?.[0];\n const titleFromRow =\n (isBaseCell(firstCellInRow) && firstCellInRow.text) || '';\n\n return titleFromRow;\n };\n\n const isVisibleColumn = useCallback(\n (cellIndex: number) => !hideColumns.includes(cellIndex),\n [hideColumns]\n );\n\n return (\n <table\n className={classNames(className, 'w100', styles.table)}\n width={width}\n >\n <caption className=\"sr-only\">{title}</caption>\n\n {headerRow && (\n <thead className={hideHeader ? 'sr-only' : ''}>\n <tr>\n {headerRow.map((tableCellData, cellIndex) => {\n const isFirstCellInRow = cellIndex === 0;\n const cellReplacementData =\n (tableCellData.cellId &&\n cellReplacements?.[tableCellData.cellId]) ||\n {};\n\n const cellProps = {\n ...tableCellData,\n ...cellReplacementData,\n ...{\n openModal,\n modalTitle:\n (isBaseCell(tableCellData) && tableCellData.text) ||\n getModalTitleFromColumnHeader(cellIndex),\n align: isFirstCellInRow ? 'left' : 'center',\n },\n } as TableCellData;\n\n return (\n isVisibleColumn(cellIndex) && (\n <TableCell\n key={cellIndex}\n isBelowDesktop={isBelowDesktop}\n isHeader\n isFirstCellInRow={isFirstCellInRow}\n isTopLeftCell={isFirstCellInRow}\n {...cellProps}\n imageComponent={imageComponent}\n />\n )\n );\n })}\n </tr>\n </thead>\n )}\n\n <tbody>\n {tableCellRows.map(\n (row, rowIndex) =>\n rowIndex > 0 && (\n <tr key={rowIndex} className={styles.tr}>\n {row.map((tableCellData, cellIndex) => {\n const key = `${rowIndex}-${cellIndex}`;\n const isFirstCellInRow = cellIndex === 0;\n const titleFromRow = getModalTitleFromRowHeader(row);\n\n const cellReplacementData =\n (tableCellData.cellId &&\n cellReplacements?.[tableCellData.cellId]) ||\n {};\n\n const cellProps = {\n ...tableCellData,\n ...cellReplacementData,\n ...{\n openModal,\n modalTitle: tableCellData?.modalTitle || titleFromRow,\n align: isFirstCellInRow ? 'left' : 'center',\n },\n } as TableCellData;\n\n return (\n !hideColumns.includes(cellIndex) && (\n <TableCell\n isBelowDesktop={isBelowDesktop}\n isFirstCellInRow={isFirstCellInRow}\n key={key}\n {...cellProps}\n imageComponent={imageComponent}\n />\n )\n );\n })}\n </tr>\n )\n )}\n </tbody>\n </table>\n );\n};\n\nexport { TableSection };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;IAuBa,UAAU,GAAG,UACxB,aAA4B;IAE5B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;AAC7B;;ACVO,IAAM,gBAAgB,GAAG,UAAC,UAAsB;IACrD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,OAAO;YACL,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,EAAE;SAChB,CAAC;KACH;IAED,QAAQ,UAAU;QAChB,KAAK,cAAc;YACjB,OAAO;gBACL,YAAY,EAAE,MAAM,CAAC,UAAU,IAAI,GAAG;gBACtC,WAAW,EAAE,oBAAoB;aAClC,CAAC;QACJ,KAAK,eAAe;YAClB,OAAO;gBACL,YAAY,EAAE,MAAM,CAAC,UAAU,IAAI,IAAI;gBACvC,WAAW,EAAE,oBAAoB;aAClC,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,YAAY,EAAE,MAAM,CAAC,UAAU,IAAI,GAAG;gBACtC,WAAW,EAAE,oBAAoB;aAClC,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,YAAY,EAAE,MAAM,CAAC,UAAU,IAAI,GAAG;gBACtC,WAAW,EAAE,oBAAoB;aAClC,CAAC;QACJ,KAAK,eAAe;YAClB,OAAO;gBACL,YAAY,EAAE,MAAM,CAAC,UAAU,IAAI,IAAI;gBACvC,WAAW,EAAE,oBAAoB;aAClC,CAAC;QACJ,KAAK,cAAc,CAAC;QACpB;Y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