@instructure/ui-tag 10.6.1-snapshot-3 → 10.6.1-snapshot-5

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,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
- ## [10.6.1-snapshot-3](https://github.com/instructure/instructure-ui/compare/v10.6.0...v10.6.1-snapshot-3) (2024-11-20)
6
+ ## [10.6.1-snapshot-5](https://github.com/instructure/instructure-ui/compare/v10.6.0...v10.6.1-snapshot-5) (2024-11-21)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-tag
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-progress,ui-tag:** remove onClick prop from Tag when callback is not provided. Fix Progress dependency mismatch (test-locator) ([de22f76](https://github.com/instructure/instructure-ui/commit/de22f76fd8fcdf6ef0a25788014da26f5fdfdd0e))
9
12
 
10
13
 
11
14
 
package/es/Tag/index.js CHANGED
@@ -94,8 +94,10 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
94
94
  className: className,
95
95
  as: onClick ? 'button' : 'span',
96
96
  margin: margin,
97
- type: onClick ? 'button' : void 0,
98
- onClick: onClick !== null && onClick !== void 0 ? onClick : this.handleClick,
97
+ type: onClick ? 'button' : void 0
98
+ }, onClick && {
99
+ onClick: this.handleClick
100
+ }, {
99
101
  disabled: disabled || readOnly,
100
102
  display: void 0,
101
103
  title: title || (typeof text === 'string' ? text : void 0)
package/lib/Tag/index.js CHANGED
@@ -101,8 +101,10 @@ let Tag = exports.Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
101
101
  className: className,
102
102
  as: onClick ? 'button' : 'span',
103
103
  margin: margin,
104
- type: onClick ? 'button' : void 0,
105
- onClick: onClick !== null && onClick !== void 0 ? onClick : this.handleClick,
104
+ type: onClick ? 'button' : void 0
105
+ }, onClick && {
106
+ onClick: this.handleClick
107
+ }, {
106
108
  disabled: disabled || readOnly,
107
109
  display: void 0,
108
110
  title: title || (typeof text === 'string' ? text : void 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tag",
3
- "version": "10.6.1-snapshot-3",
3
+ "version": "10.6.1-snapshot-5",
4
4
  "description": "A tag component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,22 +24,22 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.25.6",
27
- "@instructure/console": "10.6.1-snapshot-3",
28
- "@instructure/emotion": "10.6.1-snapshot-3",
29
- "@instructure/shared-types": "10.6.1-snapshot-3",
30
- "@instructure/ui-color-utils": "10.6.1-snapshot-3",
31
- "@instructure/ui-dom-utils": "10.6.1-snapshot-3",
32
- "@instructure/ui-icons": "10.6.1-snapshot-3",
33
- "@instructure/ui-react-utils": "10.6.1-snapshot-3",
34
- "@instructure/ui-testable": "10.6.1-snapshot-3",
35
- "@instructure/ui-view": "10.6.1-snapshot-3",
27
+ "@instructure/console": "10.6.1-snapshot-5",
28
+ "@instructure/emotion": "10.6.1-snapshot-5",
29
+ "@instructure/shared-types": "10.6.1-snapshot-5",
30
+ "@instructure/ui-color-utils": "10.6.1-snapshot-5",
31
+ "@instructure/ui-dom-utils": "10.6.1-snapshot-5",
32
+ "@instructure/ui-icons": "10.6.1-snapshot-5",
33
+ "@instructure/ui-react-utils": "10.6.1-snapshot-5",
34
+ "@instructure/ui-testable": "10.6.1-snapshot-5",
35
+ "@instructure/ui-view": "10.6.1-snapshot-5",
36
36
  "prop-types": "^15.8.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-axe-check": "10.6.1-snapshot-3",
40
- "@instructure/ui-babel-preset": "10.6.1-snapshot-3",
41
- "@instructure/ui-test-utils": "10.6.1-snapshot-3",
42
- "@instructure/ui-themes": "10.6.1-snapshot-3",
39
+ "@instructure/ui-axe-check": "10.6.1-snapshot-5",
40
+ "@instructure/ui-babel-preset": "10.6.1-snapshot-5",
41
+ "@instructure/ui-test-utils": "10.6.1-snapshot-5",
42
+ "@instructure/ui-themes": "10.6.1-snapshot-5",
43
43
  "@testing-library/jest-dom": "^6.4.5",
44
44
  "@testing-library/react": "^16.0.1",
45
45
  "@testing-library/user-event": "^14.5.2",
package/src/Tag/README.md CHANGED
@@ -15,7 +15,7 @@ type: example
15
15
 
16
16
  When the `dismissible` prop is added to a clickable Tag, the button
17
17
  renders an X/close icon (the Tag should be dismissed via the `onClick`
18
- prop).
18
+ prop). When implementing dismissable tags, be sure to add [AccessibleContent](#AccessibleContent) to clarify that the tag is dismissible to screen readers.
19
19
 
20
20
  ```js
21
21
  ---
package/src/Tag/index.tsx CHANGED
@@ -122,7 +122,7 @@ class Tag extends Component<TagProps> {
122
122
  as={onClick ? 'button' : 'span'}
123
123
  margin={margin}
124
124
  type={onClick ? 'button' : undefined}
125
- onClick={onClick ?? this.handleClick}
125
+ {...(onClick && { onClick: this.handleClick })}
126
126
  disabled={disabled || readOnly}
127
127
  display={undefined}
128
128
  title={title || (typeof text === 'string' ? text : undefined)}
package/src/Tag/props.ts CHANGED
@@ -42,6 +42,10 @@ import type {
42
42
  type TagOwnProps = {
43
43
  className?: string
44
44
  text: string | React.ReactNode
45
+ /**
46
+ * @deprecated since version 10
47
+ * Use of the title attribute is highly problematic due to accessibility concerns
48
+ */
45
49
  title?: string
46
50
  /**
47
51
  * Whether or not to disable the tag