@kubex/zinc 1.1.182 → 1.1.183
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 +281 -265
- package/dist/vscode.html-custom-data.json +22 -22
- package/dist/web-types.json +63 -63
- package/dist/zn.d.ts +8 -1
- package/dist/zn.min.js +3 -3
- package/package.json +1 -1
- package/src/components/cols/cols.component.ts +30 -1
- package/src/components/cols/cols.scss +4 -0
- package/src/components/cols/cols.test.ts +31 -0
- package/src/components/stat/stat.component.ts +2 -2
- package/src/components/stat/stat.scss +13 -1
|
@@ -912,28 +912,6 @@
|
|
|
912
912
|
}
|
|
913
913
|
]
|
|
914
914
|
},
|
|
915
|
-
{
|
|
916
|
-
"name": "zn-cols",
|
|
917
|
-
"description": "Short summary of the component's intended use.\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.",
|
|
918
|
-
"attributes": [
|
|
919
|
-
{ "name": "layout", "values": [] },
|
|
920
|
-
{
|
|
921
|
-
"name": "stack-at",
|
|
922
|
-
"description": "Container width the columns collapse to a single column below, as one of the named zinc\ncontainer sizes (sm, smp, ph, md, lg, hd, 3k, 4k). Defaults to `lg` when a child declares\n`stack-order` or `stack-split`, otherwise the columns never explicitly stack.",
|
|
923
|
-
"values": []
|
|
924
|
-
},
|
|
925
|
-
{ "name": "mc", "values": [] },
|
|
926
|
-
{ "name": "no-gap", "values": [] },
|
|
927
|
-
{ "name": "border", "values": [] },
|
|
928
|
-
{ "name": "pad", "values": [] },
|
|
929
|
-
{ "name": "divide", "values": [] },
|
|
930
|
-
{ "name": "pad-x", "values": [] },
|
|
931
|
-
{ "name": "pad-y", "values": [] }
|
|
932
|
-
],
|
|
933
|
-
"references": [
|
|
934
|
-
{ "name": "Documentation", "url": "https://zinc.style/components/cols" }
|
|
935
|
-
]
|
|
936
|
-
},
|
|
937
915
|
{
|
|
938
916
|
"name": "zn-color-select",
|
|
939
917
|
"description": "A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted when the selected color changes.\n- **zn-clear** - Emitted when the clear button is activated.\n\n### **CSS Parts:**\n - **swatch** - The color swatch shown in the closed control.\n- **combobox** - The container that wraps the swatch and expand button (forwarded from zn-select).\n- **form-control-help-text** - The help text's wrapper (forwarded from zn-select).\n- **form-control-input** - The select's wrapper (forwarded from zn-select).",
|
|
@@ -977,6 +955,28 @@
|
|
|
977
955
|
}
|
|
978
956
|
]
|
|
979
957
|
},
|
|
958
|
+
{
|
|
959
|
+
"name": "zn-cols",
|
|
960
|
+
"description": "Short summary of the component's intended use.\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.",
|
|
961
|
+
"attributes": [
|
|
962
|
+
{ "name": "layout", "values": [] },
|
|
963
|
+
{
|
|
964
|
+
"name": "stack-at",
|
|
965
|
+
"description": "Container width the columns collapse to a single column below, as one of the named zinc\ncontainer sizes (sm, smp, ph, md, lg, hd, 3k, 4k). Defaults to `lg` when a child declares\n`stack-order` or `stack-split`, otherwise the columns never explicitly stack.",
|
|
966
|
+
"values": []
|
|
967
|
+
},
|
|
968
|
+
{ "name": "mc", "values": [] },
|
|
969
|
+
{ "name": "no-gap", "values": [] },
|
|
970
|
+
{ "name": "border", "values": [] },
|
|
971
|
+
{ "name": "pad", "values": [] },
|
|
972
|
+
{ "name": "divide", "values": [] },
|
|
973
|
+
{ "name": "pad-x", "values": [] },
|
|
974
|
+
{ "name": "pad-y", "values": [] }
|
|
975
|
+
],
|
|
976
|
+
"references": [
|
|
977
|
+
{ "name": "Documentation", "url": "https://zinc.style/components/cols" }
|
|
978
|
+
]
|
|
979
|
+
},
|
|
980
980
|
{
|
|
981
981
|
"name": "zn-confirm",
|
|
982
982
|
"description": "Short summary of the component's intended use.\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.",
|
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.183",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -2003,68 +2003,6 @@
|
|
|
2003
2003
|
"events": []
|
|
2004
2004
|
}
|
|
2005
2005
|
},
|
|
2006
|
-
{
|
|
2007
|
-
"name": "zn-cols",
|
|
2008
|
-
"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.",
|
|
2009
|
-
"doc-url": "",
|
|
2010
|
-
"attributes": [
|
|
2011
|
-
{
|
|
2012
|
-
"name": "layout",
|
|
2013
|
-
"value": { "type": "string", "default": "''" }
|
|
2014
|
-
},
|
|
2015
|
-
{
|
|
2016
|
-
"name": "stack-at",
|
|
2017
|
-
"description": "Container width the columns collapse to a single column below, as one of the named zinc\ncontainer sizes (sm, smp, ph, md, lg, hd, 3k, 4k). Defaults to `lg` when a child declares\n`stack-order` or `stack-split`, otherwise the columns never explicitly stack.",
|
|
2018
|
-
"value": { "type": "string", "default": "''" }
|
|
2019
|
-
},
|
|
2020
|
-
{ "name": "mc", "value": { "type": "number", "default": "0" } },
|
|
2021
|
-
{
|
|
2022
|
-
"name": "no-gap",
|
|
2023
|
-
"value": { "type": "boolean", "default": "false" }
|
|
2024
|
-
},
|
|
2025
|
-
{
|
|
2026
|
-
"name": "border",
|
|
2027
|
-
"value": { "type": "boolean", "default": "false" }
|
|
2028
|
-
},
|
|
2029
|
-
{ "name": "pad", "value": { "type": "boolean" } },
|
|
2030
|
-
{
|
|
2031
|
-
"name": "divide",
|
|
2032
|
-
"value": { "type": "boolean", "default": "false" }
|
|
2033
|
-
},
|
|
2034
|
-
{ "name": "pad-x", "value": { "type": "boolean" } },
|
|
2035
|
-
{ "name": "pad-y", "value": { "type": "boolean" } }
|
|
2036
|
-
],
|
|
2037
|
-
"slots": [
|
|
2038
|
-
{ "name": "", "description": "The default slot." },
|
|
2039
|
-
{ "name": "example", "description": "An example slot." }
|
|
2040
|
-
],
|
|
2041
|
-
"events": [
|
|
2042
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
2043
|
-
],
|
|
2044
|
-
"js": {
|
|
2045
|
-
"properties": [
|
|
2046
|
-
{ "name": "layout", "type": "string" },
|
|
2047
|
-
{
|
|
2048
|
-
"name": "stackAt",
|
|
2049
|
-
"description": "Container width the columns collapse to a single column below, as one of the named zinc\ncontainer sizes (sm, smp, ph, md, lg, hd, 3k, 4k). Defaults to `lg` when a child declares\n`stack-order` or `stack-split`, otherwise the columns never explicitly stack.",
|
|
2050
|
-
"type": "string"
|
|
2051
|
-
},
|
|
2052
|
-
{ "name": "maxColumns", "type": "number" },
|
|
2053
|
-
{ "name": "noGap", "type": "boolean" },
|
|
2054
|
-
{ "name": "border", "type": "boolean" },
|
|
2055
|
-
{ "name": "pad", "type": "boolean" },
|
|
2056
|
-
{ "name": "divide", "type": "boolean" },
|
|
2057
|
-
{ "name": "padX", "type": "boolean" },
|
|
2058
|
-
{ "name": "padY", "type": "boolean" }
|
|
2059
|
-
],
|
|
2060
|
-
"events": [
|
|
2061
|
-
{
|
|
2062
|
-
"name": "zn-event-name",
|
|
2063
|
-
"description": "Emitted as an example."
|
|
2064
|
-
}
|
|
2065
|
-
]
|
|
2066
|
-
}
|
|
2067
|
-
},
|
|
2068
2006
|
{
|
|
2069
2007
|
"name": "zn-color-select",
|
|
2070
2008
|
"description": "A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.\n\n---\n\n\n### **Events:**\n - **zn-input** - Emitted when the selected color changes.\n- **zn-clear** - Emitted when the clear button is activated.\n\n### **CSS Parts:**\n - **swatch** - The color swatch shown in the closed control.\n- **combobox** - The container that wraps the swatch and expand button (forwarded from zn-select).\n- **form-control-help-text** - The help text's wrapper (forwarded from zn-select).\n- **form-control-input** - The select's wrapper (forwarded from zn-select).",
|
|
@@ -2169,6 +2107,68 @@
|
|
|
2169
2107
|
]
|
|
2170
2108
|
}
|
|
2171
2109
|
},
|
|
2110
|
+
{
|
|
2111
|
+
"name": "zn-cols",
|
|
2112
|
+
"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.",
|
|
2113
|
+
"doc-url": "",
|
|
2114
|
+
"attributes": [
|
|
2115
|
+
{
|
|
2116
|
+
"name": "layout",
|
|
2117
|
+
"value": { "type": "string", "default": "''" }
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"name": "stack-at",
|
|
2121
|
+
"description": "Container width the columns collapse to a single column below, as one of the named zinc\ncontainer sizes (sm, smp, ph, md, lg, hd, 3k, 4k). Defaults to `lg` when a child declares\n`stack-order` or `stack-split`, otherwise the columns never explicitly stack.",
|
|
2122
|
+
"value": { "type": "string", "default": "''" }
|
|
2123
|
+
},
|
|
2124
|
+
{ "name": "mc", "value": { "type": "number", "default": "0" } },
|
|
2125
|
+
{
|
|
2126
|
+
"name": "no-gap",
|
|
2127
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
"name": "border",
|
|
2131
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2132
|
+
},
|
|
2133
|
+
{ "name": "pad", "value": { "type": "boolean" } },
|
|
2134
|
+
{
|
|
2135
|
+
"name": "divide",
|
|
2136
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2137
|
+
},
|
|
2138
|
+
{ "name": "pad-x", "value": { "type": "boolean" } },
|
|
2139
|
+
{ "name": "pad-y", "value": { "type": "boolean" } }
|
|
2140
|
+
],
|
|
2141
|
+
"slots": [
|
|
2142
|
+
{ "name": "", "description": "The default slot." },
|
|
2143
|
+
{ "name": "example", "description": "An example slot." }
|
|
2144
|
+
],
|
|
2145
|
+
"events": [
|
|
2146
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
2147
|
+
],
|
|
2148
|
+
"js": {
|
|
2149
|
+
"properties": [
|
|
2150
|
+
{ "name": "layout", "type": "string" },
|
|
2151
|
+
{
|
|
2152
|
+
"name": "stackAt",
|
|
2153
|
+
"description": "Container width the columns collapse to a single column below, as one of the named zinc\ncontainer sizes (sm, smp, ph, md, lg, hd, 3k, 4k). Defaults to `lg` when a child declares\n`stack-order` or `stack-split`, otherwise the columns never explicitly stack.",
|
|
2154
|
+
"type": "string"
|
|
2155
|
+
},
|
|
2156
|
+
{ "name": "maxColumns", "type": "number" },
|
|
2157
|
+
{ "name": "noGap", "type": "boolean" },
|
|
2158
|
+
{ "name": "border", "type": "boolean" },
|
|
2159
|
+
{ "name": "pad", "type": "boolean" },
|
|
2160
|
+
{ "name": "divide", "type": "boolean" },
|
|
2161
|
+
{ "name": "padX", "type": "boolean" },
|
|
2162
|
+
{ "name": "padY", "type": "boolean" }
|
|
2163
|
+
],
|
|
2164
|
+
"events": [
|
|
2165
|
+
{
|
|
2166
|
+
"name": "zn-event-name",
|
|
2167
|
+
"description": "Emitted as an example."
|
|
2168
|
+
}
|
|
2169
|
+
]
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
2172
|
{
|
|
2173
2173
|
"name": "zn-confirm",
|
|
2174
2174
|
"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.",
|
package/dist/zn.d.ts
CHANGED
|
@@ -4383,7 +4383,7 @@ declare module "components/data-table/index" {
|
|
|
4383
4383
|
}
|
|
4384
4384
|
}
|
|
4385
4385
|
declare module "components/cols/cols.component" {
|
|
4386
|
-
import { type CSSResultGroup } from 'lit';
|
|
4386
|
+
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
4387
4387
|
import ZincElement from "internal/zinc-element";
|
|
4388
4388
|
/**
|
|
4389
4389
|
* @summary Short summary of the component's intended use.
|
|
@@ -4419,8 +4419,15 @@ declare module "components/cols/cols.component" {
|
|
|
4419
4419
|
padX: boolean;
|
|
4420
4420
|
padY: boolean;
|
|
4421
4421
|
private readonly childObserver;
|
|
4422
|
+
private readonly resizeObserver;
|
|
4422
4423
|
connectedCallback(): void;
|
|
4423
4424
|
disconnectedCallback(): void;
|
|
4425
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
4426
|
+
/**
|
|
4427
|
+
* Flags each child that ends its row as laid out, so `divide` only draws between neighbours on the same row
|
|
4428
|
+
* however the columns have wrapped.
|
|
4429
|
+
*/
|
|
4430
|
+
private markRowEnds;
|
|
4424
4431
|
/**
|
|
4425
4432
|
* Reads the `stack-order` attribute of an element, returning null when it does not declare one.
|
|
4426
4433
|
*/
|
package/dist/zn.min.js
CHANGED
|
@@ -1631,7 +1631,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1631
1631
|
</zn-menu-item>`})}
|
|
1632
1632
|
</zn-menu>
|
|
1633
1633
|
</zn-dropdown>
|
|
1634
|
-
</td>`}};ke.styles=[k(pl),k(gx)],ke.dependencies={"zn-alert":cf,"zn-button":Oe,"zn-empty-state":Nf,"zn-chip":_o,"zn-hover-container":Pf,"zn-dropdown":Mr,"zn-menu":In,"zn-menu-item":Wi,"zn-panel":Hf,"zn-button-group":Nc,"zn-confirm":as,"zn-skeleton":Ff,"zn-style":Bf,"zn-data-table-search":Of},ke._sharableKnownKeys=["search","filter","sortColumn","sortDirection","page","perPage"],c([p({attribute:"data-uri"})],ke.prototype,"dataUri",2),c([p({attribute:"data",type:Object})],ke.prototype,"data",2),c([p({attribute:"sort-column"})],ke.prototype,"sortColumn",2),c([p({attribute:"sort-direction"})],ke.prototype,"sortDirection",2),c([p({attribute:"local-sort",type:Boolean})],ke.prototype,"localSort",2),c([p({attribute:"filter"})],ke.prototype,"filter",2),c([p({attribute:"search"})],ke.prototype,"search",2),c([p({attribute:"wide-column"})],ke.prototype,"wideColumn",2),c([p({attribute:"key"})],ke.prototype,"key",2),c([p({attribute:"headers",type:Object})],ke.prototype,"headers",2),c([p({attribute:!1})],ke.prototype,"displayTemplates",2),c([p({attribute:"hide-headers",type:Object})],ke.prototype,"hiddenHeaders",2),c([p({attribute:"hide-columns",type:Object})],ke.prototype,"hiddenColumns",2),c([p({attribute:"unsortable-headers",type:Object})],ke.prototype,"unsortableHeaders",2),c([p({attribute:"unsortable",type:Boolean})],ke.prototype,"unsortable",2),c([p({attribute:"hide-pagination",type:Boolean})],ke.prototype,"hidePagination",2),c([p({attribute:"hide-column-select",type:Boolean})],ke.prototype,"hideColumnSelect",2),c([p({attribute:"hide-refresh",type:Boolean})],ke.prototype,"hideRefresh",2),c([p({type:Boolean})],ke.prototype,"standalone",2),c([p()],ke.prototype,"caption",2),c([p({attribute:"empty-state-caption"})],ke.prototype,"emptyStateCaption",2),c([p({attribute:"empty-state-icon"})],ke.prototype,"emptyStateIcon",2),c([p()],ke.prototype,"filters",2),c([p()],ke.prototype,"method",2),c([p({attribute:"no-initial-load",type:Boolean})],ke.prototype,"noInitialLoad",2),c([p({attribute:"sharable",type:Boolean})],ke.prototype,"sharable",2),c([p({attribute:"wrap-search-fields",type:Boolean})],ke.prototype,"wrapSearchFields",2),c([p({attribute:"group-by"})],ke.prototype,"groupBy",2),c([p()],ke.prototype,"groups",2),c([p({attribute:"per-page-size",type:Number})],ke.prototype,"itemsPerPage",2),c([D()],ke.prototype,"_deselectedColumns",2),c([D()],ke.prototype,"_filtersOpen",2);var hl=ke;var S9=hl;hl.define("zn-data-table");var vx=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;--zn-col-basis:250px;--col-width:23%}:host([contents]){display:contents}.cols{display:flex;flex-wrap:wrap;flex-grow:1;flex-shrink:1;width:100%;container-type:inline-size;gap:var(--zn-gap);max-width:100%}.cols ::slotted(.zn-col-1){flex-basis:calc(var(--zn-col-basis) * 1);min-width:calc(var(--col-width) * 1);flex-grow:1}.cols ::slotted(.zn-col-2){flex-basis:calc(var(--zn-col-basis) * 2);min-width:calc(var(--col-width) * 2);flex-grow:2}.cols ::slotted(.zn-col-3){flex-basis:calc(var(--zn-col-basis) * 3);min-width:calc(var(--col-width) * 3);flex-grow:3}.cols ::slotted(.zn-col-4){flex-basis:calc(var(--zn-col-basis) * 4);min-width:calc(var(--col-width) * 4);flex-grow:4}.cols ::slotted(.zn-col-5){flex-basis:calc(var(--zn-col-basis) * 5);min-width:calc(var(--col-width) * 5);flex-grow:5}.cols ::slotted(.zn-col-6){flex-basis:calc(var(--zn-col-basis) * 6);min-width:calc(var(--col-width) * 6);flex-grow:6}.cols ::slotted(.zn-col-7){flex-basis:calc(var(--zn-col-basis) * 7);min-width:calc(var(--col-width) * 7);flex-grow:7}.cols ::slotted(.zn-col-8){flex-basis:calc(var(--zn-col-basis) * 8);min-width:calc(var(--col-width) * 8);flex-grow:8}.cols ::slotted(.zn-col-9){flex-basis:calc(var(--zn-col-basis) * 9);min-width:calc(var(--col-width) * 9);flex-grow:9}.cols ::slotted(.zn-col-10){flex-basis:calc(var(--zn-col-basis) * 10);min-width:calc(var(--col-width) * 10);flex-grow:10}.cols ::slotted(.zn-col-11){flex-basis:calc(var(--zn-col-basis) * 11);min-width:calc(var(--col-width) * 11);flex-grow:11}.cols ::slotted(.zn-col-12){flex-basis:calc(var(--zn-col-basis) * 12);min-width:calc(var(--col-width) * 12);flex-grow:12}.cols--mc-1{--col-width:calc(100% / 2)}.cols--mc-2{--col-width:calc(100% / 3)}.cols--mc-3{--col-width:calc(100% / 4)}.cols--mc-4{--col-width:calc(100% / 5)}.cols--mc-5{--col-width:calc(100% / 6)}.cols--mc-6{--col-width:calc(100% / 7)}.cols--mc-7{--col-width:calc(100% / 8)}.cols--mc-8{--col-width:calc(100% / 9)}.cols--mc-9{--col-width:calc(100% / 10)}.cols--mc-10{--col-width:calc(100% / 11)}.cols--mc-11{--col-width:calc(100% / 12)}.cols--mc-12{--col-width:calc(100% / 13)}.cols--layout-121 ::slotted(.zn-col-2){order:-1;min-width:100%}@container (min-width:1440px){.cols--layout-121 ::slotted(.zn-col-2){order:initial;min-width:46%}}.cols--divide ::slotted(*:not(:last-child)){position:relative}.cols--divide ::slotted(*:not(:last-child)):after{content:"";position:absolute;display:block;width:1px;top:0;height:100%;max-height:100%;right:calc(var(--zn-spacing-small) / 2 * -1);background-color:rgb(var(--zn-border-color))}.cols--no-gap{gap:0}.cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{right:0}.cols--border{overflow:hidden}.cols--border ::slotted(*){position:relative;padding-bottom:var(--zn-spacing-small)}.cols--border ::slotted(*):before{content:"";position:absolute;bottom:-1px;left:-100vw;right:-5px;z-index:1111;border-bottom:1px solid rgb(var(--zn-border-color)) !important}.cols ::slotted([stack-split]){display:flex;flex-direction:column;gap:var(--zn-gap)}.cols--pad{padding:var(--zn-spacing-2x-small)}.cols--pad-x{padding-inline:var(--zn-spacing-2x-small)}.cols--pad-y{padding-block:var(--zn-spacing-2x-small)}@container (max-width:359px){:host([stack-at=sm]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=sm]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=sm]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=sm]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:479px){:host([stack-at=smp]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=smp]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=smp]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=smp]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:599px){:host([stack-at=ph]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=ph]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=ph]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=ph]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:767px){:host([stack-at=md]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=md]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=md]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=md]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:1099px){:host([stack-at=lg]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=lg]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=lg]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=lg]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:1439px){:host([stack-at=hd]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=hd]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=hd]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=hd]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:1959px){:host([stack-at="3k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="3k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="3k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at="3k"]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:2559px){:host([stack-at="4k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="4k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="4k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at="4k"]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}`;var yx={first:-1,high:-1,last:1,low:1},C9="lg",Yr=class extends T{constructor(){super(...arguments);this.layout="";this.stackAt="";this.maxColumns=0;this.noGap=!1;this.border=!1;this.divide=!1;this.childObserver=new MutationObserver(()=>this.requestUpdate())}connectedCallback(){super.connectedCallback(),this.childObserver.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this.childObserver.disconnect()}stackOrder(t){let r=t.getAttribute("stack-order");if(r===null)return null;let n=r.trim().toLowerCase();if(n in yx)return yx[n];let a=parseInt(n,10);return isNaN(a)?null:a}applyStackOrder(t,r){let n=this.stackOrder(t);return t.style.order=n===null?"":`calc(var(--zn-stacked, 0) * ${n})`,r&&(t.style.flexBasis="var(--zn-stack-basis, auto)"),n}render(){let t=this.layout.split(/[\s,]+/).map(d=>parseInt(d)).filter(d=>!!d);t.length===0&&t.push(1,1,1,1),this.layout=t.join(","),this.maxColumns=t.reduce((d,h)=>d+h,0);let r="zn-col-",n=Array.from(this.querySelectorAll(":scope > *:not([slot])")),a=t.length,s=n.length-(n.length%a||a),l=!1;return n.forEach((d,h)=>{let m=d.className.split(" ").filter(b=>!b.startsWith(r));d.className=m.join(" ");let f=h%a;d.classList.add(r+t[f]),this.border&&h>=s?d.style.overflow="hidden":d.style.overflow="",l=this.applyStackOrder(d,!1)!==null||l,d.hasAttribute("stack-split")&&(l=!0,this.childObserver.observe(d,{childList:!0}),Array.from(d.children).forEach(b=>this.applyStackOrder(b,!0)))}),l&&!this.stackAt&&(this.stackAt=C9),u`
|
|
1634
|
+
</td>`}};ke.styles=[k(pl),k(gx)],ke.dependencies={"zn-alert":cf,"zn-button":Oe,"zn-empty-state":Nf,"zn-chip":_o,"zn-hover-container":Pf,"zn-dropdown":Mr,"zn-menu":In,"zn-menu-item":Wi,"zn-panel":Hf,"zn-button-group":Nc,"zn-confirm":as,"zn-skeleton":Ff,"zn-style":Bf,"zn-data-table-search":Of},ke._sharableKnownKeys=["search","filter","sortColumn","sortDirection","page","perPage"],c([p({attribute:"data-uri"})],ke.prototype,"dataUri",2),c([p({attribute:"data",type:Object})],ke.prototype,"data",2),c([p({attribute:"sort-column"})],ke.prototype,"sortColumn",2),c([p({attribute:"sort-direction"})],ke.prototype,"sortDirection",2),c([p({attribute:"local-sort",type:Boolean})],ke.prototype,"localSort",2),c([p({attribute:"filter"})],ke.prototype,"filter",2),c([p({attribute:"search"})],ke.prototype,"search",2),c([p({attribute:"wide-column"})],ke.prototype,"wideColumn",2),c([p({attribute:"key"})],ke.prototype,"key",2),c([p({attribute:"headers",type:Object})],ke.prototype,"headers",2),c([p({attribute:!1})],ke.prototype,"displayTemplates",2),c([p({attribute:"hide-headers",type:Object})],ke.prototype,"hiddenHeaders",2),c([p({attribute:"hide-columns",type:Object})],ke.prototype,"hiddenColumns",2),c([p({attribute:"unsortable-headers",type:Object})],ke.prototype,"unsortableHeaders",2),c([p({attribute:"unsortable",type:Boolean})],ke.prototype,"unsortable",2),c([p({attribute:"hide-pagination",type:Boolean})],ke.prototype,"hidePagination",2),c([p({attribute:"hide-column-select",type:Boolean})],ke.prototype,"hideColumnSelect",2),c([p({attribute:"hide-refresh",type:Boolean})],ke.prototype,"hideRefresh",2),c([p({type:Boolean})],ke.prototype,"standalone",2),c([p()],ke.prototype,"caption",2),c([p({attribute:"empty-state-caption"})],ke.prototype,"emptyStateCaption",2),c([p({attribute:"empty-state-icon"})],ke.prototype,"emptyStateIcon",2),c([p()],ke.prototype,"filters",2),c([p()],ke.prototype,"method",2),c([p({attribute:"no-initial-load",type:Boolean})],ke.prototype,"noInitialLoad",2),c([p({attribute:"sharable",type:Boolean})],ke.prototype,"sharable",2),c([p({attribute:"wrap-search-fields",type:Boolean})],ke.prototype,"wrapSearchFields",2),c([p({attribute:"group-by"})],ke.prototype,"groupBy",2),c([p()],ke.prototype,"groups",2),c([p({attribute:"per-page-size",type:Number})],ke.prototype,"itemsPerPage",2),c([D()],ke.prototype,"_deselectedColumns",2),c([D()],ke.prototype,"_filtersOpen",2);var hl=ke;var S9=hl;hl.define("zn-data-table");var vx=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;--zn-col-basis:250px;--col-width:23%}:host([contents]){display:contents}.cols{display:flex;flex-wrap:wrap;flex-grow:1;flex-shrink:1;width:100%;container-type:inline-size;gap:var(--zn-gap);max-width:100%}.cols ::slotted(.zn-col-1){flex-basis:calc(var(--zn-col-basis) * 1);min-width:calc(var(--col-width) * 1);flex-grow:1}.cols ::slotted(.zn-col-2){flex-basis:calc(var(--zn-col-basis) * 2);min-width:calc(var(--col-width) * 2);flex-grow:2}.cols ::slotted(.zn-col-3){flex-basis:calc(var(--zn-col-basis) * 3);min-width:calc(var(--col-width) * 3);flex-grow:3}.cols ::slotted(.zn-col-4){flex-basis:calc(var(--zn-col-basis) * 4);min-width:calc(var(--col-width) * 4);flex-grow:4}.cols ::slotted(.zn-col-5){flex-basis:calc(var(--zn-col-basis) * 5);min-width:calc(var(--col-width) * 5);flex-grow:5}.cols ::slotted(.zn-col-6){flex-basis:calc(var(--zn-col-basis) * 6);min-width:calc(var(--col-width) * 6);flex-grow:6}.cols ::slotted(.zn-col-7){flex-basis:calc(var(--zn-col-basis) * 7);min-width:calc(var(--col-width) * 7);flex-grow:7}.cols ::slotted(.zn-col-8){flex-basis:calc(var(--zn-col-basis) * 8);min-width:calc(var(--col-width) * 8);flex-grow:8}.cols ::slotted(.zn-col-9){flex-basis:calc(var(--zn-col-basis) * 9);min-width:calc(var(--col-width) * 9);flex-grow:9}.cols ::slotted(.zn-col-10){flex-basis:calc(var(--zn-col-basis) * 10);min-width:calc(var(--col-width) * 10);flex-grow:10}.cols ::slotted(.zn-col-11){flex-basis:calc(var(--zn-col-basis) * 11);min-width:calc(var(--col-width) * 11);flex-grow:11}.cols ::slotted(.zn-col-12){flex-basis:calc(var(--zn-col-basis) * 12);min-width:calc(var(--col-width) * 12);flex-grow:12}.cols--mc-1{--col-width:calc(100% / 2)}.cols--mc-2{--col-width:calc(100% / 3)}.cols--mc-3{--col-width:calc(100% / 4)}.cols--mc-4{--col-width:calc(100% / 5)}.cols--mc-5{--col-width:calc(100% / 6)}.cols--mc-6{--col-width:calc(100% / 7)}.cols--mc-7{--col-width:calc(100% / 8)}.cols--mc-8{--col-width:calc(100% / 9)}.cols--mc-9{--col-width:calc(100% / 10)}.cols--mc-10{--col-width:calc(100% / 11)}.cols--mc-11{--col-width:calc(100% / 12)}.cols--mc-12{--col-width:calc(100% / 13)}.cols--layout-121 ::slotted(.zn-col-2){order:-1;min-width:100%}@container (min-width:1440px){.cols--layout-121 ::slotted(.zn-col-2){order:initial;min-width:46%}}.cols--divide ::slotted(*:not(:last-child)){position:relative}.cols--divide ::slotted(*:not(:last-child)):after{content:"";position:absolute;display:block;width:1px;top:0;height:100%;max-height:100%;right:calc(var(--zn-spacing-small) / 2 * -1);background-color:rgb(var(--zn-border-color))}.cols--divide ::slotted([data-row-end]):after{display:none}.cols--no-gap{gap:0}.cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{right:0}.cols--border{overflow:hidden}.cols--border ::slotted(*){position:relative;padding-bottom:var(--zn-spacing-small)}.cols--border ::slotted(*):before{content:"";position:absolute;bottom:-1px;left:-100vw;right:-5px;z-index:1111;border-bottom:1px solid rgb(var(--zn-border-color)) !important}.cols ::slotted([stack-split]){display:flex;flex-direction:column;gap:var(--zn-gap)}.cols--pad{padding:var(--zn-spacing-2x-small)}.cols--pad-x{padding-inline:var(--zn-spacing-2x-small)}.cols--pad-y{padding-block:var(--zn-spacing-2x-small)}@container (max-width:359px){:host([stack-at=sm]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=sm]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=sm]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=sm]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:479px){:host([stack-at=smp]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=smp]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=smp]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=smp]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:599px){:host([stack-at=ph]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=ph]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=ph]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=ph]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:767px){:host([stack-at=md]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=md]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=md]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=md]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:1099px){:host([stack-at=lg]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=lg]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=lg]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=lg]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:1439px){:host([stack-at=hd]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=hd]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=hd]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at=hd]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:1959px){:host([stack-at="3k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="3k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="3k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at="3k"]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}@container (max-width:2559px){:host([stack-at="4k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="4k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="4k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}:host([stack-at="4k"]) .cols--no-gap.cols--divide ::slotted(*:not(:last-child)):after{display:block;top:auto;right:0;bottom:0;left:0;width:auto;height:1px}}`;var yx={first:-1,high:-1,last:1,low:1},C9="lg",Yr=class extends T{constructor(){super(...arguments);this.layout="";this.stackAt="";this.maxColumns=0;this.noGap=!1;this.border=!1;this.divide=!1;this.childObserver=new MutationObserver(()=>this.requestUpdate());this.resizeObserver=new ResizeObserver(()=>this.markRowEnds())}connectedCallback(){super.connectedCallback(),this.childObserver.observe(this,{childList:!0}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.childObserver.disconnect(),this.resizeObserver.disconnect()}updated(t){super.updated(t),this.markRowEnds()}markRowEnds(){let t=Array.from(this.querySelectorAll(":scope > *:not([slot])"));if(!this.divide){t.forEach(n=>n.removeAttribute("data-row-end"));return}let r=t.map(n=>n.getBoundingClientRect());t.forEach((n,a)=>{let s=r[a],l=!r.some(d=>d!==s&&d.top<s.bottom&&d.bottom>s.top&&d.left>s.left);n.toggleAttribute("data-row-end",l)})}stackOrder(t){let r=t.getAttribute("stack-order");if(r===null)return null;let n=r.trim().toLowerCase();if(n in yx)return yx[n];let a=parseInt(n,10);return isNaN(a)?null:a}applyStackOrder(t,r){let n=this.stackOrder(t);return t.style.order=n===null?"":`calc(var(--zn-stacked, 0) * ${n})`,r&&(t.style.flexBasis="var(--zn-stack-basis, auto)"),n}render(){let t=this.layout.split(/[\s,]+/).map(d=>parseInt(d)).filter(d=>!!d);t.length===0&&t.push(1,1,1,1),this.layout=t.join(","),this.maxColumns=t.reduce((d,h)=>d+h,0);let r="zn-col-",n=Array.from(this.querySelectorAll(":scope > *:not([slot])")),a=t.length,s=n.length-(n.length%a||a),l=!1;return n.forEach((d,h)=>{let m=d.className.split(" ").filter(b=>!b.startsWith(r));d.className=m.join(" ");let f=h%a;d.classList.add(r+t[f]),this.border&&h>=s?d.style.overflow="hidden":d.style.overflow="",l=this.applyStackOrder(d,!1)!==null||l,d.hasAttribute("stack-split")&&(l=!0,this.childObserver.observe(d,{childList:!0}),Array.from(d.children).forEach(b=>this.applyStackOrder(b,!0)))}),l&&!this.stackAt&&(this.stackAt=C9),u`
|
|
1635
1635
|
<div part="base" class="${q({cols:!0,"cols--no-gap":this.noGap,"cols--border":this.border,"cols--pad":this.pad,"cols--pad-x":this.padX,"cols--pad-y":this.padY,"cols--divide":this.divide,[`cols--layout-${this.layout.replaceAll(",","")}`]:!!this.layout,[`cols--mc-${this.maxColumns}`]:!!this.maxColumns})}">
|
|
1636
1636
|
<slot></slot>
|
|
1637
1637
|
</div>
|
|
@@ -2619,8 +2619,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2619
2619
|
${i}
|
|
2620
2620
|
</div>
|
|
2621
2621
|
</div>
|
|
2622
|
-
`}};hn.styles=k(hw),c([p({reflect:!0})],hn.prototype,"caption",2),c([p({reflect:!0})],hn.prototype,"label",2),c([p({type:Number,reflect:!0})],hn.prototype,"steps",2),c([p({type:Number,reflect:!0})],hn.prototype,"value",2),c([p({type:Boolean,reflect:!0,attribute:"show-progress"})],hn.prototype,"showProgress",2);var aE=hn;hn.define("zn-stepper");var uw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}:host([layout=value-first]){display:block}.stat-tile .caption,.stat-tile .description,.stat-tile .amount,.stat-tile .bottom{margin:0}.stat-tile .caption{margin-bottom:var(--zn-spacing-x-small);font-size:var(--zn-text-chart-minor-font-size);line-height:var(--zn-text-chart-minor-line-height);font-weight:var(--zn-text-chart-minor-font-weight);color:var(--zn-text-chart-minor-color)}.stat-tile .container{display:flex;flex-direction:row;gap:var(--zn-spacing-medium);height:100%}.stat-tile .left{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}.stat-tile .amount{color:var(--zn-text-chart-major-color);font-weight:var(--zn-text-chart-major-font-weight);font-size:var(--zn-text-chart-major-font-size);line-height:var(--zn-text-chart-major-line-height);display:flex;flex-grow:1;align-items:center}.stat-tile .bottom{color:rgb(var(--zn-text));font-weight:400;padding-top:var(--zn-spacing-medium);font-size:var(--zn-font-size-small)}.stat-tile .bottom:empty{display:none}.stat-tile .diff .positive{color:rgb(var(--zn-color-success))}.stat-tile .diff .negative{color:rgb(var(--zn-color-error))}.stat-tile .diff .neutral{color:rgb(var(--zn-color-warning))}.stat-tile .icon{margin-left:var(--zn-spacing-x-small)}.stat-tile--value-first{display:flex;flex-direction:column;gap:var(--zn-spacing-2x-small);color:var(--zn-text-chart-major-color)}.stat-tile--value-first .caption{margin-bottom:0}.stat-tile--value-first .amount{flex-grow:0;gap:var(--zn-spacing-x-small);color:inherit}.stat-tile--value-first .diff{font-size:var(--zn-font-size-small);font-weight:400}.stat-tile--value-first .diff .neutral,.stat-tile--value-first .description{color:rgba(var(--zn-color-text),0.6)}.stat-tile--value-first .description{font-size:var(--zn-font-size-x-small)}.stat-tile--value-first .icon{margin-left:0}.stat-tile--padded{padding:var(--zn-spacing-large)}.stat-tile--large .amount{font-size:var(--zn-font-size-3x-large);font-weight:var(--zn-font-weight-semibold);line-height:1.15}.stat-tile--chart .amount{padding-top:var(--zn-spacing-small)}.stat-tile--chart .bottom{padding-top:var(--zn-spacing-small)}.stat-tile--primary{color:rgb(var(--zn-primary))}.stat-tile--error{color:rgb(var(--zn-color-error))}.stat-tile--info{color:rgb(var(--zn-color-info))}.stat-tile--warning{color:rgb(var(--zn-color-warning))}.stat-tile--success{color:rgb(var(--zn-color-success))}.stat-tile--neutral{color:rgb(var(--zn-text))}.stat-tile--value-first.stat-tile--neutral{color:var(--zn-text-chart-major-color)}@container (max-width:550px){.stat-tile ::slotted(.zn-col-1){flex-basis:170px}.stat-tile .amount{font-size:20px;line-height:20px;padding-top:5px}.stat-tile--large .amount{font-size:var(--zn-font-size-2x-large);line-height:1.15;padding-top:0}}`;var Jt=class extends T{constructor(){super(...arguments);this.caption="";this.description="";this.amount="0";this.type="number";this.previous="0";this.currency="";this.showDelta=!1;this.color="primary";this.layout="default";this.deltaFormat="percent";this.icon="";this.size="medium";this.padded=!1}calcPercentageDifference(){let t=parseFloat(this.previous),n=(parseFloat(this.amount)-t)/t*100;return n=Math.round(n*10)/10,n}getCurrentAmount(){if(this.currency==="")return this.amount;let t=parseFloat(this.amount),r=this.currency,n=t.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${r}${n}`}getDisplayAmount(){if(this.currency!=="")return this.getCurrentAmount();if(this.type==="percent")return`${this.amount}%`;if(this.type==="time"){let t=parseInt(this.amount),r=Math.floor(t/60),n=Math.floor(r/60);return n<=0?[r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s":[n,r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s"}return this.amount}diffText(){if(this.showDelta){let t=this.calcPercentageDifference(),r="neutral",n="~";return t>0&&(r="positive",n="+"),t<0&&(r="negative",n="-"),this.deltaFormat==="points"?u`<p class="diff">${this.pointsDelta()} on Previous Period</p>`:u`<p class="diff"><span class="${r}">${n}${t}%</span> on Previous Period</p>`}return null}pointsDelta(){let t=Math.round((parseFloat(this.amount)-parseFloat(this.previous))*10)/10;return t>0?u`<span class="positive">+${t} pts</span>`:t<0?u`<span class="negative">-${Math.abs(t)} pts</span>`:u`<span class="neutral">No change</span>`}renderAmount(){return u
|
|
2623
|
-
<zn-icon class="icon" src="${this.icon}" size="20" color="${P(this.iconColor)}"></zn-icon>`:null}
|
|
2622
|
+
`}};hn.styles=k(hw),c([p({reflect:!0})],hn.prototype,"caption",2),c([p({reflect:!0})],hn.prototype,"label",2),c([p({type:Number,reflect:!0})],hn.prototype,"steps",2),c([p({type:Number,reflect:!0})],hn.prototype,"value",2),c([p({type:Boolean,reflect:!0,attribute:"show-progress"})],hn.prototype,"showProgress",2);var aE=hn;hn.define("zn-stepper");var uw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}:host([layout=value-first]){display:block}.stat-tile .caption,.stat-tile .description,.stat-tile .amount,.stat-tile .bottom{margin:0}.stat-tile .caption{margin-bottom:var(--zn-spacing-x-small);font-size:var(--zn-text-chart-minor-font-size);line-height:var(--zn-text-chart-minor-line-height);font-weight:var(--zn-text-chart-minor-font-weight);color:var(--zn-text-chart-minor-color)}.stat-tile .container{display:flex;flex-direction:row;gap:var(--zn-spacing-medium);height:100%}.stat-tile .left{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}.stat-tile .amount{color:var(--zn-text-chart-major-color);font-weight:var(--zn-text-chart-major-font-weight);font-size:var(--zn-text-chart-major-font-size);line-height:var(--zn-text-chart-major-line-height);display:flex;flex-grow:1;align-items:center}.stat-tile .bottom{color:rgb(var(--zn-text));font-weight:400;padding-top:var(--zn-spacing-medium);font-size:var(--zn-font-size-small)}.stat-tile .bottom:empty{display:none}.stat-tile .diff .positive{color:rgb(var(--zn-color-success))}.stat-tile .diff .negative{color:rgb(var(--zn-color-error))}.stat-tile .diff .neutral{color:rgb(var(--zn-color-warning))}.stat-tile .value{display:inline-flex;align-items:center;white-space:nowrap}.stat-tile .icon{margin-left:var(--zn-spacing-x-small)}.stat-tile--value-first{display:flex;flex-direction:column;gap:var(--zn-spacing-2x-small);color:var(--zn-text-chart-major-color)}.stat-tile--value-first .caption{margin-bottom:0}.stat-tile--value-first .amount{flex-grow:0;flex-wrap:wrap;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small);color:inherit}.stat-tile--value-first .value{gap:var(--zn-spacing-x-small)}.stat-tile--value-first .diff{font-size:var(--zn-font-size-small);font-weight:400;white-space:nowrap}.stat-tile--value-first .diff .neutral,.stat-tile--value-first .description{color:rgba(var(--zn-color-text),0.6)}.stat-tile--value-first .description{font-size:var(--zn-font-size-x-small)}.stat-tile--value-first .icon{margin-left:0}.stat-tile--padded{padding:var(--zn-spacing-large)}.stat-tile--large .amount{font-size:var(--zn-font-size-3x-large);font-weight:var(--zn-font-weight-semibold);line-height:1.15}.stat-tile--chart .amount{padding-top:var(--zn-spacing-small)}.stat-tile--chart .bottom{padding-top:var(--zn-spacing-small)}.stat-tile--primary{color:rgb(var(--zn-primary))}.stat-tile--error{color:rgb(var(--zn-color-error))}.stat-tile--info{color:rgb(var(--zn-color-info))}.stat-tile--warning{color:rgb(var(--zn-color-warning))}.stat-tile--success{color:rgb(var(--zn-color-success))}.stat-tile--neutral{color:rgb(var(--zn-text))}.stat-tile--value-first.stat-tile--neutral{color:var(--zn-text-chart-major-color)}@container (max-width:550px){.stat-tile ::slotted(.zn-col-1){flex-basis:170px}.stat-tile .amount{font-size:20px;line-height:20px;padding-top:5px}.stat-tile--large .amount{font-size:var(--zn-font-size-2x-large);line-height:1.15;padding-top:0}}`;var Jt=class extends T{constructor(){super(...arguments);this.caption="";this.description="";this.amount="0";this.type="number";this.previous="0";this.currency="";this.showDelta=!1;this.color="primary";this.layout="default";this.deltaFormat="percent";this.icon="";this.size="medium";this.padded=!1}calcPercentageDifference(){let t=parseFloat(this.previous),n=(parseFloat(this.amount)-t)/t*100;return n=Math.round(n*10)/10,n}getCurrentAmount(){if(this.currency==="")return this.amount;let t=parseFloat(this.amount),r=this.currency,n=t.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${r}${n}`}getDisplayAmount(){if(this.currency!=="")return this.getCurrentAmount();if(this.type==="percent")return`${this.amount}%`;if(this.type==="time"){let t=parseInt(this.amount),r=Math.floor(t/60),n=Math.floor(r/60);return n<=0?[r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s":[n,r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s"}return this.amount}diffText(){if(this.showDelta){let t=this.calcPercentageDifference(),r="neutral",n="~";return t>0&&(r="positive",n="+"),t<0&&(r="negative",n="-"),this.deltaFormat==="points"?u`<p class="diff">${this.pointsDelta()} on Previous Period</p>`:u`<p class="diff"><span class="${r}">${n}${t}%</span> on Previous Period</p>`}return null}pointsDelta(){let t=Math.round((parseFloat(this.amount)-parseFloat(this.previous))*10)/10;return t>0?u`<span class="positive">+${t} pts</span>`:t<0?u`<span class="negative">-${Math.abs(t)} pts</span>`:u`<span class="neutral">No change</span>`}renderAmount(){return u`<span class="value">${this.getDisplayAmount()}${this.icon?u`
|
|
2623
|
+
<zn-icon class="icon" src="${this.icon}" size="20" color="${P(this.iconColor)}"></zn-icon>`:null}</span>`}renderValueFirst(){let t=this.showDelta?this.deltaFormat==="points"?this.pointsDelta():this.percentDelta():null;return u`
|
|
2624
2624
|
<div class="${q({"stat-tile":!0,"stat-tile--value-first":!0,"stat-tile--large":this.size==="large","stat-tile--padded":this.padded,[`stat-tile--${this.color}`]:!0})}">
|
|
2625
2625
|
<h3 class="caption">${this.caption}</h3>
|
|
2626
2626
|
<p class="amount">${this.renderAmount()}${t?u`<span class="diff">${t}</span>`:null}</p>
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {classMap} from "lit/directives/class-map.js";
|
|
2
|
-
import {type CSSResultGroup, html, unsafeCSS} from 'lit';
|
|
2
|
+
import {type CSSResultGroup, html, type PropertyValues, unsafeCSS} from 'lit';
|
|
3
3
|
import {property} from 'lit/decorators.js';
|
|
4
4
|
import ZincElement from '../../internal/zinc-element';
|
|
5
5
|
|
|
@@ -65,14 +65,43 @@ export default class ZnCols extends ZincElement {
|
|
|
65
65
|
// the whole subtree, to avoid reacting to unrelated content updates deeper in a column.
|
|
66
66
|
private readonly childObserver: MutationObserver = new MutationObserver(() => this.requestUpdate());
|
|
67
67
|
|
|
68
|
+
private readonly resizeObserver: ResizeObserver = new ResizeObserver(() => this.markRowEnds());
|
|
69
|
+
|
|
68
70
|
connectedCallback() {
|
|
69
71
|
super.connectedCallback();
|
|
70
72
|
this.childObserver.observe(this, {childList: true});
|
|
73
|
+
this.resizeObserver.observe(this);
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
disconnectedCallback() {
|
|
74
77
|
super.disconnectedCallback();
|
|
75
78
|
this.childObserver.disconnect();
|
|
79
|
+
this.resizeObserver.disconnect();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
protected updated(changed: PropertyValues<this>) {
|
|
83
|
+
super.updated(changed);
|
|
84
|
+
this.markRowEnds();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Flags each child that ends its row as laid out, so `divide` only draws between neighbours on the same row
|
|
89
|
+
* however the columns have wrapped.
|
|
90
|
+
*/
|
|
91
|
+
private markRowEnds() {
|
|
92
|
+
const children = Array.from(this.querySelectorAll(':scope > *:not([slot])'));
|
|
93
|
+
if (!this.divide) {
|
|
94
|
+
children.forEach((child) => child.removeAttribute('data-row-end'));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const rects = children.map((child) => child.getBoundingClientRect());
|
|
99
|
+
children.forEach((child, i) => {
|
|
100
|
+
const rect = rects[i];
|
|
101
|
+
const rowEnd = !rects.some((other) =>
|
|
102
|
+
other !== rect && other.top < rect.bottom && other.bottom > rect.top && other.left > rect.left);
|
|
103
|
+
child.toggleAttribute('data-row-end', rowEnd);
|
|
104
|
+
});
|
|
76
105
|
}
|
|
77
106
|
|
|
78
107
|
/**
|
|
@@ -135,4 +135,35 @@ describe('<zn-cols>', () => {
|
|
|
135
135
|
expect(orderOf(el.querySelector('#usage'))).to.equal('-1');
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
|
+
|
|
139
|
+
describe('dividers', () => {
|
|
140
|
+
const dividerOf = (el: Element | null) => getComputedStyle(el!, '::after').display;
|
|
141
|
+
|
|
142
|
+
it('should only divide neighbours on the same row', async () => {
|
|
143
|
+
const el = await cols(`
|
|
144
|
+
<zn-cols layout="1,1" divide style="width: 600px">
|
|
145
|
+
<div id="a" style="height: 20px"></div>
|
|
146
|
+
<div id="b" style="height: 20px"></div>
|
|
147
|
+
<div id="c" style="height: 20px"></div>
|
|
148
|
+
<div id="d" style="height: 20px"></div>
|
|
149
|
+
</zn-cols>`);
|
|
150
|
+
|
|
151
|
+
expect(dividerOf(el.querySelector('#a'))).to.equal('block');
|
|
152
|
+
expect(dividerOf(el.querySelector('#b'))).to.equal('none');
|
|
153
|
+
expect(dividerOf(el.querySelector('#c'))).to.equal('block');
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it('should drop the dividers once the columns wrap', async () => {
|
|
157
|
+
const el = await cols(`
|
|
158
|
+
<zn-cols layout="1,1" divide style="width: 600px">
|
|
159
|
+
<div id="a" style="height: 20px"></div>
|
|
160
|
+
<div id="b" style="height: 20px"></div>
|
|
161
|
+
</zn-cols>`);
|
|
162
|
+
|
|
163
|
+
el.style.width = '400px';
|
|
164
|
+
await aTimeout(100);
|
|
165
|
+
|
|
166
|
+
expect(dividerOf(el.querySelector('#a'))).to.equal('none');
|
|
167
|
+
});
|
|
168
|
+
});
|
|
138
169
|
});
|
|
@@ -127,8 +127,8 @@ export default class ZnStatsTile extends ZincElement {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
private renderAmount() {
|
|
130
|
-
return html
|
|
131
|
-
<zn-icon class="icon" src="${this.icon}" size="20" color="${ifDefined(this.iconColor)}"></zn-icon>` : null}
|
|
130
|
+
return html`<span class="value">${this.getDisplayAmount()}${this.icon ? html`
|
|
131
|
+
<zn-icon class="icon" src="${this.icon}" size="20" color="${ifDefined(this.iconColor)}"></zn-icon>` : null}</span>`;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
private renderValueFirst() {
|
|
@@ -73,6 +73,12 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
.value {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
.icon {
|
|
77
83
|
margin-left: var(--zn-spacing-x-small);
|
|
78
84
|
}
|
|
@@ -89,13 +95,19 @@
|
|
|
89
95
|
|
|
90
96
|
.amount {
|
|
91
97
|
flex-grow: 0;
|
|
92
|
-
|
|
98
|
+
flex-wrap: wrap;
|
|
99
|
+
column-gap: var(--zn-spacing-x-small);
|
|
93
100
|
color: inherit;
|
|
94
101
|
}
|
|
95
102
|
|
|
103
|
+
.value {
|
|
104
|
+
gap: var(--zn-spacing-x-small);
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
.diff {
|
|
97
108
|
font-size: var(--zn-font-size-small);
|
|
98
109
|
font-weight: 400;
|
|
110
|
+
white-space: nowrap;
|
|
99
111
|
}
|
|
100
112
|
|
|
101
113
|
.diff .neutral,
|