@kubex/zinc 1.0.115 → 1.0.117

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.
Files changed (102) hide show
  1. package/dist/custom-elements.json +476 -287
  2. package/dist/vscode.html-custom-data.json +52 -52
  3. package/dist/web-types.json +116 -86
  4. package/dist/zn.d.ts +63 -11
  5. package/dist/zn.min.css +1 -1
  6. package/dist/zn.min.js +1096 -1087
  7. package/docs/_includes/default.njk +3 -4
  8. package/docs/assets/styles/docs.css +13 -13
  9. package/docs/pages/components/absolute-container.md +2 -2
  10. package/docs/pages/components/alert.md +5 -5
  11. package/docs/pages/components/audio-select.md +4 -4
  12. package/docs/pages/components/button-group.md +1 -31
  13. package/docs/pages/components/button.md +13 -12
  14. package/docs/pages/components/checkbox.md +4 -4
  15. package/docs/pages/components/chip.md +14 -14
  16. package/docs/pages/components/data-table.md +4 -4
  17. package/docs/pages/components/datepicker.md +5 -5
  18. package/docs/pages/components/dialog.md +2 -2
  19. package/docs/pages/components/file.md +81 -9
  20. package/docs/pages/components/header.md +4 -6
  21. package/docs/pages/components/hover-container.md +1 -1
  22. package/docs/pages/components/icon.md +14 -0
  23. package/docs/pages/components/inline-edit.md +4 -4
  24. package/docs/pages/components/item.md +2 -2
  25. package/docs/pages/components/menu.md +2 -2
  26. package/docs/pages/components/note.md +12 -12
  27. package/docs/pages/components/page.md +3 -3
  28. package/docs/pages/components/pagination.md +6 -6
  29. package/docs/pages/components/pane.md +3 -6
  30. package/docs/pages/components/panel.md +10 -12
  31. package/docs/pages/components/priority-list.md +3 -3
  32. package/docs/pages/components/radio-group.md +4 -4
  33. package/docs/pages/components/radio.md +4 -4
  34. package/docs/pages/components/scroll-container.md +10 -10
  35. package/docs/pages/components/select.md +5 -5
  36. package/docs/pages/components/split-button.md +4 -4
  37. package/docs/pages/components/tabs.md +3 -3
  38. package/docs/pages/components/tile.md +13 -13
  39. package/docs/pages/components/toggle.md +4 -4
  40. package/docs/pages/components/translations.md +5 -5
  41. package/docs/pages/components/vertical-stepper.md +3 -3
  42. package/docs/pages/components/well.md +19 -19
  43. package/docs/pages/getting-started/example-layout.md +16 -16
  44. package/docs/pages/getting-started/example-page.md +1 -3
  45. package/package.json +2 -1
  46. package/scss/_root.scss +87 -60
  47. package/scss/shared/_button.scss +6 -1
  48. package/scss/shared/_form-elements.scss +1 -0
  49. package/scss/shared/_table.scss +1 -1
  50. package/scss/shared/layout.scss +5 -4
  51. package/scss/themes/_dark.scss +4 -4
  52. package/scss/themes/_light.scss +70 -287
  53. package/src/components/bulk-actions/bulk-actions.component.ts +0 -1
  54. package/src/components/button/button.component.ts +40 -10
  55. package/src/components/button/button.scss +67 -103
  56. package/src/components/button-menu/button-menu.component.ts +2 -6
  57. package/src/components/collapsible/collapsible.scss +1 -1
  58. package/src/components/cols/cols.scss +1 -1
  59. package/src/components/content-block/content-block.component.ts +1 -2
  60. package/src/components/data-table/data-table.component.ts +4 -8
  61. package/src/components/data-table/data-table.test.ts +7 -0
  62. package/src/components/data-table-filter/data-table-filter.component.ts +1 -1
  63. package/src/components/data-table-sort/data-table-sort.component.ts +2 -2
  64. package/src/components/dialog/dialog.component.ts +0 -1
  65. package/src/components/editor/modules/dialog/dialog.component.ts +0 -1
  66. package/src/components/editor/modules/dialog/dialog.scss +1 -1
  67. package/src/components/editor/modules/toolbar/toolbar.component.ts +0 -1
  68. package/src/components/expanding-action/expanding-action.component.ts +0 -3
  69. package/src/components/expanding-action/expanding-action.scss +0 -5
  70. package/src/components/file/file.component.ts +158 -17
  71. package/src/components/file/file.scss +122 -29
  72. package/src/components/header/header.component.ts +2 -8
  73. package/src/components/header/header.scss +4 -25
  74. package/src/components/icon/icon.component.ts +80 -1
  75. package/src/components/icon/icon.scss +8 -0
  76. package/src/components/icon/icon.test.ts +24 -0
  77. package/src/components/icon-picker/icon-picker.component.ts +0 -1
  78. package/src/components/inline-edit/inline-edit.component.ts +3 -4
  79. package/src/components/input/input.scss +21 -6
  80. package/src/components/input-group/input-group.scss +2 -1
  81. package/src/components/markdown-editor/markdown-editor.component.ts +1 -5
  82. package/src/components/menu/menu.scss +1 -1
  83. package/src/components/menu-item/menu-item.scss +4 -4
  84. package/src/components/navbar/navbar.component.ts +20 -0
  85. package/src/components/navbar/navbar.scss +31 -17
  86. package/src/components/navbar/navbar.test.ts +72 -0
  87. package/src/components/note/note.component.ts +0 -1
  88. package/src/components/page/page.component.ts +43 -12
  89. package/src/components/page/page.scss +21 -17
  90. package/src/components/page/page.test.ts +18 -1
  91. package/src/components/page-nav/page-nav.scss +6 -6
  92. package/src/components/panel/panel.component.ts +3 -5
  93. package/src/components/panel/panel.scss +3 -3
  94. package/src/components/panel/panel.test.ts +14 -0
  95. package/src/components/query-builder/query-builder.component.ts +0 -1
  96. package/src/components/slideout/slideout.component.ts +0 -1
  97. package/src/components/sp/sp.scss +2 -2
  98. package/src/components/tab/tab.component.ts +2 -0
  99. package/src/components/tabs/tabs.component.ts +1 -1
  100. package/src/components/tile/tile.scss +1 -1
  101. package/src/components/translation-group/translation-group.component.ts +0 -3
  102. package/src/components/translations/translations.component.ts +0 -3
@@ -64,7 +64,7 @@
64
64
 
65
65
  {# Theme selector #}
66
66
  <zn-dropdown id="theme-selector" placement="bottom-end" distance="3">
67
- <zn-button slot="trigger" size="content" color="transparent" title="Press \ to toggle">
67
+ <zn-button slot="trigger" color="transparent" title="Press \ to toggle">
68
68
  <zn-icon class="only-light" src="light_mode"></zn-icon>
69
69
  <zn-icon class="only-dark" src="dark_mode"></zn-icon>
70
70
  </zn-button>
@@ -88,11 +88,11 @@
88
88
  </header>
89
89
 
90
90
  <div class="sidebar-buttons">
91
- <zn-button size="small" class="repo-button repo-button--github" href="https://github.com/kubex/zinc"
91
+ <zn-button class="repo-button repo-button--github" href="https://github.com/kubex/zinc"
92
92
  target="_blank" icon="folder_open" color="secondary">
93
93
  Code
94
94
  </zn-button>
95
- <zn-button size="small" class="repo-button repo-button--star" color="secondary"
95
+ <zn-button class="repo-button repo-button--star" color="secondary"
96
96
  href="https://github.com/kubex/zinc/stargazers" target="_blank" icon="star">
97
97
  Star
98
98
  </zn-button>
@@ -101,7 +101,6 @@
101
101
  <zn-button icon="search"
102
102
  class="search-box"
103
103
  color="transparent"
104
- size="small"
105
104
  type="button"
106
105
  title="Press / to search"
107
106
  aria-label="Search"
@@ -225,23 +225,23 @@ kbd {
225
225
  }
226
226
 
227
227
  ins {
228
- background-color: var(--zn-color-green-200);
229
- color: var(--zn-color-green-900);
228
+ background-color: rgb(var(--zn-green));
229
+ color: rgb(var(--zn-green));
230
230
  border-radius: var(--docs-border-radius);
231
231
  text-decoration: none;
232
232
  padding: 0.125em 0.25em;
233
233
  }
234
234
 
235
235
  s {
236
- background-color: var(--zn-color-red-200);
237
- color: var(--zn-color-red-900);
236
+ background-color: rgb(var(--zn-red));
237
+ color: rgb(var(--zn-red));
238
238
  border-radius: var(--docs-border-radius);
239
239
  text-decoration: none;
240
240
  padding: 0.125em 0.25em;
241
241
  }
242
242
 
243
243
  mark {
244
- background-color: var(--zn-color-yellow-200);
244
+ background-color: rgb(var(--zn-yellow));
245
245
  border-radius: var(--docs-border-radius);
246
246
  padding: 0.125em 0.25em;
247
247
  }
@@ -436,12 +436,12 @@ pre .token.property,
436
436
  pre .token.keyword,
437
437
  pre .token.tag,
438
438
  pre .token.url {
439
- color: var(--zn-color-blue-700);
439
+ color: rgb(var(--zn-blue));
440
440
  }
441
441
 
442
442
  pre .token.symbol,
443
443
  pre .token.deleted {
444
- color: var(--zn-color-red-700);
444
+ color: rgb(var(--zn-red));
445
445
  }
446
446
 
447
447
  pre .token.boolean,
@@ -452,24 +452,24 @@ pre .token.string,
452
452
  pre .token.char,
453
453
  pre .token.builtin,
454
454
  pre .token.inserted {
455
- color: var(--zn-color-emerald-700);
455
+ color: rgb(var(--zn-green));
456
456
  }
457
457
 
458
458
  pre .token.atrule,
459
459
  pre .token.attr-value,
460
460
  pre .token.number,
461
461
  pre .token.variable {
462
- color: var(--zn-color-violet-700);
462
+ color: rgb(var(--zn-violet));
463
463
  }
464
464
 
465
465
  pre .token.function,
466
466
  pre .token.class-name,
467
467
  pre .token.regex {
468
- color: var(--zn-color-orange-700);
468
+ color: rgb(var(--zn-orange));
469
469
  }
470
470
 
471
471
  pre .token.important {
472
- color: var(--zn-color-red-700);
472
+ color: rgb(var(--zn-red));
473
473
  }
474
474
 
475
475
  pre .token.important,
@@ -1143,11 +1143,11 @@ html.sidebar-open #menu-toggle {
1143
1143
  }
1144
1144
 
1145
1145
  .repo-button--star zn-icon {
1146
- color: var(--zn-color-yellow-500);
1146
+ color: rgb(var(--zn-yellow));
1147
1147
  }
1148
1148
 
1149
1149
  .repo-button--twitter zn-icon {
1150
- color: var(--zn-color-sky-500);
1150
+ color: rgb(var(--zn-blue));
1151
1151
  }
1152
1152
 
1153
1153
  @media screen and (max-width: 400px) {
@@ -11,7 +11,7 @@ layout: component
11
11
  <div style="display: flex; flex-direction: column; position: relative;">
12
12
  This is content on the outside
13
13
  <zn-absolute-container>
14
- <div style="background-color: var(--zn-color-amber-100); height: 400px; width: 100%; position: absolute;">
14
+ <div style="background-color: rgb(var(--zn-yellow)); height: 400px; width: 100%; position: absolute;">
15
15
  This is the content of the absoloute
16
16
  </div>
17
17
  </zn-absolute-container>
@@ -27,7 +27,7 @@ The absolute container is used to wrap absolute elements, that would otherwise c
27
27
 
28
28
  <div style="display: flex; position: relative;">
29
29
  <zn-absolute-container>
30
- <div style="background-color: var(--zn-color-amber-100); height: 400px; width: 100%; position: absolute;">
30
+ <div style="background-color: rgb(var(--zn-yellow)); height: 400px; width: 100%; position: absolute;">
31
31
  This is the content of the absoloute
32
32
  </div>
33
33
  </zn-absolute-container>
@@ -76,14 +76,14 @@ Use the `actions` slot to add buttons or other interactive elements to the alert
76
76
  ```html:preview
77
77
  <zn-alert caption="New updates available" icon="system_update" level="info">
78
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>
79
+ <zn-button slot="actions" color="info">Update Now</zn-button>
80
+ <zn-button slot="actions" color="transparent">Later</zn-button>
81
81
  </zn-alert>
82
82
  <br />
83
83
  <zn-alert caption="Confirm deletion" icon="delete" level="error">
84
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>
85
+ <zn-button slot="actions" color="error">Delete</zn-button>
86
+ <zn-button slot="actions" color="secondary">Cancel</zn-button>
87
87
  </zn-alert>
88
88
  ```
89
89
 
@@ -126,7 +126,7 @@ Alerts can contain rich HTML content including lists, links, and formatted text.
126
126
  <li>You have a stable internet connection</li>
127
127
  </ul>
128
128
  <p>Need help? <a href="#">Contact support</a></p>
129
- <zn-button slot="actions" color="info" size="small">Continue</zn-button>
129
+ <zn-button slot="actions" color="info">Continue</zn-button>
130
130
  </zn-alert>
131
131
  ```
132
132
 
@@ -174,10 +174,10 @@ Control the audio select programmatically by setting the `value` property or man
174
174
  </zn-audio-select>
175
175
 
176
176
  <div style="margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap;">
177
- <zn-button id="select-first" size="small">Select First</zn-button>
178
- <zn-button id="select-second" size="small">Select Second</zn-button>
179
- <zn-button id="clear-selection" size="small">Clear</zn-button>
180
- <zn-button id="add-file" size="small">Add File</zn-button>
177
+ <zn-button id="select-first">Select First</zn-button>
178
+ <zn-button id="select-second">Select Second</zn-button>
179
+ <zn-button id="clear-selection">Clear</zn-button>
180
+ <zn-button id="add-file">Add File</zn-button>
181
181
  </div>
182
182
 
183
183
  <script type="module">
@@ -111,7 +111,7 @@ Combine `gap` and `grow` attributes to create evenly-spaced, full-width button g
111
111
 
112
112
  ### Button Variants
113
113
 
114
- Button groups work with all button variants including colors, sizes, and styles.
114
+ Button groups work with all button variants including colors and styles.
115
115
 
116
116
  ```html:preview
117
117
  <zn-button-group>
@@ -139,36 +139,6 @@ Button groups work with all button variants including colors, sizes, and styles.
139
139
  </zn-button-group>
140
140
  ```
141
141
 
142
- ### Button Sizes
143
-
144
- Button groups respect the size of their contained buttons.
145
-
146
- ```html:preview
147
- <zn-button-group>
148
- <zn-button size="small">Small 1</zn-button>
149
- <zn-button size="small">Small 2</zn-button>
150
- <zn-button size="small">Small 3</zn-button>
151
- </zn-button-group>
152
-
153
- <br />
154
- <br />
155
-
156
- <zn-button-group>
157
- <zn-button size="medium">Medium 1</zn-button>
158
- <zn-button size="medium">Medium 2</zn-button>
159
- <zn-button size="medium">Medium 3</zn-button>
160
- </zn-button-group>
161
-
162
- <br />
163
- <br />
164
-
165
- <zn-button-group>
166
- <zn-button size="large">Large 1</zn-button>
167
- <zn-button size="large">Large 2</zn-button>
168
- <zn-button size="large">Large 3</zn-button>
169
- </zn-button-group>
170
- ```
171
-
172
142
  ### With Icons
173
143
 
174
144
  Button groups work seamlessly with icon buttons.
@@ -64,18 +64,6 @@ Use the `color` attribute to set the button's color.
64
64
  <zn-button color="transparent">Transparent</zn-button>
65
65
  ```
66
66
 
67
- ### Sizes
68
-
69
- Use the `size` attribute to set the button's size.
70
-
71
- ```html:preview
72
- <zn-button size="content">Content</zn-button>
73
- <zn-button size="x-small">X Small</zn-button>
74
- <zn-button size="small">Small</zn-button>
75
- <zn-button size="medium">Medium</zn-button>
76
- <zn-button size="large">Large</zn-button>
77
- ```
78
-
79
67
  ### Outline
80
68
 
81
69
  Use the `outline` attribute to set the button's outline.
@@ -129,6 +117,19 @@ Buttons can be used with just an icon and no text by omitting the button label.
129
117
  <zn-button icon="add" color="info"></zn-button>
130
118
  ```
131
119
 
120
+ ### Icon Button Style
121
+
122
+ Use `icon-button` to make only the nested icon appear clickable. The hover color defaults to `--zn-primary`; use `color` and `hover-color` to customize the icon colors.
123
+
124
+ ```html:preview
125
+ <zn-button icon-button icon="settings"></zn-button>
126
+ <zn-button icon-button icon="favorite" color="error"></zn-button>
127
+ <zn-button icon-button icon="share" color="#64748b" hover-color="#0f172a"></zn-button>
128
+ <zn-button icon-button color="success" hover-color="warning">
129
+ <zn-icon src="add" size="16"></zn-icon>
130
+ </zn-button>
131
+ ```
132
+
132
133
  ### Icon Position
133
134
 
134
135
  Use the `icon-position` attribute to control whether the icon appears before or after the button text.
@@ -457,10 +457,10 @@ Checkboxes provide several methods for programmatic control:
457
457
  <div>
458
458
  <zn-checkbox id="method-checkbox">Programmatic control</zn-checkbox>
459
459
  <br /><br />
460
- <zn-button id="click-btn" size="small">Click Checkbox</zn-button>
461
- <zn-button id="focus-btn" size="small" color="info">Focus Checkbox</zn-button>
462
- <zn-button id="blur-btn" size="small" color="secondary">Blur Checkbox</zn-button>
463
- <zn-button id="validate-btn" size="small" color="warning">Check Validity</zn-button>
460
+ <zn-button id="click-btn">Click Checkbox</zn-button>
461
+ <zn-button id="focus-btn" color="info">Focus Checkbox</zn-button>
462
+ <zn-button id="blur-btn" color="secondary">Blur Checkbox</zn-button>
463
+ <zn-button id="validate-btn" color="warning">Check Validity</zn-button>
464
464
  </div>
465
465
 
466
466
  <script type="module">
@@ -111,15 +111,15 @@ Chips can include an action button, typically used for removing or closing the c
111
111
  ```html:preview
112
112
  <zn-chip icon="tag" type="info">
113
113
  Removable Tag
114
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
114
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
115
115
  </zn-chip>
116
116
  <zn-chip icon="label" type="success">
117
117
  Another Tag
118
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
118
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
119
119
  </zn-chip>
120
120
  <zn-chip icon="bookmark" type="warning">
121
121
  Bookmark
122
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
122
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
123
123
  </zn-chip>
124
124
  ```
125
125
 
@@ -130,11 +130,11 @@ The `action` slot can be used for any interactive element, not just close button
130
130
  ```html:preview
131
131
  <zn-chip icon="notifications" type="primary">
132
132
  Notifications
133
- <zn-button icon="settings" slot="action" size="content" icon-size="14" color="transparent"></zn-button>
133
+ <zn-button icon="settings" slot="action" icon-size="14" color="transparent"></zn-button>
134
134
  </zn-chip>
135
135
  <zn-chip icon="download" type="info">
136
136
  Download
137
- <zn-button icon="arrow_drop_down" slot="action" size="content" icon-size="16" color="transparent"></zn-button>
137
+ <zn-button icon="arrow_drop_down" slot="action" icon-size="16" color="transparent"></zn-button>
138
138
  </zn-chip>
139
139
  ```
140
140
 
@@ -189,19 +189,19 @@ Chips work well when grouped together to represent multiple tags or categories.
189
189
  <div style="display: flex; gap: 8px; flex-wrap: wrap;">
190
190
  <zn-chip icon="tag" type="info">
191
191
  Frontend
192
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
192
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
193
193
  </zn-chip>
194
194
  <zn-chip icon="tag" type="info">
195
195
  Backend
196
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
196
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
197
197
  </zn-chip>
198
198
  <zn-chip icon="tag" type="info">
199
199
  Database
200
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
200
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
201
201
  </zn-chip>
202
202
  <zn-chip icon="tag" type="info">
203
203
  DevOps
204
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
204
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
205
205
  </zn-chip>
206
206
  </div>
207
207
  ```
@@ -231,7 +231,7 @@ Chips can be used to display user information or assignments.
231
231
  <zn-chip icon="person" type="primary">Bob Johnson</zn-chip>
232
232
  <zn-chip icon="person" type="primary">
233
233
  Alice Williams
234
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
234
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
235
235
  </zn-chip>
236
236
  </div>
237
237
  ```
@@ -244,19 +244,19 @@ Here's a complete example demonstrating removable chips with JavaScript interact
244
244
  <div id="chip-container" style="display: flex; gap: 8px; flex-wrap: wrap;">
245
245
  <zn-chip icon="tag" type="info">
246
246
  Design
247
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
247
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
248
248
  </zn-chip>
249
249
  <zn-chip icon="tag" type="info">
250
250
  Development
251
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
251
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
252
252
  </zn-chip>
253
253
  <zn-chip icon="tag" type="info">
254
254
  Testing
255
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
255
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
256
256
  </zn-chip>
257
257
  <zn-chip icon="tag" type="info">
258
258
  Documentation
259
- <zn-button icon="close" slot="action" size="content" icon-size="12" color="transparent"></zn-button>
259
+ <zn-button icon="close" slot="action" icon-size="12" color="transparent"></zn-button>
260
260
  </zn-chip>
261
261
  </div>
262
262
 
@@ -169,7 +169,7 @@ By default, rows can be selected by clicking. Selected rows are tracked and can
169
169
  {"key":"status","label":"Status"}
170
170
  ]'>
171
171
 
172
- <zn-button slot="delete-action" color="error" icon="delete" size="x-small">
172
+ <zn-button slot="delete-action" color="error" icon="delete">
173
173
  Delete Selected
174
174
  </zn-button>
175
175
 
@@ -208,15 +208,15 @@ Add action buttons to the table header for performing operations on selected row
208
208
  {"key":"status","label":"Status"}
209
209
  ]'>
210
210
 
211
- <zn-button slot="delete-action" color="error" icon="delete" size="x-small">
211
+ <zn-button slot="delete-action" color="error" icon="delete">
212
212
  Delete Selected
213
213
  </zn-button>
214
214
 
215
- <zn-button slot="modify-action" color="info" icon="edit" size="x-small">
215
+ <zn-button slot="modify-action" color="info" icon="edit">
216
216
  Edit Selected
217
217
  </zn-button>
218
218
 
219
- <zn-button slot="create-action" color="success" icon="add" size="x-small">
219
+ <zn-button slot="create-action" color="success" icon="add">
220
220
  Create New
221
221
  </zn-button>
222
222
 
@@ -357,11 +357,11 @@ You can control the datepicker programmatically using its methods:
357
357
  <zn-datepicker id="programmatic-datepicker" label="Programmatic control"></zn-datepicker>
358
358
 
359
359
  <div style="margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap;">
360
- <zn-button id="focus-btn" size="small">Focus</zn-button>
361
- <zn-button id="blur-btn" size="small">Blur</zn-button>
362
- <zn-button id="set-value-btn" size="small">Set Value</zn-button>
363
- <zn-button id="clear-value-btn" size="small">Clear Value</zn-button>
364
- <zn-button id="check-validity-btn" size="small">Check Validity</zn-button>
360
+ <zn-button id="focus-btn">Focus</zn-button>
361
+ <zn-button id="blur-btn">Blur</zn-button>
362
+ <zn-button id="set-value-btn">Set Value</zn-button>
363
+ <zn-button id="clear-value-btn">Clear Value</zn-button>
364
+ <zn-button id="check-validity-btn">Check Validity</zn-button>
365
365
  </div>
366
366
  </div>
367
367
 
@@ -195,8 +195,8 @@ Use the `header-actions` slot to add buttons or other interactive elements to th
195
195
  ```html:preview
196
196
  <zn-button id="dialog-header-actions-trigger">Open Dialog</zn-button>
197
197
  <zn-dialog trigger="dialog-header-actions-trigger" label="Document Settings">
198
- <zn-button icon="refresh" color="transparent" size="content" slot="header-actions"></zn-button>
199
- <zn-button icon="settings" color="transparent" size="content" slot="header-actions"></zn-button>
198
+ <zn-button icon="refresh" color="transparent" slot="header-actions"></zn-button>
199
+ <zn-button icon="settings" color="transparent" slot="header-actions"></zn-button>
200
200
 
201
201
  <p>This dialog has action buttons in the header for quick access to common functions.</p>
202
202
 
@@ -49,10 +49,10 @@ Add the `clearable` attribute to display a close button next to each selected fi
49
49
 
50
50
  ### Droparea Mode
51
51
 
52
- Use the `droparea` attribute to render the file control as a large drag-and-drop area. This mode is ideal when file upload is a primary action on the page.
52
+ Use the `droparea` attribute to render the file control as a bordered upload area with a centered upload button. When a file is selected, the area displays an image preview (for image files) or the file name (for non-previewable files), along with a clear button in the top-right corner. The area also accepts files via drag-and-drop.
53
53
 
54
54
  ```html:preview
55
- <zn-file label="Upload Files" droparea multiple></zn-file>
55
+ <zn-file label="Upload Files" droparea></zn-file>
56
56
  ```
57
57
 
58
58
  ### Accepted File Types
@@ -78,20 +78,92 @@ See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Attrib
78
78
 
79
79
  ### Droparea with Accepted Types
80
80
 
81
- Combine `droparea` and `accept` for a prominent upload area with file type restrictions.
81
+ Combine `droparea` and `accept` for a prominent upload area with file type restrictions. Selected image files render a preview inside the box.
82
82
 
83
83
  ```html:preview
84
- <zn-file label="Upload Images" accept="image/*" multiple droparea></zn-file>
84
+ <zn-file label="Upload Image" accept="image/*" droparea></zn-file>
85
85
  ```
86
86
 
87
- ### Custom Droparea Icon
87
+ ### Droparea with Image Preview
88
88
 
89
- Use the `droparea-icon` slot to customize the icon displayed in the droparea.
89
+ When an image file is selected, the droparea renders a centered thumbnail preview alongside a clear button in the top-right. The example below pre-loads a sample image so you can see the preview state.
90
90
 
91
91
  ```html:preview
92
- <zn-file label="Upload Photos" droparea multiple>
93
- <zn-icon src="photo_library" slot="droparea-icon"></zn-icon>
94
- </zn-file>
92
+ <zn-file class="file-with-preview" label="Primary Logo" accept="image/*" droparea></zn-file>
93
+
94
+ <script type="module">
95
+ const fileInput = document.querySelector('.file-with-preview');
96
+
97
+ await customElements.whenDefined('zn-file');
98
+ await fileInput.updateComplete;
99
+
100
+ // Inline SVG sample so the demo works offline. Explicit width/height keep older
101
+ // browsers happy that don't size SVGs from viewBox alone inside <img>.
102
+ const sampleSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
103
+ <defs>
104
+ <linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
105
+ <stop offset="0%" stop-color="#3b82f6"/>
106
+ <stop offset="100%" stop-color="#7c3aed"/>
107
+ </linearGradient>
108
+ </defs>
109
+ <rect width="200" height="200" rx="24" fill="url(#g)"/>
110
+ <circle cx="100" cy="100" r="50" fill="none" stroke="#000" stroke-width="10"/>
111
+ </svg>`;
112
+
113
+ const file = new File([sampleSvg], 'sample-logo.svg', { type: 'image/svg+xml' });
114
+ const dt = new DataTransfer();
115
+ dt.items.add(file);
116
+ fileInput.files = dt.files;
117
+ </script>
118
+ ```
119
+
120
+ ### Droparea with Non-Previewable File
121
+
122
+ When the selected file is not an image, the droparea displays the file name centered inside the box.
123
+
124
+ ```html:preview
125
+ <zn-file class="file-with-doc" label="Upload Document" accept=".pdf,.doc,.docx" droparea></zn-file>
126
+
127
+ <script type="module">
128
+ const fileInput = document.querySelector('.file-with-doc');
129
+
130
+ await customElements.whenDefined('zn-file');
131
+ await fileInput.updateComplete;
132
+
133
+ const file = new File(['%PDF-1.4 sample'], 'project-brief.pdf', { type: 'application/pdf' });
134
+ const dt = new DataTransfer();
135
+ dt.items.add(file);
136
+ fileInput.files = dt.files;
137
+ </script>
138
+ ```
139
+
140
+ ### Displaying an Already-Uploaded File (CDN URL)
141
+
142
+ Use the `src` attribute to point the file control at an already-uploaded file — for example, a logo hosted on a CDN. The droparea renders the image preview when `src` points to an image, or the URL as a filename otherwise. Add the `show-link` attribute to render the current link as a clickable URL beneath the control. Read `fileInput.previewSrc` to retrieve the current link programmatically (whether from a local selection or the `src` attribute).
143
+
144
+ ```html:preview
145
+ <zn-file
146
+ class="file-with-cdn"
147
+ label="Primary Logo"
148
+ droparea
149
+ show-link
150
+ src="https://upload.wikimedia.org/wikipedia/commons/1/1b/ViaDeTogniPalazzoStelline.jpg"
151
+ ></zn-file>
152
+ ```
153
+
154
+ :::tip
155
+ When the user picks a local file, `previewSrc` switches to the in-memory object URL for that file (and `show-link` renders that blob URL). After clearing (the X button + confirm dialog), `previewSrc` returns to whatever `src` is currently set to.
156
+ :::
157
+
158
+ ### Auto-Submit on Change
159
+
160
+ Add the `trigger-submit` attribute to automatically submit the surrounding form whenever the user picks, drops, or clears a file. This is useful for forms that only contain the file control and a CSRF token — no explicit submit button needed.
161
+
162
+ ```html
163
+ <form action="/logo/upload" method="post" enctype="multipart/form-data">
164
+ <input type="hidden" name="_token" value="{{ csrf_token }}">
165
+ <zn-file name="logo" droparea trigger-submit accept="image/*"></zn-file>
166
+ </form>
95
167
  ```
96
168
 
97
169
  ### Directory Upload
@@ -9,7 +9,6 @@ layout: component
9
9
 
10
10
  <div style="background-color: #f5f5f5; padding: 20px;">
11
11
  <zn-header caption="John Jones"
12
- description="This is the Description of the header"
13
12
  previous-path="#"
14
13
  navigation="[{&quot;path&quot;:&quot;#&quot;,&quot;title&quot;:&quot;Dashboard&quot;},{&quot;path&quot;:&quot;#&quot;,&quot;title&quot;:&quot;Another&quot;}]">
15
14
  <zn-icon round src="test1@example.com" size="36"></zn-icon>
@@ -47,14 +46,14 @@ The breadcrumb slot renders inline with the page title — each slotted link is
47
46
 
48
47
  ```html:preview
49
48
  <div style="background-color: #f5f5f5; padding: 20px;">
50
- <zn-header caption="John Jones" description="This is the description of the header"></zn-header>
49
+ <zn-header caption="John Jones"></zn-header>
51
50
  </div>
52
51
  ```
53
52
  ### Simple Header with Icon
54
53
 
55
54
  ```html:preview
56
55
  <div style="background-color: #f5f5f5; padding: 20px;">
57
- <zn-header icon="person" caption="John Jones" description="This is the description of the header"></zn-header>
56
+ <zn-header icon="person" caption="John Jones"></zn-header>
58
57
  </div>
59
58
  ```
60
59
 
@@ -63,7 +62,7 @@ The breadcrumb slot renders inline with the page title — each slotted link is
63
62
 
64
63
  ```html:preview
65
64
  <div style="background-color: #f5f5f5; padding: 20px;">
66
- <zn-header caption="John Jones" description="This is the description of the header">
65
+ <zn-header caption="John Jones">
67
66
  <zn-button-menu slot="actions">
68
67
  <zn-button primary>Something sdf</zn-button>
69
68
  <zn-button >sd</zn-button>
@@ -85,7 +84,7 @@ The breadcrumb slot renders inline with the page title — each slotted link is
85
84
 
86
85
  ```html:preview
87
86
  <div style="background-color: #f5f5f5; padding: 20px;">
88
- <zn-header caption="John Jones" description="This is the description of the header">
87
+ <zn-header caption="John Jones">
89
88
  <zn-button-menu slot="actions">
90
89
  <zn-button primary>Something sdf</zn-button>
91
90
  <zn-button >sd</zn-button>
@@ -120,4 +119,3 @@ The breadcrumb slot renders inline with the page title — each slotted link is
120
119
  </div>
121
120
  ```
122
121
 
123
-
@@ -201,7 +201,7 @@ Provide contextual help for form fields.
201
201
  <div style="display: flex; align-items: center; gap: 5px;">
202
202
  <zn-input label="API Key" placeholder="Enter your API key"></zn-input>
203
203
  <zn-hover-container trigger="click" placement="right">
204
- <zn-button slot="anchor" icon="info" color="transparent" size="small"></zn-button>
204
+ <zn-button slot="anchor" icon="info" color="transparent"></zn-button>
205
205
  <div slot="content" style="max-width: 250px; padding: 10px;">
206
206
  <h4 style="margin: 0 0 5px 0;">Finding your API Key</h4>
207
207
  <p style="margin: 0; font-size: 0.9em;">Go to Settings &gt; Developer &gt; API Keys to generate a new key.</p>
@@ -183,6 +183,20 @@ Using shorthand notation:
183
183
  <zn-icon src="star@line" size="32"></zn-icon>
184
184
  ```
185
185
 
186
+ ### Lucide Icons
187
+
188
+ Lucide icons are rendered as inline SVGs. Use `library="lucide"` or the `@lucide` and `@lu` shorthand.
189
+
190
+ <a href="https://lucide.dev/icons" target="_blank">View Lucide Icons</a>
191
+
192
+ ```html:preview
193
+ <zn-icon src="house" library="lucide" size="32"></zn-icon>
194
+ <zn-icon src="cloud-upload" library="lucide" size="32"></zn-icon>
195
+ <zn-icon src="badge-check" library="lucide" size="32"></zn-icon>
196
+ <zn-icon src="settings-2@lucide" size="32"></zn-icon>
197
+ <zn-icon src="circle-alert@lu" size="32" color="warning"></zn-icon>
198
+ ```
199
+
186
200
  ### Brand Icons
187
201
 
188
202
  Display brand logos and custom company icons using the brands library.
@@ -796,10 +796,10 @@ You can control the inline edit component programmatically using its methods:
796
796
  </zn-inline-edit>
797
797
 
798
798
  <div style="margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap;">
799
- <zn-button id="check-validity-btn" size="small">Check Validity</zn-button>
800
- <zn-button id="set-value-btn" size="small">Set Value</zn-button>
801
- <zn-button id="focus-btn" size="small">Focus</zn-button>
802
- <zn-button id="get-value-btn" size="small">Get Value</zn-button>
799
+ <zn-button id="check-validity-btn">Check Validity</zn-button>
800
+ <zn-button id="set-value-btn">Set Value</zn-button>
801
+ <zn-button id="focus-btn">Focus</zn-button>
802
+ <zn-button id="get-value-btn">Get Value</zn-button>
803
803
  </div>
804
804
  </div>
805
805