Skip to content

Commit 6612034

Browse files
authored
fix(ListBox): add component and fix other docs (#712)
1 parent 44b56b1 commit 6612034

33 files changed

+2853
-136
lines changed

.changeset/rare-spies-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Unify the focused state in Menu component.

.changeset/short-bottles-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Fix errorMessage type.

src/components/fields/Checkbox/CheckboxGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const CheckGroupElement = tasty({
4646

4747
export interface CubeCheckboxGroupProps
4848
extends BaseProps,
49-
AriaCheckboxGroupProps,
49+
Omit<AriaCheckboxGroupProps, 'errorMessage'>,
5050
FieldBaseProps,
5151
ContainerStyleProps {
5252
orientation?: 'vertical' | 'horizontal';

src/components/fields/ComboBox/ComboBox.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Meta, StoryFn } from '@storybook/react';
22
import { userEvent, within } from '@storybook/test';
33
import { IconCoin } from '@tabler/icons-react';
44

5-
import { SELECTED_KEY_ARG } from '../../../stories/FormFieldArgs';
65
import { baseProps } from '../../../stories/lists/baseProps';
76
import { wait } from '../../../test/utils/wait';
87
import { Button } from '../../actions/index';
@@ -12,7 +11,7 @@ import { Flow } from '../../layout/Flow';
1211
import { ComboBox, CubeComboBoxProps } from './ComboBox';
1312

1413
export default {
15-
title: 'Pickers/ComboBox',
14+
title: 'Forms/ComboBox',
1615
component: ComboBox,
1716
subcomponents: { Item: ComboBox.Item, Section: ComboBox.Section },
1817
args: { id: 'name', width: '200px', label: 'Choose your favourite color' },

src/components/fields/ComboBox/ComboBox.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { Section as BaseSection, Item, useComboBoxState } from 'react-stately';
2222
import { useEvent } from '../../../_internal/index';
2323
import { DownIcon, LoadingIcon } from '../../../icons';
2424
import { useProviderProps } from '../../../provider';
25+
import { FieldBaseProps } from '../../../shared';
2526
import {
2627
BASE_STYLES,
2728
COLOR_STYLES,
@@ -96,8 +97,9 @@ export interface CubeComboBoxProps<T>
9697
CubeSelectBaseProps<T>,
9798
'onOpenChange' | 'onBlur' | 'onFocus' | 'validate' | 'onSelectionChange'
9899
>,
99-
AriaComboBoxProps<T>,
100-
AriaTextFieldProps {
100+
Omit<AriaComboBoxProps<T>, 'errorMessage'>,
101+
Omit<AriaTextFieldProps, 'errorMessage'>,
102+
FieldBaseProps {
101103
defaultSelectedKey?: string | null;
102104
selectedKey?: string | null;
103105
onSelectionChange?: (selectedKey: string | null) => void;

src/components/fields/DatePicker/DateInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { DEFAULT_DATE_PROPS } from './props';
2828
import { formatSegments, useFocusManagerRef } from './utils';
2929

3030
export interface CubeDateInputProps<T extends DateValue = DateValue>
31-
extends AriaDateFieldProps<T>,
31+
extends Omit<AriaDateFieldProps<T>, 'errorMessage'>,
3232
BaseProps,
3333
ContainerStyleProps,
3434
FieldBaseProps {

src/components/fields/DatePicker/DatePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { DateFieldBase } from './types';
3333
import { useFocusManagerRef } from './utils';
3434

3535
export interface CubeDatePickerProps<T extends DateValue = DateValue>
36-
extends AriaDatePickerProps<T>,
36+
extends Omit<AriaDatePickerProps<T>, 'errorMessage'>,
3737
DateFieldBase<T>,
3838
BaseProps,
3939
ContainerStyleProps,

src/components/fields/DatePicker/DatePickerInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const DateInputElement = tasty({
2626
});
2727

2828
interface CubeDatePickerInputProps<T extends DateValue>
29-
extends AriaDatePickerProps<T>,
29+
extends Omit<AriaDatePickerProps<T>, 'errorMessage'>,
3030
DateFieldBase<T> {
3131
hideValidationIcon?: boolean;
3232
maxGranularity?: Granularity;

src/components/fields/DatePicker/DateRangePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const DateRangeDash = tasty({
4444
});
4545

4646
export interface CubeDateRangePickerProps<T extends DateValue = DateValue>
47-
extends AriaDateRangePickerProps<T>,
47+
extends Omit<AriaDateRangePickerProps<T>, 'errorMessage'>,
4848
BaseProps,
4949
DateFieldBase<T>,
5050
ContainerStyleProps,

src/components/fields/DatePicker/DateRangeSeparatedPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const DateRangeDash = tasty({
4646

4747
export interface CubeDateRangeSeparatedPickerProps<
4848
T extends DateValue = DateValue,
49-
> extends AriaDateRangePickerProps<T>,
49+
> extends Omit<AriaDateRangePickerProps<T>, 'errorMessage'>,
5050
BaseProps,
5151
ContainerStyleProps,
5252
DateFieldBase<T>,

0 commit comments

Comments
 (0)