fleetcor-lwc 3.16.0 → 3.17.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.
@@ -3,6 +3,11 @@
3
3
  <div class="flt-loader__circle">
4
4
  <div class="flt-loader__inner-circle"></div>
5
5
  </div>
6
- <slot></slot>
6
+ <template lwc:if={tempMessage}>
7
+ <p>{tempMessage}</p>
8
+ </template>
9
+ <template lwc:else>
10
+ <slot></slot>
11
+ </template>
7
12
  </div>
8
13
  </template>
@@ -1,4 +1,7 @@
1
1
  import { LightningDomElement } from 'fleetcor-lwc'
2
+ import { api } from 'lwc'
2
3
  import './loader.scss'
3
4
 
4
- export default class Loader extends LightningDomElement {}
5
+ export default class Loader extends LightningDomElement {
6
+ @api tempMessage;
7
+ }
@@ -1,5 +1,11 @@
1
1
  <template lwc:render-mode="light">
2
- <div class={computedStyles} tabindex="0" onfocus={handleShowView} onblur={handleHideView}>
2
+ <div
3
+ tabindex="0"
4
+ class={computedStyles}
5
+ onmousedown={handleMousedownView}
6
+ onfocus={handleShowView}
7
+ onblur={handleHideView}
8
+ >
3
9
  <div class="flt-picklist__wrapp">
4
10
  <div class="flt-picklist__wrapp-text">
5
11
  <div lwc:if={placeholderVisible} class="flt-picklist__placeholder">{placeholder}</div>
@@ -10,13 +16,15 @@
10
16
  height="24"
11
17
  viewBox="0 0 24 24"
12
18
  fill="none"
13
- class="flt-picklist__view-arrow">
19
+ class="flt-picklist__view-arrow"
20
+ >
14
21
  <path
15
22
  d="M19 9L12 16L5 9"
16
23
  stroke-width="2"
17
24
  stroke-linecap="round"
18
25
  stroke-linejoin="round"
19
- class="flt-picklist__view-arrow-path"></path>
26
+ class="flt-picklist__view-arrow-path"
27
+ ></path>
20
28
  </svg>
21
29
  </div>
22
30
  <div class="flt-picklist__dropdown-container">
@@ -28,14 +36,16 @@
28
36
  onclick={handleChange}
29
37
  data-value={option.value}
30
38
  class="flt-picklist__option flt-picklist__option_selected"
31
- lwc:inner-html={option.label}></div>
39
+ lwc:inner-html={option.label}
40
+ ></div>
32
41
  <div
33
42
  lwc:else
34
43
  onclick={handleChange}
35
44
  key={option.value}
36
45
  data-value={option.value}
37
46
  class="flt-picklist__option"
38
- lwc:inner-html={option.label}></div>
47
+ lwc:inner-html={option.label}
48
+ ></div>
39
49
  </template>
40
50
  </div>
41
51
  </div>
@@ -75,6 +75,13 @@ export default class Picklist extends SelectElement {
75
75
  this.querySelector('.flt-picklist').blur()
76
76
  }
77
77
 
78
+ handleMousedownView(event) {
79
+ if (event.currentTarget === document.activeElement) {
80
+ event.currentTarget.blur();
81
+ event.preventDefault();
82
+ }
83
+ }
84
+
78
85
  handleShowView(event) {
79
86
  event.stopPropagation()
80
87
  if (!this.disabled) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetcor-lwc",
3
- "version": "3.16.0",
3
+ "version": "3.17.0",
4
4
  "description": "LWC framework by Fleetcor",
5
5
  "repository": {
6
6
  "type": "git",