File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -228,13 +228,14 @@ function Checkbox(
228228 isHidden = { isHidden }
229229 mods = { mods }
230230 styles = { { position : 'relative' } }
231+ qa = "CheckboxWrapper"
231232 >
232233 < HiddenInput
233234 data-qa = "HiddenInput"
234235 { ...mergeProps ( inputProps , focusProps ) }
235236 ref = { inputRef }
236237 />
237- < CheckboxElement qa = { qa || ' Checkbox' } mods = { mods } styles = { inputStyles } >
238+ < CheckboxElement qa = " Checkbox" mods = { mods } styles = { inputStyles } >
238239 { markIcon }
239240 </ CheckboxElement >
240241 { children && < Text nowrap > { children } </ Text > }
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ function _TextInputBase(props: CubeTextInputBaseProps, ref) {
341341 const textField = (
342342 < InputWrapperElement
343343 ref = { wrapperRef }
344- qa = { qa || ' TextInput' }
344+ qa = " TextInput"
345345 mods = { modifiers }
346346 data-size = { size }
347347 styles = { wrapperStyles }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121 BLOCK_STYLES ,
2222 extractStyles ,
2323 OUTER_STYLES ,
24+ Props ,
2425 tasty ,
2526} from '../../../tasty' ;
2627import { useFocus } from '../../../utils/react/interactions' ;
@@ -116,6 +117,7 @@ export interface CubeComboBoxProps<T>
116117 /** An optional keyboard delegate implementation, to override the default. */
117118 keyboardDelegate ?: KeyboardDelegate ;
118119 loadingState ?: LoadingState ;
120+ wrapperProps ?: Props ;
119121 /**
120122 * The filter function used to determine if a option should be included in the combo box list.
121123 * Has no effect when `items` is provided.
@@ -179,6 +181,7 @@ export const ComboBox = forwardRef(function ComboBox<T extends object>(
179181 filter,
180182 styles,
181183 labelSuffix,
184+ wrapperProps,
182185 ...otherProps
183186 } = props ;
184187
@@ -333,16 +336,17 @@ export const ComboBox = forwardRef(function ComboBox<T extends object>(
333336 let comboBoxField = (
334337 < ComboBoxWrapperElement
335338 ref = { wrapperRef }
336- qa = { qa || 'ComboBox' }
339+ qa = "ComboBoxWrapper"
337340 { ...modAttrs ( mods ) }
338341 styles = { outerStyles }
339342 style = { {
340343 zIndex : isFocused ? 1 : 'initial' ,
341344 } }
342345 data-size = { size }
346+ wrapperProps = { wrapperProps }
343347 >
344348 < InputElement
345- qa = "Input "
349+ qa = "ComboBoxInput "
346350 { ...mergeProps ( inputProps , hoverProps , focusProps ) }
347351 ref = { inputRef }
348352 autoComplete = { autoComplete }
Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ export interface CubeSelectBaseProps<T>
267267 inputProps ?: Props ;
268268 type ?: 'secondary' | 'clear' | 'primary' | ( string & { } ) ;
269269 suffixPosition ?: 'before' | 'after' ;
270+ wrapperProps ?: Props ;
270271}
271272
272273export interface CubeSelectProps < T > extends CubeSelectBaseProps < T > {
@@ -328,6 +329,7 @@ function Select<T extends object>(
328329 labelSuffix,
329330 ellipsis,
330331 suffixPosition = 'before' ,
332+ wrapperProps,
331333 ...otherProps
332334 } = props ;
333335 let state = useSelectState ( props ) ;
@@ -414,12 +416,13 @@ function Select<T extends object>(
414416
415417 let selectField = (
416418 < SelectWrapperElement
417- qa = { qa || 'Select' }
419+ qa = "SelectWrapper"
418420 mods = { modifiers }
419421 styles = { outerStyles }
420422 data-size = { size }
421423 data-type = { type }
422424 data-theme = { theme }
425+ wrapperProps = { wrapperProps }
423426 >
424427 < HiddenSelect
425428 state = { state }
@@ -430,6 +433,7 @@ function Select<T extends object>(
430433 < SelectElement
431434 { ...mergeProps ( buttonProps , hoverProps , focusProps ) }
432435 ref = { triggerRef }
436+ qa = "Select"
433437 styles = { inputStyles }
434438 data-theme = { theme }
435439 data-size = { size }
You can’t perform that action at this time.
0 commit comments