@celestia-island/hikari 0.55.6 → 0.55.8
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
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
1
5
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
6
|
import { createApp, h } from "vue";
|
|
3
7
|
|
|
@@ -257,3 +261,33 @@ describe("HkAuthCard", () => {
|
|
|
257
261
|
expect(vi.getTimerCount()).toBe(0);
|
|
258
262
|
});
|
|
259
263
|
});
|
|
264
|
+
|
|
265
|
+
// SCSS spacing contract (house pattern, cf. HkButton icon-only SCSS
|
|
266
|
+
// contract): happy-dom does not lay out, so the vertical breathing room of
|
|
267
|
+
// the `methods` slot container is asserted on the sheet text. Block
|
|
268
|
+
// comments are stripped first so a commented-out declaration cannot
|
|
269
|
+
// satisfy the guard.
|
|
270
|
+
describe("HkAuthCard methods-block SCSS spacing contract", () => {
|
|
271
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
272
|
+
const scss = readFileSync(join(here, "../styles/admin-tokens.scss"), "utf-8")
|
|
273
|
+
.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
274
|
+
|
|
275
|
+
it("bands the third-party methods block off its neighbours", () => {
|
|
276
|
+
// 2026-09-16 user feedback: with only `margin-top: 16px` and no vertical
|
|
277
|
+
// padding, the divider row sat on the submit button and the tiles sat on
|
|
278
|
+
// the footer rows — the block needs its own top/bottom breathing room.
|
|
279
|
+
const rule = scss.match(/\.s-auth-methods\s*{[^}]*}/)?.[0] ?? "";
|
|
280
|
+
expect(rule, ".s-auth-methods rule must exist in admin-tokens.scss").toBeTruthy();
|
|
281
|
+
expect(rule).toContain("padding: var(--space-8, 0.5rem) var(--space-32, 2rem)");
|
|
282
|
+
expect(rule).toContain("margin-top: var(--space-24, 1.5rem)");
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
it("keeps the form's collapsed bottom padding feeding that band", () => {
|
|
286
|
+
// The 40px form→divider distance is composed (8px form padding-bottom
|
|
287
|
+
// via :has + 24px margin-top + 8px own padding); losing the collapse
|
|
288
|
+
// would swap in the form's default 24px bottom padding instead.
|
|
289
|
+
const rule = scss.match(/\.s-auth-form:has\(\+ \.s-auth-methods\)\s*{[^}]*}/)?.[0] ?? "";
|
|
290
|
+
expect(rule, ":has collapse rule must exist").toBeTruthy();
|
|
291
|
+
expect(rule).toContain("padding-bottom: var(--space-8, 0.5rem)");
|
|
292
|
+
});
|
|
293
|
+
});
|
|
@@ -240,7 +240,10 @@
|
|
|
240
240
|
display: flex;
|
|
241
241
|
align-items: center;
|
|
242
242
|
gap: var(--space-2, 4px);
|
|
243
|
-
|
|
243
|
+
/* Pin to inline-end: the header is space-between, so without this the
|
|
244
|
+
actions cell becomes the middle child and floats to the center
|
|
245
|
+
(user report 2026-09-16 — the login sheet's gear landed mid-header). */
|
|
246
|
+
margin-inline-start: auto;
|
|
244
247
|
flex-shrink: 0;
|
|
245
248
|
}
|
|
246
249
|
|
|
@@ -400,15 +400,12 @@
|
|
|
400
400
|
outline-offset: 2px;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
+
/* Highlight only — no scale pop: enlarging the node clipped it against
|
|
404
|
+
tight hosts (a top-of-rail circle poked out of its overflow box) and
|
|
405
|
+
read as jitter (user direction 2026-09-16). */
|
|
403
406
|
&:hover [data-el="indicator"] {
|
|
404
|
-
transform: scale(1.12);
|
|
405
407
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--hi-color-primary) 15%, transparent);
|
|
406
|
-
transition:
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// Press feedback mirroring the hover pop (role="button" affordance).
|
|
410
|
-
&:active [data-el="indicator"] {
|
|
411
|
-
transform: scale(0.96);
|
|
408
|
+
transition: box-shadow var(--duration-normal, 0.3s) ease;
|
|
412
409
|
}
|
|
413
410
|
}
|
|
414
411
|
|
|
@@ -416,8 +413,8 @@
|
|
|
416
413
|
// animation under reduced motion, keeping the state change itself
|
|
417
414
|
// (house pattern: HkIconButton.scss).
|
|
418
415
|
@media (prefers-reduced-motion: reduce) {
|
|
419
|
-
.hk-timeline-step[data-clickable]:hover [data-el="indicator"]
|
|
420
|
-
.hk-timeline-step[data-clickable]:active [data-el="indicator"] {
|
|
416
|
+
.hk-timeline-step[data-clickable]:hover [data-el="indicator"] {
|
|
421
417
|
transition: none;
|
|
422
418
|
}
|
|
423
419
|
}
|
|
420
|
+
}
|
|
@@ -924,18 +924,22 @@
|
|
|
924
924
|
slot, usually HkAuthMethodList). Same side padding as the form and the
|
|
925
925
|
footer so the buttons line up exactly with the inputs; the footer keeps
|
|
926
926
|
its fit-content centered-group behavior because the buttons live here,
|
|
927
|
-
not in the footer.
|
|
927
|
+
not in the footer. The 8px top/bottom padding bands the divider row off
|
|
928
|
+
the submit button above and the tiles off the footer rows below — a bare
|
|
929
|
+
16px margin sat the divider on the button and the tiles on the footer
|
|
930
|
+
(2026-09-16 user feedback). */
|
|
928
931
|
.s-auth-methods {
|
|
929
932
|
display: flex;
|
|
930
933
|
flex-direction: column;
|
|
931
934
|
gap: var(--space-8, 0.5rem);
|
|
932
|
-
padding: 0 var(--space-32, 2rem);
|
|
933
|
-
margin-top: var(--space-
|
|
935
|
+
padding: var(--space-8, 0.5rem) var(--space-32, 2rem);
|
|
936
|
+
margin-top: var(--space-24, 1.5rem);
|
|
934
937
|
}
|
|
935
938
|
|
|
936
939
|
/* Keep the vertical rhythm when the block sits between form and footer:
|
|
937
|
-
form →
|
|
938
|
-
buttons →
|
|
940
|
+
form → 40px → divider row (8px collapsed padding + 24px margin + 8px
|
|
941
|
+
padding), and buttons → 24px → footer rows (8px padding + the footer's
|
|
942
|
+
16px margin-top). */
|
|
939
943
|
.s-auth-form:has(+ .s-auth-methods) {
|
|
940
944
|
padding-bottom: var(--space-8, 0.5rem);
|
|
941
945
|
}
|