@instructure/ui-select 11.7.2-snapshot-54 → 11.7.2-snapshot-62

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,11 +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.2-snapshot-54](https://github.com/instructure/instructure-ui/compare/v11.7.1...v11.7.2-snapshot-54) (2026-04-23)
6
+ ## [11.7.2-snapshot-62](https://github.com/instructure/instructure-ui/compare/v11.7.1...v11.7.2-snapshot-62) (2026-04-23)
7
7
 
8
8
 
9
9
  ### Features
10
10
 
11
+ * **many:** fix issues ([9d623ed](https://github.com/instructure/instructure-ui/commit/9d623ed9ba2be49549b625d1e436edc230a4df41))
11
12
  * **many:** rework Select, SimpleSelect and TimeSelect ([fb95519](https://github.com/instructure/instructure-ui/commit/fb9551958326bdc8e95d55075c27c7e078c0c69c))
12
13
 
13
14
 
@@ -620,6 +620,7 @@ let Select = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle), _d
620
620
  suppressHydrationWarning: true,
621
621
  ...(interaction === 'enabled' && !isEditable && {
622
622
  themeOverride: componentTheme => ({
623
+ //@ts-expect-error TODO-theme-types
623
624
  backgroundReadonlyColor: componentTheme.backgroundColor
624
625
  })
625
626
  })
@@ -35,6 +35,7 @@ const generateStyle = (componentTheme, _props) => {
35
35
  label: 'select__assistiveText',
36
36
  display: 'none'
37
37
  },
38
+ //@ts-expect-error TODO-theme-types
38
39
  popoverBorderWidth: componentTheme.popoverBorderWidth
39
40
  };
40
41
  };
@@ -631,6 +631,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
631
631
  suppressHydrationWarning: true,
632
632
  ...(interaction === 'enabled' && !isEditable && {
633
633
  themeOverride: componentTheme => ({
634
+ //@ts-expect-error TODO-theme-types
634
635
  backgroundReadonlyColor: componentTheme.backgroundColor
635
636
  })
636
637
  })
@@ -41,6 +41,7 @@ const generateStyle = (componentTheme, _props) => {
41
41
  label: 'select__assistiveText',
42
42
  display: 'none'
43
43
  },
44
+ //@ts-expect-error TODO-theme-types
44
45
  popoverBorderWidth: componentTheme.popoverBorderWidth
45
46
  };
46
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-select",
3
- "version": "11.7.2-snapshot-54",
3
+ "version": "11.7.2-snapshot-62",
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.7.2-snapshot-54",
19
- "@instructure/shared-types": "11.7.2-snapshot-54",
20
- "@instructure/ui-dom-utils": "11.7.2-snapshot-54",
21
- "@instructure/ui-form-field": "11.7.2-snapshot-54",
22
- "@instructure/ui-icons": "11.7.2-snapshot-54",
23
- "@instructure/ui-options": "11.7.2-snapshot-54",
24
- "@instructure/ui-popover": "11.7.2-snapshot-54",
25
- "@instructure/ui-react-utils": "11.7.2-snapshot-54",
26
- "@instructure/ui-selectable": "11.7.2-snapshot-54",
27
- "@instructure/ui-position": "11.7.2-snapshot-54",
28
- "@instructure/ui-text-input": "11.7.2-snapshot-54",
29
- "@instructure/ui-utils": "11.7.2-snapshot-54",
30
- "@instructure/ui-view": "11.7.2-snapshot-54",
31
- "@instructure/uid": "11.7.2-snapshot-54"
18
+ "@instructure/emotion": "11.7.2-snapshot-62",
19
+ "@instructure/shared-types": "11.7.2-snapshot-62",
20
+ "@instructure/ui-dom-utils": "11.7.2-snapshot-62",
21
+ "@instructure/ui-form-field": "11.7.2-snapshot-62",
22
+ "@instructure/ui-icons": "11.7.2-snapshot-62",
23
+ "@instructure/ui-popover": "11.7.2-snapshot-62",
24
+ "@instructure/ui-position": "11.7.2-snapshot-62",
25
+ "@instructure/ui-options": "11.7.2-snapshot-62",
26
+ "@instructure/ui-react-utils": "11.7.2-snapshot-62",
27
+ "@instructure/ui-selectable": "11.7.2-snapshot-62",
28
+ "@instructure/ui-utils": "11.7.2-snapshot-62",
29
+ "@instructure/ui-view": "11.7.2-snapshot-62",
30
+ "@instructure/uid": "11.7.2-snapshot-62",
31
+ "@instructure/ui-text-input": "11.7.2-snapshot-62"
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-color-utils": "11.7.2-snapshot-54",
39
- "@instructure/ui-babel-preset": "11.7.2-snapshot-54",
40
- "@instructure/ui-scripts": "11.7.2-snapshot-54",
41
- "@instructure/ui-themes": "11.7.2-snapshot-54"
38
+ "@instructure/ui-babel-preset": "11.7.2-snapshot-62",
39
+ "@instructure/ui-color-utils": "11.7.2-snapshot-62",
40
+ "@instructure/ui-scripts": "11.7.2-snapshot-62",
41
+ "@instructure/ui-themes": "11.7.2-snapshot-62"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=18 <=19"
@@ -112,18 +112,18 @@ const MemoedOption = memo(
112
112
  (prevProps, nextProps) => {
113
113
  return (
114
114
  prevProps.selectOption.props.isHighlighted ===
115
- nextProps.selectOption.props.isHighlighted &&
115
+ nextProps.selectOption.props.isHighlighted &&
116
116
  prevProps.selectOption.props.isSelected ===
117
- nextProps.selectOption.props.isSelected &&
117
+ nextProps.selectOption.props.isSelected &&
118
118
  prevProps.selectOption.props.isDisabled ===
119
- nextProps.selectOption.props.isDisabled &&
119
+ nextProps.selectOption.props.isDisabled &&
120
120
  prevProps.selectOption.props.children ===
121
- nextProps.selectOption.props.children &&
121
+ nextProps.selectOption.props.children &&
122
122
  prevProps.selectOption.props.id === nextProps.selectOption.props.id &&
123
123
  prevProps.selectOption.props.renderBeforeLabel ===
124
- nextProps.selectOption.props.renderBeforeLabel &&
124
+ nextProps.selectOption.props.renderBeforeLabel &&
125
125
  prevProps.selectOption.props.renderAfterLabel ===
126
- nextProps.selectOption.props.renderAfterLabel &&
126
+ nextProps.selectOption.props.renderAfterLabel &&
127
127
  prevProps.children === nextProps.children
128
128
  )
129
129
  }
@@ -334,59 +334,59 @@ class Select extends Component<SelectProps> {
334
334
 
335
335
  return this.interaction === 'enabled'
336
336
  ? {
337
- onRequestShowOptions: (event) => {
338
- onRequestShowOptions?.(event)
339
- const selectedOptionId = this.selectedOptionId
337
+ onRequestShowOptions: (event) => {
338
+ onRequestShowOptions?.(event)
339
+ const selectedOptionId = this.selectedOptionId
340
340
 
341
- if (selectedOptionId && !Array.isArray(selectedOptionId)) {
342
- // highlight selected option on show
343
- this.highlightOption(event, selectedOptionId)
341
+ if (selectedOptionId && !Array.isArray(selectedOptionId)) {
342
+ // highlight selected option on show
343
+ this.highlightOption(event, selectedOptionId)
344
+ }
345
+ },
346
+ onRequestHideOptions: (event) => {
347
+ onRequestHideOptions?.(event)
348
+ },
349
+ onRequestHighlightOption: (
350
+ event,
351
+ { id, direction }: { id?: string; direction?: number }
352
+ ) => {
353
+ if (!isShowingOptions) return
354
+
355
+ const highlightedOptionId = this.highlightedOptionId
356
+ // if id exists, use that
357
+ let highlightId = this._optionIds.indexOf(id!) > -1 ? id : undefined
358
+ if (!highlightId) {
359
+ if (!highlightedOptionId) {
360
+ // nothing highlighted yet, highlight first option
361
+ highlightId = this._optionIds[0]
362
+ } else {
363
+ // find next id based on direction
364
+ const index = this._optionIds.indexOf(highlightedOptionId)
365
+ highlightId =
366
+ index > -1 ? this._optionIds[index + direction!] : undefined
344
367
  }
345
- },
346
- onRequestHideOptions: (event) => {
347
- onRequestHideOptions?.(event)
348
- },
349
- onRequestHighlightOption: (
368
+ }
369
+ if (highlightId) {
370
+ // only highlight if id exists as a valid option
371
+ this.highlightOption(event, highlightId)
372
+ }
373
+ },
374
+ onRequestHighlightFirstOption: (event) => {
375
+ this.highlightOption(event, this._optionIds[0])
376
+ },
377
+ onRequestHighlightLastOption: (event) => {
378
+ this.highlightOption(
350
379
  event,
351
- { id, direction }: { id?: string; direction?: number }
352
- ) => {
353
- if (!isShowingOptions) return
354
-
355
- const highlightedOptionId = this.highlightedOptionId
356
- // if id exists, use that
357
- let highlightId = this._optionIds.indexOf(id!) > -1 ? id : undefined
358
- if (!highlightId) {
359
- if (!highlightedOptionId) {
360
- // nothing highlighted yet, highlight first option
361
- highlightId = this._optionIds[0]
362
- } else {
363
- // find next id based on direction
364
- const index = this._optionIds.indexOf(highlightedOptionId)
365
- highlightId =
366
- index > -1 ? this._optionIds[index + direction!] : undefined
367
- }
368
- }
369
- if (highlightId) {
370
- // only highlight if id exists as a valid option
371
- this.highlightOption(event, highlightId)
372
- }
373
- },
374
- onRequestHighlightFirstOption: (event) => {
375
- this.highlightOption(event, this._optionIds[0])
376
- },
377
- onRequestHighlightLastOption: (event) => {
378
- this.highlightOption(
379
- event,
380
- this._optionIds[this._optionIds.length - 1]
381
- )
382
- },
383
- onRequestSelectOption: (event, { id }) => {
384
- if (id && this._optionIds.indexOf(id) !== -1) {
385
- // only select if id exists as a valid option
386
- onRequestSelectOption?.(event, { id })
387
- }
380
+ this._optionIds[this._optionIds.length - 1]
381
+ )
382
+ },
383
+ onRequestSelectOption: (event, { id }) => {
384
+ if (id && this._optionIds.indexOf(id) !== -1) {
385
+ // only select if id exists as a valid option
386
+ onRequestSelectOption?.(event, { id })
388
387
  }
389
388
  }
389
+ }
390
390
  : {}
391
391
  }
392
392
 
@@ -413,12 +413,12 @@ class Select extends Component<SelectProps> {
413
413
  return typeof renderOptionLabel === 'function' &&
414
414
  !renderOptionLabel?.prototype?.isReactComponent
415
415
  ? (renderOptionLabel as any).bind(null, {
416
- id,
417
- isDisabled,
418
- isSelected,
419
- isHighlighted,
420
- children
421
- })
416
+ id,
417
+ isDisabled,
418
+ isSelected,
419
+ isHighlighted,
420
+ children
421
+ })
422
422
  : (renderOptionLabel as React.ReactNode)
423
423
  }
424
424
 
@@ -539,18 +539,18 @@ class Select extends Component<SelectProps> {
539
539
 
540
540
  const viewProps: Partial<ViewProps> = isShowingOptions
541
541
  ? {
542
- display: 'block',
543
- overflowY: 'auto',
544
- maxHeight:
545
- optionsMaxHeight ||
546
- this._optionHeight * visibleOptionsCount! -
547
- // in Chrome, we need to prevent scrolling when the bottom area of last item is hovered
548
- (utils.isChromium() ? this.SCROLL_TOLERANCE : 0),
549
- maxWidth: optionsMaxWidth || this.width,
550
- background: 'primary',
551
- elementRef: (node: Element | null) => (this._listView = node),
552
- borderRadius: 'inherit'
553
- }
542
+ display: 'block',
543
+ overflowY: 'auto',
544
+ maxHeight:
545
+ optionsMaxHeight ||
546
+ this._optionHeight * visibleOptionsCount! -
547
+ // in Chrome, we need to prevent scrolling when the bottom area of last item is hovered
548
+ (utils.isChromium() ? this.SCROLL_TOLERANCE : 0),
549
+ maxWidth: optionsMaxWidth || this.width,
550
+ background: 'primary',
551
+ elementRef: (node: Element | null) => (this._listView = node),
552
+ borderRadius: 'inherit'
553
+ }
554
554
  : { maxHeight: 0 }
555
555
 
556
556
  return (
@@ -560,30 +560,30 @@ class Select extends Component<SelectProps> {
560
560
  >
561
561
  {isShowingOptions
562
562
  ? Children.map(children as SelectChildren, (child, index) => {
563
- if (!child || !matchComponentTypes(child, [Group, Option])) {
564
- return // ignore invalid children
565
- }
566
- if (matchComponentTypes<OptionChild>(child, [Option])) {
567
- lastWasGroup = false
568
- return this.renderOption(child, {
569
- getOptionProps,
570
- getDisabledOptionProps
571
- })
572
- }
573
- if (matchComponentTypes<GroupChild>(child, [Group])) {
574
- const afterGroup = lastWasGroup
575
- lastWasGroup = true
576
- return this.renderGroup(child, {
577
- getOptionProps,
578
- getDisabledOptionProps,
579
- // for rendering separators appropriately
580
- isFirstChild: index === 0,
581
- isLastChild: index === Children.count(children) - 1,
582
- afterGroup
583
- })
584
- }
585
- return
586
- })
563
+ if (!child || !matchComponentTypes(child, [Group, Option])) {
564
+ return // ignore invalid children
565
+ }
566
+ if (matchComponentTypes<OptionChild>(child, [Option])) {
567
+ lastWasGroup = false
568
+ return this.renderOption(child, {
569
+ getOptionProps,
570
+ getDisabledOptionProps
571
+ })
572
+ }
573
+ if (matchComponentTypes<GroupChild>(child, [Group])) {
574
+ const afterGroup = lastWasGroup
575
+ lastWasGroup = true
576
+ return this.renderGroup(child, {
577
+ getOptionProps,
578
+ getDisabledOptionProps,
579
+ // for rendering separators appropriately
580
+ isFirstChild: index === 0,
581
+ isLastChild: index === Children.count(children) - 1,
582
+ afterGroup
583
+ })
584
+ }
585
+ return
586
+ })
587
587
  : null}
588
588
  </Options>
589
589
  </View>
@@ -622,8 +622,8 @@ class Select extends Component<SelectProps> {
622
622
  return position === 'before'
623
623
  ? option.props.renderBeforeLabel
624
624
  : option.props.renderAfterLabel
625
- ? option.props.renderAfterLabel
626
- : this.renderIcon()
625
+ ? option.props.renderAfterLabel
626
+ : this.renderIcon()
627
627
  }
628
628
  }
629
629
  } else {
@@ -632,8 +632,8 @@ class Select extends Component<SelectProps> {
632
632
  return position === 'before'
633
633
  ? child.props.renderBeforeLabel
634
634
  : child.props.renderAfterLabel
635
- ? child.props.renderAfterLabel
636
- : this.renderIcon()
635
+ ? child.props.renderAfterLabel
636
+ : this.renderIcon()
637
637
  }
638
638
  }
639
639
  }
@@ -730,26 +730,26 @@ class Select extends Component<SelectProps> {
730
730
  // popup buttons rather than comboboxes.
731
731
  const overrideProps: Partial<TextInputProps> = !isEditable
732
732
  ? {
733
- // We need role="combobox" for the 'open list' button shortcut to work
734
- // with desktop screenreaders.
735
- // But desktop Safari with Voiceover does not support proper combobox
736
- // handling, a 'button' role is set as a workaround.
737
- // See https://bugs.webkit.org/show_bug.cgi?id=236881
738
- // Also on iOS Chrome with role='combobox' it announces unnecessarily
739
- // that its 'read-only' and that this is a 'textfield', see INSTUI-4500
740
- role:
741
- utils.isSafari() ||
733
+ // We need role="combobox" for the 'open list' button shortcut to work
734
+ // with desktop screenreaders.
735
+ // But desktop Safari with Voiceover does not support proper combobox
736
+ // handling, a 'button' role is set as a workaround.
737
+ // See https://bugs.webkit.org/show_bug.cgi?id=236881
738
+ // Also on iOS Chrome with role='combobox' it announces unnecessarily
739
+ // that its 'read-only' and that this is a 'textfield', see INSTUI-4500
740
+ role:
741
+ utils.isSafari() ||
742
742
  utils.isAndroidOrIOS() ||
743
743
  (interaction === 'disabled' && utils.isChromium())
744
- ? 'button'
745
- : 'combobox',
746
- title: inputValue,
747
- 'aria-autocomplete': undefined,
748
- 'aria-readonly': true
749
- }
744
+ ? 'button'
745
+ : 'combobox',
746
+ title: inputValue,
747
+ 'aria-autocomplete': undefined,
748
+ 'aria-readonly': true
749
+ }
750
750
  : interaction === 'disabled' && utils.isChromium()
751
- ? { role: 'button' }
752
- : {}
751
+ ? { role: 'button' }
752
+ : {}
753
753
 
754
754
  // backdoor to autocomplete attr to work around chrome autofill issues
755
755
  if (passthroughProps['autoComplete']) {
@@ -796,8 +796,8 @@ class Select extends Component<SelectProps> {
796
796
  typeof onInputChange === 'function'
797
797
  ? onInputChange
798
798
  : inputValue
799
- ? () => {}
800
- : undefined,
799
+ ? () => { }
800
+ : undefined,
801
801
 
802
802
  onFocus,
803
803
  onBlur: utils.createChainedFunction(onBlur, onRequestHideOptions),
@@ -811,10 +811,11 @@ class Select extends Component<SelectProps> {
811
811
  suppressHydrationWarning
812
812
  {...(interaction === 'enabled' &&
813
813
  !isEditable && {
814
- themeOverride: (componentTheme) => ({
815
- backgroundReadonlyColor: componentTheme.backgroundColor
816
- })
817
- })}
814
+ themeOverride: (componentTheme) => ({
815
+ //@ts-expect-error TODO-theme-types
816
+ backgroundReadonlyColor: componentTheme.backgroundColor
817
+ })
818
+ })}
818
819
  />
819
820
  )
820
821
  }
@@ -871,8 +872,8 @@ class Select extends Component<SelectProps> {
871
872
  mountNode !== undefined
872
873
  ? mountNode
873
874
  : utils.isAndroidOrIOS()
874
- ? this.ref
875
- : undefined
875
+ ? this.ref
876
+ : undefined
876
877
  }
877
878
  positionTarget={this._inputContainer}
878
879
  isShowingContent={isShowingOptions}
@@ -282,6 +282,7 @@ type PropKeys = keyof SelectOwnProps
282
282
  type AllowedPropKeys = Readonly<Array<PropKeys>>
283
283
 
284
284
  type SelectProps = SelectOwnProps &
285
+ //@ts-expect-error TODO-theme-types
285
286
  WithStyleProps<NewComponentTypes['Select'], SelectStyle> &
286
287
  OtherHTMLAttributes<
287
288
  SelectOwnProps,
@@ -41,6 +41,7 @@ const generateStyle = (
41
41
  label: 'select__assistiveText',
42
42
  display: 'none'
43
43
  },
44
+ //@ts-expect-error TODO-theme-types
44
45
  popoverBorderWidth: componentTheme.popoverBorderWidth
45
46
  }
46
47
  }