@aws-amplify/ui 6.0.17 → 6.2.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/esm/i18n/dictionaries/authenticator/de.mjs +4 -4
- package/dist/esm/i18n/dictionaries/authenticator/ja.mjs +2 -2
- package/dist/esm/i18n/dictionaries/authenticator/kr.mjs +10 -0
- package/dist/esm/i18n/dictionaries/authenticator/th.mjs +101 -0
- package/dist/esm/i18n/dictionaries/index.mjs +3 -1
- package/dist/esm/i18n/translations.mjs +2 -1
- package/dist/esm/index.mjs +6 -3
- package/dist/esm/theme/createTheme/createAnimationCSS.mjs +23 -0
- package/dist/esm/theme/createTheme/createColorPalette.mjs +21 -0
- package/dist/esm/theme/createTheme/createComponentCSS.mjs +86 -0
- package/dist/esm/theme/createTheme/createComponentClasses.mjs +60 -0
- package/dist/esm/theme/{createTheme.mjs → createTheme/createTheme.mjs} +33 -44
- package/dist/esm/theme/createTheme/defineComponentTheme.mjs +55 -0
- package/dist/esm/theme/createTheme/utils.mjs +236 -0
- package/dist/esm/utils/humanFileSize.mjs +29 -0
- package/dist/esm/utils/utils.mjs +21 -1
- package/dist/index.js +566 -41
- package/dist/styles/breadcrumbs.css +2 -4
- package/dist/styles/breadcrumbs.layer.css +2 -4
- package/dist/styles/button.css +10 -19
- package/dist/styles/button.layer.css +10 -19
- package/dist/styles/input.css +2 -3
- package/dist/styles/input.layer.css +2 -3
- package/dist/styles/link.css +5 -10
- package/dist/styles/link.layer.css +5 -10
- package/dist/styles/reset.css +1 -3
- package/dist/styles/reset.layer.css +1 -3
- package/dist/styles/sliderField.css +2 -3
- package/dist/styles/sliderField.layer.css +2 -3
- package/dist/styles/textArea.css +2 -3
- package/dist/styles/textArea.layer.css +2 -3
- package/dist/styles.css +23 -42
- package/dist/styles.layer.css +23 -42
- package/dist/types/i18n/dictionaries/authenticator/index.d.ts +1 -0
- package/dist/types/i18n/dictionaries/authenticator/th.d.ts +2 -0
- package/dist/types/i18n/dictionaries/index.d.ts +52 -0
- package/dist/types/theme/components/accordion.d.ts +4 -0
- package/dist/types/theme/components/alert.d.ts +4 -0
- package/dist/types/theme/components/autocomplete.d.ts +8 -0
- package/dist/types/theme/components/badge.d.ts +4 -0
- package/dist/types/theme/components/breadcrumbs.d.ts +7 -0
- package/dist/types/theme/components/button.d.ts +7 -0
- package/dist/types/theme/components/buttonGroup.d.ts +2 -0
- package/dist/types/theme/components/card.d.ts +2 -0
- package/dist/types/theme/components/checkbox.d.ts +7 -0
- package/dist/types/theme/components/checkboxField.d.ts +2 -0
- package/dist/types/theme/components/collection.d.ts +4 -0
- package/dist/types/theme/components/divider.d.ts +2 -0
- package/dist/types/theme/components/dropZone.d.ts +2 -0
- package/dist/types/theme/components/field.d.ts +6 -0
- package/dist/types/theme/components/fieldGroup.d.ts +11 -0
- package/dist/types/theme/components/fieldset.d.ts +4 -0
- package/dist/types/theme/components/heading.d.ts +4 -0
- package/dist/types/theme/components/highlightMatch.d.ts +4 -0
- package/dist/types/theme/components/index.d.ts +92 -0
- package/dist/types/theme/components/input.d.ts +2 -0
- package/dist/types/theme/components/loader.d.ts +4 -0
- package/dist/types/theme/components/menu.d.ts +4 -0
- package/dist/types/theme/components/message.d.ts +4 -0
- package/dist/types/theme/components/pagination.d.ts +4 -0
- package/dist/types/theme/components/placeholder.d.ts +2 -0
- package/dist/types/theme/components/radio.d.ts +6 -0
- package/dist/types/theme/components/rating.d.ts +5 -0
- package/dist/types/theme/components/scrollview.d.ts +2 -0
- package/dist/types/theme/components/searchField.d.ts +4 -0
- package/dist/types/theme/components/select.d.ts +5 -0
- package/dist/types/theme/components/selectField.d.ts +2 -0
- package/dist/types/theme/components/sliderField.d.ts +9 -0
- package/dist/types/theme/components/stepperField.d.ts +6 -0
- package/dist/types/theme/components/storageManager.d.ts +20 -0
- package/dist/types/theme/components/switchField.d.ts +8 -0
- package/dist/types/theme/components/table.d.ts +4 -0
- package/dist/types/theme/components/tabs.d.ts +6 -0
- package/dist/types/theme/components/text.d.ts +3 -0
- package/dist/types/theme/components/textField.d.ts +2 -0
- package/dist/types/theme/components/textarea.d.ts +2 -0
- package/dist/types/theme/components/textareaField.d.ts +2 -0
- package/dist/types/theme/components/toggleButton.d.ts +3 -0
- package/dist/types/theme/components/utils.d.ts +52 -0
- package/dist/types/theme/createTheme/createAnimationCSS.d.ts +6 -0
- package/dist/types/theme/createTheme/createColorPalette.d.ts +16 -0
- package/dist/types/theme/createTheme/createComponentCSS.d.ts +7 -0
- package/dist/types/theme/createTheme/createComponentClasses.d.ts +25 -0
- package/dist/types/theme/{createTheme.d.ts → createTheme/createTheme.d.ts} +3 -2
- package/dist/types/theme/createTheme/defineComponentTheme.d.ts +54 -0
- package/dist/types/theme/createTheme/index.d.ts +4 -0
- package/dist/types/theme/createTheme/utils.d.ts +92 -0
- package/dist/types/theme/index.d.ts +1 -2
- package/dist/types/theme/types.d.ts +20 -3
- package/dist/types/utils/classNames.d.ts +1 -1
- package/dist/types/utils/humanFileSize.d.ts +11 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +8 -0
- package/package.json +3 -3
- package/dist/esm/theme/utils.mjs +0 -81
- package/dist/types/theme/utils.d.ts +0 -35
package/dist/styles.layer.css
CHANGED
|
@@ -1641,9 +1641,8 @@ strong.amplify-text {
|
|
|
1641
1641
|
padding-inline-start: var(--amplify-components-button-padding-inline-start);
|
|
1642
1642
|
padding-inline-end: var(--amplify-components-button-padding-inline-end);
|
|
1643
1643
|
transition: all var(--amplify-components-button-transition-duration);
|
|
1644
|
-
-
|
|
1645
|
-
|
|
1646
|
-
user-select: none;
|
|
1644
|
+
-moz-user-select: none;
|
|
1645
|
+
user-select: none;
|
|
1647
1646
|
--amplify-internal-button-disabled-color: var(
|
|
1648
1647
|
--amplify-components-button-disabled-color
|
|
1649
1648
|
);
|
|
@@ -2664,58 +2663,50 @@ strong.amplify-text {
|
|
|
2664
2663
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
2665
2664
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
2666
2665
|
color: var(--amplify-internal-button-disabled-color);
|
|
2667
|
-
|
|
2668
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2666
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2669
2667
|
cursor: not-allowed;
|
|
2670
2668
|
}
|
|
2671
2669
|
.amplify-button--disabled:hover {
|
|
2672
2670
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
2673
2671
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
2674
2672
|
color: var(--amplify-internal-button-disabled-color);
|
|
2675
|
-
|
|
2676
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2673
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2677
2674
|
}
|
|
2678
2675
|
.amplify-button--disabled :focus {
|
|
2679
2676
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
2680
2677
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
2681
2678
|
color: var(--amplify-internal-button-disabled-color);
|
|
2682
|
-
|
|
2683
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2679
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2684
2680
|
}
|
|
2685
2681
|
.amplify-button--disabled:active {
|
|
2686
2682
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
2687
2683
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
2688
2684
|
color: var(--amplify-internal-button-disabled-color);
|
|
2689
|
-
|
|
2690
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2685
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
2691
2686
|
}
|
|
2692
2687
|
.amplify-button--loading {
|
|
2693
2688
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
2694
2689
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
2695
2690
|
color: var(--amplify-components-button-loading-color);
|
|
2696
|
-
|
|
2697
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2691
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2698
2692
|
}
|
|
2699
2693
|
.amplify-button--loading:hover {
|
|
2700
2694
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
2701
2695
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
2702
2696
|
color: var(--amplify-components-button-loading-color);
|
|
2703
|
-
|
|
2704
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2697
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2705
2698
|
}
|
|
2706
2699
|
.amplify-button--loading:focus {
|
|
2707
2700
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
2708
2701
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
2709
2702
|
color: var(--amplify-components-button-loading-color);
|
|
2710
|
-
|
|
2711
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2703
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2712
2704
|
}
|
|
2713
2705
|
.amplify-button--loading:active {
|
|
2714
2706
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
2715
2707
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
2716
2708
|
color: var(--amplify-components-button-loading-color);
|
|
2717
|
-
|
|
2718
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2709
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
2719
2710
|
}
|
|
2720
2711
|
.amplify-button__loader-wrapper {
|
|
2721
2712
|
align-items: var(--amplify-components-button-loader-wrapper-align-items);
|
|
@@ -2863,9 +2854,8 @@ strong.amplify-text {
|
|
|
2863
2854
|
outline-style: var(--amplify-components-fieldcontrol-outline-style);
|
|
2864
2855
|
outline-width: var(--amplify-components-fieldcontrol-outline-width);
|
|
2865
2856
|
outline-offset: var(--amplify-components-fieldcontrol-outline-offset);
|
|
2866
|
-
-
|
|
2867
|
-
|
|
2868
|
-
user-select: text;
|
|
2857
|
+
-moz-user-select: text;
|
|
2858
|
+
user-select: text;
|
|
2869
2859
|
display: inline-block;
|
|
2870
2860
|
--amplify-components-fieldcontrol-color: var(
|
|
2871
2861
|
--amplify-components-input-color
|
|
@@ -2948,9 +2938,8 @@ strong.amplify-text {
|
|
|
2948
2938
|
outline-style: var(--amplify-components-fieldcontrol-outline-style);
|
|
2949
2939
|
outline-width: var(--amplify-components-fieldcontrol-outline-width);
|
|
2950
2940
|
outline-offset: var(--amplify-components-fieldcontrol-outline-offset);
|
|
2951
|
-
-
|
|
2952
|
-
|
|
2953
|
-
user-select: text;
|
|
2941
|
+
-moz-user-select: text;
|
|
2942
|
+
user-select: text;
|
|
2954
2943
|
white-space: pre-wrap;
|
|
2955
2944
|
}
|
|
2956
2945
|
.amplify-textarea:focus {
|
|
@@ -3014,29 +3003,24 @@ strong.amplify-text {
|
|
|
3014
3003
|
|
|
3015
3004
|
.amplify-link {
|
|
3016
3005
|
color: var(--amplify-components-link-color);
|
|
3017
|
-
|
|
3018
|
-
text-decoration: var(--amplify-components-link-text-decoration);
|
|
3006
|
+
text-decoration: var(--amplify-components-link-text-decoration);
|
|
3019
3007
|
cursor: pointer;
|
|
3020
3008
|
}
|
|
3021
3009
|
.amplify-link:visited {
|
|
3022
3010
|
color: var(--amplify-components-link-visited-color);
|
|
3023
|
-
|
|
3024
|
-
text-decoration: var(--amplify-components-link-visited-text-decoration);
|
|
3011
|
+
text-decoration: var(--amplify-components-link-visited-text-decoration);
|
|
3025
3012
|
}
|
|
3026
3013
|
.amplify-link:active {
|
|
3027
3014
|
color: var(--amplify-components-link-active-color);
|
|
3028
|
-
|
|
3029
|
-
text-decoration: var(--amplify-components-link-active-text-decoration);
|
|
3015
|
+
text-decoration: var(--amplify-components-link-active-text-decoration);
|
|
3030
3016
|
}
|
|
3031
3017
|
.amplify-link:focus {
|
|
3032
3018
|
color: var(--amplify-components-link-focus-color);
|
|
3033
|
-
|
|
3034
|
-
text-decoration: var(--amplify-components-link-focus-text-decoration);
|
|
3019
|
+
text-decoration: var(--amplify-components-link-focus-text-decoration);
|
|
3035
3020
|
}
|
|
3036
3021
|
.amplify-link:hover {
|
|
3037
3022
|
color: var(--amplify-components-link-hover-color);
|
|
3038
|
-
|
|
3039
|
-
text-decoration: var(--amplify-components-link-hover-text-decoration);
|
|
3023
|
+
text-decoration: var(--amplify-components-link-hover-text-decoration);
|
|
3040
3024
|
}
|
|
3041
3025
|
|
|
3042
3026
|
.amplify-loader {
|
|
@@ -3467,16 +3451,14 @@ strong.amplify-text {
|
|
|
3467
3451
|
font-weight: var(--amplify-components-breadcrumbs-link-font-weight);
|
|
3468
3452
|
padding-inline: var(--amplify-components-breadcrumbs-link-padding-inline);
|
|
3469
3453
|
padding-block: var(--amplify-components-breadcrumbs-link-padding-block);
|
|
3470
|
-
|
|
3471
|
-
text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
3454
|
+
text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
3472
3455
|
}
|
|
3473
3456
|
|
|
3474
3457
|
.amplify-breadcrumbs__link--current {
|
|
3475
3458
|
color: var(--amplify-components-breadcrumbs-link-current-color);
|
|
3476
3459
|
font-size: var(--amplify-components-breadcrumbs-link-current-font-size);
|
|
3477
3460
|
font-weight: var(--amplify-components-breadcrumbs-link-current-font-weight);
|
|
3478
|
-
|
|
3479
|
-
text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
3461
|
+
text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
3480
3462
|
}
|
|
3481
3463
|
|
|
3482
3464
|
.amplify-card {
|
|
@@ -5026,9 +5008,8 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
5026
5008
|
padding-block: var(--amplify-components-sliderfield-padding-block);
|
|
5027
5009
|
position: relative;
|
|
5028
5010
|
touch-action: none;
|
|
5029
|
-
-
|
|
5030
|
-
|
|
5031
|
-
user-select: none;
|
|
5011
|
+
-moz-user-select: none;
|
|
5012
|
+
user-select: none;
|
|
5032
5013
|
--amplify-internal-sliderfield-root-height: var(
|
|
5033
5014
|
--amplify-components-sliderfield-thumb-height
|
|
5034
5015
|
);
|
|
@@ -934,6 +934,58 @@ export declare const uaDict: {
|
|
|
934
934
|
"Verify Contact": string;
|
|
935
935
|
Verify: string;
|
|
936
936
|
};
|
|
937
|
+
export declare const thDict: {
|
|
938
|
+
[x: string]: string;
|
|
939
|
+
Email: string;
|
|
940
|
+
"Phone Number": string;
|
|
941
|
+
"Account recovery requires verified contact information": string;
|
|
942
|
+
"Back to Sign In": string;
|
|
943
|
+
"Change Password": string;
|
|
944
|
+
Changing: string;
|
|
945
|
+
Code: string;
|
|
946
|
+
"Confirm Password": string;
|
|
947
|
+
"Confirm Sign Up": string;
|
|
948
|
+
"Confirm SMS Code": string;
|
|
949
|
+
"Confirm TOTP Code": string;
|
|
950
|
+
Confirm: string;
|
|
951
|
+
"Confirmation Code": string;
|
|
952
|
+
Confirming: string;
|
|
953
|
+
"Create a new account": string;
|
|
954
|
+
"Create Account": string;
|
|
955
|
+
"Creating Account": string;
|
|
956
|
+
"Dismiss alert": string;
|
|
957
|
+
"Enter your code": string;
|
|
958
|
+
"Enter your Email": string;
|
|
959
|
+
"Enter your phone number": string;
|
|
960
|
+
"Enter your username": string;
|
|
961
|
+
"Forgot your password?": string;
|
|
962
|
+
"Hide password": string;
|
|
963
|
+
Loading: string;
|
|
964
|
+
"New password": string;
|
|
965
|
+
Password: string;
|
|
966
|
+
"Resend Code": string;
|
|
967
|
+
"Reset your password": string;
|
|
968
|
+
"Reset your Password": string;
|
|
969
|
+
"Send code": string;
|
|
970
|
+
"Send Code": string;
|
|
971
|
+
Sending: string;
|
|
972
|
+
"Setup TOTP": string;
|
|
973
|
+
"Show password": string;
|
|
974
|
+
"Sign in to your account": string;
|
|
975
|
+
"Sign In with Amazon": string;
|
|
976
|
+
"Sign In with Apple": string;
|
|
977
|
+
"Sign In with Facebook": string;
|
|
978
|
+
"Sign In with Google": string;
|
|
979
|
+
"Sign in": string;
|
|
980
|
+
"Sign In": string;
|
|
981
|
+
"Signing in": string;
|
|
982
|
+
Skip: string;
|
|
983
|
+
Submit: string;
|
|
984
|
+
Submitting: string;
|
|
985
|
+
Username: string;
|
|
986
|
+
"Verify Contact": string;
|
|
987
|
+
Verify: string;
|
|
988
|
+
};
|
|
937
989
|
export declare const defaultTexts: {
|
|
938
990
|
ADD_PROFILE: string;
|
|
939
991
|
ADD_WEBSITE: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
2
|
+
export type AlertTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme, Required> & Elements<{
|
|
3
|
+
[key in 'icon' | 'heading' | 'body' | 'dismiss']?: ComponentStyles;
|
|
4
|
+
}, Required>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements } from './utils';
|
|
2
|
+
export type AutoCompleteTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
|
+
menu?: ComponentStyles & Modifiers<'empty' | 'loading', Required>;
|
|
4
|
+
menu__option?: ComponentStyles & Modifiers<'active', Required>;
|
|
5
|
+
menu__options?: ComponentStyles;
|
|
6
|
+
menu__header?: ComponentStyles;
|
|
7
|
+
menu__footer?: ComponentStyles;
|
|
8
|
+
}, Required>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme, Size } from './utils';
|
|
2
|
+
export type BadgeTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | ColorTheme, Required> & Elements<{
|
|
3
|
+
[key in 'icon' | 'heading' | 'body' | 'dismiss']?: ComponentStyles;
|
|
4
|
+
}, Required>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentStyles, Elements, Modifiers } from './utils';
|
|
2
|
+
export type BreadcrumbsTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
|
+
list?: ComponentStyles;
|
|
4
|
+
separator?: ComponentStyles;
|
|
5
|
+
item?: ComponentStyles;
|
|
6
|
+
link?: ComponentStyles & Modifiers<'current', Required>;
|
|
7
|
+
}, Required>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColorTheme, Size, Modifiers, ComponentStyles, Elements } from './utils';
|
|
2
|
+
type Variations = 'primary' | 'secondary' | 'destructive' | 'warning' | 'menu' | 'link';
|
|
3
|
+
export type ButtonColorThemeVariations = `${'primary' | 'link' | 'outlined'}--${ColorTheme | 'overlay'}`;
|
|
4
|
+
export type ButtonTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | ButtonColorThemeVariations | Variations | 'loading' | 'fullwidth' | 'disabled', Required> & Elements<{
|
|
5
|
+
'loader-wrapper'?: ComponentStyles;
|
|
6
|
+
}, Required>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, ColorTheme, Elements } from './utils';
|
|
2
|
+
export type CheckboxTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme | 'disabled', Required> & Elements<{
|
|
3
|
+
button?: ComponentStyles & Modifiers<'focused' | 'error' | 'disabled'>;
|
|
4
|
+
icon?: ComponentStyles & Modifiers<'checked' | 'indeterminate' | 'disabled'>;
|
|
5
|
+
label?: ComponentStyles;
|
|
6
|
+
input?: ComponentStyles;
|
|
7
|
+
}, Required>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
2
|
+
export type FieldTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size, Required> & Elements<{
|
|
3
|
+
description?: ComponentStyles;
|
|
4
|
+
'error-message'?: ComponentStyles;
|
|
5
|
+
'show-password'?: ComponentStyles & Modifiers<'error', Required>;
|
|
6
|
+
}, Required>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements } from './utils';
|
|
2
|
+
export type FieldGroupTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
|
+
'inner-start'?: ComponentStyles;
|
|
4
|
+
'inner-end'?: ComponentStyles;
|
|
5
|
+
'outer-start'?: ComponentStyles & Modifiers<'quiet', Required>;
|
|
6
|
+
'outer-end'?: ComponentStyles & Modifiers<'quiet', Required>;
|
|
7
|
+
'field-wrapper'?: ComponentStyles & Modifiers<'horizontal' | 'vertical', Required>;
|
|
8
|
+
control?: ComponentStyles;
|
|
9
|
+
icon?: ComponentStyles;
|
|
10
|
+
'icon-button'?: ComponentStyles;
|
|
11
|
+
}, Required> & Modifiers<'horizontal' | 'vertical' | 'has-inner-end' | 'has-inner-start', Required>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
2
|
+
export type FieldsetTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | 'outlined' | 'plain', Required> & Elements<{
|
|
3
|
+
legend?: ComponentStyles & Modifiers<Size, Required>;
|
|
4
|
+
}, Required>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { WebTokens } from '../tokens';
|
|
2
|
+
import { AccordionTheme } from './accordion';
|
|
3
|
+
import { AlertTheme } from './alert';
|
|
4
|
+
import { AutoCompleteTheme } from './autocomplete';
|
|
5
|
+
import { BadgeTheme } from './badge';
|
|
6
|
+
import { BreadcrumbsTheme } from './breadcrumbs';
|
|
7
|
+
import { ButtonTheme } from './button';
|
|
8
|
+
import { ButtonGroupTheme } from './buttonGroup';
|
|
9
|
+
import { CardTheme } from './card';
|
|
10
|
+
import { CheckboxTheme } from './checkbox';
|
|
11
|
+
import { CheckboxFieldTheme } from './checkboxField';
|
|
12
|
+
import { CollectionTheme } from './collection';
|
|
13
|
+
import { DividerTheme } from './divider';
|
|
14
|
+
import { DropZoneTheme } from './dropZone';
|
|
15
|
+
import { FieldTheme } from './field';
|
|
16
|
+
import { FieldGroupTheme } from './fieldGroup';
|
|
17
|
+
import { FieldsetTheme } from './fieldset';
|
|
18
|
+
import { HeadingTheme } from './heading';
|
|
19
|
+
import { HighlightMatchTheme } from './highlightMatch';
|
|
20
|
+
import { InputTheme } from './input';
|
|
21
|
+
import { LoaderTheme } from './loader';
|
|
22
|
+
import { MenuTheme } from './menu';
|
|
23
|
+
import { MessageTheme } from './message';
|
|
24
|
+
import { PaginationTheme } from './pagination';
|
|
25
|
+
import { PlaceholderTheme } from './placeholder';
|
|
26
|
+
import { RadioTheme } from './radio';
|
|
27
|
+
import { RatingTheme } from './rating';
|
|
28
|
+
import { ScrollViewTheme } from './scrollview';
|
|
29
|
+
import { SearchFieldTheme } from './searchField';
|
|
30
|
+
import { SelectTheme } from './select';
|
|
31
|
+
import { SelectFieldTheme } from './selectField';
|
|
32
|
+
import { SliderFieldTheme } from './sliderField';
|
|
33
|
+
import { StepperFieldTheme } from './stepperField';
|
|
34
|
+
import { StorageManagerTheme } from './storageManager';
|
|
35
|
+
import { SwitchFieldTheme, SwitchTheme } from './switchField';
|
|
36
|
+
import { TableTheme } from './table';
|
|
37
|
+
import { TabsTheme } from './tabs';
|
|
38
|
+
import { TextTheme } from './text';
|
|
39
|
+
import { TextFieldTheme } from './textField';
|
|
40
|
+
import { TextareaTheme } from './textarea';
|
|
41
|
+
import { TextareaFieldTheme } from './textareaField';
|
|
42
|
+
import { ToggleButtonTheme, ToggleButtonGroupTheme } from './toggleButton';
|
|
43
|
+
import { ComponentTheme, BaseComponentTheme, BaseTheme } from './utils';
|
|
44
|
+
export { ClassNameFunction } from '../createTheme/createComponentClasses';
|
|
45
|
+
export type { ComponentTheme, BaseComponentTheme, BaseTheme };
|
|
46
|
+
export type ComponentsTheme<TokensType extends WebTokens = WebTokens> = BaseComponentTheme<BaseTheme, string, TokensType> | BaseComponentTheme<AccordionTheme, 'accordion', TokensType> | BaseComponentTheme<AlertTheme, 'alert', TokensType> | BaseComponentTheme<AutoCompleteTheme, 'autocomplete', TokensType> | BaseComponentTheme<BadgeTheme, 'badge', TokensType> | BaseComponentTheme<BreadcrumbsTheme, 'breadcrumbs', TokensType> | BaseComponentTheme<ButtonTheme, 'button', TokensType> | BaseComponentTheme<ButtonGroupTheme, 'buttongroup', TokensType> | BaseComponentTheme<CardTheme, 'card', TokensType> | BaseComponentTheme<CheckboxTheme, 'checkbox', TokensType> | BaseComponentTheme<CheckboxFieldTheme, 'checkboxfield', TokensType> | BaseComponentTheme<CollectionTheme, 'collection', TokensType> | BaseComponentTheme<DividerTheme, 'divider', TokensType> | BaseComponentTheme<DropZoneTheme, 'dropzone', TokensType> | BaseComponentTheme<FieldTheme, 'field', TokensType> | BaseComponentTheme<FieldGroupTheme, 'field-group', TokensType> | BaseComponentTheme<FieldsetTheme, 'fieldset', TokensType> | BaseComponentTheme<HeadingTheme, 'heading', TokensType> | BaseComponentTheme<HighlightMatchTheme, 'highlightmatch', TokensType> | BaseComponentTheme<InputTheme, 'input', TokensType> | BaseComponentTheme<LoaderTheme, 'loader', TokensType> | BaseComponentTheme<MenuTheme, 'menu', TokensType> | BaseComponentTheme<MessageTheme, 'message', TokensType> | BaseComponentTheme<PaginationTheme, 'pagination', TokensType> | BaseComponentTheme<PlaceholderTheme, 'placeholder', TokensType> | BaseComponentTheme<RatingTheme, 'rating', TokensType> | BaseComponentTheme<RadioTheme, 'radio', TokensType> | BaseComponentTheme<ScrollViewTheme, 'scrollview', TokensType> | BaseComponentTheme<SearchFieldTheme, 'searchfield', TokensType> | BaseComponentTheme<SelectTheme, 'select', TokensType> | BaseComponentTheme<SelectFieldTheme, 'selectfield', TokensType> | BaseComponentTheme<SliderFieldTheme, 'sliderfield', TokensType> | BaseComponentTheme<StepperFieldTheme, 'stepperfield', TokensType> | BaseComponentTheme<StorageManagerTheme, 'storagemanager', TokensType> | BaseComponentTheme<SwitchTheme, 'switch', TokensType> | BaseComponentTheme<SwitchFieldTheme, 'switchfield', TokensType> | BaseComponentTheme<TabsTheme, 'tabs', TokensType> | BaseComponentTheme<TableTheme, 'table', TokensType> | BaseComponentTheme<TextTheme, 'text', TokensType> | BaseComponentTheme<TextareaTheme, 'textarea', TokensType> | BaseComponentTheme<TextareaFieldTheme, 'textareafield', TokensType> | BaseComponentTheme<TextFieldTheme, 'textfield', TokensType> | BaseComponentTheme<ToggleButtonTheme, 'togglebutton', TokensType> | BaseComponentTheme<ToggleButtonGroupTheme, 'togglebuttongroup', TokensType>;
|
|
47
|
+
export type AllComponentThemes = {
|
|
48
|
+
accordion: AccordionTheme;
|
|
49
|
+
alert: AlertTheme;
|
|
50
|
+
autocomplete: AutoCompleteTheme;
|
|
51
|
+
badge: BadgeTheme;
|
|
52
|
+
breadcrumbs: BreadcrumbsTheme;
|
|
53
|
+
button: ButtonTheme;
|
|
54
|
+
buttongroup: ButtonGroupTheme;
|
|
55
|
+
card: CardTheme;
|
|
56
|
+
checkbox: CheckboxTheme;
|
|
57
|
+
checkboxfield: CheckboxFieldTheme;
|
|
58
|
+
collection: CollectionTheme;
|
|
59
|
+
divider: DividerTheme;
|
|
60
|
+
dropZone: DropZoneTheme;
|
|
61
|
+
field: FieldTheme;
|
|
62
|
+
'field-group': FieldGroupTheme;
|
|
63
|
+
fieldset: FieldsetTheme;
|
|
64
|
+
heading: HeadingTheme;
|
|
65
|
+
highlightmatch: HighlightMatchTheme;
|
|
66
|
+
input: InputTheme;
|
|
67
|
+
loader: LoaderTheme;
|
|
68
|
+
menu: MenuTheme;
|
|
69
|
+
message: MessageTheme;
|
|
70
|
+
pagination: PaginationTheme;
|
|
71
|
+
placeholder: PlaceholderTheme;
|
|
72
|
+
radio: RadioTheme;
|
|
73
|
+
rating: RatingTheme;
|
|
74
|
+
scrollview: ScrollViewTheme;
|
|
75
|
+
searchfield: SearchFieldTheme;
|
|
76
|
+
select: SelectTheme;
|
|
77
|
+
selectfield: SelectFieldTheme;
|
|
78
|
+
sliderfield: SliderFieldTheme;
|
|
79
|
+
stepperfield: StepperFieldTheme;
|
|
80
|
+
storagemanager: StorageManagerTheme;
|
|
81
|
+
switch: SwitchTheme;
|
|
82
|
+
switchfield: SwitchFieldTheme;
|
|
83
|
+
table: TableTheme;
|
|
84
|
+
tabs: TabsTheme;
|
|
85
|
+
text: TextTheme;
|
|
86
|
+
textarea: TextareaTheme;
|
|
87
|
+
textareaField: TextareaFieldTheme;
|
|
88
|
+
textField: TextFieldTheme;
|
|
89
|
+
toggleButton: ToggleButtonTheme;
|
|
90
|
+
toggleButtonGroup: ToggleButtonGroupTheme;
|
|
91
|
+
};
|
|
92
|
+
export type ComponentThemeFromName<T extends string, Theme extends BaseTheme = BaseTheme> = T extends keyof AllComponentThemes ? AllComponentThemes[T] : Theme;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
2
|
+
export type MessageTheme<Required extends boolean = false> = ComponentStyles & Modifiers<'plain' | 'outlined' | 'filled' | ColorTheme | 'neutral', Required> & Elements<{
|
|
3
|
+
[key in 'icon' | 'heading' | 'content' | 'dismiss']?: ComponentStyles;
|
|
4
|
+
}, Required>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentStyles, Elements, Modifiers, Size } from './utils';
|
|
2
|
+
export type RadioTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | 'disabled', Required> & Elements<{
|
|
3
|
+
input?: ComponentStyles;
|
|
4
|
+
button?: ComponentStyles & Modifiers<Size>;
|
|
5
|
+
label?: ComponentStyles & Modifiers<'disabled'>;
|
|
6
|
+
}, Required>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentStyles, Elements, Modifiers, Size } from './utils';
|
|
2
|
+
export type RatingTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size> & Elements<{
|
|
3
|
+
item?: ComponentStyles;
|
|
4
|
+
icon?: ComponentStyles & Modifiers<'filled' | 'empty'>;
|
|
5
|
+
}, Required>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, Size, FieldControlModifiers } from './utils';
|
|
2
|
+
export type SelectTheme<Required extends boolean = false> = ComponentStyles & Modifiers<FieldControlModifiers | 'expanded', Required> & Elements<{
|
|
3
|
+
wrapper?: ComponentStyles;
|
|
4
|
+
icon?: ComponentStyles & Modifiers<Size, Required>;
|
|
5
|
+
}, Required>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme, Size } from './utils';
|
|
2
|
+
export type SliderFieldTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme, Required> & Elements<{
|
|
3
|
+
label?: ComponentStyles;
|
|
4
|
+
group?: ComponentStyles;
|
|
5
|
+
root?: ComponentStyles & Modifiers<'disabled' | 'horizontal' | 'vertical' | Size, Required>;
|
|
6
|
+
track?: ComponentStyles & Modifiers<'horizontal' | 'vertical' | Size, Required>;
|
|
7
|
+
range?: ComponentStyles & Modifiers<'disabled' | 'horizontal' | 'vertical', Required>;
|
|
8
|
+
thumb?: ComponentStyles & Modifiers<'disabled' | Size, Required>;
|
|
9
|
+
}, Required>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
2
|
+
export type StepperFieldTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme, Required> & Elements<{
|
|
3
|
+
'button--increase'?: ComponentStyles & Modifiers<'quiet' | 'disabled', Required>;
|
|
4
|
+
'button--decrease'?: ComponentStyles & Modifiers<'quiet' | 'disabled', Required>;
|
|
5
|
+
input?: ComponentStyles;
|
|
6
|
+
}, Required>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
2
|
+
export type StorageManagerTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme, Required> & Elements<{
|
|
3
|
+
dropzone?: ComponentStyles & Modifiers<'active' | 'small', Required>;
|
|
4
|
+
dropzone__icon?: ComponentStyles;
|
|
5
|
+
dropzone__text?: ComponentStyles;
|
|
6
|
+
file?: ComponentStyles;
|
|
7
|
+
file__picker?: ComponentStyles;
|
|
8
|
+
file__wrapper?: ComponentStyles;
|
|
9
|
+
file__name?: ComponentStyles;
|
|
10
|
+
file__size?: ComponentStyles;
|
|
11
|
+
file__list?: ComponentStyles;
|
|
12
|
+
file__main?: ComponentStyles;
|
|
13
|
+
file__image?: ComponentStyles;
|
|
14
|
+
file__status?: ComponentStyles & Modifiers<'error' | 'success', Required>;
|
|
15
|
+
loader?: ComponentStyles;
|
|
16
|
+
previewer?: ComponentStyles;
|
|
17
|
+
previewer__text?: ComponentStyles;
|
|
18
|
+
previewer__footer?: ComponentStyles;
|
|
19
|
+
previewer__actions?: ComponentStyles;
|
|
20
|
+
}, Required>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, Size } from './utils';
|
|
2
|
+
export type SwitchTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
|
+
wrapper?: ComponentStyles & Modifiers<'start' | 'end' | 'top' | 'bottom', Required>;
|
|
4
|
+
track?: ComponentStyles & Modifiers<'checked' | 'disabled' | 'focused' | 'error'>;
|
|
5
|
+
thumb?: ComponentStyles & Modifiers<'checked' | 'disabled'>;
|
|
6
|
+
label?: ComponentStyles;
|
|
7
|
+
}, Required>;
|
|
8
|
+
export type SwitchFieldTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size, Required>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
2
|
+
export type TableTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | 'bordered' | 'striped', Required> & Elements<{
|
|
3
|
+
[key in 'caption' | 'head' | 'body' | 'foot' | 'row' | 'th' | 'td']?: ComponentStyles;
|
|
4
|
+
}, Required>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentStyles, Elements, Modifiers } from './utils';
|
|
2
|
+
export type TabsTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
|
+
list?: ComponentStyles & Modifiers<'equal' | 'relative' | 'top' | 'bottom'>;
|
|
4
|
+
panel?: ComponentStyles & Modifiers<'active'>;
|
|
5
|
+
item?: ComponentStyles & Modifiers<'active'>;
|
|
6
|
+
}, Required>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles } from './utils';
|
|
2
|
+
export type TextVariation = 'primary' | 'secondary' | 'tertiary' | 'error' | 'warning' | 'info' | 'success';
|
|
3
|
+
export type TextTheme<Required extends boolean = false> = ComponentStyles & Modifiers<TextVariation | 'truncated', Required>;
|