@redvars/peacock 3.14.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 +170 -19
- package/dist/custom-elements.json +1171 -249
- package/dist/modal.js +178 -99
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +408 -110
- package/dist/pagination.js.map +1 -1
- package/dist/src/modal/modal.d.ts +23 -8
- 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/modal.test.d.ts +1 -0
- 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/modal/modal.scss +45 -11
- package/src/modal/modal.ts +148 -96
- 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
|
@@ -5799,7 +5799,9 @@
|
|
|
5799
5799
|
"tag": "wc-modal",
|
|
5800
5800
|
"rawTag": "modal",
|
|
5801
5801
|
"summary": "A dialog/modal for displaying content in a layer above the page, with optional header, body, and footer slots.",
|
|
5802
|
+
"overview": "<p>The modal opens a native <code><dialog></code> with <code>showModal()</code>, so it renders in the\nbrowser's top layer: above sticky headers, app bars, cards and any stacking context on the page,\nwhatever their z-index. Menus, selects and tooltips opened inside the modal render above it.</p>",
|
|
5802
5803
|
"cssprop": "--modal-max-height - Maximum height of the dialog.",
|
|
5804
|
+
"fires": "modal-close - Fired when the modal closes. `detail.reason` is `\"close-button\"`, `\"scrim\"`, `\"escape\"` or `\"programmatic\"`.",
|
|
5803
5805
|
"example": "```html\nMODAL\n```",
|
|
5804
5806
|
"tags": "overlay, dialog, feedback",
|
|
5805
5807
|
"customElement": {
|
|
@@ -5836,7 +5838,8 @@
|
|
|
5836
5838
|
"name": "modal-close",
|
|
5837
5839
|
"type": {
|
|
5838
5840
|
"text": "CustomEvent"
|
|
5839
|
-
}
|
|
5841
|
+
},
|
|
5842
|
+
"description": "Fired when the modal closes. `detail.reason` is `\"close-button\"`, `\"scrim\"`, `\"escape\"` or `\"programmatic\"`."
|
|
5840
5843
|
}
|
|
5841
5844
|
],
|
|
5842
5845
|
"attributes": [
|
|
@@ -6905,14 +6908,21 @@
|
|
|
6905
6908
|
"label": "Pagination",
|
|
6906
6909
|
"tag": "wc-pagination",
|
|
6907
6910
|
"rawTag": "pagination",
|
|
6908
|
-
"summary": "A pagination control with page
|
|
6909
|
-
"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>",
|
|
6910
6913
|
"fires": "page - Dispatched when the page or page size changes. Detail: `{ page, pageSize }`.",
|
|
6911
|
-
"
|
|
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```",
|
|
6912
6916
|
"tags": "navigation, data",
|
|
6913
6917
|
"customElement": {
|
|
6914
6918
|
"kind": "class",
|
|
6915
6919
|
"description": "",
|
|
6920
|
+
"cssProperties": [
|
|
6921
|
+
{
|
|
6922
|
+
"description": "Background of the control. Defaults to the surface color.",
|
|
6923
|
+
"name": "--pagination-background"
|
|
6924
|
+
}
|
|
6925
|
+
],
|
|
6916
6926
|
"events": [
|
|
6917
6927
|
{
|
|
6918
6928
|
"name": "page",
|
|
@@ -6944,10 +6954,9 @@
|
|
|
6944
6954
|
{
|
|
6945
6955
|
"name": "total-items",
|
|
6946
6956
|
"type": {
|
|
6947
|
-
"text": "number"
|
|
6957
|
+
"text": "number | undefined"
|
|
6948
6958
|
},
|
|
6949
|
-
"
|
|
6950
|
-
"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.",
|
|
6951
6960
|
"fieldName": "totalItems"
|
|
6952
6961
|
},
|
|
6953
6962
|
{
|
|
@@ -6958,6 +6967,54 @@
|
|
|
6958
6967
|
"default": "DEFAULT_PAGE_SIZES",
|
|
6959
6968
|
"description": "Supported page size options.",
|
|
6960
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"
|
|
6961
7018
|
}
|
|
6962
7019
|
],
|
|
6963
7020
|
"superclass": {
|
|
@@ -8952,41 +9009,70 @@
|
|
|
8952
9009
|
"tag": "wc-table",
|
|
8953
9010
|
"rawTag": "table",
|
|
8954
9011
|
"summary": "A configurable component for displaying tabular data.",
|
|
8955
|
-
"overview": "<p>The table
|
|
8956
|
-
"fires": "page - Dispatched when the page or page size changes.",
|
|
8957
|
-
"
|
|
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```",
|
|
8958
9017
|
"tags": "display, data",
|
|
8959
9018
|
"customElement": {
|
|
8960
9019
|
"kind": "class",
|
|
8961
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
|
+
],
|
|
8962
9041
|
"events": [
|
|
9042
|
+
{
|
|
9043
|
+
"name": "sort",
|
|
9044
|
+
"type": {
|
|
9045
|
+
"text": "CustomEvent"
|
|
9046
|
+
},
|
|
9047
|
+
"description": "Dispatched when the table is sorted. Detail: `{ sortBy, sortOrder }`."
|
|
9048
|
+
},
|
|
8963
9049
|
{
|
|
8964
9050
|
"name": "selection-change",
|
|
8965
9051
|
"type": {
|
|
8966
9052
|
"text": "CustomEvent"
|
|
8967
9053
|
},
|
|
8968
|
-
"description": "Dispatched when the row selection changes."
|
|
9054
|
+
"description": "Dispatched when the row selection changes. Detail: `{ value, isSelectAll, allPages }`."
|
|
8969
9055
|
},
|
|
8970
9056
|
{
|
|
8971
9057
|
"name": "cell-click",
|
|
8972
9058
|
"type": {
|
|
8973
9059
|
"text": "CustomEvent"
|
|
8974
9060
|
},
|
|
8975
|
-
"description": "Dispatched when a
|
|
9061
|
+
"description": "Dispatched when a cell is clicked or activated with Enter. Detail: `{ record, column, altKey, ctrlKey, metaKey, shiftKey }`."
|
|
8976
9062
|
},
|
|
8977
9063
|
{
|
|
8978
|
-
"name": "
|
|
9064
|
+
"name": "row-click",
|
|
8979
9065
|
"type": {
|
|
8980
9066
|
"text": "CustomEvent"
|
|
8981
9067
|
},
|
|
8982
|
-
"description": "Dispatched when
|
|
9068
|
+
"description": "Dispatched when a row is clicked or activated with Enter. Detail: `{ record }`."
|
|
8983
9069
|
},
|
|
8984
9070
|
{
|
|
8985
9071
|
"name": "page",
|
|
8986
9072
|
"type": {
|
|
8987
9073
|
"text": "CustomEvent"
|
|
8988
9074
|
},
|
|
8989
|
-
"description": "Dispatched when the page or page size changes."
|
|
9075
|
+
"description": "Dispatched when the page or page size changes. Detail: `{ page, pageSize }`."
|
|
8990
9076
|
}
|
|
8991
9077
|
],
|
|
8992
9078
|
"attributes": [
|
|
@@ -8996,13 +9082,13 @@
|
|
|
8996
9082
|
"text": "TableColumn[]"
|
|
8997
9083
|
},
|
|
8998
9084
|
"default": "[]",
|
|
8999
|
-
"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.",
|
|
9000
9086
|
"fieldName": "columns"
|
|
9001
9087
|
},
|
|
9002
9088
|
{
|
|
9003
9089
|
"name": "data",
|
|
9004
9090
|
"type": {
|
|
9005
|
-
"text": "
|
|
9091
|
+
"text": "TableRow[]"
|
|
9006
9092
|
},
|
|
9007
9093
|
"default": "[]",
|
|
9008
9094
|
"description": "Grid data to display on table.",
|
|
@@ -9076,7 +9162,7 @@
|
|
|
9076
9162
|
"text": "boolean"
|
|
9077
9163
|
},
|
|
9078
9164
|
"default": "false",
|
|
9079
|
-
"description": "If true, pagination is enabled. Defaults to `
|
|
9165
|
+
"description": "If true, pagination is enabled. Defaults to `false`.",
|
|
9080
9166
|
"fieldName": "paginate"
|
|
9081
9167
|
},
|
|
9082
9168
|
{
|
|
@@ -9097,14 +9183,79 @@
|
|
|
9097
9183
|
"description": "The number of rows per page. Defaults to `10`.",
|
|
9098
9184
|
"fieldName": "pageSize"
|
|
9099
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
|
+
},
|
|
9100
9194
|
{
|
|
9101
9195
|
"name": "total-items",
|
|
9102
9196
|
"type": {
|
|
9103
9197
|
"text": "number | undefined"
|
|
9104
9198
|
},
|
|
9105
|
-
"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`.",
|
|
9106
9200
|
"fieldName": "totalItems"
|
|
9107
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
|
+
},
|
|
9108
9259
|
{
|
|
9109
9260
|
"name": "empty-state-headline",
|
|
9110
9261
|
"type": {
|