@dinofront/design_system 1.5.0 → 1.6.0
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/dist/components/SelectV2/SelectV2.types.d.ts +7 -1
- package/dist/index.js +256 -255
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { GroupBase, Props as ReactSelectProps } from 'react-select';
|
|
2
3
|
import { BaseProps, OptionValue, TranslationLocale } from '../../types';
|
|
3
4
|
export type SelectV2Size = 'sm' | 'md' | 'lg';
|
|
4
5
|
export interface SelectV2Option {
|
|
@@ -12,7 +13,11 @@ export interface SelectV2Option {
|
|
|
12
13
|
/** Group heading this option belongs under. */
|
|
13
14
|
group?: string;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
/** react-select props SelectV2 already computes/owns internally and can't be
|
|
17
|
+
* overridden through passthrough without breaking its own logic. */
|
|
18
|
+
type OwnedReactSelectProps = 'aria-invalid' | 'aria-required' | 'className' | 'classNames' | 'components' | 'formatOptionLabel' | 'getOptionLabel' | 'getOptionValue' | 'id' | 'inputId' | 'inputValue' | 'isClearable' | 'isDisabled' | 'isLoading' | 'isMulti' | 'isOptionDisabled' | 'isSearchable' | 'loadingMessage' | 'noOptionsMessage' | 'onChange' | 'onInputChange' | 'options' | 'placeholder' | 'required' | 'unstyled' | 'value';
|
|
19
|
+
export type SelectV2ReactSelectProps = Omit<ReactSelectProps<SelectV2Option, boolean, GroupBase<SelectV2Option>>, OwnedReactSelectProps>;
|
|
20
|
+
export interface SelectV2BaseProps extends BaseProps, Partial<SelectV2ReactSelectProps> {
|
|
16
21
|
/** Static option list, matching `Select`'s required `options` prop. Pass
|
|
17
22
|
* `[]` when `loadOptions` drives the list instead. */
|
|
18
23
|
options: SelectV2Option[];
|
|
@@ -79,3 +84,4 @@ export type SelectV2Props = (SelectV2BaseProps & {
|
|
|
79
84
|
* whatever doesn't fit into a trailing "+N" badge. Default `false`. */
|
|
80
85
|
singleLine?: boolean;
|
|
81
86
|
});
|
|
87
|
+
export {};
|