@aws-amplify/ui 5.5.9 → 5.6.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.
package/dist/theme.css CHANGED
@@ -346,6 +346,7 @@
346
346
  --amplify-components-expander-icon-transition-timing-function: cubic-bezier(0.87, 0, 0.13, 1);
347
347
  --amplify-components-field-gap: var(--amplify-space-xs);
348
348
  --amplify-components-field-font-size: var(--amplify-font-sizes-medium);
349
+ --amplify-components-field-flex-direction: column;
349
350
  --amplify-components-field-small-gap: var(--amplify-space-xxxs);
350
351
  --amplify-components-field-small-font-size: var(--amplify-font-sizes-small);
351
352
  --amplify-components-field-large-gap: var(--amplify-space-small);
@@ -508,6 +509,7 @@
508
509
  --amplify-components-link-focus-color: var(--amplify-colors-font-focus);
509
510
  --amplify-components-link-hover-color: var(--amplify-colors-font-hover);
510
511
  --amplify-components-link-visited-color: var(--amplify-colors-font-interactive);
512
+ --amplify-components-liveness-camera-module-background-color: var(--amplify-colors-black);
511
513
  --amplify-components-loader-width: var(--amplify-font-sizes-medium);
512
514
  --amplify-components-loader-height: var(--amplify-font-sizes-medium);
513
515
  --amplify-components-loader-font-size: var(--amplify-font-sizes-xs);
@@ -728,6 +730,72 @@
728
730
  --amplify-components-stepperfield-button-disabled-background-color: var(--amplify-components-fieldcontrol-disabled-background-color);
729
731
  --amplify-components-stepperfield-button-hover-color: var(--amplify-components-button-hover-color);
730
732
  --amplify-components-stepperfield-button-hover-background-color: var(--amplify-components-button-hover-background-color);
733
+ --amplify-components-storagemanager-dropzone-background-color: var(--amplify-colors-background-primary);
734
+ --amplify-components-storagemanager-dropzone-border-radius: var(--amplify-radii-small);
735
+ --amplify-components-storagemanager-dropzone-border-color: var(--amplify-colors-border-primary);
736
+ --amplify-components-storagemanager-dropzone-border-style: dashed;
737
+ --amplify-components-storagemanager-dropzone-border-width: var(--amplify-border-widths-small);
738
+ --amplify-components-storagemanager-dropzone-gap: var(--amplify-space-small);
739
+ --amplify-components-storagemanager-dropzone-padding-block: var(--amplify-space-xl);
740
+ --amplify-components-storagemanager-dropzone-padding-inline: var(--amplify-space-large);
741
+ --amplify-components-storagemanager-dropzone-text-align: center;
742
+ --amplify-components-storagemanager-dropzone-active-background-color: var(--amplify-colors-brand-primary-10);
743
+ --amplify-components-storagemanager-dropzone-active-border-radius: var(--amplify-components-fileuploader-dropzone-border-radius);
744
+ --amplify-components-storagemanager-dropzone-active-border-color: var(--amplify-colors-border-pressed);
745
+ --amplify-components-storagemanager-dropzone-active-border-style: var(--amplify-components-fileuploader-dropzone-border-style);
746
+ --amplify-components-storagemanager-dropzone-active-border-width: var(--amplify-border-widths-medium);
747
+ --amplify-components-storagemanager-dropzone-icon-color: var(--amplify-colors-border-primary);
748
+ --amplify-components-storagemanager-dropzone-icon-font-size: var(--amplify-font-sizes-xxl);
749
+ --amplify-components-storagemanager-dropzone-text-color: var(--amplify-colors-font-tertiary);
750
+ --amplify-components-storagemanager-dropzone-text-font-size: var(--amplify-font-sizes-medium);
751
+ --amplify-components-storagemanager-dropzone-text-font-weight: var(--amplify-font-weights-bold);
752
+ --amplify-components-storagemanager-file-background-color: var(--amplify-colors-background-primary);
753
+ --amplify-components-storagemanager-file-border-radius: var(--amplify-radii-small);
754
+ --amplify-components-storagemanager-file-border-color: var(--amplify-colors-border-primary);
755
+ --amplify-components-storagemanager-file-border-style: solid;
756
+ --amplify-components-storagemanager-file-border-width: var(--amplify-border-widths-small);
757
+ --amplify-components-storagemanager-file-padding-block: var(--amplify-space-xs);
758
+ --amplify-components-storagemanager-file-padding-inline: var(--amplify-space-small);
759
+ --amplify-components-storagemanager-file-gap: var(--amplify-space-small);
760
+ --amplify-components-storagemanager-file-align-items: baseline;
761
+ --amplify-components-storagemanager-file-name-font-size: var(--amplify-font-sizes-medium);
762
+ --amplify-components-storagemanager-file-name-font-weight: var(--amplify-font-weights-bold);
763
+ --amplify-components-storagemanager-file-name-color: var(--amplify-colors-font-primary);
764
+ --amplify-components-storagemanager-file-size-font-size: var(--amplify-font-sizes-small);
765
+ --amplify-components-storagemanager-file-size-font-weight: var(--amplify-font-weights-normal);
766
+ --amplify-components-storagemanager-file-size-color: var(--amplify-colors-font-tertiary);
767
+ --amplify-components-storagemanager-file-image-width: var(--amplify-space-xxl);
768
+ --amplify-components-storagemanager-file-image-height: var(--amplify-space-xxl);
769
+ --amplify-components-storagemanager-file-image-background-color: var(--amplify-colors-background-secondary);
770
+ --amplify-components-storagemanager-file-image-color: var(--amplify-colors-font-tertiary);
771
+ --amplify-components-storagemanager-file-image-border-radius: var(--amplify-radii-small);
772
+ --amplify-components-storagemanager-loader-stroke-linecap: round;
773
+ --amplify-components-storagemanager-loader-stroke-empty: var(--amplify-colors-border-secondary);
774
+ --amplify-components-storagemanager-loader-stroke-filled: var(--amplify-components-loader-stroke-filled);
775
+ --amplify-components-storagemanager-loader-stroke-width: var(--amplify-border-widths-large);
776
+ --amplify-components-storagemanager-previewer-background-color: var(--amplify-colors-background-primary);
777
+ --amplify-components-storagemanager-previewer-border-color: var(--amplify-colors-border-primary);
778
+ --amplify-components-storagemanager-previewer-border-style: solid;
779
+ --amplify-components-storagemanager-previewer-border-width: var(--amplify-border-widths-small);
780
+ --amplify-components-storagemanager-previewer-border-radius: var(--amplify-radii-small);
781
+ --amplify-components-storagemanager-previewer-padding-block: var(--amplify-space-zero);
782
+ --amplify-components-storagemanager-previewer-padding-inline: var(--amplify-space-zero);
783
+ --amplify-components-storagemanager-previewer-max-height: 40rem;
784
+ --amplify-components-storagemanager-previewer-max-width: auto;
785
+ --amplify-components-storagemanager-previewer-text-font-size: var(--amplify-font-sizes-medium);
786
+ --amplify-components-storagemanager-previewer-text-font-weight: var(--amplify-font-weights-bold);
787
+ --amplify-components-storagemanager-previewer-text-color: var(--amplify-colors-font-primary);
788
+ --amplify-components-storagemanager-previewer-body-padding-block: var(--amplify-space-medium);
789
+ --amplify-components-storagemanager-previewer-body-padding-inline: var(--amplify-space-medium);
790
+ --amplify-components-storagemanager-previewer-body-gap: var(--amplify-space-small);
791
+ --amplify-components-storagemanager-previewer-footer-border-color: var(--amplify-colors-border-secondary);
792
+ --amplify-components-storagemanager-previewer-footer-border-style: solid;
793
+ --amplify-components-storagemanager-previewer-footer-border-width: var(--amplify-border-widths-small);
794
+ --amplify-components-storagemanager-previewer-footer-padding-block: var(--amplify-space-medium);
795
+ --amplify-components-storagemanager-previewer-footer-padding-inline: var(--amplify-space-medium);
796
+ --amplify-components-storagemanager-previewer-footer-justify-content: space-between;
797
+ --amplify-components-storagemanager-filelist-flex-direction: column;
798
+ --amplify-components-storagemanager-filelist-gap: var(--amplify-space-small);
731
799
  --amplify-components-switchfield-disabled-opacity: var(--amplify-opacities-60);
732
800
  --amplify-components-switchfield-focused-shadow: 0px 0px 0px 2px var(--amplify-colors-border-focus);
733
801
  --amplify-components-switchfield-font-size: var(--amplify-font-sizes-medium);
@@ -1,5 +1,5 @@
1
- import { StorageAccessLevel } from '@aws-amplify/storage';
2
- export declare function uploadFile({ file, fileName, level, progressCallback, errorCallback, completeCallback, isResumable, ...rest }: {
1
+ import { StorageAccessLevel, PutResult } from '@aws-amplify/storage';
2
+ export declare function uploadFile({ file, fileName, level, progressCallback, errorCallback, completeCallback, isResumable, provider, ...rest }: {
3
3
  file: File;
4
4
  fileName: string;
5
5
  level: StorageAccessLevel;
@@ -8,11 +8,10 @@ export declare function uploadFile({ file, fileName, level, progressCallback, er
8
8
  loaded: number;
9
9
  total: number;
10
10
  }) => void;
11
- errorCallback: (err: string) => void;
12
- completeCallback: (event: {
13
- key?: string;
14
- }) => void;
15
- }): Promise<void> | import("@aws-amplify/storage").UploadTask;
11
+ errorCallback: (error: string) => void;
12
+ completeCallback: (event: PutResult) => void;
13
+ provider?: string;
14
+ }): Promise<any>;
16
15
  /**
17
16
  * Format bytes as human-readable text.
18
17
  *
@@ -1,6 +1,6 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type FieldSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'gap', Output>;
3
- export declare type FieldTokens<Output extends OutputVariantKey> = FieldSizeTokens<Output> & {
3
+ export declare type FieldTokens<Output extends OutputVariantKey> = FieldSizeTokens<Output> & DesignTokenProperties<'flexDirection', Output> & {
4
4
  small?: FieldSizeTokens<Output>;
5
5
  large?: FieldSizeTokens<Output>;
6
6
  label?: DesignTokenProperties<'color', Output>;
@@ -23,6 +23,7 @@ import { IconTokens } from './icon';
23
23
  import { ImageTokens } from './image';
24
24
  import { InAppMessagingTokens } from './inAppMessaging';
25
25
  import { LinkTokens } from './link';
26
+ import { LivenessTokens } from './liveness';
26
27
  import { LoaderTokens } from './loader';
27
28
  import { MenuTokens } from './menu';
28
29
  import { PaginationTokens } from './pagination';
@@ -37,6 +38,7 @@ import { SelectTokens } from './select';
37
38
  import { SelectFieldTokens } from './selectField';
38
39
  import { SliderFieldTokens } from './sliderField';
39
40
  import { StepperFieldTokens } from './stepperField';
41
+ import { StorageManagerTokens } from './storagemanager';
40
42
  import { SwitchFieldTokens } from './switchField';
41
43
  import { TableTokens } from './table';
42
44
  import { TabsTokens } from './tabs';
@@ -72,6 +74,7 @@ declare type BaseComponentTokens<Output extends OutputVariantKey> = {
72
74
  image?: ImageTokens<Output>;
73
75
  inappmessaging?: InAppMessagingTokens<Output>;
74
76
  link?: LinkTokens<Output>;
77
+ liveness?: LivenessTokens<Output>;
75
78
  loader?: LoaderTokens<Output>;
76
79
  menu?: MenuTokens<Output>;
77
80
  pagination?: PaginationTokens<Output>;
@@ -86,6 +89,7 @@ declare type BaseComponentTokens<Output extends OutputVariantKey> = {
86
89
  selectfield?: SelectFieldTokens<Output>;
87
90
  sliderfield?: SliderFieldTokens<Output>;
88
91
  stepperfield?: StepperFieldTokens<Output>;
92
+ storagemanager?: StorageManagerTokens<Output>;
89
93
  switchfield?: SwitchFieldTokens<Output>;
90
94
  table?: TableTokens<Output>;
91
95
  tabs?: TabsTokens<Output>;
@@ -0,0 +1,8 @@
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type ModalTokenKey = 'backgroundColor';
3
+ declare type LivenessModalTokens<OutputType> = DesignTokenProperties<ModalTokenKey, OutputType>;
4
+ export declare type LivenessTokens<OutputType extends OutputVariantKey> = {
5
+ cameraModule?: LivenessModalTokens<OutputType>;
6
+ };
7
+ export declare const liveness: Required<LivenessTokens<'default'>>;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ import { FileUploaderTokens } from './fileUploader';
3
+ export interface StorageManagerTokens<OutputType extends OutputVariantKey> extends Omit<FileUploaderTokens<OutputType>, 'body' | 'footer'> {
4
+ filelist?: DesignTokenProperties<'flexDirection' | 'gap'>;
5
+ }
6
+ export declare const storagemanager: Required<StorageManagerTokens<'default'>>;
@@ -121,6 +121,23 @@ export declare enum ComponentClassName {
121
121
  StepperFieldButtonDecrease = "amplify-stepperfield__button--decrease",
122
122
  StepperFieldButtonIncrease = "amplify-stepperfield__button--increase",
123
123
  StepperFieldInput = "amplify-stepperfield__input",
124
+ StorageManager = "amplify-storagemanager",
125
+ StorageManagerDropZone = "amplify-storagemanager__dropzone",
126
+ StorageManagerDropZoneIcon = "amplify-storagemanager__dropzone__icon",
127
+ StorageManagerDropZoneText = "amplify-storagemanager__dropzone__text",
128
+ StorageManagerFilePicker = "amplify-storagemanager__file__picker",
129
+ StorageManagerFile = "amplify-storagemanager__file",
130
+ StorageManagerFileWrapper = "amplify-storagemanager__file__wrapper",
131
+ StorageManagerFileList = "amplify-storagemanager__file__list",
132
+ StorageManagerFileName = "amplify-storagemanager__file__name",
133
+ StorageManagerFileSize = "amplify-storagemanager__file__size",
134
+ StorageManagerFileInfo = "amplify-storagemanager__file__info",
135
+ StorageManagerFileImage = "amplify-storagemanager__file__image",
136
+ StorageManagerFileMain = "amplify-storagemanager__file__main",
137
+ StorageManagerFileStatus = "amplify-storagemanager__file__status",
138
+ StorageManagerLoader = "amplify-storagemanager__loader",
139
+ StorageManagerPreviewer = "amplify-storagemanager__previewer",
140
+ StorageManagerPreviewerText = "amplify-storagemanager__previewer__text",
124
141
  SwitchField = "amplify-switchfield",
125
142
  SwitchLabel = "amplify-switch-label",
126
143
  SwitchThumb = "amplify-switch-thumb",
@@ -0,0 +1,19 @@
1
+ import { ComponentClassName } from '../types';
2
+ export declare type Modifiers = string | number | null;
3
+ /**
4
+ * This helper function creates modifier class names that are used for our flat BEM styling
5
+ * it takes in a base and modifier and returns the modified class if a modifier was passed in and null otherwise
6
+ * @param base The base class of the output
7
+ * @param modifier The modifier to add onto the base
8
+ * @returns the modified class name or empty string
9
+ */
10
+ export declare const classNameModifier: (base: ComponentClassName, modifier?: Modifiers) => string;
11
+ /**
12
+ * This helper function creates modified class names that are used for our flat BEM styling
13
+ * it takes in a base, modifier, and flag and returns the modified class name if the flag is true and null if the flag is false
14
+ * @param base
15
+ * @param modifier
16
+ * @param flag
17
+ * @returns the modified class name or empty string
18
+ */
19
+ export declare const classNameModifierByFlag: (base: ComponentClassName, modifier: Modifiers, flag?: boolean) => string;
@@ -92,3 +92,4 @@ export declare function has(value: unknown, key: string): boolean;
92
92
  * @returns {boolean} whether `value` is a function
93
93
  */
94
94
  export declare function isFunction(value: unknown): value is Function;
95
+ export { classNameModifier, classNameModifierByFlag } from './classname';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "5.5.9",
3
+ "version": "5.6.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {