@stokr/components-library 5.0.0 → 5.0.2
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/README.md +8 -8
- package/dist/components/AddressItem/AddressItem.d.ts +38 -0
- package/dist/components/AddressItem/AddressItem.js +51 -0
- package/dist/components/AddressItem/AddressItem.styles.d.ts +31 -0
- package/dist/components/AddressItem/AddressItem.styles.js +71 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +18 -25
- package/dist/components/AgreementItem/AgreementItem.styles.js +1 -1
- package/dist/components/BackButton/BackButton.styles.js +15 -15
- package/dist/components/BasicTable/BasicTable.styles.js +6 -8
- package/dist/components/BlogPost/BlogPost.styles.js +9 -13
- package/dist/components/Button/Button.styles.d.ts +1 -1
- package/dist/components/Button/Button.styles.js +122 -11
- package/dist/components/Button/GlareButton.js +1 -1
- package/dist/components/Card/Card.styles.js +3 -4
- package/dist/components/CardTabs/CardTabs.styles.js +17 -17
- package/dist/components/ChartLegend/ChartLegend.styles.js +6 -7
- package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.styles.js +10 -11
- package/dist/components/Checklist/ChecklistCard.js +3 -3
- package/dist/components/Checklist/ChecklistCard.styles.js +7 -20
- package/dist/components/Chips/Chip.js +2 -2
- package/dist/components/Chips/Chip.styles.js +6 -10
- package/dist/components/Collapsible/Collapsible.d.ts +10 -4
- package/dist/components/Collapsible/Collapsible.js +6 -14
- package/dist/components/Collapsible/Collapsible.styles.d.ts +3 -1
- package/dist/components/Collapsible/Collapsible.styles.js +33 -16
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +5 -5
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +5 -5
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +2 -2
- package/dist/components/Country/CountrySelect.js +15 -20
- package/dist/components/Country/FlagFor.d.ts +9 -0
- package/dist/components/Country/FlagFor.js +25 -0
- package/dist/components/Country/flagLoaders.d.ts +5 -0
- package/dist/components/Country/flagLoaders.js +270 -0
- package/dist/components/Country/flagStore.d.ts +6 -0
- package/dist/components/Country/flagStore.js +29 -0
- package/dist/components/CryptoAddress/CryptoAddress.d.ts +6 -2
- package/dist/components/CryptoAddress/CryptoAddress.js +2 -2
- package/dist/components/CryptoAddress/CryptoAddress.styles.d.ts +2 -1
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +20 -27
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +2 -2
- package/dist/components/FAQ/FAQ.d.ts +29 -0
- package/dist/components/FAQ/FAQ.js +18 -18
- package/dist/components/FAQ/FAQ.styles.d.ts +11 -3
- package/dist/components/FAQ/FAQ.styles.js +59 -10
- package/dist/components/Form/Form.styles.js +5 -5
- package/dist/components/Grid/Grid.styles.js +7 -7
- package/dist/components/IdentityInfo/IdentityInfo.js +2 -1
- package/dist/components/IdentityInfo/IdentityInfo.styles.js +13 -23
- package/dist/components/InfoBox/InfoBox.d.ts +15 -13
- package/dist/components/InfoBox/InfoBox.js +31 -14
- package/dist/components/InfoIcon/InfoIcon.styles.js +2 -2
- package/dist/components/Input/DatePickerInput.styles.js +23 -24
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +5 -2
- package/dist/components/Input/Input.styles.d.ts +4 -0
- package/dist/components/Input/Input.styles.js +77 -27
- package/dist/components/Input/InputPassword.styles.js +11 -11
- package/dist/components/Input/InputWithButton.styles.js +5 -5
- package/dist/components/Input/MultiSelect.js +17 -17
- package/dist/components/Input/OtpInput.js +1 -1
- package/dist/components/Input/RangeInput.js +2 -2
- package/dist/components/Input/SearchInput.styles.js +10 -10
- package/dist/components/Input/Select.d.ts +57 -0
- package/dist/components/Input/Select.js +101 -106
- package/dist/components/Input/Select.styles.d.ts +89 -0
- package/dist/components/Input/Select.styles.js +115 -19
- package/dist/components/Input/TableFilterDropdown.js +5 -5
- package/dist/components/Input/Textarea.styles.js +11 -13
- package/dist/components/MaterialIcon/requiredIcons.d.ts +1 -1
- package/dist/components/MaterialIcon/requiredIcons.js +2 -0
- package/dist/components/MenuNav/MenuNav.styles.js +2 -5
- package/dist/components/Modal/Modal.styles.js +25 -31
- package/dist/components/Modal/PaymentModal.js +7 -7
- package/dist/components/Modal/SideModal.styles.js +8 -8
- package/dist/components/Modal/SideModalParts.js +15 -16
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +5 -8
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +2 -2
- package/dist/components/Number/Number.js +1 -1
- package/dist/components/Number/Number.styles.js +2 -2
- package/dist/components/Pagination/Pagination.styles.js +7 -7
- package/dist/components/PanelCard/PanelCard.d.ts +51 -0
- package/dist/components/PanelCard/PanelCard.js +35 -0
- package/dist/components/PanelCard/PanelCard.styles.d.ts +29 -0
- package/dist/components/PanelCard/PanelCard.styles.js +84 -0
- package/dist/components/Payment/DetailRows.js +1 -1
- package/dist/components/Payment/DetailsToggle.js +4 -6
- package/dist/components/Payment/PaymentDetailsCard.js +29 -53
- package/dist/components/Payment/PaymentDisplay.js +12 -20
- package/dist/components/Payment/PaymentPendingCard.d.ts +1 -1
- package/dist/components/Payment/PaymentPendingCard.js +10 -13
- package/dist/components/Payment/PaymentSuccessCard.js +6 -9
- package/dist/components/Payment/TimerComponent.js +5 -4
- package/dist/components/Process/Process.styles.js +7 -13
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +8 -10
- package/dist/components/ProfileBox/ProfileBox.styles.js +5 -7
- package/dist/components/Radio/Radio.styles.d.ts +1 -0
- package/dist/components/Radio/Radio.styles.js +8 -9
- package/dist/components/RefreshButton/RefreshButton.styles.js +5 -5
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +3 -5
- package/dist/components/Section/Section.styles.js +16 -18
- package/dist/components/SectionTitle/SectionTitle.styles.d.ts +4 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +4 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +3 -3
- package/dist/components/Snackbar/Snackbar.styles.js +8 -10
- package/dist/components/SpanButton/SpanButton.styles.js +2 -2
- package/dist/components/StatusDot/StatusDot.d.ts +1 -1
- package/dist/components/StatusDot/StatusDot.js +5 -5
- package/dist/components/StatusDot/StatusDot.styles.js +2 -5
- package/dist/components/StatusTag/StatusTag.js +1 -1
- package/dist/components/StatusTag/StatusTag.styles.js +4 -4
- package/dist/components/StepController/StepController.styles.js +7 -7
- package/dist/components/StepSidebar/MobileStepProgress.d.ts +12 -0
- package/dist/components/StepSidebar/MobileStepProgress.js +14 -0
- package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +15 -0
- package/dist/components/StepSidebar/MobileStepProgress.styles.js +39 -0
- package/dist/components/StepSidebar/StepProgress.d.ts +14 -0
- package/dist/components/StepSidebar/StepProgress.js +14 -0
- package/dist/components/StepSidebar/StepProgress.styles.d.ts +30 -0
- package/dist/components/StepSidebar/StepProgress.styles.js +97 -0
- package/dist/components/StepSidebar/StepSidebar.d.ts +36 -0
- package/dist/components/StepSidebar/StepSidebar.js +58 -0
- package/dist/components/StepSidebar/StepSidebar.styles.d.ts +55 -0
- package/dist/components/StepSidebar/StepSidebar.styles.js +168 -0
- package/dist/components/StokrLoader/StokrLoader.d.ts +16 -2
- package/dist/components/StokrLoader/StokrLoader.js +170 -28
- package/dist/components/StokrLoader/loaderSession.d.ts +14 -0
- package/dist/components/StokrLoader/loaderSession.js +30 -0
- package/dist/components/Switch/Switch.styles.js +12 -14
- package/dist/components/TabsNav/TabsNav.styles.js +7 -9
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +26 -11
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.d.ts +29 -12
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +103 -30
- package/dist/components/Text/Text.styles.d.ts +2 -1
- package/dist/components/Text/Text.styles.js +36 -70
- package/dist/components/TextLink/TextLink.styles.js +5 -7
- package/dist/components/Timeline/Timeline.styles.js +17 -23
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -2
- package/dist/components/Tooltip/Tooltip.styles.js +4 -5
- package/dist/components/breakdown/Breakdown.js +3 -5
- package/dist/components/logo/Logo.js +1 -1
- package/dist/constants/chainLogos.d.ts +9 -0
- package/dist/constants/chainLogos.js +17 -0
- package/dist/design-system/css/base.css +14 -14
- package/dist/design-system/css-builders.d.ts +25 -0
- package/dist/design-system/css-builders.js +81 -0
- package/dist/design-system/generated/fonts.css +0 -49
- package/dist/design-system/generated/text-classes.css +123 -123
- package/dist/design-system/generated/text-styles.d.ts +24 -24
- package/dist/design-system/generated/text-styles.js +123 -123
- package/dist/design-system/generated/tokens.css +417 -412
- package/dist/design-system/index.d.ts +2 -1
- package/dist/design-system/styled/build-theme.js +1 -1
- package/dist/design-system/tokens/colors.d.ts +1 -1
- package/dist/design-system/tokens/colors.js +1 -1
- package/dist/design-system/tokens/fonts.d.ts +6 -2
- package/dist/design-system/tokens/fonts.js +1 -1
- package/dist/design-system/tokens/semantic.d.ts +15 -3
- package/dist/design-system/tokens/semantic.js +5 -1
- package/dist/design-system/tokens/typography.d.ts +1 -1
- package/dist/design-system/tokens/typography.js +64 -41
- package/dist/index.d.ts +84 -7
- package/dist/index.js +24 -4
- package/dist/static/images/chains/avalanche.svg +7 -0
- package/dist/static/images/chains/avalanche.svg.js +4 -0
- package/dist/static/images/chains/ethereum.svg +14 -0
- package/dist/static/images/chains/ethereum.svg.js +4 -0
- package/dist/static/images/chains/liquid.svg +7 -0
- package/dist/static/images/chains/liquid.svg.js +4 -0
- package/dist/static/images/chains/solana.svg +29 -0
- package/dist/static/images/chains/solana.svg.js +4 -0
- package/dist/static/images/chains/stellar.svg +17 -0
- package/dist/static/images/chains/stellar.svg.js +4 -0
- package/dist/static/images/chains/tempo.svg +11 -0
- package/dist/static/images/chains/tempo.svg.js +4 -0
- package/dist/styles/borderedField.d.ts +11 -0
- package/dist/styles/borderedField.js +53 -0
- package/package.json +1 -1
- package/dist/static/images/globe.svg.js +0 -5
- package/dist/static/images/trash.svg +0 -17
- package/dist/static/images/trash.svg.js +0 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { TextName } from '../../design-system';
|
|
2
3
|
import { RadioWrapOption } from './RadioWrap';
|
|
3
4
|
export interface CryptoAddressData {
|
|
4
5
|
value?: string | number;
|
|
@@ -26,7 +27,10 @@ export interface CryptoAddressProps {
|
|
|
26
27
|
noBody?: boolean;
|
|
27
28
|
noBorderBottom?: boolean;
|
|
28
29
|
flexHead?: boolean;
|
|
30
|
+
/** @deprecated No effect: use `valueStyle`. */
|
|
29
31
|
fontSize?: number;
|
|
32
|
+
/** Kit text style of `data.value` (the amount or address). Default `titleL`. */
|
|
33
|
+
valueStyle?: TextName;
|
|
30
34
|
eqValueFontSize?: number;
|
|
31
35
|
eqValueStyle?: CSSProperties;
|
|
32
36
|
titleColor?: string;
|
|
@@ -40,6 +44,6 @@ export interface CryptoAddressProps {
|
|
|
40
44
|
/** Margin-left for child divs inside Value (default: '30px'). */
|
|
41
45
|
valueChildMarginLeft?: string;
|
|
42
46
|
}
|
|
43
|
-
export declare const CryptoAddress: ({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead,
|
|
44
|
-
export declare const MemoCryptoAddress: import('react').MemoExoticComponent<({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead,
|
|
47
|
+
export declare const CryptoAddress: ({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, valueStyle, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const MemoCryptoAddress: import('react').MemoExoticComponent<({ title, status, address, data, info, wrapped, borderTop, borderBottom, radio, sideOptions, src, noHead, noBody, noBorderBottom, flexHead, valueStyle, eqValueFontSize, eqValueStyle, titleColor, dataBoxStyle, headStyle, infoBoxStyle, wrapperStyle, bodyStyle, containerStyle, dataValueStyle, valueChildMarginLeft, }: CryptoAddressProps) => import("react/jsx-runtime").JSX.Element>;
|
|
45
49
|
export default CryptoAddress;
|
|
@@ -31,7 +31,7 @@ const CryptoAddress = ({
|
|
|
31
31
|
noBody,
|
|
32
32
|
noBorderBottom,
|
|
33
33
|
flexHead,
|
|
34
|
-
|
|
34
|
+
valueStyle,
|
|
35
35
|
eqValueFontSize = 9,
|
|
36
36
|
eqValueStyle,
|
|
37
37
|
titleColor,
|
|
@@ -61,7 +61,7 @@ const CryptoAddress = ({
|
|
|
61
61
|
] }),
|
|
62
62
|
/* @__PURE__ */ jsxs(Body, { noBody, style: bodyStyle, children: [
|
|
63
63
|
/* @__PURE__ */ jsxs(DataBox, { style: dataBoxStyle, children: [
|
|
64
|
-
data.value && /* @__PURE__ */ jsxs(Value, {
|
|
64
|
+
data.value && /* @__PURE__ */ jsxs(Value, { textStyle: valueStyle, style: dataValueStyle, childMarginLeft: valueChildMarginLeft, children: [
|
|
65
65
|
data.unit && `${data.unit} `,
|
|
66
66
|
data.shortAddress ? /* @__PURE__ */ jsx(Tooltip, { placement: "top", content: data.value, children: shortenAddress(String(data.value)) }) : data.value,
|
|
67
67
|
data.tooltip && /* @__PURE__ */ jsx("div", { children: copyToClipBoard(String(data.value)) })
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TextName } from '../../design-system';
|
|
2
3
|
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
4
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
5
|
}> & string;
|
|
@@ -54,7 +55,7 @@ export declare const InfoBox: import('styled-components/dist/types').IStyledComp
|
|
|
54
55
|
export declare const Value: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
55
56
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
56
57
|
}, {
|
|
57
|
-
|
|
58
|
+
textStyle?: TextName;
|
|
58
59
|
childMarginLeft?: number | string;
|
|
59
60
|
}>> & string;
|
|
60
61
|
export declare const Equal: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { glyph, withGlyph } from "../MaterialIcon/glyph.js";
|
|
3
3
|
import { breakpoint } from "../../design-system/styled/breakpoint.js";
|
|
4
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
5
|
const Container = styled.div`
|
|
5
6
|
position: relative;
|
|
6
7
|
`;
|
|
@@ -47,11 +48,7 @@ const Title = styled.div.withConfig({
|
|
|
47
48
|
shouldForwardProp: (props) => !["color"].includes(props)
|
|
48
49
|
})`
|
|
49
50
|
float: left;
|
|
50
|
-
|
|
51
|
-
font-size: 11px;
|
|
52
|
-
line-height: 24px;
|
|
53
|
-
letter-spacing: 2px;
|
|
54
|
-
text-transform: uppercase;
|
|
51
|
+
${text("label")}
|
|
55
52
|
padding-right: 20px;
|
|
56
53
|
color: ${(props) => props.color};
|
|
57
54
|
`;
|
|
@@ -59,8 +56,8 @@ const Status = styled.span`
|
|
|
59
56
|
display: inline-block;
|
|
60
57
|
vertical-align: top;
|
|
61
58
|
padding: 0px 16px;
|
|
62
|
-
background-color: var(--
|
|
63
|
-
color: var(--
|
|
59
|
+
background-color: var(--action-primary-bg);
|
|
60
|
+
color: var(--action-primary-text);
|
|
64
61
|
font-weight: 600;
|
|
65
62
|
font-size: 8px;
|
|
66
63
|
letter-spacing: 1.78px;
|
|
@@ -88,7 +85,7 @@ const Address = styled.span.attrs((props) => ({
|
|
|
88
85
|
font-size: 11px;
|
|
89
86
|
line-height: 16px;
|
|
90
87
|
margin-right: 6px;
|
|
91
|
-
color: var(--
|
|
88
|
+
color: var(--text-primary);
|
|
92
89
|
transition: color 0.2s;
|
|
93
90
|
cursor: pointer;
|
|
94
91
|
|
|
@@ -97,7 +94,7 @@ const Address = styled.span.attrs((props) => ({
|
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
&:hover {
|
|
100
|
-
color: var(--
|
|
97
|
+
color: var(--action-accent-bg);
|
|
101
98
|
}
|
|
102
99
|
`;
|
|
103
100
|
styled.span`
|
|
@@ -105,14 +102,14 @@ styled.span`
|
|
|
105
102
|
cursor: pointer;
|
|
106
103
|
|
|
107
104
|
&:hover {
|
|
108
|
-
color: var(--
|
|
105
|
+
color: var(--action-accent-bg);
|
|
109
106
|
}
|
|
110
107
|
`;
|
|
111
108
|
const CopyToClipboardButton = styled.span.attrs({
|
|
112
109
|
children: glyph("content_copy")
|
|
113
110
|
})`
|
|
114
111
|
display: inline-flex;
|
|
115
|
-
color: var(--
|
|
112
|
+
color: var(--text-primary);
|
|
116
113
|
cursor: pointer;
|
|
117
114
|
height: 1em;
|
|
118
115
|
width: 1em;
|
|
@@ -136,14 +133,10 @@ const InfoBox = styled.div`
|
|
|
136
133
|
`}
|
|
137
134
|
`;
|
|
138
135
|
const Value = styled.div.withConfig({
|
|
139
|
-
shouldForwardProp: (props) => !["
|
|
136
|
+
shouldForwardProp: (props) => !["textStyle", "childMarginLeft"].includes(props)
|
|
140
137
|
})`
|
|
141
138
|
position: relative;
|
|
142
|
-
|
|
143
|
-
font-size: 22px;
|
|
144
|
-
font-size: ${(props) => props.fontSize}px;
|
|
145
|
-
line-height: 28px;
|
|
146
|
-
letter-spacing: 0.4px;
|
|
139
|
+
${({ textStyle = "titleL" }) => text(textStyle)}
|
|
147
140
|
|
|
148
141
|
strong {
|
|
149
142
|
font-weight: normal;
|
|
@@ -203,7 +196,7 @@ const CheckMark = styled.div`
|
|
|
203
196
|
top: 50%;
|
|
204
197
|
right: 0;
|
|
205
198
|
margin-top: -7px;
|
|
206
|
-
border: 1px solid var(--
|
|
199
|
+
border: 1px solid var(--border-default);
|
|
207
200
|
border-radius: 7px;
|
|
208
201
|
background-color: transparent;
|
|
209
202
|
transition:
|
|
@@ -230,7 +223,7 @@ const CheckMark = styled.div`
|
|
|
230
223
|
margin-top: -2px;
|
|
231
224
|
margin-left: -2px;
|
|
232
225
|
border-radius: 2px;
|
|
233
|
-
background-color: var(--
|
|
226
|
+
background-color: var(--action-accent-bg);
|
|
234
227
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
|
|
235
228
|
}
|
|
236
229
|
`;
|
|
@@ -275,14 +268,14 @@ const Radio = styled.div.withConfig({
|
|
|
275
268
|
}
|
|
276
269
|
|
|
277
270
|
${CheckMark} {
|
|
278
|
-
border-color: var(--
|
|
279
|
-
background-color: var(--
|
|
271
|
+
border-color: var(--border-subtle) !important;
|
|
272
|
+
background-color: var(--action-disabled-secondary-bg) !important;
|
|
280
273
|
}
|
|
281
274
|
}
|
|
282
275
|
|
|
283
276
|
&:checked + label {
|
|
284
277
|
&:before {
|
|
285
|
-
background-color: var(--
|
|
278
|
+
background-color: var(--color-red-500) !important;
|
|
286
279
|
}
|
|
287
280
|
|
|
288
281
|
${CheckMark} {
|
|
@@ -301,11 +294,11 @@ const Radio = styled.div.withConfig({
|
|
|
301
294
|
&:hover + label,
|
|
302
295
|
& + label:hover {
|
|
303
296
|
&:before {
|
|
304
|
-
background-color: var(--
|
|
297
|
+
background-color: var(--action-secondary-bg-hover);
|
|
305
298
|
}
|
|
306
299
|
|
|
307
300
|
${CheckMark} {
|
|
308
|
-
border-color: var(--
|
|
301
|
+
border-color: var(--border-focus);
|
|
309
302
|
}
|
|
310
303
|
}
|
|
311
304
|
}
|
|
@@ -332,14 +325,14 @@ styled.button`
|
|
|
332
325
|
height: 40px;
|
|
333
326
|
outline: none;
|
|
334
327
|
margin-left: 10px;
|
|
335
|
-
border: 1px solid var(--
|
|
328
|
+
border: 1px solid var(--border-subtle);
|
|
336
329
|
border-radius: 20px;
|
|
337
|
-
color: var(--
|
|
330
|
+
color: var(--action-negative-text);
|
|
338
331
|
transition: color 0.2s;
|
|
339
332
|
|
|
340
333
|
&:focus,
|
|
341
334
|
&:hover {
|
|
342
|
-
color: var(--
|
|
335
|
+
color: var(--action-accent-bg);
|
|
343
336
|
}
|
|
344
337
|
`;
|
|
345
338
|
export {
|
|
@@ -50,11 +50,11 @@ const InfoBox = styled.div.withConfig({
|
|
|
50
50
|
max-width: 100%;
|
|
51
51
|
|
|
52
52
|
${(props) => props.refresh && `
|
|
53
|
-
color: var(--
|
|
53
|
+
color: var(--action-accent-bg);
|
|
54
54
|
`};
|
|
55
55
|
|
|
56
56
|
${(props) => props.failed && `
|
|
57
|
-
color: var(--
|
|
57
|
+
color: var(--status-error-text);
|
|
58
58
|
`};
|
|
59
59
|
`;
|
|
60
60
|
const spin = keyframes`
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { FieldVariant } from '../../styles/borderedField';
|
|
3
|
+
import { FaqItems, FaqItem, FaqTitle, FaqContent, FaqText, FaqDropdownIcon } from './FAQ.styles';
|
|
4
|
+
export interface FAQEntry {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/** A string or JSX, or an array of strings rendered as a bullet list. */
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface FAQProps {
|
|
10
|
+
items: readonly FAQEntry[];
|
|
11
|
+
/** Do not scroll the opened item into view. */
|
|
12
|
+
noScroll?: boolean;
|
|
13
|
+
/** Ref to a custom scrollbar (in a modal); scrolled to the bottom when an item opens. */
|
|
14
|
+
scrollRef?: RefObject<{
|
|
15
|
+
scrollToBottom: () => void;
|
|
16
|
+
} | null>;
|
|
17
|
+
/** Title style used inside the "view more" modal. */
|
|
18
|
+
modalViewMore?: boolean;
|
|
19
|
+
/** Smaller, indented text for answers given as a list of strings. */
|
|
20
|
+
withTextStyling?: boolean;
|
|
21
|
+
/** Prefix for data-cy: `{prefix}-accordion`, `{prefix}-item-{slug}-toggle`, etc. */
|
|
22
|
+
dataCyPrefix?: string;
|
|
23
|
+
/** `bordered`: each item is a card (sign-up redesign). Default keeps the plain list. */
|
|
24
|
+
variant?: FieldVariant;
|
|
25
|
+
}
|
|
26
|
+
/** Accordion of questions and answers; one item is open at a time. */
|
|
27
|
+
export declare const FAQ: (props: FAQProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export { FaqItems, FaqItem, FaqTitle, FaqContent, FaqText, FaqDropdownIcon };
|
|
29
|
+
export default FAQ;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import { Text } from "../Text/Text.styles.js";
|
|
4
2
|
import { useState } from "react";
|
|
3
|
+
import { Text } from "../Text/Text.styles.js";
|
|
5
4
|
import { scrollToElement } from "../../utils/scrollUtils.js";
|
|
6
5
|
import { FaqItems, FaqItem, FaqTitle, FaqDropdownIcon, FaqContent, FaqText } from "./FAQ.styles.js";
|
|
7
6
|
function slugFromTitle(title) {
|
|
@@ -10,8 +9,17 @@ function slugFromTitle(title) {
|
|
|
10
9
|
return raw.toLowerCase().trim().slice(0, 48).replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "");
|
|
11
10
|
}
|
|
12
11
|
const FAQ = (props) => {
|
|
13
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
items,
|
|
14
|
+
noScroll,
|
|
15
|
+
scrollRef,
|
|
16
|
+
modalViewMore,
|
|
17
|
+
withTextStyling,
|
|
18
|
+
dataCyPrefix = "faq",
|
|
19
|
+
variant = "default"
|
|
20
|
+
} = props;
|
|
14
21
|
const [activeIndex, setActiveIndex] = useState(null);
|
|
22
|
+
const bordered = variant === "bordered";
|
|
15
23
|
const onTitleClick = (e, index) => {
|
|
16
24
|
e.persist();
|
|
17
25
|
const newActiveIndex = activeIndex === index ? null : index;
|
|
@@ -19,7 +27,7 @@ const FAQ = (props) => {
|
|
|
19
27
|
if (!noScroll && newActiveIndex !== null) {
|
|
20
28
|
if (scrollRef?.current) {
|
|
21
29
|
setTimeout(() => {
|
|
22
|
-
scrollRef?.current
|
|
30
|
+
scrollRef?.current?.scrollToBottom();
|
|
23
31
|
}, 0);
|
|
24
32
|
} else {
|
|
25
33
|
scrollToElement(e.target.parentElement, { offset: 20 });
|
|
@@ -35,9 +43,10 @@ const FAQ = (props) => {
|
|
|
35
43
|
return /* @__PURE__ */ jsx(FaqItems, { "data-cy": `${dataCyPrefix}-accordion`, children: items.map((item, index) => {
|
|
36
44
|
const titleSlug = slugFromTitle(item.title);
|
|
37
45
|
const itemCy = titleSlug ? `${dataCyPrefix}-item-${titleSlug}` : `${dataCyPrefix}-item-${index}`;
|
|
46
|
+
const list = Array.isArray(item.content) ? item.content : null;
|
|
38
47
|
return (
|
|
39
48
|
// eslint-disable-next-line @eslint-react/no-array-index-key -- FAQ order is content-defined
|
|
40
|
-
/* @__PURE__ */ jsxs(FaqItem, { "data-cy": `${itemCy}-wrap`, children: [
|
|
49
|
+
/* @__PURE__ */ jsxs(FaqItem, { "data-cy": `${itemCy}-wrap`, $variant: variant, children: [
|
|
41
50
|
/* @__PURE__ */ jsxs(
|
|
42
51
|
FaqTitle,
|
|
43
52
|
{
|
|
@@ -47,30 +56,21 @@ const FAQ = (props) => {
|
|
|
47
56
|
isActive: activeIndex === index,
|
|
48
57
|
onClick: (e) => onTitleClick(e, index),
|
|
49
58
|
modalViewMore,
|
|
59
|
+
$variant: variant,
|
|
50
60
|
children: [
|
|
51
61
|
item.title,
|
|
52
|
-
/* @__PURE__ */ jsx(FaqDropdownIcon, {})
|
|
62
|
+
/* @__PURE__ */ jsx(FaqDropdownIcon, { $variant: variant })
|
|
53
63
|
]
|
|
54
64
|
}
|
|
55
65
|
),
|
|
56
|
-
/* @__PURE__ */ jsx(FaqContent, { "data-cy": `${itemCy}-panel`, isOpened: activeIndex === index, children: !
|
|
66
|
+
/* @__PURE__ */ jsx(FaqContent, { "data-cy": `${itemCy}-panel`, isOpened: activeIndex === index, children: !list ? /* @__PURE__ */ jsx(FaqText, { $variant: variant, children: item.content }) : bordered ? /* @__PURE__ */ jsx(FaqText, { $variant: variant, children: /* @__PURE__ */ jsx("ul", { children: list.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
67
|
/* @__PURE__ */ jsx("br", {}),
|
|
58
|
-
/* @__PURE__ */ jsx(Text, { style: withTextStyling ? textStyling : {}, children: /* @__PURE__ */ jsx("ul", { children:
|
|
68
|
+
/* @__PURE__ */ jsx(Text, { style: withTextStyling ? textStyling : {}, children: /* @__PURE__ */ jsx("ul", { children: list.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) })
|
|
59
69
|
] }) })
|
|
60
70
|
] }, index)
|
|
61
71
|
);
|
|
62
72
|
}) });
|
|
63
73
|
};
|
|
64
|
-
FAQ.propTypes = {
|
|
65
|
-
items: PropTypes.arrayOf(
|
|
66
|
-
PropTypes.shape({
|
|
67
|
-
title: PropTypes.node.isRequired,
|
|
68
|
-
content: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.node]).isRequired
|
|
69
|
-
})
|
|
70
|
-
).isRequired,
|
|
71
|
-
/** Prefix for data-cy: `{prefix}-accordion`, `{prefix}-item-{slug}-toggle`, etc. */
|
|
72
|
-
dataCyPrefix: PropTypes.string
|
|
73
|
-
};
|
|
74
74
|
export {
|
|
75
75
|
FAQ,
|
|
76
76
|
FaqContent,
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { css } from 'styled-components';
|
|
2
|
+
import { FieldVariant } from '../../styles/borderedField';
|
|
2
3
|
export declare const FaqItems: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
4
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
4
5
|
}> & string;
|
|
5
|
-
export declare const FaqDropdownIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
6
|
+
export declare const FaqDropdownIcon: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
6
7
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
7
|
-
},
|
|
8
|
+
}, {
|
|
9
|
+
$variant?: FieldVariant;
|
|
10
|
+
}>, "children"> & Partial<Pick<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
8
11
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
9
|
-
},
|
|
12
|
+
}, {
|
|
13
|
+
$variant?: FieldVariant;
|
|
14
|
+
}>, "children">>> & string;
|
|
10
15
|
export declare const FaqItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
11
16
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
12
17
|
}, {
|
|
13
18
|
center?: boolean;
|
|
14
19
|
customContainerStyle?: string | ReturnType<typeof css>;
|
|
20
|
+
$variant?: FieldVariant;
|
|
15
21
|
}>> & string;
|
|
16
22
|
export declare const FaqTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
17
23
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
@@ -22,10 +28,12 @@ export declare const FaqTitle: import('styled-components/dist/types').IStyledCom
|
|
|
22
28
|
hideIcon?: boolean;
|
|
23
29
|
isActive?: boolean;
|
|
24
30
|
modalViewMore?: boolean;
|
|
31
|
+
$variant?: FieldVariant;
|
|
25
32
|
}>> & string;
|
|
26
33
|
export declare const FaqContent: any;
|
|
27
34
|
export declare const FaqText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
28
35
|
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
29
36
|
}, {
|
|
30
37
|
largeSpacing?: boolean;
|
|
38
|
+
$variant?: FieldVariant;
|
|
31
39
|
}>> & string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
import { Collapse } from "react-collapse";
|
|
3
|
+
import { BORDERED_BORDER } from "../../styles/borderedField.js";
|
|
3
4
|
import { glyph } from "../MaterialIcon/glyph.js";
|
|
5
|
+
import { text } from "../../design-system/styled/text.js";
|
|
4
6
|
const FaqItems = styled.div`
|
|
5
7
|
position: relative;
|
|
6
8
|
`;
|
|
@@ -19,6 +21,15 @@ const FaqDropdownIcon = styled.span.attrs({
|
|
|
19
21
|
margin-top: -10px;
|
|
20
22
|
transform: rotate(0);
|
|
21
23
|
transition: 0.3s transform;
|
|
24
|
+
|
|
25
|
+
${(props) => props.$variant === "bordered" && css`
|
|
26
|
+
width: 16px;
|
|
27
|
+
height: 16px;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
top: 22px;
|
|
30
|
+
right: var(--space-5);
|
|
31
|
+
margin-top: 0;
|
|
32
|
+
`}
|
|
22
33
|
`;
|
|
23
34
|
const FaqItem = styled.div.withConfig({
|
|
24
35
|
shouldForwardProp: (props) => !["center", "customContainerStyle"].includes(props)
|
|
@@ -27,6 +38,22 @@ const FaqItem = styled.div.withConfig({
|
|
|
27
38
|
margin-top: 30px;
|
|
28
39
|
}
|
|
29
40
|
|
|
41
|
+
${(props) => props.$variant === "bordered" && css`
|
|
42
|
+
padding: 0;
|
|
43
|
+
border: ${BORDERED_BORDER};
|
|
44
|
+
border-radius: var(--radius-lg);
|
|
45
|
+
background: var(--background-default);
|
|
46
|
+
box-shadow: var(--elevation-xs);
|
|
47
|
+
|
|
48
|
+
.ReactCollapse--collapse {
|
|
49
|
+
transition: height 0.3s ease;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
& + & {
|
|
53
|
+
margin-top: var(--space-2);
|
|
54
|
+
}
|
|
55
|
+
`}
|
|
56
|
+
|
|
30
57
|
${(props) => props.center && `
|
|
31
58
|
text-align:center;
|
|
32
59
|
`}
|
|
@@ -39,12 +66,9 @@ const FaqTitle = styled.button.withConfig({
|
|
|
39
66
|
display: block;
|
|
40
67
|
width: 100%;
|
|
41
68
|
position: relative;
|
|
42
|
-
font-family: var(--
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
line-height: 24px;
|
|
46
|
-
letter-spacing: 0.4px;
|
|
47
|
-
color: var(--stokr-text-primary);
|
|
69
|
+
font-family: var(--font-family-base);
|
|
70
|
+
${text("subtitleM")}
|
|
71
|
+
color: var(--text-primary);
|
|
48
72
|
padding: 0;
|
|
49
73
|
margin: 0;
|
|
50
74
|
outline: 0;
|
|
@@ -58,10 +82,21 @@ const FaqTitle = styled.button.withConfig({
|
|
|
58
82
|
color: inherit;
|
|
59
83
|
}
|
|
60
84
|
|
|
85
|
+
${(props) => props.$variant === "bordered" && css`
|
|
86
|
+
${text("subtitleS")}
|
|
87
|
+
padding: var(--space-5) 52px var(--space-5) var(--space-5);
|
|
88
|
+
border-radius: var(--radius-lg);
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
transition: padding-bottom 0.3s ease;
|
|
91
|
+
${props.isActive && `padding-bottom: var(--space-3);`}
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
color: var(--text-primary);
|
|
95
|
+
}
|
|
96
|
+
`}
|
|
97
|
+
|
|
61
98
|
${(props) => props.uppercase && `
|
|
62
|
-
text
|
|
63
|
-
font-weight:700;
|
|
64
|
-
letter-spacing: 0.6px;
|
|
99
|
+
${text("titleXs")}
|
|
65
100
|
`}
|
|
66
101
|
|
|
67
102
|
${({ white }) => white && `
|
|
@@ -120,6 +155,20 @@ const FaqText = styled.div.withConfig({
|
|
|
120
155
|
padding-bottom: 30px;
|
|
121
156
|
|
|
122
157
|
`}
|
|
158
|
+
|
|
159
|
+
${(props) => props.$variant === "bordered" && css`
|
|
160
|
+
padding: 0 var(--space-5) var(--space-5);
|
|
161
|
+
font-size: 14px;
|
|
162
|
+
line-height: 20px;
|
|
163
|
+
font-weight: 400;
|
|
164
|
+
color: var(--text-primary);
|
|
165
|
+
|
|
166
|
+
ul {
|
|
167
|
+
margin: 0;
|
|
168
|
+
padding-left: 20px;
|
|
169
|
+
list-style: disc;
|
|
170
|
+
}
|
|
171
|
+
`}
|
|
123
172
|
`;
|
|
124
173
|
export {
|
|
125
174
|
FaqContent,
|
|
@@ -12,14 +12,14 @@ const FormField = styled.div`
|
|
|
12
12
|
const FormInfo = styled.div.withConfig({
|
|
13
13
|
shouldForwardProp: (props) => !["styledId", "center", "marginTop", "marginBottom"].includes(props)
|
|
14
14
|
})`
|
|
15
|
-
font-family: var(--
|
|
15
|
+
font-family: var(--font-family-base);
|
|
16
16
|
font-weight: ${(props) => props.styleID ? `400` : `300`};
|
|
17
17
|
// All font-weight: 300;
|
|
18
18
|
// ID font-weight: 400;
|
|
19
19
|
font-size: 9px;
|
|
20
20
|
line-height: 1.78em;
|
|
21
21
|
letter-spacing: 0.4px;
|
|
22
|
-
color: var(--
|
|
22
|
+
color: var(--text-primary);
|
|
23
23
|
opacity: ${(props) => props.styleID ? `1` : `0.5`};
|
|
24
24
|
// All opacity: 0.5;
|
|
25
25
|
// ID opacity: 1;
|
|
@@ -36,7 +36,7 @@ const FormInfo = styled.div.withConfig({
|
|
|
36
36
|
transition: color 0.2s;
|
|
37
37
|
|
|
38
38
|
&:hover {
|
|
39
|
-
color: var(--
|
|
39
|
+
color: var(--action-accent-bg);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
`;
|
|
@@ -44,7 +44,7 @@ const FormError = styled.div.withConfig({
|
|
|
44
44
|
shouldForwardProp: (props) => !["show", "styleSuf", "withMarginLeft", "withTopSpacing"].includes(props)
|
|
45
45
|
})`
|
|
46
46
|
display: none;
|
|
47
|
-
font-family: var(--
|
|
47
|
+
font-family: var(--font-family-base);
|
|
48
48
|
font-weight: 300;
|
|
49
49
|
font-size: 11px;
|
|
50
50
|
line-height: 12px;
|
|
@@ -56,7 +56,7 @@ const FormError = styled.div.withConfig({
|
|
|
56
56
|
// ID, IIS & VD top: 2px;
|
|
57
57
|
margin-bottom: -12px;
|
|
58
58
|
letter-spacing: 0.4px;
|
|
59
|
-
color: var(--
|
|
59
|
+
color: var(--status-error-text);
|
|
60
60
|
|
|
61
61
|
${(props) => props.show && "display: block;"}
|
|
62
62
|
//from SUF
|
|
@@ -59,8 +59,8 @@ const Row = styled.div.withConfig({
|
|
|
59
59
|
${breakpoint.MLarge`
|
|
60
60
|
${(props) => props.main && `
|
|
61
61
|
z-index: 0;
|
|
62
|
-
min-height: calc(100vh - var(--
|
|
63
|
-
padding-top: var(--
|
|
62
|
+
min-height: calc(100vh - var(--layout-footer-height));
|
|
63
|
+
padding-top: var(--layout-header-height);
|
|
64
64
|
`}
|
|
65
65
|
`}
|
|
66
66
|
|
|
@@ -156,20 +156,20 @@ const Column = styled.div.withConfig({
|
|
|
156
156
|
|
|
157
157
|
${(props) => props.mainFixed && `
|
|
158
158
|
position: fixed;
|
|
159
|
-
top: var(--
|
|
159
|
+
top: var(--layout-header-height);
|
|
160
160
|
left: 0;
|
|
161
|
-
height: calc(100% - var(--
|
|
161
|
+
height: calc(100% - var(--layout-header-height));
|
|
162
162
|
`}
|
|
163
163
|
|
|
164
164
|
${(props) => props.mainRelative && `
|
|
165
165
|
position: relative;
|
|
166
166
|
margin-left: ${grid((props.full || 16) - props.part, props.full || 16)};
|
|
167
|
-
border-left: 1px solid var(--
|
|
167
|
+
border-left: 1px solid var(--border-subtle);
|
|
168
168
|
//padding: 54px 0 42px;
|
|
169
169
|
`}
|
|
170
170
|
|
|
171
171
|
${(props) => props.withBorder && `
|
|
172
|
-
border-left: 1px solid var(--
|
|
172
|
+
border-left: 1px solid var(--border-subtle);
|
|
173
173
|
`}
|
|
174
174
|
`}
|
|
175
175
|
`;
|
|
@@ -196,7 +196,7 @@ const FlexGrid = styled.div.withConfig({
|
|
|
196
196
|
flex-wrap: wrap;
|
|
197
197
|
|
|
198
198
|
${(props) => props.borderBottom && `
|
|
199
|
-
border-bottom: 1px solid var(--
|
|
199
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
200
200
|
`}
|
|
201
201
|
`;
|
|
202
202
|
export {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import
|
|
4
|
+
import "../Country/CountrySelect.js";
|
|
5
5
|
import { CountryRowRoot, FlagSlot, CountryCode, ResidencyItemRoot, FieldLabel, FieldValue, SectionHeaderRoot, SectionHeaderIconWrap } from "./IdentityInfo.styles.js";
|
|
6
|
+
import { FlagFor } from "../Country/FlagFor.js";
|
|
6
7
|
const IdentitySectionHeader = ({ icon, count, children, style, className }) => /* @__PURE__ */ jsxs(SectionHeaderRoot, { style, className, children: [
|
|
7
8
|
icon && /* @__PURE__ */ jsx(SectionHeaderIconWrap, { children: icon }),
|
|
8
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { text } from "../../design-system/styled/text.js";
|
|
2
3
|
const SectionHeaderRoot = styled.div`
|
|
3
4
|
display: flex;
|
|
4
5
|
align-items: center;
|
|
5
6
|
gap: 8px;
|
|
6
|
-
color: var(--
|
|
7
|
-
|
|
8
|
-
line-height: 24px;
|
|
9
|
-
font-weight: 600;
|
|
10
|
-
letter-spacing: 0.6px;
|
|
7
|
+
color: var(--action-accent-bg);
|
|
8
|
+
${text("subtitleM")}
|
|
11
9
|
margin-bottom: 12px;
|
|
12
10
|
`;
|
|
13
11
|
const SectionHeaderIconWrap = styled.span`
|
|
@@ -16,38 +14,30 @@ const SectionHeaderIconWrap = styled.span`
|
|
|
16
14
|
justify-content: center;
|
|
17
15
|
flex-shrink: 0;
|
|
18
16
|
|
|
19
|
-
> svg
|
|
17
|
+
> svg,
|
|
18
|
+
> img {
|
|
20
19
|
width: 18px;
|
|
21
20
|
height: 18px;
|
|
21
|
+
object-fit: contain;
|
|
22
22
|
}
|
|
23
23
|
`;
|
|
24
24
|
const FieldLabel = styled.p`
|
|
25
25
|
margin: 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
letter-spacing: 2px;
|
|
29
|
-
text-transform: uppercase;
|
|
30
|
-
color: var(--stokr-text-primary);
|
|
31
|
-
font-weight: 400;
|
|
26
|
+
${text("labelRegular")}
|
|
27
|
+
color: var(--text-primary);
|
|
32
28
|
`;
|
|
33
29
|
const FieldValue = styled.p`
|
|
34
30
|
margin: 0 0 4px;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
font-weight: 600;
|
|
38
|
-
color: var(--stokr-text-primary);
|
|
39
|
-
letter-spacing: 0.5px;
|
|
31
|
+
${text("subtitleS")}
|
|
32
|
+
color: var(--text-primary);
|
|
40
33
|
`;
|
|
41
34
|
const CountryRowRoot = styled.div`
|
|
42
35
|
display: flex;
|
|
43
36
|
align-items: center;
|
|
44
37
|
gap: 10px;
|
|
45
38
|
padding: 6px 0;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
font-weight: 600;
|
|
49
|
-
color: var(--stokr-text-primary);
|
|
50
|
-
letter-spacing: 0.5px;
|
|
39
|
+
${text("subtitleS")}
|
|
40
|
+
color: var(--text-primary);
|
|
51
41
|
`;
|
|
52
42
|
const FlagSlot = styled.span`
|
|
53
43
|
display: inline-flex;
|
|
@@ -61,7 +51,7 @@ const FlagSlot = styled.span`
|
|
|
61
51
|
const CountryCode = styled.span`
|
|
62
52
|
font-family: monospace;
|
|
63
53
|
font-size: 12px;
|
|
64
|
-
color: var(--
|
|
54
|
+
color: var(--text-tertiary);
|
|
65
55
|
margin-left: auto;
|
|
66
56
|
`;
|
|
67
57
|
const ResidencyItemRoot = styled.div`
|