@visns-studio/visns-components 5.8.17 → 5.8.19

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
@@ -86,7 +86,7 @@
86
86
  "react-dom": "^17.0.0 || ^18.0.0"
87
87
  },
88
88
  "name": "@visns-studio/visns-components",
89
- "version": "5.8.17",
89
+ "version": "5.8.19",
90
90
  "description": "Various packages to assist in the development of our Custom Applications.",
91
91
  "main": "src/index.js",
92
92
  "files": [
@@ -151,7 +151,8 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
151
151
  const fieldTypeLabel =
152
152
  fieldTypes.find((type) => type.value === field.type)?.label ||
153
153
  field.type;
154
- let tooltip = `Type: ${fieldTypeLabel}\n`;
154
+ let tooltip = `Label: ${field.label}\n`;
155
+ tooltip += `Type: ${fieldTypeLabel}\n`;
155
156
  tooltip += `Size: ${field.size || 'Not set'}\n`;
156
157
  tooltip += `Required: ${field.required === 'yes' ? 'Yes' : 'No'}\n`;
157
158
 
@@ -253,6 +254,14 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
253
254
  data-tooltip-place="top"
254
255
  data-field-size={field.size}
255
256
  >
257
+ {/* Field info - always visible */}
258
+ <div className={styles.fieldInfo}>
259
+ <span className={styles.fieldInfoText}>
260
+ {getFieldInfo(field)}
261
+ </span>
262
+ </div>
263
+
264
+ {/* Field controls - only visible on hover */}
256
265
  <div className={styles.fieldControls}>
257
266
  <div
258
267
  {...attributes}
@@ -264,23 +273,12 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
264
273
  >
265
274
  <ChevronVertical strokeWidth={3} size={24} />
266
275
  </div>
267
- <div className={styles.fieldInfo}>
268
- <span className={styles.fieldInfoText}>
269
- {getFieldInfo(field)}
270
- </span>
271
- </div>
272
276
  <div className={styles.fieldActions}>
273
277
  <Pencil
274
278
  className={styles.editIcon}
275
279
  strokeWidth={3}
276
280
  size={20}
277
281
  onClick={(e) => {
278
- console.info(
279
- 'Edit button clicked - field:',
280
- field,
281
- 'counter:',
282
- counter
283
- );
284
282
  e.preventDefault();
285
283
  e.stopPropagation();
286
284
  handleEdit(counter);
@@ -1130,7 +1128,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
1130
1128
  }, []);
1131
1129
 
1132
1130
  return (
1133
- <>
1131
+ <div className={modalShow || modalFormShow ? styles.modalOpen : ''}>
1134
1132
  <div className={styles.grid}>
1135
1133
  <div className={styles.grid__row}>
1136
1134
  <div className={`${styles.grid__full} ${styles.crmtitle}`}>
@@ -1221,6 +1219,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
1221
1219
  onClose={handleCloseModal}
1222
1220
  closeOnDocumentClick={false}
1223
1221
  >
1222
+ {modalShow && <div className={styles.modalBackdrop} />}
1224
1223
  <div className={styles.modalwrap}>
1225
1224
  <div className={styles.modal}>
1226
1225
  <div className={styles.modal__header}>
@@ -2254,6 +2253,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
2254
2253
  onClose={handleCloseModalForm}
2255
2254
  closeOnDocumentClick={false}
2256
2255
  >
2256
+ {modalFormShow && <div className={styles.modalBackdrop} />}
2257
2257
  <div className={styles.modalwrap}>
2258
2258
  <div className={styles.modal}>
2259
2259
  <div className={styles.modal__header}>
@@ -2314,8 +2314,10 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
2314
2314
  lineHeight: '1.4',
2315
2315
  maxWidth: '300px',
2316
2316
  whiteSpace: 'pre-line',
2317
- zIndex: 9999,
2317
+ zIndex: 99999,
2318
2318
  }}
2319
+ place="top"
2320
+ offset={10}
2319
2321
  />
2320
2322
  <Tooltip
2321
2323
  id="action-tooltip"
@@ -2328,7 +2330,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
2328
2330
  zIndex: 9999,
2329
2331
  }}
2330
2332
  />
2331
- </>
2333
+ </div>
2332
2334
  );
2333
2335
  }
2334
2336
 
@@ -599,6 +599,72 @@ select:not(:placeholder-shown) + .fi__span {
599
599
  overflow: visible;
600
600
  border-top-left-radius: var(--br);
601
601
  border-top-right-radius: var(--br);
602
+ position: relative;
603
+ z-index: 10000;
604
+ }
605
+
606
+ /* Modal backdrop to prevent background interactions */
607
+ .modalBackdrop {
608
+ position: fixed;
609
+ top: 0;
610
+ left: 0;
611
+ right: 0;
612
+ bottom: 0;
613
+ background: rgba(0, 0, 0, 0.5);
614
+ z-index: 9999;
615
+ backdrop-filter: blur(2px);
616
+ -webkit-backdrop-filter: blur(2px);
617
+ }
618
+
619
+ /* Prevent interactions with background content when modal is open */
620
+ .modalOpen {
621
+ .grid,
622
+ .formSplit,
623
+ .polActions {
624
+ pointer-events: none;
625
+ user-select: none;
626
+ }
627
+
628
+ // Completely hide field info when modal is open
629
+ .fieldInfo {
630
+ opacity: 0 !important;
631
+ visibility: hidden !important;
632
+ z-index: 1 !important; // Much lower than modal backdrop
633
+ }
634
+
635
+ // Lower z-index of field controls when modal is open
636
+ .fieldControls {
637
+ z-index: 1 !important; // Much lower than modal backdrop
638
+ opacity: 0 !important;
639
+ visibility: hidden !important;
640
+ }
641
+
642
+ // Disable hover effects on interactive fields when modal is open
643
+ .interactiveField {
644
+ &:hover {
645
+ border-color: transparent !important;
646
+ background-color: transparent !important;
647
+
648
+ .fieldControls {
649
+ opacity: 0 !important;
650
+ }
651
+ }
652
+ }
653
+
654
+ // Disable hover effects on form elements when modal is open
655
+ .formItem textarea:hover,
656
+ .formItem select:hover,
657
+ .formItem input[type]:hover {
658
+ border: 1px solid rgba(var(--paragraph-color-rgb), 0.15) !important;
659
+ transition: none !important;
660
+ }
661
+
662
+ // Disable hover effects on buttons when modal is open
663
+ .btn:hover {
664
+ background: var(--primary-color) !important;
665
+ border: 1px solid rgba(var(--primary-rgb), 1.1) !important;
666
+ color: var(--tertiary-color) !important;
667
+ }
602
668
  }
603
669
 
604
670
  .modal {
@@ -1129,6 +1195,7 @@ select:not(:placeholder-shown) + .fi__span {
1129
1195
  flex-direction: column;
1130
1196
  min-height: 100px;
1131
1197
  height: 100%;
1198
+ margin-top: 15px; // Add margin to provide space for tooltip above
1132
1199
 
1133
1200
  // Ensure proper layout during sorting
1134
1201
  &.sortableHelper {
@@ -1163,7 +1230,7 @@ select:not(:placeholder-shown) + .fi__span {
1163
1230
  align-items: flex-start;
1164
1231
  opacity: 0;
1165
1232
  transition: opacity 0.2s ease;
1166
- z-index: 10000;
1233
+ z-index: 1002; // Reduced from 10000 to be below modals but above content
1167
1234
  pointer-events: none;
1168
1235
 
1169
1236
  > * {
@@ -1171,42 +1238,44 @@ select:not(:placeholder-shown) + .fi__span {
1171
1238
  }
1172
1239
  }
1173
1240
 
1241
+ // Field info is now separate from field controls and always visible
1174
1242
  .fieldInfo {
1175
1243
  position: absolute;
1176
- top: 4px;
1244
+ top: 8px; // Increased from 4px to provide more space for tooltip above
1177
1245
  left: 50%;
1178
1246
  transform: translateX(-50%);
1179
- background: rgba(var(--primary-rgb), 0.9);
1247
+ background: rgba(
1248
+ var(--primary-rgb),
1249
+ 0.4
1250
+ ); // Much more subtle - reduced from 0.85
1180
1251
  color: white;
1181
- padding: 4px 12px;
1182
- border-radius: 12px;
1183
- font-size: 0.75rem;
1184
- font-weight: 500;
1252
+ padding: 3px 10px; // Slightly smaller padding
1253
+ border-radius: 10px; // Slightly smaller border radius
1254
+ font-size: 0.7rem; // Smaller font size
1255
+ font-weight: 400; // Lighter font weight - reduced from 500
1185
1256
  white-space: nowrap;
1186
- box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
1187
- z-index: 10001;
1257
+ box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.15); // Much softer shadow
1258
+ z-index: 1001; // Reduced from 10001 to be below modals but above content
1188
1259
  pointer-events: none;
1189
- opacity: 1; // Always visible
1260
+ opacity: 0.7; // More subtle - reduced from 1
1190
1261
  transition: all 0.2s ease;
1191
1262
  max-width: calc(100% - 120px); // Leave space for drag handle and actions
1192
1263
  overflow: hidden;
1193
1264
  text-overflow: ellipsis;
1194
1265
 
1195
- // Ensure it's visible even when field controls are hidden
1196
- .interactiveField:not(:hover) & {
1197
- opacity: 0.8;
1198
- }
1199
-
1266
+ // Enhanced styling on hover - more prominent when needed
1200
1267
  .interactiveField:hover & {
1201
1268
  opacity: 1;
1202
- background: var(--primary-color);
1269
+ background: rgba(var(--primary-rgb), 0.85); // Full opacity on hover
1203
1270
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
1271
+ transform: translateX(-50%) scale(1.05);
1272
+ font-weight: 500; // Bolder on hover
1204
1273
  }
1205
1274
 
1206
1275
  // Responsive behavior for smaller fields
1207
1276
  @media (max-width: 768px) {
1208
- font-size: 0.7rem;
1209
- padding: 3px 8px;
1277
+ font-size: 0.65rem;
1278
+ padding: 2px 8px;
1210
1279
  max-width: calc(100% - 100px);
1211
1280
  }
1212
1281
  }
@@ -1233,7 +1302,7 @@ select:not(:placeholder-shown) + .fi__span {
1233
1302
  min-width: 40px;
1234
1303
  min-height: 40px;
1235
1304
  position: relative;
1236
- z-index: 10001;
1305
+ z-index: 1003; // Reduced from 10001 to be below modals but above content
1237
1306
 
1238
1307
  svg {
1239
1308
  display: block !important;
@@ -1241,6 +1310,10 @@ select:not(:placeholder-shown) + .fi__span {
1241
1310
  height: 24px !important;
1242
1311
  stroke: currentColor !important;
1243
1312
  fill: none !important;
1313
+
1314
+ &:hover {
1315
+ color: white !important;
1316
+ }
1244
1317
  }
1245
1318
 
1246
1319
  &:hover {
@@ -1279,7 +1352,7 @@ select:not(:placeholder-shown) + .fi__span {
1279
1352
  min-width: 36px;
1280
1353
  min-height: 36px;
1281
1354
  position: relative;
1282
- z-index: 10001;
1355
+ z-index: 1003; // Reduced from 10001 to be below modals but above content
1283
1356
 
1284
1357
  svg {
1285
1358
  display: block !important;
@@ -1454,7 +1527,7 @@ select:not(:placeholder-shown) + .fi__span {
1454
1527
  .fieldContent {
1455
1528
  position: relative;
1456
1529
  z-index: 1;
1457
- padding-top: 50px; /* Add space for the larger controls */
1530
+ padding-top: 55px; /* Increased space for field info and controls */
1458
1531
  flex-grow: 1;
1459
1532
  display: flex;
1460
1533
  flex-direction: column;