@stokr/components-library 4.2.3 → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -0
  2. package/dist/components/FAQ/FAQ.d.ts +29 -0
  3. package/dist/components/FAQ/FAQ.js +18 -18
  4. package/dist/components/FAQ/FAQ.styles.d.ts +38 -0
  5. package/dist/components/FAQ/FAQ.styles.js +58 -1
  6. package/dist/components/Input/Input.d.ts +3 -0
  7. package/dist/components/Input/Input.js +5 -2
  8. package/dist/components/Input/Input.styles.d.ts +4 -0
  9. package/dist/components/Input/Input.styles.js +57 -0
  10. package/dist/components/Input/Select.d.ts +57 -0
  11. package/dist/components/Input/Select.js +71 -94
  12. package/dist/components/Input/Select.styles.d.ts +79 -0
  13. package/dist/components/Input/Select.styles.js +68 -1
  14. package/dist/components/StepSidebar/MobileStepProgress.d.ts +12 -0
  15. package/dist/components/StepSidebar/MobileStepProgress.js +14 -0
  16. package/dist/components/StepSidebar/MobileStepProgress.styles.d.ts +15 -0
  17. package/dist/components/StepSidebar/MobileStepProgress.styles.js +42 -0
  18. package/dist/components/StepSidebar/StepProgress.d.ts +14 -0
  19. package/dist/components/StepSidebar/StepProgress.js +14 -0
  20. package/dist/components/StepSidebar/StepProgress.styles.d.ts +30 -0
  21. package/dist/components/StepSidebar/StepProgress.styles.js +103 -0
  22. package/dist/components/StepSidebar/StepSidebar.d.ts +34 -0
  23. package/dist/components/StepSidebar/StepSidebar.js +56 -0
  24. package/dist/components/StepSidebar/StepSidebar.styles.d.ts +54 -0
  25. package/dist/components/StepSidebar/StepSidebar.styles.js +171 -0
  26. package/dist/index.d.ts +21 -5
  27. package/dist/index.js +6 -0
  28. package/dist/styles/borderedField.d.ts +11 -0
  29. package/dist/styles/borderedField.js +56 -0
  30. package/package.json +1 -1
@@ -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,34 @@
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
+ /** Shows the close (×) button in the mobile header. */
28
+ onClose?: () => void;
29
+ closeLabel?: string;
30
+ dataCyPrefix?: string;
31
+ className?: string;
32
+ }
33
+ /** Dark flow sidebar shell: logo, intro, your content and a support contact; a compact header on mobile. */
34
+ export declare const StepSidebar: ({ children, mobileContent, intro, support, logoAlt, onLogoClick, onClose, closeLabel, dataCyPrefix, className, }: StepSidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
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
+ intro,
9
+ support,
10
+ logoAlt,
11
+ onLogoClick,
12
+ onClose,
13
+ closeLabel = "Close",
14
+ dataCyPrefix = "step-sidebar",
15
+ className
16
+ }) => {
17
+ 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}` });
18
+ return /* @__PURE__ */ jsxs(Aside, { className, children: [
19
+ /* @__PURE__ */ jsxs(MobileHeader, { children: [
20
+ logo(MobileLogoImg, "logo-mobile"),
21
+ onClose && /* @__PURE__ */ jsx(CloseButton, { type: "button", "aria-label": closeLabel, onClick: onClose, "data-cy": `${dataCyPrefix}-close`, children: /* @__PURE__ */ jsx(MaterialIcon, { name: "close", size: 28 }) })
22
+ ] }),
23
+ /* @__PURE__ */ jsx(DesktopOnly, { children: logo(DesktopLogoImg, "logo") }),
24
+ intro && /* @__PURE__ */ jsx(DesktopOnly, { children: /* @__PURE__ */ jsxs(TopBlock, { children: [
25
+ /* @__PURE__ */ jsx(Eyebrow, { children: intro.eyebrow }),
26
+ /* @__PURE__ */ jsxs(NameGroup, { children: [
27
+ /* @__PURE__ */ jsx(Title, { children: intro.title }),
28
+ intro.description && /* @__PURE__ */ jsx(Description, { children: intro.description })
29
+ ] })
30
+ ] }) }),
31
+ children && /* @__PURE__ */ jsx(DesktopOnly, { children }),
32
+ mobileContent && /* @__PURE__ */ jsx(MobileOnly, { children: mobileContent }),
33
+ /* @__PURE__ */ jsxs(DesktopOnly, { children: [
34
+ /* @__PURE__ */ jsx(Spacer, {}),
35
+ support && /* @__PURE__ */ jsxs(SupportWrap, { children: [
36
+ /* @__PURE__ */ jsx(SupportHeading, { children: support.heading }),
37
+ /* @__PURE__ */ jsxs(SupportBody, { children: [
38
+ support.body,
39
+ " ",
40
+ /* @__PURE__ */ jsx(
41
+ SupportLink,
42
+ {
43
+ href: support.href,
44
+ "data-cy": `${dataCyPrefix}-support-link`,
45
+ ...support.external && { target: "_blank", rel: "noopener noreferrer" },
46
+ children: support.linkLabel
47
+ }
48
+ )
49
+ ] })
50
+ ] })
51
+ ] })
52
+ ] });
53
+ };
54
+ export {
55
+ StepSidebar
56
+ };
@@ -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,171 @@
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
+ justify-content: space-between;
33
+ gap: 16px;
34
+ padding: 16px 18px;
35
+
36
+ ${media.desktopUp} {
37
+ display: none;
38
+ }
39
+ `;
40
+ const CloseButton = styled.button`
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ flex-shrink: 0;
45
+ width: 32px;
46
+ height: 32px;
47
+ padding: 0;
48
+ background: none;
49
+ border: none;
50
+ cursor: pointer;
51
+ color: ${colors.white};
52
+ transition: opacity 0.2s;
53
+
54
+ &:hover {
55
+ opacity: 0.7;
56
+ }
57
+ `;
58
+ const DesktopOnly = styled.div`
59
+ display: none;
60
+
61
+ ${media.desktopUp} {
62
+ display: contents;
63
+ }
64
+ `;
65
+ const MobileOnly = styled.div`
66
+ display: contents;
67
+
68
+ ${media.desktopUp} {
69
+ display: none;
70
+ }
71
+ `;
72
+ const Spacer = styled.div`
73
+ flex: 1 1 auto;
74
+ `;
75
+ const LogoButton = styled.button`
76
+ display: inline-block;
77
+ padding: 0;
78
+ background: none;
79
+ border: none;
80
+ cursor: pointer;
81
+ color: ${colors.white};
82
+ `;
83
+ const MobileLogoImg = styled.img`
84
+ display: block;
85
+ width: 100px;
86
+ height: auto;
87
+ `;
88
+ const DesktopLogoImg = styled.img`
89
+ display: block;
90
+ width: 140px;
91
+ height: auto;
92
+ `;
93
+ const TopBlock = styled.div`
94
+ display: flex;
95
+ flex-direction: column;
96
+ gap: 16px;
97
+ `;
98
+ const NameGroup = styled.div`
99
+ display: flex;
100
+ flex-direction: column;
101
+ gap: 12px;
102
+ `;
103
+ const Eyebrow = styled.p`
104
+ ${typography.labelRunningHeader}
105
+ margin: 0;
106
+ color: ${colors.white};
107
+ `;
108
+ const Title = styled.p`
109
+ ${typography.h3}
110
+ margin: 0;
111
+ color: ${colors.white};
112
+ `;
113
+ const Description = styled.p`
114
+ ${typography.bodyLg}
115
+ margin: 0;
116
+ color: ${colors.white};
117
+ `;
118
+ const SupportWrap = styled.div`
119
+ padding-top: 21px;
120
+ border-top: 1px solid ${colors.grey4};
121
+ `;
122
+ const SupportHeading = styled.p`
123
+ margin: 0 0 6px;
124
+ font-size: 14px;
125
+ font-weight: 600;
126
+ line-height: 20px;
127
+ color: ${colors.white};
128
+
129
+ ${media.desktopXlUp} {
130
+ font-size: 16px;
131
+ }
132
+ `;
133
+ const SupportBody = styled.p`
134
+ margin: 0;
135
+ font-size: 12px;
136
+ font-weight: 400;
137
+ line-height: 18px;
138
+ color: ${colors.white};
139
+
140
+ ${media.desktopXlUp} {
141
+ font-size: 13px;
142
+ }
143
+ `;
144
+ const SupportLink = styled.a`
145
+ color: ${colors.lighterGreen};
146
+ text-decoration: underline;
147
+
148
+ &:hover {
149
+ color: ${colors.lighterGreen};
150
+ }
151
+ `;
152
+ export {
153
+ Aside,
154
+ CloseButton,
155
+ Description,
156
+ DesktopLogoImg,
157
+ DesktopOnly,
158
+ Eyebrow,
159
+ LogoButton,
160
+ MobileHeader,
161
+ MobileLogoImg,
162
+ MobileOnly,
163
+ NameGroup,
164
+ Spacer,
165
+ SupportBody,
166
+ SupportHeading,
167
+ SupportLink,
168
+ SupportWrap,
169
+ Title,
170
+ TopBlock
171
+ };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,27 @@ type AnyValue = any
14
14
  /* TYPED (TS sources) */
15
15
  export { Input, InputWrapper, InputLabel, InputWrap } from './components/Input/Input'
16
16
  export type { InputProps } from './components/Input/Input'
17
+ export type { FieldVariant } from './styles/borderedField'
18
+ export { FAQ, FaqItems, FaqItem, FaqTitle, FaqContent, FaqText, FaqDropdownIcon } from './components/FAQ/FAQ'
19
+ export type { FAQProps, FAQEntry } from './components/FAQ/FAQ'
20
+ export { StepSidebar } from './components/StepSidebar/StepSidebar'
21
+ export type { StepSidebarProps, StepSidebarIntro, StepSidebarSupport } from './components/StepSidebar/StepSidebar'
22
+ export { StepProgress } from './components/StepSidebar/StepProgress'
23
+ export type { StepProgressProps, StepProgressItem, StepStatus } from './components/StepSidebar/StepProgress'
24
+ export { MobileStepProgress } from './components/StepSidebar/MobileStepProgress'
25
+ export type { MobileStepProgressProps, StepCaptionInfo } from './components/StepSidebar/MobileStepProgress'
26
+ export {
27
+ Select,
28
+ SelectControl,
29
+ SelectMenu,
30
+ SelectMenuList,
31
+ SelectOption,
32
+ SelectContainer,
33
+ SelectValueContainer,
34
+ SelectIcon,
35
+ SelectWrapper,
36
+ } from './components/Input/Select'
37
+ export type { SelectProps, SelectOptionItem, SelectChange, SelectValue } from './components/Input/Select'
17
38
  export { StokrLoader, StokrLoaderBox, LoadingDots, loaderGif, AnimatedSpan } from './components/StokrLoader/StokrLoader'
18
39
  export type { StokrLoaderProps, LoadingDotsProps } from './components/StokrLoader/StokrLoader'
19
40
  export { Text } from './components/Text/Text.styles'
@@ -206,8 +227,6 @@ export type { CheckboxProps } from './components/Checkbox/Checkbox'
206
227
  export declare const ComponentScroll: AnyComponent
207
228
  export declare const MemoCryptoAddress: AnyComponent, CryptoAddress: AnyComponent
208
229
  export declare const CryptoAddressWrapper: AnyComponent
209
- export declare const FAQ: AnyComponent, FaqItems: AnyComponent, FaqItem: AnyComponent, FaqTitle: AnyComponent
210
- export declare const FaqContent: AnyComponent, FaqText: AnyComponent, FaqDropdownIcon: AnyComponent
211
230
  export declare const Form: AnyComponent, FormContainer: AnyComponent, FormField: AnyComponent
212
231
  export declare const FormInfo: AnyComponent, FormError: AnyComponent
213
232
  export declare const Card: AnyComponent, CardTitle: AnyComponent, CardTitleContainer: AnyComponent
@@ -219,9 +238,6 @@ export declare const SearchInput: AnyComponent
219
238
  export declare const DatePickerInput: AnyComponent
220
239
  export declare const InputPassword: AnyComponent
221
240
  export declare const RangeInput: AnyComponent
222
- export declare const Select: AnyComponent, SelectControl: AnyComponent, SelectMenu: AnyComponent
223
- export declare const SelectMenuList: AnyComponent, SelectOption: AnyComponent, SelectContainer: AnyComponent
224
- export declare const SelectValueContainer: AnyComponent, SelectIcon: AnyComponent, SelectWrapper: AnyComponent
225
241
  export declare const MultiSelect: AnyComponent, CheckboxWrapperDiv: AnyComponent
226
242
  export declare const CheckboxDiv: AnyComponent, OptionLabel: AnyComponent
227
243
  export declare const CountrySelect: AnyComponent, FlagFor: AnyComponent, Flags: AnyValue
package/dist/index.js CHANGED
@@ -16,6 +16,9 @@ import { ComponentWrapper } from "./components/ComponentWrapper/ComponentWrapper
16
16
  import { CryptoAddress, MemoCryptoAddress } from "./components/CryptoAddress/CryptoAddress.js";
17
17
  import { CryptoAddressWrapper } from "./components/CryptoAddressWrapper/CryptoAddressWrapper.js";
18
18
  import { FAQ } from "./components/FAQ/FAQ.js";
19
+ import { StepSidebar } from "./components/StepSidebar/StepSidebar.js";
20
+ import { StepProgress } from "./components/StepSidebar/StepProgress.js";
21
+ import { MobileStepProgress } from "./components/StepSidebar/MobileStepProgress.js";
19
22
  import { Form } from "./components/Form/Form.js";
20
23
  import { Card, CardHeader, CardHeaderRegular, CardLeftText, CardRightText, CardTitle, CardTitleContainer } from "./components/Card/Card.styles.js";
21
24
  import { Column, FlexContainer, FlexGrid, PageWrapper, Row, Wrapper } from "./components/Grid/Grid.styles.js";
@@ -246,6 +249,7 @@ export {
246
249
  MaterialIcon,
247
250
  MemoCryptoAddress,
248
251
  MenuNav,
252
+ MobileStepProgress,
249
253
  Modal,
250
254
  ModalBack,
251
255
  Box as ModalBox,
@@ -326,6 +330,8 @@ export {
326
330
  StepControllerConsumer,
327
331
  StepControllerContext,
328
332
  StepControllerProvider,
333
+ StepProgress,
334
+ StepSidebar,
329
335
  StokrLoader,
330
336
  StokrLoaderBox,
331
337
  StyledBackButton,
@@ -0,0 +1,11 @@
1
+ /** `bordered` is the sign-up redesign look shared by Input, Select and FAQ. */
2
+ export type FieldVariant = 'default' | 'bordered';
3
+ export declare const BORDERED_BORDER: string;
4
+ /** Fragments hold plain strings only (no function interpolations) so react-select's emotion can consume them too. */
5
+ export declare const borderedFieldBox: import('styled-components').RuleSet<object>;
6
+ export declare const borderedFieldText: import('styled-components').RuleSet<object>;
7
+ export declare const borderedFieldPlaceholder: import('styled-components').RuleSet<object>;
8
+ export declare const borderedFieldFocus: import('styled-components').RuleSet<object>;
9
+ export declare const borderedFieldError: import('styled-components').RuleSet<object>;
10
+ export declare const borderedFieldDisabled: import('styled-components').RuleSet<object>;
11
+ export declare const borderedFieldLabel: import('styled-components').RuleSet<object>;
@@ -0,0 +1,56 @@
1
+ import { css } from "styled-components";
2
+ import { colors } from "./colors.js";
3
+ import theme from "./theme.js";
4
+ import { space, radius } from "./spacing.js";
5
+ import { typography } from "./typography.js";
6
+ const BORDERED_BORDER = `1px solid ${colors.lightGrey}`;
7
+ const borderedFieldBox = css`
8
+ box-sizing: border-box;
9
+ min-height: 44px;
10
+ padding: calc(${space[3]} - 1px) ${space[4]};
11
+ border: ${BORDERED_BORDER};
12
+ border-radius: ${radius.lg};
13
+ background-color: ${colors.white};
14
+ box-shadow: none;
15
+ transition: border-color 0.2s;
16
+ `;
17
+ const borderedFieldText = css`
18
+ font-family: 'Open Sans', sans-serif;
19
+ ${typography.bodyMdCallout}
20
+ color: ${colors.black};
21
+ `;
22
+ const borderedFieldPlaceholder = css`
23
+ color: ${colors.grey2};
24
+ opacity: 1;
25
+ `;
26
+ const borderedFieldFocus = css`
27
+ border-color: ${theme.cPrimary};
28
+ `;
29
+ const borderedFieldError = css`
30
+ border-color: ${theme.cWarning};
31
+ `;
32
+ const borderedFieldDisabled = css`
33
+ background-color: ${colors.grey3};
34
+ border-color: ${colors.lightGrey};
35
+ color: ${colors.grey2};
36
+ cursor: not-allowed;
37
+ `;
38
+ const borderedFieldLabel = css`
39
+ display: block;
40
+ margin-bottom: ${space[2]};
41
+ font-size: 12px;
42
+ line-height: 16px;
43
+ font-weight: 600;
44
+ letter-spacing: 0;
45
+ text-transform: none;
46
+ `;
47
+ export {
48
+ BORDERED_BORDER,
49
+ borderedFieldBox,
50
+ borderedFieldDisabled,
51
+ borderedFieldError,
52
+ borderedFieldFocus,
53
+ borderedFieldLabel,
54
+ borderedFieldPlaceholder,
55
+ borderedFieldText
56
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
4
4
  "description": "STOKR - Components Library",
5
5
  "author": "Bilal Hodzic <bilal@stokr.io>",
6
6
  "license": "MIT",