@instructure/ui-buttons 11.7.3-snapshot-25 → 11.7.3-snapshot-27
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/CHANGELOG.md +5 -2
- package/es/BaseButton/v1/index.js +136 -120
- package/es/BaseButton/v1/styles.js +14 -10
- package/es/BaseButton/v1/theme.js +77 -76
- package/es/BaseButton/v2/index.js +138 -122
- package/es/BaseButton/v2/styles.js +14 -10
- package/es/Button/v1/index.js +49 -47
- package/es/Button/v2/index.js +49 -47
- package/es/CloseButton/v1/index.js +48 -46
- package/es/CloseButton/v1/styles.js +4 -2
- package/es/CloseButton/v1/theme.js +8 -6
- package/es/CloseButton/v2/index.js +48 -46
- package/es/CloseButton/v2/styles.js +4 -2
- package/es/CondensedButton/v1/index.js +43 -41
- package/es/CondensedButton/v2/index.js +43 -41
- package/es/IconButton/v1/index.js +49 -47
- package/es/IconButton/v2/index.js +49 -47
- package/es/ToggleButton/v1/index.js +37 -36
- package/es/ToggleButton/v2/index.js +37 -36
- package/lib/BaseButton/v1/index.js +136 -120
- package/lib/BaseButton/v1/styles.js +14 -10
- package/lib/BaseButton/v1/theme.js +77 -76
- package/lib/BaseButton/v2/index.js +138 -122
- package/lib/BaseButton/v2/styles.js +14 -10
- package/lib/Button/v1/index.js +49 -47
- package/lib/Button/v2/index.js +49 -48
- package/lib/CloseButton/v1/index.js +48 -46
- package/lib/CloseButton/v1/styles.js +4 -2
- package/lib/CloseButton/v1/theme.js +8 -6
- package/lib/CloseButton/v2/index.js +48 -46
- package/lib/CloseButton/v2/styles.js +4 -2
- package/lib/CondensedButton/v1/index.js +43 -41
- package/lib/CondensedButton/v2/index.js +43 -42
- package/lib/IconButton/v1/index.js +49 -47
- package/lib/IconButton/v2/index.js +49 -48
- package/lib/ToggleButton/v1/index.js +38 -37
- package/lib/ToggleButton/v2/index.js +38 -37
- package/package.json +18 -18
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [11.7.3-snapshot-
|
|
6
|
+
## [11.7.3-snapshot-27](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-27) (2026-05-05)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _dec, _class, _BaseButton;
|
|
1
|
+
var _dec, _class;
|
|
2
|
+
import "core-js/modules/es.array.includes.js";
|
|
4
3
|
/*
|
|
5
4
|
* The MIT License (MIT)
|
|
6
5
|
*
|
|
@@ -45,62 +44,32 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
45
44
|
category: components/utilities
|
|
46
45
|
---
|
|
47
46
|
**/
|
|
48
|
-
let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec(_class =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
this.handleKeyDown = event => {
|
|
72
|
-
const _this$props = this.props,
|
|
73
|
-
onClick = _this$props.onClick,
|
|
74
|
-
onKeyDown = _this$props.onKeyDown,
|
|
75
|
-
href = _this$props.href;
|
|
76
|
-
const interaction = this.interaction;
|
|
77
|
-
if (typeof onKeyDown === 'function') {
|
|
78
|
-
onKeyDown(event);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// behave like a button when space key is pressed
|
|
82
|
-
const _keycode$codes = keycode.codes,
|
|
83
|
-
space = _keycode$codes.space,
|
|
84
|
-
enter = _keycode$codes.enter;
|
|
85
|
-
if (this.elementType !== 'button' && [space, enter].includes(event.keyCode)) {
|
|
86
|
-
event.preventDefault();
|
|
87
|
-
event.stopPropagation();
|
|
88
|
-
if (typeof onClick === 'function' && interaction === 'enabled') {
|
|
89
|
-
onClick(event);
|
|
90
|
-
}
|
|
91
|
-
if (href) {
|
|
92
|
-
this.ref && this.ref.click();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
47
|
+
let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec(_class = class BaseButton extends Component {
|
|
48
|
+
static displayName = "BaseButton";
|
|
49
|
+
static componentId = 'BaseButton';
|
|
50
|
+
static allowedProps = allowedProps;
|
|
51
|
+
static defaultProps = {
|
|
52
|
+
type: 'button',
|
|
53
|
+
size: 'medium',
|
|
54
|
+
as: 'button',
|
|
55
|
+
// Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
|
|
56
|
+
interaction: undefined,
|
|
57
|
+
color: 'secondary',
|
|
58
|
+
shape: 'rectangle',
|
|
59
|
+
display: 'inline-block',
|
|
60
|
+
textAlign: 'start',
|
|
61
|
+
withBackground: true,
|
|
62
|
+
withBorder: true,
|
|
63
|
+
isCondensed: false,
|
|
64
|
+
margin: '0',
|
|
65
|
+
cursor: 'pointer'
|
|
66
|
+
};
|
|
67
|
+
ref = null;
|
|
97
68
|
componentDidMount() {
|
|
98
|
-
|
|
99
|
-
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2, this.makeStylesVariables);
|
|
69
|
+
this.props.makeStyles?.(this.makeStylesVariables);
|
|
100
70
|
}
|
|
101
71
|
componentDidUpdate() {
|
|
102
|
-
|
|
103
|
-
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3, this.makeStylesVariables);
|
|
72
|
+
this.props.makeStyles?.(this.makeStylesVariables);
|
|
104
73
|
}
|
|
105
74
|
get makeStylesVariables() {
|
|
106
75
|
return {
|
|
@@ -110,9 +79,10 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
|
|
|
110
79
|
};
|
|
111
80
|
}
|
|
112
81
|
get hasOnlyIconVisible() {
|
|
113
|
-
const
|
|
114
|
-
children
|
|
115
|
-
renderIcon
|
|
82
|
+
const {
|
|
83
|
+
children,
|
|
84
|
+
renderIcon
|
|
85
|
+
} = this.props;
|
|
116
86
|
return !!(renderIcon && !hasVisibleChildren(children));
|
|
117
87
|
}
|
|
118
88
|
get elementType() {
|
|
@@ -133,10 +103,11 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
|
|
|
133
103
|
return this.interaction === 'enabled';
|
|
134
104
|
}
|
|
135
105
|
get focusColor() {
|
|
136
|
-
const
|
|
137
|
-
color
|
|
138
|
-
focusColor
|
|
139
|
-
withBackground
|
|
106
|
+
const {
|
|
107
|
+
color,
|
|
108
|
+
focusColor,
|
|
109
|
+
withBackground
|
|
110
|
+
} = this.props;
|
|
140
111
|
|
|
141
112
|
// Give user specified focusColor preference
|
|
142
113
|
if (focusColor) {
|
|
@@ -158,65 +129,125 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
|
|
|
158
129
|
focus() {
|
|
159
130
|
this.ref && this.ref.focus();
|
|
160
131
|
}
|
|
132
|
+
handleElementRef = el => {
|
|
133
|
+
const {
|
|
134
|
+
elementRef
|
|
135
|
+
} = this.props;
|
|
136
|
+
this.ref = el;
|
|
137
|
+
if (typeof elementRef === 'function') {
|
|
138
|
+
elementRef(el);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
handleClick = event => {
|
|
142
|
+
const {
|
|
143
|
+
onClick
|
|
144
|
+
} = this.props;
|
|
145
|
+
const {
|
|
146
|
+
interaction
|
|
147
|
+
} = this;
|
|
148
|
+
if (interaction !== 'enabled') {
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
event.stopPropagation();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (typeof onClick === 'function') {
|
|
154
|
+
onClick(event);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
handleKeyDown = event => {
|
|
158
|
+
const {
|
|
159
|
+
onClick,
|
|
160
|
+
onKeyDown,
|
|
161
|
+
href
|
|
162
|
+
} = this.props;
|
|
163
|
+
const {
|
|
164
|
+
interaction
|
|
165
|
+
} = this;
|
|
166
|
+
if (typeof onKeyDown === 'function') {
|
|
167
|
+
onKeyDown(event);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// behave like a button when space key is pressed
|
|
171
|
+
const {
|
|
172
|
+
space,
|
|
173
|
+
enter
|
|
174
|
+
} = keycode.codes;
|
|
175
|
+
if (this.elementType !== 'button' && [space, enter].includes(event.keyCode)) {
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
event.stopPropagation();
|
|
178
|
+
if (typeof onClick === 'function' && interaction === 'enabled') {
|
|
179
|
+
onClick(event);
|
|
180
|
+
}
|
|
181
|
+
if (href) {
|
|
182
|
+
this.ref && this.ref.click();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
161
186
|
renderChildren() {
|
|
162
|
-
const
|
|
163
|
-
renderIcon
|
|
164
|
-
children
|
|
165
|
-
styles
|
|
187
|
+
const {
|
|
188
|
+
renderIcon,
|
|
189
|
+
children,
|
|
190
|
+
styles
|
|
191
|
+
} = this.props;
|
|
166
192
|
const wrappedChildren = _jsx("span", {
|
|
167
|
-
css: styles
|
|
193
|
+
css: styles?.children,
|
|
168
194
|
children: children
|
|
169
195
|
});
|
|
170
196
|
if (!renderIcon) {
|
|
171
197
|
return wrappedChildren;
|
|
172
198
|
}
|
|
173
|
-
const
|
|
199
|
+
const {
|
|
200
|
+
hasOnlyIconVisible
|
|
201
|
+
} = this;
|
|
174
202
|
const wrappedIcon = _jsx("span", {
|
|
175
|
-
css: styles
|
|
203
|
+
css: styles?.iconSVG,
|
|
176
204
|
children: callRenderProp(renderIcon)
|
|
177
205
|
});
|
|
178
206
|
const flexChildren = hasOnlyIconVisible ? _jsxs("span", {
|
|
179
|
-
css: styles
|
|
207
|
+
css: styles?.iconOnly,
|
|
180
208
|
children: [wrappedIcon, children]
|
|
181
209
|
}) : [_jsx("span", {
|
|
182
|
-
css: styles
|
|
210
|
+
css: styles?.iconWrapper,
|
|
183
211
|
children: wrappedIcon
|
|
184
212
|
}, "icon"), _jsx("span", {
|
|
185
|
-
css: styles
|
|
213
|
+
css: styles?.childrenWrapper,
|
|
186
214
|
children: wrappedChildren
|
|
187
215
|
}, "children")];
|
|
188
216
|
return _jsx("span", {
|
|
189
|
-
css: styles
|
|
217
|
+
css: styles?.childrenLayout,
|
|
190
218
|
children: flexChildren
|
|
191
219
|
});
|
|
192
220
|
}
|
|
193
221
|
render() {
|
|
194
|
-
const
|
|
195
|
-
type
|
|
196
|
-
size
|
|
197
|
-
elementRef
|
|
198
|
-
as
|
|
199
|
-
href
|
|
200
|
-
color
|
|
201
|
-
focusColor
|
|
202
|
-
textAlign
|
|
203
|
-
shape
|
|
204
|
-
display
|
|
205
|
-
withBackground
|
|
206
|
-
withBorder
|
|
207
|
-
isCondensed
|
|
208
|
-
margin
|
|
209
|
-
cursor
|
|
210
|
-
onClick
|
|
211
|
-
renderIcon
|
|
212
|
-
tabIndex
|
|
213
|
-
styles
|
|
214
|
-
makeStyles
|
|
215
|
-
withFocusOutline
|
|
216
|
-
props
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
const {
|
|
223
|
+
type,
|
|
224
|
+
size,
|
|
225
|
+
elementRef,
|
|
226
|
+
as,
|
|
227
|
+
href,
|
|
228
|
+
color,
|
|
229
|
+
focusColor,
|
|
230
|
+
textAlign,
|
|
231
|
+
shape,
|
|
232
|
+
display,
|
|
233
|
+
withBackground,
|
|
234
|
+
withBorder,
|
|
235
|
+
isCondensed,
|
|
236
|
+
margin,
|
|
237
|
+
cursor,
|
|
238
|
+
onClick,
|
|
239
|
+
renderIcon,
|
|
240
|
+
tabIndex,
|
|
241
|
+
styles,
|
|
242
|
+
makeStyles,
|
|
243
|
+
withFocusOutline,
|
|
244
|
+
...props
|
|
245
|
+
} = this.props;
|
|
246
|
+
const {
|
|
247
|
+
isDisabled,
|
|
248
|
+
isReadOnly,
|
|
249
|
+
elementType
|
|
250
|
+
} = this;
|
|
220
251
|
// only add 0 tabIndex value if it doesn't have it by default, see
|
|
221
252
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
222
253
|
let needsZeroTabIndex = true;
|
|
@@ -247,37 +278,22 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
|
|
|
247
278
|
margin: margin,
|
|
248
279
|
cursor: isDisabled ? 'not-allowed' : cursor,
|
|
249
280
|
href: href,
|
|
250
|
-
type: href ?
|
|
281
|
+
type: href ? undefined : type,
|
|
251
282
|
elementRef: this.handleElementRef,
|
|
252
283
|
onClick: this.handleClick,
|
|
253
284
|
onKeyDown: this.handleKeyDown,
|
|
254
|
-
role: onClick && as !== 'button' ? 'button' :
|
|
285
|
+
role: onClick && as !== 'button' ? 'button' : undefined,
|
|
255
286
|
tabIndex: tabIndexValue,
|
|
256
287
|
disabled: isDisabled || isReadOnly,
|
|
257
|
-
css: styles
|
|
288
|
+
css: styles?.baseButton,
|
|
258
289
|
withFocusOutline: withFocusOutline,
|
|
259
290
|
"data-cid": combineDataCid('BaseButton', this.props),
|
|
260
291
|
children: _jsx("span", {
|
|
261
|
-
css: styles
|
|
292
|
+
css: styles?.content,
|
|
262
293
|
children: this.renderChildren()
|
|
263
294
|
})
|
|
264
295
|
});
|
|
265
296
|
}
|
|
266
|
-
}
|
|
267
|
-
type: 'button',
|
|
268
|
-
size: 'medium',
|
|
269
|
-
as: 'button',
|
|
270
|
-
// Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
|
|
271
|
-
interaction: void 0,
|
|
272
|
-
color: 'secondary',
|
|
273
|
-
shape: 'rectangle',
|
|
274
|
-
display: 'inline-block',
|
|
275
|
-
textAlign: 'start',
|
|
276
|
-
withBackground: true,
|
|
277
|
-
withBorder: true,
|
|
278
|
-
isCondensed: false,
|
|
279
|
-
margin: '0',
|
|
280
|
-
cursor: 'pointer'
|
|
281
|
-
}, _BaseButton)) || _class);
|
|
297
|
+
}) || _class);
|
|
282
298
|
export { BaseButton };
|
|
283
299
|
export default BaseButton;
|
|
@@ -35,16 +35,20 @@ import { darken, lighten } from '@instructure/ui-color-utils';
|
|
|
35
35
|
* @return {Object} The final style object, which will be used in the component
|
|
36
36
|
*/
|
|
37
37
|
const generateStyle = (componentTheme, props, state) => {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
const {
|
|
39
|
+
size,
|
|
40
|
+
color,
|
|
41
|
+
textAlign,
|
|
42
|
+
shape,
|
|
43
|
+
withBackground,
|
|
44
|
+
withBorder,
|
|
45
|
+
isCondensed
|
|
46
|
+
} = props;
|
|
47
|
+
const {
|
|
48
|
+
isDisabled,
|
|
49
|
+
hasOnlyIconVisible,
|
|
50
|
+
isEnabled
|
|
51
|
+
} = state;
|
|
48
52
|
const shapeVariants = {
|
|
49
53
|
circle: {
|
|
50
54
|
borderRadius: '50%'
|
|
@@ -31,13 +31,14 @@ const activeShadow = 'inset 0 0 0.1875rem 0.0625rem';
|
|
|
31
31
|
* @return {Object} The final theme object with the overrides and component variables
|
|
32
32
|
*/
|
|
33
33
|
const generateComponentTheme = theme => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
colors
|
|
37
|
-
forms
|
|
38
|
-
spacing
|
|
39
|
-
typography
|
|
40
|
-
themeName
|
|
34
|
+
const {
|
|
35
|
+
borders,
|
|
36
|
+
colors,
|
|
37
|
+
forms,
|
|
38
|
+
spacing,
|
|
39
|
+
typography,
|
|
40
|
+
key: themeName
|
|
41
|
+
} = theme;
|
|
41
42
|
const themeSpecificStyle = {
|
|
42
43
|
canvas: {
|
|
43
44
|
primaryColor: theme['ic-brand-button--primary-text'],
|
|
@@ -57,118 +58,118 @@ const generateComponentTheme = theme => {
|
|
|
57
58
|
const componentVariables = {
|
|
58
59
|
transform: 'none',
|
|
59
60
|
hoverTransform: 'none',
|
|
60
|
-
fontFamily: typography
|
|
61
|
-
fontWeight: typography
|
|
61
|
+
fontFamily: typography?.fontFamily,
|
|
62
|
+
fontWeight: typography?.fontWeightNormal,
|
|
62
63
|
textTransform: 'none',
|
|
63
64
|
letterSpacing: 'normal',
|
|
64
|
-
borderRadius: borders
|
|
65
|
-
borderStyle: borders
|
|
66
|
-
borderWidth: borders
|
|
67
|
-
smallHeight: forms
|
|
68
|
-
smallFontSize: typography
|
|
69
|
-
smallPaddingHorizontal: spacing
|
|
65
|
+
borderRadius: borders?.radiusMedium,
|
|
66
|
+
borderStyle: borders?.style,
|
|
67
|
+
borderWidth: borders?.widthSmall,
|
|
68
|
+
smallHeight: forms?.inputHeightSmall,
|
|
69
|
+
smallFontSize: typography?.fontSizeSmall,
|
|
70
|
+
smallPaddingHorizontal: spacing?.xSmall,
|
|
70
71
|
smallPaddingTop: '0.375rem',
|
|
71
72
|
smallPaddingBottom: '0.3125rem',
|
|
72
|
-
mediumHeight: forms
|
|
73
|
-
mediumFontSize: typography
|
|
74
|
-
mediumPaddingHorizontal: spacing
|
|
73
|
+
mediumHeight: forms?.inputHeightMedium,
|
|
74
|
+
mediumFontSize: typography?.fontSizeMedium,
|
|
75
|
+
mediumPaddingHorizontal: spacing?.small,
|
|
75
76
|
mediumPaddingTop: '0.5625rem',
|
|
76
77
|
mediumPaddingBottom: '0.5625rem',
|
|
77
|
-
largeHeight: forms
|
|
78
|
-
largeFontSize: typography
|
|
79
|
-
largePaddingHorizontal: spacing
|
|
78
|
+
largeHeight: forms?.inputHeightLarge,
|
|
79
|
+
largeFontSize: typography?.fontSizeLarge,
|
|
80
|
+
largePaddingHorizontal: spacing?.medium,
|
|
80
81
|
largePaddingTop: '0.6875rem',
|
|
81
82
|
largePaddingBottom: '0.6875rem',
|
|
82
|
-
lineHeight: typography
|
|
83
|
+
lineHeight: typography?.lineHeightFit,
|
|
83
84
|
iconSizeSmall: '1rem',
|
|
84
85
|
iconSizeMedium: '1.25rem',
|
|
85
86
|
iconSizeLarge: '1.625rem',
|
|
86
87
|
iconTextGap: spacing.xSmall,
|
|
87
88
|
iconTextGapCondensed: spacing.xxSmall,
|
|
88
|
-
primaryColor: colors
|
|
89
|
-
primaryBorderColor: colors
|
|
90
|
-
primaryBackground: colors
|
|
91
|
-
primaryHoverBackground: colors
|
|
92
|
-
primaryActiveBackground: colors
|
|
93
|
-
primaryActiveBoxShadow: `${activeShadow} ${colors
|
|
94
|
-
primaryGhostColor: colors
|
|
95
|
-
primaryGhostBorderColor: colors
|
|
89
|
+
primaryColor: colors?.contrasts?.white1010,
|
|
90
|
+
primaryBorderColor: colors?.contrasts?.blue5782,
|
|
91
|
+
primaryBackground: colors?.contrasts?.blue4570,
|
|
92
|
+
primaryHoverBackground: colors?.contrasts?.blue5782,
|
|
93
|
+
primaryActiveBackground: colors?.contrasts?.blue5782,
|
|
94
|
+
primaryActiveBoxShadow: `${activeShadow} ${colors?.contrasts?.white1010}`,
|
|
95
|
+
primaryGhostColor: colors?.contrasts?.blue5782,
|
|
96
|
+
primaryGhostBorderColor: colors?.contrasts?.blue4570,
|
|
96
97
|
primaryGhostBackground: 'transparent',
|
|
97
|
-
primaryGhostHoverBackground: colors
|
|
98
|
+
primaryGhostHoverBackground: colors?.contrasts?.blue1212,
|
|
98
99
|
primaryGhostActiveBackground: 'transparent',
|
|
99
|
-
primaryGhostActiveBoxShadow: `${activeShadow} ${alpha(colors
|
|
100
|
+
primaryGhostActiveBoxShadow: `${activeShadow} ${alpha(colors?.contrasts?.blue1212, 28)}`,
|
|
100
101
|
primaryBoxShadow: 'none',
|
|
101
102
|
primaryGhostBoxShadow: 'none',
|
|
102
103
|
primaryHoverBoxShadow: 'none',
|
|
103
104
|
primaryGhostHoverBoxShadow: 'none',
|
|
104
|
-
secondaryColor: colors
|
|
105
|
-
secondaryBorderColor: colors
|
|
106
|
-
secondaryBackground: colors
|
|
107
|
-
secondaryHoverBackground: colors
|
|
108
|
-
secondaryActiveBackground: colors
|
|
109
|
-
secondaryActiveBoxShadow: `${activeShadow} ${colors
|
|
110
|
-
secondaryGhostColor: colors
|
|
111
|
-
secondaryGhostBorderColor: colors
|
|
105
|
+
secondaryColor: colors?.contrasts?.grey125125,
|
|
106
|
+
secondaryBorderColor: colors?.contrasts?.grey1424,
|
|
107
|
+
secondaryBackground: colors?.contrasts?.grey1111,
|
|
108
|
+
secondaryHoverBackground: colors?.contrasts?.grey1214,
|
|
109
|
+
secondaryActiveBackground: colors?.contrasts?.grey1214,
|
|
110
|
+
secondaryActiveBoxShadow: `${activeShadow} ${colors?.contrasts?.white1010}`,
|
|
111
|
+
secondaryGhostColor: colors?.contrasts?.grey125125,
|
|
112
|
+
secondaryGhostBorderColor: colors?.contrasts?.grey125125,
|
|
112
113
|
secondaryGhostBackground: 'transparent',
|
|
113
|
-
secondaryGhostHoverBackground: colors
|
|
114
|
+
secondaryGhostHoverBackground: colors?.contrasts?.grey1111,
|
|
114
115
|
secondaryGhostActiveBackground: 'transparent',
|
|
115
|
-
secondaryGhostActiveBoxShadow: `${activeShadow} ${alpha(colors
|
|
116
|
+
secondaryGhostActiveBoxShadow: `${activeShadow} ${alpha(colors?.contrasts?.grey125125, 28)}`,
|
|
116
117
|
secondaryBoxShadow: 'none',
|
|
117
118
|
secondaryGhostBoxShadow: 'none',
|
|
118
119
|
secondaryHoverBoxShadow: 'none',
|
|
119
120
|
secondaryGhostHoverBoxShadow: 'none',
|
|
120
|
-
successColor: colors
|
|
121
|
-
successBorderColor: colors
|
|
122
|
-
successBackground: colors
|
|
123
|
-
successHoverBackground: colors
|
|
124
|
-
successActiveBackground: colors
|
|
125
|
-
successActiveBoxShadow: `${activeShadow} ${colors
|
|
126
|
-
successGhostColor: colors
|
|
127
|
-
successGhostBorderColor: colors
|
|
121
|
+
successColor: colors?.contrasts?.white1010,
|
|
122
|
+
successBorderColor: colors?.contrasts?.green5782,
|
|
123
|
+
successBackground: colors?.contrasts?.green4570,
|
|
124
|
+
successHoverBackground: colors?.contrasts?.green5782,
|
|
125
|
+
successActiveBackground: colors?.contrasts?.green5782,
|
|
126
|
+
successActiveBoxShadow: `${activeShadow} ${colors?.contrasts?.white1010}`,
|
|
127
|
+
successGhostColor: colors?.contrasts?.green4570,
|
|
128
|
+
successGhostBorderColor: colors?.contrasts?.green4570,
|
|
128
129
|
successGhostBackground: 'transparent',
|
|
129
|
-
successGhostHoverBackground: alpha(colors
|
|
130
|
+
successGhostHoverBackground: alpha(colors?.contrasts?.green4570, 10),
|
|
130
131
|
successGhostActiveBackground: 'transparent',
|
|
131
|
-
successGhostActiveBoxShadow: `${activeShadow} ${alpha(colors
|
|
132
|
+
successGhostActiveBoxShadow: `${activeShadow} ${alpha(colors?.contrasts?.green4570, 28)}`,
|
|
132
133
|
successBoxShadow: 'none',
|
|
133
134
|
successGhostBoxShadow: 'none',
|
|
134
135
|
successHoverBoxShadow: 'none',
|
|
135
136
|
successGhostHoverBoxShadow: 'none',
|
|
136
|
-
dangerColor: colors
|
|
137
|
-
dangerBorderColor: colors
|
|
138
|
-
dangerBackground: colors
|
|
139
|
-
dangerHoverBackground: colors
|
|
140
|
-
dangerActiveBackground: colors
|
|
141
|
-
dangerActiveBoxShadow: `${activeShadow} ${colors
|
|
142
|
-
dangerGhostColor: colors
|
|
143
|
-
dangerGhostBorderColor: colors
|
|
137
|
+
dangerColor: colors?.contrasts?.white1010,
|
|
138
|
+
dangerBorderColor: colors?.contrasts?.red5782,
|
|
139
|
+
dangerBackground: colors?.contrasts?.red4570,
|
|
140
|
+
dangerHoverBackground: colors?.contrasts?.red5782,
|
|
141
|
+
dangerActiveBackground: colors?.contrasts?.red5782,
|
|
142
|
+
dangerActiveBoxShadow: `${activeShadow} ${colors?.contrasts?.white1010}`,
|
|
143
|
+
dangerGhostColor: colors?.contrasts?.red4570,
|
|
144
|
+
dangerGhostBorderColor: colors?.contrasts?.red4570,
|
|
144
145
|
dangerGhostBackground: 'transparent',
|
|
145
|
-
dangerGhostHoverBackground: alpha(colors
|
|
146
|
+
dangerGhostHoverBackground: alpha(colors?.contrasts?.red4570, 10),
|
|
146
147
|
dangerGhostActiveBackground: 'transparent',
|
|
147
|
-
dangerGhostActiveBoxShadow: `${activeShadow} ${alpha(colors
|
|
148
|
+
dangerGhostActiveBoxShadow: `${activeShadow} ${alpha(colors?.contrasts?.red4570, 28)}`,
|
|
148
149
|
dangerBoxShadow: 'none',
|
|
149
150
|
dangerGhostBoxShadow: 'none',
|
|
150
151
|
dangerHoverBoxShadow: 'none',
|
|
151
152
|
dangerGhostHoverBoxShadow: 'none',
|
|
152
|
-
primaryInverseColor: colors
|
|
153
|
-
primaryInverseBorderColor: colors
|
|
154
|
-
primaryInverseBackground: colors
|
|
155
|
-
primaryInverseHoverBackground: colors
|
|
156
|
-
primaryInverseActiveBackground: colors
|
|
157
|
-
primaryInverseActiveBoxShadow: `${activeShadow} ${colors
|
|
158
|
-
primaryInverseGhostColor: colors
|
|
159
|
-
primaryInverseGhostBorderColor: colors
|
|
153
|
+
primaryInverseColor: colors?.contrasts?.grey125125,
|
|
154
|
+
primaryInverseBorderColor: colors?.contrasts?.grey1214,
|
|
155
|
+
primaryInverseBackground: colors?.contrasts?.white1010,
|
|
156
|
+
primaryInverseHoverBackground: colors?.contrasts?.grey1111,
|
|
157
|
+
primaryInverseActiveBackground: colors?.contrasts?.white1010,
|
|
158
|
+
primaryInverseActiveBoxShadow: `${activeShadow} ${colors?.contrasts?.white1010}`,
|
|
159
|
+
primaryInverseGhostColor: colors?.contrasts?.white1010,
|
|
160
|
+
primaryInverseGhostBorderColor: colors?.contrasts?.white1010,
|
|
160
161
|
primaryInverseGhostBackground: 'transparent',
|
|
161
|
-
primaryInverseGhostHoverBackground: alpha(colors
|
|
162
|
+
primaryInverseGhostHoverBackground: alpha(colors?.contrasts?.white1010, 10),
|
|
162
163
|
primaryInverseGhostActiveBackground: 'transparent',
|
|
163
|
-
primaryInverseGhostActiveBoxShadow: `${activeShadow} ${alpha(colors
|
|
164
|
+
primaryInverseGhostActiveBoxShadow: `${activeShadow} ${alpha(colors?.contrasts?.white1010, 28)}`,
|
|
164
165
|
primaryInverseBoxShadow: 'none',
|
|
165
166
|
primaryInverseGhostBoxShadow: 'none',
|
|
166
167
|
primaryInverseHoverBoxShadow: 'none',
|
|
167
168
|
primaryInverseGhostHoverBoxShadow: 'none',
|
|
168
|
-
aiBackgroundTopGradientColor: colors
|
|
169
|
-
aiBackgroundBottomGradientColor: colors
|
|
170
|
-
aiBorderTopGradientColor: colors
|
|
171
|
-
aiBorderBottomGradientColor: colors
|
|
169
|
+
aiBackgroundTopGradientColor: colors?.contrasts?.violet4570,
|
|
170
|
+
aiBackgroundBottomGradientColor: colors?.contrasts?.sea4570,
|
|
171
|
+
aiBorderTopGradientColor: colors?.contrasts?.violet5790,
|
|
172
|
+
aiBorderBottomGradientColor: colors?.contrasts?.sea5790,
|
|
172
173
|
aiActiveBoxShadow: '0px 0px 5px 0px #013451 inset'
|
|
173
174
|
};
|
|
174
175
|
return {
|