@fusion.dev/helix-headless 0.229.1 → 0.230.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.
@@ -57,6 +57,10 @@ export { edgeOf } from '../edge.js';
57
57
  * `separator` on its end edge, moved by dragging or with the arrow keys. In a
58
58
  * table with reorderable columns, each column has a grip that the table moves.
59
59
  *
60
+ * A sortable heading draws two chevrons after its words. The chevron for the
61
+ * current direction takes the heading's ink, so you can see which columns sort
62
+ * and which way the table is sorted.
63
+ *
60
64
  * @since 0.1.0
61
65
  * @status stable
62
66
  * @aliases Column header, Th
@@ -72,6 +76,9 @@ export { edgeOf } from '../edge.js';
72
76
  * @csspart grip-mark - The icon on the grip.
73
77
  * @csspart resizer - The edge that is dragged to change the width, when the column is resizable.
74
78
  * @csspart sort - The button that a sortable heading renders as.
79
+ * @csspart sort-down - The lower chevron of `sort-mark`, which shows a descending sort.
80
+ * @csspart sort-mark - The two chevrons on a sortable heading. To remove them, set `display: none` on this part.
81
+ * @csspart sort-up - The upper chevron of `sort-mark`, which shows an ascending sort.
75
82
  *
76
83
  * @cssstate sorted-ascending - While the table is sorted by this column, smallest first.
77
84
  * @cssstate sorted-descending - While the table is sorted by this column, largest first.
@@ -182,7 +182,10 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
182
182
  </svg>
183
183
  </button>`
184
184
  : nothing}${this.canSort
185
- ? html `<button part="sort" type="button" tabindex=${control} aria-description=${this.sortWords || nothing}><slot></slot></button>`
185
+ ? html `<button part="sort" type="button" tabindex=${control} aria-description=${this.sortWords || nothing}><slot></slot><svg aria-hidden="true" fill="none" part="sort-mark" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.9" viewBox="0 0 18 18">
186
+ <path d="M5.5 7.2 9 3.7l3.5 3.5" part="sort-up" />
187
+ <path d="M5.5 10.8 9 14.3l3.5-3.5" part="sort-down" />
188
+ </svg></button>`
186
189
  : html `<slot></slot>`}${this.resizable
187
190
  ? html `<span
188
191
  part="resizer"