@visns-studio/visns-components 6.3.13 → 6.3.15
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
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
92
92
|
},
|
|
93
93
|
"name": "@visns-studio/visns-components",
|
|
94
|
-
"version": "6.3.
|
|
94
|
+
"version": "6.3.15",
|
|
95
95
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
96
96
|
"main": "src/index.js",
|
|
97
97
|
"files": [
|
package/src/components/Field.jsx
CHANGED
|
@@ -2603,6 +2603,8 @@ function Field({
|
|
|
2603
2603
|
<textarea
|
|
2604
2604
|
value={cell[cellKey] || ''}
|
|
2605
2605
|
data-id={settings.id}
|
|
2606
|
+
rows={3}
|
|
2607
|
+
className={styles.autoGrowCellTextarea}
|
|
2606
2608
|
onChange={(e) =>
|
|
2607
2609
|
onChangeTableRadio(e, rowKey, cellKey)
|
|
2608
2610
|
}
|
|
@@ -2801,6 +2803,8 @@ function Field({
|
|
|
2801
2803
|
<textarea
|
|
2802
2804
|
value={cell || ''}
|
|
2803
2805
|
data-id={settings.id}
|
|
2806
|
+
rows={3}
|
|
2807
|
+
className={styles.autoGrowCellTextarea}
|
|
2804
2808
|
onChange={(e) =>
|
|
2805
2809
|
onChangeTableText(e, rowKey, cellKey)
|
|
2806
2810
|
}
|
|
@@ -2947,7 +2951,7 @@ function Field({
|
|
|
2947
2951
|
<textarea
|
|
2948
2952
|
ref={variableTextareaRef}
|
|
2949
2953
|
data-name={settings.id}
|
|
2950
|
-
className={inputClass[settings.id]}
|
|
2954
|
+
className={`${inputClass[settings.id] || ''} ${styles.autoGrowTextarea}`.trim()}
|
|
2951
2955
|
onChange={onChange}
|
|
2952
2956
|
value={
|
|
2953
2957
|
inputValue && inputValue !== 'null'
|
|
@@ -83,15 +83,17 @@
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// A `rowColours` tint arrives as an inline background on the ROW element
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
86
|
+
// A `rowColours` tint arrives as an inline background on the ROW element.
|
|
87
|
+
// The grid's base.css gives the cell-wrap `background: inherit`, which is
|
|
88
|
+
// how the tint normally reaches the eye — but the banding above replaces
|
|
89
|
+
// that with the alternate colour, so on odd rows the stripe swallowed the
|
|
90
|
+
// tint. A tinted row (marked by rowClassName in DataGrid.jsx) restores
|
|
91
|
+
// `inherit` — NOT `transparent`, which would break the inheritance chain
|
|
92
|
+
// the tint travels through. Must stay AFTER the banding rule: same
|
|
93
|
+
// specificity, order decides. Hover is unaffected — its background is
|
|
94
|
+
// `!important` on the hover target.
|
|
93
95
|
.tintedRow :global(.InovuaReactDataGrid__row-cell-wrap) {
|
|
94
|
-
background:
|
|
96
|
+
background: inherit;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
.InovuaReactDataGrid__row-hover-target:hover {
|
|
@@ -1764,3 +1764,38 @@ input[type='file']:hover {
|
|
|
1764
1764
|
color: var(--danger-color, #dc3545);
|
|
1765
1765
|
}
|
|
1766
1766
|
}
|
|
1767
|
+
|
|
1768
|
+
/* =========================================================================
|
|
1769
|
+
Auto-growing note/comment textareas
|
|
1770
|
+
|
|
1771
|
+
A fixed `rows` box turns a long note log into a porthole: the reader
|
|
1772
|
+
scrolls a few lines at a time inside a form that has plenty of room.
|
|
1773
|
+
Where the browser supports it (field-sizing), the box sizes itself to
|
|
1774
|
+
its content so a note history reads top to bottom with the page's own
|
|
1775
|
+
scroll; the `rows` attribute stays as the fallback everywhere else.
|
|
1776
|
+
`resize: vertical` keeps a drag handle in both worlds, so a reviewer
|
|
1777
|
+
can pull the box taller regardless of support.
|
|
1778
|
+
|
|
1779
|
+
Two minimums: a standalone Notes/Comments field opens at roughly its
|
|
1780
|
+
old 8-row size so an empty form doesn't collapse to a slit; a
|
|
1781
|
+
table-cell textarea starts near its 3-row fallback so checklist rows
|
|
1782
|
+
stay compact until they have content.
|
|
1783
|
+
========================================================================= */
|
|
1784
|
+
|
|
1785
|
+
.autoGrowTextarea {
|
|
1786
|
+
resize: vertical;
|
|
1787
|
+
|
|
1788
|
+
@supports (field-sizing: content) {
|
|
1789
|
+
field-sizing: content;
|
|
1790
|
+
min-height: 8lh;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
.autoGrowCellTextarea {
|
|
1795
|
+
resize: vertical;
|
|
1796
|
+
|
|
1797
|
+
@supports (field-sizing: content) {
|
|
1798
|
+
field-sizing: content;
|
|
1799
|
+
min-height: 3lh;
|
|
1800
|
+
}
|
|
1801
|
+
}
|