@aws-amplify/ui-react 6.3.1 → 6.5.0

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 (35) hide show
  1. package/dist/{ThemeStyle-b2dce96a.js → ThemeStyle-1fee4302.js} +19 -10
  2. package/dist/esm/PrimitiveCatalog.mjs +3 -0
  3. package/dist/esm/components/ThemeProvider/ComponentStyle.mjs +23 -0
  4. package/dist/esm/components/ThemeProvider/Style.mjs +64 -0
  5. package/dist/esm/components/ThemeProvider/ThemeStyle.mjs +2 -53
  6. package/dist/esm/primitives/Avatar/Avatar.mjs +5 -2
  7. package/dist/esm/server.mjs +1 -0
  8. package/dist/esm/version.mjs +1 -1
  9. package/dist/index.js +6 -4
  10. package/dist/internal.js +3 -0
  11. package/dist/server.js +49 -13
  12. package/dist/styles/avatar.css +20 -0
  13. package/dist/styles/avatar.layer.css +20 -0
  14. package/dist/styles/breadcrumbs.css +4 -2
  15. package/dist/styles/breadcrumbs.layer.css +4 -2
  16. package/dist/styles/button.css +19 -10
  17. package/dist/styles/button.layer.css +19 -10
  18. package/dist/styles/input.css +3 -2
  19. package/dist/styles/input.layer.css +3 -2
  20. package/dist/styles/link.css +10 -5
  21. package/dist/styles/link.layer.css +10 -5
  22. package/dist/styles/reset.css +4 -1
  23. package/dist/styles/reset.layer.css +4 -1
  24. package/dist/styles/sliderField.css +3 -2
  25. package/dist/styles/sliderField.layer.css +3 -2
  26. package/dist/styles/textArea.css +3 -2
  27. package/dist/styles/textArea.layer.css +3 -2
  28. package/dist/styles.css +62 -23
  29. package/dist/styles.layer.css +62 -23
  30. package/dist/types/components/ThemeProvider/ComponentStyle.d.ts +20 -0
  31. package/dist/types/components/ThemeProvider/Style.d.ts +11 -0
  32. package/dist/types/primitives/Avatar/types.d.ts +5 -0
  33. package/dist/types/server.d.ts +1 -0
  34. package/dist/types/version.d.ts +1 -1
  35. package/package.json +3 -3
@@ -1731,8 +1731,9 @@ strong.amplify-text {
1731
1731
  padding-inline-start: var(--amplify-components-button-padding-inline-start);
1732
1732
  padding-inline-end: var(--amplify-components-button-padding-inline-end);
1733
1733
  transition: all var(--amplify-components-button-transition-duration);
1734
- -moz-user-select: none;
1735
- user-select: none;
1734
+ -webkit-user-select: none;
1735
+ -moz-user-select: none;
1736
+ user-select: none;
1736
1737
  --amplify-internal-button-disabled-color: var(
1737
1738
  --amplify-components-button-disabled-color
1738
1739
  );
@@ -2753,50 +2754,58 @@ strong.amplify-text {
2753
2754
  background-color: var(--amplify-internal-button-disabled-background-color);
2754
2755
  border-color: var(--amplify-internal-button-disabled-border-color);
2755
2756
  color: var(--amplify-internal-button-disabled-color);
2756
- text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2757
+ -webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2758
+ text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2757
2759
  cursor: not-allowed;
2758
2760
  }
2759
2761
  .amplify-button--disabled:hover {
2760
2762
  background-color: var(--amplify-internal-button-disabled-background-color);
2761
2763
  border-color: var(--amplify-internal-button-disabled-border-color);
2762
2764
  color: var(--amplify-internal-button-disabled-color);
2763
- text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2765
+ -webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2766
+ text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2764
2767
  }
2765
2768
  .amplify-button--disabled :focus {
2766
2769
  background-color: var(--amplify-internal-button-disabled-background-color);
2767
2770
  border-color: var(--amplify-internal-button-disabled-border-color);
2768
2771
  color: var(--amplify-internal-button-disabled-color);
2769
- text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2772
+ -webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2773
+ text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2770
2774
  }
2771
2775
  .amplify-button--disabled:active {
2772
2776
  background-color: var(--amplify-internal-button-disabled-background-color);
2773
2777
  border-color: var(--amplify-internal-button-disabled-border-color);
2774
2778
  color: var(--amplify-internal-button-disabled-color);
2775
- text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2779
+ -webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2780
+ text-decoration: var(--amplify-internal-button-disabled-text-decoration);
2776
2781
  }
2777
2782
  .amplify-button--loading {
2778
2783
  background-color: var(--amplify-internal-button-loading-background-color);
2779
2784
  border-color: var(--amplify-internal-button-loading-border-color);
2780
2785
  color: var(--amplify-components-button-loading-color);
2781
- text-decoration: var(--amplify-internal-button-loading-text-decoration);
2786
+ -webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
2787
+ text-decoration: var(--amplify-internal-button-loading-text-decoration);
2782
2788
  }
2783
2789
  .amplify-button--loading:hover {
2784
2790
  background-color: var(--amplify-internal-button-loading-background-color);
2785
2791
  border-color: var(--amplify-internal-button-loading-border-color);
2786
2792
  color: var(--amplify-components-button-loading-color);
2787
- text-decoration: var(--amplify-internal-button-loading-text-decoration);
2793
+ -webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
2794
+ text-decoration: var(--amplify-internal-button-loading-text-decoration);
2788
2795
  }
2789
2796
  .amplify-button--loading:focus {
2790
2797
  background-color: var(--amplify-internal-button-loading-background-color);
2791
2798
  border-color: var(--amplify-internal-button-loading-border-color);
2792
2799
  color: var(--amplify-components-button-loading-color);
2793
- text-decoration: var(--amplify-internal-button-loading-text-decoration);
2800
+ -webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
2801
+ text-decoration: var(--amplify-internal-button-loading-text-decoration);
2794
2802
  }
2795
2803
  .amplify-button--loading:active {
2796
2804
  background-color: var(--amplify-internal-button-loading-background-color);
2797
2805
  border-color: var(--amplify-internal-button-loading-border-color);
2798
2806
  color: var(--amplify-components-button-loading-color);
2799
- text-decoration: var(--amplify-internal-button-loading-text-decoration);
2807
+ -webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
2808
+ text-decoration: var(--amplify-internal-button-loading-text-decoration);
2800
2809
  }
2801
2810
  .amplify-button__loader-wrapper {
2802
2811
  align-items: var(--amplify-components-button-loader-wrapper-align-items);
@@ -2944,8 +2953,9 @@ strong.amplify-text {
2944
2953
  outline-style: var(--amplify-components-fieldcontrol-outline-style);
2945
2954
  outline-width: var(--amplify-components-fieldcontrol-outline-width);
2946
2955
  outline-offset: var(--amplify-components-fieldcontrol-outline-offset);
2947
- -moz-user-select: text;
2948
- user-select: text;
2956
+ -webkit-user-select: text;
2957
+ -moz-user-select: text;
2958
+ user-select: text;
2949
2959
  display: inline-block;
2950
2960
  --amplify-components-fieldcontrol-color: var(
2951
2961
  --amplify-components-input-color
@@ -3028,8 +3038,9 @@ strong.amplify-text {
3028
3038
  outline-style: var(--amplify-components-fieldcontrol-outline-style);
3029
3039
  outline-width: var(--amplify-components-fieldcontrol-outline-width);
3030
3040
  outline-offset: var(--amplify-components-fieldcontrol-outline-offset);
3031
- -moz-user-select: text;
3032
- user-select: text;
3041
+ -webkit-user-select: text;
3042
+ -moz-user-select: text;
3043
+ user-select: text;
3033
3044
  white-space: pre-wrap;
3034
3045
  }
3035
3046
  .amplify-textarea:focus {
@@ -3093,24 +3104,29 @@ strong.amplify-text {
3093
3104
 
3094
3105
  .amplify-link {
3095
3106
  color: var(--amplify-components-link-color);
3096
- text-decoration: var(--amplify-components-link-text-decoration);
3107
+ -webkit-text-decoration: var(--amplify-components-link-text-decoration);
3108
+ text-decoration: var(--amplify-components-link-text-decoration);
3097
3109
  cursor: pointer;
3098
3110
  }
3099
3111
  .amplify-link:visited {
3100
3112
  color: var(--amplify-components-link-visited-color);
3101
- text-decoration: var(--amplify-components-link-visited-text-decoration);
3113
+ -webkit-text-decoration: var(--amplify-components-link-visited-text-decoration);
3114
+ text-decoration: var(--amplify-components-link-visited-text-decoration);
3102
3115
  }
3103
3116
  .amplify-link:active {
3104
3117
  color: var(--amplify-components-link-active-color);
3105
- text-decoration: var(--amplify-components-link-active-text-decoration);
3118
+ -webkit-text-decoration: var(--amplify-components-link-active-text-decoration);
3119
+ text-decoration: var(--amplify-components-link-active-text-decoration);
3106
3120
  }
3107
3121
  .amplify-link:focus {
3108
3122
  color: var(--amplify-components-link-focus-color);
3109
- text-decoration: var(--amplify-components-link-focus-text-decoration);
3123
+ -webkit-text-decoration: var(--amplify-components-link-focus-text-decoration);
3124
+ text-decoration: var(--amplify-components-link-focus-text-decoration);
3110
3125
  }
3111
3126
  .amplify-link:hover {
3112
3127
  color: var(--amplify-components-link-hover-color);
3113
- text-decoration: var(--amplify-components-link-hover-text-decoration);
3128
+ -webkit-text-decoration: var(--amplify-components-link-hover-text-decoration);
3129
+ text-decoration: var(--amplify-components-link-hover-text-decoration);
3114
3130
  }
3115
3131
 
3116
3132
  .amplify-loader {
@@ -3520,6 +3536,7 @@ strong.amplify-text {
3520
3536
  --avatar-border-color: var(--amplify-components-avatar-border-color);
3521
3537
  --avatar-size: var(--amplify-components-avatar-width);
3522
3538
  --amplify-components-icon-height: 100%;
3539
+ position: relative;
3523
3540
  display: inline-flex;
3524
3541
  align-items: center;
3525
3542
  justify-content: center;
@@ -3570,6 +3587,9 @@ strong.amplify-text {
3570
3587
  --avatar-filled-color: var(
3571
3588
  --amplify-components-avatar-warning-background-color
3572
3589
  );
3590
+ --amplify-components-loader-stroke-filled: var(
3591
+ --amplify-components-avatar-warning-color
3592
+ );
3573
3593
  }
3574
3594
  .amplify-avatar--error {
3575
3595
  --avatar-border-color: var(--amplify-components-avatar-error-border-color);
@@ -3583,6 +3603,9 @@ strong.amplify-text {
3583
3603
  --avatar-filled-color: var(
3584
3604
  --amplify-components-avatar-error-background-color
3585
3605
  );
3606
+ --amplify-components-loader-stroke-filled: var(
3607
+ --amplify-components-avatar-error-color
3608
+ );
3586
3609
  }
3587
3610
  .amplify-avatar--info {
3588
3611
  --avatar-border-color: var(--amplify-components-avatar-info-border-color);
@@ -3596,6 +3619,9 @@ strong.amplify-text {
3596
3619
  --avatar-filled-color: var(
3597
3620
  --amplify-components-avatar-info-background-color
3598
3621
  );
3622
+ --amplify-components-loader-stroke-filled: var(
3623
+ --amplify-components-avatar-info-color
3624
+ );
3599
3625
  }
3600
3626
  .amplify-avatar--success {
3601
3627
  --avatar-border-color: var(
@@ -3611,6 +3637,9 @@ strong.amplify-text {
3611
3637
  --avatar-filled-color: var(
3612
3638
  --amplify-components-avatar-success-background-color
3613
3639
  );
3640
+ --amplify-components-loader-stroke-filled: var(
3641
+ --amplify-components-avatar-success-color
3642
+ );
3614
3643
  }
3615
3644
  .amplify-avatar__icon {
3616
3645
  display: flex;
@@ -3623,6 +3652,13 @@ strong.amplify-text {
3623
3652
  object-fit: cover;
3624
3653
  display: block;
3625
3654
  }
3655
+ .amplify-avatar__loader {
3656
+ position: absolute;
3657
+ inset: 0;
3658
+ width: 100%;
3659
+ height: 100%;
3660
+ stroke: transparent;
3661
+ }
3626
3662
 
3627
3663
  .amplify-breadcrumbs__list {
3628
3664
  display: flex;
@@ -3653,14 +3689,16 @@ strong.amplify-text {
3653
3689
  font-weight: var(--amplify-components-breadcrumbs-link-font-weight);
3654
3690
  padding-inline: var(--amplify-components-breadcrumbs-link-padding-inline);
3655
3691
  padding-block: var(--amplify-components-breadcrumbs-link-padding-block);
3656
- text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
3692
+ -webkit-text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
3693
+ text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
3657
3694
  }
3658
3695
 
3659
3696
  .amplify-breadcrumbs__link--current {
3660
3697
  color: var(--amplify-components-breadcrumbs-link-current-color);
3661
3698
  font-size: var(--amplify-components-breadcrumbs-link-current-font-size);
3662
3699
  font-weight: var(--amplify-components-breadcrumbs-link-current-font-weight);
3663
- text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
3700
+ -webkit-text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
3701
+ text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
3664
3702
  }
3665
3703
 
3666
3704
  .amplify-card {
@@ -5210,8 +5248,9 @@ html[dir=rtl] .amplify-field-group__inner-start {
5210
5248
  padding-block: var(--amplify-components-sliderfield-padding-block);
5211
5249
  position: relative;
5212
5250
  touch-action: none;
5213
- -moz-user-select: none;
5214
- user-select: none;
5251
+ -webkit-user-select: none;
5252
+ -moz-user-select: none;
5253
+ user-select: none;
5215
5254
  --amplify-internal-sliderfield-root-height: var(
5216
5255
  --amplify-components-sliderfield-thumb-height
5217
5256
  );
@@ -0,0 +1,20 @@
1
+ import { WebTheme } from '@aws-amplify/ui';
2
+ import { BaseComponentProps, ElementType, ForwardRefPrimitive, PrimitiveProps } from '../../primitives/types';
3
+ import { BaseComponentTheme } from '@aws-amplify/ui';
4
+ interface BaseComponentStyleProps extends BaseComponentProps {
5
+ /**
6
+ * Provide a server generated nonce which matches your CSP `style-src` rule.
7
+ * This will be attached to the generated <style> tag.
8
+ * @see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src
9
+ */
10
+ nonce?: string;
11
+ theme: Pick<WebTheme, 'name' | 'breakpoints' | 'tokens'>;
12
+ componentThemes: BaseComponentTheme[];
13
+ }
14
+ export type ComponentStyleProps<Element extends ElementType = 'style'> = PrimitiveProps<BaseComponentStyleProps, Element>;
15
+ /**
16
+ * @experimental
17
+ * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
18
+ */
19
+ export declare const ComponentStyle: ForwardRefPrimitive<BaseComponentStyleProps, 'style'>;
20
+ export {};
@@ -0,0 +1,11 @@
1
+ import { BaseComponentProps, ElementType, ForwardRefPrimitive, PrimitiveProps } from '../../primitives/types';
2
+ interface BaseStyleProps extends BaseComponentProps {
3
+ cssText?: string;
4
+ }
5
+ export type StyleProps<Element extends ElementType = 'style'> = PrimitiveProps<BaseStyleProps, Element>;
6
+ /**
7
+ * @experimental
8
+ * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
9
+ */
10
+ export declare const Style: ForwardRefPrimitive<BaseStyleProps, 'style'>;
11
+ export {};
@@ -31,6 +31,11 @@ export interface BaseAvatarProps extends BaseViewProps {
31
31
  * The size property will affect the size of the avatar.
32
32
  */
33
33
  size?: AvatarSizes;
34
+ /**
35
+ * @description
36
+ * The isLoading property will display a loader around the avatar
37
+ */
38
+ isLoading?: boolean;
34
39
  }
35
40
  export type AvatarProps<Element extends ElementType = 'span'> = PrimitiveProps<BaseAvatarProps, Element>;
36
41
  export {};
@@ -1,2 +1,3 @@
1
1
  export { ThemeStyle } from './components/ThemeProvider/ThemeStyle';
2
+ export { ComponentStyle } from './components/ThemeProvider/ComponentStyle';
2
3
  export { createTheme, defineComponentTheme, createComponentClasses, defaultTheme, defaultDarkModeOverride, } from '@aws-amplify/ui';
@@ -1 +1 @@
1
- export declare const VERSION = "6.3.1";
1
+ export declare const VERSION = "6.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "6.3.1",
3
+ "version": "6.5.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -55,8 +55,8 @@
55
55
  "typecheck": "tsc --noEmit"
56
56
  },
57
57
  "dependencies": {
58
- "@aws-amplify/ui": "6.4.1",
59
- "@aws-amplify/ui-react-core": "3.0.22",
58
+ "@aws-amplify/ui": "6.6.0",
59
+ "@aws-amplify/ui-react-core": "3.0.24",
60
60
  "@radix-ui/react-direction": "1.0.0",
61
61
  "@radix-ui/react-dropdown-menu": "1.0.0",
62
62
  "@radix-ui/react-slider": "1.0.0",