@bitrise/bitkit 13.48.0 → 13.48.1-alpha.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.48.0",
4
+ "version": "13.48.1-alpha.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -250,6 +250,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
250
250
  {
251
251
  'aria-label': ariaLabel,
252
252
  buttonProps = {},
253
+ 'data-testid': dataTestid,
253
254
  defaultValue,
254
255
  disabled,
255
256
  dropdownMaxHeight,
@@ -336,7 +337,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
336
337
  <DropdownProvider context={dropdownCtx} styles={dropdownStyles}>
337
338
  <FormControl {...props} isDisabled={disabled} isInvalid={isError}>
338
339
  {label && (
339
- <FormLabel htmlFor={disabled || readOnly ? undefined : buttonId} marginBlockEnd="4">
340
+ <FormLabel htmlFor={buttonId} marginBlockEnd="4">
340
341
  {label}
341
342
  </FormLabel>
342
343
  )}
@@ -344,6 +345,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
344
345
  {...referenceProps}
345
346
  {...buttonProps}
346
347
  aria-label={ariaLabel}
348
+ data-testid={dataTestid}
347
349
  id={buttonId}
348
350
  iconName={iconName}
349
351
  blurHandler={blurHandler}
@@ -11,6 +11,7 @@ export interface DropdownProps<T> extends ChakraProps {
11
11
  'aria-label'?: string;
12
12
  buttonProps?: ChakraProps;
13
13
  children?: ReactNode;
14
+ 'data-testid'?: string;
14
15
  defaultValue?: T;
15
16
  disabled?: boolean;
16
17
  dropdownMinHeight?: ChakraProps['minH'];
@@ -91,7 +91,11 @@ const DateInput = forwardRef<DateInputProps, 'div'>((props, ref) => {
91
91
  return (
92
92
  <DatePicker
93
93
  mode="day"
94
- onApply={(day) => setValue(day?.toFormat(dateInputDateFormat) || '')}
94
+ onApply={(day) => {
95
+ const newVal = day?.toFormat(dateInputDateFormat) || '';
96
+ onChange?.(newVal);
97
+ setValue(newVal);
98
+ }}
95
99
  onClose={() => setIsDatePickerVisible(false)}
96
100
  selectable={selectable}
97
101
  selected={currentDate}