@visns-studio/visns-components 6.3.2 → 6.3.3
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.3",
|
|
95
95
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
96
96
|
"main": "src/index.js",
|
|
97
97
|
"files": [
|
|
@@ -205,8 +205,16 @@
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
/* The gallery modal's close control — this class is consumed by
|
|
209
|
+
modals/GalleryModal.jsx, which imports this stylesheet (DataGrid.jsx itself
|
|
210
|
+
never uses it). Same hardening as the header close in Form.module.scss; the
|
|
211
|
+
long note on the svg block there explains why a close glyph needs an
|
|
212
|
+
explicit box and `flex: none` rather than trusting its size attributes. */
|
|
208
213
|
.modal__close {
|
|
209
214
|
width: max-content;
|
|
215
|
+
min-width: 2rem;
|
|
216
|
+
min-height: 2rem;
|
|
217
|
+
box-sizing: border-box;
|
|
210
218
|
background: rgba(var(--paragraph-rgb), 0.05);
|
|
211
219
|
cursor: pointer;
|
|
212
220
|
padding: 0.25rem;
|
|
@@ -225,6 +233,9 @@
|
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
svg {
|
|
236
|
+
width: 1.25rem;
|
|
237
|
+
height: 1.25rem;
|
|
238
|
+
flex: none;
|
|
228
239
|
color: var(--primary-color);
|
|
229
240
|
display: block;
|
|
230
241
|
}
|
|
@@ -708,24 +708,52 @@ input[type='file']:hover {
|
|
|
708
708
|
font-size: 1.15em;
|
|
709
709
|
}
|
|
710
710
|
|
|
711
|
+
/* The "Edit Canvas" modal's close control (Field.jsx). Hardened
|
|
712
|
+
the same way as the header close in Form.module.scss — see the
|
|
713
|
+
note on the svg block there. */
|
|
711
714
|
.modal__close {
|
|
712
715
|
width: max-content;
|
|
716
|
+
min-width: 2rem;
|
|
717
|
+
min-height: 2rem;
|
|
713
718
|
position: absolute;
|
|
714
719
|
right: 5px;
|
|
715
720
|
top: 5px;
|
|
716
721
|
box-sizing: border-box;
|
|
717
|
-
|
|
722
|
+
/* Was `rgba(var(--primary-color), 1.08)`, which is not a
|
|
723
|
+
colour: `--primary-color` is a hex, rgba() wants three
|
|
724
|
+
channels, and an alpha above 1 is out of range either way.
|
|
725
|
+
The declaration was invalid and dropped, so this button had
|
|
726
|
+
no background at all. It sits on `&__header`, which is
|
|
727
|
+
`var(--primary-color)`, so what it wants is a light lift off
|
|
728
|
+
that ground — the same treatment the equivalent control in
|
|
729
|
+
GenericFormBuilder.module.scss uses on its coloured header. */
|
|
730
|
+
background: rgba(255, 255, 255, 0.15);
|
|
718
731
|
cursor: pointer;
|
|
719
732
|
padding: 8px 8px;
|
|
720
733
|
margin: 0;
|
|
721
734
|
outline: none;
|
|
722
735
|
border: none;
|
|
723
736
|
border-radius: var(--br);
|
|
724
|
-
display:
|
|
737
|
+
display: flex;
|
|
738
|
+
align-items: center;
|
|
739
|
+
justify-content: center;
|
|
725
740
|
line-height: 1;
|
|
741
|
+
transition: background 0.2s ease;
|
|
742
|
+
|
|
743
|
+
&:hover {
|
|
744
|
+
background: rgba(255, 255, 255, 0.25);
|
|
745
|
+
}
|
|
726
746
|
|
|
727
747
|
svg {
|
|
728
|
-
|
|
748
|
+
width: 1.25rem;
|
|
749
|
+
height: 1.25rem;
|
|
750
|
+
flex: none;
|
|
751
|
+
/* The header behind this is `--primary-color`, so the
|
|
752
|
+
glyph is set against it rather than in a brand hue that
|
|
753
|
+
may be a near-match for it. Field.jsx also passes
|
|
754
|
+
`color="#FFF"`, which lucide writes as a `stroke`
|
|
755
|
+
attribute; this keeps the two in agreement. */
|
|
756
|
+
color: #fff;
|
|
729
757
|
display: block;
|
|
730
758
|
}
|
|
731
759
|
}
|
|
@@ -242,23 +242,63 @@ input[type='file'] {
|
|
|
242
242
|
justify-content: center;
|
|
243
243
|
width: 2rem;
|
|
244
244
|
height: 2rem;
|
|
245
|
+
/* The box is stated three ways on purpose. `width`/`height` alone is not a
|
|
246
|
+
box a consuming app cannot move: every one of these buttons lives under
|
|
247
|
+
whatever ambient `button { … }` rule the host stylesheet carries, and
|
|
248
|
+
with the library's own `* { box-sizing: border-box }` in play, a host
|
|
249
|
+
padding rule eats this button's *content* box rather than growing it.
|
|
250
|
+
The min-* pair holds the outer size and `box-sizing` states the
|
|
251
|
+
assumption rather than inheriting it — but see the svg block for what
|
|
252
|
+
actually keeps the glyph safe. */
|
|
253
|
+
min-width: 2rem;
|
|
254
|
+
min-height: 2rem;
|
|
255
|
+
box-sizing: border-box;
|
|
245
256
|
flex: none;
|
|
246
257
|
background: none;
|
|
247
258
|
cursor: pointer;
|
|
248
259
|
padding: 0;
|
|
249
260
|
margin: 0;
|
|
250
261
|
border: none;
|
|
251
|
-
border-radius: var(--radius-sm);
|
|
262
|
+
border-radius: var(--radius-sm, 6px);
|
|
252
263
|
line-height: 1;
|
|
253
|
-
transition: background-color var(--speed) var(--ease);
|
|
264
|
+
transition: background-color var(--speed, 0.18s) var(--ease, ease);
|
|
254
265
|
|
|
255
266
|
&:hover {
|
|
256
|
-
background: var(--hover-color);
|
|
267
|
+
background: var(--hover-color, rgba(var(--paragraph-color-rgb, 34, 30, 51), 0.06));
|
|
257
268
|
}
|
|
258
269
|
|
|
259
270
|
svg {
|
|
260
|
-
|
|
271
|
+
/* This is the rule that stops the icon disappearing.
|
|
272
|
+
|
|
273
|
+
An `<svg width="24" height="24">` inside a flex container is a flex
|
|
274
|
+
item with the default `flex-shrink: 1`, so when the button's content
|
|
275
|
+
box is squeezed the glyph shrinks with it — all the way down.
|
|
276
|
+
Hartway's plant-floor stylesheet carries
|
|
277
|
+
`body.tablet-mode button:not([class*='InovuaReactDataGrid'])
|
|
278
|
+
{ padding: 8px 14px }`,
|
|
279
|
+
which outweighs this module's single class (0,2,2 against 0,1,0) and
|
|
280
|
+
left a 2rem border-box button with a 4px content box; the X
|
|
281
|
+
collapsed with it and read as a smudge at the end of the header.
|
|
282
|
+
|
|
283
|
+
`flex: none` refuses to shrink, and the explicit width/height also
|
|
284
|
+
makes the glyph immune to the `width: 100%` sizing pattern used on
|
|
285
|
+
svgs elsewhere in this library. Both are needed: the size fixes the
|
|
286
|
+
basis, `flex: none` stops it being overruled. Sized here rather than
|
|
287
|
+
trusting the `size` prop at each call site, so every modal header
|
|
288
|
+
agrees on one glyph. */
|
|
289
|
+
width: 1.25rem;
|
|
290
|
+
height: 1.25rem;
|
|
291
|
+
flex: none;
|
|
292
|
+
/* Recessive, but a control the user has to be able to find has no
|
|
293
|
+
business being fainter than the body text around it. */
|
|
294
|
+
color: var(--muted-color, #6b7688);
|
|
261
295
|
display: block;
|
|
296
|
+
transition: color var(--speed, 0.18s) var(--ease, ease);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&:hover svg,
|
|
300
|
+
&:focus-visible svg {
|
|
301
|
+
color: var(--paragraph-color, #374151);
|
|
262
302
|
}
|
|
263
303
|
}
|
|
264
304
|
|
|
@@ -741,8 +741,13 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
741
741
|
letter-spacing: 0.01em;
|
|
742
742
|
}
|
|
743
743
|
|
|
744
|
+
/* The form builder's modal close control (GenericFormBuilder.jsx, two call
|
|
745
|
+
sites). Hardened the same way as the header close in Form.module.scss — see
|
|
746
|
+
the note on the svg block there. */
|
|
744
747
|
.modal__close {
|
|
745
748
|
width: max-content;
|
|
749
|
+
min-width: 2rem;
|
|
750
|
+
min-height: 2rem;
|
|
746
751
|
position: absolute;
|
|
747
752
|
right: 8px;
|
|
748
753
|
top: 8px;
|
|
@@ -754,7 +759,9 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
754
759
|
outline: none;
|
|
755
760
|
border: none;
|
|
756
761
|
border-radius: 6px;
|
|
757
|
-
display:
|
|
762
|
+
display: flex;
|
|
763
|
+
align-items: center;
|
|
764
|
+
justify-content: center;
|
|
758
765
|
line-height: 1;
|
|
759
766
|
transition: background 0.2s ease;
|
|
760
767
|
|
|
@@ -764,7 +771,13 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
764
771
|
}
|
|
765
772
|
|
|
766
773
|
.modal__close svg {
|
|
767
|
-
|
|
774
|
+
width: 1.25rem;
|
|
775
|
+
height: 1.25rem;
|
|
776
|
+
flex: none;
|
|
777
|
+
/* `.modal__header` above is `var(--primary-color)`, so the glyph is set
|
|
778
|
+
against that ground rather than in a second brand hue that may be a
|
|
779
|
+
near-match for it — which is what `--secondary-color` was doing here. */
|
|
780
|
+
color: #fff;
|
|
768
781
|
display: block;
|
|
769
782
|
}
|
|
770
783
|
|