@uniai-fe/uds-primitives 0.3.36 → 0.3.37
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/package.json
CHANGED
|
@@ -56,6 +56,20 @@ const SelectTriggerBase = forwardRef<HTMLElement, SelectTriggerBaseProps>(
|
|
|
56
56
|
: SelectIcon.Chevron[priority][
|
|
57
57
|
resolvedSize === "xsmall" ? "small" : resolvedSize
|
|
58
58
|
];
|
|
59
|
+
const iconSize = () => {
|
|
60
|
+
switch (size) {
|
|
61
|
+
case "large":
|
|
62
|
+
return 20;
|
|
63
|
+
case "medium":
|
|
64
|
+
return 16;
|
|
65
|
+
case "small":
|
|
66
|
+
return 12;
|
|
67
|
+
case "xsmall":
|
|
68
|
+
return 14;
|
|
69
|
+
default:
|
|
70
|
+
return 16;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
59
73
|
const resolvedState = disabled || readOnly ? "disabled" : state;
|
|
60
74
|
const {
|
|
61
75
|
["aria-haspopup"]: ariaHasPopup,
|
|
@@ -100,7 +114,10 @@ const SelectTriggerBase = forwardRef<HTMLElement, SelectTriggerBaseProps>(
|
|
|
100
114
|
data-size={resolvedSize}
|
|
101
115
|
aria-hidden="true"
|
|
102
116
|
>
|
|
103
|
-
<Icon
|
|
117
|
+
<Icon
|
|
118
|
+
viewBox={`0 0 ${iconSize()} ${iconSize()}`}
|
|
119
|
+
preserveAspectRatio="xMinYMin meet"
|
|
120
|
+
/>
|
|
104
121
|
</figure>
|
|
105
122
|
</Slot.Base>
|
|
106
123
|
);
|