@instructure/ui-view 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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,19 @@
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.9-pr-snapshot-1792147648392](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-pr-snapshot-1792147648392) (2026-10-16)
7
+
8
+ ### Build System
9
+
10
+ * **many:** replace babel with swc ([7e36c54](https://github.com/instructure/instructure-ui/commit/7e36c54d240b4fa483801c03ab18e7f860f561e2))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * **many:** `@instructure/ui-babel-preset` and
15
+ `@instructure/browserslist-config-instui` are removed and will no longer be
16
+ published. Packages depend on `@swc/helpers` instead of `@babel/runtime`.
17
+
18
+
6
19
  ## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
7
20
 
8
21
  **Note:** Version bump only for package @instructure/ui-view
@@ -1,28 +1,5 @@
1
- var _dec, _class;
2
- /*
3
- * The MIT License (MIT)
4
- *
5
- * Copyright (c) 2015 - present Instructure, Inc.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
-
1
+ import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
26
3
  import { Component } from 'react';
27
4
  import { withStyle } from '@instructure/emotion';
28
5
  import { omitProps } from '@instructure/ui-react-utils';
@@ -30,99 +7,87 @@ import { View } from '../../View/v1/index.js';
30
7
  import generateStyle from './styles.js';
31
8
  import generateComponentTheme from './theme.js';
32
9
  import { allowedProps } from './props.js';
33
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
34
- /**
35
- ---
36
- category: components
37
- ---
38
- **/
39
- let ContextView = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ContextView extends Component {
40
- static displayName = 'ContextView';
41
- static componentId = 'ContextView';
42
- static allowedProps = allowedProps;
43
- static defaultProps = {
44
- as: 'span',
45
- elementRef: () => {},
46
- debug: false,
47
- width: 'auto',
48
- height: 'auto',
49
- children: null,
50
- textAlign: 'start',
51
- background: 'default',
52
- shadow: 'resting',
53
- placement: 'center end'
54
- };
55
- componentDidMount() {
56
- this.props.makeStyles?.();
57
- }
58
- componentDidUpdate() {
59
- this.props.makeStyles?.();
60
- }
61
- ref = null;
62
- handleRef = el => {
63
- const {
64
- elementRef
65
- } = this.props;
66
- this.ref = el;
67
- if (typeof elementRef === 'function') {
68
- elementRef(el);
10
+ class ContextView extends Component {
11
+ static{
12
+ this.displayName = 'ContextView';
13
+ }
14
+ static{
15
+ this.componentId = 'ContextView';
16
+ }
17
+ static{
18
+ this.allowedProps = allowedProps;
19
+ }
20
+ static{
21
+ this.defaultProps = {
22
+ as: 'span',
23
+ elementRef: ()=>{},
24
+ debug: false,
25
+ width: 'auto',
26
+ height: 'auto',
27
+ children: null,
28
+ textAlign: 'start',
29
+ background: 'default',
30
+ shadow: 'resting',
31
+ placement: 'center end'
32
+ };
33
+ }
34
+ componentDidMount() {
35
+ this.props.makeStyles?.();
36
+ }
37
+ componentDidUpdate() {
38
+ this.props.makeStyles?.();
39
+ }
40
+ render() {
41
+ const { as, background, children, debug, height, width, maxHeight, maxWidth, minHeight, minWidth, margin, padding, shadow, stacking, style, textAlign, styles, borderColor } = this.props;
42
+ return /*#__PURE__*/ _jsx(View, {
43
+ ...omitProps(this.props, ContextView.allowedProps),
44
+ css: styles?.contextView,
45
+ style: style,
46
+ borderWidth: "none",
47
+ display: "inline-block",
48
+ as: as,
49
+ withVisualDebug: debug,
50
+ elementRef: this.handleRef,
51
+ margin: margin,
52
+ stacking: stacking,
53
+ children: /*#__PURE__*/ _jsxs(View, {
54
+ css: styles?.contextView__content,
55
+ display: "block",
56
+ borderRadius: "medium",
57
+ borderWidth: "small",
58
+ borderColor: borderColor || (background === 'default' ? 'primary' : 'transparent'),
59
+ background: background === 'default' ? 'primary' : 'primary-inverse',
60
+ withVisualDebug: debug,
61
+ height: height,
62
+ width: width,
63
+ maxHeight: maxHeight,
64
+ maxWidth: maxWidth,
65
+ minHeight: minHeight,
66
+ minWidth: minWidth,
67
+ padding: padding,
68
+ shadow: shadow,
69
+ textAlign: textAlign,
70
+ children: [
71
+ /*#__PURE__*/ _jsx("span", {
72
+ css: styles?.contextView__arrow
73
+ }),
74
+ children
75
+ ]
76
+ })
77
+ });
78
+ }
79
+ constructor(...args){
80
+ super(...args), this.ref = null, this.handleRef = (el)=>{
81
+ const { elementRef } = this.props;
82
+ this.ref = el;
83
+ if (typeof elementRef === 'function') {
84
+ elementRef(el);
85
+ }
86
+ };
69
87
  }
70
- };
71
- render() {
72
- const {
73
- as,
74
- background,
75
- children,
76
- debug,
77
- height,
78
- width,
79
- maxHeight,
80
- maxWidth,
81
- minHeight,
82
- minWidth,
83
- margin,
84
- padding,
85
- shadow,
86
- stacking,
87
- style,
88
- textAlign,
89
- styles,
90
- borderColor
91
- } = this.props;
92
- return _jsx(View, {
93
- ...omitProps(this.props, ContextView.allowedProps),
94
- css: styles?.contextView,
95
- style: style,
96
- borderWidth: "none",
97
- display: "inline-block",
98
- as: as,
99
- withVisualDebug: debug,
100
- elementRef: this.handleRef,
101
- margin: margin,
102
- stacking: stacking,
103
- children: _jsxs(View, {
104
- css: styles?.contextView__content,
105
- display: "block",
106
- borderRadius: "medium",
107
- borderWidth: "small",
108
- borderColor: borderColor || (background === 'default' ? 'primary' : 'transparent'),
109
- background: background === 'default' ? 'primary' : 'primary-inverse',
110
- withVisualDebug: debug,
111
- height: height,
112
- width: width,
113
- maxHeight: maxHeight,
114
- maxWidth: maxWidth,
115
- minHeight: minHeight,
116
- minWidth: minWidth,
117
- padding: padding,
118
- shadow: shadow,
119
- textAlign: textAlign,
120
- children: [_jsx("span", {
121
- css: styles?.contextView__arrow
122
- }), children]
123
- })
124
- });
125
- }
126
- }) || _class);
88
+ }
89
+ ContextView = _ts_decorate([
90
+ withStyle(generateStyle, generateComponentTheme)
91
+ ], ContextView);
127
92
  export default ContextView;
128
- export { ContextView };
93
+ export { ContextView };
@@ -1,26 +1,21 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- const allowedProps = ['as', 'elementRef', 'margin', 'padding', 'height', 'width', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'children', 'textAlign', 'shadow', 'stacking', 'background', 'placement', 'debug', 'borderColor'];
26
- export { allowedProps };
1
+ const allowedProps = [
2
+ 'as',
3
+ 'elementRef',
4
+ 'margin',
5
+ 'padding',
6
+ 'height',
7
+ 'width',
8
+ 'maxHeight',
9
+ 'maxWidth',
10
+ 'minHeight',
11
+ 'minWidth',
12
+ 'children',
13
+ 'textAlign',
14
+ 'shadow',
15
+ 'stacking',
16
+ 'background',
17
+ 'placement',
18
+ 'debug',
19
+ 'borderColor'
20
+ ];
21
+ export { allowedProps };