@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-group/ui-lib",
3
- "version": "80.3.0",
3
+ "version": "80.4.0",
4
4
  "description": "SATS web user interface library",
5
5
  "engines": {
6
6
  "node": "^18 || ^20",
@@ -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;
@@ -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={`select__content select__content--position-${labelPosition}`}
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
- <div className="select__native-wrapper">
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={`select__select select__select--variant-${variant}`}
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}
@@ -22,4 +22,5 @@ export type Select<OptionExtra = any> = {
22
22
  onChangeOption?: (option?: SelectOption<OptionExtra>) => void;
23
23
  options?: SelectOption<OptionExtra>[];
24
24
  variant?: ObjectValues<typeof variants>;
25
+ wide?: boolean;
25
26
  } & SelectHtmlProps;