fleetcor-lwc 2.10.0 → 2.11.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/README.md CHANGED
@@ -146,18 +146,18 @@ const pathConstants = 'frontend/common/mixins.scss';
146
146
 
147
147
  #### Radio Group variables
148
148
 
149
- | @api variables | type | values | required | description |
150
- | -------------- | ------ | ----------------- | -------- | ------------------------------------------------------------------------------------------- |
151
- | name | string | | + | |
152
- | options | array | | + | Array of available items which have `label` with any html text and `value` as unique string |
153
- | size | string | `s` | - | |
154
- | value | string | | - | Current value from options items value |
155
- | label | string | | - | It is main label for items value |
156
- | disabled | bool | | - | |
157
- | required | bool | | - | |
158
- | direction | string | `row` or `column` | - | |
159
- | group | string | | - | |
160
- | error-message | string | | - | |
149
+ | @api variables | type | values | required | description |
150
+ | -------------- | ------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
151
+ | name | string | | + | |
152
+ | options | array | | + | Array of available items which have `label` with any html text and `value` as unique string, `element` to display for selected item at the bottom side |
153
+ | size | string | `s` | - | |
154
+ | value | string | | - | Current value from options items value |
155
+ | label | string | | - | It is main label for items value |
156
+ | disabled | bool | | - | |
157
+ | required | bool | | - | |
158
+ | direction | string | `row` or `column` | - | |
159
+ | group | string | | - | |
160
+ | error-message | string | | - | |
161
161
 
162
162
  #### Radio Group methods
163
163
 
@@ -421,6 +421,12 @@ $FLT_RADIO_GROUP_CIRCLE_DISABLED_SELECTED_BG_COLOR: var(
421
421
 
422
422
  ## Release Notes:
423
423
 
424
+ - v.2.11.0
425
+ - Update `option` for `Radio Group` component
426
+ - Added key `element` for `option` to display HTMLObject for selected item at bottom side
427
+
428
+ ---
429
+
424
430
  - v.2.10.0
425
431
  - Added to `direction` for `Radio Group` component with values `row` or `column`
426
432
  - Update to `label` type in `options` to html text
@@ -3,4 +3,5 @@
3
3
  <span class="flt-radio-item__circle"></span>
4
4
  <span class="flt-radio-item__label"></span>
5
5
  </div>
6
+ <div class="flt-radio-item__element"></div>
6
7
  </template>
@@ -23,9 +23,19 @@ export default class RadioItem extends BaseElement {
23
23
 
24
24
  renderedCallback() {
25
25
  const labelEl = this.querySelector('.flt-radio-item__label')
26
+
26
27
  if (labelEl) {
27
28
  labelEl.innerHTML = this.option.label
28
29
  }
30
+
31
+ if (this.option.element) {
32
+ const element = this.querySelector('.flt-radio-item__element')
33
+ if (this.option.selected) {
34
+ element.appendChild(this.option.element)
35
+ } else {
36
+ element.innerHTML = ''
37
+ }
38
+ }
29
39
  }
30
40
 
31
41
  handleClick() {
@@ -59,4 +59,8 @@
59
59
  object-fit: contain;
60
60
  margin-right: 1rem;
61
61
  }
62
+
63
+ &__element:empty {
64
+ display: none;
65
+ }
62
66
  }
@@ -22,6 +22,7 @@ export default class SelectElement extends UserDataValidator {
22
22
  return {
23
23
  label: item.label,
24
24
  icon: item.icon,
25
+ element: item.element,
25
26
  key: `${this.name}_${item.value}`,
26
27
  disabled: this.disabled,
27
28
  value: item.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetcor-lwc",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "LWC framework by Fleetcor",
5
5
  "repository": {
6
6
  "type": "git",