@thecb/components 4.1.20-beta.0 → 4.1.20

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/index.cjs.js CHANGED
@@ -20593,8 +20593,6 @@ var FormInput = function FormInput(_ref13) {
20593
20593
  errorMessages = _ref13.errorMessages,
20594
20594
  _ref13$isNum = _ref13.isNum,
20595
20595
  isNum = _ref13$isNum === void 0 ? false : _ref13$isNum,
20596
- _ref13$isEmail = _ref13.isEmail,
20597
- isEmail = _ref13$isEmail === void 0 ? false : _ref13$isEmail,
20598
20596
  _ref13$helperModal = _ref13.helperModal,
20599
20597
  helperModal = _ref13$helperModal === void 0 ? false : _ref13$helperModal,
20600
20598
  field = _ref13.field,
@@ -20607,7 +20605,7 @@ var FormInput = function FormInput(_ref13) {
20607
20605
  background = _ref13.background,
20608
20606
  customHeight = _ref13.customHeight,
20609
20607
  extraStyles = _ref13.extraStyles,
20610
- props = _objectWithoutProperties(_ref13, ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "extraStyles"]);
20608
+ props = _objectWithoutProperties(_ref13, ["type", "labelTextWhenNoError", "errorMessages", "isNum", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "extraStyles"]);
20611
20609
 
20612
20610
  var _useState = React.useState(false),
20613
20611
  _useState2 = _slicedToArray(_useState, 2),
@@ -20674,7 +20672,7 @@ var FormInput = function FormInput(_ref13) {
20674
20672
  type: type,
20675
20673
  value: field.rawValue,
20676
20674
  pattern: isNum ? "[0-9]*" : "",
20677
- inputMode: isNum ? "numeric" : isEmail ? "email" : "text",
20675
+ inputMode: isNum ? "numeric" : "",
20678
20676
  field: field,
20679
20677
  formatter: formatter,
20680
20678
  showErrors: showErrors,
@@ -20690,7 +20688,7 @@ var FormInput = function FormInput(_ref13) {
20690
20688
  type: type === "password" && showPassword ? "text" : type,
20691
20689
  value: field.rawValue,
20692
20690
  pattern: isNum ? "[0-9]*" : "",
20693
- inputMode: isNum ? "numeric" : isEmail ? "email" : "text",
20691
+ inputMode: isNum ? "numeric" : "",
20694
20692
  field: field,
20695
20693
  showErrors: showErrors,
20696
20694
  "data-qa": labelTextWhenNoError,
@@ -35002,8 +35000,7 @@ var EmailForm = function EmailForm(_ref) {
35002
35000
  showErrors: showErrors,
35003
35001
  onKeyDown: function onKeyDown(e) {
35004
35002
  return e.key === "Enter" && handleSubmit(e);
35005
- },
35006
- isEmail: true
35003
+ }
35007
35004
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
35008
35005
  name: "email checkbox",
35009
35006
  title: "Save email address to wallet",
@@ -35054,8 +35051,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
35054
35051
  showErrors: showErrors,
35055
35052
  onKeyDown: function onKeyDown(e) {
35056
35053
  return e.key === "Enter" && handleSubmit(e);
35057
- },
35058
- isEmail: true
35054
+ }
35059
35055
  });
35060
35056
  };
35061
35057
 
@@ -35158,8 +35154,7 @@ var LoginForm = function LoginForm(_ref) {
35158
35154
  showErrors: showErrors,
35159
35155
  onKeyDown: function onKeyDown(e) {
35160
35156
  return e.key === "Enter" && handleSubmit(e);
35161
- },
35162
- isEmail: true
35157
+ }
35163
35158
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
35164
35159
  labelTextWhenNoError: "Password",
35165
35160
  errorMessages: passwordErrorMessages,
@@ -38549,7 +38544,6 @@ var PartialAmountForm = function PartialAmountForm(_ref) {
38549
38544
  },
38550
38545
  placeholder: "$0.00",
38551
38546
  formatter: moneyFormat,
38552
- isNum: true,
38553
38547
  decorator: /*#__PURE__*/React__default.createElement(Text$1, {
38554
38548
  variant: "p"
38555
38549
  }, "Amount owed:", " ", /*#__PURE__*/React__default.createElement(Text$1, {
@@ -39120,7 +39114,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
39120
39114
  field: fields.routingNumber,
39121
39115
  fieldActions: actions.fields.routingNumber,
39122
39116
  showErrors: showErrors,
39123
- isNum: true,
39124
39117
  helperModal: function helperModal() {
39125
39118
  return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
39126
39119
  link: "What is this?",
@@ -39142,15 +39135,13 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
39142
39135
  showErrors: showErrors,
39143
39136
  onKeyDown: function onKeyDown(e) {
39144
39137
  return e.key === "Enter" && handleSubmit(e);
39145
- },
39146
- isNum: true
39138
+ }
39147
39139
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39148
39140
  labelTextWhenNoError: "Account number",
39149
39141
  errorMessages: accountNumberErrors,
39150
39142
  field: fields.accountNumber,
39151
39143
  fieldActions: actions.fields.accountNumber,
39152
39144
  showErrors: showErrors,
39153
- isNum: true,
39154
39145
  helperModal: function helperModal() {
39155
39146
  return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
39156
39147
  link: "What is this?",
@@ -39172,8 +39163,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
39172
39163
  showErrors: showErrors,
39173
39164
  onKeyDown: function onKeyDown(e) {
39174
39165
  return e.key === "Enter" && handleSubmit(e);
39175
- },
39176
- isNum: true
39166
+ }
39177
39167
  }), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
39178
39168
  labelTextWhenNoError: "Account type",
39179
39169
  options: [{
@@ -39308,8 +39298,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
39308
39298
  formatter: creditCardFormat,
39309
39299
  onKeyDown: function onKeyDown(e) {
39310
39300
  return e.key === "Enter" && handleSubmit(e);
39311
- },
39312
- isNum: true
39301
+ }
39313
39302
  }), /*#__PURE__*/React__default.createElement(FormInputRow, {
39314
39303
  breakpoint: "20rem"
39315
39304
  }, /*#__PURE__*/React__default.createElement(FormInput$1, {
@@ -39321,15 +39310,13 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
39321
39310
  formatter: expirationDateFormat,
39322
39311
  onKeyDown: function onKeyDown(e) {
39323
39312
  return e.key === "Enter" && handleSubmit(e);
39324
- },
39325
- isNum: true
39313
+ }
39326
39314
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39327
39315
  labelTextWhenNoError: "CVV",
39328
39316
  errorMessages: cvvErrors,
39329
39317
  field: fields.cvv,
39330
39318
  fieldActions: actions.fields.cvv,
39331
39319
  showErrors: showErrors,
39332
- isNum: true,
39333
39320
  background: checkCardBrand(fields.creditCardNumber.rawValue) == "AMEX" ? "/AmexCVVHint.svg" : "/CVVHint.svg",
39334
39321
  onKeyDown: function onKeyDown(e) {
39335
39322
  return e.key === "Enter" && handleSubmit(e);
@@ -39428,8 +39415,7 @@ var PhoneForm = function PhoneForm(_ref) {
39428
39415
  formatter: src_2(phoneFormats, formatDelimiter),
39429
39416
  onKeyUp: function onKeyUp(e) {
39430
39417
  return e.key === "Enter" && handleSubmit(e);
39431
- },
39432
- isNum: true
39418
+ }
39433
39419
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
39434
39420
  name: "phone checkbox",
39435
39421
  title: "Save phone number to wallet",
@@ -39710,8 +39696,7 @@ var RegistrationForm = function RegistrationForm(_ref) {
39710
39696
  onKeyDown: function onKeyDown(e) {
39711
39697
  return e.key === "Enter" && handleSubmit(e);
39712
39698
  },
39713
- type: "email",
39714
- isEmail: true
39699
+ type: "email"
39715
39700
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39716
39701
  labelTextWhenNoError: "Password",
39717
39702
  errorMessages: passwordErrorMessages,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.1.20-beta.0",
3
+ "version": "4.1.20",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -85,7 +85,6 @@ const FormInput = ({
85
85
  labelTextWhenNoError = "",
86
86
  errorMessages,
87
87
  isNum = false,
88
- isEmail = false,
89
88
  helperModal = false,
90
89
  field,
91
90
  fieldActions,
@@ -177,7 +176,7 @@ const FormInput = ({
177
176
  type={type}
178
177
  value={field.rawValue}
179
178
  pattern={isNum ? "[0-9]*" : ""}
180
- inputMode={isNum ? "numeric" : isEmail ? "email" : "text"}
179
+ inputMode={isNum ? "numeric" : ""}
181
180
  field={field}
182
181
  formatter={formatter}
183
182
  showErrors={showErrors}
@@ -194,7 +193,7 @@ const FormInput = ({
194
193
  type={type === "password" && showPassword ? "text" : type}
195
194
  value={field.rawValue}
196
195
  pattern={isNum ? "[0-9]*" : ""}
197
- inputMode={isNum ? "numeric" : isEmail ? "email" : "text"}
196
+ inputMode={isNum ? "numeric" : ""}
198
197
  field={field}
199
198
  showErrors={showErrors}
200
199
  data-qa={labelTextWhenNoError}
@@ -45,7 +45,6 @@ const EmailForm = ({
45
45
  fieldActions={actions.fields.email}
46
46
  showErrors={showErrors}
47
47
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
48
- isEmail
49
48
  />
50
49
  {showWalletCheckbox && (
51
50
  <Checkbox
@@ -26,7 +26,6 @@ const ForgotPasswordForm = ({
26
26
  fieldActions={actions.fields.email}
27
27
  showErrors={showErrors}
28
28
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
29
- isEmail
30
29
  />
31
30
  );
32
31
  };
@@ -30,7 +30,6 @@ const LoginForm = ({
30
30
  fieldActions={actions.fields.email}
31
31
  showErrors={showErrors}
32
32
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
33
- isEmail
34
33
  />
35
34
  <FormInput
36
35
  labelTextWhenNoError="Password"
@@ -57,7 +57,6 @@ const PartialAmountForm = ({
57
57
  style={{ textAlign: "right" }}
58
58
  placeholder="$0.00"
59
59
  formatter={moneyFormat}
60
- isNum
61
60
  decorator={
62
61
  <Text variant="p">
63
62
  Amount owed:{" "}
@@ -77,7 +77,6 @@ const PaymentFormACH = ({
77
77
  field={fields.routingNumber}
78
78
  fieldActions={actions.fields.routingNumber}
79
79
  showErrors={showErrors}
80
- isNum
81
80
  helperModal={() => (
82
81
  <AccountAndRoutingModal
83
82
  link="What is this?"
@@ -98,7 +97,6 @@ const PaymentFormACH = ({
98
97
  fieldActions={actions.fields.confirmRoutingNumber}
99
98
  showErrors={showErrors}
100
99
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
101
- isNum
102
100
  />
103
101
  <FormInput
104
102
  labelTextWhenNoError="Account number"
@@ -106,7 +104,6 @@ const PaymentFormACH = ({
106
104
  field={fields.accountNumber}
107
105
  fieldActions={actions.fields.accountNumber}
108
106
  showErrors={showErrors}
109
- isNum
110
107
  helperModal={() => (
111
108
  <AccountAndRoutingModal
112
109
  link="What is this?"
@@ -127,7 +124,6 @@ const PaymentFormACH = ({
127
124
  fieldActions={actions.fields.confirmAccountNumber}
128
125
  showErrors={showErrors}
129
126
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
130
- isNum
131
127
  />
132
128
  {allowBankAccountType && (
133
129
  <FormSelect
@@ -94,7 +94,6 @@ const PaymentFormCard = ({
94
94
  showErrors={showErrors}
95
95
  formatter={creditCardFormat}
96
96
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
97
- isNum
98
97
  />
99
98
  <FormInputRow breakpoint="20rem">
100
99
  <FormInput
@@ -105,7 +104,6 @@ const PaymentFormCard = ({
105
104
  showErrors={showErrors}
106
105
  formatter={expirationDateFormat}
107
106
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
108
- isNum
109
107
  />
110
108
  <FormInput
111
109
  labelTextWhenNoError="CVV"
@@ -113,7 +111,6 @@ const PaymentFormCard = ({
113
111
  field={fields.cvv}
114
112
  fieldActions={actions.fields.cvv}
115
113
  showErrors={showErrors}
116
- isNum
117
114
  background={
118
115
  checkCardBrand(fields.creditCardNumber.rawValue) == "AMEX"
119
116
  ? "/AmexCVVHint.svg"
@@ -40,7 +40,6 @@ const PhoneForm = ({
40
40
  showErrors={showErrors}
41
41
  formatter={createFormat(phoneFormats, formatDelimiter)}
42
42
  onKeyUp={e => e.key === "Enter" && handleSubmit(e)}
43
- isNum
44
43
  />
45
44
  {showWalletCheckbox && (
46
45
  <Checkbox
@@ -76,7 +76,6 @@ const RegistrationForm = ({
76
76
  showErrors={showErrors}
77
77
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
78
78
  type="email"
79
- isEmail
80
79
  />
81
80
  <FormInput
82
81
  labelTextWhenNoError="Password"