baseui 15.0.2 → 16.0.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/button/button-internals.d.ts +2 -2
- package/button/button-internals.js +56 -7
- package/button/button.d.ts +2 -2
- package/button/button.js +80 -8
- package/button/constants.d.ts +22 -0
- package/button/constants.js +31 -3
- package/button/default-props.d.ts +5 -3
- package/button/default-props.js +5 -3
- package/button/index.d.ts +1 -1
- package/button/index.js +21 -0
- package/button/styled-components.d.ts +7 -0
- package/button/styled-components.js +476 -66
- package/button/types.d.ts +39 -3
- package/button/utils.d.ts +2 -2
- package/button/utils.js +9 -3
- package/button-group/button-group.d.ts +1 -0
- package/button-group/button-group.js +22 -33
- package/button-group/constants.d.ts +5 -0
- package/button-group/constants.js +6 -1
- package/button-group/index.d.ts +10 -1
- package/button-group/index.js +33 -4
- package/button-group/styled-components.d.ts +5 -2
- package/button-group/styled-components.js +47 -6
- package/button-group/types.d.ts +9 -2
- package/modal/modal-button.d.ts +8 -1
- package/package.json +1 -1
- package/tag/constants.d.ts +31 -5
- package/tag/constants.js +18 -11
- package/tag/deprecated-styles.d.ts +119 -0
- package/tag/deprecated-styles.js +179 -0
- package/tag/index.d.ts +1 -1
- package/tag/index.js +15 -1
- package/tag/styled-components.js +199 -230
- package/tag/tag.js +10 -4
- package/tag/types.d.ts +16 -11
- package/tag-group/index.d.ts +5 -0
- package/tag-group/index.js +51 -0
- package/tag-group/styled-components.d.ts +3 -0
- package/tag-group/styled-components.js +46 -0
- package/tag-group/tag-group.d.ts +4 -0
- package/tag-group/tag-group.js +65 -0
- package/tag-group/types.d.ts +18 -0
- package/tag-group/types.js +1 -0
- package/themes/dark-theme/color-component-tokens.js +56 -3
- package/themes/dark-theme/color-semantic-tokens.js +104 -0
- package/themes/light-theme/color-component-tokens.js +55 -2
- package/themes/light-theme/color-semantic-tokens.js +104 -0
- package/themes/shared/animation.js +30 -5
- package/themes/types.d.ts +76 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export declare const deprecatedNeutralColorStates: {
|
|
2
|
+
disabled: (theme: any, color: any) => {
|
|
3
|
+
color: any;
|
|
4
|
+
backgroundColor: any;
|
|
5
|
+
borderColor: any;
|
|
6
|
+
};
|
|
7
|
+
primary: (theme: any, color: any) => {
|
|
8
|
+
color: any;
|
|
9
|
+
backgroundColor: any;
|
|
10
|
+
borderColor: any;
|
|
11
|
+
};
|
|
12
|
+
secondary: (theme: any, color: any) => {
|
|
13
|
+
color: any;
|
|
14
|
+
backgroundColor: any;
|
|
15
|
+
borderColor: any;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const deprecatedPrimaryColorStates: {
|
|
19
|
+
disabled: (theme: any, color: any) => {
|
|
20
|
+
color: any;
|
|
21
|
+
backgroundColor: any;
|
|
22
|
+
borderColor: any;
|
|
23
|
+
};
|
|
24
|
+
primary: (theme: any, color: any) => {
|
|
25
|
+
color: any;
|
|
26
|
+
backgroundColor: any;
|
|
27
|
+
borderColor: any;
|
|
28
|
+
};
|
|
29
|
+
secondary: (theme: any, color: any) => {
|
|
30
|
+
color: any;
|
|
31
|
+
backgroundColor: any;
|
|
32
|
+
borderColor: any;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const deprecatedBlueColorStates: {
|
|
36
|
+
disabled: (theme: any, color: any) => {
|
|
37
|
+
color: any;
|
|
38
|
+
backgroundColor: any;
|
|
39
|
+
borderColor: any;
|
|
40
|
+
};
|
|
41
|
+
primary: (theme: any, color: any) => {
|
|
42
|
+
color: any;
|
|
43
|
+
backgroundColor: any;
|
|
44
|
+
borderColor: any;
|
|
45
|
+
};
|
|
46
|
+
secondary: (theme: any, color: any) => {
|
|
47
|
+
color: any;
|
|
48
|
+
backgroundColor: any;
|
|
49
|
+
borderColor: any;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const deprecatedGreenColorStates: {
|
|
53
|
+
disabled: (theme: any, color: any) => {
|
|
54
|
+
color: any;
|
|
55
|
+
backgroundColor: any;
|
|
56
|
+
borderColor: any;
|
|
57
|
+
};
|
|
58
|
+
primary: (theme: any, color: any) => {
|
|
59
|
+
color: any;
|
|
60
|
+
backgroundColor: any;
|
|
61
|
+
borderColor: any;
|
|
62
|
+
};
|
|
63
|
+
secondary: (theme: any, color: any) => {
|
|
64
|
+
color: any;
|
|
65
|
+
backgroundColor: any;
|
|
66
|
+
borderColor: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export declare const deprecatedYellowColorStates: {
|
|
70
|
+
disabled: (theme: any, color: any) => {
|
|
71
|
+
color: any;
|
|
72
|
+
backgroundColor: any;
|
|
73
|
+
borderColor: any;
|
|
74
|
+
};
|
|
75
|
+
primary: (theme: any, color: any) => {
|
|
76
|
+
color: any;
|
|
77
|
+
backgroundColor: any;
|
|
78
|
+
borderColor: any;
|
|
79
|
+
};
|
|
80
|
+
secondary: (theme: any, color: any) => {
|
|
81
|
+
color: any;
|
|
82
|
+
backgroundColor: any;
|
|
83
|
+
borderColor: any;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export declare const deprecatedRedColorStates: {
|
|
87
|
+
disabled: (theme: any, color: any) => {
|
|
88
|
+
color: any;
|
|
89
|
+
backgroundColor: any;
|
|
90
|
+
borderColor: any;
|
|
91
|
+
};
|
|
92
|
+
primary: (theme: any, color: any) => {
|
|
93
|
+
color: any;
|
|
94
|
+
backgroundColor: any;
|
|
95
|
+
borderColor: any;
|
|
96
|
+
};
|
|
97
|
+
secondary: (theme: any, color: any) => {
|
|
98
|
+
color: any;
|
|
99
|
+
backgroundColor: any;
|
|
100
|
+
borderColor: any;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export declare const deprecatedBrownColorStates: {
|
|
104
|
+
disabled: (theme: any, color: any) => {
|
|
105
|
+
color: any;
|
|
106
|
+
backgroundColor: any;
|
|
107
|
+
borderColor: any;
|
|
108
|
+
};
|
|
109
|
+
primary: (theme: any, color: any) => {
|
|
110
|
+
color: any;
|
|
111
|
+
backgroundColor: any;
|
|
112
|
+
borderColor: any;
|
|
113
|
+
};
|
|
114
|
+
secondary: (theme: any, color: any) => {
|
|
115
|
+
color: any;
|
|
116
|
+
backgroundColor: any;
|
|
117
|
+
borderColor: any;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.deprecatedYellowColorStates = exports.deprecatedRedColorStates = exports.deprecatedPrimaryColorStates = exports.deprecatedNeutralColorStates = exports.deprecatedGreenColorStates = exports.deprecatedBrownColorStates = exports.deprecatedBlueColorStates = void 0;
|
|
7
|
+
// Note: all the styles exported from this file are deprecated and won't be maintained going forward.
|
|
8
|
+
// They are kept here for backward compatibility reasons only.
|
|
9
|
+
|
|
10
|
+
const COLOR_STATE = {
|
|
11
|
+
disabled: 'disabled',
|
|
12
|
+
primary: 'primary',
|
|
13
|
+
secondary: 'secondary'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// Probably best to bake this into the theme once we hit our next major.
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
const pick = (theme, light, dark) => theme.name && theme.name.includes('dark') ? dark : light;
|
|
19
|
+
const deprecatedNeutralColorStates = exports.deprecatedNeutralColorStates = {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
23
|
+
color: theme.colors.tagNeutralFontDisabled,
|
|
24
|
+
backgroundColor: pick(theme, theme.colors.gray50, theme.colors.gray100Dark),
|
|
25
|
+
borderColor: null
|
|
26
|
+
}),
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
30
|
+
color: theme.colors.tagNeutralSolidFont,
|
|
31
|
+
backgroundColor: theme.colors.tagNeutralSolidBackground,
|
|
32
|
+
borderColor: null
|
|
33
|
+
}),
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
37
|
+
color: theme.colors.tagNeutralOutlinedFont,
|
|
38
|
+
backgroundColor: theme.colors.tagNeutralOutlinedBackground,
|
|
39
|
+
borderColor: null
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
const deprecatedPrimaryColorStates = exports.deprecatedPrimaryColorStates = {
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
46
|
+
color: theme.colors.tagPrimaryFontDisabled,
|
|
47
|
+
backgroundColor: pick(theme, theme.colors.gray50, theme.colors.gray100Dark),
|
|
48
|
+
borderColor: null
|
|
49
|
+
}),
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
53
|
+
color: theme.colors.tagPrimarySolidFont,
|
|
54
|
+
backgroundColor: theme.colors.tagPrimarySolidBackground,
|
|
55
|
+
borderColor: null
|
|
56
|
+
}),
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
60
|
+
color: theme.colors.tagPrimaryOutlinedFont,
|
|
61
|
+
backgroundColor: theme.colors.tagPrimaryOutlinedBackground,
|
|
62
|
+
borderColor: null
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
const deprecatedBlueColorStates = exports.deprecatedBlueColorStates = {
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
69
|
+
color: theme.colors.tagAccentFontDisabled,
|
|
70
|
+
backgroundColor: pick(theme, theme.colors.blue50, theme.colors.blue100Dark),
|
|
71
|
+
borderColor: null
|
|
72
|
+
}),
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
76
|
+
color: theme.colors.tagAccentSolidFont,
|
|
77
|
+
backgroundColor: theme.colors.tagAccentSolidBackground,
|
|
78
|
+
borderColor: null
|
|
79
|
+
}),
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
83
|
+
color: theme.colors.tagAccentOutlinedFont,
|
|
84
|
+
backgroundColor: theme.colors.tagAccentOutlinedBackground,
|
|
85
|
+
borderColor: null
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
const deprecatedGreenColorStates = exports.deprecatedGreenColorStates = {
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
92
|
+
color: theme.colors.tagPositiveFontDisabled,
|
|
93
|
+
backgroundColor: pick(theme, theme.colors.green50, theme.colors.green100Dark),
|
|
94
|
+
borderColor: null
|
|
95
|
+
}),
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
99
|
+
color: theme.colors.tagPositiveSolidFont,
|
|
100
|
+
backgroundColor: theme.colors.tagPositiveSolidBackground,
|
|
101
|
+
borderColor: null
|
|
102
|
+
}),
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
104
|
+
// @ts-ignore
|
|
105
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
106
|
+
color: theme.colors.tagPositiveOutlinedFont,
|
|
107
|
+
backgroundColor: theme.colors.tagPositiveOutlinedBackground,
|
|
108
|
+
borderColor: null
|
|
109
|
+
})
|
|
110
|
+
};
|
|
111
|
+
const deprecatedYellowColorStates = exports.deprecatedYellowColorStates = {
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
113
|
+
// @ts-ignore
|
|
114
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
115
|
+
color: theme.colors.tagWarningFontDisabled,
|
|
116
|
+
backgroundColor: pick(theme, theme.colors.yellow50, theme.colors.yellow100Dark),
|
|
117
|
+
borderColor: null
|
|
118
|
+
}),
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
120
|
+
// @ts-ignore
|
|
121
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
122
|
+
color: theme.colors.tagWarningSolidFont,
|
|
123
|
+
backgroundColor: theme.colors.tagWarningSolidBackground,
|
|
124
|
+
borderColor: null
|
|
125
|
+
}),
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
129
|
+
color: theme.colors.tagWarningOutlinedFont,
|
|
130
|
+
backgroundColor: theme.colors.tagWarningOutlinedBackground,
|
|
131
|
+
borderColor: null
|
|
132
|
+
})
|
|
133
|
+
};
|
|
134
|
+
const deprecatedRedColorStates = exports.deprecatedRedColorStates = {
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
138
|
+
color: theme.colors.tagNegativeFontDisabled,
|
|
139
|
+
backgroundColor: pick(theme, theme.colors.red50, theme.colors.red100Dark),
|
|
140
|
+
borderColor: null
|
|
141
|
+
}),
|
|
142
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
145
|
+
color: theme.colors.tagNegativeSolidFont,
|
|
146
|
+
backgroundColor: theme.colors.tagNegativeSolidBackground,
|
|
147
|
+
borderColor: null
|
|
148
|
+
}),
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
150
|
+
// @ts-ignore
|
|
151
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
152
|
+
color: theme.colors.tagNegativeOutlinedFont,
|
|
153
|
+
backgroundColor: theme.colors.tagNegativeOutlinedBackground,
|
|
154
|
+
borderColor: null
|
|
155
|
+
})
|
|
156
|
+
};
|
|
157
|
+
const deprecatedBrownColorStates = exports.deprecatedBrownColorStates = {
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
159
|
+
// @ts-ignore
|
|
160
|
+
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
161
|
+
color: pick(theme, theme.colors.amber200, theme.colors.amber400Dark),
|
|
162
|
+
backgroundColor: null,
|
|
163
|
+
borderColor: null
|
|
164
|
+
}),
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
166
|
+
// @ts-ignore
|
|
167
|
+
[COLOR_STATE.primary]: (theme, color) => ({
|
|
168
|
+
color: pick(theme, theme.colors.white, theme.colors.gray900Dark),
|
|
169
|
+
backgroundColor: pick(theme, theme.colors.amber600, theme.colors.amber400Dark),
|
|
170
|
+
borderColor: null
|
|
171
|
+
}),
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
173
|
+
// @ts-ignore
|
|
174
|
+
[COLOR_STATE.secondary]: (theme, color) => ({
|
|
175
|
+
color: pick(theme, theme.colors.amber600, theme.colors.amber600Dark),
|
|
176
|
+
backgroundColor: null,
|
|
177
|
+
borderColor: null
|
|
178
|
+
})
|
|
179
|
+
};
|
package/tag/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Tag } from './tag';
|
|
2
2
|
export { Root as StyledRoot, Action as StyledAction, Text as StyledText, } from './styled-components';
|
|
3
|
-
export { KIND, HIERARCHY, SIZE } from './constants';
|
|
3
|
+
export { KIND, HIERARCHY, SIZE, SUPPORTED_KIND, DEPRECATED_KIND } from './constants';
|
|
4
4
|
export * from './types';
|
package/tag/index.js
CHANGED
|
@@ -10,8 +10,16 @@ var _exportNames = {
|
|
|
10
10
|
StyledText: true,
|
|
11
11
|
KIND: true,
|
|
12
12
|
HIERARCHY: true,
|
|
13
|
-
SIZE: true
|
|
13
|
+
SIZE: true,
|
|
14
|
+
SUPPORTED_KIND: true,
|
|
15
|
+
DEPRECATED_KIND: true
|
|
14
16
|
};
|
|
17
|
+
Object.defineProperty(exports, "DEPRECATED_KIND", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _constants.DEPRECATED_KIND;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
15
23
|
Object.defineProperty(exports, "HIERARCHY", {
|
|
16
24
|
enumerable: true,
|
|
17
25
|
get: function () {
|
|
@@ -30,6 +38,12 @@ Object.defineProperty(exports, "SIZE", {
|
|
|
30
38
|
return _constants.SIZE;
|
|
31
39
|
}
|
|
32
40
|
});
|
|
41
|
+
Object.defineProperty(exports, "SUPPORTED_KIND", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return _constants.SUPPORTED_KIND;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
33
47
|
Object.defineProperty(exports, "StyledAction", {
|
|
34
48
|
enumerable: true,
|
|
35
49
|
get: function () {
|