@instructure/ui-simple-select 11.0.1-snapshot-0 → 11.0.1-snapshot-2

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,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.0.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-0) (2025-10-07)
6
+ ## [11.0.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-2) (2025-10-10)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-simple-select
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-simple-select",
3
- "version": "11.0.1-snapshot-0",
3
+ "version": "11.0.1-snapshot-2",
4
4
  "description": "A component for standard select element behavior.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,18 +24,18 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "11.0.1-snapshot-0",
28
- "@instructure/shared-types": "11.0.1-snapshot-0",
29
- "@instructure/ui-form-field": "11.0.1-snapshot-0",
30
- "@instructure/ui-position": "11.0.1-snapshot-0",
31
- "@instructure/ui-react-utils": "11.0.1-snapshot-0",
32
- "@instructure/ui-select": "11.0.1-snapshot-0"
27
+ "@instructure/console": "11.0.1-snapshot-2",
28
+ "@instructure/shared-types": "11.0.1-snapshot-2",
29
+ "@instructure/ui-form-field": "11.0.1-snapshot-2",
30
+ "@instructure/ui-position": "11.0.1-snapshot-2",
31
+ "@instructure/ui-react-utils": "11.0.1-snapshot-2",
32
+ "@instructure/ui-select": "11.0.1-snapshot-2"
33
33
  },
34
34
  "devDependencies": {
35
- "@instructure/ui-babel-preset": "11.0.1-snapshot-0",
36
- "@instructure/ui-color-utils": "11.0.1-snapshot-0",
37
- "@instructure/ui-icons": "11.0.1-snapshot-0",
38
- "@instructure/ui-utils": "11.0.1-snapshot-0",
35
+ "@instructure/ui-babel-preset": "11.0.1-snapshot-2",
36
+ "@instructure/ui-color-utils": "11.0.1-snapshot-2",
37
+ "@instructure/ui-icons": "11.0.1-snapshot-2",
38
+ "@instructure/ui-utils": "11.0.1-snapshot-2",
39
39
  "@testing-library/jest-dom": "^6.6.3",
40
40
  "@testing-library/react": "15.0.7",
41
41
  "@testing-library/user-event": "^14.6.1",
@@ -36,105 +36,56 @@ type: example
36
36
 
37
37
  To use `SimpleSelect` controlled, simply provide the `value` prop the string that corresponds to the selected option's `value` prop. The `onChange` callback can be used to update the value stored in state.
38
38
 
39
- - ```javascript
40
- class Example extends React.Component {
41
- state = {
42
- value: 'Alaska'
43
- }
44
-
45
- handleSelect = (e, { id, value }) => {
46
- this.setState({ value })
47
- }
48
-
49
- render() {
50
- return (
51
- <SimpleSelect
52
- renderLabel="Controlled Select"
53
- assistiveText="Use arrow keys to navigate options."
54
- value={this.state.value}
55
- onChange={this.handleSelect}
56
- >
57
- {this.props.options.map((opt, index) => (
58
- <SimpleSelect.Option key={index} id={`opt-${index}`} value={opt}>
59
- {opt}
60
- </SimpleSelect.Option>
61
- ))}
62
- </SimpleSelect>
63
- )
64
- }
65
- }
39
+ ```js
40
+ ---
41
+ type: example
42
+ ---
43
+ const Example = ({ options }) => {
44
+ const [value, setValue] = useState('Alaska')
66
45
 
67
- render(
68
- <Example
69
- options={[
70
- 'Alaska',
71
- 'American Samoa',
72
- 'Arizona',
73
- 'Arkansas',
74
- 'California',
75
- 'Colorado',
76
- 'Connecticut',
77
- 'Delaware',
78
- 'District Of Columbia',
79
- 'Federated States Of Micronesia',
80
- 'Florida',
81
- 'Georgia',
82
- 'Guam',
83
- 'Hawaii',
84
- 'Idaho',
85
- 'Illinois'
86
- ]}
87
- />
88
- )
89
- ```
90
-
91
- - ```javascript
92
- const Example = ({ options }) => {
93
- const [value, setValue] = useState('Alaska')
94
-
95
- const handleSelect = (e, { id, value }) => {
96
- setValue(value)
97
- }
98
-
99
- return (
100
- <SimpleSelect
101
- renderLabel="Controlled Select"
102
- assistiveText="Use arrow keys to navigate options."
103
- value={value}
104
- onChange={handleSelect}
105
- >
106
- {options.map((opt, index) => (
107
- <SimpleSelect.Option key={index} id={`opt-${index}`} value={opt}>
108
- {opt}
109
- </SimpleSelect.Option>
110
- ))}
111
- </SimpleSelect>
112
- )
46
+ const handleSelect = (e, { id, value }) => {
47
+ setValue(value)
113
48
  }
114
49
 
115
- render(
116
- <Example
117
- options={[
118
- 'Alaska',
119
- 'American Samoa',
120
- 'Arizona',
121
- 'Arkansas',
122
- 'California',
123
- 'Colorado',
124
- 'Connecticut',
125
- 'Delaware',
126
- 'District Of Columbia',
127
- 'Federated States Of Micronesia',
128
- 'Florida',
129
- 'Georgia',
130
- 'Guam',
131
- 'Hawaii',
132
- 'Idaho',
133
- 'Illinois'
134
- ]}
135
- />
50
+ return (
51
+ <SimpleSelect
52
+ renderLabel="Controlled Select"
53
+ assistiveText="Use arrow keys to navigate options."
54
+ value={value}
55
+ onChange={handleSelect}
56
+ >
57
+ {options.map((opt, index) => (
58
+ <SimpleSelect.Option key={index} id={`opt-${index}`} value={opt}>
59
+ {opt}
60
+ </SimpleSelect.Option>
61
+ ))}
62
+ </SimpleSelect>
136
63
  )
137
- ```
64
+ }
65
+
66
+ render(
67
+ <Example
68
+ options={[
69
+ 'Alaska',
70
+ 'American Samoa',
71
+ 'Arizona',
72
+ 'Arkansas',
73
+ 'California',
74
+ 'Colorado',
75
+ 'Connecticut',
76
+ 'Delaware',
77
+ 'District Of Columbia',
78
+ 'Federated States Of Micronesia',
79
+ 'Florida',
80
+ 'Georgia',
81
+ 'Guam',
82
+ 'Hawaii',
83
+ 'Idaho',
84
+ 'Illinois'
85
+ ]}
86
+ />
87
+ )
88
+ ```
138
89
 
139
90
  ### Groups
140
91