gantri-components 2.223.0 → 2.224.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.
|
@@ -4,6 +4,7 @@ import { BoxDimension } from '../box/box.types';
|
|
|
4
4
|
import { TextFieldSize } from '../text-field/text-field.types';
|
|
5
5
|
import { TextVariant } from '../typography';
|
|
6
6
|
export type OptionSelectorSize = TextFieldSize;
|
|
7
|
+
export type OptionSelectorIntent = 'success' | 'info' | 'warning' | 'alert';
|
|
7
8
|
export interface OptionSelectorItem {
|
|
8
9
|
/** Unique value for this option. */
|
|
9
10
|
value: string;
|
|
@@ -13,6 +14,12 @@ export interface OptionSelectorItem {
|
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
/** Optional badge text displayed in the top-right corner of the option. */
|
|
15
16
|
badge?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Semantic intent applied to the option when selected. Only affects modern
|
|
19
|
+
* themes; classic themes use the default selected styling. Other states
|
|
20
|
+
* (default, hover, disabled) are unaffected.
|
|
21
|
+
*/
|
|
22
|
+
intent?: OptionSelectorIntent;
|
|
16
23
|
}
|
|
17
24
|
export interface OptionSelectorProps {
|
|
18
25
|
/** Array of options. Can be strings (used as both value and label) or OptionSelectorItem objects. */
|
|
@@ -65,4 +72,5 @@ export interface StyledOptionProps {
|
|
|
65
72
|
$disabled: boolean;
|
|
66
73
|
$selected: boolean;
|
|
67
74
|
$size?: ResolutionAwareProp<OptionSelectorSize>;
|
|
75
|
+
$intent?: OptionSelectorIntent;
|
|
68
76
|
}
|