benivo-ui-library 1.10.21 → 1.10.24

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/avatar.less CHANGED
@@ -20,6 +20,16 @@
20
20
  font-family: @font-family;
21
21
  overflow: visible; // status markers sit outside the circle
22
22
 
23
+ // Photo fills the circle; the wrapper keeps overflow visible for status
24
+ // markers, so the image clips itself.
25
+ &__photo {
26
+ display: block;
27
+ width: 100%;
28
+ height: 100%;
29
+ border-radius: 50%;
30
+ object-fit: cover;
31
+ }
32
+
23
33
  &__initials {
24
34
  font-weight: 600;
25
35
  line-height: 1;
@@ -113,7 +113,10 @@
113
113
  display: flex;
114
114
  align-items: flex-start;
115
115
  gap: 6px;
116
- white-space: nowrap; // title + subtext share one line
116
+ // Title + subtext share one line when there is room; when a leading
117
+ // media element leaves the slot too narrow (media-card variant), the
118
+ // text wraps instead of pushing the card past the viewport.
119
+ flex-wrap: wrap;
117
120
  }
118
121
 
119
122
  &__title {
@@ -121,6 +124,7 @@
121
124
  line-height: 24px;
122
125
  font-weight: 600;
123
126
  color: var(--black);
127
+ min-width: 0; // allow the title to shrink and wrap in a narrow slot
124
128
  }
125
129
 
126
130
  &__subtext {
@@ -128,6 +132,7 @@
128
132
  line-height: 24px;
129
133
  font-weight: 500;
130
134
  color: var(--text-400);
135
+ min-width: 0; // allow the subtext to shrink and wrap in a narrow slot
131
136
  }
132
137
 
133
138
  &__supporting {
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  &:focus-within:not(.disabled) {
28
- border-color: var(--primary-main, #2970ff);
28
+ border-color: var(--primary);
29
29
  box-shadow: @form-focus-box-shadow;
30
30
  // Symbol + field + currency select read as one control, so the WCAG 1.4.11 indicator
31
31
  // goes on the container; the halo alone is 1.37:1.
@@ -187,7 +187,20 @@
187
187
  &.currency-input-menu--portal {
188
188
  position: fixed;
189
189
  top: auto;
190
- z-index: @zindex-modal;
190
+ // Portaled to <body>, so it must clear @zindex-modal (1060) to show above modals.
191
+ z-index: @zindex-popover;
192
+ }
193
+
194
+ // BPO-17756 (WCAG 2.1.1 / 2.4.7): the listbox takes focus and tracks the highlighted option
195
+ // with aria-activedescendant, so the visible indicator belongs on that option, not on the
196
+ // list's own box. Inset, because the list clips its overflow.
197
+ &:focus {
198
+ outline: none;
199
+ }
200
+
201
+ &:focus .currency-input-option.active {
202
+ outline: @focus-outline;
203
+ outline-offset: @focus-outline-offset-inset;
191
204
  }
192
205
  }
193
206
 
@@ -197,12 +210,13 @@
197
210
  cursor: pointer;
198
211
  white-space: nowrap;
199
212
 
200
- &:hover {
201
- background: var(--bg-50);
213
+ &:hover,
214
+ &.active {
215
+ background: var(--primary-light);
202
216
  }
203
217
 
204
218
  &.selected {
205
219
  font-weight: @font-weight-semibold;
206
- background: var(--bg-50);
220
+ background: var(--primary-light);
207
221
  }
208
222
  }
package/datePicker.less CHANGED
@@ -141,6 +141,22 @@
141
141
  clip-path: inset(50%);
142
142
  }
143
143
 
144
+ // Polite live region for the Clear confirmation (BPO-17723, 4.1.3). Visually hidden with the same
145
+ // pattern as the live region above - NOT display:none, which would drop it from the accessibility
146
+ // tree and silence the announcement. Empty (and therefore invisible) whenever nothing was cleared.
147
+ .bn-datepicker__status {
148
+ position: absolute;
149
+ width: 1px;
150
+ height: 1px;
151
+ margin: -1px;
152
+ padding: 0;
153
+ border: 0;
154
+ overflow: hidden;
155
+ white-space: nowrap;
156
+ clip: rect(0 0 0 0);
157
+ clip-path: inset(50%);
158
+ }
159
+
144
160
  // The popover is portalled to <body> (portalId in DatePicker.jsx) to escape overflow-clipping
145
161
  // ancestors. At <body> it sits outside any modal's stacking context, so — like the header's
146
162
  // month/year menus, which portal into the same tier — it needs a z-index above the modal layer
package/emptyState.less CHANGED
@@ -32,14 +32,33 @@
32
32
 
33
33
  // --- the decorative pattern ------------------------------------------
34
34
  //
35
- // Deliberately NOT clipped. Figma's frames let the 480px art run past the
36
- // component's bounds and rely on the radial fade to end it, so clipping
37
- // here would cut the pattern off part-way through the fade — which is
38
- // exactly how it looked before. This layer only exists to give the art a
39
- // box to centre itself in.
35
+ // Not clipped to the component. Figma's frames let the 480px art run past
36
+ // the component's bounds and rely on the radial fade to end it, so clipping
37
+ // at the component would cut the pattern off part-way through the fade —
38
+ // which is exactly how it looked before.
39
+ //
40
+ // Sideways, though, it is clipped to the screen (BPO-17750). On a 375px
41
+ // phone the 480px art is wider than the viewport and the whole page scrolls
42
+ // sideways. So this layer is as wide as the art, or the screen if that is
43
+ // narrower, centred on the component, and clips only along x. `overflow-x:
44
+ // clip` (unlike `hidden`) leaves y visible, so the fade above and below is
45
+ // untouched. At 480px and wider the layer is exactly the art's box and
46
+ // nothing is cut.
47
+ //
48
+ // `cqw` falls back to the viewport when no ancestor is a size container,
49
+ // which is the normal case. Inside one, the art clips to that container
50
+ // instead — that is also what lets Storybook show a phone-width frame.
40
51
  &__pattern {
41
52
  position: absolute;
42
- inset: 0;
53
+ top: 0;
54
+ bottom: 0;
55
+ left: 50%;
56
+ // A browser without `cqw` drops the next line; without this one the
57
+ // layer would shrink to 0 and clip the pattern away entirely.
58
+ width: 480px;
59
+ width: min(480px, 100cqw);
60
+ transform: translateX(-50%);
61
+ overflow-x: clip;
43
62
  pointer-events: none;
44
63
  z-index: 0;
45
64
  }