@fusion.dev/helix 0.21.0 → 0.23.0

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.
@@ -6136,7 +6136,7 @@
6136
6136
  }
6137
6137
  },
6138
6138
  {
6139
- "description": "After it, for a count or a mark.",
6139
+ "description": "After the label and outside the link, so it may be a control: this is where a switcher's menu trigger goes. A count or a mark is equally at home here and is no longer read into the link's accessible name.",
6140
6140
  "name": "end",
6141
6141
  "inheritedFrom": {
6142
6142
  "name": "HelixHeadlessBreadcrumb",
@@ -6776,8 +6776,8 @@
6776
6776
  "slug": "overflow"
6777
6777
  },
6778
6778
  {
6779
- "description": "A crumb that opens a menu, for switching what the trail is about.",
6780
- "min": 320,
6779
+ "description": "A crumb that is both a link and a switch: the word goes to its page, the chevron opens the siblings.",
6780
+ "min": 380,
6781
6781
  "slug": "switcher"
6782
6782
  }
6783
6783
  ],
@@ -50125,12 +50125,16 @@
50125
50125
  "description": "The tick and the arrow hold their space whether or not they are showing, so\nthe labels in a menu start at one place and the rows read as a column rather\nthan as a ragged list.",
50126
50126
  "name": "HelixMenuItem",
50127
50127
  "cssProperties": [
50128
+ {
50129
+ "description": "Width of the trailing column, seam included, which holds a tick or the caret into a page.",
50130
+ "name": "--menu-item-end"
50131
+ },
50128
50132
  {
50129
50133
  "description": "Fill under the pointer.",
50130
50134
  "name": "--menu-item-hover-color"
50131
50135
  },
50132
50136
  {
50133
- "description": "Width of the leading column, for a row carrying more than a mark.",
50137
+ "description": "Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all.",
50134
50138
  "name": "--menu-item-start"
50135
50139
  }
50136
50140
  ],
@@ -50303,6 +50307,31 @@
50303
50307
  "module": "src/menu/item/menu-item.ts"
50304
50308
  }
50305
50309
  },
50310
+ {
50311
+ "kind": "field",
50312
+ "name": "start",
50313
+ "type": {
50314
+ "text": "boolean"
50315
+ },
50316
+ "privacy": "private",
50317
+ "default": "false",
50318
+ "description": "Whether anything is slotted before the label.\n\nThe leading box is drawn only where there is something to put in it, the\nsame way the trailing mark is. What keeps the labels on one edge is the\ntrack the menu reserves for the page, not a box on every row, so a row with\nnothing here takes no box and still lines up with its neighbors.\n\nRead from the slot rather than from the light DOM, because the light DOM\nanswer is not reactive: a consumer who adds an icon to one row after first\nrender changes nothing this element is told about, and `slotchange` is\nexactly the thing that is.",
50319
+ "inheritedFrom": {
50320
+ "name": "HelixHeadlessMenuItem",
50321
+ "module": "src/menu/item/menu-item.ts"
50322
+ }
50323
+ },
50324
+ {
50325
+ "kind": "field",
50326
+ "name": "readStart",
50327
+ "privacy": "private",
50328
+ "readonly": true,
50329
+ "description": "Re-reads whether anything is before the label.\n\nThe slot itself is always rendered and it is the box around it that comes\nand goes, which is what makes this safe where `readSubmenu` needed the note\nit carries: there is one `slot[name=\"start\"]` in one template branch, so it\nis never rebuilt and never fires on its way out.",
50330
+ "inheritedFrom": {
50331
+ "name": "HelixHeadlessMenuItem",
50332
+ "module": "src/menu/item/menu-item.ts"
50333
+ }
50334
+ },
50306
50335
  {
50307
50336
  "kind": "field",
50308
50337
  "name": "readSubmenu",
@@ -51339,6 +51368,21 @@
51339
51368
  "module": "src/menu/root/menu-root.ts"
51340
51369
  }
51341
51370
  },
51371
+ {
51372
+ "kind": "method",
51373
+ "name": "markColumns",
51374
+ "privacy": "private",
51375
+ "return": {
51376
+ "type": {
51377
+ "text": "void"
51378
+ }
51379
+ },
51380
+ "description": "Says whether the page showing reserves a column either side of its labels.\n\n**A fact no row can answer for itself**, which is why the columns were\nunconditional. A row knows about its own start slot and nothing about its\nneighbors, so a page where one row has an icon and the rest do not draws two\ndifferent left edges for its text. Reserving on every row instead charged\nevery menu for a column nothing in it was ever going to fill: measured on a\npage of two plain rows, the text started 36 pixels into the row, of which 12\nwas the row's own padding and 24 a leading column and its seam. The same\npage now starts at 12, and a page where one row does have a mark still\nstarts both of its rows at 36.\n\n**Per page rather than per menu**, because a submenu is a different set of\nrows: a page of checkable filters under a page of plain ones reserves on one\nand not on the other, and asking the whole tree would hand the plain page\nthe filters' column. `Notifications` answers the same question for its media\ncolumn the same way, and for the same reason.\n\nRead off the light DOM rather than off the rows, so it does not depend on\nwhich children have upgraded by the time this runs.",
51381
+ "inheritedFrom": {
51382
+ "name": "HelixHeadlessMenu",
51383
+ "module": "src/menu/root/menu-root.ts"
51384
+ }
51385
+ },
51342
51386
  {
51343
51387
  "kind": "method",
51344
51388
  "name": "mark",
@@ -134,7 +134,10 @@ background-color: var(
134
134
  color-mix(in oklab, var(--_button-tone) 14%, transparent)
135
135
  );
136
136
  border-color: transparent;
137
- color: var(--button-foreground-color, var(--_button-tone));
137
+ color: var(
138
+ --button-foreground-color,
139
+ color-mix(in oklab, var(--_button-tone) 78%, var(--helix-color-foreground))
140
+ );
138
141
  }
139
142
 
140
143
  :host(:not(:disabled)[emphasis="subtle"]) [part="button"]:hover {
@@ -16,12 +16,11 @@ display: grid;
16
16
  font-size: var(--helix-text-xs);
17
17
 
18
18
  font-weight: var(--helix-weight-medium);
19
- gap: var(--helix-space-xs);
20
19
 
21
20
  grid-template-columns:
22
- var(--menu-item-start, var(--helix-size-icon))
21
+ var(--menu-item-start, 0px)
23
22
  minmax(0, 1fr)
24
- var(--helix-size-icon);
23
+ var(--menu-item-end, 0px);
25
24
  min-block-size: var(--helix-size-control-tight);
26
25
 
27
26
  padding-inline: var(--helix-space-sm);
@@ -50,17 +49,39 @@ opacity: 0.5;
50
49
  --icon-size: var(--helix-size-icon-tight);
51
50
 
52
51
  align-items: center;
52
+
53
+ box-sizing: border-box;
53
54
  color: var(--helix-color-foreground-subtle);
54
55
  display: flex;
55
- inline-size: var(--menu-item-start, var(--helix-size-icon));
56
56
  justify-content: center;
57
+ padding-inline-end: var(--helix-space-xs);
57
58
 
58
59
  min-block-size: var(--helix-size-icon);
59
60
  }
60
61
 
62
+ [part="start"] {
63
+ grid-column: 1;
64
+ }
65
+
66
+ [part="item"] > slot:not([name]) {
67
+ display: block;
68
+ grid-column: 2;
69
+
70
+ min-inline-size: 0;
71
+ }
72
+
73
+ [part="mark"] {
74
+ grid-column: 3;
75
+ }
76
+
77
+ [part="start"][data-empty] {
78
+ display: none;
79
+ }
80
+
61
81
  [part="mark"] {
62
82
  block-size: var(--helix-size-icon);
63
83
  inline-size: var(--helix-size-icon);
84
+ justify-self: end;
64
85
  }
65
86
 
66
87
  svg[part="mark"] {
@@ -13,8 +13,9 @@ import type { CSSResultGroup } from 'lit';
13
13
  * @aliases Menu option, Menu row
14
14
  * @documentation https://helix.fusion.dev/components/menu
15
15
  *
16
+ * @cssproperty --menu-item-end - Width of the trailing column, seam included, which holds a tick or the caret into a page.
16
17
  * @cssproperty --menu-item-hover-color - Fill under the pointer.
17
- * @cssproperty --menu-item-start - Width of the leading column, for a row carrying more than a mark.
18
+ * @cssproperty --menu-item-start - Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all.
18
19
  */
19
20
  export declare class HelixMenuItem extends HelixHeadlessMenuItem {
20
21
  static styles: CSSResultGroup;
@@ -9,6 +9,9 @@ display: contents;
9
9
  --helix-size-control: var(--helix-size-control-sm);
10
10
  --helix-size-icon: var(--helix-size-icon-sm);
11
11
 
12
+ --menu-item-start: 0px;
13
+ --menu-item-end: 0px;
14
+
12
15
  max-block-size: var(--menu-max-block-size, var(--floating-available-block-size, none));
13
16
  overflow-y: auto;
14
17
 
@@ -28,6 +31,14 @@ padding-block: var(--helix-space-xs);
28
31
  padding-inline: var(--helix-space-none);
29
32
  }
30
33
 
34
+ :host(:state(start)) [part="surface"] {
35
+ --menu-item-start: calc(var(--helix-size-icon) + var(--helix-space-xs));
36
+ }
37
+
38
+ :host(:state(mark)) [part="surface"] {
39
+ --menu-item-end: calc(var(--helix-size-icon) + var(--helix-space-xs));
40
+ }
41
+
31
42
  [part="surface"][hidden] {
32
43
  display: none;
33
44
  }
@@ -111,8 +111,8 @@ background-color: var(--helix-color-surface-sunken);
111
111
  }
112
112
 
113
113
  [part="column"] [part="option"]:state(selected)::part(label) {
114
- background-color: var(--time-picker-selected-color, var(--helix-color-foreground-muted));
115
- color: var(--helix-color-foreground-on-accent);
114
+ background-color: var(--time-picker-selected-color, var(--helix-color-surface-inverse));
115
+ color: var(--helix-color-foreground-inverse);
116
116
  }
117
117
 
118
118
  [part="column"] [part="option"]::part(item)::after {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix",
3
3
  "description": "Styled component tier. Extends the headless tier with token-driven presentation.",
4
- "version": "0.21.0",
4
+ "version": "0.23.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -46,14 +46,14 @@
46
46
  },
47
47
  "bugs": "https://github.com/project-fusion/fusion/issues",
48
48
  "dependencies": {
49
- "@fusion.dev/helix-core": "0.21.0",
50
- "@fusion.dev/helix-headless": "0.21.0",
51
- "@fusion.dev/helix-styles": "0.21.0"
49
+ "@fusion.dev/helix-core": "0.23.0",
50
+ "@fusion.dev/helix-headless": "0.23.0",
51
+ "@fusion.dev/helix-styles": "0.23.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@custom-elements-manifest/analyzer": "^0.11.0",
55
- "@fusion.dev/helix-cem": "0.21.0",
56
- "@fusion.dev/helix-testing": "0.21.0",
55
+ "@fusion.dev/helix-cem": "0.23.0",
56
+ "@fusion.dev/helix-testing": "0.23.0",
57
57
  "@fusion.dev/scripts": "0.0.0-dev",
58
58
  "@happy-dom/global-registrator": "^20.0.0",
59
59
  "@lit-labs/ssr": "^3.3.0",
package/types/jsx.d.ts CHANGED
@@ -19467,7 +19467,7 @@ export type CustomElements = {
19467
19467
  *
19468
19468
  * - `(default)`: The step: a link, or the text of the current page.
19469
19469
  * - `separator`: Replaces the chevron shown before this item.
19470
- * - `end`: After it, for a count or a mark.
19470
+ * - `end`: After the label and outside the link, so it may be a control: this is where a switcher's menu trigger goes. A count or a mark is equally at home here and is no longer read into the link's accessible name.
19471
19471
  * - `start`: Before the label, for an icon.
19472
19472
  *
19473
19473
  * ## CSS Custom Properties
@@ -26276,8 +26276,9 @@ export type CustomElements = {
26276
26276
  *
26277
26277
  * CSS variables available for styling the component.
26278
26278
  *
26279
+ * - `--menu-item-end`: Width of the trailing column, seam included, which holds a tick or the caret into a page. (default: `undefined`)
26279
26280
  * - `--menu-item-hover-color`: Fill under the pointer. (default: `undefined`)
26280
- * - `--menu-item-start`: Width of the leading column, for a row carrying more than a mark. (default: `undefined`)
26281
+ * - `--menu-item-start`: Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all. (default: `undefined`)
26281
26282
  *
26282
26283
  * ## CSS Parts
26283
26284
  *
@@ -35454,7 +35455,7 @@ export type CustomElementsSolidJs = {
35454
35455
  *
35455
35456
  * - `(default)`: The step: a link, or the text of the current page.
35456
35457
  * - `separator`: Replaces the chevron shown before this item.
35457
- * - `end`: After it, for a count or a mark.
35458
+ * - `end`: After the label and outside the link, so it may be a control: this is where a switcher's menu trigger goes. A count or a mark is equally at home here and is no longer read into the link's accessible name.
35458
35459
  * - `start`: Before the label, for an icon.
35459
35460
  *
35460
35461
  * ## CSS Custom Properties
@@ -42402,8 +42403,9 @@ export type CustomElementsSolidJs = {
42402
42403
  *
42403
42404
  * CSS variables available for styling the component.
42404
42405
  *
42406
+ * - `--menu-item-end`: Width of the trailing column, seam included, which holds a tick or the caret into a page. (default: `undefined`)
42405
42407
  * - `--menu-item-hover-color`: Fill under the pointer. (default: `undefined`)
42406
- * - `--menu-item-start`: Width of the leading column, for a row carrying more than a mark. (default: `undefined`)
42408
+ * - `--menu-item-start`: Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all. (default: `undefined`)
42407
42409
  *
42408
42410
  * ## CSS Parts
42409
42411
  *
@@ -51107,9 +51109,11 @@ export type CustomCssProperties = {
51107
51109
  "--megamenu-size"?: (string) | undefined;
51108
51110
  /** Where the panel starts, measured from the bar above it. */
51109
51111
  "--megamenu-top"?: (string) | undefined;
51112
+ /** Width of the trailing column, seam included, which holds a tick or the caret into a page. */
51113
+ "--menu-item-end"?: (string) | undefined;
51110
51114
  /** Fill under the pointer. */
51111
51115
  "--menu-item-hover-color"?: (string) | undefined;
51112
- /** Width of the leading column, for a row carrying more than a mark. */
51116
+ /** Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all. */
51113
51117
  "--menu-item-start"?: (string) | undefined;
51114
51118
  /** Fill of the surface. */
51115
51119
  "--menu-background-color"?: (string) | undefined;
package/types/vue.d.ts CHANGED
@@ -9865,9 +9865,11 @@ export type CustomCssProperties = {
9865
9865
  "--megamenu-size"?: (string) | undefined;
9866
9866
  /** Where the panel starts, measured from the bar above it. */
9867
9867
  "--megamenu-top"?: (string) | undefined;
9868
+ /** Width of the trailing column, seam included, which holds a tick or the caret into a page. */
9869
+ "--menu-item-end"?: (string) | undefined;
9868
9870
  /** Fill under the pointer. */
9869
9871
  "--menu-item-hover-color"?: (string) | undefined;
9870
- /** Width of the leading column, for a row carrying more than a mark. */
9872
+ /** Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all. */
9871
9873
  "--menu-item-start"?: (string) | undefined;
9872
9874
  /** Fill of the surface. */
9873
9875
  "--menu-background-color"?: (string) | undefined;