@celestia-island/hikari 0.55.16 → 0.55.17

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/hikari",
3
- "version": "0.55.16",
3
+ "version": "0.55.17",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari Vue 3 component library — production-grade UI components based on shittim-chest design system",
@@ -87,4 +87,28 @@ describe("menu-item grammar contract", () => {
87
87
  expect(adminTokens).toMatch(/\.hk-menu-divider \{[^}]*--hk-menu-item-pad-y, 6px/);
88
88
  expect(adminTokens).toMatch(/\.hk-menu-divider \{[^}]*--hk-menu-item-pad-x, 12px/);
89
89
  });
90
+
91
+ it("lands the identity header on the rows' content edge inside HkMenu surfaces", () => {
92
+ // The account identity block (`.s-user-header` — the admin header's
93
+ // dropdown header slot and every consumer's HkMenu header slot) shares
94
+ // its container with the menu rows, so its inline padding must BE the
95
+ // rows' content edge: their 1px transparent border plus pad-x, in the
96
+ // grammar's own px units. A fixed rem value read 1px off at the
97
+ // default root, 4.5px at a 20px root, and 3px the other way on sheets
98
+ // (measured 2026-09-17): pin both scoped rules and their branch values.
99
+ expect(adminTokens).toMatch(
100
+ /\.hk-select-popout-host \.s-user-header \{[^}]*padding-inline: calc\(1px \+ var\(--hk-menu-item-pad-x, 12px\)\)/,
101
+ );
102
+ expect(adminTokens).toMatch(
103
+ /\.hk-select-sheet-panel \.s-user-header \{[^}]*padding-inline: calc\(1px \+ var\(--hk-menu-item-pad-x, 16px\)\)/,
104
+ );
105
+ // The sheet branch value must follow the sheet tokens, not the popout's.
106
+ expect(adminTokens).not.toMatch(
107
+ /\.hk-select-sheet-panel \.s-user-header \{[^}]*--hk-menu-item-pad-x, 12px/,
108
+ );
109
+ // Bare surfaces (no rows beside the block) keep the block's own value.
110
+ expect(adminTokens).toMatch(
111
+ /\.s-user-header \{[^}]*padding: var\(--space-10\) var\(--space-14\) var\(--space-12\)/,
112
+ );
113
+ });
90
114
  });
@@ -550,14 +550,35 @@
550
550
  flex-direction: column;
551
551
  gap: 2px;
552
552
  min-width: 0;
553
- /* In menus this aligns with .s-popup-menu-item's own space-14 (menu
554
- padding applies equally to both); bare surfaces (the popover
555
- wrapper) rely on it entirely. The bottom margin restores the
556
- separation the removed section divider used to provide. */
553
+ /* The 14px inline is the BARE-surface value (a wrapper with no menu rows
554
+ beside it). Inside HkMenu's surfaces the scoped rules below take over:
555
+ the unified menu-item grammar moved rows to a 12px pad plus a 1px
556
+ transparent border (sheets 16px), so a fixed 14px aligned with nothing
557
+ — 1px off at the default root, 4.5px at a 20px root, and 3px the other
558
+ way on sheets (measured 2026-09-17, chest account menus). The bottom
559
+ margin restores the separation the removed section divider used to
560
+ provide. */
557
561
  padding: var(--space-10) var(--space-14) var(--space-12);
558
562
  margin-bottom: var(--space-4);
559
563
  }
560
564
 
565
+ /* Inside HkMenu's popout/sheet surfaces the block shares its container with
566
+ the menu rows, so its inline padding IS the rows' content edge — their
567
+ 1px transparent border plus pad-x — expressed in the grammar's own units
568
+ (px formulas: the row paddings are px literals declared on the rows, so
569
+ a rem here drifts at any other root font-size; the fallback literals must
570
+ follow _menu-item.scss if the row padding ever moves). Scoped to the two
571
+ surfaces that host the block, so bare surfaces keep the 14px and plain
572
+ HkSelect / HkPopupSelect panels are untouched. Consumers that re-anchor
573
+ the block (a drawer footer) keep their own context overrides. */
574
+ .hk-select-popout-host .s-user-header {
575
+ padding-inline: calc(1px + var(--hk-menu-item-pad-x, 12px));
576
+ }
577
+
578
+ .hk-select-sheet-panel .s-user-header {
579
+ padding-inline: calc(1px + var(--hk-menu-item-pad-x, 16px));
580
+ }
581
+
561
582
  /* Profile variant — avatar chip beside the identity column, the ONE
562
583
  identity grammar the chat frontend's user menu and the admin
563
584
  header's dropdown share (moved up from chest's ChatLayout so both