@sats-group/ui-lib 80.3.0 → 80.4.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/package.json
CHANGED
package/react/select/select.scss
CHANGED
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
gap: spacing.$xxs;
|
|
19
19
|
justify-items: start;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
&--wide {
|
|
23
|
+
flex-wrap: nowrap;
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
// NOTE: Specificity hack
|
|
@@ -34,6 +38,11 @@
|
|
|
34
38
|
background-color: light.$surface-primary-default;
|
|
35
39
|
border-radius: corner-radius.$s;
|
|
36
40
|
position: relative;
|
|
41
|
+
width: min-content;
|
|
42
|
+
|
|
43
|
+
&--wide {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
37
46
|
}
|
|
38
47
|
|
|
39
48
|
&__chevron {
|
|
@@ -57,6 +66,11 @@
|
|
|
57
66
|
position: relative;
|
|
58
67
|
border-radius: corner-radius.$s;
|
|
59
68
|
padding-right: 36px; // NOTE: custom spacing to offset chevron overlap
|
|
69
|
+
width: min-content;
|
|
70
|
+
|
|
71
|
+
&--wide {
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
60
74
|
|
|
61
75
|
&--variant-small {
|
|
62
76
|
padding-top: spacing.$xs;
|
package/react/select/select.tsx
CHANGED
|
@@ -28,6 +28,7 @@ const RefSelect = React.forwardRef<
|
|
|
28
28
|
options = [],
|
|
29
29
|
required,
|
|
30
30
|
variant = variants.large,
|
|
31
|
+
wide,
|
|
31
32
|
...restProps
|
|
32
33
|
},
|
|
33
34
|
ref,
|
|
@@ -47,7 +48,10 @@ const RefSelect = React.forwardRef<
|
|
|
47
48
|
return (
|
|
48
49
|
<div className={cn('select', className, { 'select--error': error })}>
|
|
49
50
|
<div
|
|
50
|
-
className={
|
|
51
|
+
className={cn(
|
|
52
|
+
`select__content select__content--position-${labelPosition}`,
|
|
53
|
+
{ 'select__content--wide': wide },
|
|
54
|
+
)}
|
|
51
55
|
>
|
|
52
56
|
{isLabelVisible ? (
|
|
53
57
|
<label className="select__label" htmlFor={id}>
|
|
@@ -71,11 +75,19 @@ const RefSelect = React.forwardRef<
|
|
|
71
75
|
) : null}
|
|
72
76
|
</label>
|
|
73
77
|
) : null}
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
<div
|
|
79
|
+
className={cn('select__native-wrapper', {
|
|
80
|
+
'select__native-wrapper--wide': wide,
|
|
81
|
+
})}
|
|
82
|
+
>
|
|
76
83
|
<select
|
|
77
84
|
aria-label={isLabelVisible ? undefined : label}
|
|
78
|
-
className={
|
|
85
|
+
className={cn(
|
|
86
|
+
`select__select select__select--variant-${variant}`,
|
|
87
|
+
{
|
|
88
|
+
'select__select--wide': wide,
|
|
89
|
+
},
|
|
90
|
+
)}
|
|
79
91
|
id={id}
|
|
80
92
|
name={name}
|
|
81
93
|
onChange={onInputChange}
|