lisichatbot 1.0.6 → 1.0.7
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 +1 -1
- package/src/index.js +17 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -143,6 +143,10 @@ function renderOptions(options, field, isSingleSelect = true) {
|
|
|
143
143
|
// Make clone visible (remove display:none from template)
|
|
144
144
|
clone.style.display = '';
|
|
145
145
|
|
|
146
|
+
// Reset to unchecked state
|
|
147
|
+
clone.classList.remove('cf-checked');
|
|
148
|
+
clone.style.backgroundColor = 'transparent';
|
|
149
|
+
|
|
146
150
|
// Set data attributes on container
|
|
147
151
|
clone.setAttribute('data-chat-element', inputTypeAttr);
|
|
148
152
|
clone.setAttribute('data-field', field);
|
|
@@ -156,6 +160,7 @@ function renderOptions(options, field, isSingleSelect = true) {
|
|
|
156
160
|
input.setAttribute('data-chat-element', inputTypeAttr);
|
|
157
161
|
input.name = field;
|
|
158
162
|
input.value = valueStr;
|
|
163
|
+
input.checked = false; // Ensure unchecked initially
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
// Find and ensure tick icon is hidden initially
|
|
@@ -574,6 +579,18 @@ function injectStyles() {
|
|
|
574
579
|
gap: 12px;
|
|
575
580
|
}
|
|
576
581
|
|
|
582
|
+
/* Ensure checked state shows background color */
|
|
583
|
+
[data-chat-element="single-select-input"].cf-checked,
|
|
584
|
+
[data-chat-element="multi-select-input"].cf-checked {
|
|
585
|
+
background-color: var(--selected-bg, #667eea) !important;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* Ensure tick icon shows when checked */
|
|
589
|
+
[data-chat-element="single-select-input"].cf-checked [data-chat-input-element="tick-icon"],
|
|
590
|
+
[data-chat-element="multi-select-input"].cf-checked [data-chat-input-element="tick-icon"] {
|
|
591
|
+
display: block !important;
|
|
592
|
+
}
|
|
593
|
+
|
|
577
594
|
/* Messages container padding */
|
|
578
595
|
[data-chat-element="messages-container"] {
|
|
579
596
|
padding: 20px;
|