@redvars/peacock 3.15.0 → 3.17.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 (157) hide show
  1. package/dist/assets/styles.css +1 -1
  2. package/dist/assets/styles.css.map +1 -1
  3. package/dist/assets/theme.js +19 -19
  4. package/dist/assets/tokens.css +1 -1
  5. package/dist/assets/tokens.css.map +1 -1
  6. package/dist/card-content.js +8 -7
  7. package/dist/card-content.js.map +1 -1
  8. package/dist/card.js +142 -98
  9. package/dist/card.js.map +1 -1
  10. package/dist/{chart-bar-D5dGFJfK.js → cartesian-chart-DgE4USyC.js} +529 -312
  11. package/dist/cartesian-chart-DgE4USyC.js.map +1 -0
  12. package/dist/chart-area.js +78 -0
  13. package/dist/chart-area.js.map +1 -0
  14. package/dist/chart-bar.js +283 -213
  15. package/dist/chart-bar.js.map +1 -1
  16. package/dist/{transform-DSwFSqzD.js → chart-base-C2qRMF48.js} +771 -102
  17. package/dist/chart-base-C2qRMF48.js.map +1 -0
  18. package/dist/chart-doughnut.js +55 -287
  19. package/dist/chart-doughnut.js.map +1 -1
  20. package/dist/chart-line.js +626 -0
  21. package/dist/chart-line.js.map +1 -0
  22. package/dist/chart-pie.js +637 -195
  23. package/dist/chart-pie.js.map +1 -1
  24. package/dist/code-editor.js +704 -131
  25. package/dist/code-editor.js.map +1 -1
  26. package/dist/code-group.js +188 -0
  27. package/dist/code-group.js.map +1 -0
  28. package/dist/code-highlighter.js +895 -257
  29. package/dist/code-highlighter.js.map +1 -1
  30. package/dist/custom-elements-jsdocs.json +2278 -677
  31. package/dist/custom-elements.json +13962 -3690
  32. package/dist/image.js +5 -1
  33. package/dist/image.js.map +1 -1
  34. package/dist/index.js +8 -7
  35. package/dist/index.js.map +1 -1
  36. package/dist/loader-full.js +1 -1
  37. package/dist/loader.js +9 -3
  38. package/dist/loader.js.map +1 -1
  39. package/dist/{is-dark-mode-DOcaw4Yq.js → observe-theme-change-DCifz1uv.js} +2 -6
  40. package/dist/observe-theme-change-DCifz1uv.js.map +1 -0
  41. package/dist/pagination.js +408 -110
  42. package/dist/pagination.js.map +1 -1
  43. package/dist/path-CJ0Arqcy.js +166 -0
  44. package/dist/path-CJ0Arqcy.js.map +1 -0
  45. package/dist/snackbar.js +89 -34
  46. package/dist/snackbar.js.map +1 -1
  47. package/dist/src/__internal/chart/cartesian-chart.d.ts +80 -0
  48. package/dist/src/__internal/chart/chart-base.d.ts +113 -0
  49. package/dist/src/__internal/chart/paths.d.ts +5 -0
  50. package/dist/src/__internal/chart/types.d.ts +42 -0
  51. package/dist/src/card/card-content.d.ts +2 -3
  52. package/dist/src/card/card.d.ts +31 -17
  53. package/dist/src/chart-area/chart-area.d.ts +54 -0
  54. package/dist/src/chart-area/index.d.ts +1 -0
  55. package/dist/src/chart-bar/chart-bar.d.ts +44 -33
  56. package/dist/src/chart-bar/index.d.ts +0 -1
  57. package/dist/src/chart-doughnut/chart-doughnut.d.ts +33 -39
  58. package/dist/src/chart-line/chart-line.d.ts +69 -0
  59. package/dist/src/chart-line/index.d.ts +1 -0
  60. package/dist/src/chart-pie/chart-pie.d.ts +63 -28
  61. package/dist/src/code-editor/code-editor.d.ts +52 -13
  62. package/dist/src/code-editor/editor-theme.d.ts +60 -0
  63. package/dist/src/code-highlighter/code-group.d.ts +52 -0
  64. package/dist/src/code-highlighter/code-highlighter.d.ts +122 -15
  65. package/dist/src/code-highlighter/index.d.ts +1 -0
  66. package/dist/src/code-highlighter/line-ranges.d.ts +24 -0
  67. package/dist/src/code-highlighter/local.d.ts +4 -1
  68. package/dist/src/code-highlighter/token-colors.d.ts +8 -0
  69. package/dist/src/index.d.ts +4 -2
  70. package/dist/src/pagination/page-items.d.ts +14 -0
  71. package/dist/src/pagination/pagination.d.ts +46 -7
  72. package/dist/src/snackbar/snackbar.d.ts +13 -1
  73. package/dist/src/table/table.d.ts +125 -27
  74. package/dist/src/toolbar/toolbar.d.ts +56 -51
  75. package/dist/table.js +1007 -338
  76. package/dist/table.js.map +1 -1
  77. package/dist/test/chart.test.d.ts +1 -0
  78. package/dist/test/code-highlighter.test.d.ts +1 -0
  79. package/dist/test/pagination.test.d.ts +1 -0
  80. package/dist/test/table.test.d.ts +1 -0
  81. package/dist/token-colors-0TFHWbcq.js +81 -0
  82. package/dist/token-colors-0TFHWbcq.js.map +1 -0
  83. package/dist/toolbar.js +195 -184
  84. package/dist/toolbar.js.map +1 -1
  85. package/dist/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +1 -2
  87. package/readme.md +7 -6
  88. package/scss/_code-block.scss +139 -0
  89. package/scss/tokens.css +24 -0
  90. package/src/__internal/chart/cartesian-chart.ts +404 -0
  91. package/src/__internal/chart/chart-base.scss +252 -0
  92. package/src/__internal/chart/chart-base.ts +474 -0
  93. package/src/__internal/chart/paths.ts +28 -0
  94. package/src/__internal/chart/types.ts +49 -0
  95. package/src/card/card-content.ts +12 -9
  96. package/src/card/card.scss +66 -54
  97. package/src/card/card.ts +109 -73
  98. package/src/chart-area/chart-area.ts +82 -0
  99. package/src/chart-area/index.ts +1 -0
  100. package/src/chart-bar/chart-bar.ts +336 -250
  101. package/src/chart-bar/index.ts +0 -1
  102. package/src/chart-doughnut/chart-doughnut.ts +62 -262
  103. package/src/chart-doughnut/demo/index.html +14 -22
  104. package/src/chart-line/chart-line.scss +25 -0
  105. package/src/chart-line/chart-line.ts +346 -0
  106. package/src/chart-line/index.ts +1 -0
  107. package/src/chart-pie/chart-pie.scss +35 -16
  108. package/src/chart-pie/chart-pie.ts +282 -188
  109. package/src/chart-pie/demo/index.html +13 -21
  110. package/src/code-editor/code-editor.scss +132 -36
  111. package/src/code-editor/code-editor.ts +308 -88
  112. package/src/code-editor/demo/index.html +39 -12
  113. package/src/code-editor/editor-theme.ts +213 -0
  114. package/src/code-highlighter/code-group.scss +34 -0
  115. package/src/code-highlighter/code-group.ts +173 -0
  116. package/src/code-highlighter/code-highlighter.scss +226 -111
  117. package/src/code-highlighter/code-highlighter.ts +554 -199
  118. package/src/code-highlighter/demo/index.html +68 -4
  119. package/src/code-highlighter/index.ts +1 -0
  120. package/src/code-highlighter/line-ranges.ts +81 -0
  121. package/src/code-highlighter/local.ts +9 -3
  122. package/src/code-highlighter/token-colors.ts +42 -0
  123. package/src/index.ts +4 -2
  124. package/src/loader.ts +8 -2
  125. package/src/pagination/page-items.ts +50 -0
  126. package/src/pagination/pagination.scss +159 -44
  127. package/src/pagination/pagination.ts +275 -74
  128. package/src/snackbar/demo/index.html +39 -4
  129. package/src/snackbar/snackbar.scss +27 -10
  130. package/src/snackbar/snackbar.ts +80 -37
  131. package/src/table/table.scss +337 -109
  132. package/src/table/table.ts +812 -272
  133. package/src/toolbar/toolbar-colors.scss +6 -7
  134. package/src/toolbar/toolbar.scss +35 -106
  135. package/src/toolbar/toolbar.ts +180 -80
  136. package/dist/array-D5vjT2Xm.js +0 -14
  137. package/dist/array-D5vjT2Xm.js.map +0 -1
  138. package/dist/chart-bar-D5dGFJfK.js.map +0 -1
  139. package/dist/chart-stacked-bar.js +0 -403
  140. package/dist/chart-stacked-bar.js.map +0 -1
  141. package/dist/copy-to-clipboard-upGx-Ueo.js +0 -39
  142. package/dist/copy-to-clipboard-upGx-Ueo.js.map +0 -1
  143. package/dist/is-dark-mode-DOcaw4Yq.js.map +0 -1
  144. package/dist/pie-Dz0IDiPt.js +0 -537
  145. package/dist/pie-Dz0IDiPt.js.map +0 -1
  146. package/dist/pierre-dark-DFWl0m-C.js +0 -4
  147. package/dist/pierre-dark-DFWl0m-C.js.map +0 -1
  148. package/dist/pierre-light-BEkAPImt.js +0 -4
  149. package/dist/pierre-light-BEkAPImt.js.map +0 -1
  150. package/dist/src/chart-bar/chart-stacked-bar.d.ts +0 -78
  151. package/dist/src/code-highlighter/constants.d.ts +0 -1
  152. package/dist/transform-DSwFSqzD.js.map +0 -1
  153. package/src/chart-bar/chart-bar.scss +0 -58
  154. package/src/chart-bar/chart-stacked-bar.ts +0 -398
  155. package/src/chart-doughnut/chart-donut.scss +0 -37
  156. package/src/code-highlighter/constants.ts +0 -117
  157. /package/dist/test/{chart-bar.test.d.ts → card.test.d.ts} +0 -0
@@ -1,18 +1,23 @@
1
1
  import { LitElement } from 'lit';
2
2
  import type { PropertyValues } from 'lit';
3
+ export type PaginationVariant = 'full' | 'compact' | 'simple';
3
4
  /**
4
5
  * @label Pagination
5
6
  * @tag wc-pagination
6
7
  * @rawTag pagination
7
- * @summary A pagination control with page size selector, item count display, and previous/next navigation.
8
+ * @summary A pagination control with page numbers, a rows-per-page selector and the current item range.
8
9
  * @overview
9
- * <p>The pagination component provides controls for navigating through paged data sets.</p>
10
+ * <p>The pagination component moves through paged data. It shows the current item range, the pages and a rows-per-page selector.</p>
11
+ * <p>Three variants cover different data sets: <code>full</code> lists page numbers with ellipses, <code>compact</code> shows "Page [n] of N" with a field to jump to a page, and <code>simple</code> shows previous and next only. When <code>total-items</code> is not set, the total is unknown (cursor-based APIs): the control shows previous and next, and <code>has-next</code> says whether another page exists.</p>
12
+ * <p>On a narrow container the <code>full</code> variant collapses to <code>compact</code>.</p>
10
13
  *
11
14
  * @fires {CustomEvent} page - Dispatched when the page or page size changes. Detail: `{ page, pageSize }`.
12
15
  *
16
+ * @cssprop --pagination-background - Background of the control. Defaults to the surface color.
17
+ *
13
18
  * @example
14
19
  * ```html
15
- * <wc-pagination style="width: 100%;" page="1" page-size="10" total-items="100"></wc-pagination>
20
+ * <wc-pagination style="width: 100%;" page="1" page-size="10" total-items="240"></wc-pagination>
16
21
  * ```
17
22
  * @tags navigation, data
18
23
  */
@@ -27,19 +32,53 @@ export declare class Pagination extends LitElement {
27
32
  */
28
33
  pageSize: number;
29
34
  /**
30
- * Total number of items.
35
+ * Total number of items. Leave it unset when the total is unknown; the control then shows
36
+ * previous and next only, and `has-next` decides whether next is enabled.
31
37
  */
32
- totalItems: number;
38
+ totalItems: number | undefined;
33
39
  /**
34
40
  * Supported page size options.
35
41
  */
36
42
  pageSizes: number[];
43
+ /**
44
+ * How the pages are shown: `full` (page numbers), `compact` ("Page [n] of N") or `simple`
45
+ * (previous and next only). Defaults to `full`.
46
+ */
47
+ variant: PaginationVariant;
48
+ /**
49
+ * Whether another page exists after this one. Used only when `total-items` is unset.
50
+ */
51
+ hasNext: boolean;
52
+ /**
53
+ * Shows buttons that jump to the first and the last page.
54
+ */
55
+ showFirstLast: boolean;
56
+ /**
57
+ * Hides the rows-per-page selector.
58
+ */
59
+ hidePageSize: boolean;
60
+ /**
61
+ * Accessible name of the navigation landmark. Defaults to `"Pagination"`.
62
+ */
63
+ label: string;
37
64
  protected willUpdate(changedProperties: PropertyValues<Pagination>): void;
65
+ /** True when the total is known. */
66
+ private get hasTotal();
67
+ /** The number of pages, or `undefined` when the total is unknown. */
38
68
  private getTotalPages;
69
+ private get isFirstPage();
70
+ private get isLastPage();
71
+ /** The variant actually rendered: an unknown total can only go previous and next. */
72
+ private get effectiveVariant();
73
+ private getRangeText;
39
74
  private setPage;
40
75
  private handlePageSizeChange;
41
- private handlePreviousPage;
42
- private handleNextPage;
76
+ private handlePageInput;
77
+ private handlePageInputKeydown;
43
78
  private dispatchPageEvent;
79
+ private renderNavButton;
80
+ private renderPageList;
81
+ private renderPageJump;
82
+ private renderPageSize;
44
83
  render(): import("lit-html").TemplateResult<1>;
45
84
  }
@@ -5,6 +5,11 @@ import { LitElement } from 'lit';
5
5
  * @rawTag snackbar
6
6
  * @summary Snackbars provide brief messages about app processes at the bottom of the screen.
7
7
  *
8
+ * @overview
9
+ * <p>An open snackbar is shown as a manual popover, so it renders in the browser's top layer, above sticky
10
+ * headers, app bars and open modals whatever their <code>z-index</code>. Opening it again while it is
11
+ * visible brings it back in front of anything opened since.</p>
12
+ *
8
13
  * @cssprop --snackbar-container-color - Container color for the snackbar.
9
14
  * @cssprop --snackbar-label-text-color - Label text color for the snackbar.
10
15
  * @cssprop --snackbar-action-text-color - Action text color.
@@ -12,7 +17,7 @@ import { LitElement } from 'lit';
12
17
  * @cssprop --snackbar-border-radius - Border radius of the snackbar surface.
13
18
  * @cssprop --snackbar-offset-inline - Inline offset from viewport edges.
14
19
  * @cssprop --snackbar-offset-bottom - Bottom offset from viewport edge.
15
- * @cssprop --snackbar-z-index - Stacking order for the snackbar.
20
+ * @cssprop --snackbar-z-index - Stacking order for the snackbar in browsers without the Popover API.
16
21
  *
17
22
  * @example
18
23
  * ```html
@@ -40,6 +45,8 @@ export declare class Snackbar extends LitElement {
40
45
  preview: boolean;
41
46
  /** True while the exit animation is running before the snackbar fully closes. */
42
47
  private dismissing;
48
+ /** The positioned layer that is shown in the top layer as a popover. */
49
+ private layer?;
43
50
  /** Timer handle for the auto-hide timeout. */
44
51
  private hideTimer;
45
52
  /** Timer handle for the exit animation duration timeout. */
@@ -58,6 +65,11 @@ export declare class Snackbar extends LitElement {
58
65
  private clearTimer;
59
66
  private clearExitTimer;
60
67
  private handleAnimationEnd;
68
+ /**
69
+ * Shows the layer in the top layer while the snackbar is open, and hides it otherwise.
70
+ * With `raise`, an already showing layer is shown again so it moves above newer top-layer elements.
71
+ */
72
+ private syncLayer;
61
73
  private scheduleAutoHide;
62
74
  render(): import("lit-html").TemplateResult<1>;
63
75
  }
@@ -1,10 +1,33 @@
1
1
  import { LitElement } from 'lit';
2
+ import type { PropertyValues, TemplateResult } from 'lit';
3
+ import type { PaginationVariant } from '../pagination/pagination.js';
4
+ /** A record shown in one row. */
5
+ export type TableRow = Record<string, any>;
2
6
  export interface TableColumn {
7
+ /** Field of the row shown in this column. */
3
8
  name: string;
9
+ /** Header text. */
4
10
  label: string;
11
+ /** Width in rem. Defaults to 16. */
5
12
  width?: number;
6
- fixed?: boolean;
7
- template?: (row: any, column: TableColumn) => string;
13
+ /**
14
+ * Keeps the column in view while the table scrolls sideways. `true` or `"start"` pins it to
15
+ * the start edge, `"end"` to the end edge (for example a row-actions column).
16
+ */
17
+ fixed?: boolean | 'start' | 'end';
18
+ /** Horizontal alignment. Number columns default to `"end"`, others to `"start"`. */
19
+ align?: 'start' | 'center' | 'end';
20
+ /** Data type. `"number"` aligns to the end and uses tabular figures. */
21
+ type?: 'text' | 'number';
22
+ /** Set to `false` to turn sorting off for this column only. */
23
+ sortable?: boolean;
24
+ /** Lets long text wrap instead of truncating with an ellipsis. */
25
+ wrap?: boolean;
26
+ /**
27
+ * Custom cell content. Return a Lit `TemplateResult` (preferred), or a string of trusted
28
+ * HTML. A string is inserted as HTML without escaping, so never build it from user input.
29
+ */
30
+ template?: (row: TableRow, column: TableColumn) => string | TemplateResult;
8
31
  }
9
32
  /**
10
33
  * @label Table
@@ -12,16 +35,25 @@ export interface TableColumn {
12
35
  * @rawTag table
13
36
  * @summary A configurable component for displaying tabular data.
14
37
  * @overview
15
- * <p>The table component displays rows of data with support for sorting, pagination, row selection, and fixed columns.</p>
38
+ * <p>The table displays rows of data with sorting, pagination, row selection, sticky header and sticky start or end columns.</p>
39
+ * <p>It follows the grid keyboard pattern: the table is one tab stop and the arrow keys move between cells. <kbd>Space</kbd> selects the focused row, <kbd>Enter</kbd> activates the focused cell, and <kbd>Ctrl</kbd>+<kbd>C</kbd> copies its text.</p>
40
+ * <p>When rows are selected, a bar over the header shows the count and the actions placed in the <code>bulk-actions</code> slot.</p>
16
41
  *
17
- * @fires {CustomEvent} cell-click - Dispatched when a table cell is clicked.
18
- * @fires {CustomEvent} selection-change - Dispatched when the row selection changes.
19
- * @fires {CustomEvent} sort - Dispatched when the table is sorted.
20
- * @fires {CustomEvent} page - Dispatched when the page or page size changes.
42
+ * @fires {CustomEvent} cell-click - Dispatched when a cell is clicked or activated with Enter. Detail: `{ record, column, altKey, ctrlKey, metaKey, shiftKey }`.
43
+ * @fires {CustomEvent} row-click - Dispatched when a row is clicked or activated with Enter. Detail: `{ record }`.
44
+ * @fires {CustomEvent} selection-change - Dispatched when the row selection changes. Detail: `{ value, isSelectAll, allPages }`.
45
+ * @fires {CustomEvent} sort - Dispatched when the table is sorted. Detail: `{ sortBy, sortOrder }`.
46
+ * @fires {CustomEvent} page - Dispatched when the page or page size changes. Detail: `{ page, pageSize }`.
47
+ *
48
+ * @slot bulk-actions - Actions shown in the selection bar while rows are selected.
49
+ *
50
+ * @cssprop --table-row-height - Minimum height of a row. Set by `density`.
51
+ * @cssprop --table-border-color - Color of the row dividers.
52
+ * @cssprop --table-cell-padding-inline - Horizontal padding of a cell.
21
53
  *
22
54
  * @example
23
55
  * ```html
24
- * <wc-table columns="[{'name': 'name','label': 'Name','width': 16},{'name': 'age','label': 'Age','width': 7}]" data="[{'name': 'John','age': 30},{'name': 'Jane','age': 25}]"></wc-table>
56
+ * <wc-table columns="[{'name': 'name','label': 'Name','width': 16},{'name': 'age','label': 'Age','width': 7,'type': 'number'}]" data="[{'name': 'John','age': 30},{'name': 'Jane','age': 25}]"></wc-table>
25
57
  * ```
26
58
  * @tags display, data
27
59
  */
@@ -29,13 +61,13 @@ export declare class Table extends LitElement {
29
61
  static styles: import("lit").CSSResultGroup[];
30
62
  /**
31
63
  * Grid columns configuration.
32
- * Each column can have: name, label, width (px), fixed (boolean), template (function).
64
+ * Each column can have: name, label, width (rem), fixed, align, type, sortable, wrap, template.
33
65
  */
34
66
  columns: TableColumn[];
35
67
  /**
36
68
  * Grid data to display on table.
37
69
  */
38
- data: any[];
70
+ data: TableRow[];
39
71
  /**
40
72
  * Row selection type. Set to `"checkbox"` to enable checkbox selection.
41
73
  */
@@ -65,7 +97,7 @@ export declare class Table extends LitElement {
65
97
  */
66
98
  sortOrder: 'asc' | 'desc';
67
99
  /**
68
- * If true, pagination is enabled. Defaults to `true`.
100
+ * If true, pagination is enabled. Defaults to `false`.
69
101
  */
70
102
  paginate: boolean;
71
103
  /**
@@ -77,9 +109,39 @@ export declare class Table extends LitElement {
77
109
  */
78
110
  pageSize: number;
79
111
  /**
80
- * Total number of items (used in managed/controlled mode).
112
+ * Supported page size options, passed to the pagination.
113
+ */
114
+ pageSizes: number[] | undefined;
115
+ /**
116
+ * Total number of items (used in managed/controlled mode). Leave it unset when the total is
117
+ * unknown; the pagination then shows previous and next, driven by `has-next`.
81
118
  */
82
119
  totalItems: number | undefined;
120
+ /**
121
+ * Whether another page exists after this one, in managed mode with an unknown total.
122
+ */
123
+ hasNext: boolean;
124
+ /**
125
+ * Pagination variant: `full` (page numbers), `compact` or `simple`. Defaults to `full`.
126
+ */
127
+ paginationVariant: PaginationVariant;
128
+ /**
129
+ * Row height: `compact`, `default` or `comfortable`. Defaults to `default`.
130
+ */
131
+ density: 'compact' | 'default' | 'comfortable';
132
+ /**
133
+ * Shades every other row.
134
+ */
135
+ striped: boolean;
136
+ /**
137
+ * Shows a loading state: skeleton rows while there is no data, otherwise a progress bar
138
+ * under the header so the current rows stay readable.
139
+ */
140
+ loading: boolean;
141
+ /**
142
+ * Accessible name of the table.
143
+ */
144
+ label: string;
83
145
  /**
84
146
  * Headline text shown when the table has no data.
85
147
  */
@@ -88,28 +150,64 @@ export declare class Table extends LitElement {
88
150
  * Description text shown when the table has no data.
89
151
  */
90
152
  emptyStateDescription: string;
91
- /** Tracks the currently hovered row and column for hover-highlight CSS. */
92
- private hoveredCell;
93
- /** True when all rows on the current page are selected. */
94
- private isSelectAll;
95
- /** True when some (but not all) rows on the current page are selected. */
96
- private isSelectAllIntermediate;
97
- /** True when the scroll container has been scrolled horizontally. */
98
- private isHorizontallyScrolled;
99
- /** Throttled version of the cell-mouseover handler to avoid excessive state updates. */
100
- private onCellMouseOverThrottled;
153
+ /** True when every item across all pages is selected, not only the current page. */
154
+ private allPagesSelected;
155
+ /** True when content is scrolled under the start-pinned columns. */
156
+ private scrolledFromStart;
157
+ /** True when more content waits past the end-pinned columns. */
158
+ private scrolledFromEnd;
159
+ /** The cell that holds the grid's single tab stop. Row 0 is the header. */
160
+ private activeCell;
161
+ private scrollContainer?;
162
+ /** Set when a keyboard move must focus the active cell after the next render. */
163
+ private pendingFocus;
164
+ /** Watches the scroll container so the edge shadows follow resizes. */
165
+ private resizeObserver?;
166
+ disconnectedCallback(): void;
167
+ firstUpdated(): void;
168
+ protected willUpdate(changed: PropertyValues<Table>): void;
169
+ protected updated(changed: PropertyValues<Table>): void;
170
+ /** Columns in visual order: checkbox, start-pinned, scrolling, end-pinned. */
171
+ private getGridColumns;
172
+ private static getPlacement;
173
+ private static getAlign;
174
+ private static getWidth;
175
+ private get totalColumnsWidth();
176
+ private isColumnSortable;
177
+ /** Total item count across pages, or `undefined` when it is unknown. */
178
+ private getTotalItems;
179
+ /** Rows shown on the current page, sorted and sliced unless the table is managed. */
180
+ private getPageRows;
181
+ /** Compares numbers by value and everything else as text with natural number order. */
182
+ private static compare;
183
+ private getRowKey;
184
+ private onSortClick;
101
185
  private onSelectAllClick;
102
186
  private onRowSelectClick;
187
+ private selectAllPages;
188
+ private clearSelection;
103
189
  private onSelectChange;
104
190
  private onCellClick;
191
+ private dispatchCellEvents;
192
+ private onPage;
105
193
  private onScrollContainer;
106
- private get totalColumnsWidth();
107
- private getTotalItems;
108
- private getSortIcon;
109
- private onSortClick;
194
+ private updateScrollEdges;
195
+ private getCell;
196
+ /** The element that takes focus for a cell: its sort button, or the cell itself. */
197
+ private getFocusTarget;
198
+ private tabIndexFor;
199
+ private onGridFocusIn;
200
+ private onGridKeydown;
201
+ private renderCellContent;
202
+ private cellClasses;
203
+ private cellStyle;
204
+ /** Splits a row's cells into the start-pinned, scrolling and end-pinned groups. */
205
+ private renderRowGroups;
110
206
  private renderHeader;
111
207
  private renderBody;
208
+ private renderSkeletonBody;
112
209
  private renderEmptyState;
210
+ private renderBulkBar;
113
211
  private renderPagination;
114
- render(): import("lit-html").TemplateResult<1>;
212
+ render(): TemplateResult<1>;
115
213
  }
@@ -1,89 +1,94 @@
1
1
  import { LitElement } from 'lit';
2
- import { type LegacySize, type Size } from '@/__internal/utils/size.js';
3
2
  /**
4
3
  * @label Toolbar
5
4
  * @tag wc-toolbar
6
5
  * @rawTag toolbar
7
6
  *
8
- * @summary A toolbar / app bar for navigation and actions.
7
+ * @summary A group of related actions, such as editor formatting controls.
9
8
  * @overview
10
- * <p>The toolbar component implements the app bar pattern. It supports a
11
- * docked (attached) variant for bottom-panel navigation and a floating (detached pill-shaped)
12
- * variant. The floating variant supports both horizontal and vertical orientations.</p>
9
+ * <p>The toolbar groups related actions into one control. The <code>floating</code> variant
10
+ * (default) is an elevated pill that sits over content, such as a canvas or a selection. The
11
+ * <code>flat</code> variant has no container of its own, for embedding in existing chrome like a
12
+ * card or editor header. Both variants lay their actions out horizontally or vertically.</p>
13
13
  *
14
- * <p>Render toolbar actions directly as children of the component. The docked variant is
15
- * optimized for a horizontal action row, while the floating variant supports both horizontal
16
- * and vertical layouts.</p>
14
+ * <p>Render actions directly as children. Use a <code>wc-divider</code> to separate groups of
15
+ * actions; in a horizontal toolbar give it the <code>vertical</code> attribute.</p>
16
+ *
17
+ * <p>The toolbar follows the WAI-ARIA toolbar pattern: it is a single tab stop, and the arrow
18
+ * keys along its orientation move focus between actions (Home and End jump to the first and last).
19
+ * Disabled actions and dividers are skipped. Give the toolbar an <code>aria-label</code>.</p>
17
20
  *
18
21
  * @cssprop --toolbar-container-color - Background color of the toolbar.
19
- * @cssprop --toolbar-container-shape - Border radius of the toolbar. Relevant for the floating variant.
20
- * @cssprop --toolbar-height - Height of the toolbar (docked horizontal / floating horizontal).
21
- * @cssprop --toolbar-padding-inline - Inline padding of the toolbar.
22
- * @cssprop --toolbar-gap - Gap between toolbar sections.
23
- * @cssprop --toolbar-icon-color - Color of icon slots.
24
- * @cssprop --toolbar-title-color - Color of the title (default slot) text.
25
- * @cssprop --toolbar-shadow - Box-shadow of the toolbar.
22
+ * @cssprop --toolbar-container-shape - Border radius of the floating toolbar.
23
+ * @cssprop --toolbar-padding - Padding of the floating toolbar.
24
+ * @cssprop --toolbar-gap - Gap between toolbar actions.
25
+ * @cssprop --toolbar-icon-color - Color of icons inside the toolbar.
26
+ * @cssprop --toolbar-content-color - Color of text inside the toolbar.
26
27
  *
27
28
  * @example
28
29
  * ```html
29
- * <!-- Docked toolbar -->
30
- * <wc-toolbar>
31
- * <wc-icon-button variant="text" color="surface"><wc-icon name="home"></wc-icon></wc-icon-button>
32
- * <wc-icon-button variant="tonal"><wc-icon name="search"></wc-icon></wc-icon-button>
33
- * <wc-icon-button variant="text" color="surface"><wc-icon name="favorite"></wc-icon></wc-icon-button>
34
- * <wc-icon-button variant="text" color="surface"><wc-icon name="account_circle"></wc-icon></wc-icon-button>
30
+ * <!-- Floating toolbar -->
31
+ * <wc-toolbar aria-label="Formatting">
32
+ * <wc-icon-button variant="text" color="surface" aria-label="Undo"><wc-icon name="undo"></wc-icon></wc-icon-button>
33
+ * <wc-icon-button variant="text" color="surface" aria-label="Redo"><wc-icon name="redo"></wc-icon></wc-icon-button>
34
+ * <wc-divider vertical></wc-divider>
35
+ * <wc-icon-button variant="tonal" aria-label="Bold"><wc-icon name="format_bold"></wc-icon></wc-icon-button>
36
+ * <wc-icon-button variant="text" color="surface" aria-label="Italic"><wc-icon name="format_italic"></wc-icon></wc-icon-button>
35
37
  * </wc-toolbar>
36
38
  * ```
37
39
  *
38
40
  * @example
39
41
  * ```html
40
- * <!-- Floating horizontal toolbar -->
41
- * <wc-toolbar variant="floating" orientation="horizontal">
42
- * <wc-icon-button variant="tonal"><wc-icon name="home"></wc-icon></wc-icon-button>
43
- * <wc-icon-button variant="text"><wc-icon name="search"></wc-icon></wc-icon-button>
44
- * <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
42
+ * <!-- Vertical floating toolbar -->
43
+ * <wc-toolbar orientation="vertical" aria-label="Tools">
44
+ * <wc-icon-button variant="tonal" aria-label="Select"><wc-icon name="arrow_selector_tool"></wc-icon></wc-icon-button>
45
+ * <wc-icon-button variant="text" color="surface" aria-label="Draw"><wc-icon name="draw"></wc-icon></wc-icon-button>
46
+ * <wc-icon-button variant="text" color="surface" aria-label="Text"><wc-icon name="text_fields"></wc-icon></wc-icon-button>
45
47
  * </wc-toolbar>
46
48
  * ```
47
49
  *
48
50
  * @example
49
51
  * ```html
50
- * <!-- Floating vertical toolbar -->
51
- * <wc-toolbar variant="floating" orientation="vertical">
52
- * <wc-icon-button variant="tonal"><wc-icon name="home"></wc-icon></wc-icon-button>
53
- * <wc-icon-button variant="text"><wc-icon name="search"></wc-icon></wc-icon-button>
54
- * <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
52
+ * <!-- Flat toolbar inside existing chrome -->
53
+ * <wc-toolbar variant="flat" aria-label="Row actions">
54
+ * <wc-icon-button variant="text" color="surface" aria-label="Edit"><wc-icon name="edit"></wc-icon></wc-icon-button>
55
+ * <wc-icon-button variant="text" color="surface" aria-label="Delete"><wc-icon name="delete"></wc-icon></wc-icon-button>
55
56
  * </wc-toolbar>
56
57
  * ```
57
- * @tags display navigation
58
+ * @tags display
58
59
  */
59
60
  export declare class Toolbar extends LitElement {
60
61
  static styles: import("lit").CSSResultGroup[];
61
62
  /**
62
- * Visual and layout variant of the toolbar.
63
- * - `"docked"`: A full-width bar attached to the edge of the screen (default).
64
- * - `"floating"`: A detached pill-shaped toolbar that floats over content.
63
+ * Visual variant of the toolbar.
64
+ * - `"floating"`: An elevated pill that floats over content (default).
65
+ * - `"flat"`: No container, fill or elevation; for embedding in existing chrome.
65
66
  */
66
- variant: 'docked' | 'floating';
67
+ variant: 'floating' | 'flat';
67
68
  /**
68
- * Orientation of the toolbar content.
69
- * - `"horizontal"`: Items are laid out left to right (default).
70
- * - `"vertical"`: Items are stacked top to bottom. Primarily useful for the floating variant.
69
+ * Orientation of the toolbar. It sets the layout direction and the arrow keys that move focus
70
+ * (Left/Right for horizontal, Up/Down for vertical).
71
71
  */
72
72
  orientation: 'horizontal' | 'vertical';
73
73
  /**
74
- * Size of the docked toolbar.
75
- * - `"sm"`: 80dp height (default).
76
- * - `"md"`: 96dp height.
77
- * - `"lg"`: 112dp height.
78
- *
79
- * The long names `"small"`, `"medium"` and `"large"` still work but are deprecated.
80
- */
81
- size: Size | LegacySize;
82
- /**
83
- * Whether the toolbar is visually elevated (adds a shadow).
74
+ * Raises the floating toolbar to a higher elevation. Has no effect on the flat variant.
84
75
  */
85
76
  elevated: boolean;
77
+ /** The item that holds the toolbar's single tab stop. */
78
+ private __activeItem;
79
+ connectedCallback(): void;
80
+ firstUpdated(): void;
81
+ updated(changed: Map<string, unknown>): void;
82
+ /** Actions that can take focus, in slot order. */
83
+ private __getItems;
84
+ /** Gives the active item `tabindex="0"` and every other item `tabindex="-1"`. */
85
+ private __syncTabStops;
86
+ /** Makes `item` the tab stop and focuses it. */
87
+ private __focusItem;
88
+ /** Finds the toolbar item an event came from. */
89
+ private __itemFromEvent;
90
+ private __handleSlotChange;
91
+ private __handleFocusIn;
92
+ private __handleKeyDown;
86
93
  render(): import("lit-html").TemplateResult<1>;
87
- private static __renderDocked;
88
- private static __renderFloating;
89
94
  }