@visns-studio/visns-components 4.10.21 → 4.10.22

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
@@ -76,7 +76,7 @@
76
76
  "react-dom": "^17.0.0 || ^18.0.0"
77
77
  },
78
78
  "name": "@visns-studio/visns-components",
79
- "version": "4.10.21",
79
+ "version": "4.10.22",
80
80
  "description": "Various packages to assist in the development of our Custom Applications.",
81
81
  "main": "src/index.js",
82
82
  "files": [
@@ -730,9 +730,8 @@ function Field({
730
730
  className={inputClass[settings.id]}
731
731
  onChange={onChange}
732
732
  />
733
- {console.info(inputValue)}
734
733
  {inputValue && inputValue.length > 0 && (
735
- <ul className="file-list">
734
+ <ul className={styles['file-list']}>
736
735
  {inputValue.map((file, index) => (
737
736
  <li
738
737
  key={`file-${settings.id}-${index}`}
@@ -743,7 +742,9 @@ function Field({
743
742
  ? file.file_name
744
743
  : ''}
745
744
  <button
746
- className="trash-button"
745
+ className={
746
+ styles['trash-button']
747
+ }
747
748
  onClick={(e) => {
748
749
  e.preventDefault();
749
750
  e.stopPropagation();
@@ -523,3 +523,54 @@ input[type='file']:hover {
523
523
  display: block;
524
524
  margin: 0 auto;
525
525
  }
526
+
527
+ /* File List Styling */
528
+ .file-list {
529
+ list-style: none; /* Remove default list styles */
530
+ padding: 0; /* Remove default padding */
531
+ margin: 0; /* Remove default margin */
532
+ border: 1px solid var(--border-color); /* Add a border */
533
+ border-radius: var(--br); /* Rounded corners */
534
+ background: var(--tertiary-color); /* Background color */
535
+ max-height: 200px; /* Limit height */
536
+ overflow-y: auto; /* Scroll if too many files */
537
+ margin-top: 0.5em; /* Space above the list */
538
+ }
539
+
540
+ /* File List Item Styling */
541
+ .file-list li {
542
+ display: flex; /* Flexbox for layout */
543
+ justify-content: space-between; /* Space between text and button */
544
+ align-items: center; /* Center items vertically */
545
+ padding: 0.5em 1em; /* Padding for items */
546
+ border-bottom: 1px solid var(--border-color); /* Border between items */
547
+ color: var(--paragraph-color); /* Text color */
548
+ transition: background 0.3s; /* Transition for hover effect */
549
+ }
550
+
551
+ .file-list li:hover {
552
+ background: rgba(
553
+ var(--paragraph-color-rgb),
554
+ 0.1
555
+ ); /* Change background on hover */
556
+ }
557
+
558
+ /* Trash Button Styling */
559
+ .trash-button {
560
+ background: transparent; /* Transparent background */
561
+ border: none; /* No border */
562
+ cursor: pointer; /* Pointer cursor */
563
+ color: var(--primary-color); /* Button color */
564
+ display: flex; /* Flex for icon alignment */
565
+ align-items: center; /* Center icon vertically */
566
+ transition: color 0.3s; /* Transition for color change */
567
+ }
568
+
569
+ .trash-button:hover {
570
+ color: var(--secondary-color); /* Change color on hover */
571
+ }
572
+
573
+ .trash-button svg {
574
+ width: 1.5em; /* Adjust icon size */
575
+ height: 1.5em; /* Adjust icon size */
576
+ }