@kubex/zinc 1.1.74 → 1.1.75
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 +157 -157
- package/dist/vscode.html-custom-data.json +22 -22
- package/dist/web-types.json +41 -41
- package/dist/zn.min.js +5 -3
- package/package.json +1 -1
- package/src/components/expanding-action/expanding-action.component.ts +4 -2
- package/src/components/expanding-action/expanding-action.scss +14 -2
- package/src/components/expanding-action/expanding-action.test.ts +44 -1
|
@@ -47,79 +47,6 @@
|
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
"kind": "javascript-module",
|
|
52
|
-
"path": "components/action-bar/action-bar.js",
|
|
53
|
-
"declarations": [
|
|
54
|
-
{
|
|
55
|
-
"kind": "class",
|
|
56
|
-
"description": "",
|
|
57
|
-
"name": "ZnActionBar",
|
|
58
|
-
"cssProperties": [
|
|
59
|
-
{
|
|
60
|
-
"description": "An example CSS custom property.",
|
|
61
|
-
"name": "--example"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"cssParts": [
|
|
65
|
-
{
|
|
66
|
-
"description": "The component's base wrapper.",
|
|
67
|
-
"name": "base"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"slots": [
|
|
71
|
-
{
|
|
72
|
-
"description": "The default slot.",
|
|
73
|
-
"name": ""
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"description": "An example slot.",
|
|
77
|
-
"name": "example"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"members": [
|
|
81
|
-
{
|
|
82
|
-
"kind": "field",
|
|
83
|
-
"name": "localize",
|
|
84
|
-
"privacy": "private",
|
|
85
|
-
"readonly": true,
|
|
86
|
-
"default": "new LocalizeController(this)"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"events": [
|
|
90
|
-
{
|
|
91
|
-
"description": "Emitted as an example.",
|
|
92
|
-
"name": "zn-event-name"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"superclass": {
|
|
96
|
-
"name": "ZincElement",
|
|
97
|
-
"module": "/src/internal/zinc-element"
|
|
98
|
-
},
|
|
99
|
-
"summary": "Short summary of the component's intended use.",
|
|
100
|
-
"tagNameWithoutPrefix": "action-bar",
|
|
101
|
-
"tagName": "zn-action-bar",
|
|
102
|
-
"customElement": true,
|
|
103
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
104
|
-
"documentation": "https://zinc.style/components/action-bar",
|
|
105
|
-
"status": "experimental",
|
|
106
|
-
"since": "1.0",
|
|
107
|
-
"dependencies": [
|
|
108
|
-
"zn-example"
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"exports": [
|
|
113
|
-
{
|
|
114
|
-
"kind": "js",
|
|
115
|
-
"name": "default",
|
|
116
|
-
"declaration": {
|
|
117
|
-
"name": "ZnActionBar",
|
|
118
|
-
"module": "components/action-bar/action-bar.js"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
50
|
{
|
|
124
51
|
"kind": "javascript-module",
|
|
125
52
|
"path": "components/alert/alert.js",
|
|
@@ -314,6 +241,79 @@
|
|
|
314
241
|
}
|
|
315
242
|
]
|
|
316
243
|
},
|
|
244
|
+
{
|
|
245
|
+
"kind": "javascript-module",
|
|
246
|
+
"path": "components/action-bar/action-bar.js",
|
|
247
|
+
"declarations": [
|
|
248
|
+
{
|
|
249
|
+
"kind": "class",
|
|
250
|
+
"description": "",
|
|
251
|
+
"name": "ZnActionBar",
|
|
252
|
+
"cssProperties": [
|
|
253
|
+
{
|
|
254
|
+
"description": "An example CSS custom property.",
|
|
255
|
+
"name": "--example"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"cssParts": [
|
|
259
|
+
{
|
|
260
|
+
"description": "The component's base wrapper.",
|
|
261
|
+
"name": "base"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"slots": [
|
|
265
|
+
{
|
|
266
|
+
"description": "The default slot.",
|
|
267
|
+
"name": ""
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"description": "An example slot.",
|
|
271
|
+
"name": "example"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"members": [
|
|
275
|
+
{
|
|
276
|
+
"kind": "field",
|
|
277
|
+
"name": "localize",
|
|
278
|
+
"privacy": "private",
|
|
279
|
+
"readonly": true,
|
|
280
|
+
"default": "new LocalizeController(this)"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"events": [
|
|
284
|
+
{
|
|
285
|
+
"description": "Emitted as an example.",
|
|
286
|
+
"name": "zn-event-name"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"superclass": {
|
|
290
|
+
"name": "ZincElement",
|
|
291
|
+
"module": "/src/internal/zinc-element"
|
|
292
|
+
},
|
|
293
|
+
"summary": "Short summary of the component's intended use.",
|
|
294
|
+
"tagNameWithoutPrefix": "action-bar",
|
|
295
|
+
"tagName": "zn-action-bar",
|
|
296
|
+
"customElement": true,
|
|
297
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
298
|
+
"documentation": "https://zinc.style/components/action-bar",
|
|
299
|
+
"status": "experimental",
|
|
300
|
+
"since": "1.0",
|
|
301
|
+
"dependencies": [
|
|
302
|
+
"zn-example"
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"exports": [
|
|
307
|
+
{
|
|
308
|
+
"kind": "js",
|
|
309
|
+
"name": "default",
|
|
310
|
+
"declaration": {
|
|
311
|
+
"name": "ZnActionBar",
|
|
312
|
+
"module": "components/action-bar/action-bar.js"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
317
|
{
|
|
318
318
|
"kind": "javascript-module",
|
|
319
319
|
"path": "components/animated-button/animated-button.js",
|
|
@@ -44118,89 +44118,6 @@
|
|
|
44118
44118
|
}
|
|
44119
44119
|
]
|
|
44120
44120
|
},
|
|
44121
|
-
{
|
|
44122
|
-
"kind": "javascript-module",
|
|
44123
|
-
"path": "components/well/well.js",
|
|
44124
|
-
"declarations": [
|
|
44125
|
-
{
|
|
44126
|
-
"kind": "class",
|
|
44127
|
-
"description": "",
|
|
44128
|
-
"name": "ZnWell",
|
|
44129
|
-
"slots": [
|
|
44130
|
-
{
|
|
44131
|
-
"description": "The default slot.",
|
|
44132
|
-
"name": ""
|
|
44133
|
-
}
|
|
44134
|
-
],
|
|
44135
|
-
"members": [
|
|
44136
|
-
{
|
|
44137
|
-
"kind": "field",
|
|
44138
|
-
"name": "icon",
|
|
44139
|
-
"type": {
|
|
44140
|
-
"text": "string"
|
|
44141
|
-
},
|
|
44142
|
-
"default": "''",
|
|
44143
|
-
"attribute": "icon"
|
|
44144
|
-
},
|
|
44145
|
-
{
|
|
44146
|
-
"kind": "field",
|
|
44147
|
-
"name": "inline",
|
|
44148
|
-
"type": {
|
|
44149
|
-
"text": "boolean"
|
|
44150
|
-
},
|
|
44151
|
-
"attribute": "inline",
|
|
44152
|
-
"reflects": true
|
|
44153
|
-
},
|
|
44154
|
-
{
|
|
44155
|
-
"kind": "field",
|
|
44156
|
-
"name": "hasSlotController",
|
|
44157
|
-
"privacy": "private",
|
|
44158
|
-
"readonly": true,
|
|
44159
|
-
"default": "new HasSlotController(this, '[default]', 'action')"
|
|
44160
|
-
}
|
|
44161
|
-
],
|
|
44162
|
-
"attributes": [
|
|
44163
|
-
{
|
|
44164
|
-
"name": "icon",
|
|
44165
|
-
"type": {
|
|
44166
|
-
"text": "string"
|
|
44167
|
-
},
|
|
44168
|
-
"default": "''",
|
|
44169
|
-
"fieldName": "icon"
|
|
44170
|
-
},
|
|
44171
|
-
{
|
|
44172
|
-
"name": "inline",
|
|
44173
|
-
"type": {
|
|
44174
|
-
"text": "boolean"
|
|
44175
|
-
},
|
|
44176
|
-
"fieldName": "inline"
|
|
44177
|
-
}
|
|
44178
|
-
],
|
|
44179
|
-
"superclass": {
|
|
44180
|
-
"name": "ZincElement",
|
|
44181
|
-
"module": "/src/internal/zinc-element"
|
|
44182
|
-
},
|
|
44183
|
-
"summary": "Short summary of the component's intended use.",
|
|
44184
|
-
"tagNameWithoutPrefix": "well",
|
|
44185
|
-
"tagName": "zn-well",
|
|
44186
|
-
"customElement": true,
|
|
44187
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/well\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot.\n */",
|
|
44188
|
-
"documentation": "https://zinc.style/components/well",
|
|
44189
|
-
"status": "experimental",
|
|
44190
|
-
"since": "1.0"
|
|
44191
|
-
}
|
|
44192
|
-
],
|
|
44193
|
-
"exports": [
|
|
44194
|
-
{
|
|
44195
|
-
"kind": "js",
|
|
44196
|
-
"name": "default",
|
|
44197
|
-
"declaration": {
|
|
44198
|
-
"name": "ZnWell",
|
|
44199
|
-
"module": "components/well/well.js"
|
|
44200
|
-
}
|
|
44201
|
-
}
|
|
44202
|
-
]
|
|
44203
|
-
},
|
|
44204
44121
|
{
|
|
44205
44122
|
"kind": "javascript-module",
|
|
44206
44123
|
"path": "components/vertical-stepper/vertical-stepper.js",
|
|
@@ -44369,12 +44286,95 @@
|
|
|
44369
44286
|
}
|
|
44370
44287
|
}
|
|
44371
44288
|
]
|
|
44289
|
+
},
|
|
44290
|
+
{
|
|
44291
|
+
"kind": "javascript-module",
|
|
44292
|
+
"path": "components/well/well.js",
|
|
44293
|
+
"declarations": [
|
|
44294
|
+
{
|
|
44295
|
+
"kind": "class",
|
|
44296
|
+
"description": "",
|
|
44297
|
+
"name": "ZnWell",
|
|
44298
|
+
"slots": [
|
|
44299
|
+
{
|
|
44300
|
+
"description": "The default slot.",
|
|
44301
|
+
"name": ""
|
|
44302
|
+
}
|
|
44303
|
+
],
|
|
44304
|
+
"members": [
|
|
44305
|
+
{
|
|
44306
|
+
"kind": "field",
|
|
44307
|
+
"name": "icon",
|
|
44308
|
+
"type": {
|
|
44309
|
+
"text": "string"
|
|
44310
|
+
},
|
|
44311
|
+
"default": "''",
|
|
44312
|
+
"attribute": "icon"
|
|
44313
|
+
},
|
|
44314
|
+
{
|
|
44315
|
+
"kind": "field",
|
|
44316
|
+
"name": "inline",
|
|
44317
|
+
"type": {
|
|
44318
|
+
"text": "boolean"
|
|
44319
|
+
},
|
|
44320
|
+
"attribute": "inline",
|
|
44321
|
+
"reflects": true
|
|
44322
|
+
},
|
|
44323
|
+
{
|
|
44324
|
+
"kind": "field",
|
|
44325
|
+
"name": "hasSlotController",
|
|
44326
|
+
"privacy": "private",
|
|
44327
|
+
"readonly": true,
|
|
44328
|
+
"default": "new HasSlotController(this, '[default]', 'action')"
|
|
44329
|
+
}
|
|
44330
|
+
],
|
|
44331
|
+
"attributes": [
|
|
44332
|
+
{
|
|
44333
|
+
"name": "icon",
|
|
44334
|
+
"type": {
|
|
44335
|
+
"text": "string"
|
|
44336
|
+
},
|
|
44337
|
+
"default": "''",
|
|
44338
|
+
"fieldName": "icon"
|
|
44339
|
+
},
|
|
44340
|
+
{
|
|
44341
|
+
"name": "inline",
|
|
44342
|
+
"type": {
|
|
44343
|
+
"text": "boolean"
|
|
44344
|
+
},
|
|
44345
|
+
"fieldName": "inline"
|
|
44346
|
+
}
|
|
44347
|
+
],
|
|
44348
|
+
"superclass": {
|
|
44349
|
+
"name": "ZincElement",
|
|
44350
|
+
"module": "/src/internal/zinc-element"
|
|
44351
|
+
},
|
|
44352
|
+
"summary": "Short summary of the component's intended use.",
|
|
44353
|
+
"tagNameWithoutPrefix": "well",
|
|
44354
|
+
"tagName": "zn-well",
|
|
44355
|
+
"customElement": true,
|
|
44356
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/well\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot.\n */",
|
|
44357
|
+
"documentation": "https://zinc.style/components/well",
|
|
44358
|
+
"status": "experimental",
|
|
44359
|
+
"since": "1.0"
|
|
44360
|
+
}
|
|
44361
|
+
],
|
|
44362
|
+
"exports": [
|
|
44363
|
+
{
|
|
44364
|
+
"kind": "js",
|
|
44365
|
+
"name": "default",
|
|
44366
|
+
"declaration": {
|
|
44367
|
+
"name": "ZnWell",
|
|
44368
|
+
"module": "components/well/well.js"
|
|
44369
|
+
}
|
|
44370
|
+
}
|
|
44371
|
+
]
|
|
44372
44372
|
}
|
|
44373
44373
|
],
|
|
44374
44374
|
"package": {
|
|
44375
44375
|
"name": "@kubex/zinc",
|
|
44376
44376
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
44377
|
-
"version": "1.1.
|
|
44377
|
+
"version": "1.1.75",
|
|
44378
44378
|
"author": "",
|
|
44379
44379
|
"license": "MIT"
|
|
44380
44380
|
}
|
|
@@ -13,17 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
"name": "zn-action-bar",
|
|
18
|
-
"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.",
|
|
19
|
-
"attributes": [],
|
|
20
|
-
"references": [
|
|
21
|
-
{
|
|
22
|
-
"name": "Documentation",
|
|
23
|
-
"url": "https://zinc.style/components/action-bar"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
16
|
{
|
|
28
17
|
"name": "zn-alert",
|
|
29
18
|
"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.",
|
|
@@ -64,6 +53,17 @@
|
|
|
64
53
|
}
|
|
65
54
|
]
|
|
66
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"name": "zn-action-bar",
|
|
58
|
+
"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.",
|
|
59
|
+
"attributes": [],
|
|
60
|
+
"references": [
|
|
61
|
+
{
|
|
62
|
+
"name": "Documentation",
|
|
63
|
+
"url": "https://zinc.style/components/action-bar"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
67
|
{
|
|
68
68
|
"name": "zn-animated-button",
|
|
69
69
|
"description": "\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",
|
|
@@ -4486,17 +4486,6 @@
|
|
|
4486
4486
|
}
|
|
4487
4487
|
]
|
|
4488
4488
|
},
|
|
4489
|
-
{
|
|
4490
|
-
"name": "zn-well",
|
|
4491
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
4492
|
-
"attributes": [
|
|
4493
|
-
{ "name": "icon", "values": [] },
|
|
4494
|
-
{ "name": "inline", "values": [] }
|
|
4495
|
-
],
|
|
4496
|
-
"references": [
|
|
4497
|
-
{ "name": "Documentation", "url": "https://zinc.style/components/well" }
|
|
4498
|
-
]
|
|
4499
|
-
},
|
|
4500
4489
|
{
|
|
4501
4490
|
"name": "zn-vertical-stepper",
|
|
4502
4491
|
"description": "Vertical steppers display a sequence of steps in a vertical layout with descriptions and optional icons.\n---\n\n\n### **Slots:**\n - **icon** - Optional slot for adding an icon or indicator before the step content.\n\n### **CSS Parts:**\n - **vs** - The main container for the vertical stepper.\n- **vs__left** - The left section containing the icon and connecting line.\n- **vs__icon** - The icon container.\n- **vs__line** - The vertical connecting line between steps.\n- **vs__right** - The right section containing caption and description text.\n- **vs__caption** - The caption/title text element.\n- **vs__description** - The description text element.",
|
|
@@ -4533,6 +4522,17 @@
|
|
|
4533
4522
|
"url": "https://zinc.style/components/vertical-stepper"
|
|
4534
4523
|
}
|
|
4535
4524
|
]
|
|
4525
|
+
},
|
|
4526
|
+
{
|
|
4527
|
+
"name": "zn-well",
|
|
4528
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
4529
|
+
"attributes": [
|
|
4530
|
+
{ "name": "icon", "values": [] },
|
|
4531
|
+
{ "name": "inline", "values": [] }
|
|
4532
|
+
],
|
|
4533
|
+
"references": [
|
|
4534
|
+
{ "name": "Documentation", "url": "https://zinc.style/components/well" }
|
|
4535
|
+
]
|
|
4536
4536
|
}
|
|
4537
4537
|
]
|
|
4538
4538
|
}
|
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.75",
|
|
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### **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### **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### **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### **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",
|
|
@@ -10601,24 +10601,6 @@
|
|
|
10601
10601
|
"events": []
|
|
10602
10602
|
}
|
|
10603
10603
|
},
|
|
10604
|
-
{
|
|
10605
|
-
"name": "zn-well",
|
|
10606
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
10607
|
-
"doc-url": "",
|
|
10608
|
-
"attributes": [
|
|
10609
|
-
{ "name": "icon", "value": { "type": "string", "default": "''" } },
|
|
10610
|
-
{ "name": "inline", "value": { "type": "boolean" } }
|
|
10611
|
-
],
|
|
10612
|
-
"slots": [{ "name": "", "description": "The default slot." }],
|
|
10613
|
-
"events": [],
|
|
10614
|
-
"js": {
|
|
10615
|
-
"properties": [
|
|
10616
|
-
{ "name": "icon", "type": "string" },
|
|
10617
|
-
{ "name": "inline", "type": "boolean" }
|
|
10618
|
-
],
|
|
10619
|
-
"events": []
|
|
10620
|
-
}
|
|
10621
|
-
},
|
|
10622
10604
|
{
|
|
10623
10605
|
"name": "zn-vertical-stepper",
|
|
10624
10606
|
"description": "Vertical steppers display a sequence of steps in a vertical layout with descriptions and optional icons.\n---\n\n\n### **Slots:**\n - **icon** - Optional slot for adding an icon or indicator before the step content.\n\n### **CSS Parts:**\n - **vs** - The main container for the vertical stepper.\n- **vs__left** - The left section containing the icon and connecting line.\n- **vs__icon** - The icon container.\n- **vs__line** - The vertical connecting line between steps.\n- **vs__right** - The right section containing caption and description text.\n- **vs__caption** - The caption/title text element.\n- **vs__description** - The description text element.",
|
|
@@ -10687,6 +10669,24 @@
|
|
|
10687
10669
|
],
|
|
10688
10670
|
"events": []
|
|
10689
10671
|
}
|
|
10672
|
+
},
|
|
10673
|
+
{
|
|
10674
|
+
"name": "zn-well",
|
|
10675
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
10676
|
+
"doc-url": "",
|
|
10677
|
+
"attributes": [
|
|
10678
|
+
{ "name": "icon", "value": { "type": "string", "default": "''" } },
|
|
10679
|
+
{ "name": "inline", "value": { "type": "boolean" } }
|
|
10680
|
+
],
|
|
10681
|
+
"slots": [{ "name": "", "description": "The default slot." }],
|
|
10682
|
+
"events": [],
|
|
10683
|
+
"js": {
|
|
10684
|
+
"properties": [
|
|
10685
|
+
{ "name": "icon", "type": "string" },
|
|
10686
|
+
{ "name": "inline", "type": "boolean" }
|
|
10687
|
+
],
|
|
10688
|
+
"events": []
|
|
10689
|
+
}
|
|
10690
10690
|
}
|
|
10691
10691
|
]
|
|
10692
10692
|
}
|
package/dist/zn.min.js
CHANGED
|
@@ -1510,7 +1510,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1510
1510
|
`:""}
|
|
1511
1511
|
</div>
|
|
1512
1512
|
<slot name="bottom" part="bottom"></slot>`}};Ot.styles=E(Tv),Ot.dependencies={"zn-dropdown":nr},c([p({attribute:"navigation",type:Array})],Ot.prototype,"navigation",2),c([p({attribute:"full-width",type:Boolean,reflect:!0})],Ot.prototype,"fullWidth",2),c([p({attribute:"icon-bar",type:Boolean,reflect:!0})],Ot.prototype,"iconBar",2),c([p({attribute:"slim",type:Boolean,reflect:!0})],Ot.prototype,"slim",2),c([p({attribute:"border",type:Boolean,reflect:!0})],Ot.prototype,"border",2),c([p({attribute:"hide-one",type:Boolean,reflect:!0})],Ot.prototype,"hideOne",2),c([p({attribute:"flush",type:Boolean,reflect:!0})],Ot.prototype,"flush",2),c([p({attribute:"gutter",type:Boolean,reflect:!0})],Ot.prototype,"gutter",2),c([p({type:Boolean})],Ot.prototype,"stacked",2),c([p({type:Array})],Ot.prototype,"dropdown",2),c([p({attribute:"no-pad",type:Boolean})],Ot.prototype,"noPad",2),c([p({attribute:"manual-add-items",type:Boolean})],Ot.prototype,"manualAddItems",2),c([p({type:Boolean})],Ot.prototype,"isolated",2),c([p({reflect:!0})],Ot.prototype,"color",2),c([p({attribute:"master-id",reflect:!0})],Ot.prototype,"masterId",2),c([p({attribute:"store-key",type:String})],Ot.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],Ot.prototype,"storeTtl",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],Ot.prototype,"localStorage",2),c([p()],Ot.prototype,"_appended",2);var aa=Ot;Ot.define("zn-navbar");function od(i){function o(pt,nt){return pt<<nt|pt>>>32-nt}function t(pt,nt){let xt,R,y,k,z;return y=pt&2147483648,k=nt&2147483648,xt=pt&1073741824,R=nt&1073741824,z=(pt&1073741823)+(nt&1073741823),xt&&R?z^2147483648^y^k:xt||R?z?z^3221225472^y^k:z^1073741824^y^k:z^y^k}function r(pt,nt,xt){return pt&nt|~pt&xt}function n(pt,nt,xt){return pt&xt|nt&~xt}function a(pt,nt,xt){return pt^nt^xt}function s(pt,nt,xt){return nt^(pt|~xt)}function l(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(r(nt,xt,R),y),z)),t(o(pt,k),nt)}function d(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(n(nt,xt,R),y),z)),t(o(pt,k),nt)}function h(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(a(nt,xt,R),y),z)),t(o(pt,k),nt)}function m(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(s(nt,xt,R),y),z)),t(o(pt,k),nt)}function f(pt){for(var nt,xt=pt.length,R=xt+8,y=(R-R%64)/64,k=(y+1)*16,z=Array(k-1),M=0,q=0;q<xt;)nt=(q-q%4)/4,M=q%4*8,z[nt]=z[nt]|pt.charCodeAt(q)<<M,q++;return nt=(q-q%4)/4,M=q%4*8,z[nt]=z[nt]|128<<M,z[k-2]=xt<<3,z[k-1]=xt>>>29,z}function b(pt){var nt="",xt="",R,y;for(y=0;y<=3;y++)R=pt>>>y*8&255,xt="0"+R.toString(16),nt=nt+xt.substr(xt.length-2,2);return nt}function g(pt){pt=pt.replace(/\r\n/g,`
|
|
1513
|
-
`);let nt="";for(let xt=0;xt<pt.length;xt++){let R=pt.charCodeAt(xt);R<128?nt+=String.fromCharCode(R):R>127&&R<2048?(nt+=String.fromCharCode(R>>6|192),nt+=String.fromCharCode(R&63|128)):(nt+=String.fromCharCode(R>>12|224),nt+=String.fromCharCode(R>>6&63|128),nt+=String.fromCharCode(R&63|128))}return nt}let v,x,_,$,N,G,I,w,T,L,W=7,tt=12,dt=17,gt=22,_t=5,Nt=9,ze=14,Ke=20,cr=4,$e=11,Ye=16,we=23,ti=6,$a=10,ut=15,qo=21;for(i=g(i),v=f(i),I=1732584193,w=4023233417,T=2562383102,L=271733878,x=0;x<v.length;x+=16)_=I,$=w,N=T,G=L,I=l(I,w,T,L,v[x+0],W,3614090360),L=l(L,I,w,T,v[x+1],tt,3905402710),T=l(T,L,I,w,v[x+2],dt,606105819),w=l(w,T,L,I,v[x+3],gt,3250441966),I=l(I,w,T,L,v[x+4],W,4118548399),L=l(L,I,w,T,v[x+5],tt,1200080426),T=l(T,L,I,w,v[x+6],dt,2821735955),w=l(w,T,L,I,v[x+7],gt,4249261313),I=l(I,w,T,L,v[x+8],W,1770035416),L=l(L,I,w,T,v[x+9],tt,2336552879),T=l(T,L,I,w,v[x+10],dt,4294925233),w=l(w,T,L,I,v[x+11],gt,2304563134),I=l(I,w,T,L,v[x+12],W,1804603682),L=l(L,I,w,T,v[x+13],tt,4254626195),T=l(T,L,I,w,v[x+14],dt,2792965006),w=l(w,T,L,I,v[x+15],gt,1236535329),I=d(I,w,T,L,v[x+1],_t,4129170786),L=d(L,I,w,T,v[x+6],Nt,3225465664),T=d(T,L,I,w,v[x+11],ze,643717713),w=d(w,T,L,I,v[x+0],Ke,3921069994),I=d(I,w,T,L,v[x+5],_t,3593408605),L=d(L,I,w,T,v[x+10],Nt,38016083),T=d(T,L,I,w,v[x+15],ze,3634488961),w=d(w,T,L,I,v[x+4],Ke,3889429448),I=d(I,w,T,L,v[x+9],_t,568446438),L=d(L,I,w,T,v[x+14],Nt,3275163606),T=d(T,L,I,w,v[x+3],ze,4107603335),w=d(w,T,L,I,v[x+8],Ke,1163531501),I=d(I,w,T,L,v[x+13],_t,2850285829),L=d(L,I,w,T,v[x+2],Nt,4243563512),T=d(T,L,I,w,v[x+7],ze,1735328473),w=d(w,T,L,I,v[x+12],Ke,2368359562),I=h(I,w,T,L,v[x+5],cr,4294588738),L=h(L,I,w,T,v[x+8],$e,2272392833),T=h(T,L,I,w,v[x+11],Ye,1839030562),w=h(w,T,L,I,v[x+14],we,4259657740),I=h(I,w,T,L,v[x+1],cr,2763975236),L=h(L,I,w,T,v[x+4],$e,1272893353),T=h(T,L,I,w,v[x+7],Ye,4139469664),w=h(w,T,L,I,v[x+10],we,3200236656),I=h(I,w,T,L,v[x+13],cr,681279174),L=h(L,I,w,T,v[x+0],$e,3936430074),T=h(T,L,I,w,v[x+3],Ye,3572445317),w=h(w,T,L,I,v[x+6],we,76029189),I=h(I,w,T,L,v[x+9],cr,3654602809),L=h(L,I,w,T,v[x+12],$e,3873151461),T=h(T,L,I,w,v[x+15],Ye,530742520),w=h(w,T,L,I,v[x+2],we,3299628645),I=m(I,w,T,L,v[x+0],ti,4096336452),L=m(L,I,w,T,v[x+7],$a,1126891415),T=m(T,L,I,w,v[x+14],ut,2878612391),w=m(w,T,L,I,v[x+5],qo,4237533241),I=m(I,w,T,L,v[x+12],ti,1700485571),L=m(L,I,w,T,v[x+3],$a,2399980690),T=m(T,L,I,w,v[x+10],ut,4293915773),w=m(w,T,L,I,v[x+1],qo,2240044497),I=m(I,w,T,L,v[x+8],ti,1873313359),L=m(L,I,w,T,v[x+15],$a,4264355552),T=m(T,L,I,w,v[x+6],ut,2734768916),w=m(w,T,L,I,v[x+13],qo,1309151649),I=m(I,w,T,L,v[x+4],ti,4149444226),L=m(L,I,w,T,v[x+11],$a,3174756917),T=m(T,L,I,w,v[x+2],ut,718787259),w=m(w,T,L,I,v[x+9],qo,3951481745),I=t(I,_),w=t(w,$),T=t(T,N),L=t(L,G);var Mo=b(I)+b(w)+b(T)+b(L);return Mo.toLowerCase()}var $v=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}:host *,:host *::before,:host *::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}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__content{--expanding-action-trigger-width:36px;position:relative;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__content::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__content{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__content::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var Fe=class extends C{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Rt("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Rt("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+od(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
|
|
1513
|
+
`);let nt="";for(let xt=0;xt<pt.length;xt++){let R=pt.charCodeAt(xt);R<128?nt+=String.fromCharCode(R):R>127&&R<2048?(nt+=String.fromCharCode(R>>6|192),nt+=String.fromCharCode(R&63|128)):(nt+=String.fromCharCode(R>>12|224),nt+=String.fromCharCode(R>>6&63|128),nt+=String.fromCharCode(R&63|128))}return nt}let v,x,_,$,N,G,I,w,T,L,W=7,tt=12,dt=17,gt=22,_t=5,Nt=9,ze=14,Ke=20,cr=4,$e=11,Ye=16,we=23,ti=6,$a=10,ut=15,qo=21;for(i=g(i),v=f(i),I=1732584193,w=4023233417,T=2562383102,L=271733878,x=0;x<v.length;x+=16)_=I,$=w,N=T,G=L,I=l(I,w,T,L,v[x+0],W,3614090360),L=l(L,I,w,T,v[x+1],tt,3905402710),T=l(T,L,I,w,v[x+2],dt,606105819),w=l(w,T,L,I,v[x+3],gt,3250441966),I=l(I,w,T,L,v[x+4],W,4118548399),L=l(L,I,w,T,v[x+5],tt,1200080426),T=l(T,L,I,w,v[x+6],dt,2821735955),w=l(w,T,L,I,v[x+7],gt,4249261313),I=l(I,w,T,L,v[x+8],W,1770035416),L=l(L,I,w,T,v[x+9],tt,2336552879),T=l(T,L,I,w,v[x+10],dt,4294925233),w=l(w,T,L,I,v[x+11],gt,2304563134),I=l(I,w,T,L,v[x+12],W,1804603682),L=l(L,I,w,T,v[x+13],tt,4254626195),T=l(T,L,I,w,v[x+14],dt,2792965006),w=l(w,T,L,I,v[x+15],gt,1236535329),I=d(I,w,T,L,v[x+1],_t,4129170786),L=d(L,I,w,T,v[x+6],Nt,3225465664),T=d(T,L,I,w,v[x+11],ze,643717713),w=d(w,T,L,I,v[x+0],Ke,3921069994),I=d(I,w,T,L,v[x+5],_t,3593408605),L=d(L,I,w,T,v[x+10],Nt,38016083),T=d(T,L,I,w,v[x+15],ze,3634488961),w=d(w,T,L,I,v[x+4],Ke,3889429448),I=d(I,w,T,L,v[x+9],_t,568446438),L=d(L,I,w,T,v[x+14],Nt,3275163606),T=d(T,L,I,w,v[x+3],ze,4107603335),w=d(w,T,L,I,v[x+8],Ke,1163531501),I=d(I,w,T,L,v[x+13],_t,2850285829),L=d(L,I,w,T,v[x+2],Nt,4243563512),T=d(T,L,I,w,v[x+7],ze,1735328473),w=d(w,T,L,I,v[x+12],Ke,2368359562),I=h(I,w,T,L,v[x+5],cr,4294588738),L=h(L,I,w,T,v[x+8],$e,2272392833),T=h(T,L,I,w,v[x+11],Ye,1839030562),w=h(w,T,L,I,v[x+14],we,4259657740),I=h(I,w,T,L,v[x+1],cr,2763975236),L=h(L,I,w,T,v[x+4],$e,1272893353),T=h(T,L,I,w,v[x+7],Ye,4139469664),w=h(w,T,L,I,v[x+10],we,3200236656),I=h(I,w,T,L,v[x+13],cr,681279174),L=h(L,I,w,T,v[x+0],$e,3936430074),T=h(T,L,I,w,v[x+3],Ye,3572445317),w=h(w,T,L,I,v[x+6],we,76029189),I=h(I,w,T,L,v[x+9],cr,3654602809),L=h(L,I,w,T,v[x+12],$e,3873151461),T=h(T,L,I,w,v[x+15],Ye,530742520),w=h(w,T,L,I,v[x+2],we,3299628645),I=m(I,w,T,L,v[x+0],ti,4096336452),L=m(L,I,w,T,v[x+7],$a,1126891415),T=m(T,L,I,w,v[x+14],ut,2878612391),w=m(w,T,L,I,v[x+5],qo,4237533241),I=m(I,w,T,L,v[x+12],ti,1700485571),L=m(L,I,w,T,v[x+3],$a,2399980690),T=m(T,L,I,w,v[x+10],ut,4293915773),w=m(w,T,L,I,v[x+1],qo,2240044497),I=m(I,w,T,L,v[x+8],ti,1873313359),L=m(L,I,w,T,v[x+15],$a,4264355552),T=m(T,L,I,w,v[x+6],ut,2734768916),w=m(w,T,L,I,v[x+13],qo,1309151649),I=m(I,w,T,L,v[x+4],ti,4149444226),L=m(L,I,w,T,v[x+11],$a,3174756917),T=m(T,L,I,w,v[x+2],ut,718787259),w=m(w,T,L,I,v[x+9],qo,3951481745),I=t(I,_),w=t(w,$),T=t(T,N),L=t(L,G);var Mo=b(I)+b(w)+b(T)+b(L);return Mo.toLowerCase()}var $v=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}:host *,:host *::before,:host *::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}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar{width:5px;height:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-track{background:transparent}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.expanding-action--drop .expanding-action__frame{--expanding-action-trigger-width:36px;position:relative;display:flex;flex-direction:column;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;max-height:var(--expanding-action-max-height,var(--auto-size-available-height,80vh));background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__frame::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}.expanding-action--drop .expanding-action__content{flex:1 1 auto;min-height:0;overflow-y:auto;border-radius:inherit}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var Fe=class extends C{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Rt("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Rt("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+od(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
|
|
1514
1514
|
${this.method==="fill"?u`
|
|
1515
1515
|
<zn-button class="expanding-action__button"
|
|
1516
1516
|
@click="${this.handleIconClicked}"
|
|
@@ -1538,8 +1538,10 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1538
1538
|
plain
|
|
1539
1539
|
notification="${this.count||V}">
|
|
1540
1540
|
</zn-button>
|
|
1541
|
-
<div
|
|
1542
|
-
<
|
|
1541
|
+
<div class="expanding-action__frame">
|
|
1542
|
+
<div id="content" class="expanding-action__content">
|
|
1543
|
+
<slot></slot>
|
|
1544
|
+
</div>
|
|
1543
1545
|
</div>
|
|
1544
1546
|
</zn-dropdown>`}renderFill(){return u`
|
|
1545
1547
|
<zn-icon src="${this.icon}" size="20"></zn-icon>
|
package/package.json
CHANGED
|
@@ -325,8 +325,10 @@ export default class ZnExpandingAction extends ZincElement {
|
|
|
325
325
|
plain
|
|
326
326
|
notification="${this.count || nothing}">
|
|
327
327
|
</zn-button>
|
|
328
|
-
<div
|
|
329
|
-
<
|
|
328
|
+
<div class="expanding-action__frame">
|
|
329
|
+
<div id="content" class="expanding-action__content">
|
|
330
|
+
<slot></slot>
|
|
331
|
+
</div>
|
|
330
332
|
</div>
|
|
331
333
|
</zn-dropdown>`
|
|
332
334
|
}
|
|
@@ -72,13 +72,18 @@
|
|
|
72
72
|
height: 100%;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.expanding-action--drop .expanding-
|
|
75
|
+
.expanding-action--drop .expanding-action__frame {
|
|
76
|
+
@include wc.scrollbars;
|
|
77
|
+
|
|
76
78
|
--expanding-action-trigger-width: 36px;
|
|
77
79
|
|
|
78
80
|
position: relative;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
79
83
|
min-width: 300px;
|
|
80
84
|
width: var(--expanding-action-basis, var(--zn-container-smp, 320px));
|
|
81
85
|
max-width: 80vw;
|
|
86
|
+
max-height: var(--expanding-action-max-height, var(--auto-size-available-height, 80vh));
|
|
82
87
|
background-color: rgb(var(--zn-panel));
|
|
83
88
|
box-shadow: 0 8px 16px -6px rgba(33, 33, 33, 0.18);
|
|
84
89
|
border: solid 1px rgb(var(--zn-border-color));
|
|
@@ -98,7 +103,14 @@
|
|
|
98
103
|
}
|
|
99
104
|
}
|
|
100
105
|
|
|
101
|
-
|
|
106
|
+
.expanding-action--drop .expanding-action__content {
|
|
107
|
+
flex: 1 1 auto;
|
|
108
|
+
min-height: 0; // Without this the flex item refuses to shrink below its content height
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
border-radius: inherit;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host([data-trigger-side="left"]) .expanding-action--drop .expanding-action__frame {
|
|
102
114
|
border-radius: 0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius);
|
|
103
115
|
|
|
104
116
|
&::before {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../../dist/zn.min.js';
|
|
2
|
-
import { expect, fixture, html } from '@open-wc/testing';
|
|
2
|
+
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
|
|
3
3
|
|
|
4
4
|
describe('<zn-expanding-action>', () => {
|
|
5
5
|
it('should render a component', async () => {
|
|
@@ -7,4 +7,47 @@ describe('<zn-expanding-action>', () => {
|
|
|
7
7
|
|
|
8
8
|
expect(el).to.exist;
|
|
9
9
|
});
|
|
10
|
+
|
|
11
|
+
describe('drop panel overflow', () => {
|
|
12
|
+
const openPanel = async (el: HTMLElement) => {
|
|
13
|
+
const dropdown = el.shadowRoot!.querySelector('zn-dropdown') as HTMLElement & { show: () => Promise<unknown> };
|
|
14
|
+
await dropdown.show();
|
|
15
|
+
await waitUntil(() => el.hasAttribute('open'));
|
|
16
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const tallContent = html`
|
|
20
|
+
<zn-expanding-action method="drop" icon="note">
|
|
21
|
+
<div style="height: 4000px">tall</div>
|
|
22
|
+
</zn-expanding-action>`;
|
|
23
|
+
|
|
24
|
+
it('should bound the panel height so it cannot run off the screen', async () => {
|
|
25
|
+
const el = await fixture<HTMLElement>(tallContent);
|
|
26
|
+
await openPanel(el);
|
|
27
|
+
|
|
28
|
+
const frame = el.shadowRoot!.querySelector<HTMLElement>('.expanding-action__frame')!;
|
|
29
|
+
expect(frame).to.exist;
|
|
30
|
+
expect(frame.getBoundingClientRect().height).to.be.at.most(window.innerHeight);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should scroll overflowing content rather than clipping it', async () => {
|
|
34
|
+
const el = await fixture<HTMLElement>(tallContent);
|
|
35
|
+
await openPanel(el);
|
|
36
|
+
|
|
37
|
+
const content = el.shadowRoot!.querySelector<HTMLElement>('#content')!;
|
|
38
|
+
expect(getComputedStyle(content).overflowY).to.equal('auto');
|
|
39
|
+
expect(content.scrollHeight).to.be.greaterThan(content.clientHeight);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should honour an explicit max-height', async () => {
|
|
43
|
+
const el = await fixture<HTMLElement>(html`
|
|
44
|
+
<zn-expanding-action method="drop" icon="note" max-height="250">
|
|
45
|
+
<div style="height: 4000px">tall</div>
|
|
46
|
+
</zn-expanding-action>`);
|
|
47
|
+
await openPanel(el);
|
|
48
|
+
|
|
49
|
+
const frame = el.shadowRoot!.querySelector<HTMLElement>('.expanding-action__frame')!;
|
|
50
|
+
expect(Math.round(frame.getBoundingClientRect().height)).to.equal(250);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
10
53
|
});
|