@fusion.dev/helix-headless 0.169.0 → 0.170.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 +54 -3
- package/dist/data-table/root/data-table-root.d.ts +40 -5
- package/dist/data-table/root/data-table-root.js +35 -7
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +20 -10
- package/types/vue.d.ts +1 -1
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.170.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@fusion.dev/helix-core": "0.
|
|
53
|
-
"@fusion.dev/helix-icons": "0.
|
|
52
|
+
"@fusion.dev/helix-core": "0.170.0",
|
|
53
|
+
"@fusion.dev/helix-icons": "0.170.0",
|
|
54
54
|
"uqr": "^0.1.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@fusion.dev/helix-cem": "0.
|
|
58
|
-
"@fusion.dev/helix-testing": "0.
|
|
57
|
+
"@fusion.dev/helix-cem": "0.170.0",
|
|
58
|
+
"@fusion.dev/helix-testing": "0.170.0",
|
|
59
59
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
60
60
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
61
61
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -43245,10 +43245,15 @@ export type CustomElements = {
|
|
|
43245
43245
|
*
|
|
43246
43246
|
* Sort and filter apply to the whole set, including the rows on other pages.
|
|
43247
43247
|
*
|
|
43248
|
-
* **
|
|
43249
|
-
*
|
|
43250
|
-
* children to this element, so
|
|
43251
|
-
*
|
|
43248
|
+
* **Write the first page as rows, so the served HTML carries the values.** The
|
|
43249
|
+
* table reads each cell from its column, and a server does not pass the column
|
|
43250
|
+
* children to this element, so on its own it serves the headings and no values.
|
|
43251
|
+
* Write the first page under the columns as `TableRow` and `TableCell`
|
|
43252
|
+
* elements, in the table's sort and page size and formatted as its columns draw
|
|
43253
|
+
* them. The table shows your rows until `rows` holds a row, then draws its own
|
|
43254
|
+
* in their place and leaves yours in the page, unshown. A development build
|
|
43255
|
+
* warns when the two differ. In React, map the first page of the same array in
|
|
43256
|
+
* the same server component.
|
|
43252
43257
|
*
|
|
43253
43258
|
* `selectable` adds a column of checkboxes, keyed on `row-key`:
|
|
43254
43259
|
*
|
|
@@ -43598,7 +43603,7 @@ export type CustomElements = {
|
|
|
43598
43603
|
*
|
|
43599
43604
|
* Areas where markup can be added to the component.
|
|
43600
43605
|
*
|
|
43601
|
-
* - `(default)`: The columns, as `TableColumn` elements.
|
|
43606
|
+
* - `(default)`: The columns, as `TableColumn` elements, and the first page served as `TableRow` elements, which show until `rows` holds a row.
|
|
43602
43607
|
* - `empty`: Content shown when there are no rows to show and none are loading, such as a picture and a link. Falls back to `empty-text`, which the live region still says.
|
|
43603
43608
|
* - `error`: Content shown while `error-text` is set, such as a button that tries again. Falls back to `error-text`, which the live region still says.
|
|
43604
43609
|
* - `footer`: Content below the grid. It replaces the built-in pagination.
|
|
@@ -72268,10 +72273,15 @@ export type CustomElementsSolidJs = {
|
|
|
72268
72273
|
*
|
|
72269
72274
|
* Sort and filter apply to the whole set, including the rows on other pages.
|
|
72270
72275
|
*
|
|
72271
|
-
* **
|
|
72272
|
-
*
|
|
72273
|
-
* children to this element, so
|
|
72274
|
-
*
|
|
72276
|
+
* **Write the first page as rows, so the served HTML carries the values.** The
|
|
72277
|
+
* table reads each cell from its column, and a server does not pass the column
|
|
72278
|
+
* children to this element, so on its own it serves the headings and no values.
|
|
72279
|
+
* Write the first page under the columns as `TableRow` and `TableCell`
|
|
72280
|
+
* elements, in the table's sort and page size and formatted as its columns draw
|
|
72281
|
+
* them. The table shows your rows until `rows` holds a row, then draws its own
|
|
72282
|
+
* in their place and leaves yours in the page, unshown. A development build
|
|
72283
|
+
* warns when the two differ. In React, map the first page of the same array in
|
|
72284
|
+
* the same server component.
|
|
72275
72285
|
*
|
|
72276
72286
|
* `selectable` adds a column of checkboxes, keyed on `row-key`:
|
|
72277
72287
|
*
|
|
@@ -72621,7 +72631,7 @@ export type CustomElementsSolidJs = {
|
|
|
72621
72631
|
*
|
|
72622
72632
|
* Areas where markup can be added to the component.
|
|
72623
72633
|
*
|
|
72624
|
-
* - `(default)`: The columns, as `TableColumn` elements.
|
|
72634
|
+
* - `(default)`: The columns, as `TableColumn` elements, and the first page served as `TableRow` elements, which show until `rows` holds a row.
|
|
72625
72635
|
* - `empty`: Content shown when there are no rows to show and none are loading, such as a picture and a link. Falls back to `empty-text`, which the live region still says.
|
|
72626
72636
|
* - `error`: Content shown while `error-text` is set, such as a button that tries again. Falls back to `error-text`, which the live region still says.
|
|
72627
72637
|
* - `footer`: Content below the grid. It replaces the built-in pagination.
|
package/types/vue.d.ts
CHANGED
|
@@ -19056,7 +19056,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
19056
19056
|
HelixHeadlessCopyButtonVueProps,
|
|
19057
19057
|
HelixHeadlessCopyButtonVueEvents
|
|
19058
19058
|
>;
|
|
19059
|
-
/** Declare the columns as 'TableColumn' children and pass the rows as an array. The schema stays readable in the HTML, and the rows can be windowed, which ten thousand row elements cannot be. '''html <helix-headless-data-table .rows=${rows} sort="name:asc" page-size="20"> <helix-headless-table-column field="name" sortable>Name</helix-headless-table-column> <helix-headless-table-column field="size" text-align="end" sortable .cell=${bytes}>Size</helix-headless-table-column> </helix-headless-data-table> ''' For a short table written out by hand, use 'Table', which takes rows as markup. Sort and filter apply to the whole set, including the rows on other pages. **
|
|
19059
|
+
/** Declare the columns as 'TableColumn' children and pass the rows as an array. The schema stays readable in the HTML, and the rows can be windowed, which ten thousand row elements cannot be. '''html <helix-headless-data-table .rows=${rows} sort="name:asc" page-size="20"> <helix-headless-table-column field="name" sortable>Name</helix-headless-table-column> <helix-headless-table-column field="size" text-align="end" sortable .cell=${bytes}>Size</helix-headless-table-column> </helix-headless-data-table> ''' For a short table written out by hand, use 'Table', which takes rows as markup. Sort and filter apply to the whole set, including the rows on other pages. **Write the first page as rows, so the served HTML carries the values.** The table reads each cell from its column, and a server does not pass the column children to this element, so on its own it serves the headings and no values. Write the first page under the columns as 'TableRow' and 'TableCell' elements, in the table's sort and page size and formatted as its columns draw them. The table shows your rows until 'rows' holds a row, then draws its own in their place and leaves yours in the page, unshown. A development build warns when the two differ. In React, map the first page of the same array in the same server component. 'selectable' adds a column of checkboxes, keyed on 'row-key': - A row is selected by its key, so the selection survives a sort, a filter, and a page change. - 'selected' holds the chosen keys, comma separated, the same shape 'Listbox' uses for a multiple choice. As with 'sort', writing it applies the selection, and 'default-selected' holds what the markup declared. - The checkbox in the heading selects every row in the result, across pages, and shows a dash while only some are chosen. - Shift with a press on a checkbox selects every row between it and the row last chosen. - 'selection-behavior="replace"' makes a press or a move select the row alone, as a file list does. Control or Command with a press adds or takes out one row, and Shift with a press selects every row from the one last chosen. To act on a single row, such as opening it, put a link or a button in a cell. **Keyboard.** The grid is one tab stop, and the arrow keys move between its cells, the headings included. | Key | What it does | |---|---| | Right, Left | Moves one cell along the row. Left moves on, on a right-to-left page. | | Down, Up | Moves one row, the heading row and the 'load-more' row included. | | Home, End | Moves to the first or the last cell of the row. | | Control with Home or End | Moves to the first or the last cell of the grid. | | Page Down, Page Up | Moves by the rows that fit in view. | | Enter, F2 | Moves into the cell's controls. Escape moves back to the cell, and Tab moves between the controls of one cell. | | Enter, Space on a sortable heading | Sorts by the column. | | Enter, Space on the 'load-more' row | Sends 'helix-load-more'. | | Space on a row | Selects the row, in a 'selectable' table. Under 'selection-behavior="replace"', selects it alone, and Control or Command with Space adds or takes out the row. | | Down, Up, Page Down, Page Up under 'selection-behavior="replace"' | Selects the row it moves to alone. Control or Command with the key moves without selecting. | | Shift with Down or Up | Selects the rows it moves across, in a 'selectable' table. | | Shift with Space | Selects every row from the one last chosen, in a 'selectable' table. | | Control or Command with A | Selects every row, in a 'selectable' table. | | Right on a row header in a tree grid | Opens a closed row, and moves one cell along an open one. | | Left on a row header in a tree grid | Closes an open row, and moves to the parent of a closed one. | | A letter or a word | Moves to the next row whose row header starts with what you typed. | 'selected' and 'expanded' hold their keys in the order of the rows, as do 'helix-select', 'helix-selected' and 'helix-expand'. Each row is named by its row header, the column marked 'row-header', or the first column with a 'field' where none is. A screen reader says it as a reader moves between rows. **Rows that hold rows.** 'child-field' names the field that holds a row's child rows, and the grid becomes a tree grid. The row header column draws a mark that a press opens and closes a row by, and 'expanded' holds the keys of the open rows, which 'row-key' names. Right on a closed row's header opens it, Left on an open one closes it, and Left on a child moves to its parent. A sort orders the rows under each parent, and a search shows the rows that lead to each match, open. 'load-more' adds a row after the last one with a button that sends 'helix-load-more'. A 'windowed' table also sends it by itself once a reader scrolls within one screen of the end, once for each number of rows. Add the next rows to 'rows', and set 'loading' while they are on their way. When a fetch fails, set 'error-text', such as "The files did not load", and put a button that tries again in the 'error' slot. The line shows after the rows in place of the empty and loading lines, the live region says it, and the table takes the 'error' state. Clear it once you try again. The controls inside the cells leave the tab order, so Tab moves past the whole grid. A windowed table keeps the row holding focus drawn while the rest scroll away. People can resize and reorder 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 new order is written to 'order' as a list of fields. Your markup is not rewritten: the table assigns the headings to its header in that order. **'reorderable-rows' lets people move rows.** A column of grips leads each row, named by 'move-row-label'. Drag a grip to move its row, and the table scrolls near an edge. Or press Space or Enter on a grip, or click it, to pick up its row, move it with Down and Up, Home and End, and press Space or Enter again to drop it. A click on another row drops it there, and Escape puts it back. The table says each step in its 'live' region. A drop sends 'helix-before-reorder', which you can refuse, and then 'helix-reorder' with 'kind' set to 'row', whose 'keys' hold every key of 'rows' in the new order. **You move the rows**: set 'rows' to the new order, and the table draws it. Set 'row-key', so a row is known by its key once it has moved. The grips do nothing while a 'sort' is set, since the sort decides the order, and a tree grid draws none. 'csv()' returns the result as text: every row that passes the filter, in the order and the columns on screen. Saving the file is up to you. 'DataTable' has no 'columns' attribute. Each 'TableColumn' is part of the schema, so you size a column with its own 'width'. 'Table' has 'columns' because its cells are markup you write and it can have no columns at all. Written on 'DataTable', 'columns' has no effect, so watch for it when you move a table from 'Table' to 'DataTable'. */
|
|
19060
19060
|
"helix-headless-data-table": DefineCustomElement<
|
|
19061
19061
|
HelixHeadlessDataTable,
|
|
19062
19062
|
HelixHeadlessDataTableVueProps,
|