@stokr/components-library 4.2.3 → 4.2.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.
Files changed (59) hide show
  1. package/dist/components/AddressItem/AddressItem.d.ts +38 -0
  2. package/dist/components/AddressItem/AddressItem.js +51 -0
  3. package/dist/components/AddressItem/AddressItem.styles.d.ts +31 -0
  4. package/dist/components/AddressItem/AddressItem.styles.js +73 -0
  5. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -0
  6. package/dist/components/Collapsible/Collapsible.d.ts +10 -4
  7. package/dist/components/Collapsible/Collapsible.js +6 -14
  8. package/dist/components/Collapsible/Collapsible.styles.d.ts +3 -1
  9. package/dist/components/Collapsible/Collapsible.styles.js +23 -9
  10. package/dist/components/Country/CountrySelect.js +9 -14
  11. package/dist/components/Country/FlagFor.d.ts +9 -0
  12. package/dist/components/Country/FlagFor.js +25 -0
  13. package/dist/components/Country/flagLoaders.d.ts +5 -0
  14. package/dist/components/Country/flagLoaders.js +270 -0
  15. package/dist/components/Country/flagStore.d.ts +6 -0
  16. package/dist/components/Country/flagStore.js +29 -0
  17. package/dist/components/FAQ/FAQ.d.ts +29 -0
  18. package/dist/components/FAQ/FAQ.js +18 -18
  19. package/dist/components/FAQ/FAQ.styles.d.ts +38 -0
  20. package/dist/components/FAQ/FAQ.styles.js +58 -1
  21. package/dist/components/IdentityInfo/IdentityInfo.js +2 -1
  22. package/dist/components/IdentityInfo/IdentityInfo.styles.js +3 -1
  23. package/dist/components/InfoBox/InfoBox.js +44 -20
  24. package/dist/components/Input/Input.d.ts +3 -0
  25. package/dist/components/Input/Input.js +5 -2
  26. package/dist/components/Input/Input.styles.d.ts +4 -0
  27. package/dist/components/Input/Input.styles.js +57 -0
  28. package/dist/components/Input/Select.d.ts +57 -0
  29. package/dist/components/Input/Select.js +77 -98
  30. package/dist/components/Input/Select.styles.d.ts +89 -0
  31. package/dist/components/Input/Select.styles.js +104 -2
  32. package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
  33. package/dist/components/MaterialIcon/requiredIcons.js +2 -0
  34. package/dist/components/PanelCard/PanelCard.d.ts +51 -0
  35. package/dist/components/PanelCard/PanelCard.js +35 -0
  36. package/dist/components/PanelCard/PanelCard.styles.d.ts +29 -0
  37. package/dist/components/PanelCard/PanelCard.styles.js +87 -0
  38. package/dist/components/StepSidebar/MobileStepProgress.d.ts +12 -0
  39. package/dist/components/StepSidebar/MobileStepProgress.js +14 -0
  40. package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +15 -0
  41. package/dist/components/StepSidebar/MobileStepProgress.styles.js +42 -0
  42. package/dist/components/StepSidebar/StepProgress.d.ts +14 -0
  43. package/dist/components/StepSidebar/StepProgress.js +14 -0
  44. package/dist/components/StepSidebar/StepProgress.styles.d.ts +30 -0
  45. package/dist/components/StepSidebar/StepProgress.styles.js +103 -0
  46. package/dist/components/StepSidebar/StepSidebar.d.ts +36 -0
  47. package/dist/components/StepSidebar/StepSidebar.js +58 -0
  48. package/dist/components/StepSidebar/StepSidebar.styles.d.ts +54 -0
  49. package/dist/components/StepSidebar/StepSidebar.styles.js +175 -0
  50. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +27 -11
  51. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +88 -7
  52. package/dist/index.d.ts +64 -7
  53. package/dist/index.js +17 -3
  54. package/dist/styles/borderedField.d.ts +11 -0
  55. package/dist/styles/borderedField.js +56 -0
  56. package/package.json +1 -1
  57. package/dist/static/images/globe.svg.js +0 -5
  58. package/dist/static/images/trash.svg +0 -17
  59. package/dist/static/images/trash.svg.js +0 -5
@@ -0,0 +1,30 @@
1
+ import { StepStatus } from './StepProgress';
2
+ export declare const List: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "style"> & {
3
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
4
+ }> & string;
5
+ export declare const Item: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
6
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
7
+ }> & string;
8
+ export declare const Line: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
9
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
10
+ }, {
11
+ $status: StepStatus;
12
+ }>> & string;
13
+ export declare const Marker: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
14
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
15
+ }, {
16
+ $status: StepStatus;
17
+ }>> & string;
18
+ export declare const ItemText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
19
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
20
+ }> & string;
21
+ export declare const ItemTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
22
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
23
+ }, {
24
+ $status: StepStatus;
25
+ }>> & string;
26
+ export declare const ItemSubtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
27
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
28
+ }, {
29
+ $status: StepStatus;
30
+ }>> & string;
@@ -0,0 +1,103 @@
1
+ import styled from "styled-components";
2
+ import { colors } from "../../styles/colors.js";
3
+ import { media } from "../../styles/rwd.js";
4
+ import { typography } from "../../styles/typography.js";
5
+ const MARKER_SIZE = 28;
6
+ const LINE_GAP = 4;
7
+ const DARK = "#0a0a0a";
8
+ const MARKER_BG = {
9
+ upcoming: "transparent",
10
+ active: colors.white,
11
+ done: colors.lighterGreen
12
+ };
13
+ const MARKER_BORDER = {
14
+ upcoming: colors.grey2,
15
+ active: colors.white,
16
+ done: colors.lighterGreen
17
+ };
18
+ const MARKER_TEXT = { upcoming: colors.grey2, active: DARK, done: DARK };
19
+ const TITLE_COLOR = {
20
+ upcoming: colors.grey2,
21
+ active: colors.white,
22
+ done: colors.lighterGreen
23
+ };
24
+ const SUBTITLE_COLOR = {
25
+ upcoming: colors.grey2,
26
+ active: colors.grey,
27
+ done: "rgba(255, 255, 255, 0.45)"
28
+ };
29
+ const LINE_COLOR = {
30
+ upcoming: colors.grey2,
31
+ active: colors.grey,
32
+ done: colors.lightPastelGreen
33
+ };
34
+ const List = styled.ol`
35
+ display: flex;
36
+ flex-direction: column;
37
+ margin: 0;
38
+ padding: 0;
39
+ list-style: none;
40
+ `;
41
+ const Item = styled.li`
42
+ position: relative;
43
+ display: flex;
44
+ align-items: flex-start;
45
+ gap: 16px;
46
+ padding-bottom: 32px;
47
+
48
+ &:last-child {
49
+ padding-bottom: 0;
50
+ }
51
+ `;
52
+ const Line = styled.span`
53
+ position: absolute;
54
+ left: ${MARKER_SIZE / 2 - 1}px;
55
+ top: ${MARKER_SIZE + LINE_GAP}px;
56
+ bottom: ${LINE_GAP}px;
57
+ width: 2px;
58
+ background-color: ${({ $status }) => LINE_COLOR[$status]};
59
+ `;
60
+ const Marker = styled.span`
61
+ ${typography.formInputMain}
62
+ z-index: 1;
63
+ flex: 0 0 ${MARKER_SIZE}px;
64
+ width: ${MARKER_SIZE}px;
65
+ height: ${MARKER_SIZE}px;
66
+ border-radius: 50%;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ background-color: ${({ $status }) => MARKER_BG[$status]};
71
+ color: ${({ $status }) => MARKER_TEXT[$status]};
72
+ border: 1px solid ${({ $status }) => MARKER_BORDER[$status]};
73
+ `;
74
+ const ItemText = styled.div`
75
+ padding-top: 4px;
76
+ `;
77
+ const ItemTitle = styled.p`
78
+ ${typography.bodyMdCallout}
79
+ margin: 0;
80
+ color: ${({ $status }) => TITLE_COLOR[$status]};
81
+
82
+ ${media.desktopXlUp} {
83
+ font-size: 16px;
84
+ }
85
+ `;
86
+ const ItemSubtitle = styled.p`
87
+ ${typography.formInput}
88
+ margin: 4px 0 0;
89
+ color: ${({ $status }) => SUBTITLE_COLOR[$status]};
90
+
91
+ ${media.desktopXlUp} {
92
+ font-size: 13px;
93
+ }
94
+ `;
95
+ export {
96
+ Item,
97
+ ItemSubtitle,
98
+ ItemText,
99
+ ItemTitle,
100
+ Line,
101
+ List,
102
+ Marker
103
+ };
@@ -0,0 +1,36 @@
1
+ import { ReactNode } from 'react';
2
+ export interface StepSidebarIntro {
3
+ eyebrow: ReactNode;
4
+ title: ReactNode;
5
+ description?: ReactNode;
6
+ }
7
+ export interface StepSidebarSupport {
8
+ heading: ReactNode;
9
+ body: ReactNode;
10
+ linkLabel: ReactNode;
11
+ href: string;
12
+ /** Opens the link in a new tab. */
13
+ external?: boolean;
14
+ }
15
+ export interface StepSidebarProps {
16
+ /** Desktop content between the intro and the support block, e.g. `<StepProgress />`. */
17
+ children?: ReactNode;
18
+ /** Mobile content below the header, e.g. `<MobileStepProgress />`. */
19
+ mobileContent?: ReactNode;
20
+ /** Eyebrow, title and text below the logo (desktop only). */
21
+ intro?: StepSidebarIntro;
22
+ /** Contact block pinned to the bottom (desktop only). */
23
+ support?: StepSidebarSupport;
24
+ logoAlt: string;
25
+ /** Makes the logo a button. */
26
+ onLogoClick?: () => void;
27
+ /** Mobile header content on the right, e.g. a log-out button. */
28
+ mobileAction?: ReactNode;
29
+ /** Shows the close (×) button in the mobile header. */
30
+ onClose?: () => void;
31
+ closeLabel?: string;
32
+ dataCyPrefix?: string;
33
+ className?: string;
34
+ }
35
+ /** Dark flow sidebar shell: logo, intro, your content and a support contact; a compact header on mobile. */
36
+ export declare const StepSidebar: ({ children, mobileContent, mobileAction, intro, support, logoAlt, onLogoClick, onClose, closeLabel, dataCyPrefix, className, }: StepSidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,58 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
3
+ import { Aside, MobileHeader, CloseButton, DesktopOnly, TopBlock, Eyebrow, NameGroup, Title, Description, MobileOnly, Spacer, SupportWrap, SupportHeading, SupportBody, SupportLink, LogoButton, MobileLogoImg, DesktopLogoImg } from "./StepSidebar.styles.js";
4
+ const LOGO_URL = "https://res.cloudinary.com/stokr/image/upload/v1782908299/STOKR_v7r1dp.png";
5
+ const StepSidebar = ({
6
+ children,
7
+ mobileContent,
8
+ mobileAction,
9
+ intro,
10
+ support,
11
+ logoAlt,
12
+ onLogoClick,
13
+ onClose,
14
+ closeLabel = "Close",
15
+ dataCyPrefix = "step-sidebar",
16
+ className
17
+ }) => {
18
+ const logo = (Img, suffix) => onLogoClick ? /* @__PURE__ */ jsx(LogoButton, { type: "button", onClick: onLogoClick, "data-cy": `${dataCyPrefix}-${suffix}`, children: /* @__PURE__ */ jsx(Img, { src: LOGO_URL, alt: logoAlt }) }) : /* @__PURE__ */ jsx(Img, { src: LOGO_URL, alt: logoAlt, "data-cy": `${dataCyPrefix}-${suffix}` });
19
+ return /* @__PURE__ */ jsxs(Aside, { className, children: [
20
+ /* @__PURE__ */ jsxs(MobileHeader, { children: [
21
+ logo(MobileLogoImg, "logo-mobile"),
22
+ mobileAction,
23
+ onClose && /* @__PURE__ */ jsx(CloseButton, { type: "button", "aria-label": closeLabel, onClick: onClose, "data-cy": `${dataCyPrefix}-close`, children: /* @__PURE__ */ jsx(MaterialIcon, { name: "close", size: 28 }) })
24
+ ] }),
25
+ /* @__PURE__ */ jsx(DesktopOnly, { children: logo(DesktopLogoImg, "logo") }),
26
+ intro && /* @__PURE__ */ jsx(DesktopOnly, { children: /* @__PURE__ */ jsxs(TopBlock, { children: [
27
+ /* @__PURE__ */ jsx(Eyebrow, { children: intro.eyebrow }),
28
+ /* @__PURE__ */ jsxs(NameGroup, { children: [
29
+ /* @__PURE__ */ jsx(Title, { children: intro.title }),
30
+ intro.description && /* @__PURE__ */ jsx(Description, { children: intro.description })
31
+ ] })
32
+ ] }) }),
33
+ children && /* @__PURE__ */ jsx(DesktopOnly, { children }),
34
+ mobileContent && /* @__PURE__ */ jsx(MobileOnly, { children: mobileContent }),
35
+ /* @__PURE__ */ jsxs(DesktopOnly, { children: [
36
+ /* @__PURE__ */ jsx(Spacer, {}),
37
+ support && /* @__PURE__ */ jsxs(SupportWrap, { children: [
38
+ /* @__PURE__ */ jsx(SupportHeading, { children: support.heading }),
39
+ /* @__PURE__ */ jsxs(SupportBody, { children: [
40
+ support.body,
41
+ " ",
42
+ /* @__PURE__ */ jsx(
43
+ SupportLink,
44
+ {
45
+ href: support.href,
46
+ "data-cy": `${dataCyPrefix}-support-link`,
47
+ ...support.external && { target: "_blank", rel: "noopener noreferrer" },
48
+ children: support.linkLabel
49
+ }
50
+ )
51
+ ] })
52
+ ] })
53
+ ] })
54
+ ] });
55
+ };
56
+ export {
57
+ StepSidebar
58
+ };
@@ -0,0 +1,54 @@
1
+ export declare const Aside: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
2
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
3
+ }> & string;
4
+ export declare const MobileHeader: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
5
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
6
+ }> & string;
7
+ export declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
8
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
9
+ }> & string;
10
+ export declare const DesktopOnly: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
11
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
12
+ }> & string;
13
+ export declare const MobileOnly: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
14
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
15
+ }> & string;
16
+ export declare const Spacer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
17
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
18
+ }> & string;
19
+ export declare const LogoButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
20
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
21
+ }> & string;
22
+ export declare const MobileLogoImg: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
23
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
24
+ }> & string;
25
+ export declare const DesktopLogoImg: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
26
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
27
+ }> & string;
28
+ export declare const TopBlock: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
29
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
30
+ }> & string;
31
+ export declare const NameGroup: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
32
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
33
+ }> & string;
34
+ export declare const Eyebrow: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
35
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
36
+ }> & string;
37
+ export declare const Title: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
38
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
39
+ }> & string;
40
+ export declare const Description: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
41
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
42
+ }> & string;
43
+ export declare const SupportWrap: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
44
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
45
+ }> & string;
46
+ export declare const SupportHeading: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
47
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
48
+ }> & string;
49
+ export declare const SupportBody: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
50
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
51
+ }> & string;
52
+ export declare const SupportLink: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "style"> & {
53
+ style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
54
+ }> & string;
@@ -0,0 +1,175 @@
1
+ import styled from "styled-components";
2
+ import { colors } from "../../styles/colors.js";
3
+ import { media } from "../../styles/rwd.js";
4
+ import { typography } from "../../styles/typography.js";
5
+ const Aside = styled.aside`
6
+ display: flex;
7
+ flex-direction: column;
8
+ background-color: #0a0a0a;
9
+ color: ${colors.white};
10
+ position: sticky;
11
+ top: 0;
12
+ z-index: 10;
13
+ -webkit-font-smoothing: antialiased;
14
+ -moz-osx-font-smoothing: grayscale;
15
+
16
+ ${media.desktopUp} {
17
+ align-items: stretch;
18
+ gap: 48px;
19
+ width: 100%;
20
+ min-width: 0;
21
+ height: 100vh;
22
+ padding: 48px;
23
+ overflow-x: hidden;
24
+ overflow-y: auto;
25
+ overflow-wrap: anywhere;
26
+ border-right: 1px solid rgba(255, 255, 255, 0.06);
27
+ }
28
+ `;
29
+ const MobileHeader = styled.div`
30
+ display: flex;
31
+ align-items: center;
32
+ gap: 16px;
33
+ height: 56px;
34
+ padding: 0 18px;
35
+
36
+ > :first-child {
37
+ margin-right: auto;
38
+ }
39
+
40
+ ${media.desktopUp} {
41
+ display: none;
42
+ }
43
+ `;
44
+ const CloseButton = styled.button`
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ flex-shrink: 0;
49
+ width: 32px;
50
+ height: 32px;
51
+ padding: 0;
52
+ background: none;
53
+ border: none;
54
+ cursor: pointer;
55
+ color: ${colors.white};
56
+ transition: opacity 0.2s;
57
+
58
+ &:hover {
59
+ opacity: 0.7;
60
+ }
61
+ `;
62
+ const DesktopOnly = styled.div`
63
+ display: none;
64
+
65
+ ${media.desktopUp} {
66
+ display: contents;
67
+ }
68
+ `;
69
+ const MobileOnly = styled.div`
70
+ display: contents;
71
+
72
+ ${media.desktopUp} {
73
+ display: none;
74
+ }
75
+ `;
76
+ const Spacer = styled.div`
77
+ flex: 1 1 auto;
78
+ `;
79
+ const LogoButton = styled.button`
80
+ display: inline-block;
81
+ padding: 0;
82
+ background: none;
83
+ border: none;
84
+ cursor: pointer;
85
+ color: ${colors.white};
86
+ `;
87
+ const MobileLogoImg = styled.img`
88
+ display: block;
89
+ width: 100px;
90
+ height: auto;
91
+ `;
92
+ const DesktopLogoImg = styled.img`
93
+ display: block;
94
+ width: 140px;
95
+ height: auto;
96
+ `;
97
+ const TopBlock = styled.div`
98
+ display: flex;
99
+ flex-direction: column;
100
+ gap: 16px;
101
+ `;
102
+ const NameGroup = styled.div`
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: 12px;
106
+ `;
107
+ const Eyebrow = styled.p`
108
+ ${typography.labelRunningHeader}
109
+ margin: 0;
110
+ color: ${colors.white};
111
+ `;
112
+ const Title = styled.p`
113
+ ${typography.h3}
114
+ margin: 0;
115
+ color: ${colors.white};
116
+ `;
117
+ const Description = styled.p`
118
+ ${typography.bodyLg}
119
+ margin: 0;
120
+ color: ${colors.white};
121
+ `;
122
+ const SupportWrap = styled.div`
123
+ padding-top: 21px;
124
+ border-top: 1px solid ${colors.grey4};
125
+ `;
126
+ const SupportHeading = styled.p`
127
+ margin: 0 0 6px;
128
+ font-size: 14px;
129
+ font-weight: 600;
130
+ line-height: 20px;
131
+ color: ${colors.white};
132
+
133
+ ${media.desktopXlUp} {
134
+ font-size: 16px;
135
+ }
136
+ `;
137
+ const SupportBody = styled.p`
138
+ margin: 0;
139
+ font-size: 12px;
140
+ font-weight: 400;
141
+ line-height: 18px;
142
+ color: ${colors.white};
143
+
144
+ ${media.desktopXlUp} {
145
+ font-size: 13px;
146
+ }
147
+ `;
148
+ const SupportLink = styled.a`
149
+ color: ${colors.lighterGreen};
150
+ text-decoration: underline;
151
+
152
+ &:hover {
153
+ color: ${colors.lighterGreen};
154
+ }
155
+ `;
156
+ export {
157
+ Aside,
158
+ CloseButton,
159
+ Description,
160
+ DesktopLogoImg,
161
+ DesktopOnly,
162
+ Eyebrow,
163
+ LogoButton,
164
+ MobileHeader,
165
+ MobileLogoImg,
166
+ MobileOnly,
167
+ NameGroup,
168
+ Spacer,
169
+ SupportBody,
170
+ SupportHeading,
171
+ SupportLink,
172
+ SupportWrap,
173
+ Title,
174
+ TopBlock
175
+ };
@@ -2,11 +2,19 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useMemo, useCallback } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { Input } from "../Input/Input.js";
5
+ import { colors } from "../../styles/colors.js";
5
6
  import { Checkbox } from "../Checkbox/Checkbox.js";
6
- import SvgTrash from "../../static/images/trash.svg.js";
7
- import SvgGlobe from "../../static/images/globe.svg.js";
8
- import { FlagFor, CountrySelect } from "../Country/CountrySelect.js";
7
+ import { MaterialIcon } from "../MaterialIcon/MaterialIcon.js";
8
+ import { CountrySelect } from "../Country/CountrySelect.js";
9
9
  import { CardWrapper, CardHeader, HeaderIcon, FlagWrapper, HeaderTitle, HeaderActions, DeleteButton, ChevronIcon, CardBodyCollapse, CardBody, CheckboxRow } from "./TaxResidenceCard.styles.js";
10
+ import { FlagFor } from "../Country/FlagFor.js";
11
+ const NO_TIN_TEXT_STYLE = {
12
+ fontSize: 12,
13
+ lineHeight: "18px",
14
+ fontWeight: 400,
15
+ letterSpacing: "0.6px",
16
+ color: colors.black
17
+ };
10
18
  const TaxResidenceCard = (props) => {
11
19
  const {
12
20
  id,
@@ -25,6 +33,7 @@ const TaxResidenceCard = (props) => {
25
33
  countryPlaceholder = "Search countries",
26
34
  disabled = false,
27
35
  hideNoTin = false,
36
+ variant = "default",
28
37
  error,
29
38
  touched,
30
39
  dataCy
@@ -39,6 +48,7 @@ const TaxResidenceCard = (props) => {
39
48
  () => country ? countries?.find((c) => c.value === country) : null,
40
49
  [countries, country]
41
50
  );
51
+ const bordered = variant === "bordered";
42
52
  const headerTitle = selectedCountry?.label || emptyTitle;
43
53
  const toggle = useCallback(() => {
44
54
  const next = !isOpen;
@@ -68,11 +78,12 @@ const TaxResidenceCard = (props) => {
68
78
  onDelete?.();
69
79
  };
70
80
  const cy = dataCy || `tax-residence-card-${id}`;
71
- return /* @__PURE__ */ jsxs(CardWrapper, { isOpen, "data-cy": cy, children: [
81
+ return /* @__PURE__ */ jsxs(CardWrapper, { isOpen, $variant: variant, "data-cy": cy, children: [
72
82
  /* @__PURE__ */ jsxs(
73
83
  CardHeader,
74
84
  {
75
85
  isOpen,
86
+ $variant: variant,
76
87
  onClick: toggle,
77
88
  onKeyDown: handleHeaderKeyDown,
78
89
  role: "button",
@@ -81,9 +92,9 @@ const TaxResidenceCard = (props) => {
81
92
  "aria-controls": `${id}-body`,
82
93
  "data-cy": `${cy}-toggle`,
83
94
  children: [
84
- /* @__PURE__ */ jsx(HeaderIcon, { "aria-hidden": "true", children: selectedCountry ? /* @__PURE__ */ jsx(FlagWrapper, { children: /* @__PURE__ */ jsx(FlagFor, { code: selectedCountry.value }) }) : /* @__PURE__ */ jsx(SvgGlobe, {}) }),
85
- /* @__PURE__ */ jsx(HeaderTitle, { children: headerTitle }),
86
- /* @__PURE__ */ jsxs(HeaderActions, { children: [
95
+ /* @__PURE__ */ jsx(HeaderIcon, { "aria-hidden": "true", children: selectedCountry ? /* @__PURE__ */ jsx(FlagWrapper, { $variant: variant, children: /* @__PURE__ */ jsx(FlagFor, { code: selectedCountry.value }) }) : /* @__PURE__ */ jsx(MaterialIcon, { name: "language", size: 20 }) }),
96
+ /* @__PURE__ */ jsx(HeaderTitle, { $variant: variant, children: headerTitle }),
97
+ /* @__PURE__ */ jsxs(HeaderActions, { $variant: variant, children: [
87
98
  onDelete && !disabled && /* @__PURE__ */ jsx(
88
99
  DeleteButton,
89
100
  {
@@ -92,15 +103,15 @@ const TaxResidenceCard = (props) => {
92
103
  "aria-label": `Delete ${headerTitle}`,
93
104
  disabled,
94
105
  "data-cy": `${cy}-delete`,
95
- children: /* @__PURE__ */ jsx(SvgTrash, {})
106
+ children: /* @__PURE__ */ jsx(MaterialIcon, { name: "delete", size: 20 })
96
107
  }
97
108
  ),
98
- /* @__PURE__ */ jsx(ChevronIcon, { isOpen, "aria-hidden": "true" })
109
+ /* @__PURE__ */ jsx(ChevronIcon, { isOpen, $variant: variant, "aria-hidden": "true" })
99
110
  ] })
100
111
  ]
101
112
  }
102
113
  ),
103
- /* @__PURE__ */ jsx(CardBodyCollapse, { isOpened: isOpen, children: /* @__PURE__ */ jsxs(CardBody, { id: `${id}-body`, children: [
114
+ /* @__PURE__ */ jsx(CardBodyCollapse, { isOpened: isOpen, $variant: variant, children: /* @__PURE__ */ jsxs(CardBody, { id: `${id}-body`, $variant: variant, children: [
104
115
  /* @__PURE__ */ jsx(
105
116
  CountrySelect,
106
117
  {
@@ -112,6 +123,7 @@ const TaxResidenceCard = (props) => {
112
123
  onChange: handleCountryChange,
113
124
  placeholder: countryPlaceholder,
114
125
  disabled,
126
+ variant,
115
127
  error: !!error?.country,
116
128
  touched: !!touched?.country,
117
129
  dataCy: `${cy}-country`
@@ -126,12 +138,13 @@ const TaxResidenceCard = (props) => {
126
138
  value: tin,
127
139
  onChange: handleTinChange,
128
140
  disabled: disabled || noTinIssued,
141
+ variant,
129
142
  error: !!error?.tin,
130
143
  touched: !!touched?.tin,
131
144
  "data-cy": `${cy}-tin`
132
145
  }
133
146
  ),
134
- (disabled && (tin === "" || !tin) || !disabled) && !hideNoTin && /* @__PURE__ */ jsx(CheckboxRow, { children: /* @__PURE__ */ jsx(
147
+ (disabled && (tin === "" || !tin) || !disabled) && !hideNoTin && /* @__PURE__ */ jsx(CheckboxRow, { $variant: variant, children: /* @__PURE__ */ jsx(
135
148
  Checkbox,
136
149
  {
137
150
  id: `${id}-no-tin`,
@@ -140,6 +153,7 @@ const TaxResidenceCard = (props) => {
140
153
  checked: noTinIssued,
141
154
  onChange: handleNoTinChange,
142
155
  disabled,
156
+ textStyle: bordered ? NO_TIN_TEXT_STYLE : void 0,
143
157
  "data-cy": `${cy}-no-tin`
144
158
  }
145
159
  ) })
@@ -189,6 +203,8 @@ TaxResidenceCard.propTypes = {
189
203
  disabled: PropTypes.bool,
190
204
  /** Whether to hide the "no TIN issued" checkbox. */
191
205
  hideNoTin: PropTypes.bool,
206
+ /** `bordered`: white card with a 20px padding and boxed fields (sign-up redesign). Default keeps the list look. */
207
+ variant: PropTypes.oneOf(["default", "bordered"]),
192
208
  /** Per-field error flags: `{ country, tin }`. */
193
209
  error: PropTypes.shape({
194
210
  country: PropTypes.bool,