@cuemath/leap 2.9.5-j1 → 2.9.5-j10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/loader-1.svg.js +6 -0
- package/dist/assets/illustrations/loader-1.svg.js.map +1 -0
- package/dist/assets/lottie/lottie.js +1 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +27 -16
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +83 -68
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +20 -0
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +19 -22
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +12 -12
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +23 -0
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -0
- package/dist/features/auth/comps/tabs/tabs.js +23 -0
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -0
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +31 -0
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -0
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +46 -0
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +17 -15
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +48 -49
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +16 -5
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +1 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +66 -61
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -1
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js +10 -3
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js.map +1 -1
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js +54 -50
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js.map +1 -1
- package/dist/features/auth/signup/custom-input/grade-input/grade-input.js +6 -6
- package/dist/features/auth/signup/custom-input/grade-input/grade-input.js.map +1 -1
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js +22 -22
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input/student-username/student-username.js +23 -23
- package/dist/features/auth/signup/custom-input/student-username/student-username.js.map +1 -1
- package/dist/features/auth/signup/signup-constants.js.map +1 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +14 -14
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +1 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input-styled.js +61 -60
- package/dist/features/ui/inputs/base-input/base-input-styled.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +38 -35
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input-styled.js +22 -20
- package/dist/features/ui/inputs/text-input/text-input-styled.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +35 -32
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/theme/input.js +84 -11
- package/dist/features/ui/theme/input.js.map +1 -1
- package/dist/index.d.ts +57 -11
- package/dist/index.js +520 -512
- package/dist/index.js.map +1 -1
- package/dist/static/error.cbe1ddde.json +1 -0
- package/package.json +1 -1
@@ -1,55 +1,58 @@
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
2
|
-
import { forwardRef as
|
3
|
-
import
|
4
|
-
import { Input as
|
5
|
-
const i = "regular",
|
2
|
+
import { forwardRef as I } from "react";
|
3
|
+
import $ from "../base-input/base-input.js";
|
4
|
+
import { Input as b } from "./text-input-styled.js";
|
5
|
+
const i = "regular", g = I((l, p) => {
|
6
6
|
const {
|
7
7
|
type: e,
|
8
|
-
label:
|
9
|
-
value:
|
10
|
-
renderAs:
|
11
|
-
width:
|
12
|
-
widthX:
|
8
|
+
label: m,
|
9
|
+
value: r,
|
10
|
+
renderAs: t,
|
11
|
+
width: u,
|
12
|
+
widthX: d,
|
13
13
|
disabled: s,
|
14
|
-
willShowMessage:
|
14
|
+
willShowMessage: c,
|
15
15
|
siblingElement: f,
|
16
|
-
errorMessage:
|
17
|
-
shape:
|
18
|
-
isTransparent:
|
19
|
-
|
20
|
-
|
16
|
+
errorMessage: h,
|
17
|
+
shape: T,
|
18
|
+
isTransparent: o,
|
19
|
+
colorTheme: n,
|
20
|
+
...w
|
21
|
+
} = l;
|
21
22
|
return /* @__PURE__ */ a(
|
22
|
-
|
23
|
+
$,
|
23
24
|
{
|
24
|
-
renderAs:
|
25
|
-
label:
|
26
|
-
stickyLabel: !!
|
27
|
-
width:
|
28
|
-
widthX:
|
25
|
+
renderAs: t,
|
26
|
+
label: m,
|
27
|
+
stickyLabel: !!r || e === "date",
|
28
|
+
width: u,
|
29
|
+
widthX: d,
|
29
30
|
disabled: s,
|
30
|
-
willShowMessage:
|
31
|
+
willShowMessage: c,
|
31
32
|
size: i,
|
32
|
-
shape:
|
33
|
-
errorMessage:
|
34
|
-
isTransparent:
|
33
|
+
shape: T,
|
34
|
+
errorMessage: h,
|
35
|
+
isTransparent: o,
|
36
|
+
colorTheme: n,
|
35
37
|
inputElement: /* @__PURE__ */ a(
|
36
|
-
|
38
|
+
b,
|
37
39
|
{
|
38
40
|
ref: p,
|
39
41
|
type: e,
|
40
|
-
value:
|
41
|
-
$renderAs:
|
42
|
+
value: r ?? "",
|
43
|
+
$renderAs: t,
|
42
44
|
$size: i,
|
43
45
|
disabled: s,
|
44
|
-
$isTransparent:
|
45
|
-
|
46
|
+
$isTransparent: o,
|
47
|
+
$colorTheme: n,
|
48
|
+
...w
|
46
49
|
}
|
47
50
|
),
|
48
51
|
siblingElement: f
|
49
52
|
}
|
50
53
|
);
|
51
|
-
}),
|
54
|
+
}), z = g;
|
52
55
|
export {
|
53
|
-
|
56
|
+
z as default
|
54
57
|
};
|
55
58
|
//# sourceMappingURL=text-input.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input.tsx"],"sourcesContent":["import type { ITextInputProps } from './text-input-types';\nimport type { Ref } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport BaseInput from '../base-input/base-input';\nimport * as Styled from './text-input-styled';\n\nconst SIZE = 'regular';\n\nconst TextInput = forwardRef((props: ITextInputProps, ref: Ref<HTMLInputElement>) => {\n const {\n type,\n label,\n value,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n siblingElement,\n errorMessage,\n shape,\n isTransparent,\n ...rest\n } = props;\n\n return (\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={!!value || type === 'date'}\n width={width}\n widthX={widthX}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={SIZE}\n shape={shape}\n errorMessage={errorMessage}\n isTransparent={isTransparent}\n inputElement={\n <Styled.Input\n ref={ref}\n type={type}\n value={value ?? ''}\n $renderAs={renderAs}\n $size={SIZE}\n disabled={disabled}\n $isTransparent={isTransparent}\n {...rest}\n />\n }\n siblingElement={siblingElement}\n />\n );\n});\n\nexport default TextInput;\n"],"names":["SIZE","TextInput","forwardRef","props","ref","type","label","value","renderAs","width","widthX","disabled","willShowMessage","siblingElement","errorMessage","shape","isTransparent","rest","jsx","BaseInput","Styled.Input","TextInput$1"],"mappings":";;;;AAQA,MAAMA,IAAO,WAEPC,IAAYC,EAAW,CAACC,GAAwBC,MAA+B;AAC7E,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,GAAGC;AAAA,EACD,
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input.tsx"],"sourcesContent":["import type { ITextInputProps } from './text-input-types';\nimport type { Ref } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport BaseInput from '../base-input/base-input';\nimport * as Styled from './text-input-styled';\n\nconst SIZE = 'regular';\n\nconst TextInput = forwardRef((props: ITextInputProps, ref: Ref<HTMLInputElement>) => {\n const {\n type,\n label,\n value,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n siblingElement,\n errorMessage,\n shape,\n isTransparent,\n colorTheme,\n ...rest\n } = props;\n\n return (\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={!!value || type === 'date'}\n width={width}\n widthX={widthX}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={SIZE}\n shape={shape}\n errorMessage={errorMessage}\n isTransparent={isTransparent}\n colorTheme={colorTheme}\n inputElement={\n <Styled.Input\n ref={ref}\n type={type}\n value={value ?? ''}\n $renderAs={renderAs}\n $size={SIZE}\n disabled={disabled}\n $isTransparent={isTransparent}\n $colorTheme={colorTheme}\n {...rest}\n />\n }\n siblingElement={siblingElement}\n />\n );\n});\n\nexport default TextInput;\n"],"names":["SIZE","TextInput","forwardRef","props","ref","type","label","value","renderAs","width","widthX","disabled","willShowMessage","siblingElement","errorMessage","shape","isTransparent","colorTheme","rest","jsx","BaseInput","Styled.Input","TextInput$1"],"mappings":";;;;AAQA,MAAMA,IAAO,WAEPC,IAAYC,EAAW,CAACC,GAAwBC,MAA+B;AAC7E,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAf;AAGF,SAAA,gBAAAgB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAZ;AAAA,MACA,OAAAF;AAAA,MACA,aAAa,CAAC,CAACC,KAASF,MAAS;AAAA,MACjC,OAAAI;AAAA,MACA,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,MAAMZ;AAAA,MACN,OAAAe;AAAA,MACA,cAAAD;AAAA,MACA,eAAAE;AAAA,MACA,YAAAC;AAAA,MACA,cACE,gBAAAE;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAAjB;AAAA,UACA,MAAAC;AAAA,UACA,OAAOE,KAAS;AAAA,UAChB,WAAWC;AAAA,UACX,OAAOR;AAAA,UACP,UAAAW;AAAA,UACA,gBAAgBK;AAAA,UAChB,aAAaC;AAAA,UACZ,GAAGC;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,gBAAAL;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC,GAEDS,IAAerB;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
const n = (a) => {
|
2
|
-
const
|
2
|
+
const o = {
|
3
3
|
regular: {
|
4
4
|
height: a * 2.75,
|
5
5
|
// height of input
|
@@ -51,7 +51,7 @@ const n = (a) => {
|
|
51
51
|
iconPadding: a * 0.5
|
52
52
|
// padding between left of icon and input
|
53
53
|
}
|
54
|
-
},
|
54
|
+
}, e = {
|
55
55
|
valueColorName: {
|
56
56
|
inactive: "BLACK",
|
57
57
|
active: "BLACK",
|
@@ -76,8 +76,8 @@ const n = (a) => {
|
|
76
76
|
disabled: 0.5,
|
77
77
|
enabled: 1
|
78
78
|
}
|
79
|
-
},
|
80
|
-
...
|
79
|
+
}, l = {
|
80
|
+
...e,
|
81
81
|
backgroundColorName: "GREY_1",
|
82
82
|
optionHoverColorName: "WHITE",
|
83
83
|
borderColorName: {
|
@@ -86,11 +86,11 @@ const n = (a) => {
|
|
86
86
|
disabled: "TRANSPARENT"
|
87
87
|
}
|
88
88
|
}, d = {
|
89
|
-
primary:
|
90
|
-
secondary:
|
89
|
+
primary: e,
|
90
|
+
secondary: l,
|
91
91
|
success: {
|
92
|
-
opacity:
|
93
|
-
valueColorName:
|
92
|
+
opacity: e.opacity,
|
93
|
+
valueColorName: e.valueColorName,
|
94
94
|
borderColorName: {
|
95
95
|
inactive: "GREEN_5",
|
96
96
|
active: "GREEN_5",
|
@@ -108,8 +108,8 @@ const n = (a) => {
|
|
108
108
|
}
|
109
109
|
},
|
110
110
|
error: {
|
111
|
-
opacity:
|
112
|
-
valueColorName:
|
111
|
+
opacity: e.opacity,
|
112
|
+
valueColorName: e.valueColorName,
|
113
113
|
borderColorName: {
|
114
114
|
inactive: "RED",
|
115
115
|
active: "RED",
|
@@ -126,8 +126,81 @@ const n = (a) => {
|
|
126
126
|
disabled: "RED"
|
127
127
|
}
|
128
128
|
}
|
129
|
+
}, i = {
|
130
|
+
...e,
|
131
|
+
labelBackgroundColorName: "TRANSPARENT",
|
132
|
+
backgroundColorName: "TRANSPARENT",
|
133
|
+
valueColorName: {
|
134
|
+
inactive: "WHITE",
|
135
|
+
active: "WHITE",
|
136
|
+
disabled: "WHITE_T_10"
|
137
|
+
},
|
138
|
+
borderColorName: {
|
139
|
+
inactive: "WHITE_T_15",
|
140
|
+
active: "WHITE",
|
141
|
+
disabled: "WHITE_T_15"
|
142
|
+
},
|
143
|
+
labelColorName: {
|
144
|
+
inactive: "WHITE_T_60",
|
145
|
+
active: "WHITE_T_60",
|
146
|
+
disabled: "WHITE_T_15"
|
147
|
+
}
|
148
|
+
}, r = {
|
149
|
+
...i,
|
150
|
+
backgroundColorName: "WHITE_T_60",
|
151
|
+
optionHoverColorName: "WHITE",
|
152
|
+
borderColorName: {
|
153
|
+
active: "TRANSPARENT",
|
154
|
+
inactive: "TRANSPARENT",
|
155
|
+
disabled: "TRANSPARENT"
|
156
|
+
}
|
157
|
+
}, N = {
|
158
|
+
primary: i,
|
159
|
+
secondary: r,
|
160
|
+
success: {
|
161
|
+
labelBackgroundColorName: "TRANSPARENT",
|
162
|
+
backgroundColorName: "TRANSPARENT",
|
163
|
+
opacity: i.opacity,
|
164
|
+
valueColorName: i.valueColorName,
|
165
|
+
borderColorName: {
|
166
|
+
inactive: "GREEN_4",
|
167
|
+
active: "GREEN_4",
|
168
|
+
disabled: "GREEN_4"
|
169
|
+
},
|
170
|
+
labelColorName: {
|
171
|
+
inactive: "GREEN_4",
|
172
|
+
active: "GREEN_4",
|
173
|
+
disabled: "GREEN_4"
|
174
|
+
},
|
175
|
+
messageColorName: {
|
176
|
+
inactive: "GREEN_4",
|
177
|
+
active: "GREEN_4",
|
178
|
+
disabled: "GREEN_4"
|
179
|
+
}
|
180
|
+
},
|
181
|
+
error: {
|
182
|
+
labelBackgroundColorName: "TRANSPARENT",
|
183
|
+
backgroundColorName: "TRANSPARENT",
|
184
|
+
opacity: i.opacity,
|
185
|
+
valueColorName: i.valueColorName,
|
186
|
+
borderColorName: {
|
187
|
+
inactive: "ORANGE_4",
|
188
|
+
active: "ORANGE_4",
|
189
|
+
disabled: "ORANGE_4"
|
190
|
+
},
|
191
|
+
labelColorName: {
|
192
|
+
inactive: "ORANGE_4",
|
193
|
+
active: "ORANGE_4",
|
194
|
+
disabled: "ORANGE_4"
|
195
|
+
},
|
196
|
+
messageColorName: {
|
197
|
+
inactive: "ORANGE_4",
|
198
|
+
active: "ORANGE_4",
|
199
|
+
disabled: "ORANGE_4"
|
200
|
+
}
|
201
|
+
}
|
129
202
|
};
|
130
|
-
return { sizes:
|
203
|
+
return { sizes: o, variants: d, darkVariants: N };
|
131
204
|
};
|
132
205
|
export {
|
133
206
|
n as default
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../../src/features/ui/theme/input.ts"],"sourcesContent":["import type { IInputSizeConfig, IInputVariantConfig, TInputSizes, TInputVariants } from '../types';\n\ninterface IGetInputConfig {\n (gutter: number): {\n sizes: Record<TInputSizes, IInputSizeConfig>;\n variants: Record<TInputVariants, IInputVariantConfig>;\n };\n}\nconst getInputConfig: IGetInputConfig = gutter => {\n const sizes: Record<TInputSizes, IInputSizeConfig> = {\n regular: {\n height: gutter * 2.75, // height of input\n marginTop: gutter * 0.5, // extra space when label is on top of input\n marginBottom: gutter * 1.5, // extra space for message comes on bottom of input\n paddingLeft: gutter,\n paddingRight: gutter * 0.75,\n borderRadius: gutter * 0.5,\n inputTextVariant: 'body1',\n labelTextVariant: 'body1',\n messageTextVariant: 'body3',\n iconsize: gutter * 1.5,\n iconPadding: gutter, // padding between left of icon and input\n },\n small: {\n height: gutter * 2.125, // height of input\n marginTop: gutter * 0.5, // extra space when label is on top of input\n marginBottom: 0, // extra space for message comes on bottom of input\n paddingLeft: gutter * 0.5,\n paddingRight: gutter * 0.5,\n borderRadius: gutter * 0.5,\n inputTextVariant: 'body3',\n labelTextVariant: 'body3',\n messageTextVariant: 'body3',\n iconsize: gutter * 1.25,\n iconPadding: gutter * 0.5, // padding between left of icon and input\n },\n xsmall: {\n height: gutter * 1.75, // height of input\n marginTop: 0, // extra space when label is on top of input\n marginBottom: 0, // extra space for message comes on bottom of input\n paddingLeft: gutter * 0.75,\n paddingRight: gutter * 0.5,\n borderRadius: gutter * 0.5,\n inputTextVariant: 'body3',\n labelTextVariant: 'body3',\n messageTextVariant: 'body3',\n iconsize: gutter,\n iconPadding: gutter * 0.5, // padding between left of icon and input\n },\n };\n const primaryVariant: IInputVariantConfig = {\n valueColorName: {\n inactive: 'BLACK',\n active: 'BLACK',\n disabled: 'BLACK_50',\n },\n borderColorName: {\n inactive: 'BLACK_T_15',\n active: 'BLACK_T_87',\n disabled: 'BLACK_T_15',\n },\n labelColorName: {\n inactive: 'BLACK_75',\n active: 'BLACK',\n disabled: 'BLACK_50',\n },\n messageColorName: {\n inactive: 'BLACK_75',\n active: 'BLACK_75',\n disabled: 'BLACK_50',\n },\n opacity: {\n disabled: 0.5,\n enabled: 1,\n },\n };\n\n const secondaryVariant: IInputVariantConfig = {\n ...primaryVariant,\n backgroundColorName: 'GREY_1',\n optionHoverColorName: 'WHITE',\n borderColorName: {\n active: 'TRANSPARENT',\n inactive: 'TRANSPARENT',\n disabled: 'TRANSPARENT',\n },\n };\n\n const variants: Record<TInputVariants, IInputVariantConfig> = {\n primary: primaryVariant,\n secondary: secondaryVariant,\n success: {\n opacity: primaryVariant.opacity,\n valueColorName: primaryVariant.valueColorName,\n borderColorName: {\n inactive: 'GREEN_5',\n active: 'GREEN_5',\n disabled: 'GREEN_5',\n },\n labelColorName: {\n inactive: 'GREEN_5',\n active: 'GREEN_5',\n disabled: 'GREEN_5',\n },\n messageColorName: {\n inactive: 'GREEN_5',\n active: 'GREEN_5',\n disabled: 'GREEN_5',\n },\n },\n error: {\n opacity: primaryVariant.opacity,\n valueColorName: primaryVariant.valueColorName,\n borderColorName: {\n inactive: 'RED',\n active: 'RED',\n disabled: 'RED',\n },\n labelColorName: {\n inactive: 'RED',\n active: 'RED',\n disabled: 'RED',\n },\n messageColorName: {\n inactive: 'RED',\n active: 'RED',\n disabled: 'RED',\n },\n },\n };\n\n return { sizes, variants };\n};\n\nexport default getInputConfig;\n"],"names":["getInputConfig","gutter","sizes","primaryVariant","secondaryVariant","variants"],"mappings":"
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../../src/features/ui/theme/input.ts"],"sourcesContent":["import type { IInputSizeConfig, IInputVariantConfig, TInputSizes, TInputVariants } from '../types';\n\ninterface IGetInputConfig {\n (gutter: number): {\n sizes: Record<TInputSizes, IInputSizeConfig>;\n variants: Record<TInputVariants, IInputVariantConfig>;\n darkVariants: Record<TInputVariants, IInputVariantConfig>;\n };\n}\nconst getInputConfig: IGetInputConfig = gutter => {\n const sizes: Record<TInputSizes, IInputSizeConfig> = {\n regular: {\n height: gutter * 2.75, // height of input\n marginTop: gutter * 0.5, // extra space when label is on top of input\n marginBottom: gutter * 1.5, // extra space for message comes on bottom of input\n paddingLeft: gutter,\n paddingRight: gutter * 0.75,\n borderRadius: gutter * 0.5,\n inputTextVariant: 'body1',\n labelTextVariant: 'body1',\n messageTextVariant: 'body3',\n iconsize: gutter * 1.5,\n iconPadding: gutter, // padding between left of icon and input\n },\n small: {\n height: gutter * 2.125, // height of input\n marginTop: gutter * 0.5, // extra space when label is on top of input\n marginBottom: 0, // extra space for message comes on bottom of input\n paddingLeft: gutter * 0.5,\n paddingRight: gutter * 0.5,\n borderRadius: gutter * 0.5,\n inputTextVariant: 'body3',\n labelTextVariant: 'body3',\n messageTextVariant: 'body3',\n iconsize: gutter * 1.25,\n iconPadding: gutter * 0.5, // padding between left of icon and input\n },\n xsmall: {\n height: gutter * 1.75, // height of input\n marginTop: 0, // extra space when label is on top of input\n marginBottom: 0, // extra space for message comes on bottom of input\n paddingLeft: gutter * 0.75,\n paddingRight: gutter * 0.5,\n borderRadius: gutter * 0.5,\n inputTextVariant: 'body3',\n labelTextVariant: 'body3',\n messageTextVariant: 'body3',\n iconsize: gutter,\n iconPadding: gutter * 0.5, // padding between left of icon and input\n },\n };\n const primaryVariant: IInputVariantConfig = {\n valueColorName: {\n inactive: 'BLACK',\n active: 'BLACK',\n disabled: 'BLACK_50',\n },\n borderColorName: {\n inactive: 'BLACK_T_15',\n active: 'BLACK_T_87',\n disabled: 'BLACK_T_15',\n },\n labelColorName: {\n inactive: 'BLACK_75',\n active: 'BLACK',\n disabled: 'BLACK_50',\n },\n messageColorName: {\n inactive: 'BLACK_75',\n active: 'BLACK_75',\n disabled: 'BLACK_50',\n },\n opacity: {\n disabled: 0.5,\n enabled: 1,\n },\n };\n\n const secondaryVariant: IInputVariantConfig = {\n ...primaryVariant,\n backgroundColorName: 'GREY_1',\n optionHoverColorName: 'WHITE',\n borderColorName: {\n active: 'TRANSPARENT',\n inactive: 'TRANSPARENT',\n disabled: 'TRANSPARENT',\n },\n };\n\n const variants: Record<TInputVariants, IInputVariantConfig> = {\n primary: primaryVariant,\n secondary: secondaryVariant,\n success: {\n opacity: primaryVariant.opacity,\n valueColorName: primaryVariant.valueColorName,\n borderColorName: {\n inactive: 'GREEN_5',\n active: 'GREEN_5',\n disabled: 'GREEN_5',\n },\n labelColorName: {\n inactive: 'GREEN_5',\n active: 'GREEN_5',\n disabled: 'GREEN_5',\n },\n messageColorName: {\n inactive: 'GREEN_5',\n active: 'GREEN_5',\n disabled: 'GREEN_5',\n },\n },\n error: {\n opacity: primaryVariant.opacity,\n valueColorName: primaryVariant.valueColorName,\n borderColorName: {\n inactive: 'RED',\n active: 'RED',\n disabled: 'RED',\n },\n labelColorName: {\n inactive: 'RED',\n active: 'RED',\n disabled: 'RED',\n },\n messageColorName: {\n inactive: 'RED',\n active: 'RED',\n disabled: 'RED',\n },\n },\n };\n\n const primaryDarkVariant: IInputVariantConfig = {\n ...primaryVariant,\n labelBackgroundColorName: 'TRANSPARENT',\n backgroundColorName: 'TRANSPARENT',\n valueColorName: {\n inactive: 'WHITE',\n active: 'WHITE',\n disabled: 'WHITE_T_10',\n },\n borderColorName: {\n inactive: 'WHITE_T_15',\n active: 'WHITE',\n disabled: 'WHITE_T_15',\n },\n labelColorName: {\n inactive: 'WHITE_T_60',\n active: 'WHITE_T_60',\n disabled: 'WHITE_T_15',\n },\n };\n\n const secondaryDarkVariant: IInputVariantConfig = {\n ...primaryDarkVariant,\n backgroundColorName: 'WHITE_T_60',\n optionHoverColorName: 'WHITE',\n borderColorName: {\n active: 'TRANSPARENT',\n inactive: 'TRANSPARENT',\n disabled: 'TRANSPARENT',\n },\n };\n\n const darkVariants: Record<TInputVariants, IInputVariantConfig> = {\n primary: primaryDarkVariant,\n secondary: secondaryDarkVariant,\n success: {\n labelBackgroundColorName: 'TRANSPARENT',\n backgroundColorName: 'TRANSPARENT',\n opacity: primaryDarkVariant.opacity,\n valueColorName: primaryDarkVariant.valueColorName,\n borderColorName: {\n inactive: 'GREEN_4',\n active: 'GREEN_4',\n disabled: 'GREEN_4',\n },\n labelColorName: {\n inactive: 'GREEN_4',\n active: 'GREEN_4',\n disabled: 'GREEN_4',\n },\n messageColorName: {\n inactive: 'GREEN_4',\n active: 'GREEN_4',\n disabled: 'GREEN_4',\n },\n },\n error: {\n labelBackgroundColorName: 'TRANSPARENT',\n backgroundColorName: 'TRANSPARENT',\n opacity: primaryDarkVariant.opacity,\n valueColorName: primaryDarkVariant.valueColorName,\n borderColorName: {\n inactive: 'ORANGE_4',\n active: 'ORANGE_4',\n disabled: 'ORANGE_4',\n },\n labelColorName: {\n inactive: 'ORANGE_4',\n active: 'ORANGE_4',\n disabled: 'ORANGE_4',\n },\n messageColorName: {\n inactive: 'ORANGE_4',\n active: 'ORANGE_4',\n disabled: 'ORANGE_4',\n },\n },\n };\n\n return { sizes, variants, darkVariants };\n};\n\nexport default getInputConfig;\n"],"names":["getInputConfig","gutter","sizes","primaryVariant","secondaryVariant","variants","primaryDarkVariant","secondaryDarkVariant","darkVariants"],"mappings":"AASA,MAAMA,IAAkC,CAAUC,MAAA;AAChD,QAAMC,IAA+C;AAAA,IACnD,SAAS;AAAA,MACP,QAAQD,IAAS;AAAA;AAAA,MACjB,WAAWA,IAAS;AAAA;AAAA,MACpB,cAAcA,IAAS;AAAA;AAAA,MACvB,aAAaA;AAAA,MACb,cAAcA,IAAS;AAAA,MACvB,cAAcA,IAAS;AAAA,MACvB,kBAAkB;AAAA,MAClB,kBAAkB;AAAA,MAClB,oBAAoB;AAAA,MACpB,UAAUA,IAAS;AAAA,MACnB,aAAaA;AAAA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AAAA,IAChE,SAASF;AAAA,IACT,WAAWC;AAAA,IACX,SAAS;AAAA,MACP,0BAA0B;AAAA,MAC1B,qBAAqB;AAAA,MACrB,SAASD,EAAmB;AAAA,MAC5B,gBAAgBA,EAAmB;AAAA,MACnC,iBAAiB;AAAA,QACf,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA,gBAAgB;AAAA,QACd,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA,kBAAkB;AAAA,QAChB,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,0BAA0B;AAAA,MAC1B,qBAAqB;AAAA,MACrB,SAASA,EAAmB;AAAA,MAC5B,gBAAgBA,EAAmB;AAAA,MACnC,iBAAiB;AAAA,QACf,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA,gBAAgB;AAAA,QACd,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA,kBAAkB;AAAA,QAChB,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EAAA;AAGK,SAAA,EAAE,OAAAJ,GAAO,UAAAG,GAAU,cAAAG;AAC5B;"}
|
package/dist/index.d.ts
CHANGED
@@ -502,7 +502,7 @@ declare interface IAccountSelectorViewProps {
|
|
502
502
|
userAccounts: {
|
503
503
|
id: string;
|
504
504
|
username: string;
|
505
|
-
user_avatar?: IAvatarLayer[];
|
505
|
+
user_avatar?: IAvatarLayer[] | null;
|
506
506
|
}[];
|
507
507
|
onSelect: (accountId: string) => void;
|
508
508
|
onAddNew: () => void;
|
@@ -607,6 +607,7 @@ declare interface IBaseInputProps {
|
|
607
607
|
mandatory?: boolean;
|
608
608
|
shape?: TInputShapes;
|
609
609
|
isTransparent?: boolean;
|
610
|
+
colorTheme?: 'light' | 'dark';
|
610
611
|
}
|
611
612
|
|
612
613
|
declare interface IBaseLeaderboardDetails {
|
@@ -912,15 +913,15 @@ declare interface ICircularStepsProps {
|
|
912
913
|
|
913
914
|
declare interface ICircularStepWrapperProps {
|
914
915
|
children: ReactNode;
|
915
|
-
onGoBack?: () => void;
|
916
|
-
onNext?: () => void;
|
917
|
-
label?: string;
|
918
|
-
showNext: boolean;
|
919
|
-
showPrevious: boolean;
|
920
916
|
animation: string;
|
921
917
|
introFrames: [number, number];
|
922
918
|
outroFrames: [number, number];
|
923
|
-
|
919
|
+
onGoBack?: () => void;
|
920
|
+
onNext?: () => void;
|
921
|
+
label?: string;
|
922
|
+
showNext?: boolean;
|
923
|
+
showPrevious?: boolean;
|
924
|
+
isNextLoading?: boolean;
|
924
925
|
}
|
925
926
|
|
926
927
|
declare interface IClaimUserAccountProps {
|
@@ -1089,6 +1090,7 @@ declare interface ICustomInputProps {
|
|
1089
1090
|
helperText?: string;
|
1090
1091
|
actionElement?: ReactNode;
|
1091
1092
|
isLoading?: boolean;
|
1093
|
+
isValid?: boolean;
|
1092
1094
|
}
|
1093
1095
|
|
1094
1096
|
declare interface ICustomVideoProps extends React_2.DetailedHTMLProps<React_2.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement> {
|
@@ -1248,6 +1250,7 @@ declare interface IGetInputConfig {
|
|
1248
1250
|
(gutter: number): {
|
1249
1251
|
sizes: Record<TInputSizes, IInputSizeConfig>;
|
1250
1252
|
variants: Record<TInputVariants, IInputVariantConfig>;
|
1253
|
+
darkVariants: Record<TInputVariants, IInputVariantConfig>;
|
1251
1254
|
};
|
1252
1255
|
}
|
1253
1256
|
|
@@ -1346,6 +1349,15 @@ export declare interface IInputSizeConfig {
|
|
1346
1349
|
iconPadding: number;
|
1347
1350
|
}
|
1348
1351
|
|
1352
|
+
declare interface IInputStatusIconProps {
|
1353
|
+
isLoading: boolean;
|
1354
|
+
isValid: boolean;
|
1355
|
+
isError: boolean;
|
1356
|
+
size?: number;
|
1357
|
+
successColor?: TColorNames;
|
1358
|
+
errorColor?: TColorNames;
|
1359
|
+
}
|
1360
|
+
|
1349
1361
|
export declare interface IInputVariantConfig {
|
1350
1362
|
valueColorName: {
|
1351
1363
|
inactive: TColorNames;
|
@@ -1373,6 +1385,7 @@ export declare interface IInputVariantConfig {
|
|
1373
1385
|
};
|
1374
1386
|
backgroundColorName?: TColorNames;
|
1375
1387
|
optionHoverColorName?: TColorNames;
|
1388
|
+
labelBackgroundColorName?: TColorNames;
|
1376
1389
|
}
|
1377
1390
|
|
1378
1391
|
declare interface IIsOkayTypeQuestion {
|
@@ -2149,6 +2162,8 @@ export declare const Info2Icon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
2149
2162
|
|
2150
2163
|
export declare const InfoIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
2151
2164
|
|
2165
|
+
export declare const InputStatusIcon: React.FC<IInputStatusIconProps>;
|
2166
|
+
|
2152
2167
|
export declare interface INudgeProps {
|
2153
2168
|
nudge: 'click';
|
2154
2169
|
content: ReactNode;
|
@@ -2713,6 +2728,17 @@ export declare interface ISignUpProps {
|
|
2713
2728
|
onSignupStepsComplete: (data: IUpdateUserPayloadDal | ICreateUserResponseDal | null) => void;
|
2714
2729
|
}
|
2715
2730
|
|
2731
|
+
declare interface ISocialAccountNotFoundProps {
|
2732
|
+
onRetryLogin: () => void;
|
2733
|
+
onGoToSignup: () => void;
|
2734
|
+
}
|
2735
|
+
|
2736
|
+
declare interface ISocialLoginMethodsProps {
|
2737
|
+
onGoogleLogin: () => void;
|
2738
|
+
onAppleLogin: () => void;
|
2739
|
+
loadingProvider: TSocialAuthProvider | null;
|
2740
|
+
}
|
2741
|
+
|
2716
2742
|
export declare const isOkayTypeQuestion: IIsOkayTypeQuestion;
|
2717
2743
|
|
2718
2744
|
export declare enum IStatsToAwardErrorCode {
|
@@ -2808,6 +2834,13 @@ declare interface ISyncableWebGameProps {
|
|
2808
2834
|
enableSync?: boolean;
|
2809
2835
|
}
|
2810
2836
|
|
2837
|
+
export declare type ITabConfig<T extends string = string> = Record<T, ITabItem>;
|
2838
|
+
|
2839
|
+
declare interface ITabItem {
|
2840
|
+
label: string;
|
2841
|
+
component?: JSX.Element;
|
2842
|
+
}
|
2843
|
+
|
2811
2844
|
export declare interface ITable {
|
2812
2845
|
tableList: ITableInfo[];
|
2813
2846
|
infiniteModeHighScore: number;
|
@@ -2871,6 +2904,12 @@ export declare interface ITabSizeConfig {
|
|
2871
2904
|
textVariant: TTextVariants;
|
2872
2905
|
}
|
2873
2906
|
|
2907
|
+
declare interface ITabsProps<T extends string> {
|
2908
|
+
selectedTab: T;
|
2909
|
+
onChange: (tab: T) => void;
|
2910
|
+
tabs: ITabConfig<T>;
|
2911
|
+
}
|
2912
|
+
|
2874
2913
|
export declare interface ITabVariantConfig {
|
2875
2914
|
backgroundColorName: {
|
2876
2915
|
inactive: TColorNames;
|
@@ -3215,8 +3254,8 @@ declare interface IUserChapterProgressProps {
|
|
3215
3254
|
|
3216
3255
|
declare interface IUserTypeSelectorProps {
|
3217
3256
|
onNext: () => void;
|
3218
|
-
onUserTypeChange: (id:
|
3219
|
-
userType:
|
3257
|
+
onUserTypeChange: (id: TAuthUserType) => void;
|
3258
|
+
userType: TAuthUserType;
|
3220
3259
|
}
|
3221
3260
|
|
3222
3261
|
declare interface IUseTrialSessionMessageBroker {
|
@@ -3615,6 +3654,7 @@ export declare const LOTTIE: {
|
|
3615
3654
|
DOB: string;
|
3616
3655
|
EASY: string;
|
3617
3656
|
ELITE_CIRCLE: string;
|
3657
|
+
ERROR: string;
|
3618
3658
|
ERROR_LOTTIE: string;
|
3619
3659
|
FAMILIAR1X: string;
|
3620
3660
|
FIFTEEN_MIN_CLOCK: string;
|
@@ -4058,6 +4098,10 @@ export declare const Skip2Icon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
4058
4098
|
|
4059
4099
|
export declare const SkipIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
4060
4100
|
|
4101
|
+
export declare const SocialAccountNotFound: ({ onRetryLogin, onGoToSignup }: ISocialAccountNotFoundProps) => JSX_2.Element;
|
4102
|
+
|
4103
|
+
export declare const SocialLoginMethods: FC<ISocialLoginMethodsProps>;
|
4104
|
+
|
4061
4105
|
export declare const SplashScreen: ({ animationCompleted }: {
|
4062
4106
|
animationCompleted: () => void;
|
4063
4107
|
}) => JSX_2.Element;
|
@@ -4127,6 +4171,8 @@ declare const TAB_CODES: {
|
|
4127
4171
|
|
4128
4172
|
export declare const TabComponent: React_2.FC<ITabProps>;
|
4129
4173
|
|
4174
|
+
export declare function Tabs<T extends string>({ selectedTab, onChange, tabs }: ITabsProps<T>): JSX_2.Element;
|
4175
|
+
|
4130
4176
|
export declare type TAction = EventToPayload<TInclassMessage>;
|
4131
4177
|
|
4132
4178
|
declare type TActionListenerOptions = {
|
@@ -4155,6 +4201,8 @@ export declare type TArrowTooltipVariants = 'primary' | 'secondary';
|
|
4155
4201
|
|
4156
4202
|
export declare type TAuthProvider = 'email' | 'phone';
|
4157
4203
|
|
4204
|
+
export declare type TAuthUserType = 'student' | 'parent';
|
4205
|
+
|
4158
4206
|
declare type TBadgeData = {
|
4159
4207
|
acknowledged_on: number | null;
|
4160
4208
|
animation_url: string;
|
@@ -5018,8 +5066,6 @@ export declare type TSheetsSection = 'core_lessons' | 'supplementary_sheets' | '
|
|
5018
5066
|
|
5019
5067
|
declare type TSheetStateProps = 'LOCKED' | 'NOT_STARTED' | 'IN_PROGRESS' | 'FAMILIAR' | 'PROFICIENT' | 'MASTERED' | 'COMPLETED' | 'RE_ATTEMPT';
|
5020
5068
|
|
5021
|
-
export declare type TSignupUserType = 'student' | 'parent';
|
5022
|
-
|
5023
5069
|
export declare type TSkillStatus = 'pending' | 'completed';
|
5024
5070
|
|
5025
5071
|
export declare type TSocialAuthProvider = 'google' | 'apple';
|