@redvars/peacock 3.15.0 → 3.16.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/dist/custom-elements-jsdocs.json +166 -18
- package/dist/custom-elements.json +1241 -350
- package/dist/pagination.js +408 -110
- package/dist/pagination.js.map +1 -1
- package/dist/src/pagination/page-items.d.ts +14 -0
- package/dist/src/pagination/pagination.d.ts +46 -7
- package/dist/src/table/table.d.ts +125 -27
- package/dist/table.js +1001 -337
- package/dist/table.js.map +1 -1
- package/dist/test/pagination.test.d.ts +1 -0
- package/dist/test/table.test.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/readme.md +2 -2
- package/src/pagination/page-items.ts +50 -0
- package/src/pagination/pagination.scss +159 -44
- package/src/pagination/pagination.ts +275 -74
- package/src/table/table.scss +331 -109
- package/src/table/table.ts +810 -271
|
@@ -6908,14 +6908,21 @@
|
|
|
6908
6908
|
"label": "Pagination",
|
|
6909
6909
|
"tag": "wc-pagination",
|
|
6910
6910
|
"rawTag": "pagination",
|
|
6911
|
-
"summary": "A pagination control with page
|
|
6912
|
-
"overview": "<p>The pagination component
|
|
6911
|
+
"summary": "A pagination control with page numbers, a rows-per-page selector and the current item range.",
|
|
6912
|
+
"overview": "<p>The pagination component moves through paged data. It shows the current item range, the pages and a rows-per-page selector.</p>\n<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>\n<p>On a narrow container the <code>full</code> variant collapses to <code>compact</code>.</p>",
|
|
6913
6913
|
"fires": "page - Dispatched when the page or page size changes. Detail: `{ page, pageSize }`.",
|
|
6914
|
-
"
|
|
6914
|
+
"cssprop": "--pagination-background - Background of the control. Defaults to the surface color.",
|
|
6915
|
+
"example": "```html\n<wc-pagination style=\"width: 100%;\" page=\"1\" page-size=\"10\" total-items=\"240\"></wc-pagination>\n```",
|
|
6915
6916
|
"tags": "navigation, data",
|
|
6916
6917
|
"customElement": {
|
|
6917
6918
|
"kind": "class",
|
|
6918
6919
|
"description": "",
|
|
6920
|
+
"cssProperties": [
|
|
6921
|
+
{
|
|
6922
|
+
"description": "Background of the control. Defaults to the surface color.",
|
|
6923
|
+
"name": "--pagination-background"
|
|
6924
|
+
}
|
|
6925
|
+
],
|
|
6919
6926
|
"events": [
|
|
6920
6927
|
{
|
|
6921
6928
|
"name": "page",
|
|
@@ -6947,10 +6954,9 @@
|
|
|
6947
6954
|
{
|
|
6948
6955
|
"name": "total-items",
|
|
6949
6956
|
"type": {
|
|
6950
|
-
"text": "number"
|
|
6957
|
+
"text": "number | undefined"
|
|
6951
6958
|
},
|
|
6952
|
-
"
|
|
6953
|
-
"description": "Total number of items.",
|
|
6959
|
+
"description": "Total number of items. Leave it unset when the total is unknown; the control then shows\nprevious and next only, and `has-next` decides whether next is enabled.",
|
|
6954
6960
|
"fieldName": "totalItems"
|
|
6955
6961
|
},
|
|
6956
6962
|
{
|
|
@@ -6961,6 +6967,54 @@
|
|
|
6961
6967
|
"default": "DEFAULT_PAGE_SIZES",
|
|
6962
6968
|
"description": "Supported page size options.",
|
|
6963
6969
|
"fieldName": "pageSizes"
|
|
6970
|
+
},
|
|
6971
|
+
{
|
|
6972
|
+
"name": "variant",
|
|
6973
|
+
"type": {
|
|
6974
|
+
"text": "PaginationVariant"
|
|
6975
|
+
},
|
|
6976
|
+
"default": "'full'",
|
|
6977
|
+
"description": "How the pages are shown: `full` (page numbers), `compact` (\"Page [n] of N\") or `simple`\n(previous and next only). Defaults to `full`.",
|
|
6978
|
+
"fieldName": "variant",
|
|
6979
|
+
"expandedType": {
|
|
6980
|
+
"text": "'full' | 'compact' | 'simple'"
|
|
6981
|
+
}
|
|
6982
|
+
},
|
|
6983
|
+
{
|
|
6984
|
+
"name": "has-next",
|
|
6985
|
+
"type": {
|
|
6986
|
+
"text": "boolean"
|
|
6987
|
+
},
|
|
6988
|
+
"default": "false",
|
|
6989
|
+
"description": "Whether another page exists after this one. Used only when `total-items` is unset.",
|
|
6990
|
+
"fieldName": "hasNext"
|
|
6991
|
+
},
|
|
6992
|
+
{
|
|
6993
|
+
"name": "show-first-last",
|
|
6994
|
+
"type": {
|
|
6995
|
+
"text": "boolean"
|
|
6996
|
+
},
|
|
6997
|
+
"default": "false",
|
|
6998
|
+
"description": "Shows buttons that jump to the first and the last page.",
|
|
6999
|
+
"fieldName": "showFirstLast"
|
|
7000
|
+
},
|
|
7001
|
+
{
|
|
7002
|
+
"name": "hide-page-size",
|
|
7003
|
+
"type": {
|
|
7004
|
+
"text": "boolean"
|
|
7005
|
+
},
|
|
7006
|
+
"default": "false",
|
|
7007
|
+
"description": "Hides the rows-per-page selector.",
|
|
7008
|
+
"fieldName": "hidePageSize"
|
|
7009
|
+
},
|
|
7010
|
+
{
|
|
7011
|
+
"name": "label",
|
|
7012
|
+
"type": {
|
|
7013
|
+
"text": "string"
|
|
7014
|
+
},
|
|
7015
|
+
"default": "'Pagination'",
|
|
7016
|
+
"description": "Accessible name of the navigation landmark. Defaults to `\"Pagination\"`.",
|
|
7017
|
+
"fieldName": "label"
|
|
6964
7018
|
}
|
|
6965
7019
|
],
|
|
6966
7020
|
"superclass": {
|
|
@@ -8955,41 +9009,70 @@
|
|
|
8955
9009
|
"tag": "wc-table",
|
|
8956
9010
|
"rawTag": "table",
|
|
8957
9011
|
"summary": "A configurable component for displaying tabular data.",
|
|
8958
|
-
"overview": "<p>The table
|
|
8959
|
-
"fires": "page - Dispatched when the page or page size changes.",
|
|
8960
|
-
"
|
|
9012
|
+
"overview": "<p>The table displays rows of data with sorting, pagination, row selection, sticky header and sticky start or end columns.</p>\n<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>\n<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>",
|
|
9013
|
+
"fires": "page - Dispatched when the page or page size changes. Detail: `{ page, pageSize }`.",
|
|
9014
|
+
"slot": "bulk-actions - Actions shown in the selection bar while rows are selected.",
|
|
9015
|
+
"cssprop": "--table-cell-padding-inline - Horizontal padding of a cell.",
|
|
9016
|
+
"example": "```html\n<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>\n```",
|
|
8961
9017
|
"tags": "display, data",
|
|
8962
9018
|
"customElement": {
|
|
8963
9019
|
"kind": "class",
|
|
8964
9020
|
"description": "",
|
|
9021
|
+
"cssProperties": [
|
|
9022
|
+
{
|
|
9023
|
+
"description": "Minimum height of a row. Set by `density`.",
|
|
9024
|
+
"name": "--table-row-height"
|
|
9025
|
+
},
|
|
9026
|
+
{
|
|
9027
|
+
"description": "Color of the row dividers.",
|
|
9028
|
+
"name": "--table-border-color"
|
|
9029
|
+
},
|
|
9030
|
+
{
|
|
9031
|
+
"description": "Horizontal padding of a cell.",
|
|
9032
|
+
"name": "--table-cell-padding-inline"
|
|
9033
|
+
}
|
|
9034
|
+
],
|
|
9035
|
+
"slots": [
|
|
9036
|
+
{
|
|
9037
|
+
"description": "Actions shown in the selection bar while rows are selected.",
|
|
9038
|
+
"name": "bulk-actions"
|
|
9039
|
+
}
|
|
9040
|
+
],
|
|
8965
9041
|
"events": [
|
|
9042
|
+
{
|
|
9043
|
+
"name": "sort",
|
|
9044
|
+
"type": {
|
|
9045
|
+
"text": "CustomEvent"
|
|
9046
|
+
},
|
|
9047
|
+
"description": "Dispatched when the table is sorted. Detail: `{ sortBy, sortOrder }`."
|
|
9048
|
+
},
|
|
8966
9049
|
{
|
|
8967
9050
|
"name": "selection-change",
|
|
8968
9051
|
"type": {
|
|
8969
9052
|
"text": "CustomEvent"
|
|
8970
9053
|
},
|
|
8971
|
-
"description": "Dispatched when the row selection changes."
|
|
9054
|
+
"description": "Dispatched when the row selection changes. Detail: `{ value, isSelectAll, allPages }`."
|
|
8972
9055
|
},
|
|
8973
9056
|
{
|
|
8974
9057
|
"name": "cell-click",
|
|
8975
9058
|
"type": {
|
|
8976
9059
|
"text": "CustomEvent"
|
|
8977
9060
|
},
|
|
8978
|
-
"description": "Dispatched when a
|
|
9061
|
+
"description": "Dispatched when a cell is clicked or activated with Enter. Detail: `{ record, column, altKey, ctrlKey, metaKey, shiftKey }`."
|
|
8979
9062
|
},
|
|
8980
9063
|
{
|
|
8981
|
-
"name": "
|
|
9064
|
+
"name": "row-click",
|
|
8982
9065
|
"type": {
|
|
8983
9066
|
"text": "CustomEvent"
|
|
8984
9067
|
},
|
|
8985
|
-
"description": "Dispatched when
|
|
9068
|
+
"description": "Dispatched when a row is clicked or activated with Enter. Detail: `{ record }`."
|
|
8986
9069
|
},
|
|
8987
9070
|
{
|
|
8988
9071
|
"name": "page",
|
|
8989
9072
|
"type": {
|
|
8990
9073
|
"text": "CustomEvent"
|
|
8991
9074
|
},
|
|
8992
|
-
"description": "Dispatched when the page or page size changes."
|
|
9075
|
+
"description": "Dispatched when the page or page size changes. Detail: `{ page, pageSize }`."
|
|
8993
9076
|
}
|
|
8994
9077
|
],
|
|
8995
9078
|
"attributes": [
|
|
@@ -8999,13 +9082,13 @@
|
|
|
8999
9082
|
"text": "TableColumn[]"
|
|
9000
9083
|
},
|
|
9001
9084
|
"default": "[]",
|
|
9002
|
-
"description": "Grid columns configuration.\nEach column can have: name, label, width (
|
|
9085
|
+
"description": "Grid columns configuration.\nEach column can have: name, label, width (rem), fixed, align, type, sortable, wrap, template.",
|
|
9003
9086
|
"fieldName": "columns"
|
|
9004
9087
|
},
|
|
9005
9088
|
{
|
|
9006
9089
|
"name": "data",
|
|
9007
9090
|
"type": {
|
|
9008
|
-
"text": "
|
|
9091
|
+
"text": "TableRow[]"
|
|
9009
9092
|
},
|
|
9010
9093
|
"default": "[]",
|
|
9011
9094
|
"description": "Grid data to display on table.",
|
|
@@ -9079,7 +9162,7 @@
|
|
|
9079
9162
|
"text": "boolean"
|
|
9080
9163
|
},
|
|
9081
9164
|
"default": "false",
|
|
9082
|
-
"description": "If true, pagination is enabled. Defaults to `
|
|
9165
|
+
"description": "If true, pagination is enabled. Defaults to `false`.",
|
|
9083
9166
|
"fieldName": "paginate"
|
|
9084
9167
|
},
|
|
9085
9168
|
{
|
|
@@ -9100,14 +9183,79 @@
|
|
|
9100
9183
|
"description": "The number of rows per page. Defaults to `10`.",
|
|
9101
9184
|
"fieldName": "pageSize"
|
|
9102
9185
|
},
|
|
9186
|
+
{
|
|
9187
|
+
"name": "page-sizes",
|
|
9188
|
+
"type": {
|
|
9189
|
+
"text": "number[] | undefined"
|
|
9190
|
+
},
|
|
9191
|
+
"description": "Supported page size options, passed to the pagination.",
|
|
9192
|
+
"fieldName": "pageSizes"
|
|
9193
|
+
},
|
|
9103
9194
|
{
|
|
9104
9195
|
"name": "total-items",
|
|
9105
9196
|
"type": {
|
|
9106
9197
|
"text": "number | undefined"
|
|
9107
9198
|
},
|
|
9108
|
-
"description": "Total number of items (used in managed/controlled mode).",
|
|
9199
|
+
"description": "Total number of items (used in managed/controlled mode). Leave it unset when the total is\nunknown; the pagination then shows previous and next, driven by `has-next`.",
|
|
9109
9200
|
"fieldName": "totalItems"
|
|
9110
9201
|
},
|
|
9202
|
+
{
|
|
9203
|
+
"name": "has-next",
|
|
9204
|
+
"type": {
|
|
9205
|
+
"text": "boolean"
|
|
9206
|
+
},
|
|
9207
|
+
"default": "false",
|
|
9208
|
+
"description": "Whether another page exists after this one, in managed mode with an unknown total.",
|
|
9209
|
+
"fieldName": "hasNext"
|
|
9210
|
+
},
|
|
9211
|
+
{
|
|
9212
|
+
"name": "pagination-variant",
|
|
9213
|
+
"type": {
|
|
9214
|
+
"text": "PaginationVariant"
|
|
9215
|
+
},
|
|
9216
|
+
"default": "'full'",
|
|
9217
|
+
"description": "Pagination variant: `full` (page numbers), `compact` or `simple`. Defaults to `full`.",
|
|
9218
|
+
"fieldName": "paginationVariant",
|
|
9219
|
+
"expandedType": {
|
|
9220
|
+
"text": "'full' | 'compact' | 'simple'"
|
|
9221
|
+
}
|
|
9222
|
+
},
|
|
9223
|
+
{
|
|
9224
|
+
"name": "density",
|
|
9225
|
+
"type": {
|
|
9226
|
+
"text": "'compact' | 'default' | 'comfortable'"
|
|
9227
|
+
},
|
|
9228
|
+
"default": "'default'",
|
|
9229
|
+
"description": "Row height: `compact`, `default` or `comfortable`. Defaults to `default`.",
|
|
9230
|
+
"fieldName": "density"
|
|
9231
|
+
},
|
|
9232
|
+
{
|
|
9233
|
+
"name": "striped",
|
|
9234
|
+
"type": {
|
|
9235
|
+
"text": "boolean"
|
|
9236
|
+
},
|
|
9237
|
+
"default": "false",
|
|
9238
|
+
"description": "Shades every other row.",
|
|
9239
|
+
"fieldName": "striped"
|
|
9240
|
+
},
|
|
9241
|
+
{
|
|
9242
|
+
"name": "loading",
|
|
9243
|
+
"type": {
|
|
9244
|
+
"text": "boolean"
|
|
9245
|
+
},
|
|
9246
|
+
"default": "false",
|
|
9247
|
+
"description": "Shows a loading state: skeleton rows while there is no data, otherwise a progress bar\nunder the header so the current rows stay readable.",
|
|
9248
|
+
"fieldName": "loading"
|
|
9249
|
+
},
|
|
9250
|
+
{
|
|
9251
|
+
"name": "label",
|
|
9252
|
+
"type": {
|
|
9253
|
+
"text": "string"
|
|
9254
|
+
},
|
|
9255
|
+
"default": "''",
|
|
9256
|
+
"description": "Accessible name of the table.",
|
|
9257
|
+
"fieldName": "label"
|
|
9258
|
+
},
|
|
9111
9259
|
{
|
|
9112
9260
|
"name": "empty-state-headline",
|
|
9113
9261
|
"type": {
|