@aquera/nile-elements 0.0.6-7 → 0.0.6-8
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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +9 -22
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.iife.js +34 -25
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +7 -5
- package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.esm.js +9 -7
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +10 -8
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.esm.js +8 -5
- package/dist/src/nile-input/nile-input.js +3 -0
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.js +3 -0
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.js +3 -0
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.js +9 -22
- package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-input/nile-input.ts +3 -0
- package/src/nile-radio-group/nile-radio-group.ts +3 -0
- package/src/nile-select/nile-select.ts +3 -0
- package/src/nile-switcher/nile-switcher.ts +10 -21
package/package.json
CHANGED
@@ -445,6 +445,7 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
445
445
|
const hasLabelSlot = this.hasSlotController.test('label');
|
446
446
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
447
447
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
448
|
+
const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');
|
448
449
|
const hasHelpText = this.helpText ? true : false;
|
449
450
|
const hasErrorMessage = this.errorMessage ? true : false;
|
450
451
|
const hasClearIcon =
|
@@ -474,6 +475,8 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
474
475
|
<slot name="label">${this.label}</slot>
|
475
476
|
</label>
|
476
477
|
|
478
|
+
${hasLabelSuffixSlot ? html` <slot name="label-suffix"></slot> ` : ``}
|
479
|
+
|
477
480
|
<div part="form-control-input" class="form-control-input">
|
478
481
|
<div
|
479
482
|
part="base"
|
@@ -209,6 +209,7 @@ export class NileRadioGroup extends NileElement {
|
|
209
209
|
render() {
|
210
210
|
const hasLabelSlot = this.hasSlotController.test('label');
|
211
211
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
212
|
+
const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');
|
212
213
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
213
214
|
const hasHelpText = this.helpText ? true : false;
|
214
215
|
const hasErrorMessage = this.errorMessage ? true : false;
|
@@ -247,6 +248,8 @@ export class NileRadioGroup extends NileElement {
|
|
247
248
|
<slot name="label">${this.label}</slot>
|
248
249
|
</label>
|
249
250
|
|
251
|
+
${hasLabelSuffixSlot ? html` <slot name="label-suffix"></slot> ` : ``}
|
252
|
+
|
250
253
|
<div part="form-control-input" class="form-control-input">
|
251
254
|
<div class="visually-hidden">
|
252
255
|
<label class="radio-group__validation">
|
@@ -873,6 +873,7 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
873
873
|
render() {
|
874
874
|
const hasLabelSlot = this.hasSlotController.test('label');
|
875
875
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
876
|
+
const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');
|
876
877
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
877
878
|
const hasClearIcon =
|
878
879
|
this.clearable && !this.disabled && this.value.length > 0;
|
@@ -903,6 +904,8 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
903
904
|
<slot name="label">${this.label}</slot>
|
904
905
|
</label>
|
905
906
|
|
907
|
+
${hasLabelSuffixSlot ? html` <slot name="label-suffix"></slot> ` : ``}
|
908
|
+
|
906
909
|
<div part="form-control-input" class="form-control-input">
|
907
910
|
<nile-popup
|
908
911
|
class=${classMap({
|
@@ -56,18 +56,7 @@ export class NileSwitcher extends NileElement {
|
|
56
56
|
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
57
57
|
*/
|
58
58
|
static styles: CSSResultGroup = styles;
|
59
|
-
@property({ type: Object }) nileSwitchConfig: switchconfig
|
60
|
-
toggleSwitch: false,
|
61
|
-
defaultInput: {
|
62
|
-
inputType: 'radio',
|
63
|
-
value: 'True',
|
64
|
-
options: ['True', 'False'],
|
65
|
-
},
|
66
|
-
switchInput: {
|
67
|
-
inputType: 'text-area',
|
68
|
-
value: 'test',
|
69
|
-
},
|
70
|
-
};
|
59
|
+
@property({ type: Object }) nileSwitchConfig: switchconfig;
|
71
60
|
|
72
61
|
connectedCallback() {
|
73
62
|
super.connectedCallback();
|
@@ -93,19 +82,18 @@ export class NileSwitcher extends NileElement {
|
|
93
82
|
}
|
94
83
|
|
95
84
|
renderDropdown(Input: switchInputType, inputType: string) {
|
96
|
-
const { options, multiple, placeholder } = Input;
|
85
|
+
const { options, multiple, placeholder, disabled } = Input;
|
97
86
|
return html`<nile-select
|
98
87
|
.placeholder=${placeholder}
|
88
|
+
.disabled="${disabled}"
|
99
89
|
.multiple="${multiple}"
|
100
90
|
@nile-change=${(e: CustomEvent) => {
|
101
91
|
this.handleChange(e, inputType);
|
102
92
|
}}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
})
|
108
|
-
}
|
93
|
+
>
|
94
|
+
${options?.map((option: any) => {
|
95
|
+
return html`<nile-option .value="${option}">${option} </nile-option>`;
|
96
|
+
})}
|
109
97
|
</nile-select>`;
|
110
98
|
}
|
111
99
|
|
@@ -134,10 +122,11 @@ export class NileSwitcher extends NileElement {
|
|
134
122
|
}
|
135
123
|
|
136
124
|
renderNileRadio(Input: switchInputType, inputType: string) {
|
137
|
-
const { options, value } = Input;
|
125
|
+
const { options, value, disabled } = Input;
|
138
126
|
|
139
127
|
return html`<nile-radio-group
|
140
128
|
.value=${value}
|
129
|
+
.disabled=${disabled}
|
141
130
|
@change=${(e: CustomEvent) => {
|
142
131
|
this.handleChange(e, inputType);
|
143
132
|
}}
|
@@ -155,7 +144,7 @@ export class NileSwitcher extends NileElement {
|
|
155
144
|
} else {
|
156
145
|
this.nileSwitchConfig.switchInput.value = event.detail.value;
|
157
146
|
}
|
158
|
-
|
147
|
+
event.stopPropagation();
|
159
148
|
this.emit('nile-change', { config: this.nileSwitchConfig });
|
160
149
|
}
|
161
150
|
|