@aws-amplify/ui 4.1.0 → 5.1.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 (110) hide show
  1. package/dist/esm/helpers/authenticator/constants.js +1 -1
  2. package/dist/esm/helpers/authenticator/facade.js +1 -1
  3. package/dist/esm/helpers/authenticator/textUtil.js +1 -0
  4. package/dist/esm/helpers/authenticator/utils.js +1 -1
  5. package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.js +1 -1
  6. package/dist/esm/i18n/dictionaries/authenticator/en.js +1 -1
  7. package/dist/esm/index.js +1 -1
  8. package/dist/esm/machines/authenticator/actors/signIn.js +1 -1
  9. package/dist/esm/machines/authenticator/defaultServices.js +1 -1
  10. package/dist/esm/machines/authenticator/index.js +1 -1
  11. package/dist/esm/machines/authenticator/signUp.js +1 -1
  12. package/dist/esm/theme/createTheme.js +1 -1
  13. package/dist/esm/theme/defaultDarkModeOverride.js +1 -1
  14. package/dist/esm/theme/tokens/components/fieldControl.js +1 -1
  15. package/dist/esm/theme/tokens/components/inAppMessaging.js +1 -0
  16. package/dist/esm/theme/tokens/components/index.js +1 -1
  17. package/dist/esm/theme/tokens/index.js +1 -1
  18. package/dist/esm/theme/utils.js +1 -1
  19. package/dist/esm/types/authenticator/user.js +1 -1
  20. package/dist/esm/types/authenticator/utils.js +1 -0
  21. package/dist/esm/types/primitives/componentClassName.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/styles.css +1164 -977
  24. package/dist/theme.css +983 -978
  25. package/dist/types/helpers/authenticator/facade.d.ts +1 -1
  26. package/dist/types/helpers/authenticator/index.d.ts +1 -0
  27. package/dist/types/helpers/authenticator/textUtil.d.ts +47 -0
  28. package/dist/types/helpers/authenticator/utils.d.ts +7 -3
  29. package/dist/types/i18n/dictionaries/authenticator/defaultTexts.d.ts +2 -1
  30. package/dist/types/i18n/dictionaries/index.d.ts +2 -1
  31. package/dist/types/i18n/translations.d.ts +2 -1
  32. package/dist/types/machines/authenticator/defaultServices.d.ts +2 -1
  33. package/dist/types/theme/createTheme.d.ts +2 -2
  34. package/dist/types/theme/defaultDarkModeOverride.d.ts +2 -0
  35. package/dist/types/theme/defaultTheme.d.ts +2 -2
  36. package/dist/types/theme/index.d.ts +3 -2
  37. package/dist/types/theme/tokens/borderWidths.d.ts +5 -19
  38. package/dist/types/theme/tokens/colors.d.ts +36 -75
  39. package/dist/types/theme/tokens/components/alert.d.ts +14 -27
  40. package/dist/types/theme/tokens/components/authenticator.d.ts +26 -46
  41. package/dist/types/theme/tokens/components/autocomplete.d.ts +12 -41
  42. package/dist/types/theme/tokens/components/badge.d.ts +15 -28
  43. package/dist/types/theme/tokens/components/button.d.ts +39 -82
  44. package/dist/types/theme/tokens/components/card.d.ts +7 -14
  45. package/dist/types/theme/tokens/components/checkbox.d.ts +27 -80
  46. package/dist/types/theme/tokens/components/checkboxField.d.ts +3 -8
  47. package/dist/types/theme/tokens/components/collection.d.ts +20 -28
  48. package/dist/types/theme/tokens/components/copy.d.ts +8 -20
  49. package/dist/types/theme/tokens/components/dialCodeSelect.d.ts +3 -5
  50. package/dist/types/theme/tokens/components/divider.d.ts +8 -20
  51. package/dist/types/theme/tokens/components/expander.d.ts +21 -68
  52. package/dist/types/theme/tokens/components/field.d.ts +8 -16
  53. package/dist/types/theme/tokens/components/fieldControl.d.ts +22 -71
  54. package/dist/types/theme/tokens/components/fieldGroup.d.ts +6 -14
  55. package/dist/types/theme/tokens/components/fieldMessages.d.ts +6 -16
  56. package/dist/types/theme/tokens/components/flex.d.ts +3 -9
  57. package/dist/types/theme/tokens/components/heading.d.ts +5 -16
  58. package/dist/types/theme/tokens/components/highlightMatch.d.ts +5 -9
  59. package/dist/types/theme/tokens/components/icon.d.ts +3 -6
  60. package/dist/types/theme/tokens/components/image.d.ts +3 -8
  61. package/dist/types/theme/tokens/components/inAppMessaging.d.ts +13 -0
  62. package/dist/types/theme/tokens/components/index.d.ts +59 -48
  63. package/dist/types/theme/tokens/components/link.d.ts +4 -12
  64. package/dist/types/theme/tokens/components/loader.d.ts +14 -39
  65. package/dist/types/theme/tokens/components/menu.d.ts +8 -26
  66. package/dist/types/theme/tokens/components/pagination.d.ts +12 -48
  67. package/dist/types/theme/tokens/components/passwordField.d.ts +12 -14
  68. package/dist/types/theme/tokens/components/phoneNumberField.d.ts +4 -9
  69. package/dist/types/theme/tokens/components/placeholder.d.ts +8 -14
  70. package/dist/types/theme/tokens/components/radio.d.ts +21 -72
  71. package/dist/types/theme/tokens/components/radioGroup.d.ts +8 -17
  72. package/dist/types/theme/tokens/components/rating.d.ts +9 -19
  73. package/dist/types/theme/tokens/components/searchField.d.ts +12 -15
  74. package/dist/types/theme/tokens/components/select.d.ts +11 -35
  75. package/dist/types/theme/tokens/components/selectField.d.ts +6 -14
  76. package/dist/types/theme/tokens/components/sliderField.d.ts +20 -61
  77. package/dist/types/theme/tokens/components/stepperField.d.ts +11 -23
  78. package/dist/types/theme/tokens/components/switchField.d.ts +20 -54
  79. package/dist/types/theme/tokens/components/table.d.ts +24 -60
  80. package/dist/types/theme/tokens/components/tabs.d.ts +12 -43
  81. package/dist/types/theme/tokens/components/text.d.ts +6 -15
  82. package/dist/types/theme/tokens/components/textAreaField.d.ts +6 -10
  83. package/dist/types/theme/tokens/components/textField.d.ts +5 -12
  84. package/dist/types/theme/tokens/components/toggleButton.d.ts +30 -115
  85. package/dist/types/theme/tokens/components/toggleButtonGroup.d.ts +5 -7
  86. package/dist/types/theme/tokens/fontSizes.d.ts +5 -17
  87. package/dist/types/theme/tokens/fontWeights.d.ts +5 -16
  88. package/dist/types/theme/tokens/fonts.d.ts +7 -12
  89. package/dist/types/theme/tokens/index.d.ts +58 -48
  90. package/dist/types/theme/tokens/lineHeights.d.ts +5 -10
  91. package/dist/types/theme/tokens/opacities.d.ts +5 -18
  92. package/dist/types/theme/tokens/outlineOffsets.d.ts +5 -10
  93. package/dist/types/theme/tokens/outlineWidths.d.ts +5 -10
  94. package/dist/types/theme/tokens/radii.d.ts +5 -14
  95. package/dist/types/theme/tokens/shadows.d.ts +5 -10
  96. package/dist/types/theme/tokens/space.d.ts +8 -25
  97. package/dist/types/theme/tokens/time.d.ts +5 -10
  98. package/dist/types/theme/tokens/transforms.d.ts +7 -13
  99. package/dist/types/theme/tokens/types/designToken.d.ts +161 -20
  100. package/dist/types/theme/types.d.ts +7 -8
  101. package/dist/types/theme/utils.d.ts +30 -2
  102. package/dist/types/types/authenticator/index.d.ts +1 -0
  103. package/dist/types/types/authenticator/stateMachine/authMachine.d.ts +5 -1
  104. package/dist/types/types/authenticator/stateMachine/event.d.ts +1 -1
  105. package/dist/types/types/authenticator/user.d.ts +7 -0
  106. package/dist/types/types/authenticator/utils.d.ts +1 -0
  107. package/dist/types/types/primitives/componentClassName.d.ts +1 -0
  108. package/package.json +9 -6
  109. package/dist/esm/theme/tokens/types/designToken.js +0 -1
  110. package/dist/types/theme/tokens/types/scales.d.ts +0 -13
@@ -1,83 +1,40 @@
1
- import { AlignItemsValue, BackgroundColorValue, BorderColorValue, BorderRadiusValue, BorderStyleValue, BorderWidthValue, BoxShadowValue, ColorValue, DesignToken, FontSizeValue, FontWeightValue, JustifyContentValue, LineHeightValue, SpaceValue, TransitionDurationValue } from '../types/designToken';
2
- export interface StateTokens {
3
- color: DesignToken<ColorValue>;
4
- backgroundColor: DesignToken<BackgroundColorValue>;
5
- borderColor: DesignToken<BorderColorValue>;
6
- }
7
- interface StateWithShadowTokens extends StateTokens {
8
- boxShadow: DesignToken<BoxShadowValue>;
9
- }
10
- interface MenuStateDisabledTokens extends Omit<StateTokens, 'borderColor' | 'backgroundColor'> {
11
- }
12
- interface MenuStateTokens extends Omit<StateTokens, 'borderColor'> {
13
- }
14
- interface PrimaryVariationTokens {
15
- borderWidth: DesignToken<BorderWidthValue>;
16
- borderStyle: DesignToken<BorderStyleValue>;
17
- borderColor: DesignToken<BorderColorValue>;
18
- backgroundColor: DesignToken<BackgroundColorValue>;
19
- color: DesignToken<ColorValue>;
20
- _disabled: StateTokens;
21
- _loading: StateTokens;
22
- _hover: StateTokens;
23
- _focus: StateWithShadowTokens;
24
- _active: StateTokens;
25
- }
26
- interface MenuVariationTokens {
27
- borderWidth: DesignToken<BorderWidthValue>;
28
- backgroundColor: DesignToken<BackgroundColorValue>;
29
- justifyContent: DesignToken<JustifyContentValue>;
30
- _hover: MenuStateTokens;
31
- _focus: MenuStateTokens;
32
- _active: MenuStateTokens;
33
- _disabled: MenuStateDisabledTokens;
34
- }
35
- interface LinkVariationTokens {
36
- backgroundColor: DesignToken<BackgroundColorValue>;
37
- borderColor: DesignToken<BorderColorValue>;
38
- borderWidth: DesignToken<BorderWidthValue>;
39
- color: DesignToken<ColorValue>;
40
- _hover: StateTokens;
41
- _focus: StateWithShadowTokens;
42
- _active: StateTokens;
43
- _disabled: StateTokens;
44
- _loading: StateTokens;
45
- }
46
- interface ButtonSizeTokens {
47
- fontSize: DesignToken<FontSizeValue>;
48
- paddingBlockStart: DesignToken<SpaceValue>;
49
- paddingBlockEnd: DesignToken<SpaceValue>;
50
- paddingInlineStart: DesignToken<SpaceValue>;
51
- paddingInlineEnd: DesignToken<SpaceValue>;
52
- }
53
- export interface ButtonTokens {
54
- fontWeight: DesignToken<FontWeightValue>;
55
- transitionDuration: DesignToken<TransitionDurationValue>;
56
- fontSize: DesignToken<FontSizeValue>;
57
- lineHeight: DesignToken<LineHeightValue>;
58
- paddingBlockStart: DesignToken<SpaceValue>;
59
- paddingBlockEnd: DesignToken<SpaceValue>;
60
- paddingInlineStart: DesignToken<SpaceValue>;
61
- paddingInlineEnd: DesignToken<SpaceValue>;
62
- borderColor: DesignToken<BorderColorValue>;
63
- borderWidth: DesignToken<BorderWidthValue>;
64
- borderStyle: DesignToken<BorderStyleValue>;
65
- borderRadius: DesignToken<BorderRadiusValue>;
66
- color: DesignToken<ColorValue>;
67
- _hover: StateTokens;
68
- _focus: StateWithShadowTokens;
69
- _active: StateTokens;
70
- _loading: StateTokens;
71
- _disabled: StateTokens;
72
- primary: PrimaryVariationTokens;
73
- menu: MenuVariationTokens;
74
- link: LinkVariationTokens;
75
- small: ButtonSizeTokens;
76
- large: ButtonSizeTokens;
77
- loaderWrapper: {
78
- alignItems: DesignToken<AlignItemsValue>;
79
- gap: DesignToken<SpaceValue>;
80
- };
81
- }
82
- export declare const button: ButtonTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type StateTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'color', Output>;
3
+ declare type StateWithShadowTokens<Output> = StateTokens<Output> & DesignTokenProperties<'boxShadow', Output>;
4
+ declare type MenuStateTokens<Output> = Omit<StateTokens<Output>, 'borderColor'>;
5
+ declare type PrimaryVariationTokens<Output> = StateTokens<Output> & DesignTokenProperties<'borderStyle' | 'borderWidth', Output> & {
6
+ _disabled?: StateTokens<Output>;
7
+ _loading?: StateTokens<Output>;
8
+ _hover?: StateTokens<Output>;
9
+ _focus?: StateWithShadowTokens<Output>;
10
+ _active?: StateTokens<Output>;
11
+ };
12
+ declare type MenuVariationTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderWidth' | 'justifyContent', Output> & {
13
+ _hover?: MenuStateTokens<Output>;
14
+ _focus?: MenuStateTokens<Output>;
15
+ _active?: MenuStateTokens<Output>;
16
+ _disabled?: Omit<StateTokens<Output>, 'borderColor' | 'backgroundColor'>;
17
+ };
18
+ declare type LinkVariationTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderWidth' | 'color', Output> & {
19
+ _hover?: StateTokens<Output>;
20
+ _focus?: StateWithShadowTokens<Output>;
21
+ _active?: StateTokens<Output>;
22
+ _disabled?: StateTokens<Output>;
23
+ _loading?: StateTokens<Output>;
24
+ };
25
+ declare type ButtonSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd', Output>;
26
+ export declare type ButtonTokens<Output extends OutputVariantKey> = DesignTokenProperties<'fontWeight' | 'transitionDuration' | 'fontSize' | 'lineHeight' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'borderColor' | 'borderWidth' | 'borderStyle' | 'borderRadius' | 'color'> & {
27
+ _hover?: StateTokens<Output>;
28
+ _focus?: StateWithShadowTokens<Output>;
29
+ _active?: StateTokens<Output>;
30
+ _loading?: StateTokens<Output>;
31
+ _disabled?: StateTokens<Output>;
32
+ primary?: PrimaryVariationTokens<Output>;
33
+ menu?: MenuVariationTokens<Output>;
34
+ link?: LinkVariationTokens<Output>;
35
+ small?: ButtonSizeTokens<Output>;
36
+ large?: ButtonSizeTokens<Output>;
37
+ loaderWrapper: DesignTokenProperties<'alignItems' | 'gap', Output>;
38
+ };
39
+ export declare const button: Required<ButtonTokens<'default'>>;
83
40
  export {};
@@ -1,16 +1,9 @@
1
- import { BackgroundColorValue, BorderColorValue, BorderRadiusValue, BorderStyleValue, BorderWidthValue, BoxShadowValue, DesignToken, SpaceValue } from '../types/designToken';
2
- interface CardVariationTokens {
3
- backgroundColor: DesignToken<BackgroundColorValue>;
4
- borderRadius: DesignToken<BorderRadiusValue>;
5
- borderWidth: DesignToken<BorderWidthValue>;
6
- borderStyle: DesignToken<BorderStyleValue>;
7
- borderColor: DesignToken<BorderColorValue>;
8
- boxShadow: DesignToken<BoxShadowValue>;
9
- }
10
- export declare type CardTokens = CardVariationTokens & {
11
- padding: DesignToken<SpaceValue>;
12
- outlined: CardVariationTokens;
13
- elevated: CardVariationTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type CardVariationStyleKey = 'backgroundColor' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'boxShadow';
3
+ declare type CardVariationTokens<OutputType> = DesignTokenProperties<CardVariationStyleKey, OutputType>;
4
+ export declare type CardTokens<OutputType extends OutputVariantKey> = CardVariationTokens<OutputType> & DesignTokenProperties<'padding', OutputType> & {
5
+ elevated?: CardVariationTokens<OutputType>;
6
+ outlined?: CardVariationTokens<OutputType>;
14
7
  };
15
- export declare const card: CardTokens;
8
+ export declare const card: Required<CardTokens<'default'>>;
16
9
  export {};
@@ -1,81 +1,28 @@
1
- import { AlignItemsValue, BackgroundColorValue, BorderColorValue, BorderRadiusValue, BorderStyleValue, BorderWidthValue, BoxShadowValue, ColorValue, CursorValue, DesignToken, JustifyContentValue, OpacityValue, OutlineColorValue, OutlineOffsetValue, OutlineStyleValue, OutlineWidthValue, PositionValue, SpaceValue, TransformValue, TransitionDurationValue, TransitionPropertyValue, TransitionTimingFunctionValue } from '../types/designToken';
2
- interface DisableToken {
3
- cursor: DesignToken<CursorValue>;
4
- }
5
- interface ButtonDisabledToken {
6
- borderColor: DesignToken<BorderColorValue>;
7
- }
8
- interface ButtonErrorFocusToken {
9
- borderColor: DesignToken<BorderColorValue>;
10
- boxShadow: DesignToken<BoxShadowValue>;
11
- }
12
- interface ButtonErrorToken {
13
- borderColor: DesignToken<BorderColorValue>;
14
- _focus: ButtonErrorFocusToken;
15
- }
16
- interface ButtonFocusToken {
17
- outlineColor: DesignToken<OutlineColorValue>;
18
- outlineStyle: DesignToken<OutlineStyleValue>;
19
- outlineWidth: DesignToken<OutlineWidthValue>;
20
- outlineOffset: DesignToken<OutlineOffsetValue>;
21
- borderColor: DesignToken<BorderColorValue>;
22
- boxShadow: DesignToken<BoxShadowValue>;
23
- }
24
- interface BeforeToken {
25
- width: DesignToken<SpaceValue>;
26
- height: DesignToken<SpaceValue>;
27
- borderWidth: DesignToken<BorderWidthValue>;
28
- borderRadius: DesignToken<BorderRadiusValue>;
29
- borderStyle: DesignToken<BorderStyleValue>;
30
- borderColor: DesignToken<BorderColorValue>;
31
- }
32
- interface ButtonToken {
33
- position: DesignToken<PositionValue>;
34
- alignItems: DesignToken<AlignItemsValue>;
35
- justifyContent: DesignToken<JustifyContentValue>;
36
- color: DesignToken<ColorValue>;
37
- before: BeforeToken;
38
- _focus: ButtonFocusToken;
39
- _disabled: ButtonDisabledToken;
40
- _error: ButtonErrorToken;
41
- }
42
- interface IconCheckedDisabled {
43
- backgroundColor: DesignToken<BackgroundColorValue>;
44
- }
45
- interface IconCheckedToken {
46
- opacity: DesignToken<OpacityValue>;
47
- transform: DesignToken<TransformValue>;
48
- _disabled: IconCheckedDisabled;
49
- }
50
- interface IconIndeterminateToken {
51
- opacity: DesignToken<OpacityValue>;
52
- transform: DesignToken<TransformValue>;
53
- _disabled: IconCheckedDisabled;
54
- }
55
- interface IconToken {
56
- backgroundColor: DesignToken<BackgroundColorValue>;
57
- borderRadius: DesignToken<BorderRadiusValue>;
58
- opacity: DesignToken<OpacityValue>;
59
- transform: DesignToken<TransformValue>;
60
- transitionProperty: DesignToken<TransitionPropertyValue>;
61
- transitionDuration: DesignToken<TransitionDurationValue>;
62
- transitionTimingFunction: DesignToken<TransitionTimingFunctionValue>;
63
- _checked: IconCheckedToken;
64
- _indeterminate: IconIndeterminateToken;
65
- }
66
- interface LabelDisabledToken {
67
- color: DesignToken<ColorValue>;
68
- }
69
- interface LabelToken {
70
- _disabled: LabelDisabledToken;
71
- }
72
- export interface CheckboxTokens {
73
- cursor: DesignToken<CursorValue>;
74
- alignItems: DesignToken<AlignItemsValue>;
75
- _disabled: DisableToken;
76
- button: ButtonToken;
77
- icon: IconToken;
78
- label: LabelToken;
79
- }
80
- export declare const checkbox: CheckboxTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type ButtonFocusToken<Output> = DesignTokenProperties<'outlineColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'borderColor' | 'boxShadow', Output>;
3
+ declare type BeforeToken<Output> = DesignTokenProperties<'width' | 'height' | 'borderWidth' | 'borderRadius' | 'borderStyle' | 'borderColor', Output>;
4
+ declare type ButtonToken<Output> = DesignTokenProperties<'position' | 'alignItems' | 'justifyContent' | 'color', Output> & {
5
+ before: BeforeToken<Output>;
6
+ _focus: ButtonFocusToken<Output>;
7
+ _disabled: DesignTokenProperties<'borderColor', Output>;
8
+ _error: DesignTokenProperties<'borderColor', Output> & {
9
+ _focus: DesignTokenProperties<'borderColor' | 'boxShadow', Output>;
10
+ };
11
+ };
12
+ declare type IconCheckedStateToken<Output> = DesignTokenProperties<'opacity' | 'transform'> & {
13
+ _disabled?: DesignTokenProperties<'backgroundColor', Output>;
14
+ };
15
+ declare type IconToken<Output> = DesignTokenProperties<'backgroundColor' | 'borderRadius' | 'opacity' | 'transform' | 'transitionProperty' | 'transitionDuration' | 'transitionTimingFunction', Output> & {
16
+ _checked?: IconCheckedStateToken<Output>;
17
+ _indeterminate?: IconCheckedStateToken<Output>;
18
+ };
19
+ export declare type CheckboxTokens<Output extends OutputVariantKey> = DesignTokenProperties<'alignItems' | 'cursor', Output> & {
20
+ _disabled?: DesignTokenProperties<'cursor', Output>;
21
+ button?: ButtonToken<Output>;
22
+ icon?: IconToken<Output>;
23
+ label?: {
24
+ _disabled?: DesignTokenProperties<'color', Output>;
25
+ };
26
+ };
27
+ export declare const checkbox: Required<CheckboxTokens<'default'>>;
81
28
  export {};
@@ -1,8 +1,3 @@
1
- import { AlignContentValue, AlignItemsValue, DesignToken, FlexDirectionValue, JustifyContentValue } from '../types/designToken';
2
- export interface CheckboxFieldTokens {
3
- alignItems: DesignToken<AlignItemsValue>;
4
- alignContent: DesignToken<AlignContentValue>;
5
- flexDirection: DesignToken<FlexDirectionValue>;
6
- justifyContent: DesignToken<JustifyContentValue>;
7
- }
8
- export declare const checkboxfield: CheckboxFieldTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ export declare type CheckboxFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<'alignItems' | 'alignContent' | 'flexDirection' | 'justifyContent', Output>;
3
+ export declare const checkboxfield: Required<CheckboxFieldTokens<'default'>>;
@@ -1,32 +1,24 @@
1
- import { PaginationButtonDisabledTokens, PaginationButtonHoverTokens } from './pagination';
2
- import { StateTokens } from './button';
3
- import { BackgroundColorValue, ColorValue, DesignToken } from '../types/designToken';
4
- interface PaginationTokens {
5
- current: {
6
- color: DesignToken<ColorValue>;
7
- backgroundColor: DesignToken<BackgroundColorValue>;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type StateTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'color', Output>;
3
+ declare type PaginationTokens<Output> = {
4
+ current?: DesignTokenProperties<'color' | 'backgroundColor', Output>;
5
+ button?: DesignTokenProperties<'color', Output> & {
6
+ _hover?: DesignTokenProperties<'backgroundColor' | 'color', Output>;
7
+ _disabled?: DesignTokenProperties<'color', Output>;
8
8
  };
9
- button: {
10
- color: DesignToken<ColorValue>;
11
- _hover: PaginationButtonHoverTokens;
12
- _disabled: PaginationButtonDisabledTokens;
9
+ };
10
+ declare type SearchTokens<Output> = {
11
+ input: DesignTokenProperties<'color', Output>;
12
+ button: DesignTokenProperties<'color', Output> & {
13
+ _active: StateTokens<Output>;
14
+ _disabled: StateTokens<Output>;
15
+ _focus: StateTokens<Output>;
16
+ _hover: StateTokens<Output>;
13
17
  };
18
+ };
19
+ export interface CollectionTokens<Output extends OutputVariantKey> {
20
+ pagination: PaginationTokens<Output>;
21
+ search: SearchTokens<Output>;
14
22
  }
15
- export interface SearchTokens {
16
- input: {
17
- color: DesignToken<ColorValue>;
18
- };
19
- button: {
20
- color: DesignToken<ColorValue>;
21
- _active: StateTokens;
22
- _disabled: StateTokens;
23
- _focus: StateTokens;
24
- _hover: StateTokens;
25
- };
26
- }
27
- export interface CollectionTokens {
28
- pagination: PaginationTokens;
29
- search: SearchTokens;
30
- }
31
- export declare const collection: CollectionTokens;
23
+ export declare const collection: Required<CollectionTokens<'default'>>;
32
24
  export {};
@@ -1,20 +1,8 @@
1
- import { ColorValue, DesignToken, FontSizeValue, SpaceValue } from '../types/designToken';
2
- interface CopySVGFillTokens {
3
- fill: DesignToken<ColorValue>;
4
- }
5
- interface CopySVGTokens {
6
- path: CopySVGFillTokens;
7
- }
8
- interface CopyToolTipTokens {
9
- bottom: DesignToken<SpaceValue>;
10
- color: DesignToken<ColorValue>;
11
- fontSize: DesignToken<FontSizeValue>;
12
- }
13
- export interface CopyTokens {
14
- fontSize: DesignToken<FontSizeValue>;
15
- gap: DesignToken<SpaceValue>;
16
- svg: CopySVGTokens;
17
- toolTip: CopyToolTipTokens;
18
- }
19
- export declare const copy: CopyTokens;
20
- export {};
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ export declare type CopyTokens<Output extends OutputVariantKey> = DesignTokenProperties<'fontSize' | 'gap', Output> & {
3
+ svg?: {
4
+ path?: DesignTokenProperties<'fill', Output>;
5
+ };
6
+ toolTip?: DesignTokenProperties<'bottom' | 'color' | 'fontSize', Output>;
7
+ };
8
+ export declare const copy: Required<CopyTokens<'default'>>;
@@ -1,5 +1,3 @@
1
- import { DesignToken, SpaceValue } from '../types/designToken';
2
- export interface DialCodeSelectTokens {
3
- height: DesignToken<SpaceValue>;
4
- }
5
- export declare const dialcodeselect: DialCodeSelectTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ export declare type DialCodeSelectTokens<Output extends OutputVariantKey> = DesignTokenProperties<'height', Output>;
3
+ export declare const dialcodeselect: Required<DialCodeSelectTokens<'default'>>;
@@ -1,21 +1,9 @@
1
- import { BackgroundColorValue, BorderColorValue, BorderStyleValue, BorderWidthValue, ColorValue, DesignToken, FontSizeValue, OpacityValue, SpaceValue } from '../types/designToken';
2
- interface DividerSizeTokens {
3
- borderWidth: DesignToken<BorderWidthValue>;
4
- }
5
- interface DividerLabelTokens {
6
- color: DesignToken<ColorValue>;
7
- paddingInline: DesignToken<SpaceValue>;
8
- fontSize: DesignToken<FontSizeValue>;
9
- backgroundColor: DesignToken<BackgroundColorValue>;
10
- }
11
- export interface DividerTokens {
12
- borderStyle: DesignToken<BorderStyleValue>;
13
- borderColor: DesignToken<BorderColorValue>;
14
- borderWidth: DesignToken<BorderWidthValue>;
15
- label: DividerLabelTokens;
16
- small: DividerSizeTokens;
17
- large: DividerSizeTokens;
18
- opacity: DesignToken<OpacityValue>;
19
- }
20
- export declare const divider: DividerTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type DividerSizeTokens<Output> = DesignTokenProperties<'borderWidth', Output>;
3
+ export declare type DividerTokens<Output extends OutputVariantKey> = DesignTokenProperties<'borderStyle' | 'borderColor' | 'borderWidth' | 'opacity', Output> & {
4
+ label?: DesignTokenProperties<'color' | 'paddingInline' | 'fontSize' | 'backgroundColor', Output>;
5
+ small?: DividerSizeTokens<Output>;
6
+ large?: DividerSizeTokens<Output>;
7
+ };
8
+ export declare const divider: Required<DividerTokens<'default'>>;
21
9
  export {};
@@ -1,69 +1,22 @@
1
- import { AlignItemsValue, AnimationDurationValue, AnimationTimingFunctionValue, BackgroundColorValue, BorderRadiusValue, BoxShadowValue, ColorValue, DesignToken, DisplayValue, JustifyContentValue, RadiusValue, SpaceValue, TransitionDurationValue, TransitionTimingFunctionValue } from '../types/designToken';
2
- interface ExpanderItemFocusTokens {
3
- boxShadow: DesignToken<BoxShadowValue>;
4
- }
5
- interface ExpanderItemTokens {
6
- marginTop: DesignToken<SpaceValue>;
7
- boxShadow: DesignToken<BoxShadowValue>;
8
- borderBottomLeftRadius: DesignToken<RadiusValue>;
9
- borderBottomRightRadius: DesignToken<RadiusValue>;
10
- borderTopLeftRadius: DesignToken<RadiusValue>;
11
- borderTopRightRadius: DesignToken<RadiusValue>;
12
- borderStartStartRadius: DesignToken<RadiusValue>;
13
- borderStartEndRadius: DesignToken<RadiusValue>;
14
- borderEndStartRadius: DesignToken<RadiusValue>;
15
- borderEndEndRadius: DesignToken<RadiusValue>;
16
- _focus: ExpanderItemFocusTokens;
17
- }
18
- interface ExpanderHeaderTokens {
19
- boxShadow: DesignToken<BoxShadowValue>;
20
- }
21
- interface ExpanderTriggerTokens {
22
- minHeight: DesignToken<SpaceValue>;
23
- paddingInlineStart: DesignToken<SpaceValue>;
24
- paddingInlineEnd: DesignToken<SpaceValue>;
25
- alignItems: DesignToken<AlignItemsValue>;
26
- justifyContent: DesignToken<JustifyContentValue>;
27
- _hover: ExpanderTriggerHoverTokens;
28
- }
29
- interface ExpanderTriggerHoverTokens {
30
- backgroundColor: DesignToken<BackgroundColorValue>;
31
- }
32
- interface ExpanderContentTokens {
33
- paddingInlineStart: DesignToken<SpaceValue>;
34
- paddingInlineEnd: DesignToken<SpaceValue>;
35
- text: ExpanderContentTextTokens;
36
- _open: ExpanderContentOpenTokens;
37
- _closed: ExpanderContentClosedTokens;
38
- }
39
- interface ExpanderContentTextTokens {
40
- color: DesignToken<ColorValue>;
41
- paddingBlockStart: DesignToken<SpaceValue>;
42
- paddingBlockEnd: DesignToken<SpaceValue>;
43
- }
44
- interface ExpanderContentOpenTokens {
45
- animationDuration: DesignToken<AnimationDurationValue>;
46
- animationTimingFunction: DesignToken<AnimationTimingFunctionValue>;
47
- }
48
- interface ExpanderContentClosedTokens {
49
- animationDuration: DesignToken<AnimationDurationValue>;
50
- animationTimingFunction: DesignToken<AnimationTimingFunctionValue>;
51
- }
52
- interface ExpanderIconTokens {
53
- transitionDuration: DesignToken<TransitionDurationValue>;
54
- transitionTimingFunction: DesignToken<TransitionTimingFunctionValue>;
55
- }
56
- export interface ExpanderTokens {
57
- display: DesignToken<DisplayValue>;
58
- backgroundColor: DesignToken<BackgroundColorValue>;
59
- borderRadius: DesignToken<BorderRadiusValue>;
60
- boxShadow: DesignToken<BoxShadowValue>;
61
- width: DesignToken<SpaceValue>;
62
- item: ExpanderItemTokens;
63
- header: ExpanderHeaderTokens;
64
- trigger: ExpanderTriggerTokens;
65
- content: ExpanderContentTokens;
66
- icon: ExpanderIconTokens;
67
- }
68
- export declare const expander: ExpanderTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type ExpanderItemTokens<Output> = DesignTokenProperties<'marginTop' | 'boxShadow' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderStartStartRadius' | 'borderStartEndRadius' | 'borderEndStartRadius' | 'borderEndEndRadius', Output> & {
3
+ _focus?: DesignTokenProperties<'boxShadow', Output>;
4
+ };
5
+ declare type ExpanderTriggerTokens<Output> = DesignTokenProperties<'minHeight' | 'paddingInlineStart' | 'paddingInlineEnd' | 'alignItems' | 'justifyContent', Output> & {
6
+ _hover?: DesignTokenProperties<'backgroundColor', Output>;
7
+ };
8
+ declare type ExpanderContentStateTokens<Output> = DesignTokenProperties<'animationDuration' | 'animationTimingFunction', Output>;
9
+ declare type ExpanderContentTokens<Output> = DesignTokenProperties<'paddingInlineStart' | 'paddingInlineEnd', Output> & {
10
+ text?: DesignTokenProperties<'color' | 'paddingBlockStart' | 'paddingBlockEnd', Output>;
11
+ _open?: ExpanderContentStateTokens<Output>;
12
+ _closed?: ExpanderContentStateTokens<Output>;
13
+ };
14
+ export declare type ExpanderTokens<Output extends OutputVariantKey> = DesignTokenProperties<'display' | 'backgroundColor' | 'borderRadius' | 'boxShadow' | 'width', Output> & {
15
+ content?: ExpanderContentTokens<Output>;
16
+ header?: DesignTokenProperties<'boxShadow', Output>;
17
+ item?: ExpanderItemTokens<Output>;
18
+ trigger?: ExpanderTriggerTokens<Output>;
19
+ icon?: DesignTokenProperties<'transitionDuration' | 'transitionTimingFunction', Output>;
20
+ };
21
+ export declare const expander: Required<ExpanderTokens<'default'>>;
69
22
  export {};
@@ -1,17 +1,9 @@
1
- import { ColorValue, DesignToken, FontSizeValue, GapValue } from '../types/designToken';
2
- interface FieldSizeTokens {
3
- gap: DesignToken<GapValue>;
4
- fontSize: DesignToken<FontSizeValue>;
5
- }
6
- interface FieldLabelTokens {
7
- color: DesignToken<ColorValue>;
8
- }
9
- export interface FieldTokens {
10
- gap: DesignToken<GapValue>;
11
- fontSize: DesignToken<FontSizeValue>;
12
- small: FieldSizeTokens;
13
- large: FieldSizeTokens;
14
- label: FieldLabelTokens;
15
- }
16
- export declare const field: FieldTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type FieldSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'gap', Output>;
3
+ export declare type FieldTokens<Output extends OutputVariantKey> = FieldSizeTokens<Output> & {
4
+ small?: FieldSizeTokens<Output>;
5
+ large?: FieldSizeTokens<Output>;
6
+ label?: DesignTokenProperties<'color', Output>;
7
+ };
8
+ export declare const field: Required<FieldTokens<'default'>>;
17
9
  export {};
@@ -1,72 +1,23 @@
1
- import { BackgroundColorValue, BorderColorValue, BorderRadiusValue, BorderStyleValue, BorderValue, BorderWidthValue, BoxShadowValue, ColorValue, CursorValue, DesignToken, FontSizeValue, LineHeightValue, OutlineColorValue, OutlineOffsetValue, OutlineStyleValue, OutlineWidthValue, SpaceValue, TransitionDurationValue } from '../types/designToken';
2
- interface FieldControlSizeTokens {
3
- fontSize: DesignToken<FontSizeValue>;
4
- paddingBlockStart: DesignToken<SpaceValue>;
5
- paddingBlockEnd: DesignToken<SpaceValue>;
6
- paddingInlineStart: DesignToken<SpaceValue>;
7
- paddingInlineEnd: DesignToken<SpaceValue>;
8
- }
9
- interface FieldControlFocusTokens {
10
- borderColor: DesignToken<BorderColorValue>;
11
- boxShadow: DesignToken<BoxShadowValue>;
12
- }
13
- interface FieldControlDisabledTokens {
14
- color: DesignToken<ColorValue>;
15
- cursor: DesignToken<CursorValue>;
16
- borderColor: DesignToken<BorderColorValue>;
17
- backgroundColor: DesignToken<BackgroundColorValue>;
18
- }
19
- interface FieldControlErrorTokens {
20
- borderColor: DesignToken<BorderColorValue>;
21
- _focus: FieldControlErrorFocusTokens;
22
- }
23
- interface FieldControlErrorFocusTokens {
24
- boxShadow: DesignToken<BoxShadowValue>;
25
- }
26
- interface FieldControlQuietTokens {
27
- borderStyle: DesignToken<BorderStyleValue>;
28
- borderBlockEnd: DesignToken<BorderValue>;
29
- borderInlineStart: DesignToken<BorderValue>;
30
- borderInlineEnd: DesignToken<BorderValue>;
31
- borderBlockStart: DesignToken<BorderValue>;
32
- borderRadius: DesignToken<BorderRadiusValue>;
33
- _focus: FieldControlQuietFocusTokens;
34
- _error: FieldControlQuietErrorTokens;
35
- }
36
- interface FieldControlQuietFocusTokens {
37
- borderBlockEndColor: DesignToken<ColorValue>;
38
- boxShadow: DesignToken<BoxShadowValue>;
39
- }
40
- interface FieldControlQuietErrorTokens {
41
- borderBlockEndColor: DesignToken<ColorValue>;
42
- _focus: FieldControlQuietErrorFocusTokens;
43
- }
44
- interface FieldControlQuietErrorFocusTokens {
45
- boxShadow: DesignToken<BoxShadowValue>;
46
- }
47
- export interface FieldControlTokens {
48
- borderStyle: DesignToken<BorderStyleValue>;
49
- borderColor: DesignToken<BorderColorValue>;
50
- borderWidth: DesignToken<BorderWidthValue>;
51
- borderRadius: DesignToken<BorderRadiusValue>;
52
- color: DesignToken<ColorValue>;
53
- paddingBlockStart: DesignToken<SpaceValue>;
54
- paddingBlockEnd: DesignToken<SpaceValue>;
55
- paddingInlineStart: DesignToken<SpaceValue>;
56
- paddingInlineEnd: DesignToken<SpaceValue>;
57
- fontSize: DesignToken<FontSizeValue>;
58
- lineHeight: DesignToken<LineHeightValue>;
59
- transitionDuration: DesignToken<TransitionDurationValue>;
60
- outlineColor: DesignToken<OutlineColorValue>;
61
- outlineStyle: DesignToken<OutlineStyleValue>;
62
- outlineWidth: DesignToken<OutlineWidthValue>;
63
- outlineOffset: DesignToken<OutlineOffsetValue>;
64
- small: FieldControlSizeTokens;
65
- large: FieldControlSizeTokens;
66
- quiet: FieldControlQuietTokens;
67
- _focus: FieldControlFocusTokens;
68
- _disabled: FieldControlDisabledTokens;
69
- _error: FieldControlErrorTokens;
70
- }
71
- export declare const fieldcontrol: FieldControlTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type FieldControlSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd', Output>;
3
+ declare type FieldControlFocusTokens<Output> = DesignTokenProperties<'borderColor' | 'boxShadow', Output>;
4
+ declare type FieldControlDisabledTokens<Output> = DesignTokenProperties<'color' | 'cursor' | 'borderColor' | 'backgroundColor', Output>;
5
+ declare type FieldControlErrorTokens<Output> = DesignTokenProperties<'borderColor', Output> & {
6
+ _focus?: DesignTokenProperties<'boxShadow', Output>;
7
+ };
8
+ declare type FieldControlQuietTokens<Output> = DesignTokenProperties<'borderStyle' | 'borderInlineStart' | 'borderInlineEnd' | 'borderBlockStart' | 'borderRadius', Output> & {
9
+ _focus?: DesignTokenProperties<'borderBlockEndColor' | 'boxShadow', Output>;
10
+ _error?: DesignTokenProperties<'borderBlockEndColor', Output> & {
11
+ _focus?: DesignTokenProperties<'boxShadow', Output>;
12
+ };
13
+ };
14
+ export declare type FieldControlTokens<Output extends OutputVariantKey> = DesignTokenProperties<'borderStyle' | 'borderColor' | 'borderWidth' | 'borderRadius' | 'color' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'fontSize' | 'lineHeight' | 'transitionDuration' | 'outlineColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset', Output> & {
15
+ small?: FieldControlSizeTokens<Output>;
16
+ large?: FieldControlSizeTokens<Output>;
17
+ quiet?: FieldControlQuietTokens<Output>;
18
+ _focus?: FieldControlFocusTokens<Output>;
19
+ _disabled?: FieldControlDisabledTokens<Output>;
20
+ _error?: FieldControlErrorTokens<Output>;
21
+ };
22
+ export declare const fieldcontrol: Required<FieldControlTokens<'default'>>;
72
23
  export {};
@@ -1,14 +1,6 @@
1
- import { DesignToken, AlignItemsValue, GapValue } from '../types/designToken';
2
- interface FieldGroupVerticalTokens {
3
- alignItems: DesignToken<AlignItemsValue>;
4
- }
5
- interface FieldGroupOuterTokens {
6
- alignItems: DesignToken<AlignItemsValue>;
7
- }
8
- export interface FieldGroupTokens {
9
- gap: DesignToken<GapValue>;
10
- vertical: FieldGroupVerticalTokens;
11
- outer: FieldGroupOuterTokens;
12
- }
13
- export declare const fieldgroup: FieldGroupTokens;
14
- export {};
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ export declare type FieldGroupTokens<Output extends OutputVariantKey> = DesignTokenProperties<'gap', Output> & {
3
+ vertical?: DesignTokenProperties<'alignItems', Output>;
4
+ outer?: DesignTokenProperties<'alignItems', Output>;
5
+ };
6
+ export declare const fieldgroup: Required<FieldGroupTokens<'default'>>;