@instructure/ui-buttons 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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 (79) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/es/BaseButton/v1/index.js +213 -289
  3. package/es/BaseButton/v1/props.js +24 -26
  4. package/es/BaseButton/v1/styles.js +399 -450
  5. package/es/BaseButton/v1/theme.js +140 -177
  6. package/es/BaseButton/v2/index.js +227 -306
  7. package/es/BaseButton/v2/props.js +24 -26
  8. package/es/BaseButton/v2/styles.js +550 -604
  9. package/es/Button/v1/index.js +78 -116
  10. package/es/Button/v1/props.js +19 -26
  11. package/es/Button/v1/theme.js +1 -25
  12. package/es/Button/v2/index.js +81 -118
  13. package/es/Button/v2/props.js +19 -26
  14. package/es/CloseButton/v1/index.js +83 -120
  15. package/es/CloseButton/v1/props.js +17 -26
  16. package/es/CloseButton/v1/styles.js +30 -67
  17. package/es/CloseButton/v1/theme.js +12 -44
  18. package/es/CloseButton/v2/index.js +88 -124
  19. package/es/CloseButton/v2/props.js +17 -26
  20. package/es/CloseButton/v2/styles.js +30 -67
  21. package/es/CondensedButton/v1/index.js +70 -106
  22. package/es/CondensedButton/v1/props.js +16 -26
  23. package/es/CondensedButton/v1/theme.js +1 -25
  24. package/es/CondensedButton/v2/index.js +73 -108
  25. package/es/CondensedButton/v2/props.js +16 -26
  26. package/es/IconButton/v1/index.js +74 -114
  27. package/es/IconButton/v1/props.js +20 -26
  28. package/es/IconButton/v1/theme.js +1 -25
  29. package/es/IconButton/v2/index.js +77 -116
  30. package/es/IconButton/v2/props.js +20 -26
  31. package/es/ToggleButton/v1/index.js +74 -112
  32. package/es/ToggleButton/v1/props.js +17 -26
  33. package/es/ToggleButton/v2/index.js +75 -114
  34. package/es/ToggleButton/v2/props.js +18 -26
  35. package/es/exports/a.js +1 -25
  36. package/es/exports/b.js +1 -25
  37. package/package.json +19 -25
  38. package/src/BaseButton/v1/index.tsx +1 -4
  39. package/src/BaseButton/v2/index.tsx +1 -4
  40. package/tsconfig.build.json +0 -1
  41. package/tsconfig.build.tsbuildinfo +1 -1
  42. package/types/BaseButton/v1/index.d.ts.map +1 -1
  43. package/types/BaseButton/v2/index.d.ts.map +1 -1
  44. package/lib/BaseButton/v1/index.js +0 -318
  45. package/lib/BaseButton/v1/props.js +0 -31
  46. package/lib/BaseButton/v1/styles.js +0 -465
  47. package/lib/BaseButton/v1/theme.js +0 -187
  48. package/lib/BaseButton/v2/index.js +0 -338
  49. package/lib/BaseButton/v2/props.js +0 -31
  50. package/lib/BaseButton/v2/styles.js +0 -625
  51. package/lib/Button/v1/index.js +0 -130
  52. package/lib/Button/v1/props.js +0 -31
  53. package/lib/Button/v1/theme.js +0 -13
  54. package/lib/Button/v2/index.js +0 -130
  55. package/lib/Button/v2/props.js +0 -31
  56. package/lib/CloseButton/v1/index.js +0 -137
  57. package/lib/CloseButton/v1/props.js +0 -31
  58. package/lib/CloseButton/v1/styles.js +0 -76
  59. package/lib/CloseButton/v1/theme.js +0 -51
  60. package/lib/CloseButton/v2/index.js +0 -140
  61. package/lib/CloseButton/v2/props.js +0 -31
  62. package/lib/CloseButton/v2/styles.js +0 -76
  63. package/lib/CondensedButton/v1/index.js +0 -119
  64. package/lib/CondensedButton/v1/props.js +0 -31
  65. package/lib/CondensedButton/v1/theme.js +0 -13
  66. package/lib/CondensedButton/v2/index.js +0 -119
  67. package/lib/CondensedButton/v2/props.js +0 -31
  68. package/lib/IconButton/v1/index.js +0 -129
  69. package/lib/IconButton/v1/props.js +0 -31
  70. package/lib/IconButton/v1/theme.js +0 -13
  71. package/lib/IconButton/v2/index.js +0 -129
  72. package/lib/IconButton/v2/props.js +0 -31
  73. package/lib/ToggleButton/v1/index.js +0 -129
  74. package/lib/ToggleButton/v1/props.js +0 -31
  75. package/lib/ToggleButton/v2/index.js +0 -130
  76. package/lib/ToggleButton/v2/props.js +0 -31
  77. package/lib/exports/a.js +0 -47
  78. package/lib/exports/b.js +0 -47
  79. package/lib/package.json +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
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.9-pr-snapshot-1792147648392](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-pr-snapshot-1792147648392) (2026-10-16)
7
+
8
+ ### Build System
9
+
10
+ * **many:** replace babel with swc ([7e36c54](https://github.com/instructure/instructure-ui/commit/7e36c54d240b4fa483801c03ab18e7f860f561e2))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * **many:** `@instructure/ui-babel-preset` and
15
+ `@instructure/browserslist-config-instui` are removed and will no longer be
16
+ published. Packages depend on `@swc/helpers` instead of `@babel/runtime`.
17
+
18
+
6
19
  ## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
7
20
 
8
21
  ### Features
@@ -1,310 +1,234 @@
1
- var _dec, _class;
2
- /*
3
- * The MIT License (MIT)
4
- *
5
- * Copyright (c) 2015 - present Instructure, Inc.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
-
1
+ import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
26
3
  import { Component } from 'react';
27
4
  import keycode from 'keycode';
28
5
  import { getElementType, getInteraction, passthroughProps, callRenderProp } from '@instructure/ui-react-utils';
29
6
  import { isActiveElement } from '@instructure/ui-dom-utils';
30
7
  import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
31
8
  import { View } from '@instructure/ui-view/v11_6';
32
- // TODO these have to be imported in separate lines because otherwise `isSafari` will be missing from the babel build
33
- // this bug is very likely caused by `babel-plugin-transform-imports` and can be reverted once it is removed from the codebase
34
- import { isSafari, safeLinkProps } from '@instructure/ui-utils';
35
- import { combineDataCid } from '@instructure/ui-utils';
9
+ import { isSafari, safeLinkProps, combineDataCid } from '@instructure/ui-utils';
36
10
  import { withStyle } from '@instructure/emotion';
37
11
  import generateStyles from './styles.js';
38
12
  import generateComponentTheme from './theme.js';
39
13
  import { allowedProps } from './props.js';
40
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
41
- /**
42
- ---
43
- category: components/Util Components
44
- ---
45
- **/
46
- let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec(_class = class BaseButton extends Component {
47
- static displayName = 'BaseButton';
48
- static componentId = 'BaseButton';
49
- static allowedProps = allowedProps;
50
- static defaultProps = {
51
- type: 'button',
52
- size: 'medium',
53
- as: 'button',
54
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
55
- interaction: undefined,
56
- color: 'secondary',
57
- shape: 'rectangle',
58
- display: 'inline-block',
59
- textAlign: 'start',
60
- withBackground: true,
61
- withBorder: true,
62
- isCondensed: false,
63
- margin: '0',
64
- cursor: 'pointer'
65
- };
66
- ref = null;
67
- componentDidMount() {
68
- this.props.makeStyles?.(this.makeStylesVariables);
69
- }
70
- componentDidUpdate() {
71
- this.props.makeStyles?.(this.makeStylesVariables);
72
- }
73
- get makeStylesVariables() {
74
- return {
75
- isDisabled: this.isDisabled,
76
- hasOnlyIconVisible: this.hasOnlyIconVisible,
77
- isEnabled: this.isEnabled
78
- };
79
- }
80
- get hasOnlyIconVisible() {
81
- const {
82
- children,
83
- renderIcon
84
- } = this.props;
85
- return !!(renderIcon && !hasVisibleChildren(children));
86
- }
87
- get elementType() {
88
- return getElementType(BaseButton, this.props);
89
- }
90
- get interaction() {
91
- return getInteraction({
92
- props: this.props
93
- });
94
- }
95
- get isDisabled() {
96
- return this.interaction === 'disabled';
97
- }
98
- get isReadOnly() {
99
- return this.interaction === 'readonly';
100
- }
101
- get isEnabled() {
102
- return this.interaction === 'enabled';
103
- }
104
- get focusColor() {
105
- const {
106
- color,
107
- focusColor,
108
- withBackground
109
- } = this.props;
110
-
111
- // Give user specified focusColor preference
112
- if (focusColor) {
113
- return focusColor;
14
+ class BaseButton extends Component {
15
+ static{
16
+ this.displayName = 'BaseButton';
17
+ }
18
+ static{
19
+ this.componentId = 'BaseButton';
20
+ }
21
+ static{
22
+ this.allowedProps = allowedProps;
23
+ }
24
+ static{
25
+ this.defaultProps = {
26
+ type: 'button',
27
+ size: 'medium',
28
+ as: 'button',
29
+ interaction: undefined,
30
+ color: 'secondary',
31
+ shape: 'rectangle',
32
+ display: 'inline-block',
33
+ textAlign: 'start',
34
+ withBackground: true,
35
+ withBorder: true,
36
+ isCondensed: false,
37
+ margin: '0',
38
+ cursor: 'pointer'
39
+ };
40
+ }
41
+ componentDidMount() {
42
+ this.props.makeStyles?.(this.makeStylesVariables);
43
+ }
44
+ componentDidUpdate() {
45
+ this.props.makeStyles?.(this.makeStylesVariables);
46
+ }
47
+ get makeStylesVariables() {
48
+ return {
49
+ isDisabled: this.isDisabled,
50
+ hasOnlyIconVisible: this.hasOnlyIconVisible,
51
+ isEnabled: this.isEnabled
52
+ };
53
+ }
54
+ get hasOnlyIconVisible() {
55
+ const { children, renderIcon } = this.props;
56
+ return !!(renderIcon && !hasVisibleChildren(children));
57
+ }
58
+ get elementType() {
59
+ return getElementType(BaseButton, this.props);
60
+ }
61
+ get interaction() {
62
+ return getInteraction({
63
+ props: this.props
64
+ });
114
65
  }
115
-
116
- // The `primary-inverse` background has an info focus outline
117
- // by default since it is replacing the `light` button variant.
118
- // Override the focus color with info even though it is
119
- // an inverse color
120
- if (color === 'primary-inverse' && withBackground) {
121
- return 'info';
66
+ get isDisabled() {
67
+ return this.interaction === 'disabled';
122
68
  }
123
- return color.includes('inverse') ? 'inverse' : 'info';
124
- }
125
- get focused() {
126
- return isActiveElement(this.ref);
127
- }
128
- focus() {
129
- this.ref && this.ref.focus();
130
- }
131
- handleElementRef = el => {
132
- const {
133
- elementRef
134
- } = this.props;
135
- this.ref = el;
136
- if (typeof elementRef === 'function') {
137
- elementRef(el);
69
+ get isReadOnly() {
70
+ return this.interaction === 'readonly';
138
71
  }
139
- };
140
- handleClick = event => {
141
- const {
142
- onClick
143
- } = this.props;
144
- const {
145
- interaction
146
- } = this;
147
- if (interaction !== 'enabled') {
148
- event.preventDefault();
149
- event.stopPropagation();
150
- return;
72
+ get isEnabled() {
73
+ return this.interaction === 'enabled';
151
74
  }
152
- if (typeof onClick === 'function') {
153
- onClick(event);
75
+ get focusColor() {
76
+ const { color, focusColor, withBackground } = this.props;
77
+ if (focusColor) {
78
+ return focusColor;
79
+ }
80
+ if (color === 'primary-inverse' && withBackground) {
81
+ return 'info';
82
+ }
83
+ return color.includes('inverse') ? 'inverse' : 'info';
154
84
  }
155
- };
156
- handleKeyDown = event => {
157
- const {
158
- onClick,
159
- onKeyDown,
160
- href
161
- } = this.props;
162
- const {
163
- interaction
164
- } = this;
165
- if (typeof onKeyDown === 'function') {
166
- onKeyDown(event);
85
+ get focused() {
86
+ return isActiveElement(this.ref);
167
87
  }
168
-
169
- // behave like a button when space key is pressed
170
- const {
171
- space,
172
- enter
173
- } = keycode.codes;
174
- if (this.elementType !== 'button' && [space, enter].includes(event.keyCode)) {
175
- event.preventDefault();
176
- event.stopPropagation();
177
- if (typeof onClick === 'function' && interaction === 'enabled') {
178
- onClick(event);
179
- }
180
- if (href) {
181
- this.ref && this.ref.click();
182
- }
88
+ focus() {
89
+ this.ref && this.ref.focus();
183
90
  }
184
- };
185
- renderChildren() {
186
- const {
187
- renderIcon,
188
- children,
189
- styles
190
- } = this.props;
191
- const wrappedChildren = _jsx("span", {
192
- css: styles?.children,
193
- children: children
194
- });
195
- if (!renderIcon) {
196
- return wrappedChildren;
91
+ renderChildren() {
92
+ const { renderIcon, children, styles } = this.props;
93
+ const wrappedChildren = /*#__PURE__*/ _jsx("span", {
94
+ css: styles?.children,
95
+ children: children
96
+ });
97
+ if (!renderIcon) {
98
+ return wrappedChildren;
99
+ }
100
+ const { hasOnlyIconVisible } = this;
101
+ const wrappedIcon = /*#__PURE__*/ _jsx("span", {
102
+ css: styles?.iconSVG,
103
+ children: callRenderProp(renderIcon)
104
+ });
105
+ const flexChildren = hasOnlyIconVisible ? /*#__PURE__*/ _jsxs("span", {
106
+ css: styles?.iconOnly,
107
+ children: [
108
+ wrappedIcon,
109
+ children
110
+ ]
111
+ }) : [
112
+ /*#__PURE__*/ _jsx("span", {
113
+ css: styles?.iconWrapper,
114
+ children: wrappedIcon
115
+ }, "icon"),
116
+ /*#__PURE__*/ _jsx("span", {
117
+ css: styles?.childrenWrapper,
118
+ children: wrappedChildren
119
+ }, "children")
120
+ ];
121
+ return /*#__PURE__*/ _jsx("span", {
122
+ css: styles?.childrenLayout,
123
+ children: flexChildren
124
+ });
197
125
  }
198
- const {
199
- hasOnlyIconVisible
200
- } = this;
201
- const wrappedIcon = _jsx("span", {
202
- css: styles?.iconSVG,
203
- children: callRenderProp(renderIcon)
204
- });
205
- const flexChildren = hasOnlyIconVisible ? _jsxs("span", {
206
- css: styles?.iconOnly,
207
- children: [wrappedIcon, children]
208
- }) : [_jsx("span", {
209
- css: styles?.iconWrapper,
210
- children: wrappedIcon
211
- }, "icon"), _jsx("span", {
212
- css: styles?.childrenWrapper,
213
- children: wrappedChildren
214
- }, "children")];
215
- return _jsx("span", {
216
- css: styles?.childrenLayout,
217
- children: flexChildren
218
- });
219
- }
220
- render() {
221
- const {
222
- type,
223
- size,
224
- elementRef,
225
- as,
226
- href: rawHref,
227
- color,
228
- focusColor,
229
- textAlign,
230
- shape,
231
- display,
232
- withBackground,
233
- withBorder,
234
- isCondensed,
235
- margin,
236
- cursor,
237
- onClick,
238
- renderIcon,
239
- tabIndex,
240
- styles,
241
- makeStyles,
242
- withFocusOutline,
243
- ...props
244
- } = this.props;
245
- const {
246
- isDisabled,
247
- isReadOnly,
248
- elementType
249
- } = this;
250
- const {
251
- href,
252
- rel
253
- } = safeLinkProps({
254
- tag: typeof elementType == 'string' ? elementType : 'button',
255
- attr: 'href',
256
- href: rawHref,
257
- target: props.target,
258
- rel: props.rel
259
- });
260
-
261
- // only add 0 tabIndex value if it doesn't have it by default, see
262
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
263
- let needsZeroTabIndex = true;
264
- if (typeof elementType == 'string') {
265
- if (['button', 'frame', 'iframe', 'input', 'object', 'select', 'textarea', 'summary'].includes(elementType)) {
266
- needsZeroTabIndex = false;
267
- }
268
- if (href && (elementType === 'a' || elementType === 'area')) {
269
- needsZeroTabIndex = false;
270
- }
126
+ render() {
127
+ const { type, size, elementRef, as, href: rawHref, color, focusColor, textAlign, shape, display, withBackground, withBorder, isCondensed, margin, cursor, onClick, renderIcon, tabIndex, styles, makeStyles, withFocusOutline, ...props } = this.props;
128
+ const { isDisabled, isReadOnly, elementType } = this;
129
+ const { href, rel } = safeLinkProps({
130
+ tag: typeof elementType == 'string' ? elementType : 'button',
131
+ attr: 'href',
132
+ href: rawHref,
133
+ target: props.target,
134
+ rel: props.rel
135
+ });
136
+ let needsZeroTabIndex = true;
137
+ if (typeof elementType == 'string') {
138
+ if ([
139
+ 'button',
140
+ 'frame',
141
+ 'iframe',
142
+ 'input',
143
+ 'object',
144
+ 'select',
145
+ 'textarea',
146
+ 'summary'
147
+ ].includes(elementType)) {
148
+ needsZeroTabIndex = false;
149
+ }
150
+ if (href && (elementType === 'a' || elementType === 'area')) {
151
+ needsZeroTabIndex = false;
152
+ }
153
+ }
154
+ let tabIndexValue = tabIndex;
155
+ if (onClick && as && needsZeroTabIndex || isSafari() && as) {
156
+ tabIndexValue = tabIndex || 0;
157
+ }
158
+ return /*#__PURE__*/ _jsx(View, {
159
+ ...passthroughProps(props),
160
+ as: elementType,
161
+ focusColor: this.focusColor,
162
+ position: "relative",
163
+ display: display,
164
+ width: display === 'block' ? '100%' : 'auto',
165
+ borderRadius: shape === 'circle' ? 'circle' : 'medium',
166
+ background: "transparent",
167
+ padding: "none",
168
+ borderWidth: "none",
169
+ margin: margin,
170
+ cursor: isDisabled ? 'not-allowed' : cursor,
171
+ href: href,
172
+ rel: rel,
173
+ type: href ? undefined : type,
174
+ elementRef: this.handleElementRef,
175
+ onClick: this.handleClick,
176
+ onKeyDown: this.handleKeyDown,
177
+ role: onClick && as !== 'button' ? 'button' : undefined,
178
+ tabIndex: tabIndexValue,
179
+ disabled: isDisabled || isReadOnly,
180
+ css: styles?.baseButton,
181
+ withFocusOutline: withFocusOutline,
182
+ "data-cid": combineDataCid('BaseButton', this.props),
183
+ children: /*#__PURE__*/ _jsx("span", {
184
+ css: styles?.content,
185
+ children: this.renderChildren()
186
+ })
187
+ });
271
188
  }
272
- let tabIndexValue = tabIndex;
273
- // In Safari, a button cannot get focus unless it has an explicit 0 tabindex
274
- if (onClick && as && needsZeroTabIndex || isSafari() && as) {
275
- tabIndexValue = tabIndex || 0;
189
+ constructor(...args){
190
+ super(...args), this.ref = null, this.handleElementRef = (el)=>{
191
+ const { elementRef } = this.props;
192
+ this.ref = el;
193
+ if (typeof elementRef === 'function') {
194
+ elementRef(el);
195
+ }
196
+ }, this.handleClick = (event)=>{
197
+ const { onClick } = this.props;
198
+ const { interaction } = this;
199
+ if (interaction !== 'enabled') {
200
+ event.preventDefault();
201
+ event.stopPropagation();
202
+ return;
203
+ }
204
+ if (typeof onClick === 'function') {
205
+ onClick(event);
206
+ }
207
+ }, this.handleKeyDown = (event)=>{
208
+ const { onClick, onKeyDown, href } = this.props;
209
+ const { interaction } = this;
210
+ if (typeof onKeyDown === 'function') {
211
+ onKeyDown(event);
212
+ }
213
+ const { space, enter } = keycode.codes;
214
+ if (this.elementType !== 'button' && [
215
+ space,
216
+ enter
217
+ ].includes(event.keyCode)) {
218
+ event.preventDefault();
219
+ event.stopPropagation();
220
+ if (typeof onClick === 'function' && interaction === 'enabled') {
221
+ onClick(event);
222
+ }
223
+ if (href) {
224
+ this.ref && this.ref.click();
225
+ }
226
+ }
227
+ };
276
228
  }
277
- return _jsx(View, {
278
- ...passthroughProps(props),
279
- as: elementType,
280
- focusColor: this.focusColor,
281
- position: "relative",
282
- display: display,
283
- width: display === 'block' ? '100%' : 'auto',
284
- borderRadius: shape === 'circle' ? 'circle' : 'medium',
285
- background: "transparent",
286
- padding: "none",
287
- borderWidth: "none",
288
- margin: margin,
289
- cursor: isDisabled ? 'not-allowed' : cursor,
290
- href: href,
291
- rel: rel,
292
- type: href ? undefined : type,
293
- elementRef: this.handleElementRef,
294
- onClick: this.handleClick,
295
- onKeyDown: this.handleKeyDown,
296
- role: onClick && as !== 'button' ? 'button' : undefined,
297
- tabIndex: tabIndexValue,
298
- disabled: isDisabled || isReadOnly,
299
- css: styles?.baseButton,
300
- withFocusOutline: withFocusOutline,
301
- "data-cid": combineDataCid('BaseButton', this.props),
302
- children: _jsx("span", {
303
- css: styles?.content,
304
- children: this.renderChildren()
305
- })
306
- });
307
- }
308
- }) || _class);
229
+ }
230
+ BaseButton = _ts_decorate([
231
+ withStyle(generateStyles, generateComponentTheme)
232
+ ], BaseButton);
309
233
  export { BaseButton };
310
- export default BaseButton;
234
+ export default BaseButton;
@@ -1,26 +1,24 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- const allowedProps = ['as', 'children', 'color', 'cursor', 'display', 'elementRef', 'focusColor', 'href', 'interaction', 'isCondensed', 'margin', 'onClick', 'onKeyDown', 'renderIcon', 'shape', 'size', 'tabIndex', 'textAlign', 'type', 'withBackground', 'withBorder'];
26
- export { allowedProps };
1
+ const allowedProps = [
2
+ 'as',
3
+ 'children',
4
+ 'color',
5
+ 'cursor',
6
+ 'display',
7
+ 'elementRef',
8
+ 'focusColor',
9
+ 'href',
10
+ 'interaction',
11
+ 'isCondensed',
12
+ 'margin',
13
+ 'onClick',
14
+ 'onKeyDown',
15
+ 'renderIcon',
16
+ 'shape',
17
+ 'size',
18
+ 'tabIndex',
19
+ 'textAlign',
20
+ 'type',
21
+ 'withBackground',
22
+ 'withBorder'
23
+ ];
24
+ export { allowedProps };