@neuravision/construct 2.1.2 → 2.1.4
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/CHANGELOG.md +27 -0
- package/components/button.css +18 -2
- package/components/card.css +9 -0
- package/components/chip.css +12 -0
- package/components/modal.css +8 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to `@neuravision/construct` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.1.4] - 2026-07-17
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Button: custom icons composed into the `.ct-button__icon` slot (a `.ct-icon` — also when
|
|
13
|
+
wrapped by a framework component host — or a bare `<svg>`) now adopt the slot's size,
|
|
14
|
+
completing the composition contract introduced for the chip slot in 2.1.3. The slot size
|
|
15
|
+
is expressed as `--ct-button-icon-size` (default `--icon-sm`); context overrides like the
|
|
16
|
+
modal header's larger close icon set the custom property and flow through to composed
|
|
17
|
+
content. Consumers that override `.ct-button__icon` dimensions directly should switch to
|
|
18
|
+
`--ct-button-icon-size` so composed icons follow.
|
|
19
|
+
- Card & Modal: header/footer slots hidden via the `hidden` attribute (e.g. by framework
|
|
20
|
+
wrappers when no content is projected) now actually disappear. The slots' `display: flex`
|
|
21
|
+
previously overrode the UA stylesheet's `[hidden] { display: none }`, so every card
|
|
22
|
+
without footer content rendered a ghost divider plus spacing at the bottom edge (same
|
|
23
|
+
for modals without a footer). New guards: `.ct-card__header[hidden]`,
|
|
24
|
+
`.ct-card__footer[hidden]`, `.ct-modal__footer[hidden]`.
|
|
25
|
+
|
|
26
|
+
## [2.1.3] - 2026-07-17
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Chip: custom icons composed into the `.ct-chip__icon` slot (a `.ct-icon` — also when wrapped
|
|
31
|
+
by a framework component host — or a bare `<svg>`) now adopt the slot's 1em size. Previously
|
|
32
|
+
`.ct-icon` kept its fixed `--icon-md` box and overflowed the slot onto the chip label
|
|
33
|
+
(visible as a copy icon overlapping the first characters of ID chips).
|
|
34
|
+
|
|
8
35
|
## [2.1.2] - 2026-07-16
|
|
9
36
|
|
|
10
37
|
### Added
|
package/components/button.css
CHANGED
|
@@ -186,13 +186,29 @@
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.ct-button__icon {
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
--ct-button-icon-size: var(--icon-sm);
|
|
190
|
+
|
|
191
|
+
width: var(--ct-button-icon-size);
|
|
192
|
+
height: var(--ct-button-icon-size);
|
|
191
193
|
display: inline-flex;
|
|
192
194
|
align-items: center;
|
|
193
195
|
justify-content: center;
|
|
194
196
|
}
|
|
195
197
|
|
|
198
|
+
/* Composed icon content adopts the slot's size — same composition
|
|
199
|
+
contract as `.ct-chip__icon` (see chip.css). `.ct-icon` carries a
|
|
200
|
+
fixed `--icon-md` box of its own that would overflow the slot; the
|
|
201
|
+
size is restated via the slot's custom property because `width: 100%`
|
|
202
|
+
does not resolve through an intermediate framework component host.
|
|
203
|
+
Context overrides (e.g. `.ct-modal__header`) set
|
|
204
|
+
`--ct-button-icon-size` and flow through to composed content. */
|
|
205
|
+
.ct-button__icon .ct-icon,
|
|
206
|
+
.ct-button__icon > svg {
|
|
207
|
+
width: var(--ct-button-icon-size);
|
|
208
|
+
height: var(--ct-button-icon-size);
|
|
209
|
+
font-size: var(--ct-button-icon-size);
|
|
210
|
+
}
|
|
211
|
+
|
|
196
212
|
@media (pointer: coarse) {
|
|
197
213
|
.ct-button {
|
|
198
214
|
min-width: var(--control-height-sm);
|
package/components/card.css
CHANGED
|
@@ -46,6 +46,15 @@
|
|
|
46
46
|
border-top: var(--border-thin) solid var(--color-border-subtle);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/* Wrappers hide empty slots via the `hidden` attribute (e.g. framework
|
|
50
|
+
integrations when no content is projected). The display rules above would
|
|
51
|
+
otherwise override the UA stylesheet's `[hidden] { display: none }` and
|
|
52
|
+
leave a ghost divider + spacing behind. */
|
|
53
|
+
.ct-card__header[hidden],
|
|
54
|
+
.ct-card__footer[hidden] {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
:is(a, button, [role='button'], [role='link']).ct-card--interactive {
|
|
50
59
|
cursor: pointer;
|
|
51
60
|
transition: box-shadow var(--duration-fast) var(--easing-standard),
|
package/components/chip.css
CHANGED
|
@@ -206,6 +206,18 @@
|
|
|
206
206
|
color: var(--ct-chip-accent);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
/* Composed icon content adopts the slot's size. `.ct-icon` carries a
|
|
210
|
+
fixed `--icon-md` box of its own; inside the 1em chip slot that box
|
|
211
|
+
would overflow onto the label (an intermediate wrapper — e.g. a
|
|
212
|
+
framework component host — keeps `width: 100%` from resolving, so
|
|
213
|
+
the slot size is restated in em). */
|
|
214
|
+
.ct-chip__icon .ct-icon,
|
|
215
|
+
.ct-chip__icon > svg {
|
|
216
|
+
width: 1em;
|
|
217
|
+
height: 1em;
|
|
218
|
+
font-size: 1em;
|
|
219
|
+
}
|
|
220
|
+
|
|
209
221
|
/* ── Built-in semantic icons via CSS mask-image ──────────────── */
|
|
210
222
|
|
|
211
223
|
.ct-chip__icon--info,
|
package/components/modal.css
CHANGED
|
@@ -46,8 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.ct-modal__header .ct-button__icon {
|
|
49
|
-
|
|
50
|
-
height: var(--icon-lg);
|
|
49
|
+
--ct-button-icon-size: var(--icon-lg);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
.ct-modal__body {
|
|
@@ -65,6 +64,13 @@
|
|
|
65
64
|
flex-wrap: wrap;
|
|
66
65
|
}
|
|
67
66
|
|
|
67
|
+
/* Wrappers hide the footer via the `hidden` attribute when no content is
|
|
68
|
+
projected; `display: flex` above would otherwise override the UA
|
|
69
|
+
stylesheet's `[hidden]` rule and leave a ghost divider behind. */
|
|
70
|
+
.ct-modal__footer[hidden] {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
68
74
|
/* Modal size variants */
|
|
69
75
|
|
|
70
76
|
.ct-modal--sm .ct-modal__dialog {
|