@instructure/ui-checkbox 11.7.11-snapshot-25 → 11.7.11-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 +1 -1
- package/es/Checkbox/v1/CheckboxFacade/index.js +3 -3
- package/es/Checkbox/v1/ToggleFacade/index.js +3 -3
- package/es/Checkbox/v1/index.js +5 -4
- package/es/Checkbox/v2/CheckboxFacade/index.js +3 -3
- package/es/Checkbox/v2/ToggleFacade/index.js +3 -3
- package/es/Checkbox/v2/index.js +4 -3
- package/es/CheckboxGroup/v1/index.js +4 -3
- package/lib/Checkbox/v1/CheckboxFacade/index.js +6 -4
- package/lib/Checkbox/v1/ToggleFacade/index.js +6 -4
- package/lib/Checkbox/v1/index.js +8 -5
- package/lib/Checkbox/v2/CheckboxFacade/index.js +6 -4
- package/lib/Checkbox/v2/ToggleFacade/index.js +6 -4
- package/lib/Checkbox/v2/index.js +7 -4
- package/lib/CheckboxGroup/v1/index.js +7 -4
- package/package.json +16 -16
- package/src/Checkbox/v1/CheckboxFacade/index.tsx +7 -2
- package/src/Checkbox/v1/ToggleFacade/index.tsx +7 -2
- package/src/Checkbox/v1/index.tsx +7 -4
- package/src/Checkbox/v2/CheckboxFacade/index.tsx +7 -2
- package/src/Checkbox/v2/ToggleFacade/index.tsx +4 -2
- package/src/Checkbox/v2/index.tsx +6 -3
- package/src/CheckboxGroup/v1/index.tsx +7 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Checkbox/v1/CheckboxFacade/index.d.ts +3 -1
- package/types/Checkbox/v1/CheckboxFacade/index.d.ts.map +1 -1
- package/types/Checkbox/v1/ToggleFacade/index.d.ts +3 -1
- package/types/Checkbox/v1/ToggleFacade/index.d.ts.map +1 -1
- package/types/Checkbox/v1/index.d.ts +3 -1
- package/types/Checkbox/v1/index.d.ts.map +1 -1
- package/types/Checkbox/v2/CheckboxFacade/index.d.ts +3 -1
- package/types/Checkbox/v2/CheckboxFacade/index.d.ts.map +1 -1
- package/types/Checkbox/v2/ToggleFacade/index.d.ts +3 -1
- package/types/Checkbox/v2/ToggleFacade/index.d.ts.map +1 -1
- package/types/Checkbox/v2/index.d.ts +3 -1
- package/types/Checkbox/v2/index.d.ts.map +1 -1
- package/types/CheckboxGroup/v1/index.d.ts +3 -1
- package/types/CheckboxGroup/v1/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.11-snapshot-
|
|
6
|
+
## [11.7.11-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.10...v11.7.11-snapshot-26) (2026-11-23)
|
|
7
7
|
|
|
8
8
|
### Bug Fixes
|
|
9
9
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -36,7 +35,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
36
35
|
parent: Checkbox
|
|
37
36
|
---
|
|
38
37
|
**/
|
|
39
|
-
|
|
38
|
+
export class CheckboxFacadeBase extends Component {
|
|
40
39
|
static displayName = 'CheckboxFacade';
|
|
41
40
|
static componentId = 'CheckboxFacade';
|
|
42
41
|
static allowedProps = allowedProps;
|
|
@@ -95,6 +94,7 @@ let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
95
94
|
})]
|
|
96
95
|
});
|
|
97
96
|
}
|
|
98
|
-
}
|
|
97
|
+
}
|
|
98
|
+
const CheckboxFacade = withStyle(generateStyle, generateComponentTheme)(CheckboxFacadeBase);
|
|
99
99
|
export default CheckboxFacade;
|
|
100
100
|
export { CheckboxFacade };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -35,7 +34,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
35
34
|
parent: Checkbox
|
|
36
35
|
---
|
|
37
36
|
**/
|
|
38
|
-
|
|
37
|
+
export class ToggleFacadeBase extends Component {
|
|
39
38
|
static displayName = 'ToggleFacade';
|
|
40
39
|
static componentId = 'ToggleFacade';
|
|
41
40
|
static allowedProps = allowedProps;
|
|
@@ -103,6 +102,7 @@ let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
103
102
|
}), labelPlacement === 'end' && this.renderLabel()]
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
|
-
}
|
|
105
|
+
}
|
|
106
|
+
const ToggleFacade = withStyle(generateStyle, generateComponentTheme)(ToggleFacadeBase);
|
|
107
107
|
export default ToggleFacade;
|
|
108
108
|
export { ToggleFacade };
|
package/es/Checkbox/v1/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _dec2, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -44,7 +43,8 @@ category: components
|
|
|
44
43
|
tags: toggle, switch
|
|
45
44
|
---
|
|
46
45
|
**/
|
|
47
|
-
|
|
46
|
+
|
|
47
|
+
export class CheckboxBase extends Component {
|
|
48
48
|
static displayName = 'Checkbox';
|
|
49
49
|
static componentId = 'Checkbox';
|
|
50
50
|
static allowedProps = allowedProps;
|
|
@@ -239,7 +239,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
|
|
|
239
239
|
styles,
|
|
240
240
|
isRequired
|
|
241
241
|
} = this.props;
|
|
242
|
-
const props = omitProps(this.props,
|
|
242
|
+
const props = omitProps(this.props, CheckboxBase.allowedProps);
|
|
243
243
|
error(!(variant === 'toggle' && indeterminate), `[Checkbox] The \`toggle\` variant does not support the \`indeterminate\` property. Use the \`simple\` variant instead.`);
|
|
244
244
|
return _jsx("div", {
|
|
245
245
|
css: styles?.checkbox
|
|
@@ -275,6 +275,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
|
|
|
275
275
|
})
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
}
|
|
278
|
+
}
|
|
279
|
+
const Checkbox = withDeterministicId()(withStyle(generateStyle, generateComponentTheme)(CheckboxBase));
|
|
279
280
|
export default Checkbox;
|
|
280
281
|
export { Checkbox, CheckboxFacade, ToggleFacade };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -34,7 +33,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
34
33
|
parent: Checkbox
|
|
35
34
|
---
|
|
36
35
|
**/
|
|
37
|
-
|
|
36
|
+
export class CheckboxFacadeBase extends Component {
|
|
38
37
|
static displayName = 'CheckboxFacade';
|
|
39
38
|
static componentId = 'CheckboxFacade';
|
|
40
39
|
static themeId = 'Checkbox';
|
|
@@ -101,6 +100,7 @@ let CheckboxFacade = (_dec = withStyleNew(generateStyle, 'Checkbox'), _dec(_clas
|
|
|
101
100
|
})]
|
|
102
101
|
});
|
|
103
102
|
}
|
|
104
|
-
}
|
|
103
|
+
}
|
|
104
|
+
const CheckboxFacade = withStyleNew(generateStyle, 'Checkbox')(CheckboxFacadeBase);
|
|
105
105
|
export default CheckboxFacade;
|
|
106
106
|
export { CheckboxFacade };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -34,7 +33,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
34
33
|
parent: Checkbox
|
|
35
34
|
---
|
|
36
35
|
**/
|
|
37
|
-
|
|
36
|
+
export class ToggleFacadeBase extends Component {
|
|
38
37
|
static displayName = 'ToggleFacade';
|
|
39
38
|
static componentId = 'ToggleFacade';
|
|
40
39
|
static themeId = 'Toggle';
|
|
@@ -114,6 +113,7 @@ let ToggleFacade = (_dec = withStyleNew(generateStyle, 'Toggle'), _dec(_class =
|
|
|
114
113
|
}), labelPlacement === 'end' && this.renderLabel()]
|
|
115
114
|
});
|
|
116
115
|
}
|
|
117
|
-
}
|
|
116
|
+
}
|
|
117
|
+
const ToggleFacade = withStyleNew(generateStyle, 'Toggle')(ToggleFacadeBase);
|
|
118
118
|
export default ToggleFacade;
|
|
119
119
|
export { ToggleFacade };
|
package/es/Checkbox/v2/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _dec2, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -43,7 +42,8 @@ category: components
|
|
|
43
42
|
tags: toggle, switch
|
|
44
43
|
---
|
|
45
44
|
**/
|
|
46
|
-
|
|
45
|
+
|
|
46
|
+
export class CheckboxBase extends Component {
|
|
47
47
|
static displayName = 'Checkbox';
|
|
48
48
|
static componentId = 'Checkbox';
|
|
49
49
|
static allowedProps = allowedProps;
|
|
@@ -312,6 +312,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle
|
|
|
312
312
|
})
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
}
|
|
315
|
+
}
|
|
316
|
+
const Checkbox = withDeterministicId()(withStyleNew(generateStyle)(CheckboxBase));
|
|
316
317
|
export default Checkbox;
|
|
317
318
|
export { Checkbox, CheckboxFacade, ToggleFacade };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -34,7 +33,8 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
34
33
|
category: components
|
|
35
34
|
---
|
|
36
35
|
**/
|
|
37
|
-
|
|
36
|
+
|
|
37
|
+
export class CheckboxGroupBase extends Component {
|
|
38
38
|
static displayName = 'CheckboxGroup';
|
|
39
39
|
static componentId = 'CheckboxGroup';
|
|
40
40
|
static allowedProps = allowedProps;
|
|
@@ -125,6 +125,7 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = class CheckboxG
|
|
|
125
125
|
children: this.renderChildren()
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
}
|
|
128
|
+
}
|
|
129
|
+
const CheckboxGroup = withDeterministicId()(CheckboxGroupBase);
|
|
129
130
|
export default CheckboxGroup;
|
|
130
131
|
export { CheckboxGroup };
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.CheckboxFacade = void 0;
|
|
7
|
+
exports.default = exports.CheckboxFacadeBase = exports.CheckboxFacade = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _uiSvgImages = require("@instructure/ui-svg-images");
|
|
10
10
|
var _uiIcons = require("@instructure/ui-icons");
|
|
@@ -13,7 +13,6 @@ var _styles = _interopRequireDefault(require("./styles.js"));
|
|
|
13
13
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
14
14
|
var _props = require("./props.js");
|
|
15
15
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
16
|
-
var _dec, _class;
|
|
17
16
|
/*
|
|
18
17
|
* The MIT License (MIT)
|
|
19
18
|
*
|
|
@@ -37,12 +36,13 @@ var _dec, _class;
|
|
|
37
36
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
38
37
|
* SOFTWARE.
|
|
39
38
|
*/
|
|
39
|
+
|
|
40
40
|
/**
|
|
41
41
|
---
|
|
42
42
|
parent: Checkbox
|
|
43
43
|
---
|
|
44
44
|
**/
|
|
45
|
-
|
|
45
|
+
class CheckboxFacadeBase extends _react.Component {
|
|
46
46
|
static displayName = 'CheckboxFacade';
|
|
47
47
|
static componentId = 'CheckboxFacade';
|
|
48
48
|
static allowedProps = _props.allowedProps;
|
|
@@ -101,5 +101,7 @@ let CheckboxFacade = exports.CheckboxFacade = (_dec = (0, _emotion.withStyle)(_s
|
|
|
101
101
|
})]
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
|
+
exports.CheckboxFacadeBase = CheckboxFacadeBase;
|
|
106
|
+
const CheckboxFacade = exports.CheckboxFacade = (0, _emotion.withStyle)(_styles.default, _theme.default)(CheckboxFacadeBase);
|
|
105
107
|
var _default = exports.default = CheckboxFacade;
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.ToggleFacade = void 0;
|
|
7
|
+
exports.default = exports.ToggleFacadeBase = exports.ToggleFacade = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _uiIcons = require("@instructure/ui-icons");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
@@ -12,7 +12,6 @@ var _styles = _interopRequireDefault(require("./styles.js"));
|
|
|
12
12
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
13
13
|
var _props = require("./props.js");
|
|
14
14
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
15
|
-
var _dec, _class;
|
|
16
15
|
/*
|
|
17
16
|
* The MIT License (MIT)
|
|
18
17
|
*
|
|
@@ -36,12 +35,13 @@ var _dec, _class;
|
|
|
36
35
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
36
|
* SOFTWARE.
|
|
38
37
|
*/
|
|
38
|
+
|
|
39
39
|
/**
|
|
40
40
|
---
|
|
41
41
|
parent: Checkbox
|
|
42
42
|
---
|
|
43
43
|
**/
|
|
44
|
-
|
|
44
|
+
class ToggleFacadeBase extends _react.Component {
|
|
45
45
|
static displayName = 'ToggleFacade';
|
|
46
46
|
static componentId = 'ToggleFacade';
|
|
47
47
|
static allowedProps = _props.allowedProps;
|
|
@@ -109,5 +109,7 @@ let ToggleFacade = exports.ToggleFacade = (_dec = (0, _emotion.withStyle)(_style
|
|
|
109
109
|
}), labelPlacement === 'end' && this.renderLabel()]
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
|
+
exports.ToggleFacadeBase = ToggleFacadeBase;
|
|
114
|
+
const ToggleFacade = exports.ToggleFacade = (0, _emotion.withStyle)(_styles.default, _theme.default)(ToggleFacadeBase);
|
|
113
115
|
var _default = exports.default = ToggleFacade;
|
package/lib/Checkbox/v1/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Checkbox = void 0;
|
|
7
|
+
exports.CheckboxBase = exports.Checkbox = void 0;
|
|
8
8
|
Object.defineProperty(exports, "CheckboxFacade", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function () {
|
|
@@ -33,7 +33,6 @@ var _styles = _interopRequireDefault(require("./styles.js"));
|
|
|
33
33
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
34
34
|
var _props = require("./props.js");
|
|
35
35
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
36
|
-
var _dec, _dec2, _class;
|
|
37
36
|
/*
|
|
38
37
|
* The MIT License (MIT)
|
|
39
38
|
*
|
|
@@ -57,13 +56,15 @@ var _dec, _dec2, _class;
|
|
|
57
56
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
58
57
|
* SOFTWARE.
|
|
59
58
|
*/
|
|
59
|
+
|
|
60
60
|
/**
|
|
61
61
|
---
|
|
62
62
|
category: components
|
|
63
63
|
tags: toggle, switch
|
|
64
64
|
---
|
|
65
65
|
**/
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
class CheckboxBase extends _react.Component {
|
|
67
68
|
static displayName = 'Checkbox';
|
|
68
69
|
static componentId = 'Checkbox';
|
|
69
70
|
static allowedProps = _props.allowedProps;
|
|
@@ -258,7 +259,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _uiReactUtils.withDeterministicId)
|
|
|
258
259
|
styles,
|
|
259
260
|
isRequired
|
|
260
261
|
} = this.props;
|
|
261
|
-
const props = (0, _uiReactUtils.omitProps)(this.props,
|
|
262
|
+
const props = (0, _uiReactUtils.omitProps)(this.props, CheckboxBase.allowedProps);
|
|
262
263
|
(0, _console.logError)(!(variant === 'toggle' && indeterminate), `[Checkbox] The \`toggle\` variant does not support the \`indeterminate\` property. Use the \`simple\` variant instead.`);
|
|
263
264
|
return (0, _jsxRuntime.jsx)("div", {
|
|
264
265
|
css: styles?.checkbox
|
|
@@ -294,5 +295,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _uiReactUtils.withDeterministicId)
|
|
|
294
295
|
})
|
|
295
296
|
});
|
|
296
297
|
}
|
|
297
|
-
}
|
|
298
|
+
}
|
|
299
|
+
exports.CheckboxBase = CheckboxBase;
|
|
300
|
+
const Checkbox = exports.Checkbox = (0, _uiReactUtils.withDeterministicId)()((0, _emotion.withStyle)(_styles.default, _theme.default)(CheckboxBase));
|
|
298
301
|
var _default = exports.default = Checkbox;
|
|
@@ -4,14 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.CheckboxFacade = void 0;
|
|
7
|
+
exports.default = exports.CheckboxFacadeBase = exports.CheckboxFacade = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _uiIcons = require("@instructure/ui-icons");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
11
11
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
12
12
|
var _props = require("./props.js");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
-
var _dec, _class;
|
|
15
14
|
/*
|
|
16
15
|
* The MIT License (MIT)
|
|
17
16
|
*
|
|
@@ -35,12 +34,13 @@ var _dec, _class;
|
|
|
35
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
35
|
* SOFTWARE.
|
|
37
36
|
*/
|
|
37
|
+
|
|
38
38
|
/**
|
|
39
39
|
---
|
|
40
40
|
parent: Checkbox
|
|
41
41
|
---
|
|
42
42
|
**/
|
|
43
|
-
|
|
43
|
+
class CheckboxFacadeBase extends _react.Component {
|
|
44
44
|
static displayName = 'CheckboxFacade';
|
|
45
45
|
static componentId = 'CheckboxFacade';
|
|
46
46
|
static themeId = 'Checkbox';
|
|
@@ -107,5 +107,7 @@ let CheckboxFacade = exports.CheckboxFacade = (_dec = (0, _emotion.withStyleNew)
|
|
|
107
107
|
})]
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
}
|
|
110
|
+
}
|
|
111
|
+
exports.CheckboxFacadeBase = CheckboxFacadeBase;
|
|
112
|
+
const CheckboxFacade = exports.CheckboxFacade = (0, _emotion.withStyleNew)(_styles.default, 'Checkbox')(CheckboxFacadeBase);
|
|
111
113
|
var _default = exports.default = CheckboxFacade;
|
|
@@ -4,14 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.ToggleFacade = void 0;
|
|
7
|
+
exports.default = exports.ToggleFacadeBase = exports.ToggleFacade = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _uiIcons = require("@instructure/ui-icons");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
11
11
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
12
12
|
var _props = require("./props.js");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
-
var _dec, _class;
|
|
15
14
|
/*
|
|
16
15
|
* The MIT License (MIT)
|
|
17
16
|
*
|
|
@@ -35,12 +34,13 @@ var _dec, _class;
|
|
|
35
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
35
|
* SOFTWARE.
|
|
37
36
|
*/
|
|
37
|
+
|
|
38
38
|
/**
|
|
39
39
|
---
|
|
40
40
|
parent: Checkbox
|
|
41
41
|
---
|
|
42
42
|
**/
|
|
43
|
-
|
|
43
|
+
class ToggleFacadeBase extends _react.Component {
|
|
44
44
|
static displayName = 'ToggleFacade';
|
|
45
45
|
static componentId = 'ToggleFacade';
|
|
46
46
|
static themeId = 'Toggle';
|
|
@@ -120,5 +120,7 @@ let ToggleFacade = exports.ToggleFacade = (_dec = (0, _emotion.withStyleNew)(_st
|
|
|
120
120
|
}), labelPlacement === 'end' && this.renderLabel()]
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
}
|
|
123
|
+
}
|
|
124
|
+
exports.ToggleFacadeBase = ToggleFacadeBase;
|
|
125
|
+
const ToggleFacade = exports.ToggleFacade = (0, _emotion.withStyleNew)(_styles.default, 'Toggle')(ToggleFacadeBase);
|
|
124
126
|
var _default = exports.default = ToggleFacade;
|
package/lib/Checkbox/v2/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Checkbox = void 0;
|
|
7
|
+
exports.CheckboxBase = exports.Checkbox = void 0;
|
|
8
8
|
Object.defineProperty(exports, "CheckboxFacade", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function () {
|
|
@@ -32,7 +32,6 @@ var _index2 = require("./ToggleFacade/index.js");
|
|
|
32
32
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
33
33
|
var _props = require("./props.js");
|
|
34
34
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
35
|
-
var _dec, _dec2, _class;
|
|
36
35
|
/*
|
|
37
36
|
* The MIT License (MIT)
|
|
38
37
|
*
|
|
@@ -56,13 +55,15 @@ var _dec, _dec2, _class;
|
|
|
56
55
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
57
56
|
* SOFTWARE.
|
|
58
57
|
*/
|
|
58
|
+
|
|
59
59
|
/**
|
|
60
60
|
---
|
|
61
61
|
category: components
|
|
62
62
|
tags: toggle, switch
|
|
63
63
|
---
|
|
64
64
|
**/
|
|
65
|
-
|
|
65
|
+
|
|
66
|
+
class CheckboxBase extends _react.Component {
|
|
66
67
|
static displayName = 'Checkbox';
|
|
67
68
|
static componentId = 'Checkbox';
|
|
68
69
|
static allowedProps = _props.allowedProps;
|
|
@@ -331,5 +332,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _uiReactUtils.withDeterministicId)
|
|
|
331
332
|
})
|
|
332
333
|
});
|
|
333
334
|
}
|
|
334
|
-
}
|
|
335
|
+
}
|
|
336
|
+
exports.CheckboxBase = CheckboxBase;
|
|
337
|
+
const Checkbox = exports.Checkbox = (0, _uiReactUtils.withDeterministicId)()((0, _emotion.withStyleNew)(_styles.default)(CheckboxBase));
|
|
335
338
|
var _default = exports.default = Checkbox;
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.CheckboxGroup = void 0;
|
|
6
|
+
exports.default = exports.CheckboxGroupBase = exports.CheckboxGroup = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _v11_ = require("@instructure/ui-form-field/v11_6");
|
|
9
9
|
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
10
10
|
var _index = require("../../Checkbox/v1/index.js");
|
|
11
11
|
var _props = require("./props.js");
|
|
12
12
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
|
-
var _dec, _class;
|
|
14
13
|
/*
|
|
15
14
|
* The MIT License (MIT)
|
|
16
15
|
*
|
|
@@ -34,12 +33,14 @@ var _dec, _class;
|
|
|
34
33
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
34
|
* SOFTWARE.
|
|
36
35
|
*/
|
|
36
|
+
|
|
37
37
|
/**
|
|
38
38
|
---
|
|
39
39
|
category: components
|
|
40
40
|
---
|
|
41
41
|
**/
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
class CheckboxGroupBase extends _react.Component {
|
|
43
44
|
static displayName = 'CheckboxGroup';
|
|
44
45
|
static componentId = 'CheckboxGroup';
|
|
45
46
|
static allowedProps = _props.allowedProps;
|
|
@@ -130,5 +131,7 @@ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _uiReactUtils.withDeterm
|
|
|
130
131
|
children: this.renderChildren()
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
|
-
}
|
|
134
|
+
}
|
|
135
|
+
exports.CheckboxGroupBase = CheckboxGroupBase;
|
|
136
|
+
const CheckboxGroup = exports.CheckboxGroup = (0, _uiReactUtils.withDeterministicId)()(CheckboxGroupBase);
|
|
134
137
|
var _default = exports.default = CheckboxGroup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-checkbox",
|
|
3
|
-
"version": "11.7.11-snapshot-
|
|
3
|
+
"version": "11.7.11-snapshot-26",
|
|
4
4
|
"description": " styled HTML input type='checkbox' component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,24 +15,24 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/console": "11.7.11-snapshot-
|
|
19
|
-
"@instructure/emotion": "11.7.11-snapshot-
|
|
20
|
-
"@instructure/shared-types": "11.7.11-snapshot-
|
|
21
|
-
"@instructure/ui-dom-utils": "11.7.11-snapshot-
|
|
22
|
-
"@instructure/ui-form-field": "11.7.11-snapshot-
|
|
23
|
-
"@instructure/ui-icons": "11.7.11-snapshot-
|
|
24
|
-
"@instructure/ui-react-utils": "11.7.11-snapshot-
|
|
25
|
-
"@instructure/ui-svg-images": "11.7.11-snapshot-
|
|
26
|
-
"@instructure/ui-themes": "11.7.11-snapshot-
|
|
27
|
-
"@instructure/ui-utils": "11.7.11-snapshot-
|
|
28
|
-
"@instructure/ui-view": "11.7.11-snapshot-
|
|
29
|
-
"@instructure/uid": "11.7.11-snapshot-
|
|
18
|
+
"@instructure/console": "11.7.11-snapshot-26",
|
|
19
|
+
"@instructure/emotion": "11.7.11-snapshot-26",
|
|
20
|
+
"@instructure/shared-types": "11.7.11-snapshot-26",
|
|
21
|
+
"@instructure/ui-dom-utils": "11.7.11-snapshot-26",
|
|
22
|
+
"@instructure/ui-form-field": "11.7.11-snapshot-26",
|
|
23
|
+
"@instructure/ui-icons": "11.7.11-snapshot-26",
|
|
24
|
+
"@instructure/ui-react-utils": "11.7.11-snapshot-26",
|
|
25
|
+
"@instructure/ui-svg-images": "11.7.11-snapshot-26",
|
|
26
|
+
"@instructure/ui-themes": "11.7.11-snapshot-26",
|
|
27
|
+
"@instructure/ui-utils": "11.7.11-snapshot-26",
|
|
28
|
+
"@instructure/ui-view": "11.7.11-snapshot-26",
|
|
29
|
+
"@instructure/uid": "11.7.11-snapshot-26",
|
|
30
30
|
"keycode": "^2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@instructure/ui-axe-check": "11.7.11-snapshot-
|
|
34
|
-
"@instructure/ui-babel-preset": "11.7.11-snapshot-
|
|
35
|
-
"@instructure/ui-color-utils": "11.7.11-snapshot-
|
|
33
|
+
"@instructure/ui-axe-check": "11.7.11-snapshot-26",
|
|
34
|
+
"@instructure/ui-babel-preset": "11.7.11-snapshot-26",
|
|
35
|
+
"@instructure/ui-color-utils": "11.7.11-snapshot-26",
|
|
36
36
|
"vitest": "^5.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -40,8 +40,7 @@ import type { CheckboxFacadeProps } from './props'
|
|
|
40
40
|
parent: Checkbox
|
|
41
41
|
---
|
|
42
42
|
**/
|
|
43
|
-
|
|
44
|
-
class CheckboxFacade extends Component<CheckboxFacadeProps> {
|
|
43
|
+
export class CheckboxFacadeBase extends Component<CheckboxFacadeProps> {
|
|
45
44
|
static displayName = 'CheckboxFacade'
|
|
46
45
|
static readonly componentId = 'CheckboxFacade'
|
|
47
46
|
|
|
@@ -96,5 +95,11 @@ class CheckboxFacade extends Component<CheckboxFacadeProps> {
|
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
|
|
98
|
+
const CheckboxFacade = withStyle(
|
|
99
|
+
generateStyle,
|
|
100
|
+
generateComponentTheme
|
|
101
|
+
)(CheckboxFacadeBase)
|
|
102
|
+
type CheckboxFacade = CheckboxFacadeBase
|
|
103
|
+
|
|
99
104
|
export default CheckboxFacade
|
|
100
105
|
export { CheckboxFacade }
|
|
@@ -39,8 +39,7 @@ import type { ToggleFacadeProps } from './props'
|
|
|
39
39
|
parent: Checkbox
|
|
40
40
|
---
|
|
41
41
|
**/
|
|
42
|
-
|
|
43
|
-
class ToggleFacade extends Component<ToggleFacadeProps> {
|
|
42
|
+
export class ToggleFacadeBase extends Component<ToggleFacadeProps> {
|
|
44
43
|
static displayName = 'ToggleFacade'
|
|
45
44
|
static readonly componentId = 'ToggleFacade'
|
|
46
45
|
|
|
@@ -102,5 +101,11 @@ class ToggleFacade extends Component<ToggleFacadeProps> {
|
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
104
|
+
const ToggleFacade = withStyle(
|
|
105
|
+
generateStyle,
|
|
106
|
+
generateComponentTheme
|
|
107
|
+
)(ToggleFacadeBase)
|
|
108
|
+
type ToggleFacade = ToggleFacadeBase
|
|
109
|
+
|
|
105
110
|
export default ToggleFacade
|
|
106
111
|
export { ToggleFacade }
|
|
@@ -55,9 +55,7 @@ tags: toggle, switch
|
|
|
55
55
|
---
|
|
56
56
|
**/
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
@withStyle(generateStyle, generateComponentTheme)
|
|
60
|
-
class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
58
|
+
export class CheckboxBase extends Component<CheckboxProps, CheckboxState> {
|
|
61
59
|
static displayName = 'Checkbox'
|
|
62
60
|
static readonly componentId = 'Checkbox'
|
|
63
61
|
|
|
@@ -306,7 +304,7 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
306
304
|
isRequired
|
|
307
305
|
} = this.props
|
|
308
306
|
|
|
309
|
-
const props = omitProps(this.props,
|
|
307
|
+
const props = omitProps(this.props, CheckboxBase.allowedProps)
|
|
310
308
|
|
|
311
309
|
error(
|
|
312
310
|
!(variant === 'toggle' && indeterminate),
|
|
@@ -351,5 +349,10 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
351
349
|
}
|
|
352
350
|
}
|
|
353
351
|
|
|
352
|
+
const Checkbox = withDeterministicId()(
|
|
353
|
+
withStyle(generateStyle, generateComponentTheme)(CheckboxBase)
|
|
354
|
+
)
|
|
355
|
+
type Checkbox = CheckboxBase
|
|
356
|
+
|
|
354
357
|
export default Checkbox
|
|
355
358
|
export { Checkbox, CheckboxFacade, ToggleFacade }
|
|
@@ -42,8 +42,7 @@ import type { CheckboxFacadeProps } from './props'
|
|
|
42
42
|
parent: Checkbox
|
|
43
43
|
---
|
|
44
44
|
**/
|
|
45
|
-
|
|
46
|
-
class CheckboxFacade extends Component<CheckboxFacadeProps> {
|
|
45
|
+
export class CheckboxFacadeBase extends Component<CheckboxFacadeProps> {
|
|
47
46
|
static displayName = 'CheckboxFacade'
|
|
48
47
|
static readonly componentId = 'CheckboxFacade'
|
|
49
48
|
static readonly themeId = 'Checkbox'
|
|
@@ -111,5 +110,11 @@ class CheckboxFacade extends Component<CheckboxFacadeProps> {
|
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
112
|
|
|
113
|
+
const CheckboxFacade = withStyleNew(
|
|
114
|
+
generateStyle,
|
|
115
|
+
'Checkbox'
|
|
116
|
+
)(CheckboxFacadeBase)
|
|
117
|
+
type CheckboxFacade = CheckboxFacadeBase
|
|
118
|
+
|
|
114
119
|
export default CheckboxFacade
|
|
115
120
|
export { CheckboxFacade }
|
|
@@ -42,8 +42,7 @@ import type { ToggleFacadeProps } from './props'
|
|
|
42
42
|
parent: Checkbox
|
|
43
43
|
---
|
|
44
44
|
**/
|
|
45
|
-
|
|
46
|
-
class ToggleFacade extends Component<ToggleFacadeProps> {
|
|
45
|
+
export class ToggleFacadeBase extends Component<ToggleFacadeProps> {
|
|
47
46
|
static displayName = 'ToggleFacade'
|
|
48
47
|
static readonly componentId = 'ToggleFacade'
|
|
49
48
|
static readonly themeId = 'Toggle'
|
|
@@ -122,5 +121,8 @@ class ToggleFacade extends Component<ToggleFacadeProps> {
|
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
|
|
124
|
+
const ToggleFacade = withStyleNew(generateStyle, 'Toggle')(ToggleFacadeBase)
|
|
125
|
+
type ToggleFacade = ToggleFacadeBase
|
|
126
|
+
|
|
125
127
|
export default ToggleFacade
|
|
126
128
|
export { ToggleFacade }
|