@excom/data-table 0.1.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.
Files changed (38) hide show
  1. package/.rush/temp/chunked-rush-logs/data-table.apply-exports.chunks.jsonl +1 -0
  2. package/.rush/temp/chunked-rush-logs/data-table.build_docs.chunks.jsonl +1 -0
  3. package/.rush/temp/chunked-rush-logs/data-table.build_package-metas.chunks.jsonl +1 -0
  4. package/.rush/temp/operation/apply-exports/all.log +1 -0
  5. package/.rush/temp/operation/apply-exports/log-chunks.jsonl +1 -0
  6. package/.rush/temp/operation/apply-exports/state.json +3 -0
  7. package/.rush/temp/operation/build_docs/all.log +1 -0
  8. package/.rush/temp/operation/build_docs/log-chunks.jsonl +1 -0
  9. package/.rush/temp/operation/build_docs/state.json +3 -0
  10. package/.rush/temp/operation/build_package-metas/all.log +1 -0
  11. package/.rush/temp/operation/build_package-metas/log-chunks.jsonl +1 -0
  12. package/.rush/temp/operation/build_package-metas/state.json +3 -0
  13. package/.rush/temp/shrinkwrap-deps.json +3 -0
  14. package/config/rig.json +5 -0
  15. package/data-table.ts +396 -0
  16. package/data-th.ts +49 -0
  17. package/index.css +5 -0
  18. package/index.ts +23 -0
  19. package/package.json +44 -0
  20. package/rush-logs/data-table.apply-exports.cache.log +1 -0
  21. package/rush-logs/data-table.apply-exports.log +1 -0
  22. package/rush-logs/data-table.build_docs.cache.log +1 -0
  23. package/rush-logs/data-table.build_docs.log +1 -0
  24. package/rush-logs/data-table.build_package-metas.cache.log +1 -0
  25. package/rush-logs/data-table.build_package-metas.log +1 -0
  26. package/src/data-table.css +124 -0
  27. package/support/custom-elements.json +366 -0
  28. package/support/demos/filter.html +67 -0
  29. package/support/demos/simple.html +14 -0
  30. package/support/dist-docs/data-table.md +245 -0
  31. package/support/dist-docs/data-th.md +29 -0
  32. package/support/docs/INTERNAL.md +7 -0
  33. package/support/docs/README.md +74 -0
  34. package/support/package-meta.json +280 -0
  35. package/support/tests/data-table.test.ts +704 -0
  36. package/support/tests/filter.view.test.ts +33 -0
  37. package/support/tests/simple.view.test.ts +31 -0
  38. package/tsconfig.json +5 -0
@@ -0,0 +1,280 @@
1
+ {
2
+ "shortName": "data-table",
3
+ "package": {
4
+ "name": "@excom/data-table",
5
+ "version": "0.1.0",
6
+ "description": "<data-table> custom element",
7
+ "peerDependencies": {},
8
+ "excom": {
9
+ "packageType": "kit-element"
10
+ }
11
+ },
12
+ "demos": {
13
+ "filter": "<div>\n <quark-sheet>\n :scope {\n @on input (target: \"form[data-filter]\") {\n data-table { filter-value: target.elements.filterValue.value; }\n }\n @on change (target: \"form[data-filter]\") {\n data-table { filter-casing: target.elements.filterCasing.checked; }\n }\n @on change (target: \"form[data-export]\") {\n form[data-export] [command=\"--export\"] {\n data-file-type: target.elements.fileType.value;\n data-file-name: target.elements.fileName.value;\n data-full: target.elements.full.checked;\n }\n }\n }\n </quark-sheet>\n <form data-filter>\n <fieldset role=\"group\">\n <input name=\"filterValue\" placeholder=\"Filter table…\" />\n <label>\n Case-sensitive\n <input name=\"filterCasing\" role=\"switch\" type=\"checkbox\" />\n </label>\n </fieldset>\n </form>\n <data-table id=\"demo-data-table-filter\">\n <data-thead>\n <data-tr>\n <data-th column-type=\"string\">Name</data-th>\n <data-th column-type=\"number\">Age</data-th>\n </data-tr>\n </data-thead>\n <data-tbody>\n <data-tr><data-td>Beatrice</data-td><data-td>44</data-td></data-tr>\n <data-tr><data-td>Cynthia</data-td><data-td>41</data-td></data-tr>\n <data-tr><data-td>Beau</data-td><data-td>29</data-td></data-tr>\n <data-tr><data-td>Adam</data-td><data-td>36</data-td></data-tr>\n </data-tbody>\n </data-table>\n <hr />\n <button type=\"button\" command=\"--export\" commandfor=\"demo-data-table-filter\">\n Export as-is\n </button>\n <hr />\n <form data-export class=\"tag-article\">\n <header>\n <h4>Export with options</h4>\n </header>\n <label>\n <select name=\"fileType\">\n <option value=\"csv\" selected>CSV</option>\n <option value=\"json\">JSON</option>\n </select>\n </label>\n <label>\n File name\n <input name=\"fileName\" placeholder=\"File name\" />\n </label>\n <label>\n <input name=\"full\" type=\"checkbox\" role=\"switch\" />\n Full table (ignores active filter/sort)\n </label>\n <button type=\"button\" command=\"--export\" commandfor=\"demo-data-table-filter\">Export</button>\n </form>\n</div>\n",
14
+ "simple": "<data-table>\n <data-thead>\n <data-tr>\n <data-th column-type=\"string\" sort-direction=\"asc\">Name</data-th>\n <data-th column-type=\"number\">Age</data-th>\n </data-tr>\n </data-thead>\n <data-tbody>\n <data-tr><data-td>Beatrice</data-td><data-td>44</data-td></data-tr>\n <data-tr><data-td>Cynthia</data-td><data-td>41</data-td></data-tr>\n <data-tr><data-td>Beau</data-td><data-td>29</data-td></data-tr>\n <data-tr><data-td>Adam</data-td><data-td>36</data-td></data-tr>\n </data-tbody>\n</data-table>\n"
15
+ },
16
+ "readme": "<h1 id=\"md-data-table\">data-table</h1>\n<p>Sortable, filterable tables from plain custom tags — one behavior owner\n(<code>&lt;data-table&gt;</code> + <code>&lt;data-th&gt;</code>), everything else is CSS.</p>\n<p><include-content data-demo=\"simple\"></include-content></p>\n<h2 id=\"md-features\">Features</h2>\n<ul>\n<li><strong>Sort</strong> Click a <code>&lt;data-th&gt;</code> to visually sort by string, number, or date</li>\n<li><strong>Filter</strong> <code>filter-value</code> hides non-matching rows</li>\n<li><strong>Export</strong> The <code>--export</code> command downloads visible / all rows as CSV / JSON</li>\n<li><strong>DOM-stable</strong> Sort / filter via CSS only. Does not conflict with DOM owners, such as Quark.</li>\n<li><strong>Bindable counts</strong> <code>.provision</code> is <code>{ totalRows, visibleRows, sortColumnIndex, sortDirection, filterValue }</code> — a &quot;12 of 40 rows&quot; readout is one Quark rule</li>\n<li><strong>Plain structural tags</strong> <code>&lt;data-thead&gt;</code> / <code>&lt;data-tbody&gt;</code> / <code>&lt;data-tr&gt;</code> /\n<code>&lt;data-td&gt;</code> are CSS-only — no registration cost</li>\n</ul>\n<h2 id=\"md-installation\">Installation</h2>\n<p><include-content is-active template-ref=\"/views/install-section/install-section.html\"></include-content></p>\n<h2 id=\"md-usage\">Usage</h2>\n<p>Only <code>&lt;data-table&gt;</code> and <code>&lt;data-th&gt;</code> are registered custom elements.\n<code>&lt;data-thead&gt;</code>, <code>&lt;data-tbody&gt;</code>, <code>&lt;data-tr&gt;</code>, <code>&lt;data-td&gt;</code>, <code>&lt;data-tfoot&gt;</code>, and <code>&lt;data-tf&gt;</code> are plain tags — this package&#39;s CSS styles them as a table (or apply the equivalent <code>.tag-data-*</code> classes).</p>\n<p>Sort and filter are visual only (CSS <code>order</code> / <code>display</code>).\nRow nodes never move or leave the DOM, so Quark bindings and <code>iterate()</code> tables keep working.</p>\n<include-content data-language=\"html\"><template>&lt;data-table&gt;\n &lt;data-thead&gt;\n &lt;data-tr&gt;\n &lt;data-th column-type=\"string\" sort-direction=\"asc\"&gt;Name&lt;/data-th&gt;\n &lt;data-th column-type=\"number\"&gt;Age&lt;/data-th&gt;\n &lt;/data-tr&gt;\n &lt;/data-thead&gt;\n &lt;data-tbody&gt;\n &lt;data-tr&gt;&lt;data-td&gt;Adam&lt;/data-td&gt;&lt;data-td&gt;36&lt;/data-td&gt;&lt;/data-tr&gt;\n &lt;data-tr&gt;&lt;data-td&gt;Beau&lt;/data-td&gt;&lt;data-td&gt;29&lt;/data-td&gt;&lt;/data-tr&gt;\n &lt;/data-tbody&gt;\n&lt;/data-table&gt;</template></include-content>\n<p><code>&lt;data-tbody&gt;</code> is required — sorting and filtering both operate on its\n<code>&lt;data-tr&gt;</code> children.</p>\n<p><code>.provision</code> reports the row counts and the active sort / filter, recomputed after connect, after a sort, and after every filter change.\nRead it from a rule matching the table:</p>\n<include-content data-language=\"quark\"><template>data-table {\n $visible: prop(\"provision\").visibleRows;\n $total: prop(\"provision\").totalRows;\n [bind-count] { content: \"#{$visible} of #{$total} rows\"; }\n}</template></include-content>\n<h3 id=\"md-api-reference\">API Reference</h3>\n<p><include-content is-active template-ref=\"/views/api-reference/api-reference.html\"></include-content></p>\n<h3 id=\"md-examples\">Examples</h3>\n<h4 id=\"md-filter-rows-export-as-csv\">Filter rows + export as CSV</h4>\n<p>Filtering is State: write <code>filter-value</code> / <code>filter-casing</code> on the table — here a Quark <code>@on input</code> block copies the search field into them. Matching is case-insensitive unless <code>filter-casing</code> is set.</p>\n<p>Invoke <code>--export</code> on the table (<code>&lt;button command=&quot;--export&quot; commandfor=&quot;…&quot;&gt;</code>) to download its visible rows (visual sort order). The button&#39;s <code>data-file-type</code> is <code>csv</code> (default) or <code>json</code>; <code>data-file-name</code> sets the download name; <code>data-full</code> downloads every row in DOM order, regardless of filtering / sorting.</p>\n<p>The first export button is the happy path (the table as you see it, including active filter / sort). The form below it writes <code>data-file-type</code> / <code>data-file-name</code> / <code>data-full</code> onto its button.</p>\n<p><include-content data-demo=\"filter\"></include-content></p>\n",
17
+ "docs": {
18
+ "readme": "<h1 id=\"md-data-table\">data-table</h1>\n<p>Sortable, filterable tables from plain custom tags — one behavior owner\n(<code>&lt;data-table&gt;</code> + <code>&lt;data-th&gt;</code>), everything else is CSS.</p>\n<p><include-content data-demo=\"simple\"></include-content></p>\n<h2 id=\"md-features\">Features</h2>\n<ul>\n<li><strong>Sort</strong> Click a <code>&lt;data-th&gt;</code> to visually sort by string, number, or date</li>\n<li><strong>Filter</strong> <code>filter-value</code> hides non-matching rows</li>\n<li><strong>Export</strong> The <code>--export</code> command downloads visible / all rows as CSV / JSON</li>\n<li><strong>DOM-stable</strong> Sort / filter via CSS only. Does not conflict with DOM owners, such as Quark.</li>\n<li><strong>Bindable counts</strong> <code>.provision</code> is <code>{ totalRows, visibleRows, sortColumnIndex, sortDirection, filterValue }</code> — a &quot;12 of 40 rows&quot; readout is one Quark rule</li>\n<li><strong>Plain structural tags</strong> <code>&lt;data-thead&gt;</code> / <code>&lt;data-tbody&gt;</code> / <code>&lt;data-tr&gt;</code> /\n<code>&lt;data-td&gt;</code> are CSS-only — no registration cost</li>\n</ul>\n<h2 id=\"md-installation\">Installation</h2>\n<p><include-content is-active template-ref=\"/views/install-section/install-section.html\"></include-content></p>\n<h2 id=\"md-usage\">Usage</h2>\n<p>Only <code>&lt;data-table&gt;</code> and <code>&lt;data-th&gt;</code> are registered custom elements.\n<code>&lt;data-thead&gt;</code>, <code>&lt;data-tbody&gt;</code>, <code>&lt;data-tr&gt;</code>, <code>&lt;data-td&gt;</code>, <code>&lt;data-tfoot&gt;</code>, and <code>&lt;data-tf&gt;</code> are plain tags — this package&#39;s CSS styles them as a table (or apply the equivalent <code>.tag-data-*</code> classes).</p>\n<p>Sort and filter are visual only (CSS <code>order</code> / <code>display</code>).\nRow nodes never move or leave the DOM, so Quark bindings and <code>iterate()</code> tables keep working.</p>\n<include-content data-language=\"html\"><template>&lt;data-table&gt;\n &lt;data-thead&gt;\n &lt;data-tr&gt;\n &lt;data-th column-type=\"string\" sort-direction=\"asc\"&gt;Name&lt;/data-th&gt;\n &lt;data-th column-type=\"number\"&gt;Age&lt;/data-th&gt;\n &lt;/data-tr&gt;\n &lt;/data-thead&gt;\n &lt;data-tbody&gt;\n &lt;data-tr&gt;&lt;data-td&gt;Adam&lt;/data-td&gt;&lt;data-td&gt;36&lt;/data-td&gt;&lt;/data-tr&gt;\n &lt;data-tr&gt;&lt;data-td&gt;Beau&lt;/data-td&gt;&lt;data-td&gt;29&lt;/data-td&gt;&lt;/data-tr&gt;\n &lt;/data-tbody&gt;\n&lt;/data-table&gt;</template></include-content>\n<p><code>&lt;data-tbody&gt;</code> is required — sorting and filtering both operate on its\n<code>&lt;data-tr&gt;</code> children.</p>\n<p><code>.provision</code> reports the row counts and the active sort / filter, recomputed after connect, after a sort, and after every filter change.\nRead it from a rule matching the table:</p>\n<include-content data-language=\"quark\"><template>data-table {\n $visible: prop(\"provision\").visibleRows;\n $total: prop(\"provision\").totalRows;\n [bind-count] { content: \"#{$visible} of #{$total} rows\"; }\n}</template></include-content>\n<h3 id=\"md-api-reference\">API Reference</h3>\n<p><include-content is-active template-ref=\"/views/api-reference/api-reference.html\"></include-content></p>\n<h3 id=\"md-examples\">Examples</h3>\n<h4 id=\"md-filter-rows-export-as-csv\">Filter rows + export as CSV</h4>\n<p>Filtering is State: write <code>filter-value</code> / <code>filter-casing</code> on the table — here a Quark <code>@on input</code> block copies the search field into them. Matching is case-insensitive unless <code>filter-casing</code> is set.</p>\n<p>Invoke <code>--export</code> on the table (<code>&lt;button command=&quot;--export&quot; commandfor=&quot;…&quot;&gt;</code>) to download its visible rows (visual sort order). The button&#39;s <code>data-file-type</code> is <code>csv</code> (default) or <code>json</code>; <code>data-file-name</code> sets the download name; <code>data-full</code> downloads every row in DOM order, regardless of filtering / sorting.</p>\n<p>The first export button is the happy path (the table as you see it, including active filter / sort). The form below it writes <code>data-file-type</code> / <code>data-file-name</code> / <code>data-full</code> onto its button.</p>\n<p><include-content data-demo=\"filter\"></include-content></p>\n"
19
+ },
20
+ "installation": {
21
+ "name": "@excom/data-table",
22
+ "shortName": "data-table",
23
+ "version": "0.1.0",
24
+ "description": "<data-table> custom element",
25
+ "packageType": "kit-element",
26
+ "cdn": "<script src=\"https://unpkg.com/@excom/kit-utils/dist/index.umd.min.js\"></script>\n<script src=\"https://unpkg.com/@excom/neutron/dist/index.umd.min.js\"></script>\n<script src=\"https://unpkg.com/@excom/data-table@0.1.0/dist/index.umd.min.js\"></script>\n<link rel=\"stylesheet\" href=\"https://unpkg.com/@excom/data-table@0.1.0/dist/index.css\">",
27
+ "install": {
28
+ "npm": "npm install @excom/data-table"
29
+ },
30
+ "imports": {
31
+ "js": "import \"@excom/data-table\";",
32
+ "css": "@import \"@excom/data-table\";",
33
+ "html": "<!-- import path to `node_modules` will depend on your build setup -->\n<script type=\"module\" src=\"/node_modules/@excom/data-table\"></script>\n<link rel=\"stylesheet\" href=\"/node_modules/@excom/data-table\">"
34
+ },
35
+ "peerDependencies": []
36
+ },
37
+ "elementApis": [
38
+ {
39
+ "tag": "data-table",
40
+ "summary": "Sortable / filterable data table — plain tags, one behavior owner.",
41
+ "kind": "class",
42
+ "attributes": [
43
+ {
44
+ "name": "filter-casing",
45
+ "type": "boolean",
46
+ "description": "Match <code>filter-value</code> case-sensitively instead of the default case-insensitive comparison.",
47
+ "fieldName": "filterCasing",
48
+ "surface": "option"
49
+ },
50
+ {
51
+ "name": "filter-value",
52
+ "type": "string",
53
+ "description": "Hides <code>data-tr</code> rows (via <code>--data-tr-display: none</code>) whose text content doesn&#39;t include this value. Case-insensitive unless <code>filter-casing</code> is set. Unset / empty clears the filter. Rows stay in the DOM so Quark bindings survive.",
54
+ "fieldName": "filterValue",
55
+ "surface": "option"
56
+ }
57
+ ],
58
+ "events": [
59
+ {
60
+ "name": "data-table-sort",
61
+ "description": "Cancelable. Dispatched when the active sort column / direction changes: on connect (if a <code>data-th</code> already has <code>sort-direction</code>) and after every <code>data-th-sort</code>. Call <code>preventDefault()</code> to take over sorting yourself.",
62
+ "type": "DataTableSortEvent",
63
+ "typeExpanded": "CustomEvent & { type: \"data-table-sort\"; detail: { sortDirection: \"asc\" | \"desc\"; columnType: \"string\" | \"number\" | \"date\"; columnIndex: number; sortFn: (a: string, b: string) => number; rows: HTMLElement[]; }; bubbles: true; cancelable: true; composed: true }",
64
+ "defaultAction": "Sorts <code>event.detail.rows</code> by <code>columnIndex</code> with <code>sortFn</code> and sets <code>--data-tr-order</code> on each row (visual CSS <code>order</code> — DOM order is unchanged)."
65
+ }
66
+ ],
67
+ "slots": [],
68
+ "cssProperties": [
69
+ {
70
+ "name": "--data-table-cols",
71
+ "description": "Column count for shared subgrid tracks. Auto-detected from the widest row; set on the host to override.",
72
+ "syntax": "<integer>",
73
+ "default": "1"
74
+ }
75
+ ],
76
+ "cssClasses": [],
77
+ "cssAliases": [
78
+ {
79
+ "name": ":--data-table",
80
+ "selectors": [
81
+ "data-table",
82
+ ".tag-data-table"
83
+ ],
84
+ "kind": "element",
85
+ "description": ""
86
+ },
87
+ {
88
+ "name": ":--data-tbody",
89
+ "selectors": [
90
+ "data-tbody",
91
+ ".tag-data-tbody"
92
+ ],
93
+ "kind": "element",
94
+ "description": ""
95
+ },
96
+ {
97
+ "name": ":--data-td",
98
+ "selectors": [
99
+ "data-td",
100
+ ".tag-data-td"
101
+ ],
102
+ "kind": "element",
103
+ "description": ""
104
+ },
105
+ {
106
+ "name": ":--data-tf",
107
+ "selectors": [
108
+ "data-tf",
109
+ ".tag-data-tf"
110
+ ],
111
+ "kind": "element",
112
+ "description": ""
113
+ },
114
+ {
115
+ "name": ":--data-tfoot",
116
+ "selectors": [
117
+ "data-tfoot",
118
+ ".tag-data-tfoot"
119
+ ],
120
+ "kind": "element",
121
+ "description": ""
122
+ },
123
+ {
124
+ "name": ":--data-thead",
125
+ "selectors": [
126
+ "data-thead",
127
+ ".tag-data-thead"
128
+ ],
129
+ "kind": "element",
130
+ "description": ""
131
+ },
132
+ {
133
+ "name": ":--data-tr",
134
+ "selectors": [
135
+ "data-tr",
136
+ ".tag-data-tr"
137
+ ],
138
+ "kind": "element",
139
+ "description": ""
140
+ }
141
+ ],
142
+ "listens": [
143
+ {
144
+ "name": "data-th-sort",
145
+ "description": "Bubbled up from a descendant <code>data-th</code> when its <code>sort-direction</code> changes. Sets that header as the active sort column (clearing <code>sort-direction</code> from the previously active one) and emits <code>data-table-sort</code>.",
146
+ "type": "DataThSortEvent",
147
+ "typeExpanded": "CustomEvent & { type: \"data-th-sort\"; detail: void; bubbles: true; cancelable: true; composed: true }"
148
+ }
149
+ ],
150
+ "commands": [
151
+ {
152
+ "name": "--export",
153
+ "description": "Builds a file from the table&#39;s <code>data-tr</code> / <code>data-td</code> / <code>data-th</code> text content and downloads it. Options are <code>data-*</code> on the invoker: <code>data-file-type</code> (<code>csv</code>, the default, or <code>json</code>), <code>data-file-name</code> (default <code>export_table_&lt;locale-date&gt;</code>), and <code>data-full</code> to download every row in DOM order instead of only the visible rows in visual sort order. Filtering needs no command: write <code>filter-value</code> / <code>filter-casing</code>."
154
+ }
155
+ ],
156
+ "defaultActions": [
157
+ {
158
+ "name": "data-table-sort",
159
+ "description": "Sorts <code>event.detail.rows</code> by <code>columnIndex</code> with <code>sortFn</code> and sets <code>--data-tr-order</code> on each row (visual CSS <code>order</code> — DOM order is unchanged)."
160
+ }
161
+ ],
162
+ "expectedChildren": [
163
+ {
164
+ "name": "descendant:data-tbody",
165
+ "relationship": "descendant",
166
+ "selector": "data-tbody",
167
+ "required": true,
168
+ "description": "Required row container. Sorting and filtering both operate on its <code>data-tr</code> children."
169
+ },
170
+ {
171
+ "name": "descendant:data-td",
172
+ "relationship": "descendant",
173
+ "selector": "data-td",
174
+ "required": true,
175
+ "description": "Cell within a <code>data-tr</code>, read as sortable / export cell content."
176
+ },
177
+ {
178
+ "name": "descendant:data-th",
179
+ "relationship": "descendant",
180
+ "selector": "data-th",
181
+ "required": true,
182
+ "description": "Sortable column header. Clicking toggles its <code>sort-direction</code> and fires <code>data-th-sort</code>, which becomes the active column."
183
+ },
184
+ {
185
+ "name": "descendant:data-tr",
186
+ "relationship": "descendant",
187
+ "selector": "data-tr",
188
+ "required": true,
189
+ "description": "Row, direct child of <code>data-tbody</code>. Gets <code>--data-tr-order</code> on sort and <code>--data-tr-display</code> on filter. DOM order is unchanged."
190
+ }
191
+ ],
192
+ "provisions": [
193
+ {
194
+ "name": "provision",
195
+ "type": "DataTableProvision",
196
+ "typeExpanded": "{ totalRows: number; visibleRows: number; sortColumnIndex: number | null; sortDirection: \"asc\" | \"desc\" | null; filterValue: string | null; }",
197
+ "description": "<code>{ totalRows, visibleRows, sortColumnIndex, sortDirection, filterValue }</code> — recomputed after connect, after the <code>data-table-sort</code> default action, and after every filter change. Not reflected as an attribute.",
198
+ "fieldName": "provision"
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "tag": "data-th",
204
+ "summary": "Sortable column header — click toggles sort direction.",
205
+ "kind": "class",
206
+ "attributes": [
207
+ {
208
+ "name": "column-type",
209
+ "type": "string",
210
+ "description": "Sort comparator to use for this column&#39;s cell values. <code>data-table</code> treats <code>null</code> as &quot;string&quot;.",
211
+ "fieldName": "columnType",
212
+ "surface": "option",
213
+ "values": "\"string\" | \"number\" | \"date\""
214
+ },
215
+ {
216
+ "name": "sort-direction",
217
+ "type": "string",
218
+ "description": "Current sort direction. A click toggles between <code>asc</code> / <code>desc</code>; setting it (by any means) fires <code>data-th-sort</code>. Only one <code>data-th</code> per table should carry this at a time — the parent <code>&lt;data-table&gt;</code> clears the previously active header when a new one is set.",
219
+ "fieldName": "sortDirection",
220
+ "surface": "hybrid",
221
+ "values": "\"asc\" | \"desc\""
222
+ }
223
+ ],
224
+ "events": [
225
+ {
226
+ "name": "data-th-sort",
227
+ "description": "Dispatched whenever <code>sort-direction</code> is set, whether by a click or programmatically. Bubbles to the parent <code>&lt;data-table&gt;</code>.",
228
+ "type": "DataThSortEvent",
229
+ "typeExpanded": "CustomEvent & { type: \"data-th-sort\"; detail: void; bubbles: true; cancelable: true; composed: true }"
230
+ }
231
+ ],
232
+ "slots": [],
233
+ "cssProperties": [],
234
+ "cssClasses": [],
235
+ "cssAliases": [
236
+ {
237
+ "name": ":--data-th",
238
+ "selectors": [
239
+ "data-th",
240
+ ".tag-data-th"
241
+ ],
242
+ "kind": "element",
243
+ "description": ""
244
+ },
245
+ {
246
+ "name": ":--data-th--sort",
247
+ "selectors": [
248
+ ":is(:--data-th)"
249
+ ],
250
+ "kind": "state",
251
+ "description": ""
252
+ },
253
+ {
254
+ "name": ":--data-th--sort-asc",
255
+ "selectors": [
256
+ "[sort-direction=\"asc\"]",
257
+ "[aria-sort=\"ascending\"]"
258
+ ],
259
+ "kind": "state",
260
+ "description": ""
261
+ },
262
+ {
263
+ "name": ":--data-th--sort-desc",
264
+ "selectors": [
265
+ "[sort-direction=\"desc\"]",
266
+ "[aria-sort=\"descending\"]"
267
+ ],
268
+ "kind": "state",
269
+ "description": ""
270
+ }
271
+ ],
272
+ "listens": [],
273
+ "commands": [],
274
+ "defaultActions": [],
275
+ "expectedChildren": [],
276
+ "provisions": []
277
+ }
278
+ ],
279
+ "exportedFiles": {}
280
+ }