@kubex/zinc 1.1.183 → 1.1.184
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 +475 -475
- package/dist/vscode.html-custom-data.json +68 -68
- package/dist/web-types.json +126 -126
- package/dist/zn.min.js +6 -6
- package/package.json +1 -1
- package/src/components/tile/tile.component.ts +5 -4
- package/src/components/tile/tile.test.ts +11 -0
|
@@ -13,6 +13,17 @@
|
|
|
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
|
+
},
|
|
16
27
|
{
|
|
17
28
|
"name": "zn-alert",
|
|
18
29
|
"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.",
|
|
@@ -53,17 +64,6 @@
|
|
|
53
64
|
}
|
|
54
65
|
]
|
|
55
66
|
},
|
|
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",
|
|
@@ -1329,6 +1329,63 @@
|
|
|
1329
1329
|
}
|
|
1330
1330
|
]
|
|
1331
1331
|
},
|
|
1332
|
+
{
|
|
1333
|
+
"name": "zn-defined-label",
|
|
1334
|
+
"description": "This component provides a labeled input with support for predefined and custom labels,\nallowing users to select or enter label-value pairs within a dropdown interface.\n---\n\n\n### **CSS Parts:**\n - **input** - The component's main input.\n- **input-value** - The label's value inputs.",
|
|
1335
|
+
"attributes": [
|
|
1336
|
+
{
|
|
1337
|
+
"name": "value",
|
|
1338
|
+
"description": "The selected label key. Also acts as the filter while typing.",
|
|
1339
|
+
"values": []
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"name": "inputValue",
|
|
1343
|
+
"description": "The value entered for the selected label. Submitted as `label:value` when present.",
|
|
1344
|
+
"values": []
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"name": "input-size",
|
|
1348
|
+
"description": "The size of the main input.",
|
|
1349
|
+
"values": [
|
|
1350
|
+
{ "name": "x-small" },
|
|
1351
|
+
{ "name": "small" },
|
|
1352
|
+
{ "name": "medium" },
|
|
1353
|
+
{ "name": "large" }
|
|
1354
|
+
]
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
"name": "name",
|
|
1358
|
+
"description": "The name of the control. Used for form submission.",
|
|
1359
|
+
"values": []
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"name": "title",
|
|
1363
|
+
"description": "The title of the main input.",
|
|
1364
|
+
"values": []
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"name": "disabled",
|
|
1368
|
+
"description": "Disables the control.",
|
|
1369
|
+
"values": []
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"name": "allow-custom",
|
|
1373
|
+
"description": "Allows labels that aren't in the predefined list.",
|
|
1374
|
+
"values": []
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"name": "predefined-labels",
|
|
1378
|
+
"description": "The predefined labels. Entries are either a string or `{name, options}`.",
|
|
1379
|
+
"values": [{ "name": "(PredefinedLabel" }, { "name": "string)[]" }]
|
|
1380
|
+
}
|
|
1381
|
+
],
|
|
1382
|
+
"references": [
|
|
1383
|
+
{
|
|
1384
|
+
"name": "Documentation",
|
|
1385
|
+
"url": "https://zinc.style/components/defined-label"
|
|
1386
|
+
}
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1332
1389
|
{
|
|
1333
1390
|
"name": "zn-datepicker",
|
|
1334
1391
|
"description": "A date picker component with calendar popup and input validation.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the date value changes.\n- **zn-input** - Emitted when the input value changes.\n- **zn-blur** - Emitted when the input loses focus.\n- **zn-focus** - Emitted when the input gains focus.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **checkValidity(): _boolean_** - Checks the validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - **label** - The datepicker's label. Alternatively, you can use the `label` attribute.\n- **label-tooltip** - Tooltip content for the label. Alternatively, you can use the `label-tooltip` attribute.\n- **context-note** - Additional context text displayed above the input. Alternatively, you can use the `context-note` attribute.\n- **help-text** - Help text displayed below the input. Alternatively, you can use the `help-text` attribute.\n- **prefix** - Content to display before the input (in addition to the default calendar icon).\n- **suffix** - Content to display after the input.\n\n### **CSS Properties:**\n - **--zn-input-*** - Inherited input component CSS custom properties. _(default: undefined)_\n- **--zn-datepicker-inline-border-color** - Border colour of the calendar in `inline` mode. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **form-control** - The form control wrapper.\n- **form-control-label** - The label element.\n- **form-control-input** - The input wrapper.\n- **form-control-help-text** - The help text element.",
|
|
@@ -1462,63 +1519,6 @@
|
|
|
1462
1519
|
}
|
|
1463
1520
|
]
|
|
1464
1521
|
},
|
|
1465
|
-
{
|
|
1466
|
-
"name": "zn-defined-label",
|
|
1467
|
-
"description": "This component provides a labeled input with support for predefined and custom labels,\nallowing users to select or enter label-value pairs within a dropdown interface.\n---\n\n\n### **CSS Parts:**\n - **input** - The component's main input.\n- **input-value** - The label's value inputs.",
|
|
1468
|
-
"attributes": [
|
|
1469
|
-
{
|
|
1470
|
-
"name": "value",
|
|
1471
|
-
"description": "The selected label key. Also acts as the filter while typing.",
|
|
1472
|
-
"values": []
|
|
1473
|
-
},
|
|
1474
|
-
{
|
|
1475
|
-
"name": "inputValue",
|
|
1476
|
-
"description": "The value entered for the selected label. Submitted as `label:value` when present.",
|
|
1477
|
-
"values": []
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
"name": "input-size",
|
|
1481
|
-
"description": "The size of the main input.",
|
|
1482
|
-
"values": [
|
|
1483
|
-
{ "name": "x-small" },
|
|
1484
|
-
{ "name": "small" },
|
|
1485
|
-
{ "name": "medium" },
|
|
1486
|
-
{ "name": "large" }
|
|
1487
|
-
]
|
|
1488
|
-
},
|
|
1489
|
-
{
|
|
1490
|
-
"name": "name",
|
|
1491
|
-
"description": "The name of the control. Used for form submission.",
|
|
1492
|
-
"values": []
|
|
1493
|
-
},
|
|
1494
|
-
{
|
|
1495
|
-
"name": "title",
|
|
1496
|
-
"description": "The title of the main input.",
|
|
1497
|
-
"values": []
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
"name": "disabled",
|
|
1501
|
-
"description": "Disables the control.",
|
|
1502
|
-
"values": []
|
|
1503
|
-
},
|
|
1504
|
-
{
|
|
1505
|
-
"name": "allow-custom",
|
|
1506
|
-
"description": "Allows labels that aren't in the predefined list.",
|
|
1507
|
-
"values": []
|
|
1508
|
-
},
|
|
1509
|
-
{
|
|
1510
|
-
"name": "predefined-labels",
|
|
1511
|
-
"description": "The predefined labels. Entries are either a string or `{name, options}`.",
|
|
1512
|
-
"values": [{ "name": "(PredefinedLabel" }, { "name": "string)[]" }]
|
|
1513
|
-
}
|
|
1514
|
-
],
|
|
1515
|
-
"references": [
|
|
1516
|
-
{
|
|
1517
|
-
"name": "Documentation",
|
|
1518
|
-
"url": "https://zinc.style/components/defined-label"
|
|
1519
|
-
}
|
|
1520
|
-
]
|
|
1521
|
-
},
|
|
1522
1522
|
{
|
|
1523
1523
|
"name": "zn-dialog",
|
|
1524
1524
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-show** - Emitted when the dialog is opens.\n- **zn-close** - Emitted when the dialog is closed.\n- **zn-request-close** - Emitted when the user attempts to close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in destructive behavior such as data loss.\n\n### **Methods:**\n - **show()** - Shows the dialog.\n- **hide()** - Hides the dialog.\n\n### **Slots:**\n - _default_ - The default slot.\n- **label** - The dialog's label. Alternatively you can use the `label` attribute.\n- **header-icon** - Optional icon to add to the left of the dialog's label (title). A color will be applied to the icon depending on the dialog variant.\n- **announcement-intro** - Optional Intro text to display below the icon, when using the variant `announcement`.\n- **header-actions** - Optional actions to add to the header. Works best with `<zn-button>` elements.\n- **footer** - The dialog's footer. This is typically used for buttons representing various options.\n- **footer-text** - Optional text to include below the footer buttons, when using the variant `announcement`.\n\n### **CSS Properties:**\n - **--width** - The preferred width of the dialog. Note the dialog will shrink to accommodate smaller screens. _(default: undefined)_\n- **--header-spacing** - The amount of padding to use for the header. _(default: undefined)_\n- **--body-spacing** - The amount of padding to use for the body. _(default: undefined)_\n- **--footer-spacing** - The amount of padding to use for the footer. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **header** - The dialog's header. This element wraps the title and header actions.\n- **header-actions** - Optional actions to add to the header. Works best with `<zn-button>` elements.\n- **title** - The dialog's title.\n- **close-button** - The dialog's close button.\n- **close-button__base** - The close buttons exported `base` part.\n- **body** - The dialog's body.\n- **footer** - The dialog's footer.",
|
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.184",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,6 +15,28 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"name": "zn-action-bar",
|
|
20
|
+
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
21
|
+
"doc-url": "",
|
|
22
|
+
"attributes": [],
|
|
23
|
+
"slots": [
|
|
24
|
+
{ "name": "", "description": "The default slot." },
|
|
25
|
+
{ "name": "example", "description": "An example slot." }
|
|
26
|
+
],
|
|
27
|
+
"events": [
|
|
28
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
+
],
|
|
30
|
+
"js": {
|
|
31
|
+
"properties": [],
|
|
32
|
+
"events": [
|
|
33
|
+
{
|
|
34
|
+
"name": "zn-event-name",
|
|
35
|
+
"description": "Emitted as an example."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
18
40
|
{
|
|
19
41
|
"name": "zn-alert",
|
|
20
42
|
"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.",
|
|
@@ -83,28 +105,6 @@
|
|
|
83
105
|
]
|
|
84
106
|
}
|
|
85
107
|
},
|
|
86
|
-
{
|
|
87
|
-
"name": "zn-action-bar",
|
|
88
|
-
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
89
|
-
"doc-url": "",
|
|
90
|
-
"attributes": [],
|
|
91
|
-
"slots": [
|
|
92
|
-
{ "name": "", "description": "The default slot." },
|
|
93
|
-
{ "name": "example", "description": "An example slot." }
|
|
94
|
-
],
|
|
95
|
-
"events": [
|
|
96
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
97
|
-
],
|
|
98
|
-
"js": {
|
|
99
|
-
"properties": [],
|
|
100
|
-
"events": [
|
|
101
|
-
{
|
|
102
|
-
"name": "zn-event-name",
|
|
103
|
-
"description": "Emitted as an example."
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
108
|
{
|
|
109
109
|
"name": "zn-animated-button",
|
|
110
110
|
"description": "\n\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -3069,6 +3069,109 @@
|
|
|
3069
3069
|
]
|
|
3070
3070
|
}
|
|
3071
3071
|
},
|
|
3072
|
+
{
|
|
3073
|
+
"name": "zn-defined-label",
|
|
3074
|
+
"description": "This component provides a labeled input with support for predefined and custom labels,\nallowing users to select or enter label-value pairs within a dropdown interface.\n\n---\n\n\n### **CSS Parts:**\n - **input** - The component's main input.\n- **input-value** - The label's value inputs.",
|
|
3075
|
+
"doc-url": "",
|
|
3076
|
+
"attributes": [
|
|
3077
|
+
{
|
|
3078
|
+
"name": "value",
|
|
3079
|
+
"description": "The selected label key. Also acts as the filter while typing.",
|
|
3080
|
+
"value": { "type": "string", "default": "''" }
|
|
3081
|
+
},
|
|
3082
|
+
{
|
|
3083
|
+
"name": "inputValue",
|
|
3084
|
+
"description": "The value entered for the selected label. Submitted as `label:value` when present.",
|
|
3085
|
+
"value": { "type": "string", "default": "''" }
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
"name": "input-size",
|
|
3089
|
+
"description": "The size of the main input.",
|
|
3090
|
+
"value": {
|
|
3091
|
+
"type": "'x-small' | 'small' | 'medium' | 'large'",
|
|
3092
|
+
"default": "'medium'"
|
|
3093
|
+
}
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
"name": "name",
|
|
3097
|
+
"description": "The name of the control. Used for form submission.",
|
|
3098
|
+
"value": { "type": "string", "default": "'label'" }
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
"name": "title",
|
|
3102
|
+
"description": "The title of the main input.",
|
|
3103
|
+
"value": { "type": "string" }
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
"name": "disabled",
|
|
3107
|
+
"description": "Disables the control.",
|
|
3108
|
+
"value": { "type": "boolean", "default": "false" }
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
"name": "allow-custom",
|
|
3112
|
+
"description": "Allows labels that aren't in the predefined list.",
|
|
3113
|
+
"value": { "type": "boolean", "default": "false" }
|
|
3114
|
+
},
|
|
3115
|
+
{
|
|
3116
|
+
"name": "predefined-labels",
|
|
3117
|
+
"description": "The predefined labels. Entries are either a string or `{name, options}`.",
|
|
3118
|
+
"value": {
|
|
3119
|
+
"type": "(PredefinedLabel | string)[]",
|
|
3120
|
+
"default": "[]"
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
],
|
|
3124
|
+
"events": [],
|
|
3125
|
+
"js": {
|
|
3126
|
+
"properties": [
|
|
3127
|
+
{ "name": "input", "type": "ZnInput" },
|
|
3128
|
+
{ "name": "dropdown", "type": "ZnDropdown" },
|
|
3129
|
+
{
|
|
3130
|
+
"name": "value",
|
|
3131
|
+
"description": "The selected label key. Also acts as the filter while typing.",
|
|
3132
|
+
"type": "string"
|
|
3133
|
+
},
|
|
3134
|
+
{
|
|
3135
|
+
"name": "inputValue",
|
|
3136
|
+
"description": "The value entered for the selected label. Submitted as `label:value` when present.",
|
|
3137
|
+
"type": "string"
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
"name": "inputSize",
|
|
3141
|
+
"description": "The size of the main input.",
|
|
3142
|
+
"type": "'x-small' | 'small' | 'medium' | 'large'"
|
|
3143
|
+
},
|
|
3144
|
+
{
|
|
3145
|
+
"name": "name",
|
|
3146
|
+
"description": "The name of the control. Used for form submission.",
|
|
3147
|
+
"type": "string"
|
|
3148
|
+
},
|
|
3149
|
+
{
|
|
3150
|
+
"name": "title",
|
|
3151
|
+
"description": "The title of the main input.",
|
|
3152
|
+
"type": "string"
|
|
3153
|
+
},
|
|
3154
|
+
{
|
|
3155
|
+
"name": "disabled",
|
|
3156
|
+
"description": "Disables the control.",
|
|
3157
|
+
"type": "boolean"
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
"name": "allowCustom",
|
|
3161
|
+
"description": "Allows labels that aren't in the predefined list.",
|
|
3162
|
+
"type": "boolean"
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
"name": "predefinedLabels",
|
|
3166
|
+
"description": "The predefined labels. Entries are either a string or `{name, options}`.",
|
|
3167
|
+
"type": "(PredefinedLabel | string)[]"
|
|
3168
|
+
},
|
|
3169
|
+
{ "name": "validationMessage" },
|
|
3170
|
+
{ "name": "validity" }
|
|
3171
|
+
],
|
|
3172
|
+
"events": []
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3072
3175
|
{
|
|
3073
3176
|
"name": "zn-datepicker",
|
|
3074
3177
|
"description": "A date picker component with calendar popup and input validation.\n\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the date value changes.\n- **zn-input** - Emitted when the input value changes.\n- **zn-blur** - Emitted when the input loses focus.\n- **zn-focus** - Emitted when the input gains focus.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **checkValidity(): _boolean_** - Checks the validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - **label** - The datepicker's label. Alternatively, you can use the `label` attribute.\n- **label-tooltip** - Tooltip content for the label. Alternatively, you can use the `label-tooltip` attribute.\n- **context-note** - Additional context text displayed above the input. Alternatively, you can use the `context-note` attribute.\n- **help-text** - Help text displayed below the input. Alternatively, you can use the `help-text` attribute.\n- **prefix** - Content to display before the input (in addition to the default calendar icon).\n- **suffix** - Content to display after the input.\n\n### **CSS Properties:**\n - **--zn-input-*** - Inherited input component CSS custom properties. _(default: undefined)_\n- **--zn-datepicker-inline-border-color** - Border colour of the calendar in `inline` mode. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **form-control** - The form control wrapper.\n- **form-control-label** - The label element.\n- **form-control-input** - The input wrapper.\n- **form-control-help-text** - The help text element.",
|
|
@@ -3403,109 +3506,6 @@
|
|
|
3403
3506
|
]
|
|
3404
3507
|
}
|
|
3405
3508
|
},
|
|
3406
|
-
{
|
|
3407
|
-
"name": "zn-defined-label",
|
|
3408
|
-
"description": "This component provides a labeled input with support for predefined and custom labels,\nallowing users to select or enter label-value pairs within a dropdown interface.\n\n---\n\n\n### **CSS Parts:**\n - **input** - The component's main input.\n- **input-value** - The label's value inputs.",
|
|
3409
|
-
"doc-url": "",
|
|
3410
|
-
"attributes": [
|
|
3411
|
-
{
|
|
3412
|
-
"name": "value",
|
|
3413
|
-
"description": "The selected label key. Also acts as the filter while typing.",
|
|
3414
|
-
"value": { "type": "string", "default": "''" }
|
|
3415
|
-
},
|
|
3416
|
-
{
|
|
3417
|
-
"name": "inputValue",
|
|
3418
|
-
"description": "The value entered for the selected label. Submitted as `label:value` when present.",
|
|
3419
|
-
"value": { "type": "string", "default": "''" }
|
|
3420
|
-
},
|
|
3421
|
-
{
|
|
3422
|
-
"name": "input-size",
|
|
3423
|
-
"description": "The size of the main input.",
|
|
3424
|
-
"value": {
|
|
3425
|
-
"type": "'x-small' | 'small' | 'medium' | 'large'",
|
|
3426
|
-
"default": "'medium'"
|
|
3427
|
-
}
|
|
3428
|
-
},
|
|
3429
|
-
{
|
|
3430
|
-
"name": "name",
|
|
3431
|
-
"description": "The name of the control. Used for form submission.",
|
|
3432
|
-
"value": { "type": "string", "default": "'label'" }
|
|
3433
|
-
},
|
|
3434
|
-
{
|
|
3435
|
-
"name": "title",
|
|
3436
|
-
"description": "The title of the main input.",
|
|
3437
|
-
"value": { "type": "string" }
|
|
3438
|
-
},
|
|
3439
|
-
{
|
|
3440
|
-
"name": "disabled",
|
|
3441
|
-
"description": "Disables the control.",
|
|
3442
|
-
"value": { "type": "boolean", "default": "false" }
|
|
3443
|
-
},
|
|
3444
|
-
{
|
|
3445
|
-
"name": "allow-custom",
|
|
3446
|
-
"description": "Allows labels that aren't in the predefined list.",
|
|
3447
|
-
"value": { "type": "boolean", "default": "false" }
|
|
3448
|
-
},
|
|
3449
|
-
{
|
|
3450
|
-
"name": "predefined-labels",
|
|
3451
|
-
"description": "The predefined labels. Entries are either a string or `{name, options}`.",
|
|
3452
|
-
"value": {
|
|
3453
|
-
"type": "(PredefinedLabel | string)[]",
|
|
3454
|
-
"default": "[]"
|
|
3455
|
-
}
|
|
3456
|
-
}
|
|
3457
|
-
],
|
|
3458
|
-
"events": [],
|
|
3459
|
-
"js": {
|
|
3460
|
-
"properties": [
|
|
3461
|
-
{ "name": "input", "type": "ZnInput" },
|
|
3462
|
-
{ "name": "dropdown", "type": "ZnDropdown" },
|
|
3463
|
-
{
|
|
3464
|
-
"name": "value",
|
|
3465
|
-
"description": "The selected label key. Also acts as the filter while typing.",
|
|
3466
|
-
"type": "string"
|
|
3467
|
-
},
|
|
3468
|
-
{
|
|
3469
|
-
"name": "inputValue",
|
|
3470
|
-
"description": "The value entered for the selected label. Submitted as `label:value` when present.",
|
|
3471
|
-
"type": "string"
|
|
3472
|
-
},
|
|
3473
|
-
{
|
|
3474
|
-
"name": "inputSize",
|
|
3475
|
-
"description": "The size of the main input.",
|
|
3476
|
-
"type": "'x-small' | 'small' | 'medium' | 'large'"
|
|
3477
|
-
},
|
|
3478
|
-
{
|
|
3479
|
-
"name": "name",
|
|
3480
|
-
"description": "The name of the control. Used for form submission.",
|
|
3481
|
-
"type": "string"
|
|
3482
|
-
},
|
|
3483
|
-
{
|
|
3484
|
-
"name": "title",
|
|
3485
|
-
"description": "The title of the main input.",
|
|
3486
|
-
"type": "string"
|
|
3487
|
-
},
|
|
3488
|
-
{
|
|
3489
|
-
"name": "disabled",
|
|
3490
|
-
"description": "Disables the control.",
|
|
3491
|
-
"type": "boolean"
|
|
3492
|
-
},
|
|
3493
|
-
{
|
|
3494
|
-
"name": "allowCustom",
|
|
3495
|
-
"description": "Allows labels that aren't in the predefined list.",
|
|
3496
|
-
"type": "boolean"
|
|
3497
|
-
},
|
|
3498
|
-
{
|
|
3499
|
-
"name": "predefinedLabels",
|
|
3500
|
-
"description": "The predefined labels. Entries are either a string or `{name, options}`.",
|
|
3501
|
-
"type": "(PredefinedLabel | string)[]"
|
|
3502
|
-
},
|
|
3503
|
-
{ "name": "validationMessage" },
|
|
3504
|
-
{ "name": "validity" }
|
|
3505
|
-
],
|
|
3506
|
-
"events": []
|
|
3507
|
-
}
|
|
3508
|
-
},
|
|
3509
3509
|
{
|
|
3510
3510
|
"name": "zn-dialog",
|
|
3511
3511
|
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-show** - Emitted when the dialog is opens.\n- **zn-close** - Emitted when the dialog is closed.\n- **zn-request-close** - Emitted when the user attempts to close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in destructive behavior such as data loss.\n\n### **Methods:**\n - **show()** - Shows the dialog.\n- **hide()** - Hides the dialog.\n\n### **Slots:**\n - _default_ - The default slot.\n- **label** - The dialog's label. Alternatively you can use the `label` attribute.\n- **header-icon** - Optional icon to add to the left of the dialog's label (title). A color will be applied to the icon depending on the dialog variant.\n- **announcement-intro** - Optional Intro text to display below the icon, when using the variant `announcement`.\n- **header-actions** - Optional actions to add to the header. Works best with `<zn-button>` elements.\n- **footer** - The dialog's footer. This is typically used for buttons representing various options.\n- **footer-text** - Optional text to include below the footer buttons, when using the variant `announcement`.\n\n### **CSS Properties:**\n - **--width** - The preferred width of the dialog. Note the dialog will shrink to accommodate smaller screens. _(default: undefined)_\n- **--header-spacing** - The amount of padding to use for the header. _(default: undefined)_\n- **--body-spacing** - The amount of padding to use for the body. _(default: undefined)_\n- **--footer-spacing** - The amount of padding to use for the footer. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **header** - The dialog's header. This element wraps the title and header actions.\n- **header-actions** - Optional actions to add to the header. Works best with `<zn-button>` elements.\n- **title** - The dialog's title.\n- **close-button** - The dialog's close button.\n- **close-button__base** - The close buttons exported `base` part.\n- **body** - The dialog's body.\n- **footer** - The dialog's footer.",
|
package/dist/zn.min.js
CHANGED
|
@@ -1730,20 +1730,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1730
1730
|
</div>`:""}
|
|
1731
1731
|
<slot name="footer" class="note__footer"></slot>
|
|
1732
1732
|
</div>
|
|
1733
|
-
`}};dn.styles=k(wx),c([p({reflect:!0})],dn.prototype,"color",2),c([p({reflect:!0})],dn.prototype,"caption",2),c([p({reflect:!0})],dn.prototype,"date",2),c([p({type:HTMLElement,reflect:!0})],dn.prototype,"body",2),c([D()],dn.prototype,"expanded",2);var $9=dn;dn.define("zn-note");var _x=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}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-description.tile--has-caption{padding-block:var(--zn-base-gap)}.tile--has-image{padding:var(--zn-base-gap)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;justify-content:space-between;flex:1;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}slot.tile__description{display:block}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;flex-shrink:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}:host([stack-actions]){container-type:inline-size}@container (max-width:599px){:host([stack-actions]) .tile{flex-wrap:wrap;row-gap:var(--zn-spacing-x-small)}:host([stack-actions]) .tile .tile__link{flex-basis:100%}:host([stack-actions]) .tile .tile__right{justify-content:flex-start;flex-wrap:wrap}:host([stack-actions]) .tile .tile__actions{flex-wrap:wrap;row-gap:var(--zn-spacing-x-small)}}`;var ar=class extends T{constructor(){super(...arguments);this.hasSlotController=new te(this,"[default]","properties","actions","image")}_isLink(){return this.href||this.dataUri}_handleActionsClick(t){if(this._isLink()){for(let r of t.composedPath()){if(r===this)break;if(!(r instanceof Element))continue;let n=r.getAttribute("href");if(r.hasAttribute("data-uri")||n!==null&&n!==""&&!n.startsWith("#"))return}t.stopPropagation()}}render(){let t=this._isLink(),r=t?an`a`:an`div`,n=this.caption&&this.caption.length>0,a=this.description&&this.description.length>0,s=this.hasSlotController.test("
|
|
1733
|
+
`}};dn.styles=k(wx),c([p({reflect:!0})],dn.prototype,"color",2),c([p({reflect:!0})],dn.prototype,"caption",2),c([p({reflect:!0})],dn.prototype,"date",2),c([p({type:HTMLElement,reflect:!0})],dn.prototype,"body",2),c([D()],dn.prototype,"expanded",2);var $9=dn;dn.define("zn-note");var _x=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}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-description.tile--has-caption{padding-block:var(--zn-base-gap)}.tile--has-image{padding:var(--zn-base-gap)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;justify-content:space-between;flex:1;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}slot.tile__description{display:block}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;flex-shrink:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}:host([stack-actions]){container-type:inline-size}@container (max-width:599px){:host([stack-actions]) .tile{flex-wrap:wrap;row-gap:var(--zn-spacing-x-small)}:host([stack-actions]) .tile .tile__link{flex-basis:100%}:host([stack-actions]) .tile .tile__right{justify-content:flex-start;flex-wrap:wrap}:host([stack-actions]) .tile .tile__actions{flex-wrap:wrap;row-gap:var(--zn-spacing-x-small)}}`;var ar=class extends T{constructor(){super(...arguments);this.hasSlotController=new te(this,"[default]","caption","description","properties","actions","image")}_isLink(){return this.href||this.dataUri}_handleActionsClick(t){if(this._isLink()){for(let r of t.composedPath()){if(r===this)break;if(!(r instanceof Element))continue;let n=r.getAttribute("href");if(r.hasAttribute("data-uri")||n!==null&&n!==""&&!n.startsWith("#"))return}t.stopPropagation()}}render(){let t=this._isLink(),r=t?an`a`:an`div`,n=this.caption&&this.caption.length>0||this.hasSlotController.test("caption"),a=this.description&&this.description.length>0,s=a||this.hasSlotController.test("description"),l=this.hasSlotController.test("properties"),d=this.hasSlotController.test("actions"),h=this.hasSlotController.test("image");return De`
|
|
1734
1734
|
<div
|
|
1735
|
-
class="${q({tile:!0,"tile--flush":this.flush,"tile--flush-x":this.flushX,"tile--flush-y":this.flushY,"tile--inline":this.inline,"tile--plain":this.plain,"tile--has-href":t,"tile--has-caption":n,"tile--has-description":
|
|
1735
|
+
class="${q({tile:!0,"tile--flush":this.flush,"tile--flush-x":this.flushX,"tile--flush-y":this.flushY,"tile--inline":this.inline,"tile--plain":this.plain,"tile--has-href":t,"tile--has-caption":n,"tile--has-description":s,"tile--has-properties":l,"tile--has-actions":d,"tile--has-image":h})}">
|
|
1736
1736
|
<${r}
|
|
1737
1737
|
href="${P(this.href)}"
|
|
1738
1738
|
data-uri="${P(this.dataUri)}"
|
|
1739
1739
|
gaid="${P(this.gaid)}"
|
|
1740
1740
|
data-target="${P(this.dataTarget)}"
|
|
1741
1741
|
class="tile__link">
|
|
1742
|
-
${!n&&!
|
|
1742
|
+
${!n&&!s&&!l&&!d?De`
|
|
1743
1743
|
<slot></slot>
|
|
1744
1744
|
`:De`
|
|
1745
1745
|
<div class="tile__left">
|
|
1746
|
-
${
|
|
1746
|
+
${h?De`
|
|
1747
1747
|
<slot name="image" part="image" class="tile__image"></slot>`:De``}
|
|
1748
1748
|
<div class="tile__content">
|
|
1749
1749
|
<p part="caption" class="tile__caption">
|
|
@@ -1754,12 +1754,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1754
1754
|
${this.description}</p>`:De`<slot name="description" class="tile__description"></slot>`}
|
|
1755
1755
|
</div>
|
|
1756
1756
|
</div>
|
|
1757
|
-
${
|
|
1757
|
+
${l?De`
|
|
1758
1758
|
<slot name="properties" part="properties" class="tile__properties"></slot>`:""}
|
|
1759
1759
|
`}
|
|
1760
1760
|
</${r}>
|
|
1761
1761
|
|
|
1762
|
-
${
|
|
1762
|
+
${d?De`
|
|
1763
1763
|
<div class="tile__right">
|
|
1764
1764
|
<!-- Kept outside the link so slotted controls retain their default behaviour. -->
|
|
1765
1765
|
<slot name="actions" part="actions" class="tile__actions"
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ import styles from './tile.scss';
|
|
|
28
28
|
export default class ZnTile extends ZincElement {
|
|
29
29
|
static styles: CSSResultGroup = unsafeCSS(styles);
|
|
30
30
|
|
|
31
|
-
private readonly hasSlotController = new HasSlotController(this, '[default]', 'properties', 'actions', 'image');
|
|
31
|
+
private readonly hasSlotController = new HasSlotController(this, '[default]', 'caption', 'description', 'properties', 'actions', 'image');
|
|
32
32
|
|
|
33
33
|
@property({attribute: 'caption'}) caption: string;
|
|
34
34
|
|
|
@@ -84,8 +84,9 @@ export default class ZnTile extends ZincElement {
|
|
|
84
84
|
render() {
|
|
85
85
|
const isLink = this._isLink();
|
|
86
86
|
const tag = isLink ? literal`a` : literal`div`;
|
|
87
|
-
const hasCaption = this.caption && this.caption.length > 0;
|
|
88
|
-
const
|
|
87
|
+
const hasCaption = (this.caption && this.caption.length > 0) || this.hasSlotController.test('caption');
|
|
88
|
+
const hasDescriptionAttr = this.description && this.description.length > 0;
|
|
89
|
+
const hasDescription = hasDescriptionAttr || this.hasSlotController.test('description');
|
|
89
90
|
const hasProperties = this.hasSlotController.test('properties');
|
|
90
91
|
const hasActions = this.hasSlotController.test('actions');
|
|
91
92
|
const hasImage = this.hasSlotController.test('image');
|
|
@@ -122,7 +123,7 @@ export default class ZnTile extends ZincElement {
|
|
|
122
123
|
<p part="caption" class="tile__caption">
|
|
123
124
|
<slot name="caption">${this.caption}</slot>
|
|
124
125
|
</p>
|
|
125
|
-
${
|
|
126
|
+
${hasDescriptionAttr ? html`
|
|
126
127
|
<p part="description" class="tile__description">
|
|
127
128
|
${this.description}</p>` : html`<slot name="description" class="tile__description"></slot>`}
|
|
128
129
|
</div>
|
|
@@ -9,6 +9,17 @@ describe('<zn-tile>', () => {
|
|
|
9
9
|
expect(el).to.exist;
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
+
it('should render a slotted caption and image without caption or description attributes', async () => {
|
|
13
|
+
const el = await fixture<ZnTile>(html`
|
|
14
|
+
<zn-tile>
|
|
15
|
+
<zn-icon slot="image" src="user@lu"></zn-icon>
|
|
16
|
+
<span slot="caption">Leslie Alexander</span>
|
|
17
|
+
</zn-tile>`);
|
|
18
|
+
|
|
19
|
+
expect(el.shadowRoot!.querySelector('slot[name="caption"]')).to.exist;
|
|
20
|
+
expect(el.shadowRoot!.querySelector('slot[name="image"]')).to.exist;
|
|
21
|
+
});
|
|
22
|
+
|
|
12
23
|
it('should render its content as a link when href is set', async () => {
|
|
13
24
|
const el = await fixture<ZnTile>(html`
|
|
14
25
|
<zn-tile href="/users/leslie" caption="Leslie Alexander"></zn-tile>`);
|