@kubex/zinc 1.0.24 → 1.0.98
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/.claude/project.md +556 -0
- package/.github/workflows/js_build_and_deploy.yaml +9 -10
- package/dist/custom-elements.json +13431 -8728
- package/dist/vscode.html-custom-data.json +571 -37
- package/dist/web-types.json +1439 -181
- package/dist/zn.d.ts +1642 -661
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +1407 -887
- package/docs/_utilities/code-previews.cjs +10 -1
- package/docs/assets/scripts/docs.js +42 -18
- package/docs/data/data-table.json +229 -66
- package/docs/data/empty.json +6 -0
- package/docs/data/products-table.json +41 -193
- package/docs/pages/components/action-bar.md +121 -6
- package/docs/pages/components/alert.md +118 -15
- package/docs/pages/components/animated-button.md +299 -0
- package/docs/pages/components/audio-select.md +534 -0
- package/docs/pages/components/bulk-actions.md +79 -5
- package/docs/pages/components/button-group.md +235 -27
- package/docs/pages/components/button.md +139 -1
- package/docs/pages/components/chart.md +365 -9
- package/docs/pages/components/checkbox.md +387 -58
- package/docs/pages/components/chip.md +253 -33
- package/docs/pages/components/collapsible.md +393 -46
- package/docs/pages/components/cols.md +152 -30
- package/docs/pages/components/confirm.md +182 -16
- package/docs/pages/components/copy-button.md +169 -6
- package/docs/pages/components/data-select.md +194 -15
- package/docs/pages/components/data-table-filter.md +96 -5
- package/docs/pages/components/data-table-search.md +451 -0
- package/docs/pages/components/data-table-sort.md +66 -5
- package/docs/pages/components/data-table.md +727 -66
- package/docs/pages/components/datepicker.md +402 -7
- package/docs/pages/components/defined-label.md +120 -5
- package/docs/pages/components/dialog.md +339 -59
- package/docs/pages/components/dropdown.md +366 -11
- package/docs/pages/components/editor.md +604 -7
- package/docs/pages/components/empty-state.md +315 -16
- package/docs/pages/components/expanding-action.md +212 -28
- package/docs/pages/components/file.md +421 -12
- package/docs/pages/components/filter-container.md +158 -5
- package/docs/pages/components/filter-wrapper.md +167 -6
- package/docs/pages/components/form-group.md +383 -6
- package/docs/pages/components/hover-container.md +237 -6
- package/docs/pages/components/icon-picker.md +121 -0
- package/docs/pages/components/icon.md +454 -48
- package/docs/pages/components/inline-edit.md +787 -19
- package/docs/pages/components/input-group.md +207 -13
- package/docs/pages/components/input.md +194 -0
- package/docs/pages/components/key-container.md +115 -0
- package/docs/pages/components/key.md +101 -0
- package/docs/pages/components/menu.md +512 -6
- package/docs/pages/components/note.md +239 -36
- package/docs/pages/components/opt-group.md +107 -0
- package/docs/pages/components/pagination.md +332 -6
- package/docs/pages/components/pane.md +222 -6
- package/docs/pages/components/panel.md +213 -26
- package/docs/pages/components/popup.md +1354 -6
- package/docs/pages/components/priority-list.md +233 -0
- package/docs/pages/components/progress-bar.md +387 -6
- package/docs/pages/components/radio-group.md +242 -5
- package/docs/pages/components/radio.md +474 -6
- package/docs/pages/components/rating.md +331 -7
- package/docs/pages/components/reveal.md +524 -6
- package/docs/pages/components/scroll-container.md +552 -6
- package/docs/pages/components/select.md +762 -160
- package/docs/pages/components/skeleton.md +473 -30
- package/docs/pages/components/slideout.md +261 -5
- package/docs/pages/components/sp.md +99 -41
- package/docs/pages/components/split-button.md +347 -9
- package/docs/pages/components/split-pane.md +445 -6
- package/docs/pages/components/stat.md +549 -9
- package/docs/pages/components/status-indicator.md +230 -1
- package/docs/pages/components/stepper.md +563 -6
- package/docs/pages/components/tabs.md +439 -13
- package/docs/pages/components/textarea.md +415 -17
- package/docs/pages/components/tile.md +385 -26
- package/docs/pages/components/toggle.md +424 -6
- package/docs/pages/components/tooltip.md +367 -0
- package/docs/pages/components/translation-group.md +210 -0
- package/docs/pages/components/translations.md +319 -18
- package/docs/pages/components/vertical-stepper.md +401 -8
- package/docs/pages/components/well.md +300 -3
- package/docs/pages/getting-started/form-controls.md +162 -0
- package/docs/pages/index.md +116 -15
- package/package.json +5 -6
- package/scss/_global-spacing.scss +4 -0
- package/scss/_root.scss +2 -2
- package/scss/boot.scss +19 -0
- package/scss/shared/layout.scss +5 -0
- package/scss/themes/_light.scss +3 -3
- package/src/components/alert/alert.scss +1 -0
- package/src/components/animated-button/README.md +306 -0
- package/src/components/animated-button/animated-button.component.ts +229 -0
- package/src/components/animated-button/animated-button.scss +228 -0
- package/src/components/animated-button/animated-button.test.ts +143 -0
- package/src/components/animated-button/index.ts +12 -0
- package/src/components/button/button.component.ts +5 -0
- package/src/components/button-group/button-group.component.ts +25 -13
- package/src/components/button-group/button-group.scss +6 -0
- package/src/components/checkbox/checkbox.component.ts +4 -0
- package/src/components/checkbox/checkbox.scss +7 -4
- package/src/components/checkbox-group/checkbox-group.scss +7 -0
- package/src/components/chip/chip.component.ts +7 -2
- package/src/components/chip/chip.scss +16 -2
- package/src/components/collapsible/collapsible.component.ts +27 -20
- package/src/components/cols/cols.component.ts +14 -2
- package/src/components/cols/cols.scss +6 -12
- package/src/components/confirm/confirm.component.ts +7 -0
- package/src/components/copy-button/copy-button.component.ts +12 -11
- package/src/components/data-select/data-select.component.ts +215 -44
- package/src/components/data-select/data-select.scss +66 -6
- package/src/components/data-select/providers/currency-data-provider.ts +20 -6
- package/src/components/data-select/providers/provider.ts +1 -0
- package/src/components/data-select/providers/us-state-data-provider.ts +68 -0
- package/src/components/data-table/data-table.component.ts +82 -23
- package/src/components/data-table-search/data-table-search.component.ts +184 -0
- package/src/components/data-table-search/data-table-search.scss +17 -0
- package/src/components/data-table-search/data-table-search.test.ts +11 -0
- package/src/components/data-table-search/index.ts +12 -0
- package/src/components/datepicker/datepicker.component.ts +347 -13
- package/src/components/dialog/dialog.component.ts +1 -1
- package/src/components/empty-state/empty-state.scss +6 -1
- package/src/components/header/header.scss +3 -3
- package/src/components/icon/icon.component.ts +23 -1
- package/src/components/icon/icon.scss +23 -0
- package/src/components/icon-picker/brand-icons.ts +24 -0
- package/src/components/icon-picker/icon-picker.component.ts +407 -0
- package/src/components/icon-picker/icon-picker.scss +205 -0
- package/src/components/icon-picker/index.ts +12 -0
- package/src/components/icon-picker/line-icons.ts +612 -0
- package/src/components/icon-picker/material-icons.ts +14543 -0
- package/src/components/inline-edit/inline-edit.component.ts +190 -46
- package/src/components/inline-edit/inline-edit.scss +29 -0
- package/src/components/inline-edit/inline-edit.test.ts +314 -1
- package/src/components/input/input.component.ts +328 -5
- package/src/components/input/input.scss +100 -4
- package/src/components/input-group/input-group.component.ts +28 -7
- package/src/components/input-group/input-group.scss +48 -10
- package/src/components/item/item.component.ts +11 -2
- package/src/components/item/item.scss +7 -0
- package/src/components/key/index.ts +12 -0
- package/src/components/key/key.component.ts +47 -0
- package/src/components/key/key.scss +38 -0
- package/src/components/key-container/index.ts +12 -0
- package/src/components/key-container/key-container.component.ts +142 -0
- package/src/components/key-container/key-container.scss +33 -0
- package/src/components/menu-item/menu-item.component.ts +20 -0
- package/src/components/menu-item/menu-item.scss +69 -2
- package/src/components/navbar/navbar.component.ts +103 -8
- package/src/components/navbar/navbar.scss +6 -1
- package/src/components/opt-group/index.ts +12 -0
- package/src/components/opt-group/opt-group.component.ts +74 -0
- package/src/components/opt-group/opt-group.scss +37 -0
- package/src/components/opt-group/opt-group.test.ts +27 -0
- package/src/components/option/option.component.ts +1 -16
- package/src/components/option/option.scss +4 -0
- package/src/components/panel/panel.component.ts +10 -8
- package/src/components/panel/panel.scss +20 -0
- package/src/components/priority-list/index.ts +12 -0
- package/src/components/priority-list/priority-list.component.ts +611 -0
- package/src/components/priority-list/priority-list.scss +185 -0
- package/src/components/priority-list/priority-list.test.ts +139 -0
- package/src/components/progress-bar/progress-bar.component.ts +22 -16
- package/src/components/radio/radio.scss +10 -3
- package/src/components/select/select.component.ts +812 -72
- package/src/components/select/select.scss +108 -2
- package/src/components/select/select.test.ts +147 -2
- package/src/components/settings-container/settings-container.component.ts +44 -19
- package/src/components/settings-container/settings-container.scss +1 -1
- package/src/components/skeleton/skeleton.component.ts +6 -1
- package/src/components/slideout/slideout.scss +8 -3
- package/src/components/sp/sp.component.ts +3 -1
- package/src/components/sp/sp.scss +19 -0
- package/src/components/stepper/stepper.component.ts +16 -10
- package/src/components/textarea/textarea.scss +0 -4
- package/src/components/tile/tile.component.ts +12 -3
- package/src/components/tile/tile.scss +1 -1
- package/src/components/timer/timer.component.ts +15 -2
- package/src/components/toggle/toggle.component.ts +29 -26
- package/src/components/toggle/toggle.scss +13 -1
- package/src/components/translation-group/index.ts +12 -0
- package/src/components/translation-group/translation-group.component.ts +207 -0
- package/src/components/translation-group/translation-group.scss +8 -0
- package/src/components/translations/translations.component.ts +90 -42
- package/src/components/translations/translations.scss +5 -1
- package/src/components/vertical-stepper/vertical-stepper.component.ts +14 -9
- package/src/events/events.ts +12 -7
- package/src/events/zn-language-change.ts +7 -0
- package/src/events/zn-purchase.ts +11 -0
- package/src/events/zn-redirect.ts +7 -0
- package/src/events/zn-reorder.ts +7 -0
- package/src/events/zn-search-change.ts +11 -0
- package/src/events/zn-submit.ts +1 -1
- package/src/form-control.scss +4 -0
- package/src/internal/form-navigation.ts +510 -0
- package/src/internal/form.ts +6 -0
- package/src/zinc.ts +91 -83
|
@@ -3,237 +3,85 @@
|
|
|
3
3
|
{
|
|
4
4
|
"id": "1",
|
|
5
5
|
"cells": [
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"column": "category",
|
|
12
|
-
"text": "beauty"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"column": "price",
|
|
16
|
-
"text": "£9.99"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"column": "discountPercentage",
|
|
20
|
-
"text": "2.56"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"column": "rating",
|
|
24
|
-
"text": "10.48"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"column": "stock",
|
|
28
|
-
"text": "99"
|
|
29
|
-
}
|
|
6
|
+
{"column": "name", "text": "Essence Mascara Lash Princess"},
|
|
7
|
+
{"column": "category", "text": "beauty"},
|
|
8
|
+
{"column": "price", "text": "\u00a39.99"},
|
|
9
|
+
{"column": "stock", "text": "99"},
|
|
10
|
+
{"column": "rating", "text": "4.8"}
|
|
30
11
|
]
|
|
31
12
|
},
|
|
32
13
|
{
|
|
33
14
|
"id": "2",
|
|
34
15
|
"cells": [
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"column": "category",
|
|
41
|
-
"text": "pets"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"column": "price",
|
|
45
|
-
"text": "£28.99"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"column": "discountPercentage",
|
|
49
|
-
"text": "6.19"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"column": "rating",
|
|
53
|
-
"text": "9.32"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"column": "stock",
|
|
57
|
-
"text": "61"
|
|
58
|
-
}
|
|
16
|
+
{"column": "name", "text": "Revlon ColorStay Lipstick"},
|
|
17
|
+
{"column": "category", "text": "beauty"},
|
|
18
|
+
{"column": "price", "text": "\u00a312.49"},
|
|
19
|
+
{"column": "stock", "text": "74"},
|
|
20
|
+
{"column": "rating", "text": "4.5"}
|
|
59
21
|
]
|
|
60
22
|
},
|
|
61
23
|
{
|
|
62
24
|
"id": "3",
|
|
63
25
|
"cells": [
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"column": "category",
|
|
70
|
-
"text": "laptops"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"column": "price",
|
|
74
|
-
"text": "£749.99"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"column": "discountPercentage",
|
|
78
|
-
"text": "10.23"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"column": "rating",
|
|
82
|
-
"text": "9.43"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"column": "stock",
|
|
86
|
-
"text": "89"
|
|
87
|
-
}
|
|
26
|
+
{"column": "name", "text": "HP Pavilion 15-DK1056WM"},
|
|
27
|
+
{"column": "category", "text": "electronics"},
|
|
28
|
+
{"column": "price", "text": "\u00a3749.99"},
|
|
29
|
+
{"column": "stock", "text": "89"},
|
|
30
|
+
{"column": "rating", "text": "4.3"}
|
|
88
31
|
]
|
|
89
32
|
},
|
|
90
33
|
{
|
|
91
34
|
"id": "4",
|
|
92
35
|
"cells": [
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"column": "category",
|
|
99
|
-
"text": "laptops"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"column": "price",
|
|
103
|
-
"text": "£819.99"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"column": "discountPercentage",
|
|
107
|
-
"text": "4.15"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"column": "rating",
|
|
111
|
-
"text": "9.57"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"column": "stock",
|
|
115
|
-
"text": "115"
|
|
116
|
-
}
|
|
36
|
+
{"column": "name", "text": "Samsung Galaxy Book S"},
|
|
37
|
+
{"column": "category", "text": "electronics"},
|
|
38
|
+
{"column": "price", "text": "\u00a3819.99"},
|
|
39
|
+
{"column": "stock", "text": "115"},
|
|
40
|
+
{"column": "rating", "text": "4.6"}
|
|
117
41
|
]
|
|
118
42
|
},
|
|
119
43
|
{
|
|
120
44
|
"id": "5",
|
|
121
45
|
"cells": [
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"column": "category",
|
|
128
|
-
"text": "laptops"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"column": "price",
|
|
132
|
-
"text": "£409.99"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"column": "discountPercentage",
|
|
136
|
-
"text": "11.54"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"column": "rating",
|
|
140
|
-
"text": "8.91"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"column": "stock",
|
|
144
|
-
"text": "96"
|
|
145
|
-
}
|
|
46
|
+
{"column": "name", "text": "Sony WH-1000XM5 Headphones"},
|
|
47
|
+
{"column": "category", "text": "electronics"},
|
|
48
|
+
{"column": "price", "text": "\u00a3299.99"},
|
|
49
|
+
{"column": "stock", "text": "203"},
|
|
50
|
+
{"column": "rating", "text": "4.7"}
|
|
146
51
|
]
|
|
147
52
|
},
|
|
148
53
|
{
|
|
149
54
|
"id": "6",
|
|
150
55
|
"cells": [
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"column": "category",
|
|
157
|
-
"text": "laptops"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"column": "price",
|
|
161
|
-
"text": "£749.99"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"column": "discountPercentage",
|
|
165
|
-
"text": "10.23"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"column": "rating",
|
|
169
|
-
"text": "9.43"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"column": "stock",
|
|
173
|
-
"text": "89"
|
|
174
|
-
}
|
|
56
|
+
{"column": "name", "text": "Infinix INBOOK X1"},
|
|
57
|
+
{"column": "category", "text": "electronics"},
|
|
58
|
+
{"column": "price", "text": "\u00a3409.99"},
|
|
59
|
+
{"column": "stock", "text": "96"},
|
|
60
|
+
{"column": "rating", "text": "4.1"}
|
|
175
61
|
]
|
|
176
62
|
},
|
|
177
63
|
{
|
|
178
64
|
"id": "7",
|
|
179
65
|
"cells": [
|
|
180
|
-
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"column": "category",
|
|
186
|
-
"text": "laptops"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"column": "price",
|
|
190
|
-
"text": "£819.99"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"column": "discountPercentage",
|
|
194
|
-
"text": "4.15"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"column": "rating",
|
|
198
|
-
"text": "9.57"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"column": "stock",
|
|
202
|
-
"text": "115"
|
|
203
|
-
}
|
|
66
|
+
{"column": "name", "text": "Furminator deShedding Tool"},
|
|
67
|
+
{"column": "category", "text": "pets"},
|
|
68
|
+
{"column": "price", "text": "\u00a328.99"},
|
|
69
|
+
{"column": "stock", "text": "61"},
|
|
70
|
+
{"column": "rating", "text": "4.4"}
|
|
204
71
|
]
|
|
205
72
|
},
|
|
206
73
|
{
|
|
207
74
|
"id": "8",
|
|
208
75
|
"cells": [
|
|
209
|
-
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"column": "category",
|
|
215
|
-
"text": "pets"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"column": "price",
|
|
219
|
-
"text": "£409.99"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
"column": "discountPercentage",
|
|
223
|
-
"text": "11.54"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"column": "rating",
|
|
227
|
-
"text": "8.91"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"column": "stock",
|
|
231
|
-
"text": "96"
|
|
232
|
-
}
|
|
76
|
+
{"column": "name", "text": "KONG Classic Dog Toy"},
|
|
77
|
+
{"column": "category", "text": "pets"},
|
|
78
|
+
{"column": "price", "text": "\u00a314.99"},
|
|
79
|
+
{"column": "stock", "text": "142"},
|
|
80
|
+
{"column": "rating", "text": "4.6"}
|
|
233
81
|
]
|
|
234
82
|
}
|
|
235
83
|
],
|
|
236
84
|
"perPage": 10,
|
|
237
|
-
"total":
|
|
85
|
+
"total": 8,
|
|
238
86
|
"page": 1
|
|
239
87
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
meta:
|
|
3
3
|
title: Action Bar
|
|
4
|
-
description:
|
|
4
|
+
description: A horizontal container component that organizes menus on the left and action buttons on the right, commonly used for navigation and quick actions.
|
|
5
5
|
layout: component
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@ layout: component
|
|
|
26
26
|
<zn-menu-item>Item 2</zn-menu-item>
|
|
27
27
|
</zn-menu>
|
|
28
28
|
</zn-dropdown>
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
<zn-expanding-action icon="edit_note"
|
|
31
31
|
method="fill"
|
|
32
32
|
count-uri="/note/count"
|
|
@@ -49,10 +49,125 @@ layout: component
|
|
|
49
49
|
|
|
50
50
|
## Examples
|
|
51
51
|
|
|
52
|
-
###
|
|
52
|
+
### Simple Menu Bar
|
|
53
|
+
|
|
54
|
+
Use the action bar to create a simple navigation menu with dropdown categories.
|
|
55
|
+
|
|
56
|
+
```html:preview
|
|
57
|
+
<zn-action-bar>
|
|
58
|
+
<zn-dropdown distance="5" slot="menu">
|
|
59
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
60
|
+
File
|
|
61
|
+
</zn-button>
|
|
62
|
+
<zn-menu>
|
|
63
|
+
<zn-menu-item>New</zn-menu-item>
|
|
64
|
+
<zn-menu-item>Open</zn-menu-item>
|
|
65
|
+
<zn-menu-item>Save</zn-menu-item>
|
|
66
|
+
<zn-menu-item>Close</zn-menu-item>
|
|
67
|
+
</zn-menu>
|
|
68
|
+
</zn-dropdown>
|
|
69
|
+
|
|
70
|
+
<zn-dropdown distance="5" slot="menu">
|
|
71
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
72
|
+
Edit
|
|
73
|
+
</zn-button>
|
|
74
|
+
<zn-menu>
|
|
75
|
+
<zn-menu-item>Cut</zn-menu-item>
|
|
76
|
+
<zn-menu-item>Copy</zn-menu-item>
|
|
77
|
+
<zn-menu-item>Paste</zn-menu-item>
|
|
78
|
+
</zn-menu>
|
|
79
|
+
</zn-dropdown>
|
|
80
|
+
|
|
81
|
+
<zn-dropdown distance="5" slot="menu">
|
|
82
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
83
|
+
View
|
|
84
|
+
</zn-button>
|
|
85
|
+
<zn-menu>
|
|
86
|
+
<zn-menu-item>Zoom In</zn-menu-item>
|
|
87
|
+
<zn-menu-item>Zoom Out</zn-menu-item>
|
|
88
|
+
<zn-menu-item>Full Screen</zn-menu-item>
|
|
89
|
+
</zn-menu>
|
|
90
|
+
</zn-dropdown>
|
|
91
|
+
</zn-action-bar>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Action Bar with Quick Actions
|
|
95
|
+
|
|
96
|
+
Combine menu dropdowns with action buttons on the right side.
|
|
97
|
+
|
|
98
|
+
```html:preview
|
|
99
|
+
<zn-action-bar>
|
|
100
|
+
<zn-dropdown distance="5" slot="menu">
|
|
101
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
102
|
+
Dashboard
|
|
103
|
+
</zn-button>
|
|
104
|
+
<zn-menu>
|
|
105
|
+
<zn-menu-item>Overview</zn-menu-item>
|
|
106
|
+
<zn-menu-item>Analytics</zn-menu-item>
|
|
107
|
+
<zn-menu-item>Reports</zn-menu-item>
|
|
108
|
+
</zn-menu>
|
|
109
|
+
</zn-dropdown>
|
|
110
|
+
|
|
111
|
+
<zn-button slot="actions" icon="search" color="transparent"></zn-button>
|
|
112
|
+
<zn-button slot="actions" icon="notifications" color="transparent" notification="3"></zn-button>
|
|
113
|
+
<zn-button slot="actions" icon="settings" color="transparent"></zn-button>
|
|
114
|
+
</zn-action-bar>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Action Bar with Icon-Only Actions
|
|
118
|
+
|
|
119
|
+
Use icon-only buttons for a cleaner, more compact appearance.
|
|
120
|
+
|
|
121
|
+
```html:preview
|
|
122
|
+
<zn-action-bar>
|
|
123
|
+
<zn-dropdown distance="5" slot="menu">
|
|
124
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
125
|
+
Projects
|
|
126
|
+
</zn-button>
|
|
127
|
+
<zn-menu>
|
|
128
|
+
<zn-menu-item>My Projects</zn-menu-item>
|
|
129
|
+
<zn-menu-item>Shared Projects</zn-menu-item>
|
|
130
|
+
<zn-menu-item>Archived Projects</zn-menu-item>
|
|
131
|
+
</zn-menu>
|
|
132
|
+
</zn-dropdown>
|
|
133
|
+
|
|
134
|
+
<zn-button slot="actions" icon="add" color="success"></zn-button>
|
|
135
|
+
<zn-button slot="actions" icon="filter_alt" color="transparent"></zn-button>
|
|
136
|
+
<zn-button slot="actions" icon="more_vert" color="transparent"></zn-button>
|
|
137
|
+
</zn-action-bar>
|
|
138
|
+
```
|
|
53
139
|
|
|
54
|
-
|
|
140
|
+
### Mixed Content
|
|
55
141
|
|
|
56
|
-
|
|
142
|
+
Combine multiple menu items and various action types for complex interfaces.
|
|
57
143
|
|
|
58
|
-
|
|
144
|
+
```html:preview
|
|
145
|
+
<zn-action-bar>
|
|
146
|
+
<zn-dropdown distance="5" slot="menu">
|
|
147
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
148
|
+
Tickets
|
|
149
|
+
</zn-button>
|
|
150
|
+
<zn-menu>
|
|
151
|
+
<zn-menu-item>All Tickets</zn-menu-item>
|
|
152
|
+
<zn-menu-item>My Tickets</zn-menu-item>
|
|
153
|
+
<zn-menu-item>Unassigned</zn-menu-item>
|
|
154
|
+
<zn-menu-item>Closed</zn-menu-item>
|
|
155
|
+
</zn-menu>
|
|
156
|
+
</zn-dropdown>
|
|
157
|
+
|
|
158
|
+
<zn-dropdown distance="5" slot="menu">
|
|
159
|
+
<zn-button slot="trigger" color="transparent" icon-position="right" icon="arrow_drop_down">
|
|
160
|
+
Customers
|
|
161
|
+
</zn-button>
|
|
162
|
+
<zn-menu>
|
|
163
|
+
<zn-menu-item>All Customers</zn-menu-item>
|
|
164
|
+
<zn-menu-item>Active</zn-menu-item>
|
|
165
|
+
<zn-menu-item>Inactive</zn-menu-item>
|
|
166
|
+
</zn-menu>
|
|
167
|
+
</zn-dropdown>
|
|
168
|
+
|
|
169
|
+
<zn-button slot="actions" icon="add_circle" color="success">New Ticket</zn-button>
|
|
170
|
+
<zn-button slot="actions" icon="refresh" color="transparent"></zn-button>
|
|
171
|
+
<zn-button slot="actions" icon="help" color="transparent"></zn-button>
|
|
172
|
+
</zn-action-bar>
|
|
173
|
+
```
|
|
@@ -5,41 +5,144 @@ meta:
|
|
|
5
5
|
layout: component
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-alert caption="Important Notice">This is a basic alert with a caption and description.</zn-alert>
|
|
10
|
+
```
|
|
11
|
+
|
|
8
12
|
## Examples
|
|
9
13
|
|
|
10
14
|
### Basic Alert
|
|
11
15
|
|
|
16
|
+
A basic alert with just a caption.
|
|
17
|
+
|
|
12
18
|
```html:preview
|
|
19
|
+
<zn-alert caption="This is an alert">This is the description text that provides more details.</zn-alert>
|
|
20
|
+
```
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
### Without Caption
|
|
23
|
+
|
|
24
|
+
Alerts can also be used without a caption, displaying only the content.
|
|
25
|
+
|
|
26
|
+
```html:preview
|
|
27
|
+
<zn-alert>This alert has no caption, just content.</zn-alert>
|
|
15
28
|
```
|
|
16
29
|
|
|
17
|
-
###
|
|
30
|
+
### Levels
|
|
31
|
+
|
|
32
|
+
Use the `level` attribute to change the semantic color and styling of the alert. Available levels are: `primary`, `error`, `info`, `success`, `warning`, `note`, and `cosmic`.
|
|
18
33
|
|
|
19
34
|
```html:preview
|
|
35
|
+
<zn-alert caption="Primary Alert" level="primary">This is a primary alert.</zn-alert>
|
|
36
|
+
<br />
|
|
37
|
+
<zn-alert caption="Error Alert" level="error">This indicates an error or problem.</zn-alert>
|
|
38
|
+
<br />
|
|
39
|
+
<zn-alert caption="Info Alert" level="info">This provides informational content.</zn-alert>
|
|
40
|
+
<br />
|
|
41
|
+
<zn-alert caption="Success Alert" level="success">This indicates a successful action.</zn-alert>
|
|
42
|
+
<br />
|
|
43
|
+
<zn-alert caption="Warning Alert" level="warning">This warns about potential issues.</zn-alert>
|
|
44
|
+
<br />
|
|
45
|
+
<zn-alert caption="Note Alert" level="note">This is a general note.</zn-alert>
|
|
46
|
+
<br />
|
|
47
|
+
<zn-alert caption="Cosmic Alert" level="cosmic">This is a special cosmic-themed alert.</zn-alert>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### With Icons
|
|
51
|
+
|
|
52
|
+
Use the `icon` attribute to add an icon to the alert. Icons appear on the left side of the alert.
|
|
20
53
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
54
|
+
```html:preview
|
|
55
|
+
<zn-alert caption="Success!" icon="check_circle" level="success">
|
|
56
|
+
Your changes have been saved successfully.
|
|
57
|
+
</zn-alert>
|
|
58
|
+
<br />
|
|
59
|
+
<zn-alert caption="Warning" icon="warning" level="warning">
|
|
60
|
+
Please review the information before proceeding.
|
|
61
|
+
</zn-alert>
|
|
62
|
+
<br />
|
|
63
|
+
<zn-alert caption="Error" icon="error" level="error">
|
|
64
|
+
An error occurred while processing your request.
|
|
65
|
+
</zn-alert>
|
|
66
|
+
<br />
|
|
67
|
+
<zn-alert caption="Information" icon="info" level="info">
|
|
68
|
+
Here's some helpful information you should know.
|
|
24
69
|
</zn-alert>
|
|
25
70
|
```
|
|
26
71
|
|
|
27
|
-
###
|
|
72
|
+
### With Actions
|
|
73
|
+
|
|
74
|
+
Use the `actions` slot to add buttons or other interactive elements to the alert.
|
|
75
|
+
|
|
76
|
+
```html:preview
|
|
77
|
+
<zn-alert caption="New updates available" icon="system_update" level="info">
|
|
78
|
+
A new version of the app is ready to install.
|
|
79
|
+
<zn-button slot="actions" color="info" size="small">Update Now</zn-button>
|
|
80
|
+
<zn-button slot="actions" color="transparent" size="small">Later</zn-button>
|
|
81
|
+
</zn-alert>
|
|
82
|
+
<br />
|
|
83
|
+
<zn-alert caption="Confirm deletion" icon="delete" level="error">
|
|
84
|
+
Are you sure you want to delete this item? This action cannot be undone.
|
|
85
|
+
<zn-button slot="actions" color="error" size="small">Delete</zn-button>
|
|
86
|
+
<zn-button slot="actions" color="secondary" size="small">Cancel</zn-button>
|
|
87
|
+
</zn-alert>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Collapsible Alerts
|
|
91
|
+
|
|
92
|
+
Use the `collapse` attribute to make the alert icon clickable for dismissing the alert.
|
|
93
|
+
|
|
94
|
+
```html:preview
|
|
95
|
+
<zn-alert caption="Dismissible Alert" icon="close" collapse level="info">
|
|
96
|
+
Click the icon to dismiss this alert.
|
|
97
|
+
</zn-alert>
|
|
98
|
+
<br />
|
|
99
|
+
<zn-alert caption="Another Dismissible Alert" icon="cancel" collapse level="warning">
|
|
100
|
+
You can click the icon to hide this warning.
|
|
101
|
+
</zn-alert>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Sizes
|
|
105
|
+
|
|
106
|
+
Use the `size` attribute to control the alert's size. Available sizes are `small`, `medium` (default), and `large`.
|
|
28
107
|
|
|
29
108
|
```html:preview
|
|
109
|
+
<zn-alert caption="Small Alert" size="small" level="info">This is a small-sized alert.</zn-alert>
|
|
110
|
+
<br />
|
|
111
|
+
<zn-alert caption="Medium Alert" size="medium" level="success">This is a medium-sized alert (default).</zn-alert>
|
|
112
|
+
<br />
|
|
113
|
+
<zn-alert caption="Large Alert" size="large" level="warning">This is a large-sized alert.</zn-alert>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Complex Content
|
|
30
117
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<zn-alert caption="
|
|
35
|
-
<
|
|
118
|
+
Alerts can contain rich HTML content including lists, links, and formatted text.
|
|
119
|
+
|
|
120
|
+
```html:preview
|
|
121
|
+
<zn-alert caption="System Requirements" icon="info" level="info">
|
|
122
|
+
<p>Before proceeding, please ensure:</p>
|
|
123
|
+
<ul>
|
|
124
|
+
<li>Your browser is up to date</li>
|
|
125
|
+
<li>JavaScript is enabled</li>
|
|
126
|
+
<li>You have a stable internet connection</li>
|
|
127
|
+
</ul>
|
|
128
|
+
<p>Need help? <a href="#">Contact support</a></p>
|
|
129
|
+
<zn-button slot="actions" color="info" size="small">Continue</zn-button>
|
|
130
|
+
</zn-alert>
|
|
36
131
|
```
|
|
37
132
|
|
|
38
|
-
###
|
|
133
|
+
### Programmatic Dismissal
|
|
134
|
+
|
|
135
|
+
Alerts can be dismissed programmatically using the `hideAlert()` method.
|
|
39
136
|
|
|
40
137
|
```html:preview
|
|
138
|
+
<zn-alert id="dismissible-alert" caption="Auto-dismiss Alert" icon="timer" level="warning">
|
|
139
|
+
This alert will automatically dismiss in 5 seconds.
|
|
140
|
+
</zn-alert>
|
|
41
141
|
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
142
|
+
<script type="module">
|
|
143
|
+
const alert = document.getElementById('dismissible-alert');
|
|
144
|
+
setTimeout(() => {
|
|
145
|
+
alert.hideAlert();
|
|
146
|
+
}, 5000);
|
|
147
|
+
</script>
|
|
45
148
|
```
|