@celestia-island/hikari 0.55.431 → 0.55.433
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
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
display: grid;
|
|
59
59
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
60
60
|
gap: var(--space-4, 0.25rem) var(--space-6);
|
|
61
|
-
|
|
61
|
+
// The expansion panel's content padding (HkExpansionPanel) owns the
|
|
62
|
+
// inset now — this grid renders only inside those panels.
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
/* Non-color slot cell (number slider / enum tab strip). A picker labels
|
|
@@ -125,6 +125,12 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.hk-expansion-panel-content {
|
|
128
|
+
/* The BODY padding belongs to the panel, not to each host: inline
|
|
129
|
+
padding matches the header's own (var(--space-12)), so body content
|
|
130
|
+
aligns with the title, and the bottom pad gives the content breathing
|
|
131
|
+
room before the panel edge. Without this every consumer hand-pads
|
|
132
|
+
(and forgets — the flush body was exactly that report). */
|
|
133
|
+
padding: var(--space-8) var(--space-12) var(--space-12);
|
|
128
134
|
min-height: 0;
|
|
129
135
|
overflow: hidden;
|
|
130
136
|
visibility: hidden;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
1
4
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
2
5
|
import { createApp, h, nextTick } from "vue";
|
|
3
6
|
|
|
@@ -107,3 +110,16 @@ describe("HkExpansionPanel", () => {
|
|
|
107
110
|
expect(onToggle).not.toHaveBeenCalled();
|
|
108
111
|
});
|
|
109
112
|
});
|
|
113
|
+
|
|
114
|
+
describe("HkExpansionPanel body padding contract (2026-11-19)", () => {
|
|
115
|
+
// The BODY padding belongs to the panel (user direction 2026-11-19: a
|
|
116
|
+
// flush expanded body read as a host bug, and hosts that hand-padded
|
|
117
|
+
// doubled once the panel grew its own). The stylesheet contract keeps
|
|
118
|
+
// the inset from being dropped again.
|
|
119
|
+
it("owns the body inset in the stylesheet (header-aligned inline + bottom)", () => {
|
|
120
|
+
const scss = readFileSync(join(dirname(fileURLToPath(import.meta.url)), "HkExpansionPanel.scss"), "utf8");
|
|
121
|
+
expect(scss).toMatch(
|
|
122
|
+
/\.hk-expansion-panel-content\s*{[^}]*padding:\s*var\(--space-8\)\s+var\(--space-12\)\s+var\(--space-12\)/,
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
@@ -85,13 +85,17 @@ export default defineComponent({
|
|
|
85
85
|
* the two closes would fight; mobile keeps its scrim either way. */
|
|
86
86
|
closeOnBackdrop: { type: Boolean, default: true },
|
|
87
87
|
/** Trigger-suffix renderer — the seat for a host's direction arrow.
|
|
88
|
-
* Re-evaluated every render; render nothing while disengaged
|
|
89
|
-
|
|
88
|
+
* Re-evaluated every render; render nothing while disengaged (an
|
|
89
|
+
* undefined return seats nothing — the disengaged state is the norm). */
|
|
90
|
+
renderChipTrailing: {
|
|
91
|
+
type: Function as PropType<() => VNode | undefined>,
|
|
92
|
+
default: undefined,
|
|
93
|
+
},
|
|
90
94
|
/** Popup pill-suffix renderer, forwarded to the pill group — a null
|
|
91
95
|
* value scopes the all-pill, a value scopes that option. Ignored
|
|
92
96
|
* while the default slot replaces the pill group. */
|
|
93
97
|
renderPillTrailing: {
|
|
94
|
-
type: Function as PropType<(value: string | null) => VNode>,
|
|
98
|
+
type: Function as PropType<(value: string | null) => VNode | undefined>,
|
|
95
99
|
default: undefined,
|
|
96
100
|
},
|
|
97
101
|
},
|
|
@@ -83,7 +83,7 @@ export default defineComponent({
|
|
|
83
83
|
* host rebuilds the returned vnode when its state moves, nothing is
|
|
84
84
|
* cached here. */
|
|
85
85
|
renderTrailing: {
|
|
86
|
-
type: Function as PropType<(value: string | null) => VNode>,
|
|
86
|
+
type: Function as PropType<(value: string | null) => VNode | undefined>,
|
|
87
87
|
default: undefined,
|
|
88
88
|
},
|
|
89
89
|
},
|