@instructure/ui-buttons 11.7.5 → 11.7.6-snapshot-11
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 +11 -0
- package/es/ToggleButton/v2/index.js +3 -1
- package/es/ToggleButton/v2/props.js +1 -1
- package/lib/ToggleButton/v2/index.js +3 -1
- package/lib/ToggleButton/v2/props.js +1 -1
- package/package.json +17 -17
- package/src/ToggleButton/v2/index.tsx +2 -0
- package/src/ToggleButton/v2/props.ts +9 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/BaseButton/v1/index.d.ts +10 -10
- package/types/BaseButton/v1/index.d.ts.map +1 -1
- package/types/BaseButton/v1/styles.d.ts.map +1 -1
- package/types/BaseButton/v1/theme.d.ts.map +1 -1
- package/types/BaseButton/v2/index.d.ts +9 -9
- package/types/BaseButton/v2/index.d.ts.map +1 -1
- package/types/BaseButton/v2/styles.d.ts +1 -1
- package/types/BaseButton/v2/styles.d.ts.map +1 -1
- package/types/Button/v1/index.d.ts +7 -7
- package/types/Button/v1/index.d.ts.map +1 -1
- package/types/Button/v2/index.d.ts +7 -7
- package/types/Button/v2/index.d.ts.map +1 -1
- package/types/CloseButton/v1/index.d.ts +6 -6
- package/types/CloseButton/v1/index.d.ts.map +1 -1
- package/types/CloseButton/v1/styles.d.ts.map +1 -1
- package/types/CloseButton/v1/theme.d.ts.map +1 -1
- package/types/CloseButton/v2/index.d.ts +6 -6
- package/types/CloseButton/v2/index.d.ts.map +1 -1
- package/types/CloseButton/v2/styles.d.ts +1 -1
- package/types/CloseButton/v2/styles.d.ts.map +1 -1
- package/types/CondensedButton/v1/index.d.ts +5 -5
- package/types/CondensedButton/v1/index.d.ts.map +1 -1
- package/types/CondensedButton/v2/index.d.ts +5 -5
- package/types/CondensedButton/v2/index.d.ts.map +1 -1
- package/types/IconButton/v1/index.d.ts +6 -6
- package/types/IconButton/v1/index.d.ts.map +1 -1
- package/types/IconButton/v2/index.d.ts +6 -6
- package/types/IconButton/v2/index.d.ts.map +1 -1
- package/types/ToggleButton/v1/index.d.ts +4 -4
- package/types/ToggleButton/v1/index.d.ts.map +1 -1
- package/types/ToggleButton/v2/index.d.ts +5 -4
- package/types/ToggleButton/v2/index.d.ts.map +1 -1
- package/types/ToggleButton/v2/props.d.ts +7 -0
- package/types/ToggleButton/v2/props.d.ts.map +1 -1
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
|
+
## [11.7.6-snapshot-11](https://github.com/instructure/instructure-ui/compare/v11.7.5...v11.7.6-snapshot-11) (2026-08-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **many:** add margin prop to v2 FormFieldGroup, CheckboxGroup, RadioInputGroup, Checkbox, RadioInput, RangeInput, Text, and ToggleButton ([fea952f](https://github.com/instructure/instructure-ui/commit/fea952f22e553745c299eeba1a2700dbb3b9d296))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [11.7.5](https://github.com/instructure/instructure-ui/compare/v11.7.4...v11.7.5) (2026-08-25)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @instructure/ui-buttons
|
|
@@ -80,6 +80,7 @@ class ToggleButton extends Component {
|
|
|
80
80
|
status,
|
|
81
81
|
placement,
|
|
82
82
|
onClick,
|
|
83
|
+
margin,
|
|
83
84
|
...props
|
|
84
85
|
} = this.props;
|
|
85
86
|
return _jsx(Tooltip, {
|
|
@@ -113,7 +114,8 @@ class ToggleButton extends Component {
|
|
|
113
114
|
interaction: interaction,
|
|
114
115
|
"aria-pressed": status === 'pressed',
|
|
115
116
|
"data-cid": "ToggleButton",
|
|
116
|
-
renderIcon: renderIcon
|
|
117
|
+
renderIcon: renderIcon,
|
|
118
|
+
margin: margin
|
|
117
119
|
})
|
|
118
120
|
});
|
|
119
121
|
}
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
const allowedProps = ['as', 'color', 'constrain', 'elementRef', 'interaction', 'isShowingTooltip', 'mountNode', 'onClick', 'placement', 'renderIcon', 'renderTooltipContent', 'screenReaderLabel', 'size', 'status'];
|
|
25
|
+
const allowedProps = ['as', 'color', 'constrain', 'elementRef', 'interaction', 'isShowingTooltip', 'margin', 'mountNode', 'onClick', 'placement', 'renderIcon', 'renderTooltipContent', 'screenReaderLabel', 'size', 'status'];
|
|
26
26
|
export { allowedProps };
|
|
@@ -86,6 +86,7 @@ class ToggleButton extends _react.Component {
|
|
|
86
86
|
status,
|
|
87
87
|
placement,
|
|
88
88
|
onClick,
|
|
89
|
+
margin,
|
|
89
90
|
...props
|
|
90
91
|
} = this.props;
|
|
91
92
|
return (0, _jsxRuntime.jsx)(_latest.Tooltip, {
|
|
@@ -119,7 +120,8 @@ class ToggleButton extends _react.Component {
|
|
|
119
120
|
interaction: interaction,
|
|
120
121
|
"aria-pressed": status === 'pressed',
|
|
121
122
|
"data-cid": "ToggleButton",
|
|
122
|
-
renderIcon: renderIcon
|
|
123
|
+
renderIcon: renderIcon,
|
|
124
|
+
margin: margin
|
|
123
125
|
})
|
|
124
126
|
});
|
|
125
127
|
}
|
|
@@ -28,4 +28,4 @@ exports.allowedProps = void 0;
|
|
|
28
28
|
* SOFTWARE.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
const allowedProps = exports.allowedProps = ['as', 'color', 'constrain', 'elementRef', 'interaction', 'isShowingTooltip', 'mountNode', 'onClick', 'placement', 'renderIcon', 'renderTooltipContent', 'screenReaderLabel', 'size', 'status'];
|
|
31
|
+
const allowedProps = exports.allowedProps = ['as', 'color', 'constrain', 'elementRef', 'interaction', 'isShowingTooltip', 'margin', 'mountNode', 'onClick', 'placement', 'renderIcon', 'renderTooltipContent', 'screenReaderLabel', 'size', 'status'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-buttons",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.6-snapshot-11",
|
|
4
4
|
"description": "Accessible button components",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -16,28 +16,28 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
18
|
"keycode": "^2",
|
|
19
|
-
"@instructure/console": "11.7.
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/ui-a11y-
|
|
23
|
-
"@instructure/
|
|
24
|
-
"@instructure/ui-color-utils": "11.7.
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-
|
|
28
|
-
"@instructure/ui-
|
|
29
|
-
"@instructure/ui-themes": "11.7.
|
|
30
|
-
"@instructure/ui-
|
|
31
|
-
"@instructure/ui-
|
|
32
|
-
"@instructure/ui-view": "11.7.
|
|
19
|
+
"@instructure/console": "11.7.6-snapshot-11",
|
|
20
|
+
"@instructure/emotion": "11.7.6-snapshot-11",
|
|
21
|
+
"@instructure/shared-types": "11.7.6-snapshot-11",
|
|
22
|
+
"@instructure/ui-a11y-content": "11.7.6-snapshot-11",
|
|
23
|
+
"@instructure/ui-a11y-utils": "11.7.6-snapshot-11",
|
|
24
|
+
"@instructure/ui-color-utils": "11.7.6-snapshot-11",
|
|
25
|
+
"@instructure/ui-icons": "11.7.6-snapshot-11",
|
|
26
|
+
"@instructure/ui-dom-utils": "11.7.6-snapshot-11",
|
|
27
|
+
"@instructure/ui-react-utils": "11.7.6-snapshot-11",
|
|
28
|
+
"@instructure/ui-tooltip": "11.7.6-snapshot-11",
|
|
29
|
+
"@instructure/ui-themes": "11.7.6-snapshot-11",
|
|
30
|
+
"@instructure/ui-position": "11.7.6-snapshot-11",
|
|
31
|
+
"@instructure/ui-utils": "11.7.6-snapshot-11",
|
|
32
|
+
"@instructure/ui-view": "11.7.6-snapshot-11"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@testing-library/jest-dom": "^6.9.1",
|
|
36
36
|
"@testing-library/react": "16.3.2",
|
|
37
37
|
"@testing-library/user-event": "^14.6.1",
|
|
38
38
|
"vitest": "^4.1.9",
|
|
39
|
-
"@instructure/ui-axe-check": "11.7.
|
|
40
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
39
|
+
"@instructure/ui-axe-check": "11.7.6-snapshot-11",
|
|
40
|
+
"@instructure/ui-babel-preset": "11.7.6-snapshot-11"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=18 <=19"
|
|
@@ -91,6 +91,7 @@ class ToggleButton extends Component<ToggleButtonProps, ToggleButtonState> {
|
|
|
91
91
|
status,
|
|
92
92
|
placement,
|
|
93
93
|
onClick,
|
|
94
|
+
margin,
|
|
94
95
|
...props
|
|
95
96
|
} = this.props
|
|
96
97
|
|
|
@@ -124,6 +125,7 @@ class ToggleButton extends Component<ToggleButtonProps, ToggleButtonState> {
|
|
|
124
125
|
aria-pressed={status === 'pressed'}
|
|
125
126
|
data-cid="ToggleButton"
|
|
126
127
|
renderIcon={renderIcon}
|
|
128
|
+
margin={margin}
|
|
127
129
|
/>
|
|
128
130
|
</Tooltip>
|
|
129
131
|
)
|
|
@@ -35,6 +35,7 @@ import type {
|
|
|
35
35
|
} from '@instructure/ui-position'
|
|
36
36
|
import type { ViewProps } from '@instructure/ui-view/latest'
|
|
37
37
|
import { Renderable } from '@instructure/shared-types'
|
|
38
|
+
import type { Spacing } from '@instructure/emotion'
|
|
38
39
|
|
|
39
40
|
type ToggleButtonOwnProps = {
|
|
40
41
|
/**
|
|
@@ -110,6 +111,13 @@ type ToggleButtonOwnProps = {
|
|
|
110
111
|
* or a function returning an element.
|
|
111
112
|
*/
|
|
112
113
|
constrain?: PositionConstraint
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Valid values are `0`, `none`, `auto`, and Spacing token values,
|
|
117
|
+
* see https://instructure.design/layout-spacing. Apply these values via
|
|
118
|
+
* familiar CSS-like shorthand. For example, `margin="general.spaceMd auto"`.
|
|
119
|
+
*/
|
|
120
|
+
margin?: Spacing
|
|
113
121
|
}
|
|
114
122
|
|
|
115
123
|
type PropKeys = keyof ToggleButtonOwnProps
|
|
@@ -129,6 +137,7 @@ const allowedProps: AllowedPropKeys = [
|
|
|
129
137
|
'elementRef',
|
|
130
138
|
'interaction',
|
|
131
139
|
'isShowingTooltip',
|
|
140
|
+
'margin',
|
|
132
141
|
'mountNode',
|
|
133
142
|
'onClick',
|
|
134
143
|
'placement',
|