@aws-amplify/ui 6.0.1 → 6.0.3

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.js CHANGED
@@ -3121,7 +3121,7 @@ const authenticatorTextUtil = {
3121
3121
  getDeliveryMethodText,
3122
3122
  /** ConfirmSignIn */
3123
3123
  getChallengeText,
3124
- /** ResetPassword */
3124
+ /** ForgotPassword */
3125
3125
  getResetYourPasswordText: () => translate(DefaultTexts.RESET_PASSWORD),
3126
3126
  /** SetupTotp */
3127
3127
  getSetupTotpText: () => translate(DefaultTexts.SETUP_TOTP),
@@ -3287,6 +3287,7 @@ const runFieldValidators = ({ value, validators, eventType, hasBlurred, }) => {
3287
3287
 
3288
3288
  // default `autoSignIn` flag is `true`
3289
3289
  const DEFAULT_AUTO_SIGN_IN = true;
3290
+ const EMPTY_STRING = '';
3290
3291
  const sanitizePhoneNumber = (dialCode, phoneNumber) => `${dialCode}${phoneNumber}`.replace(/[^A-Z0-9+]/gi, '');
3291
3292
  const selectUserAttributes = (_, key) => {
3292
3293
  // Allowlist of Cognito User Pool Attributes (from OpenID Connect specification)
@@ -3318,7 +3319,7 @@ const selectUserAttributes = (_, key) => {
3318
3319
  const getUserAttributes = (formValues) => {
3319
3320
  const { phone_number, ...userAttributes } = pickBy__default["default"](formValues, selectUserAttributes);
3320
3321
  // only include `phone_number` attribute in `userAttributes` if it has a value
3321
- if (isString(phone_number)) {
3322
+ if (isString(phone_number) && phone_number !== EMPTY_STRING) {
3322
3323
  const { country_code } = formValues;
3323
3324
  return {
3324
3325
  ...userAttributes,
@@ -3817,7 +3818,7 @@ function forgotPasswordActor({ services, }) {
3817
3818
  tags: 'pending',
3818
3819
  entry: ['clearError', 'sendUpdate'],
3819
3820
  invoke: {
3820
- src: 'resetPassword',
3821
+ src: 'handleResetPassword',
3821
3822
  onDone: { target: 'idle' },
3822
3823
  onError: { actions: 'setRemoteError', target: 'idle' },
3823
3824
  },
@@ -4461,13 +4462,13 @@ function signUpActor({ services }) {
4461
4462
  async federatedSignIn(_, { data }) {
4462
4463
  return auth.signInWithRedirect(data);
4463
4464
  },
4464
- async handleSignUp(context, _event) {
4465
+ async handleSignUp(context) {
4465
4466
  const { formValues, loginMechanisms, username } = context;
4466
4467
  const loginMechanism = loginMechanisms[0];
4467
4468
  const input = getSignUpInput(username, formValues, loginMechanism);
4468
4469
  return services.handleSignUp(input);
4469
4470
  },
4470
- async validateSignUp(context, _event) {
4471
+ async validateSignUp(context) {
4471
4472
  // This needs to exist in the machine to reference new `services`
4472
4473
  return runValidators(context.formValues, context.touched, context.passwordSettings, [
4473
4474
  // Validation of password
@@ -5388,13 +5389,7 @@ const button = {
5388
5389
  backgroundColor: { value: '{colors.blue.10.value}' },
5389
5390
  color: { value: '{colors.blue.100.value}' },
5390
5391
  boxShadow: {
5391
- value: {
5392
- offsetX: '0px',
5393
- offsetY: '0px',
5394
- blurRadius: '0px',
5395
- spreadRadius: '1px',
5396
- color: '{colors.blue.100.value}',
5397
- },
5392
+ value: '{components.fieldcontrol.info._focus.boxShadow.value}',
5398
5393
  },
5399
5394
  },
5400
5395
  _active: {
@@ -5417,13 +5412,7 @@ const button = {
5417
5412
  backgroundColor: { value: '{colors.orange.10.value}' },
5418
5413
  color: { value: '{colors.orange.100.value}' },
5419
5414
  boxShadow: {
5420
- value: {
5421
- offsetX: '0px',
5422
- offsetY: '0px',
5423
- blurRadius: '0px',
5424
- spreadRadius: '1px',
5425
- color: '{colors.orange.100.value}',
5426
- },
5415
+ value: '{components.fieldcontrol.warning._focus.boxShadow.value}',
5427
5416
  },
5428
5417
  },
5429
5418
  _active: {
@@ -5446,13 +5435,7 @@ const button = {
5446
5435
  backgroundColor: { value: '{colors.green.10.value}' },
5447
5436
  color: { value: '{colors.green.100.value}' },
5448
5437
  boxShadow: {
5449
- value: {
5450
- offsetX: '0px',
5451
- offsetY: '0px',
5452
- blurRadius: '0px',
5453
- spreadRadius: '1px',
5454
- color: '{colors.green.100.value}',
5455
- },
5438
+ value: '{components.fieldcontrol.success._focus.boxShadow.value}',
5456
5439
  },
5457
5440
  },
5458
5441
  _active: {
@@ -5475,13 +5458,7 @@ const button = {
5475
5458
  backgroundColor: { value: '{colors.red.10.value}' },
5476
5459
  color: { value: '{colors.red.100.value}' },
5477
5460
  boxShadow: {
5478
- value: {
5479
- offsetX: '0px',
5480
- offsetY: '0px',
5481
- blurRadius: '0px',
5482
- spreadRadius: '1px',
5483
- color: '{colors.red.100.value}',
5484
- },
5461
+ value: '{components.fieldcontrol._error._focus.boxShadow.value}',
5485
5462
  },
5486
5463
  },
5487
5464
  _active: {
@@ -5504,13 +5481,7 @@ const button = {
5504
5481
  backgroundColor: { value: '{colors.overlay.5.value}' },
5505
5482
  color: { value: '{colors.neutral.90.value}' },
5506
5483
  boxShadow: {
5507
- value: {
5508
- offsetX: '0px',
5509
- offsetY: '0px',
5510
- blurRadius: '0px',
5511
- spreadRadius: '1px',
5512
- color: '{colors.overlay.90.value}',
5513
- },
5484
+ value: '{components.fieldcontrol.overlay._focus.boxShadow.value}',
5514
5485
  },
5515
5486
  },
5516
5487
  _active: {
@@ -5566,13 +5537,7 @@ const button = {
5566
5537
  backgroundColor: { value: '{colors.blue.90.value}' },
5567
5538
  color: { value: '{colors.font.inverse.value}' },
5568
5539
  boxShadow: {
5569
- value: {
5570
- offsetX: '0px',
5571
- offsetY: '0px',
5572
- blurRadius: '0px',
5573
- spreadRadius: '1px',
5574
- color: '{colors.blue.100.value}',
5575
- },
5540
+ value: '{components.fieldcontrol.info._focus.boxShadow.value}',
5576
5541
  },
5577
5542
  },
5578
5543
  _active: {
@@ -5595,13 +5560,7 @@ const button = {
5595
5560
  backgroundColor: { value: '{colors.orange.90.value}' },
5596
5561
  color: { value: '{colors.font.inverse.value}' },
5597
5562
  boxShadow: {
5598
- value: {
5599
- offsetX: '0px',
5600
- offsetY: '0px',
5601
- blurRadius: '0px',
5602
- spreadRadius: '1px',
5603
- color: '{colors.orange.100.value}',
5604
- },
5563
+ value: '{components.fieldcontrol.overlay._focus.boxShadow.value}',
5605
5564
  },
5606
5565
  },
5607
5566
  _active: {
@@ -5624,13 +5583,7 @@ const button = {
5624
5583
  backgroundColor: { value: '{colors.red.90.value}' },
5625
5584
  color: { value: '{colors.font.inverse.value}' },
5626
5585
  boxShadow: {
5627
- value: {
5628
- offsetX: '0px',
5629
- offsetY: '0px',
5630
- blurRadius: '0px',
5631
- spreadRadius: '1px',
5632
- color: '{colors.red.100.value}',
5633
- },
5586
+ value: '{components.fieldcontrol._error._focus.boxShadow.value}',
5634
5587
  },
5635
5588
  },
5636
5589
  _active: {
@@ -5653,13 +5606,7 @@ const button = {
5653
5606
  backgroundColor: { value: '{colors.green.90.value}' },
5654
5607
  color: { value: '{colors.font.inverse.value}' },
5655
5608
  boxShadow: {
5656
- value: {
5657
- offsetX: '0px',
5658
- offsetY: '0px',
5659
- blurRadius: '0px',
5660
- spreadRadius: '1px',
5661
- color: '{colors.green.100.value}',
5662
- },
5609
+ value: '{components.fieldcontrol.success._focus.boxShadow.value}',
5663
5610
  },
5664
5611
  },
5665
5612
  _active: {
@@ -5682,13 +5629,7 @@ const button = {
5682
5629
  backgroundColor: { value: '{colors.overlay.90.value}' },
5683
5630
  color: { value: '{colors.font.inverse.value}' },
5684
5631
  boxShadow: {
5685
- value: {
5686
- offsetX: '0px',
5687
- offsetY: '0px',
5688
- blurRadius: '0px',
5689
- spreadRadius: '1px',
5690
- color: '{colors.overlay.90.value}',
5691
- },
5632
+ value: '{components.fieldcontrol.overlay._focus.boxShadow.value}',
5692
5633
  },
5693
5634
  },
5694
5635
  _active: {
@@ -5766,13 +5707,7 @@ const button = {
5766
5707
  backgroundColor: { value: '{colors.blue.10.value}' },
5767
5708
  color: { value: '{colors.blue.100.value}' },
5768
5709
  boxShadow: {
5769
- value: {
5770
- offsetX: '0px',
5771
- offsetY: '0px',
5772
- blurRadius: '0px',
5773
- spreadRadius: '1px',
5774
- color: '{colors.blue.100.value}',
5775
- },
5710
+ value: '{components.fieldcontrol.info._focus.boxShadow.value}',
5776
5711
  },
5777
5712
  },
5778
5713
  _active: {
@@ -5795,13 +5730,7 @@ const button = {
5795
5730
  backgroundColor: { value: '{colors.orange.10.value}' },
5796
5731
  color: { value: '{colors.orange.100.value}' },
5797
5732
  boxShadow: {
5798
- value: {
5799
- offsetX: '0px',
5800
- offsetY: '0px',
5801
- blurRadius: '0px',
5802
- spreadRadius: '1px',
5803
- color: '{colors.orange.100.value}',
5804
- },
5733
+ value: '{components.fieldcontrol.warning._focus.boxShadow.value}',
5805
5734
  },
5806
5735
  },
5807
5736
  _active: {
@@ -5824,13 +5753,7 @@ const button = {
5824
5753
  backgroundColor: { value: '{colors.green.10.value}' },
5825
5754
  color: { value: '{colors.green.100.value}' },
5826
5755
  boxShadow: {
5827
- value: {
5828
- offsetX: '0px',
5829
- offsetY: '0px',
5830
- blurRadius: '0px',
5831
- spreadRadius: '1px',
5832
- color: '{colors.green.100.value}',
5833
- },
5756
+ value: '{components.fieldcontrol.success._focus.boxShadow.value}',
5834
5757
  },
5835
5758
  },
5836
5759
  _active: {
@@ -5853,13 +5776,7 @@ const button = {
5853
5776
  backgroundColor: { value: '{colors.red.10.value}' },
5854
5777
  color: { value: '{colors.red.100.value}' },
5855
5778
  boxShadow: {
5856
- value: {
5857
- offsetX: '0px',
5858
- offsetY: '0px',
5859
- blurRadius: '0px',
5860
- spreadRadius: '1px',
5861
- color: '{colors.red.100.value}',
5862
- },
5779
+ value: '{components.fieldcontrol._error._focus.boxShadow.value}',
5863
5780
  },
5864
5781
  },
5865
5782
  _active: {
@@ -5882,13 +5799,7 @@ const button = {
5882
5799
  backgroundColor: { value: '{colors.overlay.5.value}' },
5883
5800
  color: { value: '{colors.overlay.90.value}' },
5884
5801
  boxShadow: {
5885
- value: {
5886
- offsetX: '0px',
5887
- offsetY: '0px',
5888
- blurRadius: '0px',
5889
- spreadRadius: '1px',
5890
- color: '{colors.overlay.90.value}',
5891
- },
5802
+ value: '{components.fieldcontrol.overlay._focus.boxShadow.value}',
5892
5803
  },
5893
5804
  },
5894
5805
  _active: {
@@ -6056,16 +5967,8 @@ const checkbox = {
6056
5967
  outlineStyle: { value: 'solid' },
6057
5968
  outlineWidth: { value: '{outlineWidths.medium.value}' },
6058
5969
  outlineOffset: { value: '{outlineOffsets.medium.value}' },
6059
- borderColor: { value: '{colors.transparent.value}' },
6060
- boxShadow: {
6061
- value: {
6062
- offsetX: '0px',
6063
- offsetY: '0px',
6064
- blurRadius: '0px',
6065
- spreadRadius: '2px',
6066
- color: '{colors.border.focus.value}',
6067
- },
6068
- },
5970
+ borderColor: { value: '{colors.border.focus.value}' },
5971
+ boxShadow: { value: '{components.fieldcontrol._focus.boxShadow.value}' },
6069
5972
  },
6070
5973
  _disabled: {
6071
5974
  borderColor: { value: '{colors.border.disabled.value}' },
@@ -6073,15 +5976,9 @@ const checkbox = {
6073
5976
  _error: {
6074
5977
  borderColor: { value: '{colors.border.error.value}' },
6075
5978
  _focus: {
6076
- borderColor: { value: '{colors.transparent.value}' },
5979
+ borderColor: { value: '{colors.border.error.value}' },
6077
5980
  boxShadow: {
6078
- value: {
6079
- offsetX: '0px',
6080
- offsetY: '0px',
6081
- blurRadius: '0px',
6082
- spreadRadius: '2px',
6083
- color: '{colors.border.error.value}',
6084
- },
5981
+ value: '{components.fieldcontrol._error._focus.boxShadow.value}',
6085
5982
  },
6086
5983
  },
6087
5984
  },
@@ -6410,47 +6307,38 @@ const fieldcontrol = {
6410
6307
  borderBlockStart: { value: 'none' },
6411
6308
  borderRadius: { value: '0' },
6412
6309
  _focus: {
6413
- borderBlockEndColor: { value: '{colors.border.focus.value}' },
6310
+ borderBlockEndColor: { value: 'transparent' },
6414
6311
  boxShadow: {
6415
- value: {
6416
- offsetX: '0px',
6417
- offsetY: '1px',
6418
- color: '{colors.border.focus.value}',
6419
- blurRadius: '0px',
6420
- },
6312
+ value: '{components.fieldcontrol._focus.boxShadow.value}',
6421
6313
  },
6422
6314
  },
6423
6315
  _error: {
6424
6316
  borderBlockEndColor: { value: '{colors.border.error.value}' },
6425
6317
  _focus: {
6318
+ borderBlockEndColor: { value: 'transparent' },
6426
6319
  boxShadow: {
6427
- value: {
6428
- offsetX: '0px',
6429
- offsetY: '1px',
6430
- color: '{colors.border.error.value}',
6431
- blurRadius: '0px',
6432
- },
6320
+ value: '{components.fieldcontrol._error._focus.boxShadow.value}',
6433
6321
  },
6434
6322
  },
6435
6323
  },
6436
6324
  },
6437
6325
  _focus: {
6438
6326
  // These focus styles have been calibrated to create
6439
- // a highly visible focus indicator per WCAG 2.1 guidliness:
6440
- // See: https://www.w3.org/WAI/WCAG21/Techniques/general/G195.html
6327
+ // a highly visible focus indicator per WCAG 2.2 guidlines:
6328
+ // See: https://www.w3.org/TR/WCAG22/#focus-appearance
6441
6329
  //
6442
6330
  // Key features:
6443
- // * Focus indicator area is at least the 1 CSS px border around the component.
6444
- // * Contrast between focused and unfocused states has a ratio of 3:1
6331
+ // * Focus indicator area is at least the 2 CSS px perimeter around the component.
6332
+ // * Contrast between focused and unfocused area of contrast has a ratio of 3:1
6445
6333
  //
6446
- // IMPORTANT: Must recalibrate if `colors.border.primary` or `colors.focus` are changed
6334
+ // IMPORTANT: Must recalibrate if `colors.border.focus` are changed
6447
6335
  borderColor: { value: '{colors.border.focus.value}' },
6448
6336
  boxShadow: {
6449
6337
  value: {
6450
6338
  offsetX: '0px',
6451
6339
  offsetY: '0px',
6452
6340
  blurRadius: '0px',
6453
- spreadRadius: '1px',
6341
+ spreadRadius: '2px',
6454
6342
  color: '{colors.border.focus.value}',
6455
6343
  },
6456
6344
  },
@@ -6470,12 +6358,64 @@ const fieldcontrol = {
6470
6358
  offsetX: '0px',
6471
6359
  offsetY: '0px',
6472
6360
  blurRadius: '0px',
6473
- spreadRadius: '1px',
6361
+ spreadRadius: '2px',
6474
6362
  color: '{colors.border.error.value}',
6475
6363
  },
6476
6364
  },
6477
6365
  },
6478
6366
  },
6367
+ info: {
6368
+ _focus: {
6369
+ boxShadow: {
6370
+ value: {
6371
+ offsetX: '0px',
6372
+ offsetY: '0px',
6373
+ blurRadius: '0px',
6374
+ spreadRadius: '2px',
6375
+ color: '{colors.blue.100.value}',
6376
+ },
6377
+ },
6378
+ },
6379
+ },
6380
+ warning: {
6381
+ _focus: {
6382
+ boxShadow: {
6383
+ value: {
6384
+ offsetX: '0px',
6385
+ offsetY: '0px',
6386
+ blurRadius: '0px',
6387
+ spreadRadius: '2px',
6388
+ color: '{colors.orange.100.value}',
6389
+ },
6390
+ },
6391
+ },
6392
+ },
6393
+ success: {
6394
+ _focus: {
6395
+ boxShadow: {
6396
+ value: {
6397
+ offsetX: '0px',
6398
+ offsetY: '0px',
6399
+ blurRadius: '0px',
6400
+ spreadRadius: '2px',
6401
+ color: '{colors.green.100.value}',
6402
+ },
6403
+ },
6404
+ },
6405
+ },
6406
+ overlay: {
6407
+ _focus: {
6408
+ boxShadow: {
6409
+ value: {
6410
+ offsetX: '0px',
6411
+ offsetY: '0px',
6412
+ blurRadius: '0px',
6413
+ spreadRadius: '2px',
6414
+ color: '{colors.overlay.90.value}',
6415
+ },
6416
+ },
6417
+ },
6418
+ },
6479
6419
  };
6480
6420
 
6481
6421
  const fieldgroup = {
@@ -7156,15 +7096,7 @@ const sliderfield = {
7156
7096
  },
7157
7097
  _focus: {
7158
7098
  borderColor: { value: '{colors.border.focus.value}' },
7159
- boxShadow: {
7160
- value: {
7161
- offsetX: '0',
7162
- offsetY: '0',
7163
- blurRadius: '0',
7164
- spreadRadius: '2px',
7165
- color: '{colors.border.focus.value}',
7166
- },
7167
- },
7099
+ boxShadow: { value: '{components.fieldcontrol._focus.boxShadow.value}' },
7168
7100
  },
7169
7101
  },
7170
7102
  small: {
@@ -7322,13 +7254,7 @@ const switchfield = {
7322
7254
  },
7323
7255
  _focused: {
7324
7256
  shadow: {
7325
- value: {
7326
- offsetX: '0px',
7327
- offsetY: '0px',
7328
- blurRadius: '0px',
7329
- spreadRadius: '2px',
7330
- color: '{colors.border.focus.value}',
7331
- },
7257
+ value: '{components.fieldcontrol._focus.boxShadow.value}',
7332
7258
  },
7333
7259
  },
7334
7260
  // Sizes
@@ -167,7 +167,7 @@
167
167
  --amplify-components-button-outlined-info-focus-border-color: var(--amplify-colors-blue-100);
168
168
  --amplify-components-button-outlined-info-focus-background-color: var(--amplify-colors-blue-10);
169
169
  --amplify-components-button-outlined-info-focus-color: var(--amplify-colors-blue-100);
170
- --amplify-components-button-outlined-info-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-blue-100);
170
+ --amplify-components-button-outlined-info-focus-box-shadow: var(--amplify-components-fieldcontrol-info-focus-box-shadow);
171
171
  --amplify-components-button-outlined-info-active-border-color: var(--amplify-colors-blue-100);
172
172
  --amplify-components-button-outlined-info-active-background-color: var(--amplify-colors-blue-20);
173
173
  --amplify-components-button-outlined-info-active-color: var(--amplify-colors-blue-100);
@@ -180,7 +180,7 @@
180
180
  --amplify-components-button-outlined-warning-focus-border-color: var(--amplify-colors-orange-100);
181
181
  --amplify-components-button-outlined-warning-focus-background-color: var(--amplify-colors-orange-10);
182
182
  --amplify-components-button-outlined-warning-focus-color: var(--amplify-colors-orange-100);
183
- --amplify-components-button-outlined-warning-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-orange-100);
183
+ --amplify-components-button-outlined-warning-focus-box-shadow: var(--amplify-components-fieldcontrol-warning-focus-box-shadow);
184
184
  --amplify-components-button-outlined-warning-active-border-color: var(--amplify-colors-orange-100);
185
185
  --amplify-components-button-outlined-warning-active-background-color: var(--amplify-colors-orange-20);
186
186
  --amplify-components-button-outlined-warning-active-color: var(--amplify-colors-orange-100);
@@ -193,7 +193,7 @@
193
193
  --amplify-components-button-outlined-success-focus-border-color: var(--amplify-colors-green-100);
194
194
  --amplify-components-button-outlined-success-focus-background-color: var(--amplify-colors-green-10);
195
195
  --amplify-components-button-outlined-success-focus-color: var(--amplify-colors-green-100);
196
- --amplify-components-button-outlined-success-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-green-100);
196
+ --amplify-components-button-outlined-success-focus-box-shadow: var(--amplify-components-fieldcontrol-success-focus-box-shadow);
197
197
  --amplify-components-button-outlined-success-active-border-color: var(--amplify-colors-green-100);
198
198
  --amplify-components-button-outlined-success-active-background-color: var(--amplify-colors-green-20);
199
199
  --amplify-components-button-outlined-success-active-color: var(--amplify-colors-green-100);
@@ -206,7 +206,7 @@
206
206
  --amplify-components-button-outlined-error-focus-border-color: var(--amplify-colors-red-100);
207
207
  --amplify-components-button-outlined-error-focus-background-color: var(--amplify-colors-red-10);
208
208
  --amplify-components-button-outlined-error-focus-color: var(--amplify-colors-red-100);
209
- --amplify-components-button-outlined-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-red-100);
209
+ --amplify-components-button-outlined-error-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
210
210
  --amplify-components-button-outlined-error-active-border-color: var(--amplify-colors-red-100);
211
211
  --amplify-components-button-outlined-error-active-background-color: var(--amplify-colors-red-20);
212
212
  --amplify-components-button-outlined-error-active-color: var(--amplify-colors-red-100);
@@ -219,7 +219,7 @@
219
219
  --amplify-components-button-outlined-overlay-focus-border-color: var(--amplify-colors-overlay-90);
220
220
  --amplify-components-button-outlined-overlay-focus-background-color: var(--amplify-colors-overlay-5);
221
221
  --amplify-components-button-outlined-overlay-focus-color: var(--amplify-colors-neutral-90);
222
- --amplify-components-button-outlined-overlay-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-overlay-90);
222
+ --amplify-components-button-outlined-overlay-focus-box-shadow: var(--amplify-components-fieldcontrol-overlay-focus-box-shadow);
223
223
  --amplify-components-button-outlined-overlay-active-border-color: var(--amplify-colors-overlay-90);
224
224
  --amplify-components-button-outlined-overlay-active-background-color: var(--amplify-colors-overlay-10);
225
225
  --amplify-components-button-outlined-overlay-active-color: var(--amplify-colors-neutral-100);
@@ -253,7 +253,7 @@
253
253
  --amplify-components-button-primary-info-focus-border-color: transparent;
254
254
  --amplify-components-button-primary-info-focus-background-color: var(--amplify-colors-blue-90);
255
255
  --amplify-components-button-primary-info-focus-color: var(--amplify-colors-font-inverse);
256
- --amplify-components-button-primary-info-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-blue-100);
256
+ --amplify-components-button-primary-info-focus-box-shadow: var(--amplify-components-fieldcontrol-info-focus-box-shadow);
257
257
  --amplify-components-button-primary-info-active-border-color: transparent;
258
258
  --amplify-components-button-primary-info-active-background-color: var(--amplify-colors-blue-100);
259
259
  --amplify-components-button-primary-info-active-color: var(--amplify-colors-font-inverse);
@@ -266,7 +266,7 @@
266
266
  --amplify-components-button-primary-warning-focus-border-color: transparent;
267
267
  --amplify-components-button-primary-warning-focus-background-color: var(--amplify-colors-orange-90);
268
268
  --amplify-components-button-primary-warning-focus-color: var(--amplify-colors-font-inverse);
269
- --amplify-components-button-primary-warning-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-orange-100);
269
+ --amplify-components-button-primary-warning-focus-box-shadow: var(--amplify-components-fieldcontrol-overlay-focus-box-shadow);
270
270
  --amplify-components-button-primary-warning-active-border-color: transparent;
271
271
  --amplify-components-button-primary-warning-active-background-color: var(--amplify-colors-orange-100);
272
272
  --amplify-components-button-primary-warning-active-color: var(--amplify-colors-font-inverse);
@@ -279,7 +279,7 @@
279
279
  --amplify-components-button-primary-error-focus-border-color: transparent;
280
280
  --amplify-components-button-primary-error-focus-background-color: var(--amplify-colors-red-90);
281
281
  --amplify-components-button-primary-error-focus-color: var(--amplify-colors-font-inverse);
282
- --amplify-components-button-primary-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-red-100);
282
+ --amplify-components-button-primary-error-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
283
283
  --amplify-components-button-primary-error-active-border-color: transparent;
284
284
  --amplify-components-button-primary-error-active-background-color: var(--amplify-colors-red-100);
285
285
  --amplify-components-button-primary-error-active-color: var(--amplify-colors-font-inverse);
@@ -292,7 +292,7 @@
292
292
  --amplify-components-button-primary-success-focus-border-color: transparent;
293
293
  --amplify-components-button-primary-success-focus-background-color: var(--amplify-colors-green-90);
294
294
  --amplify-components-button-primary-success-focus-color: var(--amplify-colors-font-inverse);
295
- --amplify-components-button-primary-success-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-green-100);
295
+ --amplify-components-button-primary-success-focus-box-shadow: var(--amplify-components-fieldcontrol-success-focus-box-shadow);
296
296
  --amplify-components-button-primary-success-active-border-color: transparent;
297
297
  --amplify-components-button-primary-success-active-background-color: var(--amplify-colors-green-100);
298
298
  --amplify-components-button-primary-success-active-color: var(--amplify-colors-font-inverse);
@@ -305,7 +305,7 @@
305
305
  --amplify-components-button-primary-overlay-focus-border-color: transparent;
306
306
  --amplify-components-button-primary-overlay-focus-background-color: var(--amplify-colors-overlay-90);
307
307
  --amplify-components-button-primary-overlay-focus-color: var(--amplify-colors-font-inverse);
308
- --amplify-components-button-primary-overlay-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-overlay-90);
308
+ --amplify-components-button-primary-overlay-focus-box-shadow: var(--amplify-components-fieldcontrol-overlay-focus-box-shadow);
309
309
  --amplify-components-button-primary-overlay-active-border-color: transparent;
310
310
  --amplify-components-button-primary-overlay-active-background-color: var(--amplify-colors-overlay-90);
311
311
  --amplify-components-button-primary-overlay-active-color: var(--amplify-colors-font-inverse);
@@ -348,7 +348,7 @@
348
348
  --amplify-components-button-link-info-focus-border-color: transparent;
349
349
  --amplify-components-button-link-info-focus-background-color: var(--amplify-colors-blue-10);
350
350
  --amplify-components-button-link-info-focus-color: var(--amplify-colors-blue-100);
351
- --amplify-components-button-link-info-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-blue-100);
351
+ --amplify-components-button-link-info-focus-box-shadow: var(--amplify-components-fieldcontrol-info-focus-box-shadow);
352
352
  --amplify-components-button-link-info-active-border-color: transparent;
353
353
  --amplify-components-button-link-info-active-background-color: var(--amplify-colors-blue-20);
354
354
  --amplify-components-button-link-info-active-color: var(--amplify-colors-blue-100);
@@ -361,7 +361,7 @@
361
361
  --amplify-components-button-link-warning-focus-border-color: transparent;
362
362
  --amplify-components-button-link-warning-focus-background-color: var(--amplify-colors-orange-10);
363
363
  --amplify-components-button-link-warning-focus-color: var(--amplify-colors-orange-100);
364
- --amplify-components-button-link-warning-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-orange-100);
364
+ --amplify-components-button-link-warning-focus-box-shadow: var(--amplify-components-fieldcontrol-warning-focus-box-shadow);
365
365
  --amplify-components-button-link-warning-active-border-color: transparent;
366
366
  --amplify-components-button-link-warning-active-background-color: var(--amplify-colors-orange-20);
367
367
  --amplify-components-button-link-warning-active-color: var(--amplify-colors-orange-100);
@@ -374,7 +374,7 @@
374
374
  --amplify-components-button-link-success-focus-border-color: transparent;
375
375
  --amplify-components-button-link-success-focus-background-color: var(--amplify-colors-green-10);
376
376
  --amplify-components-button-link-success-focus-color: var(--amplify-colors-green-100);
377
- --amplify-components-button-link-success-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-green-100);
377
+ --amplify-components-button-link-success-focus-box-shadow: var(--amplify-components-fieldcontrol-success-focus-box-shadow);
378
378
  --amplify-components-button-link-success-active-border-color: transparent;
379
379
  --amplify-components-button-link-success-active-background-color: var(--amplify-colors-green-20);
380
380
  --amplify-components-button-link-success-active-color: var(--amplify-colors-green-100);
@@ -387,7 +387,7 @@
387
387
  --amplify-components-button-link-error-focus-border-color: transparent;
388
388
  --amplify-components-button-link-error-focus-background-color: var(--amplify-colors-red-10);
389
389
  --amplify-components-button-link-error-focus-color: var(--amplify-colors-red-100);
390
- --amplify-components-button-link-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-red-100);
390
+ --amplify-components-button-link-error-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
391
391
  --amplify-components-button-link-error-active-border-color: transparent;
392
392
  --amplify-components-button-link-error-active-background-color: var(--amplify-colors-red-20);
393
393
  --amplify-components-button-link-error-active-color: var(--amplify-colors-red-100);
@@ -400,7 +400,7 @@
400
400
  --amplify-components-button-link-overlay-focus-border-color: transparent;
401
401
  --amplify-components-button-link-overlay-focus-background-color: var(--amplify-colors-overlay-5);
402
402
  --amplify-components-button-link-overlay-focus-color: var(--amplify-colors-overlay-90);
403
- --amplify-components-button-link-overlay-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-overlay-90);
403
+ --amplify-components-button-link-overlay-focus-box-shadow: var(--amplify-components-fieldcontrol-overlay-focus-box-shadow);
404
404
  --amplify-components-button-link-overlay-active-border-color: transparent;
405
405
  --amplify-components-button-link-overlay-active-background-color: var(--amplify-colors-overlay-10);
406
406
  --amplify-components-button-link-overlay-active-color: var(--amplify-colors-overlay-90);
@@ -493,12 +493,12 @@
493
493
  --amplify-components-checkbox-button-focus-outline-style: solid;
494
494
  --amplify-components-checkbox-button-focus-outline-width: var(--amplify-outline-widths-medium);
495
495
  --amplify-components-checkbox-button-focus-outline-offset: var(--amplify-outline-offsets-medium);
496
- --amplify-components-checkbox-button-focus-border-color: var(--amplify-colors-transparent);
497
- --amplify-components-checkbox-button-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-border-focus);
496
+ --amplify-components-checkbox-button-focus-border-color: var(--amplify-colors-border-focus);
497
+ --amplify-components-checkbox-button-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
498
498
  --amplify-components-checkbox-button-disabled-border-color: var(--amplify-colors-border-disabled);
499
499
  --amplify-components-checkbox-button-error-border-color: var(--amplify-colors-border-error);
500
- --amplify-components-checkbox-button-error-focus-border-color: var(--amplify-colors-transparent);
501
- --amplify-components-checkbox-button-error-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-border-error);
500
+ --amplify-components-checkbox-button-error-focus-border-color: var(--amplify-colors-border-error);
501
+ --amplify-components-checkbox-button-error-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
502
502
  --amplify-components-checkbox-icon-background-color: var(--amplify-colors-primary-80);
503
503
  --amplify-components-checkbox-icon-border-radius: 20%;
504
504
  --amplify-components-checkbox-icon-opacity: var(--amplify-opacities-0);
@@ -627,19 +627,24 @@
627
627
  --amplify-components-fieldcontrol-quiet-border-inline-end: none;
628
628
  --amplify-components-fieldcontrol-quiet-border-block-start: none;
629
629
  --amplify-components-fieldcontrol-quiet-border-radius: 0;
630
- --amplify-components-fieldcontrol-quiet-focus-border-block-end-color: var(--amplify-colors-border-focus);
631
- --amplify-components-fieldcontrol-quiet-focus-box-shadow: 0px 1px 0px var(--amplify-colors-border-focus);
630
+ --amplify-components-fieldcontrol-quiet-focus-border-block-end-color: transparent;
631
+ --amplify-components-fieldcontrol-quiet-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
632
632
  --amplify-components-fieldcontrol-quiet-error-border-block-end-color: var(--amplify-colors-border-error);
633
- --amplify-components-fieldcontrol-quiet-error-focus-box-shadow: 0px 1px 0px var(--amplify-colors-border-error);
633
+ --amplify-components-fieldcontrol-quiet-error-focus-border-block-end-color: transparent;
634
+ --amplify-components-fieldcontrol-quiet-error-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
634
635
  --amplify-components-fieldcontrol-focus-border-color: var(--amplify-colors-border-focus);
635
- --amplify-components-fieldcontrol-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-focus);
636
+ --amplify-components-fieldcontrol-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-border-focus);
636
637
  --amplify-components-fieldcontrol-disabled-color: var(--amplify-colors-font-disabled);
637
638
  --amplify-components-fieldcontrol-disabled-cursor: not-allowed;
638
639
  --amplify-components-fieldcontrol-disabled-border-color: var(--amplify-colors-transparent);
639
640
  --amplify-components-fieldcontrol-disabled-background-color: var(--amplify-colors-background-disabled);
640
641
  --amplify-components-fieldcontrol-error-border-color: var(--amplify-colors-border-error);
641
642
  --amplify-components-fieldcontrol-error-color: var(--amplify-colors-font-error);
642
- --amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-error);
643
+ --amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-border-error);
644
+ --amplify-components-fieldcontrol-info-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-blue-100);
645
+ --amplify-components-fieldcontrol-warning-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-orange-100);
646
+ --amplify-components-fieldcontrol-success-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-green-100);
647
+ --amplify-components-fieldcontrol-overlay-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-overlay-90);
643
648
  --amplify-components-fieldgroup-gap: var(--amplify-space-zero);
644
649
  --amplify-components-fieldgroup-vertical-align-items: center;
645
650
  --amplify-components-fieldgroup-outer-align-items: center;
@@ -985,7 +990,7 @@
985
990
  --amplify-components-sliderfield-thumb-hover-background-color: var(--amplify-colors-background-primary);
986
991
  --amplify-components-sliderfield-thumb-hover-border-color: var(--amplify-colors-border-focus);
987
992
  --amplify-components-sliderfield-thumb-focus-border-color: var(--amplify-colors-border-focus);
988
- --amplify-components-sliderfield-thumb-focus-box-shadow: 0 0 0 2px var(--amplify-colors-border-focus);
993
+ --amplify-components-sliderfield-thumb-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
989
994
  --amplify-components-sliderfield-small-track-height: 0.25rem;
990
995
  --amplify-components-sliderfield-small-thumb-width: 1rem;
991
996
  --amplify-components-sliderfield-small-thumb-height: 1rem;
@@ -1069,7 +1074,7 @@
1069
1074
  --amplify-components-storagemanager-previewer-body-gap: var(--amplify-space-small);
1070
1075
  --amplify-components-storagemanager-previewer-footer-justify-content: flex-end;
1071
1076
  --amplify-components-switchfield-disabled-opacity: var(--amplify-opacities-60);
1072
- --amplify-components-switchfield-focused-shadow: 0px 0px 0px 2px var(--amplify-colors-border-focus);
1077
+ --amplify-components-switchfield-focused-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
1073
1078
  --amplify-components-switchfield-font-size: var(--amplify-font-sizes-medium);
1074
1079
  --amplify-components-switchfield-large-font-size: var(--amplify-font-sizes-large);
1075
1080
  --amplify-components-switchfield-small-font-size: var(--amplify-font-sizes-small);