@zendeskgarden/react-theming 8.69.2 → 8.69.4
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/typings/elements/ThemeProvider.d.ts +14 -14
- package/dist/typings/elements/palette/index.d.ts +150 -150
- package/dist/typings/elements/theme/index.d.ts +10 -10
- package/dist/typings/index.d.ts +26 -27
- package/dist/typings/types/index.d.ts +127 -127
- package/dist/typings/utils/arrowStyles.d.ts +62 -62
- package/dist/typings/utils/focusStyles.d.ts +47 -47
- package/dist/typings/utils/getColor.d.ts +25 -25
- package/dist/typings/utils/getDocument.d.ts +9 -9
- package/dist/typings/utils/getFocusBoxShadow.d.ts +37 -37
- package/dist/typings/utils/getLineHeight.d.ts +15 -15
- package/dist/typings/utils/isRtl.d.ts +9 -9
- package/dist/typings/utils/mediaQuery.d.ts +24 -24
- package/dist/typings/utils/menuStyles.d.ts +37 -37
- package/dist/typings/utils/retrieveComponentStyles.d.ts +9 -9
- package/dist/typings/utils/useDocument.d.ts +8 -8
- package/dist/typings/utils/useText.d.ts +19 -19
- package/dist/typings/utils/useWindow.d.ts +8 -8
- package/dist/typings/utils/withTheme.d.ts +8 -8
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React, { PropsWithChildren } from 'react';
|
|
8
|
-
import { IThemeProviderProps } from '../types';
|
|
9
|
-
export declare const ThemeProvider: {
|
|
10
|
-
({ theme, focusVisibleRef, children, ...other }: PropsWithChildren<IThemeProviderProps>): React.JSX.Element;
|
|
11
|
-
defaultProps: {
|
|
12
|
-
theme: import("../types").IGardenTheme;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React, { PropsWithChildren } from 'react';
|
|
8
|
+
import { IThemeProviderProps } from '../types';
|
|
9
|
+
export declare const ThemeProvider: {
|
|
10
|
+
({ theme, focusVisibleRef, children, ...other }: PropsWithChildren<IThemeProviderProps>): React.JSX.Element;
|
|
11
|
+
defaultProps: {
|
|
12
|
+
theme: import("../types").IGardenTheme;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
/** @ignore */
|
|
8
|
-
declare const PALETTE: {
|
|
9
|
-
black: string;
|
|
10
|
-
white: string;
|
|
11
|
-
product: {
|
|
12
|
-
support: string;
|
|
13
|
-
message: string;
|
|
14
|
-
explore: string;
|
|
15
|
-
gather: string;
|
|
16
|
-
guide: string;
|
|
17
|
-
connect: string;
|
|
18
|
-
chat: string;
|
|
19
|
-
talk: string;
|
|
20
|
-
sell: string;
|
|
21
|
-
};
|
|
22
|
-
grey: {
|
|
23
|
-
100: string;
|
|
24
|
-
200: string;
|
|
25
|
-
300: string;
|
|
26
|
-
400: string;
|
|
27
|
-
500: string;
|
|
28
|
-
600: string;
|
|
29
|
-
700: string;
|
|
30
|
-
800: string;
|
|
31
|
-
};
|
|
32
|
-
blue: {
|
|
33
|
-
100: string;
|
|
34
|
-
200: string;
|
|
35
|
-
300: string;
|
|
36
|
-
400: string;
|
|
37
|
-
500: string;
|
|
38
|
-
600: string;
|
|
39
|
-
700: string;
|
|
40
|
-
800: string;
|
|
41
|
-
};
|
|
42
|
-
red: {
|
|
43
|
-
100: string;
|
|
44
|
-
200: string;
|
|
45
|
-
300: string;
|
|
46
|
-
400: string;
|
|
47
|
-
500: string;
|
|
48
|
-
600: string;
|
|
49
|
-
700: string;
|
|
50
|
-
800: string;
|
|
51
|
-
};
|
|
52
|
-
yellow: {
|
|
53
|
-
100: string;
|
|
54
|
-
200: string;
|
|
55
|
-
300: string;
|
|
56
|
-
400: string;
|
|
57
|
-
500: string;
|
|
58
|
-
600: string;
|
|
59
|
-
700: string;
|
|
60
|
-
800: string;
|
|
61
|
-
};
|
|
62
|
-
green: {
|
|
63
|
-
100: string;
|
|
64
|
-
200: string;
|
|
65
|
-
300: string;
|
|
66
|
-
400: string;
|
|
67
|
-
500: string;
|
|
68
|
-
600: string;
|
|
69
|
-
700: string;
|
|
70
|
-
800: string;
|
|
71
|
-
};
|
|
72
|
-
kale: {
|
|
73
|
-
100: string;
|
|
74
|
-
200: string;
|
|
75
|
-
300: string;
|
|
76
|
-
400: string;
|
|
77
|
-
500: string;
|
|
78
|
-
600: string;
|
|
79
|
-
700: string;
|
|
80
|
-
800: string;
|
|
81
|
-
};
|
|
82
|
-
fuschia: {
|
|
83
|
-
400: string;
|
|
84
|
-
600: string;
|
|
85
|
-
M400: string;
|
|
86
|
-
M600: string;
|
|
87
|
-
};
|
|
88
|
-
pink: {
|
|
89
|
-
400: string;
|
|
90
|
-
600: string;
|
|
91
|
-
M400: string;
|
|
92
|
-
M600: string;
|
|
93
|
-
};
|
|
94
|
-
crimson: {
|
|
95
|
-
400: string;
|
|
96
|
-
600: string;
|
|
97
|
-
M400: string;
|
|
98
|
-
M600: string;
|
|
99
|
-
};
|
|
100
|
-
orange: {
|
|
101
|
-
400: string;
|
|
102
|
-
600: string;
|
|
103
|
-
M400: string;
|
|
104
|
-
M600: string;
|
|
105
|
-
};
|
|
106
|
-
lemon: {
|
|
107
|
-
400: string;
|
|
108
|
-
600: string;
|
|
109
|
-
M400: string;
|
|
110
|
-
M600: string;
|
|
111
|
-
};
|
|
112
|
-
lime: {
|
|
113
|
-
400: string;
|
|
114
|
-
600: string;
|
|
115
|
-
M400: string;
|
|
116
|
-
M600: string;
|
|
117
|
-
};
|
|
118
|
-
mint: {
|
|
119
|
-
400: string;
|
|
120
|
-
600: string;
|
|
121
|
-
M400: string;
|
|
122
|
-
M600: string;
|
|
123
|
-
};
|
|
124
|
-
teal: {
|
|
125
|
-
400: string;
|
|
126
|
-
600: string;
|
|
127
|
-
M400: string;
|
|
128
|
-
M600: string;
|
|
129
|
-
};
|
|
130
|
-
azure: {
|
|
131
|
-
400: string;
|
|
132
|
-
600: string;
|
|
133
|
-
M400: string;
|
|
134
|
-
M600: string;
|
|
135
|
-
};
|
|
136
|
-
royal: {
|
|
137
|
-
400: string;
|
|
138
|
-
600: string;
|
|
139
|
-
M400: string;
|
|
140
|
-
M600: string;
|
|
141
|
-
};
|
|
142
|
-
purple: {
|
|
143
|
-
400: string;
|
|
144
|
-
600: string;
|
|
145
|
-
M400: string;
|
|
146
|
-
M600: string;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
/** @component */
|
|
150
|
-
export default PALETTE;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
/** @ignore */
|
|
8
|
+
declare const PALETTE: {
|
|
9
|
+
black: string;
|
|
10
|
+
white: string;
|
|
11
|
+
product: {
|
|
12
|
+
support: string;
|
|
13
|
+
message: string;
|
|
14
|
+
explore: string;
|
|
15
|
+
gather: string;
|
|
16
|
+
guide: string;
|
|
17
|
+
connect: string;
|
|
18
|
+
chat: string;
|
|
19
|
+
talk: string;
|
|
20
|
+
sell: string;
|
|
21
|
+
};
|
|
22
|
+
grey: {
|
|
23
|
+
100: string;
|
|
24
|
+
200: string;
|
|
25
|
+
300: string;
|
|
26
|
+
400: string;
|
|
27
|
+
500: string;
|
|
28
|
+
600: string;
|
|
29
|
+
700: string;
|
|
30
|
+
800: string;
|
|
31
|
+
};
|
|
32
|
+
blue: {
|
|
33
|
+
100: string;
|
|
34
|
+
200: string;
|
|
35
|
+
300: string;
|
|
36
|
+
400: string;
|
|
37
|
+
500: string;
|
|
38
|
+
600: string;
|
|
39
|
+
700: string;
|
|
40
|
+
800: string;
|
|
41
|
+
};
|
|
42
|
+
red: {
|
|
43
|
+
100: string;
|
|
44
|
+
200: string;
|
|
45
|
+
300: string;
|
|
46
|
+
400: string;
|
|
47
|
+
500: string;
|
|
48
|
+
600: string;
|
|
49
|
+
700: string;
|
|
50
|
+
800: string;
|
|
51
|
+
};
|
|
52
|
+
yellow: {
|
|
53
|
+
100: string;
|
|
54
|
+
200: string;
|
|
55
|
+
300: string;
|
|
56
|
+
400: string;
|
|
57
|
+
500: string;
|
|
58
|
+
600: string;
|
|
59
|
+
700: string;
|
|
60
|
+
800: string;
|
|
61
|
+
};
|
|
62
|
+
green: {
|
|
63
|
+
100: string;
|
|
64
|
+
200: string;
|
|
65
|
+
300: string;
|
|
66
|
+
400: string;
|
|
67
|
+
500: string;
|
|
68
|
+
600: string;
|
|
69
|
+
700: string;
|
|
70
|
+
800: string;
|
|
71
|
+
};
|
|
72
|
+
kale: {
|
|
73
|
+
100: string;
|
|
74
|
+
200: string;
|
|
75
|
+
300: string;
|
|
76
|
+
400: string;
|
|
77
|
+
500: string;
|
|
78
|
+
600: string;
|
|
79
|
+
700: string;
|
|
80
|
+
800: string;
|
|
81
|
+
};
|
|
82
|
+
fuschia: {
|
|
83
|
+
400: string;
|
|
84
|
+
600: string;
|
|
85
|
+
M400: string;
|
|
86
|
+
M600: string;
|
|
87
|
+
};
|
|
88
|
+
pink: {
|
|
89
|
+
400: string;
|
|
90
|
+
600: string;
|
|
91
|
+
M400: string;
|
|
92
|
+
M600: string;
|
|
93
|
+
};
|
|
94
|
+
crimson: {
|
|
95
|
+
400: string;
|
|
96
|
+
600: string;
|
|
97
|
+
M400: string;
|
|
98
|
+
M600: string;
|
|
99
|
+
};
|
|
100
|
+
orange: {
|
|
101
|
+
400: string;
|
|
102
|
+
600: string;
|
|
103
|
+
M400: string;
|
|
104
|
+
M600: string;
|
|
105
|
+
};
|
|
106
|
+
lemon: {
|
|
107
|
+
400: string;
|
|
108
|
+
600: string;
|
|
109
|
+
M400: string;
|
|
110
|
+
M600: string;
|
|
111
|
+
};
|
|
112
|
+
lime: {
|
|
113
|
+
400: string;
|
|
114
|
+
600: string;
|
|
115
|
+
M400: string;
|
|
116
|
+
M600: string;
|
|
117
|
+
};
|
|
118
|
+
mint: {
|
|
119
|
+
400: string;
|
|
120
|
+
600: string;
|
|
121
|
+
M400: string;
|
|
122
|
+
M600: string;
|
|
123
|
+
};
|
|
124
|
+
teal: {
|
|
125
|
+
400: string;
|
|
126
|
+
600: string;
|
|
127
|
+
M400: string;
|
|
128
|
+
M600: string;
|
|
129
|
+
};
|
|
130
|
+
azure: {
|
|
131
|
+
400: string;
|
|
132
|
+
600: string;
|
|
133
|
+
M400: string;
|
|
134
|
+
M600: string;
|
|
135
|
+
};
|
|
136
|
+
royal: {
|
|
137
|
+
400: string;
|
|
138
|
+
600: string;
|
|
139
|
+
M400: string;
|
|
140
|
+
M600: string;
|
|
141
|
+
};
|
|
142
|
+
purple: {
|
|
143
|
+
400: string;
|
|
144
|
+
600: string;
|
|
145
|
+
M400: string;
|
|
146
|
+
M600: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/** @component */
|
|
150
|
+
export default PALETTE;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { IGardenTheme } from '../../types';
|
|
8
|
-
declare const DEFAULT_THEME: IGardenTheme;
|
|
9
|
-
/** @component */
|
|
10
|
-
export default DEFAULT_THEME;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { IGardenTheme } from '../../types';
|
|
8
|
+
declare const DEFAULT_THEME: IGardenTheme;
|
|
9
|
+
/** @component */
|
|
10
|
+
export default DEFAULT_THEME;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export { ThemeProvider } from './elements/ThemeProvider';
|
|
8
|
-
export { default as DEFAULT_THEME } from './elements/theme';
|
|
9
|
-
export { default as PALETTE } from './elements/palette';
|
|
10
|
-
export { default as isRtl } from './utils/isRtl';
|
|
11
|
-
export { default as retrieveComponentStyles,
|
|
12
|
-
/** `retrieveTheme` is a deprecated usage for v7 compatability */
|
|
13
|
-
default as retrieveTheme } from './utils/retrieveComponentStyles';
|
|
14
|
-
export { default as withTheme } from './utils/withTheme';
|
|
15
|
-
export { default as getDocument } from './utils/getDocument';
|
|
16
|
-
export { getColor } from './utils/getColor';
|
|
17
|
-
export { getFocusBoxShadow } from './utils/getFocusBoxShadow';
|
|
18
|
-
export { default as getLineHeight } from './utils/getLineHeight';
|
|
19
|
-
export { default as mediaQuery } from './utils/mediaQuery';
|
|
20
|
-
export { default as arrowStyles } from './utils/arrowStyles';
|
|
21
|
-
export { useDocument } from './utils/useDocument';
|
|
22
|
-
export { useWindow } from './utils/useWindow';
|
|
23
|
-
export { useText } from './utils/useText';
|
|
24
|
-
export { default as menuStyles } from './utils/menuStyles';
|
|
25
|
-
export { focusStyles, SELECTOR_FOCUS_VISIBLE } from './utils/focusStyles';
|
|
26
|
-
export { ARROW_POSITION as ARRAY_ARROW_POSITION, MENU_POSITION as ARRAY_MENU_POSITION } from './types';
|
|
27
|
-
export type { IGardenTheme, IThemeProviderProps, ArrowPosition as ARROW_POSITION, MenuPosition as MENU_POSITION } from './types';
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export { ThemeProvider } from './elements/ThemeProvider';
|
|
8
|
+
export { default as DEFAULT_THEME } from './elements/theme';
|
|
9
|
+
export { default as PALETTE } from './elements/palette';
|
|
10
|
+
export { default as isRtl } from './utils/isRtl';
|
|
11
|
+
export { default as retrieveComponentStyles,
|
|
12
|
+
/** `retrieveTheme` is a deprecated usage for v7 compatability */
|
|
13
|
+
default as retrieveTheme } from './utils/retrieveComponentStyles';
|
|
14
|
+
export { default as withTheme } from './utils/withTheme';
|
|
15
|
+
export { default as getDocument } from './utils/getDocument';
|
|
16
|
+
export { getColor } from './utils/getColor';
|
|
17
|
+
export { getFocusBoxShadow } from './utils/getFocusBoxShadow';
|
|
18
|
+
export { default as getLineHeight } from './utils/getLineHeight';
|
|
19
|
+
export { default as mediaQuery } from './utils/mediaQuery';
|
|
20
|
+
export { default as arrowStyles } from './utils/arrowStyles';
|
|
21
|
+
export { useDocument } from './utils/useDocument';
|
|
22
|
+
export { useWindow } from './utils/useWindow';
|
|
23
|
+
export { useText } from './utils/useText';
|
|
24
|
+
export { default as menuStyles } from './utils/menuStyles';
|
|
25
|
+
export { focusStyles, SELECTOR_FOCUS_VISIBLE } from './utils/focusStyles';
|
|
26
|
+
export { ARROW_POSITION as ARRAY_ARROW_POSITION, MENU_POSITION as ARRAY_MENU_POSITION, type IGardenTheme, type IThemeProviderProps, type ArrowPosition as ARROW_POSITION, type MenuPosition as MENU_POSITION } from './types';
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
|
-
import { ThemeProps } from 'styled-components';
|
|
9
|
-
export declare const ARROW_POSITION: readonly ["top", "top-left", "top-right", "right", "right-top", "right-bottom", "bottom", "bottom-left", "bottom-right", "left", "left-top", "left-bottom"];
|
|
10
|
-
export type ArrowPosition = (typeof ARROW_POSITION)[number];
|
|
11
|
-
export declare const MENU_POSITION: readonly ["top", "right", "bottom", "left"];
|
|
12
|
-
export type MenuPosition = (typeof MENU_POSITION)[number];
|
|
13
|
-
type Hue = Record<number | string, string> | string;
|
|
14
|
-
export interface IGardenTheme {
|
|
15
|
-
rtl: boolean;
|
|
16
|
-
document?: any;
|
|
17
|
-
window?: any;
|
|
18
|
-
borders: {
|
|
19
|
-
sm: string;
|
|
20
|
-
md: string;
|
|
21
|
-
};
|
|
22
|
-
borderRadii: {
|
|
23
|
-
sm: string;
|
|
24
|
-
md: string;
|
|
25
|
-
};
|
|
26
|
-
borderStyles: {
|
|
27
|
-
solid: string;
|
|
28
|
-
};
|
|
29
|
-
borderWidths: {
|
|
30
|
-
sm: string;
|
|
31
|
-
md: string;
|
|
32
|
-
};
|
|
33
|
-
breakpoints: {
|
|
34
|
-
xs: string;
|
|
35
|
-
sm: string;
|
|
36
|
-
md: string;
|
|
37
|
-
lg: string;
|
|
38
|
-
xl: string;
|
|
39
|
-
};
|
|
40
|
-
colors: {
|
|
41
|
-
base: 'light' | 'dark';
|
|
42
|
-
background: string;
|
|
43
|
-
foreground: string;
|
|
44
|
-
primaryHue: string;
|
|
45
|
-
dangerHue: string;
|
|
46
|
-
warningHue: string;
|
|
47
|
-
successHue: string;
|
|
48
|
-
neutralHue: string;
|
|
49
|
-
chromeHue: string;
|
|
50
|
-
};
|
|
51
|
-
components: Record<string, any>;
|
|
52
|
-
fonts: {
|
|
53
|
-
mono: string;
|
|
54
|
-
system: string;
|
|
55
|
-
};
|
|
56
|
-
fontSizes: {
|
|
57
|
-
xs: string;
|
|
58
|
-
sm: string;
|
|
59
|
-
md: string;
|
|
60
|
-
lg: string;
|
|
61
|
-
xl: string;
|
|
62
|
-
xxl: string;
|
|
63
|
-
xxxl: string;
|
|
64
|
-
};
|
|
65
|
-
fontWeights: {
|
|
66
|
-
thin: number;
|
|
67
|
-
extralight: number;
|
|
68
|
-
light: number;
|
|
69
|
-
regular: number;
|
|
70
|
-
medium: number;
|
|
71
|
-
semibold: number;
|
|
72
|
-
bold: number;
|
|
73
|
-
extrabold: number;
|
|
74
|
-
black: number;
|
|
75
|
-
};
|
|
76
|
-
iconSizes: {
|
|
77
|
-
sm: string;
|
|
78
|
-
md: string;
|
|
79
|
-
lg: string;
|
|
80
|
-
};
|
|
81
|
-
lineHeights: {
|
|
82
|
-
sm: string;
|
|
83
|
-
md: string;
|
|
84
|
-
lg: string;
|
|
85
|
-
xl: string;
|
|
86
|
-
xxl: string;
|
|
87
|
-
xxxl: string;
|
|
88
|
-
};
|
|
89
|
-
shadowWidths: {
|
|
90
|
-
xs: string;
|
|
91
|
-
sm: string;
|
|
92
|
-
md: string;
|
|
93
|
-
};
|
|
94
|
-
shadows: {
|
|
95
|
-
xs: (color: string) => string;
|
|
96
|
-
sm: (color: string) => string;
|
|
97
|
-
md: (color: string) => string;
|
|
98
|
-
lg: (offsetY: string, blurRadius: string, color: string) => string;
|
|
99
|
-
};
|
|
100
|
-
space: {
|
|
101
|
-
base: number;
|
|
102
|
-
xxs: string;
|
|
103
|
-
xs: string;
|
|
104
|
-
sm: string;
|
|
105
|
-
md: string;
|
|
106
|
-
lg: string;
|
|
107
|
-
xl: string;
|
|
108
|
-
xxl: string;
|
|
109
|
-
};
|
|
110
|
-
palette: Record<string, Hue>;
|
|
111
|
-
}
|
|
112
|
-
export interface IThemeProviderProps extends Partial<ThemeProps<IGardenTheme>> {
|
|
113
|
-
/**
|
|
114
|
-
* Provides values for component styling. See styled-components
|
|
115
|
-
* [`ThemeProvider`](https://styled-components.com/docs/api#themeprovider)
|
|
116
|
-
* for details.
|
|
117
|
-
*/
|
|
118
|
-
theme?: IGardenTheme;
|
|
119
|
-
/**
|
|
120
|
-
* Provides a reference to the DOM node used to scope a `:focus-visible`
|
|
121
|
-
* polyfill. If left `undefined`, a scoping `<div>` will be rendered.
|
|
122
|
-
* Assigning `null` (on a nested `ThemeProvider`, for example) prevents the
|
|
123
|
-
* added polyfill and scoping `<div>`.
|
|
124
|
-
*/
|
|
125
|
-
focusVisibleRef?: React.RefObject<HTMLElement> | null;
|
|
126
|
-
}
|
|
127
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { ThemeProps } from 'styled-components';
|
|
9
|
+
export declare const ARROW_POSITION: readonly ["top", "top-left", "top-right", "right", "right-top", "right-bottom", "bottom", "bottom-left", "bottom-right", "left", "left-top", "left-bottom"];
|
|
10
|
+
export type ArrowPosition = (typeof ARROW_POSITION)[number];
|
|
11
|
+
export declare const MENU_POSITION: readonly ["top", "right", "bottom", "left"];
|
|
12
|
+
export type MenuPosition = (typeof MENU_POSITION)[number];
|
|
13
|
+
type Hue = Record<number | string, string> | string;
|
|
14
|
+
export interface IGardenTheme {
|
|
15
|
+
rtl: boolean;
|
|
16
|
+
document?: any;
|
|
17
|
+
window?: any;
|
|
18
|
+
borders: {
|
|
19
|
+
sm: string;
|
|
20
|
+
md: string;
|
|
21
|
+
};
|
|
22
|
+
borderRadii: {
|
|
23
|
+
sm: string;
|
|
24
|
+
md: string;
|
|
25
|
+
};
|
|
26
|
+
borderStyles: {
|
|
27
|
+
solid: string;
|
|
28
|
+
};
|
|
29
|
+
borderWidths: {
|
|
30
|
+
sm: string;
|
|
31
|
+
md: string;
|
|
32
|
+
};
|
|
33
|
+
breakpoints: {
|
|
34
|
+
xs: string;
|
|
35
|
+
sm: string;
|
|
36
|
+
md: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
xl: string;
|
|
39
|
+
};
|
|
40
|
+
colors: {
|
|
41
|
+
base: 'light' | 'dark';
|
|
42
|
+
background: string;
|
|
43
|
+
foreground: string;
|
|
44
|
+
primaryHue: string;
|
|
45
|
+
dangerHue: string;
|
|
46
|
+
warningHue: string;
|
|
47
|
+
successHue: string;
|
|
48
|
+
neutralHue: string;
|
|
49
|
+
chromeHue: string;
|
|
50
|
+
};
|
|
51
|
+
components: Record<string, any>;
|
|
52
|
+
fonts: {
|
|
53
|
+
mono: string;
|
|
54
|
+
system: string;
|
|
55
|
+
};
|
|
56
|
+
fontSizes: {
|
|
57
|
+
xs: string;
|
|
58
|
+
sm: string;
|
|
59
|
+
md: string;
|
|
60
|
+
lg: string;
|
|
61
|
+
xl: string;
|
|
62
|
+
xxl: string;
|
|
63
|
+
xxxl: string;
|
|
64
|
+
};
|
|
65
|
+
fontWeights: {
|
|
66
|
+
thin: number;
|
|
67
|
+
extralight: number;
|
|
68
|
+
light: number;
|
|
69
|
+
regular: number;
|
|
70
|
+
medium: number;
|
|
71
|
+
semibold: number;
|
|
72
|
+
bold: number;
|
|
73
|
+
extrabold: number;
|
|
74
|
+
black: number;
|
|
75
|
+
};
|
|
76
|
+
iconSizes: {
|
|
77
|
+
sm: string;
|
|
78
|
+
md: string;
|
|
79
|
+
lg: string;
|
|
80
|
+
};
|
|
81
|
+
lineHeights: {
|
|
82
|
+
sm: string;
|
|
83
|
+
md: string;
|
|
84
|
+
lg: string;
|
|
85
|
+
xl: string;
|
|
86
|
+
xxl: string;
|
|
87
|
+
xxxl: string;
|
|
88
|
+
};
|
|
89
|
+
shadowWidths: {
|
|
90
|
+
xs: string;
|
|
91
|
+
sm: string;
|
|
92
|
+
md: string;
|
|
93
|
+
};
|
|
94
|
+
shadows: {
|
|
95
|
+
xs: (color: string) => string;
|
|
96
|
+
sm: (color: string) => string;
|
|
97
|
+
md: (color: string) => string;
|
|
98
|
+
lg: (offsetY: string, blurRadius: string, color: string) => string;
|
|
99
|
+
};
|
|
100
|
+
space: {
|
|
101
|
+
base: number;
|
|
102
|
+
xxs: string;
|
|
103
|
+
xs: string;
|
|
104
|
+
sm: string;
|
|
105
|
+
md: string;
|
|
106
|
+
lg: string;
|
|
107
|
+
xl: string;
|
|
108
|
+
xxl: string;
|
|
109
|
+
};
|
|
110
|
+
palette: Record<string, Hue>;
|
|
111
|
+
}
|
|
112
|
+
export interface IThemeProviderProps extends Partial<ThemeProps<IGardenTheme>> {
|
|
113
|
+
/**
|
|
114
|
+
* Provides values for component styling. See styled-components
|
|
115
|
+
* [`ThemeProvider`](https://styled-components.com/docs/api#themeprovider)
|
|
116
|
+
* for details.
|
|
117
|
+
*/
|
|
118
|
+
theme?: IGardenTheme;
|
|
119
|
+
/**
|
|
120
|
+
* Provides a reference to the DOM node used to scope a `:focus-visible`
|
|
121
|
+
* polyfill. If left `undefined`, a scoping `<div>` will be rendered.
|
|
122
|
+
* Assigning `null` (on a nested `ThemeProvider`, for example) prevents the
|
|
123
|
+
* added polyfill and scoping `<div>`.
|
|
124
|
+
*/
|
|
125
|
+
focusVisibleRef?: React.RefObject<HTMLElement> | null;
|
|
126
|
+
}
|
|
127
|
+
export {};
|