@instructure/ui-pages 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 +5 -2
- package/es/Pages/v1/Page/index.js +20 -22
- package/es/Pages/v1/index.js +42 -34
- package/es/Pages/v1/theme.js +9 -8
- package/lib/Pages/v1/Page/index.js +21 -23
- package/lib/Pages/v1/index.js +42 -34
- package/lib/Pages/v1/theme.js +9 -8
- package/package.json +12 -12
- package/tsconfig.build.tsbuildinfo +1 -1
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
|
-
## [11.7.3-snapshot-
|
|
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
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
const _excluded = ["children"];
|
|
3
1
|
/*
|
|
4
2
|
* The MIT License (MIT)
|
|
5
3
|
*
|
|
@@ -38,18 +36,26 @@ id: Pages.Page
|
|
|
38
36
|
---
|
|
39
37
|
**/
|
|
40
38
|
class Page extends Component {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
static displayName = "Page";
|
|
40
|
+
static componentId = 'Pages.Page';
|
|
41
|
+
static allowedProps = allowedProps;
|
|
42
|
+
static defaultProps = {
|
|
43
|
+
defaultFocusElement: null,
|
|
44
|
+
padding: 'small',
|
|
45
|
+
textAlign: 'start',
|
|
46
|
+
children: null
|
|
47
|
+
};
|
|
48
48
|
get _content() {
|
|
49
49
|
return this.ref;
|
|
50
50
|
}
|
|
51
|
+
ref = null;
|
|
52
|
+
handleRef = el => {
|
|
53
|
+
this.ref = el;
|
|
54
|
+
};
|
|
51
55
|
get defaultFocusElement() {
|
|
52
|
-
let
|
|
56
|
+
let {
|
|
57
|
+
defaultFocusElement
|
|
58
|
+
} = this.props;
|
|
53
59
|
if (typeof defaultFocusElement === 'function') {
|
|
54
60
|
defaultFocusElement = defaultFocusElement();
|
|
55
61
|
}
|
|
@@ -74,9 +80,10 @@ class Page extends Component {
|
|
|
74
80
|
}
|
|
75
81
|
}
|
|
76
82
|
render() {
|
|
77
|
-
const
|
|
78
|
-
children
|
|
79
|
-
props
|
|
83
|
+
const {
|
|
84
|
+
children,
|
|
85
|
+
...props
|
|
86
|
+
} = this.props;
|
|
80
87
|
return _jsx(PagesContext.Consumer, {
|
|
81
88
|
children: ({
|
|
82
89
|
history,
|
|
@@ -91,14 +98,5 @@ class Page extends Component {
|
|
|
91
98
|
});
|
|
92
99
|
}
|
|
93
100
|
}
|
|
94
|
-
Page.displayName = "Page";
|
|
95
|
-
Page.componentId = 'Pages.Page';
|
|
96
|
-
Page.allowedProps = allowedProps;
|
|
97
|
-
Page.defaultProps = {
|
|
98
|
-
defaultFocusElement: null,
|
|
99
|
-
padding: 'small',
|
|
100
|
-
textAlign: 'start',
|
|
101
|
-
children: null
|
|
102
|
-
};
|
|
103
101
|
export default Page;
|
|
104
102
|
export { Page };
|
package/es/Pages/v1/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2, _class
|
|
1
|
+
var _dec, _dec2, _class;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -40,42 +40,50 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
40
40
|
category: components
|
|
41
41
|
---
|
|
42
42
|
**/
|
|
43
|
-
let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class =
|
|
43
|
+
let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class Pages extends Component {
|
|
44
|
+
static displayName = "Pages";
|
|
45
|
+
static componentId = 'Pages';
|
|
46
|
+
static allowedProps = allowedProps;
|
|
47
|
+
static defaultProps = {
|
|
48
|
+
activePageIndex: 0
|
|
49
|
+
};
|
|
50
|
+
static Page = Page;
|
|
51
|
+
_timeouts = [];
|
|
52
|
+
_activePage = null;
|
|
53
|
+
_contentId;
|
|
54
|
+
ref = null;
|
|
55
|
+
handleRef = el => {
|
|
56
|
+
this.ref = el;
|
|
57
|
+
};
|
|
44
58
|
get _contentElement() {
|
|
45
59
|
return this.ref;
|
|
46
60
|
}
|
|
47
61
|
constructor(props) {
|
|
48
62
|
super(props);
|
|
49
|
-
this._timeouts = [];
|
|
50
|
-
this._activePage = null;
|
|
51
|
-
this._contentId = void 0;
|
|
52
|
-
this.ref = null;
|
|
53
|
-
this.handleRef = el => {
|
|
54
|
-
this.ref = el;
|
|
55
|
-
};
|
|
56
|
-
this.handleBackButtonClick = () => {
|
|
57
|
-
var _this$props$onPageInd, _this$props;
|
|
58
|
-
const history = [...this.state.history];
|
|
59
|
-
const oldPageIndex = history.pop();
|
|
60
|
-
const newPageIndex = history[history.length - 1];
|
|
61
|
-
this.setState({
|
|
62
|
-
history
|
|
63
|
-
});
|
|
64
|
-
(_this$props$onPageInd = (_this$props = this.props).onPageIndexChange) === null || _this$props$onPageInd === void 0 ? void 0 : _this$props$onPageInd.call(_this$props, newPageIndex || 0, oldPageIndex);
|
|
65
|
-
};
|
|
66
63
|
this.state = {
|
|
67
64
|
history: [typeof props.defaultPageIndex === 'number' ? props.defaultPageIndex : props.activePageIndex]
|
|
68
65
|
};
|
|
69
66
|
this._contentId = props.deterministicId();
|
|
70
67
|
}
|
|
71
68
|
componentDidMount() {
|
|
72
|
-
|
|
73
|
-
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
69
|
+
this.props.makeStyles?.();
|
|
74
70
|
}
|
|
71
|
+
handleBackButtonClick = () => {
|
|
72
|
+
const history = [...this.state.history];
|
|
73
|
+
const oldPageIndex = history.pop();
|
|
74
|
+
const newPageIndex = history[history.length - 1];
|
|
75
|
+
this.setState({
|
|
76
|
+
history
|
|
77
|
+
});
|
|
78
|
+
this.props.onPageIndexChange?.(newPageIndex || 0, oldPageIndex);
|
|
79
|
+
};
|
|
75
80
|
componentDidUpdate() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
const {
|
|
82
|
+
activePageIndex
|
|
83
|
+
} = this.props;
|
|
84
|
+
const {
|
|
85
|
+
history
|
|
86
|
+
} = this.state;
|
|
79
87
|
if (typeof activePageIndex === 'number' && (history.length === 0 || activePageIndex !== history[history.length - 1])) {
|
|
80
88
|
this.setState({
|
|
81
89
|
history: [...history, activePageIndex]
|
|
@@ -84,7 +92,7 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
84
92
|
this._timeouts.push(setTimeout(() => {
|
|
85
93
|
!this.focused && this.focus();
|
|
86
94
|
}, 0));
|
|
87
|
-
|
|
95
|
+
this.props.makeStyles?.();
|
|
88
96
|
}
|
|
89
97
|
componentWillUnmount() {
|
|
90
98
|
this._timeouts.forEach(clearTimeout);
|
|
@@ -108,9 +116,10 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
108
116
|
}));
|
|
109
117
|
}
|
|
110
118
|
get activePage() {
|
|
111
|
-
const
|
|
112
|
-
activePageIndex
|
|
113
|
-
children
|
|
119
|
+
const {
|
|
120
|
+
activePageIndex,
|
|
121
|
+
children
|
|
122
|
+
} = this.props;
|
|
114
123
|
const pages = Children.toArray(children);
|
|
115
124
|
const activePage = activePageIndex < pages.length ? pages[activePageIndex] : null;
|
|
116
125
|
error(!!activePage, '[Pages] Invalid `activePageIndex`.');
|
|
@@ -121,8 +130,9 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
121
130
|
}) : null;
|
|
122
131
|
}
|
|
123
132
|
render() {
|
|
124
|
-
|
|
125
|
-
|
|
133
|
+
const {
|
|
134
|
+
activePage
|
|
135
|
+
} = this;
|
|
126
136
|
return activePage ? _jsx(PagesContext.Provider, {
|
|
127
137
|
value: {
|
|
128
138
|
history: this.state.history,
|
|
@@ -133,7 +143,7 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
133
143
|
children: _jsx(View, {
|
|
134
144
|
as: "div",
|
|
135
145
|
id: this._contentId,
|
|
136
|
-
css:
|
|
146
|
+
css: this.props.styles?.pages,
|
|
137
147
|
margin: this.props.margin,
|
|
138
148
|
role: "region",
|
|
139
149
|
elementRef: this.handleRef,
|
|
@@ -141,8 +151,6 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
141
151
|
})
|
|
142
152
|
}) : null;
|
|
143
153
|
}
|
|
144
|
-
}
|
|
145
|
-
activePageIndex: 0
|
|
146
|
-
}, _Pages.Page = Page, _Pages)) || _class) || _class);
|
|
154
|
+
}) || _class) || _class);
|
|
147
155
|
export default Pages;
|
|
148
156
|
export { Pages, Page };
|
package/es/Pages/v1/theme.js
CHANGED
|
@@ -28,15 +28,16 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
typography
|
|
31
|
+
const {
|
|
32
|
+
colors,
|
|
33
|
+
typography
|
|
34
|
+
} = theme;
|
|
34
35
|
return {
|
|
35
|
-
fontSize: typography
|
|
36
|
-
fontFamily: typography
|
|
37
|
-
fontWeight: typography
|
|
38
|
-
color: colors
|
|
39
|
-
background: colors
|
|
36
|
+
fontSize: typography?.fontSizeMedium,
|
|
37
|
+
fontFamily: typography?.fontFamily,
|
|
38
|
+
fontWeight: typography?.fontWeightNormal,
|
|
39
|
+
color: colors?.contrasts?.grey125125,
|
|
40
|
+
background: colors?.contrasts?.white1010
|
|
40
41
|
};
|
|
41
42
|
};
|
|
42
43
|
export default generateComponentTheme;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = exports.Page = void 0;
|
|
8
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
7
|
var _react = require("react");
|
|
10
8
|
var _findDOMNode = require("@instructure/ui-dom-utils/lib/findDOMNode.js");
|
|
11
9
|
var _findTabbable = require("@instructure/ui-dom-utils/lib/findTabbable.js");
|
|
@@ -14,7 +12,6 @@ var _v11_ = require("@instructure/ui-view/v11_6");
|
|
|
14
12
|
var _PagesContext = require("../PagesContext");
|
|
15
13
|
var _props = require("./props");
|
|
16
14
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
|
-
const _excluded = ["children"];
|
|
18
15
|
/*
|
|
19
16
|
* The MIT License (MIT)
|
|
20
17
|
*
|
|
@@ -38,6 +35,7 @@ const _excluded = ["children"];
|
|
|
38
35
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
36
|
* SOFTWARE.
|
|
40
37
|
*/
|
|
38
|
+
|
|
41
39
|
/**
|
|
42
40
|
---
|
|
43
41
|
parent: Pages
|
|
@@ -45,18 +43,26 @@ id: Pages.Page
|
|
|
45
43
|
---
|
|
46
44
|
**/
|
|
47
45
|
class Page extends _react.Component {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
static displayName = "Page";
|
|
47
|
+
static componentId = 'Pages.Page';
|
|
48
|
+
static allowedProps = _props.allowedProps;
|
|
49
|
+
static defaultProps = {
|
|
50
|
+
defaultFocusElement: null,
|
|
51
|
+
padding: 'small',
|
|
52
|
+
textAlign: 'start',
|
|
53
|
+
children: null
|
|
54
|
+
};
|
|
55
55
|
get _content() {
|
|
56
56
|
return this.ref;
|
|
57
57
|
}
|
|
58
|
+
ref = null;
|
|
59
|
+
handleRef = el => {
|
|
60
|
+
this.ref = el;
|
|
61
|
+
};
|
|
58
62
|
get defaultFocusElement() {
|
|
59
|
-
let
|
|
63
|
+
let {
|
|
64
|
+
defaultFocusElement
|
|
65
|
+
} = this.props;
|
|
60
66
|
if (typeof defaultFocusElement === 'function') {
|
|
61
67
|
defaultFocusElement = defaultFocusElement();
|
|
62
68
|
}
|
|
@@ -81,9 +87,10 @@ class Page extends _react.Component {
|
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
render() {
|
|
84
|
-
const
|
|
85
|
-
children
|
|
86
|
-
props
|
|
90
|
+
const {
|
|
91
|
+
children,
|
|
92
|
+
...props
|
|
93
|
+
} = this.props;
|
|
87
94
|
return (0, _jsxRuntime.jsx)(_PagesContext.PagesContext.Consumer, {
|
|
88
95
|
children: ({
|
|
89
96
|
history,
|
|
@@ -99,13 +106,4 @@ class Page extends _react.Component {
|
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
exports.Page = Page;
|
|
102
|
-
Page.displayName = "Page";
|
|
103
|
-
Page.componentId = 'Pages.Page';
|
|
104
|
-
Page.allowedProps = _props.allowedProps;
|
|
105
|
-
Page.defaultProps = {
|
|
106
|
-
defaultFocusElement: null,
|
|
107
|
-
padding: 'small',
|
|
108
|
-
textAlign: 'start',
|
|
109
|
-
children: null
|
|
110
|
-
};
|
|
111
109
|
var _default = exports.default = Page;
|
package/lib/Pages/v1/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
25
25
|
var _PagesContext = require("./PagesContext");
|
|
26
26
|
var _props = require("./props");
|
|
27
27
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
28
|
-
var _dec, _dec2, _class
|
|
28
|
+
var _dec, _dec2, _class;
|
|
29
29
|
/*
|
|
30
30
|
* The MIT License (MIT)
|
|
31
31
|
*
|
|
@@ -54,42 +54,50 @@ var _dec, _dec2, _class, _Pages;
|
|
|
54
54
|
category: components
|
|
55
55
|
---
|
|
56
56
|
**/
|
|
57
|
-
let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = _dec2(_class =
|
|
57
|
+
let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Pages extends _react.Component {
|
|
58
|
+
static displayName = "Pages";
|
|
59
|
+
static componentId = 'Pages';
|
|
60
|
+
static allowedProps = _props.allowedProps;
|
|
61
|
+
static defaultProps = {
|
|
62
|
+
activePageIndex: 0
|
|
63
|
+
};
|
|
64
|
+
static Page = _Page.Page;
|
|
65
|
+
_timeouts = [];
|
|
66
|
+
_activePage = null;
|
|
67
|
+
_contentId;
|
|
68
|
+
ref = null;
|
|
69
|
+
handleRef = el => {
|
|
70
|
+
this.ref = el;
|
|
71
|
+
};
|
|
58
72
|
get _contentElement() {
|
|
59
73
|
return this.ref;
|
|
60
74
|
}
|
|
61
75
|
constructor(props) {
|
|
62
76
|
super(props);
|
|
63
|
-
this._timeouts = [];
|
|
64
|
-
this._activePage = null;
|
|
65
|
-
this._contentId = void 0;
|
|
66
|
-
this.ref = null;
|
|
67
|
-
this.handleRef = el => {
|
|
68
|
-
this.ref = el;
|
|
69
|
-
};
|
|
70
|
-
this.handleBackButtonClick = () => {
|
|
71
|
-
var _this$props$onPageInd, _this$props;
|
|
72
|
-
const history = [...this.state.history];
|
|
73
|
-
const oldPageIndex = history.pop();
|
|
74
|
-
const newPageIndex = history[history.length - 1];
|
|
75
|
-
this.setState({
|
|
76
|
-
history
|
|
77
|
-
});
|
|
78
|
-
(_this$props$onPageInd = (_this$props = this.props).onPageIndexChange) === null || _this$props$onPageInd === void 0 ? void 0 : _this$props$onPageInd.call(_this$props, newPageIndex || 0, oldPageIndex);
|
|
79
|
-
};
|
|
80
77
|
this.state = {
|
|
81
78
|
history: [typeof props.defaultPageIndex === 'number' ? props.defaultPageIndex : props.activePageIndex]
|
|
82
79
|
};
|
|
83
80
|
this._contentId = props.deterministicId();
|
|
84
81
|
}
|
|
85
82
|
componentDidMount() {
|
|
86
|
-
|
|
87
|
-
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
83
|
+
this.props.makeStyles?.();
|
|
88
84
|
}
|
|
85
|
+
handleBackButtonClick = () => {
|
|
86
|
+
const history = [...this.state.history];
|
|
87
|
+
const oldPageIndex = history.pop();
|
|
88
|
+
const newPageIndex = history[history.length - 1];
|
|
89
|
+
this.setState({
|
|
90
|
+
history
|
|
91
|
+
});
|
|
92
|
+
this.props.onPageIndexChange?.(newPageIndex || 0, oldPageIndex);
|
|
93
|
+
};
|
|
89
94
|
componentDidUpdate() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
const {
|
|
96
|
+
activePageIndex
|
|
97
|
+
} = this.props;
|
|
98
|
+
const {
|
|
99
|
+
history
|
|
100
|
+
} = this.state;
|
|
93
101
|
if (typeof activePageIndex === 'number' && (history.length === 0 || activePageIndex !== history[history.length - 1])) {
|
|
94
102
|
this.setState({
|
|
95
103
|
history: [...history, activePageIndex]
|
|
@@ -98,7 +106,7 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
98
106
|
this._timeouts.push(setTimeout(() => {
|
|
99
107
|
!this.focused && this.focus();
|
|
100
108
|
}, 0));
|
|
101
|
-
|
|
109
|
+
this.props.makeStyles?.();
|
|
102
110
|
}
|
|
103
111
|
componentWillUnmount() {
|
|
104
112
|
this._timeouts.forEach(clearTimeout);
|
|
@@ -122,9 +130,10 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
122
130
|
}));
|
|
123
131
|
}
|
|
124
132
|
get activePage() {
|
|
125
|
-
const
|
|
126
|
-
activePageIndex
|
|
127
|
-
children
|
|
133
|
+
const {
|
|
134
|
+
activePageIndex,
|
|
135
|
+
children
|
|
136
|
+
} = this.props;
|
|
128
137
|
const pages = _react.Children.toArray(children);
|
|
129
138
|
const activePage = activePageIndex < pages.length ? pages[activePageIndex] : null;
|
|
130
139
|
(0, _console.logError)(!!activePage, '[Pages] Invalid `activePageIndex`.');
|
|
@@ -135,8 +144,9 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
135
144
|
}) : null;
|
|
136
145
|
}
|
|
137
146
|
render() {
|
|
138
|
-
|
|
139
|
-
|
|
147
|
+
const {
|
|
148
|
+
activePage
|
|
149
|
+
} = this;
|
|
140
150
|
return activePage ? (0, _jsxRuntime.jsx)(_PagesContext.PagesContext.Provider, {
|
|
141
151
|
value: {
|
|
142
152
|
history: this.state.history,
|
|
@@ -147,7 +157,7 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
147
157
|
children: (0, _jsxRuntime.jsx)(_v11_.View, {
|
|
148
158
|
as: "div",
|
|
149
159
|
id: this._contentId,
|
|
150
|
-
css:
|
|
160
|
+
css: this.props.styles?.pages,
|
|
151
161
|
margin: this.props.margin,
|
|
152
162
|
role: "region",
|
|
153
163
|
elementRef: this.handleRef,
|
|
@@ -155,7 +165,5 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
155
165
|
})
|
|
156
166
|
}) : null;
|
|
157
167
|
}
|
|
158
|
-
}
|
|
159
|
-
activePageIndex: 0
|
|
160
|
-
}, _Pages.Page = _Page.Page, _Pages)) || _class) || _class);
|
|
168
|
+
}) || _class) || _class);
|
|
161
169
|
var _default = exports.default = Pages;
|
package/lib/Pages/v1/theme.js
CHANGED
|
@@ -34,15 +34,16 @@ exports.default = void 0;
|
|
|
34
34
|
* @return {Object} The final theme object with the overrides and component variables
|
|
35
35
|
*/
|
|
36
36
|
const generateComponentTheme = theme => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
typography
|
|
37
|
+
const {
|
|
38
|
+
colors,
|
|
39
|
+
typography
|
|
40
|
+
} = theme;
|
|
40
41
|
return {
|
|
41
|
-
fontSize: typography
|
|
42
|
-
fontFamily: typography
|
|
43
|
-
fontWeight: typography
|
|
44
|
-
color: colors
|
|
45
|
-
background: colors
|
|
42
|
+
fontSize: typography?.fontSizeMedium,
|
|
43
|
+
fontFamily: typography?.fontFamily,
|
|
44
|
+
fontWeight: typography?.fontWeightNormal,
|
|
45
|
+
color: colors?.contrasts?.grey125125,
|
|
46
|
+
background: colors?.contrasts?.white1010
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
49
|
var _default = exports.default = generateComponentTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pages",
|
|
3
|
-
"version": "11.7.3-snapshot-
|
|
3
|
+
"version": "11.7.3-snapshot-26",
|
|
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",
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
"bugs": "https://github.com/instructure/instructure-ui/issues",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@babel/runtime": "^7.
|
|
18
|
-
"@instructure/
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/shared-types": "11.7.3-snapshot-
|
|
21
|
-
"@instructure/ui-dom-utils": "11.7.3-snapshot-
|
|
22
|
-
"@instructure/ui-react-utils": "11.7.3-snapshot-
|
|
23
|
-
"@instructure/ui-themes": "11.7.3-snapshot-
|
|
24
|
-
"@instructure/ui-utils": "11.7.3-snapshot-
|
|
25
|
-
"@instructure/ui-view": "11.7.3-snapshot-
|
|
17
|
+
"@babel/runtime": "^7.29.2",
|
|
18
|
+
"@instructure/console": "11.7.3-snapshot-26",
|
|
19
|
+
"@instructure/emotion": "11.7.3-snapshot-26",
|
|
20
|
+
"@instructure/shared-types": "11.7.3-snapshot-26",
|
|
21
|
+
"@instructure/ui-dom-utils": "11.7.3-snapshot-26",
|
|
22
|
+
"@instructure/ui-react-utils": "11.7.3-snapshot-26",
|
|
23
|
+
"@instructure/ui-themes": "11.7.3-snapshot-26",
|
|
24
|
+
"@instructure/ui-utils": "11.7.3-snapshot-26",
|
|
25
|
+
"@instructure/ui-view": "11.7.3-snapshot-26"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@testing-library/jest-dom": "^6.6.3",
|
|
29
29
|
"@testing-library/react": "15.0.7",
|
|
30
30
|
"@testing-library/user-event": "^14.6.1",
|
|
31
31
|
"vitest": "^3.2.2",
|
|
32
|
-
"@instructure/ui-
|
|
33
|
-
"@instructure/ui-
|
|
32
|
+
"@instructure/ui-color-utils": "11.7.3-snapshot-26",
|
|
33
|
+
"@instructure/ui-babel-preset": "11.7.3-snapshot-26"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": ">=18 <=19"
|