@kubex/zinc 1.1.161 → 1.1.162
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.json +266 -118
- package/dist/vscode.html-custom-data.json +13 -14
- package/dist/web-types.json +31 -30
- package/dist/zn.d.ts +22 -8
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +335 -301
- package/docs/pages/components/data-table.md +30 -20
- package/package.json +1 -1
- package/scss/themes/_dark.scss +1 -0
- package/scss/themes/_light.scss +1 -0
- package/src/components/button/button.scss +5 -0
- package/src/components/checkbox/checkbox.component.ts +10 -6
- package/src/components/checkbox/checkbox.scss +4 -8
- package/src/components/data-table/data-table.component.ts +171 -76
- package/src/components/data-table/data-table.scss +16 -60
- package/src/components/dropdown/dropdown.component.ts +6 -3
- package/src/components/panel/panel.scss +23 -0
- package/src/components/popup/popup.component.ts +8 -1
- package/src/components/tooltip/tooltip.component.ts +10 -1
- package/src/components/tooltip/tooltip.scss +5 -0
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@kubex/zinc",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.162",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,28 +15,6 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"name": "zn-action-bar",
|
|
20
|
-
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
21
|
-
"doc-url": "",
|
|
22
|
-
"attributes": [],
|
|
23
|
-
"slots": [
|
|
24
|
-
{ "name": "", "description": "The default slot." },
|
|
25
|
-
{ "name": "example", "description": "An example slot." }
|
|
26
|
-
],
|
|
27
|
-
"events": [
|
|
28
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
-
],
|
|
30
|
-
"js": {
|
|
31
|
-
"properties": [],
|
|
32
|
-
"events": [
|
|
33
|
-
{
|
|
34
|
-
"name": "zn-event-name",
|
|
35
|
-
"description": "Emitted as an example."
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
18
|
{
|
|
41
19
|
"name": "zn-alert",
|
|
42
20
|
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -105,6 +83,28 @@
|
|
|
105
83
|
]
|
|
106
84
|
}
|
|
107
85
|
},
|
|
86
|
+
{
|
|
87
|
+
"name": "zn-action-bar",
|
|
88
|
+
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
89
|
+
"doc-url": "",
|
|
90
|
+
"attributes": [],
|
|
91
|
+
"slots": [
|
|
92
|
+
{ "name": "", "description": "The default slot." },
|
|
93
|
+
{ "name": "example", "description": "An example slot." }
|
|
94
|
+
],
|
|
95
|
+
"events": [
|
|
96
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
97
|
+
],
|
|
98
|
+
"js": {
|
|
99
|
+
"properties": [],
|
|
100
|
+
"events": [
|
|
101
|
+
{
|
|
102
|
+
"name": "zn-event-name",
|
|
103
|
+
"description": "Emitted as an example."
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
108
|
{
|
|
109
109
|
"name": "zn-animated-button",
|
|
110
110
|
"description": "\n\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -1312,7 +1312,7 @@
|
|
|
1312
1312
|
},
|
|
1313
1313
|
{
|
|
1314
1314
|
"name": "zn-checkbox",
|
|
1315
|
-
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the checkbox loses focus.\n- **zn-change** - Emitted when the checked state changes.\n- **zn-focus** - Emitted when the checkbox gains focus.\n- **zn-input** - Emitted when the checkbox receives input.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n- **image** - Replaces the built-in image used by contained checkboxes.\n- **description** - A description of the checkbox's label. Serves as help text for a checkbox item. Alternatively, you can use the `description` attribute.\n- **selected-content** - Use to nest rich content (like an input) inside a selected checkbox item. Use only with the contained style.\n\n### **CSS Properties:**\n - **--zn-selection-card-image-width** - Width of the built-in card image. _(default: undefined)_\n- **--zn-selection-card-image-height** - Height of the built-in card image. _(default: undefined)_\n- **--zn-selection-card-min-height** - Minimum height of a contained checkbox with an image. _(default: undefined)_\n- **--zn-selection-card-content-min-width** - Width the card text keeps before it wraps below the image. _(default: undefined)_\n- **--zn-selection-card-title-font-size** - Font size of a selection card title. _(default: undefined)_\n- **--zn-selection-card-padding** - Equal inset around the contents of a selection card. _(default: undefined)_\n- **--zn-selection-card-gap** - Space between the image, title, and indicator gutter. _(default: undefined)_\n- **--zn-selection-card-control-offset** - Distance between a positioned control and the card edge. _(default: undefined)_\n- **--zn-selection-card-border-radius** - Corner radius of a contained container. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<zn-icon>` element.\n- **unchecked-icon** - The unchecked icon, an `<zn-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<
|
|
1315
|
+
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the checkbox loses focus.\n- **zn-change** - Emitted when the checked state changes.\n- **zn-focus** - Emitted when the checkbox gains focus.\n- **zn-input** - Emitted when the checkbox receives input.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n- **image** - Replaces the built-in image used by contained checkboxes.\n- **description** - A description of the checkbox's label. Serves as help text for a checkbox item. Alternatively, you can use the `description` attribute.\n- **selected-content** - Use to nest rich content (like an input) inside a selected checkbox item. Use only with the contained style.\n\n### **CSS Properties:**\n - **--zn-selection-card-image-width** - Width of the built-in card image. _(default: undefined)_\n- **--zn-selection-card-image-height** - Height of the built-in card image. _(default: undefined)_\n- **--zn-selection-card-min-height** - Minimum height of a contained checkbox with an image. _(default: undefined)_\n- **--zn-selection-card-content-min-width** - Width the card text keeps before it wraps below the image. _(default: undefined)_\n- **--zn-selection-card-title-font-size** - Font size of a selection card title. _(default: undefined)_\n- **--zn-selection-card-padding** - Equal inset around the contents of a selection card. _(default: undefined)_\n- **--zn-selection-card-gap** - Space between the image, title, and indicator gutter. _(default: undefined)_\n- **--zn-selection-card-control-offset** - Distance between a positioned control and the card edge. _(default: undefined)_\n- **--zn-selection-card-border-radius** - Corner radius of a contained container. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<zn-icon>` element.\n- **unchecked-icon** - The unchecked icon, an `<zn-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<svg>` element.\n- **image-container** - The wrapper around the built-in image or image slot.\n- **image** - The built-in image.\n- **card-title** - The title inside a selection card.\n- **label** - The container that wraps the checkbox's label.\n- **description** - The container that wraps the checkbox's description.\n- **selected-content** - The container that wraps optional content that appears when a checkbox is checked.",
|
|
1316
1316
|
"doc-url": "",
|
|
1317
1317
|
"attributes": [
|
|
1318
1318
|
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
@@ -2692,7 +2692,7 @@
|
|
|
2692
2692
|
},
|
|
2693
2693
|
{
|
|
2694
2694
|
"name": "zn-data-table",
|
|
2695
|
-
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Slots:**\n - _default_ - The default slot.\n- **search** - Slot for search component, in the header's right-hand group.\n- **sort** - Slot for sort component, in the header's right-hand group.\n- **filter** - Slot for filter component, in the header's right-hand group.\n- **filter-top** - Slot for a top-level filter component, rendered above the table's panel.\n- **delete-action** - Slot for delete action button, shown
|
|
2695
|
+
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Methods:**\n - **selectAll()** - Selects every row on the page, or clears the selection when every row is already selected.\n\n### **Slots:**\n - _default_ - The default slot.\n- **search** - Slot for search component, in the header's right-hand group.\n- **sort** - Slot for sort component, in the header's right-hand group.\n- **filter** - Slot for filter component, in the header's right-hand group.\n- **filter-top** - Slot for a top-level filter component, rendered above the table's panel.\n- **delete-action** - Slot for delete action button, shown in the header once rows are selected.\n- **modify-action** - Slot for modify action button, shown in the header once rows are selected.\n- **actions** - `zn-button` or `zn-confirm` elements listed in a header menu, enabled once rows are selected.\n- **create-action** - Slot for create action button, at the end of the header's right-hand group.\n- **inputs** - Slot for additional input controls.\n- **empty-state** - Slot for custom empty state.\n- **no-results** - Slot for a custom no-results state, shown when a search on a no-initial-load table returns no rows.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
2696
2696
|
"doc-url": "",
|
|
2697
2697
|
"attributes": [
|
|
2698
2698
|
{ "name": "data-uri", "value": { "type": "string" } },
|
|
@@ -2761,7 +2761,6 @@
|
|
|
2761
2761
|
"name": "empty-state-icon",
|
|
2762
2762
|
"value": { "type": "string", "default": "\"data_alert\"" }
|
|
2763
2763
|
},
|
|
2764
|
-
{ "name": "hide-checkboxes", "value": { "type": "boolean" } },
|
|
2765
2764
|
{ "name": "filters", "value": { "type": "[]", "default": "[]" } },
|
|
2766
2765
|
{
|
|
2767
2766
|
"name": "method",
|
|
@@ -2814,11 +2813,15 @@
|
|
|
2814
2813
|
},
|
|
2815
2814
|
{
|
|
2816
2815
|
"name": "delete-action",
|
|
2817
|
-
"description": "Slot for delete action button, shown
|
|
2816
|
+
"description": "Slot for delete action button, shown in the header once rows are selected."
|
|
2818
2817
|
},
|
|
2819
2818
|
{
|
|
2820
2819
|
"name": "modify-action",
|
|
2821
|
-
"description": "Slot for modify action button, shown
|
|
2820
|
+
"description": "Slot for modify action button, shown in the header once rows are selected."
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
"name": "actions",
|
|
2824
|
+
"description": "`zn-button` or `zn-confirm` elements listed in a header menu, enabled once rows are selected."
|
|
2822
2825
|
},
|
|
2823
2826
|
{
|
|
2824
2827
|
"name": "create-action",
|
|
@@ -2865,7 +2868,6 @@
|
|
|
2865
2868
|
{ "name": "caption", "type": "string" },
|
|
2866
2869
|
{ "name": "emptyStateCaption", "type": "string" },
|
|
2867
2870
|
{ "name": "emptyStateIcon", "type": "string" },
|
|
2868
|
-
{ "name": "hideCheckboxes", "type": "boolean" },
|
|
2869
2871
|
{ "name": "filters", "type": "[]" },
|
|
2870
2872
|
{ "name": "method", "type": "'GET' | 'POST'" },
|
|
2871
2873
|
{ "name": "noInitialLoad", "type": "boolean" },
|
|
@@ -2882,7 +2884,6 @@
|
|
|
2882
2884
|
{ "name": "groupBy", "type": "string" },
|
|
2883
2885
|
{ "name": "groups", "type": "string" },
|
|
2884
2886
|
{ "name": "itemsPerPage", "type": "number" },
|
|
2885
|
-
{ "name": "selectAllButton", "type": "ZnButton" },
|
|
2886
2887
|
{ "name": "requestParams", "type": "Record<string, any>" },
|
|
2887
2888
|
{ "name": "filterClearListener" },
|
|
2888
2889
|
{ "name": "filterChangeListener" },
|
package/dist/zn.d.ts
CHANGED
|
@@ -977,6 +977,7 @@ declare module "components/tooltip/tooltip.component" {
|
|
|
977
977
|
handleDisabledChange(): void;
|
|
978
978
|
show(): Promise<void>;
|
|
979
979
|
hide(): void;
|
|
980
|
+
private handlePopupClick;
|
|
980
981
|
render(): import("lit-html").TemplateResult<1>;
|
|
981
982
|
}
|
|
982
983
|
}
|
|
@@ -4080,6 +4081,7 @@ declare module "components/data-table/data-table.component" {
|
|
|
4080
4081
|
export enum ActionSlots {
|
|
4081
4082
|
delete = "delete-action",
|
|
4082
4083
|
modify = "modify-action",
|
|
4084
|
+
actions = "actions",
|
|
4083
4085
|
create = "create-action",
|
|
4084
4086
|
filter = "filter",
|
|
4085
4087
|
filter_top = "filter-top",
|
|
@@ -4140,8 +4142,9 @@ declare module "components/data-table/data-table.component" {
|
|
|
4140
4142
|
* @slot sort - Slot for sort component, in the header's right-hand group.
|
|
4141
4143
|
* @slot filter - Slot for filter component, in the header's right-hand group.
|
|
4142
4144
|
* @slot filter-top - Slot for a top-level filter component, rendered above the table's panel.
|
|
4143
|
-
* @slot delete-action - Slot for delete action button, shown
|
|
4144
|
-
* @slot modify-action - Slot for modify action button, shown
|
|
4145
|
+
* @slot delete-action - Slot for delete action button, shown in the header once rows are selected.
|
|
4146
|
+
* @slot modify-action - Slot for modify action button, shown in the header once rows are selected.
|
|
4147
|
+
* @slot actions - `zn-button` or `zn-confirm` elements listed in a header menu, enabled once rows are selected.
|
|
4145
4148
|
* @slot create-action - Slot for create action button, at the end of the header's right-hand group.
|
|
4146
4149
|
* @slot inputs - Slot for additional input controls.
|
|
4147
4150
|
* @slot empty-state - Slot for custom empty state.
|
|
@@ -4191,7 +4194,6 @@ declare module "components/data-table/data-table.component" {
|
|
|
4191
4194
|
caption: string;
|
|
4192
4195
|
emptyStateCaption: string;
|
|
4193
4196
|
emptyStateIcon: string;
|
|
4194
|
-
hideCheckboxes: boolean;
|
|
4195
4197
|
filters: [];
|
|
4196
4198
|
method: 'GET' | 'POST';
|
|
4197
4199
|
noInitialLoad: boolean;
|
|
@@ -4209,7 +4211,6 @@ declare module "components/data-table/data-table.component" {
|
|
|
4209
4211
|
groupBy: string;
|
|
4210
4212
|
groups: string;
|
|
4211
4213
|
itemsPerPage: number;
|
|
4212
|
-
selectAllButton: ZnButton;
|
|
4213
4214
|
private _initialLoad;
|
|
4214
4215
|
private _hasLoadedData;
|
|
4215
4216
|
private _lastLoadHadRows;
|
|
@@ -4286,6 +4287,7 @@ declare module "components/data-table/data-table.component" {
|
|
|
4286
4287
|
private renderErrorAlert;
|
|
4287
4288
|
humanize(str: string): string;
|
|
4288
4289
|
renderTableData(groups: RowGroup[], error?: ResponseError): TemplateResult<1>;
|
|
4290
|
+
private tableContent;
|
|
4289
4291
|
getTableHeader(): TemplateResult<1>;
|
|
4290
4292
|
private getHeaderControls;
|
|
4291
4293
|
private hasRows;
|
|
@@ -4303,30 +4305,42 @@ declare module "components/data-table/data-table.component" {
|
|
|
4303
4305
|
private getPageRange;
|
|
4304
4306
|
getPagination(): TemplateResult<1> | null;
|
|
4305
4307
|
getActions(): TemplateResult<1>[];
|
|
4308
|
+
private getActionsMenu;
|
|
4309
|
+
private actionTrigger;
|
|
4310
|
+
private actionLabel;
|
|
4311
|
+
private runAction;
|
|
4306
4312
|
goToPage(page: number): void;
|
|
4307
4313
|
goToFirstPage(): void;
|
|
4308
4314
|
goToPreviousPage(): void;
|
|
4309
4315
|
goToNextPage(): void;
|
|
4310
4316
|
goToLastPage(): void;
|
|
4311
4317
|
updateRowsPerPage(event: Event): void;
|
|
4312
|
-
|
|
4318
|
+
/** Selects every row on the page, or clears the selection when every row is already selected. */
|
|
4319
|
+
selectAll(): void;
|
|
4313
4320
|
selectRow(e: Event): void;
|
|
4314
|
-
|
|
4321
|
+
private toggleRowSelection;
|
|
4322
|
+
clearSelectedRows(): void;
|
|
4315
4323
|
updateSort(key: string): () => void;
|
|
4316
4324
|
renderCell(data: Cell, row?: Row, header?: HeaderConfig): TemplateResult | ZincElement;
|
|
4317
4325
|
private updateActionKeys;
|
|
4318
4326
|
private getTableSortIcon;
|
|
4319
4327
|
private renderCellHeader;
|
|
4328
|
+
private sortState;
|
|
4329
|
+
private handleSortKeyDown;
|
|
4320
4330
|
private renderCellBody;
|
|
4321
4331
|
private hasHiddenColumns;
|
|
4322
4332
|
private renderExpanderCell;
|
|
4323
4333
|
private renderDetailsRow;
|
|
4324
4334
|
private toggleRowExpansion;
|
|
4325
4335
|
private isRowSelected;
|
|
4336
|
+
private pruneSelectedRows;
|
|
4337
|
+
private isSelectable;
|
|
4338
|
+
private renderSelectAllCheckbox;
|
|
4339
|
+
private renderRowCheckbox;
|
|
4340
|
+
private handleCheckboxCellClick;
|
|
4326
4341
|
private getRows;
|
|
4327
4342
|
private getSelectedKeys;
|
|
4328
4343
|
private updateKeys;
|
|
4329
|
-
private updateSelectAll;
|
|
4330
4344
|
private updateModifyKeys;
|
|
4331
4345
|
private updateDeleteKeys;
|
|
4332
4346
|
private extractComparable;
|
|
@@ -7309,7 +7323,7 @@ declare module "components/checkbox/checkbox.component" {
|
|
|
7309
7323
|
* @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.
|
|
7310
7324
|
* @csspart checked-icon - The checked icon, an `<zn-icon>` element.
|
|
7311
7325
|
* @csspart unchecked-icon - The unchecked icon, an `<zn-icon>` element.
|
|
7312
|
-
* @csspart indeterminate-icon - The indeterminate icon, an `<
|
|
7326
|
+
* @csspart indeterminate-icon - The indeterminate icon, an `<svg>` element.
|
|
7313
7327
|
* @csspart image-container - The wrapper around the built-in image or image slot.
|
|
7314
7328
|
* @csspart image - The built-in image.
|
|
7315
7329
|
* @csspart card-title - The title inside a selection card.
|