@telia/teddy 0.7.54 → 0.7.55
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.
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { RootProps } from './select-root';
|
|
2
|
+
import { ItemProps } from './select-item';
|
|
3
|
+
import { GroupProps } from './select-group';
|
|
4
|
+
import { ViewportProps } from './select-viewport';
|
|
5
|
+
import { ContentProps } from './select-content';
|
|
6
|
+
import { ValueProps } from './select-value';
|
|
7
|
+
import { TriggerProps } from './select-trigger';
|
|
8
|
+
import { PortalProps } from './select-portal';
|
|
9
|
+
import { IndicatorProps } from './select-indicator';
|
|
10
|
+
import { SeparatorProps } from './select-separator';
|
|
11
|
+
|
|
12
|
+
export declare const Select: import('react').ForwardRefExoticComponent<import('@radix-ui/react-select').SelectProps & {
|
|
13
|
+
name: string;
|
|
14
|
+
validationState?: import('./select-root').ValidationState;
|
|
15
|
+
onValueChange?: (value: string) => string;
|
|
16
|
+
label?: string;
|
|
17
|
+
helperText?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
errorText?: string;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
value?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
frameClassName?: string;
|
|
24
|
+
options: string[];
|
|
25
|
+
maxHeight?: string | number;
|
|
26
|
+
} & import('react').RefAttributes<never>> & {
|
|
27
|
+
Indicator: import('react').ForwardRefExoticComponent<Omit<Partial<import('..').IconProps>, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
28
|
+
Item: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectItemProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
29
|
+
Group: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectGroupProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
30
|
+
options?: string[];
|
|
31
|
+
label?: string;
|
|
32
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
33
|
+
Viewport: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectViewportProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
34
|
+
Content: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
35
|
+
Value: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectValueProps & import('react').RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
} & import('react').RefAttributes<HTMLSpanElement>>;
|
|
38
|
+
Trigger: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectTriggerProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
39
|
+
validationState?: import('./select-root').ValidationState;
|
|
40
|
+
readonly?: boolean;
|
|
41
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
42
|
+
Portal: import('react').ForwardRefExoticComponent<import('@radix-ui/react-select').SelectPortalProps & import('react').RefAttributes<never>>;
|
|
43
|
+
Separator: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-select').SelectSeparatorProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
44
|
+
};
|
|
45
|
+
export type SelectProps = {
|
|
46
|
+
Root: RootProps;
|
|
47
|
+
Indicator: IndicatorProps;
|
|
48
|
+
Item: ItemProps;
|
|
49
|
+
Group: GroupProps;
|
|
50
|
+
Viewport: ViewportProps;
|
|
51
|
+
Content: ContentProps;
|
|
52
|
+
Value: ValueProps;
|
|
53
|
+
Trigger: TriggerProps;
|
|
54
|
+
Portal: PortalProps;
|
|
55
|
+
Separator: SeparatorProps;
|
|
56
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
4
|
+
export type ValidationState = 'valid' | 'invalid';
|
|
5
|
+
type SelectContextValue = {
|
|
6
|
+
isDirty: boolean;
|
|
7
|
+
setIsDirty: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
validationState?: ValidationState;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
options: string[];
|
|
14
|
+
maxHeight?: string | number;
|
|
15
|
+
};
|
|
16
|
+
export declare const SelectContext: React.Context<SelectContextValue>;
|
|
17
|
+
export type RootProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Root> & {
|
|
18
|
+
name: string;
|
|
19
|
+
/** Whether the input should display its "valid" or "invalid" visual styling. */
|
|
20
|
+
validationState?: ValidationState;
|
|
21
|
+
/** Called when the value changes. */
|
|
22
|
+
onValueChange?: (value: string) => string;
|
|
23
|
+
label?: string;
|
|
24
|
+
helperText?: string;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
errorText?: string;
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
value?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
frameClassName?: string;
|
|
31
|
+
options: string[];
|
|
32
|
+
/** Maximum height of the dropdown. Defaults to the available viewport height. */
|
|
33
|
+
maxHeight?: string | number;
|
|
34
|
+
};
|
|
35
|
+
export declare const rootClassName = "teddy-select";
|
|
36
|
+
export declare const Root: React.ForwardRefExoticComponent<RadixSelect.SelectProps & {
|
|
37
|
+
name: string;
|
|
38
|
+
/** Whether the input should display its "valid" or "invalid" visual styling. */
|
|
39
|
+
validationState?: ValidationState;
|
|
40
|
+
/** Called when the value changes. */
|
|
41
|
+
onValueChange?: (value: string) => string;
|
|
42
|
+
label?: string;
|
|
43
|
+
helperText?: string;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
errorText?: string;
|
|
46
|
+
readonly?: boolean;
|
|
47
|
+
value?: string;
|
|
48
|
+
className?: string;
|
|
49
|
+
frameClassName?: string;
|
|
50
|
+
options: string[];
|
|
51
|
+
/** Maximum height of the dropdown. Defaults to the available viewport height. */
|
|
52
|
+
maxHeight?: string | number;
|
|
53
|
+
} & React.RefAttributes<never>>;
|
|
54
|
+
export {};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"pnpm": ">=10"
|
|
21
21
|
},
|
|
22
22
|
"private": false,
|
|
23
|
-
"version": "0.7.
|
|
23
|
+
"version": "0.7.55",
|
|
24
24
|
"sideEffects": [
|
|
25
25
|
"**/*.css",
|
|
26
26
|
"**/*.svg"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@radix-ui/react-progress": "1.1.8",
|
|
85
85
|
"@radix-ui/react-radio-group": "1.3.8",
|
|
86
86
|
"@radix-ui/react-scroll-area": "1.2.10",
|
|
87
|
-
"@radix-ui/react-select": "2.
|
|
87
|
+
"@radix-ui/react-select": "2.1.7",
|
|
88
88
|
"@radix-ui/react-slider": "1.3.6",
|
|
89
89
|
"@radix-ui/react-slot": "1.2.4",
|
|
90
90
|
"@radix-ui/react-switch": "1.2.6",
|