@instructure/ui-buttons 10.25.0 → 10.25.1-snapshot-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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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
+ ## [10.25.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.25.1-snapshot-0) (2025-09-11)
7
+
8
+
9
+ ### Features
10
+
11
+ * **ui-buttons:** expose display prop on CondensedButton ([c827833](https://github.com/instructure/instructure-ui/commit/c8278332fb8cae64cb6e3608baf7a748e118849c))
12
+
13
+
14
+
15
+
16
+
6
17
  # [10.25.0](https://github.com/instructure/instructure-ui/compare/v10.24.2...v10.25.0) (2025-09-09)
7
18
 
8
19
 
@@ -1,5 +1,5 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["children", "type", "size", "elementRef", "as", "interaction", "color", "margin", "cursor", "href", "renderIcon"];
2
+ const _excluded = ["children", "type", "size", "elementRef", "as", "interaction", "color", "margin", "cursor", "href", "renderIcon", "display"];
3
3
  var _dec, _dec2, _class, _CondensedButton;
4
4
  /*
5
5
  * The MIT License (MIT)
@@ -71,11 +71,13 @@ let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = t
71
71
  cursor = _this$props.cursor,
72
72
  href = _this$props.href,
73
73
  renderIcon = _this$props.renderIcon,
74
+ display = _this$props.display,
74
75
  props = _objectWithoutProperties(_this$props, _excluded);
75
76
  const themeOverride = this.props.themeOverride;
76
77
  return _jsx(BaseButton, {
77
78
  ...passthroughProps(props),
78
79
  isCondensed: true,
80
+ display: display,
79
81
  withBackground: false,
80
82
  withBorder: false,
81
83
  type: type,
@@ -103,7 +105,8 @@ let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = t
103
105
  interaction: void 0,
104
106
  color: 'primary',
105
107
  margin: '0',
106
- cursor: 'pointer'
108
+ cursor: 'pointer',
109
+ display: 'inline-block'
107
110
  }, _CondensedButton)) || _class) || _class);
108
111
  export default CondensedButton;
109
112
  export { CondensedButton };
@@ -35,7 +35,8 @@ const propTypes = {
35
35
  cursor: PropTypes.string,
36
36
  href: PropTypes.string,
37
37
  renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
38
- onClick: PropTypes.func
38
+ onClick: PropTypes.func,
39
+ display: PropTypes.oneOf(['inline-block', 'block'])
39
40
  };
40
- const allowedProps = ['as', 'children', 'color', 'cursor', 'elementRef', 'href', 'interaction', 'margin', 'renderIcon', 'size', 'type', 'onClick'];
41
+ const allowedProps = ['as', 'children', 'color', 'cursor', 'elementRef', 'href', 'interaction', 'margin', 'renderIcon', 'size', 'type', 'onClick', 'display'];
41
42
  export { propTypes, allowedProps };
@@ -14,7 +14,7 @@ var _theme = _interopRequireDefault(require("./theme"));
14
14
  var _BaseButton = require("../BaseButton");
15
15
  var _props = require("./props");
16
16
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
17
- const _excluded = ["children", "type", "size", "elementRef", "as", "interaction", "color", "margin", "cursor", "href", "renderIcon"];
17
+ const _excluded = ["children", "type", "size", "elementRef", "as", "interaction", "color", "margin", "cursor", "href", "renderIcon", "display"];
18
18
  var _dec, _dec2, _class, _CondensedButton;
19
19
  /*
20
20
  * The MIT License (MIT)
@@ -77,11 +77,13 @@ let CondensedButton = exports.CondensedButton = (_dec = (0, _emotion.withStyle)(
77
77
  cursor = _this$props.cursor,
78
78
  href = _this$props.href,
79
79
  renderIcon = _this$props.renderIcon,
80
+ display = _this$props.display,
80
81
  props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
81
82
  const themeOverride = this.props.themeOverride;
82
83
  return (0, _jsxRuntime.jsx)(_BaseButton.BaseButton, {
83
84
  ...(0, _passthroughProps.passthroughProps)(props),
84
85
  isCondensed: true,
86
+ display: display,
85
87
  withBackground: false,
86
88
  withBorder: false,
87
89
  type: type,
@@ -109,6 +111,7 @@ let CondensedButton = exports.CondensedButton = (_dec = (0, _emotion.withStyle)(
109
111
  interaction: void 0,
110
112
  color: 'primary',
111
113
  margin: '0',
112
- cursor: 'pointer'
114
+ cursor: 'pointer',
115
+ display: 'inline-block'
113
116
  }, _CondensedButton)) || _class) || _class);
114
117
  var _default = exports.default = CondensedButton;
@@ -42,6 +42,7 @@ const propTypes = exports.propTypes = {
42
42
  cursor: _propTypes.default.string,
43
43
  href: _propTypes.default.string,
44
44
  renderIcon: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
45
- onClick: _propTypes.default.func
45
+ onClick: _propTypes.default.func,
46
+ display: _propTypes.default.oneOf(['inline-block', 'block'])
46
47
  };
47
- const allowedProps = exports.allowedProps = ['as', 'children', 'color', 'cursor', 'elementRef', 'href', 'interaction', 'margin', 'renderIcon', 'size', 'type', 'onClick'];
48
+ const allowedProps = exports.allowedProps = ['as', 'children', 'color', 'cursor', 'elementRef', 'href', 'interaction', 'margin', 'renderIcon', 'size', 'type', 'onClick', 'display'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-buttons",
3
- "version": "10.25.0",
3
+ "version": "10.25.1-snapshot-0",
4
4
  "description": "Accessible button components",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "10.25.0",
27
- "@instructure/ui-babel-preset": "10.25.0",
28
- "@instructure/ui-themes": "10.25.0",
26
+ "@instructure/ui-axe-check": "10.25.1-snapshot-0",
27
+ "@instructure/ui-babel-preset": "10.25.1-snapshot-0",
28
+ "@instructure/ui-themes": "10.25.1-snapshot-0",
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
30
  "@testing-library/react": "^16.0.1",
31
31
  "@testing-library/user-event": "^14.6.1",
@@ -33,21 +33,21 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.27.6",
36
- "@instructure/console": "10.25.0",
37
- "@instructure/emotion": "10.25.0",
38
- "@instructure/shared-types": "10.25.0",
39
- "@instructure/ui-a11y-content": "10.25.0",
40
- "@instructure/ui-a11y-utils": "10.25.0",
41
- "@instructure/ui-color-utils": "10.25.0",
42
- "@instructure/ui-dom-utils": "10.25.0",
43
- "@instructure/ui-icons": "10.25.0",
44
- "@instructure/ui-position": "10.25.0",
45
- "@instructure/ui-prop-types": "10.25.0",
46
- "@instructure/ui-react-utils": "10.25.0",
47
- "@instructure/ui-testable": "10.25.0",
48
- "@instructure/ui-tooltip": "10.25.0",
49
- "@instructure/ui-utils": "10.25.0",
50
- "@instructure/ui-view": "10.25.0",
36
+ "@instructure/console": "10.25.1-snapshot-0",
37
+ "@instructure/emotion": "10.25.1-snapshot-0",
38
+ "@instructure/shared-types": "10.25.1-snapshot-0",
39
+ "@instructure/ui-a11y-content": "10.25.1-snapshot-0",
40
+ "@instructure/ui-a11y-utils": "10.25.1-snapshot-0",
41
+ "@instructure/ui-color-utils": "10.25.1-snapshot-0",
42
+ "@instructure/ui-dom-utils": "10.25.1-snapshot-0",
43
+ "@instructure/ui-icons": "10.25.1-snapshot-0",
44
+ "@instructure/ui-position": "10.25.1-snapshot-0",
45
+ "@instructure/ui-prop-types": "10.25.1-snapshot-0",
46
+ "@instructure/ui-react-utils": "10.25.1-snapshot-0",
47
+ "@instructure/ui-testable": "10.25.1-snapshot-0",
48
+ "@instructure/ui-tooltip": "10.25.1-snapshot-0",
49
+ "@instructure/ui-utils": "10.25.1-snapshot-0",
50
+ "@instructure/ui-view": "10.25.1-snapshot-0",
51
51
  "keycode": "^2",
52
52
  "prop-types": "^15.8.1"
53
53
  },
@@ -56,7 +56,8 @@ class CondensedButton extends Component<CondensedButtonProps> {
56
56
  interaction: undefined,
57
57
  color: 'primary',
58
58
  margin: '0',
59
- cursor: 'pointer'
59
+ cursor: 'pointer',
60
+ display: 'inline-block'
60
61
  }
61
62
 
62
63
  _baseButton: BaseButton | null = null
@@ -94,6 +95,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
94
95
  cursor,
95
96
  href,
96
97
  renderIcon,
98
+ display,
97
99
  ...props
98
100
  } = this.props
99
101
 
@@ -103,6 +105,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
103
105
  <BaseButton
104
106
  {...passthroughProps(props)}
105
107
  isCondensed
108
+ display={display}
106
109
  withBackground={false}
107
110
  withBorder={false}
108
111
  type={type}
@@ -101,6 +101,11 @@ type CondensedButtonOwnProps = {
101
101
  onClick?: (
102
102
  event: React.KeyboardEvent<ViewProps> | React.MouseEvent<ViewProps>
103
103
  ) => void
104
+
105
+ /**
106
+ * The CSS display property of the button, `inline-block` or `block`
107
+ */
108
+ display?: 'inline-block' | 'block'
104
109
  }
105
110
 
106
111
  type PropKeys = keyof CondensedButtonOwnProps
@@ -124,7 +129,8 @@ const propTypes: PropValidators<PropKeys> = {
124
129
  cursor: PropTypes.string,
125
130
  href: PropTypes.string,
126
131
  renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
127
- onClick: PropTypes.func
132
+ onClick: PropTypes.func,
133
+ display: PropTypes.oneOf(['inline-block', 'block'])
128
134
  }
129
135
 
130
136
  const allowedProps: AllowedPropKeys = [
@@ -139,7 +145,8 @@ const allowedProps: AllowedPropKeys = [
139
145
  'renderIcon',
140
146
  'size',
141
147
  'type',
142
- 'onClick'
148
+ 'onClick',
149
+ 'display'
143
150
  ]
144
151
 
145
152
  export type { CondensedButtonProps }