Files
cloudbeaver/common-react/@dbeaver/ui-kit/src/index.ts
T
Sychev Andrey 36102cdee5 88 create select component (#3302)
* feat: add simple select

* feat: add items states vars and popover animation

* feat: add SelectField component

* feat: select field uses getters to get value/label/selected value, update stories to demonstrate

* docs: update select stories

* refactor: remove margin top because we use gutter in SelectField and for reexported aria popover we don't want to setup such default

* fix: select field - set not the very first value by default, but the first not disabled value

* refactor: add popover height variable, remove padding to look more like select in cloudbeaver by default

* feat: add styles for Select Field description

* refactor: rename properties

* refactor: remove redundant docs for props, remove placeholder props because it's not how aria select is supposed to work, you need to use extra select item to create a placeholder

* refactor: remove support for property path, keep only support for property name or custom getter in sake of simplicity and ease of maintenance

* fix: story for key getters

* fix: return type

* fix: don't set disabled value if all items are disabled

* fix: controlled mode, respect value prop over selectedValue

* refactor: remove width property

* refactor: typesafe key getter

The type iterates through every property key in ItemType.
For each property key, it evaluates whether the property's type is assignable to ValueType and creates a union type of all keys that passed the type check

* refactor: fixes after merge and item hover variable

* fix: input

* feat: add custom arrow icon prop

* refactor: remove ability to use object keys as getters, rename options to items in all places

* fix: rename token
2025-03-06 23:32:41 +08:00

24 lines
741 B
TypeScript

/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import './index.css';
export { Button, type ButtonProps } from './Button/Button.js';
export { Checkbox, type CheckboxProps } from './Checkbox/Checkbox.js';
export { Input, type InputProps } from './Input/Input.js';
export {
Select,
useSelectContext,
useSelectStore,
type SelectProviderProps,
type SelectProps,
type SelectLabelProps,
type SelectPopoverProps,
type SelectItemProps,
} from './Select/Select.js';
export { SelectField, type SelectFieldProps, type SelectItem } from './Select/SelectField.js';