@instructure/ui-tabs 11.7.3-snapshot-7 → 11.7.3-snapshot-26

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,11 +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
- ## [11.7.3-snapshot-7](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-7) (2026-04-29)
6
+ ## [11.7.3-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-26) (2026-05-05)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
+ * **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
11
12
  * **ui-tabs:** fix tabs panel layout when unmountOnExit is false ([826ff62](https://github.com/instructure/instructure-ui/commit/826ff62fba56bc0cadd6995b366e3ca505b1b6c1))
12
13
 
13
14
 
@@ -1,6 +1,4 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["labelledBy", "variant", "id", "maxHeight", "minHeight", "padding", "textAlign", "children", "elementRef", "isDisabled", "isSelected", "styles", "active", "unmountOnExit", "tabIndex"];
3
- var _dec, _class, _Panel;
1
+ var _dec, _class;
4
2
  /*
5
3
  * The MIT License (MIT)
6
4
  *
@@ -40,62 +38,73 @@ id: Tabs.Panel
40
38
  ---
41
39
  **/
42
40
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
43
- let Panel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Panel = class Panel extends Component {
44
- constructor(...args) {
45
- super(...args);
46
- this.ref = null;
47
- this.handleRef = el => {
48
- const elementRef = this.props.elementRef;
49
- this.ref = el;
50
- if (typeof elementRef === 'function') {
51
- elementRef(el);
52
- }
53
- };
54
- }
41
+ let Panel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Panel extends Component {
42
+ static displayName = "Panel";
43
+ static componentId = 'Tabs.Panel';
44
+ static allowedProps = allowedProps;
45
+ static defaultProps = {
46
+ isDisabled: false,
47
+ textAlign: 'start',
48
+ variant: 'default',
49
+ isSelected: false,
50
+ padding: 'small',
51
+ active: false,
52
+ unmountOnExit: true
53
+ };
55
54
  componentDidMount() {
56
- var _this$props$makeStyle, _this$props;
57
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, {
55
+ this.props.makeStyles?.({
58
56
  isHidden: this.isHidden
59
57
  });
60
58
  }
61
59
  componentDidUpdate() {
62
- var _this$props$makeStyle2, _this$props2;
63
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, {
60
+ this.props.makeStyles?.({
64
61
  isHidden: this.isHidden
65
62
  });
66
63
  }
64
+ ref = null;
67
65
  get isHidden() {
68
- const _this$props3 = this.props,
69
- isDisabled = _this$props3.isDisabled,
70
- isSelected = _this$props3.isSelected;
66
+ const {
67
+ isDisabled,
68
+ isSelected
69
+ } = this.props;
71
70
  return !isSelected || !!isDisabled;
72
71
  }
72
+ handleRef = el => {
73
+ const {
74
+ elementRef
75
+ } = this.props;
76
+ this.ref = el;
77
+ if (typeof elementRef === 'function') {
78
+ elementRef(el);
79
+ }
80
+ };
73
81
  render() {
74
- const _this$props4 = this.props,
75
- labelledBy = _this$props4.labelledBy,
76
- variant = _this$props4.variant,
77
- id = _this$props4.id,
78
- maxHeight = _this$props4.maxHeight,
79
- minHeight = _this$props4.minHeight,
80
- padding = _this$props4.padding,
81
- textAlign = _this$props4.textAlign,
82
- children = _this$props4.children,
83
- elementRef = _this$props4.elementRef,
84
- isDisabled = _this$props4.isDisabled,
85
- isSelected = _this$props4.isSelected,
86
- styles = _this$props4.styles,
87
- active = _this$props4.active,
88
- unmountOnExit = _this$props4.unmountOnExit,
89
- tabIndex = _this$props4.tabIndex,
90
- props = _objectWithoutProperties(_this$props4, _excluded);
82
+ const {
83
+ labelledBy,
84
+ variant,
85
+ id,
86
+ maxHeight,
87
+ minHeight,
88
+ padding,
89
+ textAlign,
90
+ children,
91
+ elementRef,
92
+ isDisabled,
93
+ isSelected,
94
+ styles,
95
+ active,
96
+ unmountOnExit,
97
+ tabIndex,
98
+ ...props
99
+ } = this.props;
91
100
  return _jsx("div", {
92
101
  ...passthroughProps(props),
93
- css: styles === null || styles === void 0 ? void 0 : styles.panel,
102
+ css: styles?.panel,
94
103
  role: "tabpanel",
95
104
  id: id,
96
105
  "aria-labelledby": labelledBy,
97
- "aria-hidden": this.isHidden ? 'true' : void 0,
98
- tabIndex: this.isHidden ? void 0 : tabIndex,
106
+ "aria-hidden": this.isHidden ? 'true' : undefined,
107
+ tabIndex: this.isHidden ? undefined : tabIndex,
99
108
  ref: this.handleRef,
100
109
  children: _jsx(Transition, {
101
110
  type: "fade",
@@ -103,7 +112,7 @@ let Panel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
103
112
  unmountOnExit: unmountOnExit,
104
113
  transitionExit: false,
105
114
  children: _jsx(View, {
106
- css: styles === null || styles === void 0 ? void 0 : styles.content,
115
+ css: styles?.content,
107
116
  maxHeight: maxHeight,
108
117
  minHeight: minHeight,
109
118
  as: "div",
@@ -114,14 +123,6 @@ let Panel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
114
123
  })
115
124
  });
116
125
  }
117
- }, _Panel.displayName = "Panel", _Panel.componentId = 'Tabs.Panel', _Panel.allowedProps = allowedProps, _Panel.defaultProps = {
118
- isDisabled: false,
119
- textAlign: 'start',
120
- variant: 'default',
121
- isSelected: false,
122
- padding: 'small',
123
- active: false,
124
- unmountOnExit: true
125
- }, _Panel)) || _class);
126
+ }) || _class);
126
127
  export default Panel;
127
128
  export { Panel };
@@ -33,9 +33,13 @@
33
33
  * @return {Object} The final style object, which will be used in the component
34
34
  */
35
35
  const generateStyle = (componentTheme, props, state) => {
36
- const maxHeight = props.maxHeight,
37
- isSelected = props.isSelected;
38
- const isHidden = state.isHidden;
36
+ const {
37
+ maxHeight,
38
+ isSelected
39
+ } = props;
40
+ const {
41
+ isHidden
42
+ } = state;
39
43
  return {
40
44
  panel: {
41
45
  label: 'panel',
@@ -28,11 +28,12 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
- var _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
32
- const typography = theme.typography,
33
- colors = theme.colors,
34
- borders = theme.borders,
35
- themeName = theme.key;
31
+ const {
32
+ typography,
33
+ colors,
34
+ borders,
35
+ key: themeName
36
+ } = theme;
36
37
  const themeSpecificStyle = {
37
38
  canvas: {
38
39
  color: theme['ic-brand-font-color-dark'],
@@ -40,15 +41,15 @@ const generateComponentTheme = theme => {
40
41
  }
41
42
  };
42
43
  const componentVariables = {
43
- fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
44
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
45
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
46
- lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeight,
47
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
48
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
49
- borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey3045,
50
- borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
51
- borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
44
+ fontSize: typography?.fontSizeMedium,
45
+ fontFamily: typography?.fontFamily,
46
+ fontWeight: typography?.fontWeightNormal,
47
+ lineHeight: typography?.lineHeight,
48
+ color: colors?.contrasts?.grey125125,
49
+ background: colors?.contrasts?.white1010,
50
+ borderColor: colors?.contrasts?.grey3045,
51
+ borderWidth: borders?.widthSmall,
52
+ borderStyle: borders?.style,
52
53
  defaultOverflowY: 'auto',
53
54
  focusOutlineColor: colors.contrasts.blue4570
54
55
  };
@@ -1,6 +1,4 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["id", "variant", "isSelected", "isDisabled", "controls", "children", "styles"];
3
- var _dec, _class, _Tab;
1
+ var _dec, _class;
4
2
  /*
5
3
  * The MIT License (MIT)
6
4
  *
@@ -39,60 +37,66 @@ id: Tabs.Tab
39
37
  ---
40
38
  **/
41
39
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
42
- let Tab = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Tab = class Tab extends Component {
43
- constructor(...args) {
44
- super(...args);
45
- this.handleClick = event => {
46
- const _this$props = this.props,
47
- onClick = _this$props.onClick,
48
- index = _this$props.index,
49
- id = _this$props.id,
50
- isDisabled = _this$props.isDisabled;
51
- if (isDisabled) {
52
- return;
53
- }
54
- if (typeof onClick === 'function') {
55
- onClick(event, {
56
- index,
57
- id
58
- });
59
- }
60
- };
61
- this.handleKeyDown = event => {
62
- const _this$props2 = this.props,
63
- onKeyDown = _this$props2.onKeyDown,
64
- index = _this$props2.index,
65
- id = _this$props2.id,
66
- isDisabled = _this$props2.isDisabled;
67
- if (isDisabled) {
68
- return;
69
- }
70
- if (typeof onKeyDown === 'function') {
71
- onKeyDown(event, {
72
- index,
73
- id
74
- });
75
- }
76
- };
77
- }
40
+ let Tab = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Tab extends Component {
41
+ static displayName = "Tab";
42
+ static componentId = 'Tabs.Tab';
43
+ static allowedProps = allowedProps;
44
+ static defaultProps = {
45
+ variant: 'default',
46
+ isDisabled: false,
47
+ isSelected: false
48
+ };
78
49
  componentDidMount() {
79
- var _this$props$makeStyle, _this$props3;
80
- (_this$props$makeStyle = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props3);
50
+ this.props.makeStyles?.();
81
51
  }
82
52
  componentDidUpdate() {
83
- var _this$props$makeStyle2, _this$props4;
84
- (_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
53
+ this.props.makeStyles?.();
85
54
  }
55
+ handleClick = event => {
56
+ const {
57
+ onClick,
58
+ index,
59
+ id,
60
+ isDisabled
61
+ } = this.props;
62
+ if (isDisabled) {
63
+ return;
64
+ }
65
+ if (typeof onClick === 'function') {
66
+ onClick(event, {
67
+ index,
68
+ id
69
+ });
70
+ }
71
+ };
72
+ handleKeyDown = event => {
73
+ const {
74
+ onKeyDown,
75
+ index,
76
+ id,
77
+ isDisabled
78
+ } = this.props;
79
+ if (isDisabled) {
80
+ return;
81
+ }
82
+ if (typeof onKeyDown === 'function') {
83
+ onKeyDown(event, {
84
+ index,
85
+ id
86
+ });
87
+ }
88
+ };
86
89
  render() {
87
- const _this$props5 = this.props,
88
- id = _this$props5.id,
89
- variant = _this$props5.variant,
90
- isSelected = _this$props5.isSelected,
91
- isDisabled = _this$props5.isDisabled,
92
- controls = _this$props5.controls,
93
- children = _this$props5.children,
94
- styles = _this$props5.styles,
95
- props = _objectWithoutProperties(_this$props5, _excluded);
90
+ const {
91
+ id,
92
+ variant,
93
+ isSelected,
94
+ isDisabled,
95
+ controls,
96
+ children,
97
+ styles,
98
+ ...props
99
+ } = this.props;
96
100
  return _jsx(View, {
97
101
  ...passthroughProps(props),
98
102
  as: "div",
@@ -100,20 +104,16 @@ let Tab = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
100
104
  id: id,
101
105
  onClick: this.handleClick,
102
106
  onKeyDown: this.handleKeyDown,
103
- css: styles === null || styles === void 0 ? void 0 : styles.tab,
104
- "aria-selected": isSelected ? 'true' : void 0,
105
- "aria-disabled": isDisabled ? 'true' : void 0,
107
+ css: styles?.tab,
108
+ "aria-selected": isSelected ? 'true' : undefined,
109
+ "aria-disabled": isDisabled ? 'true' : undefined,
106
110
  "aria-controls": controls,
107
- tabIndex: isSelected && !isDisabled ? 0 : void 0,
111
+ tabIndex: isSelected && !isDisabled ? 0 : undefined,
108
112
  position: "relative",
109
113
  focusPosition: "inset",
110
114
  children: callRenderProp(children)
111
115
  });
112
116
  }
113
- }, _Tab.displayName = "Tab", _Tab.componentId = 'Tabs.Tab', _Tab.allowedProps = allowedProps, _Tab.defaultProps = {
114
- variant: 'default',
115
- isDisabled: false,
116
- isSelected: false
117
- }, _Tab)) || _class);
117
+ }) || _class);
118
118
  export default Tab;
119
119
  export { Tab };
@@ -42,10 +42,12 @@ const selectedTab = keyframes`
42
42
  * @return {Object} The final style object, which will be used in the component
43
43
  */
44
44
  const generateStyle = (componentTheme, props) => {
45
- const variant = props.variant,
46
- isSelected = props.isSelected,
47
- isDisabled = props.isDisabled,
48
- isOverflowScroll = props.isOverflowScroll;
45
+ const {
46
+ variant,
47
+ isSelected,
48
+ isDisabled,
49
+ isOverflowScroll
50
+ } = props;
49
51
  const variants = {
50
52
  default: {
51
53
  padding: '1rem 1.25rem',
@@ -28,11 +28,12 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
- var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6;
32
- const colors = theme.colors,
33
- typography = theme.typography,
34
- stacking = theme.stacking,
35
- themeName = theme.key;
31
+ const {
32
+ colors,
33
+ typography,
34
+ stacking,
35
+ key: themeName
36
+ } = theme;
36
37
  const themeSpecificStyle = {
37
38
  canvas: {
38
39
  defaultColor: theme['ic-brand-font-color-dark'],
@@ -41,17 +42,17 @@ const generateComponentTheme = theme => {
41
42
  }
42
43
  };
43
44
  const componentVariables = {
44
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
45
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
46
- lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
47
- fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
48
- defaultColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
49
- defaultHoverBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1214,
50
- defaultSelectedBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.blue4570,
51
- secondaryColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey125125,
52
- secondarySelectedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
53
- secondarySelectedBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey3045,
54
- zIndex: stacking === null || stacking === void 0 ? void 0 : stacking.above
45
+ fontFamily: typography?.fontFamily,
46
+ fontWeight: typography?.fontWeightNormal,
47
+ lineHeight: typography?.lineHeightCondensed,
48
+ fontSize: typography?.fontSizeMedium,
49
+ defaultColor: colors?.contrasts?.grey125125,
50
+ defaultHoverBorderColor: colors?.contrasts?.grey1214,
51
+ defaultSelectedBorderColor: colors?.contrasts?.blue4570,
52
+ secondaryColor: colors?.contrasts?.grey125125,
53
+ secondarySelectedBackground: colors?.contrasts?.white1010,
54
+ secondarySelectedBorderColor: colors?.contrasts?.grey3045,
55
+ zIndex: stacking?.above
55
56
  };
56
57
  return {
57
58
  ...componentVariables,