@instructure/ui-expandable 11.6.0 → 11.6.1-pr-snapshot-1779894247159

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,14 @@
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.6.1-pr-snapshot-1779894247159](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-pr-snapshot-1779894247159) (2026-05-27)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-expandable
9
+
10
+
11
+
12
+
13
+
6
14
  # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-expandable
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,4 +22,16 @@ exports.allowedProps = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- const allowedProps = exports.allowedProps = ['expanded', 'defaultExpanded', 'onToggle', 'children', 'render'];
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ coverage: Boolean(process.env.COVERAGE),
31
+ esModules: Boolean(process.env.ES_MODULES),
32
+ removeConsole: process.env.NODE_ENV === 'production',
33
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
34
+ }
35
+ ]
36
+ ]
37
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-expandable",
3
- "version": "11.6.0",
3
+ "version": "11.6.1-pr-snapshot-1779894247159",
4
+ "type": "module",
4
5
  "description": "A utility component for show/hide functionality",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,19 +15,19 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/shared-types": "11.6.0",
19
- "@instructure/ui-react-utils": "11.6.0",
20
- "@instructure/ui-utils": "11.6.0",
21
- "@instructure/uid": "11.6.0",
22
- "@instructure/ui-view": "11.6.0"
18
+ "@instructure/shared-types": "11.6.1-pr-snapshot-1779894247159",
19
+ "@instructure/ui-react-utils": "11.6.1-pr-snapshot-1779894247159",
20
+ "@instructure/ui-utils": "11.6.1-pr-snapshot-1779894247159",
21
+ "@instructure/ui-view": "11.6.1-pr-snapshot-1779894247159",
22
+ "@instructure/uid": "11.6.1-pr-snapshot-1779894247159"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@testing-library/jest-dom": "^6.6.3",
26
26
  "@testing-library/react": "15.0.7",
27
27
  "@testing-library/user-event": "^14.6.1",
28
28
  "vitest": "^3.2.2",
29
- "@instructure/ui-babel-preset": "11.6.0",
30
- "@instructure/ui-color-utils": "11.6.0"
29
+ "@instructure/ui-babel-preset": "11.6.1-pr-snapshot-1779894247159",
30
+ "@instructure/ui-color-utils": "11.6.1-pr-snapshot-1779894247159"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=18 <=19"
@@ -40,10 +40,8 @@
40
40
  ".": {
41
41
  "types": "./types/index.d.ts",
42
42
  "import": "./es/index.js",
43
- "require": "./lib/index.js",
44
43
  "default": "./es/index.js"
45
44
  },
46
- "./lib/*": "./lib/*",
47
45
  "./es/*": "./es/*",
48
46
  "./types/*": "./types/*",
49
47
  "./package.json": "./package.json",
@@ -53,7 +51,7 @@
53
51
  "lint": "ui-scripts lint",
54
52
  "lint:fix": "ui-scripts lint --fix",
55
53
  "clean": "ui-scripts clean",
56
- "build": "ui-scripts build --modules es,cjs",
54
+ "build": "ui-scripts build",
57
55
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
58
56
  "build:types": "tsc -p tsconfig.build.json",
59
57
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
@@ -1,109 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Expandable = void 0;
7
- var _react = require("react");
8
- var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
9
- var _props = require("./props");
10
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
11
- var _dec, _class, _Expandable;
12
- /*
13
- * The MIT License (MIT)
14
- *
15
- * Copyright (c) 2015 - present Instructure, Inc.
16
- *
17
- * Permission is hereby granted, free of charge, to any person obtaining a copy
18
- * of this software and associated documentation files (the "Software"), to deal
19
- * in the Software without restriction, including without limitation the rights
20
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
- * copies of the Software, and to permit persons to whom the Software is
22
- * furnished to do so, subject to the following conditions:
23
- *
24
- * The above copyright notice and this permission notice shall be included in all
25
- * copies or substantial portions of the Software.
26
- *
27
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- * SOFTWARE.
34
- */
35
- const toggleExpanded = ({
36
- expanded
37
- }) => ({
38
- expanded: !expanded
39
- });
40
-
41
- /**
42
- ---
43
- category: components/utilities
44
- ---
45
- **/
46
- let Expandable = exports.Expandable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_class = (_Expandable = class Expandable extends _react.Component {
47
- constructor(props) {
48
- super(props);
49
- this._contentId = void 0;
50
- this.handleToggle = event => {
51
- var _this$props$onToggle, _this$props;
52
- if (!this.isControlled()) {
53
- this.setState(toggleExpanded);
54
- }
55
- (_this$props$onToggle = (_this$props = this.props).onToggle) === null || _this$props$onToggle === void 0 ? void 0 : _this$props$onToggle.call(_this$props, event, !this.expanded);
56
- };
57
- this.state = {
58
- expanded: this.isControlled(props) ? props.expanded : props.defaultExpanded
59
- };
60
- this._contentId = props.deterministicId();
61
- }
62
- get expanded() {
63
- return this.isControlled() ? this.props.expanded : this.state.expanded;
64
- }
65
- isControlled(props = this.props) {
66
- return typeof props.expanded === 'boolean';
67
- }
68
- static getDerivedStateFromProps(nextProps, state) {
69
- if (
70
- // if component is controlled, keep internal state up to date
71
- // with the `expanded` prop value
72
- typeof nextProps.expanded === 'boolean' && nextProps.expanded !== state.expanded) {
73
- return {
74
- expanded: nextProps.expanded
75
- };
76
- } else {
77
- return null;
78
- }
79
- }
80
- render() {
81
- const _this$props2 = this.props,
82
- children = _this$props2.children,
83
- _this$props2$render = _this$props2.render,
84
- render = _this$props2$render === void 0 ? children : _this$props2$render;
85
- if (typeof render === 'function') {
86
- return render({
87
- expanded: this.expanded,
88
- getToggleProps: (props = {}) => {
89
- return {
90
- ...props,
91
- 'aria-controls': this._contentId,
92
- 'aria-expanded': this.expanded,
93
- onClick: (0, _createChainedFunction.createChainedFunction)(this.handleToggle, props.onClick)
94
- };
95
- },
96
- getDetailsProps: () => {
97
- return {
98
- id: this._contentId
99
- };
100
- }
101
- });
102
- } else {
103
- return null;
104
- }
105
- }
106
- }, _Expandable.displayName = "Expandable", _Expandable.allowedProps = _props.allowedProps, _Expandable.defaultProps = {
107
- defaultExpanded: false
108
- }, _Expandable)) || _class);
109
- var _default = exports.default = Expandable;
package/lib/index.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Expandable", {
7
- enumerable: true,
8
- get: function () {
9
- return _Expandable.Expandable;
10
- }
11
- });
12
- var _Expandable = require("./Expandable");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}