@juspay/blend-design-system 0.0.19 → 0.0.20

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 (86) hide show
  1. package/dist/components/Accordion/accordion.tokens.d.ts +39 -20
  2. package/dist/components/Alert/alert.tokens.d.ts +63 -4
  3. package/dist/components/Avatar/avatar.tokens.d.ts +64 -53
  4. package/dist/components/Avatar/types.d.ts +1 -0
  5. package/dist/components/AvatarGroup/avatarGroup.tokens.d.ts +41 -67
  6. package/dist/components/Breadcrumb/breadcrumb.tokens.d.ts +26 -16
  7. package/dist/components/Button/Button.d.ts +2 -1
  8. package/dist/components/Button/button.tokens.d.ts +38 -13
  9. package/dist/components/Button/types.d.ts +8 -1
  10. package/dist/components/ButtonGroup/ButtonGroup.d.ts +2 -2
  11. package/dist/components/ButtonGroup/types.d.ts +2 -2
  12. package/dist/components/Card/card.tokens.d.ts +80 -56
  13. package/dist/components/Card/types.d.ts +3 -3
  14. package/dist/components/Card/utils.d.ts +21 -24
  15. package/dist/components/Charts/ChartUtils.d.ts +92 -5
  16. package/dist/components/Charts/DateTimeFormatter.d.ts +151 -0
  17. package/dist/components/Charts/chart.tokens.d.ts +24 -82
  18. package/dist/components/Charts/types.d.ts +14 -5
  19. package/dist/components/Checkbox/checkbox.token.d.ts +41 -68
  20. package/dist/components/DataTable/TableCell/types.d.ts +1 -0
  21. package/dist/components/DateRangePicker/QuickRangeSelector.d.ts +2 -0
  22. package/dist/components/DateRangePicker/TimeSelector.d.ts +2 -0
  23. package/dist/components/DateRangePicker/components/mobile.tokens.d.ts +77 -0
  24. package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +132 -249
  25. package/dist/components/DateRangePicker/utils.d.ts +9 -1
  26. package/dist/components/Drawer/drawer.tokens.d.ts +43 -44
  27. package/dist/components/Drawer/types.d.ts +3 -3
  28. package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +1 -1
  29. package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +55 -16
  30. package/dist/components/Inputs/DropdownInput/types.d.ts +3 -1
  31. package/dist/components/Inputs/MultiValueInput/multiValueInput.tokens.d.ts +55 -12
  32. package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +74 -21
  33. package/dist/components/Inputs/OTPInput/otpInput.tokens.d.ts +48 -12
  34. package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +52 -27
  35. package/dist/components/Inputs/TextArea/textarea.token.d.ts +58 -17
  36. package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +54 -14
  37. package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +72 -16
  38. package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +17 -1
  39. package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +31 -2
  40. package/dist/components/Menu/Menu.d.ts +2 -2
  41. package/dist/components/Menu/MenuItem.d.ts +2 -2
  42. package/dist/components/Menu/SubMenu.d.ts +2 -2
  43. package/dist/components/Menu/menu.tokens.d.ts +46 -26
  44. package/dist/components/Menu/types.d.ts +14 -10
  45. package/dist/components/Menu/utils.d.ts +3 -3
  46. package/dist/components/Modal/modal.tokens.d.ts +59 -33
  47. package/dist/components/Modal/types.d.ts +2 -2
  48. package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
  49. package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
  50. package/dist/components/MultiSelect/multiSelect.tokens.d.ts +72 -28
  51. package/dist/components/MultiSelect/types.d.ts +16 -0
  52. package/dist/components/Popover/PopoverFooter.d.ts +1 -1
  53. package/dist/components/Popover/popover.tokens.d.ts +49 -13
  54. package/dist/components/Popover/types.d.ts +2 -2
  55. package/dist/components/ProgressBar/index.d.ts +0 -1
  56. package/dist/components/ProgressBar/progressbar.tokens.d.ts +54 -41
  57. package/dist/components/Radio/radio.token.d.ts +21 -24
  58. package/dist/components/Sidebar/sidebar.tokens.d.ts +77 -0
  59. package/dist/components/Sidebar/utils.d.ts +3 -2
  60. package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
  61. package/dist/components/SingleSelect/SingleSelectMenu.d.ts +11 -1
  62. package/dist/components/SingleSelect/singleSelect.tokens.d.ts +67 -23
  63. package/dist/components/SingleSelect/types.d.ts +7 -0
  64. package/dist/components/Snackbar/snackbar.tokens.d.ts +51 -25
  65. package/dist/components/StatCard/StatCard.d.ts +1 -1
  66. package/dist/components/StatCard/statcard.tokens.d.ts +51 -66
  67. package/dist/components/StatCard/types.d.ts +10 -3
  68. package/dist/components/Switch/switch.token.d.ts +57 -74
  69. package/dist/components/Tabs/tabs.token.d.ts +62 -40
  70. package/dist/components/Tags/tag.tokens.d.ts +35 -36
  71. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  72. package/dist/components/Tooltip/tooltip.tokens.d.ts +24 -10
  73. package/dist/components/Tooltip/types.d.ts +1 -0
  74. package/dist/components/VirtualList/VirtualList.d.ts +13 -0
  75. package/dist/components/VirtualList/index.d.ts +2 -0
  76. package/dist/components/VirtualList/types.d.ts +27 -0
  77. package/dist/components/VirtualList/utils.d.ts +39 -0
  78. package/dist/context/ThemeContext.d.ts +18 -12
  79. package/dist/context/useComponentToken.d.ts +11 -8
  80. package/dist/main.d.ts +1 -0
  81. package/dist/main.js +31316 -27358
  82. package/dist/tokens/unit.tokens.d.ts +3 -0
  83. package/package.json +1 -1
  84. package/dist/components/Menu/MenuPlayground.d.ts +0 -3
  85. package/dist/components/Menu/MenuPlaygroundComprehensive.d.ts +0 -3
  86. package/dist/components/ProgressBar/utils.d.ts +0 -7
@@ -5,27 +5,60 @@ import { BreakpointType } from '../../breakpoints/breakPoints';
5
5
  type TriggerStates = 'open' | 'closed' | 'hover' | 'focus' | 'error';
6
6
  export type SingleSelectItemStates = 'default' | 'hover' | 'active' | 'focus' | 'focusVisible' | 'disabled' | 'selected';
7
7
  export type SingleSelectTokensType = {
8
+ gap: CSSObject['gap'];
9
+ label: {
10
+ fontSize: CSSObject['fontSize'];
11
+ fontWeight: CSSObject['fontWeight'];
12
+ color: {
13
+ [key in SingleSelectItemStates]: CSSObject['color'];
14
+ };
15
+ };
16
+ subLabel: {
17
+ fontSize: CSSObject['fontSize'];
18
+ fontWeight: CSSObject['fontWeight'];
19
+ color: {
20
+ [key in SingleSelectItemStates]: CSSObject['color'];
21
+ };
22
+ };
23
+ hintText: {
24
+ fontSize: CSSObject['fontSize'];
25
+ fontWeight: CSSObject['fontWeight'];
26
+ color: {
27
+ [key in SingleSelectItemStates]: CSSObject['color'];
28
+ };
29
+ };
30
+ errorMessage: {
31
+ fontSize: CSSObject['fontSize'];
32
+ fontWeight: CSSObject['fontWeight'];
33
+ color: CSSObject['color'];
34
+ };
35
+ required: {
36
+ color: CSSObject['color'];
37
+ };
8
38
  trigger: {
9
39
  height: {
10
- [key in SelectMenuSize]: CSSObject['height'];
11
- };
12
- paddingX: {
13
- [key in SelectMenuSize]: CSSObject['padding'];
40
+ [key in SelectMenuSize]: {
41
+ [key in SelectMenuVariant]: CSSObject['height'];
42
+ };
14
43
  };
15
- paddingY: {
16
- [key in SelectMenuSize]: CSSObject['padding'];
44
+ padding: {
45
+ [key in SelectMenuSize]: {
46
+ [key in SelectMenuVariant]: {
47
+ x: CSSObject['padding'];
48
+ y: CSSObject['padding'];
49
+ };
50
+ };
17
51
  };
18
52
  borderRadius: {
19
- [key in SelectMenuSize]: CSSObject['borderRadius'];
53
+ [key in SelectMenuSize]: {
54
+ [key in SelectMenuVariant]: CSSObject['borderRadius'];
55
+ };
20
56
  };
21
57
  boxShadow: {
22
58
  [key in SelectMenuVariant]: CSSObject['boxShadow'];
23
59
  };
24
60
  backgroundColor: {
25
- container: {
26
- [key in TriggerStates]: CSSObject['backgroundColor'];
27
- };
28
- 'no-container': {
61
+ [key in SelectMenuVariant]: {
29
62
  [key in TriggerStates]: CSSObject['backgroundColor'];
30
63
  };
31
64
  };
@@ -35,14 +68,18 @@ export type SingleSelectTokensType = {
35
68
  };
36
69
  };
37
70
  };
38
- dropdown: {
39
- shadow: CSSObject['boxShadow'];
71
+ menu: {
40
72
  backgroundColor: CSSObject['backgroundColor'];
41
- paddingTop: CSSObject['paddingTop'];
42
- paddingBottom: CSSObject['paddingBottom'];
43
73
  border: CSSObject['border'];
44
- outline: CSSObject['outline'];
45
74
  borderRadius: CSSObject['borderRadius'];
75
+ padding: {
76
+ [key in SelectMenuSize]: {
77
+ [key in SelectMenuVariant]: {
78
+ x: CSSObject['padding'];
79
+ y: CSSObject['padding'];
80
+ };
81
+ };
82
+ };
46
83
  item: {
47
84
  padding: CSSObject['padding'];
48
85
  margin: CSSObject['margin'];
@@ -51,25 +88,32 @@ export type SingleSelectTokensType = {
51
88
  backgroundColor: {
52
89
  [key in SingleSelectItemStates]: CSSObject['backgroundColor'];
53
90
  };
54
- label: {
91
+ optionsLabel: {
55
92
  fontSize: CSSObject['fontSize'];
56
93
  fontWeight: CSSObject['fontWeight'];
57
94
  color: {
58
95
  [key in SingleSelectItemStates]: CSSObject['color'];
59
96
  };
60
97
  };
61
- subLabel: {
98
+ option: {
62
99
  fontSize: CSSObject['fontSize'];
63
100
  fontWeight: CSSObject['fontWeight'];
64
101
  color: {
65
102
  [key in SingleSelectItemStates]: CSSObject['color'];
66
103
  };
67
104
  };
68
- };
69
- seperator: {
70
- color: CSSObject['color'];
71
- height: CSSObject['height'];
72
- margin: CSSObject['margin'];
105
+ description: {
106
+ fontSize: CSSObject['fontSize'];
107
+ fontWeight: CSSObject['fontWeight'];
108
+ color: {
109
+ [key in SingleSelectItemStates]: CSSObject['color'];
110
+ };
111
+ };
112
+ seperator: {
113
+ color: CSSObject['color'];
114
+ height: CSSObject['height'];
115
+ margin: CSSObject['margin'];
116
+ };
73
117
  };
74
118
  };
75
119
  drawer: {
@@ -95,4 +95,11 @@ export type SingleSelectProps = {
95
95
  error?: boolean;
96
96
  errorMessage?: string;
97
97
  fullWidth?: boolean;
98
+ enableVirtualization?: boolean;
99
+ virtualListItemHeight?: number;
100
+ virtualListOverscan?: number;
101
+ onEndReached?: () => void;
102
+ endReachedThreshold?: number;
103
+ hasMore?: boolean;
104
+ loadingComponent?: React.ReactNode;
98
105
  };
@@ -2,6 +2,26 @@ import { CSSObject } from 'styled-components';
2
2
  import { BreakpointType } from '../../breakpoints/breakPoints';
3
3
  import { FoundationTokenType } from '../../tokens/theme.token';
4
4
  import { SnackbarVariant } from './types';
5
+ /**
6
+ * Snackbar Tokens following the pattern: [target].CSSProp.[variant].[state]
7
+ *
8
+ * Structure:
9
+ * - target: container | infoIcon | content | actionButton | crossIcon (defines what element the token applies to)
10
+ * - CSSProp: backgroundColor | borderRadius | padding | color | fontSize | fontWeight | gap | size | minWidth | maxWidth | boxShadow
11
+ * - variant: info | success | warning | error (snackbar variant)
12
+ * - state: default (no interactive states for snackbar)
13
+ *
14
+ * Pattern examples:
15
+ * - container.backgroundColor
16
+ * - container.borderRadius
17
+ * - container.padding
18
+ * - infoIcon.color.[variant]
19
+ * - infoIcon.size.[variant]
20
+ * - content.textContainer.header.color
21
+ * - content.textContainer.description.color
22
+ * - content.actionButton.color
23
+ * - crossIcon.color
24
+ */
5
25
  export type SnackbarTokens = Readonly<{
6
26
  backgroundColor: CSSObject['backgroundColor'];
7
27
  borderRadius: CSSObject['borderRadius'];
@@ -10,40 +30,46 @@ export type SnackbarTokens = Readonly<{
10
30
  maxWidth: CSSObject['maxWidth'];
11
31
  boxShadow: CSSObject['boxShadow'];
12
32
  gap: CSSObject['gap'];
13
- container: {
14
- gap: CSSObject['gap'];
15
- infoIcon: {
16
- [key in SnackbarVariant]: {
17
- color: CSSObject['color'];
18
- size: CSSObject['size'];
19
- };
33
+ infoIcon: {
34
+ color: {
35
+ [key in SnackbarVariant]: CSSObject['color'];
20
36
  };
21
- content: {
37
+ height: CSSObject['height' | 'width'];
38
+ };
39
+ content: {
40
+ gap: CSSObject['gap'];
41
+ textContainer: {
22
42
  gap: CSSObject['gap'];
23
- textContainer: {
24
- gap: CSSObject['gap'];
25
- header: {
26
- color: CSSObject['color'];
27
- fontSize: CSSObject['fontSize'];
28
- fontWeight: CSSObject['fontWeight'];
29
- };
30
- description: {
31
- color: CSSObject['color'];
32
- fontSize: CSSObject['fontSize'];
33
- fontWeight: CSSObject['fontWeight'];
43
+ header: {
44
+ color: {
45
+ [key in SnackbarVariant]: CSSObject['color'];
34
46
  };
47
+ fontSize: CSSObject['fontSize'];
48
+ fontWeight: CSSObject['fontWeight'];
35
49
  };
36
- actionButton: {
37
- padding: CSSObject['padding'];
38
- color: CSSObject['color'];
50
+ description: {
51
+ color: {
52
+ [key in SnackbarVariant]: CSSObject['color'];
53
+ };
39
54
  fontSize: CSSObject['fontSize'];
40
55
  fontWeight: CSSObject['fontWeight'];
41
56
  };
42
57
  };
43
58
  };
44
- crossIcon: {
45
- size: CSSObject['fontSize'];
46
- color: CSSObject['color'];
59
+ actions: {
60
+ primaryAction: {
61
+ color: {
62
+ [key in SnackbarVariant]: CSSObject['color'];
63
+ };
64
+ fontSize: CSSObject['fontSize'];
65
+ fontWeight: CSSObject['fontWeight'];
66
+ };
67
+ closeButton: {
68
+ height: CSSObject['height' | 'width'];
69
+ color: {
70
+ [key in SnackbarVariant]: CSSObject['color'];
71
+ };
72
+ };
47
73
  };
48
74
  }>;
49
75
  export type ResponsiveSnackbarTokens = {
@@ -1,6 +1,6 @@
1
1
  import { StatCardProps } from './types';
2
2
  declare const StatCard: {
3
- ({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, maxWidth, xAxis, yAxis, valueFormatter, height, }: StatCardProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, maxWidth, xAxis, yAxis, valueFormatter, height, direction, }: StatCardProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default StatCard;
@@ -6,65 +6,59 @@ export type StatCardState = 'default' | 'hover' | 'loading';
6
6
  export type StatCardTokenType = {
7
7
  height: CSSObject['height'];
8
8
  maxWidth: CSSObject['maxWidth'];
9
- border: {
10
- [key in StatCardState]?: CSSObject['border'];
11
- };
9
+ border: CSSObject['border'];
12
10
  borderRadius: CSSObject['borderRadius'];
13
- backgroundColor: {
14
- [key in StatCardState]?: CSSObject['backgroundColor'];
15
- };
11
+ backgroundColor: CSSObject['backgroundColor'];
16
12
  boxShadow: CSSObject['boxShadow'];
17
- padding: CSSObject['padding'];
18
- gap: CSSObject['gap'];
19
- header: {
20
- gap: CSSObject['gap'];
21
- titleIcon: {
22
- width: CSSObject['width'];
23
- height: CSSObject['height'];
24
- margin: CSSObject['margin'];
25
- };
26
- title: {
27
- [key in StatCardVariant]: {
28
- fontSize: CSSObject['fontSize'];
29
- fontWeight: CSSObject['fontWeight'];
30
- color: CSSObject['color'];
31
- };
32
- };
33
- helpIcon: {
34
- width: CSSObject['width'];
35
- height: CSSObject['height'];
36
- color: CSSObject['color'];
37
- };
38
- };
39
- headerStatGap: {
40
- gap: CSSObject['gap'];
13
+ padding: {
14
+ x: CSSObject['padding'];
15
+ y: CSSObject['padding'];
41
16
  };
42
- stats: {
17
+ textContainer: {
43
18
  gap: CSSObject['gap'];
44
- value: {
45
- [key in StatCardVariant]: {
19
+ header: {
20
+ gap: CSSObject['gap'];
21
+ title: {
46
22
  fontSize: CSSObject['fontSize'];
47
23
  fontWeight: CSSObject['fontWeight'];
48
24
  color: CSSObject['color'];
49
25
  };
50
- };
51
- change: {
52
- margin: CSSObject['margin'];
53
- arrow: {
26
+ titleIcon: {
54
27
  width: CSSObject['width'];
55
- height: CSSObject['height'];
56
- margin: CSSObject['margin'];
57
28
  };
58
- text: {
59
- [key in ChangeType]: {
60
- fontSize: CSSObject['fontSize'];
61
- fontWeight: CSSObject['fontWeight'];
62
- color: CSSObject['color'];
29
+ helpIcon: {
30
+ width: CSSObject['width'];
31
+ color: {
32
+ [key in StatCardState]: CSSObject['color'];
63
33
  };
64
34
  };
65
35
  };
66
- subtitle: {
67
- [key in StatCardVariant]: {
36
+ stats: {
37
+ gap: CSSObject['gap'];
38
+ title: {
39
+ gap: CSSObject['gap'];
40
+ value: {
41
+ [key in StatCardVariant]: {
42
+ fontSize: CSSObject['fontSize'];
43
+ fontWeight: CSSObject['fontWeight'];
44
+ color: CSSObject['color'];
45
+ };
46
+ };
47
+ change: {
48
+ margin: CSSObject['margin'];
49
+ arrow: {
50
+ width: CSSObject['width'];
51
+ };
52
+ text: {
53
+ fontSize: CSSObject['fontSize'];
54
+ fontWeight: CSSObject['fontWeight'];
55
+ color: {
56
+ [key in ChangeType]: CSSObject['color'];
57
+ };
58
+ };
59
+ };
60
+ };
61
+ subtitle: {
68
62
  fontSize: CSSObject['fontSize'];
69
63
  fontWeight: CSSObject['fontWeight'];
70
64
  color: CSSObject['color'];
@@ -91,7 +85,7 @@ export type StatCardTokenType = {
91
85
  line: {
92
86
  strokeWidth: CSSObject['strokeWidth'];
93
87
  activeDot: {
94
- borderRadius: CSSObject['borderRadius'];
88
+ width: CSSObject['width'];
95
89
  fill: CSSObject['fill'];
96
90
  };
97
91
  };
@@ -100,9 +94,8 @@ export type StatCardTokenType = {
100
94
  borderTopLeftRadius: CSSObject['borderTopLeftRadius'];
101
95
  borderBottomRightRadius: CSSObject['borderBottomRightRadius'];
102
96
  borderBottomLeftRadius: CSSObject['borderBottomLeftRadius'];
103
- fill: CSSObject['fill'];
104
- activeBar: {
105
- fill: CSSObject['fill'];
97
+ fill: {
98
+ [key in StatCardState]: CSSObject['fill'];
106
99
  };
107
100
  };
108
101
  progressBar: {
@@ -124,23 +117,15 @@ export type StatCardTokenType = {
124
117
  };
125
118
  };
126
119
  tooltip: {
127
- cursor: {
128
- strokeDasharray: string;
129
- stroke: CSSObject['stroke'];
130
- };
131
- container: {
132
- backgroundColor: CSSObject['backgroundColor'];
133
- padding: CSSObject['padding'];
134
- borderRadius: CSSObject['borderRadius'];
135
- };
136
- text: {
137
- color: CSSObject['color'];
138
- };
139
- bar: {
140
- cursor: {
141
- fill: CSSObject['fill'];
142
- };
120
+ backgroundColor: CSSObject['backgroundColor'];
121
+ padding: {
122
+ x: CSSObject['padding'];
123
+ y: CSSObject['padding'];
143
124
  };
125
+ borderRadius: CSSObject['borderRadius'];
126
+ color: CSSObject['color'];
127
+ fontSize: CSSObject['fontSize'];
128
+ fontWeight: CSSObject['fontWeight'];
144
129
  };
145
130
  };
146
131
  };
@@ -20,13 +20,19 @@ export type StatCardChange = {
20
20
  valueType: ChangeType;
21
21
  tooltip?: ReactNode;
22
22
  };
23
+ export declare enum StatCardDirection {
24
+ VERTICAL = "vertical",
25
+ HORIZONTAL = "horizontal"
26
+ }
23
27
  export type StatCardAxisConfig = {
24
28
  type?: AxisType;
25
29
  tickFormatter?: (value: string | number) => string;
26
30
  dateOnly?: boolean;
27
- smart?: boolean;
28
- timeZone?: string;
29
- hour12?: boolean;
31
+ useUTC?: boolean;
32
+ formatString?: string;
33
+ timeOnly?: boolean;
34
+ showYear?: boolean;
35
+ smartDateTimeFormat?: boolean;
30
36
  };
31
37
  export type StatCardProps = {
32
38
  title: string;
@@ -46,4 +52,5 @@ export type StatCardProps = {
46
52
  yAxis?: StatCardAxisConfig;
47
53
  valueFormatter?: AxisType;
48
54
  height?: string;
55
+ direction?: StatCardDirection;
49
56
  };
@@ -3,48 +3,58 @@ import { ThemeType } from '../../tokens';
3
3
  import { SwitchSize } from './types';
4
4
  import { BreakpointType } from '../../breakpoints/breakPoints';
5
5
  export type SwitchState = 'default' | 'hover' | 'disabled' | 'error';
6
- export type SwitchIndicatorState = 'active' | 'inactive';
6
+ export type SwitchVariant = 'active' | 'inactive';
7
+ /**
8
+ * Switch Tokens following the design system pattern
9
+ *
10
+ * Structure aligned with Checkbox and Radio components:
11
+ * - switchContainer: Main switch element properties
12
+ * - content: Text and subtext styling
13
+ * - slot: Slot element styling
14
+ * - required: Required indicator styling
15
+ */
7
16
  export type SwitchTokensType = {
8
17
  gap: CSSObject['gap'];
9
- slotGap: CSSObject['gap'];
10
- contentGap: CSSObject['gap'];
11
- height: {
12
- [key in SwitchSize]: CSSObject['height'];
13
- };
14
- width: {
15
- [key in SwitchSize]: CSSObject['width'];
16
- };
17
- borderRadius: {
18
- base: CSSObject['borderRadius'];
19
- thumb: CSSObject['borderRadius'];
20
- };
21
- indicator: {
22
- [key in SwitchIndicatorState]: {
23
- background: {
24
- [key in Exclude<SwitchState, 'error'>]: CSSObject['backgroundColor'];
18
+ switchContainer: {
19
+ height: {
20
+ [key in SwitchSize]: CSSObject['height'];
21
+ };
22
+ width: {
23
+ [key in SwitchSize]: CSSObject['width'];
24
+ };
25
+ borderRadius: {
26
+ [key in SwitchSize]: CSSObject['borderRadius'];
27
+ };
28
+ backgroundColor: {
29
+ [key in SwitchVariant]: {
30
+ [key in SwitchState]: CSSObject['backgroundColor'];
25
31
  };
32
+ };
33
+ thumb: {
34
+ marginTop: CSSObject['marginTop'];
35
+ backgroundColor: CSSObject['backgroundColor'];
26
36
  border: {
27
- [key in Exclude<SwitchState, 'error'>]: CSSObject['borderColor'];
37
+ color: CSSObject['borderColor'];
38
+ width: CSSObject['borderWidth'];
28
39
  };
29
- };
30
- };
31
- thumb: {
32
- background: CSSObject['backgroundColor'];
33
- border: {
34
- color: CSSObject['borderColor'];
35
- width: CSSObject['borderWidth'];
36
- };
37
- size: {
38
- [key in SwitchSize]: {
39
- width: CSSObject['width'];
40
- height: CSSObject['height'];
41
- top: CSSObject['top'];
42
- left: CSSObject['left'];
43
- offset: {
44
- active: CSSObject['left'];
45
- inactive: CSSObject['left'];
40
+ borderRadius: {
41
+ [key in SwitchSize]: CSSObject['borderRadius'];
42
+ };
43
+ size: {
44
+ [key in SwitchSize]: {
45
+ width: CSSObject['width'];
46
+ height: CSSObject['height'];
47
+ top: CSSObject['top'];
48
+ left: CSSObject['left'];
49
+ offset: {
50
+ active: CSSObject['left'];
51
+ inactive: CSSObject['left'];
52
+ };
46
53
  };
47
54
  };
55
+ outline: CSSObject['outline'];
56
+ outlineOffset: CSSObject['outlineOffset'];
57
+ boxShadow: CSSObject['boxShadow'];
48
58
  };
49
59
  };
50
60
  content: {
@@ -52,56 +62,29 @@ export type SwitchTokensType = {
52
62
  color: {
53
63
  [key in SwitchState]: CSSObject['color'];
54
64
  };
55
- font: {
56
- [key in SwitchSize]: {
57
- fontSize: CSSObject['fontSize'];
58
- fontWeight: CSSObject['fontWeight'];
59
- };
65
+ fontSize: {
66
+ [key in SwitchSize]: CSSObject['fontSize'];
67
+ };
68
+ fontWeight: {
69
+ [key in SwitchSize]: CSSObject['fontWeight'];
60
70
  };
71
+ gap: CSSObject['gap'];
61
72
  };
62
- sublabel: {
73
+ subtext: {
63
74
  color: {
64
75
  [key in SwitchState]: CSSObject['color'];
65
76
  };
66
- font: {
67
- [key in SwitchSize]: {
68
- fontSize: CSSObject['fontSize'];
69
- fontWeight: CSSObject['fontWeight'];
70
- };
77
+ fontSize: {
78
+ [key in SwitchSize]: CSSObject['fontSize'];
71
79
  };
72
- spacing: {
73
- left: {
74
- [key in SwitchSize]: CSSObject['marginLeft'];
75
- };
76
- top: CSSObject['marginTop'];
80
+ fontWeight: {
81
+ [key in SwitchSize]: CSSObject['fontWeight'];
77
82
  };
78
83
  };
79
- };
80
- borderWidth: {
81
- [key in SwitchIndicatorState]: {
82
- [key in Exclude<SwitchState, 'error'>]: number;
83
- };
84
- };
85
- focus: {
86
- outline: {
87
- width: CSSObject['borderWidth'];
88
- color: CSSObject['borderColor'];
89
- offset: CSSObject['outlineOffset'];
90
- };
91
- };
92
- slot: {
93
- size: {
94
- [key in SwitchSize]: CSSObject['width'];
95
- };
96
- spacing: CSSObject['margin'];
84
+ gap: CSSObject['gap'];
97
85
  };
98
86
  required: {
99
87
  color: CSSObject['color'];
100
- spacing: CSSObject['margin'];
101
- };
102
- transition: {
103
- duration: CSSObject['transitionDuration'];
104
- easing: CSSObject['transitionTimingFunction'];
105
88
  };
106
89
  };
107
90
  export type ResponsiveSwitchTokens = {