@instructure/ui-select 11.6.0 → 11.6.1-snapshot-129
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 +50 -313
- package/es/Select/{index.js → v1/index.js} +5 -5
- package/es/{index.js → exports/a.js} +3 -3
- package/lib/Select/{index.js → v1/index.js} +17 -17
- package/lib/{index.js → exports/a.js} +4 -4
- package/package.json +48 -26
- package/src/Select/{index.tsx → v1/index.tsx} +8 -8
- package/src/Select/{props.ts → v1/props.ts} +1 -1
- package/src/{index.ts → exports/a.ts} +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Select/v1/Group/index.d.ts.map +1 -0
- package/types/Select/v1/Group/props.d.ts.map +1 -0
- package/types/Select/v1/Option/index.d.ts.map +1 -0
- package/types/Select/v1/Option/props.d.ts.map +1 -0
- package/types/Select/{index.d.ts → v1/index.d.ts} +2 -2
- package/types/Select/v1/index.d.ts.map +1 -0
- package/types/Select/{props.d.ts → v1/props.d.ts} +1 -1
- package/types/Select/v1/props.d.ts.map +1 -0
- package/types/Select/v1/styles.d.ts.map +1 -0
- package/types/Select/v1/theme.d.ts.map +1 -0
- package/types/exports/a.d.ts +7 -0
- package/types/exports/a.d.ts.map +1 -0
- package/types/Select/Group/index.d.ts.map +0 -1
- package/types/Select/Group/props.d.ts.map +0 -1
- package/types/Select/Option/index.d.ts.map +0 -1
- package/types/Select/Option/props.d.ts.map +0 -1
- package/types/Select/index.d.ts.map +0 -1
- package/types/Select/props.d.ts.map +0 -1
- package/types/Select/styles.d.ts.map +0 -1
- package/types/Select/theme.d.ts.map +0 -1
- package/types/index.d.ts +0 -7
- package/types/index.d.ts.map +0 -1
- /package/es/Select/{Group → v1/Group}/index.js +0 -0
- /package/es/Select/{Group → v1/Group}/props.js +0 -0
- /package/es/Select/{Option → v1/Option}/index.js +0 -0
- /package/es/Select/{Option → v1/Option}/props.js +0 -0
- /package/es/Select/{props.js → v1/props.js} +0 -0
- /package/es/Select/{styles.js → v1/styles.js} +0 -0
- /package/es/Select/{theme.js → v1/theme.js} +0 -0
- /package/lib/Select/{Group → v1/Group}/index.js +0 -0
- /package/lib/Select/{Group → v1/Group}/props.js +0 -0
- /package/lib/Select/{Option → v1/Option}/index.js +0 -0
- /package/lib/Select/{Option → v1/Option}/props.js +0 -0
- /package/lib/Select/{props.js → v1/props.js} +0 -0
- /package/lib/Select/{styles.js → v1/styles.js} +0 -0
- /package/lib/Select/{theme.js → v1/theme.js} +0 -0
- /package/src/Select/{Group → v1/Group}/index.tsx +0 -0
- /package/src/Select/{Group → v1/Group}/props.ts +0 -0
- /package/src/Select/{Option → v1/Option}/index.tsx +0 -0
- /package/src/Select/{Option → v1/Option}/props.ts +0 -0
- /package/src/Select/{README.md → v1/README.md} +0 -0
- /package/src/Select/{styles.ts → v1/styles.ts} +0 -0
- /package/src/Select/{theme.ts → v1/theme.ts} +0 -0
- /package/types/Select/{Group → v1/Group}/index.d.ts +0 -0
- /package/types/Select/{Group → v1/Group}/props.d.ts +0 -0
- /package/types/Select/{Option → v1/Option}/index.d.ts +0 -0
- /package/types/Select/{Option → v1/Option}/props.d.ts +0 -0
- /package/types/Select/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/Select/{theme.d.ts → v1/theme.d.ts} +0 -0
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
export { Select } from "
|
|
25
|
-
export { Group as SelectGroup } from "
|
|
26
|
-
export { Option as SelectOption } from "
|
|
24
|
+
export { Select } from "../Select/v1/index.js";
|
|
25
|
+
export { Group as SelectGroup } from "../Select/v1/Group/index.js";
|
|
26
|
+
export { Option as SelectOption } from "../Select/v1/Option/index.js";
|
|
@@ -16,13 +16,13 @@ var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js
|
|
|
16
16
|
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
17
17
|
var _getBoundingClientRect = require("@instructure/ui-dom-utils/lib/getBoundingClientRect.js");
|
|
18
18
|
var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
|
|
19
|
-
var
|
|
19
|
+
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
20
20
|
var _Selectable = require("@instructure/ui-selectable/lib/Selectable");
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDownLine.js");
|
|
25
|
-
var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
|
|
21
|
+
var _v11_2 = require("@instructure/ui-popover/v11_6");
|
|
22
|
+
var _v11_3 = require("@instructure/ui-text-input/v11_6");
|
|
23
|
+
var _v11_4 = require("@instructure/ui-options/v11_6");
|
|
24
|
+
var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/generated/IconArrowOpenDownLine.js");
|
|
25
|
+
var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/generated/IconArrowOpenUpLine.js");
|
|
26
26
|
var _emotion = require("@instructure/emotion");
|
|
27
27
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
28
28
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -66,7 +66,7 @@ const MemoedOption = /*#__PURE__*/(0, _react.memo)(function Opt(props) {
|
|
|
66
66
|
children = props.children;
|
|
67
67
|
return (
|
|
68
68
|
// The main <Options> that renders this is always an "ul"
|
|
69
|
-
(0, _jsxRuntime.jsx)(
|
|
69
|
+
(0, _jsxRuntime.jsx)(_v11_4.Options.Item, {
|
|
70
70
|
as: "li",
|
|
71
71
|
...optionsItemProps,
|
|
72
72
|
children: children
|
|
@@ -88,7 +88,7 @@ category: components
|
|
|
88
88
|
tags: autocomplete, typeahead, combobox, dropdown, search, form
|
|
89
89
|
---
|
|
90
90
|
**/
|
|
91
|
-
let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.
|
|
91
|
+
let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Select = class Select extends _react.Component {
|
|
92
92
|
constructor(...args) {
|
|
93
93
|
super(...args);
|
|
94
94
|
this.SCROLL_TOLERANCE = 0.5;
|
|
@@ -317,7 +317,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
317
317
|
};
|
|
318
318
|
let optionProps = {
|
|
319
319
|
// passthrough props
|
|
320
|
-
...(0, _omitProps.omitProps)(option.props, [..._Option.Option.allowedProps, ...
|
|
320
|
+
...(0, _omitProps.omitProps)(option.props, [..._Option.Option.allowedProps, ..._v11_4.Options.Item.allowedProps]),
|
|
321
321
|
// props from selectable
|
|
322
322
|
...getOptionProps({
|
|
323
323
|
id
|
|
@@ -367,16 +367,16 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
367
367
|
const groupChildren = [];
|
|
368
368
|
// add a separator above
|
|
369
369
|
if (!isFirstChild && !afterGroup) {
|
|
370
|
-
groupChildren.push(_Options$Separator || (_Options$Separator = (0, _jsxRuntime.jsx)(
|
|
370
|
+
groupChildren.push(_Options$Separator || (_Options$Separator = (0, _jsxRuntime.jsx)(_v11_4.Options.Separator, {})));
|
|
371
371
|
}
|
|
372
372
|
// create a sublist as a group
|
|
373
373
|
// a wrapping listitem will be created by Options
|
|
374
|
-
groupChildren.push((0, _jsxRuntime.jsx)(
|
|
374
|
+
groupChildren.push((0, _jsxRuntime.jsx)(_v11_4.Options, {
|
|
375
375
|
id: id,
|
|
376
376
|
as: "ul",
|
|
377
377
|
role: "group",
|
|
378
378
|
renderLabel: renderLabel,
|
|
379
|
-
...(0, _omitProps.omitProps)(rest, [...
|
|
379
|
+
...(0, _omitProps.omitProps)(rest, [..._v11_4.Options.allowedProps, ..._Group.Group.allowedProps]),
|
|
380
380
|
children: _react.Children.map(children, child => {
|
|
381
381
|
return this.renderOption(child, {
|
|
382
382
|
getOptionProps,
|
|
@@ -386,7 +386,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
386
386
|
}));
|
|
387
387
|
// add a separator below
|
|
388
388
|
if (!isLastChild) {
|
|
389
|
-
groupChildren.push(_Options$Separator2 || (_Options$Separator2 = (0, _jsxRuntime.jsx)(
|
|
389
|
+
groupChildren.push(_Options$Separator2 || (_Options$Separator2 = (0, _jsxRuntime.jsx)(_v11_4.Options.Separator, {})));
|
|
390
390
|
}
|
|
391
391
|
return groupChildren;
|
|
392
392
|
}
|
|
@@ -414,9 +414,9 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
414
414
|
} : {
|
|
415
415
|
maxHeight: 0
|
|
416
416
|
};
|
|
417
|
-
return (0, _jsxRuntime.jsx)(
|
|
417
|
+
return (0, _jsxRuntime.jsx)(_v11_.View, {
|
|
418
418
|
...viewProps,
|
|
419
|
-
children: (0, _jsxRuntime.jsx)(
|
|
419
|
+
children: (0, _jsxRuntime.jsx)(_v11_4.Options, {
|
|
420
420
|
...getListProps({
|
|
421
421
|
as: 'ul',
|
|
422
422
|
elementRef: this.handleListRef
|
|
@@ -607,7 +607,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
607
607
|
...overrideProps
|
|
608
608
|
};
|
|
609
609
|
// suppressHydrationWarning is needed because `role` depends on the browser type
|
|
610
|
-
return (0, _jsxRuntime.jsx)(
|
|
610
|
+
return (0, _jsxRuntime.jsx)(_v11_3.TextInput, {
|
|
611
611
|
...triggerProps,
|
|
612
612
|
...getInputProps(inputProps),
|
|
613
613
|
suppressHydrationWarning: true
|
|
@@ -653,7 +653,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
653
653
|
...getDescriptionProps(),
|
|
654
654
|
css: styles === null || styles === void 0 ? void 0 : styles.assistiveText,
|
|
655
655
|
children: assistiveText
|
|
656
|
-
}), (0, _jsxRuntime.jsx)(
|
|
656
|
+
}), (0, _jsxRuntime.jsx)(_v11_2.Popover, {
|
|
657
657
|
constrain: constrain,
|
|
658
658
|
placement: placement
|
|
659
659
|
// On iOS VoiceOver, the Popover is mounted right after the input
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "Select", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _v.Select;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "SelectGroup", {
|
|
@@ -21,6 +21,6 @@ Object.defineProperty(exports, "SelectOption", {
|
|
|
21
21
|
return _Option.Option;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
var
|
|
25
|
-
var _Group = require("
|
|
26
|
-
var _Option = require("
|
|
24
|
+
var _v = require("../Select/v1");
|
|
25
|
+
var _Group = require("../Select/v1/Group");
|
|
26
|
+
var _Option = require("../Select/v1/Option");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-select",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.1-snapshot-129",
|
|
4
4
|
"description": "A component for select and autocomplete behavior.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,30 +15,30 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.27.6",
|
|
18
|
-
"@instructure/emotion": "11.6.
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/ui-form-field": "11.6.
|
|
22
|
-
"@instructure/ui-icons": "11.6.
|
|
23
|
-
"@instructure/ui-
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-selectable": "11.6.
|
|
28
|
-
"@instructure/ui-text-input": "11.6.
|
|
29
|
-
"@instructure/ui-
|
|
30
|
-
"@instructure/
|
|
31
|
-
"@instructure/
|
|
18
|
+
"@instructure/emotion": "11.6.1-snapshot-129",
|
|
19
|
+
"@instructure/ui-dom-utils": "11.6.1-snapshot-129",
|
|
20
|
+
"@instructure/shared-types": "11.6.1-snapshot-129",
|
|
21
|
+
"@instructure/ui-form-field": "11.6.1-snapshot-129",
|
|
22
|
+
"@instructure/ui-icons": "11.6.1-snapshot-129",
|
|
23
|
+
"@instructure/ui-options": "11.6.1-snapshot-129",
|
|
24
|
+
"@instructure/ui-popover": "11.6.1-snapshot-129",
|
|
25
|
+
"@instructure/ui-react-utils": "11.6.1-snapshot-129",
|
|
26
|
+
"@instructure/ui-position": "11.6.1-snapshot-129",
|
|
27
|
+
"@instructure/ui-selectable": "11.6.1-snapshot-129",
|
|
28
|
+
"@instructure/ui-text-input": "11.6.1-snapshot-129",
|
|
29
|
+
"@instructure/ui-view": "11.6.1-snapshot-129",
|
|
30
|
+
"@instructure/uid": "11.6.1-snapshot-129",
|
|
31
|
+
"@instructure/ui-utils": "11.6.1-snapshot-129"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@testing-library/jest-dom": "^6.6.3",
|
|
35
35
|
"@testing-library/react": "15.0.7",
|
|
36
36
|
"@testing-library/user-event": "^14.6.1",
|
|
37
37
|
"vitest": "^3.2.2",
|
|
38
|
-
"@instructure/ui-
|
|
39
|
-
"@instructure/ui-
|
|
40
|
-
"@instructure/ui-scripts": "11.6.
|
|
41
|
-
"@instructure/ui-themes": "11.6.
|
|
38
|
+
"@instructure/ui-babel-preset": "11.6.1-snapshot-129",
|
|
39
|
+
"@instructure/ui-color-utils": "11.6.1-snapshot-129",
|
|
40
|
+
"@instructure/ui-scripts": "11.6.1-snapshot-129",
|
|
41
|
+
"@instructure/ui-themes": "11.6.1-snapshot-129"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=18 <=19"
|
|
@@ -48,17 +48,39 @@
|
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"exports": {
|
|
51
|
-
".": {
|
|
52
|
-
"types": "./types/index.d.ts",
|
|
53
|
-
"import": "./es/index.js",
|
|
54
|
-
"require": "./lib/index.js",
|
|
55
|
-
"default": "./es/index.js"
|
|
56
|
-
},
|
|
57
51
|
"./lib/*": "./lib/*",
|
|
58
52
|
"./es/*": "./es/*",
|
|
59
53
|
"./types/*": "./types/*",
|
|
60
54
|
"./package.json": "./package.json",
|
|
61
|
-
"./src/*": "./src/*"
|
|
55
|
+
"./src/*": "./src/*",
|
|
56
|
+
".": {
|
|
57
|
+
"src": "./src/exports/a.ts",
|
|
58
|
+
"types": "./types/exports/a.d.ts",
|
|
59
|
+
"import": "./es/exports/a.js",
|
|
60
|
+
"require": "./lib/exports/a.js",
|
|
61
|
+
"default": "./es/exports/a.js"
|
|
62
|
+
},
|
|
63
|
+
"./v11_6": {
|
|
64
|
+
"src": "./src/exports/a.ts",
|
|
65
|
+
"types": "./types/exports/a.d.ts",
|
|
66
|
+
"import": "./es/exports/a.js",
|
|
67
|
+
"require": "./lib/exports/a.js",
|
|
68
|
+
"default": "./es/exports/a.js"
|
|
69
|
+
},
|
|
70
|
+
"./v11_7": {
|
|
71
|
+
"src": "./src/exports/a.ts",
|
|
72
|
+
"types": "./types/exports/a.d.ts",
|
|
73
|
+
"import": "./es/exports/a.js",
|
|
74
|
+
"require": "./lib/exports/a.js",
|
|
75
|
+
"default": "./es/exports/a.js"
|
|
76
|
+
},
|
|
77
|
+
"./latest": {
|
|
78
|
+
"src": "./src/exports/a.ts",
|
|
79
|
+
"types": "./types/exports/a.d.ts",
|
|
80
|
+
"import": "./es/exports/a.js",
|
|
81
|
+
"require": "./lib/exports/a.js",
|
|
82
|
+
"default": "./es/exports/a.js"
|
|
83
|
+
}
|
|
62
84
|
},
|
|
63
85
|
"scripts": {
|
|
64
86
|
"lint": "ui-scripts lint",
|
|
@@ -37,29 +37,29 @@ import {
|
|
|
37
37
|
isActiveElement
|
|
38
38
|
} from '@instructure/ui-dom-utils'
|
|
39
39
|
|
|
40
|
-
import { View } from '@instructure/ui-view'
|
|
40
|
+
import { View } from '@instructure/ui-view/v11_6'
|
|
41
41
|
import { Selectable } from '@instructure/ui-selectable'
|
|
42
|
-
import { Popover } from '@instructure/ui-popover'
|
|
43
|
-
import { TextInput } from '@instructure/ui-text-input'
|
|
44
|
-
import { Options } from '@instructure/ui-options'
|
|
42
|
+
import { Popover } from '@instructure/ui-popover/v11_6'
|
|
43
|
+
import { TextInput } from '@instructure/ui-text-input/v11_6'
|
|
44
|
+
import { Options } from '@instructure/ui-options/v11_6'
|
|
45
45
|
import {
|
|
46
46
|
IconArrowOpenDownLine,
|
|
47
47
|
IconArrowOpenUpLine
|
|
48
48
|
} from '@instructure/ui-icons'
|
|
49
49
|
|
|
50
|
-
import type { ViewProps } from '@instructure/ui-view'
|
|
51
|
-
import type { TextInputProps } from '@instructure/ui-text-input'
|
|
50
|
+
import type { ViewProps } from '@instructure/ui-view/v11_6'
|
|
51
|
+
import type { TextInputProps } from '@instructure/ui-text-input/v11_6'
|
|
52
52
|
import type {
|
|
53
53
|
OptionsItemProps,
|
|
54
54
|
OptionsSeparatorProps,
|
|
55
55
|
OptionsItemRenderProps
|
|
56
|
-
} from '@instructure/ui-options'
|
|
56
|
+
} from '@instructure/ui-options/v11_6'
|
|
57
57
|
import type {
|
|
58
58
|
SelectableProps,
|
|
59
59
|
SelectableRender
|
|
60
60
|
} from '@instructure/ui-selectable'
|
|
61
61
|
|
|
62
|
-
import { withStyle, BorderWidth } from '@instructure/emotion'
|
|
62
|
+
import { withStyleLegacy as withStyle, BorderWidth } from '@instructure/emotion'
|
|
63
63
|
|
|
64
64
|
import generateStyle from './styles'
|
|
65
65
|
import generateComponentTheme from './theme'
|
|
@@ -28,7 +28,7 @@ import type {
|
|
|
28
28
|
OtherHTMLAttributes,
|
|
29
29
|
SelectTheme
|
|
30
30
|
} from '@instructure/shared-types'
|
|
31
|
-
import type { FormMessage } from '@instructure/ui-form-field'
|
|
31
|
+
import type { FormMessage } from '@instructure/ui-form-field/v11_6'
|
|
32
32
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
33
33
|
import type {
|
|
34
34
|
PlacementPropValues,
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
export { Select } from '
|
|
26
|
-
export { Group as SelectGroup } from '
|
|
27
|
-
export { Option as SelectOption } from '
|
|
25
|
+
export { Select } from '../Select/v1'
|
|
26
|
+
export { Group as SelectGroup } from '../Select/v1/Group'
|
|
27
|
+
export { Option as SelectOption } from '../Select/v1/Option'
|
|
28
28
|
|
|
29
|
-
export type { SelectProps, SelectOwnProps } from '
|
|
30
|
-
export type { SelectGroupProps } from '
|
|
31
|
-
export type { SelectOptionProps } from '
|
|
29
|
+
export type { SelectProps, SelectOwnProps } from '../Select/v1/props'
|
|
30
|
+
export type { SelectGroupProps } from '../Select/v1/Group/props'
|
|
31
|
+
export type { SelectOptionProps } from '../Select/v1/Option/props'
|