@budibase/bbui 3.30.0 → 3.30.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "3.30.0",
4
+ "version": "3.30.1",
5
5
  "license": "MPL-2.0",
6
6
  "module": "dist/bbui.mjs",
7
7
  "exports": {
@@ -107,5 +107,5 @@
107
107
  }
108
108
  }
109
109
  },
110
- "gitHead": "58456cc695d2c71a354bcf5c064943b247ad4969"
110
+ "gitHead": "ce9e344b6a609da55770d535cc59079ede2f5da6"
111
111
  }
@@ -27,6 +27,7 @@
27
27
  export let searchPlaceholder: string = "Search"
28
28
  export let showSelectAll = false
29
29
  export let selectAllText = "Select all"
30
+ export let wrapText: boolean = false
30
31
 
31
32
  const dispatch = createEventDispatcher()
32
33
 
@@ -149,4 +150,5 @@
149
150
  {indeterminate}
150
151
  {allSelected}
151
152
  {toggleSelectAll}
153
+ {wrapText}
152
154
  />
@@ -76,6 +76,7 @@
76
76
  export let allSelected: boolean = false
77
77
  export let toggleSelectAll: () => void = () => {}
78
78
  export let hideChevron: boolean = false
79
+ export let wrapText: boolean = false
79
80
 
80
81
  const maxHeight = 360
81
82
  const VIRTUALIZATION_THRESHOLD = 200
@@ -115,7 +116,8 @@
115
116
  searchTerm,
116
117
  getOptionLabel
117
118
  )
118
- $: virtualizationEnabled = filteredOptions.length > VIRTUALIZATION_THRESHOLD
119
+ $: virtualizationEnabled =
120
+ !wrapText && filteredOptions.length > VIRTUALIZATION_THRESHOLD
119
121
  $: {
120
122
  if (!virtualizationEnabled) {
121
123
  virtualizedOptions = filteredOptions.map((option, idx) => ({
@@ -254,6 +256,7 @@
254
256
  class:is-placeholder={isPlaceholder}
255
257
  class:auto-width={autoWidth}
256
258
  class:has-subtitle={!!fieldSubtitle}
259
+ class:wrap-text={wrapText}
257
260
  >
258
261
  <span class="picker-label-text">{fieldText}</span>
259
262
  {#if fieldSubtitle}
@@ -279,6 +282,7 @@
279
282
  <div
280
283
  class="popover-content"
281
284
  class:auto-width={autoWidth}
285
+ class:wrap-text={wrapText}
282
286
  use:clickOutside={() => {
283
287
  open = false
284
288
  }}
@@ -486,6 +490,30 @@
486
490
  pointer-events: none;
487
491
  }
488
492
 
493
+ .spectrum-Picker-label.wrap-text {
494
+ white-space: normal;
495
+ overflow: visible;
496
+ text-overflow: unset;
497
+ width: auto;
498
+ }
499
+ .spectrum-Picker-label.wrap-text .picker-label-text {
500
+ white-space: normal;
501
+ overflow-wrap: anywhere;
502
+ }
503
+ .popover-content.wrap-text .spectrum-Menu-item {
504
+ height: auto;
505
+ min-height: var(--spectrum-menu-item-height);
506
+ align-items: flex-start;
507
+ }
508
+ .popover-content.wrap-text .spectrum-Menu-itemLabel {
509
+ white-space: normal;
510
+ overflow: visible;
511
+ text-overflow: unset;
512
+ overflow-wrap: anywhere;
513
+ width: auto;
514
+ flex: 1 1 auto;
515
+ }
516
+
489
517
  /* Search styles inside popover */
490
518
  .popover-content :global(.spectrum-Search) {
491
519
  margin-top: -1px;
@@ -47,6 +47,7 @@
47
47
  export let customPopoverHeight: string | undefined = undefined
48
48
  export let searchPlaceholder: string = "Search"
49
49
  export let hideChevron: boolean = false
50
+ export let wrapText: boolean = false
50
51
 
51
52
  const dispatch = createEventDispatcher()
52
53
 
@@ -140,4 +141,5 @@
140
141
  {customPopoverHeight}
141
142
  {searchPlaceholder}
142
143
  {hideChevron}
144
+ {wrapText}
143
145
  />