@kubex/zinc 1.0.25 → 1.0.99
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 +13575 -8856
- package/dist/vscode.html-custom-data.json +583 -48
- package/dist/web-types.json +1441 -181
- package/dist/zn.d.ts +1645 -660
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +1412 -893
- 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/item.md +18 -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 -19
- 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 +81 -22
- 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 +324 -5
- package/src/components/input/input.scss +87 -0
- 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 +24 -3
- package/src/components/item/item.scss +18 -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 -11
- 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 -44
- package/src/components/translations/translations.scss +4 -0
- 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
|
@@ -1,13 +1,310 @@
|
|
|
1
1
|
---
|
|
2
2
|
meta:
|
|
3
3
|
title: Well
|
|
4
|
-
description:
|
|
4
|
+
description: Wells are used to display informational content in a subtle, contained format with optional icons and inline display.
|
|
5
5
|
layout: component
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
```html:preview
|
|
9
|
-
<div>
|
|
10
9
|
<zn-well icon="calendar_month">Triggers every <strong>5 minutes</strong></zn-well>
|
|
11
|
-
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
### Basic Well
|
|
15
|
+
|
|
16
|
+
A basic well component displays content in a subtle, bordered container with a light background.
|
|
17
|
+
|
|
18
|
+
```html:preview
|
|
19
|
+
<zn-well>This is a basic well with simple text content.</zn-well>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### With Icon
|
|
23
|
+
|
|
24
|
+
Use the `icon` attribute to add an icon to the left side of the well content. The icon uses the Material Icons library.
|
|
25
|
+
|
|
26
|
+
```html:preview
|
|
27
|
+
<zn-well icon="schedule">Scheduled for execution</zn-well>
|
|
28
|
+
<br />
|
|
29
|
+
<zn-well icon="calendar_month">Triggers every <strong>5 minutes</strong></zn-well>
|
|
30
|
+
<br />
|
|
31
|
+
<zn-well icon="info">Additional information available</zn-well>
|
|
32
|
+
<br />
|
|
33
|
+
<zn-well icon="cloud_upload">Automatically syncs to cloud storage</zn-well>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Inline Display
|
|
37
|
+
|
|
38
|
+
Use the `inline` attribute to display the well as an inline-flex element, allowing it to flow with surrounding content.
|
|
39
|
+
|
|
40
|
+
```html:preview
|
|
41
|
+
<p>
|
|
42
|
+
This text is followed by
|
|
43
|
+
<zn-well inline icon="timer">a 30-second timeout</zn-well>
|
|
44
|
+
and continues here.
|
|
45
|
+
</p>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Inline vs Block
|
|
49
|
+
|
|
50
|
+
Compare the difference between inline and block (default) display modes.
|
|
51
|
+
|
|
52
|
+
```html:preview
|
|
53
|
+
<div>
|
|
54
|
+
<p>Block well (default):</p>
|
|
55
|
+
<zn-well icon="notification_important">This well spans the full width of its container</zn-well>
|
|
56
|
+
</div>
|
|
57
|
+
<br />
|
|
58
|
+
<div>
|
|
59
|
+
<p>Inline well:</p>
|
|
60
|
+
<p>
|
|
61
|
+
Text before
|
|
62
|
+
<zn-well inline icon="notification_important">inline well here</zn-well>
|
|
63
|
+
text after
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### With Action Slot
|
|
69
|
+
|
|
70
|
+
Use the `action` slot to add interactive elements or additional information to the right side of the well.
|
|
71
|
+
|
|
72
|
+
```html:preview
|
|
73
|
+
<zn-well icon="schedule">
|
|
74
|
+
Triggers every <strong>5 minutes</strong>
|
|
75
|
+
<zn-button slot="action" color="transparent" size="small">Edit</zn-button>
|
|
76
|
+
</zn-well>
|
|
77
|
+
<br />
|
|
78
|
+
<zn-well icon="cloud_sync">
|
|
79
|
+
Last sync: 2 minutes ago
|
|
80
|
+
<zn-button slot="action" color="primary" size="small">Sync Now</zn-button>
|
|
81
|
+
</zn-well>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Multiple Action Items
|
|
85
|
+
|
|
86
|
+
The action slot can contain multiple elements for more complex interactions.
|
|
87
|
+
|
|
88
|
+
```html:preview
|
|
89
|
+
<zn-well icon="settings">
|
|
90
|
+
Configuration status: Active
|
|
91
|
+
<div slot="action" style="display: flex; gap: 8px;">
|
|
92
|
+
<zn-button color="transparent" size="small">Configure</zn-button>
|
|
93
|
+
<zn-button color="transparent" size="small">Disable</zn-button>
|
|
94
|
+
</div>
|
|
95
|
+
</zn-well>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Rich Content
|
|
99
|
+
|
|
100
|
+
Wells can contain rich HTML content including formatted text, links, and nested elements.
|
|
101
|
+
|
|
102
|
+
```html:preview
|
|
103
|
+
<zn-well icon="description">
|
|
104
|
+
<div>
|
|
105
|
+
<strong>Document Type:</strong> Configuration File<br />
|
|
106
|
+
<small style="color: var(--zn-color-text-muted);">Last modified: 01/23/26</small>
|
|
107
|
+
</div>
|
|
108
|
+
<zn-button slot="action" color="transparent" size="small">View</zn-button>
|
|
109
|
+
</zn-well>
|
|
110
|
+
<br />
|
|
111
|
+
<zn-well icon="folder_open">
|
|
112
|
+
<div>
|
|
113
|
+
<p style="margin: 0;"><strong>Project Files</strong></p>
|
|
114
|
+
<p style="margin: 4px 0 0 0;">
|
|
115
|
+
<small>Contains 24 files | 12.5 MB total</small>
|
|
116
|
+
</p>
|
|
117
|
+
</div>
|
|
118
|
+
<zn-button slot="action" color="primary" size="small">Open</zn-button>
|
|
119
|
+
</zn-well>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Status Indicators
|
|
123
|
+
|
|
124
|
+
Wells are perfect for displaying status information with icons and formatted content.
|
|
125
|
+
|
|
126
|
+
```html:preview
|
|
127
|
+
<zn-well icon="check_circle">
|
|
128
|
+
<strong>Deployment successful</strong> - Version 1.2.3 deployed to production
|
|
129
|
+
</zn-well>
|
|
130
|
+
<br />
|
|
131
|
+
<zn-well icon="sync">
|
|
132
|
+
<strong>Syncing...</strong> - 45% complete
|
|
133
|
+
</zn-well>
|
|
134
|
+
<br />
|
|
135
|
+
<zn-well icon="warning">
|
|
136
|
+
<strong>Warning:</strong> Low disk space - 2.1 GB remaining
|
|
137
|
+
</zn-well>
|
|
138
|
+
<br />
|
|
139
|
+
<zn-well icon="error">
|
|
140
|
+
<strong>Build failed</strong> - See logs for details
|
|
141
|
+
<zn-button slot="action" color="error" size="small">View Logs</zn-button>
|
|
142
|
+
</zn-well>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Schedule and Timing Information
|
|
146
|
+
|
|
147
|
+
Use wells to display scheduling and timing details.
|
|
148
|
+
|
|
149
|
+
```html:preview
|
|
150
|
+
<zn-well icon="schedule">
|
|
151
|
+
Runs every <strong>Monday at 9:00 AM</strong>
|
|
152
|
+
<zn-button slot="action" color="transparent" size="small">Edit Schedule</zn-button>
|
|
153
|
+
</zn-well>
|
|
154
|
+
<br />
|
|
155
|
+
<zn-well icon="timer">
|
|
156
|
+
Timeout: <strong>5 minutes</strong>
|
|
157
|
+
</zn-well>
|
|
158
|
+
<br />
|
|
159
|
+
<zn-well icon="event">
|
|
160
|
+
Next execution: <strong>Tomorrow at 3:00 PM</strong>
|
|
161
|
+
</zn-well>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Configuration Details
|
|
165
|
+
|
|
166
|
+
Display configuration information in a clean, organized format.
|
|
167
|
+
|
|
168
|
+
```html:preview
|
|
169
|
+
<zn-well icon="dns">
|
|
170
|
+
<div>
|
|
171
|
+
<strong>Database Connection</strong><br />
|
|
172
|
+
<small>PostgreSQL • us-east-1 • Read/Write</small>
|
|
173
|
+
</div>
|
|
174
|
+
<zn-button slot="action" color="transparent" size="small">Test Connection</zn-button>
|
|
175
|
+
</zn-well>
|
|
176
|
+
<br />
|
|
177
|
+
<zn-well icon="storage">
|
|
178
|
+
<div>
|
|
179
|
+
<strong>Cache Configuration</strong><br />
|
|
180
|
+
<small>Redis • 500 MB limit • TTL: 3600s</small>
|
|
181
|
+
</div>
|
|
182
|
+
<zn-button slot="action" color="transparent" size="small">Clear Cache</zn-button>
|
|
183
|
+
</zn-well>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Without Icon
|
|
187
|
+
|
|
188
|
+
Wells work perfectly fine without an icon for simpler, cleaner displays.
|
|
189
|
+
|
|
190
|
+
```html:preview
|
|
191
|
+
<zn-well>Simple well without an icon</zn-well>
|
|
192
|
+
<br />
|
|
193
|
+
<zn-well>
|
|
194
|
+
<strong>Important:</strong> Configuration changes require a restart
|
|
195
|
+
<zn-button slot="action" color="warning" size="small">Restart Now</zn-button>
|
|
196
|
+
</zn-well>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Inline Wells in Lists
|
|
200
|
+
|
|
201
|
+
Combine inline wells with other content for compact information display.
|
|
202
|
+
|
|
203
|
+
```html:preview
|
|
204
|
+
<ul>
|
|
205
|
+
<li>Task 1: Complete <zn-well inline icon="schedule">Due in 2 hours</zn-well></li>
|
|
206
|
+
<li>Task 2: In Progress <zn-well inline icon="sync">50% complete</zn-well></li>
|
|
207
|
+
<li>Task 3: Done <zn-well inline icon="check_circle">Completed</zn-well></li>
|
|
208
|
+
</ul>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Real-World Use Cases
|
|
212
|
+
|
|
213
|
+
#### Cron Job Information
|
|
214
|
+
|
|
215
|
+
```html:preview
|
|
216
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
217
|
+
<zn-well icon="schedule">
|
|
218
|
+
<strong>Daily Backup</strong><br />
|
|
219
|
+
Triggers every day at <strong>2:00 AM UTC</strong>
|
|
220
|
+
<div slot="action" style="display: flex; gap: 8px;">
|
|
221
|
+
<zn-button color="transparent" size="small">Edit</zn-button>
|
|
222
|
+
<zn-button color="transparent" size="small">Run Now</zn-button>
|
|
223
|
+
</div>
|
|
224
|
+
</zn-well>
|
|
225
|
+
|
|
226
|
+
<zn-well icon="update">
|
|
227
|
+
<strong>Weekly Reports</strong><br />
|
|
228
|
+
Triggers every <strong>Monday at 9:00 AM</strong>
|
|
229
|
+
<div slot="action" style="display: flex; gap: 8px;">
|
|
230
|
+
<zn-button color="transparent" size="small">Edit</zn-button>
|
|
231
|
+
<zn-button color="primary" size="small">View Reports</zn-button>
|
|
232
|
+
</div>
|
|
233
|
+
</zn-well>
|
|
234
|
+
</div>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### System Resource Information
|
|
238
|
+
|
|
239
|
+
```html:preview
|
|
240
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
241
|
+
<zn-well icon="memory">
|
|
242
|
+
<div>
|
|
243
|
+
<strong>Memory Usage</strong><br />
|
|
244
|
+
<small>2.4 GB / 8.0 GB (30%)</small>
|
|
245
|
+
</div>
|
|
246
|
+
</zn-well>
|
|
247
|
+
|
|
248
|
+
<zn-well icon="storage">
|
|
249
|
+
<div>
|
|
250
|
+
<strong>Disk Space</strong><br />
|
|
251
|
+
<small>45.2 GB / 100 GB (45%)</small>
|
|
252
|
+
</div>
|
|
253
|
+
<zn-button slot="action" color="transparent" size="small">Details</zn-button>
|
|
254
|
+
</zn-well>
|
|
255
|
+
|
|
256
|
+
<zn-well icon="speed">
|
|
257
|
+
<div>
|
|
258
|
+
<strong>CPU Load</strong><br />
|
|
259
|
+
<small>12% average over last hour</small>
|
|
260
|
+
</div>
|
|
261
|
+
</zn-well>
|
|
262
|
+
</div>
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### Integration Status
|
|
266
|
+
|
|
267
|
+
```html:preview
|
|
268
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
269
|
+
<zn-well icon="cloud_done">
|
|
270
|
+
<strong>AWS S3</strong> - Connected
|
|
271
|
+
<zn-button slot="action" color="transparent" size="small">Configure</zn-button>
|
|
272
|
+
</zn-well>
|
|
273
|
+
|
|
274
|
+
<zn-well icon="sync">
|
|
275
|
+
<strong>GitHub</strong> - Syncing
|
|
276
|
+
<zn-button slot="action" color="transparent" size="small">View Status</zn-button>
|
|
277
|
+
</zn-well>
|
|
278
|
+
|
|
279
|
+
<zn-well icon="check_circle">
|
|
280
|
+
<strong>Stripe</strong> - Active • Webhook configured
|
|
281
|
+
<zn-button slot="action" color="transparent" size="small">Settings</zn-button>
|
|
282
|
+
</zn-well>
|
|
283
|
+
</div>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
#### Workflow Steps
|
|
287
|
+
|
|
288
|
+
```html:preview
|
|
289
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
290
|
+
<zn-well icon="filter_1">
|
|
291
|
+
<strong>Step 1:</strong> Data Collection
|
|
292
|
+
<span slot="action"><small style="color: var(--zn-color-text-muted);">Completed</small></span>
|
|
293
|
+
</zn-well>
|
|
294
|
+
|
|
295
|
+
<zn-well icon="filter_2">
|
|
296
|
+
<strong>Step 2:</strong> Processing
|
|
297
|
+
<span slot="action"><small style="color: var(--zn-color-text-success);">In Progress (65%)</small></span>
|
|
298
|
+
</zn-well>
|
|
299
|
+
|
|
300
|
+
<zn-well icon="filter_3">
|
|
301
|
+
<strong>Step 3:</strong> Validation
|
|
302
|
+
<span slot="action"><small style="color: var(--zn-color-text-muted);">Pending</small></span>
|
|
303
|
+
</zn-well>
|
|
304
|
+
|
|
305
|
+
<zn-well icon="filter_4">
|
|
306
|
+
<strong>Step 4:</strong> Export Results
|
|
307
|
+
<span slot="action"><small style="color: var(--zn-color-text-muted);">Pending</small></span>
|
|
308
|
+
</zn-well>
|
|
12
309
|
</div>
|
|
13
310
|
```
|
|
@@ -255,6 +255,168 @@ Custom validation can be applied to any form control that supports the `setCusto
|
|
|
255
255
|
to inputs and textareas.
|
|
256
256
|
:::
|
|
257
257
|
|
|
258
|
+
## Form Navigation with Enter Key
|
|
259
|
+
|
|
260
|
+
Zinc forms support an opt-in Enter key navigation feature that improves the user experience for data entry forms. When
|
|
261
|
+
enabled using the `data-enter-navigation` attribute on a `<form>` element, pressing Enter will:
|
|
262
|
+
|
|
263
|
+
- Move focus to the next input field if all named fields are not yet complete
|
|
264
|
+
- Submit the form when all named fields are filled and valid
|
|
265
|
+
|
|
266
|
+
This feature is particularly useful for forms where users naturally want to press Enter to advance through fields, such
|
|
267
|
+
as registration forms, checkout flows, or data entry interfaces.
|
|
268
|
+
|
|
269
|
+
### Basic Example
|
|
270
|
+
|
|
271
|
+
```html:preview
|
|
272
|
+
<form class="form-nav-example" data-enter-navigation>
|
|
273
|
+
<zn-input name="firstName" label="First Name" required></zn-input>
|
|
274
|
+
<br />
|
|
275
|
+
<zn-input name="lastName" label="Last Name" required></zn-input>
|
|
276
|
+
<br />
|
|
277
|
+
<zn-input name="email" type="email" label="Email" required></zn-input>
|
|
278
|
+
<br />
|
|
279
|
+
<zn-input name="phone" type="tel" label="Phone"></zn-input>
|
|
280
|
+
<br />
|
|
281
|
+
<zn-button type="submit" variant="primary">Submit</zn-button>
|
|
282
|
+
</form>
|
|
283
|
+
|
|
284
|
+
<script type="module">
|
|
285
|
+
const form = document.querySelector('.form-nav-example');
|
|
286
|
+
|
|
287
|
+
// Wait for controls to be defined before attaching form listeners
|
|
288
|
+
await Promise.all([
|
|
289
|
+
customElements.whenDefined('zn-button'),
|
|
290
|
+
customElements.whenDefined('zn-input')
|
|
291
|
+
]).then(() => {
|
|
292
|
+
form.addEventListener('submit', (e) => {
|
|
293
|
+
e.preventDefault();
|
|
294
|
+
alert('Form submitted successfully!');
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
</script>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
In this example:
|
|
301
|
+
|
|
302
|
+
1. Pressing Enter in "First Name" moves the focus to "Last Name"
|
|
303
|
+
2. Pressing Enter in "Last Name" moves the focus to "Email"
|
|
304
|
+
3. Pressing Enter in "Email" moves the focus to "Phone"
|
|
305
|
+
4. Pressing Enter in "Phone" (the last field with a name) submits the form when all named fields are filled
|
|
306
|
+
|
|
307
|
+
### Comprehensive Example with All Input Types
|
|
308
|
+
|
|
309
|
+
This example demonstrates Enter key navigation with all available Zinc form controls:
|
|
310
|
+
|
|
311
|
+
```html:preview
|
|
312
|
+
<form class="form-nav-comprehensive" data-enter-navigation>
|
|
313
|
+
<zn-input name="username" label="Username" required></zn-input>
|
|
314
|
+
<br />
|
|
315
|
+
<zn-input name="email" type="email" label="Email" required></zn-input>
|
|
316
|
+
<br />
|
|
317
|
+
<zn-input name="phone" type="tel" label="Phone" required></zn-input>
|
|
318
|
+
<br />
|
|
319
|
+
<zn-input name="age" type="number" label="Age" min="18" required></zn-input>
|
|
320
|
+
<br />
|
|
321
|
+
<zn-input name="salary" type="currency" label="Salary" required></zn-input>
|
|
322
|
+
<br />
|
|
323
|
+
<zn-datepicker name="startDate" label="Start Date" required></zn-datepicker>
|
|
324
|
+
<br />
|
|
325
|
+
<zn-select name="department" label="Department" required clearable>
|
|
326
|
+
<zn-option value="engineering">Engineering</zn-option>
|
|
327
|
+
<zn-option value="sales">Sales</zn-option>
|
|
328
|
+
<zn-option value="marketing">Marketing</zn-option>
|
|
329
|
+
<zn-option value="hr">Human Resources</zn-option>
|
|
330
|
+
</zn-select>
|
|
331
|
+
<br />
|
|
332
|
+
<zn-select name="level" label="Level" required clearable>
|
|
333
|
+
<zn-option value="junior">Junior</zn-option>
|
|
334
|
+
<zn-option value="mid">Mid-level</zn-option>
|
|
335
|
+
<zn-option value="senior">Senior</zn-option>
|
|
336
|
+
<zn-option value="lead">Lead</zn-option>
|
|
337
|
+
</zn-select>
|
|
338
|
+
<br />
|
|
339
|
+
<zn-radio-group name="employment" label="Employment Type" required>
|
|
340
|
+
<zn-radio value="fulltime">Full-time</zn-radio>
|
|
341
|
+
<zn-radio value="parttime">Part-time</zn-radio>
|
|
342
|
+
<zn-radio value="contract">Contract</zn-radio>
|
|
343
|
+
</zn-radio-group>
|
|
344
|
+
<br /><br />
|
|
345
|
+
<zn-checkbox name="terms" value="accepted" required>I accept the terms and conditions</zn-checkbox>
|
|
346
|
+
<br /><br />
|
|
347
|
+
<zn-checkbox name="newsletter" value="yes">Subscribe to newsletter</zn-checkbox>
|
|
348
|
+
<br /><br />
|
|
349
|
+
<zn-toggle name="notifications" value="enabled">Enable notifications</zn-toggle>
|
|
350
|
+
<br /><br />
|
|
351
|
+
<zn-textarea name="bio" label="Bio (Press Tab to navigate, Enter for newlines)"></zn-textarea>
|
|
352
|
+
<br />
|
|
353
|
+
<zn-button type="submit" variant="primary">Submit Application</zn-button>
|
|
354
|
+
</form>
|
|
355
|
+
|
|
356
|
+
<script type="module">
|
|
357
|
+
const form = document.querySelector('.form-nav-comprehensive');
|
|
358
|
+
|
|
359
|
+
// Wait for controls to be defined before attaching form listeners
|
|
360
|
+
await Promise.all([
|
|
361
|
+
customElements.whenDefined('zn-button'),
|
|
362
|
+
customElements.whenDefined('zn-checkbox'),
|
|
363
|
+
customElements.whenDefined('zn-datepicker'),
|
|
364
|
+
customElements.whenDefined('zn-input'),
|
|
365
|
+
customElements.whenDefined('zn-option'),
|
|
366
|
+
customElements.whenDefined('zn-radio'),
|
|
367
|
+
customElements.whenDefined('zn-radio-group'),
|
|
368
|
+
customElements.whenDefined('zn-select'),
|
|
369
|
+
customElements.whenDefined('zn-textarea'),
|
|
370
|
+
customElements.whenDefined('zn-toggle')
|
|
371
|
+
]).then(() => {
|
|
372
|
+
form.addEventListener('submit', (e) => {
|
|
373
|
+
e.preventDefault();
|
|
374
|
+
const formData = new FormData(form);
|
|
375
|
+
const data = Object.fromEntries(formData);
|
|
376
|
+
alert('Application submitted!\n\n' + JSON.stringify(data, null, 2));
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
</script>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Navigation flow:**
|
|
383
|
+
|
|
384
|
+
- Press Enter to move through: Username → Email → Phone → Age → Salary → Start Date → Department → Level → Employment
|
|
385
|
+
Type (radio group) → Terms checkbox → Newsletter checkbox → Notifications toggle → Bio
|
|
386
|
+
- The form submits when all named fields are filled and valid
|
|
387
|
+
- Note: Textarea uses Tab for navigation since Enter is needed for newlines
|
|
388
|
+
|
|
389
|
+
### Navigation Keys
|
|
390
|
+
|
|
391
|
+
The form navigation feature supports multiple keyboard shortcuts:
|
|
392
|
+
|
|
393
|
+
- **Enter key** - Moves to the next field. Submits the form when all named fields are complete.
|
|
394
|
+
- **Arrow Down/Up keys** – On checkboxes and toggles, moves to the next/previous field. On radio buttons, selects the next/previous option within the radio group.
|
|
395
|
+
- **Tab key** – Standard browser tab navigation still works alongside form navigation.
|
|
396
|
+
|
|
397
|
+
### Control-Specific Behaviors
|
|
398
|
+
|
|
399
|
+
Different form controls have specialized navigation behaviors:
|
|
400
|
+
|
|
401
|
+
- **Text inputs** – Enter moves to the next field
|
|
402
|
+
- **Number/Currency inputs** – Enter moves to the next field
|
|
403
|
+
- **Datepicker** – Automatically opens when navigated to with Enter. Press Enter on a date to select it and move to the next field.
|
|
404
|
+
- **Select dropdowns** - Automatically opens when navigated to with Enter. Press Enter on an option to select it and
|
|
405
|
+
move to the next field.
|
|
406
|
+
- **Radio buttons** – Arrow keys select different options within the radio group. Space or Enter selects the current option. Press Enter to move to the next form control.
|
|
407
|
+
- **Checkboxes** – Space toggles the checkbox. Enter, Arrow Down, or Arrow Up moves to the next/previous field.
|
|
408
|
+
- **Toggles** – Space toggles the toggle. Enter, Arrow Down, or Arrow Up moves to the next/previous field.
|
|
409
|
+
- **Textareas** – You can navigate TO a textarea with Enter, but pressing Enter inside a textarea adds newlines. Use Tab
|
|
410
|
+
to navigate away from textareas.
|
|
411
|
+
- **Search inputs** – You can navigate TO a search input with Enter, but pressing Enter inside a search input triggers
|
|
412
|
+
search. Use Tab to navigate away from search inputs.
|
|
413
|
+
- **Buttons** – Excluded from navigation entirely (handle their own Enter key behavior)
|
|
414
|
+
|
|
415
|
+
:::tip
|
|
416
|
+
For more examples and interactive demonstrations, see
|
|
417
|
+
the [Form Navigation section](/components/input#form-navigation-with-enter-key) in the Input component documentation.
|
|
418
|
+
:::
|
|
419
|
+
|
|
258
420
|
## Custom Validation Styles
|
|
259
421
|
|
|
260
422
|
Due to the many ways form controls are used, Zinc doesn't provide out of the box validation styles for form controls as
|
package/docs/pages/index.md
CHANGED
|
@@ -5,28 +5,129 @@ meta:
|
|
|
5
5
|
toc: false
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Zinc Web Components
|
|
9
|
+
|
|
10
|
+
A comprehensive library of 88+ web components built with Lit, designed for modern web applications.
|
|
9
11
|
|
|
10
12
|
<div class="badges">
|
|
11
13
|
|
|
12
14
|
[](https://www.npmjs.com/package/@kubex/zinc)
|
|
13
|
-
[](https://github.com/kubex/zinc/blob/LICENSE.md)
|
|
15
|
+
[](https://github.com/kubex/zinc/blob/LICENSE.md)
|
|
14
16
|
|
|
15
17
|
</div>
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- **88+ Components** - From form controls to data visualization
|
|
22
|
+
- **TypeScript First** - Full type safety with comprehensive declarations
|
|
23
|
+
- **Lit-based** - Built on the modern Lit framework for fast, lightweight components
|
|
24
|
+
- **Accessible** - ARIA compliant with keyboard navigation support
|
|
25
|
+
- **Form Integration** - Native form controls that work with standard HTML forms
|
|
26
|
+
- **Customizable** - CSS custom properties and parts for easy styling
|
|
27
|
+
- **Theme Support** - Light/dark mode built-in
|
|
28
|
+
- **Tree-shakeable** - Import only what you need
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
Install Zinc via npm:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @kubex/zinc
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Import the components you need:
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
import '@kubex/zinc/dist/zn.min.js';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use them in your HTML:
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<zn-button color="success">Click Me</zn-button>
|
|
48
|
+
<zn-input label="Name" placeholder="Enter your name"></zn-input>
|
|
49
|
+
<zn-select label="Country">
|
|
50
|
+
<zn-option value="us">United States</zn-option>
|
|
51
|
+
<zn-option value="uk">United Kingdom</zn-option>
|
|
52
|
+
<zn-option value="ca">Canada</zn-option>
|
|
53
|
+
</zn-select>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Component Categories
|
|
57
|
+
|
|
58
|
+
### Form Controls
|
|
59
|
+
Complete set of form elements with validation, accessibility, and native form integration:
|
|
60
|
+
- [Button](/components/button), [Input](/components/input), [Textarea](/components/textarea)
|
|
61
|
+
- [Checkbox](/components/checkbox), [Radio](/components/radio), [Toggle](/components/toggle)
|
|
62
|
+
- [Select](/components/select), [Datepicker](/components/datepicker), [File](/components/file)
|
|
63
|
+
- [Rating](/components/rating), [Editor](/components/editor)
|
|
64
|
+
|
|
65
|
+
### Layout & Navigation
|
|
66
|
+
Build complex layouts with flexible containers and navigation patterns:
|
|
67
|
+
- [Dialog](/components/dialog), [Slideout](/components/slideout), [Tabs](/components/tabs)
|
|
68
|
+
- [Panel](/components/panel), [Pane](/components/pane), [Split Pane](/components/split-pane)
|
|
69
|
+
- [Menu](/components/menu), [Dropdown](/components/dropdown), [Navbar](/components/navbar)
|
|
70
|
+
|
|
71
|
+
### Data Display
|
|
72
|
+
Present data in clear, interactive formats:
|
|
73
|
+
- [Data Table](/components/data-table), [Chart](/components/chart), [Stat](/components/stat)
|
|
74
|
+
- [Pagination](/components/pagination), [Progress Bar](/components/progress-bar)
|
|
75
|
+
- [Tile](/components/tile), [Collapsible](/components/collapsible)
|
|
76
|
+
|
|
77
|
+
### Feedback & Indicators
|
|
78
|
+
Communicate state and provide feedback to users:
|
|
79
|
+
- [Alert](/components/alert), [Note](/components/note), [Tooltip](/components/tooltip)
|
|
80
|
+
- [Empty State](/components/empty-state), [Skeleton](/components/skeleton)
|
|
81
|
+
- [Status Indicator](/components/status-indicator), [Stepper](/components/stepper)
|
|
82
|
+
|
|
83
|
+
### Utilities
|
|
84
|
+
Helper components for common UI patterns:
|
|
85
|
+
- [Icon](/components/icon), [Chip](/components/chip), [Copy Button](/components/copy-button)
|
|
86
|
+
- [Reveal](/components/reveal), [Inline Edit](/components/inline-edit)
|
|
87
|
+
- [Scroll Container](/components/scroll-container), [Well](/components/well)
|
|
88
|
+
|
|
89
|
+
## Why Zinc?
|
|
90
|
+
|
|
91
|
+
**Developer Experience**: Comprehensive documentation with live examples, TypeScript support, and intuitive APIs make development fast and enjoyable.
|
|
92
|
+
|
|
93
|
+
**Production Ready**: Battle-tested components used in real-world applications with robust error handling and edge case coverage.
|
|
94
|
+
|
|
95
|
+
**Customizable**: Every component exposes CSS custom properties and parts for granular styling control without fighting the framework.
|
|
96
|
+
|
|
97
|
+
**Performance**: Lightweight components with lazy loading support and optimized rendering for smooth 60fps interactions.
|
|
98
|
+
|
|
99
|
+
**Future Proof**: Built on web standards with modern JavaScript features, ensuring long-term compatibility and maintainability.
|
|
100
|
+
|
|
101
|
+
## Browser Support
|
|
102
|
+
|
|
103
|
+
Zinc works in all modern browsers:
|
|
104
|
+
- Chrome/Edge 90+
|
|
105
|
+
- Firefox 88+
|
|
106
|
+
- Safari 14+
|
|
107
|
+
- Opera 76+
|
|
108
|
+
|
|
109
|
+
For older browsers, you may need polyfills for Web Components and ES2017+ features.
|
|
18
110
|
|
|
19
111
|
## Attribution
|
|
20
112
|
|
|
21
|
-
Special thanks to the following projects and individuals that help make
|
|
22
|
-
|
|
23
|
-
- [Shoelace](https://shoelace.style/)
|
|
24
|
-
-
|
|
25
|
-
- Component metadata
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
113
|
+
Special thanks to the following projects and individuals that help make Zinc possible:
|
|
114
|
+
|
|
115
|
+
- [Shoelace](https://shoelace.style/) - Many components were inspired by and adapted from Shoelace
|
|
116
|
+
- [Lit](https://lit.dev/) - Fast, lightweight web component base class
|
|
117
|
+
- [Custom Elements Manifest Analyzer](https://github.com/open-wc/custom-elements-manifest) - Component metadata generation
|
|
118
|
+
- [11ty](https://www.11ty.dev/) - Static site generator powering this documentation
|
|
119
|
+
- [Tailwind CSS](https://tailwindcss.com/) - Color primitive inspiration
|
|
120
|
+
- [Material Icons](https://fonts.google.com/icons) - Icon library
|
|
121
|
+
- [Floating UI](https://floating-ui.com/) - Positioning engine for dropdowns and tooltips
|
|
122
|
+
- [ApexCharts](https://apexcharts.com/) - Charting library
|
|
123
|
+
- [Quill](https://quilljs.com/) - Rich text editor
|
|
124
|
+
- [Lunr](https://lunrjs.com/) - Client-side search
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
Zinc is available under the [MIT License](https://github.com/kubex/zinc/blob/master/LICENSE.md).
|
|
129
|
+
|
|
130
|
+
## Getting Help
|
|
131
|
+
|
|
132
|
+
- **Documentation**: Browse the [component documentation](/components/button) for detailed usage examples
|
|
133
|
+
- **GitHub Issues**: Report bugs or request features on [GitHub](https://github.com/kubex/zinc/issues)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubex/zinc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.99",
|
|
4
4
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web components",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"
|
|
16
|
+
"url": "https://github.com/kubex/zinc"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "",
|
|
@@ -34,10 +34,9 @@
|
|
|
34
34
|
"lint": "eslint src --max-warnings 0",
|
|
35
35
|
"lint:fix": "eslint src --max-warnings 0 --fix",
|
|
36
36
|
"lint:component": "eslint -- ",
|
|
37
|
-
"
|
|
38
|
-
"test": "web-test-runner --group
|
|
39
|
-
"test:
|
|
40
|
-
"test:watch": "web-test-runner --watch --group default",
|
|
37
|
+
"test": "npx playwright install --with-deps && web-test-runner --group default",
|
|
38
|
+
"test:component": "npx playwright install --with-deps && web-test-runner -- --watch --group",
|
|
39
|
+
"test:watch": "npx playwright install --with-deps && web-test-runner --watch --group default",
|
|
41
40
|
"watch": "node scripts/build.js --serve"
|
|
42
41
|
},
|
|
43
42
|
"dependencies": {
|