@kubex/zinc 1.1.179 → 1.1.181

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 (31) hide show
  1. package/dist/custom-elements.json +697 -454
  2. package/dist/vscode.html-custom-data.json +102 -64
  3. package/dist/web-types.json +243 -163
  4. package/dist/zn.d.ts +115 -11
  5. package/dist/zn.min.js +331 -322
  6. package/docs/pages/components/chart.md +49 -0
  7. package/docs/pages/components/stat.md +74 -0
  8. package/docs/pages/components/tile.md +16 -0
  9. package/package.json +1 -1
  10. package/src/components/chart/builders.ts +15 -0
  11. package/src/components/chart/chart-live.test.ts +82 -0
  12. package/src/components/chart/chart.component.ts +111 -14
  13. package/src/components/chart/live.test.ts +96 -0
  14. package/src/components/chart/live.ts +164 -0
  15. package/src/components/cols/cols.scss +16 -0
  16. package/src/components/data-table/data-table.component.ts +3 -2
  17. package/src/components/data-table-filter/data-table-filter.component.ts +2 -2
  18. package/src/components/data-table-search/data-table-search.component.ts +2 -2
  19. package/src/components/defined-label/defined-label.component.ts +1 -1
  20. package/src/components/filter-container/filter-container.component.ts +1 -1
  21. package/src/components/filter-wrapper/filter-wrapper.component.ts +2 -0
  22. package/src/components/filter-wrapper/filter-wrapper.test.ts +46 -0
  23. package/src/components/icon-picker/icon-picker.component.ts +1 -1
  24. package/src/components/input/input.component.ts +10 -0
  25. package/src/components/remarkd-editor/remarkd-editor.component.ts +1 -1
  26. package/src/components/select/select.component.ts +1 -1
  27. package/src/components/stat/stat.component.ts +81 -12
  28. package/src/components/stat/stat.scss +64 -0
  29. package/src/components/tile/tile.component.ts +3 -0
  30. package/src/components/tile/tile.scss +30 -0
  31. package/src/internal/form.ts +18 -3
@@ -124,6 +124,11 @@ a {
124
124
  text-overflow: ellipsis;
125
125
  }
126
126
 
127
+ // A slot has no box of its own, so the slotted description would overflow rather than truncate
128
+ slot.tile__description {
129
+ display: block;
130
+ }
131
+
127
132
  .tile--inline .tile__description {
128
133
  margin: 0;
129
134
  }
@@ -190,3 +195,28 @@ a {
190
195
  min-width: 0;
191
196
  overflow: hidden;
192
197
  }
198
+
199
+ :host([stack-actions]) {
200
+ container-type: inline-size;
201
+ }
202
+
203
+ :host([stack-actions]) .tile {
204
+ @include wc.container-query(null, ph) {
205
+ flex-wrap: wrap;
206
+ row-gap: var(--zn-spacing-x-small);
207
+
208
+ .tile__link {
209
+ flex-basis: 100%;
210
+ }
211
+
212
+ .tile__right {
213
+ justify-content: flex-start;
214
+ flex-wrap: wrap;
215
+ }
216
+
217
+ .tile__actions {
218
+ flex-wrap: wrap;
219
+ row-gap: var(--zn-spacing-x-small);
220
+ }
221
+ }
222
+ }
@@ -193,6 +193,22 @@ function removeStoredValuesByPrefix(storage: Storage, keyPrefix: string) {
193
193
  keys.forEach(key => storage.removeItem(key));
194
194
  }
195
195
 
196
+ /** Trims a control's string value in place, so what's shown matches what's submitted. */
197
+ export function trimControlValue(control: Element & { value?: unknown; type?: string; input?: unknown }) {
198
+ if (typeof control.value !== 'string' || control.type === 'password') return;
199
+
200
+ const trimmed = control.value.trim();
201
+ if (trimmed !== control.value) {
202
+ control.value = trimmed;
203
+ }
204
+
205
+ // Email inputs already strip whitespace from .value but keep it on screen
206
+ const field = control instanceof HTMLInputElement ? control : control.input;
207
+ if (control.type === 'email' && field instanceof HTMLInputElement) {
208
+ field.value = trimmed;
209
+ }
210
+ }
211
+
196
212
  export function clearFormStoreValues(formOrStoreKey: HTMLFormElement | string) {
197
213
  const keyPrefix = typeof formOrStoreKey === 'string' ? formOrStoreKey : getFormStoreKey(formOrStoreKey);
198
214
 
@@ -476,9 +492,8 @@ export class FormControlController implements ReactiveController {
476
492
  } else {
477
493
  appendPrimitive(value as string | number | boolean);
478
494
 
479
- const host = this.host as HTMLElement & { value?: unknown };
480
- if (!isPassword && typeof value === 'string' && host.value === value && value.trim() !== value) {
481
- host.value = value.trim();
495
+ if ((this.host as HTMLElement & { value?: unknown }).value === value) {
496
+ trimControlValue(this.host);
482
497
  }
483
498
  }
484
499