@fusion.dev/helix-headless 0.46.0 → 0.47.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.
- package/custom-elements.json +13 -26
- package/dist/data-table/root/data-table-root.d.ts +9 -0
- package/dist/table/cell/table-cell.d.ts +1 -1
- package/dist/table/column/table-column.d.ts +9 -6
- package/dist/table/root/table-root.d.ts +14 -2
- package/dist/table/row/table-row.d.ts +1 -1
- package/dist/tree/item/tree-item.d.ts +23 -10
- package/dist/tree/item/tree-item.js +1 -1
- package/dist/tree/root/tree-root.d.ts +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +162 -46
- package/types/vue.d.ts +35 -13
package/custom-elements.json
CHANGED
|
@@ -24494,7 +24494,7 @@
|
|
|
24494
24494
|
"declarations": [
|
|
24495
24495
|
{
|
|
24496
24496
|
"kind": "class",
|
|
24497
|
-
"description": "**The schema is markup and the data is a property.** Columns are declared as\n`helix-table-column` children, because a schema is small and something a\nreader should see in the HTML; rows are handed over as an array, because a\ntable that draws ten thousand elements cannot window them.\n\n```html\n<helix-data-table .rows=${rows} sort=\"name:asc\" page-size=\"20\">\n <helix-table-column field=\"name\" sortable>Name</helix-table-column>\n <helix-table-column field=\"size\" align=\"end\" sortable .cell=${bytes}>Size</helix-table-column>\n</helix-data-table>\n```\n\n`helix-table` takes rows as markup and is the right component for a table of\ntwelve things a person wrote out.\n\n**Sort and filter apply to the whole set, never the page.** Sorting the drawn\nwindow is correct on the first screen and wrong on every other one.\n\n**The cell values do not server-render.** The headings do, and the row\nelements do, but reading a cell needs the columns, and the columns are markup\nchildren Lit SSR does not hand this element. So a crawler sees a table of the\nright shape with nothing in it. That is the cost of the first paragraph: use\n`helix-table` where the served HTML has to carry the values.\n\n**`selectable` adds a column of checkboxes, keyed on `row-key`.** A row is\nselected by its identity rather than its position, so a selection survives a\nsort, a filter and a page. `selected` is the chosen keys, comma separated, the\nshape Listbox uses for a multiple choice, and like `sort` it is controlled\nwhen set and seeded by `default-selected`. The box in the heading selects every\nrow in the result, across pages, and shows a dash while only some are chosen.\nChoosing one of many, rather than several, is opening a row, and that is a\nlink or a button in a cell rather than a selection.\n\n**A reader can size and order the columns.** `resizable` on a column puts a\nseparator on its edge; `reorderable` on the table puts a grip on each heading\nthat has a `field`, moved by dragging or with the arrow keys. The order lands\nin `order` as fields, and the consumer's own markup is never rewritten: the\ntable assigns the headings to its header in that order instead.\n\n**`csv()` hands back the result as text**: every row the filter lets through,\nin the order on screen, in the columns on screen. Saving it is the page's\nbusiness, the same as any other file.",
|
|
24497
|
+
"description": "**The schema is markup and the data is a property.** Columns are declared as\n`helix-table-column` children, because a schema is small and something a\nreader should see in the HTML; rows are handed over as an array, because a\ntable that draws ten thousand elements cannot window them.\n\n```html\n<helix-data-table .rows=${rows} sort=\"name:asc\" page-size=\"20\">\n <helix-table-column field=\"name\" sortable>Name</helix-table-column>\n <helix-table-column field=\"size\" align=\"end\" sortable .cell=${bytes}>Size</helix-table-column>\n</helix-data-table>\n```\n\n`helix-table` takes rows as markup and is the right component for a table of\ntwelve things a person wrote out.\n\n**Sort and filter apply to the whole set, never the page.** Sorting the drawn\nwindow is correct on the first screen and wrong on every other one.\n\n**The cell values do not server-render.** The headings do, and the row\nelements do, but reading a cell needs the columns, and the columns are markup\nchildren Lit SSR does not hand this element. So a crawler sees a table of the\nright shape with nothing in it. That is the cost of the first paragraph: use\n`helix-table` where the served HTML has to carry the values.\n\n**`selectable` adds a column of checkboxes, keyed on `row-key`.** A row is\nselected by its identity rather than its position, so a selection survives a\nsort, a filter and a page. `selected` is the chosen keys, comma separated, the\nshape Listbox uses for a multiple choice, and like `sort` it is controlled\nwhen set and seeded by `default-selected`. The box in the heading selects every\nrow in the result, across pages, and shows a dash while only some are chosen.\nChoosing one of many, rather than several, is opening a row, and that is a\nlink or a button in a cell rather than a selection.\n\n**A reader can size and order the columns.** `resizable` on a column puts a\nseparator on its edge; `reorderable` on the table puts a grip on each heading\nthat has a `field`, moved by dragging or with the arrow keys. The order lands\nin `order` as fields, and the consumer's own markup is never rewritten: the\ntable assigns the headings to its header in that order instead.\n\n**`csv()` hands back the result as text**: every row the filter lets through,\nin the order on screen, in the columns on screen. Saving it is the page's\nbusiness, the same as any other file.\n\n**There is no `columns` attribute here, and `helix-table` has one.** The\ndifference is what a column is in each: here it is the schema, so a table\nwithout one has nothing to read a row with, and every column is a place to\nwrite a `width`. A `helix-table` holds cells a consumer wrote and can be\nwritten with no column at all, so its `columns` is where such a table is\nsized from. Written on this element the attribute is inert, which is the trap\nworth knowing when moving between the two. What both take is the CSS hook,\n`--data-table-columns` here and `--table-columns` there.",
|
|
24498
24498
|
"name": "HelixHeadlessDataTable",
|
|
24499
24499
|
"cssProperties": [
|
|
24500
24500
|
{
|
|
@@ -85507,7 +85507,7 @@
|
|
|
85507
85507
|
"summary": "One cell of a table.",
|
|
85508
85508
|
"helix": {
|
|
85509
85509
|
"since": "0.1.0",
|
|
85510
|
-
"status": "
|
|
85510
|
+
"status": "stable",
|
|
85511
85511
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
85512
85512
|
"aliases": [
|
|
85513
85513
|
"Cell",
|
|
@@ -85600,7 +85600,7 @@
|
|
|
85600
85600
|
},
|
|
85601
85601
|
{
|
|
85602
85602
|
"kind": "class",
|
|
85603
|
-
"description": "**The column is the source of both its heading and its track.** Add one and\nthe table has another track; remove one and it does not.
|
|
85603
|
+
"description": "**The column is the source of both its heading and its track.** Add one and\nthe table has another track; remove one and it does not. That is what ties\nthe two together, and a table-level track list on its own does not: a list\nthat is accidentally the headings is invalid CSS a grid ignores in silence,\ndrawing the whole table as one column. `helix-table`'s `columns` is dealt out\na track at a time against the columns declared under it, so a heading among\nthe widths costs its own column a width and no more, and a list longer or\nshorter than the columns is trimmed or shared rather than being a second\ncount of them. A column's own `width` wins over the track in its place.\n\n**It is also where every per-column fact goes**, which is the reason\n`helix-data-table` needs no column config object. `field` names the key the\ncell reads, `sortable` says a reader may reorder by it, `align` says which\nedge the values line up against, and `cell` takes a function for anything the\nfield alone cannot express. The schema is markup and the data is a property:\na schema is small, declarative, and something a reader should be able to see\nin the HTML, and data is large and windowed.\n\n**The same element serves both tables**, the markup one and the data one. It\nis identified by a flag rather than by `instanceof`, so a `helix-table-column`\nworks inside either without the two roots sharing anything else.\n\n**It generates no box of its own**, the same as a row: the heading is a grid\nitem of the table, so it lines up with the cells under it rather than sitting\nin a wrapper that has to be kept the same width.\n\n**`hidden` takes the column out of the grid**, its heading and its track\nboth, so the columns after it keep their own widths and every row keeps its\ncells under their headings. `hidden=\"until-found\"` keeps its track, the\nheading being left drawn, as every Helix element leaves one with that value.\n`helix-data-table` draws the cells, so it leaves out the ones under a hidden\ncolumn. A `helix-table`'s cells are markup the consumer wrote, so hide them\nwith the column, as removing a column means removing its cells: a row with a\ncell more than the table has tracks wraps into the next.\n\n**A heading that does something holds a control that does it.** The host is\nthe column header, and a header is not focusable, so a sortable heading is a\n`<button>` inside it: the pattern for a sortable table, and the only way a\nreader on a keyboard reaches the sort at all. A column a reader may resize\ncarries a `separator` on its end edge, moved by dragging it or with the arrow\nkeys, and a column in a table that lets a reader reorder its columns carries\na grip the table moves.",
|
|
85604
85604
|
"name": "HelixHeadlessTableColumn",
|
|
85605
85605
|
"cssParts": [
|
|
85606
85606
|
{
|
|
@@ -86310,7 +86310,7 @@
|
|
|
86310
86310
|
"summary": "One column of a table: its heading, how wide it is, and what it reads.",
|
|
86311
86311
|
"helix": {
|
|
86312
86312
|
"since": "0.1.0",
|
|
86313
|
-
"status": "
|
|
86313
|
+
"status": "stable",
|
|
86314
86314
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
86315
86315
|
"aliases": [
|
|
86316
86316
|
"Column header",
|
|
@@ -86409,10 +86409,6 @@
|
|
|
86409
86409
|
"description": "A grid rather than a `<table>`, so every column lines up across rows while\neach row stays a real element that can be styled, hidden, or made\ninteractive. Table layout gives column alignment and takes away almost\neverything else; grid gives both.\n\nThe cost is that the roles have to be declared, since a grid of divs is not a\ntable to anyone reading it. `table`, `row`, `cell`, and `columnheader` are\nall set explicitly, and rows are `display: contents` so their cells become\nitems of the one grid that does the aligning.\n\nThe properties below are written by this component and read by whoever draws\nit. A consumer sets none of them: they carry a number this element computed\nand CSS cannot, which is what lets a stylesheet on this tier draw the thing\nwithout measuring anything itself.",
|
|
86410
86410
|
"name": "HelixHeadlessTable",
|
|
86411
86411
|
"cssProperties": [
|
|
86412
|
-
{
|
|
86413
|
-
"description": "Track list for the columns.",
|
|
86414
|
-
"name": "--table-columns"
|
|
86415
|
-
},
|
|
86416
86412
|
{
|
|
86417
86413
|
"description": "The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set.",
|
|
86418
86414
|
"name": "--table-template"
|
|
@@ -86450,7 +86446,7 @@
|
|
|
86450
86446
|
"text": "string"
|
|
86451
86447
|
},
|
|
86452
86448
|
"default": "''",
|
|
86453
|
-
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.",
|
|
86449
|
+
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.\n\n**It is also the only track list a server can send.** The shim has no tree\nto walk, so a render there knows of no columns and this attribute is the\nwhole answer: a table given one lays its grid out in the first paint, and a\ntable sized only by its columns is one track wide until it upgrades.\n\n**`helix-data-table` has none of this, and should not.** Its columns are\nits schema rather than an option, so there is always a column to write a\n`width` on and a list here would be a second way to say what that says.\nThis table's cells are markup, and a table written as rows of cells with no\n`helix-table-column` in it has nowhere else to be sized from. Both families\ntake the same CSS hook, `--table-columns` and `--data-table-columns`, which\nwins over whichever list the element worked out.",
|
|
86454
86450
|
"attribute": "columns"
|
|
86455
86451
|
},
|
|
86456
86452
|
{
|
|
@@ -87025,7 +87021,7 @@
|
|
|
87025
87021
|
"text": "string"
|
|
87026
87022
|
},
|
|
87027
87023
|
"default": "''",
|
|
87028
|
-
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.",
|
|
87024
|
+
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.\n\n**It is also the only track list a server can send.** The shim has no tree\nto walk, so a render there knows of no columns and this attribute is the\nwhole answer: a table given one lays its grid out in the first paint, and a\ntable sized only by its columns is one track wide until it upgrades.\n\n**`helix-data-table` has none of this, and should not.** Its columns are\nits schema rather than an option, so there is always a column to write a\n`width` on and a list here would be a second way to say what that says.\nThis table's cells are markup, and a table written as rows of cells with no\n`helix-table-column` in it has nowhere else to be sized from. Both families\ntake the same CSS hook, `--table-columns` and `--data-table-columns`, which\nwins over whichever list the element worked out.",
|
|
87029
87025
|
"fieldName": "columns"
|
|
87030
87026
|
},
|
|
87031
87027
|
{
|
|
@@ -87091,7 +87087,7 @@
|
|
|
87091
87087
|
"helix": {
|
|
87092
87088
|
"category": "data",
|
|
87093
87089
|
"since": "0.1.0",
|
|
87094
|
-
"status": "
|
|
87090
|
+
"status": "stable",
|
|
87095
87091
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
87096
87092
|
"aliases": [
|
|
87097
87093
|
"DataTable",
|
|
@@ -87500,7 +87496,7 @@
|
|
|
87500
87496
|
"summary": "One row of a table.",
|
|
87501
87497
|
"helix": {
|
|
87502
87498
|
"since": "0.1.0",
|
|
87503
|
-
"status": "
|
|
87499
|
+
"status": "stable",
|
|
87504
87500
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
87505
87501
|
"aliases": [
|
|
87506
87502
|
"Row",
|
|
@@ -102191,8 +102187,7 @@
|
|
|
102191
102187
|
"type": {
|
|
102192
102188
|
"text": "number | undefined"
|
|
102193
102189
|
},
|
|
102194
|
-
"description": "Depth from the root,
|
|
102195
|
-
"attribute": "level"
|
|
102190
|
+
"description": "Depth from the root, counted by the tree so indentation needs no CSS nesting.\n\n**Read rather than written, and no attribute at all.** The tree counts the\nitems a row sits inside and assigns this on every sync, so a value declared\nhere is overwritten before the first paint: measured at `level=\"2\"` on three\nrows of a flat list, all three back to 1 with `--tree-level: 1` on every\nrow. It carried an attribute and a shipped example setting it for as long as\nboth existed, which is a depth a consumer could state and nothing would\nhonor. Depth in this tree is where a row is, not what it claims: a branch's\nchildren go in its `children` slot, and that nesting is also what decides\nwhich rows a shut branch hides and which row the outward arrow moves to.\n\nNot reflected either. The tree assigns this after it upgrades, so an\nattribute here would be a change to markup the consumer rendered and\nhydration would report it. The indent it drives is written onto the row\ninstead, inside the shadow root, which is not part of the tree React\nhydrates."
|
|
102196
102191
|
},
|
|
102197
102192
|
{
|
|
102198
102193
|
"kind": "field",
|
|
@@ -102211,7 +102206,7 @@
|
|
|
102211
102206
|
"text": "boolean"
|
|
102212
102207
|
},
|
|
102213
102208
|
"default": "false",
|
|
102214
|
-
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level`
|
|
102209
|
+
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level` above gives in full: the tree assigns\nthis after it upgrades, so the attribute would be a change to markup the\nconsumer rendered and hydration would report it. Mirroring to\n`data-selected` on the host instead is the same fault under another name.\n\nThe stylesheet reads it from the row inside this shadow root, because the\nrow is not part of the tree React hydrates.",
|
|
102215
102210
|
"attribute": "selected"
|
|
102216
102211
|
},
|
|
102217
102212
|
{
|
|
@@ -102801,14 +102796,6 @@
|
|
|
102801
102796
|
"description": "Where this node goes, which makes its row a real link.\n\nUnset by default, and unreflected: a tree of choosable nodes is not a tree\nof links, and an empty `href` written onto every row would be a link to the\ncurrent page on every item a consumer never asked to be one.",
|
|
102802
102797
|
"fieldName": "href"
|
|
102803
102798
|
},
|
|
102804
|
-
{
|
|
102805
|
-
"name": "level",
|
|
102806
|
-
"type": {
|
|
102807
|
-
"text": "number | undefined"
|
|
102808
|
-
},
|
|
102809
|
-
"description": "Depth from the root, set by the tree so indentation needs no CSS nesting.\n\nNot reflected. The tree assigns this after it upgrades, so an attribute\nhere would be a change to markup the consumer rendered and hydration would\nreport it. The indent it drives is written onto the row instead, inside the\nshadow root, which is not part of the tree React hydrates.",
|
|
102810
|
-
"fieldName": "level"
|
|
102811
|
-
},
|
|
102812
102799
|
{
|
|
102813
102800
|
"name": "rel",
|
|
102814
102801
|
"type": {
|
|
@@ -102824,7 +102811,7 @@
|
|
|
102824
102811
|
"text": "boolean"
|
|
102825
102812
|
},
|
|
102826
102813
|
"default": "false",
|
|
102827
|
-
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level`
|
|
102814
|
+
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level` above gives in full: the tree assigns\nthis after it upgrades, so the attribute would be a change to markup the\nconsumer rendered and hydration would report it. Mirroring to\n`data-selected` on the host instead is the same fault under another name.\n\nThe stylesheet reads it from the row inside this shadow root, because the\nrow is not part of the tree React hydrates.",
|
|
102828
102815
|
"fieldName": "selected"
|
|
102829
102816
|
},
|
|
102830
102817
|
{
|
|
@@ -102902,7 +102889,7 @@
|
|
|
102902
102889
|
"summary": "One node in a tree.",
|
|
102903
102890
|
"helix": {
|
|
102904
102891
|
"since": "0.1.0",
|
|
102905
|
-
"status": "
|
|
102892
|
+
"status": "stable",
|
|
102906
102893
|
"documentation": "https://fusion.dev/helix/components/tree",
|
|
102907
102894
|
"aliases": [
|
|
102908
102895
|
"TreeNode",
|
|
@@ -103795,7 +103782,7 @@
|
|
|
103795
103782
|
"helix": {
|
|
103796
103783
|
"category": "navigation",
|
|
103797
103784
|
"since": "0.1.0",
|
|
103798
|
-
"status": "
|
|
103785
|
+
"status": "stable",
|
|
103799
103786
|
"documentation": "https://fusion.dev/helix/components/tree",
|
|
103800
103787
|
"aliases": [
|
|
103801
103788
|
"FileTree",
|
|
@@ -52,6 +52,15 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
52
52
|
* in the order on screen, in the columns on screen. Saving it is the page's
|
|
53
53
|
* business, the same as any other file.
|
|
54
54
|
*
|
|
55
|
+
* **There is no `columns` attribute here, and `helix-table` has one.** The
|
|
56
|
+
* difference is what a column is in each: here it is the schema, so a table
|
|
57
|
+
* without one has nothing to read a row with, and every column is a place to
|
|
58
|
+
* write a `width`. A `helix-table` holds cells a consumer wrote and can be
|
|
59
|
+
* written with no column at all, so its `columns` is where such a table is
|
|
60
|
+
* sized from. Written on this element the attribute is inert, which is the trap
|
|
61
|
+
* worth knowing when moving between the two. What both take is the CSS hook,
|
|
62
|
+
* `--data-table-columns` here and `--table-columns` there.
|
|
63
|
+
*
|
|
55
64
|
* @since 0.1.0
|
|
56
65
|
* @status stable
|
|
57
66
|
* @category data
|
|
@@ -35,11 +35,14 @@ export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
|
35
35
|
*
|
|
36
36
|
* @description
|
|
37
37
|
* **The column is the source of both its heading and its track.** Add one and
|
|
38
|
-
* the table has another track; remove one and it does not.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
38
|
+
* the table has another track; remove one and it does not. That is what ties
|
|
39
|
+
* the two together, and a table-level track list on its own does not: a list
|
|
40
|
+
* that is accidentally the headings is invalid CSS a grid ignores in silence,
|
|
41
|
+
* drawing the whole table as one column. `helix-table`'s `columns` is dealt out
|
|
42
|
+
* a track at a time against the columns declared under it, so a heading among
|
|
43
|
+
* the widths costs its own column a width and no more, and a list longer or
|
|
44
|
+
* shorter than the columns is trimmed or shared rather than being a second
|
|
45
|
+
* count of them. A column's own `width` wins over the track in its place.
|
|
43
46
|
*
|
|
44
47
|
* **It is also where every per-column fact goes**, which is the reason
|
|
45
48
|
* `helix-data-table` needs no column config object. `field` names the key the
|
|
@@ -75,7 +78,7 @@ export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
|
75
78
|
* a grip the table moves.
|
|
76
79
|
*
|
|
77
80
|
* @since 0.1.0
|
|
78
|
-
* @status
|
|
81
|
+
* @status stable
|
|
79
82
|
* @aliases Column header, Th
|
|
80
83
|
* @documentation https://fusion.dev/helix/components/table
|
|
81
84
|
*
|
|
@@ -22,7 +22,7 @@ declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.
|
|
|
22
22
|
* without measuring anything itself.
|
|
23
23
|
*
|
|
24
24
|
* @since 0.1.0
|
|
25
|
-
* @status
|
|
25
|
+
* @status stable
|
|
26
26
|
* @category data
|
|
27
27
|
* @aliases DataTable, Grid table
|
|
28
28
|
* @documentation https://fusion.dev/helix/components/table
|
|
@@ -34,7 +34,6 @@ declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.
|
|
|
34
34
|
* @csspart loading - Shown while the rows are still on their way.
|
|
35
35
|
* @csspart table - The grid.
|
|
36
36
|
*
|
|
37
|
-
* @cssproperty --table-columns - Track list for the columns.
|
|
38
37
|
* @cssproperty --table-template - The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set.
|
|
39
38
|
*/
|
|
40
39
|
export declare class HelixHeadlessTable extends HelixHeadlessTable_base {
|
|
@@ -57,6 +56,19 @@ export declare class HelixHeadlessTable extends HelixHeadlessTable_base {
|
|
|
57
56
|
* were this list to win, the drag would move the separator and leave the
|
|
58
57
|
* track where the list put it. This is the table's default for its columns,
|
|
59
58
|
* and each column may say otherwise.
|
|
59
|
+
*
|
|
60
|
+
* **It is also the only track list a server can send.** The shim has no tree
|
|
61
|
+
* to walk, so a render there knows of no columns and this attribute is the
|
|
62
|
+
* whole answer: a table given one lays its grid out in the first paint, and a
|
|
63
|
+
* table sized only by its columns is one track wide until it upgrades.
|
|
64
|
+
*
|
|
65
|
+
* **`helix-data-table` has none of this, and should not.** Its columns are
|
|
66
|
+
* its schema rather than an option, so there is always a column to write a
|
|
67
|
+
* `width` on and a list here would be a second way to say what that says.
|
|
68
|
+
* This table's cells are markup, and a table written as rows of cells with no
|
|
69
|
+
* `helix-table-column` in it has nowhere else to be sized from. Both families
|
|
70
|
+
* take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
71
|
+
* wins over whichever list the element worked out.
|
|
60
72
|
*/
|
|
61
73
|
columns: string;
|
|
62
74
|
/**
|
|
@@ -10,7 +10,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
10
10
|
* cells are laid out by the table algorithm.
|
|
11
11
|
*
|
|
12
12
|
* @since 0.1.0
|
|
13
|
-
* @status
|
|
13
|
+
* @status stable
|
|
14
14
|
* @aliases Row, TableRow
|
|
15
15
|
* @documentation https://fusion.dev/helix/components/table
|
|
16
16
|
*
|
|
@@ -24,7 +24,7 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
|
|
|
24
24
|
* click, no status bar. Given an `href` the row *is* an `<a>`.
|
|
25
25
|
*
|
|
26
26
|
* @since 0.1.0
|
|
27
|
-
* @status
|
|
27
|
+
* @status stable
|
|
28
28
|
* @aliases TreeNode, Branch, Leaf
|
|
29
29
|
* @documentation https://fusion.dev/helix/components/tree
|
|
30
30
|
*
|
|
@@ -59,12 +59,23 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
59
59
|
*/
|
|
60
60
|
href: string;
|
|
61
61
|
/**
|
|
62
|
-
* Depth from the root,
|
|
62
|
+
* Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
63
63
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
64
|
+
* **Read rather than written, and no attribute at all.** The tree counts the
|
|
65
|
+
* items a row sits inside and assigns this on every sync, so a value declared
|
|
66
|
+
* here is overwritten before the first paint: measured at `level="2"` on three
|
|
67
|
+
* rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
68
|
+
* row. It carried an attribute and a shipped example setting it for as long as
|
|
69
|
+
* both existed, which is a depth a consumer could state and nothing would
|
|
70
|
+
* honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
71
|
+
* children go in its `children` slot, and that nesting is also what decides
|
|
72
|
+
* which rows a shut branch hides and which row the outward arrow moves to.
|
|
73
|
+
*
|
|
74
|
+
* Not reflected either. The tree assigns this after it upgrades, so an
|
|
75
|
+
* attribute here would be a change to markup the consumer rendered and
|
|
76
|
+
* hydration would report it. The indent it drives is written onto the row
|
|
77
|
+
* instead, inside the shadow root, which is not part of the tree React
|
|
78
|
+
* hydrates.
|
|
68
79
|
*/
|
|
69
80
|
level?: number;
|
|
70
81
|
/**
|
|
@@ -79,7 +90,7 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
79
90
|
/**
|
|
80
91
|
* Whether this item is the current one.
|
|
81
92
|
*
|
|
82
|
-
* Not reflected, for the reason `level`
|
|
93
|
+
* Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
83
94
|
* this after it upgrades, so the attribute would be a change to markup the
|
|
84
95
|
* consumer rendered and hydration would report it. Mirroring to
|
|
85
96
|
* `data-selected` on the host instead is the same fault under another name.
|
|
@@ -111,9 +122,11 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
111
122
|
private branch;
|
|
112
123
|
protected firstUpdated(changed: PropertyValues): void;
|
|
113
124
|
/**
|
|
114
|
-
* @internal
|
|
115
|
-
*
|
|
116
|
-
*
|
|
125
|
+
* @internal Whether this row holds children, read by the tree, which moves
|
|
126
|
+
* and opens differently for a branch. Public rather than protected because
|
|
127
|
+
* the tree is another element and there is no other way across; not a
|
|
128
|
+
* consumer's to read, and there is nothing to set: it is what the `children`
|
|
129
|
+
* slot was given, which is the markup they already wrote.
|
|
117
130
|
*/
|
|
118
131
|
get isBranch(): boolean;
|
|
119
132
|
/**
|
|
@@ -148,7 +148,7 @@ __decorate([
|
|
|
148
148
|
property()
|
|
149
149
|
], HelixHeadlessTreeItem.prototype, "href", void 0);
|
|
150
150
|
__decorate([
|
|
151
|
-
property({ attribute:
|
|
151
|
+
property({ attribute: false, type: Number })
|
|
152
152
|
], HelixHeadlessTreeItem.prototype, "level", void 0);
|
|
153
153
|
__decorate([
|
|
154
154
|
property()
|
|
@@ -14,7 +14,7 @@ declare const HelixHeadlessTree_base: (new (...args: any[]) => import("@fusion.d
|
|
|
14
14
|
* does not learn about the styled one.
|
|
15
15
|
*
|
|
16
16
|
* @since 0.1.0
|
|
17
|
-
* @status
|
|
17
|
+
* @status stable
|
|
18
18
|
* @category navigation
|
|
19
19
|
* @aliases FileTree, Navigation tree
|
|
20
20
|
* @documentation https://fusion.dev/helix/components/tree
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-headless",
|
|
3
3
|
"description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.47.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.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.47.0",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.47.0",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.47.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.47.0",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -13809,7 +13809,20 @@ on the column it sizes, which is the more particular statement, and it is
|
|
|
13809
13809
|
where a resize lands: a reader dragging a column's edge writes `width`, so
|
|
13810
13810
|
were this list to win, the drag would move the separator and leave the
|
|
13811
13811
|
track where the list put it. This is the table's default for its columns,
|
|
13812
|
-
and each column may say otherwise.
|
|
13812
|
+
and each column may say otherwise.
|
|
13813
|
+
|
|
13814
|
+
**It is also the only track list a server can send.** The shim has no tree
|
|
13815
|
+
to walk, so a render there knows of no columns and this attribute is the
|
|
13816
|
+
whole answer: a table given one lays its grid out in the first paint, and a
|
|
13817
|
+
table sized only by its columns is one track wide until it upgrades.
|
|
13818
|
+
|
|
13819
|
+
**`helix-data-table` has none of this, and should not.** Its columns are
|
|
13820
|
+
its schema rather than an option, so there is always a column to write a
|
|
13821
|
+
`width` on and a list here would be a second way to say what that says.
|
|
13822
|
+
This table's cells are markup, and a table written as rows of cells with no
|
|
13823
|
+
`helix-table-column` in it has nowhere else to be sized from. Both families
|
|
13824
|
+
take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
13825
|
+
wins over whichever list the element worked out. */
|
|
13813
13826
|
columns?: (HelixHeadlessTable["columns"]) | undefined;
|
|
13814
13827
|
/** Accessible name for the table. */
|
|
13815
13828
|
label?: (HelixHeadlessTable["label"]) | undefined;
|
|
@@ -13847,7 +13860,20 @@ on the column it sizes, which is the more particular statement, and it is
|
|
|
13847
13860
|
where a resize lands: a reader dragging a column's edge writes `width`, so
|
|
13848
13861
|
were this list to win, the drag would move the separator and leave the
|
|
13849
13862
|
track where the list put it. This is the table's default for its columns,
|
|
13850
|
-
and each column may say otherwise.
|
|
13863
|
+
and each column may say otherwise.
|
|
13864
|
+
|
|
13865
|
+
**It is also the only track list a server can send.** The shim has no tree
|
|
13866
|
+
to walk, so a render there knows of no columns and this attribute is the
|
|
13867
|
+
whole answer: a table given one lays its grid out in the first paint, and a
|
|
13868
|
+
table sized only by its columns is one track wide until it upgrades.
|
|
13869
|
+
|
|
13870
|
+
**`helix-data-table` has none of this, and should not.** Its columns are
|
|
13871
|
+
its schema rather than an option, so there is always a column to write a
|
|
13872
|
+
`width` on and a list here would be a second way to say what that says.
|
|
13873
|
+
This table's cells are markup, and a table written as rows of cells with no
|
|
13874
|
+
`helix-table-column` in it has nowhere else to be sized from. Both families
|
|
13875
|
+
take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
13876
|
+
wins over whichever list the element worked out. */
|
|
13851
13877
|
"prop:columns"?: (HelixHeadlessTable["columns"]) | undefined;
|
|
13852
13878
|
/** Accessible name for the table. */
|
|
13853
13879
|
"prop:label"?: (HelixHeadlessTable["label"]) | undefined;
|
|
@@ -16189,13 +16215,6 @@ Unset by default, and unreflected: a tree of choosable nodes is not a tree
|
|
|
16189
16215
|
of links, and an empty `href` written onto every row would be a link to the
|
|
16190
16216
|
current page on every item a consumer never asked to be one. */
|
|
16191
16217
|
href?: (HelixHeadlessTreeItem["href"]) | undefined;
|
|
16192
|
-
/** Depth from the root, set by the tree so indentation needs no CSS nesting.
|
|
16193
|
-
|
|
16194
|
-
Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
16195
|
-
here would be a change to markup the consumer rendered and hydration would
|
|
16196
|
-
report it. The indent it drives is written onto the row instead, inside the
|
|
16197
|
-
shadow root, which is not part of the tree React hydrates. */
|
|
16198
|
-
level?: (HelixHeadlessTreeItem["level"]) | undefined;
|
|
16199
16218
|
/** What the link declares about where it goes.
|
|
16200
16219
|
|
|
16201
16220
|
Set by the consumer rather than derived from `target`: `noreferrer` is a
|
|
@@ -16205,7 +16224,7 @@ this library supports implies it for `target="_blank"` already. */
|
|
|
16205
16224
|
rel?: (HelixHeadlessTreeItem["rel"]) | undefined;
|
|
16206
16225
|
/** Whether this item is the current one.
|
|
16207
16226
|
|
|
16208
|
-
Not reflected, for the reason `level`
|
|
16227
|
+
Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
16209
16228
|
this after it upgrades, so the attribute would be a change to markup the
|
|
16210
16229
|
consumer rendered and hydration would report it. Mirroring to
|
|
16211
16230
|
`data-selected` on the host instead is the same fault under another name.
|
|
@@ -16234,6 +16253,24 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
16234
16253
|
"default-open"?: (HelixHeadlessTreeItem["defaultOpen"]) | undefined;
|
|
16235
16254
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
16236
16255
|
defaultOpen?: (HelixHeadlessTreeItem["defaultOpen"]) | undefined;
|
|
16256
|
+
/** Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
16257
|
+
|
|
16258
|
+
**Read rather than written, and no attribute at all.** The tree counts the
|
|
16259
|
+
items a row sits inside and assigns this on every sync, so a value declared
|
|
16260
|
+
here is overwritten before the first paint: measured at `level="2"` on three
|
|
16261
|
+
rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
16262
|
+
row. It carried an attribute and a shipped example setting it for as long as
|
|
16263
|
+
both existed, which is a depth a consumer could state and nothing would
|
|
16264
|
+
honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
16265
|
+
children go in its `children` slot, and that nesting is also what decides
|
|
16266
|
+
which rows a shut branch hides and which row the outward arrow moves to.
|
|
16267
|
+
|
|
16268
|
+
Not reflected either. The tree assigns this after it upgrades, so an
|
|
16269
|
+
attribute here would be a change to markup the consumer rendered and
|
|
16270
|
+
hydration would report it. The indent it drives is written onto the row
|
|
16271
|
+
instead, inside the shadow root, which is not part of the tree React
|
|
16272
|
+
hydrates. */
|
|
16273
|
+
level?: (HelixHeadlessTreeItem["level"]) | undefined;
|
|
16237
16274
|
/** Whether this item holds the tree's single tab stop. */
|
|
16238
16275
|
focusable?: (HelixHeadlessTreeItem["focusable"]) | undefined;
|
|
16239
16276
|
|
|
@@ -16258,13 +16295,6 @@ Unset by default, and unreflected: a tree of choosable nodes is not a tree
|
|
|
16258
16295
|
of links, and an empty `href` written onto every row would be a link to the
|
|
16259
16296
|
current page on every item a consumer never asked to be one. */
|
|
16260
16297
|
"prop:href"?: (HelixHeadlessTreeItem["href"]) | undefined;
|
|
16261
|
-
/** Depth from the root, set by the tree so indentation needs no CSS nesting.
|
|
16262
|
-
|
|
16263
|
-
Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
16264
|
-
here would be a change to markup the consumer rendered and hydration would
|
|
16265
|
-
report it. The indent it drives is written onto the row instead, inside the
|
|
16266
|
-
shadow root, which is not part of the tree React hydrates. */
|
|
16267
|
-
"prop:level"?: (HelixHeadlessTreeItem["level"]) | undefined;
|
|
16268
16298
|
/** What the link declares about where it goes.
|
|
16269
16299
|
|
|
16270
16300
|
Set by the consumer rather than derived from `target`: `noreferrer` is a
|
|
@@ -16274,7 +16304,7 @@ this library supports implies it for `target="_blank"` already. */
|
|
|
16274
16304
|
"prop:rel"?: (HelixHeadlessTreeItem["rel"]) | undefined;
|
|
16275
16305
|
/** Whether this item is the current one.
|
|
16276
16306
|
|
|
16277
|
-
Not reflected, for the reason `level`
|
|
16307
|
+
Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
16278
16308
|
this after it upgrades, so the attribute would be a change to markup the
|
|
16279
16309
|
consumer rendered and hydration would report it. Mirroring to
|
|
16280
16310
|
`data-selected` on the host instead is the same fault under another name.
|
|
@@ -16303,6 +16333,24 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
16303
16333
|
"bool:default-open"?: (HelixHeadlessTreeItem["defaultOpen"]) | undefined;
|
|
16304
16334
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
16305
16335
|
"prop:defaultOpen"?: (HelixHeadlessTreeItem["defaultOpen"]) | undefined;
|
|
16336
|
+
/** Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
16337
|
+
|
|
16338
|
+
**Read rather than written, and no attribute at all.** The tree counts the
|
|
16339
|
+
items a row sits inside and assigns this on every sync, so a value declared
|
|
16340
|
+
here is overwritten before the first paint: measured at `level="2"` on three
|
|
16341
|
+
rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
16342
|
+
row. It carried an attribute and a shipped example setting it for as long as
|
|
16343
|
+
both existed, which is a depth a consumer could state and nothing would
|
|
16344
|
+
honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
16345
|
+
children go in its `children` slot, and that nesting is also what decides
|
|
16346
|
+
which rows a shut branch hides and which row the outward arrow moves to.
|
|
16347
|
+
|
|
16348
|
+
Not reflected either. The tree assigns this after it upgrades, so an
|
|
16349
|
+
attribute here would be a change to markup the consumer rendered and
|
|
16350
|
+
hydration would report it. The indent it drives is written onto the row
|
|
16351
|
+
instead, inside the shadow root, which is not part of the tree React
|
|
16352
|
+
hydrates. */
|
|
16353
|
+
"prop:level"?: (HelixHeadlessTreeItem["level"]) | undefined;
|
|
16306
16354
|
/** Whether this item holds the tree's single tab stop. */
|
|
16307
16355
|
"prop:focusable"?: (HelixHeadlessTreeItem["focusable"]) | undefined;
|
|
16308
16356
|
/** Fired before a branch closes, and cancelable. */
|
|
@@ -21393,6 +21441,15 @@ export type CustomElements = {
|
|
|
21393
21441
|
* in the order on screen, in the columns on screen. Saving it is the page's
|
|
21394
21442
|
* business, the same as any other file.
|
|
21395
21443
|
*
|
|
21444
|
+
* **There is no `columns` attribute here, and `helix-table` has one.** The
|
|
21445
|
+
* difference is what a column is in each: here it is the schema, so a table
|
|
21446
|
+
* without one has nothing to read a row with, and every column is a place to
|
|
21447
|
+
* write a `width`. A `helix-table` holds cells a consumer wrote and can be
|
|
21448
|
+
* written with no column at all, so its `columns` is where such a table is
|
|
21449
|
+
* sized from. Written on this element the attribute is inert, which is the trap
|
|
21450
|
+
* worth knowing when moving between the two. What both take is the CSS hook,
|
|
21451
|
+
* `--data-table-columns` here and `--table-columns` there.
|
|
21452
|
+
*
|
|
21396
21453
|
* ## Attributes & Properties
|
|
21397
21454
|
*
|
|
21398
21455
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -31339,11 +31396,14 @@ export type CustomElements = {
|
|
|
31339
31396
|
|
|
31340
31397
|
/**
|
|
31341
31398
|
* **The column is the source of both its heading and its track.** Add one and
|
|
31342
|
-
* the table has another track; remove one and it does not.
|
|
31343
|
-
*
|
|
31344
|
-
*
|
|
31345
|
-
*
|
|
31346
|
-
*
|
|
31399
|
+
* the table has another track; remove one and it does not. That is what ties
|
|
31400
|
+
* the two together, and a table-level track list on its own does not: a list
|
|
31401
|
+
* that is accidentally the headings is invalid CSS a grid ignores in silence,
|
|
31402
|
+
* drawing the whole table as one column. `helix-table`'s `columns` is dealt out
|
|
31403
|
+
* a track at a time against the columns declared under it, so a heading among
|
|
31404
|
+
* the widths costs its own column a width and no more, and a list longer or
|
|
31405
|
+
* shorter than the columns is trimmed or shared rather than being a second
|
|
31406
|
+
* count of them. A column's own `width` wins over the track in its place.
|
|
31347
31407
|
*
|
|
31348
31408
|
* **It is also where every per-column fact goes**, which is the reason
|
|
31349
31409
|
* `helix-data-table` needs no column config object. `field` names the key the
|
|
@@ -31577,6 +31637,19 @@ export type CustomElements = {
|
|
|
31577
31637
|
* were this list to win, the drag would move the separator and leave the
|
|
31578
31638
|
* track where the list put it. This is the table's default for its columns,
|
|
31579
31639
|
* and each column may say otherwise.
|
|
31640
|
+
*
|
|
31641
|
+
* **It is also the only track list a server can send.** The shim has no tree
|
|
31642
|
+
* to walk, so a render there knows of no columns and this attribute is the
|
|
31643
|
+
* whole answer: a table given one lays its grid out in the first paint, and a
|
|
31644
|
+
* table sized only by its columns is one track wide until it upgrades.
|
|
31645
|
+
*
|
|
31646
|
+
* **`helix-data-table` has none of this, and should not.** Its columns are
|
|
31647
|
+
* its schema rather than an option, so there is always a column to write a
|
|
31648
|
+
* `width` on and a list here would be a second way to say what that says.
|
|
31649
|
+
* This table's cells are markup, and a table written as rows of cells with no
|
|
31650
|
+
* `helix-table-column` in it has nowhere else to be sized from. Both families
|
|
31651
|
+
* take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
31652
|
+
* wins over whichever list the element worked out.
|
|
31580
31653
|
* - `label`: Accessible name for the table.
|
|
31581
31654
|
* - `empty-text`/`emptyText`: What is said where there are none, and none are coming.
|
|
31582
31655
|
* - `loading`: Whether the rows are still on their way.
|
|
@@ -31617,7 +31690,6 @@ export type CustomElements = {
|
|
|
31617
31690
|
*
|
|
31618
31691
|
* CSS variables available for styling the component.
|
|
31619
31692
|
*
|
|
31620
|
-
* - `--table-columns`: Track list for the columns. (default: `undefined`)
|
|
31621
31693
|
* - `--table-template`: The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set. (default: `undefined`)
|
|
31622
31694
|
*
|
|
31623
31695
|
* ## CSS Parts
|
|
@@ -33987,12 +34059,6 @@ export type CustomElements = {
|
|
|
33987
34059
|
* Unset by default, and unreflected: a tree of choosable nodes is not a tree
|
|
33988
34060
|
* of links, and an empty `href` written onto every row would be a link to the
|
|
33989
34061
|
* current page on every item a consumer never asked to be one.
|
|
33990
|
-
* - `level`: Depth from the root, set by the tree so indentation needs no CSS nesting.
|
|
33991
|
-
*
|
|
33992
|
-
* Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
33993
|
-
* here would be a change to markup the consumer rendered and hydration would
|
|
33994
|
-
* report it. The indent it drives is written onto the row instead, inside the
|
|
33995
|
-
* shadow root, which is not part of the tree React hydrates.
|
|
33996
34062
|
* - `rel`: What the link declares about where it goes.
|
|
33997
34063
|
*
|
|
33998
34064
|
* Set by the consumer rather than derived from `target`: `noreferrer` is a
|
|
@@ -34001,7 +34067,7 @@ export type CustomElements = {
|
|
|
34001
34067
|
* this library supports implies it for `target="_blank"` already.
|
|
34002
34068
|
* - `selected`: Whether this item is the current one.
|
|
34003
34069
|
*
|
|
34004
|
-
* Not reflected, for the reason `level`
|
|
34070
|
+
* Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
34005
34071
|
* this after it upgrades, so the attribute would be a change to markup the
|
|
34006
34072
|
* consumer rendered and hydration would report it. Mirroring to
|
|
34007
34073
|
* `data-selected` on the host instead is the same fault under another name.
|
|
@@ -34023,6 +34089,23 @@ export type CustomElements = {
|
|
|
34023
34089
|
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
34024
34090
|
* the resolved state for stylesheets, which is what the mirror is for.
|
|
34025
34091
|
* - `default-open`/`defaultOpen`: Initial open state for uncontrolled use, where nothing declared one.
|
|
34092
|
+
* - `level`: Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
34093
|
+
*
|
|
34094
|
+
* **Read rather than written, and no attribute at all.** The tree counts the
|
|
34095
|
+
* items a row sits inside and assigns this on every sync, so a value declared
|
|
34096
|
+
* here is overwritten before the first paint: measured at `level="2"` on three
|
|
34097
|
+
* rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
34098
|
+
* row. It carried an attribute and a shipped example setting it for as long as
|
|
34099
|
+
* both existed, which is a depth a consumer could state and nothing would
|
|
34100
|
+
* honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
34101
|
+
* children go in its `children` slot, and that nesting is also what decides
|
|
34102
|
+
* which rows a shut branch hides and which row the outward arrow moves to.
|
|
34103
|
+
*
|
|
34104
|
+
* Not reflected either. The tree assigns this after it upgrades, so an
|
|
34105
|
+
* attribute here would be a change to markup the consumer rendered and
|
|
34106
|
+
* hydration would report it. The indent it drives is written onto the row
|
|
34107
|
+
* instead, inside the shadow root, which is not part of the tree React
|
|
34108
|
+
* hydrates. (property only)
|
|
34026
34109
|
* - `focusable`: Whether this item holds the tree's single tab stop. (property only)
|
|
34027
34110
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
34028
34111
|
*
|
|
@@ -39162,6 +39245,15 @@ export type CustomElementsSolidJs = {
|
|
|
39162
39245
|
* in the order on screen, in the columns on screen. Saving it is the page's
|
|
39163
39246
|
* business, the same as any other file.
|
|
39164
39247
|
*
|
|
39248
|
+
* **There is no `columns` attribute here, and `helix-table` has one.** The
|
|
39249
|
+
* difference is what a column is in each: here it is the schema, so a table
|
|
39250
|
+
* without one has nothing to read a row with, and every column is a place to
|
|
39251
|
+
* write a `width`. A `helix-table` holds cells a consumer wrote and can be
|
|
39252
|
+
* written with no column at all, so its `columns` is where such a table is
|
|
39253
|
+
* sized from. Written on this element the attribute is inert, which is the trap
|
|
39254
|
+
* worth knowing when moving between the two. What both take is the CSS hook,
|
|
39255
|
+
* `--data-table-columns` here and `--table-columns` there.
|
|
39256
|
+
*
|
|
39165
39257
|
* ## Attributes & Properties
|
|
39166
39258
|
*
|
|
39167
39259
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -49269,11 +49361,14 @@ export type CustomElementsSolidJs = {
|
|
|
49269
49361
|
|
|
49270
49362
|
/**
|
|
49271
49363
|
* **The column is the source of both its heading and its track.** Add one and
|
|
49272
|
-
* the table has another track; remove one and it does not.
|
|
49273
|
-
*
|
|
49274
|
-
*
|
|
49275
|
-
*
|
|
49276
|
-
*
|
|
49364
|
+
* the table has another track; remove one and it does not. That is what ties
|
|
49365
|
+
* the two together, and a table-level track list on its own does not: a list
|
|
49366
|
+
* that is accidentally the headings is invalid CSS a grid ignores in silence,
|
|
49367
|
+
* drawing the whole table as one column. `helix-table`'s `columns` is dealt out
|
|
49368
|
+
* a track at a time against the columns declared under it, so a heading among
|
|
49369
|
+
* the widths costs its own column a width and no more, and a list longer or
|
|
49370
|
+
* shorter than the columns is trimmed or shared rather than being a second
|
|
49371
|
+
* count of them. A column's own `width` wins over the track in its place.
|
|
49277
49372
|
*
|
|
49278
49373
|
* **It is also where every per-column fact goes**, which is the reason
|
|
49279
49374
|
* `helix-data-table` needs no column config object. `field` names the key the
|
|
@@ -49508,6 +49603,19 @@ export type CustomElementsSolidJs = {
|
|
|
49508
49603
|
* were this list to win, the drag would move the separator and leave the
|
|
49509
49604
|
* track where the list put it. This is the table's default for its columns,
|
|
49510
49605
|
* and each column may say otherwise.
|
|
49606
|
+
*
|
|
49607
|
+
* **It is also the only track list a server can send.** The shim has no tree
|
|
49608
|
+
* to walk, so a render there knows of no columns and this attribute is the
|
|
49609
|
+
* whole answer: a table given one lays its grid out in the first paint, and a
|
|
49610
|
+
* table sized only by its columns is one track wide until it upgrades.
|
|
49611
|
+
*
|
|
49612
|
+
* **`helix-data-table` has none of this, and should not.** Its columns are
|
|
49613
|
+
* its schema rather than an option, so there is always a column to write a
|
|
49614
|
+
* `width` on and a list here would be a second way to say what that says.
|
|
49615
|
+
* This table's cells are markup, and a table written as rows of cells with no
|
|
49616
|
+
* `helix-table-column` in it has nowhere else to be sized from. Both families
|
|
49617
|
+
* take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
49618
|
+
* wins over whichever list the element worked out.
|
|
49511
49619
|
* - `label`: Accessible name for the table.
|
|
49512
49620
|
* - `empty-text`/`emptyText`: What is said where there are none, and none are coming.
|
|
49513
49621
|
* - `loading`: Whether the rows are still on their way.
|
|
@@ -49548,7 +49656,6 @@ export type CustomElementsSolidJs = {
|
|
|
49548
49656
|
*
|
|
49549
49657
|
* CSS variables available for styling the component.
|
|
49550
49658
|
*
|
|
49551
|
-
* - `--table-columns`: Track list for the columns. (default: `undefined`)
|
|
49552
49659
|
* - `--table-template`: The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set. (default: `undefined`)
|
|
49553
49660
|
*
|
|
49554
49661
|
* ## CSS Parts
|
|
@@ -51969,12 +52076,6 @@ export type CustomElementsSolidJs = {
|
|
|
51969
52076
|
* Unset by default, and unreflected: a tree of choosable nodes is not a tree
|
|
51970
52077
|
* of links, and an empty `href` written onto every row would be a link to the
|
|
51971
52078
|
* current page on every item a consumer never asked to be one.
|
|
51972
|
-
* - `level`: Depth from the root, set by the tree so indentation needs no CSS nesting.
|
|
51973
|
-
*
|
|
51974
|
-
* Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
51975
|
-
* here would be a change to markup the consumer rendered and hydration would
|
|
51976
|
-
* report it. The indent it drives is written onto the row instead, inside the
|
|
51977
|
-
* shadow root, which is not part of the tree React hydrates.
|
|
51978
52079
|
* - `rel`: What the link declares about where it goes.
|
|
51979
52080
|
*
|
|
51980
52081
|
* Set by the consumer rather than derived from `target`: `noreferrer` is a
|
|
@@ -51983,7 +52084,7 @@ export type CustomElementsSolidJs = {
|
|
|
51983
52084
|
* this library supports implies it for `target="_blank"` already.
|
|
51984
52085
|
* - `selected`: Whether this item is the current one.
|
|
51985
52086
|
*
|
|
51986
|
-
* Not reflected, for the reason `level`
|
|
52087
|
+
* Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
51987
52088
|
* this after it upgrades, so the attribute would be a change to markup the
|
|
51988
52089
|
* consumer rendered and hydration would report it. Mirroring to
|
|
51989
52090
|
* `data-selected` on the host instead is the same fault under another name.
|
|
@@ -52005,6 +52106,23 @@ export type CustomElementsSolidJs = {
|
|
|
52005
52106
|
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
52006
52107
|
* the resolved state for stylesheets, which is what the mirror is for.
|
|
52007
52108
|
* - `default-open`/`defaultOpen`: Initial open state for uncontrolled use, where nothing declared one.
|
|
52109
|
+
* - `level`: Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
52110
|
+
*
|
|
52111
|
+
* **Read rather than written, and no attribute at all.** The tree counts the
|
|
52112
|
+
* items a row sits inside and assigns this on every sync, so a value declared
|
|
52113
|
+
* here is overwritten before the first paint: measured at `level="2"` on three
|
|
52114
|
+
* rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
52115
|
+
* row. It carried an attribute and a shipped example setting it for as long as
|
|
52116
|
+
* both existed, which is a depth a consumer could state and nothing would
|
|
52117
|
+
* honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
52118
|
+
* children go in its `children` slot, and that nesting is also what decides
|
|
52119
|
+
* which rows a shut branch hides and which row the outward arrow moves to.
|
|
52120
|
+
*
|
|
52121
|
+
* Not reflected either. The tree assigns this after it upgrades, so an
|
|
52122
|
+
* attribute here would be a change to markup the consumer rendered and
|
|
52123
|
+
* hydration would report it. The indent it drives is written onto the row
|
|
52124
|
+
* instead, inside the shadow root, which is not part of the tree React
|
|
52125
|
+
* hydrates. (property only)
|
|
52008
52126
|
* - `focusable`: Whether this item holds the tree's single tab stop. (property only)
|
|
52009
52127
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
52010
52128
|
*
|
|
@@ -53118,8 +53236,6 @@ export type CustomCssProperties = {
|
|
|
53118
53236
|
"--splitter-position"?: (string) | undefined;
|
|
53119
53237
|
/** The edge the column this cell sits under is set to, `start`, `center` or `end`, and unset under a column that sets none. Written by the table around it, since the cell is the consumer's markup and nothing is written onto it; read by the sheet that draws the cell, where `justify-content` and `text-align` both take it as it comes and both follow the writing direction. */
|
|
53120
53238
|
"--table-cell-align"?: (string) | undefined;
|
|
53121
|
-
/** Track list for the columns. */
|
|
53122
|
-
"--table-columns"?: (string) | undefined;
|
|
53123
53239
|
/** The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set. */
|
|
53124
53240
|
"--table-template"?: (string) | undefined;
|
|
53125
53241
|
/** How long this message stays, in milliseconds, for a progress hint. */
|
package/types/vue.d.ts
CHANGED
|
@@ -7083,7 +7083,20 @@ on the column it sizes, which is the more particular statement, and it is
|
|
|
7083
7083
|
where a resize lands: a reader dragging a column's edge writes `width`, so
|
|
7084
7084
|
were this list to win, the drag would move the separator and leave the
|
|
7085
7085
|
track where the list put it. This is the table's default for its columns,
|
|
7086
|
-
and each column may say otherwise.
|
|
7086
|
+
and each column may say otherwise.
|
|
7087
|
+
|
|
7088
|
+
**It is also the only track list a server can send.** The shim has no tree
|
|
7089
|
+
to walk, so a render there knows of no columns and this attribute is the
|
|
7090
|
+
whole answer: a table given one lays its grid out in the first paint, and a
|
|
7091
|
+
table sized only by its columns is one track wide until it upgrades.
|
|
7092
|
+
|
|
7093
|
+
**`helix-data-table` has none of this, and should not.** Its columns are
|
|
7094
|
+
its schema rather than an option, so there is always a column to write a
|
|
7095
|
+
`width` on and a list here would be a second way to say what that says.
|
|
7096
|
+
This table's cells are markup, and a table written as rows of cells with no
|
|
7097
|
+
`helix-table-column` in it has nowhere else to be sized from. Both families
|
|
7098
|
+
take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
7099
|
+
wins over whichever list the element worked out. */
|
|
7087
7100
|
columns?: (HelixHeadlessTable["columns"]) | undefined;
|
|
7088
7101
|
/** Accessible name for the table. */
|
|
7089
7102
|
label?: (HelixHeadlessTable["label"]) | undefined;
|
|
@@ -8316,13 +8329,6 @@ Unset by default, and unreflected: a tree of choosable nodes is not a tree
|
|
|
8316
8329
|
of links, and an empty `href` written onto every row would be a link to the
|
|
8317
8330
|
current page on every item a consumer never asked to be one. */
|
|
8318
8331
|
href?: (HelixHeadlessTreeItem["href"]) | undefined;
|
|
8319
|
-
/** Depth from the root, set by the tree so indentation needs no CSS nesting.
|
|
8320
|
-
|
|
8321
|
-
Not reflected. The tree assigns this after it upgrades, so an attribute
|
|
8322
|
-
here would be a change to markup the consumer rendered and hydration would
|
|
8323
|
-
report it. The indent it drives is written onto the row instead, inside the
|
|
8324
|
-
shadow root, which is not part of the tree React hydrates. */
|
|
8325
|
-
level?: (HelixHeadlessTreeItem["level"]) | undefined;
|
|
8326
8332
|
/** What the link declares about where it goes.
|
|
8327
8333
|
|
|
8328
8334
|
Set by the consumer rather than derived from `target`: `noreferrer` is a
|
|
@@ -8332,7 +8338,7 @@ this library supports implies it for `target="_blank"` already. */
|
|
|
8332
8338
|
rel?: (HelixHeadlessTreeItem["rel"]) | undefined;
|
|
8333
8339
|
/** Whether this item is the current one.
|
|
8334
8340
|
|
|
8335
|
-
Not reflected, for the reason `level`
|
|
8341
|
+
Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
8336
8342
|
this after it upgrades, so the attribute would be a change to markup the
|
|
8337
8343
|
consumer rendered and hydration would report it. Mirroring to
|
|
8338
8344
|
`data-selected` on the host instead is the same fault under another name.
|
|
@@ -8361,6 +8367,24 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
8361
8367
|
"default-open"?: (HelixHeadlessTreeItem["defaultOpen"]) | undefined;
|
|
8362
8368
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
8363
8369
|
defaultOpen?: (HelixHeadlessTreeItem["defaultOpen"]) | undefined;
|
|
8370
|
+
/** Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
8371
|
+
|
|
8372
|
+
**Read rather than written, and no attribute at all.** The tree counts the
|
|
8373
|
+
items a row sits inside and assigns this on every sync, so a value declared
|
|
8374
|
+
here is overwritten before the first paint: measured at `level="2"` on three
|
|
8375
|
+
rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
8376
|
+
row. It carried an attribute and a shipped example setting it for as long as
|
|
8377
|
+
both existed, which is a depth a consumer could state and nothing would
|
|
8378
|
+
honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
8379
|
+
children go in its `children` slot, and that nesting is also what decides
|
|
8380
|
+
which rows a shut branch hides and which row the outward arrow moves to.
|
|
8381
|
+
|
|
8382
|
+
Not reflected either. The tree assigns this after it upgrades, so an
|
|
8383
|
+
attribute here would be a change to markup the consumer rendered and
|
|
8384
|
+
hydration would report it. The indent it drives is written onto the row
|
|
8385
|
+
instead, inside the shadow root, which is not part of the tree React
|
|
8386
|
+
hydrates. */
|
|
8387
|
+
level?: (HelixHeadlessTreeItem["level"]) | undefined;
|
|
8364
8388
|
/** Whether this item holds the tree's single tab stop. */
|
|
8365
8389
|
focusable?: (HelixHeadlessTreeItem["focusable"]) | undefined;
|
|
8366
8390
|
};
|
|
@@ -8994,8 +9018,6 @@ export type CustomCssProperties = {
|
|
|
8994
9018
|
"--splitter-position"?: (string) | undefined;
|
|
8995
9019
|
/** The edge the column this cell sits under is set to, `start`, `center` or `end`, and unset under a column that sets none. Written by the table around it, since the cell is the consumer's markup and nothing is written onto it; read by the sheet that draws the cell, where `justify-content` and `text-align` both take it as it comes and both follow the writing direction. */
|
|
8996
9020
|
"--table-cell-align"?: (string) | undefined;
|
|
8997
|
-
/** Track list for the columns. */
|
|
8998
|
-
"--table-columns"?: (string) | undefined;
|
|
8999
9021
|
/** The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set. */
|
|
9000
9022
|
"--table-template"?: (string) | undefined;
|
|
9001
9023
|
/** How long this message stays, in milliseconds, for a progress hint. */
|
|
@@ -9188,7 +9210,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
9188
9210
|
HelixHeadlessCopyButtonVueProps,
|
|
9189
9211
|
HelixHeadlessCopyButtonVueEvents
|
|
9190
9212
|
>;
|
|
9191
|
-
/** **The schema is markup and the data is a property.** Columns are declared as 'helix-table-column' children, because a schema is small and something a reader should see in the HTML; rows are handed over as an array, because a table that draws ten thousand elements cannot window them. '''html <helix-data-table .rows=${rows} sort="name:asc" page-size="20"> <helix-table-column field="name" sortable>Name</helix-table-column> <helix-table-column field="size" align="end" sortable .cell=${bytes}>Size</helix-table-column> </helix-data-table> ''' 'helix-table' takes rows as markup and is the right component for a table of twelve things a person wrote out. **Sort and filter apply to the whole set, never the page.** Sorting the drawn window is correct on the first screen and wrong on every other one. **The cell values do not server-render.** The headings do, and the row elements do, but reading a cell needs the columns, and the columns are markup children Lit SSR does not hand this element. So a crawler sees a table of the right shape with nothing in it. That is the cost of the first paragraph: use 'helix-table' where the served HTML has to carry the values. **'selectable' adds a column of checkboxes, keyed on 'row-key'.** A row is selected by its identity rather than its position, so a selection survives a sort, a filter and a page. 'selected' is the chosen keys, comma separated, the shape Listbox uses for a multiple choice, and like 'sort' it is controlled when set and seeded by 'default-selected'. The box in the heading selects every row in the result, across pages, and shows a dash while only some are chosen. Choosing one of many, rather than several, is opening a row, and that is a link or a button in a cell rather than a selection. **A reader can size and order the columns.** 'resizable' on a column puts a separator on its edge; 'reorderable' on the table puts a grip on each heading that has a 'field', moved by dragging or with the arrow keys. The order lands in 'order' as fields, and the consumer's own markup is never rewritten: the table assigns the headings to its header in that order instead. **'csv()' hands back the result as text**: every row the filter lets through, in the order on screen, in the columns on screen. Saving it is the page's business, the same as any other file. */
|
|
9213
|
+
/** **The schema is markup and the data is a property.** Columns are declared as 'helix-table-column' children, because a schema is small and something a reader should see in the HTML; rows are handed over as an array, because a table that draws ten thousand elements cannot window them. '''html <helix-data-table .rows=${rows} sort="name:asc" page-size="20"> <helix-table-column field="name" sortable>Name</helix-table-column> <helix-table-column field="size" align="end" sortable .cell=${bytes}>Size</helix-table-column> </helix-data-table> ''' 'helix-table' takes rows as markup and is the right component for a table of twelve things a person wrote out. **Sort and filter apply to the whole set, never the page.** Sorting the drawn window is correct on the first screen and wrong on every other one. **The cell values do not server-render.** The headings do, and the row elements do, but reading a cell needs the columns, and the columns are markup children Lit SSR does not hand this element. So a crawler sees a table of the right shape with nothing in it. That is the cost of the first paragraph: use 'helix-table' where the served HTML has to carry the values. **'selectable' adds a column of checkboxes, keyed on 'row-key'.** A row is selected by its identity rather than its position, so a selection survives a sort, a filter and a page. 'selected' is the chosen keys, comma separated, the shape Listbox uses for a multiple choice, and like 'sort' it is controlled when set and seeded by 'default-selected'. The box in the heading selects every row in the result, across pages, and shows a dash while only some are chosen. Choosing one of many, rather than several, is opening a row, and that is a link or a button in a cell rather than a selection. **A reader can size and order the columns.** 'resizable' on a column puts a separator on its edge; 'reorderable' on the table puts a grip on each heading that has a 'field', moved by dragging or with the arrow keys. The order lands in 'order' as fields, and the consumer's own markup is never rewritten: the table assigns the headings to its header in that order instead. **'csv()' hands back the result as text**: every row the filter lets through, in the order on screen, in the columns on screen. Saving it is the page's business, the same as any other file. **There is no 'columns' attribute here, and 'helix-table' has one.** The difference is what a column is in each: here it is the schema, so a table without one has nothing to read a row with, and every column is a place to write a 'width'. A 'helix-table' holds cells a consumer wrote and can be written with no column at all, so its 'columns' is where such a table is sized from. Written on this element the attribute is inert, which is the trap worth knowing when moving between the two. What both take is the CSS hook, '--data-table-columns' here and '--table-columns' there. */
|
|
9192
9214
|
"helix-headless-data-table": DefineCustomElement<
|
|
9193
9215
|
HelixHeadlessDataTable,
|
|
9194
9216
|
HelixHeadlessDataTableVueProps,
|
|
@@ -9614,7 +9636,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
9614
9636
|
HelixHeadlessTableCellVueProps,
|
|
9615
9637
|
HelixHeadlessTableCellVueEvents
|
|
9616
9638
|
>;
|
|
9617
|
-
/** **The column is the source of both its heading and its track.** Add one and the table has another track; remove one and it does not.
|
|
9639
|
+
/** **The column is the source of both its heading and its track.** Add one and the table has another track; remove one and it does not. That is what ties the two together, and a table-level track list on its own does not: a list that is accidentally the headings is invalid CSS a grid ignores in silence, drawing the whole table as one column. 'helix-table''s 'columns' is dealt out a track at a time against the columns declared under it, so a heading among the widths costs its own column a width and no more, and a list longer or shorter than the columns is trimmed or shared rather than being a second count of them. A column's own 'width' wins over the track in its place. **It is also where every per-column fact goes**, which is the reason 'helix-data-table' needs no column config object. 'field' names the key the cell reads, 'sortable' says a reader may reorder by it, 'align' says which edge the values line up against, and 'cell' takes a function for anything the field alone cannot express. The schema is markup and the data is a property: a schema is small, declarative, and something a reader should be able to see in the HTML, and data is large and windowed. **The same element serves both tables**, the markup one and the data one. It is identified by a flag rather than by 'instanceof', so a 'helix-table-column' works inside either without the two roots sharing anything else. **It generates no box of its own**, the same as a row: the heading is a grid item of the table, so it lines up with the cells under it rather than sitting in a wrapper that has to be kept the same width. **'hidden' takes the column out of the grid**, its heading and its track both, so the columns after it keep their own widths and every row keeps its cells under their headings. 'hidden="until-found"' keeps its track, the heading being left drawn, as every Helix element leaves one with that value. 'helix-data-table' draws the cells, so it leaves out the ones under a hidden column. A 'helix-table''s cells are markup the consumer wrote, so hide them with the column, as removing a column means removing its cells: a row with a cell more than the table has tracks wraps into the next. **A heading that does something holds a control that does it.** The host is the column header, and a header is not focusable, so a sortable heading is a '<button>' inside it: the pattern for a sortable table, and the only way a reader on a keyboard reaches the sort at all. A column a reader may resize carries a 'separator' on its end edge, moved by dragging it or with the arrow keys, and a column in a table that lets a reader reorder its columns carries a grip the table moves. */
|
|
9618
9640
|
"helix-headless-table-column": DefineCustomElement<
|
|
9619
9641
|
HelixHeadlessTableColumn,
|
|
9620
9642
|
HelixHeadlessTableColumnVueProps,
|