@instructure/ui-tabs 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.
Files changed (40) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/es/Tabs/v1/index.js +5 -6
  3. package/es/Tabs/v2/index.js +5 -6
  4. package/lib/Tabs/v1/index.js +5 -5
  5. package/lib/Tabs/v2/index.js +5 -5
  6. package/package.json +16 -17
  7. package/src/Tabs/v1/index.tsx +4 -3
  8. package/src/Tabs/v1/props.ts +2 -0
  9. package/src/Tabs/v2/index.tsx +4 -3
  10. package/src/Tabs/v2/props.ts +2 -0
  11. package/tsconfig.build.json +1 -2
  12. package/tsconfig.build.tsbuildinfo +1 -1
  13. package/types/Tabs/v1/Panel/index.d.ts +2 -2
  14. package/types/Tabs/v1/Panel/index.d.ts.map +1 -1
  15. package/types/Tabs/v1/Panel/styles.d.ts.map +1 -1
  16. package/types/Tabs/v1/Panel/theme.d.ts.map +1 -1
  17. package/types/Tabs/v1/Tab/index.d.ts +1 -1
  18. package/types/Tabs/v1/Tab/index.d.ts.map +1 -1
  19. package/types/Tabs/v1/Tab/styles.d.ts.map +1 -1
  20. package/types/Tabs/v1/Tab/theme.d.ts.map +1 -1
  21. package/types/Tabs/v1/index.d.ts +3 -3
  22. package/types/Tabs/v1/index.d.ts.map +1 -1
  23. package/types/Tabs/v1/props.d.ts +2 -1
  24. package/types/Tabs/v1/props.d.ts.map +1 -1
  25. package/types/Tabs/v1/styles.d.ts.map +1 -1
  26. package/types/Tabs/v1/theme.d.ts.map +1 -1
  27. package/types/Tabs/v2/Panel/index.d.ts +2 -2
  28. package/types/Tabs/v2/Panel/index.d.ts.map +1 -1
  29. package/types/Tabs/v2/Panel/styles.d.ts +1 -1
  30. package/types/Tabs/v2/Panel/styles.d.ts.map +1 -1
  31. package/types/Tabs/v2/Tab/index.d.ts +1 -1
  32. package/types/Tabs/v2/Tab/index.d.ts.map +1 -1
  33. package/types/Tabs/v2/Tab/styles.d.ts +1 -1
  34. package/types/Tabs/v2/Tab/styles.d.ts.map +1 -1
  35. package/types/Tabs/v2/index.d.ts +3 -3
  36. package/types/Tabs/v2/index.d.ts.map +1 -1
  37. package/types/Tabs/v2/props.d.ts +2 -1
  38. package/types/Tabs/v2/props.d.ts.map +1 -1
  39. package/types/Tabs/v2/styles.d.ts +1 -1
  40. package/types/Tabs/v2/styles.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
+ ### Bug Fixes
10
+
11
+ * **many:** generate deterministic ids with React useId ([83aa25a](https://github.com/instructure/instructure-ui/commit/83aa25aebd41720fd09beac025dbf961e1f413c2))
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-tabs
@@ -1,4 +1,4 @@
1
- var _dec, _class;
1
+ var _dec, _dec2, _class;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -26,9 +26,8 @@ var _dec, _class;
26
26
  import { cloneElement, Children, Component } from 'react';
27
27
  import keycode from 'keycode';
28
28
  import { View } from '@instructure/ui-view/v11_6';
29
- import { matchComponentTypes, safeCloneElement, passthroughProps } from '@instructure/ui-react-utils';
29
+ import { matchComponentTypes, safeCloneElement, passthroughProps, withDeterministicId } from '@instructure/ui-react-utils';
30
30
  import { logError as error } from '@instructure/console';
31
- import { uid } from '@instructure/uid';
32
31
  import { Focusable } from '@instructure/ui-focusable';
33
32
  import { getBoundingClientRect } from '@instructure/ui-dom-utils';
34
33
  import { debounce } from '@instructure/debounce';
@@ -45,7 +44,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
45
44
  category: components
46
45
  ---
47
46
  **/
48
- let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Tabs extends Component {
47
+ let Tabs = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class Tabs extends Component {
49
48
  static displayName = 'Tabs';
50
49
  static componentId = 'Tabs';
51
50
  static allowedProps = allowedProps;
@@ -347,7 +346,7 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
347
346
  Children.toArray(children).map((child, index) => {
348
347
  if (matchComponentTypes(child, [Panel])) {
349
348
  const selected = !child.props.isDisabled && (child.props.isSelected || selectedIndex === index);
350
- const id = uid();
349
+ const id = this.props.deterministicId(`Tabs_${index}`);
351
350
  tabs.push(this.createTab(index, id, selected, child));
352
351
  if (activePanels.length === 1) {
353
352
  panels.push(this.clonePanel(index, id, selected, child, activePanels[0]));
@@ -399,6 +398,6 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
399
398
  })]
400
399
  });
401
400
  }
402
- }) || _class);
401
+ }) || _class) || _class);
403
402
  export default Tabs;
404
403
  export { Tabs, Panel };
@@ -1,4 +1,4 @@
1
- var _dec, _class;
1
+ var _dec, _dec2, _class;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -26,9 +26,8 @@ var _dec, _class;
26
26
  import { cloneElement, Children, Component } from 'react';
27
27
  import keycode from 'keycode';
28
28
  import { View } from '@instructure/ui-view/latest';
29
- import { matchComponentTypes, safeCloneElement, passthroughProps } from '@instructure/ui-react-utils';
29
+ import { matchComponentTypes, safeCloneElement, passthroughProps, withDeterministicId } from '@instructure/ui-react-utils';
30
30
  import { logError as error } from '@instructure/console';
31
- import { uid } from '@instructure/uid';
32
31
  import { Focusable } from '@instructure/ui-focusable';
33
32
  import { getBoundingClientRect } from '@instructure/ui-dom-utils';
34
33
  import { debounce } from '@instructure/debounce';
@@ -44,7 +43,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
44
43
  category: components
45
44
  ---
46
45
  **/
47
- let Tabs = (_dec = withStyleNew(generateStyle), _dec(_class = class Tabs extends Component {
46
+ let Tabs = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle), _dec(_class = _dec2(_class = class Tabs extends Component {
48
47
  static displayName = 'Tabs';
49
48
  static componentId = 'Tabs';
50
49
  static allowedProps = allowedProps;
@@ -346,7 +345,7 @@ let Tabs = (_dec = withStyleNew(generateStyle), _dec(_class = class Tabs extends
346
345
  Children.toArray(children).map((child, index) => {
347
346
  if (matchComponentTypes(child, [Panel])) {
348
347
  const selected = !child.props.isDisabled && (child.props.isSelected || selectedIndex === index);
349
- const id = uid();
348
+ const id = this.props.deterministicId(`Tabs_${index}`);
350
349
  tabs.push(this.createTab(index, id, selected, child));
351
350
  if (activePanels.length === 1) {
352
351
  panels.push(this.clonePanel(index, id, selected, child, activePanels[0]));
@@ -398,6 +397,6 @@ let Tabs = (_dec = withStyleNew(generateStyle), _dec(_class = class Tabs extends
398
397
  })]
399
398
  });
400
399
  }
401
- }) || _class);
400
+ }) || _class) || _class);
402
401
  export default Tabs;
403
402
  export { Tabs, Panel };
@@ -17,8 +17,8 @@ var _v11_ = require("@instructure/ui-view/v11_6");
17
17
  var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
18
18
  var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
19
19
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
20
+ var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
20
21
  var _console = require("@instructure/console");
21
- var _uid = require("@instructure/uid");
22
22
  var _Focusable = require("@instructure/ui-focusable/lib/Focusable");
23
23
  var _getBoundingClientRect = require("@instructure/ui-dom-utils/lib/getBoundingClientRect.js");
24
24
  var _debounce = require("@instructure/debounce");
@@ -30,7 +30,7 @@ var _index = require("./Tab/index.js");
30
30
  var _index2 = require("./Panel/index.js");
31
31
  var _props = require("./props.js");
32
32
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
33
- var _dec, _class;
33
+ var _dec, _dec2, _class;
34
34
  /*
35
35
  * The MIT License (MIT)
36
36
  *
@@ -59,7 +59,7 @@ var _dec, _class;
59
59
  category: components
60
60
  ---
61
61
  **/
62
- let Tabs = exports.Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Tabs extends _react.Component {
62
+ let Tabs = exports.Tabs = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Tabs extends _react.Component {
63
63
  static displayName = 'Tabs';
64
64
  static componentId = 'Tabs';
65
65
  static allowedProps = _props.allowedProps;
@@ -361,7 +361,7 @@ let Tabs = exports.Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _them
361
361
  _react.Children.toArray(children).map((child, index) => {
362
362
  if ((0, _matchComponentTypes.matchComponentTypes)(child, [_index2.Panel])) {
363
363
  const selected = !child.props.isDisabled && (child.props.isSelected || selectedIndex === index);
364
- const id = (0, _uid.uid)();
364
+ const id = this.props.deterministicId(`Tabs_${index}`);
365
365
  tabs.push(this.createTab(index, id, selected, child));
366
366
  if (activePanels.length === 1) {
367
367
  panels.push(this.clonePanel(index, id, selected, child, activePanels[0]));
@@ -413,5 +413,5 @@ let Tabs = exports.Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _them
413
413
  })]
414
414
  });
415
415
  }
416
- }) || _class);
416
+ }) || _class) || _class);
417
417
  var _default = exports.default = Tabs;
@@ -17,8 +17,8 @@ var _latest = require("@instructure/ui-view/latest");
17
17
  var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
18
18
  var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
19
19
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
20
+ var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
20
21
  var _console = require("@instructure/console");
21
- var _uid = require("@instructure/uid");
22
22
  var _Focusable = require("@instructure/ui-focusable/lib/Focusable");
23
23
  var _getBoundingClientRect = require("@instructure/ui-dom-utils/lib/getBoundingClientRect.js");
24
24
  var _debounce = require("@instructure/debounce");
@@ -29,7 +29,7 @@ var _index = require("./Tab/index.js");
29
29
  var _index2 = require("./Panel/index.js");
30
30
  var _props = require("./props.js");
31
31
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
32
- var _dec, _class;
32
+ var _dec, _dec2, _class;
33
33
  /*
34
34
  * The MIT License (MIT)
35
35
  *
@@ -58,7 +58,7 @@ var _dec, _class;
58
58
  category: components
59
59
  ---
60
60
  **/
61
- let Tabs = exports.Tabs = (_dec = (0, _emotion.withStyleNew)(_styles.default), _dec(_class = class Tabs extends _react.Component {
61
+ let Tabs = exports.Tabs = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyleNew)(_styles.default), _dec(_class = _dec2(_class = class Tabs extends _react.Component {
62
62
  static displayName = 'Tabs';
63
63
  static componentId = 'Tabs';
64
64
  static allowedProps = _props.allowedProps;
@@ -360,7 +360,7 @@ let Tabs = exports.Tabs = (_dec = (0, _emotion.withStyleNew)(_styles.default), _
360
360
  _react.Children.toArray(children).map((child, index) => {
361
361
  if ((0, _matchComponentTypes.matchComponentTypes)(child, [_index2.Panel])) {
362
362
  const selected = !child.props.isDisabled && (child.props.isSelected || selectedIndex === index);
363
- const id = (0, _uid.uid)();
363
+ const id = this.props.deterministicId(`Tabs_${index}`);
364
364
  tabs.push(this.createTab(index, id, selected, child));
365
365
  if (activePanels.length === 1) {
366
366
  panels.push(this.clonePanel(index, id, selected, child, activePanels[0]));
@@ -412,5 +412,5 @@ let Tabs = exports.Tabs = (_dec = (0, _emotion.withStyleNew)(_styles.default), _
412
412
  })]
413
413
  });
414
414
  }
415
- }) || _class);
415
+ }) || _class) || _class);
416
416
  var _default = exports.default = Tabs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tabs",
3
- "version": "11.7.5",
3
+ "version": "11.7.6-snapshot-11",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -16,28 +16,27 @@
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.7",
18
18
  "keycode": "^2",
19
- "@instructure/console": "11.7.5",
20
- "@instructure/emotion": "11.7.5",
21
- "@instructure/debounce": "11.7.5",
22
- "@instructure/shared-types": "11.7.5",
23
- "@instructure/ui-dom-utils": "11.7.5",
24
- "@instructure/ui-focusable": "11.7.5",
25
- "@instructure/ui-i18n": "11.7.5",
26
- "@instructure/ui-react-utils": "11.7.5",
27
- "@instructure/ui-themes": "11.7.5",
28
- "@instructure/ui-utils": "11.7.5",
29
- "@instructure/ui-motion": "11.7.5",
30
- "@instructure/ui-view": "11.7.5",
31
- "@instructure/uid": "11.7.5"
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/debounce": "11.7.6-snapshot-11",
23
+ "@instructure/ui-dom-utils": "11.7.6-snapshot-11",
24
+ "@instructure/ui-focusable": "11.7.6-snapshot-11",
25
+ "@instructure/ui-i18n": "11.7.6-snapshot-11",
26
+ "@instructure/ui-motion": "11.7.6-snapshot-11",
27
+ "@instructure/ui-react-utils": "11.7.6-snapshot-11",
28
+ "@instructure/ui-utils": "11.7.6-snapshot-11",
29
+ "@instructure/ui-themes": "11.7.6-snapshot-11",
30
+ "@instructure/ui-view": "11.7.6-snapshot-11"
32
31
  },
33
32
  "devDependencies": {
34
33
  "@testing-library/jest-dom": "^6.9.1",
35
34
  "@testing-library/react": "16.3.2",
36
35
  "@testing-library/user-event": "^14.6.1",
37
36
  "vitest": "^4.1.9",
38
- "@instructure/ui-axe-check": "11.7.5",
39
- "@instructure/ui-babel-preset": "11.7.5",
40
- "@instructure/ui-color-utils": "11.7.5"
37
+ "@instructure/ui-axe-check": "11.7.6-snapshot-11",
38
+ "@instructure/ui-babel-preset": "11.7.6-snapshot-11",
39
+ "@instructure/ui-color-utils": "11.7.6-snapshot-11"
41
40
  },
42
41
  "peerDependencies": {
43
42
  "react": ">=18 <=19"
@@ -37,10 +37,10 @@ import type { ViewOwnProps } from '@instructure/ui-view/v11_6'
37
37
  import {
38
38
  matchComponentTypes,
39
39
  safeCloneElement,
40
- passthroughProps
40
+ passthroughProps,
41
+ withDeterministicId
41
42
  } from '@instructure/ui-react-utils'
42
43
  import { logError as error } from '@instructure/console'
43
- import { uid } from '@instructure/uid'
44
44
  import { Focusable } from '@instructure/ui-focusable'
45
45
  import { getBoundingClientRect } from '@instructure/ui-dom-utils'
46
46
  import type { RectType } from '@instructure/ui-dom-utils'
@@ -70,6 +70,7 @@ type PanelChild = ComponentElement<TabsPanelProps, Panel>
70
70
  category: components
71
71
  ---
72
72
  **/
73
+ @withDeterministicId()
73
74
  @withStyle(generateStyle, generateComponentTheme)
74
75
  class Tabs extends Component<TabsProps, TabsState> {
75
76
  static displayName = 'Tabs'
@@ -477,7 +478,7 @@ class Tabs extends Component<TabsProps, TabsState> {
477
478
  const selected =
478
479
  !child.props.isDisabled &&
479
480
  (child.props.isSelected || selectedIndex === index)
480
- const id = uid()
481
+ const id = this.props.deterministicId!(`Tabs_${index}`)
481
482
 
482
483
  tabs.push(this.createTab(index, id, selected, child))
483
484
  if (activePanels.length === 1) {
@@ -29,6 +29,7 @@ import type {
29
29
  } from '@instructure/emotion'
30
30
  import type { OtherHTMLAttributes, TabsTheme } from '@instructure/shared-types'
31
31
  import type { TextDirectionContextConsumerProps } from '@instructure/ui-i18n'
32
+ import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
32
33
  import type { ViewOwnProps } from '@instructure/ui-view/v11_6'
33
34
 
34
35
  type TabsOwnProps = {
@@ -85,6 +86,7 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
85
86
 
86
87
  type TabsProps = TabsOwnProps &
87
88
  TextDirectionContextConsumerProps &
89
+ WithDeterministicIdProps &
88
90
  WithStyleProps<TabsTheme, TabsStyle> &
89
91
  OtherHTMLAttributes<TabsOwnProps>
90
92
 
@@ -37,10 +37,10 @@ import type { ViewOwnProps } from '@instructure/ui-view/latest'
37
37
  import {
38
38
  matchComponentTypes,
39
39
  safeCloneElement,
40
- passthroughProps
40
+ passthroughProps,
41
+ withDeterministicId
41
42
  } from '@instructure/ui-react-utils'
42
43
  import { logError as error } from '@instructure/console'
43
- import { uid } from '@instructure/uid'
44
44
  import { Focusable } from '@instructure/ui-focusable'
45
45
  import { getBoundingClientRect } from '@instructure/ui-dom-utils'
46
46
  import type { RectType } from '@instructure/ui-dom-utils'
@@ -69,6 +69,7 @@ type PanelChild = ComponentElement<TabsPanelProps, Panel>
69
69
  category: components
70
70
  ---
71
71
  **/
72
+ @withDeterministicId()
72
73
  @withStyleNew(generateStyle)
73
74
  class Tabs extends Component<TabsProps, TabsState> {
74
75
  static displayName = 'Tabs'
@@ -476,7 +477,7 @@ class Tabs extends Component<TabsProps, TabsState> {
476
477
  const selected =
477
478
  !child.props.isDisabled &&
478
479
  (child.props.isSelected || selectedIndex === index)
479
- const id = uid()
480
+ const id = this.props.deterministicId!(`Tabs_${index}`)
480
481
 
481
482
  tabs.push(this.createTab(index, id, selected, child))
482
483
  if (activePanels.length === 1) {
@@ -30,6 +30,7 @@ import type {
30
30
  import type { NewComponentTypes } from '@instructure/ui-themes'
31
31
  import type { OtherHTMLAttributes } from '@instructure/shared-types'
32
32
  import type { TextDirectionContextConsumerProps } from '@instructure/ui-i18n'
33
+ import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
33
34
  import type { ViewOwnProps } from '@instructure/ui-view/latest'
34
35
 
35
36
  type TabsOwnProps = {
@@ -86,6 +87,7 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
86
87
 
87
88
  type TabsProps = TabsOwnProps &
88
89
  TextDirectionContextConsumerProps &
90
+ WithDeterministicIdProps &
89
91
  WithStyleProps<ReturnType<NewComponentTypes['Tabs']>, TabsStyle> &
90
92
  OtherHTMLAttributes<TabsOwnProps>
91
93
 
@@ -21,7 +21,6 @@
21
21
  { "path": "../ui-motion/tsconfig.build.json" },
22
22
  { "path": "../ui-react-utils/tsconfig.build.json" },
23
23
  { "path": "../ui-utils/tsconfig.build.json" },
24
- { "path": "../ui-view/tsconfig.build.json" },
25
- { "path": "../uid/tsconfig.build.json" }
24
+ { "path": "../ui-view/tsconfig.build.json" }
26
25
  ]
27
26
  }